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
fbd45ad365aa1a51ad75109ef091c5e569a07d51
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/6_jnfe-br.com.jnfe.base.TpObsNFe-0.5-8/br/com/jnfe/base/TpObsNFe_ESTest_scaffolding.java
35c4ecc7432495dfd663480b8bac4c0c8fe6cca9
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
531
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 15:57:27 GMT 2019 */ package br.com.jnfe.base; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class TpObsNFe_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
914a6b72ca62bdadbfd0a9a66690448dd32ad827
493a8065cf8ec4a4ccdf136170d505248ac03399
/net.sf.ictalive.services/src/net/sf/ictalive/service/ServiceConsumer.java
f30856fddc65cf789c5d3ade58e8ede0adf12da8
[]
no_license
ignasi-gomez/aliveclipse
593611b2d471ee313650faeefbed591c17beaa50
9dd2353c886f60012b4ee4fe8b678d56972dff97
refs/heads/master
2021-01-14T09:08:24.839952
2014-10-09T14:21:01
2014-10-09T14:21:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,394
java
/** * <copyright> * </copyright> * * $Id$ */ package net.sf.ictalive.service; import net.sf.ictalive.coordination.agents.Agent; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Consumer</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link net.sf.ictalive.service.ServiceConsumer#getInvokes <em>Invokes</em>}</li> * <li>{@link net.sf.ictalive.service.ServiceConsumer#getIsType <em>Is Type</em>}</li> * </ul> * </p> * * @see net.sf.ictalive.service.ServicePackage#getServiceConsumer() * @model * @generated */ public interface ServiceConsumer extends Agent { /** * Returns the value of the '<em><b>Invokes</b></em>' reference list. * The list contents are of type {@link net.sf.ictalive.service.Service}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Invokes</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Invokes</em>' reference list. * @see net.sf.ictalive.service.ServicePackage#getServiceConsumer_Invokes() * @model required="true" * @generated */ EList<Service> getInvokes(); /** * Returns the value of the '<em><b>Is Type</b></em>' attribute. * The literals are from the enumeration {@link net.sf.ictalive.service.ServiceType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Is Type</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Is Type</em>' attribute. * @see net.sf.ictalive.service.ServiceType * @see #setIsType(ServiceType) * @see net.sf.ictalive.service.ServicePackage#getServiceConsumer_IsType() * @model required="true" derived="true" * @generated */ ServiceType getIsType(); /** * Sets the value of the '{@link net.sf.ictalive.service.ServiceConsumer#getIsType <em>Is Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Is Type</em>' attribute. * @see net.sf.ictalive.service.ServiceType * @see #getIsType() * @generated */ void setIsType(ServiceType value); } // ServiceConsumer
[ "salvarez@lsi.upc.edu" ]
salvarez@lsi.upc.edu
33e725bed66b359c7e17a4c13f5fcaa41e2d4777
3a92d98ba2ac492c1cb2bbafeff92a85e0c3e5d1
/src/main/java/lsieun/bytecode/gen/opcode/DLOAD.java
2d2cbbcf66b964d2651226b49ca75b0225c8ce6b
[ "MIT" ]
permissive
lsieun/lsieun-bytecode-gen
7379f3ad57ed2d452f195aef2454ad10f4920055
16c5e2e361ebca4a076741402cd9f19f7e13b82d
refs/heads/master
2021-07-08T00:39:31.019071
2019-08-18T02:20:46
2019-08-18T02:20:46
201,840,405
0
0
MIT
2020-10-13T15:24:06
2019-08-12T02:05:49
Java
UTF-8
Java
false
false
726
java
package lsieun.bytecode.gen.opcode; import java.io.DataOutputStream; import java.io.IOException; import lsieun.bytecode.core.cst.OpcodeConst; import lsieun.bytecode.gen.opcode.facet.LocalVariableInstruction; /** * DLOAD - Load double from local variable * <PRE>Stack ... -&gt; ..., result.word1, result.word2</PRE> */ public final class DLOAD extends LocalVariableInstruction { public DLOAD(final int index) { super(OpcodeConst.DLOAD, 2); this.index = index; } @Override public void dump(DataOutputStream out) throws IOException { out.writeByte(opcode); if (wide) { out.writeShort(index); } else { out.writeByte(index); } } }
[ "331505785@qq.com" ]
331505785@qq.com
4c0231960352c680453c46ca783086881a5f00e1
a17dd1e9f5db1c06e960099c13a5b70474d90683
/core/src/main/java/jp/co/sint/webshop/service/data/csv/GiftCardLogExportCondition.java
49fe3f1ee4270a9a193badd73319e8aa19b41eac
[]
no_license
giagiigi/ec_ps
4e404afc0fc149c9614d0abf63ec2ed31d10bebb
6eb19f4d14b6f3a08bfc2c68c33392015f344cdd
refs/heads/master
2020-12-14T07:20:24.784195
2015-02-09T10:00:44
2015-02-09T10:00:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
743
java
package jp.co.sint.webshop.service.data.csv; import jp.co.sint.webshop.service.analysis.GiftCardLogSearchCondition; import jp.co.sint.webshop.service.data.CsvConditionImpl; public class GiftCardLogExportCondition extends CsvConditionImpl<GiftCardLogCsvSchema>{ /** serial version UID */ private static final long serialVersionUID = 1L; private GiftCardLogSearchCondition searchCondition; /** * @return the searchCondition */ public GiftCardLogSearchCondition getSearchCondition() { return searchCondition; } /** * @param searchCondition the searchCondition to set */ public void setSearchCondition(GiftCardLogSearchCondition searchCondition) { this.searchCondition = searchCondition; } }
[ "fengperfect@126.com" ]
fengperfect@126.com
ccde5b6105799cf9eef06083b2949694e08d2726
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/androidx/room/IMultiInstanceInvalidationCallback.java
94ca436b62b9528e3a5fd8355dea80db322abffa
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
161
java
package androidx.room; import android.os.IInterface; public interface IMultiInstanceInvalidationCallback extends IInterface { void AGp(String[] strArr); }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
484a8dd4cd88846d4c0b488dae54c5ce5d8a93f5
ccb80fd76f16884ab6c3b28998a3526ac38ec321
/ctakes-ytex/src/main/java/org/apache/ctakes/jdl/AppMain.java
5c487fda7cfd198d218cfcd06da058dccabc541c
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
apache/ctakes
5d5c35a7c8c906e21d52488396adeb40ebd7034e
def3dea5602945dfbec260d4faaabfbc0a2a2ad4
refs/heads/main
2023-07-02T18:28:53.754174
2023-05-18T00:00:51
2023-05-18T00:00:51
26,951,043
97
77
Apache-2.0
2022-10-18T23:28:24
2014-11-21T08:00:09
Java
UTF-8
Java
false
false
2,956
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ctakes.jdl; import org.apache.commons.cli.*; /** * Java data loader Main. * * @author mas */ public final class AppMain { private static final String OPT_XDL_CONN_LONG = "conn"; private static final String OPT_XDL_DATA_LONG = "data"; private static final String OPT_XDL_LOAD_LONG = "load"; private static final String OPT_XDL_CONN_DESCR = "conn file"; private static final String OPT_XDL_DATA_DESCR = "data file"; private static final String OPT_XDL_LOAD_DESCR = "load file"; public static final String OPT_XDL_CONN = "c"; public static final String OPT_XDL_DATA = "d"; public static final String OPT_XDL_LOAD = "l"; private AppMain() { } /** * @return the options of the commandLine */ public static Options getOprions() { Option optXdlConn = new Option(OPT_XDL_CONN, OPT_XDL_CONN_LONG, true, OPT_XDL_CONN_DESCR); optXdlConn.setRequired(true); Option optXdlData = new Option(OPT_XDL_DATA, OPT_XDL_DATA_LONG, true, OPT_XDL_DATA_DESCR); optXdlData.setRequired(true); Options options = new Options(); options.addOption(optXdlConn); options.addOption(optXdlData); options.addOption(OPT_XDL_LOAD, OPT_XDL_LOAD_LONG, true, OPT_XDL_LOAD_DESCR); return options; } /** * @param arguments * the arguments to parse * @return the commandLine * @throws ParseException * exception */ public static CommandLine parsingCLI(String[] arguments) throws ParseException { Options options = getOprions(); PosixParser posix = new PosixParser(); return posix.parse(options, arguments); } /** * @param args * input string */ public static void main(String[] args) { String cmdLineSyntax = "java [-options] -jar jarfile"; String header = "Java Data Loader"; try { CommandLine cl = parsingCLI(args); String srcConn = cl.getOptionValue(OPT_XDL_CONN); String srcData = cl.getOptionValue(OPT_XDL_DATA); String srcLoad = cl.getOptionValue(OPT_XDL_LOAD); new AppJdl(srcConn, srcData, srcLoad).execute(); } catch (ParseException e) { new HelpFormatter().printHelp(cmdLineSyntax, header, getOprions(), null, true); } } }
[ "sean.finan@childrens.harvard.edu" ]
sean.finan@childrens.harvard.edu
4b63851dd1d738ee7052643fe2f153b94828c0b9
08f51f152619a2bea5493c699dcb9e2087d53837
/src/test/java/com/thoughtworks/cruise/artifacts/ArtifactRepository.java
8db083319aa5ca84a6536bd84c15965af98c6743
[]
no_license
hw-gocd/gocd-functional-tests
84afa9e144df44da94ebdd03994ed7823881b306
a2088fdce9a3779ddc592bb471c9cf36580f60b3
refs/heads/master
2020-04-10T06:47:12.322369
2015-09-14T15:15:32
2015-09-14T15:15:32
42,503,400
0
0
null
null
null
null
UTF-8
Java
false
false
5,146
java
package com.thoughtworks.cruise.artifacts; // JUnit Assert framework can be used for verification import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import net.sf.sahi.client.Browser; import org.apache.commons.collections.map.SingletonMap; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import com.thoughtworks.cruise.RuntimePath; import com.thoughtworks.cruise.context.Configuration; import com.thoughtworks.cruise.preconditions.NewStreamPumper; import com.thoughtworks.cruise.state.ArtifactFilesystem; import com.thoughtworks.cruise.utils.Assertions; import com.thoughtworks.cruise.utils.Assertions.Predicate; import com.thoughtworks.cruise.utils.Timeout; import com.thoughtworks.twist.core.utils.OsUtils; public class ArtifactRepository { private final ArtifactFilesystem artifactFilesystem; private final Configuration configuration; public ArtifactRepository(Browser browser, ArtifactFilesystem artifactFilesystem, Configuration configuration) { this.artifactFilesystem = artifactFilesystem; this.configuration = configuration; } public static void fileWithSize(int sizeOfArtifactInMB, File artifact) throws FileNotFoundException, IOException { BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(artifact)); byte[] block = block(); for (int i = 0; i < sizeOfArtifactInMB * 1024 / 4; i++) { out.write(block); out.flush(); } out.close(); } private static byte[] block() { byte [] bytes = new byte[4 * 1024]; for (int i=0; i < 4 * 1024; i++) bytes[i] = 0; return bytes; } @SuppressWarnings("unchecked") public void pointTheArtifactRepositoryToAPartitionOfSizeMB(int sizeInMB) throws Exception { if (OsUtils.isLinux()) { File file = artifactFilesystem.fileSystem.getAbsoluteFile(); fileWithSize(sizeInMB, file); run(new ByteArrayInputStream("y".getBytes()), "mkfs.ext3", file.getAbsolutePath(), "-m", "0"); run(new SingletonMap("SUDO_ASKPASS", new File(RuntimePath.pathFor("../manual-testing/twist/echo_password.sh")).getAbsolutePath()), new ByteArrayInputStream("".getBytes()), "sudo", "-A", "/bin/mount", "-t", "ext3", "-o", "loop", file.getAbsolutePath(), RuntimePath.getArtifactPath(configuration.provideDom().getArtifactsDir())); } else { throw new UnsupportedOperationException("Not supported on non GNU/Linux environments yet"); } } public static void run(InputStream processInput, String...commandAndArgs) throws IOException, InterruptedException { run(new HashMap<String, String>(), processInput, commandAndArgs); } public static void run(Map<String, String> envVars, InputStream processInput, String...commandAndArgs) throws IOException, InterruptedException { ProcessBuilder processBuilder = new ProcessBuilder(commandAndArgs); for(Entry<String, String> envVar : envVars.entrySet()) { processBuilder.environment().put(envVar.getKey(), envVar.getValue()); } processBuilder.redirectErrorStream(true); Process process = processBuilder.start(); NewStreamPumper.pump(process.getInputStream(), "out", System.out); OutputStream outputStream = process.getOutputStream(); IOUtils.copy(processInput, outputStream); outputStream.close(); int returnCode = process.waitFor(); assertThat(String.format("Failed executing commad: %s", StringUtils.join(commandAndArgs, " ")), returnCode, is(0)); } public static void run(String... commandAndArgs) throws IOException, InterruptedException { run(new ByteArrayInputStream("".getBytes()), commandAndArgs); } public void waitTillTheFreeSpaceIsMoreThanMB(final int freeSpaceInMB) throws Exception { Assertions.waitUntil(Timeout.THREE_MINUTES, new Predicate() { @Override public boolean call() throws Exception { return artifactRepoFreeSpace() > (freeSpaceInMB * 1024 * 1024L); } public long artifactRepoFreeSpace() { return new File(RuntimePath.getArtifactPath(configuration.provideDom().getArtifactsDir())).getFreeSpace(); } public double artifactRepoFreeSpaceInMB() { return artifactRepoFreeSpace() / 1024 / 1024; } public String toString() { return String.format("Expected the free space on the artifact repo to increase beyond '%s' MB. Actually, it was: %s", freeSpaceInMB, artifactRepoFreeSpaceInMB()); }; }); } }
[ "godev@thoughtworks.com" ]
godev@thoughtworks.com
98f74dba9d41de7ee99c4ee156bff726d2c5bab9
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1006124.java
8df48d6f29ccc9a4a95148482d3849fdf656f129
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
@Override public TextFieldTableCell<S,T> call(TableColumn<S,T> param){ return new TextFieldTableCell<S,T>(stringConverter){ @Override public void updateItem( T item, boolean empty){ super.updateItem(item,empty); if (!empty && (getTableRow() != null)) { Object rowItem=getTableRow().getItem(); if (rowItem != null) { S vm=(S)rowItem; if ((visualizer != null) && (validationStatusProperty != null)) { visualizer.initVisualization(validationStatusProperty.apply(vm),this); } } } } } ; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
74235bd157f642470f48ddb6aa03194477f9847d
d85ad30b768862664bc77248e4742b2dafeca22b
/Lintcode/Algorithm/ImplementQueueByStacks/Solution.java
19c9db92f165f503bbaad7c762e3200a0f9f0b75
[]
no_license
wcy1984123/Interviews
4dcbbf5ce6d442e55b36f9275a17df05967927c8
026f13dad5f2dee1988b0fcfa737fd17b9f8ccf5
refs/heads/master
2021-01-13T02:02:26.384967
2019-11-12T05:29:06
2019-11-12T05:29:06
32,403,923
1
0
null
null
null
null
UTF-8
Java
false
false
1,661
java
package ImplementQueueByStacks; import java.util.Stack; /** * Project: Interviews * Package: ImplementQueueByStacks * Date: 18/Mar/2015 * Time: 19:32 * System Time: 7:32 PM */ /* As the title described, you should only use two stacks to implement a queue's actions. The queue should support push(element), pop() and top() where pop is pop the first(a.k.a front) element in the queue. Both pop and top methods should return the value of first element. Example For push(1), pop(), push(2), push(3), top(), pop(), you should return 1, 2 and 2 Challenge implement it by two stacks, do not use any other data structure and push, pop and top should be O(1) by AVERAGE. */ public class Solution { private Stack<Integer> stack1; private Stack<Integer> stack2; public Solution() { // do initialization if necessary // push stack stack1 = new Stack<Integer>(); // pop stack stack2 = new Stack<Integer>(); } public void push(int element) { // write your code here stack1.push(element); } public int pop() { // write your code here if (!stack2.isEmpty()) { return stack2.pop(); } else { this.populate(); return stack2.pop(); } } private void populate() { while (!stack1.isEmpty()) { stack2.push(stack1.pop()); } } public int top() { // write your code here if (!stack2.isEmpty()) { return stack2.peek(); } else { this.populate(); return stack2.peek(); } } }
[ "wangchiying@gmail.com" ]
wangchiying@gmail.com
825c65b06448a4e027aeb43cab90cfbfc9aefeec
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_407/Testnull_40669.java
b1f09cf239f8cb1ca937cdc8d4f910bb751eedd3
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_407; import static org.junit.Assert.*; public class Testnull_40669 { private final Productionnull_40669 production = new Productionnull_40669("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
e1e37a458958306479855ce1aef5ba218b4aa66d
65e5dd0bd32e40aba013e2140c73b93112e89c42
/api/ebayAPI/src/main/java/com/ebay/soap/eBLBaseComponents/SetSellingManagerItemAutomationRuleRequestType.java
cb63f8c30b17c1e93c018b4bd483f57babaf6df0
[]
no_license
vancezhao/mocha
732fb271da41ae3d897f9edba99f09f54924f93f
1192a768509ba82eadfaaffc4e91df5ebac375b4
refs/heads/master
2016-09-05T17:19:03.251590
2013-12-08T11:47:36
2013-12-08T11:47:36
15,303,645
0
1
null
null
null
null
UTF-8
Java
false
false
4,901
java
package com.ebay.soap.eBLBaseComponents; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * * Revises, or adds to, the set of Selling Manager automation * rules associated with an item. * <br> * <br> * This call is subject to change without notice; the * deprecation process is inapplicable to this call. * <br> * <br> * Using this call, you can add an autolist rule. * You also can add a second chance offer * rule (restricted to auction items and auction templates). * Note that autorelist rules can only be set on templates. * An autorelist rule for an item is inherited from a template. * <br> * <br> * This call also enables you to specify particular information about automation * rules. * <br> * <br> * If a node is not passed in the call, the setting for the corresponding * automation rule remains unchanged. * <br> * <br> * Although this call can revise (overwrite) an existing rule, * this call cannot delete an automation rule. * (Instead, use DeleteSellingManagerItemAutomationRule.) * * * <p>Java class for SetSellingManagerItemAutomationRuleRequestType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SetSellingManagerItemAutomationRuleRequestType"> * &lt;complexContent> * &lt;extension base="{urn:ebay:apis:eBLBaseComponents}AbstractRequestType"> * &lt;sequence> * &lt;element name="ItemID" type="{urn:ebay:apis:eBLBaseComponents}ItemIDType" minOccurs="0"/> * &lt;element name="AutomatedRelistingRule" type="{urn:ebay:apis:eBLBaseComponents}SellingManagerAutoRelistType" minOccurs="0"/> * &lt;element name="AutomatedSecondChanceOfferRule" type="{urn:ebay:apis:eBLBaseComponents}SellingManagerAutoSecondChanceOfferType" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SetSellingManagerItemAutomationRuleRequestType", propOrder = { "itemID", "automatedRelistingRule", "automatedSecondChanceOfferRule" }) public class SetSellingManagerItemAutomationRuleRequestType extends AbstractRequestType implements Serializable { private final static long serialVersionUID = 12343L; @XmlElement(name = "ItemID") protected String itemID; @XmlElement(name = "AutomatedRelistingRule") protected SellingManagerAutoRelistType automatedRelistingRule; @XmlElement(name = "AutomatedSecondChanceOfferRule") protected SellingManagerAutoSecondChanceOfferType automatedSecondChanceOfferRule; /** * Gets the value of the itemID property. * * @return * possible object is * {@link String } * */ public String getItemID() { return itemID; } /** * Sets the value of the itemID property. * * @param value * allowed object is * {@link String } * */ public void setItemID(String value) { this.itemID = value; } /** * Gets the value of the automatedRelistingRule property. * * @return * possible object is * {@link SellingManagerAutoRelistType } * */ public SellingManagerAutoRelistType getAutomatedRelistingRule() { return automatedRelistingRule; } /** * Sets the value of the automatedRelistingRule property. * * @param value * allowed object is * {@link SellingManagerAutoRelistType } * */ public void setAutomatedRelistingRule(SellingManagerAutoRelistType value) { this.automatedRelistingRule = value; } /** * Gets the value of the automatedSecondChanceOfferRule property. * * @return * possible object is * {@link SellingManagerAutoSecondChanceOfferType } * */ public SellingManagerAutoSecondChanceOfferType getAutomatedSecondChanceOfferRule() { return automatedSecondChanceOfferRule; } /** * Sets the value of the automatedSecondChanceOfferRule property. * * @param value * allowed object is * {@link SellingManagerAutoSecondChanceOfferType } * */ public void setAutomatedSecondChanceOfferRule(SellingManagerAutoSecondChanceOfferType value) { this.automatedSecondChanceOfferRule = value; } }
[ "vancezhao@gmail.com" ]
vancezhao@gmail.com
d78fef8a4faf7d8bf41fc1d03a570a917cb0128a
00abc1aec703a1d48c393bf853be907fc44280f5
/yeb-server/src/main/java/com/ming/server/service/impl/SalaryServiceImpl.java
b30ecd565289c70f378182e435ac2fbac5e63c64
[]
no_license
xiaoming-master/yeb
81c5f96e70881c5d9cff1b521f74a27c56115d24
843750239e67c1f92969a7990ac304c952e33593
refs/heads/master
2023-06-24T09:27:42.757753
2021-07-24T17:30:08
2021-07-24T17:30:08
387,009,042
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
package com.ming.server.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ming.server.mapper.SalaryMapper; import com.ming.server.pojo.Salary; import com.ming.server.service.ISalaryService; import org.springframework.stereotype.Service; /** * <p> * 服务实现类 * </p> * * @author zhanglishen * @since 2021-07-17 */ @Service public class SalaryServiceImpl extends ServiceImpl<SalaryMapper, Salary> implements ISalaryService { }
[ "1186927930@qq.com" ]
1186927930@qq.com
e592161b50680cd60cdafd8ff9589077ae5fcb41
65ebd9cc9b8ac76522f77c84b70fdc8b2c6d77e6
/src/main/java/com/github/leetcode/medium/Leetcode932.java
548b88c89679e06b4dd71c4b18cdc3bbbdb2024c
[]
no_license
SlumDunk/leetcode
30af765c7f5e61317983af43230bafa23362e25a
c242f13e7b3a3ea67cdd70f3d8b216e83bd65829
refs/heads/master
2021-08-20T01:58:11.309819
2021-07-25T17:07:10
2021-07-25T17:07:10
121,602,686
0
0
null
2020-11-08T03:34:35
2018-02-15T07:38:45
Java
UTF-8
Java
false
false
3,170
java
package com.github.leetcode.medium; import java.util.ArrayList; /** * @Author: zerongliu * @Date: 6/29/19 22:33 * @Description: For some fixed N, an array A is beautiful if it is a permutation of the integers 1, 2, ..., N, such that: * <p> * For every i < j, there is no k with i < k < j such that A[k] * 2 = A[i] + A[j]. * <p> * Given N, return any beautiful array A. (It is guaranteed that one exists.) * <p> * <p> * <p> * Example 1: * <p> * Input: 4 * Output: [2,1,4,3] * Example 2: * <p> * Input: 5 * Output: [3,1,2,5,4] * <p> * <p> * Note: * <p> * 1 <= N <= 1000 */ public class Leetcode932 { /** * Intuition: * Try to divide and conquer, * so we have left part, right part. * <p> * One way is to divide into [1, N / 2] and [N / 2 + 1, N]. * But it will cause problems when we merge them. * <p> * Another way is to divide into odds part and evens part. * So there is no k with A[k] * 2 = odd + even * <p> * I brute force all permutations when N = 5: * 20 beautiful array found, * only 4 don't fit odd + even pattern: * [2, 1, 4, 5, 3] * [3, 1, 2, 5, 4] * [3, 5, 4, 1, 2] * [4, 5, 2, 1, 3] * <p> * <p> * Beautiful Array Properties * Saying that an array is beautiful, * there is no i < k < j, * such that A[k] * 2 = A[i] + A[j] * <p> * Apply these 3 following changes a beautiful array, * we can get a new beautiful array * <p> * <p> * 1. Deletion * Easy to prove. * <p> * 2. Addition * If we have A[k] * 2 != A[i] + A[j], * (A[k] + x) * 2 = A[k] * 2 + 2x != A[i] + A[j] + 2x = (A[i] + x) + (A[j] + x) * <p> * E.g: [1,3,2] + 1 = [2,4,3]. * <p> * 3. Multiplication * If we have A[k] * 2 != A[i] + A[j], * for any x != 0, * (A[k] * x) * 2 = A[k] * 2 * x != (A[i] + A[j]) * x = (A[i] * x) + (A[j] * x) * <p> * E.g: [1,3,2] * 2 = [2,6,4] * <p> * <p> * Explanation * With the observations above, we can easily construct any beautiful array. * Assume we have a beautiful array A with length N * <p> * A1 = A * 2 - 1 is beautiful with only odds from 1 to N * 2 -1 * A2 = A * 2 is beautiful with only even from 2 to N * 2 * B = A1 + A2 beautiful array with length N * 2 * <p> * E.g: * <p> * A = [2, 1, 4, 5, 3] * A1 = [3, 1, 7, 9, 5] * A2 = [4, 2, 8, 10, 6] * B = A1 + A2 = [3, 1, 7, 9, 5, 4, 2, 8, 10, 6] * <p> * Time Complexity: * I have iteration version here O(N) * Naive recursion is O(NlogN) * Recursion with one call or with cache is O(N) * * @param N * @return */ public int[] beautifulArray(int N) { ArrayList<Integer> res = new ArrayList<>(); res.add(1); while (res.size() < N) { ArrayList<Integer> tmp = new ArrayList<>(); for (int i : res) if (i * 2 - 1 <= N) tmp.add(i * 2 - 1); for (int i : res) if (i * 2 <= N) tmp.add(i * 2); res = tmp; } return res.stream().mapToInt(i -> i).toArray(); } }
[ "1430701240@qq.com" ]
1430701240@qq.com
25a3b6250d480a539b2662eb8855c0c69ba72b28
e1b1ce58fb1277b724022933176f0809169682d9
/sources/fr/pcsoft/wdjava/core/application/C0650i.java
6df508076a45d225a378edbf41df6785c04d1cce
[]
no_license
MR-116/com.masociete.projet_mobile-1_source_from_JADX
a5949c814f0f77437f74b7111ea9dca17140f2ea
6cd80095cd68cb9392e6e067f26993ab2bf08bb2
refs/heads/master
2020-04-11T15:00:54.967026
2018-12-15T06:33:57
2018-12-15T06:33:57
161,873,466
0
0
null
null
null
null
UTF-8
Java
false
false
801
java
package fr.pcsoft.wdjava.core.application; import fr.pcsoft.wdjava.core.WDObjet; import fr.pcsoft.wdjava.core.allocation.IWDAllocateur; import fr.pcsoft.wdjava.core.erreur.WDErreurManager; /* renamed from: fr.pcsoft.wdjava.core.application.i */ final class C0650i implements IWDAllocateur { final Class val$classe; C0650i(Class cls) { this.val$classe = cls; } public WDObjet creerInstance() { try { return (WDObjet) this.val$classe.newInstance(); } catch (Throwable e) { WDErreurManager.m2888b(e); return null; } } public Class getClasseWD() { return this.val$classe; } public int getTypeWL() { return 111; } public boolean isDynamique() { return false; } }
[ "Entrepreneursmalaysia1@gmail.com" ]
Entrepreneursmalaysia1@gmail.com
e80b891e3e3c049ec0582b84c2ea3d390dd6177b
522370099e803b14d016abaa2db03490284f20eb
/src/main/java/com/tencentcloudapi/mps/v20190612/models/CreateWorkflowRequest.java
3d3d3e2ad7ea292d76a254ef9b5f8765c64c76fe
[ "Apache-2.0" ]
permissive
diaolingzc/tencentcloud-sdk-java
65277f6631d9d50cfc361f3f8b9401b689e0fbeb
677fa638f037d69963751d48f055997911572c77
refs/heads/master
2020-09-03T09:42:09.778129
2019-11-05T11:42:29
2019-11-05T11:42:29
219,438,072
0
0
Apache-2.0
2019-11-04T07:04:16
2019-11-04T07:04:16
null
UTF-8
Java
false
false
7,506
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.tencentcloudapi.mps.v20190612.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class CreateWorkflowRequest extends AbstractModel{ /** * 工作流名称,最多128字符。同一个用户该名称唯一。 */ @SerializedName("WorkflowName") @Expose private String WorkflowName; /** * 工作流绑定的触发规则,当上传视频命中该规则到该对象时即触发工作流。 */ @SerializedName("Trigger") @Expose private WorkflowTrigger Trigger; /** * 视频处理的文件输出存储位置。不填则继承 Trigger 中的存储位置。 */ @SerializedName("OutputStorage") @Expose private TaskOutputStorage OutputStorage; /** * 视频处理生成的文件输出的目标目录,如`/movie/201907/`。如果不填,表示与触发文件所在的目录一致。 */ @SerializedName("OutputDir") @Expose private String OutputDir; /** * 视频处理类型任务参数。 */ @SerializedName("MediaProcessTask") @Expose private MediaProcessTaskInput MediaProcessTask; /** * 任务的事件通知配置,不填代表不获取事件通知。 */ @SerializedName("TaskNotifyConfig") @Expose private TaskNotifyConfig TaskNotifyConfig; /** * 工作流的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。 */ @SerializedName("TaskPriority") @Expose private Long TaskPriority; /** * 获取工作流名称,最多128字符。同一个用户该名称唯一。 * @return WorkflowName 工作流名称,最多128字符。同一个用户该名称唯一。 */ public String getWorkflowName() { return this.WorkflowName; } /** * 设置工作流名称,最多128字符。同一个用户该名称唯一。 * @param WorkflowName 工作流名称,最多128字符。同一个用户该名称唯一。 */ public void setWorkflowName(String WorkflowName) { this.WorkflowName = WorkflowName; } /** * 获取工作流绑定的触发规则,当上传视频命中该规则到该对象时即触发工作流。 * @return Trigger 工作流绑定的触发规则,当上传视频命中该规则到该对象时即触发工作流。 */ public WorkflowTrigger getTrigger() { return this.Trigger; } /** * 设置工作流绑定的触发规则,当上传视频命中该规则到该对象时即触发工作流。 * @param Trigger 工作流绑定的触发规则,当上传视频命中该规则到该对象时即触发工作流。 */ public void setTrigger(WorkflowTrigger Trigger) { this.Trigger = Trigger; } /** * 获取视频处理的文件输出存储位置。不填则继承 Trigger 中的存储位置。 * @return OutputStorage 视频处理的文件输出存储位置。不填则继承 Trigger 中的存储位置。 */ public TaskOutputStorage getOutputStorage() { return this.OutputStorage; } /** * 设置视频处理的文件输出存储位置。不填则继承 Trigger 中的存储位置。 * @param OutputStorage 视频处理的文件输出存储位置。不填则继承 Trigger 中的存储位置。 */ public void setOutputStorage(TaskOutputStorage OutputStorage) { this.OutputStorage = OutputStorage; } /** * 获取视频处理生成的文件输出的目标目录,如`/movie/201907/`。如果不填,表示与触发文件所在的目录一致。 * @return OutputDir 视频处理生成的文件输出的目标目录,如`/movie/201907/`。如果不填,表示与触发文件所在的目录一致。 */ public String getOutputDir() { return this.OutputDir; } /** * 设置视频处理生成的文件输出的目标目录,如`/movie/201907/`。如果不填,表示与触发文件所在的目录一致。 * @param OutputDir 视频处理生成的文件输出的目标目录,如`/movie/201907/`。如果不填,表示与触发文件所在的目录一致。 */ public void setOutputDir(String OutputDir) { this.OutputDir = OutputDir; } /** * 获取视频处理类型任务参数。 * @return MediaProcessTask 视频处理类型任务参数。 */ public MediaProcessTaskInput getMediaProcessTask() { return this.MediaProcessTask; } /** * 设置视频处理类型任务参数。 * @param MediaProcessTask 视频处理类型任务参数。 */ public void setMediaProcessTask(MediaProcessTaskInput MediaProcessTask) { this.MediaProcessTask = MediaProcessTask; } /** * 获取任务的事件通知配置,不填代表不获取事件通知。 * @return TaskNotifyConfig 任务的事件通知配置,不填代表不获取事件通知。 */ public TaskNotifyConfig getTaskNotifyConfig() { return this.TaskNotifyConfig; } /** * 设置任务的事件通知配置,不填代表不获取事件通知。 * @param TaskNotifyConfig 任务的事件通知配置,不填代表不获取事件通知。 */ public void setTaskNotifyConfig(TaskNotifyConfig TaskNotifyConfig) { this.TaskNotifyConfig = TaskNotifyConfig; } /** * 获取工作流的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。 * @return TaskPriority 工作流的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。 */ public Long getTaskPriority() { return this.TaskPriority; } /** * 设置工作流的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。 * @param TaskPriority 工作流的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。 */ public void setTaskPriority(Long TaskPriority) { this.TaskPriority = TaskPriority; } /** * 内部实现,用户禁止调用 */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "WorkflowName", this.WorkflowName); this.setParamObj(map, prefix + "Trigger.", this.Trigger); this.setParamObj(map, prefix + "OutputStorage.", this.OutputStorage); this.setParamSimple(map, prefix + "OutputDir", this.OutputDir); this.setParamObj(map, prefix + "MediaProcessTask.", this.MediaProcessTask); this.setParamObj(map, prefix + "TaskNotifyConfig.", this.TaskNotifyConfig); this.setParamSimple(map, prefix + "TaskPriority", this.TaskPriority); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
81981f6ef8dc212badc6fd6246028bf773488d0a
83d56024094d15f64e07650dd2b606a38d7ec5f1
/Construccion/PROYECTO.SICC/MAE/ENTIDADES/src/es/indra/sicc/entidades/mae/ConfiguracionCamposLocal.java
6221e8b68ec493199e00646d7a1321c8d36f7e60
[]
no_license
cdiglesias/SICC
bdeba6af8f49e8d038ef30b61fcc6371c1083840
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
refs/heads/master
2021-01-19T19:45:14.788800
2016-04-07T16:20:51
2016-04-07T16:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,319
java
package es.indra.sicc.entidades.mae; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Column; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import java.io.Serializable; @Entity @Table(name="MAE_CONFI_CAMPO") @NamedQueries({ @NamedQuery(name="ConfiguracionCamposLocal.FindAll", query="SELECT OBJECT(o) FROM ConfiguracionCamposLocal o") }) public class ConfiguracionCamposLocal implements Serializable { public ConfiguracionCamposLocal() {} public ConfiguracionCamposLocal(Long oid, Long pais_oid_pais, Long atre_oid_atri_espe, String val_defe, Long ind_obli, Long ind_modi) { this.oid=oid; this.pais_oid_pais = pais_oid_pais; this.atre_oid_atri_espe = atre_oid_atri_espe; this.val_defe = val_defe; this.ind_obli = ind_obli; this.ind_modi = ind_modi; } @Id @Column(name="OID_CONF_CAMP") private Long oid; @Column(name="PAIS_OID_PAIS") private Long pais_oid_pais; @Column(name="SBTI_OID_SUBT_CLIE") private Long sbti_oid_subt_clie; @Column(name="ATRE_OID_ATRI_ESPE") private Long atre_oid_atri_espe; @Column(name="VAL_DEFE") private String val_defe; @Column(name="IND_OBLI") private Long ind_obli; @Column(name="IND_MODI") private Long ind_modi; public Long getOid() {return oid;} public Long getPrimaryKey() {return oid;} public Long getPais_oid_pais() {return pais_oid_pais;} public void setPais_oid_pais(Long pais_oid_pais){this.pais_oid_pais=pais_oid_pais;} public Long getSbti_oid_subt_clie() {return sbti_oid_subt_clie;} public void setSbti_oid_subt_clie(Long sbti_oid_subt_clie){this.sbti_oid_subt_clie=sbti_oid_subt_clie;} public Long getAtre_oid_atri_espe() {return atre_oid_atri_espe;} public void setAtre_oid_atri_espe(Long atre_oid_atri_espe){this.atre_oid_atri_espe=atre_oid_atri_espe;} public String getVal_defe() {return val_defe;} public void setVal_defe(String val_defe){this.val_defe=val_defe;} public Long getInd_obli() {return ind_obli;} public void setInd_obli(Long ind_obli){this.ind_obli=ind_obli;} public Long getInd_modi() {return ind_modi;} public void setInd_modi(Long ind_modi){this.ind_modi=ind_modi;} }
[ "hp.vega@hotmail.com" ]
hp.vega@hotmail.com
783044ec89b2a846a605a3ef0400655e16f79514
0c45b2012ee2715b0b725e764fbfc9bc40109936
/src/br/inf/portalfiscal/nfe/cce/proccce/TEnvEvento.java
bab2a228882147b4764331016a3f0ea238202ab6
[]
no_license
roneison85/NFeLib4.00
9d5c50bd0011a624dff1279e15cc4d31257ade0e
d8bcb84aaca63c428cc8ca175330e77809b7f2c7
refs/heads/master
2021-12-10T07:18:43.952886
2021-12-01T10:44:19
2021-12-01T10:44:19
203,785,144
0
0
null
null
null
null
UTF-8
Java
false
false
3,827
java
// // Este arquivo foi gerado pela Arquitetura JavaTM para Implementa��o de Refer�ncia (JAXB) de Bind XML, v2.2.8-b130911.1802 // Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Todas as modifica��es neste arquivo ser�o perdidas ap�s a recompila��o do esquema de origem. // Gerado em: 2017.07.13 �s 09:54:11 AM BRT // package br.inf.portalfiscal.nfe.cce.proccce; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Tipo Lote de Envio * * <p>Classe Java de TEnvEvento complex type. * * <p>O seguinte fragmento do esquema especifica o conte�do esperado contido dentro desta classe. * * <pre> * &lt;complexType name="TEnvEvento"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="idLote"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;whiteSpace value="preserve"/> * &lt;pattern value="[0-9]{1,15}"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="evento" type="{http://www.portalfiscal.inf.br/nfe}TEvento" maxOccurs="20"/> * &lt;/sequence> * &lt;attribute name="versao" use="required" type="{http://www.portalfiscal.inf.br/nfe}TVerEnvEvento" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TEnvEvento", namespace = "http://www.portalfiscal.inf.br/nfe", propOrder = { "idLote", "evento" }) public class TEnvEvento { @XmlElement(required = true) protected String idLote; @XmlElement(required = true) protected List<TEvento> evento; @XmlAttribute(name = "versao", required = true) protected String versao; /** * Obt�m o valor da propriedade idLote. * * @return * possible object is * {@link String } * */ public String getIdLote() { return idLote; } /** * Define o valor da propriedade idLote. * * @param value * allowed object is * {@link String } * */ public void setIdLote(String value) { this.idLote = value; } /** * Gets the value of the evento property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the evento property. * * <p> * For example, to add a new item, do as follows: * <pre> * getEvento().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link TEvento } * * */ public List<TEvento> getEvento() { if (evento == null) { evento = new ArrayList<TEvento>(); } return this.evento; } /** * Obt�m o valor da propriedade versao. * * @return * possible object is * {@link String } * */ public String getVersao() { return versao; } /** * Define o valor da propriedade versao. * * @param value * allowed object is * {@link String } * */ public void setVersao(String value) { this.versao = value; } }
[ "roneison.machado@gmail.com" ]
roneison.machado@gmail.com
68fde04cd5a9546bb682f04f477f03a108d4ce2e
144c99466cfb085f2015ec2dc2e67c54f1af1443
/guyue-hive-source/src/main/java/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/IntervalDayTimeColAddDateScalar.java
cf5cf1736efe034d39f897004a8c4a3d5d264e5f
[]
no_license
guyuetftb/guyue-parents
8c999c9ee510c141f4ddf31ee98d74e00d9287c7
d15bd256e70c10819f86d018d7a3e7cc5c513005
refs/heads/master
2023-05-24T08:18:48.921990
2023-05-15T03:03:42
2023-05-15T03:03:42
132,435,187
3
3
null
2022-11-16T08:28:50
2018-05-07T09:05:27
Java
UTF-8
Java
false
false
5,506
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.ql.exec.vector.expressions.gen; import java.sql.Timestamp; import org.apache.hadoop.hive.common.type.HiveIntervalDayTime; import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression; import org.apache.hadoop.hive.ql.exec.vector.TimestampColumnVector; import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch; import org.apache.hadoop.hive.ql.exec.vector.expressions.NullUtil; import org.apache.hadoop.hive.ql.exec.vector.VectorExpressionDescriptor; import org.apache.hadoop.hive.ql.exec.vector.*; import org.apache.hadoop.hive.ql.util.DateTimeMath; import org.apache.hadoop.hive.serde2.io.DateWritable; /** * Generated from template TimestampColumnArithmeticDateScalar.txt, which covers binary arithmetic * expressions between a column and a scalar. */ public class IntervalDayTimeColAddDateScalar extends VectorExpression { private static final long serialVersionUID = 1L; private int colNum; private Timestamp value; private int outputColumn; private DateTimeMath dtm = new DateTimeMath(); public IntervalDayTimeColAddDateScalar(int colNum, long value, int outputColumn) { this.colNum = colNum; this.value = new Timestamp(0); this.value.setTime(DateWritable.daysToMillis((int) value)); this.outputColumn = outputColumn; } public IntervalDayTimeColAddDateScalar() { } @Override public void evaluate(VectorizedRowBatch batch) { if (childExpressions != null) { super.evaluateChildren(batch); } // Input #1 is type interval_day_time. IntervalDayTimeColumnVector inputColVector1 = (IntervalDayTimeColumnVector) batch.cols[colNum]; // Output is type timestamp. TimestampColumnVector outputColVector = (TimestampColumnVector) batch.cols[outputColumn]; int[] sel = batch.selected; boolean[] inputIsNull = inputColVector1.isNull; boolean[] outputIsNull = outputColVector.isNull; outputColVector.noNulls = inputColVector1.noNulls; outputColVector.isRepeating = inputColVector1.isRepeating; int n = batch.size; // return immediately if batch is empty if (n == 0) { return; } if (inputColVector1.isRepeating) { dtm.add( inputColVector1.asScratchIntervalDayTime(0), value, outputColVector.getScratchTimestamp()); outputColVector.setFromScratchTimestamp(0); // Even if there are no nulls, we always copy over entry 0. Simplifies code. outputIsNull[0] = inputIsNull[0]; } else if (inputColVector1.noNulls) { if (batch.selectedInUse) { for(int j = 0; j != n; j++) { int i = sel[j]; dtm.add( inputColVector1.asScratchIntervalDayTime(i), value, outputColVector.getScratchTimestamp()); outputColVector.setFromScratchTimestamp(i); } } else { for(int i = 0; i != n; i++) { dtm.add( inputColVector1.asScratchIntervalDayTime(i), value, outputColVector.getScratchTimestamp()); outputColVector.setFromScratchTimestamp(i); } } } else /* there are nulls */ { if (batch.selectedInUse) { for(int j = 0; j != n; j++) { int i = sel[j]; dtm.add( inputColVector1.asScratchIntervalDayTime(i), value, outputColVector.getScratchTimestamp()); outputColVector.setFromScratchTimestamp(i); outputIsNull[i] = inputIsNull[i]; } } else { for(int i = 0; i != n; i++) { dtm.add( inputColVector1.asScratchIntervalDayTime(i), value, outputColVector.getScratchTimestamp()); outputColVector.setFromScratchTimestamp(i); } System.arraycopy(inputIsNull, 0, outputIsNull, 0, n); } } NullUtil.setNullOutputEntriesColScalar(outputColVector, batch.selectedInUse, sel, n); } @Override public int getOutputColumn() { return outputColumn; } @Override public String getOutputType() { return "timestamp"; } @Override public String vectorExpressionParameters() { return "col " + colNum + ", val " + value.toString(); } @Override public VectorExpressionDescriptor.Descriptor getDescriptor() { return (new VectorExpressionDescriptor.Builder()) .setMode( VectorExpressionDescriptor.Mode.PROJECTION) .setNumArguments(2) .setArgumentTypes( VectorExpressionDescriptor.ArgumentType.getType("interval_day_time"), VectorExpressionDescriptor.ArgumentType.getType("date")) .setInputExpressionTypes( VectorExpressionDescriptor.InputExpressionType.COLUMN, VectorExpressionDescriptor.InputExpressionType.SCALAR).build(); } }
[ "lipeng02@missfresh.cn" ]
lipeng02@missfresh.cn
5b192c26da52380f43dd3e8133e78659b0b89f0e
895ea02e9fbbbddccd2f550769600608a5ce26bf
/CoreImportExport/src/au/gov/asd/tac/constellation/importexport/delimited/ActionPane.java
67d2206723e07ca448930756d455418b7018e0d2
[ "Apache-2.0" ]
permissive
sol695510/constellation
8e26a739a8ae09755f1ff2061206d13566d8b432
9ab9e0cc3a0bb673204d74d5b017453a882845a0
refs/heads/master
2020-12-19T13:40:11.523350
2020-03-16T22:31:41
2020-03-16T22:31:41
226,787,694
1
0
Apache-2.0
2019-12-20T00:16:47
2019-12-09T04:54:54
null
UTF-8
Java
false
false
2,195
java
/* * Copyright 2010-2019 Australian Signals Directorate * * 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 au.gov.asd.tac.constellation.importexport.delimited; import au.gov.asd.tac.constellation.pluginframework.PluginException; import java.io.IOException; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; /** * * @author sirius */ public class ActionPane extends BorderPane { private final ImportController importController; public ActionPane(final ImportController importController) { this.importController = importController; HBox runBox = new HBox(); runBox.setSpacing(5); runBox.setPadding(new Insets(5)); setRight(runBox); Button cancelButton = new Button("Cancel"); cancelButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { importController.cancelImport(); } }); Button importButton = new Button("Import"); importButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { try { importController.processImport(); } catch (IOException ex) { ex.printStackTrace(); } catch (InterruptedException ex) { } catch (PluginException ex) { } } }); runBox.getChildren().addAll(cancelButton, importButton); } }
[ "39325530+arcturus2@users.noreply.github.com" ]
39325530+arcturus2@users.noreply.github.com
48cfa9ca5a687544b532d0f5b433920c81cb5dcf
5048d80229c1f1830f969808c4c81a0949436eb4
/client_android/src/main/java/com/eyunda/third/domain/enumeric/CollectCode.java
68a2ae60594abf1e3cd531648e99319564e567cc
[]
no_license
leif228/client_android2
d1d1a13c4e7fcc8161de514c8a00e5947b18754e
b8b30b33d7544a3eca642d14cc2a2dd89d7db12e
refs/heads/master
2022-01-07T01:48:18.000519
2019-05-08T06:14:59
2019-05-08T06:14:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
299
java
package com.eyunda.third.domain.enumeric; public enum CollectCode { mySelfShips("我的船舶"), collectShips("收藏船舶"); private String description; CollectCode(String description){ this.description = description; } public String getDescription() { return description; } }
[ "123465714@qq.com" ]
123465714@qq.com
ce85b7243baf5c84c085910673a68524b5e14b64
eb06eb728146187562707f17fe890205aec811d8
/tnt4j-streams-core/src/main/java/com/jkoolcloud/tnt4j/streams/configure/OutputProperties.java
c4e40f77a138fa29b5aa7c65cf44cdb9d5fa4fd9
[ "Apache-2.0" ]
permissive
oustoyev/tnt4j-streams
f852db4e523b0eb655ff1e8541c4ae9bc6275032
3c8cd793f901548d5794802ef98e1b821861b405
refs/heads/master
2020-05-02T21:45:46.367080
2019-03-28T10:45:10
2019-03-28T10:45:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,144
java
/* * Copyright 2014-2018 JKOOL, LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.jkoolcloud.tnt4j.streams.configure; /** * Lists predefined property names used by TNT4-Streams outputs. * * @version $Revision: 1 $ */ public interface OutputProperties { /** * Constant for name of built-in {@value} property. */ String PROP_TNT4J_CONFIG_FILE = "TNT4JConfigFile"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_TNT4J_PROPERTY = "TNT4JProperty"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_RESOLVE_SERVER = "ResolveServerFromDNS"; // NON-NLS /** * Constant for name of built-in {@value} property. * * @deprecated use {@link #PROP_SPLIT_RELATIVES} instead */ @Deprecated String PROP_TURN_OUT_CHILDREN = "TurnOutActivityChildren"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_SPLIT_RELATIVES = "SplitRelatives"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_BUILD_FQN_FROM_DATA = "BuildSourceFQNFromStreamedData"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_TNT4J_CONFIG_ZK_NODE = "TNT4JConfigZKNode"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_SOURCE_FQN = "SourceFQN"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_RETRY_STATE_CHECK = "RetryStateCheck"; // NON-NLS /** * Constant for name of built-in {@value} property. */ String PROP_SEND_STREAM_STATES = "SendStreamStates"; // NON-NLS }
[ "andrius.kausinis@singleton-labs.lt" ]
andrius.kausinis@singleton-labs.lt
a2c1a5aa0b4e5bb3f7153b001e7a355bbdbbb560
ee07486efc3e6e648922434d9fac054ffd7ab884
/qeweb-scms/scms/subprojects/vendormodule/src/main/java/com/qeweb/scm/vendormodule/vo/StatisticsVendorCountTransfer.java
49d38318f544300facece6ff48ca98238c3ef54a
[]
no_license
SrmSystem/SRM-SYETEM
b9c1c8dde92199cefdde99248850172edb0d9607
0160dc28acae0e5f9782c02cc37c14bb6a7f4cae
refs/heads/master
2021-08-31T04:39:57.497664
2017-12-20T11:14:51
2017-12-20T11:14:51
114,876,126
0
1
null
null
null
null
UTF-8
Java
false
false
2,044
java
package com.qeweb.scm.vendormodule.vo; import com.qeweb.scm.basemodule.annotation.Column; import com.qeweb.scm.basemodule.annotation.ExcelCol; import com.qeweb.scm.basemodule.annotation.ExcelTransfer; @ExcelTransfer(start=1, describe = "各维度供应商数量统计") public class StatisticsVendorCountTransfer { @ExcelCol(column = Column.B,desc="省份") private String province; @ExcelCol(column = Column.C,desc="供应商性质") private String phase; @ExcelCol(column = Column.D,desc="供应商分类") private String classify; @ExcelCol(column = Column.E,desc="系统") private String materialSystem; @ExcelCol(column = Column.F,desc="零部件类别") private String partsType; @ExcelCol(column = Column.G,desc="业务类型") private String bussinessType; @ExcelCol(column = Column.H,desc="工厂供货距离") private String distance; @ExcelCol(column = Column.I,desc="供应商总数") private String totalCount; public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } public String getPhase() { return phase; } public void setPhase(String phase) { this.phase = phase; } public String getClassify() { return classify; } public void setClassify(String classify) { this.classify = classify; } public String getMaterialSystem() { return materialSystem; } public void setMaterialSystem(String materialSystem) { this.materialSystem = materialSystem; } public String getPartsType() { return partsType; } public void setPartsType(String partsType) { this.partsType = partsType; } public String getBussinessType() { return bussinessType; } public void setBussinessType(String bussinessType) { this.bussinessType = bussinessType; } public String getDistance() { return distance; } public void setDistance(String distance) { this.distance = distance; } public String getTotalCount() { return totalCount; } public void setTotalCount(String totalCount) { this.totalCount = totalCount; } }
[ "60053060@aac.com" ]
60053060@aac.com
66510a4e035f02d1293cd8c241c977d87f8cd927
c316afa4b2eb430e7a212124a1efb2527f819441
/src/com/darkguardsman/helpers/StringHelpers.java
68dec3c48dc95e7b0be33ec96bed39f8321044d8
[]
no_license
DarkGuardsman/AdventOfCode2018
bc00857d2520ac15c5fabd5f86f99fa02549b678
3f01be2800d51078d5cc67f4db2568f6278a76e4
refs/heads/master
2020-04-09T02:57:23.604303
2018-12-26T21:14:47
2018-12-26T21:14:47
159,961,814
0
0
null
null
null
null
UTF-8
Java
false
false
502
java
package com.darkguardsman.helpers; /** * @see <a href="https://github.com/BuiltBrokenModding/VoltzEngine/blob/development/license.md">License</a> for what you can and can't do with the code. * Created by Dark(DarkGuardsman, Robert) on 12/18/18. */ public class StringHelpers { public static String padRight(String s, int n) { return String.format("%1$-" + n + "s", s); } public static String padLeft(String s, int n) { return String.format("%1$" + n + "s", s); } }
[ "rseifert.phone@gmail.com" ]
rseifert.phone@gmail.com
9ee973623d61dd7565a1bbab4641417ca6223e8b
f350ccfc97a33237732c9d3314d5f2f4d8a206cd
/src/main/java/com/edgeMapper/zigbeeMapper/util/GateWayUtil.java
debafbbec574085bbdcf0077171a604611f8eaaf
[]
no_license
YanChuang2020-815/zigbeeMapper
f9001ba606a824c579fccb1a67d75a8602666e3d
f67d0d6e2bab5b1affba538de90d6b4a9558326a
refs/heads/master
2022-12-02T23:32:10.727617
2020-08-23T05:40:31
2020-08-23T05:40:31
279,628,691
0
0
null
null
null
null
UTF-8
Java
false
false
1,264
java
package com.edgeMapper.zigbeeMapper.util; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * Created by rongshuai on 2020/7/15 14:12 */ public class GateWayUtil { private static Map<String, Channel> channelMap = new ConcurrentHashMap<String, Channel>(); public static Map<String, Channel> getChannelMap() { return channelMap; } public static String getIPString(ChannelHandlerContext ctx) { String ipString = ""; String socketString = ctx.channel().remoteAddress().toString(); ipString = socketString.substring(1); return ipString; } public static String byte2HexStr(byte[] b) { String stmp = ""; StringBuilder sb = new StringBuilder(""); for (int n = 0; n < b.length; n++) { stmp = Integer.toHexString(b[n] & 0xFF); sb.append((stmp.length() == 1) ? "0" + stmp : stmp); // sb.append(" "); } return sb.toString().toUpperCase().trim(); } public static int dataBytesToInt(byte[] src) { int value; value = (int) ((src[0] & 0xFF) | ((src[1] & 0xFF) << 8)); return value; } }
[ "1076061276@qq.com" ]
1076061276@qq.com
afde394f11ced9627b52b776302661a5548c644d
e05a290f18b0ae8089709f4fbe92f3f49042daee
/kernel/kernel-core/src/main/java/io/mosip/kernel/core/idgenerator/spi/UinGenerator.java
ec498019af46df3a437ed6af132c85f3bf99f1a9
[]
no_license
Aswin-MN/personal
25e6d6bf306e61a236d0ea886d33ea621bb7dc56
d096fa6ab16e13a66a82be0325cf4d117d3669f3
refs/heads/master
2021-10-11T16:24:08.604019
2019-01-28T12:52:41
2019-01-28T12:52:41
166,238,628
0
1
null
null
null
null
UTF-8
Java
false
false
327
java
package io.mosip.kernel.core.idgenerator.spi; /** * Interface having a function to generate an Id * * @author Dharmesh Khandelwal * @since 1.0.0 * * @param <T> * Type of Id */ public interface UinGenerator<T> { /** * Function to generate an Id * * @return The generated id */ T generateId(); }
[ "info@mosip.io" ]
info@mosip.io
8286b2ee24e6c6f1446ffc42bf535941bd104b0e
5ee062b1fe1fcfd1b356c7e193314798284be16e
/app/src/main/java/com/zhanghao/gankio/ui/adapter/SearchResultAdapter.java
f5d7c5580c4b9ccd8c1a8f037ba0cdb46b35f896
[]
no_license
mask-hao/MyGank
2ffc1099805396979ebc278ce2abae37fed8fb9a
e6714bb3c49307626948be885fdac64aed63733b
refs/heads/master
2021-01-20T16:17:13.089629
2017-07-03T12:52:55
2017-07-03T12:52:55
90,830,111
103
16
null
null
null
null
UTF-8
Java
false
false
936
java
package com.zhanghao.gankio.ui.adapter; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.zhanghao.gankio.R; import com.zhanghao.gankio.entity.GankSearchItem; import java.util.List; /** * Created by zhanghao on 2017/5/5. */ public class SearchResultAdapter extends BaseQuickAdapter<GankSearchItem,BaseViewHolder>{ private static final String TAG = "SearchResultAdapter"; public SearchResultAdapter(int layoutResId, List<GankSearchItem> data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, GankSearchItem item) { String who=item.getWho(); String type=item.getType(); String title=item.getTitle(); helper.setText(R.id.gank_search_title_tv,title); helper.setText(R.id.gank_search_who_tv,who); helper.setText(R.id.gank_search_type_tv,type); } }
[ "281079145@qq.com" ]
281079145@qq.com
30a6a11510a5e8d1c7580db3b7723700b3dfa6f8
e1095749b78bb767a8fe558e46ba0b7010ebd547
/src/main/java/com/robertx22/mine_and_slash/loot/generators/SkillGemLootGen.java
52c2ed1fd3b739bbf3bb1cf18979d6511cbdd00d
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
RobertSkalko/Mine-and-Slash
6d1148fa3e626311c2238d314f8c6c5e30c7c00c
e16832ccd7ffc438b562202ecde39a324732d7f5
refs/heads/1.15
2023-07-03T18:47:05.628869
2020-07-17T21:40:02
2020-07-17T21:40:02
113,667,576
44
41
NOASSERTION
2022-10-28T01:56:01
2017-12-09T12:28:35
Java
UTF-8
Java
false
false
937
java
package com.robertx22.mine_and_slash.loot.generators; import com.robertx22.mine_and_slash.config.forge.ModConfig; import com.robertx22.mine_and_slash.loot.LootInfo; import com.robertx22.mine_and_slash.loot.blueprints.SkillGemBlueprint; import com.robertx22.mine_and_slash.uncommon.enumclasses.LootType; import net.minecraft.item.ItemStack; public class SkillGemLootGen extends BaseLootGen<SkillGemBlueprint> { public SkillGemLootGen(LootInfo info) { super(info); } @Override public float baseDropChance() { return ModConfig.INSTANCE.DropRates.SKILL_GEM_DROPRATE.get() .floatValue(); } @Override public LootType lootType() { return LootType.SkillGem; } @Override public ItemStack generateOne() { SkillGemBlueprint blueprint = new SkillGemBlueprint(info.level); ItemStack stack = blueprint.createStack(); return stack; } }
[ "treborx555@gmail.com" ]
treborx555@gmail.com
25b81f7326982ea4036f0fa81346d36b9317de42
b2d7b0517bc16e6a0cf281b1424178413b55b947
/java-basic/src/main/java/ch21/c/Test02.java
dabbb91d983db89d0e9290f8aa47c679f55aab15
[]
no_license
gwanghosong/bitcamp-java-2018-12
5ea3035c1beb5b9ce7c5348503daf5ed72304dc9
8782553c4505c5943db0009b6a2ebf742c84e38c
refs/heads/master
2021-08-06T20:30:07.181054
2019-06-26T16:18:50
2019-06-26T16:18:50
163,650,672
0
0
null
2020-04-30T06:28:29
2018-12-31T08:00:40
Java
UTF-8
Java
false
false
1,392
java
// 애플리케이션 예외의 종류: Exception 계열의 예외처리 package ch21.c; import java.lang.reflect.Constructor; import java.util.Scanner; public class Test02 { public static void main(String[] args) { // Exception 계열의 예외 방법 // 1) try ~ catch로 예외 받기 // try { // 예외 발생 코드 // } catch (예외 파라미터) { // 예외 처리 코드 // } // 2) 호출자에게 예외 처리를 떠넘기기 // void 메서드() throws 예외 클래스명, 예외 클래스명, ... { // 예외가 발생할 수 있는 코드 // } // // '방법1' 적용 // try ~ catch 로 예외 처리하기 try { Scanner keyboard = new Scanner(System.in); Class<?> clazz = Class.forName("ch21.c.PlusCommand2"); Constructor<?> constructor = clazz.getConstructor(Scanner.class); Command command = (Command) constructor.newInstance(keyboard); command.execute(); } catch (ClassNotFoundException e) { System.out.println("해당 클래스를 찾지 못했습니다."); } catch (NoSuchMethodException e) { System.out.println("해당 생성자를 찾지 못했습니다."); } catch (ReflectiveOperationException e) { System.out.println("기타 예외 발생!"); } System.out.println("종료!"); } }
[ "gwanghosong91@gmail.com" ]
gwanghosong91@gmail.com
9ee5b0f80366cfd778deceef57df179894c1eeb7
b85d0ce8280cff639a80de8bf35e2ad110ac7e16
/com/fossil/dcg.java
7f1f4ec480583605e198b50ed0d4f2ea6f1a632a
[]
no_license
MathiasMonstrey/fosil_decompiled
3d90433663db67efdc93775145afc0f4a3dd150c
667c5eea80c829164220222e8fa64bf7185c9aae
refs/heads/master
2020-03-19T12:18:30.615455
2018-06-07T17:26:09
2018-06-07T17:26:09
136,509,743
1
0
null
null
null
null
UTF-8
Java
false
false
2,060
java
package com.fossil; import com.fossil.wearables.fsl.contact.ContactGroup; import com.portfolio.platform.ui.notifications.domain.model.AppWrapper; import com.portfolio.platform.ui.notifications.domain.model.ContactWrapper; import java.util.List; public class dcg { interface C2646a extends cjs { void mo2295A(int i, boolean z); void mo2296B(int i, boolean z); void mo2297C(int i, boolean z); void mo2298a(int i, ContactWrapper contactWrapper); void mo2299a(ContactWrapper contactWrapper, int i); void mo2300a(ContactWrapper contactWrapper, boolean z, int i); void alA(); void alB(); void alC(); void alz(); void bY(int i, int i2); void bZ(int i, int i2); void ca(int i, int i2); void kt(int i); void ku(int i); void kv(int i); void kw(int i); void kx(int i); void ky(int i); void kz(int i); void onCancel(); void save(); } public interface C2647b extends cjt<C2646a> { void mo2256a(ContactWrapper contactWrapper, int i, int i2, int i3); void mo2257a(String str, int i, int i2, int i3); void mo2258a(List<ContactGroup> list, int i, List<ContactWrapper> list2); void ac(List<Object> list); void alD(); void alE(); void alF(); void alG(); void alH(); void alI(); void alJ(); void alK(); void alL(); void alM(); void alN(); void alO(); void alP(); void mo2273b(int i, Object obj); void cF(boolean z); void cancel(); void cb(int i, int i2); void cc(int i, int i2); void mo2281g(List<AppWrapper> list, int i); void iq(String str); void kA(int i); void kB(int i); void kC(int i); void kD(int i); void kE(int i); void kF(int i); void kG(int i); void kH(int i); } }
[ "me@mathiasmonstrey.be" ]
me@mathiasmonstrey.be
46edc80f1fae3b49d7aa5008f6be918e0f9a7db8
b9861a0fc815b77551d81010fa890ef44e9ba1cc
/admin/src/main/java/com/baidu/yun/core/filter/RangeRestrictFilter.java
ec3bc20d2889de62e66e61724a35b0705553b4c7
[]
no_license
happyjianguo/hwp
6dbc5223bb19534ac9d61b3eae8009038be4e1aa
6bf80e34f3363f48af039e92931fbf3c22daae50
refs/heads/master
2022-12-01T01:57:04.680195
2020-08-09T00:20:00
2020-08-09T00:20:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package com.baidu.yun.core.filter; import java.lang.reflect.Field; import java.util.Map; public class RangeRestrictFilter implements IFieldFilter { @Override public void mapping(Field field, Object obj, Map<String, String> map) { // TODO Auto-generated method stub } @Override public void validate(Field field, Object obj) { // TODO Auto-generated method stub } }
[ "weiliejun@163.com" ]
weiliejun@163.com
7f8b966248a890735a5534d0a13b9ea1e1aa068c
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/tencent/liteav/beauty/b/a/b.java
7efc3e692c1d9bf17c888e31a1413969aa52fed1
[]
no_license
BharathPalanivelu/repotest
ddaf56a94eb52867408e0e769f35bef2d815da72
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
refs/heads/master
2020-09-30T18:55:04.802341
2019-12-02T10:52:08
2019-12-02T10:52:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,435
java
package com.tencent.liteav.beauty.b.a; import android.opengl.GLES20; import android.util.Log; import com.tencent.liteav.basic.log.TXCLog; import com.tencent.liteav.beauty.NativeLoad; import com.tencent.liteav.beauty.b.t; public class b extends t { private int r = -1; private int s = -1; private int t = -1; private final String x = "BeautyBlend"; public b() { super("varying lowp vec2 textureCoordinate;\n \nuniform sampler2D inputImageTexture;\n \nvoid main()\n{\n gl_FragColor = texture2D(inputImageTexture, textureCoordinate);\n}"); } public boolean a() { NativeLoad.getInstance(); this.f31313a = NativeLoad.nativeLoadGLProgram(12); if (this.f31313a == 0 || !b()) { this.f31319g = false; } else { this.f31319g = true; } c(); return this.f31319g; } public boolean b() { super.b(); q(); return true; } public void a(float f2) { TXCLog.i("BeautyBlend", "setBrightLevel " + f2); a(this.s, f2); } public void b(float f2) { Log.i("BeautyBlend", "setRuddyLevel level " + f2); a(this.t, f2 / 2.0f); } private void q() { this.s = GLES20.glGetUniformLocation(p(), "whiteDegree"); this.r = GLES20.glGetUniformLocation(p(), "contrast"); this.t = GLES20.glGetUniformLocation(p(), "ruddyDegree"); } }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
9a8ebf0ee8de3258e56a09fd0b26ac3aa696db6d
995f73d30450a6dce6bc7145d89344b4ad6e0622
/MATE-20_EMUI_11.0.0/src/main/java/android/bluetooth/UidTraffic.java
25fe375cb51ce0d067fbaeadf4af7c0e0b921836
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,272
java
package android.bluetooth; import android.os.Parcel; import android.os.Parcelable; public class UidTraffic implements Cloneable, Parcelable { public static final Parcelable.Creator<UidTraffic> CREATOR = new Parcelable.Creator<UidTraffic>() { /* class android.bluetooth.UidTraffic.AnonymousClass1 */ @Override // android.os.Parcelable.Creator public UidTraffic createFromParcel(Parcel source) { return new UidTraffic(source); } @Override // android.os.Parcelable.Creator public UidTraffic[] newArray(int size) { return new UidTraffic[size]; } }; private final int mAppUid; private long mRxBytes; private long mTxBytes; public UidTraffic(int appUid) { this.mAppUid = appUid; } public UidTraffic(int appUid, long rx, long tx) { this.mAppUid = appUid; this.mRxBytes = rx; this.mTxBytes = tx; } UidTraffic(Parcel in) { this.mAppUid = in.readInt(); this.mRxBytes = in.readLong(); this.mTxBytes = in.readLong(); } @Override // android.os.Parcelable public void writeToParcel(Parcel dest, int flags) { dest.writeInt(this.mAppUid); dest.writeLong(this.mRxBytes); dest.writeLong(this.mTxBytes); } public void setRxBytes(long bytes) { this.mRxBytes = bytes; } public void setTxBytes(long bytes) { this.mTxBytes = bytes; } public void addRxBytes(long bytes) { this.mRxBytes += bytes; } public void addTxBytes(long bytes) { this.mTxBytes += bytes; } public int getUid() { return this.mAppUid; } public long getRxBytes() { return this.mRxBytes; } public long getTxBytes() { return this.mTxBytes; } @Override // android.os.Parcelable public int describeContents() { return 0; } @Override // java.lang.Object public UidTraffic clone() { return new UidTraffic(this.mAppUid, this.mRxBytes, this.mTxBytes); } @Override // java.lang.Object public String toString() { return "UidTraffic{mAppUid=" + this.mAppUid + ", mRxBytes=" + this.mRxBytes + ", mTxBytes=" + this.mTxBytes + '}'; } }
[ "dstmath@163.com" ]
dstmath@163.com
f619a35bd6d6b06d9a9c9c2a80eb86ef129e9155
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_4b4543a968520223b36e7b641572add2a7566a70/SchoolChoiceReminderBMPBean/9_4b4543a968520223b36e7b641572add2a7566a70_SchoolChoiceReminderBMPBean_t.java
ab7e81781ae893ca44de706da96699605198f52f
[]
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
6,436
java
package se.idega.idegaweb.commune.school.data; import java.util.Calendar; import java.util.Collection; import java.util.Iterator; import javax.ejb.FinderException; import com.idega.block.process.data.AbstractCaseBMPBean; import com.idega.block.process.data.Case; import com.idega.block.process.data.CaseBMPBean; import com.idega.block.process.data.CaseCode; import com.idega.block.process.data.CaseCodeHome; import com.idega.data.IDOLookup; import com.idega.data.IDOQuery; import com.idega.user.data.Group; import com.idega.user.data.User; /** * Last modified: $Date: 2005/02/10 12:00:15 $ by $Author: laddi $ * * @author <a href="http://www.staffannoteberg.com">Staffan Nteberg</a> * @version $Revision: 1.14 $ */ public class SchoolChoiceReminderBMPBean extends AbstractCaseBMPBean implements SchoolChoiceReminder, Case { private static final String ENTITY_NAME = "sch_reminder"; private static final String CASE_CODE_DESCRIPTION = "School Choice Reminder"; private static final String[] CASE_STATUS_DESCRIPTIONS = { }; private static final String[] CASE_STATUS_KEYS = { }; //private static final String COLUMN_ID = ENTITY_NAME + "_id"; private static final String COLUMN_USER_ID = "USER_ID"; private static final String COLUMN_TEXT = "REMINDER_TEXT"; private static final String COLUMN_EVENT_DATE = "EVENT_DATE"; private static final String COLUMN_REMINDER_DATE = "REMINDER_DATE"; public String getEntityName() { return ENTITY_NAME; } public String getCaseCodeKey() { return SchoolChoiceReminder.CASE_CODE_KEY; } public String getCaseCodeDescription() { return CASE_CODE_DESCRIPTION; } public String[] getCaseStatusKeys() { return CASE_STATUS_KEYS; } public String[] getCaseStatusDescriptions() { return CASE_STATUS_DESCRIPTIONS; } public void insertStartData() { insertCaseCode(); } public void initializeAttributes() { addGeneralCaseRelation(); addAttribute(COLUMN_USER_ID, "User", true, true, Integer.class, "many-to-one", User.class); addAttribute(COLUMN_TEXT, "Text", true, true, String.class, 4096); addAttribute(COLUMN_EVENT_DATE, "Event Date", java.sql.Date.class); addAttribute(COLUMN_REMINDER_DATE, "Reminder Date", java.sql.Date.class); } public String getText() { final String text = getStringColumnValue(COLUMN_TEXT); return text != null ? text : ""; } public java.util.Date getEventDate() { final java.util.Date eventDate = (java.util.Date) getColumnValue(COLUMN_EVENT_DATE); return eventDate != null ? eventDate : new java.util.Date(); } public java.util.Date getReminderDate() { final java.util.Date reminderDate = (java.util.Date) getColumnValue(COLUMN_REMINDER_DATE); return reminderDate != null ? reminderDate : new java.util.Date(); } public int getUserId() { final Integer userId = getIntegerColumnValue(COLUMN_USER_ID); return userId != null ? userId.intValue() : -1; } public void setText(final String text) { setColumn(COLUMN_TEXT, text != null ? text : ""); } public void setEventDate(final java.util.Date eventDate) { setColumn(COLUMN_EVENT_DATE, new java.sql.Date(eventDate != null ? eventDate.getTime() : new java.util.Date().getTime())); } public void setReminderDate(final java.util.Date reminderDate) { setColumn(COLUMN_REMINDER_DATE, new java.sql.Date(reminderDate != null ? reminderDate.getTime() : new java.util.Date().getTime())); } public void setUser(final User user) { if (user != null) { setColumn(COLUMN_USER_ID, ((Integer) user.getPrimaryKey()).intValue()); } } public Collection ejbFindAll() throws FinderException { final IDOQuery query = idoQuery(); query.appendSelect().append("scr.*").appendFrom().append(getEntityName()).append(" scr").append(", ").append(CaseBMPBean.TABLE_NAME).append(" pc"); query.appendWhere().append("scr.").append(getIDColumnName()).appendEqualSign().append("pc.").append(CaseBMPBean.TABLE_NAME + "_ID").appendAnd().append("pc.").append(CaseBMPBean.COLUMN_CASE_STATUS).appendEqualSign().appendWithinSingleQuotes("UBEH").appendAnd().append("pc.").append(CaseBMPBean.COLUMN_CASE_CODE).appendEqualSign().appendWithinSingleQuotes(SchoolChoiceReminder.CASE_CODE_KEY); final Collection primaryKeys = idoFindPKsByQuery(query); return primaryKeys; } public Collection ejbFindUnhandled(final Group[] groups) throws FinderException { final IDOQuery query = idoQuery(); final Calendar today = Calendar.getInstance(); final String date = today.get(Calendar.YEAR) + "-" + (today.get(Calendar.MONTH) + 1) + "-" + today.get(Calendar.DATE); query.appendSelect().append("scr.*").appendFrom().append(getEntityName()).append(" scr").append(", ").append(CaseBMPBean.TABLE_NAME).append(" pc"); query.appendWhere().append("scr.").append(getIDColumnName()).appendEqualSign().append("pc.").append(CaseBMPBean.TABLE_NAME + "_ID").appendAnd().append("pc.").append(CaseBMPBean.COLUMN_CASE_STATUS).appendEqualSign().appendWithinSingleQuotes("UBEH").appendAnd().append("pc.").append(CaseBMPBean.COLUMN_CASE_CODE).appendEqualSign().appendWithinSingleQuotes(SchoolChoiceReminder.CASE_CODE_KEY).appendAnd().append(COLUMN_REMINDER_DATE).append(" <= ").appendWithinSingleQuotes(date); for (int i = 0; i < groups.length; i++) { query.append(i == 0 ? " and (" : " or "); final int groupId = ((Integer) groups[i].getPrimaryKey()).intValue(); query.append("pc.handler_group_id = '" + groupId + "'"); // special notice for super admin group, i.e. 1 if (groupId == 1) query.append(" or 1 = 1"); } query.append(")"); final Collection primaryKeys = idoFindPKsByQuery(query); return primaryKeys; } private synchronized void insertCaseCode() { try { final CaseCodeHome home = (CaseCodeHome) IDOLookup.getHome(CaseCode.class); final Collection codes = home.findAllCaseCodes(); boolean codeExists = false; for (Iterator i = codes.iterator(); i.hasNext();) { final CaseCode code = (CaseCode) i.next(); codeExists = code.getCode().equalsIgnoreCase(SchoolChoiceReminder.CASE_CODE_KEY); } if (!codeExists) { final CaseCode code = home.create(); code.setCode(SchoolChoiceReminder.CASE_CODE_KEY); code.setDescription("School choice reminder"); code.store(); } } catch (final Exception e) { //e.printStackTrace (); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6abc707a4450ed8a10c7f97a82a30cfc4ef4ad29
7b82d70ba5fef677d83879dfeab859d17f4809aa
/tmp/sys/ws/src/main/java/com/coldfeng/oauth/common/UserAccount.java
2e573d9a1fec0eaa325795386265d4fe48ac176a
[]
no_license
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
974
java
/** * Copyright (C) 2011 Talend Inc. - www.talend.com */ package com.coldfeng.oauth.common; public class UserAccount { private String name; private String password; private String accountAlias; private Calendar calendar = new Calendar(); public UserAccount(String name, String password) { this.name = name; this.password = password; } public UserAccount(String name, String password, String alias) { this.name = name; this.password = password; if (alias != null) { this.accountAlias = alias; } else { this.accountAlias = name; } } public String getName() { return name; } public String getPassword() { return password; } public Calendar getCalendar() { return calendar; } public String getAccountAlias() { return accountAlias; } public void setAccountAlias(String accountAlias) { this.accountAlias = accountAlias; } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
f920d13e56000266a62f803ca2e0680056dbe1da
3504f056e49206b49f69457e6f0f8d9c2b2d3df8
/HZXU-1/src/cn/zy/apps/demo/service/units/ProjectCarriedOutInfoSaveUpdateUnits.java
ba57c2d5f95a45b4ef324d4fb1555038f3bfffe6
[]
no_license
pzzying20081128/develop
9b50063a6851fcf63650edd52664b5b5e1554c72
77c5b3249df134c62d54a40d770e67c729752ac8
refs/heads/master
2020-05-31T05:23:36.039922
2016-02-24T10:42:02
2016-02-24T10:42:02
41,988,213
0
0
null
null
null
null
UTF-8
Java
false
false
4,639
java
package cn.zy.apps.demo.service.units ; import org.springframework.stereotype.Component ; import cn.zy.apps.demo.HZXUProjectConfig.ProjectStauts ; import cn.zy.apps.demo.HZXUProjectConfig.Status ; import cn.zy.apps.demo.pojos.ProjectCarriedOutInfo ; import cn.zy.apps.demo.pojos.ProjectMajorType ; import cn.zy.apps.demo.pojos.ProjectOwnershipAddress ; import cn.zy.apps.demo.pojos.ProjectProgressType ; import cn.zy.apps.demo.pojos.ProjectType ; import cn.zy.apps.demo.service.ABCommonsService ; import cn.zy.apps.demo.service.SystemOptServiceException ; import cn.zy.apps.tools.units.ToolsUnits ; import cn.zy.apps.tools.units.ToolsUnits.OptType ; @Component("ProjectCarriedOutInfoSaveUpdateUnits") public class ProjectCarriedOutInfoSaveUpdateUnits extends ABCommonsService { public ProjectCarriedOutInfo saveUpdate(OptType optType, ProjectCarriedOutInfo optProjectCarriedOutInfo) throws SystemOptServiceException { switch (optType) { case save: return save(optProjectCarriedOutInfo) ; case update: return update(optProjectCarriedOutInfo) ; default: throw new SystemOptServiceException("[操作类型错误]") ; } } public ProjectCarriedOutInfo save(ProjectCarriedOutInfo optProjectCarriedOutInfo) throws SystemOptServiceException { String sql = "select count(projectCarriedOutInfo.id) from " + " ProjectCarriedOutInfo as projectCarriedOutInfo " + " where projectCarriedOutInfo.name ='" + optProjectCarriedOutInfo.getName() + "' " + " and projectCarriedOutInfo.status ='" + Status.有效 + "' " ; Long l = baseService.findSinglenessByHSQL(sql) ; if (l >0) { throw new SystemOptServiceException("项目名已经存在") ; } setProperties(optProjectCarriedOutInfo) ; optProjectCarriedOutInfo.setStatus(Status.有效) ; optProjectCarriedOutInfo.setProjectStauts(ProjectStauts.建设中) ; baseService.save(optProjectCarriedOutInfo) ; return optProjectCarriedOutInfo ; } public ProjectCarriedOutInfo update(ProjectCarriedOutInfo optProjectCarriedOutInfo) throws SystemOptServiceException { String sql = "select count(projectCarriedOutInfo.id) from ProjectCarriedOutInfo as projectCarriedOutInfo where projectCarriedOutInfo.name ='" + optProjectCarriedOutInfo.getName() + "' " + " and projectCarriedOutInfo.status ='" + Status.有效 + "' " + " and projectCarriedOutInfo.id !=" + optProjectCarriedOutInfo.getId() ; Long l = baseService.findSinglenessByHSQL(sql) ; if (l >0) { throw new SystemOptServiceException("项目名已经存在") ; } setProperties(optProjectCarriedOutInfo) ; ProjectCarriedOutInfo projectCarriedOutInfo = baseService.get(ProjectCarriedOutInfo.class, optProjectCarriedOutInfo.getId()) ; ToolsUnits.copyBeanProperties(projectCarriedOutInfo, optProjectCarriedOutInfo, "totalInvestment", "constructionContent", "isKaiGong", "isProduction", "projectAddress", "projectOwnershipAddress", "projectOwnershipAddressId", "projectProgressType", "projectProgressTypeId", "projectMajorType", "projectMajorTypeId", "kaiGongDate", "buildStartDate", "buildEndDate", "implementationUnit", "implementationUnitPerson", "implementationUnitPhoto", "name", "responsibilityUnit", "responsibilityUnitPerson", "responsibilityUnitPhoto", "fenGuanMiShuZhang", "fenGuanMiShuZhangPhoto", "fenGuanHuShiZhang", "fenGuanHuShiZhangPhoto" ) ; return projectCarriedOutInfo ; } private void setProperties(ProjectCarriedOutInfo optProjectCarriedOutInfo) { Integer getProjectOwnershipAddressId = optProjectCarriedOutInfo.getProjectOwnershipAddressId() ; optProjectCarriedOutInfo.setProjectOwnershipAddress(baseService.load(getProjectOwnershipAddressId, ProjectOwnershipAddress.class)) ; Integer getProjectProgressTypeId = optProjectCarriedOutInfo.getProjectProgressTypeId() ; optProjectCarriedOutInfo.setProjectProgressType(baseService.load(getProjectProgressTypeId, ProjectProgressType.class)) ; Integer getProjectMajorTypeId = optProjectCarriedOutInfo.getProjectMajorTypeId() ; optProjectCarriedOutInfo.setProjectMajorType(baseService.load(getProjectMajorTypeId, ProjectMajorType.class)) ; Integer getProjectTypeId = optProjectCarriedOutInfo.getProjectTypeId() ; optProjectCarriedOutInfo.setProjectType(baseService.load(getProjectTypeId, ProjectType.class)) ; } }
[ "pzzying20081128@163.com" ]
pzzying20081128@163.com
e2c8d4a1dcaea1d7d1b79c1fa4004f80ff444001
5dd84e9ca419ed669e11c236a845b0c1645cf180
/com/planet_ink/coffee_mud/Items/Weapons/Staff.java
8be65b1a879040f1b29d763aad77b50169f02677
[ "Apache-2.0" ]
permissive
jmbflat/CoffeeMud
0ab169f8d473f0aa3534ffe3c0ae82ed9a221ec8
c6e48d89aa58332ae030904550442155e673488c
refs/heads/master
2023-02-16T04:21:26.845481
2021-01-09T01:36:11
2021-01-09T01:36:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,448
java
package com.planet_ink.coffee_mud.Items.Weapons; import java.util.List; import com.planet_ink.coffee_mud.Items.MiscMagic.StdWand; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; /* Copyright 2001-2020 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Staff extends StdWeapon implements Wand { @Override public String ID() { return "Staff"; } protected String secretWord=CMProps.getAnyListFileValue(CMProps.ListFile.MAGIC_WORDS); public Staff() { super(); setName("a wooden staff"); setDisplayText("a wooden staff lies in the corner of the room."); setDescription("It`s long and wooden, just like a staff ought to be."); secretIdentity=""; basePhyStats().setAbility(0); basePhyStats().setLevel(0); basePhyStats.setWeight(4); basePhyStats().setAttackAdjustment(0); basePhyStats().setDamage(4); baseGoldValue=1; recoverPhyStats(); wornLogicalAnd=true; material=RawMaterial.RESOURCE_OAK; properWornBitmap=Wearable.WORN_HELD|Wearable.WORN_WIELD; weaponDamageType=TYPE_BASHING; weaponClassification=Weapon.CLASS_STAFF; setUsesRemaining(0); } @Override public int getCharges() { return usesRemaining(); } @Override public void setCharges(final int newCharges) { this.setUsesRemaining(newCharges); } @Override public int getMaxCharges() { return Integer.MAX_VALUE; } @Override public void setMaxCharges(final int num) { } @Override public String magicWord() { return secretWord; } @Override public void setSpell(final Ability theSpell) { miscText=""; if(theSpell!=null) miscText=theSpell.ID(); secretWord=StdWand.getWandWord(miscText); } @Override public void setMiscText(final String newText) { super.setMiscText(newText); secretWord=StdWand.getWandWord(newText); } @Override public Ability getSpell() { if(text().length()==0) return null; return CMClass.getAbility(text()); } @Override public int value() { if(usesRemaining()<=0) return 0; return super.value(); } @Override public String secretIdentity() { String id=super.secretIdentity(); final Ability A=getSpell(); final String uses; if(this.getCharges() < 999999) { if(this.getMaxCharges() < 999999) uses=""+getCharges()+"/"+getMaxCharges(); else uses = ""+getCharges(); } else uses="unlimited"; if(A!=null) id="'A staff of "+A.name()+"' Charges: "+uses+"\n\r"+id; return id+"\n\rSay the magic word :`"+secretWord+"` to the target."; } @Override public int getEnchantType() { return -1; } @Override public void setEnchantType(final int enchType) { } @Override public void waveIfAble(final MOB mob, final Physical afftarget, final String message) { StdWand.waveIfAble(mob,afftarget,message,this); } @Override public boolean checkWave(final MOB mob, final String message) { return StdWand.checkWave(mob, message, this); } @Override public void executeMsg(final Environmental myHost, final CMMsg msg) { final MOB mob=msg.source(); switch(msg.targetMinor()) { case CMMsg.TYP_WAND_USE: if(msg.amITarget(this)&&((msg.tool()==null)||(msg.tool() instanceof Physical))) waveIfAble(mob,(Physical)msg.tool(),msg.targetMessage()); break; case CMMsg.TYP_SPEAK: if((msg.sourceMinor()==CMMsg.TYP_SPEAK) &&(amBeingWornProperly())) { boolean alreadyWanding=false; final List<CMMsg> trailers =msg.trailerMsgs(); if(trailers!=null) { for(final CMMsg msg2 : trailers) { if((msg2.targetMinor()==CMMsg.TYP_WAND_USE) &&(msg2.target() == this)) alreadyWanding=true; } } final String said=CMStrings.getSayFromMessage(msg.sourceMessage()); if((!alreadyWanding)&&(said!=null)&&(checkWave(mob,said))) msg.addTrailerMsg(CMClass.getMsg(msg.source(),this,msg.target(),CMMsg.NO_EFFECT,null,CMMsg.MASK_ALWAYS|CMMsg.TYP_WAND_USE,said,CMMsg.NO_EFFECT,null)); } break; default: break; } super.executeMsg(myHost,msg); } }
[ "bo@zimmers.net" ]
bo@zimmers.net
ce20cd92d0ffb8316ad74dc831886959e6b686f8
690f3f008d94abf130c4005146010cd63cd71567
/springbootInAction/ch8_2_jpa/src/main/java/com/wisely/ch8_2_jpa/support/CustomRepositoryFactoryBean.java
708de03da393b48e5134b128b716c6adeb7b248e
[]
no_license
Oaks907/bookspace
819b8ec87067f8e9776a8b79210c74d33673aec9
114a4fc43ed6134b4a236ccdffd30a9594b54796
refs/heads/master
2022-12-24T17:01:02.454129
2021-05-26T15:53:02
2021-05-26T15:53:02
143,092,798
0
0
null
2022-12-16T05:20:36
2018-08-01T02:19:53
Java
UTF-8
Java
false
false
1,714
java
package com.wisely.ch8_2_jpa.support; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.support.JpaRepositoryFactory; import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean; import org.springframework.data.jpa.repository.support.SimpleJpaRepository; import org.springframework.data.repository.core.RepositoryInformation; import org.springframework.data.repository.core.RepositoryMetadata; import org.springframework.data.repository.core.support.RepositoryFactorySupport; import javax.persistence.EntityManager; import java.io.Serializable; /** * Create by haifei on 2/9/2018 9:53 PM. */ //public class CustomRepositoryFactoryBean<T extends JpaRepository<S, ID>, S, ID extends Serializable> // extends JpaRepositoryFactoryBean<T, S, ID> {// 1 // // @Override // protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {// 2 // return new CustomRepositoryFactory(entityManager); // } // // private static class CustomRepositoryFactory extends JpaRepositoryFactory {// 3 // // // public CustomRepositoryFactory(EntityManager entityManager) { // super(entityManager); // } // // @Override // @SuppressWarnings({"unchecked"}) // protected <T, ID extends Serializable> SimpleJpaRepository<?, ?> getTargetRepository( // RepositoryInformation information, EntityManager entityManager) {// 4 // return new CustomRepositoryImpl<T, ID>((Class<T>) information.getDomainType(), entityManager); // // } // // @Override // protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {// 5 // return CustomRepositoryImpl.class; // } // } //}
[ "haifei.li@renren-inc.com" ]
haifei.li@renren-inc.com
a5c9c9c637d7bdf3955e71f20a03c1f970d0c268
58c23f6d66d08ef81c89d24f642f24f09704ec48
/csas-framework/hs-core/src/main/java/com/hoomsun/core/thread/ThreadPoolExecutorFactory.java
3f8490a9c08df2e2f9ec7142ec8d175432ff9d89
[]
no_license
ybak/casc-framework
5ed651901eb4357e807d3c3d3440ed26c1848d56
b76e68dd53cf26ce6302db545afd572a38aac3e3
refs/heads/master
2021-03-24T01:11:12.632781
2018-05-16T06:49:09
2018-05-16T06:49:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,786
java
/** * Copyright www.hoomsun.com 红上金融信息服务(上海)有限公司 */ package com.hoomsun.core.thread; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author ywzou * 作者:ywzou <br> * 创建时间:2017年11月17日 <br> * 描述:线程池工厂 */ public class ThreadPoolExecutorFactory { private static final Logger log = LoggerFactory.getLogger(ThreadPoolExecutorFactory.class); /** * corePoolSize 池中所保存的线程数,包括空闲线程。 */ private int corePoolSize = 5; /** * maximumPoolSize - 池中允许的最大线程数(采用LinkedBlockingQueue时没有作用)。 */ private int maximumPoolSize = 5; /** * keepAliveTime -当线程数大于核心时,此为终止前多余的空闲线程等待新任务的最长时间,线程池维护线程所允许的空闲时间 (秒) */ private long keepAliveTime = 30; /** * capacity 执行前用于保持任务的队列(缓冲队列) */ private int capacity = 20; /** * 线程池对象 */ private ThreadPoolExecutor threadPoolExecutor = null; public ThreadPoolExecutorFactory() { log.info("##### 初始化线程池工厂类 【corePoolSize="+corePoolSize+",maximumPoolSize="+ maximumPoolSize +",keepAliveTime="+keepAliveTime+",capacity="+capacity+"】 ######"); if (null == getThreadPoolExecutor()) { ThreadPoolExecutor t; synchronized (ThreadPoolExecutor.class) { t = getThreadPoolExecutor(); if (null == t) { synchronized (ThreadPoolExecutor.class) { t = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(capacity), new ThreadPoolExecutor.DiscardOldestPolicy()); } setThreadPoolExecutor(t); } } } log.info("#####【线程池子初始化成功】####"); } public int getCorePoolSize() { return corePoolSize; } public void setCorePoolSize(int corePoolSize) { this.corePoolSize = corePoolSize; } public int getMaximumPoolSize() { return maximumPoolSize; } public void setMaximumPoolSize(int maximumPoolSize) { this.maximumPoolSize = maximumPoolSize; } public long getKeepAliveTime() { return keepAliveTime; } public void setKeepAliveTime(long keepAliveTime) { this.keepAliveTime = keepAliveTime; } public int getCapacity() { return capacity; } public void setCapacity(int capacity) { this.capacity = capacity; } public ThreadPoolExecutor getThreadPoolExecutor() { return threadPoolExecutor; } public void setThreadPoolExecutor(ThreadPoolExecutor threadPoolExecutor) { this.threadPoolExecutor = threadPoolExecutor; } }
[ "936707967@qq.com" ]
936707967@qq.com
19edf3e9adbcc569cf518e18398a3e4ba19831da
1df1e297275507b6d8aaecc531d811c968c8e4fc
/app/src/main/java/com/tingyu/venus/model/table/ContactTable.java
6a7e63849e26c9c17285b9200eeefd3ed0670830
[]
no_license
Essionshy/venus-android
d9e792f018a237d1acb1ce2c1850b06cf494ff95
dc2fde6af6ccf0cc1e26b369229455adac8b355a
refs/heads/master
2023-01-15T08:41:20.652658
2020-11-26T13:30:41
2020-11-26T13:30:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
750
java
package com.tingyu.venus.model.table; /** * 创建联系人表的信息 */ public class ContactTable { public static final String TAB_NAME = "tab_contact"; public static final String COL_ID = "id"; public static final String COL_USERNAME = "username"; public static final String COL_PHONE = "phone"; public static final String COL_AVATAR = "avatar"; public static final String COL_IS_CONTACT = "is_contact";//是否是联系人 public static final String CREATE_TAB = "create table " + TAB_NAME + " (" + COL_ID + " Long primary key," + COL_AVATAR + " text," + COL_PHONE + " text," + COL_USERNAME + " text," + COL_IS_CONTACT + " Integer);"; }
[ "1218817610@qq.com" ]
1218817610@qq.com
2d5f88f0d174a1f8552a9a5f09bd5436b2b0c3d0
6e4effc3ebb471fb1f90c1246f74328d5b69c78b
/codes/javacore-oop/src/main/java/io/github/dunwu/javacore/access/Hello.java
c2dc040436d3a00a8abf5f57f1dad17fae5c44c8
[ "MIT" ]
permissive
dreanli/javacore
7bdfdb0ce78499937bb8cd09a54ab3347b5b2438
9b07e08cd35bf64d3db4f087bd1ec1b570aa6bba
refs/heads/master
2020-09-09T05:50:07.108618
2019-10-28T14:04:39
2019-10-28T14:04:39
221,365,721
1
0
MIT
2019-11-13T03:36:12
2019-11-13T03:36:12
null
UTF-8
Java
false
false
165
java
package io.github.dunwu.javacore.access; public class Hello { protected String name = "Zhang Peng"; public String getInfo() { return "Hello World!!!"; } };
[ "forbreak@163.com" ]
forbreak@163.com
45edb18b69ce94e4ac80c0955cfba1855c44afd8
dc06652c4030ac2f8c9ebc3fa125a7c2e72fbf67
/Java/HelloWorld/src/ch12/ParentMain.java
939903e3c1ebee669287e4a3d2612a0f3954b89a
[]
no_license
sshhhGit/TIL
9b485edae8d381f3143db7e85db8c2727e0dbf87
fce88811ed2784dc6d0b0f76b0d824afb30d7d24
refs/heads/main
2023-09-02T12:05:32.033811
2021-11-10T12:04:10
2021-11-10T12:04:10
400,414,121
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package ch12; public class ParentMain { public static void main(String[] args) { Parent p = new Parent(); p.name = "parent"; p.printInfo(); System.out.println("--------"); Child c = new Child(); c.name = "child"; c.setHobby("swimming"); c.printInfo(); } }
[ "seungho0497@hanmail.net" ]
seungho0497@hanmail.net
a50beb98e511d0b2deb6883e83c7737fbfca82ed
dc2432fef5f87ee336158f89ffaf083beb18ab48
/src/main/java/com/xxs/definedweek/entity/Ad.java
8edc021784a2dc36e455d6169fb94b701af07eda
[]
no_license
xxs/definedweek
72a0f1757ad9cd2e57212216cd269858bac86836
b9228a2eeee38dd44a3095e29111c0567d49240a
refs/heads/master
2020-12-25T09:28:20.691302
2014-12-11T13:33:32
2014-12-11T13:33:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,106
java
/* */ package com.xxs.definedweek.entity; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Transient; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.NotEmpty; /** * Entity - 广告 * */ @Entity @Table(name = "xx_ad") @SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_ad_sequence") public class Ad extends OrderEntity { private static final long serialVersionUID = -1307743303786909390L; /** * 类型 */ public enum Type { /** 文本 */ text, /** 图片 */ image, /** flash */ flash } /** 标题 */ private String title; /** 类型 */ private Type type; /** 内容 */ private String content; /** 路径 */ private String path; /** 起始日期 */ private Date beginDate; /** 结束日期 */ private Date endDate; /** 链接地址 */ private String url; /** 广告位 */ private AdPosition adPosition; /** * 获取标题 * * @return 标题 */ @NotEmpty @Length(max = 200) @Column(nullable = false) public String getTitle() { return title; } /** * 设置标题 * * @param title * 标题 */ public void setTitle(String title) { this.title = title; } /** * 获取类型 * * @return 类型 */ @NotNull @Column(nullable = false) public Type getType() { return type; } /** * 设置类型 * * @param type * 类型 */ public void setType(Type type) { this.type = type; } /** * 获取内容 * * @return 内容 */ @Lob public String getContent() { return content; } /** * 设置内容 * * @param content * 内容 */ public void setContent(String content) { this.content = content; } /** * 获取路径 * * @return 路径 */ @Length(max = 200) public String getPath() { return path; } /** * 设置路径 * * @param path * 路径 */ public void setPath(String path) { this.path = path; } /** * 获取起始日期 * * @return 起始日期 */ public Date getBeginDate() { return beginDate; } /** * 设置起始日期 * * @param beginDate * 起始日期 */ public void setBeginDate(Date beginDate) { this.beginDate = beginDate; } /** * 获取结束日期 * * @return 结束日期 */ public Date getEndDate() { return endDate; } /** * 设置结束日期 * * @param endDate * 结束日期 */ public void setEndDate(Date endDate) { this.endDate = endDate; } /** * 获取链接地址 * * @return 链接地址 */ @Length(max = 200) public String getUrl() { return url; } /** * 设置链接地址 * * @param url * 链接地址 */ public void setUrl(String url) { this.url = url; } /** * 获取广告位 * * @return 广告位 */ @NotNull @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(nullable = false) public AdPosition getAdPosition() { return adPosition; } /** * 设置广告位 * * @param adPosition * 广告位 */ public void setAdPosition(AdPosition adPosition) { this.adPosition = adPosition; } /** * 判断是否已开始 * * @return 是否已开始 */ @Transient public boolean hasBegun() { return getBeginDate() == null || new Date().after(getBeginDate()); } /** * 判断是否已结束 * * @return 是否已结束 */ @Transient public boolean hasEnded() { return getEndDate() != null && new Date().after(getEndDate()); } }
[ "xiaoshi332@163.com" ]
xiaoshi332@163.com
756b7bb09a9d1eb783a7fa775e70e00143a77690
e89dc01c95b8b45404f971517c2789fd21657749
/src/main/java/com/alipay/api/domain/KbdishSpecGroupDetail.java
61d0dc501a2deb1a46f5f770a9a0060396679412
[ "Apache-2.0" ]
permissive
guoweiecust/alipay-sdk-java-all
3370466eec70c5422c8916c62a99b1e8f37a3f46
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
refs/heads/master
2023-05-05T07:06:47.823723
2021-05-25T15:26:21
2021-05-25T15:26:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
806
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 口碑规格标签扩展 * * @author auto create * @since 1.0, 2020-09-07 16:15:40 */ public class KbdishSpecGroupDetail extends AlipayObject { private static final long serialVersionUID = 8446963781738923538L; /** * 规格标签id */ @ApiField("spec_id") private String specId; /** * 规格标签的名称 */ @ApiField("spec_name") private String specName; public String getSpecId() { return this.specId; } public void setSpecId(String specId) { this.specId = specId; } public String getSpecName() { return this.specName; } public void setSpecName(String specName) { this.specName = specName; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
3fc10405320d56ba4e0228d14701d1557d1d8820
f12ae2d71115fe4d8aa04bdca261b72cf5496399
/Day27/src/com/homework/guanka03/Test02.java
63c9edd4998d7ae88fd879b83b653f5db1da0d35
[]
no_license
wanchenyang521/iGeek
0fe5323839cd669dc5a060e00013f5318ffb7ede
420c76a0c2ab92b16c673774dc008cf0eeabc07e
refs/heads/master
2020-04-26T07:19:47.852086
2019-04-23T03:11:12
2019-04-23T03:11:12
173,390,991
2
0
null
null
null
null
UTF-8
Java
false
false
2,984
java
package com.homework.guanka03; import java.io.*; import java.util.HashMap; import java.util.Map; import java.util.Scanner; /** * @author 晨阳 * @version 1.0 * @date 2019-04-17 08:35 * @description * 在d盘目录下有一个加密文件a.txt(文件里只有英文和数字),密码是“igeek” * 当密码输入正确时才能读取文件里的数据。 * 现要求用代码来模拟读取文件的过程,并统计文件里各个字母出现的次数, * 并把统计结果按照如下格式输出到d盘的count.txt中。 **/ public class Test02 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("请输入密码"); while (true) { String password = scanner.nextLine(); if(password.equals("igeek")) { break; } else { System.out.println("密码错误,重新输入"); } } // 存放数据 Map<Character,Integer> characterIntegerMap = new HashMap<>(); // 统计计文件里各个字母出现的次数 calcCount(characterIntegerMap); // 保存 saveNum(characterIntegerMap); } private static void saveNum(Map<Character, Integer> characterIntegerMap) { try( BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("D:\\WorkSpace\\Java\\Day27\\src\\com\\homework\\count.txt",true)); ) { for (Map.Entry<Character,Integer> thisEntry: characterIntegerMap.entrySet()) { bufferedWriter.write(thisEntry.getKey()+":"+thisEntry.getValue()+"个"); bufferedWriter.newLine(); bufferedWriter.flush(); } } catch (IOException e) { e.printStackTrace(); } } private static void calcCount(Map<Character, Integer> characterIntegerMap) { try( BufferedReader bufferedReader = new BufferedReader(new FileReader("D:\\WorkSpace\\Java\\Day27\\src\\com\\homework\\a.txt")); ) { String line = null; while ((line = bufferedReader.readLine())!=null) { for (int i = 0; i < line.length(); i++) { Character character = line.charAt(i); if(characterIntegerMap.containsKey(character)) { characterIntegerMap.put(character, characterIntegerMap.get(character).intValue()+1); } else { characterIntegerMap.put(character, 1); } } } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }
[ "wan1183254286@icloud.com" ]
wan1183254286@icloud.com
28db9ba7d6718cd4f1e6a078792183b293e2e3cf
027c0c52ab66f181be386217c91a28188dd3a4d2
/dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CalculatedDataElement.java
cc63576c8a09d9269aaa92dc356954c9ac9f5610
[ "BSD-3-Clause" ]
permissive
rubendw/dhis2
96f3af9fb4fa0f9d421b39098ad7aa4096c82af3
b9f5272ea001020717e4fc630ddb9f145b95d6ef
refs/heads/master
2022-02-15T08:35:43.775194
2009-03-04T15:10:07
2009-03-04T15:10:07
142,915
1
0
null
2022-01-21T23:21:45
2009-03-04T15:13:23
Java
UTF-8
Java
false
false
4,763
java
package org.hisp.dhis.dataelement; /* * Copyright (c) 2004-2007, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import org.hisp.dhis.expression.Expression; /** * A CalculatedDataElement (CDE) is created for a set of other related * DataElements. Each constituent DataElement may be multiplied with a factor. * * An example: A value for the CDE "Number of births" is summed together from * two other Data Elements, "Number of still births" and "Number of live * births". * * CDEs may be displayed as subtotals in a data entry form. The user may specify * whether or not the calculated value should be stored in the database. In all * other cases, a CDE behaves just like any other DataElement. * * @author Hans S. Toemmerholt * @version $Id$ */ public class CalculatedDataElement extends DataElement { private boolean saved; private Expression expression; // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- /** * Default constructor. */ public CalculatedDataElement() { } /** * Constructor for building a complete DataElement, in addition to the * properties for the CalculatedDataElement itself. * * @param name the unique name for this DataElement * @param alternativeName an optional unique alternative name of this * DataElement * @param shortName an optional unique name representing this * CalculatedDataElement * @param code an optional unique code representing this DataElement * @param description description of this DataElement * @param active boolean indicating if this DataElement is active or not * (enabled / disabled) * @param type the type of this DataElement; e.g. DataElement.TYPE_INT, * DataElement.TYPE_BOOL * @param aggregationOperator the aggregation operator of this DataElement; * e.g. DataElement.SUM or DataElement.AVERAGE * @param parent the parent DataElement for this DataElement * @param saved boolean indicating if values for this CalculatedDataElement * should be saved * @param expression Expression defining which DataElements and factors * which make up this CalculatedDataElement */ public CalculatedDataElement( String name, String alternativeName, String shortName, String code, String description, boolean active, String type, String aggregationOperator, DataElement parent, boolean saved, Expression expression ) { super( name, alternativeName, shortName, code, description, active, type, aggregationOperator, parent ); this.saved = saved; this.expression = expression; } public Expression getExpression() { return expression; } public void setExpression( Expression expression ) { this.expression = expression; } public boolean isSaved() { return saved; } public void setSaved( boolean saved ) { this.saved = saved; } }
[ "oddmunds@leia.ifi.uio.no" ]
oddmunds@leia.ifi.uio.no
34ad12b6e710fd855fc3bd7aba1fdf161dfc4f12
ba55269057e8dc503355a26cfab3c969ad7eb278
/POSNGlobalORM/src/com/nirvanaxp/global/types/entities/DriverOrder_.java
dcd5378fe8329ee6bce86bb6ed8efc53630ac173
[ "Apache-2.0" ]
permissive
apoorva223054/SF3
b9db0c86963e549498f38f7e27f65c45438b2a71
4dab425963cf35481d2a386782484b769df32986
refs/heads/master
2022-03-07T17:13:38.709002
2020-01-29T05:19:06
2020-01-29T05:19:06
236,907,773
0
0
Apache-2.0
2022-02-09T22:46:01
2020-01-29T05:10:51
Java
UTF-8
Java
false
false
2,042
java
package com.nirvanaxp.global.types.entities; import java.util.Date; import javax.annotation.Generated; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; @Generated(value="Dali", date="2019-03-26T17:35:28.175+0530") @StaticMetamodel(DriverOrder.class) public class DriverOrder_ { public static volatile SingularAttribute<DriverOrder, Integer> id; public static volatile SingularAttribute<DriverOrder, String> orderNumber; public static volatile SingularAttribute<DriverOrder, String> orderId; public static volatile SingularAttribute<DriverOrder, String> firstName; public static volatile SingularAttribute<DriverOrder, String> lastName; public static volatile SingularAttribute<DriverOrder, String> email; public static volatile SingularAttribute<DriverOrder, String> phone; public static volatile SingularAttribute<DriverOrder, String> statusId; public static volatile SingularAttribute<DriverOrder, String> statusName; public static volatile SingularAttribute<DriverOrder, String> businessName; public static volatile SingularAttribute<DriverOrder, String> businessAddress; public static volatile SingularAttribute<DriverOrder, String> customerAddress; public static volatile SingularAttribute<DriverOrder, Date> time; public static volatile SingularAttribute<DriverOrder, Date> created; public static volatile SingularAttribute<DriverOrder, String> createdBy; public static volatile SingularAttribute<DriverOrder, Date> updated; public static volatile SingularAttribute<DriverOrder, String> updatedBy; public static volatile SingularAttribute<DriverOrder, String> nxpAccessToken; public static volatile SingularAttribute<DriverOrder, Integer> businessId; public static volatile SingularAttribute<DriverOrder, String> locationsId; public static volatile SingularAttribute<DriverOrder, Integer> accountId; public static volatile SingularAttribute<DriverOrder, String> driverId; public static volatile SingularAttribute<DriverOrder, String> scheduleDateTime; }
[ "naman223054@gmail.com" ]
naman223054@gmail.com
f3a32670b008c777700d6c9cf776a5d3050db8f6
c395f01ea6c34ecdc905bc345b780882b8834c46
/Jolly/app/src/main/java/cn/lst/jolly/details/DetailsContract.java
e3cb6c14bbaa9fdd58e663cf546daa6f377b2247
[]
no_license
lisongting/Android-Projects
3c03bdcb69c2bb06f4a3e0ec93b08caa49d50633
23ac196fca8e786629d829852c9597dc197d25ae
refs/heads/master
2020-06-26T16:43:35.076004
2018-12-09T15:42:02
2018-12-09T15:42:02
74,548,801
6
2
null
null
null
null
UTF-8
Java
false
false
1,453
java
package cn.lst.jolly.details; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.StringRes; import java.util.List; import cn.lst.jolly.BasePresenter; import cn.lst.jolly.BaseView; import cn.lst.jolly.data.ContentType; import cn.lst.jolly.data.DoubanMomentContent; import cn.lst.jolly.data.DoubanMomentNewsThumbs; import cn.lst.jolly.data.GuokrHandpickContentResult; import cn.lst.jolly.data.ZhihuDailyContent; /** * Created by lisongting on 2018/1/16. */ public class DetailsContract { interface View extends BaseView<Presenter> { void showMessage(@StringRes int stringRes); boolean isActive(); void showZhihuDailyContent(@NonNull ZhihuDailyContent content); void showDoubanMomentContent(@NonNull DoubanMomentContent content, @Nullable List<DoubanMomentNewsThumbs> list); void showGuokrHandpickContent(@NonNull GuokrHandpickContentResult content); void share(@Nullable String link); void copyLink(@Nullable String link); void openWithBrowser(@Nullable String link); } interface Presenter extends BasePresenter { void favorite(ContentType type, int id, boolean favorite); void loadDoubanContent(int id); void loadZhihuDailyContent(int id); void loadGuokrHandpickContent(int id); void getLink(ContentType type, int requestCode, int id); } }
[ "501648152@qq.com" ]
501648152@qq.com
9119058d1a289727ea67a472640400895eab5149
c3a83420ab341677929e4be7676467294e52aee3
/20_06_07 std/src/UniquePathsⅡ.java
b2e664353ca4de831bca1bb8d153769b0911de0f
[]
no_license
LYHccc/study_java
525474403d9c0aaadaac84c1bf1ba7d7d77de89e
732e1ada5e3d9d2117ddfefac750f9b1354fbb6f
refs/heads/master
2022-11-25T19:57:18.091460
2020-11-13T14:29:58
2020-11-13T14:29:58
217,519,014
0
0
null
null
null
null
UTF-8
Java
false
false
1,212
java
/*路径总数Ⅱ 继续思考题目"Unique Paths": 如果在图中加入了一些障碍,有多少不同的路径? 分别用0和1代表空区域和障碍 例如: 下图表示有一个障碍在3*3的图中央。 [↵ [0,0,0],↵ [0,1,0],↵ [0,0,0]↵]有2条不同的路径 备注:m和n不超过100. */ public class UniquePathsⅡ { public int uniquePathsWithObstacles (int[][] obstacleGrid) { int row = obstacleGrid.length; int col = obstacleGrid[0].length; int[][] dp = new int[row][col]; for(int i = 0; i < row; i++){ if(obstacleGrid[i][0] == 0){ dp[i][0] = 1; }else{ break; } } for(int i = 0; i < col; i++){ if(obstacleGrid[0][i] == 0){ dp[0][i] = 1; }else{ break; } } for(int i = 1; i < row; i++){ for(int j = 1; j < col; j++){ if(obstacleGrid[i][j] == 1){ dp[i][j] = 0; }else{ dp[i][j] = dp[i - 1][j] + dp[i][j - 1]; } } } return dp[row - 1][col - 1]; } }
[ "1587168434@qq.com" ]
1587168434@qq.com
031e84af425ec6969ba584f90ace354757c33fe8
f960a4235fcf5cabd904b076d65687457c1988c6
/flexmark-ext-jekyll-front-matter/src/main/java/com/vladsch/flexmark/ext/jekyll/front/matter/JekyllFrontMatterVisitorExt.java
3f6592f3bd9641e68e47fed5a7cd81f3bdfdca7d
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Genato/flexmark-java
4fba22d1043ad562ffd4a0f604fb36f06979fdad
9cedd42ab8439fff84ecdd26272a91543e760005
refs/heads/master
2021-01-12T07:19:13.903292
2016-12-20T09:27:42
2016-12-20T09:27:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
package com.vladsch.flexmark.ext.jekyll.front.matter; import com.vladsch.flexmark.ast.VisitHandler; import com.vladsch.flexmark.ast.Visitor; public class JekyllFrontMatterVisitorExt { static <V extends JekyllFrontMatterVisitor> VisitHandler<?>[] VISIT_HANDLERS(final V visitor) { return new VisitHandler<?>[] { new VisitHandler<>(JekyllFrontMatterBlock.class, new Visitor<JekyllFrontMatterBlock>() { @Override public void visit(JekyllFrontMatterBlock node) { visitor.visit(node); } }), }; } }
[ "vladimir.schneider@gmail.com" ]
vladimir.schneider@gmail.com
2e3ff6793f098d70296e49b0ed49375a5bc2747c
85ed20d2ae90d854cec647f9685ec94937eef810
/JPADemos/Demos/Demo1002_JPA_ORM_CRUD/src/com/accenture/lkm/service/EmployeeServiceImpl.java
3f60471e05f8381480578a45be893f718ecedd49
[]
no_license
Gizmosoft/Java-Persistence-API-JPA
3e25464117e721eb289b02afad9d4ea4791f0c8b
95e1bdfe8fc62667307705881377041b0db5aba0
refs/heads/master
2023-04-12T02:12:48.322237
2021-05-05T05:48:39
2021-05-05T05:48:39
364,472,852
0
0
null
null
null
null
UTF-8
Java
false
false
1,883
java
package com.accenture.lkm.service; import com.accenture. lkm.utility.Factory; import com.accenture.lkm.businessbean.EmployeeBean; import com.accenture.lkm.dao.EmployeeDAO; public class EmployeeServiceImpl implements EmployeeService { public Integer addEmployee(EmployeeBean employee) throws Exception { int employeeId = 0; try { EmployeeDAO employeeDAO = Factory.createEmployeeDAO(); employeeId = employeeDAO.addEmployee(employee); } catch (Exception exception) { throw exception; } return employeeId; } public EmployeeBean findEmployeeById(Integer employeeId) throws Exception { EmployeeBean employee =null; try { EmployeeDAO employeeDAO = Factory.createEmployeeDAO(); employee = employeeDAO.findEmployeeById(employeeId); if(employee==null){ throw new Exception("Given EmployeeId is invalid, please try with a valid EmployeeId"); } } catch (Exception exception) { throw exception; } return employee; } @Override public EmployeeBean updateEmployee(EmployeeBean employeeBean)throws Exception { EmployeeBean employee =null; try { EmployeeDAO employeeDAO = Factory.createEmployeeDAO(); employee = employeeDAO.updateEmployee(employeeBean); if(employee==null){ throw new Exception("Given EmployeeId is invalid, please try with a valid EmployeeId"); } } catch (Exception exception) { throw exception; } return employee; } @Override public EmployeeBean deleteEmployeeById(Integer employeeId) throws Exception { EmployeeBean employee =null; try { EmployeeDAO employeeDAO = Factory.createEmployeeDAO(); employee = employeeDAO.deleteEmployeeById(employeeId); if(employee==null){ throw new Exception("Given EmployeeId is invalid, please try with a valid EmployeeId"); } } catch (Exception exception) { throw exception; } return employee; } }
[ "Kartikey.hebbar@gmail.com" ]
Kartikey.hebbar@gmail.com
ad275dcd81205f87656b067b4fa43f6e566ccfdb
29f38b5f53a279d98378f4c8c4c6a14392695d51
/app/src/main/java/com/zyc/doctor/ui/activity/TransferPatientHistoryActivity.java
64d45b8d0fc4318776a3b619dcea8b694f0d750c
[ "Apache-2.0" ]
permissive
XieHaha/Music
6873f6a8aa0cbfa97a6b19f8584681fe88d35bd6
1a0ec8081c06b7705cbdad6f149f88c923d35584
refs/heads/master
2023-08-05T13:13:01.165137
2021-09-13T05:35:12
2021-09-13T05:35:12
404,626,312
0
0
null
null
null
null
UTF-8
Java
false
false
3,545
java
package com.zyc.doctor.ui.activity; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.support.v4.view.ViewPager; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import com.zyc.doctor.R; import com.zyc.doctor.ui.adapter.FragmentVpAdapter; import com.zyc.doctor.ui.base.activity.BaseActivity; import com.zyc.doctor.ui.fragment.TransferPatientFromFragment; import com.zyc.doctor.ui.fragment.TransferPatientToFragment; import com.zyc.doctor.widgets.view.ViewPrepared; import java.util.ArrayList; import java.util.List; import butterknife.BindView; /** * @author dundun * @date 18/10/11 * 转诊历史 */ public class TransferPatientHistoryActivity extends BaseActivity { @BindView(R.id.act_health_card_base_info) Button to; @BindView(R.id.act_health_card_health_record) Button from; @BindView(R.id.act_health_card_indicator) View viewIndicator; @BindView(R.id.act_health_card_viewpager) ViewPager viewPager; private FragmentVpAdapter fragmentVpAdapter; /** * 转入 */ private TransferPatientFromFragment transferPatientFromFragment; /** * 转出 */ private TransferPatientToFragment transferPatientToFragment; private List<Fragment> fragmentList = new ArrayList<>(); @Override protected boolean isInitBackBtn() { return true; } @Override public int getLayoutID() { return R.layout.act_transfer_patient_history; } @Override public void initData(@NonNull Bundle savedInstanceState) { super.initData(savedInstanceState); new ViewPrepared().asyncPrepare(to, (w, h) -> { ViewGroup.LayoutParams params = viewIndicator.getLayoutParams(); params.width = w; viewIndicator.setLayoutParams(params); }); transferPatientFromFragment = new TransferPatientFromFragment(); transferPatientToFragment = new TransferPatientToFragment(); fragmentList.add(transferPatientToFragment); fragmentList.add(transferPatientFromFragment); fragmentVpAdapter = new FragmentVpAdapter(getSupportFragmentManager(), fragmentList); viewPager.setAdapter(fragmentVpAdapter); viewPager.setCurrentItem(0); } @Override public void initListener() { super.initListener(); to.setOnClickListener(this); from.setOnClickListener(this); viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { int tabWidth = to.getWidth(); viewIndicator.setTranslationX((position * tabWidth) + (positionOffset * tabWidth)); } @Override public void onPageSelected(int position) { } @Override public void onPageScrollStateChanged(int state) { } }); } @Override public void onClick(View v) { super.onClick(v); switch (v.getId()) { case R.id.act_health_card_base_info: viewPager.setCurrentItem(0); break; case R.id.act_health_card_health_record: viewPager.setCurrentItem(1); break; case R.id.fragment_cooperate_apply_layout: break; default: break; } } }
[ "371523912@qq.com" ]
371523912@qq.com
96de26aba83985616ba51e51c2f64782941da550
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/domain/CrowdRuleInfo.java
86176f7d5f606ac994999a0b67177615d86f47df
[ "Apache-2.0" ]
permissive
WQmmm/alipay-sdk-java-all
57974d199ee83518523e8d354dcdec0a9ce40a0c
66af9219e5ca802cff963ab86b99aadc59cc09dd
refs/heads/master
2023-06-28T03:54:17.577332
2021-08-02T10:05:10
2021-08-02T10:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
992
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 圈人规则信息 * * @author auto create * @since 1.0, 2016-12-12 17:43:08 */ public class CrowdRuleInfo extends AlipayObject { private static final long serialVersionUID = 5812486569292929422L; /** * 规则描述 */ @ApiField("ruledesc") private String ruledesc; /** * 规则id */ @ApiField("ruleid") private String ruleid; /** * 圈人规则的状态 */ @ApiField("status") private String status; public String getRuledesc() { return this.ruledesc; } public void setRuledesc(String ruledesc) { this.ruledesc = ruledesc; } public String getRuleid() { return this.ruleid; } public void setRuleid(String ruleid) { this.ruleid = ruleid; } public String getStatus() { return this.status; } public void setStatus(String status) { this.status = status; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ed9b34c721a02375376f63ab9cb72ba2646dd212
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_d500f6332376f0dfcb9a3ef04389a44b7134278b/FragmentTestActivity/10_d500f6332376f0dfcb9a3ef04389a44b7134278b_FragmentTestActivity_t.java
a8f80b4ca877fd97ef9fd2f334c28473135b3d87
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,595
java
/* * Copyright (C) 2010 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.contacts.test; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; import com.android.contacts.ContactsActivity; import com.android.contacts.R; /** * An activity that is used for testing fragments. A unit test starts this * activity, adds a fragment and then tests the fragment. */ public class FragmentTestActivity extends ContactsActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Normally fragment/activity onStart() methods will not be called when screen is locked. // Use the following flags to ensure that activities can be show for testing. Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); setContentView(R.layout.fragment_test); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b54c2d39b4df5ef9c1c1ef82a8b0b26a82440803
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5738606668808192_1/java/luras/Main.java
b2e585ed7801cb89eea819519afa167ee062d3ab
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
1,819
java
import java.math.*; import java.util.*; public class Main { static int n; static int num = 0; static BigInteger b[][] = new BigInteger [40][40]; static int a[] = new int [40]; static BigInteger ans[] = new BigInteger [40]; static int m; public static void main(String [] args){ Scanner cin = new Scanner(System.in); int casei = cin.nextInt(); System.out.println("Case #1:"); n = cin.nextInt(); m = cin.nextInt(); for(int i = 2; i <= 10; i ++){ b[i][0] = BigInteger.valueOf(1); for(int j = 1; j <= 32; j ++){ BigInteger tmp = BigInteger.valueOf(i); b[i][j] = b[i][j - 1].multiply(tmp); } } num = 0; a[0] = 1; a[n - 1] = 1; dfs(1); System.out.println(num); } static void dfs(int step){ if(num == m) return; if(step == n - 1){ int i; for(i = 2; i <= 10; i ++){ BigInteger tmp = BigInteger.valueOf(0); for(int j = 0; j < 32; j ++){ if(a[j] == 1) tmp = tmp.add(b[i][j]); } int flag = 0; BigInteger j = BigInteger.valueOf(2); BigInteger one = BigInteger.valueOf(1); BigInteger zero = BigInteger.valueOf(0); BigInteger INF = BigInteger.valueOf(10000); for(; j.multiply(j).compareTo(tmp) <= 0 && j.compareTo(INF) <= 0; j = j.add(one)){ if(tmp.mod(j).compareTo(zero) == 0){ ans[i] = j; flag = 1; break; } } if(flag == 0) break; } if(i == 11){ num ++; for(int j = 31; j >= 0; j --) System.out.print(a[j]); for(int j = 2; j <= 10; j ++) System.out.print(" " + ans[j]); System.out.println(); } return; } a[step] = 0; dfs(step + 1); a[step] = 1; dfs(step + 1); } } /* 这里本来想要用程序写来计算置换群中循环个数的,但是有点麻烦,可以直接手工计算。- - * 喔... * 题目中还有说到反射。再讨论一下。 */
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
fd18185798017bce7c1843c0a3747ee73fa221b1
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hazelcast/2016/12/QueueSplitBrainTest.java
254f154231653ad24e4ee9a1453be16661d19129
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
4,494
java
package com.hazelcast.collection.impl.queue; import com.hazelcast.config.Config; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.IQueue; import com.hazelcast.core.LifecycleEvent; import com.hazelcast.core.LifecycleListener; import com.hazelcast.core.MemberAttributeEvent; import com.hazelcast.core.MembershipEvent; import com.hazelcast.core.MembershipListener; import com.hazelcast.instance.HazelcastInstanceFactory; import com.hazelcast.spi.properties.GroupProperty; import com.hazelcast.test.HazelcastSerialClassRunner; import com.hazelcast.test.HazelcastTestSupport; import com.hazelcast.test.annotation.NightlyTest; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import java.io.IOException; import java.util.concurrent.CountDownLatch; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @RunWith(HazelcastSerialClassRunner.class) @Category(NightlyTest.class) public class QueueSplitBrainTest extends HazelcastTestSupport { @Before @After public void killAllHazelcastInstances() throws IOException { HazelcastInstanceFactory.shutdownAll(); } @Test public void testQueueSplitBrain() throws InterruptedException { Config config = newConfig(); HazelcastInstance h1 = Hazelcast.newHazelcastInstance(config); HazelcastInstance h2 = Hazelcast.newHazelcastInstance(config); HazelcastInstance h3 = Hazelcast.newHazelcastInstance(config); final String name = generateKeyOwnedBy(h1); IQueue<Object> queue = h1.getQueue(name); TestMemberShipListener memberShipListener = new TestMemberShipListener(2); h3.getCluster().addMembershipListener(memberShipListener); TestLifeCycleListener lifeCycleListener = new TestLifeCycleListener(1); h3.getLifecycleService().addLifecycleListener(lifeCycleListener); for (int i = 0; i < 100; i++) { queue.add("item" + i); } waitAllForSafeState(); closeConnectionBetween(h1, h3); closeConnectionBetween(h2, h3); assertOpenEventually(memberShipListener.latch); assertClusterSizeEventually(2, h1); assertClusterSizeEventually(2, h2); assertClusterSizeEventually(1, h3); for (int i = 100; i < 200; i++) { queue.add("item" + i); } IQueue<Object> queue3 = h3.getQueue(name); for (int i = 0; i < 50; i++) { queue3.add("lostQueueItem" + i); } assertOpenEventually(lifeCycleListener.latch); assertClusterSizeEventually(3, h1); assertClusterSizeEventually(3, h2); assertClusterSizeEventually(3, h3); IQueue<Object> testQueue = h1.getQueue(name); assertFalse(testQueue.contains("lostQueueItem0")); assertFalse(testQueue.contains("lostQueueItem49")); assertTrue(testQueue.contains("item0")); assertTrue(testQueue.contains("item199")); assertTrue(testQueue.contains("item121")); assertTrue(testQueue.contains("item45")); } private Config newConfig() { Config config = new Config(); config.setProperty(GroupProperty.MERGE_FIRST_RUN_DELAY_SECONDS.getName(), "30"); config.setProperty(GroupProperty.MERGE_NEXT_RUN_DELAY_SECONDS.getName(), "3"); return config; } private class TestLifeCycleListener implements LifecycleListener { CountDownLatch latch; TestLifeCycleListener(int countdown) { this.latch = new CountDownLatch(countdown); } @Override public void stateChanged(LifecycleEvent event) { if (event.getState() == LifecycleEvent.LifecycleState.MERGED) { latch.countDown(); } } } private class TestMemberShipListener implements MembershipListener { final CountDownLatch latch; TestMemberShipListener(int countdown) { this.latch = new CountDownLatch(countdown); } @Override public void memberAdded(MembershipEvent membershipEvent) { } @Override public void memberRemoved(MembershipEvent membershipEvent) { latch.countDown(); } @Override public void memberAttributeChanged(MemberAttributeEvent memberAttributeEvent) { } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
f9d15189b179d31a68ae9bfe9b655875a9ad78e5
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/bazaar8.apk-decompiled/sources/androidx/preference/CheckBoxPreference.java
ac8c72109bdf435bbf59e5ac983258040cab8127
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
2,664
java
package androidx.preference; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.view.View; import android.view.accessibility.AccessibilityManager; import android.widget.Checkable; import android.widget.CompoundButton; import b.i.b.a.i; import b.x.B; import b.x.C; import b.x.I; public class CheckBoxPreference extends TwoStatePreference { public final a S; private class a implements CompoundButton.OnCheckedChangeListener { public a() { } public void onCheckedChanged(CompoundButton compoundButton, boolean z) { if (!CheckBoxPreference.this.a((Object) Boolean.valueOf(z))) { compoundButton.setChecked(!z); } else { CheckBoxPreference.this.d(z); } } } public CheckBoxPreference(Context context, AttributeSet attributeSet, int i2) { this(context, attributeSet, i2, 0); } public void a(B b2) { super.a(b2); c(b2.c(16908289)); b(b2); } public final void c(View view) { boolean z = view instanceof CompoundButton; if (z) { ((CompoundButton) view).setOnCheckedChangeListener(null); } if (view instanceof Checkable) { ((Checkable) view).setChecked(this.P); } if (z) { ((CompoundButton) view).setOnCheckedChangeListener(this.S); } } public final void d(View view) { if (((AccessibilityManager) h().getSystemService("accessibility")).isEnabled()) { c(view.findViewById(16908289)); b(view.findViewById(16908304)); } } public CheckBoxPreference(Context context, AttributeSet attributeSet, int i2, int i3) { super(context, attributeSet, i2, i3); this.S = new a(); TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, I.CheckBoxPreference, i2, i3); d((CharSequence) i.b(obtainStyledAttributes, I.CheckBoxPreference_summaryOn, I.CheckBoxPreference_android_summaryOn)); c(i.b(obtainStyledAttributes, I.CheckBoxPreference_summaryOff, I.CheckBoxPreference_android_summaryOff)); e(i.a(obtainStyledAttributes, I.CheckBoxPreference_disableDependentsState, I.CheckBoxPreference_android_disableDependentsState, false)); obtainStyledAttributes.recycle(); } public void a(View view) { super.a(view); d(view); } public CheckBoxPreference(Context context, AttributeSet attributeSet) { this(context, attributeSet, i.a(context, C.checkBoxPreferenceStyle, 16842895)); } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
11c7cec7aa220184835314f71cf18203ec425328
1c8c61bef26ee827d6e9568c24996c1d81c08c17
/src/main/java/com/looseboxes/webform/web/WebRequest.java
15684015ffac7d7eb21b76126e89c0280be400df
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
missaouib/webform
5b425a81deb246d691969bd5e88549e0d83a456c
960832908239adc7a4c8e278d19040895c2a1a6e
refs/heads/master
2023-08-02T07:39:50.566834
2021-09-15T21:13:05
2021-09-15T21:13:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
544
java
package com.looseboxes.webform.web; import java.util.List; import java.util.Locale; import java.util.Map; import org.springframework.web.multipart.MultipartFile; /** * @author hp */ public interface WebRequest<T> { String getSessionId(); String getParameter(String name); String [] getParameterValues(String name); boolean hasFiles(); Map<String, MultipartFile> getFiles(); Locale getLocale(); Map<String, List<MultipartFile>> getMultiValueFiles(); }
[ "posh.bc@gmail.com" ]
posh.bc@gmail.com
2028300c70666494f484a331befb033f41a29c14
042342f9dc0e8662a1a7da671ab5dc9d82ccd835
/esb/org.wso2.developerstudio.eclipse.gmf.esb/src/org/wso2/developerstudio/eclipse/gmf/esb/HTTPEndPointOutputConnector.java
5f8e3c505b1b47985493f385a87357614539ecd1
[ "Apache-2.0" ]
permissive
ksdperera/developer-studio
6fe6d50a66e4fb73de3a4dbeef8d68b461da1ab6
9c0f601b91cc34dda036c660598a93c232260e08
refs/heads/developer-studio-3.8.0
2021-01-15T08:50:21.571267
2018-10-26T12:59:17
2018-10-26T12:59:17
39,486,894
0
1
Apache-2.0
2018-10-26T12:59:18
2015-07-22T05:13:13
Java
UTF-8
Java
false
false
1,047
java
/** * Copyright 2009-2012 WSO2, Inc. (http://wso2.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.wso2.developerstudio.eclipse.gmf.esb; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>HTTP End Point Output Connector</b></em>'. * <!-- end-user-doc --> * * * @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getHTTPEndPointOutputConnector() * @model * @generated */ public interface HTTPEndPointOutputConnector extends OutputConnector { } // HTTPEndPointOutputConnector
[ "harshana@wso2.com" ]
harshana@wso2.com
0b55be82de8fc29876a216b858069619b0db4fa9
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
/schemaOrgGson/src/org/kyojo/schemaOrg/m3n3/gson/core/mapCategoryType/SeatingMapDeserializer.java
e32feb3e23f5cd9b3501903d2fdd4fc73f21cde1
[ "Apache-2.0" ]
permissive
nagaikenshin/schemaOrg
3dec1626781913930da5585884e3484e0b525aea
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
refs/heads/master
2021-06-25T04:52:49.995840
2019-05-12T06:22:37
2019-05-12T06:22:37
134,319,974
1
0
null
null
null
null
UTF-8
Java
false
false
2,084
java
package org.kyojo.schemaorg.m3n3.gson.core.mapCategoryType; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; import org.kyojo.gson.JsonDeserializationContext; import org.kyojo.gson.JsonDeserializer; import org.kyojo.gson.JsonElement; import org.kyojo.gson.JsonObject; import org.kyojo.gson.JsonParseException; import org.kyojo.gson.reflect.TypeToken; import org.kyojo.schemaorg.m3n3.core.mapCategoryType.SEATING_MAP; import org.kyojo.schemaorg.m3n3.core.MapCategoryType.SeatingMap; public class SeatingMapDeserializer implements JsonDeserializer<SeatingMap> { @Override public SeatingMap deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { if(jsonElement.isJsonPrimitive()) { return new SEATING_MAP(jsonElement.getAsString()); } JsonObject jsonObject = jsonElement.getAsJsonObject(); SeatingMap obj = new SEATING_MAP(); HashMap<String, Field> fldMap = new HashMap<>(); Field[] flds = SEATING_MAP.class.getFields(); for(Field fld : flds) { fldMap.put(fld.getName(), fld); } for(Entry<String, JsonElement> ent : jsonObject.entrySet()) { if(fldMap.containsKey(ent.getKey())) { Field fld = fldMap.get(ent.getKey()); JsonElement elm = ent.getValue(); try { if(fld.getType().equals(List.class)) { ParameterizedType gType = (ParameterizedType)fld.getGenericType(); Type[] aTypes = gType.getActualTypeArguments(); Type listType = TypeToken.getParameterized(ArrayList.class, (Class<?>)aTypes[0]).getType(); List<?> list = context.deserialize(elm, listType); fld.set(obj, list); } else { Object val = context.deserialize(elm, fld.getType()); fld.set(obj, val); } } catch(IllegalArgumentException iae) { throw new JsonParseException(iae); } catch(IllegalAccessException iae) { throw new JsonParseException(iae); } } } return obj; } }
[ "nagai@nagaikenshin.com" ]
nagai@nagaikenshin.com
a15f48a9afb610005e5a1bda06021ce942f2ba30
f715b1253b42bc618670f0a84ef6d116583d9eaa
/badugi-game-logic/src/main/java/com/badugi/game/logic/model/vo/api/match/TicketNum.java
6e957fe71cae8d0d8be780868f1dcc8f0ee88938
[ "MIT" ]
permissive
cietwwl/BadugiPokerServer
acf282544a2811be436f27abb52a1ace22712051
0b494f80d846fcb2e9db26721bd09add7d674783
refs/heads/master
2020-03-17T18:29:08.353095
2016-01-18T02:46:46
2016-01-18T02:46:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
package com.badugi.game.logic.model.vo.api.match; import java.io.Serializable; public class TicketNum implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private Integer tp ; private Integer tc; public Integer getTp() { return tp; } public void setTp(Integer tp) { this.tp = tp; } public Integer getTc() { return tc; } public void setTc(Integer tc) { this.tc = tc; } }
[ "wtuickqmq@163.com" ]
wtuickqmq@163.com
2f0ee07c7ca32d6d39c683c78b764a9a932ed76c
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-31b-6-29-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/distribution/AbstractIntegerDistribution_ESTest_scaffolding.java
0c31992014246db6963e532aaa38aca5be96f203
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
469
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Jan 18 21:23:38 UTC 2020 */ package org.apache.commons.math3.distribution; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractIntegerDistribution_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
09417075473ab1016fb9ebd22b9fdd613521c7c5
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/cloudvoip/cloudvoice/service/p.java
6b3d485ccd5edd74e88e229db0947d5099faab34
[]
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
464
java
package com.tencent.mm.plugin.cloudvoip.cloudvoice.service; public final class p { static int wUT; static int wUU; static int wUV; static int wUW; static int wUX; static int wUY; static int wUZ; static int wVa; static int wVb; } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes8.jar * Qualified Name: com.tencent.mm.plugin.cloudvoip.cloudvoice.service.p * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
42ea42a1c9a4204cf0a52ba0b6ab3fc1971108bf
2be34d47600854fd13b003bca430c97feaa340a8
/springcloud/consumer-feign/src/main/java/com/zuql/consumerfeign/Controller/HelloController.java
f4c267a0cff27942ae7da8a211b44e4661e18fab
[]
no_license
zuql/demo
1a99b58bb86cd8c4b6ec72d84644cb02bbaf1ac5
c06ad8cb8647609b790eaf31af66accd6efdf11b
refs/heads/master
2020-05-05T09:58:10.567402
2019-05-21T15:25:10
2019-05-21T15:25:10
179,924,817
0
0
null
null
null
null
UTF-8
Java
false
false
490
java
package com.zuql.consumerfeign.Controller; import com.zuql.consumerfeign.client.EurekaServiceFeign; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController public class HelloController { @Autowired public EurekaServiceFeign eurekaServiceFeign; @GetMapping("/hello/{name}") @ResponseBody public String hello(@PathVariable String name){ return eurekaServiceFeign.hello(name); } }
[ "17712743419@163.com" ]
17712743419@163.com
13a0587c6752d1e7aa8dcf41478bd333791b780e
1f8498c886dedd9cd9cb5296f25a5a4962abb6d4
/stack-server/src/main/java/com/inductiveautomation/opcua/stack/server/handlers/UaTcpServerHelloHandler.java
ada417f8f067da6293a68d2a02a82809b5cc47cf
[ "Apache-2.0" ]
permissive
doutdex/opc-ua-stack
ea6c98f6ee92b48ee3f8778c75b37bcb5c221044
a577af239a255a9de784ceded1be5b638aaccefa
refs/heads/master
2021-01-17T21:53:09.912599
2015-02-16T14:28:09
2015-02-16T14:28:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,950
java
package com.inductiveautomation.opcua.stack.server.handlers; import java.io.IOException; import java.nio.ByteOrder; import java.util.List; import com.google.common.primitives.Ints; import com.inductiveautomation.opcua.stack.core.StatusCodes; import com.inductiveautomation.opcua.stack.core.UaException; import com.inductiveautomation.opcua.stack.core.channel.ChannelConfig; import com.inductiveautomation.opcua.stack.core.channel.ChannelParameters; import com.inductiveautomation.opcua.stack.core.channel.ExceptionHandler; import com.inductiveautomation.opcua.stack.core.channel.SerializationQueue; import com.inductiveautomation.opcua.stack.core.channel.headers.HeaderDecoder; import com.inductiveautomation.opcua.stack.core.channel.messages.AcknowledgeMessage; import com.inductiveautomation.opcua.stack.core.channel.messages.ErrorMessage; import com.inductiveautomation.opcua.stack.core.channel.messages.HelloMessage; import com.inductiveautomation.opcua.stack.core.channel.messages.MessageType; import com.inductiveautomation.opcua.stack.core.channel.messages.TcpMessageDecoder; import com.inductiveautomation.opcua.stack.core.channel.messages.TcpMessageEncoder; import com.inductiveautomation.opcua.stack.server.tcp.SocketServer; import com.inductiveautomation.opcua.stack.server.tcp.UaTcpServer; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.util.AttributeKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class UaTcpServerHelloHandler extends ByteToMessageDecoder implements HeaderDecoder { public static final AttributeKey<String> ENDPOINT_URL_KEY = AttributeKey.valueOf("endpoint-url"); private final Logger logger = LoggerFactory.getLogger(getClass()); private final SocketServer socketServer; public UaTcpServerHelloHandler(SocketServer socketServer) { this.socketServer = socketServer; } @Override protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> out) throws Exception { buffer = buffer.order(ByteOrder.LITTLE_ENDIAN); while (buffer.readableBytes() >= HeaderLength && buffer.readableBytes() >= getMessageLength(buffer)) { int messageLength = getMessageLength(buffer); MessageType messageType = MessageType.fromMediumInt(buffer.getMedium(buffer.readerIndex())); switch (messageType) { case Hello: onHello(ctx, buffer.readSlice(messageLength)); break; default: throw new UaException(StatusCodes.Bad_TcpMessageTypeInvalid, "unexpected MessageType: " + messageType); } } } private void onHello(ChannelHandlerContext ctx, ByteBuf buffer) throws UaException { logger.debug("[remote={}] Received Hello message.", ctx.channel().remoteAddress()); HelloMessage hello = TcpMessageDecoder.decodeHello(buffer); UaTcpServer server = socketServer.getServer(hello.getEndpointUrl()); if (server == null) { throw new UaException(StatusCodes.Bad_TcpEndpointUrlInvalid, "unrecognized endpoint url: " + hello.getEndpointUrl()); } ctx.channel().attr(ENDPOINT_URL_KEY).set(hello.getEndpointUrl()); long remoteProtocolVersion = hello.getProtocolVersion(); long remoteReceiveBufferSize = hello.getReceiveBufferSize(); long remoteSendBufferSize = hello.getSendBufferSize(); long remoteMaxMessageSize = hello.getMaxMessageSize(); long remoteMaxChunkCount = hello.getMaxChunkCount(); if (remoteProtocolVersion < PROTOCOL_VERSION) { throw new UaException(StatusCodes.Bad_ProtocolVersionUnsupported, "unsupported protocol version: " + remoteProtocolVersion); } ChannelConfig config = server.getChannelConfig(); /* Our receive buffer size is determined by the remote send buffer size. */ long localReceiveBufferSize = Math.min(remoteSendBufferSize, config.getMaxChunkSize()); /* Our send buffer size is determined by the remote receive buffer size. */ long localSendBufferSize = Math.min(remoteReceiveBufferSize, config.getMaxChunkSize()); /* Max message size the remote can send us; not influenced by remote configuration. */ long localMaxMessageSize = config.getMaxMessageSize(); /* Max chunk count the remote can send us; not influenced by remote configuration. */ long localMaxChunkCount = config.getMaxChunkCount(); ChannelParameters parameters = new ChannelParameters( Ints.saturatedCast(localMaxMessageSize), Ints.saturatedCast(localReceiveBufferSize), Ints.saturatedCast(localSendBufferSize), Ints.saturatedCast(localMaxChunkCount), Ints.saturatedCast(remoteMaxMessageSize), Ints.saturatedCast(remoteReceiveBufferSize), Ints.saturatedCast(remoteSendBufferSize), Ints.saturatedCast(remoteMaxChunkCount) ); int maxArrayLength = config.getMaxArrayLength(); int maxStringLength = config.getMaxStringLength(); SerializationQueue serializationQueue = new SerializationQueue(parameters, maxArrayLength, maxStringLength); ctx.pipeline().addLast(new UaTcpServerAsymmetricHandler(server, serializationQueue)); ctx.pipeline().remove(this); logger.debug("[remote={}] Removed HelloHandler, added AsymmetricHandler.", ctx.channel().remoteAddress()); AcknowledgeMessage acknowledge = new AcknowledgeMessage( PROTOCOL_VERSION, localReceiveBufferSize, localSendBufferSize, localMaxMessageSize, localMaxChunkCount ); ByteBuf messageBuffer = TcpMessageEncoder.encode(acknowledge); ctx.executor().execute(() -> ctx.writeAndFlush(messageBuffer)); logger.debug("[remote={}] Sent Acknowledge message.", ctx.channel().remoteAddress()); } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof IOException) { ctx.close(); logger.debug("[remote={}] IOException caught; channel closed"); } else { ErrorMessage errorMessage = ExceptionHandler.sendErrorMessage(ctx, cause); if (cause instanceof UaException) { logger.debug("[remote={}] UaException caught; sent {}", ctx.channel().remoteAddress(), errorMessage, cause); } else { logger.error("[remote={}] Exception caught; sent {}", ctx.channel().remoteAddress(), errorMessage, cause); } } } }
[ "kevinherron@gmail.com" ]
kevinherron@gmail.com
e510ad5b5d296c322af379e272900e6fb25873aa
3bb9e1a187cb72e2620a40aa208bf94e5cee46f5
/mobile_catalog/src/ong/eu/soon/mobile/json/ifx/element/ClientApp.java
cbb246b2f8f8ecf3ffa4a96ae4e93857d0c2340c
[]
no_license
eusoon/Mobile-Catalog
2e6f766864ea25f659f87548559502358ac5466c
869d7588447117b751fcd1387cd84be0bd66ef26
refs/heads/master
2021-01-22T23:49:12.717052
2013-12-10T08:22:20
2013-12-10T08:22:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
712
java
package ong.eu.soon.mobile.json.ifx.element; import ong.eu.soon.mobile.json.ifx.basetypes.IFXObject; public class ClientApp extends IFXObject { protected ClientApp(){ } public final native Org getOrg()/*-{ return $wnd.cleanObject(this.org); }-*/; public final native void setOrg(Org org)/*-{ this.org = org; }-*/; public final native Name getName()/*-{ return $wnd.cleanObject(this.name); }-*/; public final native void setName(Name name)/*-{ this.name = name; }-*/; public final native Version getVersion()/*-{ return $wnd.cleanObject(this.version); }-*/; public final native void setVersion(Version version)/*-{ this.version = version; }-*/; }
[ "eusoon@gmail.com" ]
eusoon@gmail.com
95079583db6927f820e092bbe3a31757cc2fbc61
2312f810c8429264f5000070df03557437aaf8b3
/app/src/main/java/com/test/shileiyu/jetpack/common/widget/AppBarDampingBehavior.java
35ddade4d8c777bee7e7bd49ff04f72a4cc2213e
[]
no_license
yushilei1218/JetPack
002d6d3469a478523cff9ff0e23118209e245b33
9f7366f820aa7bfe95c088ec26dba76c39af13b2
refs/heads/master
2020-03-26T10:50:01.986030
2018-11-19T06:25:47
2018-11-19T06:25:47
144,817,332
0
0
null
null
null
null
UTF-8
Java
false
false
1,849
java
package com.test.shileiyu.jetpack.common.widget; import android.content.Context; import android.support.design.widget.AppBarLayout; import android.support.design.widget.CoordinatorLayout; import android.util.AttributeSet; import android.util.Log; import android.view.View; /** * @author shilei.yu * @date 2018/8/20 */ public class AppBarDampingBehavior extends AppBarLayout.Behavior { public AppBarDampingBehavior() { } public AppBarDampingBehavior(Context context, AttributeSet attrs) { super(context, attrs); } String TAG = "AppBarDampingBehavior"; @Override public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, View target, int dx, int dy, int[] consumed, int type) { boolean isNeedDamping = false; int temp = dy; if (dy < 0) { //向下滑动 并且Header露出的高度小于自身,则需要进行阻尼滑动 int appBarHeight = child.getHeight(); int offset = getTopAndBottomOffset(); if (offset < 0 && appBarHeight > -offset) { isNeedDamping = true; dy = (int) (dy * 0.7f); } Log.d(TAG, "offset " + offset + " appBar " + appBarHeight); } super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type); Log.d(TAG, "consumed1 " + consumed[1]); if (isNeedDamping) { consumed[1] = (int) (dy*0.7f); } } @Override public void onNestedScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int type) { super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type); } }
[ "shilei.yu@zhaopin.com.cn" ]
shilei.yu@zhaopin.com.cn
a2a20269507c936954dbcff356dc0ac47b3719b3
18746f023c89bf7571a3595b2aaebf56cbc57c6b
/app/src/main/java/spfworld/spfworld/activity/StoreSerchListActivity.java
290187383bc04161b9dc35e226810680c7275716
[]
no_license
RRrongrui/aveve
9218cf06e029c840ffedb598b26c1f54d3ea34d2
c87aa3d246d71003840ac6489e7fb8c62417e69b
refs/heads/master
2021-01-11T01:46:46.888913
2016-10-12T05:18:43
2016-10-12T05:18:43
70,665,345
0
0
null
null
null
null
UTF-8
Java
false
false
2,655
java
package spfworld.spfworld.activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v7.app.AppCompatActivity; import android.util.Log; import java.util.ArrayList; import java.util.List; import spfworld.spfworld.R; import spfworld.spfworld.fragment.find.store.LinkWebViewFragment; import spfworld.spfworld.fragment.find.store.StoreDetailFragment; import spfworld.spfworld.fragment.find.store.StoreSearchFragment; /** * Created by guozhengke on 2016/9/27. */ public class StoreSerchListActivity extends AppCompatActivity { private FragmentManager FM; public Handler handler; private List<Fragment> FGList; private final int MAIN_CONTENT_SPACE_ID=R.id.store_serch_fragment; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.store_serch_activity); //fragment切换 FM=getSupportFragmentManager(); FGList=iniFragmentList(); setFGshow(0); //handler传值 handler=new Handler(){ @Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what){ case 0: setFGshow(0); break; } } }; } /** * 按下标显示Fragment * * @param index */ public void setFGshow(int index) { FragmentTransaction FT = FM.beginTransaction(); if (index < FGList.size()) { for (int i = 0; i < FGList.size(); i++) { if (index == i) { FT.show(FGList.get(i)); } else { FT.hide(FGList.get(i)); } } } else { // Log.e("StoreDetailActivity", "下标越界没有此页面"); } FT.commit(); } /** * 初始化Fragment将Fragment添加到事务中去 */ public List<Fragment> iniFragmentList() { List<Fragment> list = new ArrayList<Fragment>(); FragmentTransaction FT = FM.beginTransaction(); //商品搜索 StoreSearchFragment storeSearchFragment=new StoreSearchFragment(); FT.add(MAIN_CONTENT_SPACE_ID,storeSearchFragment,"商品搜索_TAG=0"); FT.commit(); list.add(storeSearchFragment); return list; } }
[ "rongrui4918@163.com" ]
rongrui4918@163.com
87c5b9168e035af2c9568d3b69bb31d5a07aee7b
ccc3268554528f5ed5cc119bbd88cfc45b55691d
/dist/gameserver/data/scripts/quests/_097_SagaOfTheShillienTemplar.java
bc0b232a65ddb40162f0656cc9a6758c688cd109
[]
no_license
trickititit/java-source
447ea16c2892377a4625f742118ebfd4e3116848
724453441846ce44e65372100a70770f21572837
refs/heads/master
2021-01-18T09:38:01.836585
2016-09-17T17:43:34
2016-09-17T17:43:34
68,445,261
0
1
null
null
null
null
UTF-8
Java
false
false
2,728
java
package quests; import l2p.gameserver.scripts.ScriptFile; public class _097_SagaOfTheShillienTemplar extends SagasSuperclass implements ScriptFile { @Override public void onLoad() { } @Override public void onReload() { } @Override public void onShutdown() { } public _097_SagaOfTheShillienTemplar() { super(false); NPC = new int[]{ 31580, 31623, 31285, 31285, 31610, 31646, 31648, 31652, 31654, 31655, 31659, 31285 }; Items = new int[]{ 7080, 7526, 7081, 7512, 7295, 7326, 7357, 7388, 7419, 7450, 7091, 0 }; Mob = new int[]{ 27271, 27246, 27273 }; classid = 106; prevclass = 0x21; X = new int[]{ 161719, 124355, 124376 }; Y = new int[]{ -92823, 82155, 82127 }; Z = new int[]{ -1893, -2803, -2796 }; Text = new String[]{ "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", "I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!", "Paying homage to those who disrupt the orderly will be PLAYERNAME's death!", "Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...", "Why do you interfere others' battles?", "This is a waste of time.. Say goodbye...!", "...That is the enemy", "...Goodness! PLAYERNAME you are still looking?", "PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.", "Your sword is not an ornament. Don't you think, PLAYERNAME?", "Goodness! I no longer sense a battle there now.", "let...", "Only engaged in the battle to bar their choice. Perhaps you should regret.", "The human nation was foolish to try and fight a giant's strength.", "Must...Retreat... Too...Strong.", "PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker", "....! Fight...Defeat...It...Fight...Defeat...It..." }; registerNPCs(); } }
[ "trickititit@gmail.com" ]
trickititit@gmail.com
f3532f204ad1e076e423ca9afb3de817014c9ab9
801c39e8bbeee2e25ed1ba2b74aa039f8b3d62ae
/fizteh-java-2014/src/ru/fizteh/fivt/students/SergeyAksenov/JUnit/PutCommand.java
6bf9db02af2da110dba9a73cd994168b7adc4f28
[]
no_license
grapefroot/mipt
2f6572b3120e28a0e63e28f2542782520384828f
51d13fa07b37bdbdda943bd47d7e356a3a126177
refs/heads/master
2020-12-24T21:12:03.706690
2016-11-08T07:40:20
2016-11-08T07:40:20
56,529,254
1
0
null
null
null
null
UTF-8
Java
false
false
781
java
package ru.fizteh.fivt.students.SergeyAksenov.JUnit; public class PutCommand implements Command { public void run(String[] args, JUnitTableProvider tableProvider) throws IllegalArgumentException { if (!Executor.checkArgNumber(3, args.length, 3)) { System.out.println("Invalid number of arguments"); return; } JUnitTable currentTable = tableProvider.getCurrentTable(); if (currentTable == null) { System.out.println("no table"); return; } String oldValue = currentTable.put(args[1], args[2]); if (oldValue != null) { System.out.println("new"); return; } System.out.println("overwrite"); System.out.println(oldValue); } }
[ "salnikov.dmitri@gmail.com" ]
salnikov.dmitri@gmail.com
882d8fe896414880ce011bf114ae7d9e26870c85
b844043af2a13e24c9a322dbb4afc51af7cf8dcc
/ib-terminal-server/src/main/java/com/henyep/ib/terminal/server/dao/SystemParamsDao.java
eb219a5a0a8859f794c093acc22545045438677f
[]
no_license
oscarYeung/ib_terminal
37b372ab9d33f4b029ee9a02bc519c0cc7e31c38
c83e464752e45aa356f1aad24ed2f2f5066b2e90
refs/heads/master
2022-12-24T04:49:03.603352
2019-12-11T04:09:26
2019-12-11T04:09:26
218,199,664
1
2
null
2022-12-16T09:45:08
2019-10-29T03:49:19
Java
UTF-8
Java
false
false
1,349
java
package com.henyep.ib.terminal.server.dao; import java.util.List; import com.henyep.ib.terminal.api.dto.db.SystemParamsBean; import com.henyep.ib.terminal.server.dto.mt4.model.Mt4WebServiceConnectionModel; import com.henyep.ib.terminal.server.dto.mt4.model.Mt5WebServiceConnectionModel; public interface SystemParamsDao { public void saveSystemParams(final SystemParamsBean systemParams) throws Exception; public List<SystemParamsBean> getAllSystemParamss() throws Exception; public List<SystemParamsBean> getSystemParamsByKey(String name) throws Exception; public int updateSystemParams(SystemParamsBean systemParams) throws Exception; public int deleteSystemParams(String name) throws Exception; public Double getMinMarginOutAmount() throws Exception; public Integer getFreeMarginOutCount() throws Exception; public Double getSubsequentMarginOutFee() throws Exception; public boolean isDataSyncRunning() throws Exception; public boolean isUpdatingIbCommission() throws Exception; public boolean sendEmailNewUserRequestMarginOut() throws Exception; public int updateSystemParamValue(String key, String value, String updatedBy) throws Exception; public Mt4WebServiceConnectionModel getMt4ServiceConnectionModel() throws Exception; public Mt5WebServiceConnectionModel getMt5ServiceConnectionModel() throws Exception; }
[ "oscar.yeung@gmail.com" ]
oscar.yeung@gmail.com
514f436981c2cd16bd4c7d80e4b9e206432ea449
b000bff55fa78503ade27051859489d448fe3d22
/singleton-pattern/src/main/java/register/EnumSingleton.java
eb1a39af224a89bd231ab08dfee515b929f1b164
[]
no_license
yourant/design-patterns
a90119206056d9340fd1ecebf22d5df66c9102f1
eff196951c36b2e8f51e2aea3cdfbda6044d3135
refs/heads/master
2023-09-01T21:00:12.586960
2021-10-24T15:42:20
2021-10-24T15:42:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,678
java
package register; import annotations.ThreadSafe; import lombok.Getter; import lombok.Setter; import java.io.*; /** * Created by qincasin on 2020/2/13. * 注册式单例模式 * */ @ThreadSafe public enum EnumSingleton { /** * */ INSTANCE; @Setter @Getter private Object data; public static EnumSingleton getInstance() { return INSTANCE; } /** * 枚举类单例模式 序列化 反序列化 测试 T * 枚举类实现方式: 内部通过静态代码块给instance 进行赋值 是饿汉式的单例模式 * @param args * @throws IOException * @throws ClassNotFoundException */ public static void main(String[] args) throws IOException, ClassNotFoundException { EnumSingleton instance1 = null; EnumSingleton instance2 = EnumSingleton.getInstance(); instance2.setData(new Object()); FileOutputStream fileOutputStream = new FileOutputStream("EnumSingleton.obj"); ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream); objectOutputStream.writeObject(instance2); objectOutputStream.flush(); objectOutputStream.close(); FileInputStream fileInputStream = new FileInputStream("EnumSingleton.obj"); ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream); instance1 = (EnumSingleton) objectInputStream.readObject(); fileInputStream.close(); System.out.println("test1111"); System.out.println(instance1.getData()); System.out.println(instance2.getData()); System.out.println(instance1 == instance2); } }
[ "qincasin@163.com" ]
qincasin@163.com
a9b377d466a9b8e4aa9f1a9dd52c09a1163ec611
22b1f967750c313d8a2e6fc255fd3bca9f13c290
/DynamicProgramming/300_LongestIncreasingSubsequence.java
5a074591141ed30b8c13a6f6799c2c742f302300
[ "MIT" ]
permissive
robin-qu/Leetcode
333e997f1779fe41cbd4b0e057631454c1f37d13
9178287a7cc8fac7adb0e9bfd8d4771cd151d4a6
refs/heads/master
2021-06-24T18:49:25.879307
2021-01-21T05:28:20
2021-01-21T05:28:20
178,751,405
0
0
null
null
null
null
UTF-8
Java
false
false
1,925
java
// // DP // class Solution { // public int lengthOfLIS(int[] nums) { // if (nums == null || nums.length == 0) { // return 0; // } // int len = nums.length; // int[] dp = new int[len]; // for (int i = 0; i < len; i++) { // dp[i] = 1; // } // for (int i = 0; i < len; i++) { // for (int j = 0; j < i; j++) { // if (nums[j] < nums[i]) { // dp[i] = Math.max(dp[i], dp[j] + 1); // } // } // } // int res = Integer.MIN_VALUE; // for (int i = 0; i < len; i++) { // res = Math.max(res, dp[i]); // } // return res; // } // } // DP + Binary Search class Solution { public int lengthOfLIS(int[] nums) { if (nums == null || nums.length == 0) { return 0; } int len = nums.length; int[] dp = new int[len + 1]; dp[0] = Integer.MIN_VALUE; for (int i = 1; i < len + 1; i++) { dp[i] = Integer.MAX_VALUE; } for (int i = 0; i < len; i++) { int idx = binarySearch(dp, nums[i]); dp[idx] = nums[i]; } for (int i = len; i >= 0; i--) { if (dp[i] != Integer.MAX_VALUE) { return i; } } return 0; } private int binarySearch(int[] nums, int value) { int left = 0; int right = nums.length - 1; int mid; while (left + 1 < right) { mid = left + (right - left) / 2; if (value < nums[mid]) { right = mid; } else if (nums[mid] < value) { left = mid; } else { return mid; } } return right; } }
[ "hongbinqu9@gmail.com" ]
hongbinqu9@gmail.com
e2e82780af51354635c6f2427a5d01fc3bdebdb8
d58fdd61a0de45264f3327d97a00822acedcb0d0
/ProgettoViaggiProf/src/it/appviaggi/business/ConfiguratorePacchettoViaggio.java
661925da3b15ffa605a557011c3ad12203a50849
[ "MIT" ]
permissive
matteolia/itsrizzoli2k17
dcc62d3068941fce38b07372fc1beb9db074b812
c1629fb98c29488cdcc8b3442e049181fda089ec
refs/heads/master
2020-03-20T14:41:48.970130
2018-02-14T09:43:06
2018-02-14T09:43:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,181
java
package it.appviaggi.business; import java.util.ArrayList; import java.util.Date; import javax.persistence.EntityManager; import it.appviaggi.model.Luogo; import it.appviaggi.model.MezzoDiTrasporto; import it.appviaggi.model.PacchettoViaggio; import it.appviaggi.model.Pernottamento; import it.appviaggi.model.Struttura; import it.appviaggi.model.Tappa; import it.appviaggi.model.TipoCamera; import it.appviaggi.model.TipoSoggiorno; import it.appviaggi.model.TitoloDiViaggio; import it.appviaggi.model.Tragitto; public class ConfiguratorePacchettoViaggio { public PacchettoViaggio creaPacchettoViaggio(Date dataPartenza, Date dataArrivo, Luogo partenza, Luogo arrivo, int numeroPersone) { EntityManager em = JPAUtility.em(); em.getTransaction().begin(); PacchettoViaggio pv = new PacchettoViaggio(); em.persist(pv); pv.setPartenza(partenza); pv.setArrivo(arrivo); pv.setTappe(new ArrayList<>()); Tappa inizio = new Tappa(); inizio.setPacchettoViaggio(pv); Tragitto tragitto = new Tragitto(); tragitto.setDataPartenza(dataPartenza); inizio.setTragitto(tragitto); pv.getTappe().add(inizio); pv.setNumeroPersone(numeroPersone); Tragitto rientro = new Tragitto(); rientro.setDataArrivo(dataArrivo); pv.setViaggioDiRientro(rientro); pv.setCompletato(false); pv.setAnnullato(false); pv.setPagato(false); em.getTransaction().commit(); return pv; } public Pernottamento aggiungiPernottamentoATappa(Tappa tappa, Struttura struttura, Date dataArrivo, Date dataPartenza, int numeroPersone, TipoCamera tipoCamera, TipoSoggiorno tipoSoggiorno) { EntityManager em = JPAUtility.em(); em.getTransaction().begin(); Pernottamento p = new Pernottamento(); p.setDataArrivo(dataArrivo); p.setDataPartenza(dataPartenza); p.setNumeroPersone(numeroPersone); p.setStruttura(struttura); p.setTipoCamera(tipoCamera); p.setTipoSoggiorno(tipoSoggiorno); tappa.setPernottamento(p); em.getTransaction().commit(); return p; } public Tragitto aggiungiTragittoATappa(Tappa tappa, Date dataPartenza, Date dataArrivo, Luogo luogoPartenza, Luogo luogoArrivo, MezzoDiTrasporto mezzoDiTrasporto, String compagnia, String codiceBiglietto, double prezzo) { EntityManager em = JPAUtility.em(); em.getTransaction().begin(); Tragitto t = new Tragitto(); TitoloDiViaggio titoloDiViaggio = new TitoloDiViaggio(); titoloDiViaggio.setCodiceTitolo(codiceBiglietto); titoloDiViaggio.setCompagnia(compagnia); titoloDiViaggio.setMezzoDiTrasporto(mezzoDiTrasporto); titoloDiViaggio.setPrezzo(prezzo); t.setTitoloDiViaggio(titoloDiViaggio); t.setDataArrivo(dataArrivo); t.setDataPartenza(dataPartenza); t.setLuogoArrivo(luogoArrivo); t.setLuogoPartenza(luogoPartenza); tappa.setTragitto(t); em.getTransaction().commit(); return t; } public Tappa aggiungiNuovaTappa(Tappa tappaPrecedente) { Tappa t = new Tappa(); t.setPacchettoViaggio(tappaPrecedente.getPacchettoViaggio()); tappaPrecedente.getPacchettoViaggio().getTappe().add(t); return t; } }
[ "andrea@colleoni.info" ]
andrea@colleoni.info
196779d2dade9a264d6cee94a049c36f39926de7
0a94e4bb6bdf5c54ebba25cecafa72215266843a
/4.JavaCollections/src/com/javarush/task/task34/task3404/Solution.java
b9abfc8c1d1cc206ba12b792f2e4c76c43a9d9fa
[]
no_license
Senat77/JavaRush
8d8fb6e59375656a545825585118febd2e1637f4
68dc0139da96617ebcad967331dcd24f9875d8ee
refs/heads/master
2020-05-19T18:50:31.534629
2018-09-25T14:00:31
2018-09-25T14:00:31
185,160,609
0
0
null
null
null
null
UTF-8
Java
false
false
2,329
java
package com.javarush.task.task34.task3404; /* Рекурсия для мат. выражения На вход подается строка - математическое выражение. Выражение включает целые и дробные числа, скобки (), пробелы, знак отрицания -, возведение в степень ^, sin(x), cos(x), tan(x) Для sin(x), cos(x), tan(x) выражение внутри скобок считать градусами, например, cos(3 + 19*3)=0.5 Степень задается так: a^(1+3) и так a^4, что эквивалентно a*a*a*a. С помощью рекурсии вычислить выражение и количество математических операций. Вывести через пробел результат в консоль. Результат выводить с точностью до двух знаков, для 0.33333 вывести 0.33, использовать стандартный принцип округления. Знак отрицания перед числом также считать математической операцией. Не создавай в классе Solution дополнительные поля. Не пиши косвенную рекурсию. Пример, состоящий из операций sin * - + * +: sin(2*(-5+1.5*4)+28) Результат: 0.5 6 Пример, состоящий из операций tan ^: tan(2025 ^ 0.5) Результат: 1 2 Требования: 1. В классе Solution не должны быть созданы дополнительные поля. 2. Метод recursion должен выводить на экран результат вычисления заданного выражения (пример в условии). 3. Метод recursion не должен быть статическим. */ public class Solution { public static void main(String[] args) { Solution solution = new Solution(); solution.recursion("sin(2*(-5+1.5*4)+28)", 0); //expected output 0.5 6 } public void recursion(final String expression, int countOperation) { //implement } public Solution() { //don't delete } }
[ "sergii.senatorov@gmail.com" ]
sergii.senatorov@gmail.com
7f5de30c06b91bca9eca2115d742c5ae1d0bc049
746572ba552f7d52e8b5a0e752a1d6eb899842b9
/JDK8Source/src/main/java/com/sun/org/apache/xpath/internal/operations/Mod.java
bf5a1aa9db1859488430bfffa8e62ded6fae62b7
[]
no_license
lobinary/Lobinary
fde035d3ce6780a20a5a808b5d4357604ed70054
8de466228bf893b72c7771e153607674b6024709
refs/heads/master
2022-02-27T05:02:04.208763
2022-01-20T07:01:28
2022-01-20T07:01:28
26,812,634
7
5
null
null
null
null
UTF-8
Java
false
false
2,974
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 1999-2004 The Apache Software Foundation. * * 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. * <p> *  版权所有1999-2004 Apache软件基金会。 * *  根据Apache许可证2.0版("许可证")授权;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本 * *  http://www.apache.org/licenses/LICENSE-2.0 * *  除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。 * */ /* * $Id: Mod.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $ * <p> *  $ Id:Mod.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $ * */ package com.sun.org.apache.xpath.internal.operations; import com.sun.org.apache.xpath.internal.XPathContext; import com.sun.org.apache.xpath.internal.objects.XNumber; import com.sun.org.apache.xpath.internal.objects.XObject; /** * The 'mod' operation expression executer. * <p> *  'mod'操作表达式执行器。 * */ public class Mod extends Operation { static final long serialVersionUID = 5009471154238918201L; /** * Apply the operation to two operands, and return the result. * * * <p> *  将操作应用于两个操作数,并返回结果。 * * * @param left non-null reference to the evaluated left operand. * @param right non-null reference to the evaluated right operand. * * @return non-null reference to the XObject that represents the result of the operation. * * @throws javax.xml.transform.TransformerException */ public XObject operate(XObject left, XObject right) throws javax.xml.transform.TransformerException { return new XNumber(left.num() % right.num()); } /** * Evaluate this operation directly to a double. * * <p> *  直接将此操作评估为double。 * * @param xctxt The runtime execution context. * * @return The result of the operation as a double. * * @throws javax.xml.transform.TransformerException */ public double num(XPathContext xctxt) throws javax.xml.transform.TransformerException { return (m_left.num(xctxt) % m_right.num(xctxt)); } }
[ "919515134@qq.com" ]
919515134@qq.com
11047ee87cb3897d4672babd0da99ff38a0eb24e
5ca1beea9336b535104453e479ac4196857e1887
/aTalk/src/main/java/org/atalk/impl/androidtray/NotificationHelper.java
9826edccc61575320359c7e4567566de3c2e90c0
[ "Apache-2.0" ]
permissive
unoffices/atalk-android
0016cd0374b5fca2e9d056f14de9019015507f73
32e4e6e198fbc32a5ed3ebb1745713cfaa67a177
refs/heads/master
2021-01-06T16:23:02.249485
2020-02-13T23:59:51
2020-02-13T23:59:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,673
java
/* * aTalk, android VoIP and Instant Messaging client * Copyright 2014 Eng Chong Meng * * 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.atalk.impl.androidtray; import android.annotation.TargetApi; import android.app.*; import android.content.*; import android.graphics.Color; import android.os.Build; import android.provider.Settings; import org.atalk.android.R; import org.atalk.android.plugin.notificationwiring.AndroidNotifications; import java.util.List; import androidx.annotation.RequiresApi; /** * Helper class to manage notification channels, and create notifications. * * @author Eng Chong Meng */ public class NotificationHelper extends ContextWrapper { private NotificationManager manager; /** * Registers notification channels, which can be used later by individual notifications. * * @param ctx The application context */ public NotificationHelper(Context ctx) { super(ctx); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { // Delete any unused channel IDs deleteObsoletedChannelIds(); NotificationChannel nMessage = new NotificationChannel(AndroidNotifications.MESSAGE_GROUP, getString(R.string.noti_channel_MESSAGE_GROUP), NotificationManager.IMPORTANCE_LOW); // nMessage.setLightColor(Color.BLUE); nMessage.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); // nMessage.setAllowBubbles(true); getManager().createNotificationChannel(nMessage); NotificationChannel nFile = new NotificationChannel(AndroidNotifications.FILE_GROUP, getString(R.string.noti_channel_FILE_GROUP), NotificationManager.IMPORTANCE_LOW); // nFile.setLightColor(Color.GREEN); nFile.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); getManager().createNotificationChannel(nFile); NotificationChannel nCall = new NotificationChannel(AndroidNotifications.CALL_GROUP, getString(R.string.noti_channel_CALL_GROUP), NotificationManager.IMPORTANCE_LOW); // nCall.setLightColor(Color.CYAN); nCall.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC); getManager().createNotificationChannel(nCall); NotificationChannel nMissCall = new NotificationChannel(AndroidNotifications.MISSED_CALL, getString(R.string.noti_channel_MISSED_CALL), NotificationManager.IMPORTANCE_LOW); nMissCall.setLightColor(Color.RED); nMissCall.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); getManager().createNotificationChannel(nMissCall); NotificationChannel nDefault = new NotificationChannel(AndroidNotifications.DEFAULT_GROUP, getString(R.string.noti_channel_DEFAULT_GROUP), NotificationManager.IMPORTANCE_LOW); // nDefault.setLightColor(Color.WHITE); nDefault.setShowBadge(false); nDefault.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE); getManager().createNotificationChannel(nDefault); } } @TargetApi(Build.VERSION_CODES.O) private void deleteObsoletedChannelIds() { List<NotificationChannel> channelGroups = getManager().getNotificationChannels(); for (NotificationChannel nc : channelGroups) { if (!AndroidNotifications.notificationIds.contains(nc.getId())) { getManager().deleteNotificationChannel(nc.getId()); } } } /* * Send a notification. * * @param id The ID of the notification * @param notification The notification object */ @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) public void notify(int id, Notification.Builder notification) { getManager().notify(id, notification.build()); } /** * Get the notification manager. * * Utility method as this helper works with it a lot. * * @return The system service NotificationManager */ private NotificationManager getManager() { if (manager == null) { manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); } return manager; } /** * Send Intent to load system Notification Settings for this app. */ @RequiresApi(api = Build.VERSION_CODES.O) public void goToNotificationSettings() { Intent i = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS); i.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName()); startActivity(i); } /** * Send intent to load system Notification Settings UI for a particular channel. * * @param channel Name of channel to configure */ @TargetApi(Build.VERSION_CODES.O) public void goToNotificationSettings(String channel) { Intent i = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS); i.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName()); i.putExtra(Settings.EXTRA_CHANNEL_ID, channel); startActivity(i); } }
[ "cmeng.gm@gmail.com" ]
cmeng.gm@gmail.com
085cc111549a9350a40026a520588b5047dacfbd
2ebc9528389faf1551574a8d6203cbe338a72221
/zf/src/main/java/com/chinazhoufan/admin/modules/bas/service/FileDirService.java
b990b412fff75398f8a0ce22408fa50a92791b97
[ "Apache-2.0" ]
permissive
flypig5211/zf-admin
237a7299a5dc65e33701df2aeca50fd4b2107e21
dbf36f42e2d6a2f3162d4856e9daa8152ee1d56e
refs/heads/master
2022-02-27T00:14:12.904808
2017-12-06T10:01:15
2017-12-06T10:01:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,845
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.chinazhoufan.admin.modules.bas.service; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.chinazhoufan.admin.common.persistence.Page; import com.chinazhoufan.admin.common.service.TreeService; import com.chinazhoufan.admin.modules.bas.dao.FileDirDao; import com.chinazhoufan.admin.modules.bas.entity.FileDir; /** * 文件目录Service * @Date 2016年10月26日 下午2:59:03 */ @Service @Transactional(readOnly = true) public class FileDirService extends TreeService<FileDirDao, FileDir> { @Transactional(readOnly = false) public void save(FileDir entity) { super.save(entity); } @Override public FileDir get(String id) { return super.get(id); } @Override public FileDir get(FileDir entity) { return super.get(entity); } @Override public List<FileDir> findList(FileDir entity) { return super.findList(entity); } @Override public Page<FileDir> findPage(Page<FileDir> page, FileDir entity) { return super.findPage(page, entity); } @Transactional(readOnly = false) public void delete(FileDir entity) { super.delete(entity); } public List<FileDir> findAll() { return super.findList(new FileDir()); } public List<FileDir> findPublicList() { FileDir fileDir = new FileDir(); fileDir.setType(FileDir.TYPE_PUBLIC); return super.findList(fileDir); } @Transactional(readOnly = false) public void updateType(FileDir entity) { dao.updateType(entity); } public boolean getUniqueByCode(String code) { int c = dao.getUniqueByCode(code); return c == 0 ? true : false; } public FileDir findFileDirByCode(String code){ return dao.findFileDirByCode(code); } }
[ "646686483@qq.com" ]
646686483@qq.com
eeaffeb442aa43a57d29ab3cb427ab9d8a1ce8eb
0907c886f81331111e4e116ff0c274f47be71805
/sources/com/tappx/a/s.java
d6713336e7bd1ad8b2b0c71f952addeac7443c5c
[ "MIT" ]
permissive
Minionguyjpro/Ghostly-Skills
18756dcdf351032c9af31ec08fdbd02db8f3f991
d1a1fb2498aec461da09deb3ef8d98083542baaf
refs/heads/Android-OS
2022-07-27T19:58:16.442419
2022-04-15T07:49:53
2022-04-15T07:49:53
415,272,874
2
0
MIT
2021-12-21T10:23:50
2021-10-09T10:12:36
Java
UTF-8
Java
false
false
2,288
java
package com.tappx.a; import android.net.Uri; import com.tappx.a.a0; import com.tappx.a.d0; import com.tappx.a.f0; import java.io.UnsupportedEncodingException; import java.util.Map; public class s extends d0<y1> { private static final String i = f.b("7lAm3cGZz4MMRzfjNT4s5w"); private final String f; private final x g; private final String h; public static class a { /* renamed from: a reason: collision with root package name */ private final x f571a; public a(x xVar) { this.f571a = xVar; } /* access modifiers changed from: package-private */ public s a(String str, String str2, f0.b<y1> bVar, f0.a aVar) { return new s(this.f571a, str, str2, bVar, aVar); } } s(x xVar, String str, String str2, f0.b<y1> bVar, f0.a aVar) { super(bVar, aVar); this.g = xVar; this.f = str + n.d(); this.h = str2; a(false); a(new g0(10000, 1, 1.0f)); } public byte[] a() { String str = this.h; if (str == null) { return null; } try { return str.getBytes("utf-8"); } catch (UnsupportedEncodingException unused) { j0.d("mcDfyrZIyDh7srkDi3vhYS4jCqm7NCw5DOnMQ6j4pn8", new Object[0]); return null; } } public Map<String, String> c() { return h(); } public d0.a d() { return d0.a.POST; } public String g() { Uri.Builder buildUpon = Uri.parse(this.f).buildUpon(); buildUpon.appendQueryParameter(i, String.valueOf(System.currentTimeMillis() / 1000)); return buildUpon.build().toString(); } /* access modifiers changed from: protected */ public f0<y1> a(c0 c0Var) { try { j0.d("zEfD4hGYqgGlREP0sIIg/hstxJ7mtJesC+XfeD//U5A", String.valueOf(c0Var.c), this.f); w1 a2 = this.g.a(c0Var); if (a2.f()) { return f0.a(new a0(a0.a.NO_FILL)); } u1 u1Var = a2.b().get(0); if (u1Var instanceof y1) { return f0.a((y1) u1Var); } throw new c2(); } catch (c2 unused) { return f0.a(new a0(a0.a.PARSE_ERROR)); } } }
[ "66115754+Minionguyjpro@users.noreply.github.com" ]
66115754+Minionguyjpro@users.noreply.github.com
92b5d829302583dd90f3de69847bc44a1e75d007
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/protocal/c/aio.java
56a57990ca3102bfc4c41c98c0fd93abe1f97c31
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
3,094
java
package com.tencent.mm.protocal.c; import java.util.LinkedList; public final class aio extends bhd { public int hbE; public LinkedList<bub> rLq = new LinkedList(); protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (f.a.a.c.a)paramVarArgs[0]; if (this.shX != null) { paramVarArgs.fV(1, this.shX.boi()); this.shX.a(paramVarArgs); } paramVarArgs.fT(2, this.hbE); paramVarArgs.d(3, 8, this.rLq); return 0; } if (paramInt == 1) { if (this.shX == null) { break label441; } } label441: for (paramInt = f.a.a.a.fS(1, this.shX.boi()) + 0;; paramInt = 0) { return paramInt + f.a.a.a.fQ(2, this.hbE) + f.a.a.a.c(3, 8, this.rLq); if (paramInt == 2) { paramVarArgs = (byte[])paramVarArgs[0]; this.rLq.clear(); paramVarArgs = new f.a.a.a.a(paramVarArgs, unknownTagHandler); for (paramInt = bhd.a(paramVarArgs); paramInt > 0; paramInt = bhd.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.cJS(); } } break; } if (paramInt == 3) { Object localObject1 = (f.a.a.a.a)paramVarArgs[0]; aio localaio = (aio)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); Object localObject2; boolean bool; switch (paramInt) { default: return -1; case 1: paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new fk(); localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler); for (bool = true; bool; bool = ((fk)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhd.a((f.a.a.a.a)localObject2))) {} localaio.shX = ((fk)localObject1); paramInt += 1; } case 2: localaio.hbE = ((f.a.a.a.a)localObject1).vHC.rY(); return 0; } paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt); int i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new bub(); localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler); for (bool = true; bool; bool = ((bub)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhd.a((f.a.a.a.a)localObject2))) {} localaio.rLq.add(localObject1); paramInt += 1; } break; } return -1; } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes4-dex2jar.jar!/com/tencent/mm/protocal/c/aio.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
5ba3db7a27734c63c7593371797b40903fe78fdf
b5c4bcf54aeb2bcb4f6d8b389eb5894a35d34e97
/javanet/staxutils/EmptyNamespaceContext.java
8174cdd05965d68cea395f854300a6058a2340fd
[]
no_license
mulderbaba/webservices-osgi
d233daf266c12e102a6e7a2b795d8f43c0dbddfb
7090b58bd4cdf5fab4af14d54cb20bb45c074de2
refs/heads/master
2021-06-02T00:34:49.408686
2017-07-27T12:39:42
2017-07-27T12:39:42
98,534,028
2
2
null
2021-02-03T19:27:23
2017-07-27T12:37:43
Java
UTF-8
Java
false
false
2,923
java
/* * $Id: EmptyNamespaceContext.java,v 1.2 2004/07/08 14:29:42 cniles Exp $ * * Copyright (c) 2004, Christian Niles, unit12.net * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Christian Niles, Unit12, nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * */ package javanet.staxutils; import java.util.Collections; import java.util.Iterator; import javax.xml.namespace.NamespaceContext; /** * {@link ExtendedNamespaceContext} that contains no namespaces. * * @author Christian Niles * @version $Revision: 1.2 $ */ public final class EmptyNamespaceContext implements ExtendedNamespaceContext, StaticNamespaceContext { public static final EmptyNamespaceContext INSTANCE = new EmptyNamespaceContext(); public static final NamespaceContext getInstance() { return INSTANCE; } public String getNamespaceURI(String prefix) { return null; } public String getPrefix(String nsURI) { return null; } public Iterator getPrefixes(String nsURI) { return Collections.EMPTY_SET.iterator(); } public NamespaceContext getParent() { return null; } public boolean isPrefixDeclared(String prefix) { return false; } public Iterator getPrefixes() { return Collections.EMPTY_LIST.iterator(); } public Iterator getDeclaredPrefixes() { return Collections.EMPTY_LIST.iterator(); } }
[ "mert@t2.com.tr" ]
mert@t2.com.tr
d8724fae49d00f8272cd9d6575c10490a5960185
aca457909ef8c4eb989ba23919de508c490b074a
/DialerJADXDecompile/defpackage/qb.java
75fcfe5927f69e9d58384a1a3732ac935b688490
[]
no_license
KHikami/ProjectFiCallingDeciphered
bfccc1e1ba5680d32a4337746de4b525f1911969
cc92bf6d4cad16559a2ecbc592503d37a182dee3
refs/heads/master
2021-01-12T17:50:59.643861
2016-12-08T01:20:34
2016-12-08T01:23:04
71,650,754
1
0
null
null
null
null
UTF-8
Java
false
false
1,892
java
package defpackage; import android.app.Activity; import android.content.Context; import android.content.res.Configuration; import android.os.Build.VERSION; import android.os.Bundle; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.view.Window; /* compiled from: PG */ /* renamed from: qb */ public abstract class qb { static int a; private static boolean b; public abstract View a(int i); public abstract pl a(); public abstract void a(Configuration configuration); public abstract void a(Bundle bundle); public abstract void a(View view); public abstract void a(View view, LayoutParams layoutParams); public abstract void a(CharSequence charSequence); public abstract MenuInflater b(); public abstract void b(int i); public abstract void b(Bundle bundle); public abstract void b(View view, LayoutParams layoutParams); public abstract void c(); public abstract boolean c(int i); public abstract void d(); public abstract void e(); public abstract void f(); public abstract void g(); public abstract void h(); public abstract boolean i(); static { a = -1; b = false; } public static qb a(Activity activity, qa qaVar) { return qb.a(activity, activity.getWindow(), qaVar); } static qb a(Context context, Window window, qa qaVar) { int i = VERSION.SDK_INT; if (buf.c()) { return new qe(context, window, qaVar); } if (i >= 23) { return new qj(context, window, qaVar); } if (i >= 14) { return new qh(context, window, qaVar); } if (i >= 11) { return new qg(context, window, qaVar); } return new ql(context, window, qaVar); } qb() { } }
[ "chu.rachelh@gmail.com" ]
chu.rachelh@gmail.com
59f38ca6ef694306911a5b819da8e3ac627fdfdf
0e87e32fb92c5080e76257d94c04b2ec05b023fe
/src/test/java/org/compass/annotations/test/converter/enum1/B.java
e48d7dda91abd713d755bd5008a5308fa5a0fc86
[ "Apache-2.0" ]
permissive
molindo/elastic-compass
7216e4f69bc75bbfcd91c3b7a43a2cc48453f2c5
dd8c19e48efd9f620a92e07f7b35fefae556b9fc
refs/heads/master
2016-09-06T15:09:45.331273
2011-05-09T09:51:33
2011-05-09T09:51:33
1,649,609
2
0
null
null
null
null
UTF-8
Java
false
false
187
java
package org.compass.annotations.test.converter.enum1; /** * @author kimchy */ public interface B { public enum Type { Note, Call, Meeting, Organisation, Attachment } }
[ "stf+git@molindo.at" ]
stf+git@molindo.at
0f69f321e85920eec029a92d5bffc3bfb209e438
f8602b556175080fd6958873bc1195488d4810de
/src/by/epamtc/exercise1/unit/CalculationLogics.java
ea066eef0b0d3d6a13342bedf59423826d26922a
[]
no_license
VoloshchukD/epam_task1
1753d46f6f0f2e93b71f11530d13992d73bd5f8e
63aa92cdd5d3a135e30ea92e4498df0d8b193978
refs/heads/master
2023-04-14T06:14:23.372748
2021-04-29T09:10:40
2021-04-29T09:10:40
350,843,389
0
0
null
null
null
null
UTF-8
Java
false
false
286
java
package by.epamtc.exercise1.unit; public class CalculationLogics { public static int calculateLastSquaredDigit(int number) { int lastDigitOfNumber = number % 10; int squaredNumber = (int) Math.pow(lastDigitOfNumber, 2); return squaredNumber % 10; } }
[ "voloshchukd7@gmail.com" ]
voloshchukd7@gmail.com
fa01dc81e09f2a11a3d56bfdff5424f69bf7e902
73f99ca9b06655e6fd294e84e4006c9ff2382a00
/app/src/main/java/com/centaurstech/sdk/fragment/ProcessingFragment.java
cba7971a0c65652b53ab97542e18caebcdbd45ba
[]
no_license
y6692/SDKDemo
638a0572116cc9ed4cf7d86e6a8cd41c99888d04
466d244af57c8095caf8f48b020720632e4a48f1
refs/heads/master
2021-02-22T10:25:12.230871
2020-03-09T05:33:37
2020-03-09T05:33:37
245,375,092
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package com.centaurstech.sdk.fragment; /** * Time:2019/12/25 * Author: 樊德鹏 * Description: */ public class ProcessingFragment extends OrderListFragment { @Override public int getPosition() { return 2; } }
[ "y6692@126.com" ]
y6692@126.com
05fbdbc9b33aa11fa457e6325a21dc6990e3c720
0cb9c1c3ea7c74fcdc412cdad84957b3b92473f0
/src/cn6/iterator/Client.java
4c28fecea66ee941bbd70afd9e9c9c5042b6375d
[]
no_license
plusyou13/java_demo
1c96dd4238ee50fb6325a25a417fd230b9560cff
1d16ac9c5c5b94494a0962dcd2c7f0d08e46000f
refs/heads/master
2022-11-17T06:49:24.818635
2020-07-17T07:01:15
2020-07-17T07:01:15
275,190,730
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
529
java
package cn6.iterator; import java.util.ArrayList; import java.util.List; public class Client { public static void main(String[] args) { // TODO Auto-generated method stub //´´½¨Ñ§Ôº List<College> collegeList = new ArrayList<College>(); ComputerCollege computerCollege = new ComputerCollege(); InfoCollege infoCollege = new InfoCollege(); collegeList.add(computerCollege); //collegeList.add(infoCollege); OutPutImpl outPutImpl = new OutPutImpl(collegeList); outPutImpl.printCollege(); } }
[ "87831498@qq.com" ]
87831498@qq.com
7f7125cbed561d4dbbaad005958eb9759810ae93
328e5512d2cc764a6a182596e6a4745d48375ae7
/ddxj-worker-cms/src/main/java/net/zn/ddxj/config/WebMvcConfig.java
8e0cbca14baa8f524e55031cd52e335f46a262db
[]
no_license
yangbingkun315/cms
e67b1b0958d9b390198290a22d2b9bfd30880ea5
80c494db4c76e1540bee7861f312374a6492abd4
refs/heads/master
2022-12-12T13:28:49.419679
2019-07-04T13:34:43
2019-07-04T13:34:43
163,160,603
0
1
null
2022-12-06T00:30:54
2018-12-26T09:14:38
TSQL
UTF-8
Java
false
false
4,475
java
package net.zn.ddxj.config; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import net.zn.ddxj.config.intercepter.CommonIntercepter; import net.zn.ddxj.constants.CmsConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer; import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; import org.springframework.boot.web.servlet.ErrorPage; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.support.config.FastJsonConfig; import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter4; @Configuration public class WebMvcConfig extends WebMvcConfigurerAdapter { @Autowired private CommonIntercepter commonIntercepter; /** * fastJson相关设置 */ private FastJsonConfig getFastJsonConfig() { FastJsonConfig fastJsonConfig = new FastJsonConfig(); // 在serializerFeatureList中添加转换规则 List<SerializerFeature> serializerFeatureList = new ArrayList<SerializerFeature>(); serializerFeatureList.add(SerializerFeature.PrettyFormat); serializerFeatureList.add(SerializerFeature.WriteMapNullValue); serializerFeatureList.add(SerializerFeature.WriteNullStringAsEmpty); serializerFeatureList.add(SerializerFeature.WriteNullListAsEmpty); serializerFeatureList.add(SerializerFeature.DisableCircularReferenceDetect); SerializerFeature[] serializerFeatures = serializerFeatureList.toArray(new SerializerFeature[serializerFeatureList.size()]); fastJsonConfig.setSerializerFeatures(serializerFeatures); return fastJsonConfig; } /** * fastJson相关设置 */ private FastJsonHttpMessageConverter4 fastJsonHttpMessageConverter() { FastJsonHttpMessageConverter4 fastJsonHttpMessageConverter = new FastJsonHttpMessageConverter4(); List<MediaType> supportedMediaTypes = new ArrayList<MediaType>(); supportedMediaTypes.add(MediaType.parseMediaType("text/html;charset=UTF-8")); supportedMediaTypes.add(MediaType.parseMediaType("application/json")); fastJsonHttpMessageConverter.setSupportedMediaTypes(supportedMediaTypes); fastJsonHttpMessageConverter.setFastJsonConfig(getFastJsonConfig()); return fastJsonHttpMessageConverter; } /** * 添加fastJsonHttpMessageConverter到converters */ @Override public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { converters.add(fastJsonHttpMessageConverter()); } /** * 添加拦截器 */ @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(commonIntercepter).addPathPatterns("/**") .excludePathPatterns("/**/404.htm","/**/500.htm","/**/403.htm","*.css","*.js","/**/images/","/**/css/","/**/js/"); super.addInterceptors(registry); } /* @Bean public FilterRegistrationBean registFilter() { FilterRegistrationBean registration = new FilterRegistrationBean(); registration.setFilter(); registration.addUrlPatterns("/*"); registration.setOrder(1); return registration; }*/ //统一页码处理配置 @Bean public EmbeddedServletContainerCustomizer containerCustomizer() { return new EmbeddedServletContainerCustomizer() { @Override public void customize(ConfigurableEmbeddedServletContainer container) { //ErrorPage error401Page = new ErrorPage(HttpStatus.UNAUTHORIZED, "/401.html"); ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND,"/cms/404.htm"); ErrorPage error500Page = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR,"/cms/500.htm"); container.addErrorPages( error404Page, error500Page); } }; } }
[ "admin@163.com" ]
admin@163.com
b4b8c5c4907a8c239653d42ab92c90bfa1054186
9b0ee970ecc447181973952b9e0470ca3e1b5c25
/mhub-20170825/java/src/main/java/com/aliyun/mhub20170825/models/SpiLogicalDeleteResourceRequest.java
8ab68bbae449fa414bd0d61ae257c015f330e2c6
[ "Apache-2.0" ]
permissive
start-doing/alibabacloud-sdk
0c44185445ff7c86461bced4bc11717ad5e9ecbb
9b5d3c7434ed8df91fa3c4cde6a6c7052f8ea289
refs/heads/master
2023-02-20T21:53:23.278841
2021-01-20T11:48:56
2021-01-20T11:48:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,518
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.mhub20170825.models; import com.aliyun.tea.*; public class SpiLogicalDeleteResourceRequest extends TeaModel { @NameInMap("Interrupt") public Boolean interrupt; @NameInMap("Invoker") @Validation(required = true) public String invoker; @NameInMap("Pk") @Validation(required = true) public String pk; @NameInMap("Bid") @Validation(required = true) public String bid; @NameInMap("Hid") @Validation(required = true) public Long hid; @NameInMap("Country") @Validation(required = true) public String country; @NameInMap("TaskIdentifier") @Validation(required = true) public String taskIdentifier; @NameInMap("TaskExtraData") @Validation(required = true) public String taskExtraData; @NameInMap("GmtWakeup") @Validation(required = true) public String gmtWakeup; @NameInMap("Success") public Boolean success; @NameInMap("Message") public String message; public static SpiLogicalDeleteResourceRequest build(java.util.Map<String, ?> map) throws Exception { SpiLogicalDeleteResourceRequest self = new SpiLogicalDeleteResourceRequest(); return TeaModel.build(map, self); } public SpiLogicalDeleteResourceRequest setInterrupt(Boolean interrupt) { this.interrupt = interrupt; return this; } public Boolean getInterrupt() { return this.interrupt; } public SpiLogicalDeleteResourceRequest setInvoker(String invoker) { this.invoker = invoker; return this; } public String getInvoker() { return this.invoker; } public SpiLogicalDeleteResourceRequest setPk(String pk) { this.pk = pk; return this; } public String getPk() { return this.pk; } public SpiLogicalDeleteResourceRequest setBid(String bid) { this.bid = bid; return this; } public String getBid() { return this.bid; } public SpiLogicalDeleteResourceRequest setHid(Long hid) { this.hid = hid; return this; } public Long getHid() { return this.hid; } public SpiLogicalDeleteResourceRequest setCountry(String country) { this.country = country; return this; } public String getCountry() { return this.country; } public SpiLogicalDeleteResourceRequest setTaskIdentifier(String taskIdentifier) { this.taskIdentifier = taskIdentifier; return this; } public String getTaskIdentifier() { return this.taskIdentifier; } public SpiLogicalDeleteResourceRequest setTaskExtraData(String taskExtraData) { this.taskExtraData = taskExtraData; return this; } public String getTaskExtraData() { return this.taskExtraData; } public SpiLogicalDeleteResourceRequest setGmtWakeup(String gmtWakeup) { this.gmtWakeup = gmtWakeup; return this; } public String getGmtWakeup() { return this.gmtWakeup; } public SpiLogicalDeleteResourceRequest setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } public SpiLogicalDeleteResourceRequest setMessage(String message) { this.message = message; return this; } public String getMessage() { return this.message; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
74ce4bd507eaee90be944a082a23da472f7d5427
395ec784027c63711a60e4bacaa4ef57dc5457c9
/lailem/src/main/java/com/lailem/app/widget/pulltorefresh/helper/DefaultLoadMoreHelper.java
6fdc3b67c7f84b17fb98e28bfe2d00f0538511a3
[]
no_license
StormFeng/LaiPrivateLe
4e21f02284deb8bb70f28673db304c600bb811d8
dadcb91658c1bcad5483dee27320b6a84cd721d5
refs/heads/master
2020-06-11T05:06:28.326139
2016-12-09T07:51:12
2016-12-09T07:51:12
76,000,775
0
0
null
null
null
null
UTF-8
Java
false
false
2,215
java
package com.lailem.app.widget.pulltorefresh.helper; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget.AbsListView; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; import com.lailem.app.R; import com.lailem.app.widget.pulltorefresh.HeaderFooterGridView; import com.lailem.app.widget.pulltorefresh.helper.ILoadViewFactory.ILoadMoreView; public class DefaultLoadMoreHelper implements ILoadMoreView { protected View footView; protected TextView text; protected ProgressBar progressBar; protected OnClickListener onClickRefreshListener; @Override public void init(AbsListView listView, OnClickListener onClickRefreshListener) { footView = LayoutInflater.from(listView.getContext()).inflate(R.layout.layout_listview_foot, listView, false); text = (TextView) footView.findViewById(R.id.text); progressBar = (ProgressBar) footView.findViewById(R.id.progressBar); if (listView instanceof ListView) { ((ListView) listView).addFooterView(footView); } else if (listView instanceof HeaderFooterGridView) { ((HeaderFooterGridView) listView).addFooterView(footView); } this.onClickRefreshListener = onClickRefreshListener; showNormal(); } @Override public void showNormal() { text.setText("点击加载更多"); progressBar.setVisibility(View.GONE); footView.setOnClickListener(onClickRefreshListener); } @Override public void showLoading() { text.setText("正在加载中.."); progressBar.setVisibility(View.VISIBLE); footView.setOnClickListener(null); } @Override public void showFail() { progressBar.setVisibility(View.GONE); text.setText("加载失败,点击重新加载"); footView.setOnClickListener(onClickRefreshListener); } @Override public void showNomore() { footView.setVisibility(View.INVISIBLE); progressBar.setVisibility(View.GONE); text.setText("已经加载完毕"); footView.setOnClickListener(null); } }
[ "1170017470@qq.com" ]
1170017470@qq.com
1ac5291a3991a60b6eaae52006bbe58077ec74ab
0319afb5c64ed401fc4bcadc20fe39fe2634cb8e
/tags/icepdf-6.3.1/icepdf/examples/extraction/metadata/src/main/java/org/icepdf/os/examples/extraction/PageMetaDataExtraction.java
8aa547acab59e13547ff0fea9d30ae9814dc6ef2
[]
no_license
svn2github/icepdf-6_3_0_all
e3334b1d98c8fb3b400a57b05a32a7bcc2c86d99
e73b943f4449c8967472a1f5a477c8c136afb803
refs/heads/master
2023-09-03T10:39:31.313071
2018-09-06T03:00:25
2018-09-06T03:00:25
133,867,237
1
0
null
null
null
null
UTF-8
Java
false
false
3,783
java
package org.icepdf.os.examples.extraction; /* * Copyright 2006-2017 ICEsoft Technologies Canada Corp. * * 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. */ import org.icepdf.core.exceptions.PDFException; import org.icepdf.core.exceptions.PDFSecurityException; import org.icepdf.core.pobjects.Document; import org.icepdf.core.pobjects.PInfo; import org.icepdf.ri.util.FontPropertiesManager; import java.io.FileNotFoundException; import java.io.IOException; /** * The <code>PageMetaDataExtraction</code> class is an example of how to extract * meta-data from a PDF document. A file specified at the command line is opened * and the document's information is displayed on the command line. * * @since 2.0 */ public class PageMetaDataExtraction { public static void main(String[] args) { // Get a file from the command line to open String filePath = args[0]; // read/store the font cache. FontPropertiesManager.getInstance().loadOrReadSystemFonts(); // open the url Document document = new Document(); try { document.setFile(filePath); } catch (PDFException ex) { System.out.println("Error parsing PDF document " + ex); } catch (PDFSecurityException ex) { System.out.println("Error encryption not supported " + ex); } catch (FileNotFoundException ex) { System.out.println("Error file not found " + ex); } catch (IOException ex) { System.out.println("Error handling PDF document " + ex); } // data to collect from document information entry String title = ""; String author = ""; String subject = ""; String keyWords = ""; String creator = ""; String producer = ""; String creationDate = ""; String modDate = ""; // get document information values if available PInfo documentInfo = document.getInfo(); if (documentInfo != null) { title = documentInfo.getTitle(); author = documentInfo.getAuthor(); subject = documentInfo.getSubject(); keyWords = documentInfo.getKeywords(); creator = documentInfo.getCreator() != null ? documentInfo.getCreator() : "Not Available"; producer = documentInfo.getProducer() != null ? documentInfo.getProducer() : "Not Available"; creationDate = documentInfo.getCreationDate() != null ? documentInfo.getCreationDate().toString() : "Not Available"; modDate = documentInfo.getModDate() != null ? documentInfo.getModDate().toString() : "Not Available"; } // Output the captured document information System.out.println("Title: " + title); System.out.println("Subject: " + subject); System.out.println("Author: " + author); System.out.println("Keywords: " + keyWords); System.out.println("Creator: " + creator); System.out.println("Producer: " + producer); System.out.println("Created: " + creationDate); System.out.println("Modified: " + modDate); // clean up resources document.dispose(); } }
[ "patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74" ]
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
91d67275c95d2cecac4f877268192e7abbd26f68
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/services/core/java/com/android/server/wm/FactoryErrorDialog.java
977904d41eda4a096beef8afdab5834abef41c25
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
/* * Copyright (C) 2006 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.server.wm; import android.content.Context; import android.content.DialogInterface; import android.os.Handler; import android.os.Message; import android.view.WindowManager; import com.android.server.am.BaseErrorDialog; final class FactoryErrorDialog extends BaseErrorDialog { public FactoryErrorDialog(Context context, CharSequence msg) { super(context); setCancelable(false); setTitle(context.getText(com.android.internal.R.string.factorytest_failed)); setMessage(msg); setButton(DialogInterface.BUTTON_POSITIVE, context.getText(com.android.internal.R.string.factorytest_reboot), mHandler.obtainMessage(0)); WindowManager.LayoutParams attrs = getWindow().getAttributes(); attrs.setTitle("Factory Error"); getWindow().setAttributes(attrs); } public void onStop() { } private final Handler mHandler = new Handler() { public void handleMessage(Message msg) { throw new RuntimeException("Rebooting from failed factory test"); } }; }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
4d2011f1c601c96758323aa2fb8abec157b765e5
f385d2b9a676fb4d3a46a00cfb95948915e5578c
/core/src/main/java/com/oklib/widget/GlideCircleTransform.java
fe61623f33da5acf0fa88f9bcb864b756863b5ef
[]
no_license
zhandejie/Oklib
e99fa497471ed7d39d6fd1b19c88aa99104bebf9
108948a4f906bb7c81e0c6d2b0712cfc311d935d
refs/heads/master
2021-06-18T01:58:33.300543
2017-06-15T09:33:27
2017-06-15T09:33:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,612
java
package com.oklib.widget; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Paint; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; /** * . */ public class GlideCircleTransform extends BitmapTransformation { public GlideCircleTransform(Context context) { super(context); } @Override protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { return circleCrop(pool, toTransform); } private static Bitmap circleCrop(BitmapPool pool, Bitmap source) { if (source == null) return null; int size = Math.min(source.getWidth(), source.getHeight()); int x = (source.getWidth() - size) / 2; int y = (source.getHeight() - size) / 2; Bitmap squared = Bitmap.createBitmap(source, x, y, size, size); Bitmap result = pool.get(size, size, Bitmap.Config.ARGB_8888); if (result == null) { result = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); } Canvas canvas = new Canvas(result); Paint paint = new Paint(); paint.setShader(new BitmapShader(squared, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP)); paint.setAntiAlias(true); float r = size / 2f; canvas.drawCircle(r, r, r, paint); return result; } @Override public String getId() { return getClass().getName(); } }
[ "hcjhuanghe@163.com" ]
hcjhuanghe@163.com
367064b1e9b7483c466b0532175230fc259f8333
cbdfb6072e38e9c7867c82cffcb6899fb39a290b
/app/src/main/java/com/lfk/drawapictiure/View/MarkDown/parser/BoldParser.java
aa9ff8a86195e8c908bd0159daae95f058bbebb7
[]
no_license
lfkdsk/draw-picture-yunnote
7350dce9204e6410cbed7cb40493b1a7d5cd6893
78539dc56c9fa6cf2dde2098fabd6256b1d3a1af
refs/heads/master
2021-01-19T17:36:48.007785
2017-04-15T08:41:20
2017-04-15T08:41:20
88,334,776
1
0
null
null
null
null
UTF-8
Java
false
false
727
java
package com.lfk.drawapictiure.View.MarkDown.parser; import com.lfk.drawapictiure.View.MarkDown.Markdown; public class BoldParser extends Markdown.MDParser { private static final String KEY = "**"; @Override public Markdown.MDWord parseLineFmt(String content) { return Markdown.MDWord.NULL; } @Override public Markdown.MDWord parseWordFmt(String content) { if (!content.startsWith(KEY)) { return Markdown.MDWord.NULL; } int position = content.indexOf(KEY, 2); if (position == -1) { return Markdown.MDWord.NULL; } return new Markdown.MDWord(content.substring(2, position), position + 2, Markdown.MD_FMT_BOLD); } }
[ "lfk_dsk@hotmail.com" ]
lfk_dsk@hotmail.com
1be6d701cc19fb1fcdeed13e49a1f78bec292b93
01f1f247fe3fd446e806e7f88604fda7ca7bff48
/sftp.src/com/jscape/util/k/g.java
3d3a7b5e66f6a07336fd899d97f1a31f4f96af0b
[]
no_license
DiegoTc/ImageUpload
bba6761ecc8f8e925b0da77fb2dac1c413793db6
c306b1186d3d2f3d3e64157a337a3f7a3eca9bcd
refs/heads/master
2016-09-07T18:39:23.469651
2014-03-14T20:34:57
2014-03-14T20:34:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package com.jscape.util.k; public abstract interface g { public abstract boolean a(String paramString); } /* Location: C:\Users\dturcios\Documents\NetBeansProjects\ImageUploader\dist\lib\sftp.jar * Qualified Name: com.jscape.util.k.g * JD-Core Version: 0.7.0.1 */
[ "dturcios@HCE-ECM-002.us.adler.corp" ]
dturcios@HCE-ECM-002.us.adler.corp
8bf0c0eeeb159ba3060d90f3e936004546684016
c36e1f2f1712f71cd11c829588ef8e82b09b7ef1
/java/monkey_foxwan_socket/src/com/stang/game/entity/detail/GameEInsDetail.java
f61c7d77b2ad950699bf3455f2a9ccdd4fcad048
[]
no_license
CJSDCQS/Monkey-Web-Game
8b5645c7d5278708679827b956e9ca17d60a93e0
c2e93001db22df775c9638651d84d9bb2dcdb52a
refs/heads/master
2021-12-04T08:15:23.863743
2014-10-24T09:10:44
2014-10-24T09:10:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
129
java
package com.stang.game.entity.detail; import com.stang.game.entity.GameEIns; public class GameEInsDetail extends GameEIns{ }
[ "lavenwl@gmail.com" ]
lavenwl@gmail.com
824edc323edbdded933eb4384c3927881fa321bf
211f40b21b9a92b38b665baa571f86fba45a7c73
/app/src/main/java/com/hackm/famiryboard/model/viewobject/Deco.java
4b98d4bee3f40934a0b3e3c2b11e045dbbe4633f
[]
no_license
hackm/FamiryBoard
90e659aee463e326b6442cf136534496b6dd14d9
1ec79ca08cf13b68c15c329eca0e65921f022fd1
refs/heads/master
2021-01-21T18:11:45.638941
2015-05-10T14:10:27
2015-05-10T14:10:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,692
java
package com.hackm.famiryboard.model.viewobject; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Point; import android.util.Log; import com.hackm.famiryboard.model.system.AppConfig; import com.hackm.famiryboard.view.widget.WhiteBoardView; import com.squareup.picasso.Target; /** * Created by shunhosaka on 2014/12/27. */ public class Deco { public static final int TYPE_CAMERA = 0; public static final int TYPE_GALLERY = 1; public static final int TYPE_STAMP = 1; public static final int TYPE_TEXT = 2; public float x, y; public float width, height; public int rotation; public int type = TYPE_CAMERA; public String boardId; public String id; //Jsonにするときに無視する public transient Bitmap bitmap; private transient Paint paint = null; public Deco() { } public Deco(Bitmap bitmap, float x, float y, float width, float height, int rotation, int type, String boardId) { this.bitmap = bitmap; this.x = x; this.y = y; this.width = width; this.height = height; this.rotation = rotation; this.type = type; if(AppConfig.DEBUG) { Log.d("Deco", "Constructor Value:" + "(x:" + Float.toString(x) + ", y:" + Float.toString(y) + ")"); Log.d("Deco", "Constructor Value:" + "(width:" + Float.toString(width) + ", height:" + Float.toString(height) + ")"); Log.d("Deco", "Constructor Value:" + "(rotation:" + Integer.toString(rotation) + ")"); } } // Non Bitmap Type public Deco(float x, float y, float width, float height, int rotation, int type, String boardId) { this.x = x; this.y = y; this.width = width; this.height = height; this.rotation = rotation; this.type = type; } /** * Draw this object * @param canvas */ public void draw(Canvas canvas) { if (this.width == 0 || this.height == 0) { this.width = bitmap.getWidth() / 2; this.height = bitmap.getHeight() / 2; } canvas.drawBitmap(bitmap, getMatrix(), paint); } /** * @return Matrix */ private Matrix getMatrix() { Matrix matrix = new Matrix(); matrix.setScale(width / bitmap.getWidth(), height / bitmap.getHeight()); matrix.postRotate(rotation, width / 2, height / 2); matrix.postTranslate(x - width / 2, y - height / 2); return matrix; } /** * タッチしているかを返す。 * @param touch is touch CakeDecoView point * @return */ public int getTouchType(Point touch) { Point[] points = getRectPoints(); int halfImageSize = (int) (WhiteBoardView.MENU_BUTTON_SIZE / 2); if (Math.sqrt((touch.x - points[0].x) * (touch.x - points[0].x) + (touch.y - points[0].y) * (touch.y - points[0].y)) < halfImageSize) { //points[0] -> delete return WhiteBoardView.TYPE_DELETE; } else if (Math.sqrt((touch.x - points[1].x) * (touch.x - points[1].x) + (touch.y - points[1].y) * (touch.y - points[1].y)) < halfImageSize) { //points[1] -> change return WhiteBoardView.TYPE_CHANGE; } else if(crossingNumber(points, touch)) { return WhiteBoardView.TYPE_TAP; } else { return WhiteBoardView.TYPE_NONE; } } public Point[] getRectPoints() { //ラジアン角に変換 Double radian = rotation* Math.PI / 180; double coordinateX1 = width / 2 * Math.cos(radian); double coordinateX2 = height / 2 * Math.sin(radian); double coordinateY1 = width / 2 * Math.sin(radian); double coordinateY2 = height / 2 * Math.cos(radian); //頂点の角ポイント Point[] points = new Point[4]; points[0] = new Point((int) (-coordinateX1 + coordinateX2 + x), (int) (-coordinateY1 - coordinateY2 + y)); points[1] = new Point((int) (coordinateX1 + coordinateX2 + x), (int) (coordinateY1 - coordinateY2 + y)); points[2] = new Point((int) (coordinateX1 - coordinateX2 + x), (int) (coordinateY1 + coordinateY2 + y)); points[3] = new Point((int) (-coordinateX1 - coordinateX2 + x), (int) (-coordinateY1 + coordinateY2 + y)); if(AppConfig.DEBUG) { for(Point point : points) { Log.d("getRectPoints","Point: "+point.toString()); } } return points; } /** * Set new object size and rotation * @param touch (touch is RightTop point new Object size) * TODO */ public void setChange(Point touch) { //拡張点のポイントを求める Point[] points = getRectPoints(); Double radian = Math.toRadians(rotation); //最初の角度 double firstRotaition = getRadian(x, y, points[1].x, points[1].y) * 180d / Math.PI; //新しい角度 double newRotaition = getRadian(x, y, (double) touch.x, (double) touch.y) * 180d / Math.PI; //差分を以前の角度に足す rotation -= (int) (newRotaition - firstRotaition); if(AppConfig.DEBUG) { Log.d("Deco", "Deco rotation:" + Integer.toString(rotation)); } // 大きさ double currentLength = Math.sqrt(width * width + height * height) / 2; double newLength = Math.sqrt((touch.x - x) * (touch.x - x) + (touch.y - y) * (touch.y - y)); double scale = newLength / currentLength; width = width * (float)scale; height = height * (float)scale; } protected double getRadian(double x, double y, double x2, double y2) { double radian = Math.atan2(x2 - x, y2 - y); return radian; } /** * Crossing Number Algorithm * @param polygon * @param touch * @return */ boolean crossingNumber(Point[] polygon, Point touch) { int cnt = 0; for (int i = 0; i < 4; ++i) { final int x1 = polygon[(i + 1) % 4].x - polygon[i].x; final int y1 = polygon[(i + 1) % 4].y - polygon[i].y; final int x2 = touch.x - polygon[i].x; final int y2 = touch.y - polygon[i].y; if (x1 * y2 - x2 * y1 < 0) { ++cnt; } else { --cnt; } } if(AppConfig.DEBUG) { Log.d("Deco","Touch Point: "+touch.toString()); Log.d("Deco", "CrossingNumber CN:" + Integer.toString(cnt)); } return cnt == 4 || cnt == -4; } }
[ "reyurnible@gmail.com" ]
reyurnible@gmail.com
16d626962a1b57f7303778d22a0e2915eefe149e
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/shardingjdbc--sharding-jdbc/a06d534ab84498fd4bc9b73b646c57c70a843754/before/SelectStatement.java
11cc790cf4885164c703fdf85cccc17a2ed6ebaa
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
7,484
java
/* * Copyright 1999-2015 dangdang.com. * <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 * * 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. * </p> */ package com.dangdang.ddframe.rdb.sharding.parsing.parser.statement.dql.select; import com.dangdang.ddframe.rdb.sharding.parsing.parser.context.OrderItem; import com.dangdang.ddframe.rdb.sharding.parsing.parser.context.limit.Limit; import com.dangdang.ddframe.rdb.sharding.parsing.parser.context.selectitem.AggregationSelectItem; import com.dangdang.ddframe.rdb.sharding.parsing.parser.context.selectitem.SelectItem; import com.dangdang.ddframe.rdb.sharding.parsing.parser.statement.dql.DQLStatement; import com.dangdang.ddframe.rdb.sharding.parsing.parser.token.OffsetToken; import com.dangdang.ddframe.rdb.sharding.parsing.parser.token.RowCountToken; import com.dangdang.ddframe.rdb.sharding.parsing.parser.token.SQLToken; import com.google.common.base.Preconditions; import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; /** * Select SQL语句对象. * * @author zhangliang */ @Getter @Setter @ToString(callSuper = true) public final class SelectStatement extends DQLStatement { private boolean containStar; private int selectListLastPosition; private int groupByLastPosition; private final Set<SelectItem> items = new HashSet<>(); private final List<OrderItem> groupByItems = new LinkedList<>(); private final List<OrderItem> orderByItems = new LinkedList<>(); private Limit limit; @Getter(AccessLevel.NONE) private SelectStatement subQueryStatement; /** * 获取聚合选择项集合. * * @return 聚合选择项 */ public List<AggregationSelectItem> getAggregationSelectItems() { List<AggregationSelectItem> result = new LinkedList<>(); for (SelectItem each : items) { if (each instanceof AggregationSelectItem) { AggregationSelectItem aggregationSelectItem = (AggregationSelectItem) each; result.add(aggregationSelectItem); for (AggregationSelectItem derivedEach: aggregationSelectItem.getDerivedAggregationSelectItems()) { result.add(derivedEach); } } } return result; } /** * 判断是否分组和排序项一致. * * @return 是否分组和排序项一致 */ public boolean isSameGroupByAndOrderByItems() { return !getGroupByItems().isEmpty() && getGroupByItems().equals(getOrderByItems()); } /** * 为选择项设置索引. * * @param columnLabelIndexMap 列标签索引字典 */ public void setIndexForItems(final Map<String, Integer> columnLabelIndexMap) { setIndexForAggregationItem(columnLabelIndexMap); setIndexForOrderItem(columnLabelIndexMap, orderByItems); setIndexForOrderItem(columnLabelIndexMap, groupByItems); } private void setIndexForAggregationItem(final Map<String, Integer> columnLabelIndexMap) { for (AggregationSelectItem each : getAggregationSelectItems()) { Preconditions.checkState(columnLabelIndexMap.containsKey(each.getColumnLabel()), String.format("Can't find index: %s, please add alias for aggregate selections", each)); each.setIndex(columnLabelIndexMap.get(each.getColumnLabel())); for (AggregationSelectItem derived : each.getDerivedAggregationSelectItems()) { Preconditions.checkState(columnLabelIndexMap.containsKey(derived.getColumnLabel()), String.format("Can't find index: %s", derived)); derived.setIndex(columnLabelIndexMap.get(derived.getColumnLabel())); } } } private void setIndexForOrderItem(final Map<String, Integer> columnLabelIndexMap, final List<OrderItem> orderItems) { for (OrderItem each : orderItems) { if (-1 != each.getIndex()) { continue; } Preconditions.checkState(columnLabelIndexMap.containsKey(each.getColumnLabel()), String.format("Can't find index: %s", each)); if (columnLabelIndexMap.containsKey(each.getColumnLabel())) { each.setIndex(columnLabelIndexMap.get(each.getColumnLabel())); } } } /** * 判断是否包含子查询. * * @return 是否包含子查询 */ public boolean containsSubQuery() { return null != subQueryStatement; } /** * 获取子查询的Select SQL语句对象. * * @return 子查询的Select SQL语句对象 */ public SelectStatement getSubQueryStatement() { SelectStatement result = processLimitForSubQuery(); processOrderByItems(result); return result; } private SelectStatement processLimitForSubQuery() { SelectStatement result = this; List<SQLToken> limitSQLTokens = getLimitTokens(result); Limit limit = result.getLimit(); while (result.containsSubQuery()) { result = result.subQueryStatement; limitSQLTokens.addAll(getLimitTokens(result)); if (null == result.getLimit()) { continue; } if (null == limit) { limit = result.getLimit(); } if (null != result.getLimit().getRowCount()) { limit.setRowCount(result.getLimit().getRowCount()); } if (null != result.getLimit().getOffset()) { limit.setOffset(result.getLimit().getOffset()); } } resetLimitTokens(result, limitSQLTokens); result.setLimit(limit); return result; } private List<SQLToken> getLimitTokens(final SelectStatement selectStatement) { List<SQLToken> result = new LinkedList<>(); for (SQLToken each : selectStatement.getSqlTokens()) { if (each instanceof RowCountToken || each instanceof OffsetToken) { result.add(each); } } return result; } private void resetLimitTokens(final SelectStatement selectStatement, final List<SQLToken> limitSQLTokens) { int count = 0; List<Integer> toBeRemovedIndexes = new LinkedList<>(); for (SQLToken each : selectStatement.getSqlTokens()) { if (each instanceof RowCountToken || each instanceof OffsetToken) { toBeRemovedIndexes.add(count); } count++; } for (int each : toBeRemovedIndexes) { selectStatement.getSqlTokens().remove(each); } selectStatement.getSqlTokens().addAll(limitSQLTokens); } private void processOrderByItems(final SelectStatement result) { if (!containStar) { result.getOrderByItems().clear(); result.getGroupByItems().clear(); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
1e78d5ef278babca707ba1ac22a24aea9a5f983b
e3162d976b3a665717b9a75c503281e501ec1b1a
/src/main/java/com/alipay/api/domain/ZhimaOpenAppKeyanLqlCreateModel.java
057bf78a6411f530fb7b4d81f6c3988bf6d265e2
[ "Apache-2.0" ]
permissive
sunandy3/alipay-sdk-java-all
16b14f3729864d74846585796a28d858c40decf8
30e6af80cffc0d2392133457925dc5e9ee44cbac
refs/heads/master
2020-07-30T14:07:34.040692
2019-09-20T09:35:20
2019-09-20T09:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
811
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * keyantestoneone * * @author auto create * @since 1.0, 2017-08-01 16:05:55 */ public class ZhimaOpenAppKeyanLqlCreateModel extends AlipayObject { private static final long serialVersionUID = 6261798444724239474L; /** * 参数描述必须通俗易懂、无错别字、完整。描述的内容请按此格式填写:参数名+是1否唯一(如需)+应用场景+枚举值(如有)+如何获取+特殊说明(如有)。如不符合标准终审会驳回,影响上线时间。 */ @ApiField("cert_no") private String certNo; public String getCertNo() { return this.certNo; } public void setCertNo(String certNo) { this.certNo = certNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
76505b13321f4e53681657d4bb2dad035ac6f38a
cf81f24093f67df064bb218e40899f34ebb77ac8
/src/main/java/org/libj/util/UnmodifiableNavigableSet.java
7a4e2511f2028c08ea8b1a2f39df7a49f61254e6
[ "MIT" ]
permissive
libj/util
052d120f4eb9122661f975ef1fad04716885b8a4
817614b4cf72fc0f7655bc0d3142b00c408c72d7
refs/heads/master
2023-09-04T00:37:02.590848
2023-08-19T10:24:30
2023-08-19T10:24:30
148,916,945
0
0
null
null
null
null
UTF-8
Java
false
false
3,558
java
/* Copyright (c) 2022 LibJ * * 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. * * You should have received a copy of The MIT License (MIT) along with this * program. If not, see <http://opensource.org/licenses/MIT/>. */ package org.libj.util; import java.util.Iterator; import java.util.NavigableSet; import java.util.SortedSet; /** * This class allows modules to provide users with "read-only" access to internal navigable sets. Query operations on the returned * navigable set "read through" to the specified navigable set. Attempts to modify the returned navigable set, whether direct, via * its iterator, or via its {@link SortedSet#subSet(Object,Object)}, {@link SortedSet#headSet(Object)}, or * {@link SortedSet#tailSet(Object)} views, result in an {@link UnsupportedOperationException}. * <p> * The returned navigable set will be serializable if the specified navigable set is serializable. * * @param <E> The type parameter of the objects in the set. */ public class UnmodifiableNavigableSet<E> extends UnmodifiableSortedSet<E> implements NavigableSet<E> { /** * Creates a new {@link UnmodifiableNavigableSet} with the specified target {@link NavigableSet}. * * @param target The target {@link NavigableSet}. * @throws NullPointerException If the target {@link NavigableSet} is null. */ public UnmodifiableNavigableSet(final NavigableSet<E> target) { super(target); } /** * Creates a new {@link UnmodifiableNavigableSet} with a null target. */ protected UnmodifiableNavigableSet() { } @Override protected NavigableSet<E> getTarget() { return (NavigableSet<E>)super.getTarget(); } @Override public E lower(final E e) { return getTarget().lower(e); } @Override public E floor(final E e) { return getTarget().floor(e); } @Override public E ceiling(final E e) { return getTarget().ceiling(e); } @Override public E higher(final E e) { return getTarget().higher(e); } @Override public E pollFirst() { throw new UnsupportedOperationException(); } @Override public E pollLast() { throw new UnsupportedOperationException(); } @Override public NavigableSet<E> descendingSet() { return new UnmodifiableNavigableSet<>(getTarget().descendingSet()); } @Override public Iterator<E> descendingIterator() { return descendingSet().iterator(); } @Override public NavigableSet<E> subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) { return new UnmodifiableNavigableSet<>(getTarget().subSet(fromElement, fromInclusive, toElement, toInclusive)); } @Override public NavigableSet<E> headSet(final E toElement, final boolean inclusive) { return new UnmodifiableNavigableSet<>(getTarget().headSet(toElement, inclusive)); } @Override public NavigableSet<E> tailSet(final E fromElement, final boolean inclusive) { return new UnmodifiableNavigableSet<>(getTarget().tailSet(fromElement, inclusive)); } }
[ "seva@safris.org" ]
seva@safris.org
be373560fb7fda82b772ca43462717cfb4c0b861
c6d93152ab18b0e282960b8ff224a52c88efb747
/安慧软件资料/gitRepository/ITMS-3.0/Code/cy.its.sysCfg/cy.its.sysCfg.domain/src/main/java/cy/its/syscfg/domain/repository/home/INoticeRepository.java
704be3822f50aeaf0ba9793dca7cd5d1bf6419ef
[]
no_license
BAT6188/company-database
adfe5d8b87b66cd51efd0355e131de164b69d3f9
40d0342345cadc51ca2555840e32339ca0c83f51
refs/heads/master
2023-05-23T22:18:22.702550
2018-12-25T00:58:15
2018-12-25T00:58:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
412
java
package cy.its.syscfg.domain.repository.home; import java.util.List; import cy.its.com.domain.IRepository; import cy.its.syscfg.domain.criteria.NoticeCriteria; import cy.its.syscfg.domain.model.home.SysNotice; public interface INoticeRepository extends IRepository<SysNotice> { List<SysNotice> findNotices(NoticeCriteria criteria); int countNotices(NoticeCriteria criteria); void sysNoticeChanged(); }
[ "729235023@qq.com" ]
729235023@qq.com
b244c5a49f6612f202d0893e0185056e02ed709b
5f8fdf99f76653e8d26986f7cea1caa829d9abf4
/12 Compound Pattern/src/observable/adapter/GooseAdapter.java
9830e2a9d1cc49e31e7e15353429529e598dee60
[]
no_license
nanwan03/HeadFirst-Design-Pattern-Self
08048b67e61bb376f89a1d31511613cfc0108a32
341430a228f5610c440f101a8dc145490e7c2f38
refs/heads/master
2021-01-10T07:00:20.930669
2016-02-20T22:00:44
2016-02-20T22:00:44
51,129,682
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package observable.adapter; import goose.Goose; import observable.Observable; import observable.Quackable; import observer.Observer; public class GooseAdapter implements Quackable { Goose goose; Observable observable; public GooseAdapter(Goose goose) { this.goose = goose; observable = new Observable(this); } @Override public void registerObserver(Observer observer) { // TODO Auto-generated method stub observable.registerObserver(observer); } @Override public void notifyObservers() { // TODO Auto-generated method stub observable.notifyObservers(); } @Override public void quack() { // TODO Auto-generated method stub goose.honk(); notifyObservers(); } public String toString() { return "Goose pretending to be a Duck"; } }
[ "wn1842@gmail.com" ]
wn1842@gmail.com