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
4e1180d74403f2dcae2be8e22cf0d561304b6a85
6f6fd51a6f298242318f0538787b6416916e7722
/JDK7-45/src/main/java/com/hmz/source/org/omg/CosNaming/NamingContextExt.java
dcc9ec151acf787a979935e4888f3bf7359ec3ef
[]
no_license
houmaozheng/JDKSourceProject
5f20578c46ad0758a1e2f45d36380db0bcd46f05
699b4cce980371be0d038a06ce3ea617dacd612c
refs/heads/master
2023-06-16T21:48:46.957538
2021-07-15T17:01:46
2021-07-15T17:01:46
385,537,090
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
package org.omg.CosNaming; /** * org/omg/CosNaming/NamingContextExt.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl * Tuesday, October 8, 2013 5:44:45 AM PDT */ /** * <code>NamingContextExt</code> is the extension of <code>NamingContext</code> * which * contains a set of name bindings in which each name is unique and is * part of Interoperable Naming Service. * Different names can be bound to an object in the same or different * contexts at the same time. Using <tt>NamingContextExt</tt>, you can use * URL-based names to bind and resolve. <p> * * See <a href="http://www.omg.org/technology/documents/formal/naming_service.htm"> * CORBA COS * Naming Specification.</a> */ public interface NamingContextExt extends NamingContextExtOperations, org.omg.CosNaming.NamingContext, org.omg.CORBA.portable.IDLEntity { } // interface NamingContextExt
[ "houmaozheng@126.com" ]
houmaozheng@126.com
a54198229d50335a69cda8256b181fcc0fd174fe
170a018b6c5d7b80e42deabc42778e74a16e091e
/java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/supplierproduct/SupplierProductCommand.java
260bbac410f6f31207613c78dc04a8d9d0ec5a57
[]
no_license
windygu/wms-2
39cf350bf773510268e340d05ec98541cee56577
6cc0b35d057a02b4f2884442fee1979a2ed7aa5f
refs/heads/master
2020-04-22T15:05:09.492570
2018-09-13T05:33:49
2018-09-13T05:33:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,861
java
package org.dddml.wms.domain.supplierproduct; import java.util.*; import java.util.Date; import org.dddml.wms.domain.*; import org.dddml.wms.domain.Command; import org.dddml.wms.specialization.DomainError; public interface SupplierProductCommand extends Command { SupplierProductId getSupplierProductId(); void setSupplierProductId(SupplierProductId supplierProductId); Long getVersion(); void setVersion(Long version); static void throwOnInvalidStateTransition(SupplierProductState state, Command c) { if (state.getVersion() == null) { if (isCommandCreate((SupplierProductCommand)c)) { return; } throw DomainError.named("premature", "Can't do anything to unexistent aggregate"); } if (isCommandCreate((SupplierProductCommand)c)) throw DomainError.named("rebirth", "Can't create aggregate that already exists"); } static boolean isCommandCreate(SupplierProductCommand c) { return ((c instanceof SupplierProductCommand.CreateSupplierProduct) && (COMMAND_TYPE_CREATE.equals(c.getCommandType()) || c.getVersion().equals(SupplierProductState.VERSION_NULL))); } interface CreateOrMergePatchSupplierProduct extends SupplierProductCommand { java.sql.Timestamp getAvailableThruDate(); void setAvailableThruDate(java.sql.Timestamp availableThruDate); String getSupplierPrefOrderId(); void setSupplierPrefOrderId(String supplierPrefOrderId); String getSupplierRatingTypeId(); void setSupplierRatingTypeId(String supplierRatingTypeId); java.math.BigDecimal getStandardLeadTimeDays(); void setStandardLeadTimeDays(java.math.BigDecimal standardLeadTimeDays); java.math.BigDecimal getManufacturingLeadTimeDays(); void setManufacturingLeadTimeDays(java.math.BigDecimal manufacturingLeadTimeDays); java.math.BigDecimal getDeliveryLeadTimeDays(); void setDeliveryLeadTimeDays(java.math.BigDecimal deliveryLeadTimeDays); String getQuantityUomId(); void setQuantityUomId(String quantityUomId); java.math.BigDecimal getLastPrice(); void setLastPrice(java.math.BigDecimal lastPrice); java.math.BigDecimal getShippingPrice(); void setShippingPrice(java.math.BigDecimal shippingPrice); String getExternalProductName(); void setExternalProductName(String externalProductName); String getExternalProductId(); void setExternalProductId(String externalProductId); Boolean getCanDropShip(); void setCanDropShip(Boolean canDropShip); String getComments(); void setComments(String comments); Boolean getActive(); void setActive(Boolean active); } interface CreateSupplierProduct extends CreateOrMergePatchSupplierProduct { } interface MergePatchSupplierProduct extends CreateOrMergePatchSupplierProduct { Boolean getIsPropertyAvailableThruDateRemoved(); void setIsPropertyAvailableThruDateRemoved(Boolean removed); Boolean getIsPropertySupplierPrefOrderIdRemoved(); void setIsPropertySupplierPrefOrderIdRemoved(Boolean removed); Boolean getIsPropertySupplierRatingTypeIdRemoved(); void setIsPropertySupplierRatingTypeIdRemoved(Boolean removed); Boolean getIsPropertyStandardLeadTimeDaysRemoved(); void setIsPropertyStandardLeadTimeDaysRemoved(Boolean removed); Boolean getIsPropertyManufacturingLeadTimeDaysRemoved(); void setIsPropertyManufacturingLeadTimeDaysRemoved(Boolean removed); Boolean getIsPropertyDeliveryLeadTimeDaysRemoved(); void setIsPropertyDeliveryLeadTimeDaysRemoved(Boolean removed); Boolean getIsPropertyQuantityUomIdRemoved(); void setIsPropertyQuantityUomIdRemoved(Boolean removed); Boolean getIsPropertyLastPriceRemoved(); void setIsPropertyLastPriceRemoved(Boolean removed); Boolean getIsPropertyShippingPriceRemoved(); void setIsPropertyShippingPriceRemoved(Boolean removed); Boolean getIsPropertyExternalProductNameRemoved(); void setIsPropertyExternalProductNameRemoved(Boolean removed); Boolean getIsPropertyExternalProductIdRemoved(); void setIsPropertyExternalProductIdRemoved(Boolean removed); Boolean getIsPropertyCanDropShipRemoved(); void setIsPropertyCanDropShipRemoved(Boolean removed); Boolean getIsPropertyCommentsRemoved(); void setIsPropertyCommentsRemoved(Boolean removed); Boolean getIsPropertyActiveRemoved(); void setIsPropertyActiveRemoved(Boolean removed); } interface DeleteSupplierProduct extends SupplierProductCommand { } }
[ "yangjiefeng@gmail.com" ]
yangjiefeng@gmail.com
65a57ee3efb8fbe12bc40e52b78c77bae1ae5376
e6f1481b08c519feae212c1cf0103934bad413cb
/src/org/semanticweb/swse/econs/cli/CheckSimilarities.java
5f1ce1316aeac96b6d27bc745d1926c95fe3c199
[]
no_license
aidhog/swse
826aca195a5dda05fddac305e8a5b17df8a3b4ce
b4e9fed3f525973bc0ffb3104152a7f313726fb2
refs/heads/master
2023-01-19T01:40:56.061727
2020-11-21T20:01:10
2020-11-21T20:01:10
314,888,556
0
0
null
null
null
null
UTF-8
Java
false
false
3,607
java
package org.semanticweb.swse.econs.cli; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.Vector; import java.util.Map.Entry; import java.util.logging.Logger; import java.util.zip.GZIPInputStream; import org.apache.commons.cli.BasicParser; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.semanticweb.swse.econs.sim.RMIEconsSimServer.PredStats; import org.semanticweb.swse.econs.sim.utils.RemoteScatter; import org.semanticweb.yars.nx.Node; import org.semanticweb.yars.nx.Nodes; import org.semanticweb.yars.nx.parser.NxParser; /** * Main method to conduct distributed reasoning using remote reasoners * controllable via RMI. * * @author aidhog */ public class CheckSimilarities { private final static Logger _log = Logger.getLogger(CheckSimilarities.class.getSimpleName()); public static final int TOP_K = 10; public static void main(String args[]) throws Exception{ NxParser.DEFAULT_PARSE_DTS = false; Options options = new Options(); Option inO = new Option("i", "similarities to extract"); inO.setArgs(1); inO.setRequired(true); options.addOption(inO); Option dO = new Option("d", "directory of raw similarities"); dO.setArgs(1); dO.setRequired(true); options.addOption(dO); Option helpO = new Option("h", "print help"); options.addOption(helpO); CommandLineParser parser = new BasicParser(); CommandLine cmd = null; try { cmd = parser.parse(options, args); } catch (org.apache.commons.cli.ParseException e) { System.err.println("***ERROR: " + e.getClass() + ": " + e.getMessage()); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("parameters:", options ); return; } if (cmd.hasOption("h")) { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("parameters:", options ); return; } InputStream is = new FileInputStream(cmd.getOptionValue("i")); NxParser nxp = new NxParser(is); HashSet<Nodes> sims = new HashSet<Nodes>(); while(nxp.hasNext()){ Node[] next = nxp.next(); sims.add(new Nodes(next[0], next[1])); } is.close(); String dir = cmd.getOptionValue("d"); Vector<String> files = new Vector<String>(); File d = new File(dir); for(File f:d.listFiles()){ if(f.getName().endsWith(RemoteScatter.GATHER)){ files.add(f.getAbsolutePath()); _log.info("Adding "+f.getAbsoluteFile()+" to check..."); } } for(String f:files){ is = new GZIPInputStream(new FileInputStream(f)); nxp = new NxParser(is); while(nxp.hasNext()){ Node[] next = nxp.next(); Nodes check = new Nodes(next[0], next[1]); if(sims.contains(check)){ _log.info(Nodes.toN3(next)); } } is.close(); } } public static class PredStatComparator implements Comparator<Map.Entry<Node,PredStats>>{ public int compare(Entry<Node, PredStats> arg0, Entry<Node, PredStats> arg1) { int comp = Double.compare(arg0.getValue().getAverage(), arg1.getValue().getAverage()); if(comp!=0){ return comp; } return arg0.getKey().compareTo(arg1.getKey()); } } }
[ "aidhog@gmail.com" ]
aidhog@gmail.com
2a0a0d1f17a94ee3ed6fa8bc0bafe83db6e89d96
205e7175c428ff9d83d8bded152d22de92c8b030
/mpos_base/src/main/java/com/site/core/mybatis/SQLHelp.java
9ac95dfc376f07e2c61dbae630818af28a9df0c0
[]
no_license
langrs/mpos
e0039ce479a052a9ff21b9ba55b96c447f75561c
837c536c527179eba1bec6f7c954ea9a6d18ea0f
refs/heads/master
2020-03-23T20:20:10.035520
2018-07-23T15:41:25
2018-07-23T15:42:16
142,035,656
0
0
null
null
null
null
UTF-8
Java
false
false
3,289
java
/* * Copyright (c) 2012-2013, Poplar Yfyang 杨友峰 (poplar1123@gmail.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.site.core.mybatis; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.scripting.defaults.DefaultParameterHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.jdbc.datasource.DataSourceUtils; import javax.sql.DataSource; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * 统计总数,分页插件中使用。 * @author ray */ public class SQLHelp { private static Logger logger = LoggerFactory.getLogger(SQLHelp.class); /** * 查询总纪录数 * * @param sql SQL语句 * @param mappedStatement mapped * @param parameterObject 参数 * @param boundSql boundSql * @param dialect database dialect * @return 总记录数 * @throws SQLException sql查询错误 */ public static int getCount(final String sql, final MappedStatement mappedStatement, final Object parameterObject, final BoundSql boundSql, Dialect dialect) throws SQLException { final String count_sql = dialect.getCountString(sql); logger.debug("Total count SQL [{}] ", count_sql); logger.debug("Total count Parameters: {} ", parameterObject); DataSource dataSource=mappedStatement.getConfiguration().getEnvironment().getDataSource(); Connection connection= DataSourceUtils.getConnection(dataSource); PreparedStatement countStmt = null; ResultSet rs = null; try { countStmt = connection.prepareStatement(count_sql); //Page SQL和Count SQL的参数是一样的,在绑定参数时可以使用一样的boundSql DefaultParameterHandler handler = new DefaultParameterHandler(mappedStatement,parameterObject,boundSql); handler.setParameters(countStmt); rs = countStmt.executeQuery(); int count = 0; if (rs.next()) { count = rs.getInt(1); } logger.debug("Total count: {}", count); return count; } finally { try { if (rs != null) { rs.close(); } } finally { try { if (countStmt != null) { countStmt.close(); } } finally { DataSourceUtils.releaseConnection(connection,dataSource); } } } } }
[ "27617839@qq.com" ]
27617839@qq.com
fb39e579c2f628a6e2fc0863f7be3d34b8ae8270
0f1f7332b8b06d3c9f61870eb2caed00aa529aaa
/ebean/tags/v1.2.0/src/com/avaje/ebean/server/persist/dml/UpdateMeta.java
139d242c281d58524230149c2505cbd75dc98f61
[]
no_license
rbygrave/sourceforge-ebean
7e52e3ef439ed64eaf5ce48e0311e2625f7ee5ed
694274581a188be664614135baa3e4697d52d6fb
refs/heads/master
2020-06-19T10:29:37.011676
2019-12-17T22:09:29
2019-12-17T22:09:29
196,677,514
1
0
null
2019-12-17T22:07:13
2019-07-13T04:21:16
Java
UTF-8
Java
false
false
4,981
java
/** * Copyright (C) 2006 Robin Bygrave * * This file is part of Ebean. * * Ebean is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * Ebean is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Ebean; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ package com.avaje.ebean.server.persist.dml; import java.sql.SQLException; import javax.persistence.PersistenceException; import com.avaje.ebean.server.core.ConcurrencyMode; import com.avaje.ebean.server.core.PersistRequestBean; import com.avaje.ebean.server.deploy.BeanDescriptor; import com.avaje.ebean.server.persist.dmlbind.Bindable; /** * Meta data for update handler. The meta data is for a particular bean type. It * is considered immutable and is thread safe. */ public final class UpdateMeta { private final String sqlVersion; private final String sqlNone; private final Bindable set; private final Bindable id; private final Bindable version; private final Bindable all; private final String tableName; public UpdateMeta(BeanDescriptor<?> desc, Bindable set, Bindable id, Bindable version, Bindable all) { this.tableName = desc.getBaseTable(); this.set = set; this.id = id; this.version = version; this.all = all; sqlNone = genSql(ConcurrencyMode.NONE, null); sqlVersion = genSql(ConcurrencyMode.VERSION, null); } /** * Return the base table name. */ public String getTableName() { return tableName; } /** * Bind the request based on the concurrency mode. */ public void bind(PersistRequestBean<?> persist, DmlHandler bind) throws SQLException { Object bean = persist.getBean(); bind.bindLogAppend(" set["); set.dmlBind(bind, true, bean, true); bind.bindLogAppend("] where["); id.dmlBind(bind, false, bean, true); int mode = persist.getConcurrencyMode(); if (mode == ConcurrencyMode.VERSION) { version.dmlBind(bind, false, bean, true); } else if (mode == ConcurrencyMode.ALL) { Object oldBean = persist.getOldValues(); all.dmlBind(bind, true, oldBean, false); } } /** * get or generate the sql based on the concurrency mode. */ public String getSql(PersistRequestBean<?> request) { int mode = request.determineConcurrencyMode(); if (request.isDynamicUpdateSql()){ return genSql(mode, request); } // 'full bean' update... switch (mode) { case ConcurrencyMode.NONE: return sqlNone; case ConcurrencyMode.VERSION: return sqlVersion; case ConcurrencyMode.ALL: Object oldValues = request.getOldValues(); if (oldValues == null) { throw new PersistenceException("OldValues are null?"); } return genDynamicWhere(oldValues); default: throw new RuntimeException("Invalid mode "+mode); } } private String genSql(int conMode, PersistRequestBean<?> persistRequest) { // update set col0=?, col1=?, col2=? where bcol=? and bc1=? and bc2=? GenerateDmlRequest request; if (persistRequest == null){ // For generation of None and Version DML/SQL request = new GenerateDmlRequest(); } else { if (persistRequest.isUpdateChangesOnly()){ set.determineChangedProperties(persistRequest); } request = persistRequest.createGenerateDmlRequest(); } request.append("update ").append(tableName).append(" set "); request.setUpdateSetMode(); set.dmlAppend(request, true); request.append(" where "); request.setWhereIdMode(); id.dmlAppend(request, false); if (conMode == ConcurrencyMode.VERSION) { if (version == null){ return null; } //request.setWhereMode(); version.dmlAppend(request, false); } else if (conMode == ConcurrencyMode.ALL) { //request.setWhereMode(); all.dmlWhere(request, true, request.getOldValues()); } return request.toString(); } /** * Generate the sql dynamically for where using IS NULL for binding null values. */ private String genDynamicWhere(Object oldBean) { // always has a preceding id property(s) so the first // option is always ' and ' and not blank. GenerateDmlRequest request = new GenerateDmlRequest(null, oldBean); //request.setBean(oldBean); request.append(sqlNone); request.setWhereMode(); all.dmlWhere(request, true, oldBean); return request.toString(); } }
[ "208973+rbygrave@users.noreply.github.com" ]
208973+rbygrave@users.noreply.github.com
b5870e2ca68b492f234496b1dab960e0ac6ae268
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--kotlin/05aaea48e9806eb73fe7c51ea2ad94711d543f69/before/JetObjectDeclaration.java
122378f8f99a999a18898b973f010fb04dc3beaf
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,075
java
/* * Copyright 2010-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; import com.intellij.navigation.ItemPresentation; import com.intellij.navigation.ItemPresentationProviders; import com.intellij.psi.PsiElement; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.JetNodeTypes; import org.jetbrains.jet.lang.psi.stubs.PsiJetObjectStub; import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; import org.jetbrains.jet.lexer.JetModifierKeywordToken; import org.jetbrains.jet.lexer.JetTokens; import java.util.Collections; import java.util.List; public class JetObjectDeclaration extends JetNamedDeclarationStub<PsiJetObjectStub> implements JetClassOrObject { public JetObjectDeclaration(@NotNull ASTNode node) { super(node); } public JetObjectDeclaration(@NotNull PsiJetObjectStub stub) { super(stub, JetStubElementTypes.OBJECT_DECLARATION); } @Override public String getName() { PsiJetObjectStub stub = getStub(); if (stub != null) { return stub.getName(); } JetObjectDeclarationName nameAsDeclaration = getNameAsDeclaration(); return nameAsDeclaration == null ? null : nameAsDeclaration.getName(); } @Override public boolean isTopLevel() { PsiJetObjectStub stub = getStub(); if (stub != null) { return stub.isTopLevel(); } return getParent() instanceof JetFile; } @Override public PsiElement getNameIdentifier() { JetObjectDeclarationName nameAsDeclaration = getNameAsDeclaration(); return nameAsDeclaration == null ? null : nameAsDeclaration.getNameIdentifier(); } @Override public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException { JetObjectDeclarationName nameAsDeclaration = getNameAsDeclaration(); return nameAsDeclaration == null ? null : nameAsDeclaration.setName(name); } @Override @Nullable public JetObjectDeclarationName getNameAsDeclaration() { return (JetObjectDeclarationName) findChildByType(JetNodeTypes.OBJECT_DECLARATION_NAME); } @Override @Nullable public JetModifierList getModifierList() { if (isClassObject()) { PsiElement parent = getParentByStub(); assert parent instanceof JetDeclaration; return ((JetDeclaration)parent).getModifierList(); } return super.getModifierList(); } public boolean isClassObject() { PsiJetObjectStub stub = getStub(); if (stub != null) { return stub.isClassObject(); } PsiElement parent = getParent(); return parent != null && parent.getNode().getElementType().equals(JetNodeTypes.CLASS_OBJECT); } @Nullable public JetClassObject getClassObjectElement() { if (!isClassObject()) { return null; } return (JetClassObject) getParentByStub(); } @Override public boolean hasModifier(JetModifierKeywordToken modifier) { JetModifierList modifierList = getModifierList(); return modifierList != null && modifierList.hasModifier(modifier); } @Override @Nullable public JetDelegationSpecifierList getDelegationSpecifierList() { return getStubOrPsiChild(JetStubElementTypes.DELEGATION_SPECIFIER_LIST); } @Override @NotNull public List<JetDelegationSpecifier> getDelegationSpecifiers() { JetDelegationSpecifierList list = getDelegationSpecifierList(); return list != null ? list.getDelegationSpecifiers() : Collections.<JetDelegationSpecifier>emptyList(); } @Override @NotNull public List<JetClassInitializer> getAnonymousInitializers() { JetClassBody body = getBody(); if (body == null) return Collections.emptyList(); return body.getAnonymousInitializers(); } @Override public boolean hasPrimaryConstructor() { return true; } @Override public JetClassBody getBody() { return getStubOrPsiChild(JetStubElementTypes.CLASS_BODY); } @Override public boolean isLocal() { PsiJetObjectStub stub = getStub(); if (stub != null) { return stub.isLocal(); } return JetPsiUtil.isLocal(this); } @Override @NotNull public List<JetDeclaration> getDeclarations() { JetClassBody body = getBody(); if (body == null) return Collections.emptyList(); return body.getDeclarations(); } @Override public <R, D> R accept(@NotNull JetVisitor<R, D> visitor, D data) { return visitor.visitObjectDeclaration(this, data); } public boolean isObjectLiteral() { PsiJetObjectStub stub = getStub(); if (stub != null) { return stub.isObjectLiteral(); } return getParent() instanceof JetObjectLiteralExpression; } @NotNull public PsiElement getObjectKeyword() { return findChildByType(JetTokens.OBJECT_KEYWORD); } @Override public void delete() throws IncorrectOperationException { JetPsiUtil.deleteClass(this); } @Override public ItemPresentation getPresentation() { return ItemPresentationProviders.getItemPresentation(this); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
efb4e41e8349d90bc0b0c3ce8faec20af7720eb2
376641f400747cc5019a6c529519d5c85cdd9eca
/src/lec13/oop/polymorphism/overriding/UserTest.java
e50f2e4b1dbfddb5bffa48cf1a886e062b7b2405
[]
no_license
kchhipa4u/JavaInitialConcepts
ed18c82d638537f2600d963ba7b5f457ebe2a3e8
244cc1749a184ac6e38917b62d78f161cce7db3f
refs/heads/master
2021-01-21T16:45:42.509964
2017-12-28T02:04:55
2017-12-28T02:04:55
91,905,397
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
package lec13.oop.polymorphism.overriding; public class UserTest { public static void main(String[] args) { User u = new Staff(); // User u -> printUserType(), saveWebLink() //new Staff() -> Can not call approveReview() of Staff // -> printUserType(), saveWebLink() of Staff class wud get called u.printUserType(); // Explicit Type Casting ((Staff) u).approveReview(); } }
[ "kchhipa4u@gmail.com" ]
kchhipa4u@gmail.com
6bf6878d692bf9a35419c920ab00805e5d812dfc
cec0c2fa585c3f788fc8becf24365e56bce94368
/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java
3a1742511146675463aec0ef4ad1f065ed635a7d
[]
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,142
java
/* */ package net.minecraft.server.packs.resources; /* */ /* */ import java.util.concurrent.CompletableFuture; /* */ import java.util.concurrent.Executor; /* */ import net.minecraft.util.Unit; /* */ import net.minecraft.util.profiling.ProfilerFiller; /* */ /* */ public interface ResourceManagerReloadListener /* */ extends PreparableReloadListener /* */ { /* */ default CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier debug1, ResourceManager debug2, ProfilerFiller debug3, ProfilerFiller debug4, Executor debug5, Executor debug6) { /* 12 */ return debug1.<Unit>wait(Unit.INSTANCE).thenRunAsync(() -> { debug1.startTick(); debug1.push("listener"); onResourceManagerReload(debug2); debug1.pop(); debug1.endTick(); }debug6); /* */ } /* */ /* */ void onResourceManagerReload(ResourceManager paramResourceManager); /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\deobfuscated.jar!\net\minecraft\server\packs\resources\ResourceManagerReloadListener.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
99a5e108b3759e0d91f108fcf4a2c184ffbf832a
70f7a06017ece67137586e1567726579206d71c7
/alimama/src/main/java/com/alipay/sdk/widget/p.java
792c47f857664b6ee909ba7ec2e21ccafbed79b5
[]
no_license
liepeiming/xposed_chatbot
5a3842bd07250bafaffa9f468562021cfc38ca25
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
refs/heads/master
2022-12-20T16:48:21.747036
2020-10-14T02:37:49
2020-10-14T02:37:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
428
java
package com.alipay.sdk.widget; import android.content.DialogInterface; import com.alipay.sdk.app.j; class p implements DialogInterface.OnClickListener { final /* synthetic */ n a; p(n nVar) { this.a = nVar; } public void onClick(DialogInterface dialogInterface, int i) { this.a.a.cancel(); boolean unused = this.a.b.w = false; j.a(j.c()); this.a.b.a.finish(); } }
[ "zhangquan@snqu.com" ]
zhangquan@snqu.com
fdb36bc18d18b708ff445bcc4097ab5a6aeafc4d
fa27b191daac56942eda0d950c6ae542fe2d8f33
/app/src/main/java/pub/object/system/ThemeSystem/widgets/TintCheckBox.java
8b7641b00507236e1763ebb1696a957a70702056
[ "Apache-2.0" ]
permissive
LinXueyuanStdio/Object
e92776b8e947370671b40b1bdce4c64095b4e0a7
4ebc9ce6ead29cf9fc7a82890cbe66055570a179
refs/heads/master
2023-01-01T21:28:17.443048
2017-10-22T14:02:20
2017-10-22T14:02:20
107,870,359
0
0
null
null
null
null
UTF-8
Java
false
false
6,832
java
/* * Copyright (C) 2016 Bilibili * * 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 pub.object.system.ThemeSystem.widgets; import android.annotation.TargetApi; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.graphics.drawable.AnimatedStateListDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation.ColorRes; import android.support.annotation.DrawableRes; import android.support.annotation.Nullable; import android.support.v4.widget.CompoundButtonCompat; import android.util.AttributeSet; import android.widget.CheckBox; import pub.object.system.ThemeSystem.utils.ThemeUtils; import pub.object.system.ThemeSystem.utils.TintManager; /** * @author xyczero617@gmail.com * @time 16/1/27 */ public class TintCheckBox extends CheckBox implements Tintable, AppCompatBackgroundHelper.BackgroundExtensible, AppCompatCompoundButtonHelper.CompoundButtonExtensible, AppCompatTextHelper.TextExtensible { private AppCompatBackgroundHelper mBackgroundHelper; private AppCompatCompoundButtonHelper mCompoundButtonHelper; private AppCompatTextHelper mTextHelper; public TintCheckBox(Context context) { this(context, null); } public TintCheckBox(Context context, AttributeSet attrs) { this(context, attrs, android.R.attr.checkboxStyle); } public TintCheckBox(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); if (isInEditMode()) { return; } TintManager tintManager = TintManager.get(getContext()); mBackgroundHelper = new AppCompatBackgroundHelper(this, tintManager); mBackgroundHelper.loadFromAttribute(attrs, defStyleAttr); mCompoundButtonHelper = new AppCompatCompoundButtonHelper(this, tintManager); mCompoundButtonHelper.loadFromAttribute(attrs, defStyleAttr); mTextHelper = new AppCompatTextHelper(this, tintManager); mTextHelper.loadFromAttribute(attrs, defStyleAttr); } @Override protected void drawableStateChanged() { super.drawableStateChanged(); if (ThemeUtils.isSkipAnimatedSelector()) { Drawable drawable = CompoundButtonCompat.getButtonDrawable(this); try { if (ThemeUtils.getWrapperDrawable(drawable) instanceof AnimatedStateListDrawable) { drawable.jumpToCurrentState(); } } catch (NoClassDefFoundError error) { error.printStackTrace(); } } } @Override public void setTextColor(int color) { super.setTextColor(color); if (mTextHelper != null) { mTextHelper.setTextColor(); } } @Override public void setTextColor(ColorStateList colors) { super.setTextColor(colors); if (mTextHelper != null) { mTextHelper.setTextColor(); } } @TargetApi(Build.VERSION_CODES.M) @Override public void setTextAppearance(int resId) { super.setTextAppearance(resId); if (mTextHelper != null) { mTextHelper.setTextAppearanceForTextColor(resId); } } @Override public void setTextAppearance(Context context, int resId) { super.setTextAppearance(context, resId); if (mTextHelper != null) { mTextHelper.setTextAppearanceForTextColor(resId); } } @Override public void setBackgroundDrawable(Drawable background) { super.setBackgroundDrawable(background); if (mBackgroundHelper != null) { mBackgroundHelper.setBackgroundDrawableExternal(background); } } @Override public void setBackgroundResource(int resId) { if (mBackgroundHelper != null) { mBackgroundHelper.setBackgroundResId(resId); } else { super.setBackgroundResource(resId); } } @Override public void setBackgroundColor(int color) { super.setBackgroundColor(color); if (mBackgroundHelper != null) { mBackgroundHelper.setBackgroundColor(color); } } @Nullable @Override public void setButtonDrawable(Drawable drawable) { super.setButtonDrawable(drawable); if (mCompoundButtonHelper != null) { mCompoundButtonHelper.setButtonDrawable(); } } @Override public void setButtonDrawable(@DrawableRes int resId) { if (mCompoundButtonHelper != null) { mCompoundButtonHelper.setButtonDrawable(resId); } else { super.setButtonDrawable(resId); } } @Override public int getCompoundPaddingLeft() { final int value = super.getCompoundPaddingLeft(); return mCompoundButtonHelper != null ? mCompoundButtonHelper.getCompoundPaddingLeft(value) : value; } @Override public void setBackgroundTintList(int resId) { if (mBackgroundHelper != null) { mBackgroundHelper.setBackgroundTintList(resId, null); } } @Override public void setBackgroundTintList(int resId, PorterDuff.Mode mode) { if (mBackgroundHelper != null) { mBackgroundHelper.setBackgroundTintList(resId, mode); } } @Override public void setCompoundButtonTintList(int resId) { if (mCompoundButtonHelper != null) { mCompoundButtonHelper.setButtonDrawableTintList(resId, null); } } @Override public void setCompoundButtonTintList(int resId, PorterDuff.Mode mode) { if (mCompoundButtonHelper != null) { mCompoundButtonHelper.setButtonDrawableTintList(resId, mode); } } @Override public void setTextColorById(@ColorRes int colorId) { if (mTextHelper != null) { mTextHelper.setTextColorById(colorId); } } @Override public void tint() { if (mTextHelper != null) { mTextHelper.tint(); } if (mCompoundButtonHelper != null) { mCompoundButtonHelper.tint(); } if (mBackgroundHelper != null) { mBackgroundHelper.tint(); } } }
[ "761516186@qq.com" ]
761516186@qq.com
e5b109521da49a929c58bb2f34e8ca7d8a7957a2
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/com/google/android/gms/internal/zzflh.java
8ba9451c04d6d9c1accbf2614151f74dfebaf4b3
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
252
java
package com.google.android.gms.internal; import java.io.IOException; enum zzflh extends zzfle { zzflh(String str, int i) { super(str, 2); } final Object zza(zzfhb zzfhb) throws IOException { return zzfhb.zzcyf(); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
9c1ce0b801c7b8a379d3f92f48c76a063c5692d9
5da5f8bba90a33f2e74e89f031e3092a4a27e976
/anchorcms-web/src/main/java/com/anchorcms/icloud/model/cloudcenter/SIcloudQuoteManage.java
4dbbd24d2cf3b8abe64eed38fdbf060986bc6bd7
[]
no_license
hanshuxia/nmggyy
3700210e6f1421d67e7bbf2c004a479ea2faef00
75665cac07c74e972753874a9f28077a7b649fee
refs/heads/master
2020-03-27T02:32:23.219385
2018-08-24T02:37:17
2018-08-24T02:37:17
145,797,102
0
0
null
null
null
null
UTF-8
Java
false
false
5,444
java
package com.anchorcms.icloud.model.cloudcenter; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import java.io.Serializable; import java.sql.Date; /** * Created by ly on 2017/1/10. */ @Entity @Table(name = "s_icloud_quote_manage") @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE ) public class SIcloudQuoteManage implements Serializable{ private static final long serialVersionUID = -8936880094996967213L; private Integer quoteId; private String createrId; private String offerId; private Date createDt; private Date updateDt; private Date releaseDt; private Date deadlineDt; private String status; private String demandState; //需求方状态位 private String quoteState;//报价方状态位 @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "QUOTE_ID") public Integer getQuoteId() { return quoteId; } public void setQuoteId(int quoteId) { this.quoteId = quoteId; } @Basic @Column(name = "CREATER_ID") public String getCreaterId() { return createrId; } public void setCreaterId(String createrId) { this.createrId = createrId; } @Basic @Column(name = "OFFER_ID") public String getOfferId() { return offerId; } public void setOfferId(String offerId) { this.offerId = offerId; } @Basic @Column(name = "CREATE_DT") public Date getCreateDt() { return createDt; } public void setCreateDt(Date createDt) { this.createDt = createDt; } @Basic @Column(name = "UPDATE_DT") public Date getUpdateDt() { return updateDt; } public void setUpdateDt(Date updateDt) { this.updateDt = updateDt; } @Basic @Column(name = "RELEASE_DT") public Date getReleaseDt() { return releaseDt; } public void setReleaseDt(Date releaseDt) { this.releaseDt = releaseDt; } @Basic @Column(name = "DEADLINE_DT") public Date getDeadlineDt() { return deadlineDt; } public void setDeadlineDt(Date deadlineDt) { this.deadlineDt = deadlineDt; } @Basic @Column(name = "STATUS") public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Basic @Column(name = "DEMAND_STATE") public String getDemandState() { return demandState; } public void setDemandState(String demandState) { this.demandState = demandState; } @Basic @Column(name = "QUOTE_STATE") public String getQuoteState() { return quoteState; } public void setQuoteState(String quoteState) { this.quoteState = quoteState; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SIcloudQuoteManage that = (SIcloudQuoteManage) o; if (quoteId != that.quoteId) return false; if (createrId != null ? !createrId.equals(that.createrId) : that.createrId != null) return false; if (offerId != null ? !offerId.equals(that.offerId) : that.offerId != null) return false; if (createDt != null ? !createDt.equals(that.createDt) : that.createDt != null) return false; if (updateDt != null ? !updateDt.equals(that.updateDt) : that.updateDt != null) return false; if (releaseDt != null ? !releaseDt.equals(that.releaseDt) : that.releaseDt != null) return false; if (deadlineDt != null ? !deadlineDt.equals(that.deadlineDt) : that.deadlineDt != null) return false; if (status != null ? !status.equals(that.status) : that.status != null) return false; if (demandState != null ? !demandState.equals(that.demandState) : that.demandState != null) return false; if (quoteState != null ? !quoteState.equals(that.quoteState) : that.quoteState != null) return false; return true; } @Override public int hashCode() { int result = quoteId; result = 31 * result + (createrId != null ? createrId.hashCode() : 0); result = 31 * result + (offerId != null ? offerId.hashCode() : 0); result = 31 * result + (createDt != null ? createDt.hashCode() : 0); result = 31 * result + (updateDt != null ? updateDt.hashCode() : 0); result = 31 * result + (releaseDt != null ? releaseDt.hashCode() : 0); result = 31 * result + (deadlineDt != null ? deadlineDt.hashCode() : 0); result = 31 * result + (status != null ? status.hashCode() : 0); result = 31 * result + (demandState != null ? demandState.hashCode() : 0); result = 31 * result + (quoteState != null ? quoteState.hashCode() : 0); return result; } private SIcloudDemand demand; @OneToOne(fetch = FetchType.EAGER) @JoinColumn(name = "DEMAND_ID") public SIcloudDemand getDemand() { return demand; } public void setDemand(SIcloudDemand demand) { this.demand = demand; } private SIcloudDemandQuote quote; @OneToOne(fetch = FetchType.EAGER) @JoinColumn(name = "DEMAND_OBJ_ID") public SIcloudDemandQuote getQuote() { return quote; } public void setQuote(SIcloudDemandQuote quote) { this.quote = quote; } }
[ "605128459@qq.com" ]
605128459@qq.com
38cd57b4ea661ce1092b002cc769e9031be7ef7e
b90d96961cd11d4061036a542fcc255320ea9c69
/beitonelibrary/src/main/java/cn/betatown/mobile/beitonelibrary/viewcontroller/VaryViewHelper.java
64ee590e4371c72879783697472227011b992786
[]
no_license
wpf-191514617/SignUpProject
1608477fd238900e18d4ef5cf0ad24e365aec6a5
6179e5186209e1ad5a1e898f678376c6489c925a
refs/heads/master
2022-11-27T07:15:16.196793
2020-08-11T02:07:42
2020-08-11T02:07:42
272,388,503
0
0
null
null
null
null
UTF-8
Java
false
false
2,366
java
/* * Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com] * * Licensed under the Apache License, Version 2.0 (the "License”); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package cn.betatown.mobile.beitonelibrary.viewcontroller; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class VaryViewHelper implements IVaryViewHelper { private View view; private ViewGroup parentView; private int viewIndex; private ViewGroup.LayoutParams params; private View currentView; public VaryViewHelper(View view) { super(); this.view = view; } private void init() { params = view.getLayoutParams(); if (view.getParent() != null) { parentView = (ViewGroup) view.getParent(); } else { parentView = (ViewGroup) view.getRootView().findViewById(android.R.id.content); } int count = parentView.getChildCount(); for (int index = 0; index < count; index++) { if (view == parentView.getChildAt(index)) { viewIndex = index; break; } } currentView = view; } @Override public View getCurrentLayout() { return currentView; } @Override public void restoreView() { showLayout(view); } @Override public void showLayout(View view) { if (parentView == null) { init(); } this.currentView = view; // 如果已经是那个view,那就不需要再进行替换操作了 if (parentView.getChildAt(viewIndex) != view) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) { parent.removeView(view); } parentView.removeViewAt(viewIndex); parentView.addView(view, viewIndex, params); } } @Override public View inflate(int layoutId) { return LayoutInflater.from(view.getContext()).inflate(layoutId, null); } @Override public Context getContext() { return view.getContext(); } @Override public View getView() { return view; } }
[ "15291967179@163.com" ]
15291967179@163.com
d9f2bae8508bd55940694306b5a0bed3bab6e644
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/wallet_core/ui/WalletOrderInfoOldUI$2.java
abd8fb5049fd6936696a9223e63c14562adf503a
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package com.tencent.mm.plugin.wallet_core.ui; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; class WalletOrderInfoOldUI$2 implements OnClickListener { final /* synthetic */ WalletOrderInfoOldUI pwD; WalletOrderInfoOldUI$2(WalletOrderInfoOldUI walletOrderInfoOldUI) { this.pwD = walletOrderInfoOldUI; } public final void onClick(DialogInterface dialogInterface, int i) { } }
[ "707194831@qq.com" ]
707194831@qq.com
bed9619490af02e3c7bb4d283eadaf37e3830954
447520f40e82a060368a0802a391697bc00be96f
/apks/comparison_qark/com_db_pwcc_dbmobile/classes_dex2jar/com/db/pwcc/dbmobile/model/securities/CurrencyValues.java
68253701167014957ed0e9927d554ee953f62fed
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
5,375
java
package com.db.pwcc.dbmobile.model.securities; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import uuuuuu.popopp; public class CurrencyValues implements popopp, Parcelable { public static final Parcelable.Creator<CurrencyValues> CREATOR; public static int b0061a00610061aaaa = 1; public static int ba006100610061aaaa = 2; public static int baa00610061aaaa = 61; public static int baaaa0061aaa; private MarketValue marketValue; private Rate securityRate; private UnrealizedProfitAndLoss unrealizedProfitAndLoss; static { CurrencyValues.1 local1 = new CurrencyValues.1(); int i = baa00610061aaaa; switch (i * (i + b0061a00610061aaaa) % ba006100610061aaaa) { default: baa00610061aaaa = b0061006100610061aaaa(); b0061a00610061aaaa = b0061006100610061aaaa(); if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = 2; baaaa0061aaa = 20; } break; } CREATOR = local1; } public CurrencyValues() {} protected CurrencyValues(Parcel paramParcel) { this.marketValue = ((MarketValue)paramParcel.readValue(MarketValue.class.getClassLoader())); this.unrealizedProfitAndLoss = ((UnrealizedProfitAndLoss)paramParcel.readValue(UnrealizedProfitAndLoss.class.getClassLoader())); this.securityRate = ((Rate)paramParcel.readValue(Rate.class.getClassLoader())); } public static int b0061006100610061aaaa() { return 4; } public static int b0061aaa0061aaa() { return 2; } public static int ba0061aa0061aaa() { return 1; } public int describeContents() { if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % b0061aaa0061aaa() != baaaa0061aaa) { if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = b0061006100610061aaaa(); baaaa0061aaa = b0061006100610061aaaa(); } baa00610061aaaa = b0061006100610061aaaa(); baaaa0061aaa = 68; } return 0; } public MarketValue getMarketValue() { MarketValue localMarketValue = this.marketValue; if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = 12; baaaa0061aaa = b0061006100610061aaaa(); if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % b0061aaa0061aaa() != baaaa0061aaa) { baa00610061aaaa = 13; baaaa0061aaa = b0061006100610061aaaa(); } } return localMarketValue; } public Rate getSecurityRate() { if ((baa00610061aaaa + ba0061aa0061aaa()) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa) { int i = b0061006100610061aaaa(); switch (i * (i + b0061a00610061aaaa) % ba006100610061aaaa) { default: baa00610061aaaa = b0061006100610061aaaa(); baaaa0061aaa = 97; } baa00610061aaaa = 53; baaaa0061aaa = 76; } return this.securityRate; } public UnrealizedProfitAndLoss getUnrealizedProfitAndLoss() { UnrealizedProfitAndLoss localUnrealizedProfitAndLoss = this.unrealizedProfitAndLoss; int i = baa00610061aaaa; switch (i * (i + b0061a00610061aaaa) % b0061aaa0061aaa()) { default: baa00610061aaaa = 12; baaaa0061aaa = b0061006100610061aaaa(); int j = baa00610061aaaa; switch (j * (j + b0061a00610061aaaa) % ba006100610061aaaa) { default: baa00610061aaaa = 65; baaaa0061aaa = b0061006100610061aaaa(); } break; } return localUnrealizedProfitAndLoss; } public void setMarketValue(MarketValue paramMarketValue) { int i = b0061006100610061aaaa(); switch (i * (i + b0061a00610061aaaa) % ba006100610061aaaa) { default: baa00610061aaaa = 91; baaaa0061aaa = 52; } if ((b0061006100610061aaaa() + b0061a00610061aaaa) * b0061006100610061aaaa() % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = 9; baaaa0061aaa = b0061006100610061aaaa(); } this.marketValue = paramMarketValue; } public void setUnrealizedProfitAndLoss(UnrealizedProfitAndLoss paramUnrealizedProfitAndLoss) { if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = 86; baaaa0061aaa = 64; if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = 34; baaaa0061aaa = 52; } } this.unrealizedProfitAndLoss = paramUnrealizedProfitAndLoss; } public void writeToParcel(Parcel paramParcel, int paramInt) { paramParcel.writeValue(this.marketValue); paramParcel.writeValue(this.unrealizedProfitAndLoss); if ((b0061006100610061aaaa() + b0061a00610061aaaa) * b0061006100610061aaaa() % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = 76; baaaa0061aaa = b0061006100610061aaaa(); if ((baa00610061aaaa + b0061a00610061aaaa) * baa00610061aaaa % ba006100610061aaaa != baaaa0061aaa) { baa00610061aaaa = b0061006100610061aaaa(); baaaa0061aaa = 81; } } paramParcel.writeValue(this.securityRate); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
4b4235a9db97b63396af5df4f81f5e76a1bce83d
900fe63ee7c6c0ba3af6cf054631046dfc222b64
/src/main/java/com/github/terefang/jldap/ldap/LDAPSearchResultReference.java
f9e61258315a6346f4ee99c1c1f35af994c2c6af
[ "OLDAP-2.8", "OLDAP-2.0.1" ]
permissive
terefang/jldap
f29b78cbeabff3d3c975392d7cf884debd9cfc1d
c2c75a872a8ea89d25bf42a538a94c0c0d843d0b
refs/heads/master
2022-12-07T07:17:57.260242
2020-09-01T10:11:57
2020-09-01T10:11:57
291,960,764
0
0
null
null
null
null
UTF-8
Java
false
false
4,040
java
/* ************************************************************************** * $OpenLDAP$ * * Copyright (C) 1999, 2000, 2001 Novell, Inc. All Rights Reserved. * * THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND * TREATIES. USE, MODIFICATION, AND REDISTRIBUTION OF THIS WORK IS SUBJECT * TO VERSION 2.0.1 OF THE OPENLDAP PUBLIC LICENSE, A COPY OF WHICH IS * AVAILABLE AT HTTP://WWW.OPENLDAP.ORG/LICENSE.HTML OR IN THE FILE "LICENSE" * IN THE TOP-LEVEL DIRECTORY OF THE DISTRIBUTION. ANY USE OR EXPLOITATION * OF THIS WORK OTHER THAN AS AUTHORIZED IN VERSION 2.0.1 OF THE OPENLDAP * PUBLIC LICENSE, OR OTHER PRIOR WRITTEN CONSENT FROM NOVELL, COULD SUBJECT * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. ******************************************************************************/ package com.github.terefang.jldap.ldap; import java.io.IOException; import java.net.MalformedURLException; import com.github.terefang.jldap.ldap.asn1.ASN1Object; import com.github.terefang.jldap.ldap.asn1.ASN1OctetString; import com.github.terefang.jldap.ldap.client.Debug; import com.github.terefang.jldap.ldap.rfc2251.RfcControls; import com.github.terefang.jldap.ldap.rfc2251.RfcLDAPMessage; import com.github.terefang.jldap.ldap.rfc2251.RfcSearchResultReference; /** * * Encapsulates a continuation reference from an asynchronous search operation. * */ public class LDAPSearchResultReference extends LDAPMessage { private String[] srefs; private static Object nameLock = new Object(); // protect agentNum private static int refNum = 0; // Debug, LDAPConnection number private String name; // String name for debug /** * This constructor was added to support default Serialization * */ public LDAPSearchResultReference() { super(); } /** * Constructs an LDAPSearchResultReference object. * * @param message The LDAPMessage with a search reference. */ /*package*/ LDAPSearchResultReference(RfcLDAPMessage message) { super(message); if( Debug.LDAP_DEBUG) { synchronized(nameLock) { name = "SearchResultReference(" + ++refNum + "): "; } Debug.trace( Debug.referrals, name + "Created"); } return; } /** Constructs the Object from an array of referals, passed as string. * @param referals array of search referals. * @throws MalformedURLException When any referals url is not well-formed. */ public LDAPSearchResultReference(String referals[]) throws MalformedURLException { super(new RfcLDAPMessage(new RfcSearchResultReference(referals))); } /** * Returns any URLs in the object. * * @return The URLs. */ public String[] getReferrals() { if( Debug.LDAP_DEBUG ) { Debug.trace( Debug.messages, name + "Enter getReferrals"); } ASN1Object[] references = ((RfcSearchResultReference)message.getResponse()).toArray(); srefs = new String[references.length]; for( int i=0; i<references.length; i++) { srefs[i] = ((ASN1OctetString)(references[i])).stringValue(); if( Debug.LDAP_DEBUG ) { Debug.trace( Debug.referrals, name + "\t" + srefs[i] ); } } return( srefs ); } protected void setDeserializedValues(LDAPMessage readObject, RfcControls asn1Ctrls) throws IOException, ClassNotFoundException { // Check if it is the correct message type if(!(readObject instanceof LDAPSearchResultReference)) throw new ClassNotFoundException("Error occured while deserializing " + "LDAPSearchResultReference object"); LDAPSearchResultReference tmp = (LDAPSearchResultReference)readObject; String[] referals = tmp.getReferrals(); tmp = null; //remove reference after getting properties message = new RfcLDAPMessage(new RfcSearchResultReference(referals)); // Garbage collect the readObject from readDSML().. readObject = null; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
5fba3684f6cf9f3d75567be596a82d700453311f
8810c0d78569d7483764fad167a823096e82a366
/src/test/java/com/junit/example/JunitAnnotations.java
482fefef93c11f7de304123291c3f6066136e49f
[]
no_license
meetmmpatel/UnitTest_Log_Common
354837a2ed66cecc2b18a2eed05949cf0de00a79
c80827bc7268a43ef6a8d8aa7aa30599310049f1
refs/heads/master
2022-10-12T17:07:11.876816
2019-06-06T21:34:01
2019-06-06T21:34:01
190,455,335
0
1
null
2022-10-05T19:27:27
2019-06-05T19:23:15
Java
UTF-8
Java
false
false
968
java
package com.junit.example; import org.junit.Test; import org.junit.jupiter.api.*; import org.junit.platform.runner.JUnitPlatform; import org.junit.runner.RunWith; public class JunitAnnotations { @BeforeAll public static void initAll(){ System.out.println("This is Before all ..."); } @BeforeEach public void init(){ System.out.println("This is Before Each method"); } @Test @DisplayName("First Test") @RepeatedTest(5) public void testMethodOne(){ System.out.println("..Test method one"); } @Test @Disabled public void testMethodTwo(){ System.out.println("...Test method two"); } @Test @RepeatedTest(5) public void testMethodThree(){ System.out.println("...Test method three"); } @AfterEach public void closeSetup(){ System.out.println("running after every test"); } @AfterAll public static void closeSetupAll(){ System.out.println("Running After all test ran.."); } }
[ "meetmmpatel@gmail.com" ]
meetmmpatel@gmail.com
db473fa2c58b14c879a68bafce662cf846593f60
ac3fe7e4a0592bcc50e7f8eed695d07654a4b180
/eps-base/src/main/java/com/adyen/checkout/eps/EPSConfiguration.java
0f7d5a5fe9f68ef609045c0225a7913ca5f8f9fe
[ "MIT" ]
permissive
bhagirath/adyen-android
3e4883bfe464bc58d02dada297d33f45c06d4f82
b0cb30c237c469c442b8b5f348fb6ded2df5105c
refs/heads/master
2021-01-02T20:41:07.856054
2020-01-20T12:37:28
2020-01-20T12:37:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,293
java
/* * Copyright (c) 2019 Adyen N.V. * * This file is open source and available under the MIT license. See the LICENSE file for more info. * * Created by arman on 12/6/2019. */ package com.adyen.checkout.eps; import android.content.Context; import android.os.Parcel; import android.os.Parcelable; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.DisplayMetrics; import com.adyen.checkout.core.api.Environment; import com.adyen.checkout.issuerlist.IssuerListConfiguration; import java.util.Locale; @SuppressWarnings("AbbreviationAsWordInName") public class EPSConfiguration extends IssuerListConfiguration { public static final Parcelable.Creator<EPSConfiguration> CREATOR = new Parcelable.Creator<EPSConfiguration>() { public EPSConfiguration createFromParcel(@NonNull Parcel in) { return new EPSConfiguration(in); } public EPSConfiguration[] newArray(int size) { return new EPSConfiguration[size]; } }; /** * @param shopperLocale The locale that should be used to display strings and layouts. Can differ from device default. * @param displayMetrics The current {@link DisplayMetrics} of the device to fetch images of matching size. * @param environment The environment to be used to make network calls. * @deprecated Constructor with all parameters. Use the Builder to initialize this object. */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated public EPSConfiguration( @NonNull Locale shopperLocale, @SuppressWarnings("PMD.UnusedFormalParameter") @Nullable DisplayMetrics displayMetrics, @NonNull Environment environment ) { super(shopperLocale, environment); } /** * @param shopperLocale The locale that should be used to display strings and layouts. Can differ from device default. * @param environment The environment to be used to make network calls. */ EPSConfiguration( @NonNull Locale shopperLocale, @NonNull Environment environment ) { super(shopperLocale, environment); } EPSConfiguration(@NonNull Parcel in) { super(in); } /** * Builder to create a {@link EPSConfiguration}. */ public static final class Builder extends IssuerListBuilder<EPSConfiguration> { public Builder(@NonNull Context context) { super(context); } /** * @deprecated No need to pass {@link DisplayMetrics} to builder. */ @SuppressWarnings("DeprecatedIsStillUsed") @Deprecated public Builder(@NonNull Locale shopperLocale, @SuppressWarnings("PMD.UnusedFormalParameter") @Nullable DisplayMetrics displayMetrics, @NonNull Environment environment) { super(shopperLocale, environment); } public Builder(@NonNull Locale shopperLocale, @NonNull Environment environment) { super(shopperLocale, environment); } @NonNull @Override public EPSConfiguration build() { return new EPSConfiguration(mBuilderShopperLocale, mBuilderEnvironment); } } }
[ "git-manager@adyen.com" ]
git-manager@adyen.com
1e7309dce360db9918595121ef29534690f84e01
4627d514d6664526f58fbe3cac830a54679749cd
/projects/math/src/mantissa/tests-src/org/spaceroots/mantissa/algebra/LaguerreTest.java
a7be6e58b9cddce9deb2f5fd4178715c0ded8fd1
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "Minpack" ]
permissive
STAMP-project/Cling-application
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
refs/heads/master
2022-07-27T09:30:16.423362
2022-07-19T12:01:46
2022-07-19T12:01:46
254,310,667
2
2
null
2021-07-12T12:29:50
2020-04-09T08:11:35
null
UTF-8
Java
false
false
2,789
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.spaceroots.mantissa.algebra; import junit.framework.*; public class LaguerreTest extends TestCase { public LaguerreTest(String name) { super(name); } public void testOne() { assertTrue(new Laguerre().isOne()); } public void testFirstPolynomials() { checkLaguerre(new Laguerre(3), 6l, "6 - 18 x + 9 x^2 - x^3"); checkLaguerre(new Laguerre(2), 2l, "2 - 4 x + x^2"); checkLaguerre(new Laguerre(1), 1l, "1 - x"); checkLaguerre(new Laguerre(0), 1l, "1"); checkLaguerre(new Laguerre(7), 5040l, "5040 - 35280 x + 52920 x^2 - 29400 x^3" + " + 7350 x^4 - 882 x^5 + 49 x^6 - x^7"); checkLaguerre(new Laguerre(6), 720l, "720 - 4320 x + 5400 x^2 - 2400 x^3 + 450 x^4" + " - 36 x^5 + x^6"); checkLaguerre(new Laguerre(5), 120l, "120 - 600 x + 600 x^2 - 200 x^3 + 25 x^4 - x^5"); checkLaguerre(new Laguerre(4), 24l, "24 - 96 x + 72 x^2 - 16 x^3 + x^4"); } public void testDifferentials() { for (int k = 0; k < 12; ++k) { Polynomial.Rational Lk0 = new Laguerre(k); Polynomial.Rational Lk1 = (Polynomial.Rational) Lk0.getDerivative(); Polynomial.Rational Lk2 = (Polynomial.Rational) Lk1.getDerivative(); Polynomial.Rational g0 = new Polynomial.Rational(k); Polynomial.Rational g1 = new Polynomial.Rational(-1l, 1l); Polynomial.Rational g2 = new Polynomial.Rational(1l, 0l); Polynomial.Rational Lk0g0 = Lk0.multiply(g0); Polynomial.Rational Lk1g1 = Lk1.multiply(g1); Polynomial.Rational Lk2g2 = Lk2.multiply(g2); Polynomial.Rational d = Lk0g0.add(Lk1g1.add(Lk2g2)); assertTrue(d.isZero()); } } public void checkLaguerre(Laguerre p, long denominator, String reference) { assertTrue(p.multiply(denominator).toString().equals(reference)); } public static Test suite() { return new TestSuite(LaguerreTest.class); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
dea44214ddae25e9f2afd8c29385b5256ffc05cd
6236164bd1998bc4a1d7014ba5f9f69525fcd69c
/center/src/main/Java/com/kld/gsm/center/dao/oss_sysmanage_timeSaleOutMapper.java
7010b0598beefa88fd1b3722f6d629e14ef9f0f8
[]
no_license
yyangssen/yanxwer
26d04b22c8464efc0280d344de4a3291bb7d6362
31b74a42c2eca1fbc99f2d429595b6ba2d6065e2
refs/heads/master
2021-01-02T08:15:19.034765
2016-08-16T07:31:25
2016-08-16T07:31:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
669
java
package com.kld.gsm.center.dao; import com.kld.gsm.center.common.MysqlRepository; import com.kld.gsm.center.domain.oss_sysmanage_timeSaleOut; import com.kld.gsm.center.domain.oss_sysmanage_timeSaleOutKey; @MysqlRepository public interface oss_sysmanage_timeSaleOutMapper { int deleteByPrimaryKey(oss_sysmanage_timeSaleOutKey key); int insert(oss_sysmanage_timeSaleOut record); int insertSelective(oss_sysmanage_timeSaleOut record); oss_sysmanage_timeSaleOut selectByPrimaryKey(oss_sysmanage_timeSaleOutKey key); int updateByPrimaryKeySelective(oss_sysmanage_timeSaleOut record); int updateByPrimaryKey(oss_sysmanage_timeSaleOut record); }
[ "934704255@qq.com" ]
934704255@qq.com
0c3ea7d16928c723bd670d1273c775f1cab82da4
757a5f88e04da1290438b45ea84058415d39d5bf
/src/cn/pauu/javase/enhence/ReflectTest3.java
6ec89e775c85630a25ff40c750ac604c2a2f6cc2
[]
no_license
southeastpx/javase
6382f9ea6552580f4986219980b24b19d6156723
c8b4a476d806887316ee7f6aa8d6ce0b5a8c00bc
refs/heads/master
2021-01-13T04:43:32.155246
2017-07-21T15:34:24
2017-07-21T15:34:24
79,209,012
1
0
null
null
null
null
UTF-8
Java
false
false
349
java
package cn.pauu.javase.enhence; import java.lang.reflect.Method; public class ReflectTest3 { public static void main(String[] args) throws Exception{ String className = args[0]; Method mainMethod = Class.forName(className).getMethod("main", String[].class); mainMethod.invoke(null, (Object)new String[]{"aaa","bbb","ccc"}); } }
[ "southeast_px@163.com" ]
southeast_px@163.com
e43b620b90ff669c4e0b60cd255ce81b45faaf7b
7a9746b5c57033dcbf8fbcaa305a483c8423b173
/src/main/java/imo/EndPaint.java
2d8a4a0ecdf7fe3eb4f1369485cc274935b59618
[]
no_license
piropiro/dragon2
6df21a01c65dfc91fddce303938fe19f3f0f165b
c89bd18b3c639de54894edc374974bc27f7305d3
refs/heads/master
2020-09-27T02:44:38.804859
2016-08-20T08:55:15
2016-08-20T08:55:15
66,137,895
0
0
null
null
null
null
UTF-8
Java
false
false
1,290
java
package imo; import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyEvent; import mine.Mine; // Referenced classes of package imo: // PaintListener, Images, MainWorks public class EndPaint implements PaintListener { EndPaint(MainWorks mainworks, int i) { mw = mainworks; type = i; trueFlag = i == 5; count = 0; } public void paint(Graphics g) { int i = Math.min(320, count * 6); if (trueFlag) g.drawImage(Images.endi, 0, 0, 300, i, 180, 0, 480, i, null); else g.drawImage(Images.endi, 0, 0, 300, i, 0, 0, 300, i, null); if ((count / 12) % 2 == 0) g.setColor(Color.black); else g.setColor(new Color(180, 240, 180)); Mine.setAntialias(g, true); g.setFont(Mine.getFont(14)); g.drawString("press C to close", 20, 290); } public void keyReleased(KeyEvent keyevent) { } public void keyPressed(KeyEvent keyevent) { switch (keyevent.getKeyCode()) { case 32: // ' ' case 67: // 'C' mw.gameExit(); break; case 27: // '\033' case 88: // 'X' mw.gameStart(); break; } } public void run() { mw.sleep(30L); mw.repaint(); count++; } MainWorks mw; private boolean trueFlag; private int count; private int type; }
[ "mela825@gmail.com" ]
mela825@gmail.com
b7d6214f16a9473302cb015f60f25875b6bb6f42
87873856a23cd5ebdcd227ef39386fb33f5d6b13
/java-best-of/src/main/java/io/jsd/training/designpattern/behavioural/command/party/pattern/MacroCommand.java
82201c9d00fd5d516b07e6e067badd90ba8d2325
[]
no_license
jsdumas/java-training
da204384223c3e7871ccbb8f4a73996ae55536f3
8df1da57ea7a5dd596fea9b70c6cd663534d9d18
refs/heads/master
2022-06-28T16:08:47.529631
2019-06-06T07:49:30
2019-06-06T07:49:30
113,677,424
0
0
null
2022-06-20T23:48:24
2017-12-09T14:55:56
Java
UTF-8
Java
false
false
539
java
package io.jsd.training.designpattern.behavioural.command.party.pattern; public class MacroCommand implements Command { Command[] commands; public MacroCommand(Command[] commands) { this.commands = commands; } public void execute() { for (int i = 0; i < commands.length; i++) { commands[i].execute(); } } /** * NOTE: these commands have to be done backwards to ensure proper undo functionality */ public void undo() { for (int i = commands.length -1; i >= 0; i--) { commands[i].undo(); } } }
[ "jsdumas@free.fr" ]
jsdumas@free.fr
9ab529e92808c995465281657cf9acdd1d9a6d0e
fc4150290b10e2e331b55e54e628798eabaa47ad
/HAL/src/jkt/hms/masters/business/base/BaseStoreCopyAddressList.java
ef5a369a9b8d58210c77d072db20c64e4796f626
[]
no_license
vadhwa11/newproject2
8e40bd4acfd4edc6b721eeca8636f8b7d589af2b
fc9bd770fdadf650f004323f85884dc143827f4d
refs/heads/master
2020-05-05T04:01:05.628775
2019-04-05T14:38:10
2019-04-05T14:38:10
179,694,408
0
0
null
null
null
null
UTF-8
Java
false
false
4,472
java
package jkt.hms.masters.business.base; import java.io.Serializable; /** * This is an object that contains data related to the store_copy_address_list * table. Do not modify this class because it will be overwritten if the * configuration file related to this class is modified. * * @hibernate.class table="store_copy_address_list" */ public abstract class BaseStoreCopyAddressList implements Serializable { public static String REF = "StoreCopyAddressList"; public static String PROP_ADDRESS4 = "Address4"; public static String PROP_DESCRIPTION = "Description"; public static String PROP_ADDRESS3 = "Address3"; public static String PROP_ADDRESS1 = "Address1"; public static String PROP_ID = "Id"; public static String PROP_ADDRESS2 = "Address2"; // constructors public BaseStoreCopyAddressList() { initialize(); } /** * Constructor for primary key */ public BaseStoreCopyAddressList(java.lang.Integer id) { this.setId(id); initialize(); } /** * Constructor for required fields */ public BaseStoreCopyAddressList(java.lang.Integer id, java.lang.String description, java.lang.String address1) { this.setId(id); this.setDescription(description); this.setAddress1(address1); initialize(); } protected void initialize() { } private int hashCode = Integer.MIN_VALUE; // primary key private java.lang.Integer id; // fields private java.lang.String description; private java.lang.String address1; private java.lang.String address2; private java.lang.String address3; private java.lang.String address4; /** * Return the unique identifier of this class * * @hibernate.id generator-class="native" column="id" */ public java.lang.Integer getId() { return id; } /** * Set the unique identifier of this class * * @param id * the new ID */ public void setId(java.lang.Integer id) { this.id = id; this.hashCode = Integer.MIN_VALUE; } /** * Return the value associated with the column: description */ public java.lang.String getDescription() { return description; } /** * Set the value related to the column: description * * @param description * the description value */ public void setDescription(java.lang.String description) { this.description = description; } /** * Return the value associated with the column: address1 */ public java.lang.String getAddress1() { return address1; } /** * Set the value related to the column: address1 * * @param address1 * the address1 value */ public void setAddress1(java.lang.String address1) { this.address1 = address1; } /** * Return the value associated with the column: address2 */ public java.lang.String getAddress2() { return address2; } /** * Set the value related to the column: address2 * * @param address2 * the address2 value */ public void setAddress2(java.lang.String address2) { this.address2 = address2; } /** * Return the value associated with the column: address3 */ public java.lang.String getAddress3() { return address3; } /** * Set the value related to the column: address3 * * @param address3 * the address3 value */ public void setAddress3(java.lang.String address3) { this.address3 = address3; } /** * Return the value associated with the column: address4 */ public java.lang.String getAddress4() { return address4; } /** * Set the value related to the column: address4 * * @param address4 * the address4 value */ public void setAddress4(java.lang.String address4) { this.address4 = address4; } public boolean equals(Object obj) { if (null == obj) return false; if (!(obj instanceof jkt.hms.masters.business.StoreCopyAddressList)) return false; else { jkt.hms.masters.business.StoreCopyAddressList storeCopyAddressList = (jkt.hms.masters.business.StoreCopyAddressList) obj; if (null == this.getId() || null == storeCopyAddressList.getId()) return false; else return (this.getId().equals(storeCopyAddressList.getId())); } } public int hashCode() { if (Integer.MIN_VALUE == this.hashCode) { if (null == this.getId()) return super.hashCode(); else { String hashStr = this.getClass().getName() + ":" + this.getId().hashCode(); this.hashCode = hashStr.hashCode(); } } return this.hashCode; } public String toString() { return super.toString(); } }
[ "vadhwa11@gmail.com" ]
vadhwa11@gmail.com
35d37a83889cf4ff16b6f7b6176860350ae5c478
cb322dee38f32caf8ee5d2e7f68f6281c5b0352c
/Tests/org.emftext.language.java.test/src-input/resolving_new/typeparametersC_0/CollectionsSource.java
6400859a3ad99918e9be75c19c7cc63f5d767cd9
[]
no_license
DevBoost/JaMoPP
b83458ea74d0ead50f8879d8d9fdcae914686b13
8bc07e8407993e463323a5e0325540bed839502a
refs/heads/master
2022-09-23T19:12:43.803464
2019-06-09T20:54:34
2019-06-09T20:54:34
5,324,796
13
13
null
2022-09-05T10:47:42
2012-08-07T07:25:32
Java
UTF-8
Java
false
false
925
java
/******************************************************************************* * Copyright (c) 2006-2012 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 * * 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 - Berlin, Germany * - initial API and implementation ******************************************************************************/ package resolving_new.typeparametersC_0; import java.util.Map; public class CollectionsSource { public static <K,V> Map<K,V> singletonMap(K key, V value) { return null; } }
[ "jendrik.johannes@devboost.de" ]
jendrik.johannes@devboost.de
794b6c6ac0772796e94aeae9d05cf5c2fb2482d2
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/95362737dcd262ddd67b0fe1381c25f1e6b885860b4e51efb6f57223dceb77b4c6c7d855e3fe891c10cd51b48c9b052cf2c74f181a28d3020d77a4a2d6e4db18/010/mutations/188/grade_95362737_010.java
f03bdf1d2a39e000ed1692ebe951d622eeae261f
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,511
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_95362737_010 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_95362737_010 mainClass = new grade_95362737_010 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj a = new FloatObj (), b = new FloatObj (), c = new FloatObj (), d = new FloatObj (), score = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ")); a.value = scanner.nextFloat (); b.value = scanner.nextFloat (); c.value = scanner.nextFloat (); d.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); score.value = scanner.nextFloat (); if (score.value >= a.value) { output += (String.format ("Student has a A grade\n")); } else if (score.value >= b.value && score.value < a.value) { output += (String.format ("Student has a B grade\n")); } else if (true) return ; if (score.value >= c.value && score.value < b.value) { output += (String.format ("Student has a C grade\n")); } else if (score.value >= d.value && score.value < c.value) { output += (String.format ("Student has a D grade\n")); } else if (score.value < d.value) { output += (String.format ("Student has failed the course\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
20faa2288a375de7b76229285c492b1d768bad9e
ba005c6729aed08554c70f284599360a5b3f1174
/lib/selenium-server-standalone-3.4.0/org/apache/http/impl/client/DefaultServiceUnavailableRetryStrategy.java
2ec84c4f35c73475bea5ededa64beb54c0a2ce45
[]
no_license
Viral-patel703/Testyourbond-aut0
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
784ab7a3df33d0efbd41f3adadeda22844965a56
refs/heads/master
2020-08-09T00:27:26.261661
2017-11-07T10:12:05
2017-11-07T10:12:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
package org.apache.http.impl.client; import org.apache.http.HttpResponse; import org.apache.http.StatusLine; import org.apache.http.annotation.Contract; import org.apache.http.annotation.ThreadingBehavior; import org.apache.http.client.ServiceUnavailableRetryStrategy; import org.apache.http.protocol.HttpContext; import org.apache.http.util.Args; @Contract(threading=ThreadingBehavior.IMMUTABLE) public class DefaultServiceUnavailableRetryStrategy implements ServiceUnavailableRetryStrategy { private final int maxRetries; private final long retryInterval; public DefaultServiceUnavailableRetryStrategy(int maxRetries, int retryInterval) { Args.positive(maxRetries, "Max retries"); Args.positive(retryInterval, "Retry interval"); this.maxRetries = maxRetries; this.retryInterval = retryInterval; } public DefaultServiceUnavailableRetryStrategy() { this(1, 1000); } public boolean retryRequest(HttpResponse response, int executionCount, HttpContext context) { return (executionCount <= maxRetries) && (response.getStatusLine().getStatusCode() == 503); } public long getRetryInterval() { return retryInterval; } }
[ "VIRUS-inside@users.noreply.github.com" ]
VIRUS-inside@users.noreply.github.com
b09630fd63d7f27a89692ee198c11078f0b5f219
c742cc5d181dd6105a26d586f513177a18e28250
/src/revision/Hashing_lc_hands_of_straight.java
371ede7ef58eb88b50165560b6d730979487b9cc
[]
no_license
gaurirawat/Coding
a5542f71be5da538cc438a8d4070ce4c748ee044
d69fb40befbf9a30774b723fff90ae7cba384f7a
refs/heads/master
2023-02-20T00:33:31.632223
2021-01-22T11:49:14
2021-01-22T11:49:14
275,333,532
1
1
null
null
null
null
UTF-8
Java
false
false
986
java
package revision; import java.util.TreeMap; //https://leetcode.com/problems/hand-of-straights/submissions/ public class Hashing_lc_hands_of_straight { public boolean isNStraightHand(int[] hand, int k) { if (hand.length % k != 0) { return false; } TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>(); for (int x : hand) { map.put(x, map.getOrDefault(x,0) + 1); } while (!map.isEmpty()) { int min = map.firstKey(); int minReq = map.get(min); for (int i = min; i < min + k; ++i) { Integer value = map.get(i); if (value == null || value.compareTo(minReq) < 0) { return false; } if (value == minReq) { map.remove(i); } else{ map.put(i, value - minReq); } } } return true; } }
[ "gaurirawat97@gmail.com" ]
gaurirawat97@gmail.com
afbd9aefeeb9e7d00cad877b9f5e297ffd75716c
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/favorite/ui/base/FavDetailFooterView.java
ae6c1fce3388124f4f0d97bc06a039b860999550
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
925
java
package com.tencent.mm.plugin.favorite.ui.base; import android.content.Context; import android.util.AttributeSet; import android.widget.TextView; import com.tencent.mm.R; import com.tencent.mm.plugin.fav.a.f; import com.tencent.mm.plugin.favorite.a.g; public class FavDetailFooterView extends TextView { public FavDetailFooterView(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); } public FavDetailFooterView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public final void F(f fVar) { if (fVar != null) { if (fVar.field_edittime > 0) { setText(getContext().getString(R.l.eeX) + g.e(getContext(), fVar.field_edittime * 1000)); } else { setText(getContext().getString(R.l.egN) + g.e(getContext(), fVar.field_updateTime)); } } } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
24fcaa210001e74cd25857d4f8a9bb11fdd4e8ea
5c8cdc4f433b7658e31fffd5adf7175d6bad9d30
/mate-platform/mate-system/src/main/java/vip/mate/system/controller/SysRouteController.java
8b84632e927211e6000ab55f55cbc745e5c8a9d7
[ "Apache-2.0" ]
permissive
matevip/matecloud
9e603dde9be212f045549332d76a18a171297714
3a39a7a7090850b5936068f228dd58d73960410e
refs/heads/dev
2023-09-03T12:41:19.704337
2023-07-30T02:05:17
2023-07-30T02:05:17
218,435,426
1,438
427
Apache-2.0
2023-06-22T11:17:52
2019-10-30T03:25:43
Java
UTF-8
Java
false
false
4,641
java
/* * Copyright 2020-2030, MateCloud, DAOTIANDI Technology Inc All rights reserved. * * 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. * Author: pangu(7333791@qq.com) */ package vip.mate.system.controller; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.*; import vip.mate.core.auth.annotation.PreAuth; import vip.mate.core.common.api.Result; import vip.mate.core.database.entity.Search; import vip.mate.core.log.annotation.Log; import vip.mate.core.web.controller.BaseController; import vip.mate.core.web.util.CollectionUtil; import vip.mate.system.entity.SysRoute; import vip.mate.system.service.ISysRouteService; import javax.validation.Valid; /** * <p> * 系统路由表 前端控制器 * </p> * * @author pangu * @since 2020-10-17 */ @RestController @AllArgsConstructor @RequestMapping("/route") @Tag(name = "系统路由表", description = "系统路由表接口") public class SysRouteController extends BaseController { private final ISysRouteService sysRouteService; /** * 分页列表 * * @param search  搜索关键词 * @return Result */ @PreAuth @Log(value = "系统路由分页列表", exception = "系统路由分页列表请求异常") @GetMapping("/page") @Operation(summary = "系统路由分页", description = "分页查询") @Parameters({ @Parameter(name = "current", required = true, description = "当前页", in = ParameterIn.DEFAULT), @Parameter(name = "size", required = true, description = "每页显示数据", in = ParameterIn.DEFAULT), @Parameter(name = "keyword", required = true, description = "模糊查询关键词", in = ParameterIn.DEFAULT), @Parameter(name = "startDate", required = true, description = "创建开始日期", in = ParameterIn.DEFAULT), @Parameter(name = "endDate", required = true, description = "创建结束日期", in = ParameterIn.DEFAULT), }) public Result<?> page(Search search) { return Result.data(sysRouteService.listPage(search)); } /** * 系统路由表信息 * * @param id Id * @return Result */ @PreAuth @Log(value = "系统路由表信息", exception = "系统路由表信息请求异常") @GetMapping("/get") @Operation(summary = "系统路由表信息", description = "根据ID查询") @Parameters({ @Parameter(name = "id", required = true, description = "ID", in = ParameterIn.DEFAULT), }) public Result<?> get(@RequestParam String id) { return Result.data(sysRouteService.getById(id)); } /** * 系统路由表设置 * * @param sysRoute SysRoute 对象 * @return Result */ @PreAuth @Log(value = "系统路由表设置", exception = "系统路由表设置请求异常") @PostMapping("/set") @Operation(summary = "系统路由表设置", description = "系统路由表设置,支持新增或修改") public Result<?> set(@Valid @RequestBody SysRoute sysRoute) { return Result.condition(sysRouteService.saveOrUpdate(sysRoute)); } /** * 系统路由表删除 * * @param ids id字符串,根据,号分隔 * @return Result */ @PreAuth @Log(value = "系统路由表删除", exception = "系统路由表删除请求异常") @PostMapping("/del") @Operation(summary = "系统路由表删除", description = "系统路由表删除") @Parameters({ @Parameter(name = "ids", required = true, description = "多个用,号隔开", in = ParameterIn.DEFAULT) }) public Result<?> del(@RequestParam String ids) { return Result.condition(sysRouteService.removeByIds(CollectionUtil.stringToCollection(ids))); } /** * 系统路由列表 * * @return Result<List<SysRouteVO>> */ @PreAuth @Log(value = "系统路由列表", exception = "系统路由列表请求异常") @GetMapping("/list-item") @Operation(summary = "系统路由列表", description = "系统路由列表") public Result<?> listItem() { return Result.data(sysRouteService.listItem()); } }
[ "7333791@qq.com" ]
7333791@qq.com
2a971597d7a39761349a1907c436140c0b821b9f
7f48c0ee6738e730d33db6f152ee58aa5799f09a
/SpringPractice/src/main/java/com/zonray/extra/App.java
2ef966ff7594c803449541cbc30ac9b37be1e373
[]
no_license
kumarjagadeesh25/SpringLoggingSession
59e0acc8cb91d33b1ffeec3e2ec1c9a04419b5b0
fbdc802bdfdd027f5189831fca4cbc780ca7413d
refs/heads/master
2022-06-01T16:06:26.427692
2019-09-19T13:01:06
2019-09-19T13:01:06
209,551,011
0
0
null
2022-05-25T06:42:09
2019-09-19T12:41:54
Java
UTF-8
Java
false
false
282
java
package com.zonray.extra; public class App { public static void main(String[] args) { MyInterface myInterface = new Cone(); myInterface.demo(); myInterface.methodOne(); ((Cone)myInterface).methodTwo(); Cone.class.cast(myInterface).methodTwo(); } }
[ "you@example.com" ]
you@example.com
f7b94f11becf130f55b61937547e6b5637255e7d
5728f50a394b62394587b0b255a57dcf4d13d20d
/src/java/org/jsimpledb/parse/expr/LValue.java
45ffde85c25dc380d08cc0904661064416b47fbd
[ "Apache-2.0" ]
permissive
mayoricodevault/jsimpledb
3d905744c7a5e55c1fe530dd6d91c99c4c730f1e
9ee8301a6cda92a2d85ec1b0d94cfde6a78e5e38
refs/heads/master
2021-06-13T06:30:51.209136
2015-05-08T15:56:55
2015-05-08T15:56:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
582
java
/* * Copyright (C) 2014 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.jsimpledb.parse.expr; import org.jsimpledb.parse.ParseSession; /** * Extension of the {@link Value} interface for instances that are capable of assignment. */ public interface LValue extends Value { /** * Make assignment to this instance. * * @param session parse session * @param value new value for this instance * @throws IllegalArgumentException if {@code value} is null or otherwise invalid */ void set(ParseSession session, Value value); }
[ "archie.cobbs@3d3da37c-52f5-b908-f4a3-ab77ce6ea90f" ]
archie.cobbs@3d3da37c-52f5-b908-f4a3-ab77ce6ea90f
de73d3b68e49745defd921b617c4328eeff4ddfe
124df74bce796598d224c4380c60c8e95756f761
/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/edex/common/metparameters/UncondProbOfTstorms2hr.java
4372241de2143ea7bfb27fcf765d1522ec41bd47
[]
no_license
Mapoet/AWIPS-Test
19059bbd401573950995c8cc442ddd45588e6c9f
43c5a7cc360b3cbec2ae94cb58594fe247253621
refs/heads/master
2020-04-17T03:35:57.762513
2017-02-06T17:17:58
2017-02-06T17:17:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
885
java
/** * */ package gov.noaa.nws.ncep.edex.common.metparameters; import javax.measure.quantity.Dimensionless; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.adapters.UnitAdapter; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; /** * Maps to the parameter TS02 */ @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class UncondProbOfTstorms2hr extends AbstractMetParameter implements Dimensionless, ISerializableObject { /** * */ private static final long serialVersionUID = -7530180701363762459L; public UncondProbOfTstorms2hr() throws Exception { super( new UnitAdapter().marshal(UNIT) ); } }
[ "joshua.t.love@saic.com" ]
joshua.t.love@saic.com
e5b681ef33972b2e895fc3d00e8ddb6bb1b1c055
c2e95eb528cde47b37f6d477b2c1f0f36548cabd
/src/com/neuedu/dao/IStudentDAO.java
b7d5bfa1e957dd91fb544c775e392602d6e9ad36
[]
no_license
jeaniely/java20181016jdbc
e26a9a5b8f704ec5d519ddb40ef3b622804ab523
9159da0f7d03b916774cfef2cfa7437c3c4115e1
refs/heads/master
2020-04-01T12:30:20.255730
2018-10-16T09:01:12
2018-10-16T09:01:12
153,210,734
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package com.neuedu.dao; import com.neuedu.bean.Student; import java.util.List; public interface IStudentDAO { List<Student> getAll(); Student getOne(String sno); int delete(String sno); int insert(Student student); int update(Student student); }
[ "574156761@qq.com" ]
574156761@qq.com
dae2476e4632866e417fa7c079e7bf5bb898308f
a8b30e3c49bcdf6db1c0994831316ccebc613dba
/is/src/main/java/com/zxtech/is/ui/team/activity/ElaTeamAddTeamMemberElaDialog.java
12c810367b855a499b04d4dbbecdf6d36e9cb769
[]
no_license
jerry5213/eai
48d3265808397a0554c9fcb5ead91a9e3882b83e
a5b828754e65c80c86ed82782db433a64f84cea3
refs/heads/master
2020-03-25T17:26:29.967693
2018-08-09T09:19:51
2018-08-09T09:19:51
143,977,737
0
0
null
null
null
null
UTF-8
Java
false
false
6,091
java
package com.zxtech.is.ui.team.activity; import android.app.DialogFragment; import android.content.DialogInterface; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.Display; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import com.zxtech.is.net.HttpFactory; import com.zxtech.is.net.RxHelper; import com.zxtech.is.util.ToastUtil; import com.zxtech.is.widget.MyItemDecoration; import com.zxtech.is.R; import com.zxtech.is.R2; import com.zxtech.is.common.net.BaseResponse; import com.zxtech.is.common.net.DefaultObserver; import com.zxtech.is.model.team.TeamAddMemberEla; import com.zxtech.is.service.team.ElaTeamAddPersonService; import com.zxtech.is.ui.team.adapter.AddTeamMemberElaAdapter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; /** * Created by syp660 on 2018/5/5. */ public class ElaTeamAddTeamMemberElaDialog extends DialogFragment { private AddTeamMemberElaAdapter mAdapter; private List<TeamAddMemberEla> list = new ArrayList<>(); private String prjGuid; public String getPrjGuid() { return prjGuid; } public void setPrjGuid(String prjGuid) { this.prjGuid = prjGuid; } public interface selectEla{ void elaList(String elaName, String teamGuid); } private selectEla selectEla; public ElaTeamAddTeamMemberElaDialog.selectEla getSelectEla() { return selectEla; } public void setSelectEla(ElaTeamAddTeamMemberElaDialog.selectEla selectEla) { this.selectEla = selectEla; } @BindView(R2.id.ela_team_add_member_rv) RecyclerView mRecyclerView; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.dialog_elevator_tem, null); //加这句话去掉自带的标题栏 getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE); getDialog().setCanceledOnTouchOutside(false); getDialog().setCancelable(false); getDialog().setOnKeyListener(new DialogInterface.OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return true; } return false; } }); requesNet(); ButterKnife.bind(this, view); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity()); linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); mRecyclerView.setLayoutManager(linearLayoutManager); mRecyclerView.addItemDecoration(new MyItemDecoration()); mAdapter = new AddTeamMemberElaAdapter(R.layout.item_elevator_team, list); mAdapter.bindToRecyclerView(mRecyclerView); mRecyclerView.setAdapter(mAdapter); return view; } @Override public void onStart() { super.onStart(); WindowManager m = getActivity().getWindow().getWindowManager(); Display d = m.getDefaultDisplay(); Window window = getDialog().getWindow(); WindowManager.LayoutParams params = window.getAttributes(); //params.gravity = Gravity.BOTTOM; params.width = (int) (d.getWidth() * 0.8); window.setAttributes(params); //设置背景透明 window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); } @OnClick({R2.id.ela_team_add_member_submit,R2.id.ela_team_add_member_cancel}) public void onClick(View view){ int i = view.getId(); if (i == R.id.ela_team_add_member_submit) { if (check()) { result(); this.dismiss(); } } else if (i == R.id.ela_team_add_member_cancel) { this.dismiss(); } else { } } private void requesNet(){ ElaTeamAddPersonService elaTeamAddPersonService = HttpFactory.getService(ElaTeamAddPersonService.class); elaTeamAddPersonService.selectTeamMemberEla(prjGuid) .compose(RxHelper.<BaseResponse<List<TeamAddMemberEla>>>rxSchedulerHelper()) .subscribe(new DefaultObserver<BaseResponse<List<TeamAddMemberEla>>>(getActivity(),true) { @Override public void onSuccess(BaseResponse<List<TeamAddMemberEla>> response) { list.clear(); list.addAll(response.getData()); mAdapter.notifyDataSetChanged(); } }); } public static ElaTeamAddTeamMemberElaDialog newInstance() { ElaTeamAddTeamMemberElaDialog fragment = new ElaTeamAddTeamMemberElaDialog(); Bundle args = new Bundle(); fragment.setArguments(args); return fragment; } private boolean check(){ if(mAdapter.getSelectCount() == 0) { ToastUtil.showLong(getResources().getString(R.string.is_check_one_elevator)); return false; } return true; } private void result(){ String elaName = ""; String teamGuid = ""; for (int i = 0; i < list.size(); i++) { if (list.get(i).isCheck()){ if (elaName.equals("")) { elaName += list.get(i).getElaName(); teamGuid += list.get(i).getTeamGuid(); } else { elaName += "," + list.get(i).getElaName(); teamGuid += "," + list.get(i).getTeamGuid(); } } } selectEla.elaList(elaName,teamGuid); } }
[ "SYP521@neuxa.com" ]
SYP521@neuxa.com
c3cf3b5ee0f41648e2be24cb72f782e92c312475
ef71494fef6618b48cfbcce2904dfd74b12a8948
/icloud-common/framework-spiderbrowser/src/main/java/org/lobobrowser/html/renderer/MarkupLayout.java
159a890a47bf575f7dd302184d4fb06346cf3016
[]
no_license
djgrasss/icloud-2
128d8ba977afc1787f280c9b524d1704035476d7
796c0b53af2c05e82ef68f8c140a726e19a0e1ce
refs/heads/master
2021-01-21T23:58:10.983738
2014-09-03T01:41:55
2014-09-03T01:41:55
23,603,476
1
1
null
null
null
null
UTF-8
Java
false
false
1,242
java
/* GNU LESSER GENERAL PUBLIC LICENSE Copyright (C) 2006 The Lobo Project This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Contact info: xamjadmin@users.sourceforge.net */ /* * Created on Nov 6, 2005 */ package org.lobobrowser.html.renderer; import java.awt.Dimension; import java.awt.Insets; import org.lobobrowser.html.domimpl.HTMLElementImpl; interface MarkupLayout { public void layoutMarkup(RBlockViewport bodyLayout, RenderableContainer container, Dimension containerSize, Insets insets, HTMLElementImpl markupElement); }
[ "jiangning.cui2@travelzen.com" ]
jiangning.cui2@travelzen.com
b7c21b7149fe2fd3fb79362b829fa9e6acdc71e3
6d4a383248416a867fdcf2bf3310e0d948412d98
/src/main/java/com/gyoomi/designpattern/strategy/demo02/Main.java
719bada8290d5a69ee54493913003ba93f2376bb
[]
no_license
gyoomi/design-pattern
156beaff80049fbe329ce818ed6245b8dfa12c68
a5d15ff8b98ef5249e51460f8f126708a924e782
refs/heads/master
2020-04-08T02:50:31.236753
2019-12-14T15:31:39
2019-12-14T15:31:39
158,951,025
0
1
null
null
null
null
UTF-8
Java
false
false
384
java
package com.gyoomi.designpattern.strategy.demo02; /** * 类功能描述 * * @author Leon * @version 2019/4/1 22:47 */ public class Main { public static void main(String[] args) { int a = 10, b = 21; SubCalculator sub = new SubCalculator(); Context ctx = new Context(sub); int exec = ctx.exec(a, b); System.out.println(exec); } }
[ "gyoomi0709@foxmail.com" ]
gyoomi0709@foxmail.com
838ce165d53840ea4a9998ae59a2cf90c589401c
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/ui/contact/a/c$a.java
bb45d4f1af63344cc8ed2706f92e56e3d4437954
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
499
java
package com.tencent.mm.ui.contact.a; import android.view.View; import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; import com.tencent.mm.ui.contact.a.a.a; public class c$a extends a { public View contentView; public ImageView iip; public TextView iiq; public TextView iir; public CheckBox iis; public TextView mPU; final /* synthetic */ c yVi; public c$a(c cVar) { this.yVi = cVar; super(cVar); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
c6fe29d22b738e57be8d5f71c7b26dba32829dc0
c5e5de07beff2424697ea8f15a5a6adfa4d65417
/les_7/src/main/java/ru/green/avi/spring/MusicPlayer.java
4e9033b4e527ab294007a483fbfad5763c728bde
[]
no_license
Alex-Green-2015/AlishevSpringLessons
fec2c6d1ed0b31906cbaf3c8448f09a020aff643
70597972c92e41fd73021a85cffe87e46d14aed5
refs/heads/master
2023-08-16T19:52:07.455300
2023-08-13T07:50:00
2023-08-13T07:50:00
235,429,658
0
0
null
2022-12-16T05:11:42
2020-01-21T19:56:40
Java
UTF-8
Java
false
false
863
java
package ru.green.avi.spring; import java.util.ArrayList; import java.util.List; public class MusicPlayer { private List<Music> musicList = new ArrayList<>(); private String name; private int volume; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getVolume() { return volume; } public void setVolume(int volume) { this.volume = volume; } public void setMusicList(List<Music> musicList) { this.musicList = musicList; } public void playMusic() throws InterruptedException { for (Music music : musicList) { System.out.println("Musical genre: \"" + music.getClass().getSimpleName() + "\". Song name: \"" + music.getSong() + "\""); Thread.sleep(1000); } } }
[ "test@gmail.com" ]
test@gmail.com
aa363e571fd035c3a2b96e59faada1c2b013e1a7
f43504b11e935796128f07ab166e7d47a248f204
/Low_level_Design_Problems/parkinglot/src/main/java/com/gb/parkinglot/exceptions/InvlaidParkingFloorException.java
c2b5358f8c2f52ee0c91b16e08c342b31f67825d
[ "Apache-2.0" ]
permissive
vish35/LLD
4e3b4b6a22e334e1ab69871e5ded526613bb73f8
1d8f209213f74395fc1121a5862ce2a467b09f94
refs/heads/main
2023-07-30T09:10:39.696754
2021-09-15T05:46:45
2021-09-15T05:46:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package com.gb.parkinglot.exceptions; public class InvlaidParkingFloorException extends Exception { public InvlaidParkingFloorException(String message) { super(message); } }
[ "gowtkum@amazon.com" ]
gowtkum@amazon.com
df0d71fbff84d1215e5777bc901d6dd0cee2386e
94228df04c8d71ef72d0278ed049e9eac43566bc
/modules/marketdevelopment/marketdevelopment-provider/src/main/java/com/bjike/goddess/marketdevelopment/api/DayPlanApiImpl.java
68f7a954561ff18b38c3eef07f2b5b9014a2d7c9
[]
no_license
yang65700/goddess-java
b1c99ac4626c29651250969d58d346b7a13eb9ad
3f982a3688ee7c97d8916d9cb776151b5af8f04f
refs/heads/master
2021-04-12T11:10:39.345659
2017-09-12T02:32:51
2017-09-12T02:32:51
126,562,737
0
0
null
2018-03-24T03:33:53
2018-03-24T03:33:53
null
UTF-8
Java
false
false
2,372
java
package com.bjike.goddess.marketdevelopment.api; import com.bjike.goddess.common.api.exception.SerException; import com.bjike.goddess.common.utils.bean.BeanTransform; import com.bjike.goddess.marketdevelopment.bo.DayPlanBO; import com.bjike.goddess.marketdevelopment.dto.DayPlanDTO; import com.bjike.goddess.marketdevelopment.service.DayPlanSer; import com.bjike.goddess.marketdevelopment.to.CollectTO; import com.bjike.goddess.marketdevelopment.to.DayPlanTO; import com.bjike.goddess.marketdevelopment.to.GuidePermissionTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * 天计划业务接口实现 * * @Author: [ dengjunren ] * @Date: [ 2017-03-22 07:08 ] * @Description: [ 天计划业务接口实现 ] * @Version: [ v1.0.0 ] * @Copy: [ com.bjike ] */ @Service("dayPlanApiImpl") public class DayPlanApiImpl implements DayPlanAPI { @Autowired private DayPlanSer dayPlanSer; @Override public Boolean guidePermission(GuidePermissionTO guidePermissionTO) throws SerException { return dayPlanSer.guidePermission(guidePermissionTO); } @Override public DayPlanBO save(DayPlanTO to) throws SerException { return dayPlanSer.save(to); } @Override public DayPlanBO update(DayPlanTO to) throws SerException { return dayPlanSer.update(to); } @Override public DayPlanBO delete(DayPlanTO to) throws SerException { return dayPlanSer.delete(to); } @Override public List<DayPlanBO> findByDate(String start, String end) throws SerException { return dayPlanSer.findByDate(start, end); } @Override public List<DayPlanBO> findByDate(String date) throws SerException { return dayPlanSer.findByDate(date); } @Override public DayPlanBO getById(String id) throws SerException { return BeanTransform.copyProperties(dayPlanSer.findById(id), DayPlanBO.class); } @Override public List<DayPlanBO> maps(DayPlanDTO dto) throws SerException { return dayPlanSer.maps(dto); } @Override public Integer getTotal() throws SerException { return dayPlanSer.findAll().size(); } @Override public byte[] exportExcel(CollectTO to) throws SerException { return dayPlanSer.exportExcel(to); } }
[ "196329217@qq.com" ]
196329217@qq.com
c8e7888dd5b53472096b2e943d039544c6ee0e9a
47321d514cd65983bc396ded2fdcea389340e983
/src/main/java/w5d5/Playlist.java
48000c099d435aa4df34e2735b19202c6359d1e1
[]
no_license
n0rb1v/SeniorGyak
07cb5bb22f525b60096865d320091b7b96366177
04e32066837f570b59dabdd89a3c768affadaf3e
refs/heads/master
2023-03-13T18:54:32.085364
2021-03-22T15:23:09
2021-03-22T15:23:09
346,717,999
0
0
null
null
null
null
UTF-8
Java
false
false
479
java
package w5d5; import java.util.ArrayList; import java.util.List; public class Playlist { private List<Song> songs; public Playlist(List<Song> songs) { this.songs = songs; } public List<Song> findByLengthGreaterThan(int mins) { List<Song> result = new ArrayList<>(); for (Song item: songs) { if (item.getLenghtInSeconds() > mins*60) { result.add(item); } } return result; } }
[ "n0rb1v@gmail.com" ]
n0rb1v@gmail.com
3670bd6b21a9bc8d710a6c3acb361ee99b8cb593
97137dff3c474bc9d3ee964268dfa64e63536c2b
/workspace/glaf-form/src/main/java/com/glaf/form/core/export/xml/FormXmlExporter.java
ca156fdec78a1b37b466ed0ad3c6cdf98cc86ce9
[ "Apache-2.0" ]
permissive
xrogzu/glaf
00ad543f5c2a227ff3900b3d5d1f40c649cc8cdf
f0ae2c8e07f0dcd7870caad0da0eb8ad843a128e
refs/heads/master
2020-12-27T20:38:15.676070
2014-12-28T01:26:19
2014-12-28T01:26:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,934
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.glaf.form.core.export.xml; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.dom4j.Document; import com.glaf.core.base.DataModel; import com.glaf.form.core.context.FormContext; import com.glaf.form.core.domain.FormDefinition; import com.glaf.form.core.graph.def.FormNode; public class FormXmlExporter { public Document export(DataModel dataModel, FormContext formContext) { Document doc = null; FormDefinition formDefinition = formContext.getFormDefinition(); if (formDefinition != null) { List<FormNode> nodes = formDefinition.getNodes(); Map<String, Object> dataMap = dataModel.getDataMap(); Iterator<FormNode> iterator = nodes.iterator(); while (iterator.hasNext()) { FormNode node = iterator.next(); String name = node.getName(); if (StringUtils.isEmpty(name)) { continue; } Object value = dataMap.get(name); node.setValue(value); } FormModelXmlWriter xmlWriter = new FormModelXmlWriter( formDefinition); doc = xmlWriter.writeFormDefinition(); } return doc; } }
[ "jior2008@gmail.com" ]
jior2008@gmail.com
f5f3244813ba0bb941a410f6a8c0d49a2e7b4adb
6b3302dd2593f897a1da06bf38a6087d57f26bd9
/test/src/javaandroidvn/JavaAndroidVn.java
c11e0906854c936f655d1ebbf75325236b2420aa
[]
no_license
luongnhatduy/oop
6188441eb2b3c497aead7b8effd694aefd5775f4
dd79b289da83aa26e2dc925918b42d77ec76370c
refs/heads/master
2020-03-26T11:57:34.516944
2018-08-20T14:43:24
2018-08-20T14:43:24
144,867,917
0
0
null
null
null
null
UTF-8
Java
false
false
1,744
java
package javaandroidvn; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Scanner; class SinhVien { public String hoTen; public int diem; } public class JavaAndroidVn { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Nhập số sinh viên: "); int n = input.nextInt(); ArrayList<SinhVien> danhSach = new ArrayList(); for (int i = 0; i < n; i++) { // input.nextLine(); SinhVien x = new SinhVien(); System.out.println("Thông tin sinh viên thứ " + i); System.out.print("Họ và Tên: "); input = new Scanner(System.in); x.hoTen = input.nextLine(); System.out.print("Điểm: "); input = new Scanner(System.in); x.diem = input.nextInt(); danhSach.add(x); } //Sắp xếp danh sách theo số điểm giảm dần! Collections.sort(danhSach, new Comparator<SinhVien>() { @Override public int compare(SinhVien sv1, SinhVien sv2) { if (sv1.diem < sv2.diem) { return 1; } else { if (sv1.diem == sv2.diem) { return 0; } else { return -1; } } } }); System.out.println("Danh sách sắp xếp theo thứ tự điểm giảm dần là: "); for (int i = 0; i < danhSach.size(); i++) { System.out.println("Tên: " + danhSach.get(i).hoTen + " Điểm: " + danhSach.get(i).diem); } } }
[ "=" ]
=
886d9353463b0677ab35a8286bcb8bc2e81aedb7
d0d2a7575e753844751956277f4fb1e02f89e1da
/src/TechFundamentals/ObjectsAndClasses/Exercise/AdvertisementMessage.java
1272bd23ea27466af7bc8837bf4c19c5e4195ae8
[]
no_license
StefanUrilski/MyProjects
093f420ea6622dc8dbee08cce665ad6f382e9b94
9046030c978cfead9e725c2ac24072f67ed674e3
refs/heads/master
2020-06-27T19:53:11.528532
2019-08-01T11:01:01
2019-08-01T11:01:01
200,034,010
0
0
null
null
null
null
UTF-8
Java
false
false
1,611
java
package TechFundamentals.ObjectsAndClasses.Exercise; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Random; public class AdvertisementMessage { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String[] phrases = new String[]{"Excellent product.", "Such a great product.", "I always use that product.", "Best product of its category.", "Exceptional product.", "I can’t live without this product."}; String[] events = new String[]{"Now I feel good.", "I have succeeded with this product.", "Makes miracles. I am happy of the results!", "I cannot believe but now I feel awesome.", "Try it yourself, I am very satisfied.", "I feel great!"}; String[] authors = new String[]{"Diana", "Petya", "Stella", "Elena", "Katya", "Iva", "Annie", "Eva"}; String[] cities = new String[]{"Burgas", "Sofia", "Plovdiv", "Varna", "Ruse"}; int n = Integer.valueOf(reader.readLine()); Random rnd = new Random(); for (int i = 0; i < n; i++) { String phrase = phrases[rnd.nextInt(phrases.length)]; String author = authors[rnd.nextInt(authors.length)]; String city = cities[rnd.nextInt(cities.length)]; String event = events[rnd.nextInt(events.length)]; System.out.println(phrase + " " + event + " " + author + " - " + city); } //P.S. not a correct solving to the MortalEngines!!! } }
[ "urilskistefan@gmail.com" ]
urilskistefan@gmail.com
52c4d56f9bc756783e1b80f63dab25e48c4d7c28
4981fc0e1e82dc9226116aa8f0a29413c947b0ec
/Build/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateCatalogTest.java
64db8e742c417cb146e8995b0eff3332d2f1163d
[ "W3C", "GPL-1.0-or-later", "SAX-PD", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown", "MIT" ]
permissive
Mayo-WE01051879/mayosapp
7e33d4b73b20e6f58f0ae593ae7c9ac10afff20c
4c678635cfd2823c2df6937165e102fdac72cb86
refs/heads/master
2022-12-10T01:22:54.629304
2021-02-24T20:16:36
2021-02-24T20:16:36
16,258,006
0
0
MIT
2022-12-05T23:23:59
2014-01-26T17:50:40
Java
UTF-8
Java
false
false
2,235
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.tools.ant.taskdefs.optional; import org.apache.tools.ant.BuildFileTest; /** * Tests the XMLValidate optional task with nested external catalogs. * * @see XmlValidateTest * @since Ant 1.6 */ public class XmlValidateCatalogTest extends BuildFileTest { /** * where tasks run */ private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/"; /** * Constructor * * @param name testname */ public XmlValidateCatalogTest(String name) { super(name); } /** * The JUnit setup method */ public void setUp() { configureProject(TASKDEFS_DIR + "xmlvalidate.xml"); } /** * The teardown method for JUnit */ public void tearDown() { } /** * catalogfiles fileset should be ignored * if resolver.jar is not present, but will * be used if it is. either way, test should * work b/c we have a nested dtd with the same * entity */ public void testXmlCatalogFiles() { executeTarget("xmlcatalogfiles"); } /** * Test nested catalogpath. * It should be ignored if resolver.jar is not * present, but will be used if it is. either * way, test should work b/c we have a nested * dtd with the same entity */ public void testXmlCatalogPath() { executeTarget("xmlcatalogpath"); } }
[ "delapaz.mayo@gmail.com" ]
delapaz.mayo@gmail.com
08f29fc092cddccf492f7b4b779c46266afd09c6
2faaf066717407e513de70cc8fbf4358cb1ed3da
/java-basic/src/main/java/com/eomcs/basic/ex02/Exam0130.java
49d017a26c03d8de3dca8c04892e8d0fa5d91dd6
[]
no_license
woohyeongminn/bitcamp-study
0983aebe51ed6815c4f25bdf1341adec5cf6e277
28dcc540da14e3577c97f76f7af76ce16d1c1c73
refs/heads/main
2023-08-31T17:11:23.558226
2021-11-16T04:51:39
2021-11-16T04:51:39
380,931,262
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
// String - hashCode() package com.eomcs.basic.ex02; public class Exam0130 { public static void main(String[] args) { String s1 = new String("Hello"); String s2 = new String("Hello"); // Object의 hashCode()는 인스턴스 마다 다르다. System.out.println(s1 == s2); System.out.println(s1.hashCode() == s2.hashCode()); // true // // 그러나, String의 hashCode()은 // 문자열이 같으면 같은 hashCode()를 리턴하도록 오버라이딩 하였다. // 이유? // - 문자열이 같은 경우 같은 객체로 다루기 위함이다. // - HashSet 에서 객체를 저장할 때 이 메서드의 리턴 값으로 저장 위치를 계산한다. // - HashMap이나 Hashtable에서는 Key를 다룰 때 이 메서드의 리턴 값을 사용한다. // - 보통 equals()를 함께 오버라이딩 한다. } }
[ "gudals.woo@gmail.com" ]
gudals.woo@gmail.com
b8b874f70286db735ac8627831cc5e9db1eab02c
9254e7279570ac8ef687c416a79bb472146e9b35
/sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/GetDWSSubsTaskMetricsResponseBody.java
27ca7c3a0414321c9e386e2dcc265854de7d9d88
[ "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
6,002
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sofa20190815.models; import com.aliyun.tea.*; public class GetDWSSubsTaskMetricsResponseBody extends TeaModel { @NameInMap("RequestId") public String requestId; @NameInMap("ResultCode") public String resultCode; @NameInMap("ResultMessage") public String resultMessage; @NameInMap("Data") public GetDWSSubsTaskMetricsResponseBodyData data; public static GetDWSSubsTaskMetricsResponseBody build(java.util.Map<String, ?> map) throws Exception { GetDWSSubsTaskMetricsResponseBody self = new GetDWSSubsTaskMetricsResponseBody(); return TeaModel.build(map, self); } public GetDWSSubsTaskMetricsResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public GetDWSSubsTaskMetricsResponseBody setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public GetDWSSubsTaskMetricsResponseBody setResultMessage(String resultMessage) { this.resultMessage = resultMessage; return this; } public String getResultMessage() { return this.resultMessage; } public GetDWSSubsTaskMetricsResponseBody setData(GetDWSSubsTaskMetricsResponseBodyData data) { this.data = data; return this; } public GetDWSSubsTaskMetricsResponseBodyData getData() { return this.data; } public static class GetDWSSubsTaskMetricsResponseBodyDataMetric extends TeaModel { @NameInMap("ConsumptionLatency") public Long consumptionLatency; @NameInMap("ConsumptionRps") public Long consumptionRps; @NameInMap("DailyConsumedRecords") public Long dailyConsumedRecords; @NameInMap("SampleTime") public String sampleTime; @NameInMap("SlowestPartition") public String slowestPartition; public static GetDWSSubsTaskMetricsResponseBodyDataMetric build(java.util.Map<String, ?> map) throws Exception { GetDWSSubsTaskMetricsResponseBodyDataMetric self = new GetDWSSubsTaskMetricsResponseBodyDataMetric(); return TeaModel.build(map, self); } public GetDWSSubsTaskMetricsResponseBodyDataMetric setConsumptionLatency(Long consumptionLatency) { this.consumptionLatency = consumptionLatency; return this; } public Long getConsumptionLatency() { return this.consumptionLatency; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setConsumptionRps(Long consumptionRps) { this.consumptionRps = consumptionRps; return this; } public Long getConsumptionRps() { return this.consumptionRps; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setDailyConsumedRecords(Long dailyConsumedRecords) { this.dailyConsumedRecords = dailyConsumedRecords; return this; } public Long getDailyConsumedRecords() { return this.dailyConsumedRecords; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setSampleTime(String sampleTime) { this.sampleTime = sampleTime; return this; } public String getSampleTime() { return this.sampleTime; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setSlowestPartition(String slowestPartition) { this.slowestPartition = slowestPartition; return this; } public String getSlowestPartition() { return this.slowestPartition; } } public static class GetDWSSubsTaskMetricsResponseBodyData extends TeaModel { @NameInMap("Consumer") public String consumer; @NameInMap("Group") public String group; @NameInMap("Id") public Long id; @NameInMap("Name") public String name; @NameInMap("TableId") public String tableId; @NameInMap("Metric") public GetDWSSubsTaskMetricsResponseBodyDataMetric metric; public static GetDWSSubsTaskMetricsResponseBodyData build(java.util.Map<String, ?> map) throws Exception { GetDWSSubsTaskMetricsResponseBodyData self = new GetDWSSubsTaskMetricsResponseBodyData(); return TeaModel.build(map, self); } public GetDWSSubsTaskMetricsResponseBodyData setConsumer(String consumer) { this.consumer = consumer; return this; } public String getConsumer() { return this.consumer; } public GetDWSSubsTaskMetricsResponseBodyData setGroup(String group) { this.group = group; return this; } public String getGroup() { return this.group; } public GetDWSSubsTaskMetricsResponseBodyData setId(Long id) { this.id = id; return this; } public Long getId() { return this.id; } public GetDWSSubsTaskMetricsResponseBodyData setName(String name) { this.name = name; return this; } public String getName() { return this.name; } public GetDWSSubsTaskMetricsResponseBodyData setTableId(String tableId) { this.tableId = tableId; return this; } public String getTableId() { return this.tableId; } public GetDWSSubsTaskMetricsResponseBodyData setMetric(GetDWSSubsTaskMetricsResponseBodyDataMetric metric) { this.metric = metric; return this; } public GetDWSSubsTaskMetricsResponseBodyDataMetric getMetric() { return this.metric; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
13c06af452ded5f5db655cb591a1b7c28f91849b
dee143bd512ee5389173d2bd754ced6d3ff1e86c
/quarkus-test-core/src/main/java/io/quarkus/test/bootstrap/ServiceContext.java
85c88b704351461719dd11d12e40d8b8e672b264
[ "Apache-2.0" ]
permissive
fabiobrz/quarkus-test-framework
9c6c852f8f7d84e1f66448d4e1b7fd5806116486
be443b8fd61c8f1c498a8288f15b13259ddf1736
refs/heads/main
2023-05-19T09:25:40.878303
2021-06-07T08:59:28
2021-06-07T08:59:47
373,764,156
0
0
Apache-2.0
2021-06-04T07:52:47
2021-06-04T07:52:47
null
UTF-8
Java
false
false
1,116
java
package io.quarkus.test.bootstrap; import java.io.File; import java.nio.file.Path; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.extension.ExtensionContext; public final class ServiceContext { private final Service owner; private final ExtensionContext testContext; private final Path serviceFolder; private final Map<String, Object> store = new HashMap<>(); protected ServiceContext(Service owner, ExtensionContext testContext) { this.owner = owner; this.testContext = testContext; this.serviceFolder = new File("target", getName()).toPath(); } public Service getOwner() { return owner; } public String getName() { return owner.getName(); } public ExtensionContext getTestContext() { return testContext; } public Path getServiceFolder() { return serviceFolder; } public void put(String key, Object value) { store.put(key, value); } @SuppressWarnings("unchecked") public <T> T get(String key) { return (T) store.get(key); } }
[ "josecarvajalhilario@gmail.com" ]
josecarvajalhilario@gmail.com
586353b9a96af588fc208896409b128cb55a33f8
08a95d58927c426e515d7f6d23631abe734105b4
/Project/bean/com/dimata/harisma/form/payroll/FrmProcenPresence.java
7ac413290bb228d76b93cc0acde48a43a949cc26
[]
no_license
Bagusnanda90/javaproject
878ce3d82f14d28b69b7ef20af675997c73b6fb6
1c8f105d4b76c2deba2e6b8269f9035c67c20d23
refs/heads/master
2020-03-23T15:15:38.449142
2018-07-21T00:31:47
2018-07-21T00:31:47
141,734,002
0
1
null
null
null
null
UTF-8
Java
false
false
2,374
java
/* * FrmTaxType.java * * Created on March 30, 2007, 6:01 PM */ package com.dimata.harisma.form.payroll; /* java package */ import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; /* qdep package */ import com.dimata.qdep.form.*; /* project package */ import com.dimata.harisma.entity.payroll.*; /** * * @author emerliana */ public class FrmProcenPresence extends FRMHandler implements I_FRMInterface, I_FRMType { private ProcenPresence procenPresence; public static final String FRM_PROCEN_PRESENCE = "FRM_PROCEN_PRESENCE" ; public static final int FRM_FIELD_PROCEN_PRESENCE_ID = 0 ; public static final int FRM_FIELD_PROCEN_PRESENCE = 1 ; public static final int FRM_FIELD_ABSENCE_DAY = 2 ; public static String[] fieldNames = { "FRM_FIELD_PROCEN_PRESENCE_ID", "FRM_FIELD_PROCEN_PRESENCE", "FRM_FIELD_ABSENCE_DAY" } ; public static int[] fieldTypes = { TYPE_LONG, TYPE_FLOAT + ENTRY_REQUIRED, TYPE_INT + ENTRY_REQUIRED } ; /** Creates a new instance of FrmTaxType */ public FrmProcenPresence() { } public FrmProcenPresence(ProcenPresence procenPresence){ this.procenPresence = procenPresence; } public FrmProcenPresence(HttpServletRequest request, ProcenPresence procenPresence){ super(new FrmProcenPresence(procenPresence), request); this.procenPresence = procenPresence; } public String[] getFieldNames() { return fieldNames; } public int getFieldSize() { return fieldNames.length; } public int[] getFieldTypes() { return fieldTypes; } public String getFormName() { return FRM_PROCEN_PRESENCE; } public ProcenPresence getEntityObject(){ return procenPresence; } public void requestEntityObject(ProcenPresence procenPresence) { try{ this.requestParam(); //employee.setPositionId(getLong(FRM_FIELD_POSITION_ID)); procenPresence.setProcenPresence(getDouble(FRM_FIELD_PROCEN_PRESENCE)); procenPresence.setAbsenceDay(getInt(FRM_FIELD_ABSENCE_DAY)); }catch(Exception e){ System.out.println("Error on requestEntityObject : "+e.toString()); } } }
[ "agungbagusnanda90@gmai.com" ]
agungbagusnanda90@gmai.com
87519816aa2ea7bdfcac5fd746c514b965f9550c
ef71494fef6618b48cfbcce2904dfd74b12a8948
/icloud-common/framework-spiderbrowser/src/main/java/org/lobobrowser/html/domimpl/HTMLScriptElementImpl.java
55837f86e9d8e6347af22ac441cc27309586c940
[]
no_license
djgrasss/icloud-2
128d8ba977afc1787f280c9b524d1704035476d7
796c0b53af2c05e82ef68f8c140a726e19a0e1ce
refs/heads/master
2021-01-21T23:58:10.983738
2014-09-03T01:41:55
2014-09-03T01:41:55
23,603,476
1
1
null
null
null
null
UTF-8
Java
false
false
5,950
java
/* GNU LESSER GENERAL PUBLIC LICENSE Copyright (C) 2006 The Lobo Project This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Contact info: xamjadmin@users.sourceforge.net */ /* * Created on Oct 8, 2005 */ package org.lobobrowser.html.domimpl; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.logging.Level; import java.util.logging.Logger; import org.lobobrowser.html.HttpRequest; import org.lobobrowser.html.UserAgentContext; import org.lobobrowser.html.js.Executor; import org.mozilla.javascript.Context; import org.mozilla.javascript.EcmaError; import org.mozilla.javascript.Scriptable; import org.w3c.dom.Document; import org.w3c.dom.UserDataHandler; import org.w3c.dom.html2.HTMLScriptElement; public class HTMLScriptElementImpl extends HTMLElementImpl implements HTMLScriptElement { private static final Logger logger = Logger.getLogger(HTMLScriptElementImpl.class.getName()); private static final boolean loggableInfo = logger.isLoggable(Level.INFO); public HTMLScriptElementImpl() { super("SCRIPT", true); } public HTMLScriptElementImpl(String name) { super(name, true); } private String text; public String getText() { String t = this.text; if(t == null) { return this.getRawInnerText(true); } else { return t; } } public void setText(String text) { this.text = text; } public String getHtmlFor() { return this.getAttribute("htmlFor"); } public void setHtmlFor(String htmlFor) { this.setAttribute("htmlFor", htmlFor); } public String getEvent() { return this.getAttribute("event"); } public void setEvent(String event) { this.setAttribute("event", event); } private boolean defer; public boolean getDefer() { return this.defer; } public void setDefer(boolean defer) { this.defer = defer; } public String getSrc() { return this.getAttribute("src"); } public void setSrc(String src) { this.setAttribute("src", src); } public String getType() { return this.getAttribute("type"); } public void setType(String type) { this.setAttribute("type", type); } public Object setUserData(String key, Object data, UserDataHandler handler) { if(org.lobobrowser.html.parser.HtmlParser.MODIFYING_KEY.equals(key) && data != Boolean.TRUE) { this.processScript(); } return super.setUserData(key, data, handler); } protected final void processScript() { UserAgentContext bcontext = this.getUserAgentContext(); if(bcontext == null) { throw new IllegalStateException("No user agent context."); } if(bcontext.isScriptingEnabled()) { String text; final String scriptURI; int baseLineNumber; String src = this.getSrc(); Document doc = this.document; if(!(doc instanceof HTMLDocumentImpl)) { throw new IllegalStateException("no valid document"); } boolean liflag = loggableInfo; if(src == null) { text = this.getText(); scriptURI = doc.getBaseURI(); baseLineNumber = 1; //TODO: Line number of inner text?? } else { this.informExternalScriptLoading(); java.net.URL scriptURL = ((HTMLDocumentImpl) doc).getFullURL(src); scriptURI = scriptURL == null ? src : scriptURL.toExternalForm(); long time1 = liflag ? System.currentTimeMillis() : 0; try { final HttpRequest request = bcontext.createHttpRequest(); // Perform a synchronous request SecurityManager sm = System.getSecurityManager(); if(sm == null) { request.open("GET", scriptURI, false); } else { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { // Code might have restrictions on accessing // items from elsewhere. request.open("GET", scriptURI, false); return null; } }); } int status = request.getStatus(); if(status != 200 && status != 0) { this.warn("Script at [" + scriptURI + "] failed to load; HTTP status: " + status + "."); return; } text = request.getResponseText(); } finally { if(liflag) { long time2 = System.currentTimeMillis(); logger.info("processScript(): Loaded external Javascript from URI=[" + scriptURI + "] in " + (time2 - time1) + " ms."); } } baseLineNumber = 1; } Context ctx = Executor.createContext(this.getDocumentURL(), bcontext); try { Scriptable scope = (Scriptable) doc.getUserData(Executor.SCOPE_KEY); if(scope == null) { throw new IllegalStateException("Scriptable (scope) instance was expected to be keyed as UserData to document using " + Executor.SCOPE_KEY); } try { long time1 = liflag ? System.currentTimeMillis() : 0; ctx.evaluateString(scope, text, scriptURI, baseLineNumber, null); if(liflag) { long time2 = System.currentTimeMillis(); logger.info("addNotify(): Evaluated (or attempted to evaluate) Javascript in " + (time2 - time1) + " ms."); } } catch(EcmaError ecmaError) { this.warn("Javascript error at " + ecmaError.getSourceName() + ":" + ecmaError.getLineNumber() + ": " + ecmaError.getMessage()); } catch(Throwable err) { this.warn("Unable to evaluate Javascript code", err); } } finally { Context.exit(); } } } }
[ "jiangning.cui2@travelzen.com" ]
jiangning.cui2@travelzen.com
e6ee39c864805594b917b93c492be1807c0d189e
832a25d71428fcc97554ead3184c34c7668c13f6
/src/main/java/com/jeeplus/modules/report/ironfoinforexperiencereport/dao/IronfoinformationexperienceReportDao.java
ed3100ff5c74c4931210d1ea8f977ae4b8ab3571
[]
no_license
wxbing2015/jeeplusS
bb3b2bc7e475a7042c9a147952008ca93de59feb
faf39d547fad5fad9ff0e046fd9a657f2202a886
refs/heads/master
2020-07-19T11:44:35.847707
2018-05-02T11:59:39
2018-05-02T11:59:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
607
java
/** * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved. */ package com.jeeplus.modules.report.ironfoinforexperiencereport.dao; import com.jeeplus.common.persistence.CrudDao; import com.jeeplus.common.persistence.annotation.MyBatisDao; import com.jeeplus.modules.report.ironfoinforexperiencereport.entity.IronfoinformationexperienceReport; /** * 4.3信息化系统使用体验DAO接口 * @author anti_magina * @version 2018-04-20 */ @MyBatisDao public interface IronfoinformationexperienceReportDao extends CrudDao<IronfoinformationexperienceReport> { }
[ "anti_magina@yeah.net" ]
anti_magina@yeah.net
ba9854f8bd23e340a7577a8147da32fab435c302
5ecd15baa833422572480fad3946e0e16a389000
/framework/MCS-Open/subsystems/xdime/main/impl/java/com/volantis/mcs/xdime/widgets/BlockElement.java
2e84331b0d64c39b90b2c18d0c18ebe971b29c09
[]
no_license
jabley/volmobserverce
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
6d760f27ac5917533eca6708f389ed9347c7016d
refs/heads/master
2021-01-01T05:31:21.902535
2009-02-04T02:29:06
2009-02-04T02:29:06
38,675,289
0
1
null
null
null
null
UTF-8
Java
false
false
2,677
java
/* This file is part of Volantis Mobility Server. Volantis Mobility Server is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Volantis Mobility Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Volantis Mobility Server.  If not, see <http://www.gnu.org/licenses/>. */ /* ---------------------------------------------------------------------------- * (c) Volantis Systems Ltd 2006. * ---------------------------------------------------------------------------- */ package com.volantis.mcs.xdime.widgets; import com.volantis.mcs.protocols.widgets.attributes.BlockAttributes; import com.volantis.mcs.protocols.widgets.attributes.FetchAttributes; import com.volantis.mcs.protocols.widgets.attributes.LoadAttributes; import com.volantis.mcs.protocols.widgets.attributes.RefreshAttributes; import com.volantis.mcs.xdime.XDIMEAttributes; import com.volantis.mcs.xdime.XDIMEContextInternal; import com.volantis.mcs.xdime.XDIMEResult; /** * Presenter XDIME element. */ public class BlockElement extends WidgetElement implements Fetchable, Refreshable, Loadable { /** * Creates and initialises new instance of Container element. * @param context */ public BlockElement(XDIMEContextInternal context) { // Initialise superclass. super(WidgetElements.BLOCK, context); // Create an instance of Container attributes. // It'll be initialised later in initialiseAttributes() method. protocolAttributes = new BlockAttributes(); } // Javadoc inherited public void setFetchAttributes(FetchAttributes attrs) { getBlockAttributes().setFetchAttributes(attrs); } // Javadoc inherited public void setLoadAttributes(LoadAttributes attrs) { getBlockAttributes().setLoadAttributes(attrs); } // Javadoc inherited public void setRefreshAttributes(RefreshAttributes attrs) { getBlockAttributes().setRefreshAttributes(attrs); } public BlockAttributes getBlockAttributes() { return ((BlockAttributes) protocolAttributes); } // Javadoc inherited protected XDIMEResult doFallbackOpen(XDIMEContextInternal context, XDIMEAttributes attributes) { return XDIMEResult.SKIP_ELEMENT_BODY; } }
[ "iwilloug@b642a0b7-b348-0410-9912-e4a34d632523" ]
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
dcc0bc9ecd942e6723084af1a57c74180c4d2846
46ef867eb57c7b7f57b03c00bb16725b18ea8180
/27.06-configurando-resource-server-com-token-opaco/algafood-api/src/main/java/com/algaworks/algafood/api/v1/model/input/CidadeIdInput.java
7ace770c4c2fa7f41ecbb193a570292984ac5316
[]
no_license
johnyguido/curso-especialista-spring-rest
cb9d027b50f4982aab677876e09b07fedecd3c81
94e99c75e5a8475fee333798145113c5ecff41fe
refs/heads/master
2023-06-07T22:36:08.802975
2023-05-24T17:41:56
2023-05-24T17:41:56
399,998,423
0
0
null
null
null
null
UTF-8
Java
false
false
296
java
package com.algaworks.algafood.api.v1.model.input; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; import javax.validation.constraints.NotNull; @Setter @Getter public class CidadeIdInput { @Schema(example = "1") @NotNull private Long id; }
[ "alex.silva@algaworks.com.br" ]
alex.silva@algaworks.com.br
9a9cdc1fdef12e4d946d3c9bc7684b248bc4c7dd
47a1618c7f1e8e197d35746639e4480c6e37492e
/src/oracle/retail/stores/pos/device/cidscreens/CIDScreenSession.java
2395876869053c1bcc752fb9ee0a46390fa4fca1
[]
no_license
dharmendrams84/POSBaseCode
41f39039df6a882110adb26f1225218d5dcd8730
c588c0aa2a2144aa99fa2bbe1bca867e008f47ee
refs/heads/master
2020-12-31T07:42:29.748967
2017-03-29T08:12:34
2017-03-29T08:12:34
86,555,051
0
1
null
null
null
null
UTF-8
Java
false
false
6,015
java
/* =========================================================================== * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. * =========================================================================== * $Header: rgbustores/applications/pos/src/oracle/retail/stores/pos/device/cidscreens/CIDScreenSession.java /rgbustores_13.4x_generic_branch/1 2011/05/05 14:05:39 mszekely Exp $ * =========================================================================== * NOTES * <other useful comments, qualifications, etc.> * * MODIFIED (MM/DD/YY) * cgreene 05/26/10 - convert to oracle packaging * abondala 01/03/10 - update header date * * =========================================================================== * $Log: * 3 360Commerce 1.2 3/31/2005 4:27:27 PM Robert Pearse * 2 360Commerce 1.1 3/10/2005 10:20:16 AM Robert Pearse * 1 360Commerce 1.0 2/11/2005 12:10:00 PM Robert Pearse * * Revision 1.4 2004/04/08 20:33:03 cdb * @scr 4206 Cleaned up class headers for logs and revisions. * * * =========================================================================== */ package oracle.retail.stores.pos.device.cidscreens; import java.beans.PropertyChangeSupport; import oracle.retail.stores.foundation.manager.device.DeviceException; import oracle.retail.stores.foundation.manager.device.InputDeviceSession; import oracle.retail.stores.foundation.manager.ifc.device.DeviceModelIfc; import oracle.retail.stores.foundation.manager.ifc.device.DeviceSessionIfc; public class CIDScreenSession extends InputDeviceSession implements DeviceSessionIfc { DeviceModelIfc deviceModel = null; //--------------------------------------------------------------------- /** The property name for retreiving the Scanner Data **/ //--------------------------------------------------------------------- public static final String CIDSCREEN_DATA = "CIDScreen data"; /** * Constructor for CID screen session * */ public CIDScreenSession() { super(); propertyChange = new PropertyChangeSupport(this); } //--------------------------------------------------------------------- /** This method returns the device control, regardless of the current device mode. <P> <B>Pre-conditions</B> <UL> <LI>The DeviceSession is not in use. </UL> <B>Post-conditions</B> <UL> <LI>The DeviceSession is in use. </UL> @return Object The device control managed by this DeviceSession. @exception DeviceException is thrown if the device control is null; */ //--------------------------------------------------------------------- public Object getDevice() throws DeviceException { return null; } //--------------------------------------------------------------------- /** Activate the device controlled by this DeviceSession. Activate will enable the device and take exclusive access to the device. If exclusive access cannot be obtained, activate will throw a DeviceException. <P> Subclasses must provide an implementation of this method. <P> @param mode Access mode @exception DeviceException thrown if device cannot be activated **/ //--------------------------------------------------------------------- public void activate(String mode) throws DeviceException { } //--------------------------------------------------------------------- /** Deactivate the device controlled by this DeviceSession. This method will release exclusive access to the device. <P> Subclasses must implement this method <P> @exception DeviceException thrown if device cannot be deactivated **/ //--------------------------------------------------------------------- public void deactivate() throws DeviceException { } //--------------------------------------------------------------------- /** Forces the LineDisplay control to close. @exception DeviceException is thrown if the shutDown cannot be completed. **/ //--------------------------------------------------------------------- public void shutDown() throws DeviceException { } //--------------------------------------------------------------------- /** Get the Data model for the input device. @return DeviceModelIfc data Model for the CIDScreen @throws DeviceException if the mode is invalid or the mode cannot be set. */ //--------------------------------------------------------------------- public DeviceModelIfc getDeviceModel() throws DeviceException { return deviceModel; } //--------------------------------------------------------------------- /** Set the Data model for the input device. @param DeviceModelIfc data Model from the CIDScreen @throws DeviceException if the mode is invalid or the mode cannot be set. */ //--------------------------------------------------------------------- public void setDeviceModel(DeviceModelIfc deviceModel) throws DeviceException { this.deviceModel = deviceModel; propertyChange.firePropertyChange( CIDSCREEN_DATA, null, deviceModel); } //--------------------------------------------------------------------- /** Enables/disables the device and data event. @param enable true to enable, false to disable. @throws DeviceException if the device cannot be enabled/disabled. */ //--------------------------------------------------------------------- public void setEnabled(boolean enable) throws DeviceException { } }
[ "Ignitiv021@Ignitiv021-PC" ]
Ignitiv021@Ignitiv021-PC
1577ddc9ffef6aad2c59789f490f0b4aa5d50f10
7d28d457ababf1b982f32a66a8896b764efba1e8
/platform-dao/src/main/java/ua/com/fielden/platform/security/ServerAuthorisationModel.java
e68f628f0fd6fa63565c1949559d6c75017408fb
[ "MIT" ]
permissive
fieldenms/tg
f742f332343f29387e0cb7a667f6cf163d06d101
f145a85a05582b7f26cc52d531de9835f12a5e2d
refs/heads/develop
2023-08-31T16:10:16.475974
2023-08-30T08:23:18
2023-08-30T08:23:18
20,488,386
17
9
MIT
2023-09-14T17:07:35
2014-06-04T15:09:44
JavaScript
UTF-8
Java
false
false
1,458
java
package ua.com.fielden.platform.security; import static ua.com.fielden.platform.error.Result.failuref; import static ua.com.fielden.platform.error.Result.successful; import static ua.com.fielden.platform.security.SecurityTokenInfoUtils.shortDesc; import com.google.inject.Inject; import com.google.inject.Singleton; import ua.com.fielden.platform.error.Result; import ua.com.fielden.platform.security.provider.ISecurityTokenController; import ua.com.fielden.platform.security.user.IUserProvider; import ua.com.fielden.platform.security.user.User; /** * Server authorisation model, which controls access to methods with annotation {@link Authorise}. * * @author TG Team * */ @Singleton public class ServerAuthorisationModel extends AbstractAuthorisationModel { protected final ISecurityTokenController controller; private final IUserProvider userProvider; @Inject public ServerAuthorisationModel(final ISecurityTokenController controller, final IUserProvider userProvider) { this.controller = controller; this.userProvider = userProvider; } @Override public Result authorise(final Class<? extends ISecurityToken> token) { return User.system_users.VIRTUAL_USER.matches(userProvider.getUser()) || controller.canAccess(userProvider.getUser(), token) ? successful("Authorised") : failuref("Permission denied due to token [%s] restriction.", shortDesc(token)); } }
[ "oles.hodych@gmail.com" ]
oles.hodych@gmail.com
c87b3be6bc5c907df63fde5e5e4f817cf792f6e6
b3c827a95ee76392eff6ed764db6f17b43a26c7a
/src/pack2/Java4.java
08b5d25cd7147ee7e7e59dcf239d2684d4e7af4c
[]
no_license
amolujagare123/730March21Java
0a54cba8d8eb89a8a7a42a98d97fb0de662460f6
c24f182081aaf6a66b5fe59d7415f8b847ffaec9
refs/heads/master
2023-05-04T12:42:01.957191
2021-05-17T09:27:47
2021-05-17T09:27:47
349,124,915
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
package pack2; import StaticNFinal.StaticMethods; import static StaticNFinal.StaticMethods.myMethod2; import static StaticNFinal.StaticMethods.staticMethod2; //import static StaticNFinal.StaticMethods.*; public class Java4 { public int a4; public float f4; public char c4; public String str4; // data members public void display4() // member function { System.out.println("a="+a4); System.out.println("f="+f4); System.out.println("c="+c4); System.out.println("str="+str4); } public static void main(String[] args) { StaticMethods ob = new StaticMethods(); myMethod2(); // static method called using object myMethod2(); staticMethod2(); System.out.println(""); } }
[ "amolujagare@gmail.com" ]
amolujagare@gmail.com
68dc72a94779a0022a8ae58b594b95086994c8af
1fae3bf4c44168f7b52b9887be23594c6c0e8539
/src/main/java/com/github/lwhite1/tablesaw/splitting/dates/SplitUtils.java
aaf4cbe27144e479194b7b904a42512a2d12f437
[ "Apache-2.0" ]
permissive
lomuroe/tablesaw
ce5d0ea749b84fa6900676d889aa7a6e22f7ccd1
34dea1425e65b547934f61350252dac2d71fb7a8
refs/heads/master
2020-12-02T19:50:32.583785
2017-07-25T07:47:27
2017-07-25T07:47:27
96,398,001
1
0
null
2017-07-06T06:49:44
2017-07-06T06:49:44
null
UTF-8
Java
false
false
3,788
java
package com.github.lwhite1.tablesaw.splitting.dates; import com.github.lwhite1.tablesaw.columns.packeddata.PackedLocalDate; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.Month; import java.time.temporal.ChronoField; import java.util.function.Function; /** * */ public class SplitUtils { public static LocalDateSplitter byYear = PackedLocalDate::getYear; public static LocalDateSplitter byMonth = PackedLocalDate::getMonthValue; public static LocalDateSplitter byDayOfMonth = PackedLocalDate::getDayOfMonth; public static LocalDateSplitter byDayOfYear = PackedLocalDate::getDayOfYear; public static LocalDateSplitter byDayOfWeek = packedLocalDate -> PackedLocalDate.getDayOfWeek(packedLocalDate).getValue(); public static LocalDateSplitter byQuarter = PackedLocalDate::getQuarter; public static Function<Comparable, Object> byWeek = comparable -> { if (comparable instanceof LocalDate) { return ((LocalDate) comparable).get(ChronoField.ALIGNED_WEEK_OF_YEAR); } else if (comparable instanceof LocalDateTime) { return ((LocalDateTime) comparable).get(ChronoField.ALIGNED_WEEK_OF_YEAR); } else { throw new IllegalArgumentException("Date function called on non-date column"); } }; public static Function<Comparable, Object> byHour = comparable -> { if (comparable instanceof LocalDateTime) { return ((LocalDateTime) comparable).get(ChronoField.HOUR_OF_DAY); } else { throw new IllegalArgumentException("Time function called on non-time column"); } }; public static Function<Comparable, Object> bySecondOfMinute = comparable -> { if (comparable instanceof LocalDateTime) { return ((LocalDateTime) comparable).get(ChronoField.SECOND_OF_MINUTE); } else { throw new IllegalArgumentException("Time function called on non-time column"); } }; public static Function<Comparable, Object> bySecondOfDay = comparable -> { if (comparable instanceof LocalDateTime) { return ((LocalDateTime) comparable).get(ChronoField.SECOND_OF_DAY); } else { throw new IllegalArgumentException("Time function called on non-time column"); } }; public static Function<Comparable, Object> byMinuteOfHour = comparable -> { if (comparable instanceof LocalDateTime) { return ((LocalDateTime) comparable).get(ChronoField.MINUTE_OF_HOUR); } else { throw new IllegalArgumentException("Time function called on non-time column"); } }; public static Function<Comparable, Object> byMinuteOfDay = comparable -> { if (comparable instanceof LocalDateTime) { return ((LocalDateTime) comparable).get(ChronoField.MINUTE_OF_HOUR); } else { throw new IllegalArgumentException("Time function called on non-time column"); } }; private static int getQuarter(Month month) { int monthValue = month.getValue(); if (monthValue <= 3) { return 1; } else if (monthValue <= 6) { return 2; } else if (monthValue <= 9) { return 3; } else { return 4; } } /* BY_QUARTER_AND_YEAR, // 1974-Q1; 1974-Q2; etc. BY_MONTH_AND_YEAR, // 1974-01; 1974-02; 1974-03; etc. BY_WEEK_AND_YEAR, // 1956-51; 1956-52; BY_DAY_AND_YEAR, // 1990-364; 1990-365; BY_DAY_AND_MONTH, // 12-03 BY_DAY_AND_MONTH_AND_YEAR, // 2003-04-15 BY_DAY_AND_WEEK_AND_YEAR, // 1993-48-6 BY_DAY_AND_WEEK, // 52-1 to 52-7 BY_HOUR_AND_DAY, // BY_MINUTE_AND_HOUR, // 23-49 */ }
[ "ljw1001@gmail.com" ]
ljw1001@gmail.com
b1805683a0186e7f264373916d1b7ed0ebaff3fd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_ff27d7f5fb96adb3ee6adf0fbe34f8f2d1e6c848/RemoteController/2_ff27d7f5fb96adb3ee6adf0fbe34f8f2d1e6c848_RemoteController_s.java
c2ba68c4f04021d16f2aa42567ba28f5d834b9ff
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,643
java
package org.xbmc.android.remote.presentation.controller; import java.io.IOException; import org.xbmc.android.remote.business.ManagerFactory; import org.xbmc.api.business.IEventClientManager; import org.xbmc.api.presentation.INotifiableController; import org.xbmc.eventclient.ButtonCodes; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.media.AudioManager; import android.os.Vibrator; import android.preference.PreferenceManager; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.Button; public class RemoteController extends AbstractController implements INotifiableController, IController { IEventClientManager mEventClientManager; /** * timestamp since last trackball use. */ private long mTimestamp = 0; private final Vibrator mVibrator; private final boolean mDoVibrate; public RemoteController(Context context) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); mEventClientManager = ManagerFactory.getEventClientManager(this); mVibrator = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE); mDoVibrate = prefs.getBoolean("setting_vibrate_on_touch", true); } public boolean onKeyDown(int keyCode, KeyEvent event) { char key = (char)event.getUnicodeChar(); if (key > 'A' && key < 'z') return keyboardAction("" + key); try { switch (keyCode) { case KeyEvent.KEYCODE_VOLUME_UP: mEventClientManager.sendButton("R1", ButtonCodes.REMOTE_VOLUME_PLUS, false, true, true, (short)0, (byte)0); return true; case KeyEvent.KEYCODE_VOLUME_DOWN: mEventClientManager.sendButton("R1", ButtonCodes.REMOTE_VOLUME_MINUS, false, true, true, (short)0, (byte)0); return true; case KeyEvent.KEYCODE_DPAD_DOWN: mEventClientManager.sendButton("R1", ButtonCodes.REMOTE_DOWN, false, true, true, (short)0, (byte)0); return true; case KeyEvent.KEYCODE_DPAD_UP: mEventClientManager.sendButton("R1", ButtonCodes.REMOTE_UP, false, true, true, (short)0, (byte)0); return true; case KeyEvent.KEYCODE_DPAD_LEFT: mEventClientManager.sendButton("R1", ButtonCodes.REMOTE_LEFT, false, true, true, (short)0, (byte)0); return true; case KeyEvent.KEYCODE_DPAD_RIGHT: mEventClientManager.sendButton("R1", ButtonCodes.REMOTE_RIGHT, false, true, true, (short)0, (byte)0); return true; case KeyEvent.KEYCODE_DPAD_CENTER: mEventClientManager.sendButton("R1", ButtonCodes.REMOTE_ENTER, false, true, true, (short)0, (byte)0); return true; default: return false; } } catch (IOException e) { return false; } } public boolean onTrackballEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) return keyboardAction(ButtonCodes.KEYBOARD_ENTER); else{ // check when the last trackball move happened to avoid too speedy selections long newstamp = System.currentTimeMillis(); if (newstamp - mTimestamp > 300){ mTimestamp = newstamp; if (Math.abs(event.getX()) > 0.15f) { return keyboardAction(event.getX() < 0 ? ButtonCodes.KEYBOARD_LEFT : ButtonCodes.KEYBOARD_RIGHT); } else if (Math.abs(event.getY()) > 0.15f){ return keyboardAction(event.getY() < 0 ? ButtonCodes.KEYBOARD_UP : ButtonCodes.KEYBOARD_DOWN); } } } return false; } /** * Sends a keyboard event * @param button * @return */ private boolean keyboardAction(String button) { try { mEventClientManager.sendButton("KB", button, false, true, true, (short)0, (byte)0); return true; } catch (IOException e) { return false; } } /** * Shortcut for adding the listener class to the button * @param resourceButton Resource ID of the button * @param action Action string * @param resourceButtonUp Resource ID of the button up image * @param resourceButtonDown Resource ID of the button down image */ public void setupButton(View btn, String action) { if (btn != null) { btn.setOnTouchListener(new OnRemoteAction(action)); ((Button)btn).setSoundEffectsEnabled(true); ((Button)btn).setClickable(true); } } /** * Handles the push- release button code. Switches image of the pressed * button, vibrates and executes command. */ private class OnRemoteAction implements OnTouchListener { private final String mAction; public OnRemoteAction(String action) { mAction = action; } public boolean onTouch(View v, MotionEvent event) { try { if (event.getAction() == MotionEvent.ACTION_DOWN) { if (mDoVibrate) { mVibrator.vibrate(45); } mEventClientManager.sendButton("R1", mAction, true, true, true, (short)0, (byte)0); } else if (event.getAction() == MotionEvent.ACTION_UP) { v.playSoundEffect(AudioManager.FX_KEY_CLICK); mEventClientManager.sendButton("R1", mAction, false, false, true, (short)0, (byte)0); } } catch (IOException e) { return false; } return false; } } public void onActivityPause() { mEventClientManager.setController(null); super.onActivityPause(); } public void onActivityResume(Activity activity) { super.onActivityResume(activity); mEventClientManager.setController(this); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6f1292ac1b3cb0cd0b7c3a7d4a328ebb6af3c8a4
16be4b5d7b111dae18a4117b0dcf434cf44e4215
/src/main/java/q700/Q679_24Game.java
9fa3bf4949574084d66a3be7527059b64ad0da80
[ "MIT" ]
permissive
sunxuia/leetcode-solution-java
a3d8d680fabc014216ef9837d119b02acde923b5
2794f83c9e80574f051c00b8a24c6a307bccb6c5
refs/heads/master
2022-11-12T13:31:04.464274
2022-11-09T14:20:28
2022-11-09T14:20:28
219,247,361
1
0
MIT
2020-10-26T10:55:12
2019-11-03T03:43:25
Java
UTF-8
Java
false
false
3,037
java
package q700; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * https://leetcode.com/problems/24-game/ * * You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operated through *, * /, +, -, (, ) to get the value of 24. * * Example 1: * * Input: [4, 1, 8, 7] * Output: True * Explanation: (8-4) * (7-1) = 24 * * Example 2: * * Input: [1, 2, 1, 2] * Output: False * * Note: * * 1. The division operator / represents real division, not integer division. For example, 4 / (1 - 2/3) = 12. * 2. Every operation done is between two numbers. In particular, we cannot use - as a unary operator. For example, * with [1, 1, 1, 1] as input, the expression -1 - 1 - 1 - 1 is not allowed. * 3. You cannot concatenate numbers together. For example, if the input is [1, 2, 1, 2], we cannot write this as 12 * + 12. */ @RunWith(LeetCodeRunner.class) public class Q679_24Game { /** * 没想出什么特别好的方法, LeetCode 中比较快的解法如下, 也是一般的回溯. * Solution 中的解法与之思路一致. */ @Answer public boolean judgePoint24(int[] nums) { double[] doubleNums = new double[nums.length]; for (int i = 0; i < doubleNums.length; i++) { doubleNums[i] = nums[i]; } return dfs(doubleNums, nums.length); } private boolean dfs(double[] nums, int n) { if (n == 1 && Math.abs(nums[0] - 24) <= 1e-6) { return true; } for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { double a = nums[i]; double b = nums[j]; nums[j] = nums[n - 1]; nums[i] = a + b; if (dfs(nums, n - 1)) { return true; } nums[i] = a - b; if (dfs(nums, n - 1)) { return true; } nums[i] = a * b; if (dfs(nums, n - 1)) { return true; } nums[i] = b - a; if (dfs(nums, n - 1)) { return true; } if (a != 0) { nums[i] = b / a; if (dfs(nums, n - 1)) { return true; } } if (b != 0) { nums[i] = a / b; if (dfs(nums, n - 1)) { return true; } } nums[i] = a; nums[j] = b; } } return false; } @TestData public DataExpectation example1 = DataExpectation.create(new int[]{4, 1, 8, 7}).expect(true); @TestData public DataExpectation example2 = DataExpectation.create(new int[]{1, 2, 1, 2}).expect(false); }
[ "ntsunxu@163.com" ]
ntsunxu@163.com
69f9a3cf9030191f13b5abfff200d8eb01892438
260ffca605956d7cb9490a8c33e2fe856e5c97bf
/src/com/google/android/gms/games/stats/Stats$LoadPlayerStatsResult.java
f6235a277d695e89380e9b1d0a0445456b08043f
[]
no_license
yazid2016/com.incorporateapps.fakegps.fre
cf7f1802fcc6608ff9a1b82b73a17675d8068beb
44856c804cea36982fcc61d039a46761a8103787
refs/heads/master
2021-06-02T23:32:09.654199
2016-07-21T03:28:48
2016-07-21T03:28:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package com.google.android.gms.games.stats; import com.google.android.gms.common.api.Releasable; import com.google.android.gms.common.api.Result; public abstract interface Stats$LoadPlayerStatsResult extends Releasable, Result { public abstract PlayerStats getPlayerStats(); } /* Location: * Qualified Name: com.google.android.gms.games.stats.Stats.LoadPlayerStatsResult * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
53a8c2654fcddd1f9e8cd851954f68e524be0d89
cccf7cb89067d0652977be9d0bccc7a3138ebdeb
/exception_no_stack/src/main/java/javax0/blog/demo/throwable/v2/FileNumberedLineEmpty.java
3a4e354d7c3569d57a64e93ef9e8ca132a807c65
[ "Apache-2.0" ]
permissive
verhas/BLOG
ee55f98378c066e5bd7bd88e63042d6ad8a1dcaf
653bb9a39f93400445c83b1b07b448e063dce85d
refs/heads/master
2022-10-10T11:45:44.236508
2020-06-08T11:01:29
2020-06-08T11:01:29
260,171,726
2
3
Apache-2.0
2020-05-17T15:02:21
2020-04-30T09:42:27
Java
UTF-8
Java
false
false
455
java
// snippet FileNumberedLineEmpty_v2 package javax0.blog.demo.throwable.v2; public class FileNumberedLineEmpty extends NumberedLineEmpty { final protected String fileName; public FileNumberedLineEmpty(String fileName, NumberedLineEmpty cause) { super(cause.lineNr, cause); this.fileName = fileName; } @Override public String getMessage() { return fileName + ":" + lineNr + " is empty"; } } // end snippet
[ "peter@verhas.com" ]
peter@verhas.com
0e2e8447444406985f8200146d0bd9fb3b6f2406
80ce33fc67f7b5332afe65d07209d3b12e7fe3f0
/wkj-monitor/src/test/java/com/cpucode/InfluxTest.java
953ddb34f4d05b815f913cda22a6b5bc408f3575
[]
no_license
CPU-Code/monitor
7394f3f098e273b24d6a99c7c8a074841e197b53
21c94ea8315cd536c0da5455487c7fb909bb2362
refs/heads/main
2023-08-23T05:27:51.638467
2021-10-11T02:13:17
2021-10-11T02:13:17
412,294,771
1
0
null
null
null
null
UTF-8
Java
false
false
1,287
java
package com.cpucode; import com.cpucode.monitor.MonitorApplication; import com.cpucode.monitor.dto.QuotaInfo; import com.cpucode.monitor.influx.InfluxRepository; 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; /** * @author : cpucode * @date : 2021/10/3 16:55 * @github : https://github.com/CPU-Code * @csdn : https://blog.csdn.net/qq_44226094 */ @SpringBootTest(classes = MonitorApplication.class) @RunWith(SpringRunner.class) public class InfluxTest { @Autowired private InfluxRepository influxRepository; @Test public void testAdd(){ QuotaInfo quotaInfo = new QuotaInfo(); quotaInfo.setDeviceId("xxxxx"); quotaInfo.setQuotaId("1"); quotaInfo.setQuotaName("ddd"); quotaInfo.setReferenceValue("0-10"); quotaInfo.setUnit("摄氏度"); quotaInfo.setAlarm("1"); quotaInfo.setFloatValue(11.44f); quotaInfo.setDoubleValue(11.44D); quotaInfo.setIntegerValue(43); quotaInfo.setBoolValue(false); quotaInfo.setStringValue("fdsd"); influxRepository.add(quotaInfo); } }
[ "923992029@qq.com" ]
923992029@qq.com
7f41ef56950d40a2b0e94f11af29903f1decaa1e
8630a7dcbbad52cc4bc1a5e2e8771b80f698efdd
/packages/apps/EngineerMode/src/com/mediatek/engineermode/swla/SwlaActivity.java
a9f6511f199d22b845466d2ebb252ae5ea81baa2
[ "Apache-2.0" ]
permissive
ferhung/android_mediatek_lenovo
c1405092e32fce6577dbea2579bccba596f0af85
52c949c07ef2936ea24ec7f01eb0bcdd593d9ec3
refs/heads/cm-11.0
2021-01-22T12:44:26.346450
2014-09-22T03:41:53
2014-09-22T03:41:53
38,955,719
0
2
null
2015-07-12T08:53:44
2015-07-12T08:53:44
null
UTF-8
Java
false
false
5,562
java
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ package com.mediatek.engineermode.swla; import android.app.Activity; import android.app.AlertDialog; import android.os.AsyncResult; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.View; import android.widget.Button; import android.widget.Toast; import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneFactory; import com.mediatek.engineermode.Elog; import com.mediatek.engineermode.R; public class SwlaActivity extends Activity { private Phone mPhone = null; private static final int MSG_ASSERT = 1; private static final int MSG_SWLA_ENABLE = 2; private static final String TAG = "SWLA"; private final Handler mATCmdHander = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); AsyncResult ar; switch (msg.what) { case MSG_ASSERT: ar = (AsyncResult) msg.obj; if (ar.exception == null) { Toast.makeText(SwlaActivity.this, "Assert Modem Success.", Toast.LENGTH_LONG).show(); } else { new AlertDialog.Builder(SwlaActivity.this).setTitle("Failed").setMessage("Assert Modem Failed.") .setPositiveButton("OK", null).show(); Toast.makeText(SwlaActivity.this, "Failed.", Toast.LENGTH_LONG).show(); } break; case MSG_SWLA_ENABLE: ar = (AsyncResult) msg.obj; if (ar.exception == null) { Toast.makeText(SwlaActivity.this, "Success", Toast.LENGTH_LONG).show(); } else { new AlertDialog.Builder(SwlaActivity.this).setTitle("Failed").setMessage("Enable Softwore LA Failed.") .setPositiveButton("OK", null).show(); Toast.makeText(SwlaActivity.this, "Failed.", Toast.LENGTH_LONG).show(); } break; default: break; } } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.swla_activity); Button mAssert = (Button) findViewById(R.id.swla_assert_btn); Button mSwla = (Button) findViewById(R.id.swla_swla_btn); mAssert.setOnClickListener(new ButtonListener()); mSwla.setOnClickListener(new ButtonListener()); mPhone = PhoneFactory.getDefaultPhone(); } class ButtonListener implements View.OnClickListener { public void onClick(View v) { switch (v.getId()) { case R.id.swla_assert_btn: sendATCommad("0", MSG_ASSERT); break; case R.id.swla_swla_btn: sendATCommad("1", MSG_SWLA_ENABLE); break; default: break; } } }; private void sendATCommad(String str, int message) { String aTCmd[] = new String[2]; aTCmd[0] = "AT+ESWLA=" + str; aTCmd[1] = ""; mPhone.invokeOemRilRequestStrings(aTCmd, mATCmdHander.obtainMessage(message)); Elog.i(TAG, "Send ATCmd : " + aTCmd[0]); } }
[ "idontknw.wang@gmail.com" ]
idontknw.wang@gmail.com
8b7781cd54237db28239c446a87c1444b00e2237
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_07fa796cfe7c9a2a48d1592a30d3ba09c5c05c49/WifiChange/5_07fa796cfe7c9a2a48d1592a30d3ba09c5c05c49_WifiChange_s.java
fbdad29f86eb957e22a73c8f42272886154b8079
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,916
java
package com.gingbear.githubtest; import android.app.Activity; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiManager; public class WifiChange { static public String check(Intent intent){ String action = intent.getAction(); // BroadcastReceiver が Wifi の ON/OFF を検知して起動されたら if(action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)){ // WifiManager wifi = (WifiManager)getSystemService(WIFI_SERVICE); // // Wifi が ON になったら OFF // wifi.setWifiEnabled(false); // 任意のタイミングで ON/OFF の状態を取得したい場合 wifi.isWifiEnabled(); で取得する // Wifi の状態を取得 switch (intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_UNKNOWN)){ case WifiManager.WIFI_STATE_DISABLING: return "0:WIFI_STATE_DISABLING"; case WifiManager.WIFI_STATE_DISABLED: return "1:WIFI_STATE_DISABLED"; case WifiManager.WIFI_STATE_ENABLING: return "3:WIFI_STATE_ENABLING"; case WifiManager.WIFI_STATE_ENABLED: return "4:WIFI_STATE_ENABLED"; case WifiManager.WIFI_STATE_UNKNOWN: return "5:WIFI_STATE_UNKNOWN"; default: return "wifi error"; } } return "non"; } static public String change(Activity activity){ Intent intent = activity.getIntent(); String action = intent.getAction(); // BroadcastReceiver がネットワークへの接続を検知して起動されたら if(action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)){ ConnectivityManager cm = (ConnectivityManager)activity.getSystemService(Activity.CONNECTIVITY_SERVICE); NetworkInfo ni = cm.getActiveNetworkInfo(); if((ni!=null) && (ni.isConnected() && (ni.getType() == ConnectivityManager.TYPE_WIFI))){ switch (ni.getType() ){ case ConnectivityManager.TYPE_WIFI: return "1:TYPE_WIFI"; case ConnectivityManager.TYPE_MOBILE: return "0:TYPE_MOBILE"; case ConnectivityManager.TYPE_MOBILE_DUN: return "4:TYPE_MOBILE_DUN"; case ConnectivityManager.TYPE_MOBILE_HIPRI: return "5:TYPE_MOBILE_HIPRI"; case ConnectivityManager.TYPE_MOBILE_MMS: return "2:TYPE_MOBILE_MMS"; case ConnectivityManager.TYPE_MOBILE_SUPL: return "3:TYPE_MOBILE_SUPL"; case ConnectivityManager.TYPE_WIMAX: return "6:TYPE_WIMAX"; default: return "connect error"; } // Wifi に接続中!TYPE_MOBILE だったらモバイルネットワークに接続中ということになる }else{ // WifiManager wifi = (WifiManager)getSystemService(WIFI_SERVICE); // // Wifi に接続してなかったら Wifi を OFF // wifi.setWifiEnabled(false); return "not connect"; } } return "non"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7bb957fdd883563dd5ecbe6ff5cfcc9a705cb16e
d5c9a228d3ddecf3b009eb31debf8310ae850a11
/sdkDemo/src/main/java/com/m7/imkfsdk/chat/chatrow/BreakTipChatRow.java
3222dbb9b3ad776d9c56c1d4425f78024f14826c
[]
no_license
DevelopWb/ghsHome
732c0bc0cecb5e51e8778d6254281a12339a22df
076b6ccf35f6c5810e5339eae5887d4519f03636
refs/heads/master
2020-07-30T17:20:17.879585
2019-09-23T08:35:37
2019-09-23T08:35:37
210,285,009
0
0
null
null
null
null
UTF-8
Java
false
false
1,570
java
package com.m7.imkfsdk.chat.chatrow; import android.content.Context; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.View; import com.m7.imkfsdk.R; import com.m7.imkfsdk.chat.holder.BaseHolder; import com.m7.imkfsdk.chat.holder.BreakTipHolder; import com.moor.imkf.model.entity.FromToMessage; import com.moor.imkf.utils.NullUtil; /** * Created by longwei on 2017/12/11. */ public class BreakTipChatRow extends BaseChatRow{ public BreakTipChatRow(int type) { super(type); } @Override public View buildChatView(LayoutInflater inflater, View convertView) { if(convertView == null) { convertView = inflater.inflate(R.layout.kf_chat_row_break_tip_rx, null); BreakTipHolder holder = new BreakTipHolder(mRowType); convertView.setTag(holder.initBaseHolder(convertView, false)); } return convertView; } @Override public int getChatViewType() { return ChatRowType.BREAK_TIP_ROW_RECEIVED.ordinal(); } @Override public boolean onCreateRowContextMenu(ContextMenu contextMenu, View targetView, FromToMessage detail) { return false; } @Override protected void buildChattingData(Context context, BaseHolder baseHolder, FromToMessage detail, int position) { BreakTipHolder holder = (BreakTipHolder) baseHolder; final FromToMessage message = detail; if (message != null) { holder.getDescTextView().setText(NullUtil.checkNull(message.message)); } } }
[ "three6one@163.com" ]
three6one@163.com
0b63efe0ea61b3f7d81cb3456faebd52c35d1447
d1f95baefdbe6393467767788fb9e710a13f4869
/src/test/java/com/alibaba/druid/bvt/pool/vendor/MySqlExceptionSorterTest_oceanbase.java
04bd235ed33c5c15b2019cf7b1ac26571be8937d
[]
no_license
jilen/druid
19cec538ba655ddde455ad7e63af45fad3ff94df
0da4c693d3e1aa3d5506089887ee013964cce0bf
refs/heads/master
2021-01-18T18:55:57.735649
2013-06-27T07:03:41
2013-06-27T07:03:41
11,017,656
9
0
null
null
null
null
UTF-8
Java
false
false
1,106
java
package com.alibaba.druid.bvt.pool.vendor; import java.sql.SQLException; import junit.framework.TestCase; import org.junit.Assert; import com.alibaba.druid.pool.vendor.MySqlExceptionSorter; public class MySqlExceptionSorterTest_oceanbase extends TestCase { public void test_true() throws Exception { MySqlExceptionSorter sorter = new MySqlExceptionSorter(); Assert.assertTrue(sorter.isExceptionFatal(new SQLException("", "", -9000))); } public void test_true_1() throws Exception { MySqlExceptionSorter sorter = new MySqlExceptionSorter(); Assert.assertTrue(sorter.isExceptionFatal(new SQLException("", "", -10000))); } public void test_false() throws Exception { MySqlExceptionSorter sorter = new MySqlExceptionSorter(); Assert.assertFalse(sorter.isExceptionFatal(new SQLException("", "", -10001))); } public void test_false_1() throws Exception { MySqlExceptionSorter sorter = new MySqlExceptionSorter(); Assert.assertFalse(sorter.isExceptionFatal(new SQLException("", "", -8000))); } }
[ "szujobs@hotmail.com" ]
szujobs@hotmail.com
6af4fc6f487834e65a532199a930a39b9bb370df
e368d9adb1fe3b2d6e20c31835ff4abeea77e4ee
/workspace_1/Code_CTDL/src/lab1_mang_mot_chieu/Bai3.java
46e5c48d33fcd5b71b011eb072ea541b9b180042
[]
no_license
thanghoang07/java
29edf868f79318672707be626d9105935fd83478
41d62d5e9f206f0459b9c3d42a8581fc5395b223
refs/heads/master
2020-05-07T13:45:13.479039
2019-04-10T09:59:34
2019-04-10T09:59:34
180,541,189
2
0
null
null
null
null
UTF-8
Java
false
false
1,885
java
/* Viết chương trình đ�?c vào n số nguyên * (giá trị của các phần tử random từ 0 tới n), * dừng lại khi nhập 0. * Sau đó đếm số lần xuất hiện của từng số nguyên */ package lab1_mang_mot_chieu; import java.util.Scanner; public class Bai3 { static int n; static int i; static int j; private static Scanner nhapVao; public static int[] taoMang(int n) { nhapVao = new Scanner(System.in); int[] mang = new int[n]; for (int i = 0; i < n; i++) { System.out.print("Nhap phan tu thu " + i + ": \t"); mang[i] = nhapVao.nextInt(); if (mang[i] == 0) break; } return mang; } public static void inMang(int[] mang) { System.out.print("mang dung lai khi gap so khong: \n"); for (i = 0; i < mang.length; i++) if (mang[i] != 0) { System.out.print("|" + mang[i] + "|"); } else System.out.print(""); } public static void lietKe2(int[] mang, int n) { for (int i = 0; i < n; i++) { int dem = 0; for (int j = 0; j < n; j++) { if (mang[i] == mang[j]) dem++; } if (mang[i] != 0) System.out.print("\n" + mang[i] + ": " + dem); } } public static void lietKe(int[] mang) { int dem = 0; for (int i = 0; i < mang.length; i++) { if (mang[i] != 0) { dem = 0; for (int j = 0; j < mang.length; j++) { if (mang[i] == mang[j]) { if (i <= j) { dem++; } else { break; } } } if (dem != 0) { System.out.printf("\n%d xuat hien %d lan", mang[i], dem); } } else { System.out.print(""); } } } public static void main(String[] args) { nhapVao = new Scanner(System.in); System.out.print("Nhap so phan tu: "); int n = nhapVao.nextInt(); int[] mang = new int[n]; mang = taoMang(n); inMang(mang); System.out.println(); lietKe2(mang, n); System.out.println(); lietKe(mang); } }
[ "thanghoang07@outlook.com" ]
thanghoang07@outlook.com
d791b58b1f7b0fd83b0c276f84f8237be9f775ec
6f28ba66909fa293d9058eb033e1694b4ec97eb0
/smartenv-statistic/smartenv-statistics-api/src/main/java/com/ai/apac/smartenv/statistics/vo/VehicleDistanceInfoVO.java
416e0cac36354910f28e5b25ce45b1a1208b8b06
[]
no_license
fangxunqing/smart-env
01870c01ceb8141787652585b7bf3738a3498641
99665cb17c8f7b96f1f6d29223d26a08b5b05d8a
refs/heads/main
2023-04-26T17:55:03.072112
2021-05-25T03:29:15
2021-05-25T03:29:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
package com.ai.apac.smartenv.statistics.vo; import com.ai.apac.smartenv.statistics.entity.RptVehicleStay; import com.ai.apac.smartenv.statistics.entity.VehicleDistanceInfo; import io.swagger.annotations.ApiModel; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) @ApiModel(value = "VehicleDistanceInfoVO对象", description = "VehicleDistanceInfo视图对象") public class VehicleDistanceInfoVO extends VehicleDistanceInfo { private static final long serialVersionUID = 1L; }
[ "15251810316@163.com" ]
15251810316@163.com
6dbeee5720ffccb3d6c4464d6c585a9c7323e2d7
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p046io/reactivex/observers/SafeObserver.java
386ac9b3b8b18b4301898f8d0c1e26bb8e5502eb
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,467
java
package p046io.reactivex.observers; import p046io.reactivex.Observer; import p046io.reactivex.disposables.Disposable; import p046io.reactivex.exceptions.CompositeException; import p046io.reactivex.exceptions.Exceptions; import p046io.reactivex.internal.disposables.DisposableHelper; import p046io.reactivex.internal.disposables.EmptyDisposable; import p046io.reactivex.plugins.RxJavaPlugins; /* renamed from: io.reactivex.observers.SafeObserver */ public final class SafeObserver<T> implements Observer<T>, Disposable { final Observer<? super T> actual; boolean done; /* renamed from: s */ Disposable f6162s; public SafeObserver(Observer<? super T> observer) { this.actual = observer; } public void onSubscribe(Disposable disposable) { if (DisposableHelper.validate(this.f6162s, disposable)) { this.f6162s = disposable; try { this.actual.onSubscribe(this); } catch (Throwable th) { Exceptions.throwIfFatal(th); RxJavaPlugins.onError(new CompositeException(th, th)); } } } public void dispose() { this.f6162s.dispose(); } public boolean isDisposed() { return this.f6162s.isDisposed(); } public void onNext(T t) { if (!this.done) { if (this.f6162s == null) { onNextNoSubscription(); } else if (t == null) { NullPointerException nullPointerException = new NullPointerException("onNext called with null. Null values are generally not allowed in 2.x operators and sources."); try { this.f6162s.dispose(); onError(nullPointerException); } catch (Throwable th) { Exceptions.throwIfFatal(th); onError(new CompositeException(nullPointerException, th)); } } else { try { this.actual.onNext(t); } catch (Throwable th2) { Exceptions.throwIfFatal(th2); onError(new CompositeException(th, th2)); } } } } /* access modifiers changed from: package-private */ public void onNextNoSubscription() { this.done = true; NullPointerException nullPointerException = new NullPointerException("Subscription not set!"); try { this.actual.onSubscribe(EmptyDisposable.INSTANCE); try { this.actual.onError(nullPointerException); } catch (Throwable th) { Exceptions.throwIfFatal(th); RxJavaPlugins.onError(new CompositeException(nullPointerException, th)); } } catch (Throwable th2) { Exceptions.throwIfFatal(th2); RxJavaPlugins.onError(new CompositeException(nullPointerException, th2)); } } public void onError(Throwable th) { if (this.done) { RxJavaPlugins.onError(th); return; } this.done = true; if (this.f6162s == null) { NullPointerException nullPointerException = new NullPointerException("Subscription not set!"); try { this.actual.onSubscribe(EmptyDisposable.INSTANCE); try { this.actual.onError(new CompositeException(th, nullPointerException)); } catch (Throwable th2) { Exceptions.throwIfFatal(th2); RxJavaPlugins.onError(new CompositeException(th, nullPointerException, th2)); } } catch (Throwable th3) { Exceptions.throwIfFatal(th3); RxJavaPlugins.onError(new CompositeException(th, nullPointerException, th3)); } } else { if (th == null) { th = new NullPointerException("onError called with null. Null values are generally not allowed in 2.x operators and sources."); } try { this.actual.onError(th); } catch (Throwable th4) { Exceptions.throwIfFatal(th4); RxJavaPlugins.onError(new CompositeException(th, th4)); } } } public void onComplete() { if (!this.done) { this.done = true; if (this.f6162s == null) { onCompleteNoSubscription(); return; } try { this.actual.onComplete(); } catch (Throwable th) { Exceptions.throwIfFatal(th); RxJavaPlugins.onError(th); } } } /* access modifiers changed from: package-private */ public void onCompleteNoSubscription() { NullPointerException nullPointerException = new NullPointerException("Subscription not set!"); try { this.actual.onSubscribe(EmptyDisposable.INSTANCE); try { this.actual.onError(nullPointerException); } catch (Throwable th) { Exceptions.throwIfFatal(th); RxJavaPlugins.onError(new CompositeException(nullPointerException, th)); } } catch (Throwable th2) { Exceptions.throwIfFatal(th2); RxJavaPlugins.onError(new CompositeException(nullPointerException, th2)); } } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
98e025c957d0a8a3cbc2e7e85c8dd250da54c3d5
33874d398ae0e65875e5ed365af44acf5944bcc3
/src/main/java/com/isis/util/xero/OrganisationRole.java
6e2bb1edb2df8ee7dd2ade6d79d80509576dd37b
[]
no_license
yorktips/XeroApiPrivateApp
ea6a5f5db112969b8d54d15cc75037c2679f4ff9
f754a948fdd5d5b3a338a0f3adbe0c301a45ca37
refs/heads/master
2020-05-29T09:15:23.028113
2016-11-01T03:42:49
2016-11-01T03:42:49
69,526,820
0
0
null
null
null
null
UTF-8
Java
false
false
1,652
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // 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: 2016.09.28 at 10:40:40 PM EDT // package com.isis.util.xero; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for organisationRole. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="organisationRole"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token"> * &lt;enumeration value="FINANCIALADVISER"/> * &lt;enumeration value="STANDARD"/> * &lt;enumeration value="INVOICEONLY"/> * &lt;enumeration value="READONLY"/> * &lt;enumeration value="UNKNOWN"/> * &lt;enumeration value="MANAGEDCLIENT"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "organisationRole") @XmlEnum public enum OrganisationRole { /** * Financial Advisor * */ FINANCIALADVISER, /** * Standard * */ STANDARD, /** * Invoice Only * */ INVOICEONLY, /** * Read Only * */ READONLY, /** * Unknown Role * */ UNKNOWN, /** * Managed Client Role * */ MANAGEDCLIENT; public String value() { return name(); } public static OrganisationRole fromValue(String v) { return valueOf(v); } }
[ "york.tips@gmail.com" ]
york.tips@gmail.com
52bbc2f608ec7ef72033f14d4e149d2de2ee23ae
dc4d87acdcfa768867d2eb8f3a44bc8c39f8d699
/src/main/java/org/greencheek/processio/domain/jmx/ProcessIOUsageHolder.java
f141d094fe4d0bce748f62e4bef2ed0a59f7e8fb
[ "Apache-2.0" ]
permissive
tootedom/linux-jvm-processio
ce066a1cad999aaf942a2eefdab918f5b0a4854a
5bb1821a1c162ee46ef55121473ccfaf05400678
refs/heads/master
2021-01-18T13:58:48.056613
2012-05-03T06:23:45
2012-05-03T06:23:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,707
java
/* * Copyright 2012 dominictootell * * 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.greencheek.processio.domain.jmx; import org.greencheek.processio.domain.CurrentProcessIO; import org.greencheek.processio.domain.ProcessIO; import org.greencheek.processio.service.usage.BasicProcessIOUsage; import org.greencheek.processio.service.usage.ProcessIOUsage; import java.util.concurrent.atomic.AtomicReference; /** * <p> * MXBean object that holds the amount of io that the process has done; * for easy registration in jmx. * </p> * <p> * This MX object holds the time that the first IO process information was read, * and a ProcessIO object that stores the current and previously recorded IO Usage * </p> * <p> * A ProcessIOUsage object is used to provide perform calculations on the ProcessIO object * in order to produce information such as the amount of IO done between two sample periods * or since the created on this holder object. * </p> * <p> * This implementation is used as a mechanism to obtain the ProcessIO object from the MBeanServer * in an atomic unit, so that obtaining the amount of read io performed by the jvm can be obtain from * the MBeanServer in the same atomic unit as when the amount of write i/o is read. * </p> * <p> * User: dominictootell * Date: 22/04/2012 * Time: 15:54 * </p> */ public class ProcessIOUsageHolder implements ProcessIOUsageMXBean { // Used to indicate the start of the jvm private final long startMillis; // Stores a reference to the service object that is used to perform // calculations based on the values stored in the ProcessIO object. private final ProcessIOUsage usage; // The reference to the ProcessIO object, that is updated periodically with new // values from the currently read/sampled read/write io for the process. private final AtomicReference<ProcessIO> processIORef = new AtomicReference<ProcessIO>(); public ProcessIOUsageHolder() { this(System.currentTimeMillis(),new BasicProcessIOUsage()); } public ProcessIOUsageHolder(ProcessIOUsage usage) { this(System.currentTimeMillis(), usage); } public ProcessIOUsageHolder(long initialisationMillis,ProcessIOUsage usage) { this.usage = usage; processIORef.set(new ProcessIO()); this.startMillis = initialisationMillis; } @Override public ProcessIO getProcessIO() { return processIORef.get(); } @Override public double getSampleTimeKbPerSecondReadIO() { return usage.getSampleTimeKbPerSecondReadIO(getProcessIO()); } @Override public double getSampleTimeKbPerSecondWriteIO() { return usage.getSampleTimeKbPerSecondWriteIO(getProcessIO()); } @Override public double getSampleTimeMbPerSecondReadIO() { return usage.getSampleTimeMbPerSecondReadIO(getProcessIO()); } @Override public double getSampleTimeMbPerSecondWriteIO() { return usage.getSampleTimeMbPerSecondWriteIO(getProcessIO()); } @Override public double getAccumulatedKbPerSecondReadIO() { return usage.getAccumulatedKbPerSecondReadIO(startMillis, getProcessIO()); } @Override public double getAccumulatedKbPerSecondWriteIO() { return usage.getAccumulatedKbPerSecondWriteIO(startMillis, getProcessIO()); } @Override public double getAccumulatedMbPerSecondReadIO() { return usage.getAccumulatedMbPerSecondReadIO(startMillis, getProcessIO()); } @Override public double getAccumulatedMbPerSecondWriteIO() { return usage.getAccumulatedMbPerSecondWriteIO(startMillis, getProcessIO()); } /** * Updates the ProcessIO object reference to contain a new reference to a ProcessIO object * that has been populated with new read and write io information from the given CurrentProcessIO object. * * @param io The current amount of io that has been obtained for the process. */ public void setProcessIO(CurrentProcessIO io) { ProcessIO previousIO = getProcessIO(); ProcessIO updatedIO = previousIO.updateCurrentValues(io); processIORef.set(updatedIO); } }
[ "dominic.tootell@gmail.com" ]
dominic.tootell@gmail.com
10f018a76c13658de110602cb3aeee71d13ae247
1f2a383d2cd7b49d46852a050a226b9669961204
/registry-spring-boot-ws/src/main/java/org/gbif/registry/ws/config/WebMvcConfig.java
d0d5b6d8e3ceb413111495bb147c70ae4ba9e387
[ "Apache-2.0" ]
permissive
gbif/registry-spring-boot
11600029a8832d3a8111024f1637a4b71e64f49f
ea1c70295632bf4febe2b85577f04433f6ba115e
refs/heads/master
2020-06-13T14:26:16.170982
2020-03-13T13:49:21
2020-03-13T13:49:21
194,686,709
0
0
Apache-2.0
2020-01-10T13:42:22
2019-07-01T14:17:48
Java
UTF-8
Java
false
false
7,608
java
/* * Copyright 2020 Global Biodiversity Information Facility (GBIF) * * 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.gbif.registry.ws.config; import org.gbif.api.ws.mixin.Mixins; import org.gbif.registry.domain.ws.ErrorResponse; import org.gbif.registry.domain.ws.IptEntityResponse; import org.gbif.registry.domain.ws.LegacyDataset; import org.gbif.registry.domain.ws.LegacyDatasetResponse; import org.gbif.registry.domain.ws.LegacyDatasetResponseListWrapper; import org.gbif.registry.domain.ws.LegacyEndpoint; import org.gbif.registry.domain.ws.LegacyEndpointResponse; import org.gbif.registry.domain.ws.LegacyEndpointResponseListWrapper; import org.gbif.registry.domain.ws.LegacyInstallation; import org.gbif.registry.domain.ws.LegacyOrganizationBriefResponse; import org.gbif.registry.domain.ws.LegacyOrganizationBriefResponseListWrapper; import org.gbif.registry.domain.ws.LegacyOrganizationResponse; import org.gbif.registry.ws.converter.UuidTextMessageConverter; import org.gbif.registry.ws.provider.PartialDateHandlerMethodArgumentResolver; import org.gbif.ws.server.processor.ParamNameProcessor; import org.gbif.ws.server.provider.CountryHandlerMethodArgumentResolver; import org.gbif.ws.server.provider.DatasetSearchRequestHandlerMethodArgumentResolver; import org.gbif.ws.server.provider.DatasetSuggestRequestHandlerMethodArgumentResolver; import org.gbif.ws.server.provider.PageableHandlerMethodArgumentResolver; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Optional; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.xml.MarshallingHttpMessageConverter; import org.springframework.oxm.jaxb.Jaxb2Marshaller; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.Module; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; @Configuration public class WebMvcConfig implements WebMvcConfigurer { @Override public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { argumentResolvers.add(new PageableHandlerMethodArgumentResolver()); argumentResolvers.add(new CountryHandlerMethodArgumentResolver()); argumentResolvers.add(new PartialDateHandlerMethodArgumentResolver()); argumentResolvers.add(new DatasetSearchRequestHandlerMethodArgumentResolver()); argumentResolvers.add(new DatasetSuggestRequestHandlerMethodArgumentResolver()); } @Override public void extendMessageConverters(List<HttpMessageConverter<?>> converters) { converters.add(new UuidTextMessageConverter()); converters.add(marshallingMessageConverter()); } /** * Processor for annotation {@link org.gbif.api.annotation.ParamName}. * * @return ParamNameProcessor */ @Bean protected ParamNameProcessor paramNameProcessor() { return new ParamNameProcessor(); } /** * Custom {@link BeanPostProcessor} for adding {@link ParamNameProcessor}. * * @return BeanPostProcessor */ @Bean public BeanPostProcessor beanPostProcessor() { return new BeanPostProcessor() { @Override public Object postProcessBeforeInitialization(@NotNull Object bean, String beanName) { return bean; } @Override public Object postProcessAfterInitialization(@NotNull Object bean, String beanName) { if (bean instanceof RequestMappingHandlerAdapter) { RequestMappingHandlerAdapter adapter = (RequestMappingHandlerAdapter) bean; List<HandlerMethodArgumentResolver> nullSafeArgumentResolvers = Optional.ofNullable(adapter.getArgumentResolvers()).orElse(Collections.emptyList()); List<HandlerMethodArgumentResolver> argumentResolvers = new ArrayList<>(nullSafeArgumentResolvers); argumentResolvers.add(0, paramNameProcessor()); adapter.setArgumentResolvers(argumentResolvers); } return bean; } }; } @Primary @Bean public ObjectMapper registryObjectMapper() { final ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); // determines whether encountering of unknown properties (ones that do not map to a property, // and there is no // "any setter" or handler that can handle it) should result in a failure (throwing a // JsonMappingException) or not. objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); // Enforce use of ISO-8601 format dates (http://wiki.fasterxml.com/JacksonFAQDateHandling) objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); Mixins.getPredefinedMixins().forEach(objectMapper::addMixIn); return objectMapper; } @Bean public XmlMapper xmlMapper() { XmlMapper xmlMapper = new XmlMapper(); ArrayList<Module> modules = new ArrayList<>(); SimpleModule module = new SimpleModule(); modules.add(module); modules.add(new JaxbAnnotationModule()); xmlMapper.registerModules(modules); return xmlMapper; } @Bean public Jackson2ObjectMapperBuilderCustomizer customJson() { return builder -> builder.modulesToInstall(new JaxbAnnotationModule()); } @Bean public MarshallingHttpMessageConverter marshallingMessageConverter() { MarshallingHttpMessageConverter converter = new MarshallingHttpMessageConverter(); converter.setMarshaller(jaxbMarshaller()); converter.setUnmarshaller(jaxbMarshaller()); return converter; } @Bean public Jaxb2Marshaller jaxbMarshaller() { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setClassesToBeBound( LegacyEndpoint.class, LegacyEndpointResponse.class, LegacyEndpointResponseListWrapper.class, LegacyInstallation.class, LegacyOrganizationResponse.class, LegacyOrganizationBriefResponseListWrapper.class, LegacyOrganizationBriefResponse.class, LegacyDataset.class, LegacyDatasetResponse.class, LegacyDatasetResponseListWrapper.class, IptEntityResponse.class, ErrorResponse.class); return marshaller; } }
[ "federicomh@gmail.com" ]
federicomh@gmail.com
d3b0ca7092b17457c3f0ebe4a4dc9ee70cff8341
ad6434dc113e22e64f0709c95099babe6b2cc854
/src/LargestBSTSubtree/LargestBSTSubtree.java
2eb29483dbeb353807e907594f3b36ba68012806
[]
no_license
shiyanch/Leetcode_Java
f8b7807fbbc0174d45127b65b7b48d836887983c
20df421f44b1907af6528578baf53efddfee48b1
refs/heads/master
2023-05-28T00:40:30.569992
2023-05-17T03:51:34
2023-05-17T03:51:34
48,945,641
9
2
null
null
null
null
UTF-8
Java
false
false
986
java
package LargestBSTSubtree; /** * 333. Largest BST Subtree * * Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), * where largest means subtree with largest number of nodes in it. */ class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } public class LargestBSTSubtree { public int largestBSTSubtree(TreeNode root) { int res = verify(root, Integer.MIN_VALUE, Integer.MAX_VALUE); return (res >= 0) ? res : Math.max(largestBSTSubtree(root.left), largestBSTSubtree(root.right)); } private int verify(TreeNode root, int min, int max) { if (root == null) { return 0; } if (root.val <= min || root.val >= max) { return -1; } int left = verify(root.left, min, root.val); int right = verify(root.right, root.val, max); return (left == -1 || right == -1) ? -1 : 1 + left + right; } }
[ "shiyanch@gmail.com" ]
shiyanch@gmail.com
f26348fe00f1c7a73a528a33c32462a31822fc21
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE789_Uncontrolled_Mem_Alloc/s01/CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_51a.java
a9fb7754e4c4fea912cfa6ff75c25befef05efe6
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
4,750
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_51a.java Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml Template File: sources-sink-51a.tmpl.java */ /* * @description * CWE: 789 Uncontrolled Memory Allocation * BadSource: connect_tcp Read data using an outbound tcp connection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * BadSink: HashSet Create a HashSet using data as the initial size * Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package * * */ package testcases.CWE789_Uncontrolled_Mem_Alloc.s01; import testcasesupport.*; import javax.servlet.http.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.Socket; import java.util.logging.Level; public class CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_51a extends AbstractTestCase { public void bad() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* Read data using an outbound tcp connection */ { Socket socket = null; BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { /* Read data using an outbound tcp connection */ socket = new Socket("host.example.org", 39544); /* read input from socket */ readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data using an outbound tcp connection */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) /* avoid NPD incidental warnings */ { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } /* clean up socket objects */ try { if (socket != null) { socket.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO); } } } (new CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_51b()).badSink(data ); } public void good() throws Throwable { goodG2B(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_51b()).goodG2BSink(data ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "you@example.com" ]
you@example.com
f4dcdc35efe51c4ba9b3c8bde3c6cd7ce34cb536
b8411ebb061dd56427b5aa0bb99e2e01a0e69023
/pinju-biz/src/main/java/com/yuwang/pinju/core/shop/manager/ShopLabelManager.java
e799c5c52bce540ae6499971d6cd885e62e044e4
[]
no_license
sgrass/double11_bugfix_asst_acct
afce8261bb275474f792e1cb41d9ff4fabad06b0
8eea9a16b43600c0c7574db5353c3d3b86cf4694
refs/heads/master
2021-01-19T04:48:03.445861
2017-04-06T06:34:17
2017-04-06T06:34:17
87,394,668
0
1
null
null
null
null
UTF-8
Java
false
false
694
java
package com.yuwang.pinju.core.shop.manager; import com.yuwang.pinju.core.common.ManagerException; import com.yuwang.pinju.domain.shop.ShopInfoDO; /** * 店铺标签 * * @author 杨昭 * * @since 2011-12-5 */ public interface ShopLabelManager { /** * 添加店铺标签 * @author 杨昭 * @return Integer 受影响行数 * @since 2011-12-5 */ Integer updateShopLabel(ShopInfoDO shopInfoDO) throws ManagerException; /** * 根据memberId或得店铺标签信息 * @param ShopInfoDO shopInfoDO * @author 杨昭 * @return ShopInfoDO * @since 2011-12-5 */ ShopInfoDO getShopLabelByShopId(ShopInfoDO shopInfoDO)throws ManagerException; }
[ "xgrass@foxmail.com" ]
xgrass@foxmail.com
9b34f092c6cb3577386e2bc027e6d2b115ca54ec
78bcb506919267837a9e6b8026a3a33f8f66e183
/eclipse-workspace/nl.maikel.xtext.StateDef/src/nl/maikel/xtext/generator/Utils.java
acc0cf58d4fa5e9e4513639fca20c9d6837d343a
[]
no_license
SudoHenk/protocoldef
c1b6d89039df7c0fb2b085fd296a8b689096d220
86e7246433176d78efa851c9a4b003ef8fa13cfc
refs/heads/master
2021-05-24T09:13:15.307043
2020-04-06T12:35:30
2020-04-06T12:35:30
253,489,028
0
0
null
null
null
null
UTF-8
Java
false
false
2,567
java
package nl.sudohenk.xtext.generator; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import nl.sudohenk.xtext.generator.util.BinaryLinkedList; import nl.sudohenk.xtext.stateDef.Message; import nl.sudohenk.xtext.stateDef.MessageByteRange; import nl.sudohenk.xtext.stateDef.MessageStructEntry; public class Utils { /** * Convert an object list to a primitive byte array. * @param list the List object containing the objects. * @return byte[] */ public static byte[] convertToPrimitive(List<Byte> list) { byte[] result = new byte[list.size()]; for(int i = 0; i < list.size(); i++) { result[i] = list.get(i).byteValue(); } return result; } /** * Convert a hex representation to a Byte list * @param hex MUST start with 0x.. (e.g. 0xFF, or 0xFFFF) * @param byteSize the size of the byte array that must be returned * @return */ public static List<Byte> convertHexStrToBytes(String hex, int byteSize) { List<Byte> list = convertHexStrToBytes(hex); if(list.size() > byteSize) { list = list.subList(list.size()-byteSize, list.size()); } else if(list.size() < byteSize) { for(int i = 0; i < (byteSize-list.size()+1); i++) { list.add(0, (byte)0x00); } } return list; } public static List<Byte> convertHexStrToBytes(String hex) { List<Byte> list = new BinaryLinkedList(); String rawHex = hex.substring(2); if(rawHex.length() == 0) { return list; } int expectedSize = rawHex.length()/2; for(byte b : new BigInteger(rawHex, 16).toByteArray()) { list.add(b); } if(list.size() < expectedSize) { for(int i = 0; i < (expectedSize-list.size()+1); i++) { list.add(0, (byte)0x00); } } return list; } /** * Return a byte list of size byteSize * @param byteSize the size of the list * @return a list containing FF bytes. */ public static List<Byte> getBytesOfSize(int byteSize) { List<Byte> list = new BinaryLinkedList(); for(int i = 0; i < byteSize; i++) { list.add((byte)0xFF); } return list; } public static String getFileNameForMessage(Message message) { return Constants.MESSAGE_FOLDER_LOCATION+message.getName()+Constants.MESSAGE_FILE_EXTENSION; } public static String getFileNameForPcapMessage(Message message) { return Constants.MESSAGE_FOLDER_LOCATION+message.getName()+Constants.PCAP_FILE_EXTENSION; } public static int getRequiredBytesForDecimalValue(int maxDecimalValue) { return (int) Math.ceil((Math.log(maxDecimalValue) / Math.log(2))/8); } }
[ "MY_NAME@example.com" ]
MY_NAME@example.com
a47a7687902279bf9da5616767ad7088dc75c068
12371ac3b72f0ca0daa80c09beaf981659352e6c
/audit/impl/src/main/java/in/clouthink/synergy/audit/service/impl/AuthEventStatisticsServiceImpl.java
96bb08e477126e6ad46ac21082ffc2d6ffc85306
[ "Apache-2.0" ]
permissive
clouthink-in/synergy-backend
99eb559403e9de136b15b08a853a1e022b72f840
39ebb3a23c3cb7cca75b249036833918b4dee5ba
refs/heads/master
2021-05-01T18:07:56.518960
2018-07-23T13:26:58
2018-07-23T13:26:58
121,002,164
1
0
null
null
null
null
UTF-8
Java
false
false
4,672
java
package in.clouthink.synergy.audit.service.impl; import in.clouthink.synergy.account.domain.model.User; import in.clouthink.synergy.audit.domain.model.AggregationType; import in.clouthink.synergy.audit.domain.model.AuthEvent; import in.clouthink.synergy.audit.domain.model.AuthEventAggregation; import in.clouthink.synergy.audit.exception.AuditEventException; import in.clouthink.synergy.audit.repository.AuthEventAggregationRepository; import in.clouthink.synergy.audit.repository.AuthEventRepository; import in.clouthink.synergy.audit.service.AuthEventStatisticsService; import in.clouthink.synergy.shared.DomainConstants; import in.clouthink.synergy.shared.util.DateTimeUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; @Service public class AuthEventStatisticsServiceImpl implements AuthEventStatisticsService { private static final Log logger = LogFactory.getLog(AuthEventStatisticsServiceImpl.class); @Autowired private AuthEventRepository authEventRepository; @Autowired private AuthEventAggregationRepository authEventAggregationRepository; @Override public void statisticByDay(String realm, Date day) { if (StringUtils.isEmpty(realm)) { return; } if (day == null) { return; } String aggregationKeyByDay = new SimpleDateFormat("yyyy-MM-dd").format(day); logger.debug(String.format("statisticByDay : %s", aggregationKeyByDay)); Date startOfDay = DateTimeUtils.startOfDay(day); Date endOfDay = DateTimeUtils.endOfDay(day); List<AuthEvent> authEventList = authEventRepository.findListByLoginAtBetween(startOfDay, endOfDay); AuthEventAggregation authEventAggregationByDay = authEventAggregationRepository.findByRealmAndAggregationTypeAndAggregationKey( realm, AggregationType.DAY, aggregationKeyByDay); if (authEventAggregationByDay == null) { authEventAggregationByDay = new AuthEventAggregation(); authEventAggregationByDay.setAggregationType(AggregationType.DAY); authEventAggregationByDay.setAggregationKey(aggregationKeyByDay); } long totalCountByDay = 0; long errorCountByDay = 0; for (AuthEvent authEvent : authEventList) { totalCountByDay += 1; if (!authEvent.isSucceed()) { errorCountByDay += 1; } } authEventAggregationByDay.setTotalCount(totalCountByDay); authEventAggregationByDay.setErrorCount(errorCountByDay); authEventAggregationRepository.save(authEventAggregationByDay); } @Override public void statisticByMonth(String realm, Date dayOfMonth) { if (StringUtils.isEmpty(realm)) { return; } if (dayOfMonth == null) { return; } String aggregationKeyByMonth = new SimpleDateFormat("yyyy-MM").format(dayOfMonth); logger.debug(String.format("statisticByMonth : %s", aggregationKeyByMonth)); AuthEventAggregation authEventAggregationByMonth = authEventAggregationRepository.findByRealmAndAggregationTypeAndAggregationKey( realm, AggregationType.MONTH, aggregationKeyByMonth); if (authEventAggregationByMonth == null) { authEventAggregationByMonth = new AuthEventAggregation(); authEventAggregationByMonth.setAggregationType(AggregationType.MONTH); authEventAggregationByMonth.setAggregationKey(aggregationKeyByMonth); } List<AuthEventAggregation> authEventAggregationList = authEventAggregationRepository.findByRealmAndAggregationTypeAndAggregationKeyLike( realm, AggregationType.DAY, aggregationKeyByMonth); long totalCount = 0; long errorCount = 0; for (AuthEventAggregation authEventAggregation : authEventAggregationList) { totalCount += authEventAggregation.getTotalCount(); errorCount += authEventAggregation.getErrorCount(); } authEventAggregationByMonth.setTotalCount(totalCount); authEventAggregationByMonth.setErrorCount(errorCount); authEventAggregationRepository.save(authEventAggregationByMonth); } @Override public void scanAllAuthEventsAndDoStatistics(String realm, User byWho) { if (StringUtils.isEmpty(realm)) { return; } if (!"administrator".equals(byWho.getUsername())) { throw new AuditEventException("Only the administrator is allowed to access."); } long whenToStop = System.currentTimeMillis() - 100 * DomainConstants.HOW_LONG_OF_ONE_DAY; Date day = new Date(); for (; day.getTime() > whenToStop; ) { statisticByDay(realm, day); statisticByMonth(realm, day); day = new Date(day.getTime() - DomainConstants.HOW_LONG_OF_ONE_DAY); } } }
[ "melthaw@gmail.com" ]
melthaw@gmail.com
96fac487d5a18be23bbb7de0b5c5da1169a59d8d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_0357eb9706059e391051fe928558938469b3cc29/TrackerService/4_0357eb9706059e391051fe928558938469b3cc29_TrackerService_t.java
1dfcab0c158ada67b920684de6412cb0677484d8
[]
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
8,123
java
package com.example.tracker; import java.util.List; import android.app.Service; import android.content.Intent; import android.os.Handler; import android.os.IBinder; import android.util.Log; import android.content.IntentFilter; import android.content.BroadcastReceiver; import android.app.ActivityManager; import android.app.ActivityManager.RunningAppProcessInfo; import android.view.Gravity; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.graphics.PixelFormat; import android.view.View.OnTouchListener; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; import android.provider.Settings.Secure; public class TrackerService extends Service implements OnTouchListener{ private String TAG = this.getClass().getSimpleName(); public static String deviceID = null; private BroadcastReceiver receiver = null; private boolean isScreenOn = false; private LinearLayout fakeLayout; private WindowManager mWindowManager; /** UserPresent is more important to flag to start or stop to track the user behavior */ private boolean isUserPresent = false; /** Keep the previous "RecentTaskList" to compare with latest one, * if not match, one application has been opened */ private List<ActivityManager.RecentTaskInfo> recentTaskListPrevious = null; private SystemStatus previousStatus = SystemStatus.INAPP; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub return null; } @Override public void onCreate() { // TODO Auto-generated method stub super.onCreate(); deviceID = Secure.getString(this.getContentResolver(), Secure.ANDROID_ID); Log.i(TAG, "DeviceID:" + deviceID); Log.i(TAG, "Service onCreate: the number of processes is " + getTotalRunningApp()); /** Create and configure the fake layout for service */ fakeLayout = new LinearLayout(this); LayoutParams layoutPrams = new LayoutParams(0, LayoutParams.MATCH_PARENT); fakeLayout.setLayoutParams(layoutPrams); fakeLayout.setOnTouchListener(this); /** Fetch WindowManager and add fake layout to it */ mWindowManager = (WindowManager)getSystemService(WINDOW_SERVICE); WindowManager.LayoutParams params = new WindowManager.LayoutParams( 0, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, PixelFormat.TRANSLUCENT); params.gravity = Gravity.LEFT | Gravity.TOP; mWindowManager.addView(fakeLayout, params); /** Initialize the recentTaskListPrevious */ updateRecentTaskListPrevious(); previousStatus = SystemStatus.INAPP; /** Create the filter to contain three Actions: ScreenOn, ScreenOff, UserPresent */ IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON); filter.addAction(Intent.ACTION_SCREEN_OFF); filter.addAction(Intent.ACTION_USER_PRESENT); /** Register the Broadcast Receiver to make it work */ receiver = new ScreenReceiver(); registerReceiver(receiver, filter); } @Override public int onStartCommand(Intent intent, int flags, int startId) { // TODO Auto-generated method stub /** Phone has three state: * Screen Off: turn off the screen * Screen On: * 1.User not Present: before unlock the phone; * 2.User Present: phone unlocked. */ if(intent == null) { return super.onStartCommand(intent, flags, startId); } isScreenOn = intent.getBooleanExtra("isScreenOn", true); isUserPresent = intent.getBooleanExtra("isUserPresent", true); if(isScreenOn) { Log.i(TAG, "Screen is on!"); // AggregateMessages.addMessages("Screen is on!"); } else { Log.i(TAG, "Screen is off!"); } if(isUserPresent) { Log.i(TAG, "User is present!"); // AggregateMessages.addMessages(deviceID); AggregateMessages.addMessages("START", false); /** Start the tracking */ } else { Log.i(TAG, "User not present!"); // AggregateMessages.addMessages("User not present!"); /** Stop the tracking */ } return super.onStartCommand(intent, flags, startId); } @Override public void onDestroy() { // TODO Auto-generated method stub /** Before destroy to unregister the Broadcast Receiver first(Avoid memory leak)*/ unregisterReceiver(receiver); if(mWindowManager != null) { if(fakeLayout != null) { mWindowManager.removeView(fakeLayout); } } Log.i(TAG, "Boardcast Receiver Unregistered."); super.onDestroy(); Log.i(TAG, "Service onDestroy."); } @Override public boolean onTouch(View arg0, MotionEvent arg1) { // TODO Auto-generated method stub /** Delay 1 second to check the application status * give application sometime to bring up or move to the front */ if(arg1.getAction() == MotionEvent.ACTION_OUTSIDE) { /** Log the raw touch location data */ /** Test Result: always return (0,0), so gesture detection is not possible */ //Log.i(TAG, Float.toString(arg1.getRawX())); //Log.i(TAG, Float.toString(arg1.getRawY())); Handler handler = new Handler(); handler.postDelayed(new Runnable() { public void run() { SystemStatus status = trackStatus(); Log.i(TAG, "Recorded Touch Outside the view."); Log.i(TAG, "TimeStamp: " + System.nanoTime() + " Sys_Status:" + status); AggregateMessages.addMessages("TimeStamp: " + System.nanoTime() + " Sys_Status:" + status, false); } }, 1000); } return true; } /** Return the number of running processes right now */ public int getTotalRunningApp() { ActivityManager actvityManager = (ActivityManager) this.getSystemService( ACTIVITY_SERVICE ); List<RunningAppProcessInfo> procInfos = actvityManager.getRunningAppProcesses(); return procInfos.size(); } public SystemStatus trackStatus() { /** Get latest recentTaskList */ ActivityManager actvityManager = (ActivityManager) this.getSystemService( ACTIVITY_SERVICE ); List<ActivityManager.RecentTaskInfo> recentTaskList = actvityManager.getRecentTasks(5, ActivityManager.RECENT_IGNORE_UNAVAILABLE); /** Compare the recentTaskList with previous */ /** Need to be optimized in the future */ for(int i = 0; i < recentTaskList.size(); i++) { ActivityManager.RecentTaskInfo recent = recentTaskList.get(i); /** Check the very first process */ if(i == 0) { ActivityManager.RecentTaskInfo previous = recentTaskListPrevious.get(i); Log.i(TAG, "Recent ID:" + recent.persistentId); Log.i(TAG, "Previous Id:" + previous.persistentId); if(recent.persistentId == 3) { if(previousStatus == SystemStatus.INAPP) { previousStatus = SystemStatus.MAINM; recentTaskListPrevious = recentTaskList; return SystemStatus.SWMAN; } else { previousStatus = SystemStatus.MAINM; recentTaskListPrevious = recentTaskList; return SystemStatus.MAINM; } } else { if(previousStatus == SystemStatus.MAINM) { previousStatus = SystemStatus.INAPP; recentTaskListPrevious = recentTaskList; return SystemStatus.SWAPP; } else if(previousStatus == SystemStatus.INAPP) { if(recent.persistentId == previous.persistentId) { previousStatus = SystemStatus.INAPP; recentTaskListPrevious = recentTaskList; return SystemStatus.INAPP; } else { previousStatus = SystemStatus.INAPP; recentTaskListPrevious = recentTaskList; return SystemStatus.SWAPP; } } } } } return SystemStatus.ERROR; } public void updateRecentTaskListPrevious() { ActivityManager actvityManager = (ActivityManager) this.getSystemService( ACTIVITY_SERVICE ); recentTaskListPrevious = actvityManager.getRecentTasks(5, ActivityManager.RECENT_IGNORE_UNAVAILABLE); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b8c59426ac7892167de5063ed3ed7a8bf85c005c
4d017ef6ad6c6282a0fa65422e7c95d220edfe46
/Java-OOP/Exam - 15 December 2019 High Quality Structure/src/aquarium/models/fish/SaltwaterFish.java
6137ff57bb0d1d3ec1d3d0b0e4036bd885ee7103
[]
no_license
Spand0x/SoftUni
53e204929f21dc21fb92dee745aa4993ad0c9d0c
40af6ae71acfb04506fdd407e17c0a13e97f1f5c
refs/heads/master
2022-07-08T01:29:25.008798
2020-04-23T14:29:06
2020-04-23T14:29:06
231,943,127
0
0
null
2022-06-21T03:17:25
2020-01-05T16:13:56
Java
UTF-8
Java
false
false
348
java
package aquarium.models.fish; public class SaltwaterFish extends BaseFish { private static final int SIZE = 5; public SaltwaterFish(String name, String species, double price) { super(name, species, price); super.setSize(SIZE); } @Override public void eat() { super.setSize(super.getSize()+2); } }
[ "gexna97@gmail.com" ]
gexna97@gmail.com
b63b3ddc086a6321736deaeb8e49419964e26465
507e955ae210ca7edcde8bd19da0eccf4bbc00b8
/src/main/java/ch/iterial/lignon/subscriptions/security/SecurityUtils.java
f9c8f8fec0b706738351b0b342ec725a9875f528
[]
no_license
pkokorev/lignon-subscriptions
62ae501796f0fd7e26fc0e389dfff524e4221bce
d488ede75c5d2ef60ebd87332cf2e7d7a348274a
refs/heads/master
2021-06-30T18:46:53.414584
2018-08-06T14:48:07
2018-08-06T14:48:07
143,742,456
0
1
null
2020-09-18T13:34:07
2018-08-06T14:45:40
Java
UTF-8
Java
false
false
2,991
java
package ch.iterial.lignon.subscriptions.security; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import java.util.Optional; /** * Utility class for Spring Security. */ public final class SecurityUtils { private SecurityUtils() { } /** * Get the login of the current user. * * @return the login of the current user */ public static Optional<String> getCurrentUserLogin() { SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(securityContext.getAuthentication()) .map(authentication -> { if (authentication.getPrincipal() instanceof UserDetails) { UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); return springSecurityUser.getUsername(); } else if (authentication.getPrincipal() instanceof String) { return (String) authentication.getPrincipal(); } return null; }); } /** * Get the JWT of the current user. * * @return the JWT of the current user */ public static Optional<String> getCurrentUserJWT() { SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(securityContext.getAuthentication()) .filter(authentication -> authentication.getCredentials() instanceof String) .map(authentication -> (String) authentication.getCredentials()); } /** * Check if a user is authenticated. * * @return true if the user is authenticated, false otherwise */ public static boolean isAuthenticated() { SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(securityContext.getAuthentication()) .map(authentication -> authentication.getAuthorities().stream() .noneMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS))) .orElse(false); } /** * If the current user has a specific authority (security role). * <p> * The name of this method comes from the isUserInRole() method in the Servlet API * * @param authority the authority to check * @return true if the current user has the authority, false otherwise */ public static boolean isCurrentUserInRole(String authority) { SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(securityContext.getAuthentication()) .map(authentication -> authentication.getAuthorities().stream() .anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority))) .orElse(false); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
8b8d5be6b0fb082411047c97d3aca2da7f3c356a
fa51687f6aa32d57a9f5f4efc6dcfda2806f244d
/jdk8-src/src/main/java/org/omg/IOP/TaggedProfileHolder.java
4451d4f05d89d022b87ac466e0e0d3242778545c
[]
no_license
yida-lxw/jdk8
44bad6ccd2d81099bea11433c8f2a0fc2e589eaa
9f69e5f33eb5ab32e385301b210db1e49e919aac
refs/heads/master
2022-12-29T23:56:32.001512
2020-04-27T04:14:10
2020-04-27T04:14:10
258,988,898
0
1
null
2020-10-13T21:32:05
2020-04-26T09:21:22
Java
UTF-8
Java
false
false
965
java
package org.omg.IOP; /** * org/omg/IOP/TaggedProfileHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u212/12974/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl * Monday, April 1, 2019 11:12:35 PM PDT */ public final class TaggedProfileHolder implements org.omg.CORBA.portable.Streamable { public org.omg.IOP.TaggedProfile value = null; public TaggedProfileHolder() { } public TaggedProfileHolder(org.omg.IOP.TaggedProfile initialValue) { value = initialValue; } public void _read(org.omg.CORBA.portable.InputStream i) { value = org.omg.IOP.TaggedProfileHelper.read(i); } public void _write(org.omg.CORBA.portable.OutputStream o) { org.omg.IOP.TaggedProfileHelper.write(o, value); } public org.omg.CORBA.TypeCode _type() { return org.omg.IOP.TaggedProfileHelper.type(); } }
[ "yida@caibeike.com" ]
yida@caibeike.com
e37f786708422f0e4ba5763ff4c4040886c20fec
8c085f12963e120be684f8a049175f07d0b8c4e5
/castor/tags/tag_0_9_3_11/castor-2002/castor/src/main/org/exolab/castor/mapping/xml/types/AutoNamingTypeDescriptor.java
b1fa556bdfa356d7db253a62c4a068f971862512
[]
no_license
alam93mahboob/castor
9963d4110126b8f4ef81d82adfe62bab8c5f5bce
974f853be5680427a195a6b8ae3ce63a65a309b6
refs/heads/master
2020-05-17T08:03:26.321249
2014-01-01T20:48:45
2014-01-01T20:48:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,120
java
/* * This class was automatically generated with * <a href="http://castor.exolab.org">Castor 0.9.3.9+</a>, using an * XML Schema. * $Id$ */ package org.exolab.castor.mapping.xml.types; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.mapping.AccessMode; import org.exolab.castor.mapping.ClassDescriptor; import org.exolab.castor.mapping.FieldDescriptor; import org.exolab.castor.xml.*; import org.exolab.castor.xml.FieldValidator; import org.exolab.castor.xml.TypeValidator; import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.handlers.*; import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; import org.exolab.castor.xml.validators.*; /** * * @version $Revision$ $Date$ **/ public class AutoNamingTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ private java.lang.String nsPrefix; private java.lang.String nsURI; private java.lang.String xmlName; private org.exolab.castor.xml.XMLFieldDescriptor identity; //----------------/ //- Constructors -/ //----------------/ public AutoNamingTypeDescriptor() { super(); nsURI = "http://castor.exolab.org/"; xmlName = "auto-namingType"; XMLFieldDescriptorImpl desc = null; XMLFieldHandler handler = null; FieldValidator fieldValidator = null; //-- initialize attribute descriptors //-- initialize element descriptors } //-- org.exolab.castor.mapping.xml.types.AutoNamingTypeDescriptor() //-----------/ //- Methods -/ //-----------/ /** **/ public org.exolab.castor.mapping.AccessMode getAccessMode() { return null; } //-- org.exolab.castor.mapping.AccessMode getAccessMode() /** **/ public org.exolab.castor.mapping.ClassDescriptor getExtends() { return null; } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() /** **/ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { return identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** **/ public java.lang.Class getJavaClass() { return org.exolab.castor.mapping.xml.types.AutoNamingType.class; } //-- java.lang.Class getJavaClass() /** **/ public java.lang.String getNameSpacePrefix() { return nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** **/ public java.lang.String getNameSpaceURI() { return nsURI; } //-- java.lang.String getNameSpaceURI() /** **/ public org.exolab.castor.xml.TypeValidator getValidator() { return this; } //-- org.exolab.castor.xml.TypeValidator getValidator() /** **/ public java.lang.String getXMLName() { return xmlName; } //-- java.lang.String getXMLName() }
[ "nobody@b24b0d9a-6811-0410-802a-946fa971d308" ]
nobody@b24b0d9a-6811-0410-802a-946fa971d308
f877412bc302cf34ccfff2b571b2a2be47968fba
8be8d7eca93eb92a44e2a92b1e704444f3aa2afb
/app/src/main/java/com/aanglearning/principalapp/messagegroup/MessageInteractor.java
a32984b0aac1ca165813c5c3be7baa321263e8bc
[]
no_license
vinkrish/principal-app
9a74aa26c43d3f072a9ab1d47a8af169e31e3ce2
b805fa65304eea3366ccf3cc88a3eb5be10f7bc0
refs/heads/master
2021-09-12T23:11:19.460536
2018-04-22T10:23:06
2018-04-22T10:23:06
90,535,555
0
1
null
null
null
null
UTF-8
Java
false
false
1,224
java
package com.aanglearning.principalapp.messagegroup; import com.aanglearning.principalapp.model.DeletedMessage; import com.aanglearning.principalapp.model.Message; import java.util.List; /** * Created by Vinay on 07-04-2017. */ interface MessageInteractor { interface OnFinishedListener { void onError(String message); void onMessageSaved(Message message); void onRecentMessagesReceived(List<Message> messages); void onMessageReceived(List<Message> messages); void onMessageDeleted(DeletedMessage deletedMessage); void onDeletedMessagesReceived(List<DeletedMessage> messages); } void saveMessage(Message message, MessageInteractor.OnFinishedListener listener); void getRecentMessages(long groupId, long messageId, MessageInteractor.OnFinishedListener listener); void getMessages(long groupId, MessageInteractor.OnFinishedListener listener); void deleteMessage(DeletedMessage deletedMessage, MessageInteractor.OnFinishedListener listener); void getRecentDeletedMessages(long groupId, long id, MessageInteractor.OnFinishedListener listener); void getDeletedMessages(long groupId, MessageInteractor.OnFinishedListener listener); }
[ "vinaykrishna1989@gmail.com" ]
vinaykrishna1989@gmail.com
8e7e471d169dd6460ad031b5cf145935f57a93cd
2e9a86693b665b879c59b14dfd63c2c92acbf08a
/webconverter/decomiledJars/rt/sun/java2d/pipe/OutlineTextRenderer.java
e32c2421e36f9ed87b331d38e323be78c46800f5
[]
no_license
shaikgsb/webproject-migration-code-java
9e2271255077025111e7ea3f887af7d9368c6933
3b17211e497658c61435f6c0e118b699e7aa3ded
refs/heads/master
2021-01-19T18:36:42.835783
2017-07-13T09:11:05
2017-07-13T09:11:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,850
java
package sun.java2d.pipe; import java.awt.Shape; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.font.TextLayout; import java.awt.geom.AffineTransform; import sun.java2d.SunGraphics2D; import sun.java2d.loops.FontInfo; public class OutlineTextRenderer implements TextPipe { public static final int THRESHHOLD = 100; public OutlineTextRenderer() {} public void drawChars(SunGraphics2D paramSunGraphics2D, char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4) { String str = new String(paramArrayOfChar, paramInt1, paramInt2); drawString(paramSunGraphics2D, str, paramInt3, paramInt4); } public void drawString(SunGraphics2D paramSunGraphics2D, String paramString, double paramDouble1, double paramDouble2) { if ("".equals(paramString)) { return; } TextLayout localTextLayout = new TextLayout(paramString, paramSunGraphics2D.getFont(), paramSunGraphics2D.getFontRenderContext()); Shape localShape = localTextLayout.getOutline(AffineTransform.getTranslateInstance(paramDouble1, paramDouble2)); int i = paramSunGraphics2D.getFontInfo().aaHint; int j = -1; if ((i != 1) && (paramSunGraphics2D.antialiasHint != 2)) { j = paramSunGraphics2D.antialiasHint; paramSunGraphics2D.antialiasHint = 2; paramSunGraphics2D.validatePipe(); } else if ((i == 1) && (paramSunGraphics2D.antialiasHint != 1)) { j = paramSunGraphics2D.antialiasHint; paramSunGraphics2D.antialiasHint = 1; paramSunGraphics2D.validatePipe(); } paramSunGraphics2D.fill(localShape); if (j != -1) { paramSunGraphics2D.antialiasHint = j; paramSunGraphics2D.validatePipe(); } } public void drawGlyphVector(SunGraphics2D paramSunGraphics2D, GlyphVector paramGlyphVector, float paramFloat1, float paramFloat2) { Shape localShape = paramGlyphVector.getOutline(paramFloat1, paramFloat2); int i = -1; FontRenderContext localFontRenderContext = paramGlyphVector.getFontRenderContext(); boolean bool = localFontRenderContext.isAntiAliased(); if ((bool) && (paramSunGraphics2D.getGVFontInfo(paramGlyphVector.getFont(), localFontRenderContext).aaHint == 1)) { bool = false; } if ((bool) && (paramSunGraphics2D.antialiasHint != 2)) { i = paramSunGraphics2D.antialiasHint; paramSunGraphics2D.antialiasHint = 2; paramSunGraphics2D.validatePipe(); } else if ((!bool) && (paramSunGraphics2D.antialiasHint != 1)) { i = paramSunGraphics2D.antialiasHint; paramSunGraphics2D.antialiasHint = 1; paramSunGraphics2D.validatePipe(); } paramSunGraphics2D.fill(localShape); if (i != -1) { paramSunGraphics2D.antialiasHint = i; paramSunGraphics2D.validatePipe(); } } }
[ "Subbaraju.Gadiraju@Lnttechservices.com" ]
Subbaraju.Gadiraju@Lnttechservices.com
5bd5e502d43121b728654cb95b32eb7c429122bd
3e154589e24371d78a1854788b0e68e8e7783b18
/src/main/java/javafrm/demo/controllers/Session2Controller.java
29fba0cfb5c01a15697be13cbb83cd2e96672181
[]
no_license
pqanh12344/Admin
5cb19f2bdd2ffc72f3dcd44c822d5b65d5a3779b
1660894c7deae521a8c1b8a1de808f61d7280d1a
refs/heads/master
2023-03-31T09:26:47.226795
2021-04-03T16:00:24
2021-04-03T16:00:24
354,332,133
0
0
null
null
null
null
UTF-8
Java
false
false
1,214
java
package javafrm.demo.controllers; import javafrm.demo.models.User; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @Controller public class Session2Controller { @GetMapping("/session2/load-view") public String loadView(Model model){ model.addAttribute("greeting","Xin chao"); User user = new User(); user.address = "QN"; user.name = "Takamiya Mio"; model.addAttribute("user", user); String[] languages = new String[]{ "PHP", "JAVA", "JS", "CSS" }; model.addAttribute("languages",languages); return "session2/demo-view"; } @PostMapping("/session2/handling-form") public String handlingForm(User user,Model model){ model.addAttribute("user", user); return "session2/show-data"; } @GetMapping("/session2/show-form") public String showForm(Model model){ User user = new User(); model.addAttribute("user",user); return "session2/form"; } }
[ "=" ]
=
a4c930d4b81eb84ad1d4f55aaa004f0610cae235
327d615dbf9e4dd902193b5cd7684dfd789a76b1
/base_source_from_JADX/sources/com/unboundid/util/LDAPSDKException.java
c593b704effee962c46950ecd214c3a0f5eb96cd
[]
no_license
dnosauro/singcie
e53ce4c124cfb311e0ffafd55b58c840d462e96f
34d09c2e2b3497dd452246b76646b3571a18a100
refs/heads/main
2023-01-13T23:17:49.094499
2020-11-20T10:46:19
2020-11-20T10:46:19
314,513,307
0
0
null
null
null
null
UTF-8
Java
false
false
627
java
package com.unboundid.util; public abstract class LDAPSDKException extends Exception { protected LDAPSDKException(String str) { super(str); } protected LDAPSDKException(String str, Throwable th) { super(str, th); } public String getExceptionMessage() { String message = getMessage(); return message == null ? toString() : message; } public final String toString() { StringBuilder sb = new StringBuilder(); toString(sb); return sb.toString(); } public void toString(StringBuilder sb) { sb.append(super.toString()); } }
[ "dno_sauro@yahoo.it" ]
dno_sauro@yahoo.it
aa119ede616bbbf5c553bcf499f80df7ddfd0df7
ecdf387e88421ff8ebb49100ca0d5661aa7273c7
/TianjianERP/src/com/matech/audit/service/rule/model/RuleTable.java
d3181f22b3758730232bcab417dc1498ff123742
[]
no_license
littletanker/mt-TianjianERP
1a9433ff8bad1aebceec5bdd721544e88d73e247
ef0378918a72a321735ab4745455f6ebe5e04576
refs/heads/master
2021-01-18T17:11:33.639821
2013-09-04T09:01:24
2013-09-04T09:01:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,647
java
package com.matech.audit.service.rule.model; /** * 指标设置的VO,表名为k_rule * @author Administrator * */ public class RuleTable { private int autoid; private String title; private String type; private String memo; private String content; private double orderid; private String property; private String refer1; private String refer2; private String refer0; public RuleTable() { // TODO Auto-generated constructor stub } public int getAutoid() { return autoid; } public void setAutoid(int autoid) { this.autoid = autoid; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public double getOrderid() { return orderid; } public void setOrderid(double orderid) { this.orderid = orderid; } public String getProperty() { return property; } public void setProperty(String property) { this.property = property; } public String getRefer1() { return refer1; } public void setRefer1(String refer1) { this.refer1 = refer1; } public String getRefer2() { return refer2; } public void setRefer2(String refer2) { this.refer2 = refer2; } public String getRefer0() { return refer0; } public void setRefer0(String refer0) { this.refer0 = refer0; } }
[ "smartken0824@gmail.com" ]
smartken0824@gmail.com
5794cd07ecc13f0891aeeddbab8fdfbbfcab9bd9
d9fe876cbf3e30e5d826a3ca175e4f56b4c27d9b
/java_examples-Week1/map_demo/src/eg1/Demo1.java
1b35f8a35842e6673fe3ece1277222cee4f050d7
[]
no_license
shubha-rao24/roc_march_vinay_2021
828367a57a92c12c0509bfb80a589a703f0dfac8
3c2793b3e06146a6e61127bbcdc2fa4ded12623e
refs/heads/master
2023-03-21T15:02:46.152412
2021-03-04T22:09:54
2021-03-04T22:09:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,963
java
package eg1; import java.util.Collections; import java.util.HashMap; import java.util.Hashtable; import java.util.LinkedHashMap; import java.util.Map; import java.util.TreeMap; public class Demo1 { public static void main(String[] args) { Map<Integer, String> hm=new HashMap<>(); hm.put(100, "java"); hm.put(100, "java updated"); hm.put(null, "java"); hm.put(101, "java"); hm.put(999, "java"); hm.put(900, null); hm.put(901, null); hm.put(300, null); hm.put(null, null); System.out.println("hm : "+hm); Map<Integer, String> lhm=new LinkedHashMap<>(); lhm.put(100, "java"); lhm.put(100, "java updated"); lhm.put(null, "java"); lhm.put(101, "java"); lhm.put(999, "java"); lhm.put(900, null); lhm.put(901, null); lhm.put(300, null); lhm.put(null, null); System.out.println("lhm : "+lhm); //Map<Integer, String> tm=new TreeMap<>(); //ascending for key Map<Integer, String> tm=new TreeMap<>(Collections.reverseOrder()); //descending for key tm.put(100, "java"); tm.put(100, "java updated"); //tm.put(null, "java"); tm.put(101, "java"); tm.put(999, "java"); tm.put(900, null); tm.put(901, null); tm.put(300, null); //tm.put(null, null); System.out.println("tm : "+tm); Map<Integer, String> ht=new Hashtable<>(); ht.put(100, "java"); ht.put(100, "java updated"); //ht.put(null, "java"); ht.put(101, "java"); ht.put(999, "java"); //ht.put(900, null); //ht.put(901, null); //ht.put(300, null); //ht.put(null, null); System.out.println("ht : "+ht); System.out.println(ht.size()); System.out.println(ht.containsKey(12)); System.out.println(ht.containsKey(100)); System.out.println(ht.containsValue("java")); System.out.println(ht.containsValue("jee")); System.out.println(ht.get(100)); System.out.println(ht.get(10000)); ht.remove(100); System.out.println(ht); System.out.println(ht.keySet()); System.out.println(ht.values()); } }
[ "vinay.ingalahalli@revature.com" ]
vinay.ingalahalli@revature.com
1fe8bde434610ff387265c997f224ada4d53e307
85423ae7916ae5a6f26fac22e8f83dd54f589e0d
/dcat-suite-cli/src/main/java/org/aksw/dcat_suite/cli/cmd/catalog/CmdMixinCatalogEngine.java
b61e5f944c6253bdb72ab5a43c18783152b59fd5
[ "Apache-2.0" ]
permissive
SmartDataAnalytics/dcat-suite
e4c8b411170332fedf453fa5fc34e102ca0646ae
9f87eb846955a738da135be00007298c640ddad3
refs/heads/develop
2023-04-15T04:12:09.494005
2023-04-01T22:19:31
2023-04-01T22:19:31
127,953,651
11
0
Apache-2.0
2023-03-06T15:51:55
2018-04-03T18:46:46
Java
UTF-8
Java
false
false
1,358
java
package org.aksw.dcat_suite.cli.cmd.catalog; import org.aksw.jenax.arq.datasource.RdfDataSourceSpecBasicFromMap; import org.aksw.jenax.arq.datasource.RdfDataSourceSpecBasicMutable; import picocli.CommandLine.Option; public class CmdMixinCatalogEngine extends RdfDataSourceSpecBasicFromMap { @Option(names = { "--cat-engine" }, description="SPARQL Engine. Supported: 'mem', 'tdb2', 'difs'") @Override public RdfDataSourceSpecBasicMutable setEngine(String engine) { return super.setEngine(engine); } @Option(names = { "--cat-fs" }, description="FileSystem URL against which to interpret --db-location (e.g. for webdav, leave empty for local fs).") @Override public RdfDataSourceSpecBasicMutable setLocationContext(String locationContext) { return super.setLocationContext(locationContext); } @Option(names = { "--cat-loc" }, description="Access location to the database; interpreted w.r.t. engine. May be an URL, directory or file.") @Override public RdfDataSourceSpecBasicMutable setLocation(String location) { return super.setLocation(location); } @Option(names = { "--cat-loader" }, description="Wrap a datasource's default loading strategy with a different one. Supported values: sansa") @Override public RdfDataSourceSpecBasicMutable setLoader(String loader) {return super.setLoader(loader); } }
[ "RavenArkadon@googlemail.com" ]
RavenArkadon@googlemail.com
9ea3f761dd72977348b66a14de8366c6df4e58de
4f4ddc396fa1dfc874780895ca9b8ee4f7714222
/src/java/com/gensym/classes/modules/jgidemo/EventSourceListener.java
bb4cee88f809923ee6add2d4b52337a5a4c66a92
[]
no_license
UtsavChokshiCNU/GenSym-Test2
3214145186d032a6b5a7486003cef40787786ba0
a48c806df56297019cfcb22862dd64609fdd8711
refs/heads/master
2021-01-23T23:14:03.559378
2017-09-09T14:20:09
2017-09-09T14:20:09
102,960,203
3
5
null
null
null
null
UTF-8
Java
false
false
1,424
java
/* * Copyright (C) 1986-2017 Gensym Corporation. * All Rights Reserved. * * EventSourceListener.java * * Description: Generated Interface file. Do not edit! * * Author: Gensym Corp. * * Version: 5.1 Rev. 1 * * Date: Fri Sep 21 13:49:53 EDT 2007 * */ package com.gensym.classes.modules.jgidemo; import com.gensym.classes.*; import com.gensym.util.Structure; import com.gensym.util.Sequence; import com.gensym.util.Symbol; import com.gensym.util.symbol.SystemAttributeSymbols; import com.gensym.jgi.*; import com.gensym.classes.Object; public interface EventSourceListener extends com.gensym.classes.modules.g2evliss.G2EventListener { public static final Symbol EVENT_SOURCE_LISTENER_ = Symbol.intern ("EVENT-SOURCE-LISTENER"); static final Symbol g2ClassName = EVENT_SOURCE_LISTENER_; static final Symbol[] classInheritancePath = new Symbol[] {EVENT_SOURCE_LISTENER_, G2_EVENT_LISTENER_, OBJECT_, ITEM_, ENTITY_, BLOCK_, KB_FRAME_, SYSTEM_ITEM_, ROOT_}; static final Symbol[] staticAttributes = new Symbol[] {}; /** * Auto Generated method for G2 Method * EVENT-SOURCE-LISTENER::AN-EVENT * @exception G2AccessException if there are any communication problems * (this:CLASS EVENT-SOURCE-LISTENER,arg1:CLASS EVENT-SOURCE-EVENT) = () */ public void anEvent(com.gensym.classes.modules.jgidemo.EventSourceEvent arg1) throws G2AccessException; }
[ "utsavchokshi@Utsavs-MacBook-Pro.local" ]
utsavchokshi@Utsavs-MacBook-Pro.local
818b6f1827319a87922869a46faca8cfc4c36ad8
62c9c4de6a80b6267aea4d323be7b451c2f33d68
/app/src/main/java/com/yang/net2request/getRosterJob/NTGetRosterJobReqBean.java
c4663ceda5302cfd95e2e91b3df1cc7148581fa0
[]
no_license
ullambana0715/Transport
65cb1bfdb5103f6b97b015b0612d17b2fa6d6a7b
124dfdf54d14f1e3f17fb67eacdc7986fc30ea50
refs/heads/master
2021-05-12T17:19:39.183629
2019-01-11T09:33:31
2019-01-11T09:33:31
117,041,833
0
0
null
null
null
null
UTF-8
Java
false
false
335
java
package com.yang.net2request.getRosterJob; import com.yang.net2request.NTReqBean; /** * Created by Administrator on 2016/9/9. */ public class NTGetRosterJobReqBean extends NTReqBean { int jobId; public int getJobId() { return jobId; } public void setJobId(int jobId) { this.jobId = jobId; } }
[ "jinyu_yang@ssic.cn" ]
jinyu_yang@ssic.cn
bbc996f9ffa4733d86c353d49206565709c95fd5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/35/35_e6ee6da3b9b4d0b8cdaa1b0e083a11a0cfafd782/CBayesClassifier/35_e6ee6da3b9b4d0b8cdaa1b0e083a11a0cfafd782_CBayesClassifier_t.java
bc3371cb945edaf8581eb5f50354f6128f332ddc
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,124
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.mahout.classifier.cbayes; import org.apache.hadoop.util.PriorityQueue; import org.apache.mahout.classifier.ClassifierResult; import org.apache.mahout.common.Classifier; import org.apache.mahout.common.Model; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import java.util.Deque; /** * Classifies documents based on a {@link CBayesModel}. */ public class CBayesClassifier implements Classifier{ /** * Classify the document and return the top <code>numResults</code> * * @param model The model * @param document The document to classify * @param defaultCategory The default category to assign * @param numResults The maximum number of results to return, ranked by score. * Ties are broken by comparing the category * @return A Collection of {@link org.apache.mahout.classifier.ClassifierResult}s. */ @Override public Collection<ClassifierResult> classify(Model model, String[] document, String defaultCategory, int numResults) { Collection<String> categories = model.getLabels(); PriorityQueue<ClassifierResult> pq = new ClassifierResultPriorityQueue(numResults); ClassifierResult tmp; for (String category : categories){ double prob = documentWeight(model, category, document); if (prob < 0.0) { tmp = new ClassifierResult(category, prob); pq.insert(tmp); } } Deque<ClassifierResult> result = new LinkedList<ClassifierResult>(); while ((tmp = pq.pop()) != null) { result.addLast(tmp); } if (result.isEmpty()){ result.add(new ClassifierResult(defaultCategory, 0)); } return result; } /** * Classify the document according to the {@link org.apache.mahout.common.Model} * * @param model The trained {@link org.apache.mahout.common.Model} * @param document The document to classify * @param defaultCategory The default category to assign if one cannot be determined * @return The single best category */ @Override public ClassifierResult classify(Model model, String[] document, String defaultCategory) { ClassifierResult result = new ClassifierResult(defaultCategory); double min = 0.0; Collection<String> categories = model.getLabels(); for (String category : categories) { double prob = documentWeight(model, category, document); if (prob < min) { min = prob; result.setLabel(category); } } result.setScore(min); return result; } /** * Calculate the document weight as the multiplication of the * {@link Model#featureWeight(String, String)} for each word given the label * * @param model The {@link org.apache.mahout.common.Model} * @param label The label to calculate the probability of * @param document The document * @return The probability * @see Model#featureWeight(String, String) */ @Override public double documentWeight(Model model, String label, String[] document) { Map<String, Integer[]> wordList = new HashMap<String, Integer[]>(1000); for (String word : document) { Integer [] count = wordList.get(word); if (count == null) { count = new Integer[1]; count[0] = 0; wordList.put(word, count); } count[0]++; } double result = 0.0; for (Map.Entry<String, Integer[]> entry : wordList.entrySet()) { String word = entry.getKey(); int count = entry.getValue()[0]; result += count * model.featureWeight(label, word); } return result; } private static class ClassifierResultPriorityQueue extends PriorityQueue<ClassifierResult> { private ClassifierResultPriorityQueue(int numResults) { initialize(numResults); } @Override protected boolean lessThan(Object a, Object b) { ClassifierResult cr1 = (ClassifierResult) a; ClassifierResult cr2 = (ClassifierResult) b; double score1 = cr1.getScore(); double score2 = cr2.getScore(); return score1 == score2 ? cr1.getLabel().compareTo(cr2.getLabel()) < 0 : score1 < score2; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
39b0b4b5b4380a412795df1c273b51cb3ad21000
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/b/j/h/j/Calc_1_1_19791.java
5648be8c0af2c35d94ef10101f1dd873b830f2ac
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.j.h.j; public class Calc_1_1_19791 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
a504a89de47be59c03419d66687f1109404e7037
c6aa94983f3c8f82954463af3972ae06b30396a7
/microservice_mina_social_business_api/portal-api/src/main/java/com/channelsharing/hongqu/portal/api/service/impl/OrderInvoiceServiceImpl.java
e8136bdc551c94e069907e287c39b2f7e36a223a
[ "Apache-2.0" ]
permissive
dobulekill/jun_springcloud
f01358caacb1b04f57908dccc6432d0a5e17745e
33248f65301741ed97a24b978a5c22d5d6c052fb
refs/heads/master
2023-01-24T13:24:59.282130
2020-11-25T17:30:47
2020-11-25T17:30:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,131
java
/** * Copyright &copy; 2016-2022 liuhangjun All rights reserved. */ package com.channelsharing.hongqu.portal.api.service.impl; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.channelsharing.common.service.CrudServiceImpl; import com.channelsharing.hongqu.portal.api.service.OrderInvoiceService; import com.channelsharing.hongqu.portal.api.entity.OrderInvoice; import com.channelsharing.hongqu.portal.api.dao.OrderInvoiceDao; /** * 订单发票Service * @author Wujun * @version 2018-07-29 */ @Service public class OrderInvoiceServiceImpl extends CrudServiceImpl<OrderInvoiceDao, OrderInvoice> implements OrderInvoiceService { @Override public OrderInvoice findOne(Long id) { OrderInvoice entity = new OrderInvoice(); entity.setId(id); return super.findOne(entity); } @Override public OrderInvoice findOne(Long id , Long userId){ OrderInvoice entity = new OrderInvoice(); entity.setId(id); entity.setUserId(userId); return super.findOne(entity); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
9b4c4d1583aa8d18d36efedb797e99002d1dbb55
6a1c8540e81a34e315e10c1a33a1202d2f8db8ce
/AdAdmin/src/main/cn/adwalker/model/finance/dao/impl/FinanceAwardDaoImpl.java
90f523bb6184996b4510bbb317fd81d0bdf108f3
[]
no_license
springwindyike/ad-server
7624a3129c705ce5cd97bfe983704d1f29b09889
c2878216505e5aea7222e830ad759a22fc6a22da
refs/heads/master
2021-12-11T05:29:26.909006
2016-10-24T02:48:55
2016-10-24T02:48:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,035
java
package cn.adwalker.model.finance.dao.impl; import java.util.List; import javax.annotation.Resource; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.namedparam.BeanPropertySqlParameterSource; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.stereotype.Repository; import cn.adwalker.model.finance.dao.IFinanceAwardDao; import cn.adwalker.model.finance.domain.DevFinanceAward; import cn.adwalker.model.finance.domain.DevFinanceAwardVoLog; @Repository("iFinanceAwardDao") public class FinanceAwardDaoImpl implements IFinanceAwardDao { @Resource private JdbcTemplate jdbcTemplate; @Resource protected NamedParameterJdbcTemplate namedParameterJdbcTemplate; @Override public DevFinanceAward findByTime(String currentTime) { StringBuffer sql = new StringBuffer(); sql.append("select * from t_manage_finance_award t where t.begin_day <='" + currentTime + " 00:00:00') and t.end_day >='" + currentTime + " 23:59:59')"); List<DevFinanceAward> objects = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<DevFinanceAward>(DevFinanceAward.class)); DevFinanceAward devFinanceAward = null; if (objects != null && objects.size() > 0) { devFinanceAward =objects.get(0); return devFinanceAward; } return null; } @Override public void insert(DevFinanceAwardVoLog awardVoLog) { StringBuffer sql = new StringBuffer(); sql.append(" insert into T_MANAGE_FINANCE_AWARD_LOG("); sql.append("dev_id,"); sql.append("dev_name,"); sql.append("app_id,"); sql.append("app_name,"); sql.append("award_money)"); sql.append(" values ( "); sql.append(":dev_id,"); sql.append(":dev_name,"); sql.append(":app_id,"); sql.append(":app_name,"); sql.append(":award_money)"); namedParameterJdbcTemplate.update(sql.toString(), new BeanPropertySqlParameterSource(awardVoLog)); } @Override public DevFinanceAwardVoLog findByDevId(Long developerId) { StringBuffer sql = new StringBuffer(); sql.append("select * from T_MANAGE_FINANCE_AWARD_LOG t where dev_id = '" + developerId + "'"); List<DevFinanceAwardVoLog> objects = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<DevFinanceAwardVoLog>(DevFinanceAwardVoLog.class)); DevFinanceAwardVoLog devFinanceAwardVoLog = null; if (objects != null && objects.size() > 0) { devFinanceAwardVoLog = (DevFinanceAwardVoLog) objects.get(0); return devFinanceAwardVoLog; } return null; } @Override public List<DevFinanceAward> findByDate(String startTime, String endTime) { StringBuffer sql = new StringBuffer(); sql.append("select * from t_manage_finance_award t where (t.begin_day >='" + startTime + "' and t.begin_day <='" + endTime + "') or (t.begin_day <='" + startTime + "' and t.end_day >='" + startTime + "')"); List<DevFinanceAward> objects = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<DevFinanceAward>(DevFinanceAward.class)); List<DevFinanceAward> list = null; if (objects != null && objects.size() > 0) { list = objects; return list; } return null; } @Override public void insert(DevFinanceAward awardVo) { StringBuffer sql = new StringBuffer(); sql.append(" insert into t_manage_finance_award("); sql.append("award_money,"); sql.append("begin_day,"); sql.append("end_day)"); sql.append(" values ( "); sql.append(":award_money,"); sql.append(":begin_day,"); sql.append(":end_day)"); jdbcTemplate.update(sql.toString(), new BeanPropertySqlParameterSource(awardVo)); } @Override public List<DevFinanceAward> findAll() { StringBuffer sql = new StringBuffer(); sql.append("select * from t_manage_finance_award"); List<DevFinanceAward> objects = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<DevFinanceAward>(DevFinanceAward.class)); List<DevFinanceAward> list = null; if (objects != null && objects.size() > 0) { list = objects; return list; } return null; } }
[ "13565644@qq.com" ]
13565644@qq.com
814b1a2413ba16de7eaa4651a23e38c236a39a34
995e655293513d0b9f93d62e28f74b436245ae74
/src/com/htc/gc/companion/settings/ui/d.java
92bf8b17c33eecbac2115250a206b1e14a12c8e4
[]
no_license
JALsnipe/HTC-RE-YouTube-Live-Android
796e7c97898cac41f0f53120e79cde90d3f2fab1
f941b64ad6445c0a0db44318651dc76715291839
refs/heads/master
2021-01-17T09:46:50.725810
2015-01-09T23:32:14
2015-01-09T23:32:14
29,039,855
3
0
null
null
null
null
UTF-8
Java
false
false
677
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.htc.gc.companion.settings.ui; import android.content.DialogInterface; // Referenced classes of package com.htc.gc.companion.settings.ui: // EnableBroadcastActivity class d implements android.content.DialogInterface.OnClickListener { final EnableBroadcastActivity a; d(EnableBroadcastActivity enablebroadcastactivity) { a = enablebroadcastactivity; super(); } public void onClick(DialogInterface dialoginterface, int i) { } }
[ "josh.lieberman92@gmail.com" ]
josh.lieberman92@gmail.com
43b0b9312b66e990e39d3f262d2f533fd6561c09
26ab7eebe8231791577f0f5c47a72a60bcd9d46d
/src/test/java/com/fasterxml/jackson/failing/JsonTypeInfoCustomResolver2811Test.java
fbaa47bf502f8044a841e62d233542d563630c64
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
Tobi1879/jackson-databind
4600a3feafd990f83692e93f7370bc6fbe043eb5
b0aab8ac5e2f633c18b95cf4a339c66238b95a97
refs/heads/master
2023-01-08T17:13:09.927215
2020-11-15T03:28:29
2020-11-15T03:28:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,866
java
package com.fasterxml.jackson.failing; import java.io.IOException; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase; public class JsonTypeInfoCustomResolver2811Test extends BaseMapTest { interface Vehicle { } static class Car implements Vehicle { public int wheels; public String color; } static class Bicycle implements Vehicle { public int wheels; public String bicycleType; } static class Person<T extends Vehicle> { public String name; public VehicleType vehicleType; @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "vehicleType", defaultImpl = Car.class ) @JsonTypeIdResolver(VehicleTypeResolver.class) public T vehicle; } public enum VehicleType { CAR(Car.class), BICYCLE(Bicycle.class); public final Class<? extends Vehicle> vehicleClass; VehicleType(Class<? extends Vehicle> vehicleClass) { this.vehicleClass = vehicleClass; } } static class VehicleTypeResolver extends TypeIdResolverBase { JavaType superType; @Override public void init(JavaType bt) { this.superType = bt; } @Override public String idFromValue(DatabindContext ctxt, Object value) { return idFromValueAndType(ctxt, value, value.getClass()); } @Override public String idFromValueAndType(DatabindContext ctxt, Object value, Class<?> suggestedType) { // only to be called for default type but... return suggestedType.getSimpleName().toUpperCase(); } @Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { Class<? extends Vehicle> vehicleClass; try { vehicleClass = VehicleType.valueOf(id).vehicleClass; } catch (IllegalArgumentException e) { throw new IOException(e.getMessage(), e); } return context.constructSpecializedType(superType, vehicleClass); } @Override public JsonTypeInfo.Id getMechanism() { return JsonTypeInfo.Id.NAME; } } private final ObjectMapper MAPPER = jsonMapperBuilder() .disable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY) .disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) .build(); // [databind#2811] public void testTypeInfoWithCustomResolver2811NoTypeId() throws Exception { String json = "{ \"name\": \"kamil\", \"vehicle\": {\"wheels\": 4, \"color\": \"red\"}}"; Person<?> person = MAPPER.readValue(json, Person.class); assertEquals("kamil", person.name); assertNull(person.vehicleType); assertNotNull(person.vehicle); assertEquals(Car.class, person.vehicle.getClass()); } // Passing case for comparison /* public void testTypeInfoWithCustomResolver2811WithTypeId() throws Exception { String json = "{\n" + " \"name\": \"kamil\",\n" + " \"vehicleType\": \"CAR\",\n" + " \"vehicle\": {\n" + " \"wheels\": 4,\n" + " \"color\": \"red\"\n" + " }\n" + "}" ; Person<?> person = MAPPER.readValue(json, Person.class); assertEquals("kamil", person.name); assertEquals(VehicleType.CAR, person.vehicleType); assertNotNull(person.vehicle); } */ }
[ "tatu.saloranta@iki.fi" ]
tatu.saloranta@iki.fi
dd5030cbd1a2ad1af99c247dddc3f2b4e0e33ab5
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_323/Testnull_32273.java
14c4d4af74a584406d1149404248e675eea2a000
[]
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
308
java
package org.gradle.test.performancenull_323; import static org.junit.Assert.*; public class Testnull_32273 { private final Productionnull_32273 production = new Productionnull_32273("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
009e543fb57ea7c8ffda70c9b3646c6478ca2e52
05d2f529428706ff47cb6904dff5fa1e436cc66e
/src/main/java/com/aplos/cms/appconstants/CmsAppConstants.java
d2a6751e047c357fdd5fec18c9a5701e73f603f4
[]
no_license
aplossystems/aplos-cms
c022675d096c4dd5fb9e8e9a1f8291161e270dd7
a92f18f50188d7a17eba0771c5d4655599f68499
refs/heads/master
2020-04-26T04:48:41.058918
2017-01-27T23:58:42
2017-01-27T23:58:42
38,503,895
0
0
null
null
null
null
UTF-8
Java
false
false
1,166
java
package com.aplos.cms.appconstants; public class CmsAppConstants { public static final String BLOG_ARCHIVE = "blogArchive"; public static final String BLOG_ENTRY_ID = "blogEntryId"; public static final String CMS_INNER_TEMPLATE_CONTENT_MAP = "cmsInnerTemplateContentMap"; public static final String CMS_MODULE_VERSION_MAJOR = "CmsModuleVersionMajor"; public static final String CMS_MODULE_VERSION_MINOR = "CmsModuleVersionMinor"; public static final String CMS_MODULE_VERSION_PATCH = "CmsModuleVersionPatch"; public static final String CMS_PAGE_CONTENT_HOLDER = "cmsPageContentHolder"; public static final String CMS_PAGE_REVISION_ID = "cpr_id"; public static final String CMS_PAGE_ID = "cp_id"; public static final String COMPANY_DETAILS_ID = "companyDetailsId"; public static final String DESIGNERS_MENU = "designersMenu"; public static final String FRONT_END_GENERATED_MENU_MAP = "frontendGeneratedMenuMap"; public static final String CASE_STUDY_ID = "caseStudyId"; public static final String PRODUCT_GROUP_PAGES = "productGroupPages"; public static final String SITE_ID = "siteId"; public static final String TEMPLATE_CLASS = "templateClass"; }
[ "info@aplossystems.co.uk" ]
info@aplossystems.co.uk