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
b15f709aa789649050bd4e6b6cc813b78df5e469
231a828518021345de448c47c31f3b4c11333d0e
/src/pdf/bouncycastle/jcajce/spec/KTSParameterSpec.java
e20deff98e21975fa53b5aac38f7e2bb959b95c8
[]
no_license
Dynamit88/PDFBox-Java
f39b96b25f85271efbb3a9135cf6a15591dec678
480a576bc97fc52299e1e869bb80a1aeade67502
refs/heads/master
2020-05-24T14:58:29.287880
2019-05-18T04:25:21
2019-05-18T04:25:21
187,312,933
0
0
null
null
null
null
UTF-8
Java
false
false
4,994
java
package pdf.bouncycastle.jcajce.spec; import java.security.spec.AlgorithmParameterSpec; import pdf.bouncycastle.asn1.nist.NISTObjectIdentifiers; import pdf.bouncycastle.asn1.x509.AlgorithmIdentifier; import pdf.bouncycastle.asn1.x9.X9ObjectIdentifiers; import pdf.bouncycastle.util.Arrays; /** * Parameter spec for doing KTS based wrapping via the Cipher API. */ public class KTSParameterSpec implements AlgorithmParameterSpec { private final String wrappingKeyAlgorithm; private final int keySizeInBits; private final AlgorithmParameterSpec parameterSpec; private final AlgorithmIdentifier kdfAlgorithm; private byte[] otherInfo; /** * Builder class for creating a KTSParameterSpec. */ public static final class Builder { private final String algorithmName; private final int keySizeInBits; private AlgorithmParameterSpec parameterSpec; private AlgorithmIdentifier kdfAlgorithm; private byte[] otherInfo; /** * Basic builder. * * @param algorithmName the algorithm name for the secret key we use for wrapping. * @param keySizeInBits the size of the wrapping key we want to produce in bits. */ public Builder(String algorithmName, int keySizeInBits) { this(algorithmName, keySizeInBits, null); } /** * Basic builder. * * @param algorithmName the algorithm name for the secret key we use for wrapping. * @param keySizeInBits the size of the wrapping key we want to produce in bits. * @param otherInfo the otherInfo/IV encoding to be applied to the KDF. */ public Builder(String algorithmName, int keySizeInBits, byte[] otherInfo) { this.algorithmName = algorithmName; this.keySizeInBits = keySizeInBits; this.kdfAlgorithm = new AlgorithmIdentifier(X9ObjectIdentifiers.id_kdf_kdf3, new AlgorithmIdentifier(NISTObjectIdentifiers.id_sha256)); this.otherInfo = (otherInfo == null) ? new byte[0] : Arrays.clone(otherInfo); } /** * Set the algorithm parameter spec to be used with the wrapper. * * @param parameterSpec the algorithm parameter spec to be used in wrapping/unwrapping. * @return the current Builder instance. */ public Builder withParameterSpec(AlgorithmParameterSpec parameterSpec) { this.parameterSpec = parameterSpec; return this; } /** * Set the KDF algorithm and digest algorithm for wrap key generation. * * @param kdfAlgorithm the KDF algorithm to apply. * @return the current Builder instance. */ public Builder withKdfAlgorithm(AlgorithmIdentifier kdfAlgorithm) { this.kdfAlgorithm = kdfAlgorithm; return this; } /** * Build the new parameter spec. * * @return a new parameter spec configured according to the builder state. */ public KTSParameterSpec build() { return new KTSParameterSpec(algorithmName, keySizeInBits, parameterSpec, kdfAlgorithm, otherInfo); } } private KTSParameterSpec( String wrappingKeyAlgorithm, int keySizeInBits, AlgorithmParameterSpec parameterSpec, AlgorithmIdentifier kdfAlgorithm, byte[] otherInfo) { this.wrappingKeyAlgorithm = wrappingKeyAlgorithm; this.keySizeInBits = keySizeInBits; this.parameterSpec = parameterSpec; this.kdfAlgorithm = kdfAlgorithm; this.otherInfo = otherInfo; } /** * Return the name of the algorithm for the wrapping key this key spec should use. * * @return the key algorithm. */ public String getKeyAlgorithmName() { return wrappingKeyAlgorithm; } /** * Return the size of the key (in bits) for the wrapping key this key spec should use. * * @return length in bits of the key to be calculated. */ public int getKeySize() { return keySizeInBits; } /** * Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted. * * @return the algorithm parameter spec to be used with the private key. */ public AlgorithmParameterSpec getParameterSpec() { return parameterSpec; } /** * Return the AlgorithmIdentifier for the KDF to do key derivation after extracting the secret. * * @return the AlgorithmIdentifier for the SecretKeyFactory's KDF. */ public AlgorithmIdentifier getKdfAlgorithm() { return kdfAlgorithm; } /** * Return the otherInfo data for initialising the KDF. * * @return the otherInfo data. */ public byte[] getOtherInfo() { return Arrays.clone(otherInfo); } }
[ "vtuse@mail.ru" ]
vtuse@mail.ru
ba3d3c78df26d30e10674d02b7013bcfad8c87b8
cb0e772430877ceb7b9a1656b8fc4ff36289250b
/Java/src/instructions/comparisons/dcmp/DCMPG.java
77cf775f77013e953b182e4a3503c0e230a84423
[]
no_license
LailaiMaster/JVM
4f296ef8f6c1708b8e4524692968aa31249d1932
0e3b830c12d5daa531dd01387b1fd74e2296ad34
refs/heads/master
2023-03-20T22:49:19.143489
2018-01-20T12:16:31
2018-01-20T12:16:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package instructions.comparisons.dcmp; import instructions.base.NoOperandsInstruction; import instructions.comparisons.fcmp.FCMP; import runtimedata.Zframe; /** * Author: zhangxin * Time: 2017/5/5 0005. * Desc: */ public class DCMPG extends NoOperandsInstruction { @Override public void execute(Zframe frame) { DCMP._dcmp(frame, true); } }
[ "zachaxy@163.com" ]
zachaxy@163.com
ffe3d4ef4df9f42303f92019ac210120eb529bd3
728aa6545b7fa2052822c49f2ff705bd2b5173eb
/src/main/java/com/questv/api/season/SeasonRepository.java
62acd20ad92ff48dbc44d7c41691ee57553caa21
[]
no_license
GersonSales/questv-api
9718bce14ead636aec8bcbb9385aff1623e05419
1d2e368e17911f7395963963213f58260ec8cd29
refs/heads/master
2022-07-13T00:38:43.637630
2020-05-19T20:04:03
2020-05-19T20:04:03
163,969,909
0
0
null
null
null
null
UTF-8
Java
false
false
274
java
package com.questv.api.season; import org.springframework.data.repository.CrudRepository; import java.util.List; import java.util.Optional; public interface SeasonRepository extends CrudRepository<SeasonModel, Long> { List<SeasonModel> findByName(final String name); }
[ "gerson.junior@ccc.ufcg.edu.br" ]
gerson.junior@ccc.ufcg.edu.br
c39324343c31031cbe866c46659426ba657c3c2b
644b2052fed921687a0fa5e92d421489a3967dd5
/app/src/main/java/com/ab/hicarerun/handler/OnKycClickHandler.java
8da4980464404e1156b6bcf5218f16b16fe6ab0a
[]
no_license
arjbht/HiCareApp
176a1213214245f7a83a5cf6b1b1ee24fd75c024
40b8f8cba5780718fe25d2202d90d10f6ac3f119
refs/heads/master
2021-10-05T00:36:37.675626
2021-08-27T09:31:55
2021-08-27T09:31:55
199,459,299
1
1
null
2021-09-24T08:11:17
2019-07-29T13:33:57
Java
UTF-8
Java
false
false
208
java
package com.ab.hicarerun.handler; /** * Created by Arjun Bhatt on 9/23/2020. */ public interface OnKycClickHandler { void onViewImageClicked(int position); void onDownloadClicked(int position); }
[ "bhatt.arjun97@gmail.com" ]
bhatt.arjun97@gmail.com
646efb336b91745cf78314dc0ce42495427974cc
91297ffb10fb4a601cf1d261e32886e7c746c201
/cnd.debugger.common2/src/org/netbeans/modules/cnd/debugger/common2/values/StringEditor.java
d6f07f34424f073130125a2a2dd8dc13a844324a
[]
no_license
JavaQualitasCorpus/netbeans-7.3
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
60018fd982f9b0c9fa81702c49980db5a47f241e
refs/heads/master
2023-08-12T09:29:23.549956
2019-03-16T17:06:32
2019-03-16T17:06:32
167,005,013
0
0
null
null
null
null
UTF-8
Java
false
false
3,148
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * Contributor(s): * * The Original Software is NetBeans. The Initial Developer of the Original * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun * Microsystems, Inc. All Rights Reserved. * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. */ package org.netbeans.modules.cnd.debugger.common2.values; import java.awt.Font; import java.awt.Color; import javax.swing.JLabel; public class StringEditor extends AsyncEditor { public boolean isPaintable() { return true; } private static class LabelHolder { static final JLabel label = new JLabel(); }; public void paintValue(java.awt.Graphics g, java.awt.Rectangle box) { // 'label' instantiated on first use JLabel LABEL = LabelHolder.label; LABEL.setForeground(Color.black); LABEL.setFont(g.getFont()); g.translate(box.x, box.y); Object o = getValue(); if (o != null) { LABEL.setText(o.toString()); } else { LABEL.setText(""); // NOI18N } LABEL.setSize(box.width, box.height); LABEL.paint(g); g.translate(-box.x, -box.y); } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
8d68f354de7cc2f0900d8abc8626bb812f8e70c0
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE369_Divide_By_Zero/CWE369_Divide_By_Zero__getCookiesServlet_modulo_61a.java
0feec192ac08cbfbca91bd17945403111392e3ae
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,995
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE369_Divide_By_Zero__getCookiesServlet_modulo_61a.java Label Definition File: CWE369_Divide_By_Zero.label.xml Template File: sources-sinks-61a.tmpl.java */ /* * @description * CWE: 369 Divide by zero * BadSource: getCookiesServlet Read data from the first cookie * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: modulo * GoodSink: Check for zero before modulo * BadSink : Modulo by a value that may be zero * Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package * * */ package testcases.CWE369_Divide_By_Zero; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; import java.security.SecureRandom; public class CWE369_Divide_By_Zero__getCookiesServlet_modulo_61a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data = (new CWE369_Divide_By_Zero__getCookiesServlet_modulo_61b()).bad_source(request, response); /* POTENTIAL FLAW: Zero modulus will cause an issue. An integer division will result in an exception. */ IO.writeLine("100%" + String.valueOf(data) + " = " + (100 % data) + "\n"); } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* goodG2B() - use goodsource and badsink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data = (new CWE369_Divide_By_Zero__getCookiesServlet_modulo_61b()).goodG2B_source(request, response); /* POTENTIAL FLAW: Zero modulus will cause an issue. An integer division will result in an exception. */ IO.writeLine("100%" + String.valueOf(data) + " = " + (100 % data) + "\n"); } /* goodB2G() - use badsource and goodsink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data = (new CWE369_Divide_By_Zero__getCookiesServlet_modulo_61b()).goodB2G_source(request, response); /* FIX: test for a zero modulus */ if( data != 0 ) { IO.writeLine("100%" + String.valueOf(data) + " = " + (100 % data) + "\n"); } else { IO.writeLine("This would result in a modulo by zero"); } } /* 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); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
1a3b69023a0b3a25419823898c26ca1cf69347a0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_83a25c036fb6cf0011b4d6074a3da0a07069ea80/BankAccount/2_83a25c036fb6cf0011b4d6074a3da0a07069ea80_BankAccount_t.java
b1e90b0591d845c5ca37ed214b01f5c3eb8b3949
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,635
java
/* * Straight - A system to manage financial demands for small and decentralized * organizations. * Copyright (C) 2011 Octahedron * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package br.octahedron.figgo.modules.bank.data; import java.io.Serializable; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collection; import javax.jdo.annotations.NotPersistent; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import br.octahedron.figgo.modules.bank.TransactionInfoService; import br.octahedron.util.Log; /** * @author Danilo Queiroz */ @PersistenceCapable public class BankAccount implements Serializable { private static final Log logger = new Log(BankAccount.class); private static final long serialVersionUID = 7892638707825018254L; @PrimaryKey @Persistent private String ownerId; @Persistent private boolean enabled; @Persistent private BigDecimal value; @Persistent private Long lastTimestamp; @Persistent private Collection<Long> lastTransactionId = new ArrayList<Long>(); @NotPersistent private transient TransactionInfoService transactionInfoService; public BankAccount(String ownerId) { this.ownerId = ownerId; this.value = new BigDecimal(0); this.lastTimestamp = null; this.enabled = true; } public void setTransactionInfoService(TransactionInfoService tInfoService) { this.transactionInfoService = tInfoService; } /** * @return the enabled */ public boolean isEnabled() { return this.enabled; } /** * @param enabled * the enabled to set */ public void setEnabled(boolean enabled) { this.enabled = enabled; } /** * @return the ownerId */ public String getOwnerId() { return this.ownerId; } /** * @return the balance's value */ public BigDecimal getBalance() { if (this.transactionInfoService == null) { throw new IllegalStateException("TransactionInfoService cannot be null. Must be set before balance operations"); } Collection<BankTransaction> transactions = this.transactionInfoService.getLastTransactions(this.ownerId, this.lastTimestamp); if (!transactions.isEmpty()) { BigDecimal transactionsBalance = new BigDecimal(0); for (BankTransaction bankTransaction : transactions) { if (!this.lastTransactionId.contains(bankTransaction.getId())) { // Transaction ID not used yet. if (bankTransaction.isOrigin(this.ownerId)) { transactionsBalance = transactionsBalance.subtract(bankTransaction.getAmount()); } else { transactionsBalance = transactionsBalance.add(bankTransaction.getAmount()); } this.updateLastTransactionData(bankTransaction); } } this.value = this.value.add(transactionsBalance); if (value.compareTo(BigDecimal.ZERO) < 0) { logger.error("Something goes wrong - The account %s has a negative balance: %s", this.ownerId, this.value); } } return this.value; } /** * @param bankTransaction */ private void updateLastTransactionData(BankTransaction bankTransaction) { long currentTransactionId = bankTransaction.getId(); Long currentTransactionTimestamp = bankTransaction.getTimestamp(); if (currentTransactionTimestamp.equals(this.lastTimestamp)) { this.lastTransactionId.add(currentTransactionId); } if( this.lastTimestamp == null || currentTransactionTimestamp.compareTo(this.lastTimestamp) > 0 ) { this.lastTransactionId.clear(); this.lastTransactionId.add(currentTransactionId); this.lastTimestamp = currentTransactionTimestamp; } } @Override public int hashCode() { return this.ownerId.hashCode(); } @Override public boolean equals(Object obj) { if (obj instanceof BankAccount) { BankAccount other = (BankAccount) obj; return this.ownerId.equals(other.ownerId); } else { return false; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d5f0d91f1071165839941f0f98cacd5a0cc1214c
7a76838d738be65d601f164cb5a97b699be1da2b
/spring-batch-in-action/base/base/spring-batch/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/trade/internal/CommonsLoggingInvalidCustomerLogger.java
fc402cc123d83aaedf277a7df59a3c24d173917d
[ "Apache-2.0" ]
permissive
jinminer/spring-batch
fafdedec5de3198aa0c05353a26f0238b396bebc
f2e29682f882c8656b283030279e95ebcf08868a
refs/heads/master
2022-12-22T21:04:27.438433
2019-10-08T16:58:10
2019-10-08T16:58:10
209,073,938
1
1
Apache-2.0
2022-12-16T01:35:27
2019-09-17T14:18:30
Java
UTF-8
Java
false
false
1,497
java
/* * Copyright 2006-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.batch.sample.domain.trade.internal; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.core.launch.support.CommandLineJobRunner; import org.springframework.batch.sample.domain.trade.CustomerUpdate; import org.springframework.batch.sample.domain.trade.InvalidCustomerLogger; /** * @author Lucas Ward * */ public class CommonsLoggingInvalidCustomerLogger implements InvalidCustomerLogger { protected static final Log LOG = LogFactory.getLog(CommandLineJobRunner.class); /* (non-Javadoc) * @see org.springframework.batch.sample.domain.trade.InvalidCustomerLogger#log(org.springframework.batch.sample.domain.trade.CustomerUpdate) */ @Override public void log(CustomerUpdate customerUpdate) { LOG.error("invalid customer encountered: [ " + customerUpdate + "]"); } }
[ "jinm@uxunchina.com" ]
jinm@uxunchina.com
2f6fe03cf4d227f7b4510ee74163fb29d2d8d47a
511a5e5b585be029dc61dd95390c812027c2413b
/newapp/src/main/java/com/tzpt/cloudlibrary/ui/library/LibraryIntroduceView.java
2d6856636a6b512360b15510e297285431d82375
[]
no_license
MengkZhang/ebook
60733cff344dd906c20ec657d95e4fa4d0789cf5
109101ebad3e8e5274e758c786013aab650c3ff1
refs/heads/master
2020-05-07T09:56:05.996761
2019-04-09T15:17:10
2019-04-09T15:17:10
180,392,558
4
1
null
null
null
null
UTF-8
Java
false
false
2,688
java
package com.tzpt.cloudlibrary.ui.library; import android.content.Context; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.tzpt.cloudlibrary.R; import com.tzpt.cloudlibrary.utils.StringUtils; /** * 本馆介绍 * Created by tonyjia on 2018/11/20. */ public class LibraryIntroduceView extends LinearLayout { public LibraryIntroduceView(Context context) { this(context, null); } public LibraryIntroduceView(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } public LibraryIntroduceView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initViews(context); } private TextView mLibIntrocudeTv; private TextView mLibOpenTodayTv; private TextView mLibDistanceTv; private TextView mLibAddressTv; private ImageView mLibLogoIv; private Context mContext; private void initViews(Context context) { this.mContext = context; inflate(context, R.layout.view_library_introduce, this); mLibIntrocudeTv = (TextView) findViewById(R.id.lib_introduce_tv); mLibOpenTodayTv = (TextView) findViewById(R.id.lib_open_today_tv); mLibDistanceTv = (TextView) findViewById(R.id.lib_distance_tv); mLibAddressTv = (TextView) findViewById(R.id.lib_address_tv); mLibLogoIv = (ImageView) findViewById(R.id.lib_logo_iv); } /** * 设置今日开放 * * @param todayInfo 今日开放 */ public void setOpenToday(String todayInfo) { mLibOpenTodayTv.setText(mContext.getString(R.string.open_today, todayInfo)); } /** * 设置距离 */ public void setLibDistance(int distance) { mLibDistanceTv.setText(StringUtils.mToKm(distance)); } /** * 设置地址 * * @param address 地址 */ public void setAddress(String address) { mLibAddressTv.setText(mContext.getString(R.string.lib_address, address)); } /** * 获取logo ImageView * * @return */ public ImageView getLibLogoImageView() { return mLibLogoIv; } /** * 设置标题 * * @param title 标题 */ public void setTitle(String title) { mLibIntrocudeTv.setText(title); } /** * 设置营业时间 * * @param todayInfo 营业时间 */ public void setOpenTimeToday(String todayInfo) { mLibOpenTodayTv.setText(mContext.getString(R.string.open_time_today, todayInfo)); } }
[ "653651979@qq.com" ]
653651979@qq.com
48987d2248feae05dabd5a00a01d9ca87b2307ec
0ad5458bf9edd95d4c03d4b10d7f644022a59cd7
/src/main/java/ch/ethz/idsc/owl/bot/sat/SatelliteEntity.java
10d989cb6331e9589b00fb0f46337643708c5985
[]
no_license
yangshuo11/owl
596e2e15ab7463944df0daecf34f1c74cb2806cc
9e8a917ab34d7283dc0cc3514689a6e7683d5e98
refs/heads/master
2020-04-05T08:44:51.622349
2018-10-29T05:56:00
2018-10-29T05:56:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,607
java
// code by jph package ch.ethz.idsc.owl.bot.sat; import java.awt.Color; import java.awt.Graphics2D; import java.util.Collection; import ch.ethz.idsc.owl.glc.adapter.EtaRaster; import ch.ethz.idsc.owl.glc.core.GoalInterface; import ch.ethz.idsc.owl.glc.core.PlannerConstraint; import ch.ethz.idsc.owl.glc.core.StateTimeRaster; import ch.ethz.idsc.owl.glc.core.TrajectoryPlanner; import ch.ethz.idsc.owl.glc.std.StandardTrajectoryPlanner; import ch.ethz.idsc.owl.gui.ani.AbstractCircularEntity; import ch.ethz.idsc.owl.gui.win.GeometricLayer; import ch.ethz.idsc.owl.math.flow.Flow; import ch.ethz.idsc.owl.math.flow.Integrator; import ch.ethz.idsc.owl.math.flow.RungeKutta45Integrator; import ch.ethz.idsc.owl.math.map.Se2Utils; import ch.ethz.idsc.owl.math.state.FallbackControl; import ch.ethz.idsc.owl.math.state.FixedStateIntegrator; import ch.ethz.idsc.owl.math.state.SimpleEpisodeIntegrator; import ch.ethz.idsc.owl.math.state.StateIntegrator; import ch.ethz.idsc.owl.math.state.StateTime; import ch.ethz.idsc.owl.math.state.TrajectoryControl; import ch.ethz.idsc.tensor.RationalScalar; import ch.ethz.idsc.tensor.RealScalar; import ch.ethz.idsc.tensor.Scalar; import ch.ethz.idsc.tensor.Tensor; import ch.ethz.idsc.tensor.Tensors; import ch.ethz.idsc.tensor.alg.Array; import ch.ethz.idsc.tensor.alg.Join; import ch.ethz.idsc.tensor.red.Norm2Squared; /* package */ class SatelliteEntity extends AbstractCircularEntity { protected static final Tensor PARTITION_SCALE = Tensors.vector(5, 5, 6, 6).unmodifiable(); private static final Tensor SHAPE = Tensors.matrixDouble( // new double[][] { { .3, 0, 1 }, { -.1, -.1, 1 }, { -.1, +.1, 1 } }).unmodifiable(); private static final SatelliteStateSpaceModel SATELLITE_MODEL = new SatelliteStateSpaceModel(); private static final Integrator INTEGRATOR = RungeKutta45Integrator.INSTANCE; // --- private final Collection<Flow> controls; public Scalar delayHint = RealScalar.ONE; /** @param state initial position of entity */ public SatelliteEntity(Tensor state, TrajectoryControl trajectoryControl, Collection<Flow> controls) { super( // new SimpleEpisodeIntegrator(SATELLITE_MODEL, INTEGRATOR, new StateTime(state, RealScalar.ZERO)), // trajectoryControl); add(new FallbackControl(Array.zeros(2))); this.controls = controls; } @Override public Scalar distance(Tensor x, Tensor y) { return Norm2Squared.between(x, y); // non-negative } @Override public final Scalar delayHint() { return delayHint; } @Override public final TrajectoryPlanner createTrajectoryPlanner(PlannerConstraint plannerConstraint, Tensor goal) { StateIntegrator stateIntegrator = // FixedStateIntegrator.create(INTEGRATOR, RationalScalar.of(1, 12), 4); Tensor center = Join.of(goal.extract(0, 2), Array.zeros(2)); GoalInterface goalInterface = SatelliteGoalManager.create( // center, Tensors.vector(0.5, 0.5, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY)); StateTimeRaster stateTimeRaster = EtaRaster.state(PARTITION_SCALE); return new StandardTrajectoryPlanner( // stateTimeRaster, stateIntegrator, controls, plannerConstraint, goalInterface); } @Override public void render(GeometricLayer geometricLayer, Graphics2D graphics) { super.render(geometricLayer, graphics); { Tensor xya = geometricLayer.getMouseSe2State(); geometricLayer.pushMatrix(Se2Utils.toSE2Matrix(xya)); graphics.setColor(new Color(0, 128, 255, 192)); graphics.fill(geometricLayer.toPath2D(SHAPE)); geometricLayer.popMatrix(); } } }
[ "jan.hakenberg@gmail.com" ]
jan.hakenberg@gmail.com
1824aeaba5cac9d04e6586fe25ff78c735a4a1fb
d93ce8a57be61625c4259b41f860c596726bd2af
/src/main/java/soot/jimple/toolkits/pointer/DependenceTag.java
f803413370497b5bf39d9dffaa0cd3d4a13e90f4
[ "Apache-2.0" ]
permissive
izgzhen/markii
81b67049ce817582736c8d630ec0e2cd12caa214
237a054a72f01121ce0fefac7532c1a39444e852
refs/heads/master
2023-05-06T00:24:48.026714
2021-04-14T17:41:27
2021-04-16T06:29:12
275,070,321
5
0
Apache-2.0
2021-04-16T06:29:13
2020-06-26T04:06:53
Java
UTF-8
Java
false
false
1,934
java
package soot.jimple.toolkits.pointer; /*- * #%L * Soot - a J*va Optimization Framework * %% * Copyright (C) 2003 Ondrej Lhotak * %% * This program 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 program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-2.1.html>. * #L% */ import soot.tagkit.Tag; public class DependenceTag implements Tag { private final static String NAME = "DependenceTag"; protected short read = -1; protected short write = -1; protected boolean callsNative = false; public boolean setCallsNative() { boolean ret = !callsNative; callsNative = true; return ret; } protected void setRead(short s) { read = s; } protected void setWrite(short s) { write = s; } public String getName() { return NAME; } public byte[] getValue() { byte[] ret = new byte[5]; ret[0] = (byte) ((read >> 8) & 0xff); ret[1] = (byte) (read & 0xff); ret[2] = (byte) ((write >> 8) & 0xff); ret[3] = (byte) (write & 0xff); ret[4] = (byte) (callsNative ? 1 : 0); return ret; } public String toString() { StringBuffer buf = new StringBuffer(); if (callsNative) { buf.append("SECallsNative\n"); } if (read >= 0) { buf.append("SEReads : " + read + "\n"); } if (write >= 0) { buf.append("SEWrites: " + write + "\n"); } return buf.toString(); } }
[ "7168454+izgzhen@users.noreply.github.com" ]
7168454+izgzhen@users.noreply.github.com
c03dd8d8d401feba5efd9de69f7dd7250d7736b8
b85376d5c76246b2866a743d70a723e17f99b08e
/Algorithm_931_Minimum Falling Path Sum.java
9aaf66ae6543c3c23ef7a39a8b728429672aef55
[]
no_license
zclyne/LeetCode-Problems
db56a21ea6620ccb7506e24622490560c039225e
3f59e4c2ac7dc95e4b9e70e705616f5ee4915967
refs/heads/master
2022-08-27T12:00:49.477906
2022-08-22T20:23:10
2022-08-22T20:23:10
123,556,538
7
0
null
null
null
null
UTF-8
Java
false
false
1,290
java
// 思路:对每一个元素A[i][j],它所能到达的后继元素是确定的,一定是下一行的第j - 1、j或j + 1列 // 因此对于每个元素,要使得到达该元素的路径上的所有数之和最小,只需要找A[i - 1][j - 1]、A[i - 1][j]和A[i - 1][j + 1]中最小的一个加到A[i][j]上 // 并用这个和取代原来的A[i][j]成为新的A[i][j] // 重复以上操作直到最后一行时,找最后一行中的最小值即为答案 class Solution { public int minFallingPathSum(int[][] A) { for (int i = 1; i < A.length; i++) { // row for (int j = 0; j < A.length; j++) { // column if (j == 0) { A[i][j] = Math.min(A[i - 1][j], A[i - 1][j + 1]) + A[i][j]; } else if (j == A.length - 1) { A[i][j] = Math.min(A[i - 1][j - 1], A[i - 1][j]) + A[i][j]; } else { int tmp = Math.min(A[i - 1][j], A[i - 1][j + 1]); tmp = Math.min(tmp, A[i - 1][j - 1]); A[i][j] = tmp + A[i][j]; } } } int res = Integer.MAX_VALUE; for (int i = 0; i < A.length; i++) { res = Math.min(res, A[A.length - 1][i]); } return res; } }
[ "zyfinori@gmail.com" ]
zyfinori@gmail.com
b7677da6813b19f0d91c8c50c5ead2539d2abc56
7a9046ca4c162ba2c87f94dfc400bda981888e03
/src/java/com/cardpay/pccredit/intopieces/model/DcddpzForm.java
5834ebdb52a483436faf74a37b91033edf8fae6f
[ "Apache-2.0" ]
permissive
wangpggg/PCCredit_YQ
6041d430ec7e56b29ba9b55b8dd26194894f1bf6
79863c047f309b16b9ae3be5d686ac345629c33e
refs/heads/master
2021-01-18T12:01:44.526784
2016-06-20T08:17:10
2016-06-20T08:17:10
61,018,565
0
0
null
2016-06-13T08:03:47
2016-06-13T08:03:46
null
UTF-8
Java
false
false
3,182
java
/** * */ package com.cardpay.pccredit.intopieces.model; import com.wicresoft.jrad.base.web.form.BaseForm; /** * 调查模板 -道德品质 */ public class DcddpzForm extends BaseForm{ private static final long serialVersionUID = 1L; private String customer_id; private String product_id; private String application_id; private String szpg_gzxx; private String szpg_rhjl; private String szpg_syfm; private String szpg_gyhd; private String szpg_blsh; private String xyjl_wffz; private String xyjl_zxbg; private String xyjl_tqfy; private String xyjl_ggsstp; private String xyjl_jtwz; private String xyjl_dhqf; private String xyjl_qzjq; private String zjxy_zczj; private String zjxy_wfzj; public String getCustomer_id() { return customer_id; } public void setCustomer_id(String customer_id) { this.customer_id = customer_id; } public String getProduct_id() { return product_id; } public void setProduct_id(String product_id) { this.product_id = product_id; } public String getApplication_id() { return application_id; } public void setApplication_id(String application_id) { this.application_id = application_id; } public String getSzpg_gzxx() { return szpg_gzxx; } public void setSzpg_gzxx(String szpg_gzxx) { this.szpg_gzxx = szpg_gzxx; } public String getSzpg_rhjl() { return szpg_rhjl; } public void setSzpg_rhjl(String szpg_rhjl) { this.szpg_rhjl = szpg_rhjl; } public String getSzpg_syfm() { return szpg_syfm; } public void setSzpg_syfm(String szpg_syfm) { this.szpg_syfm = szpg_syfm; } public String getSzpg_gyhd() { return szpg_gyhd; } public void setSzpg_gyhd(String szpg_gyhd) { this.szpg_gyhd = szpg_gyhd; } public String getSzpg_blsh() { return szpg_blsh; } public void setSzpg_blsh(String szpg_blsh) { this.szpg_blsh = szpg_blsh; } public String getXyjl_wffz() { return xyjl_wffz; } public void setXyjl_wffz(String xyjl_wffz) { this.xyjl_wffz = xyjl_wffz; } public String getXyjl_zxbg() { return xyjl_zxbg; } public void setXyjl_zxbg(String xyjl_zxbg) { this.xyjl_zxbg = xyjl_zxbg; } public String getXyjl_tqfy() { return xyjl_tqfy; } public void setXyjl_tqfy(String xyjl_tqfy) { this.xyjl_tqfy = xyjl_tqfy; } public String getXyjl_ggsstp() { return xyjl_ggsstp; } public void setXyjl_ggsstp(String xyjl_ggsstp) { this.xyjl_ggsstp = xyjl_ggsstp; } public String getXyjl_jtwz() { return xyjl_jtwz; } public void setXyjl_jtwz(String xyjl_jtwz) { this.xyjl_jtwz = xyjl_jtwz; } public String getXyjl_dhqf() { return xyjl_dhqf; } public void setXyjl_dhqf(String xyjl_dhqf) { this.xyjl_dhqf = xyjl_dhqf; } public String getXyjl_qzjq() { return xyjl_qzjq; } public void setXyjl_qzjq(String xyjl_qzjq) { this.xyjl_qzjq = xyjl_qzjq; } public String getZjxy_zczj() { return zjxy_zczj; } public void setZjxy_zczj(String zjxy_zczj) { this.zjxy_zczj = zjxy_zczj; } public String getZjxy_wfzj() { return zjxy_wfzj; } public void setZjxy_wfzj(String zjxy_wfzj) { this.zjxy_wfzj = zjxy_wfzj; } }
[ "jianghanshi@vip.qq.com" ]
jianghanshi@vip.qq.com
efe34d5b7fc953d27415107841ec2743c018fd65
29159bc4c137fe9104d831a5efe346935eeb2db5
/mmj-cloud-good/src/main/java/com/mmj/good/model/GoodSaleEx.java
806f90b4168f5e1afa9ac930a3189b9e97e63901
[]
no_license
xddpool/mmj-cloud
bfb06d2ef08c9e7b967c63f223fc50b1a56aac1c
de4bcb35db509ce929d516d83de765fdc2afdac5
refs/heads/master
2023-06-27T11:16:38.059125
2020-07-24T03:23:48
2020-07-24T03:23:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,212
java
package com.mmj.good.model; import java.util.List; public class GoodSaleEx extends GoodSale { private List<Integer> goodIds; //商品id - 查询条件 private List<Integer> saleIds; //销售id - 查询条件 private List<String> goodSkus; //sku - 查询条件 private Integer warehouseNum; //库存数据 private String wareHouseShow; //商品仓库展示名称,多个已逗号分隔,数据来源从goodWarehouses获取 private String goodStatus; //商品状态 -1:删除 0:暂不发布 1:立即上架 2:自动上架 3:上架失败 private List<GoodModelEx> goodModelExes; private List<GoodWarehouse> goodWarehouses;//sku仓库 public List<Integer> getGoodIds() { return goodIds; } public void setGoodIds(List<Integer> goodIds) { this.goodIds = goodIds; } public List<Integer> getSaleIds() { return saleIds; } public void setSaleIds(List<Integer> saleIds) { this.saleIds = saleIds; } public List<String> getGoodSkus() { return goodSkus; } public void setGoodSkus(List<String> goodSkus) { this.goodSkus = goodSkus; } public Integer getWarehouseNum() { return warehouseNum; } public void setWarehouseNum(Integer warehouseNum) { this.warehouseNum = warehouseNum; } public String getWareHouseShow() { return wareHouseShow; } public void setWareHouseShow(String wareHouseShow) { this.wareHouseShow = wareHouseShow; } public String getGoodStatus() { return goodStatus; } public void setGoodStatus(String goodStatus) { this.goodStatus = goodStatus; } public List<GoodModelEx> getGoodModelExes() { return goodModelExes; } public void setGoodModelExes(List<GoodModelEx> goodModelExes) { this.goodModelExes = goodModelExes; } public List<GoodWarehouse> getGoodWarehouses() { return goodWarehouses; } public void setGoodWarehouses(List<GoodWarehouse> goodWarehouses) { this.goodWarehouses = goodWarehouses; } }
[ "shenfuding@shenfudingdeMacBook-Pro.local" ]
shenfuding@shenfudingdeMacBook-Pro.local
b7a31eb9b69f7acb684f5c4810f7a5294dc6d246
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_2/src/b/d/a/f/Calc_1_2_13057.java
f32a1411c964550888a34a1da1a06a0e41c44b69
[]
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.d.a.f; public class Calc_1_2_13057 { /** @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
0da8054ed14659e150754faef46287b33ea96f3c
2446d95749442f418fcc60acec6b67aa09624d42
/fun-service/src/main/java/com/xiaoyu/fun/service/CoreInfoService.java
daf9b99a45ea1411050af0b309d22ac2ef7b453b
[]
no_license
baijianwei827/xiaoyu-fun
f2786e3e5ae90fd13930a504ded03ff819b44c88
b338c4fd8c16d316d753bd4667f866c50f6e1b43
refs/heads/master
2021-09-10T22:22:10.016064
2018-04-03T09:10:53
2018-04-03T09:10:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
620
java
package com.xiaoyu.fun.service; import com.xiaoyu.fun.entity.CoreInfo; public interface CoreInfoService { /** * 添加 * @param coreInfo * @return */ public boolean insertCoreInfo(CoreInfo coreInfo); /** * 修改 * @param coreInfo * @return */ public boolean updateCoreInfo(CoreInfo coreInfo); /** * 删除 * @param coreInfo * @return */ public boolean deleteCoreInfo(CoreInfo coreInfo); /** * 查询 * @param coreInfo * @return */ public CoreInfo getCoreInfo(CoreInfo coreInfo); //<=================定制内容开始============== //==================定制内容结束==============> }
[ "zy135185@163.com" ]
zy135185@163.com
72762b6322bdff3651eb8b1bf12820d9fd6d9e81
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/domain/MybankCreditSupplychainTradeCancelModel.java
d04b0ad9500cb18a84b6ac13c9b6f95237cd2ca1
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,549
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 交易取消 * * @author auto create * @since 1.0, 2018-07-06 12:00:14 */ public class MybankCreditSupplychainTradeCancelModel extends AlipayObject { private static final long serialVersionUID = 3522584846687957686L; /** * 买家会员信息 */ @ApiField("buyer") private Member buyer; /** * 渠道,枚举如下:TMGXBL:天猫供销保理,TYZBL:通用自保理,TMZBL:天猫自保理,DSCYFRZ:大搜车预付融资,TMJX:天猫经销池融资 */ @ApiField("channel") private String channel; /** * 扩展字段,json类型的字符串 */ @ApiField("ext_data") private String extData; /** * 外部订单号,格式:机构ipRoleId_外部订单号 */ @ApiField("out_order_no") private String outOrderNo; /** * 幂等编号,用于幂等控制,格式:机构ipRoleId_yyyymmddhhmmss_8位uniqId */ @ApiField("request_id") private String requestId; /** * 销售产品码 */ @ApiField("sale_pd_code") private String salePdCode; /** * 卖家会员信息 */ @ApiField("seller") private Member seller; /** * FACTORING:保理,PREPAYMENT:预付融资,CREDITPAY:信任付,POOL:池融资 */ @ApiField("trade_type") private String tradeType; public Member getBuyer() { return this.buyer; } public void setBuyer(Member buyer) { this.buyer = buyer; } public String getChannel() { return this.channel; } public void setChannel(String channel) { this.channel = channel; } public String getExtData() { return this.extData; } public void setExtData(String extData) { this.extData = extData; } public String getOutOrderNo() { return this.outOrderNo; } public void setOutOrderNo(String outOrderNo) { this.outOrderNo = outOrderNo; } public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getSalePdCode() { return this.salePdCode; } public void setSalePdCode(String salePdCode) { this.salePdCode = salePdCode; } public Member getSeller() { return this.seller; } public void setSeller(Member seller) { this.seller = seller; } public String getTradeType() { return this.tradeType; } public void setTradeType(String tradeType) { this.tradeType = tradeType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
4d15c3cca9b91c74c5cfa4a2c15d2e2222166014
41f4f1fd29561eb376deb9aee44a1c2227af87f9
/bus-image/src/main/java/org/aoju/bus/image/nimble/opencv/NativeJ2kImageReaderSpi.java
ff15d58fa6b30f221b31078915030b8c65c40c82
[ "MIT" ]
permissive
learn-knowlege/bus
ddde17b3fa84fdf909d11d3ece9214ba21da902d
25f2e1cafed7c1a2a483d5e168b6c415a8f25fad
refs/heads/master
2023-01-14T09:54:33.479981
2020-10-13T10:37:35
2020-10-13T10:37:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,679
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2020 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.image.nimble.opencv; import javax.imageio.ImageReader; import javax.imageio.spi.ImageReaderSpi; import javax.imageio.stream.ImageInputStream; import java.io.IOException; import java.util.Locale; /** * @author Kimi Liu * @version 6.1.1 * @since JDK 1.8+ */ public class NativeJ2kImageReaderSpi extends ImageReaderSpi { public static final String[] SUFFIXES = {"jp2", "jp2k", "j2k", "j2c"}; public static final String[] NAMES = {"jpeg2000-cv", "jpeg2000", "JP2KSimpleBox", "jpeg 2000", "JPEG 2000", "JPEG2000"}; public static final String[] MIMES = {"image/jp2", "image/jp2k", "image/j2k", "image/j2c"}; public NativeJ2kImageReaderSpi() { super("Bus Team", "1.5", NAMES, SUFFIXES, MIMES, NativeImageReader.class.getName(), new Class[]{ImageInputStream.class}, new String[]{}, false, // supportsStandardStreamMetadataFormat null, // nativeStreamMetadataFormatName null, // nativeStreamMetadataFormatClassName null, // extraStreamMetadataFormatNames null, // extraStreamMetadataFormatClassNames false, // supportsStandardImageMetadataFormat null, null, null, null); } @Override public String getDescription(Locale locale) { return "Natively-accelerated JPEG2000 Image Reader (OpenJPEG based)"; } @Override public boolean canDecodeInput(Object source) throws IOException { if (!(source instanceof ImageInputStream)) { return false; } ImageInputStream iis = (ImageInputStream) source; iis.mark(); try { int marker = (iis.read() << 8) | iis.read(); if (marker == 0xFF4F) { return true; } iis.reset(); iis.mark(); byte[] b = new byte[12]; iis.readFully(b); // Verify the signature box // The length of the signature box is 12 if (b[0] != 0 || b[1] != 0 || b[2] != 0 || b[3] != 12) { return false; } // The signature box type is "jP " if ((b[4] & 0xff) != 0x6A || (b[5] & 0xFF) != 0x50 || (b[6] & 0xFF) != 0x20 || (b[7] & 0xFF) != 0x20) { return false; } // The signature content is 0x0D0A870A return (b[8] & 0xFF) != 0x0D || (b[9] & 0xFF) != 0x0A || (b[10] & 0xFF) != 0x87 || (b[11] & 0xFF) != 0x0A; } finally { iis.reset(); } } @Override public ImageReader createReaderInstance(Object extension) { return new NativeImageReader(this, true); } }
[ "839536@qq.com" ]
839536@qq.com
5902fc1a1602b2a70b497d7618b92e450b17fc95
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/59/org/apache/commons/lang/StringUtils_splitWorker_2263.java
6aa167ac738ba2e4d53dec8d56d8dcb6d04b8213
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
8,162
java
org apach common lang oper link java lang string code code safe empti isempti blank isblank check string text trim strip remov lead trail whitespac equal compar string safe index indexof index lastindexof safe index check index indexofani index lastindexofani index indexofanybut index lastindexofanybut index set string containsonli containsnon string charact substr left mid safe substr extract substr substringbefor substr substringaft substr substringbetween substr extract rel string split join split string arrai substr vice versa remov delet remov part string replac overlai search string replac string chomp chop remov part string left pad leftpad pad rightpad center repeat pad string upper case uppercas lower case lowercas swap case swapcas capit uncapit string count match countmatch count number occurr string alpha isalpha numer isnumer whitespac iswhitespac ascii printabl isasciiprint check charact string default string defaultstr protect input string revers revers delimit reversedelimit revers string abbrevi abbrevi string ellipsi differ compar string report differ levenstein distanc levensteindist number need chang string code string util stringutil code defin word relat string handl code code empti length string code code space space charact code code whitespac charact defin link charact whitespac iswhitespac trim charact link string trim code string util stringutil code handl code code input string quietli code code input code code code code code code return detail vari method side effect code code handl code null pointer except nullpointerexcept code consid bug code string util stringutil code deprec method method give sampl code explain oper symbol code code input includ code code java lang string author href http jakarta apach org turbin apach jakarta turbin author href mailto jon latchkei jon steven author href mailto dlr finemaltcod daniel rall author href mailto gcoladonato yahoo greg coladonato author href mailto apach org korthof author href mailto rand mcneeli yahoo rand neeli mcneeli author stephen colebourn author href mailto fredrik westermarck fredrik westermarck author holger krauth author href mailto alex purpletech alexand dai chaffe author href mailto hp intermeta hen schmiedehausen author arun mammen thoma author gari gregori author phil steitz author chou author michael davei author reuben sivan author chri hyzer version string util stringutil perform logic code split code code split preserv token splitpreservealltoken code method maximum arrai length param str string pars code code param separ char separatorchar separ charact param preserv token preservealltoken code code adjac separ treat empti token separ code code adjac separ treat separ arrai pars string code code string input string split worker splitwork string str separ char separatorchar preserv token preservealltoken perform tune jdk1 str len str length len arrai util arrayutil empti string arrai list list arrai list arraylist start match match lastmatch len str charat separ char separatorchar match preserv token preservealltoken list add str substr start match match lastmatch start match lastmatch match match preserv token preservealltoken match lastmatch list add str substr start string list arrai toarrai string list size
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
df98d0e5b21c3959a716f51f910bc1449bb39a58
f1a85ae8b9d5d9d9a848c4c8d9c2410b9726e194
/library/appcommon/src/main/java/com/yaoguang/appcommon/common/utils/adater/CommonBottomAdapter.java
719bf5ca904672404490437842c63b2d640653e7
[]
no_license
P79N6A/as
45dc7c76d58cdc62e3e403c9da4a1c16c4234568
a57ee2a3eb2c73cc97c3fb130b8e389899b19d99
refs/heads/master
2020-04-20T05:55:10.175425
2019-02-01T08:49:15
2019-02-01T08:49:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,059
java
package com.yaoguang.appcommon.common.utils.adater; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.alibaba.android.vlayout.LayoutHelper; import com.yaoguang.appcommon.R; import com.yaoguang.appcommon.common.base.BaseLoadMoreRecyclerVLayoutAdapter; import java.util.List; /** * 作 者:韦理英 * 时 间:2017/9/11 0011. * 描 述:XXXXX */ public class CommonBottomAdapter extends BaseLoadMoreRecyclerVLayoutAdapter<String, RecyclerView.ViewHolder> { LayoutHelper layoutHelper; public CommonBottomAdapter(LayoutHelper layoutHelper, List<String> strings) { this.layoutHelper = layoutHelper; appendToList(strings); } @Override public LayoutHelper onCreateLayoutHelper() { return layoutHelper; } @Override public RecyclerView.ViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) { final View view = View.inflate(parent.getContext(), R.layout.view_textview, null); final ItemViewHolder itemViewHolder = new ItemViewHolder(view); view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (itemViewHolder != null) { int layoutPosition = itemViewHolder.getLayoutPosition(); mOnItemClickListener.onItemClick(view, getList().get(layoutPosition), layoutPosition); } } }); return itemViewHolder; } @Override public void onBindItemViewHolder(RecyclerView.ViewHolder holder, int position) { ItemViewHolder holder1 = (ItemViewHolder) holder; holder1.textView.setText(getList().get(position)); } public class ItemViewHolder extends RecyclerView.ViewHolder { TextView textView; public ItemViewHolder(View itemView) { super(itemView); textView = (TextView) itemView.findViewById(R.id.textView); } } }
[ "254191389@qq.com" ]
254191389@qq.com
2e8fca79ffd05d14165403a8bc7e21c79ba3d0d8
40e1088259c04fab27ac2a41df69906e7d075954
/src/main/java/org/semper/reformanda/syndication/rss/Category.java
8d3df2e15d6951c2cb3ae4fc1851bace90515140
[ "Apache-2.0" ]
permissive
nessguy/openaudible
c6114ea6ca0902a7491c8a1e307693f80147010a
f0d68a3d4366bd9895d3fb1dfade9fdcd103abb6
refs/heads/master
2020-03-29T08:22:29.507204
2020-01-22T20:27:49
2020-01-22T20:27:49
149,707,495
0
0
Apache-2.0
2018-09-21T03:57:18
2018-09-21T03:57:18
null
UTF-8
Java
false
false
1,761
java
/** * Copyright 2015 Joshua Cain * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.semper.reformanda.syndication.rss; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlValue; /** * It has one optional attribute, domain, a string that identifies a categorization taxonomy. * <p> * The value of the element is a forward-slash-separated string that identifies a hierarchic location in the indicated taxonomy. * Processors may establish conventions for the interpretation of categories. Two examples are provided below: * * <category>Grateful Dead</category> * <category domain="http://www.fool.com/cusips">MSFT</category> * <p> * You may include as many category elements as you need to, for different domains, and to have an item cross-referenced in different parts of the same domain. */ public class Category { private String domain; private String textValue; @XmlAttribute public String getDomain() { return domain; } public Category setDomain(String domain) { this.domain = domain; return this; } @XmlValue public String getTextValue() { return textValue; } public Category setTextValue(String textValue) { this.textValue = textValue; return this; } }
[ "racer@torguard.tg" ]
racer@torguard.tg
89f63aa74f3370bbcfbbd70b6cf084eb6d2c1794
d993c71bfac21935bf98ff0e177681a68177b3f0
/src/main/java/manage/CircularCounting.java
3811dfed98d71d9d3c5771314281449fa8a262ac
[]
no_license
nitinkc/CodingInterviewPreps
4c2e48eba73e60ddd35705c014277db1175588bf
a3a219e9cbc82d54427e055c0c0f74d441738982
refs/heads/master
2022-02-22T09:44:10.051063
2022-02-18T07:42:44
2022-02-18T07:42:44
55,822,036
0
0
null
null
null
null
UTF-8
Java
false
false
870
java
package manage; /** * Created by Nitin Chaurasia on 12/17/16 at 1:04 AM. */ public class CircularCounting { public static void main(String[] args) { countForward(7); countBackwards(7); } private static void countForward(int count){ int print = 0; //TESTING THE PROGRAM BY RUNNING 4 times SETS OF COUNTS for (int i = 1; i <= 4*count; i++){ System.out.println(i+ " Forward Count : " + print ); print = (print + 1) % count; } } private static void countBackwards(int count){ int print = 0; for (int i = 1; i <= 4*count; i++){ // Re-setting the count to max if (print < 0) print = count - 1; System.out.println(i+ " Backwards Count : " + print ); print = (print - 1) % count; } } }
[ "gs.nitin@gmail.com" ]
gs.nitin@gmail.com
5abbf6462f5fe5780c17eb3156dcfbf86e5dcc0c
64ba5681978b403bf437257509601c661a4bec6e
/src/main/java/com/tastytreet/restro/web/rest/UserJWTController.java
01d6aff052a19d358ba3cb59d01b960bc5edd3cd
[]
no_license
kiranv31/TastyTreetRestro
fc4b9f01a7047746dadafdb0b7274d5a86ec94d4
21ffe868d2fc6490a9c1ef6653c2c602b70c1c4d
refs/heads/master
2020-03-19T16:38:37.359132
2018-06-09T12:51:27
2018-06-09T12:51:27
136,722,946
0
0
null
null
null
null
UTF-8
Java
false
false
2,550
java
package com.tastytreet.restro.web.rest; import com.tastytreet.restro.security.jwt.JWTConfigurer; import com.tastytreet.restro.security.jwt.TokenProvider; import com.tastytreet.restro.web.rest.vm.LoginVM; import com.codahale.metrics.annotation.Timed; import com.fasterxml.jackson.annotation.JsonProperty; import org.springframework.http.HttpStatus; import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; /** * Controller to authenticate users. */ @RestController @RequestMapping("/api") public class UserJWTController { private final TokenProvider tokenProvider; private final AuthenticationManager authenticationManager; public UserJWTController(TokenProvider tokenProvider, AuthenticationManager authenticationManager) { this.tokenProvider = tokenProvider; this.authenticationManager = authenticationManager; } @PostMapping("/authenticate") @Timed public ResponseEntity<JWTToken> authorize(@Valid @RequestBody LoginVM loginVM) { UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginVM.getUsername(), loginVM.getPassword()); Authentication authentication = this.authenticationManager.authenticate(authenticationToken); SecurityContextHolder.getContext().setAuthentication(authentication); boolean rememberMe = (loginVM.isRememberMe() == null) ? false : loginVM.isRememberMe(); String jwt = tokenProvider.createToken(authentication, rememberMe); HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.add(JWTConfigurer.AUTHORIZATION_HEADER, "Bearer " + jwt); return new ResponseEntity<>(new JWTToken(jwt), httpHeaders, HttpStatus.OK); } /** * Object to return as body in JWT Authentication. */ static class JWTToken { private String idToken; JWTToken(String idToken) { this.idToken = idToken; } @JsonProperty("id_token") String getIdToken() { return idToken; } void setIdToken(String idToken) { this.idToken = idToken; } } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
f5a7bec33609e1d957e5d4d68648b130d4a91be4
23d343c5a7d982697ba539de76c24a03e6fd9b0d
/139/Solution.java
77a6e018c2a2e1f6d21f0345605304dc68e10b52
[]
no_license
yanglin0883/leetcode
5050e4062aea6c3070a54843e07d5a09a592eda2
851d3bec58d61ed908d8c33c31d309ff204e1643
refs/heads/master
2022-12-05T23:50:39.822841
2020-08-21T17:13:16
2020-08-21T17:13:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
class Solution { public boolean wordBreak(String s, List<String> wordDict) { dfs(s, 0, wordDict); return res; } boolean res=false; void dfs(String s, int start, List<String> dic){ if(start==s.length())res = true; if(res) return; for(String i:dic){ int len = i.length(); if(res||start+len > s.length())continue; if(s.substring(start, start+len).equals(i)){ dfs(s, start+len, dic); } } } }
[ "yanglin0883@gmail.com" ]
yanglin0883@gmail.com
6bb5e36b6101a2940c07529a3fd7b16a977dbc28
724486ae493e7858a71bdf43d8dc3af57794b95f
/Base/BlockCustomLeaf.java
bd604efe970e187999c04b2e50d09d764e8b1ec7
[]
no_license
mralimac/DragonAPI
1a98ffd9dde9042ca23adc42d34d04596ce2bd02
fec4010947c471c4443486056e2d19a44aeba4d0
refs/heads/master
2021-01-19T09:54:34.020830
2017-04-10T10:39:34
2017-04-10T10:39:34
87,799,014
0
0
null
2017-04-10T10:35:26
2017-04-10T10:35:26
null
UTF-8
Java
false
false
5,032
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2016 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.DragonAPI.Base; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockLeaves; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import Reika.DragonAPI.ModRegistry.ModWoodList; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; public abstract class BlockCustomLeaf extends BlockLeaves { /** For fast/fancy graphics */ protected IIcon[][] icon = new IIcon[16][2]; protected final Random rand = new Random(); protected BlockCustomLeaf() { this(false); } protected BlockCustomLeaf(boolean tick) { super(); this.setCreativeTab(this.showInCreative() ? this.getCreativeTab() : null); this.setStepSound(soundTypeGrass); if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) this.setGraphicsLevel(Minecraft.getMinecraft().gameSettings.fancyGraphics); this.setHardness(0.2F); this.setLightOpacity(1); this.setTickRandomly(tick || this.decays() || this.shouldRandomTick()); } /** Overridden to allow conditional disabling of mod leaf control hacks, like the one in RandomThings. */ @Override public final void onNeighborBlockChange(World world, int x, int y, int z, Block neighborID) { this.onBlockUpdate(world, x, y, z); if (this.allowModDecayControl()) { super.onNeighborBlockChange(world, x, y, z, neighborID); } else { } } @Override public String[] func_150125_e() { return new String[]{this.getUnlocalizedName()}; } protected void onBlockUpdate(World world, int x, int y, int z) { } public abstract boolean shouldRandomTick(); public abstract boolean decays(); public abstract boolean allowModDecayControl(); public abstract boolean showInCreative(); public abstract CreativeTabs getCreativeTab(); @Override public IIcon getIcon(int par1, int par2) { return icon[par2][this.getOpacityIndex()]; } protected final int getOpacityIndex() { field_150121_P = Minecraft.getMinecraft().gameSettings.fancyGraphics; return field_150121_P ? 0 : 1; } @Override public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face) { return 30; } @Override public int getFireSpreadSpeed(IBlockAccess world, int x, int y, int z, ForgeDirection face) { return 60; } @Override public final void updateTick(World world, int x, int y, int z, Random par5Random) { int meta = world.getBlockMetadata(x, y, z); //ReikaJavaLibrary.pConsole(Block.getIdFromBlock(this)+" @ "+x+", "+y+", "+z+" : "+this.decays()+"&"+this.shouldTryDecay(world, x, y, z, meta)); boolean flag = false; if (this.decays() && this.shouldTryDecay(world, x, y, z, meta)) { flag = this.decay(world, x, y, z, par5Random); } if (!flag) this.onRandomUpdate(world, x, y, z, par5Random); } protected void onRandomUpdate(World world, int x, int y, int z, Random r) { } public abstract boolean shouldTryDecay(World world, int x, int y, int z, int meta); protected boolean decay(World world, int x, int y, int z, Random par5Random) { int r = 4; boolean decay = true; for (int i = -r; i <= r; i++) { for (int j = -r; j <= r; j++) { for (int k = -r; k <= r; k++) { Block id = world.getBlock(x+i, y+j, z+k); int meta = world.getBlockMetadata(x+i, y+j, z+k); if (id == Blocks.log || id == Blocks.log2 || ModWoodList.isModWood(id, meta)) { decay = false; i = j = k = r+1; } } } } boolean hasAdj = false; for (int i = 0; i < 6; i++) { ForgeDirection dir = ForgeDirection.VALID_DIRECTIONS[i]; int dx = x+dir.offsetX; int dy = y+dir.offsetY; int dz = z+dir.offsetZ; Block b = world.getBlock(dx, dy, dz); if (b != Blocks.air) { hasAdj = true; i = 6; } } if (!hasAdj) decay = true; int meta = world.getBlockMetadata(x, y, z); if (decay) { this.dropBlockAsItemWithChance(world, x, y, z, meta, 1, 0); world.setBlockToAir(x, y, z); } return decay; } @Override public final void beginLeavesDecay(World world, int x, int y, int z) { if (this.decays()) { } } @Override public void registerBlockIcons(IIconRegister ico) { for (int i = 0; i < 16; i++) { icon[i][0] = ico.registerIcon(this.getFancyGraphicsIcon(i)); icon[i][1] = ico.registerIcon(this.getFastGraphicsIcon(i)); } } public abstract String getFastGraphicsIcon(int meta); public abstract String getFancyGraphicsIcon(int meta); }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
cb25029991677fca8dc5c72f7c61aa6445b499cd
793df459501d0113d6acdd41faf590122a242796
/confu-master/benchmarks/xalan/original_source_from_jdcore/org/apache/bcel/generic/FDIV.java
13a9514702364ce708445a96726d42530d13a878
[ "Apache-2.0" ]
permissive
tsmart-date/nasac-2017-demo
fc9c927eb6cc88e090066fc351b58c74a79d936e
07f2d3107f1b40984ffda9e054fa744becd8c8a3
refs/heads/master
2021-07-15T21:29:42.245245
2017-10-24T14:28:14
2017-10-24T14:28:14
105,340,725
0
1
null
null
null
null
UTF-8
Java
false
false
408
java
package org.apache.bcel.generic; public class FDIV extends ArithmeticInstruction { public FDIV() { super((short)110); } public void accept(Visitor v) { v.visitTypedInstruction(this); v.visitStackProducer(this); v.visitStackConsumer(this); v.visitArithmeticInstruction(this); v.visitFDIV(this); } }
[ "liuhan0518@gmail.com" ]
liuhan0518@gmail.com
93b1dd05e7183b52100376a41ba06cc05145a69b
a159ab5cc3bc60e013c402f8e6b9bed57e916be0
/4.11/src/Test1.java
f9e8c3507c623738fc5e649199d1e4c9e849310e
[]
no_license
chickeboy/java-Study
919a8e8034fa2de6fe8ddc9aa4f39a1c267001a6
2ab9ba21ea44bc7ba48423921bbe9e4cb1b543ea
refs/heads/master
2020-05-24T09:47:17.296617
2019-07-24T07:38:30
2019-07-24T07:38:30
187,210,908
1
0
null
null
null
null
GB18030
Java
false
false
684
java
/*public class Test1{ public static void main(String[] args){ for(int i=1;i<100;i++){ if(i%2!=0){ System.out.println(i); } } } }*/ /*public class Test1{ public static void main(String[] args){ int a= 0; for(int i=1;i<101;i+=3){ a +=i; } System.out.println(a); } }1717*/ /*public class Test1{ public static void main(String[] args){ int a = 0; int b = 0; for(int i=0;i<=100;i++){ if(i%2==0){ a+=i; }else{ b+=i; } } System.out.println("偶数和为"+a+"奇数和为"+b); } }*/ public class Test1{ public static void main(String[] args){ int a = 1; for(int i = 1;i<=10;i++){ a=a*i; } System.out.println(a); } }
[ "1119644047@qq.com" ]
1119644047@qq.com
26eabefaea3bbdbb4d31cbebd01bbf980362506e
fd2dab9312313a2d42b22130909e631d7ecb7e52
/src/com/javarush/test/level14/lesson08/home03/Solution.java
e3da69986b05825150ac171153b197766cae53ee
[]
no_license
EvgeniyChaika/JavaRush
543ee5b198a939b56cd3fe616a65113e9c78c661
73c888d2c8da46de28a2fd680abf71ab7a9ec530
refs/heads/master
2021-01-10T17:15:14.148001
2016-10-24T17:54:37
2016-10-24T17:54:37
48,767,613
3
0
null
null
null
null
UTF-8
Java
false
false
2,499
java
package com.javarush.test.level14.lesson08.home03; import java.io.BufferedReader; import java.io.InputStreamReader; /* User, Looser, Coder and Proger 1. Ввести [в цикле] с клавиатуры несколько строк (ключей). Строки(ключи) могут быть такими: "user", "looser", "coder", "proger". Ввод окончен, когда строка не совпадает ни с одной из выше указанных. 2. Для каждой введенной строки нужно: 2.1. Создать соответствующий объект [см Person.java], например, для строки "user" нужно создать объект класса User. 2.2. Передать этот объект в метод doWork. 3. Написать реализацию метода doWork, который: 3.1. Вызывает метод live() у переданного обекта, если этот объект (person) имеет тип User. 3.2. Вызывает метод doNothing(), если person имеет тип Looser. 3.3. Вызывает метод coding(), если person имеет тип Coder. 3.4. Вызывает метод enjoy(), если person имеет тип Proger. */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); Person person = null; String key = null; while (true) { key = reader.readLine(); if ("user".equals(key)) { person = new Person.User(); } else if ("looser".equals(key)) { person = new Person.Looser(); } else if ("coder".equals(key)) { person = new Person.Coder(); } else if ("proger".equals(key)) { person = new Person.Proger(); } else break; doWork(person); //вызываем doWork } } public static void doWork(Person person) { if (person instanceof Person.User) { ((Person.User) person).live(); } if (person instanceof Person.Looser) { ((Person.Looser) person).doNothing(); } if (person instanceof Person.Coder) { ((Person.Coder) person).coding(); } if (person instanceof Person.Proger) { ((Person.Proger) person).enjoy(); } } }
[ "evgeniy.chaika.83@gmail.com" ]
evgeniy.chaika.83@gmail.com
5fd58e0711b08b3ef8a8b3590caf55775513953a
ecbb90f42d319195d6517f639c991ae88fa74e08
/OpenSaml/src/org/opensaml/saml1/core/impl/AuthenticationStatementImpl.java
2bd7955bbb17e5d978366245a9a154bd36f83465
[ "MIT" ]
permissive
Safewhere/kombit-service-java
5d6577984ed0f4341bbf65cbbace9a1eced515a4
7df271d86804ad3229155c4f7afd3f121548e39e
refs/heads/master
2020-12-24T05:20:59.477842
2018-08-23T03:50:16
2018-08-23T03:50:16
36,713,383
0
1
MIT
2018-08-23T03:51:25
2015-06-02T06:39:09
Java
UTF-8
Java
false
false
4,110
java
/* * Licensed to the University Corporation for Advanced Internet Development, * Inc. (UCAID) under one or more contributor license agreements. See the * NOTICE file distributed with this work for additional information regarding * copyright ownership. The UCAID licenses this file to You under the Apache * License, Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opensaml.saml1.core.impl; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.joda.time.DateTime; import org.opensaml.saml1.core.AuthenticationStatement; import org.opensaml.saml1.core.AuthorityBinding; import org.opensaml.saml1.core.SubjectLocality; import org.opensaml.xml.XMLObject; import org.opensaml.xml.util.XMLObjectChildrenList; /** * A Concrete implementation of the {@link org.opensaml.saml1.core.AuthenticationStatement} Interface */ public class AuthenticationStatementImpl extends SubjectStatementImpl implements AuthenticationStatement { /** Contains the AuthenticationMethod attribute contents */ private String authenticationMethod; /** Contains the AuthenticationMethod attribute contents */ private DateTime authenticationInstant; /** Contains the SubjectLocality subelement */ private SubjectLocality subjectLocality; /** Contains the AuthorityBinding subelements */ private final XMLObjectChildrenList<AuthorityBinding> authorityBindings; /** * Constructor. * * @param namespaceURI the namespace the element is in * @param elementLocalName the local name of the XML element this Object represents * @param namespacePrefix the prefix for the given namespace */ protected AuthenticationStatementImpl(String namespaceURI, String elementLocalName, String namespacePrefix) { super(namespaceURI, elementLocalName, namespacePrefix); authorityBindings = new XMLObjectChildrenList<AuthorityBinding>(this); } /** {@inheritDoc} */ public String getAuthenticationMethod() { return authenticationMethod; } /** {@inheritDoc} */ public void setAuthenticationMethod(String authenticationMethod) { this.authenticationMethod = prepareForAssignment(this.authenticationMethod, authenticationMethod); } /** {@inheritDoc} */ public DateTime getAuthenticationInstant() { return authenticationInstant; } /** {@inheritDoc} */ public void setAuthenticationInstant(DateTime authenticationInstant) { this.authenticationInstant = prepareForAssignment(this.authenticationInstant, authenticationInstant); } // // Elements // /** {@inheritDoc} */ public SubjectLocality getSubjectLocality() { return subjectLocality; } /** {@inheritDoc} */ public void setSubjectLocality(SubjectLocality subjectLocality) throws IllegalArgumentException { this.subjectLocality = prepareForAssignment(this.subjectLocality, subjectLocality); } /** {@inheritDoc} */ public List<AuthorityBinding> getAuthorityBindings() { return authorityBindings; } /** {@inheritDoc} */ public List<XMLObject> getOrderedChildren() { List<XMLObject> list = new ArrayList<XMLObject>(authorityBindings.size() + 2); if (super.getOrderedChildren() != null) { list.addAll(super.getOrderedChildren()); } if (subjectLocality != null) { list.add(subjectLocality); } list.addAll(authorityBindings); if (list.size() == 0) { return null; } return Collections.unmodifiableList(list); } }
[ "lxp@globeteam.com" ]
lxp@globeteam.com
8ce9a46c6f9635b4aff418e720151591bba783e3
7c20e36b535f41f86b2e21367d687ea33d0cb329
/Capricornus/src/com/jet/net/nntp/Newsgroup.java
90fc673e1d04e87ac800146cc8addb31bfbaccd8
[]
no_license
fazoolmail89/gopawpaw
50c95b924039fa4da8f309e2a6b2ebe063d48159
b23ccffce768a3d58d7d71833f30b85186a50cc5
refs/heads/master
2016-09-08T02:00:37.052781
2014-05-14T11:46:18
2014-05-14T11:46:18
35,091,153
1
1
null
null
null
null
UTF-8
Java
false
false
1,176
java
package com.jet.net.nntp; /** * Data that encapsulates a newsgroup. This is simply the article name * and the current minimum and maximum article in this group. * * @author Paul Bemowski */ public class Newsgroup { String name; int firstarticle=-1; int lastarticle=-1; /** Constructs a newsgroup object. * @param name The name of the newsgroup. * @param fm The first article number. * @param lm The last article number. */ public Newsgroup(String name, int fm, int lm) { this.name=name; firstarticle=fm; lastarticle=lm; } /** Returns group_name:[first,last]. */ public String toString() {return name+":["+firstarticle+","+ lastarticle+"]";} /** Returns the name of the newsgroup. */ public String getName() {return name;} /** */ public int firstMessage() {return firstarticle;} /** Returns the first available article in the group. */ public int firstArticle() {return firstarticle;} /** */ public int lastMessage() {return lastarticle;} /** Returns the last available article in the group. */ public int lastArticle() {return lastarticle;} }
[ "ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5" ]
ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5
ada6dade9750408b6390ca1351531d62d1c692c3
93506938dab5ab2f33ea367fcf6b205487e16f92
/src/main/java/stellarium/config/ILoadSaveHandler.java
6dec64633ea8a1d3f8705ec8d40b04a64657deea
[]
no_license
AryaDragonmaster/SkyMod
445c9d9fb8c0866fb180fd05131797e0db56b067
23609c1dc511bf5b61a8537ec36613220809d9e1
refs/heads/master
2021-05-04T06:54:52.053041
2016-03-15T15:42:47
2016-03-15T15:42:47
70,536,115
0
0
null
null
null
null
UTF-8
Java
false
false
417
java
package stellarium.config; public interface ILoadSaveHandler { /** * called on formatting configuration to get certain input. * always called before editing / loading configuration. * */ public void onFormat(); /** * called when configuration is finished to apply the settings. * */ public void onApply(); /** * called when saving information to configuration. * */ public void onSave(); }
[ "abab9579@gmail.com" ]
abab9579@gmail.com
837589b5e9ac8c29b0ac91c162a1f4ced0d25107
083d72ab12898894f0efa87b73ad4b59d46fdda3
/trunk/source/AbstractInterpretationV2/src/de/uni_freiburg/informatik/ultimate/plugins/analysis/abstractinterpretationv2/algorithm/IDebugHelper.java
2368322e7acc16bd5b35d0a8eb860e59a85dae6e
[]
no_license
utopia-group/SmartPulseTool
19db821090c3a2d19bad6de690b5153bd55e8a92
92c920429d6946ff754c3d307943bcaeceba9a40
refs/heads/master
2023-06-09T04:10:52.900609
2021-06-06T18:30:15
2021-06-06T18:30:15
276,487,368
8
6
null
null
null
null
UTF-8
Java
false
false
1,318
java
package de.uni_freiburg.informatik.ultimate.plugins.analysis.abstractinterpretationv2.algorithm; import de.uni_freiburg.informatik.ultimate.modelcheckerutils.absint.DisjunctiveAbstractState; import de.uni_freiburg.informatik.ultimate.modelcheckerutils.absint.IAbstractState; /** * {@link IDebugHelper} is used to implement some assertions in the {@link FixpointEngine}. * * @author Daniel Dietsch (dietsch@informatik.uni-freiburg.de) * */ public interface IDebugHelper<STATE extends IAbstractState<STATE>, ACTION, VARDECL, LOCATION> { /** * Check whether the Hoare triple {preState} {hierachicalPreState} transition {postState} holds. * * Note that {@link DisjunctiveAbstractState} is a disjunction of abstract states. * * @param preState * The abstract pre state in the current scope. * @param hierachicalPreState * The abstract state from which we were called. * @param postStates * The abstract post state. * @param transition * The transition. * @return true iff the Hoare triple holds. */ boolean isPostSound(final DisjunctiveAbstractState<STATE> preState, final DisjunctiveAbstractState<STATE> hierachicalPreState, final DisjunctiveAbstractState<STATE> postState, final ACTION transition); }
[ "jon@users-MacBook-Pro.local" ]
jon@users-MacBook-Pro.local
261391ad86a04bbd5e18a7bc00aa0f0c860c03e0
51b7aa8ca8dedd69039d17959701bec7cd99a4c1
/services/simpledb/src/it/java/software/amazon/awssdk/services/simpledb/PutAttributesIntegrationTest.java
91149df2555074d9081fa4f5e9ab02dd9f812aaa
[ "Apache-2.0" ]
permissive
MatteCarra/aws-sdk-java-v2
41d711ced0943fbd6b5a709e50f78b6564b5ed21
af9fb86db6715b1dbea79028aa353292559d5876
refs/heads/master
2021-06-30T05:21:08.988292
2017-09-18T15:33:38
2017-09-18T15:33:38
103,685,332
0
1
null
2017-09-15T17:45:50
2017-09-15T17:45:50
null
UTF-8
Java
false
false
2,921
java
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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 software.amazon.awssdk.services.simpledb; import static org.junit.Assert.fail; import org.junit.Test; import software.amazon.awssdk.services.simpledb.model.MissingParameterException; import software.amazon.awssdk.services.simpledb.model.NoSuchDomainException; import software.amazon.awssdk.services.simpledb.model.PutAttributesRequest; import software.amazon.awssdk.services.simpledb.model.ReplaceableAttribute; /** * Integration tests for the exceptional cases of the SimpleDB PutAttributes operation. * * @author fulghum@amazon.com */ public class PutAttributesIntegrationTest extends IntegrationTestBase { /** * Tests that PutAttributes throws a MissingParameterException when the request is missing * required parameters. */ @Test public void testPutAttributesMissingParameterException() { PutAttributesRequest request = PutAttributesRequest.builder() .domainName("foo") .build(); try { sdb.putAttributes(request); fail("Expected MissingParameterException, but wasn't thrown"); } catch (MissingParameterException e) { assertValidException(e); } request = PutAttributesRequest.builder() .itemName("foo") .build(); try { sdb.putAttributes(request); fail("Expected MissingParameterException, but wasn't thrown"); } catch (MissingParameterException e) { assertValidException(e); } } /** * Tests that the PutAttributes operations throws a NoSuchDomainException if a non-existent * domain name is specified. */ @Test public void testPutAttributesNoSuchDomainException() { PutAttributesRequest request = PutAttributesRequest.builder() .itemName("foobarbazbarbashbar") .domainName("foobarbazbarbashbar") .attributes(ReplaceableAttribute.builder() .name("foo") .value("bar") .build()) .build(); try { sdb.putAttributes(request); fail("Expected NoSuchDomainException, but wasn't thrown"); } catch (NoSuchDomainException e) { assertValidException(e); } } }
[ "millem@amazon.com" ]
millem@amazon.com
2b632e129d6ee8cb37cb953588dd45ee0d366813
cdd8cf6479e519ff18c71ccba529c0875e49169a
/src/main/java/top/dianmu/ccompiler/learn/day91/backend/StatementListExecutor.java
d4c817a63cd02e6d8c468cd113bb381922ca1cee
[]
no_license
hungry-game/CCompiler_for_learn
af3611bd636978d72df3e09399f144f1ac482c84
3f1d3c48dd229ce1eb265ae0d3c8f2051051418b
refs/heads/master
2022-05-26T18:33:01.230199
2020-05-02T12:57:33
2020-05-02T12:57:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package top.dianmu.ccompiler.learn.day91.backend; public class StatementListExecutor extends BaseExecutor{ @Override public Object Execute(ICodeNode root) { executeChildren(root); Object child = root.getChildren().get(0); copyChild(root, root.getChildren().get(0)); return root; } }
[ "2673077461@qq.com" ]
2673077461@qq.com
c9b5297a7800df143d67254e216383a44d7f15db
3ebaee3a565d5e514e5d56b44ebcee249ec1c243
/assetBank 3.77 decomplied fixed/src/java/net/opengis/ogc/SpatialOperatorNameType.java
a1a49572b119f3b5923dcfc661d1b9ab7d77f15b
[]
no_license
webchannel-dev/Java-Digital-Bank
89032eec70a1ef61eccbef6f775b683087bccd63
65d4de8f2c0ce48cb1d53130e295616772829679
refs/heads/master
2021-10-08T19:10:48.971587
2017-11-07T09:51:17
2017-11-07T09:51:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,484
java
/* */ package net.opengis.ogc; /* */ /* */ import javax.xml.bind.annotation.XmlEnum; /* */ import javax.xml.bind.annotation.XmlEnumValue; /* */ import javax.xml.bind.annotation.XmlType; /* */ /* */ @XmlType(name="SpatialOperatorNameType") /* */ @XmlEnum /* */ public enum SpatialOperatorNameType /* */ { /* 44 */ BBOX("BBOX"), /* 45 */ EQUALS("Equals"), /* */ /* 47 */ DISJOINT("Disjoint"), /* */ /* 49 */ INTERSECTS("Intersects"), /* */ /* 51 */ TOUCHES("Touches"), /* */ /* 53 */ CROSSES("Crosses"), /* */ /* 55 */ WITHIN("Within"), /* */ /* 57 */ CONTAINS("Contains"), /* */ /* 59 */ OVERLAPS("Overlaps"), /* */ /* 61 */ BEYOND("Beyond"), /* */ /* 63 */ D_WITHIN("DWithin"); /* */ /* */ private final String value; /* */ /* 68 */ private SpatialOperatorNameType(String v) { this.value = v; } /* */ /* */ public String value() /* */ { /* 72 */ return this.value; /* */ } /* */ /* */ public static SpatialOperatorNameType fromValue(String v) { /* 76 */ for (SpatialOperatorNameType c : values()) { /* 77 */ if (c.value.equals(v)) { /* 78 */ return c; /* */ } /* */ } /* 81 */ throw new IllegalArgumentException(v); /* */ } /* */ } /* Location: D:\Project - Photint Asset-bank\net\opengis\ogc.zip * Qualified Name: ogc.SpatialOperatorNameType * JD-Core Version: 0.6.0 */
[ "42003122+code7885@users.noreply.github.com" ]
42003122+code7885@users.noreply.github.com
30b51bdf89ded52f5e5e9e1629e761d279cf72bc
fb9f24616cff56cb0fd7e5a8ef54e64022e08c0e
/app/src/main/java/com/glitchcam/vepromei/utils/permission/PermissionsChecker.java
bce70411770bd2b7f7de8b554e300a90825f5177
[]
no_license
winterdl/VideoEditor-Android
f455d78d4147c3feab3631c2c31c244c1439b20b
a91c70dc2b7c0526f51985b910ecefa24ca37389
refs/heads/main
2023-04-07T17:02:50.790249
2021-04-13T20:11:02
2021-04-13T20:11:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,915
java
package com.glitchcam.vepromei.utils.permission; import android.content.Context; import android.content.pm.PackageManager; import androidx.core.content.ContextCompat; import java.util.ArrayList; import java.util.List; public class PermissionsChecker { private final Context mContext; public PermissionsChecker(Context context) { mContext = context.getApplicationContext(); } public List<String> checkPermission(String... permissions) { List<String> newList = new ArrayList<>(); for (String permission : permissions) { if (lacksPermission(permission)){ newList.add(permission); } } return newList; } public List<String> checkPermission(List<String> permissions) { List<String> newList = new ArrayList<>(); for (String permission : permissions) { if (lacksPermission(permission)){ newList.add(permission); } } return newList; } /* * 判断权限集合 * Judging permission set * */ public boolean lacksPermissions(String... permissions) { for (String permission : permissions) { if (lacksPermission(permission)){ return true; } } return false; } /* * 判断权限集合 * Judging permission set * */ public boolean lacksPermissions(List<String> permissions) { for (String permission : permissions) { if (lacksPermission(permission)){ return true; } } return false; } /* * 判断是否缺少权限 * Determine if permissions are missing * */ private boolean lacksPermission(String permission) { return ContextCompat.checkSelfPermission(mContext, permission) == PackageManager.PERMISSION_DENIED; } }
[ "boryshozh77@gmail.com" ]
boryshozh77@gmail.com
98f1a68766d1d17d3186b97ca3627e1545a55d06
24669636accfe5bc927561500552695e94083dd7
/exampleWeb/src/main/java/net/demo/hasor/domain/VersionInfoDO.java
b3573f190acb07ca45e6b0c18e8588a083886dd6
[]
no_license
hiopro2016/hasor
2b6826904b484a9758345646cecd0260425f7eb7
591d3209f1d3cc4e4b2dd3d897b3d49a7bb129ab
refs/heads/master
2020-12-25T00:08:59.811080
2016-06-16T09:50:55
2016-06-16T09:50:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,736
java
/* * Copyright 2008-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.demo.hasor.domain; /** * * @version : 2016年1月10日 * @author 赵永春(zyc@hasor.net) */ public class VersionInfoDO { private String version; private String releaseDate; private String downloadURL; private String apiURL; private String downloadApiURL; // public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public String getReleaseDate() { return releaseDate; } public void setReleaseDate(String releaseDate) { this.releaseDate = releaseDate; } public String getDownloadURL() { return downloadURL; } public void setDownloadURL(String downloadURL) { this.downloadURL = downloadURL; } public String getApiURL() { return apiURL; } public void setApiURL(String apiURL) { this.apiURL = apiURL; } public String getDownloadApiURL() { return downloadApiURL; } public void setDownloadApiURL(String downloadApiURL) { this.downloadApiURL = downloadApiURL; } }
[ "zyc@hasor.net" ]
zyc@hasor.net
66ba6741497e485ddbdfc34402d7110721612b06
815cb2f74b1c48835d2763df6dbf2fd673772dd0
/bpm/bonita-core/bonita-process-instance/bonita-process-instance-model-impl/src/main/java/org/bonitasoft/engine/core/process/instance/model/builder/event/trigger/impl/SThrowMessageEventTriggerInstanceBuilderImpl.java
c191115100b573aa0e7191693447c5d4fc24139f
[]
no_license
Melandro/bonita-engine
04238b7b1f6daefbf568e2985f9ad990e66d2a10
bd4a9ab2492d5e9843a90fd9bbfe14700eb4bddb
refs/heads/master
2021-01-15T18:36:29.949274
2013-08-14T14:22:15
2013-08-14T14:47:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,966
java
/** * Copyright (C) 2012 BonitaSoft S.A. * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble * 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 * version 2.1 of the License. * 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 * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301, USA. **/ package org.bonitasoft.engine.core.process.instance.model.builder.event.trigger.impl; import org.bonitasoft.engine.core.process.instance.model.builder.event.trigger.SThrowMessageEventTriggerInstanceBuilder; import org.bonitasoft.engine.core.process.instance.model.event.trigger.SThrowMessageEventTriggerInstance; import org.bonitasoft.engine.core.process.instance.model.event.trigger.impl.SThrowMessageEventTriggerInstanceImpl; /** * @author Elias Ricken de Medeiros */ public class SThrowMessageEventTriggerInstanceBuilderImpl extends SEventTriggerInstanceBuilderImpl implements SThrowMessageEventTriggerInstanceBuilder { private SThrowMessageEventTriggerInstanceImpl entity; @Override public SThrowMessageEventTriggerInstanceBuilder createNewInstance(final long eventInstanceId, final String messageName, final String targetProcess, final String targetFlowNode) { entity = new SThrowMessageEventTriggerInstanceImpl(eventInstanceId, messageName, targetProcess, targetFlowNode); return this; } @Override public SThrowMessageEventTriggerInstance done() { return entity; } }
[ "emmanuel.duchastenier@bonitasoft.com" ]
emmanuel.duchastenier@bonitasoft.com
f8443fcceddf28ca3ecdfa615c0091a279d6698e
a47f5306c4795d85bf7100e646b26b614c32ea71
/sphairas-libs/clients/src/org/thespheres/betula/clients/termreport/RemoteServiceDescriptor.java
1aea35d16bbacf0c68c8d8d0829250c291ff26b5
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
sphairas/sphairas-desktop
65aaa0cd1955f541d3edcaf79442e645724e891b
f47c8d4ea62c1fc2876c0ffa44e5925bfaebc316
refs/heads/master
2023-01-21T12:02:04.146623
2020-10-22T18:26:52
2020-10-22T18:26:52
243,803,115
2
1
Apache-2.0
2022-12-06T00:34:25
2020-02-28T16:11:33
Java
UTF-8
Java
false
false
3,074
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.thespheres.betula.clients.termreport; import java.util.ArrayList; import java.util.List; import java.util.Set; import org.thespheres.betula.TermId; import org.thespheres.betula.Unit; import org.thespheres.betula.document.DocumentId; import org.thespheres.betula.document.model.DocumentsModel; import org.thespheres.betula.services.IllegalAuthorityException; import org.thespheres.betula.services.NamingResolver; import org.thespheres.betula.services.scheme.spi.Term; import org.thespheres.betula.services.scheme.spi.TermNotFoundException; import org.thespheres.betula.services.scheme.spi.TermSchedule; /** * * @author boris.heithecker */ class RemoteServiceDescriptor { private final String provider; private final Unit unit; private final DocumentId targetBase; private final TermSchedule termSchedule; private final DocumentsModel docModel; private final Set<DocumentId> documents; private final NamingResolver naming; private Term term; private DocumentId document; RemoteServiceDescriptor(String provider, Unit unit, DocumentId target, TermSchedule ts, DocumentsModel dm, NamingResolver nr, Set<DocumentId> docs) { this.provider = provider; this.unit = unit; this.targetBase = target; this.termSchedule = ts; this.docModel = dm; this.documents = docs; this.naming = nr; } List<Term> findSelectableTerms() { Term ct = termSchedule.getCurrentTerm(); TermId ctid = ct.getScheduledItemId(); int id = ct.getScheduledItemId().getId(); final ArrayList<Term> ret = new ArrayList<>(); for (int i = id - 4; i++ <= id + 4;) { Term add = null; if (i == 0) { add = ct; } else { TermId tid = new TermId(ctid.getAuthority(), i); try { add = termSchedule.resolve(tid); } catch (TermNotFoundException | IllegalAuthorityException ex) { } } if (add != null) { ret.add(add); } } return ret; } String getProvider() { return provider; } Unit getUnit() { return unit; } DocumentId getTargetBase() { return targetBase; } TermSchedule getTermSchedule() { return termSchedule; } DocumentsModel getDocModel() { return docModel; } Set<DocumentId> getDocuments() { return documents; } NamingResolver getNamingResolver() { return naming; } Term getSelectedTerm() { return this.term; } void setSelectedTerm(Term t) { this.term = t; } DocumentId getSelectedDocument() { return this.document; } void setSelectedDocument(DocumentId d) { this.document = d; } }
[ "boris.heithecker@gmx.net" ]
boris.heithecker@gmx.net
2f23e35cc9826493274342009e589143e94dae3c
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a010/A010678Test.java
057ccd9a2161e506c82a5149f443327d84741221
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a010; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A010678Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
1cc9c6a0e85bba46ac38b96ead7627fb7b3974f8
d12c2b6a4afde66e284ac2f82dc585e7f3eb068a
/stack/src/main/java/com/leetcode/PrintChars.java
ea4248a32e42610c30be2ab33a64fc38b70e69eb
[]
no_license
dhirajn72/datastructureAndAlgorithms
59fab7c280ec4b7f03b2166927ac49d48677bd5a
bdbfeccf43d0ae8307c572ee58279fb20ba5f1aa
refs/heads/developer
2021-06-09T02:01:52.345532
2021-04-06T09:15:47
2021-04-06T09:32:54
123,245,218
0
0
null
2021-04-06T09:34:49
2018-02-28T07:15:29
Java
UTF-8
Java
false
false
187
java
package com.leetcode; /** * @author Dhiraj * @date 19/07/19 */ public class PrintChars { public static void main(String[] args) { System.out.println((char)8593); } }
[ "dhiraj.kumar1@myntra.com" ]
dhiraj.kumar1@myntra.com
621bcc1567a80c2911d3e869b54935cf32a1e0f3
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-medium-project/src/test/java/org/gradle/test/performancenull_38/Testnull_3744.java
0778b3fc3fe70af58c727525b8b4e96c42bfa41d
[]
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
304
java
package org.gradle.test.performancenull_38; import static org.junit.Assert.*; public class Testnull_3744 { private final Productionnull_3744 production = new Productionnull_3744("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
a60392d9be4404ca841bbda0847eea5c07a15f59
95a54e3f3617bf55883210f0b5753b896ad48549
/java_src/com/google/android/gms/internal/clearcut/zzgf.java
5f52507b6a51b70caeda41ba646801e6ccdb4d6b
[]
no_license
aidyk/TagoApp
ffc5a8832fbf9f9819f7f8aa7af29149fbab9ea5
e31a528c8f931df42075fc8694754be146eddc34
refs/heads/master
2022-12-22T02:20:58.486140
2021-05-16T07:42:02
2021-05-16T07:42:02
325,695,453
3
1
null
2022-12-16T00:32:10
2020-12-31T02:34:45
Smali
UTF-8
Java
false
false
4,232
java
package com.google.android.gms.internal.clearcut; import com.google.android.gms.internal.clearcut.zzcg; final /* synthetic */ class zzgf { static final /* synthetic */ int[] zzba = new int[zzcg.zzg.values$50KLMJ33DTMIUPRFDTJMOP9FE1P6UT3FC9QMCBQ7CLN6ASJ1EHIM8JB5EDPM2PR59HKN8P949LIN8Q3FCHA6UIBEEPNMMP9R0().length]; /* JADX WARNING: Can't wrap try/catch for region: R(16:0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|16) */ /* JADX WARNING: Code restructure failed: missing block: B:17:?, code lost: return; */ /* JADX WARNING: Failed to process nested try/catch */ /* JADX WARNING: Missing exception handler attribute for start block: B:11:0x0031 */ /* JADX WARNING: Missing exception handler attribute for start block: B:13:0x0039 */ /* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0011 */ /* JADX WARNING: Missing exception handler attribute for start block: B:5:0x0019 */ /* JADX WARNING: Missing exception handler attribute for start block: B:7:0x0021 */ /* JADX WARNING: Missing exception handler attribute for start block: B:9:0x0029 */ static { /* int[] r0 = com.google.android.gms.internal.clearcut.zzcg.zzg.values$50KLMJ33DTMIUPRFDTJMOP9FE1P6UT3FC9QMCBQ7CLN6ASJ1EHIM8JB5EDPM2PR59HKN8P949LIN8Q3FCHA6UIBEEPNMMP9R0() int r0 = r0.length int[] r0 = new int[r0] com.google.android.gms.internal.clearcut.zzgf.zzba = r0 r0 = 1 int[] r1 = com.google.android.gms.internal.clearcut.zzgf.zzba // Catch:{ NoSuchFieldError -> 0x0011 } int r2 = com.google.android.gms.internal.clearcut.zzcg.zzg.zzkg // Catch:{ NoSuchFieldError -> 0x0011 } int r2 = r2 - r0 r1[r2] = r0 // Catch:{ NoSuchFieldError -> 0x0011 } L_0x0011: int[] r1 = com.google.android.gms.internal.clearcut.zzgf.zzba // Catch:{ NoSuchFieldError -> 0x0019 } int r2 = com.google.android.gms.internal.clearcut.zzcg.zzg.zzkh // Catch:{ NoSuchFieldError -> 0x0019 } int r2 = r2 - r0 r3 = 2 r1[r2] = r3 // Catch:{ NoSuchFieldError -> 0x0019 } L_0x0019: int[] r1 = com.google.android.gms.internal.clearcut.zzgf.zzba // Catch:{ NoSuchFieldError -> 0x0021 } int r2 = com.google.android.gms.internal.clearcut.zzcg.zzg.zzkf // Catch:{ NoSuchFieldError -> 0x0021 } int r2 = r2 - r0 r3 = 3 r1[r2] = r3 // Catch:{ NoSuchFieldError -> 0x0021 } L_0x0021: int[] r1 = com.google.android.gms.internal.clearcut.zzgf.zzba // Catch:{ NoSuchFieldError -> 0x0029 } int r2 = com.google.android.gms.internal.clearcut.zzcg.zzg.zzki // Catch:{ NoSuchFieldError -> 0x0029 } int r2 = r2 - r0 r3 = 4 r1[r2] = r3 // Catch:{ NoSuchFieldError -> 0x0029 } L_0x0029: int[] r1 = com.google.android.gms.internal.clearcut.zzgf.zzba // Catch:{ NoSuchFieldError -> 0x0031 } int r2 = com.google.android.gms.internal.clearcut.zzcg.zzg.zzkj // Catch:{ NoSuchFieldError -> 0x0031 } int r2 = r2 - r0 r3 = 5 r1[r2] = r3 // Catch:{ NoSuchFieldError -> 0x0031 } L_0x0031: int[] r1 = com.google.android.gms.internal.clearcut.zzgf.zzba // Catch:{ NoSuchFieldError -> 0x0039 } int r2 = com.google.android.gms.internal.clearcut.zzcg.zzg.zzkd // Catch:{ NoSuchFieldError -> 0x0039 } int r2 = r2 - r0 r3 = 6 r1[r2] = r3 // Catch:{ NoSuchFieldError -> 0x0039 } L_0x0039: int[] r1 = com.google.android.gms.internal.clearcut.zzgf.zzba // Catch:{ NoSuchFieldError -> 0x0041 } int r2 = com.google.android.gms.internal.clearcut.zzcg.zzg.zzke // Catch:{ NoSuchFieldError -> 0x0041 } int r2 = r2 - r0 r0 = 7 r1[r2] = r0 // Catch:{ NoSuchFieldError -> 0x0041 } L_0x0041: return */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.clearcut.zzgf.<clinit>():void"); } }
[ "ai@AIs-MacBook-Pro.local" ]
ai@AIs-MacBook-Pro.local
2f71b452e2e0e721df71693de6150ae8b075b197
6981973939d36b5282f2811ad546c398c0a23a63
/chelizi/intapi/src/main/java/com/lili/order/vo/StudentStatisticQuery.java
9431a084aeff894fd8b13563693bfed58cf41f98
[]
no_license
lucifax301/chelizi
8ce36763b2470d1e490d336b493f0dca435a13c8
e5f33c44a3419158fa7821fcc536cb2f06da9792
refs/heads/master
2022-12-25T14:48:08.779035
2019-05-30T08:59:55
2019-05-30T08:59:55
92,494,386
1
0
null
2022-12-16T01:16:34
2017-05-26T09:23:10
Java
UTF-8
Java
false
false
1,363
java
package com.lili.order.vo; public class StudentStatisticQuery extends BaseQuery { private String sqlField="ssid as ssid,student_id as studentId,ctid as ctid,total as total,score as score"; private String sqlPost; private String groupBy; private String orderBy; private int pageIndex=1; private int pageSize=10; private boolean paging=false; public void setSqlField(String sqlField) { this.sqlField=sqlField; } public String getSqlField() { return sqlField; } public void setSqlPost(String sqlPost) { this.sqlPost=sqlPost; } public String getSqlPost() { String sqlPostTemp=sqlPost; if(sqlPost==null || sqlPost.isEmpty()) { sqlPostTemp=""; if(groupBy!=null) { sqlPostTemp+=groupBy +" "; } if(orderBy!=null) { sqlPostTemp+=orderBy +" "; } if(paging) { sqlPostTemp+=" limit "+((pageIndex-1)*pageSize)+","+pageSize+" "; } } if(sqlPostTemp.indexOf(";")>=0||sqlPostTemp.indexOf("select")>=0||sqlPostTemp.indexOf("from")>=0) { sqlPostTemp=" "; } return sqlPostTemp; } public void setGroupBy(String groupBy) { this.groupBy=groupBy; } public void setorderBy(String orderBy) { this.orderBy=orderBy; } public void setPageSize(int pageSize) { this.pageSize=pageSize; this.paging=true; } public void setPageIndex(int pageIndex) { this.pageIndex=pageIndex; this.paging=true; } }
[ "232120641@qq.com" ]
232120641@qq.com
b5351b24d115617a0e9411ef156476cb82656c88
251861f3124c2b5c842c56470a240a88d1f0195d
/spf4j-zel/src/main/java/org/spf4j/zel/instr/RLIKE.java
a814d0e3b6a5b1e21f0690732f1c1af1def60aeb
[]
no_license
zolyfarkas/spf4j
b8cc01ec017e2d422ef77bac546ce589ab76bc1c
646004f6ce4a51c164a7736fd96ec788c57b3a5c
refs/heads/master
2023-08-06T10:21:44.343987
2022-12-08T16:58:46
2023-07-15T18:06:39
7,158,649
197
40
null
2023-07-15T18:06:41
2012-12-14T02:06:21
Java
UTF-8
Java
false
false
2,439
java
/* * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved. * * 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 General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Additionally licensed with: * * 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.spf4j.zel.instr; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.concurrent.ExecutionException; import java.util.regex.Pattern; import org.spf4j.zel.vm.ExecutionContext; import org.spf4j.zel.vm.SuspendedException; /** * regexp match. * @author Zoltan Farkas */ @SuppressFBWarnings("FCCD_FIND_CLASS_CIRCULAR_DEPENDENCY") public final class RLIKE extends Instruction { private static final long serialVersionUID = 1L; private final Pattern pattern; public RLIKE(final String pattern, final int flags) { this.pattern = Pattern.compile(pattern, flags); } @Override public int execute(final ExecutionContext context) throws SuspendedException, ExecutionException { CharSequence str = (CharSequence) context.popSyncStackVal(); context.push(pattern.matcher(str).matches()); return 1; } @Override public Object[] getParameters() { return org.spf4j.base.Arrays.EMPTY_OBJ_ARRAY; } }
[ "zolyfarkas@yahoo.com" ]
zolyfarkas@yahoo.com
c542ac0746d264f72223b834a3cb40801a338e07
6503253d96eea96665429be83f5844f6fd95d80b
/Pad/src/main/java/com/ngame/api/model/Meta.java
c4dcb2866c4810846e6f214515da8fbe0c1513d2
[]
no_license
liguoliang777/main
352b0c4bef544dbde2acb74a40f30ae9d1d98c42
a474ef2f863228db6c772134948523a49d7603ae
refs/heads/master
2019-09-01T02:43:56.277543
2018-06-27T03:13:16
2018-06-27T03:13:16
98,368,608
0
1
null
null
null
null
UTF-8
Java
false
false
371
java
package com.ngame.api.model; /** * Created by Administrator on 2017/12/5. */ public class Meta { private String code; private String message; public Meta(){super();} public String getCode(){return code;} public String getMessage(){return message;} public void getCode(String s){code = s;} public void setMessage(String s){message = s;} }
[ "157308001@qq.com" ]
157308001@qq.com
248299b3b226c51f2939ea7ef1fc11fc2d68e014
841060e745df2c24e6a4f2370ab2d50d4a66b250
/android/guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java
4fbf140f9285f65666d95cf3e5d84b4a1f8a4527
[ "Apache-2.0" ]
permissive
yangfancoming/guava-parent
2d61b596fbce5ee82896a00e02f0490a8db2dcc1
bda34e5e2a9ebfc0d4ff29077a739d542e736299
refs/heads/master
2021-06-19T23:21:36.712821
2019-07-26T06:50:48
2019-07-26T06:50:48
198,820,961
0
0
Apache-2.0
2021-03-31T21:26:52
2019-07-25T11:45:39
Java
UTF-8
Java
false
false
5,976
java
package com.google.common.util.concurrent.testing; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.common.collect.ImmutableList; import com.google.common.primitives.Longs; import com.google.common.util.concurrent.AbstractFuture; import com.google.common.util.concurrent.AbstractListeningExecutorService; import com.google.common.util.concurrent.ListenableScheduledFuture; import com.google.common.util.concurrent.ListeningScheduledExecutorService; import com.google.common.util.concurrent.MoreExecutors; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.Delayed; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; /** * Factory methods for {@link ExecutorService} for testing. * * @author Chris Nokleberg * @since 14.0 */ @Beta @GwtIncompatible public final class TestingExecutors { private TestingExecutors() {} /** * Returns a {@link ScheduledExecutorService} that never executes anything. * * <p>The {@code shutdownNow} method of the returned executor always returns an empty list despite * the fact that everything is still technically awaiting execution. The {@code getDelay} method * of any {@link ScheduledFuture} returned by the executor will always return the max long value * instead of the time until the user-specified delay. */ public static ListeningScheduledExecutorService noOpScheduledExecutor() { return new NoOpScheduledExecutorService(); } /** * Creates a scheduled executor service that runs each task in the thread that invokes {@code * execute/submit/schedule}, as in {@link CallerRunsPolicy}. This applies both to individually * submitted tasks and to collections of tasks submitted via {@code invokeAll}, {@code invokeAny}, * {@code schedule}, {@code scheduleAtFixedRate}, and {@code scheduleWithFixedDelay}. In the case * of tasks submitted by {@code invokeAll} or {@code invokeAny}, tasks will run serially on the * calling thread. Tasks are run to completion before a {@code Future} is returned to the caller * (unless the executor has been shutdown). * * <p>The returned executor is backed by the executor returned by {@link * MoreExecutors#newDirectExecutorService} and subject to the same constraints. * * <p>Although all tasks are immediately executed in the thread that submitted the task, this * {@code ExecutorService} imposes a small locking overhead on each task submission in order to * implement shutdown and termination behavior. * * <p>Because of the nature of single-thread execution, the methods {@code scheduleAtFixedRate} * and {@code scheduleWithFixedDelay} are not supported by this class and will throw an * UnsupportedOperationException. * * <p>The implementation deviates from the {@code ExecutorService} specification with regards to * the {@code shutdownNow} method. First, "best-effort" with regards to canceling running tasks is * implemented as "no-effort". No interrupts or other attempts are made to stop threads executing * tasks. Second, the returned list will always be empty, as any submitted task is considered to * have started execution. This applies also to tasks given to {@code invokeAll} or {@code * invokeAny} which are pending serial execution, even the subset of the tasks that have not yet * started execution. It is unclear from the {@code ExecutorService} specification if these should * be included, and it's much easier to implement the interpretation that they not be. Finally, a * call to {@code shutdown} or {@code shutdownNow} may result in concurrent calls to {@code * invokeAll/invokeAny} throwing RejectedExecutionException, although a subset of the tasks may * already have been executed. * * @since 15.0 */ public static SameThreadScheduledExecutorService sameThreadScheduledExecutor() { return new SameThreadScheduledExecutorService(); } private static final class NoOpScheduledExecutorService extends AbstractListeningExecutorService implements ListeningScheduledExecutorService { private volatile boolean shutdown; @Override public void shutdown() { shutdown = true; } @Override public List<Runnable> shutdownNow() { shutdown(); return ImmutableList.of(); } @Override public boolean isShutdown() { return shutdown; } @Override public boolean isTerminated() { return shutdown; } @Override public boolean awaitTermination(long timeout, TimeUnit unit) { return true; } @Override public void execute(Runnable runnable) {} @Override public <V> ListenableScheduledFuture<V> schedule( Callable<V> callable, long delay, TimeUnit unit) { return NeverScheduledFuture.create(); } @Override public ListenableScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { return NeverScheduledFuture.create(); } @Override public ListenableScheduledFuture<?> scheduleAtFixedRate( Runnable command, long initialDelay, long period, TimeUnit unit) { return NeverScheduledFuture.create(); } @Override public ListenableScheduledFuture<?> scheduleWithFixedDelay( Runnable command, long initialDelay, long delay, TimeUnit unit) { return NeverScheduledFuture.create(); } private static class NeverScheduledFuture<V> extends AbstractFuture<V> implements ListenableScheduledFuture<V> { static <V> NeverScheduledFuture<V> create() { return new NeverScheduledFuture<V>(); } @Override public long getDelay(TimeUnit unit) { return Long.MAX_VALUE; } @Override public int compareTo(Delayed other) { return Longs.compare(getDelay(TimeUnit.NANOSECONDS), other.getDelay(TimeUnit.NANOSECONDS)); } } } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
bf94626971c2bd2680dba2faa2674699adf87a1d
b494660c34135527b4443b9d79819fd75db5079b
/VipDashboard/src/com/vipdashboard/app/adapter/CleanMaserAppManagerAdapter.java
8cbaf11a226b1ea1c24d0d441cca0a5122da0209
[]
no_license
palash051/R-D
3ed47f9ac41685165a4730bda950e247492febdf
2bc1126409e6012be927557b20824d860ac624c9
refs/heads/master
2021-01-16T21:04:00.291049
2016-08-04T05:40:22
2016-08-04T05:40:22
64,904,130
0
0
null
null
null
null
UTF-8
Java
false
false
1,314
java
package com.vipdashboard.app.adapter; import com.vipdashboard.app.fragments.AppManagerFragmnet; import com.vipdashboard.app.fragments.PickManagerFragment; //import com.vipdashboard.app.fragments.VIPD_Apk_Files_Fragment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; public class CleanMaserAppManagerAdapter extends FragmentPagerAdapter{ public CleanMaserAppManagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { if(position == 0){ return new AppManagerFragmnet(); }else if(position == 1){ return new PickManagerFragment(); } // else if(position == 2){ // return new VIPD_Apk_Files_Fragment(); //} return null; } // public AppManagerFragmnet getItem(int index) { // // switch (index) { // case 0: // // Top Rated fragment activity // return new AppManagerFragmnet(); // case 1: // // Games fragment activity // return new PickManagerFragment(); //// case 2: //// // Movies fragment activity //// return new MoviesFragment(); // } // // return null; // } @Override public int getCount() { return 2; } }
[ "md.jahirul.islam.bhuiyan.2014@gmail.com" ]
md.jahirul.islam.bhuiyan.2014@gmail.com
008321cb6dc9c03efacd728dc709c77cbc14b69f
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.vrshell-VrShell/sources/com/oculus/android/exoplayer2/upstream/ContentDataSource.java
25eadffe450aa2550bc21440a245a369e3b09264
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
7,180
java
package com.oculus.android.exoplayer2.upstream; import android.content.ContentResolver; import android.content.Context; import android.content.res.AssetFileDescriptor; import android.net.Uri; import java.io.EOFException; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.channels.FileChannel; public final class ContentDataSource implements DataSource { private AssetFileDescriptor assetFileDescriptor; private long bytesRemaining; private FileInputStream inputStream; private final TransferListener<? super ContentDataSource> listener; private boolean opened; private final ContentResolver resolver; private Uri uri; public static class ContentDataSourceException extends IOException { public ContentDataSourceException(IOException iOException) { super(iOException); } } public ContentDataSource(Context context) { this(context, null); } public ContentDataSource(Context context, TransferListener<? super ContentDataSource> transferListener) { this.resolver = context.getContentResolver(); this.listener = transferListener; } @Override // com.oculus.android.exoplayer2.upstream.DataSource public long open(DataSpec dataSpec) throws ContentDataSourceException { try { this.uri = dataSpec.uri; this.assetFileDescriptor = this.resolver.openAssetFileDescriptor(this.uri, "r"); if (this.assetFileDescriptor != null) { this.inputStream = new FileInputStream(this.assetFileDescriptor.getFileDescriptor()); long startOffset = this.assetFileDescriptor.getStartOffset(); long skip = this.inputStream.skip(dataSpec.position + startOffset) - startOffset; if (skip == dataSpec.position) { long j = -1; if (dataSpec.length != -1) { this.bytesRemaining = dataSpec.length; } else { long length = this.assetFileDescriptor.getLength(); if (length == -1) { FileChannel channel = this.inputStream.getChannel(); long size = channel.size(); if (size != 0) { j = size - channel.position(); } this.bytesRemaining = j; } else { this.bytesRemaining = length - skip; } } this.opened = true; TransferListener<? super ContentDataSource> transferListener = this.listener; if (transferListener != null) { transferListener.onTransferStart(this, dataSpec); } return this.bytesRemaining; } throw new EOFException(); } throw new FileNotFoundException("Could not open file descriptor for: " + this.uri); } catch (IOException e) { throw new ContentDataSourceException(e); } } @Override // com.oculus.android.exoplayer2.upstream.DataSource public int read(byte[] bArr, int i, int i2) throws ContentDataSourceException { if (i2 == 0) { return 0; } long j = this.bytesRemaining; if (j == 0) { return -1; } if (j != -1) { try { i2 = (int) Math.min(j, (long) i2); } catch (IOException e) { throw new ContentDataSourceException(e); } } int read = this.inputStream.read(bArr, i, i2); if (read != -1) { long j2 = this.bytesRemaining; if (j2 != -1) { this.bytesRemaining = j2 - ((long) read); } TransferListener<? super ContentDataSource> transferListener = this.listener; if (transferListener != null) { transferListener.onBytesTransferred(this, read); } return read; } else if (this.bytesRemaining == -1) { return -1; } else { throw new ContentDataSourceException(new EOFException()); } } @Override // com.oculus.android.exoplayer2.upstream.DataSource public Uri getUri() { return this.uri; } @Override // com.oculus.android.exoplayer2.upstream.DataSource public void close() throws ContentDataSourceException { this.uri = null; try { if (this.inputStream != null) { this.inputStream.close(); } this.inputStream = null; try { if (this.assetFileDescriptor != null) { this.assetFileDescriptor.close(); } this.assetFileDescriptor = null; if (this.opened) { this.opened = false; TransferListener<? super ContentDataSource> transferListener = this.listener; if (transferListener != null) { transferListener.onTransferEnd(this); } } } catch (IOException e) { throw new ContentDataSourceException(e); } catch (Throwable th) { this.assetFileDescriptor = null; if (this.opened) { this.opened = false; TransferListener<? super ContentDataSource> transferListener2 = this.listener; if (transferListener2 != null) { transferListener2.onTransferEnd(this); } } throw th; } } catch (IOException e2) { throw new ContentDataSourceException(e2); } catch (Throwable th2) { this.inputStream = null; try { if (this.assetFileDescriptor != null) { this.assetFileDescriptor.close(); } this.assetFileDescriptor = null; if (this.opened) { this.opened = false; TransferListener<? super ContentDataSource> transferListener3 = this.listener; if (transferListener3 != null) { transferListener3.onTransferEnd(this); } } throw th2; } catch (IOException e3) { throw new ContentDataSourceException(e3); } catch (Throwable th3) { this.assetFileDescriptor = null; if (this.opened) { this.opened = false; TransferListener<? super ContentDataSource> transferListener4 = this.listener; if (transferListener4 != null) { transferListener4.onTransferEnd(this); } } throw th3; } } } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
d4bdc582507de58d4e9cf95896be0ca6a8c5913a
f3aec68bc48dc52e76f276fd3b47c3260c01b2a4
/core/referencebook/src/main/java/ru/korus/tmis/pix/PRPAIN201301UV02.java
f57be9e89705a8b6e598ed6d8c7cbfa82594acf9
[]
no_license
MarsStirner/core
c9a383799a92e485e2395d81a0bc95d51ada5fa5
6fbf37af989aa48fabb9c4c2566195aafd2b16ab
refs/heads/master
2020-12-03T00:39:51.407573
2016-04-29T12:28:32
2016-04-29T12:28:32
96,041,573
0
1
null
null
null
null
UTF-8
Java
false
false
1,628
java
package ru.korus.tmis.pix; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;extension base="{urn:hl7-org:v3}PRPA_IN201301UV02.MCCI_MT000100UV01.Message"> * &lt;attribute name="ITSVersion" use="required" type="{http://www.w3.org/2001/XMLSchema}string" fixed="XML_1.0" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "PRPA_IN201301UV02") public class PRPAIN201301UV02 extends PRPAIN201301UV02MCCIMT000100UV01Message { @XmlAttribute(name = "ITSVersion", required = true) protected String itsVersion; /** * Gets the value of the itsVersion property. * * @return * possible object is * {@link String } * */ public String getITSVersion() { if (itsVersion == null) { return "XML_1.0"; } else { return itsVersion; } } /** * Sets the value of the itsVersion property. * * @param value * allowed object is * {@link String } * */ public void setITSVersion(String value) { this.itsVersion = value; } }
[ "szgrebelny@korusconsulting.ru" ]
szgrebelny@korusconsulting.ru
d8b2c45c0deeabfe95a374963aeb2f44941c2c05
600a4fe2623a9c8f419638075828c44b4a85e37c
/04_Lists/04_Grid_Custom/app/src/main/java/net/openwebinars/liststring/ScrollingActivity.java
5b6704cc94b85e10dc55de6ab1841cf81d9fd659
[]
no_license
miguelcamposdev/euromind_glogow
3a945b9706ca7f9807626860beefe4becc4c77ac
6db96ed1195862465fd41646c43e2af48375ad1f
refs/heads/master
2021-05-30T23:19:13.254235
2016-01-29T17:22:55
2016-01-29T17:22:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,354
java
package net.openwebinars.liststring; import android.os.Bundle; import android.support.design.widget.CollapsingToolbarLayout; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; public class ScrollingActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_scrolling); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); CollapsingToolbarLayout appBar = (CollapsingToolbarLayout)findViewById(R.id.toolbar_layout); setSupportActionBar(toolbar); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); Bundle info = getIntent().getExtras(); String name = info.getString("studentName"); int age = info.getInt("studentAge"); appBar.setTitle(name); } }
[ "camposmiguel@gmail.com" ]
camposmiguel@gmail.com
6c156b66682cffd0abc73555f60d4e078b2a6d8a
1a6974cce238519d2ef9d7bfea96ae9effd49fdb
/src/main/java/nmd/orb/repositories/cached/CachedFeedItemsRepository.java
d86cb2d343e16d5a4cc5057d2795b058cfa8205a
[]
no_license
vitaliikacov/nmdService
f592c66960934ceea1cf2d0ad0fd1041dbb96c97
f998eeceb5c287ec934065496a40110e4c06e957
refs/heads/master
2021-01-18T13:21:44.041693
2015-04-14T19:11:00
2015-04-14T19:11:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,059
java
package nmd.orb.repositories.cached; import nmd.orb.feed.FeedItem; import nmd.orb.repositories.Cache; import nmd.orb.repositories.FeedItemsRepository; import java.util.List; import java.util.UUID; import java.util.logging.Logger; import static nmd.orb.util.Assert.assertNotNull; /** * Author : Igor Usenko ( igors48@gmail.com ) * Date : 04.03.14 */ public class CachedFeedItemsRepository implements FeedItemsRepository { private static final Logger LOGGER = Logger.getLogger(CachedFeedItemsRepository.class.getName()); private final FeedItemsRepository feedItemsRepository; private final Cache cache; public CachedFeedItemsRepository(final FeedItemsRepository feedItemsRepository, final Cache cache) { assertNotNull(feedItemsRepository); this.feedItemsRepository = feedItemsRepository; assertNotNull(cache); this.cache = cache; } @Override public synchronized void storeItems(UUID feedId, List<FeedItem> items) { assertNotNull(feedId); assertNotNull(items); this.feedItemsRepository.storeItems(feedId, items); this.cache.put(keyFor(feedId), items); } @Override public synchronized List<FeedItem> loadItems(final UUID feedId) { assertNotNull(feedId); final List<FeedItem> cached = (List<FeedItem>) this.cache.get(keyFor(feedId)); if (cached == null) { final List<FeedItem> loaded = this.feedItemsRepository.loadItems(feedId); this.cache.put(keyFor(feedId), loaded); LOGGER.info(String.format("Items for feed [ %s ] were loaded from datastore", feedId)); return loaded; } else { return cached; } } @Override public synchronized void deleteItems(final UUID feedId) { assertNotNull(feedId); this.cache.delete(keyFor(feedId)); this.feedItemsRepository.deleteItems(feedId); } public static String keyFor(final UUID uuid) { assertNotNull(uuid); return "FEED-" + uuid; } }
[ "nmds48@gmail.com" ]
nmds48@gmail.com
b20d00cf4e032d84140173470343274ab884bb8e
d36b9ff8b62708f939ca535490b0ed6239324dad
/zd-hft-stratagy/src/main/java/com/zd/config/Global.java
89e66490062c281fe92976111846d9637fd187fd
[]
no_license
userKarl/stratagy-trader
c02b5be3b9b5101a7f61761546ddc7cd45b2e6a3
fed2000fb2c994c5172c7ec3e31b3651eb2e1d31
refs/heads/master
2020-03-26T08:36:15.391928
2018-09-13T11:32:14
2018-09-13T11:32:14
144,710,668
3
7
null
null
null
null
UTF-8
Java
false
false
1,386
java
package com.zd.config; import java.util.concurrent.ConcurrentHashMap; import com.shanghaizhida.beans.MarketInfo; import com.zd.business.engine.main.central.CentralEventProducer; import com.zd.business.engine.main.market.MarketEventProducer; import com.zd.business.engine.main.order.OrderEventProducer; import com.zd.business.entity.ctp.Tick; public class Global { /** * 行情Disruptor生产者 */ public static MarketEventProducer marketEventProducer = null; /** * 下单Disruptor生产者 */ public static OrderEventProducer orderEventProducer = null; /** * 中控Disruptor生产者 */ public static CentralEventProducer centralEventProducer = null; // 可开启的消费者个数 public static final int TOTALCONSUMER = 10; // 每个消费者所计算的策略数 public static final int TOTALSTRATAGYPERCONSUMER = 20; // 存放直达行情数据 public static ConcurrentHashMap<String, MarketInfo> zdContractMap = new ConcurrentHashMap<String, MarketInfo>(); //存放CTP行情数据 public static ConcurrentHashMap<String, Tick> ctpContractMap = new ConcurrentHashMap<String, Tick>(); //存放国际股票行情数据 public static ConcurrentHashMap<String, MarketInfo> stockMap = new ConcurrentHashMap<String, MarketInfo>(); //报单引用 public static Integer orderRef=new Integer(25); public static Object object=new Object(); }
[ "yanglin-163.-com@163.com" ]
yanglin-163.-com@163.com
7bd57018afcf62336d185d39550443425703c3a3
6fb939605984d30c9a908709853cb5673e8b0dcb
/src/main/java/web/test/jhipster/booking/service/AuditEventService.java
9251ca455228857510e11fa38700bb0ce87d4e86
[]
no_license
donut-on-ice/testJhipster
f4d8069f73844315eede8c477deb26e9c983de2c
62cee618d616ada08315bf06457a81aad210febd
refs/heads/master
2021-06-27T03:31:03.914929
2018-05-22T21:48:46
2018-05-22T21:48:46
134,479,619
0
1
null
2020-09-18T07:45:37
2018-05-22T21:48:42
Java
UTF-8
Java
false
false
1,803
java
package web.test.jhipster.booking.service; import web.test.jhipster.booking.config.audit.AuditEventConverter; import web.test.jhipster.booking.repository.PersistenceAuditEventRepository; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.util.Optional; /** * Service for managing audit events. * <p> * This is the default implementation to support SpringBoot Actuator AuditEventRepository */ @Service @Transactional public class AuditEventService { private final PersistenceAuditEventRepository persistenceAuditEventRepository; private final AuditEventConverter auditEventConverter; public AuditEventService( PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter) { this.persistenceAuditEventRepository = persistenceAuditEventRepository; this.auditEventConverter = auditEventConverter; } public Page<AuditEvent> findAll(Pageable pageable) { return persistenceAuditEventRepository.findAll(pageable) .map(auditEventConverter::convertToAuditEvent); } public Page<AuditEvent> findByDates(Instant fromDate, Instant toDate, Pageable pageable) { return persistenceAuditEventRepository.findAllByAuditEventDateBetween(fromDate, toDate, pageable) .map(auditEventConverter::convertToAuditEvent); } public Optional<AuditEvent> find(Long id) { return Optional.ofNullable(persistenceAuditEventRepository.findOne(id)).map (auditEventConverter::convertToAuditEvent); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
64473bf4289b6d59cb71bfef189efb5a6faf14d5
87901d9fd3279eb58211befa5357553d123cfe0c
/bin/ext-template/yacceleratorstorefront/web/testsrc/de/hybris/platform/yacceleratorstorefront/controllers/cms/CategoryFeatureComponentControllerTest.java
3d2276bff6da41ca42226faef9d14ca976ccfeba
[]
no_license
prafullnagane/learning
4d120b801222cbb0d7cc1cc329193575b1194537
02b46a0396cca808f4b29cd53088d2df31f43ea0
refs/heads/master
2020-03-27T23:04:17.390207
2014-02-27T06:19:49
2014-02-27T06:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,496
java
/* * [y] hybris Platform * * Copyright (c) 2000-2013 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.yacceleratorstorefront.controllers.cms; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.verify; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.acceleratorcms.model.components.CategoryFeatureComponentModel; import de.hybris.platform.category.model.CategoryModel; import de.hybris.platform.cms2.exceptions.CMSItemNotFoundException; import de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSComponentService; import de.hybris.platform.commercefacades.product.data.CategoryData; import de.hybris.platform.servicelayer.dto.converter.Converter; import de.hybris.platform.yacceleratorstorefront.controllers.ControllerConstants; import de.hybris.platform.yacceleratorstorefront.controllers.pages.AbstractPageController; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import junit.framework.Assert; import org.apache.commons.lang.StringUtils; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.ui.Model; /** * Unit test for {@link CategoryFeatureComponentController} */ @UnitTest public class CategoryFeatureComponentControllerTest { private static final String COMPONENT_UID = "componentUid"; private static final String TEST_COMPONENT_UID = "componentUID"; private static final String TEST_TYPE_CODE = "myTypeCode"; private static final String TEST_TYPE_VIEW = ControllerConstants.Views.Cms.ComponentPrefix + StringUtils.lowerCase(TEST_TYPE_CODE); private static final String COMPONENT = "component"; private static final String TEST_CATEGORY_URL = "TestCategoryUrl"; private static final String URL = "url"; private CategoryFeatureComponentController categoryFeatureComponentController; @Mock private Model model; @Mock private DefaultCMSComponentService cmsComponentService; @Mock private HttpServletRequest request; @Mock private HttpServletResponse response; @Mock private CategoryFeatureComponentModel categoryFeatureComponentModel; @Mock private Converter<CategoryModel, CategoryData> categoryUrlConverter; @Mock private CategoryModel categoryModel; @Mock private CategoryData categoryData; @Before public void setUp() { MockitoAnnotations.initMocks(this); categoryFeatureComponentController = new CategoryFeatureComponentController(); categoryFeatureComponentController.setCmsComponentService(cmsComponentService); ReflectionTestUtils.setField(categoryFeatureComponentController, "categoryUrlConverter", categoryUrlConverter); } @Test public void testRenderComponent() throws Exception { given(categoryFeatureComponentModel.getCategory()).willReturn(categoryModel); given(categoryFeatureComponentModel.getItemtype()).willReturn(TEST_TYPE_CODE); given(categoryUrlConverter.convert(categoryModel)).willReturn(categoryData); given(categoryData.getUrl()).willReturn(TEST_CATEGORY_URL); final String viewName = categoryFeatureComponentController.handleComponent(request, response, model, categoryFeatureComponentModel); verify(model, Mockito.times(1)).addAttribute(URL, TEST_CATEGORY_URL); Assert.assertEquals(TEST_TYPE_VIEW, viewName); } @Test public void testRenderComponentNoCategory() throws Exception { given(categoryFeatureComponentModel.getCategory()).willReturn(null); given(categoryFeatureComponentModel.getItemtype()).willReturn(TEST_TYPE_CODE); final String viewName = categoryFeatureComponentController.handleComponent(request, response, model, categoryFeatureComponentModel); verify(model, Mockito.times(0)).addAttribute(URL, TEST_CATEGORY_URL); Assert.assertEquals(TEST_TYPE_VIEW, viewName); } @Test public void testRenderComponentUid() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(TEST_COMPONENT_UID); given(cmsComponentService.getSimpleCMSComponent(TEST_COMPONENT_UID)).willReturn(categoryFeatureComponentModel); given(categoryFeatureComponentModel.getCategory()).willReturn(categoryModel); given(categoryFeatureComponentModel.getItemtype()).willReturn(TEST_TYPE_CODE); given(categoryUrlConverter.convert(categoryModel)).willReturn(categoryData); given(categoryData.getUrl()).willReturn(TEST_CATEGORY_URL); final String viewName = categoryFeatureComponentController.handleGet(request, response, model); verify(model, Mockito.times(1)).addAttribute(COMPONENT, categoryFeatureComponentModel); verify(model, Mockito.times(1)).addAttribute(URL, TEST_CATEGORY_URL); Assert.assertEquals(TEST_TYPE_VIEW, viewName); } @Test(expected = AbstractPageController.HttpNotFoundException.class) public void testRenderComponentNotFound() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(null); given(request.getParameter(COMPONENT_UID)).willReturn(null); categoryFeatureComponentController.handleGet(request, response, model); } @Test(expected = AbstractPageController.HttpNotFoundException.class) public void testRenderComponentNotFound2() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(null); given(request.getParameter(COMPONENT_UID)).willReturn(TEST_COMPONENT_UID); given(cmsComponentService.getSimpleCMSComponent(TEST_COMPONENT_UID)).willReturn(null); categoryFeatureComponentController.handleGet(request, response, model); } @Test(expected = AbstractPageController.HttpNotFoundException.class) public void testRenderComponentNotFound3() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(TEST_COMPONENT_UID); given(cmsComponentService.getSimpleCMSComponent(TEST_COMPONENT_UID)).willReturn(null); given(cmsComponentService.getSimpleCMSComponent(TEST_COMPONENT_UID)).willThrow(new CMSItemNotFoundException("")); categoryFeatureComponentController.handleGet(request, response, model); } }
[ "admin1@neev31.(none)" ]
admin1@neev31.(none)
4edef2f9dbef4b8b42a52dbe85740412a945d63f
551e459d83c4f8e006d32b54d6365eacc6c78e00
/smartas-core/src/main/java/org/smartas/core/dao/BatisDaoImpl.java
b0f8b07078ab6c2ddd2a1b8a0bcaf41c9f0f635d
[]
no_license
summitxf/SmartAs
088f8b5185e215aae2cec31061b13c7316522f72
a8235d6ddadf5b6e42694f0a3a7d926fbea0869d
refs/heads/master
2021-01-18T10:49:58.807715
2016-07-05T02:54:35
2016-07-05T02:54:35
50,152,795
1
0
null
2016-01-22T02:44:49
2016-01-22T02:44:49
null
UTF-8
Java
false
false
468
java
package org.smartas.core.dao; import org.smartas.core.BaseDao; import org.smartas.core.POJO; /** * * @author chenb * * @param <T> 基础表类,对于主键为long类型 ,则直接继承该类,若主键为其他类型, * 需要直接继承BatisGenericDao */ public class BatisDaoImpl<T extends POJO> extends BatisGenericDao<T, Long> implements BaseDao<T> { public BatisDaoImpl(Class<T> persistType) { super(persistType); } }
[ "chenjpu@gmail.com" ]
chenjpu@gmail.com
6b8def15c967ec1faaf97d8708f88facd79b354a
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
/hybris/bin/modules/core-accelerator/acceleratorcms/src/de/hybris/platform/acceleratorcms/component/cache/impl/CurrentCategoryCmsCacheKeyProvider.java
f718aca09a49cbe786547df0b8a64377fe448790
[]
no_license
shaikshakeeb785/hybrisNew
c753ac45c6ae264373e8224842dfc2c40a397eb9
228100b58d788d6f3203333058fd4e358621aba1
refs/heads/master
2023-08-15T06:31:59.469432
2021-09-03T09:02:04
2021-09-03T09:02:04
402,680,399
0
0
null
null
null
null
UTF-8
Java
false
false
850
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.acceleratorcms.component.cache.impl; import de.hybris.platform.cms2.model.contents.components.SimpleCMSComponentModel; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; public class CurrentCategoryCmsCacheKeyProvider extends DefaultCmsCacheKeyProvider { @Override public StringBuilder getKeyInternal(final HttpServletRequest request, final SimpleCMSComponentModel component) { final StringBuilder buffer = new StringBuilder(super.getKeyInternal(request, component)); final String currentCategory = getRequestContextData(request).getCategory().getPk().getLongValueAsString(); if (!StringUtils.isEmpty(currentCategory)) { buffer.append(currentCategory); } return buffer; } }
[ "sauravkr82711@gmail.com" ]
sauravkr82711@gmail.com
cb3498775d283cc8f1077313ad347ce175b15107
d5515553d071bdca27d5d095776c0e58beeb4a9a
/src/h/gvcolor_t.java
b97bf914314fb224b5dabb89dc59214a470b2043
[]
no_license
ccamel/plantuml
29dfda0414a3dbecc43696b63d4dadb821719489
3100d49b54ee8e98537051e071915e2060fe0b8e
refs/heads/master
2022-07-07T12:03:37.351931
2016-12-14T21:01:03
2016-12-14T21:01:03
77,067,872
1
0
null
2022-05-30T09:56:21
2016-12-21T16:26:58
Java
UTF-8
Java
false
false
2,386
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2017, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * 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: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * 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 h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 9xilv9or3ptvy3gupp6t2ql19 public interface gvcolor_t extends __ptr__ { public static List<String> DEFINITION = Arrays.asList( "typedef struct color_s", "{", "union", "{", "double RGBA[4]", "double HSVA[4]", "unsigned char rgba[4]", "unsigned char cmyk[4]", "int rrggbbaa[4]", "char *string", "int index", "}", "u", "color_type_t type", "}", "gvcolor_t"); } // typedef struct color_s { // union { // double RGBA[4]; // double HSVA[4]; // unsigned char rgba[4]; // unsigned char cmyk[4]; // int rrggbbaa[4]; // char *string; // int index; // } u; // color_type_t type; // } gvcolor_t;
[ "plantuml@gmail.com" ]
plantuml@gmail.com
97b2562f669ac9f9fa797c87c3691ba0a23bdd71
70365107bea73d7e081d3fd4e3e7cb0120454cac
/app/src/main/java/com/zbxn/main/widget/smarttablayout/utils/ViewPagerItems.java
e8481fb51dd51de7d9293acb8c8a0ac038267757
[]
no_license
Leader0721/ZBXN
e752744a45efabbc72c196c4412230cb456b3a08
168aee78ca6df8911f38f31e5c9c5bc7de6205ac
refs/heads/master
2020-12-02T08:00:16.600667
2017-07-10T10:01:46
2017-07-10T10:01:46
96,758,843
0
0
null
null
null
null
UTF-8
Java
false
false
1,791
java
/** * Copyright (C) 2015 ogaclejapan * * 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.zbxn.main.widget.smarttablayout.utils; import android.content.Context; import android.support.annotation.LayoutRes; import android.support.annotation.StringRes; public class ViewPagerItems extends PagerItems<ViewPagerItem> { public ViewPagerItems(Context context) { super(context); } public static Creator with(Context context) { return new Creator(context); } public static class Creator { private final ViewPagerItems items; public Creator(Context context) { items = new ViewPagerItems(context); } public Creator add(@StringRes int title, @LayoutRes int resource) { return add(ViewPagerItem.of(items.getContext().getString(title), resource)); } public Creator add(@StringRes int title, float width, @LayoutRes int resource) { return add(ViewPagerItem.of(items.getContext().getString(title), width, resource)); } public Creator add(CharSequence title, @LayoutRes int resource) { return add(ViewPagerItem.of(title, resource)); } public Creator add(ViewPagerItem item) { items.add(item); return this; } public ViewPagerItems create() { return items; } } }
[ "18410133533@163.com" ]
18410133533@163.com
46b19284e8b53710c8f12c60d0e77afd7990c434
35348f6624d46a1941ea7e286af37bb794bee5b7
/Ghidra/Debug/Debugger-agent-dbgmodel/src/main/java/agent/dbgmodel/impl/dbgmodel/concept/IterableConceptImpl.java
25f84a68545184b87bf2a9e994e84da79b7df5ec
[ "Apache-2.0", "GPL-1.0-or-later", "GPL-3.0-only", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
StarCrossPortal/ghidracraft
7af6257c63a2bb7684e4c2ad763a6ada23297fa3
a960e81ff6144ec8834e187f5097dfcf64758e18
refs/heads/master
2023-08-23T20:17:26.250961
2021-10-22T00:53:49
2021-10-22T00:53:49
359,644,138
80
19
Apache-2.0
2021-10-20T03:59:55
2021-04-20T01:14:29
Java
UTF-8
Java
false
false
2,881
java
/* ### * IP: GHIDRA * * 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 agent.dbgmodel.impl.dbgmodel.concept; import com.sun.jna.Pointer; import com.sun.jna.platform.win32.WinDef.ULONGLONGByReference; import com.sun.jna.platform.win32.WinNT.HRESULT; import com.sun.jna.platform.win32.COM.COMUtils; import com.sun.jna.ptr.PointerByReference; import agent.dbgmodel.dbgmodel.COMUtilsExtra; import agent.dbgmodel.dbgmodel.DbgModel; import agent.dbgmodel.dbgmodel.DbgModel.OpaqueCleanable; import agent.dbgmodel.dbgmodel.main.*; import agent.dbgmodel.impl.dbgmodel.main.ModelIteratorInternal; import agent.dbgmodel.jna.dbgmodel.concept.IIterableConcept; import agent.dbgmodel.jna.dbgmodel.main.WrapIModelIterator; public class IterableConceptImpl implements IterableConceptInternal { @SuppressWarnings("unused") private final OpaqueCleanable cleanable; private final IIterableConcept jnaData; private ModelIterator iterator; private KeyStore metadata; public IterableConceptImpl(IIterableConcept jnaData) { this.cleanable = DbgModel.releaseWhenPhantom(this, jnaData); this.jnaData = jnaData; } @Override public Pointer getPointer() { return jnaData.getPointer(); } @Override public long getDefaultIndexDimensionality(ModelObject contextObject) { Pointer pContextObject = contextObject.getPointer(); ULONGLONGByReference pDimensionality = new ULONGLONGByReference(); COMUtils.checkRC(jnaData.GetDefaultIndexDimensionality(pContextObject, pDimensionality)); return pDimensionality.getValue().longValue(); } @Override public ModelIterator getIterator(ModelObject contextObject) { Pointer pContextObject = contextObject.getPointer(); PointerByReference ppIndexers = new PointerByReference(); HRESULT hr = jnaData.GetIterator(pContextObject, ppIndexers); if (hr.equals(COMUtilsExtra.E_FAIL)) { return null; } if (hr.equals(COMUtilsExtra.E_COM_EXC)) { return null; } COMUtils.checkRC(hr); WrapIModelIterator wrap = new WrapIModelIterator(ppIndexers.getValue()); try { return ModelIteratorInternal.tryPreferredInterfaces(wrap::QueryInterface); } finally { wrap.Release(); } } public ModelIterator getIterator() { return iterator; } @Override public KeyStore getMetadata() { return metadata; } @Override public void setMetadata(KeyStore metdata) { this.metadata = metdata; } }
[ "46821332+nsadeveloper789@users.noreply.github.com" ]
46821332+nsadeveloper789@users.noreply.github.com
7be93cc48d78252fa402c9491e75c5f6d392e7fc
cdeb1696d36c6559f5ddeb9c80a5d53ec346dc1c
/src/main/java/com/mossle/api/audit/AuditDTO.java
759b0d875701fdac322a307788049feffb2c99c5
[ "Apache-2.0" ]
permissive
mossle/lemon
da21d489d278a6c7e23a135d362b9309ff9fd942
0ef76d73e76daa11f7a11bda8b0b6c661c8967c7
refs/heads/master
2020-02-26T14:28:03.118794
2015-10-10T08:39:37
2015-10-10T08:39:37
44,823,298
1
0
null
2015-10-23T15:59:09
2015-10-23T15:59:09
null
UTF-8
Java
false
false
1,912
java
package com.mossle.api.audit; import java.util.Date; public class AuditDTO { private String user; private String resourceType; private String resourceId; private String action; private String result; private String application; private Date auditTime; private String client; private String server; private String description; public String getUser() { return user; } public void setUser(String user) { this.user = user; } public String getResourceType() { return resourceType; } public void setResourceType(String resourceType) { this.resourceType = resourceType; } public String getResourceId() { return resourceId; } public void setResourceId(String resourceId) { this.resourceId = resourceId; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getResult() { return result; } public void setResult(String result) { this.result = result; } public String getApplication() { return application; } public void setApplication(String application) { this.application = application; } public Date getAuditTime() { return auditTime; } public void setAuditTime(Date auditTime) { this.auditTime = auditTime; } public String getClient() { return client; } public void setClient(String client) { this.client = client; } public String getServer() { return server; } public void setServer(String server) { this.server = server; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }
[ "xyz20003@gmail.com" ]
xyz20003@gmail.com
7107e06411c948c8a904e38584051f5dea7bab0c
17553046105f58fb96190fb544c9136f301de670
/memory-engine/src/main/java/com/whoiszxl/entity/Result.java
de7e31ebdbb54223f8656ff2a648fcdb7b444470
[]
no_license
TSW2/tues-ex
8bc8c9d344e1e3bead557105df8321de00542815
ff1815d98364f616d27f4327f12f6b287304cd9f
refs/heads/master
2023-03-30T06:59:10.954266
2021-04-06T10:29:55
2021-04-06T10:29:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,711
java
package com.whoiszxl.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; /** * @description: 返回实体类 * @author: whoiszxl * @create: 2020-01-03 **/ @Data @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class Result<T> { /** 返回码 */ private Integer code; /** 返回信息 */ private String message; /** 返回数据 */ private T data; public Result(Integer code, String message) { this.code = code; this.message = message; } public boolean isOk() { return this.code.equals(StatusCode.OK); } public static <T> Result<T> buildError() { Result<T> result = new Result<T>(); return result.setCode(StatusCode.ERROR).setMessage("error"); } public static <T> Result<T> buildError(String message) { Result<T> result = new Result<T>(); return result.setCode(StatusCode.ERROR).setMessage(message); } public static <T> Result<T> buildError(int errorCode, String message) { Result<T> result = new Result<T>(); return result.setCode(errorCode).setMessage(message); } public static <T> Result<T> buildSuccess(T data) { return buildSuccess("success", data); } public static <T> Result<T> buildSuccess(String message, T data) { Result<T> result = new Result<T>(); result.setCode(StatusCode.OK).setMessage(message).setData(data); return result; } public static <T> Result<T> buildSuccess() { Result<T> result = new Result<T>(); return result.setCode(StatusCode.OK).setMessage("success"); } }
[ "whoiszxl@gmail.com" ]
whoiszxl@gmail.com
80457dc49421ddbd1207c29d390917f06db1aa15
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipseswt_cluster/24676/tar_1.java
c29fa9490d54184f6d59dc67fa1bf9d3af78f95e
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,340
java
/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.swt.dnd; import org.eclipse.swt.internal.win32.*; import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; class StyledTextDragAndDropEffect extends DragAndDropEffect { StyledText text; long scrollBeginTime; int scrollX = -1, scrollY = -1; int currentOffset = -1; static final int SCROLL_HYSTERESIS = 100; // milli seconds static final int SCROLL_TOLERANCE = 20; // pixels StyledTextDragAndDropEffect(StyledText control) { text = control; } void showDropTargetEffect(int effect, int eventType, int x, int y) { switch (eventType) { case DND.DropAccept: if (currentOffset != -1) { text.setCaretOffset(currentOffset); currentOffset = -1; } break; case DND.DragLeave: Caret caret = text.getCaret(); if (caret != null) { caret.setLocation(text.getLocationAtOffset(text.getCaretOffset())); } break; } Point pt = text.getDisplay().map(null, text, x, y); if ((effect & DND.FEEDBACK_SCROLL) == 0) { scrollBeginTime = 0; scrollX = scrollY = -1; } else { if (text.getCharCount() == 0) { scrollBeginTime = 0; scrollX = scrollY = -1; } else { if (scrollX != -1 && scrollY != -1 && scrollBeginTime != 0 && (pt.x >= scrollX && pt.x <= (scrollX + SCROLL_TOLERANCE) || pt.y >= scrollY && pt.y <= (scrollY + SCROLL_TOLERANCE))) { if (System.currentTimeMillis() >= scrollBeginTime) { Rectangle area = text.getClientArea(); Rectangle bounds = text.getTextBounds(0, 0); int charWidth = bounds.width; int scrollAmount = 10*charWidth; if (pt.x < area.x + 3*charWidth) { int leftPixel = text.getHorizontalPixel(); text.setHorizontalPixel(leftPixel - scrollAmount); if (text.getHorizontalPixel() != leftPixel) { text.redraw(); } } if (pt.x > area.width - 3*charWidth) { int leftPixel = text.getHorizontalPixel(); text.setHorizontalPixel(leftPixel + scrollAmount); if (text.getHorizontalPixel() != leftPixel) { text.redraw(); } } int lineHeight = bounds.height; if (pt.y < area.y + lineHeight) { int topPixel = text.getTopPixel(); text.setTopPixel(topPixel - lineHeight); if (text.getTopPixel() != topPixel) { text.redraw(); } } if (pt.y > area.height - lineHeight) { int topPixel = text.getTopPixel(); text.setTopPixel(topPixel + lineHeight); if (text.getTopPixel() != topPixel) { text.redraw(); } } scrollBeginTime = 0; scrollX = scrollY = -1; } } else { scrollBeginTime = System.currentTimeMillis() + SCROLL_HYSTERESIS; scrollX = pt.x; scrollY = pt.y; } } } if ((effect & DND.FEEDBACK_SELECT) != 0) { StyledTextContent content = text.getContent(); int oldOffset = text.getCaretOffset(); int newOffset = -1; try { newOffset = text.getOffsetAtLocation(pt); } catch (IllegalArgumentException ex1) { int maxOffset = content.getCharCount(); Point maxLocation = text.getLocationAtOffset(maxOffset); if (pt.y >= maxLocation.y) { try { newOffset = text.getOffsetAtLocation(new Point(pt.x, maxLocation.y)); } catch (IllegalArgumentException ex2) { newOffset = maxOffset; } } else { try { int startOffset = text.getOffsetAtLocation(new Point(0, pt.y)); int endOffset = maxOffset; int line = content.getLineAtOffset(startOffset); int lineCount = content.getLineCount(); if (line + 1 < lineCount) { endOffset = content.getOffsetAtLine(line + 1) - 1; } int lineHeight = text.getLineHeight(startOffset); for (int i = endOffset; i >= startOffset; i--) { Point p = text.getLocationAtOffset(i); if (p.x < pt.x && p.y < pt.y && p.y + lineHeight > pt.y) { newOffset = i; break; } } } catch (IllegalArgumentException ex2) { newOffset = -1; } } } if (newOffset != -1 && newOffset != oldOffset) { // check if offset is line delimiter // see StyledText.isLineDelimiter() int line = content.getLineAtOffset(newOffset); int lineOffset = content.getOffsetAtLine(line); int offsetInLine = newOffset - lineOffset; // offsetInLine will be greater than line length if the line // delimiter is longer than one character and the offset is set // in between parts of the line delimiter. if (offsetInLine > content.getLine(line).length()) { newOffset = Math.max(0, newOffset - 1); } text.setFocus(); OS.ImageList_DragShowNolock(false); // move caret without modifying text Caret caret = text.getCaret(); if (caret != null) { currentOffset = newOffset; caret.setLocation(text.getLocationAtOffset(newOffset)); } OS.ImageList_DragShowNolock(true); } } } }
[ "375833274@qq.com" ]
375833274@qq.com
f406df5bdd7997cdfb75875898ded8609945737c
f4e15ee34808877459d81fd601d6be03bdfb4a9d
/winterwell/jtwitter/SimpleOAuthConsumer.java
491e1ac7611c196c700e2cebc63a40699fd1a75b
[]
no_license
Lianite/wurm-server-reference
369081debfa72f44eafc6a080002c4a3970f8385
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
refs/heads/master
2023-07-22T16:06:23.426163
2020-04-07T23:15:35
2020-04-07T23:15:35
253,933,452
0
0
null
null
null
null
UTF-8
Java
false
false
767
java
// // Decompiled by Procyon v0.5.30 // package winterwell.jtwitter; import oauth.signpost.basic.HttpURLConnectionRequestAdapter; import java.net.HttpURLConnection; import oauth.signpost.http.HttpRequest; import oauth.signpost.AbstractOAuthConsumer; class SimpleOAuthConsumer extends AbstractOAuthConsumer { private static final long serialVersionUID = 1L; public SimpleOAuthConsumer(final String consumerKey, final String consumerSecret) { super(consumerKey, consumerSecret); } @Override protected HttpRequest wrap(final Object request) { if (request instanceof HttpRequest) { return (HttpRequest)request; } return new HttpURLConnectionRequestAdapter((HttpURLConnection)request); } }
[ "jdraco6@gmail.com" ]
jdraco6@gmail.com
a5687d24a8f31b6e7f8d376c0d73d5f5eb372ca1
8c085f12963e120be684f8a049175f07d0b8c4e5
/castor/tags/tag_0_9_3_6/castor-2002/castor/src/main/org/exolab/castor/xml/schema/Wildcard.java
4ee79ca7e36c32e42596ce694e46eddc56bdd28f
[]
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
6,909
java
/** * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided * that the following conditions are met: * * 1. Redistributions of source code must retain copyright * statements and notices. Redistributions must also contain a * copy of this document. * * 2. Redistributions in binary form must reproduce the * above copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * 3. The name "Exolab" must not be used to endorse or promote * products derived from this Software without prior written * permission of Intalio, Inc. For written permission, * please contact info@exolab.org. * * 4. Products derived from this Software may not be called "Exolab" * nor may "Exolab" appear in their names without prior written * permission of Intalio, Inc. Exolab is a registered * trademark of Intalio, Inc. * * 5. Due credit should be given to the Exolab Project * (http://www.exolab.org/). * * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Copyright 2001 (C) Intalio, Inc. All Rights Reserved. * * $Id$ * Date Author Changes * 04/02/2001 Arnaud Blandin Created */ package org.exolab.castor.xml.schema; import java.util.Enumeration; import java.util.Vector; import org.exolab.castor.xml.ValidationException; /** * A class that represents an XML Schema Wildcard. * A wilcard is represented by the XML elements <any> and * <anyAttribute> and can be hold in a complexType or in * a ModelGroup (<group>). * * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a> */ public class Wildcard extends Particle { /** * The vector where we store the list of namespaces */ //don't use ArrayList to keep compatibility with jdk1.1 private Vector _namespaces; /** * A boolean that indicates if this wildcard represents * <anyAttribute>. * By default a wildcard represents <any> */ private boolean _attribute = false; /** * The complexType that holds this wildcard. */ private ComplexType _complexType; /** * The Group (<sequence> or <choice>) that holds this wildcard. */ private Group _group; /** * the processContent of this wildcard. * (strict by default) */ private String _processContents; /** * the id for this wildcard */ private String _id = null; /** * The wildcard is embedded in a complexType * @param ComplexType the complexType that contains this wildcard */ public Wildcard(ComplexType complexType) { _complexType = complexType; init(); } /** * The wildcard is embedded in a ModelGroup (<group>) * @param ModelGroup the group that contains this wildcard */ public Wildcard(Group group) { _group = group; init(); } private void init() { //in general not more than one namespace _namespaces = new Vector(1); setMaxOccurs(1); setMinOccurs(1); try { setProcessContents(SchemaNames.STRICT); } catch (SchemaException e) { //nothing to do since we are //not 'out of bounds' by using an hard coded value } } /** * add a namespace * @param String the namespace to add */ public void addNamespace(String Namespace) { _namespaces.addElement(Namespace); } /** * Removes the given namespace from the namespace collection * @param namespace the namespace to remove. */ public boolean removeNamespace(String namespace) { if (namespace == null) return false; return _namespaces.remove(namespace); } /** * Returns the complexType that contains this wildcard, can return null. * @return the complexType that contains this wildcard (can be null). */ public ComplexType getComplexType() { return _complexType; } /** * Returns the model group that contains this wildcard, can return null. * @return the model group that contains this wildcard (can be null). */ public Group getModelGroup() { return _group; } /** * Returns an enumeration that contains the different namespaces * of this wildcard * @return an enumeration that contains the different namespaces * of this wildcard */ public Enumeration getNamespaces() { return _namespaces.elements(); } /** * Returns the processContent of this wildcard * @return the processContent of this wildcard */ public String getProcessContent() { return _processContents; } /** * Returns true if this wildcard represents <anyAttribute> otherwise false * @return true if this wildcard represents <anyAttribute> otherwise false */ public boolean isAttributeWildcard() { return _attribute; } /** * Sets this wildcard to represent <anyAttribute> */ public void setAttributeWildcard() { _attribute = true; } /** * Sets the ID for this Group * @param id the ID for this Group */ public void setId(String id) { _id = id; } //-- setId /** * Sets the processContent of the wildCard * @param process the process content to set * @exception SchemaException thrown when the processContent is not valid */ public void setProcessContents(String process) throws SchemaException { if (!SchemaNames.isProcessName(process)) throw new SchemaException("processContents attribute not valid:" +process); _processContents = process; } public void validate() throws ValidationException { //only do the validation on the namespace } /** * Returns the type of this Schema Structure * @return the type of this Schema Structure **/ public short getStructureType() { return Structure.WILDCARD; } }
[ "nobody@b24b0d9a-6811-0410-802a-946fa971d308" ]
nobody@b24b0d9a-6811-0410-802a-946fa971d308
d12b99a9d6e88d6f250a941ec3e1dd09902f8987
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/44/1131.java
ca388ce770fd44647f5760a94ef903db5f02021f
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
675
java
package <missing>; public class GlobalMembers { public static int reverse(int num) { int[] a = new int[10]; int i; int j; int output = 0; for (i = 0;i < 10;i++) { a[i] = (int)(num / Math.pow(10,i)) % 10; } for (i = 9,j = 0;i >= 0;i--) { if (a[i] == 0) { j++; } else { break; } } for (i = 0;i < 10;i++) { output += a[i] * Math.pow(10,(9 - j - i)); } return output; } public static void Main() { int n; int t; for (t = 0;t < 6;t++) { String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } System.out.printf("%d\n",reverse(n)); } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
2e015abb1439a4a8b8a25deec512771fa1bf8bbd
032e99ccc209b07a311f71bc36323835dabde43d
/src/main/java/com/orchardsoft/bugtracker/config/CacheConfiguration.java
5f63ae1552d87a03fcc1b881a9b989279efc9c16
[]
no_license
DavidHuertas/BugTrackerJHipster
2b8d2b95ae9065fefc129d950644ba5854964b6c
7a22cf9fcab78c1e08c435ae901ce7cb1c36e93e
refs/heads/master
2022-12-21T11:06:24.910401
2019-12-15T01:18:51
2019-12-15T01:18:51
228,101,350
0
0
null
2022-12-16T04:42:20
2019-12-14T23:06:34
Java
UTF-8
Java
false
false
3,091
java
package com.orchardsoft.bugtracker.config; import java.time.Duration; import org.ehcache.config.builders.*; import org.ehcache.jsr107.Eh107Configuration; import org.hibernate.cache.jcache.ConfigSettings; import io.github.jhipster.config.JHipsterProperties; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.serviceregistry.Registration; import org.springframework.context.annotation.*; @Configuration @EnableCaching public class CacheConfiguration { private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration; public CacheConfiguration(JHipsterProperties jHipsterProperties) { JHipsterProperties.Cache.Ehcache ehcache = jHipsterProperties.getCache().getEhcache(); jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration( CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.heap(ehcache.getMaxEntries())) .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofSeconds(ehcache.getTimeToLiveSeconds()))) .build()); } @Bean public HibernatePropertiesCustomizer hibernatePropertiesCustomizer(javax.cache.CacheManager cacheManager) { return hibernateProperties -> hibernateProperties.put(ConfigSettings.CACHE_MANAGER, cacheManager); } @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { createCache(cm, com.orchardsoft.bugtracker.repository.UserRepository.USERS_BY_LOGIN_CACHE); createCache(cm, com.orchardsoft.bugtracker.repository.UserRepository.USERS_BY_EMAIL_CACHE); createCache(cm, com.orchardsoft.bugtracker.domain.User.class.getName()); createCache(cm, com.orchardsoft.bugtracker.domain.Authority.class.getName()); createCache(cm, com.orchardsoft.bugtracker.domain.User.class.getName() + ".authorities"); createCache(cm, com.orchardsoft.bugtracker.domain.Project.class.getName()); createCache(cm, com.orchardsoft.bugtracker.domain.Label.class.getName()); createCache(cm, com.orchardsoft.bugtracker.domain.Label.class.getName() + ".tickets"); createCache(cm, com.orchardsoft.bugtracker.domain.Ticket.class.getName()); createCache(cm, com.orchardsoft.bugtracker.domain.Ticket.class.getName() + ".labels"); // jhipster-needle-ehcache-add-entry }; } private void createCache(javax.cache.CacheManager cm, String cacheName) { javax.cache.Cache<Object, Object> cache = cm.getCache(cacheName); if (cache != null) { cm.destroyCache(cacheName); } cm.createCache(cacheName, jcacheConfiguration); } }
[ "dhuertas.eng@gmail.com" ]
dhuertas.eng@gmail.com
e2d83cb694e4b040700e38dec9dfe6bbb6ee60f0
256f4bed8d8f42560a168364056acf47893ddc2c
/bin/custom/merchandisestorefront/web/testsrc/org/merchandise/storefront/security/cookie/EnhancedCookieGeneratorTest.java
03a4236834d68fb896c0e90a4709b8a3285ab262
[]
no_license
marty-friedman/e-commerce
87d5b4226c9a06ca6020bf87c738e6590c071e3f
5c56f40d240f848e234f430ce904d4483ffe8117
refs/heads/master
2021-09-20T13:55:37.744933
2018-08-10T03:51:06
2018-08-10T03:51:06
142,566,237
0
0
null
null
null
null
UTF-8
Java
false
false
5,876
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package org.merchandise.storefront.security.cookie; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.builder.ToStringBuilder; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentMatcher; import org.mockito.BDDMockito; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; /** * */ public class EnhancedCookieGeneratorTest { private static final String JSESSIONID = "JSESSIONID"; private static final int NEVER_EXPIRES = -1; private final EnhancedCookieGenerator cookieGenerator = new EnhancedCookieGenerator(); @Mock private HttpServletRequest request; @Mock private HttpServletResponse response; @Before public void prepare() { MockitoAnnotations.initMocks(this); cookieGenerator.setCookieDomain("what a domain"); cookieGenerator.setCookieMaxAge(Integer.valueOf(NEVER_EXPIRES)); RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request)); } @Test public void testClientSideCookieDefaultPath() { cookieGenerator.setCookieName(JSESSIONID); cookieGenerator.setHttpOnly(false);//client side cookieGenerator.addCookie(response, "cookie_monster"); final Cookie expectedCookie = new Cookie(JSESSIONID, "cookie_monster"); expectedCookie.setPath("/"); expectedCookie.setSecure(false); expectedCookie.setMaxAge(NEVER_EXPIRES); expectedCookie.setDomain("what a domain"); Mockito.verify(response).addCookie(Mockito.argThat(new CookieArgumentMatcher(expectedCookie))); assertNoHeaderAdjustments(); } @Test public void testClientSideCookieDynamicPath() { cookieGenerator.setCookieName(JSESSIONID); cookieGenerator.setHttpOnly(false);//client side cookieGenerator.setCookieSecure(true); cookieGenerator.setUseDefaultPath(false); BDDMockito.given(request.getContextPath()).willReturn("/some_path"); cookieGenerator.addCookie(response, "cookie_monster"); final Cookie expectedCookie = new Cookie(JSESSIONID, "cookie_monster"); expectedCookie.setPath("/some_path"); expectedCookie.setSecure(true); expectedCookie.setMaxAge(NEVER_EXPIRES); expectedCookie.setDomain("what a domain"); Mockito.verify(response).addCookie(Mockito.argThat(new CookieArgumentMatcher(expectedCookie))); assertNoHeaderAdjustments(); } @Test public void testServerSideCookieDefaultPath() { cookieGenerator.setCookieName("guid"); cookieGenerator.setHttpOnly(true);//server side BDDMockito.given(request.getContextPath()).willReturn("/"); cookieGenerator.addCookie(response, "cookie_monster"); cookieGenerator.setUseDefaultPath(false); final Cookie expectedCookie = new Cookie("guid", "cookie_monster"); expectedCookie.setPath("/"); expectedCookie.setSecure(false); expectedCookie.setMaxAge(NEVER_EXPIRES); expectedCookie.setDomain("what a domain"); Mockito.verify(response).addHeader(EnhancedCookieGenerator.HEADER_COOKIE, "guid=cookie_monster; Version=1; Domain=\"what a domain\"; Path=/; HttpOnly"); } @Test public void testServerSideCookieDynamicPath() { cookieGenerator.setCookieName(JSESSIONID); cookieGenerator.setHttpOnly(true);//server side cookieGenerator.setUseDefaultPath(false); BDDMockito.given(request.getContextPath()).willReturn("/some_path"); cookieGenerator.addCookie(response, "cookie_monster"); final Cookie expectedCookie = new Cookie(JSESSIONID, "cookie_monster"); expectedCookie.setPath("/some_path"); expectedCookie.setSecure(false); expectedCookie.setMaxAge(NEVER_EXPIRES); expectedCookie.setDomain("what a domain"); Mockito.verify(response).addHeader(EnhancedCookieGenerator.HEADER_COOKIE, "JSESSIONID=cookie_monster; Version=1; Domain=\"what a domain\"; Path=/some_path; HttpOnly"); } /** * */ private void assertNoHeaderAdjustments() { Mockito.verify(response, Mockito.times(0)).addHeader(Mockito.anyString(), Mockito.anyString()); } private class CookieArgumentMatcher extends ArgumentMatcher<Cookie> { private final Cookie expectedCookie; CookieArgumentMatcher(final Cookie cookie) { this.expectedCookie = cookie; } /* * (non-Javadoc) * * @see org.mockito.ArgumentMatcher#matches(java.lang.Object) */ @Override public boolean matches(final Object argument) { if (argument instanceof Cookie) { final Cookie givenCookie = (Cookie) argument; if (givenCookie.getSecure() == expectedCookie.getSecure() && givenCookie.getMaxAge() == expectedCookie.getMaxAge() && givenCookie.getName().equals(expectedCookie.getName()) && (givenCookie.getPath() == expectedCookie.getPath() || givenCookie.getPath().equals(expectedCookie.getPath())) && givenCookie.getValue().equals(expectedCookie.getValue()) && (givenCookie.getDomain() == expectedCookie.getDomain() || givenCookie.getDomain().equals(expectedCookie.getDomain()))) { return true; } Assert.fail("Expected \n[" + ToStringBuilder.reflectionToString(expectedCookie) + "]\n but got \n[" + ToStringBuilder.reflectionToString(argument) + "]"); } return false; } } }
[ "egor.pgg@gmail.com" ]
egor.pgg@gmail.com
2333e07c1f922fe71c62fa8ac517f4e3473ac520
da8f09e5aa638f547d9259cdf2e6608923d0886c
/app/src/main/java/com/bozlun/health/android/commdbserver/CommDownloadDb.java
dc0eda228d2db310d43e4d2b35426823d6f9032b
[ "Apache-2.0" ]
permissive
wearheart/BzlHealth
dabd4e9c8eb40011851c43c8f85ac6cf4cf9dcdb
ac1b833474e67ca5e6536d34b7a69e0f878a882b
refs/heads/master
2020-08-10T15:07:53.152585
2019-07-30T09:27:02
2019-07-30T09:27:02
214,365,459
0
1
null
null
null
null
UTF-8
Java
false
false
1,679
java
package com.bozlun.health.android.commdbserver; import org.litepal.crud.LitePalSupport; /** * Created by Admin * Date 2019/3/13 * 保存从后台获取的数据 */ public class CommDownloadDb extends LitePalSupport { /** * userId */ private String userId; /** * 设备地址 */ private String deviceCode; /** * 类型 */ private String commType; /** * 日期 * */ private String dateStr; /** * 步数 */ private String stepNumber; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getDeviceCode() { return deviceCode; } public void setDeviceCode(String deviceCode) { this.deviceCode = deviceCode; } public String getCommType() { return commType; } public void setCommType(String commType) { this.commType = commType; } public String getDateStr() { return dateStr; } public void setDateStr(String dateStr) { this.dateStr = dateStr; } public String getStepNumber() { return stepNumber; } public void setStepNumber(String stepNumber) { this.stepNumber = stepNumber; } @Override public String toString() { return "CommDownloadDb{" + "userId='" + userId + '\'' + ", deviceCode='" + deviceCode + '\'' + ", commType='" + commType + '\'' + ", dateStr='" + dateStr + '\'' + ", stepNumber='" + stepNumber + '\'' + '}'; } }
[ "758378737@qq.com" ]
758378737@qq.com
fda8890efc0b7fc6f92da975c9ce540ce9443067
cb2e0b45e47ebeb518f1c8d7d12dfa0680aed01c
/openbanking-api-model/src/main/gen/com/laegler/openbanking/model/OtherFeesCharges3.java
8204a92ae4da713e4afca40a0042901e2a5e5e80
[ "MIT" ]
permissive
thlaegler/openbanking
4909cc9e580210267874c231a79979c7c6ec64d8
924a29ac8c0638622fba7a5674c21c803d6dc5a9
refs/heads/develop
2022-12-23T15:50:28.827916
2019-10-30T09:11:26
2019-10-31T05:43:04
213,506,933
1
0
MIT
2022-11-16T11:55:44
2019-10-07T23:39:49
HTML
UTF-8
Java
false
false
4,062
java
package com.laegler.openbanking.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.laegler.openbanking.model.OtherFeesCharges3FeeChargeCap; import com.laegler.openbanking.model.OtherFeesCharges3FeeChargeDetail; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; import javax.validation.constraints.*; /** * Contains details of fees and charges which are not associated with either loan interest or repayments */ @ApiModel(description = "Contains details of fees and charges which are not associated with either loan interest or repayments") @Validated @javax.annotation.Generated(value = "class com.laegler.openbanking.codegen.language.OpenbankingModelCodegen", date = "2019-10-19T07:45:56.431+13:00") public class OtherFeesCharges3 { @JsonProperty("FeeChargeCap") @Valid private List<OtherFeesCharges3FeeChargeCap> feeChargeCap = null; @JsonProperty("FeeChargeDetail") @Valid private List<OtherFeesCharges3FeeChargeDetail> feeChargeDetail = new ArrayList<>(); public OtherFeesCharges3 feeChargeCap(List<OtherFeesCharges3FeeChargeCap> feeChargeCap) { this.feeChargeCap = feeChargeCap; return this; } public OtherFeesCharges3 addFeeChargeCapItem(OtherFeesCharges3FeeChargeCap feeChargeCapItem) { if (this.feeChargeCap == null) { this.feeChargeCap = new ArrayList<>(); } this.feeChargeCap.add(feeChargeCapItem); return this; } /** * Details about any caps (maximum charges) that apply to a particular fee/charge * @return feeChargeCap **/ @ApiModelProperty(value = "Details about any caps (maximum charges) that apply to a particular fee/charge") @Valid public List<OtherFeesCharges3FeeChargeCap> getFeeChargeCap() { return feeChargeCap; } public void setFeeChargeCap(List<OtherFeesCharges3FeeChargeCap> feeChargeCap) { this.feeChargeCap = feeChargeCap; } public OtherFeesCharges3 feeChargeDetail(List<OtherFeesCharges3FeeChargeDetail> feeChargeDetail) { this.feeChargeDetail = feeChargeDetail; return this; } public OtherFeesCharges3 addFeeChargeDetailItem(OtherFeesCharges3FeeChargeDetail feeChargeDetailItem) { this.feeChargeDetail.add(feeChargeDetailItem); return this; } /** * Other fees/charges details * @return feeChargeDetail **/ @ApiModelProperty(required = true, value = "Other fees/charges details") @NotNull @Valid @Size(min=1) public List<OtherFeesCharges3FeeChargeDetail> getFeeChargeDetail() { return feeChargeDetail; } public void setFeeChargeDetail(List<OtherFeesCharges3FeeChargeDetail> feeChargeDetail) { this.feeChargeDetail = feeChargeDetail; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OtherFeesCharges3 otherFeesCharges3 = (OtherFeesCharges3) o; return Objects.equals(this.feeChargeCap, otherFeesCharges3.feeChargeCap) && Objects.equals(this.feeChargeDetail, otherFeesCharges3.feeChargeDetail); } @Override public int hashCode() { return Objects.hash(feeChargeCap, feeChargeDetail); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OtherFeesCharges3 {\n"); sb.append(" feeChargeCap: ").append(toIndentedString(feeChargeCap)).append("\n"); sb.append(" feeChargeDetail: ").append(toIndentedString(feeChargeDetail)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "thomas.laegler@googlemail.com" ]
thomas.laegler@googlemail.com
aecc3c9bd5c1c3a5ed5ca50b13c00906a3c67f47
0bcde78717c59eeecfba976ac6eabb58d223b86f
/src/main/java/com/gdtopway/aud/aop/ControllerInvokeAuditor.java
2a143c2a6e6c675cc4f03a61431b352f80ae6658
[ "Apache-2.0" ]
permissive
isis-github/gdtopway-core
194c2d5e25eac3fd0545bd99f3953f3fba346f17
5dfadff1fcb4283de92ff84124134a5a321d744a
refs/heads/master
2021-05-05T06:01:57.081923
2018-03-04T16:30:20
2018-03-04T16:30:20
118,736,330
0
0
null
null
null
null
UTF-8
Java
false
false
5,760
java
package com.gdtopway.aud.aop; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.util.ClassUtils; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.Signature; import org.aspectj.lang.reflect.MethodSignature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.gdtopway.core.annotation.MetaData; import com.gdtopway.core.audit.envers.ExtRevisionListener; import com.gdtopway.support.service.DynamicConfigService; import com.google.common.collect.Maps; /** * 基于Spring AOP对Controller方法调用进行拦截处理 * 提取相关的调用信息设置到 @see ExtRevisionListener 传递给Hibernate Envers组件记录 */ public class ControllerInvokeAuditor { private final static Logger logger = LoggerFactory.getLogger(ControllerInvokeAuditor.class); private static Map<String, Map<String, String>> cachedMethodDatas = Maps.newHashMap(); public Object process(ProceedingJoinPoint joinPoint) throws Throwable { try { Signature signature = joinPoint.getSignature(); MethodSignature methodSignature = (MethodSignature) signature; Method method = methodSignature.getMethod(); String key = method.toString(); if (logger.isDebugEnabled()) { String monthName = method.getName(); String className = joinPoint.getThis().getClass().getName(); if (className.indexOf("$$") > -1) { // 如果是CGLIB动态生成的类 className = StringUtils.substringBefore(className, "$$"); } logger.debug("AOP Aspect: {}, Point: {}.{}", ControllerInvokeAuditor.class, className, monthName); } Map<String, String> cachedMethodData = cachedMethodDatas.get(key); //如果已有方法缓存数据,则直接处理 if (cachedMethodData != null && !DynamicConfigService.isDevMode()) { logger.debug("Controller method audit, cached data: {}", cachedMethodData); ExtRevisionListener.setKeyValue(cachedMethodData); } else { //如果没有缓存数据,则判断处理 RequestMapping methodRequestMapping = method.getAnnotation(RequestMapping.class); RequestMethod[] requestMethods = methodRequestMapping.method(); for (RequestMethod requestMethod : requestMethods) { //只处理POST方法 if (RequestMethod.POST.equals(requestMethod)) { //构造缓存数据对象,并计算相关属性放到缓存对象 cachedMethodData = Maps.newHashMap(); Class<?> thisClazz = joinPoint.getThis().getClass(); String className = thisClazz.getName(); if (className.indexOf("$$") > -1) { // 如果是CGLIB动态生成的类 className = StringUtils.substringBefore(className, "$$"); } Class<?> controllerClazz = ClassUtils.forName(className); String requestMappingUri = ""; RequestMapping classRequestMapping = controllerClazz.getAnnotation(RequestMapping.class); if (classRequestMapping != null) { requestMappingUri += StringUtils.join(classRequestMapping.value()); } requestMappingUri += StringUtils.join(methodRequestMapping.value()); cachedMethodData.put(ExtRevisionListener.requestMappingUri, requestMappingUri); cachedMethodData.put(ExtRevisionListener.controllerClassName, className); MetaData clazzMetaData = controllerClazz.getAnnotation(MetaData.class); if (clazzMetaData != null) { cachedMethodData.put(ExtRevisionListener.controllerClassLabel, clazzMetaData.value()); } Object genericClz = controllerClazz.getGenericSuperclass(); if (genericClz instanceof ParameterizedType) { Class<?> entityClass = (Class<?>) ((ParameterizedType) genericClz).getActualTypeArguments()[0]; cachedMethodData.put(ExtRevisionListener.entityClassName, entityClass.getName()); } cachedMethodData.put(ExtRevisionListener.controllerMethodName, method.getName()); cachedMethodData.put(ExtRevisionListener.controllerMethodType, requestMethod.name()); MetaData methodMetaData = method.getAnnotation(MetaData.class); if (methodMetaData != null) { cachedMethodData.put(ExtRevisionListener.controllerMethodLabel, methodMetaData.value()); } cachedMethodDatas.put(key, cachedMethodData); logger.debug("Controller method audit, init data: {}", cachedMethodData); ExtRevisionListener.setKeyValue(cachedMethodData); break; } } } } catch (Exception e) { //捕获审计信息处理异常,避免影响正常的业务流程 logger.error(e.getMessage(), e); } return joinPoint.proceed(); } }
[ "2812849244@qq.com" ]
2812849244@qq.com
78c55dc8e86c8680f059e3901818fee6465cd92e
ae92c622f5d16e74a5110e905cc7aaff22ae1164
/app/src/main/java/com/yehm/model/ResponseViewProfile.java
dd19a8c9d4dd1100a5051a30be784a88731e495d
[]
no_license
MohammadFaizan007/YAHM_MLM
b855700bc2b9f062e28778ca1e17c43c15c61540
742409f72d98ce2253b904a3b3ba90df1fd95512
refs/heads/master
2022-11-13T03:04:57.807465
2020-06-18T04:30:58
2020-06-18T04:30:58
273,141,279
0
1
null
null
null
null
UTF-8
Java
false
false
885
java
package com.yehm.model; import com.google.gson.annotations.SerializedName; public class ResponseViewProfile { @SerializedName("response") private String response; @SerializedName("apiUserProfile") private ApiUserProfile apiUserProfile; public String getResponse() { return response; } public void setResponse(String response) { this.response = response; } public ApiUserProfile getApiUserProfile() { return apiUserProfile; } public void setApiUserProfile(ApiUserProfile apiUserProfile) { this.apiUserProfile = apiUserProfile; } @Override public String toString() { return "ResponseViewProfile{" + "response = '" + response + '\'' + ",apiUserProfile = '" + apiUserProfile + '\'' + "}"; } }
[ "faizanmohd106@gmail.com" ]
faizanmohd106@gmail.com
4483181e8f6b0c23a80e83e77cbbaa955b6c4335
db5e2811d3988a5e689b5fa63e748c232943b4a0
/jadx/sources/zendesk/support/ContactUsSettings.java
e48f4007ac2f86e5f0e08a1d95f4c7c6a3c6e258
[]
no_license
ghuntley/TraceTogether_1.6.1.apk
914885d8be7b23758d161bcd066a4caf5ec03233
b5c515577902482d741cabdbd30f883a016242f8
refs/heads/master
2022-04-23T16:59:33.038690
2020-04-27T05:44:49
2020-04-27T05:44:49
259,217,124
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package zendesk.support; import java.util.Collections; import java.util.List; import o.O; class ContactUsSettings { private static ContactUsSettings DEFAULT = new ContactUsSettings(Collections.emptyList()); private List<String> tags; static ContactUsSettings defaultSettings() { return DEFAULT; } ContactUsSettings(List<String> list) { this.tags = list; } ContactUsSettings() { } public List<String> getTags() { return O.m1393(this.tags); } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
f1fc7f0732b42001d60c9fe9bd79785c1f4960d8
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/appbrand/widget/input/numberpad/a.java
e972e68368a99c2c61baba7f8e6e0bcd27b253eb
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
400
java
package com.tencent.mm.plugin.appbrand.widget.input.numberpad; import android.view.inputmethod.InputConnection; public abstract interface a { public abstract InputConnection cRo(); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes8.jar * Qualified Name: com.tencent.mm.plugin.appbrand.widget.input.numberpad.a * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
0c9803aa221dd312084b495e1937a15e15ed1e2a
3869b790401b37d367ff37e325204e537873e784
/src/com/facebook/buck/rules/BuildTargetSourcePath.java
f90dd2f9523375e3d279a66558e3a1f5f92f100e
[ "Apache-2.0" ]
permissive
deveshmittal/buck
9f9f1316ef4fe359a29a7e72d0d9281eabb9414d
039ea9c404fe6c68869f4739a7551a5676c0b285
refs/heads/master
2021-01-22T09:20:43.525079
2013-11-17T18:52:50
2013-11-17T18:52:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,805
java
/* * Copyright 2013-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.rules; import com.facebook.buck.model.BuildTarget; import com.facebook.buck.util.HumanReadableException; import com.google.common.base.Preconditions; import java.nio.file.Path; import java.nio.file.Paths; /** * A {@link SourcePath} that utilizes the output from a {@link BuildTarget} as the file it * represents. */ public class BuildTargetSourcePath extends AbstractSourcePath { private final BuildTarget buildTarget; public BuildTargetSourcePath(BuildTarget buildTarget) { this.buildTarget = Preconditions.checkNotNull(buildTarget); } @Override public Path resolve(BuildContext context) { BuildRule rule = context.getDependencyGraph().findBuildRuleByTarget(buildTarget); if (rule == null) { throw new HumanReadableException("Cannot resolve: %s", buildTarget); } String path = rule.getBuildable().getPathToOutputFile(); if (path == null) { throw new HumanReadableException("No known output for: %s", buildTarget); } return Paths.get(path); } @Override public String asReference() { return buildTarget.getFullyQualifiedName(); } public BuildTarget getTarget() { return buildTarget; } }
[ "mbolin@fb.com" ]
mbolin@fb.com
e2ff5f86b0ca00bb557dd13cd5fd364577f0dca9
0955820bdd56f0b6628dfa5c5b953e287976f273
/liudiaowenjuan-portal/src/main/java/com/liudiaowenjuan/owneruser/comment/SMSPlatform.java
63751b97681af2c61c22ea59b19f440e3488f6d6
[]
no_license
tangminnan/zytizhi
3d46cc70088704b8a26f063512ad9cc496c02ddf
bb9b84a200962acc151e510358e7b69204260324
refs/heads/master
2023-02-11T16:08:48.151327
2021-01-09T03:11:19
2021-01-09T03:11:19
328,061,149
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package com.liudiaowenjuan.owneruser.comment; /** * 短信调用平台 * @author tmn * @create 2017-4-13 */ public enum SMSPlatform { shaicha(1,"【针灸】","username=1111&password=xy-11111","name=bjywhy&password=123qaz789");// 腾信、快用云账号配置 public int code; public String qianming; public String url1; public String url2; SMSPlatform(int code, String qianming, String url1, String url2) { this.code = code; this.qianming = qianming; this.url1 = url1; this.url2 = url2; } }
[ "349829327@qq.com" ]
349829327@qq.com
c99ed194a829868718a22950f457865d8f9abe68
d030f0cba6cf93a5375e0976e01d5291a137ef81
/TravelApp/src/shoporderdao/DefaultAddressdao.java
2bff2dd33cef21ffdcc69fd7f8f7f58660a3fba7
[]
no_license
AngelYHY/Travel
a65cc766c6f15d2e2ab284f20fbdc30741fcf124
ed180b1751276f9c9fb9d7617abfd230b7ba0ad1
refs/heads/master
2020-06-14T09:42:02.678682
2017-01-17T09:15:39
2017-01-17T09:15:39
75,203,133
0
0
null
null
null
null
UTF-8
Java
false
false
1,431
java
package shoporderdao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import beans.ReceiveAddress; import utils.JDBCutil; public class DefaultAddressdao{ public List<ReceiveAddress> defaultaddress(String accountname){ List<ReceiveAddress> list=new ArrayList<ReceiveAddress>(); Connection connection = null; connection = JDBCutil.getConnection(); PreparedStatement statement = null; ResultSet resultSet = null; try { statement = connection.prepareStatement("select * from receive_address where account_name='"+accountname+"' and default_address="+1+""); resultSet = statement.executeQuery(); while (resultSet.next()){ int receive_id=resultSet.getInt(1); String account_name=resultSet.getString(2); String name=resultSet.getString(3); String phone_num=resultSet.getString(4); String province=resultSet.getString(5); String city=resultSet.getString(6); String detailed_addr=resultSet.getString(7); int default_address=resultSet.getInt(8); ReceiveAddress beans=new ReceiveAddress(receive_id, account_name, name, phone_num, province, city, detailed_addr, default_address); list.add(beans); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { JDBCutil.releaseConnection(connection); } return list; } }
[ "1064389584@qq.com" ]
1064389584@qq.com
8383d22144ddda2231adc9da7478cbfb5f7a32f2
8218aacb5bd27f7389c980b7a9c284e19116836c
/streamtau_streaming/src/main/java/com/zetyun/streamtau/streaming/transformer/filter/FilterTransformer.java
6a640b8c28919165bd5bef96887f1c757cb2303d
[ "Apache-2.0" ]
permissive
lwc-Arnold/StreamTau2
6117be703059cbd8ca98de658153ec412b21f434
766175573dc268977a726236736ca568fbbf8eb3
refs/heads/master
2022-12-27T04:58:52.422508
2020-09-27T09:17:02
2020-09-27T09:17:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,710
java
/* * Copyright 2020 Zetyun * * 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.zetyun.streamtau.streaming.transformer.filter; import com.zetyun.streamtau.runtime.context.RtEvent; import com.zetyun.streamtau.streaming.model.Operator; import com.zetyun.streamtau.streaming.transformer.SingleOutputTransformer; import com.zetyun.streamtau.streaming.transformer.TransformContext; import com.zetyun.streamtau.streaming.transformer.node.StreamNode; import lombok.RequiredArgsConstructor; import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator; import javax.annotation.Nonnull; @RequiredArgsConstructor public class FilterTransformer implements SingleOutputTransformer { private final FilterFunctionProvider filterFunctionProvider; @Nonnull @Override public SingleOutputStreamOperator<RtEvent> transformNode( @Nonnull StreamNode node, @Nonnull Operator operator, @Nonnull TransformContext context ) { if (operator.getSchemaId() == null) { operator.setSchemaId(node.getSchemaId()); } return node.asDataStream() .filter(filterFunctionProvider.apply(operator, context)); } }
[ "jiaoyg@zetyun.com" ]
jiaoyg@zetyun.com
d9d90e735d83b8f875bb016511e81b5781450979
dfa46dd73ac209d46a87f49f314614538d209df7
/src/main/java/com/lyb/client/message/protocol/Message_1002_1.java
ff18abd2bc5b2cd0052e5bab80333d5730f00aa7
[]
no_license
safziy/lyb_client
a580fb596bc9d3b91db9d1d8d2166d480c31e746
b2842186f63136309ddd150837352cf63cfb5b9a
refs/heads/master
2020-12-31T04:28:49.347905
2016-01-15T09:28:15
2016-01-15T09:28:15
45,508,000
0
0
null
null
null
null
UTF-8
Java
false
false
1,829
java
package com.lyb.client.message.protocol; import com.lyb.client.message.IMessage; import com.lyb.client.net.Data; import com.lyb.client.utils.DummyUtils; import com.lyb.client.message.protocol.segment.*; import com.lyb.client.message.MessageParameterContext; import com.lyb.client.message.handler.IntMessageParameterHandler; import com.lyb.client.message.handler.LongMessageParameterHandler; /** * 返回 登录认证 * * @author codeGenerator * */ @SuppressWarnings("unused") public class Message_1002_1 implements IMessage { private static int MAIN = 1002; private static int SUB = 1; private static String MESSAGE_KEY = DummyUtils.getCompositeKey(1002, 1); private int loginState; private static IntMessageParameterHandler loginStateHandler = MessageParameterContext.getInstance().getIntMessageParameterHandler("LoginState"); public static Message_1002_1 create() { return new Message_1002_1(); } /** * @return the loginState */ public int getLoginState() { return loginState; } /** * @param loginState * the loginState to set */ public void setLoginState(int loginState) { this.loginState = loginState; } /** * 编码 */ @Override public void encode(Data data) { data.writeInt(this.loginState); } /** * 解码 */ @Override public void decode(Data data) { this.loginState = data.getInt(); } @Override public boolean validate() { if (!loginStateHandler.validate(loginState)) { return false; } return true; } @Override public int getMain() { return MAIN; } @Override public int getSub() { return SUB; } @Override public String getMessageKey() { return MESSAGE_KEY; } public String toString() { StringBuilder bb = new StringBuilder(); bb.append("loginState:").append(this.loginState); return bb.toString(); } }
[ "787395455@qq.com" ]
787395455@qq.com
c7ee1191a240eeb357df896648614757665fb87b
da3e26b8b0f06771ddd3a36b61716d12a2dbb8b6
/java/com/android/incallui/AudioRouteSelectorActivity.java
8d166649c2d759a604394bc8ae368c8780f22b71
[ "Apache-2.0" ]
permissive
CypherOS/packages_apps_Dialer
ff0fe1cc62cea08416affaf5eaf94adfb41632e0
24fc672b885d8a155568515cf1ab1085a1a9ab21
refs/heads/master
2021-01-17T17:52:35.511894
2017-12-05T01:39:47
2017-12-05T01:39:47
75,876,778
0
3
null
null
null
null
UTF-8
Java
false
false
2,474
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.incallui; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.FragmentActivity; import com.android.incallui.audiomode.AudioModeProvider; import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment; import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment.AudioRouteSelectorPresenter; import com.android.incallui.call.TelecomAdapter; /** Simple activity that just shows the audio route selector fragment */ public class AudioRouteSelectorActivity extends FragmentActivity implements AudioRouteSelectorPresenter { @Override protected void onCreate(@Nullable Bundle bundle) { super.onCreate(bundle); AudioRouteSelectorDialogFragment.newInstance(AudioModeProvider.getInstance().getAudioState()) .show(getSupportFragmentManager(), AudioRouteSelectorDialogFragment.TAG); } @Override public void onAudioRouteSelected(int audioRoute) { TelecomAdapter.getInstance().setAudioRoute(audioRoute); finish(); } @Override public void onAudioRouteSelectorDismiss() { finish(); } @Override protected void onPause() { super.onPause(); AudioRouteSelectorDialogFragment audioRouteSelectorDialogFragment = (AudioRouteSelectorDialogFragment) getSupportFragmentManager().findFragmentByTag(AudioRouteSelectorDialogFragment.TAG); // If Android back button is pressed, the fragment is dismissed and removed. If home button is // pressed, we have to manually dismiss the fragment here. The fragment is also removed when // dismissed. if (audioRouteSelectorDialogFragment != null) { audioRouteSelectorDialogFragment.dismiss(); } // We don't expect the activity to resume, except for orientation change. if (!isChangingConfigurations()) { finish(); } } }
[ "erfanian@google.com" ]
erfanian@google.com
00a772df6fea74913267111514e2217476104882
c43f5b1a4642a05539c74fbb58ca90d8c891af8a
/LuceneDemo/src/cc/pp/common/AllDocCollector.java
bb011e6f837e1b2297006a72bff67781bffb62da
[]
no_license
wgybzbrobot/bookcodes
33eabeedd863f630901df51ed28e5471c6c21312
c9bc0f2e3375834ff696444e57b9e853dd767251
refs/heads/master
2022-11-30T04:49:15.462214
2014-01-23T04:35:01
2014-01-23T04:35:01
15,858,734
1
3
null
2022-11-24T02:20:59
2014-01-13T05:17:19
Java
UTF-8
Java
false
false
1,105
java
package cc.pp.common; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.Collector; import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.Scorer; /** * 从search中聚集所有文档集 * @author Administrator * */ public class AllDocCollector extends Collector { List<ScoreDoc> docs = new ArrayList<ScoreDoc>(); private Scorer scorer; private int docBase; @Override public boolean acceptsDocsOutOfOrder() { return true; } @Override public void collect(int doc) throws IOException { docs.add(new ScoreDoc(doc + docBase, // 创建绝对的docID scorer.score())); // 记录的score } @Override public void setNextReader(IndexReader reader, int docBase) throws IOException { this.docBase = docBase; } @Override public void setScorer(Scorer scorer) throws IOException { this.scorer = scorer; } public void reset() { docs.clear(); } public List<ScoreDoc> getHits() { return docs; } }
[ "wanggang@pp.cc" ]
wanggang@pp.cc
5bb62682bf174cd835ece6d21bb591a6f10e90d0
31a3e02a879bc5cdd0963c03b455dd52715105f2
/Practica1/src/practica1/Ventana.java
32595cb35c7f0bc4fab2100ed427bd4a589220f6
[]
no_license
likendero/procesos
2455ec60c939859444fcf22f68cd4f2c0b092b4d
cdd4d6f1f7416d7651d8bd690e2ac8bba188682b
refs/heads/master
2020-03-29T01:50:36.911583
2019-02-14T06:33:27
2019-02-14T06:33:27
149,409,243
0
0
null
null
null
null
UTF-8
Java
false
false
3,132
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package practica1; import java.awt.BorderLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JTextArea; /** * * @author likendero */ public class Ventana extends JFrame { PanelDerecho pD; PanelIzquierdo pI; JTextArea txtIntro; /** * metodo constructor de la ventana */ public Ventana(String titulo){ super(titulo); setBounds(100, 100, 820, 400); setDefaultCloseOperation(EXIT_ON_CLOSE); init(); } private void init(){ pI = new PanelIzquierdo(); pD = new PanelDerecho(); // instanciacion de los botones que necesitan funcionalidad txtIntro = pD.getTxtIntro(); JButton btnA = pI.getBtnA(); JButton btnS = pI.getBtnS(); // annadir paneles add(pI,BorderLayout.LINE_START); add(pD,BorderLayout.LINE_END); // anndir funcionalidades btnA.addActionListener(e->quitarA()); btnS.addActionListener(e->quitarS()); } /** * metodo que borra todos los caracteres A o a del cuadro de texto */ private void quitarA(){ if(txtIntro.getText().length() > 0){ // combertir en array de caracteres la cadena original char[] caracteres = txtIntro.getText().trim().toCharArray(); String aux = new String(); // recorrido para copmprobar caracteres for(int i = 0; i < caracteres.length; i++){ // comprobacion de si el caracter es A if(caracteres[i] != 'a' && caracteres[i] != 'A'){ aux += caracteres[i]; } // cambio del cuadro de texto txtIntro.setText(aux); } }else{ // si el cuadro esta bacio se escriube un mensaje JOptionPane.showMessageDialog(this, "escribe algo en el cuadro de texto", "escribe", JOptionPane.ERROR_MESSAGE); } } /** * metodo que quita los caracteres s o S del cuadro de texto */ private void quitarS(){ if(txtIntro.getText().length() > 0){ // combertir en array de caracteres la cadena original char[] caracteres = txtIntro.getText().trim().toCharArray(); String aux = new String(); // recorrido para copmprobar caracteres for(int i = 0; i < caracteres.length; i++){ // comprobacion de si el caracter es A if(caracteres[i] != 's' && caracteres[i] != 'S'){ aux += caracteres[i]; } // cambio del cuadro de texto txtIntro.setText(aux); } }else{ // si el cuadro esta bacio se escriube un mensaje JOptionPane.showMessageDialog(this, "escribe algo en el cuadro de texto", "escribe", JOptionPane.ERROR_MESSAGE); } } }
[ "likendero11@gmail.com" ]
likendero11@gmail.com
87ce39d46b8b2c3e86f48839f0dce47a5b2c5f59
f5aacd77191465d923ad982adaf32460737f94d2
/energy/collector/collector-core/src/main/java/com/smxknife/energy/collector/core/driver/sink/SinkHandler.java
1fcebe2816775d58f17e1514f89931750ef40bea
[]
no_license
smxknife/smxknife
a0a87b5624aaa2bf3c82b05f2180a79bcbc65170
f6f3ed40bb998d9aea8cba4936ccfa738e4a35b9
refs/heads/master
2023-03-15T03:43:16.570846
2022-04-05T06:07:47
2022-04-05T06:07:47
122,691,839
1
0
null
2023-03-08T17:25:34
2018-02-24T01:46:19
Java
UTF-8
Java
false
false
264
java
package com.smxknife.energy.collector.core.driver.sink; import com.smxknife.energy.services.metric.spi.domain.Datapoint; import java.util.List; /** * @author smxknife * 2021/5/12 */ public interface SinkHandler { void handle(List<Datapoint> datapoints); }
[ "2323937771@qq.com" ]
2323937771@qq.com
39adbc6e5ccabf63fa5a29e8d942864cc5c9dad4
8d93f14c25b30c20ff0a4c83ead5d8ee9256c08f
/FWPl/ExpressionTree_Flat/ExpressionTree/src/com/example/expressiontree_plugin/State.java
d452ba9b905adc34e0e071c299d974c4ca449236
[]
no_license
priangulo/BttFResults
48fd6f4aa0a70554029f7c82ed9d55c57d8a6724
b29c253914d6b9f465802ec20b3ab37452abfa44
refs/heads/master
2020-06-28T02:48:57.150955
2017-10-11T01:24:27
2017-10-11T01:24:27
97,085,155
0
0
null
null
null
null
UTF-8
Java
false
false
3,539
java
package com.example.expressiontree_plugin; import java.util.Iterator; /** * @class State * * @brief Implementation of the State pattern that is used to define * the various states that affect how users operations are * processed. Plays the role of the "State" base class in the * State pattern that is used as the basis for the subclasses * that actually define the various states. */ public class State extends com.example.expressiontree_framework.State { /** * A factory that creates the appropriate visitors. */ private static VisitorFactory visitorFactory = new VisitorFactory(); /** * Print the operators and operands of the @a tree using the * designated @a traversalOrder. */ static void printTree(com.example.expressiontree_framework.ExpressionTree tree, String traversalOrder) { if (traversalOrder.equals("")) /** * Default to in-order if user doesn't explicitly request * a print order. */ traversalOrder = "in-order"; /** * Note the high pattern density in the code below, which uses * of the Factory Method, Iterator, Bridge, Strategy, and * Visitor patterns. */ /** Create the PrintVisitor using a factory. */ com.example.expressiontree_framework.Visitor printVisitor = visitorFactory.makeVisitor("print"); /** * Iterate through all nodes in the expression tree and accept * the printVisitor to print each type of node. */ for(Iterator<com.example.expressiontree_framework.ExpressionTree> it = tree.makeIterator(traversalOrder); it.hasNext(); ) it.next().accept(printVisitor); } /** * Evaluate and print the yield of the @a tree using the * designated @a traversalOrder. */ static void evaluateTree(com.example.expressiontree_framework.ExpressionTree tree, String traversalOrder) { if (traversalOrder.equals("")) /** * Default to post-order if user doesn't explicitly * request an eval order. */ traversalOrder = "post-order"; else if (!traversalOrder.equals("post-order")) throw new IllegalArgumentException(traversalOrder + " evaluation is not supported yet"); /** * Note the high pattern density in the code below, which uses * of the Factory Method, Iterator, Bridge, Strategy, and * Visitor patterns. */ /** Create the EvaluationVisitor using a factory. */ com.example.expressiontree_framework.Visitor evalVisitor = visitorFactory.makeVisitor("eval"); /** * Iterate through all nodes in the expression tree and accept * the evalVisitor to evaluate each type of node. */ for(Iterator<com.example.expressiontree_framework.ExpressionTree> it = tree.makeIterator(traversalOrder); it.hasNext(); ) it.next().accept(evalVisitor); Integer total = ((com.example.expressiontree_framework.EvaluationVisitor) evalVisitor).total(); // Use the platform strategy to printout the result. com.example.expressiontree_framework.Platform.instance().outputLine(total.toString()); } public VisitorFactory newVisitorFactory() { return new VisitorFactory(); } }
[ "priangulo@gmail.com" ]
priangulo@gmail.com
0fab3762f9fa1184d101ccafbe3383aa15fcb78e
b3d9e98f353eaba1cf92e3f1fc1ccd56e7cecbc5
/xy-games/game-logic/trunk/src/main/java/com/cai/game/phz/data/LouWeaveItem.java
119106569e2a6ad7ef5ae508094164cbf50bc5b5
[]
no_license
konser/repository
9e83dd89a8ec9de75d536992f97fb63c33a1a026
f5fef053d2f60c7e27d22fee888f46095fb19408
refs/heads/master
2020-09-29T09:17:22.286107
2018-10-12T03:52:12
2018-10-12T03:52:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
package com.cai.game.phz.data; public class LouWeaveItem{ public int nWeaveKind; //组合类型 public int nLouWeaveKind[][] = new int[50][2]; public int nCount; public LouWeaveItem() { } }
[ "905202059@qq.com" ]
905202059@qq.com
625500217889bfeb658da37c0f7cfcbf68459dcd
fc03329f61f5317294f9c64ef49c35802765fa01
/08-springcloud-config-client/src/main/java/com/wkcto/springcloud/controller/ConfigController.java
aa69386d45033ab861c9916e91b8bbd05c48902b
[]
no_license
clown14/LearnSpringCloud
0f0ade436d88219e2e1465b2ca8912db747afc09
53663c2dd8706b0ca11ac109a44e8653f3d340d1
refs/heads/master
2021-01-30T23:07:34.029583
2020-05-14T07:47:06
2020-05-14T07:47:06
243,508,584
0
0
null
null
null
null
UTF-8
Java
false
false
587
java
package com.wkcto.springcloud.controller; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @program: wkctoProjects * @author: onion * @create: 2020-05-13 20:53 **/ @RestController @RefreshScope public class ConfigController { @Value("${url}") private String url; @RequestMapping("/cloud/url") public String url() { return url; } }
[ "785613198@qq.com" ]
785613198@qq.com
f21b7a93f0d631272b54570ee817710aeb8a3ee1
7c87a85b35e47d4640283d12c40986e7b8a78e6f
/moneyfeed-openapi-wechat/moneyfeed-openapi-wechat-api/src/main/java/com/newhope/openapi/api/rest/user/CustomerEmployeeManageOpenAPI.java
f13253ca2e60f5ea468631fefec7d4e64e869d8c
[]
no_license
newbigTech/moneyfeed
191b0bd4c98b49fa6be759ed16817b96c6e853b3
2bd8bdd10ddfde3f324060f7b762ec3ed6e25667
refs/heads/master
2020-04-24T13:05:44.308618
2019-01-15T07:59:03
2019-01-15T07:59:03
171,975,920
0
3
null
2019-02-22T01:53:12
2019-02-22T01:53:12
null
UTF-8
Java
false
false
3,072
java
package com.newhope.openapi.api.rest.user; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import com.newhope.moneyfeed.api.vo.base.BaseResponse; import com.newhope.moneyfeed.api.vo.response.Result; import com.newhope.openapi.api.vo.request.user.CustomerClientUserReq; import com.newhope.openapi.api.vo.request.user.CustomerClientUserUpdateReq; import com.newhope.openapi.api.vo.response.user.ClientRoleListResult; import com.newhope.openapi.api.vo.response.user.CustomerEmployeeListResult; import com.newhope.openapi.api.vo.response.user.CustomerEmployeeResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; @Api(description = "客户员工管理", tags = "CustomerEmployeeManageOpenAPI", protocols = "http") public interface CustomerEmployeeManageOpenAPI { @ApiOperation(value = "根据条件查询客户的员工列表", notes = "客户联系人分页查询", protocols = "http") @RequestMapping(value = "/employee/list", method = RequestMethod.GET, produces = {"application/json"}) BaseResponse<CustomerEmployeeListResult> queryCustomerEmployeeList(HttpServletRequest request); @ApiOperation(value = "编辑客户员工信息", notes = "编辑客户员工信息", protocols = "http") @RequestMapping(value = "/employee", method = RequestMethod.PUT, consumes = {"application/json"}, produces = {"application/json"}) public BaseResponse<Result> updateCustomerEmployee(@Valid @RequestBody CustomerClientUserUpdateReq customerClientUserReq); @ApiOperation(value = "添加客户员工", notes = "添加客户员工", protocols = "http") @RequestMapping(value = "/employee", method = RequestMethod.POST, consumes = {"application/json"}, produces = {"application/json"}) public BaseResponse<Result> saveCustomerEmployee(@Valid @RequestBody CustomerClientUserReq customerClientUserReq); @ApiOperation(value = "获取客户端角色列表", notes = "获取客户端角色列表", protocols = "http") @RequestMapping(value = "/role", method = RequestMethod.GET, produces = {"application/json"}) public BaseResponse<ClientRoleListResult> getClientRole(); @ApiOperation(value = "查询员工详情", notes = "查询员工详情", protocols = "http") @ApiImplicitParams({ @ApiImplicitParam(name = "customerClientUserId", value = "主键Id", paramType = "query", required = true, dataType = "Long") }) @RequestMapping(value = "/employee", method = RequestMethod.GET, produces = {"application/json"}) BaseResponse<CustomerEmployeeResult> getCustomerEmployee(@RequestParam(name="customerClientUserId",required=true)Long customerClientUserId); }
[ "505235893@qq.com" ]
505235893@qq.com
63780e405d6871ccd7e9143bbfcecf2a9c76256f
6c69998676e9df8be55e28f6d63942b9f7cef913
/src/com/insigma/siis/demo/Ac02DTO.java
40f664273c00e346df09393942cb4d556c9dcd34
[]
no_license
HuangHL92/ZHGBSYS
9dea4de5931edf5c93a6fbcf6a4655c020395554
f2ff875eddd569dca52930d09ebc22c4dcb47baf
refs/heads/master
2023-08-04T04:37:08.995446
2021-09-15T07:35:53
2021-09-15T07:35:53
406,219,162
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package com.insigma.siis.demo; public class Ac02DTO { String aae140; Double eac018; public String getAae140() { return aae140; } public void setAae140(String aae140) { this.aae140 = aae140; } public Double getEac018() { return eac018; } public void setEac018(Double eac018) { this.eac018 = eac018; } }
[ "351036848@qq.com" ]
351036848@qq.com
2644b274d2a11515b20c5dacfc9312289e4f6ab5
f525deacb5c97e139ae2d73a4c1304affb7ea197
/gitv/src/main/java/org/cybergarage/upnp/ssdp/SSDPRequest.java
ef246cf2c18e5b758a4dd2395c85b06ea3153972
[]
no_license
AgnitumuS/gitv
93b2359e1bf9f2b6c945298c61c5c6dbfeea49b3
242c9a10a0aeb41b9589de9f254e6ce9f57bd77a
refs/heads/master
2021-08-08T00:50:10.630301
2017-11-09T08:10:33
2017-11-09T08:10:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,268
java
package org.cybergarage.upnp.ssdp; import java.io.InputStream; import org.cybergarage.http.HTTP; import org.cybergarage.http.HTTPRequest; public class SSDPRequest extends HTTPRequest { public SSDPRequest() { setVersion("1.1"); } public SSDPRequest(InputStream in) { super(in); } public void setNT(String value) { setHeader(HTTP.NT, value); } public String getNT() { return getHeaderValue(HTTP.NT); } public void setNTS(String value) { setHeader(HTTP.NTS, value); } public String getNTS() { return getHeaderValue(HTTP.NTS); } public void setMYNAME(String value) { setHeader(HTTP.MYNAME, value); } public String getMYNAME() { return getHeaderValue(HTTP.MYNAME); } public void setFileMd5(String value) { setHeader(HTTP.FILEMD5, value); } public void setConnect(boolean keepConnect) { if (keepConnect) { setHeader(HTTP.IGALACONNECTION, HTTP.KEEP_ALIVE); } else { setHeader(HTTP.IGALACONNECTION, HTTP.CLOSE); } } public void setIGALAPORT(int port) { setHeader(HTTP.IGALAPORT, port); } public void setIGALAVERSION(int version) { setHeader(HTTP.IGALAVERSION, version); } public void setIGALAUDPPORT(int port) { setHeader(HTTP.IGALAUDPPORT, port); } public void setIGALADEVICE(int deviceName) { setHeader(HTTP.IGALADEVICE, deviceName); } public void setDEVICEVERSION(int version) { setHeader(HTTP.DEVICEVERSION, version); } public String getFileMd5() { return getHeaderValue(HTTP.FILEMD5); } public void setLocation(String value) { setHeader(HTTP.LOCATION, value); } public String getLocation() { return getHeaderValue(HTTP.LOCATION); } public void setUSN(String value) { setHeader(HTTP.USN, value); } public String getUSN() { return getHeaderValue(HTTP.USN); } public void setLeaseTime(int len) { setHeader(HTTP.CACHE_CONTROL, "max-age=" + Integer.toString(len)); } public int getLeaseTime() { return SSDP.getLeaseTime(getHeaderValue(HTTP.CACHE_CONTROL)); } }
[ "liuwencai@le.com" ]
liuwencai@le.com
c0400d240405fe1026c3a640c2b04f8e67226644
fe860b4dd430b1b457e73f3d42592f485c518cef
/src/main/java/com/house/sushi/config/ApplicationProperties.java
1b23c239dd4d5ff4a563d2261ae7347811750827
[]
no_license
suxaryk/sushi-house
b221c031e89236004d55d99e4f372abdabeb1471
980c21676bbc62daa683688c220bf42abe4333b4
refs/heads/master
2020-03-29T12:15:25.331985
2018-09-24T11:00:58
2018-09-24T11:00:58
149,890,902
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
package com.house.sushi.config; import org.springframework.boot.context.properties.ConfigurationProperties; /** * Properties specific to Sushihouse. * <p> * Properties are configured in the application.yml file. * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) public class ApplicationProperties { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
a9d3207f6e00a3c80b53c5b1e03959020c1d7c4a
ee9aa986a053e32c38d443d475d364858db86edc
/src/main/java/com/springrain/erp/modules/amazoninfo/dao/EnterpriseTypeGoalDao.java
d5d939a2360d1853bb5d41ac88f6ab3b9fc6fb3f
[ "Apache-2.0" ]
permissive
modelccc/springarin_erp
304db18614f69ccfd182ab90514fc1c3a678aaa8
42eeb70ee6989b4b985cfe20472240652ec49ab8
refs/heads/master
2020-05-15T13:10:21.874684
2018-05-24T15:39:20
2018-05-24T15:39:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
319
java
package com.springrain.erp.modules.amazoninfo.dao; import org.springframework.stereotype.Repository; import com.springrain.erp.common.persistence.BaseDao; import com.springrain.erp.modules.amazoninfo.entity.EnterpriseTypeGoal; @Repository public class EnterpriseTypeGoalDao extends BaseDao<EnterpriseTypeGoal> { }
[ "601906911@qq.com" ]
601906911@qq.com
5bff27be5e76316a129769825ab71e7b8c6dcee9
8e8ecc3abf0a832ddace24404f08aa212bdec1c2
/web/plugins/admin-user-property-auth/src/main/java/org/visallo/web/plugin/adminUserTools/userPropertyAuth/UserRemoveAuthorization.java
0341225e2d4f7e01c1d82070e7d488acd71935d8
[ "Apache-2.0" ]
permissive
YANG-DB/visallo-2
0008b689294aadb2bd6b1886a41f52b9cfc9e9c2
3b1831d0889d8ce82474d862b26a98f67e8f5b06
refs/heads/master
2021-05-26T04:17:22.789774
2020-05-21T21:04:23
2020-05-21T21:04:23
254,049,378
1
0
Apache-2.0
2020-04-08T09:55:27
2020-04-08T09:55:26
null
UTF-8
Java
false
false
1,968
java
package org.visallo.web.plugin.adminUserTools.userPropertyAuth; import com.google.inject.Inject; import com.google.inject.Singleton; import org.visallo.webster.ParameterizedHandler; import org.visallo.webster.annotations.Handle; import org.visallo.webster.annotations.Required; import org.json.JSONObject; import org.visallo.core.exception.VisalloAccessDeniedException; import org.visallo.core.exception.VisalloResourceNotFoundException; import org.visallo.core.model.user.AuthorizationRepository; import org.visallo.core.model.user.UpdatableAuthorizationRepository; import org.visallo.core.model.user.UserRepository; import org.visallo.core.user.User; @Singleton public class UserRemoveAuthorization implements ParameterizedHandler { private final UserRepository userRepository; private final AuthorizationRepository authorizationRepository; @Inject public UserRemoveAuthorization( UserRepository userRepository, AuthorizationRepository authorizationRepository ) { this.userRepository = userRepository; this.authorizationRepository = authorizationRepository; } @Handle public JSONObject handle( @Required(name = "user-name") String userName, @Required(name = "auth") String auth, User authUser ) throws Exception { User user = userRepository.findByUsername(userName); if (user == null) { throw new VisalloResourceNotFoundException("Could not find user: " + userName); } if (!(authorizationRepository instanceof UpdatableAuthorizationRepository)) { throw new VisalloAccessDeniedException("Authorization repository does not support updating", authUser, userName); } ((UpdatableAuthorizationRepository) authorizationRepository).removeAuthorization(user, auth, authUser); return userRepository.toJsonWithAuths(user); } }
[ "unwashedanddazed@protonmail.com" ]
unwashedanddazed@protonmail.com
814d2b794defbc3b074f673372c31afa108a6c7e
b2b4a6bab187aaa35f5bfc324f0ef07d37c8914a
/string/L792.java
3b4003c7405896e61600c891b8c1008d4395bd2d
[]
no_license
fyiyu091/Leetcode
7dd908a39bde4c019bda98038538ddcbfaf2e9c7
54c0a823cbf742f4693bb8c7824d9d67221fc5bb
refs/heads/master
2023-07-19T05:37:41.645801
2021-08-31T03:25:25
2021-08-31T03:25:25
275,048,455
0
0
null
null
null
null
UTF-8
Java
false
false
1,698
java
package string; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /* Find how many word in words array is the subsequence of String s Maintain a hashMap the key is the starting character (26) The value is a list of word that has the key as the starting character For every character, scan the list, remove the very first one character, and move it to the next list that has the starting character */ public class L792 { public int numMatchingSubseq(String s, String[] words) { Map<Character, List<String>> map = new HashMap<>(); int res = 0; for (char i = 'a'; i <= 'z'; i++) { map.put(i, new ArrayList<>()); } for (String word : words) { char startingChar = word.charAt(0); List<String> list = map.get(startingChar); list.add(word); } for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); List<String> wordList = map.get(ch); List<String> helperList = new ArrayList<>(); for (String theWord : wordList) { helperList.add(theWord); } wordList.clear(); for (int j = 0; j < helperList.size(); j++) { String word = helperList.get(j); if (word.length() == 1) { res++; } else { String nextStr = word.substring(1, word.length()); char nextChar = nextStr.charAt(0); map.get(nextChar).add(nextStr); } } } return res; } }
[ "yiyu091@gmail.com" ]
yiyu091@gmail.com
2f11138aed1e96f220af10e590c2b95cac3acb8c
1698eaa2d9ffaac28ced3b4239a8de9f2621b032
/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java
1910579c74743b0571609c3edb0200ba3c67b033
[]
no_license
k42jc/java8-src
ff264ce6669dc46b4362a190e3060628b87d0503
0ff109df18e441f698a5b3f8cd3cb76cc796f9b8
refs/heads/master
2020-03-21T08:09:28.750430
2018-07-09T14:58:34
2018-07-09T14:58:34
138,324,536
1
1
null
null
null
null
UTF-8
Java
false
false
2,351
java
package org.omg.PortableServer.POAPackage; /** * org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/workspace/8-2-build-windows-i586-cygwin/jdk8u144/9417/corba/src/share/classes/org/omg/PortableServer/poa.idl * Friday, July 21, 2017 9:58:51 PM PDT */ abstract public class ServantNotActiveHelper { private static String _id = "IDL:omg.org/PortableServer/POA/ServantNotActive:1.0"; public static void insert (org.omg.CORBA.Any a, org.omg.PortableServer.POAPackage.ServantNotActive that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static org.omg.PortableServer.POAPackage.ServantNotActive extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.PortableServer.POAPackage.ServantNotActiveHelper.id (), "ServantNotActive", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static org.omg.PortableServer.POAPackage.ServantNotActive read (org.omg.CORBA.portable.InputStream istream) { org.omg.PortableServer.POAPackage.ServantNotActive value = new org.omg.PortableServer.POAPackage.ServantNotActive (); // read and discard the repository ID istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableServer.POAPackage.ServantNotActive value) { // write the repository ID ostream.write_string (id ()); } }
[ "liao" ]
liao
2a04dbdf390a68119d7d399acb50e00b809aa800
da889968b2cc15fc27f974e30254c7103dc4c67e
/Optimization Algorithm_GUI/src/Algorithm_Carpool/CC_CLPSO2_AB_2Si_ApproachII/Convert_Function.java
59b59323c0a8e3705d894bf00933932ac21f4e00
[]
no_license
say88888/My_Project_thesis
fcd4d96b34de8627fa054146eb6164b7c3636344
04908ea3ed6b7a9c1939a5d8e16dfc65d66437f4
refs/heads/master
2020-04-10T08:32:37.106239
2018-12-08T05:52:44
2018-12-08T05:52:44
160,908,221
0
0
null
null
null
null
UTF-8
Java
false
false
6,042
java
package Algorithm_Carpool.CC_CLPSO2_AB_2Si_ApproachII; import java.util.ArrayList; import java.util.List; public class Convert_Function extends CC_CLPSO2_AB_2Si_ApproachII { private static int[] rid=new int[P]; private static double[] Si=new double[P*2]; private static int[] A=new int[P]; private static int[] B=new int[2*P]; private static int[] Si_p = new int[P*2]; private static int[] binaryX=new int[D]; private static int[] binaryY=new int[P]; private static int[][] X; private static int[][] Y; public static void main(double[] X,double[] Y){ rid=new int[P]; Si=new double[P*2]; A=new int[P]; B=new int[2*P]; Si_p = new int[P*2]; binaryX=new int[D]; binaryY=new int[P]; int number; for(int d=0;d<P;d++){ if(Md.get(d).size()>0){ number=(int) Math.round(((Md.get(d).size()-1)*(X[d]+Vmax))/(2*Vmax)+1); rid[d]=number; } else { rid[d]=0; } } for(int d=0;d<Y.length;d++) Si[d]=Y[d]; Si_p=sortSi(Si); A=Get_A(rid); B=Get_B(A,Si_p); getbinaryXY(); } public static int[] Get_A(int[] rid) { // TODO Auto-generated method stub int[] A=new int[P]; for (int i = 0; i < P; i++) if(rid[i]!=0){ A[i]=Md.get(i).get(rid[i]-1); }else{A[i]=0;} return A; } public static int[] Get_B(int[] A,int[] Si) { List<List<Integer>> B = new ArrayList<List<Integer>>(); for (int j = 1; j <= D; j++) { List<Integer> b = new ArrayList<Integer>(); List<Integer> b1 = new ArrayList<Integer>(); for (int i = 0; i < P; i++) if (A[i] == j) b.add(i+1); if(b.size()>0){ for(int i=0;i<Si.length;i++) for(int k=0;k<b.size();k++) { if(Si[i]==b.get(k) || Si[i]==-(b.get(k))) { b1.add(Si[i]); } } } B.add(b1); } List Bstring = new ArrayList<Integer>(); for (int d = 0; d < B.size(); d++) for (int n= 0; n < B.get(d).size(); n++) Bstring.add(B.get(d).get(n)); int[] B1=new int[P*2]; for (int i = 0; i < Bstring.size(); i++) B1[i] = (int) Bstring.get(i); return B1; } static int[] Get_binaryX(int[] A) { List<List<Integer>> Dlist = new ArrayList<List<Integer>>(); int[][] Adp = new int[D][P]; for (int d = 0; d < D; d++){ List<Integer> list = new ArrayList<Integer>(); for (int p = 0; p < P; p++) { if (A[p] == (d + 1)){ Adp[d][p] = 1; list.add(p+1); }else Adp[d][p] = 0; } Dlist.add(list); } int [][]X = new int[D][]; for (int i = 0; i < D; i++) X[i] = new int[1]; for (int d = 0; d < X.length; d++) { for (int j = 0; j < X[d].length; j++) { int a = 0; for (int p = 0; p < P; p++) a += Adp[d][p]; if (a >= 1) X[d][j] = 1; else X[d][j] = 0; } } int[] X1=new int[D]; for (int d = 0; d < X.length; d++) for (int j = 0; j < X[d].length; j++) X1[d]=X[d][j]; return X1; } static int[] Get_binaryY(int[] A) { List<List<Integer>> Dlist = new ArrayList<List<Integer>>(); int[][] Adp = new int[D][P]; for (int d = 0; d < D; d++){ List<Integer> list = new ArrayList<Integer>(); for (int p = 0; p < P; p++) { if (A[p] == (d + 1)){ Adp[d][p] = 1; list.add(p+1); }else Adp[d][p] = 0; } Dlist.add(list); } int [][] Y = new int[P][]; for (int i = 0; i < Y.length; i++) Y[i] = new int[1]; for (int p = 0; p < Y.length; p++) for (int h = 0; h < Y[p].length; h++) { for (int d = 0; d < D; d++) Y[p][h] += Adp[d][p]; } int[] Y1=new int[P]; for (int p = 0; p < Y.length; p++) for (int h = 0; h < Y[p].length; h++) Y1[p]=Y[p][h]; return Y1; } static int[] sortSi(double[] Si) { //Step2 If the value of passenger location d+ is less than the value of passenger location d-, swap the values of passenger location d+ and the value of passenger location d-. for(int i=0;i<P;i++) { if(Si[i]<Si[i+P]) { double temp; temp=Si[i]; Si[i]=Si[i+P]; Si[i+P]=temp; } } //Step3 If the value of passenger location d+ is less than the value of passenger location d-, swap the values of passenger location d+ and the value of passenger location d-. int[] Si_p=new int[P*2]; for(int i=0;i<P;i++) { Si_p[i]=i+1; Si_p[i+P]=-(i+1); } for(int i=0;i<(P*2)-1;i++) for(int j=0;j<(P*2)-1;j++) { if(Si[j]<Si[j+1]){ double temp; temp=Si[j]; Si[j]=Si[j+1]; Si[j+1]=temp; int temp1; temp1=Si_p[j]; Si_p[j]=Si_p[j+1]; Si_p[j+1]=temp1; } } return Si_p; } static void getbinaryXY() { List<List<Integer>> Dlist = new ArrayList<List<Integer>>(); int[][] Adp = new int[D][P]; for (int d = 0; d < D; d++){ List<Integer> list = new ArrayList<Integer>(); for (int p = 0; p < P; p++) { if (A[p] == (d + 1)){ Adp[d][p] = 1; list.add(p+1); }else Adp[d][p] = 0; } Dlist.add(list); } Y = new int[P][]; for (int i = 0; i < Y.length; i++) Y[i] = new int[1]; for (int p = 0; p < Y.length; p++) for (int h = 0; h < Y[p].length; h++) { for (int d = 0; d < D; d++) Y[p][h] += Adp[d][p]; } X = new int[D][]; for (int i = 0; i < D; i++) X[i] = new int[1]; for (int d = 0; d < X.length; d++) { for (int j = 0; j < X[d].length; j++) { int a = 0; for (int p = 0; p < P; p++) a += Adp[d][p]; if (a >= 1) X[d][j] = 1; else X[d][j] = 0; } } for (int d = 0; d < X.length; d++) for (int j = 0; j < X[d].length; j++) binaryX[d]=X[d][j]; for (int p = 0; p < Y.length; p++) for (int h = 0; h < Y[p].length; h++) binaryY[p]=Y[p][h]; } public static int getrid(int index) { return rid[index]; } public static double getSi(int index) { return Si[index]; } public static int getA(int index) { return A[index]; } public static int getB(int index) { return B[index]; } public static int getbinaryX(int index) { return binaryX[index]; } public static int getbinaryY(int index) { return binaryY[index]; } }
[ "gtvsta99@gmail.com" ]
gtvsta99@gmail.com
058b04f38df92090f13c6da45d51d7e076f4f436
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
/sources/com/facebook/ads/internal/view/hscroll/C2078c.java
9853ff8c8e52ed67ad5591ecdcf4f1727b287d53
[]
no_license
niravrathod/car_details
f979de0b857f93efe079cd8d7567f2134755802d
398897c050436f13b7160050f375ec1f4e05cdf8
refs/heads/master
2020-04-13T16:36:29.854057
2018-12-27T19:03:46
2018-12-27T19:03:46
163,325,703
0
0
null
null
null
null
UTF-8
Java
false
false
826
java
package com.facebook.ads.internal.view.hscroll; import android.support.v7.widget.RecyclerView.LayoutParams; import android.view.View; import android.view.ViewGroup; /* renamed from: com.facebook.ads.internal.view.hscroll.c */ public class C2078c { /* renamed from: a */ public int[] m7634a(View view, int i, int i2) { LayoutParams layoutParams = (LayoutParams) view.getLayoutParams(); view.measure(ViewGroup.getChildMeasureSpec(i, view.getPaddingLeft() + view.getPaddingRight(), layoutParams.width), ViewGroup.getChildMeasureSpec(i2, view.getPaddingTop() + view.getPaddingBottom(), layoutParams.height)); return new int[]{(view.getMeasuredWidth() + layoutParams.leftMargin) + layoutParams.rightMargin, (view.getMeasuredHeight() + layoutParams.bottomMargin) + layoutParams.topMargin}; } }
[ "niravrathod473@gmail.com" ]
niravrathod473@gmail.com
b637a3c8d89355788062eeb3f1ef3c470a520c24
fc8135cb8978645008b570b8cbbb1613f42f59f3
/modules/core/src/main/java/org/mycontroller/standalone/metrics/jobs/MetricsAggregationJob.java
02bddd17686dc8549a49d0a64cafef0837eaf4a6
[ "Apache-2.0" ]
permissive
GeoffCapper/mycontroller
bf3e97178464ab25be26a9b9658115bc817ac6ab
07c3a228b9c861280fe2f560ed4d1097349d08bb
refs/heads/master
2021-05-08T04:22:56.500144
2017-09-25T05:26:18
2017-09-25T05:26:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,009
java
/* * Copyright 2015-2017 Jeeva Kandasamy (jkandasa@gmail.com) * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mycontroller.standalone.metrics.jobs; import java.sql.SQLException; import java.text.MessageFormat; import org.knowm.sundial.Job; import org.knowm.sundial.exceptions.JobInterruptException; import org.mycontroller.standalone.AppProperties; import org.mycontroller.standalone.db.DB_QUERY; import org.mycontroller.standalone.db.DaoUtils; import org.mycontroller.standalone.metrics.METRIC_ENGINE; import org.mycontroller.standalone.metrics.MetricsUtils; import org.mycontroller.standalone.metrics.engines.McMetricsAggregationBase; import org.mycontroller.standalone.settings.MetricsDataRetentionSettings; import lombok.extern.slf4j.Slf4j; /** * @author Jeeva Kandasamy (jkandasa) * @since 0.0.1 */ @Slf4j public class MetricsAggregationJob extends Job { private void executeSqlQuery(String sqlQuery) { try { int deleteCount = DaoUtils.getMetricsDoubleTypeDeviceDao().getDao().executeRaw(sqlQuery); _logger.debug("Sql Query[{}], Deletion count:{}", sqlQuery, deleteCount); } catch (SQLException ex) { _logger.error("Exception when executing query[{}] ", sqlQuery, ex); } } @Override public void doRun() throws JobInterruptException { if (MetricsUtils.type() != METRIC_ENGINE.MY_CONTROLLER) { //If some of external metric engine configured. no need to run internal metric aggregation return; } _logger.debug("Metrics aggregation job triggered"); new McMetricsAggregationBase().runAggregation(); //Execute purge of binary and gps data MetricsDataRetentionSettings retentionSettings = AppProperties.getInstance().getMetricsDataRetentionSettings(); //Binary data String sqlDeleteQueryBinary = MessageFormat.format(DB_QUERY.getQuery(DB_QUERY.DELETE_METRICS_BINARY), String.valueOf(System.currentTimeMillis() - retentionSettings.getRetentionBinary())); executeSqlQuery(sqlDeleteQueryBinary); //GPS data String sqlDeleteQueryGPS = MessageFormat.format(DB_QUERY.getQuery(DB_QUERY.DELETE_METRICS_GPS), String.valueOf(System.currentTimeMillis() - retentionSettings.getRetentionGPS())); executeSqlQuery(sqlDeleteQueryGPS); _logger.debug("Metrics aggregation job completed"); } }
[ "jkandasa@gmail.com" ]
jkandasa@gmail.com
030aa1b6da664003ea90ffb333fc98b1dc3f4503
6f36fc4a0f9c680553f8dd64c5df55c403f8f2ed
/src/main/java/it/csi/siac/siacbilser/business/service/allegatoatto/CompletaAllegatoAttoMultiploAsyncResponseHandler.java
2e7450a0987a1287794ceb138fa3f0719dbffc74
[]
no_license
unica-open/siacbilser
b46b19fd382f119ec19e4e842c6a46f9a97254e2
7de24065c365564b71378ce9da320b0546474130
refs/heads/master
2021-01-06T13:25:34.712460
2020-03-04T08:44:26
2020-03-04T08:44:26
241,339,144
0
0
null
null
null
null
UTF-8
Java
false
false
1,886
java
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ package it.csi.siac.siacbilser.business.service.allegatoatto; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import it.csi.siac.siacbilser.business.service.base.BilAsyncResponseHandler; import it.csi.siac.siaccorser.model.Errore; import it.csi.siac.siaccorser.model.Esito; import it.csi.siac.siaccorser.model.Messaggio; import it.csi.siac.siacfin2ser.frontend.webservice.msg.CompletaAllegatoAttoMultiploResponse; @Component @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class CompletaAllegatoAttoMultiploAsyncResponseHandler extends BilAsyncResponseHandler<CompletaAllegatoAttoMultiploResponse> { @Override public void handleResponse(CompletaAllegatoAttoMultiploResponse response) { final String methodName = "handleResponse"; //inserisco gli eventuali messaggi della response su base dati, in modo tale che sia poi possibile mostrarli da cruscotto for(Messaggio messaggio : response.getMessaggi()) { log.info(methodName, "Messaggio: " + messaggio.getCodice() + " - "+ messaggio.getDescrizione()); inserisciDettaglioOperazioneAsinc(messaggio.getCodice(), messaggio.getDescrizione(), Esito.SUCCESSO); } //inserisco gli eventuali errori della response su base dati, in modo tale che sia poi possibile mostrarli da cruscotto for(Errore errore : response.getErrori()) { log.info(methodName, "Errore riscontrato: " + errore.getTesto()); inserisciDettaglioOperazioneAsinc(errore.getCodice(), errore.getDescrizione(), Esito.FALLIMENTO); } if(!response.hasErrori()){ //non si sono verificati errori, inserisco l'informazione di successo su base dati in modo tale che venga visualizzata inserisciDettaglioSuccesso(); } } }
[ "barbara.malano@csi.it" ]
barbara.malano@csi.it
023330e0705cbec1421c0a5f134fcd094eb7b0a6
07b266a3b5117d7cf586f0981335176617a5725c
/ITalkerPush/app/ITalker/factory/src/main/java/com/google/jaaaule/gzw/factory/model/api/account/RegisterModel.java
169d7de8f8dd582f3b77274163fec289937ab557
[]
no_license
GzwJaaaelu/LearnIMOOCIM
0752ed40324bc65dd27b3b0e5bcd17e995b85a00
4f01bbffeb0812d27228d3275552d3059996b2fc
refs/heads/master
2020-12-02T08:00:38.765039
2017-07-11T11:45:18
2017-07-11T11:45:18
96,760,712
0
0
null
null
null
null
UTF-8
Java
false
false
1,157
java
package com.google.jaaaule.gzw.factory.model.api.account; /** * Created by admin on 2017/7/6. */ public class RegisterModel { private String account; private String password; private String name; private String pushId; public RegisterModel(String account, String password, String name) { this(account, password, name, null); } public RegisterModel(String account, String password, String name, String pushId) { this.account = account; this.password = password; this.name = name; this.pushId = pushId; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPushId() { return pushId; } public void setPushId(String pushId) { this.pushId = pushId; } }
[ "gzw102030@outlook.com" ]
gzw102030@outlook.com
bf7f8b42b6c7c93f2e03f6790bee1f0e47644e59
c16ea32a4cddb6b63ad3bacce3c6db0259d2bacd
/google/cloud/servicedirectory/v1beta1/google-cloud-servicedirectory-v1beta1-java/proto-google-cloud-servicedirectory-v1beta1-java/src/main/java/com/google/cloud/servicedirectory/v1beta1/ServiceProto.java
3464c01914e3c11cb39a7ec2a901cd73f0cfc16b
[ "Apache-2.0" ]
permissive
dizcology/googleapis-gen
74a72b655fba2565233e5a289cfaea6dc7b91e1a
478f36572d7bcf1dc66038d0e76b9b3fa2abae63
refs/heads/master
2023-06-04T15:51:18.380826
2021-06-16T20:42:38
2021-06-16T20:42:38
null
0
0
null
null
null
null
UTF-8
Java
false
true
4,837
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/servicedirectory/v1beta1/service.proto package com.google.cloud.servicedirectory.v1beta1; public final class ServiceProto { private ServiceProto() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_servicedirectory_v1beta1_Service_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_servicedirectory_v1beta1_Service_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_servicedirectory_v1beta1_Service_MetadataEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_servicedirectory_v1beta1_Service_MetadataEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n3google/cloud/servicedirectory/v1beta1/" + "service.proto\022%google.cloud.servicedirec" + "tory.v1beta1\032\037google/api/field_behavior." + "proto\032\031google/api/resource.proto\0324google" + "/cloud/servicedirectory/v1beta1/endpoint" + ".proto\032\034google/api/annotations.proto\"\354\002\n" + "\007Service\022\021\n\004name\030\001 \001(\tB\003\340A\005\022S\n\010metadata\030" + "\002 \003(\0132<.google.cloud.servicedirectory.v1" + "beta1.Service.MetadataEntryB\003\340A\001\022G\n\tendp" + "oints\030\003 \003(\0132/.google.cloud.servicedirect" + "ory.v1beta1.EndpointB\003\340A\003\032/\n\rMetadataEnt" + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\177\352A|\n" + "\'servicedirectory.googleapis.com/Service" + "\022Qprojects/{project}/locations/{location" + "}/namespaces/{namespace}/services/{servi" + "ce}B\220\002\n)com.google.cloud.servicedirector" + "y.v1beta1B\014ServiceProtoP\001ZUgoogle.golang" + ".org/genproto/googleapis/cloud/servicedi" + "rectory/v1beta1;servicedirectory\370\001\001\252\002%Go" + "ogle.Cloud.ServiceDirectory.V1Beta1\312\002%Go" + "ogle\\Cloud\\ServiceDirectory\\V1beta1\352\002(Go" + "ogle::Cloud::ServiceDirectory::V1beta1b\006" + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.servicedirectory.v1beta1.EndpointProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_servicedirectory_v1beta1_Service_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_servicedirectory_v1beta1_Service_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_servicedirectory_v1beta1_Service_descriptor, new java.lang.String[] { "Name", "Metadata", "Endpoints", }); internal_static_google_cloud_servicedirectory_v1beta1_Service_MetadataEntry_descriptor = internal_static_google_cloud_servicedirectory_v1beta1_Service_descriptor.getNestedTypes().get(0); internal_static_google_cloud_servicedirectory_v1beta1_Service_MetadataEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_servicedirectory_v1beta1_Service_MetadataEntry_descriptor, new java.lang.String[] { "Key", "Value", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.servicedirectory.v1beta1.EndpointProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com