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
b0e82479052246908ea1a3480023720311df2a7c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_7a9783f2a0ea2557f834cb6a0f99fa940f90cc52/TestBugs/14_7a9783f2a0ea2557f834cb6a0f99fa940f90cc52_TestBugs_s.java
2ccaf1fa02df1334f5124d6e14b0e37079e70644
[]
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,416
java
/* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2003, 2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache POI" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Apache POI", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.poi.hssf.usermodel; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Date; import junit.framework.TestCase; /** * @author Avik Sengupta */ public class TestBugs extends TestCase { public TestBugs(String s) { super(s); } public void test15228() throws java.io.IOException { String readFilename = System.getProperty("HSSF.testdata.path"); FileInputStream in = new FileInputStream(readFilename+File.separator+"15228.xls"); HSSFWorkbook wb = new HSSFWorkbook(in); HSSFSheet s = wb.getSheetAt(0); HSSFRow r = s.createRow(0); HSSFCell c = r.createCell((short)0); c.setCellValue(10); File file = File.createTempFile("test15228",".xls"); FileOutputStream out = new FileOutputStream(file); wb.write(out); assertTrue("No exception thrown", true); assertTrue("File Should Exist", file.exists()); } public void test13796() throws java.io.IOException { String readFilename = System.getProperty("HSSF.testdata.path"); FileInputStream in = new FileInputStream(readFilename+File.separator+"13796.xls"); HSSFWorkbook wb = new HSSFWorkbook(in); HSSFSheet s = wb.getSheetAt(0); HSSFRow r = s.createRow(0); HSSFCell c = r.createCell((short)0); c.setCellValue(10); File file = File.createTempFile("test13796",".xls"); FileOutputStream out = new FileOutputStream(file); wb.write(out); assertTrue("No exception thrown", true); assertTrue("File Should Exist", file.exists()); } public void test23094() throws Exception { File file = File.createTempFile("test23094",".xls"); FileOutputStream out = new FileOutputStream(file); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet s = wb.createSheet(); HSSFRow r = s.createRow(0); r.createCell((short)0).setCellFormula("HYPERLINK( \"http://jakarta.apache.org\", \"Jakarta\" )"); assertTrue("No Exception expected",true); wb.write(out); out.close(); } /* test hyperlinks * open resulting file in excel, and check that there is a link to Google **/ public void test15353() throws Exception { HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("My sheet"); HSSFRow row = sheet.createRow( (short) 0 ); HSSFCell cell = row.createCell( (short) 0 ); cell.setCellFormula("HYPERLINK(\"http://google.com\",\"Google\")"); // Write out the workbook File f = File.createTempFile("test15353",".xls"); FileOutputStream fileOut = new FileOutputStream(f); wb.write(fileOut); fileOut.close(); } /** test reading of a formula with a name and a cell ref in one **/ public void test14460() throws Exception { String filename = System.getProperty("HSSF.testdata.path"); filename=filename+"/14460.xls"; FileInputStream in = new FileInputStream(filename); HSSFWorkbook wb = new HSSFWorkbook(in); HSSFSheet sheet = wb.getSheetAt(0); assertTrue("No exception throws", true); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c846970888c499398dc3b339690cceef7983d6df
bbf68230f58d811b0dc1c5af410abbf480472603
/junior_001/src/test/java/ru/job4j/iterator/ConverterTest.java
edee34254e0c4f716aa0fc320fcc46981a2f2e78
[ "Apache-2.0" ]
permissive
zCRUSADERz/AlexanderYakovlev
2de343bd16e2749fee0a61ae5a19e8ed2374cc4d
9b098fb876b5a60d5e5fdc8274b3b47e994d88ba
refs/heads/master
2022-09-14T05:36:48.554661
2019-06-12T11:05:21
2019-06-12T11:05:21
115,723,226
2
0
Apache-2.0
2022-09-08T00:48:33
2017-12-29T13:07:29
Java
UTF-8
Java
false
false
3,897
java
package ru.job4j.iterator; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.NoSuchElementException; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.*; /** * Converter test. * * @author Alexander Yakovlev (sanyakovlev@yandex.ru) * @since 28.01.2017 * @version 1.0 */ public class ConverterTest { private Iterator<Integer> it; @Before public void setUp() { Iterator<Integer> it1 = Arrays.asList(1, 2, 3).iterator(); Iterator<Integer> it2 = Arrays.asList(4, 5, 6).iterator(); Iterator<Integer> it3 = Arrays.asList(7, 8, 9).iterator(); Iterator<Iterator<Integer>> its = Arrays.asList(it1, it2, it3).iterator(); Converter iteratorOfIterators = new Converter(); it = iteratorOfIterators.convert(its); } @Test public void hasNextNextSequentialInvocation() { assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(1)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(2)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(3)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(4)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(5)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(6)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(7)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(8)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(9)); assertThat(it.hasNext(), is(false)); } @Test public void testsThatNextMethodDoesntDependsOnPriorHasNextInvocation() { assertThat(it.next(), is(1)); assertThat(it.next(), is(2)); assertThat(it.next(), is(3)); assertThat(it.next(), is(4)); assertThat(it.next(), is(5)); assertThat(it.next(), is(6)); assertThat(it.next(), is(7)); assertThat(it.next(), is(8)); assertThat(it.next(), is(9)); } @Test public void sequentialHasNextInvocationDoesntAffectRetrievalOrder() { assertThat(it.hasNext(), is(true)); assertThat(it.hasNext(), is(true)); assertThat(it.next(), is(1)); assertThat(it.next(), is(2)); assertThat(it.next(), is(3)); assertThat(it.next(), is(4)); assertThat(it.next(), is(5)); assertThat(it.next(), is(6)); assertThat(it.next(), is(7)); assertThat(it.next(), is(8)); assertThat(it.next(), is(9)); } @Test public void hasNextShouldReturnFalseInCaseOfEmptyIterators() { Iterator<Integer> it1 = (new ArrayList<Integer>()).iterator(); Iterator<Integer> it2 = (new ArrayList<Integer>()).iterator(); Iterator<Integer> it3 = (new ArrayList<Integer>()).iterator(); Iterator<Iterator<Integer>> its = Arrays.asList(it1, it2, it3).iterator(); Converter iteratorOfIterators = new Converter(); it = iteratorOfIterators.convert(its); assertThat(it.hasNext(), is(false)); } @Test (expected = NoSuchElementException.class) public void invocationOfNextMethodShouldThrowNoSuchElementException() { Iterator<Integer> it1 = Arrays.asList(1, 2, 3).iterator(); Iterator<Iterator<Integer>> its = Arrays.asList(it1).iterator(); Converter iteratorOfIterators = new Converter(); it = iteratorOfIterators.convert(its); assertThat(it.next(), is(1)); assertThat(it.next(), is(2)); assertThat(it.next(), is(3)); it.next(); } @Test (expected = UnsupportedOperationException.class) public void whenRemoveThenUnsupportedOperationException() { it.remove(); } }
[ "sanyakovlev@yandex.ru" ]
sanyakovlev@yandex.ru
b025be7a4ca4d445028ef855ca207efbfbd13621
cafd7496a3a39e27b77f6b902a52f75df963b2b7
/src/main/java/com/kloudlearn/demo/config/LiquibaseConfiguration.java
afbb080655004cfc750b0a52a797f61747e98097
[]
no_license
jhipster-examples/uaa
c779728aa8bd0513a8d5b3acd3751ab4ae6941e7
71eef3b3da5fa90d6ace3aa9b455f357e6c7e14d
refs/heads/master
2022-12-10T12:01:35.982466
2019-05-30T18:30:59
2019-05-30T18:30:59
189,463,421
0
0
null
2022-12-09T04:33:09
2019-05-30T18:30:41
Java
UTF-8
Java
false
false
2,154
java
package com.kloudlearn.demo.config; import javax.sql.DataSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.cache.CacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.task.TaskExecutor; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.liquibase.AsyncSpringLiquibase; import liquibase.integration.spring.SpringLiquibase; @Configuration public class LiquibaseConfiguration { private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); private final Environment env; private final CacheManager cacheManager; public LiquibaseConfiguration(Environment env, CacheManager cacheManager) { this.env = env; this.cacheManager = cacheManager; } @Bean public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor, DataSource dataSource, LiquibaseProperties liquibaseProperties) { // Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); liquibase.setDataSource(dataSource); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } return liquibase; } }
[ "arivazhagan@kloudone.com" ]
arivazhagan@kloudone.com
08ad957e88e12b91c6b26ddb5d96b62683cee3ff
0dcc740858943bbf6a262a55e215666d091d6c15
/sources/server/src/main/java/org/bukkit/craftbukkit/v1_12_R1/metadata/EntityMetadataStore.java
86141d8b32d3ad2a2235b5c38b8cbebcd6abbd9d
[]
no_license
Akarin-project/AkarinForge
270a68769431c819d999ac178517d931205c77d7
2804aa89e3c058d7db196424811beeac5622f6fd
refs/heads/1.12.2.1
2021-06-03T10:06:07.461702
2020-04-01T19:21:51
2020-04-01T19:21:51
178,516,032
33
7
null
2020-04-01T19:50:52
2019-03-30T05:31:31
Java
UTF-8
Java
false
false
483
java
/* * Akarin Forge */ package org.bukkit.craftbukkit.v1_12_R1.metadata; import java.util.UUID; import org.bukkit.entity.Entity; import org.bukkit.metadata.MetadataStore; import org.bukkit.metadata.MetadataStoreBase; public class EntityMetadataStore extends MetadataStoreBase<Entity> implements MetadataStore<Entity> { @Override protected String disambiguate(Entity entity, String metadataKey) { return entity.getUniqueId().toString() + ":" + metadataKey; } }
[ "i@omc.hk" ]
i@omc.hk
ee27732e73eb50dff5c70ede66ef587d21c3545d
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/inspection/dataFlow/fixture/PrimitiveTypeFieldInWrapper.java
611a1df9c9d19e74e34a62b7a965249a7fb04e55
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
1,194
java
public class PrimitiveTypeFieldInWrapper { void foo() { boolean B = <warning descr="Condition 'Byte.TYPE == byte.class' is always 'true'">Byte.TYPE == byte.class</warning>; boolean C = <warning descr="Condition 'Character.TYPE == char.class' is always 'true'">Character.TYPE == char.class</warning>; boolean D = <warning descr="Condition 'Double.TYPE == double.class' is always 'true'">Double.TYPE == double.class</warning>; boolean F = <warning descr="Condition 'Float.TYPE == float.class' is always 'true'">Float.TYPE == float.class</warning>; boolean I = <warning descr="Condition 'Integer.TYPE == int.class' is always 'true'">Integer.TYPE == int.class</warning>; boolean J = <warning descr="Condition 'Long.TYPE == long.class' is always 'true'">Long.TYPE == long.class</warning>; boolean S = <warning descr="Condition 'Short.TYPE == short.class' is always 'true'">Short.TYPE == short.class</warning>; boolean Z = <warning descr="Condition 'Boolean.TYPE == boolean.class' is always 'true'">Boolean.TYPE == boolean.class</warning>; boolean V = <warning descr="Condition 'Void.TYPE == void.class' is always 'true'">Void.TYPE == void.class</warning>; } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
970975807782ac75691f29ec6f744e0f614ab1ef
11d4cef9816b1672139fff6b2d514147710a7f07
/src/main/java/com/lantaiyuan/common/connection/HbaseConnection.java
adbe707b7a7056aac75ef9620488c5ba86b79ac1
[]
no_license
hongs01/lantaiyuan-schedule
19d1721a941574748c7e4e2e6cbedfc1d11da6d1
608b57d2ca210002fc965d8e2091d6217b4fdb4a
refs/heads/master
2021-05-08T18:10:03.720975
2018-01-30T08:42:58
2018-01-30T08:42:58
119,506,876
0
1
null
null
null
null
UTF-8
Java
false
false
1,002
java
package com.lantaiyuan.common.connection; import com.lantaiyuan.common.config.domain.HBaseConfig; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionFactory; import java.io.IOException; /** * * hbase 连接 * Created by zhouyongbo on 2017-11-22. */ public class HbaseConnection { private static Connection con = null; private static HbaseConnection hbaseConnection = null; private HbaseConnection() { } public static synchronized HbaseConnection getInstance(){ if (hbaseConnection ==null){ hbaseConnection = new HbaseConnection(); } return hbaseConnection; } public Connection getConnection(){ if (con == null){ try { // con = ConnectionFactory.createConnection(HBaseConfig.getHbaseConfig()); con=null; } catch (Exception e) { e.printStackTrace(); } } return con; } }
[ "shuai.hong@lantaiyuan.com" ]
shuai.hong@lantaiyuan.com
49908af98c17339bd9dbd2b2cee435aa606965d6
f248fea32b8eec9b24f77a8eb4381f2384dd918b
/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/selection/SelectionStateField.java
b3c7f460a9761d00ae6f1aa3218d40ba0ad7b743
[ "MIT" ]
permissive
FaeyUmbrea/FoxCore
7063355216092389af740cb34b0bd76745d4b84f
509fd5d19b6609df8f3d08b360917749e6f27ce1
refs/heads/master
2021-05-31T21:42:14.829401
2016-04-24T03:09:14
2016-04-24T03:09:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,864
java
/* * This file is part of FoxCore, licensed under the MIT License (MIT). * * Copyright (c) gravityfox - https://gravityfox.net/ * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package net.foxdenstudio.sponge.foxcore.plugin.state.selection; import com.google.common.collect.ImmutableList; import net.foxdenstudio.sponge.foxcore.plugin.command.util.ProcessResult; import net.foxdenstudio.sponge.foxcore.plugin.state.SourceState; import net.foxdenstudio.sponge.foxcore.plugin.state.StateFieldBase; import org.spongepowered.api.command.CommandException; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.text.Text; import java.util.List; /** * Created by Fox on 2/19/2016. * Project: SpongeForge */ public class SelectionStateField extends StateFieldBase { private List<ISelection> selections; private ISelection currentSelection; public SelectionStateField(SourceState sourceState) { super("Current Selection", sourceState); } @Override public Text currentState(CommandSource source) { return Text.of(); } @Override public ProcessResult modify(CommandSource source, String arguments) throws CommandException { return ProcessResult.failure(); } @Override public List<String> modifySuggestions(CommandSource source, String arguments) throws CommandException { return ImmutableList.of(); } @Override public List<Text> getScoreboardText() { return ImmutableList.of(); } @Override public void flush() { } @Override public boolean isEmpty() { return true; } public List<ISelection> getSelections() { return selections; } public ISelection getCurrentSelection() { return currentSelection; } }
[ "gravityreallyhatesme@gmail.com" ]
gravityreallyhatesme@gmail.com
028a86babcaa7b322cb5c86be7a113aaaf9775a6
579eb33e1cba490f0445495b156b8d46fe40b4ab
/jcp/src/test/java/com/igormaznitsa/jcp/expression/functions/FunctionSTR2INTTest.java
c25b755206789d7dfb8c3bc89fcf626a40acf12c
[ "Apache-2.0" ]
permissive
raydac/java-comment-preprocessor
2c54832120a1cb407280a1d954e40546a00d546f
757303a48339fb7527944f7193d1a8f4947b377b
refs/heads/master
2023-06-25T02:45:09.018102
2023-06-20T10:05:14
2023-06-20T10:05:14
32,172,393
171
29
Apache-2.0
2023-06-20T10:05:16
2015-03-13T18:06:36
HTML
UTF-8
Java
false
false
2,196
java
/* * Copyright 2002-2019 Igor Maznitsa (http://www.igormaznitsa.com) * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.igormaznitsa.jcp.expression.functions; import com.igormaznitsa.jcp.expression.Value; import com.igormaznitsa.jcp.expression.ValueType; import org.junit.Test; import static org.junit.Assert.assertEquals; public class FunctionSTR2INTTest extends AbstractFunctionTest { private static final FunctionSTR2INT HANDLER = new FunctionSTR2INT(); @Test public void testExecute_Str() throws Exception { assertFunction("str2int(\"100\")", Value.valueOf(100L)); assertFunction("str2int(\"0\")", Value.INT_ZERO); assertDestinationFolderEmpty(); } @Test public void testExecute_wrongCase() throws Exception { assertFunctionException("str2int(true)"); assertFunctionException("str2int(0.3)"); assertFunctionException("str2int(1,2)"); assertDestinationFolderEmpty(); } @Override public void testName() { assertEquals("str2int", HANDLER.getName()); } @Override public void testReference() { assertReference(HANDLER); } @Override public void testArity() { assertEquals(1, HANDLER.getArity()); } @Override public void testAllowedArgumentTypes() { assertAllowedArguments(HANDLER, new ValueType[][] {{ValueType.STRING}}); } @Override public void testResultType() { assertEquals(ValueType.INT, HANDLER.getResultType()); } }
[ "rrg4400@gmail.com" ]
rrg4400@gmail.com
ae3eafda085689b17cde6da409924545b4f34e56
545a30d7261d5212a6ce0d715bbf81601ac939e8
/src/winkhouse/engine/search/ImmobiliColloquiSearchEngine.java
a9bc0262fd54f889330be8a43ec8fe6e0952b292
[]
no_license
mlavoratornovo/winkhouse
333f00dcf7cbeb125ec345fde695c1dd3e3fa2eb
edc4084da52bc4c3776950f5c33925942f890c5b
refs/heads/master
2022-05-13T04:42:13.118839
2022-05-01T16:25:21
2022-05-01T16:25:21
77,863,256
1
0
null
null
null
null
UTF-8
Java
false
false
1,808
java
package winkhouse.engine.search; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; import winkhouse.dao.ColloquiDAO; import winkhouse.model.ColloquiModel; import winkhouse.model.ImmobiliModel; public class ImmobiliColloquiSearchEngine implements IRunnableWithProgress { private Integer codColloquio = null; private ArrayList returnValue = null; public ImmobiliColloquiSearchEngine(Integer codColloquio, ArrayList returnValue) { this.codColloquio = codColloquio; this.returnValue = returnValue; } @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { monitor.beginTask("inizio ricerca ...", 2); ColloquiDAO cDAO = new ColloquiDAO(); ColloquiModel cm = (ColloquiModel)cDAO.getColloquioById(ColloquiModel.class.getName(), this.codColloquio); HashMap<Integer,ImmobiliModel> immobili = new HashMap<Integer, ImmobiliModel>(); SearchEngineImmobili sei = new SearchEngineImmobili(cm.getCriteriRicerca()); ArrayList alImmobili = sei.find(); if (alImmobili != null){ Iterator ite = alImmobili.iterator(); while (ite.hasNext()){ ImmobiliModel im = (ImmobiliModel)ite.next(); immobili.put(im.getCodImmobile(), im); } } monitor.worked(1); Iterator<Map.Entry<Integer, ImmobiliModel>> ite = immobili.entrySet().iterator(); monitor.subTask("indicizzazione immobili..."); while(ite.hasNext()){ Map.Entry me = ite.next(); if (me.getValue() != null){ returnValue.add(me.getValue()); } } monitor.worked(1); } }
[ "m.lavoratornovo@gmail.com" ]
m.lavoratornovo@gmail.com
9bbaef4e097ed8d6361903248f995fe322713c3f
2da6618391b665999d29f77a468fdc9470476e94
/简单文件上传/DownloadUploadDemo/app/src/main/java/com/fun/downloaduploaddemo/MainActivity.java
c4d2d8ba69c5d5c1eb6eec8cc523704efac6e1b6
[]
no_license
qinbna/ananwork
eaed8ab384dbd06552c7e9156dedbf003f7e2bad
87a36e791ee5f424b09d09a4671b4dcd9efb44d4
refs/heads/master
2021-05-11T03:29:10.669852
2017-06-26T04:05:33
2017-06-26T04:05:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,973
java
package com.fun.downloaduploaddemo; import android.app.ProgressDialog; import android.os.Environment; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; import org.xutils.common.Callback; import org.xutils.http.RequestParams; import org.xutils.x; import java.io.File; public class MainActivity extends AppCompatActivity { private static final String BASE_URL = "http://120.24.45.234:8080/static/login/sever"; private static final String BASE_PATH = Environment.getExternalStorageDirectory().getPath() + File.separator; private Button buttonDownloadFile; private ProgressDialog progressDialog; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); buttonDownloadFile = (Button) findViewById(R.id.bt_downloadFile); buttonDownloadFile.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String url = BASE_URL + "/building.xls"; String path = BASE_PATH + "building.xls"; downloadFile(url, path); } }); } private void downloadFile(final String url, String path) { progressDialog = new ProgressDialog(this); RequestParams requestParams = new RequestParams(url); requestParams.setSaveFilePath(path); x.http().get(requestParams, new Callback.ProgressCallback<File>() { @Override public void onWaiting() { } @Override public void onStarted() { } @Override public void onLoading(long total, long current, boolean isDownloading) { progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage("亲,努力下载中。。。"); progressDialog.show(); progressDialog.setMax((int) total); progressDialog.setProgress((int) current); } @Override public void onSuccess(File result) { Toast.makeText(MainActivity.this, "下载成功", Toast.LENGTH_SHORT).show(); progressDialog.dismiss(); } @Override public void onError(Throwable ex, boolean isOnCallback) { ex.printStackTrace(); Toast.makeText(MainActivity.this, "下载失败,请检查网络和SD卡", Toast.LENGTH_SHORT).show(); progressDialog.dismiss(); } @Override public void onCancelled(CancelledException cex) { } @Override public void onFinished() { } }); } }
[ "m185138844" ]
m185138844
f2d2730fd30118aded28a0516159ee2ecd8c5116
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
/hybris/bin/platform/ext/core/testsrc/de/hybris/platform/servicelayer/internal/dao/DefaultGenericDaoIntegrationTest.java
ec108fdcc5e723ee2a18b62ade2b70393874f018
[]
no_license
shaikshakeeb785/hybrisNew
c753ac45c6ae264373e8224842dfc2c40a397eb9
228100b58d788d6f3203333058fd4e358621aba1
refs/heads/master
2023-08-15T06:31:59.469432
2021-09-03T09:02:04
2021-09-03T09:02:04
402,680,399
0
0
null
null
null
null
UTF-8
Java
false
false
3,761
java
/* * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.servicelayer.internal.dao; import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.jalo.flexiblesearch.QueryOptions; import de.hybris.platform.persistence.flexiblesearch.polyglot.PolyglotPersistenceFlexibleSearchSupport; import de.hybris.platform.servicelayer.ServicelayerBaseTest; import de.hybris.platform.servicelayer.internal.dao.SortParameters.SortOrder; import de.hybris.platform.servicelayer.search.FlexibleSearchQuery; import de.hybris.platform.servicelayer.search.FlexibleSearchService; import de.hybris.platform.servicelayer.search.impl.SearchResultImpl; import java.util.Collections; import java.util.Map; import org.junit.Test; import org.mockito.ArgumentMatcher; import org.mockito.Mockito; @IntegrationTest public class DefaultGenericDaoIntegrationTest extends ServicelayerBaseTest { @Test public void shouldUsePolyglotDialectOnFind() { final DefaultGenericDao<?> dao = givenDao(); dao.find(); verifyPolyglotDialectWasUsed(dao); } @Test public void shouldUsePolyglotDialectOnFindWithFilterParameters() { final DefaultGenericDao<?> dao = givenDao(); final Map<String, Object> filterParams = givenFilterParams(); dao.find(filterParams); verifyPolyglotDialectWasUsed(dao); } @Test public void shouldUsePolyglotDialectOnFindWithSortParameters() { final DefaultGenericDao<?> dao = givenDao(); final SortParameters sortParams = givenSortParams(); dao.find(sortParams); verifyPolyglotDialectWasUsed(dao); } @Test public void shouldUsePolyglotDialectOnFindWithFilterAndSortParameters() { final DefaultGenericDao<?> dao = givenDao(); final Map<String, Object> filterParams = givenFilterParams(); final SortParameters sortParams = givenSortParams(); dao.find(filterParams, sortParams); verifyPolyglotDialectWasUsed(dao); } @Test public void shouldUsePolyglotDialectOnFindWithFilterAndSortParametersAndCount() { final DefaultGenericDao<?> dao = givenDao(); final Map<String, Object> filterParams = givenFilterParams(); final SortParameters sortParams = givenSortParams(); dao.find(filterParams, sortParams, 12); verifyPolyglotDialectWasUsed(dao); } private DefaultGenericDao<?> givenDao() { final FlexibleSearchService fsMock = Mockito.mock(FlexibleSearchService.class); when(fsMock.search(any(FlexibleSearchQuery.class))) .thenReturn(new SearchResultImpl<>(Collections.emptyList(), 0, 0, 0)); final DefaultGenericDao dao = new DefaultGenericDao<>("Title"); dao.setFlexibleSearchService(fsMock); return dao; } private Map<String, Object> givenFilterParams() { return Collections.singletonMap("code", "ala"); } private SortParameters givenSortParams() { final SortParameters result = new SortParameters(); result.addSortParameter("code", SortOrder.ASCENDING); return result; } private void verifyPolyglotDialectWasUsed(final DefaultGenericDao<?> dao) { final FlexibleSearchService fsMock = dao.getFlexibleSearchService(); Mockito.verify(fsMock).search(Mockito.argThat(new IsValidPolyglotQuery())); } private static class IsValidPolyglotQuery extends ArgumentMatcher<FlexibleSearchQuery> { @Override public boolean matches(final Object argument) { if (!(argument instanceof FlexibleSearchQuery)) { return false; } final FlexibleSearchQuery fsq = (FlexibleSearchQuery) argument; return PolyglotPersistenceFlexibleSearchSupport .tryToConvertToPolyglotCriteria(QueryOptions.newBuilder().withQuery(fsq.getQuery()).withValues(fsq.getQueryParameters()).build()).isPresent(); } } }
[ "sauravkr82711@gmail.com" ]
sauravkr82711@gmail.com
cb66e19ea2c6d176201414b32c90768d6ad57164
a5f70807c4c818a51077d40642f7539fcdfb0151
/src/com/wxad/online/persistence/PushStatusBarInfoMapper.java
f47ce159348e9ab338cf5c8ffb5b25b104b385dd
[]
no_license
tuziilm/online
22648a0bcb767a1567405fe09da446e196c75bec
35a25aa100452af8770db881eedae5f813356031
refs/heads/master
2021-01-10T03:02:12.036565
2015-12-11T07:05:49
2015-12-11T07:05:49
46,915,967
0
0
null
null
null
null
GB18030
Java
false
false
467
java
package com.wxad.online.persistence; import java.util.List; import com.wxad.online.domain.PushStatusBarInfo; /** * ibatis操作push信息表的Mapper接口 * @author <a href="xuzhenqin@gmail.com">Calvin Pang</a> * */ public interface PushStatusBarInfoMapper extends BaseMapper<PushStatusBarInfo>{ int insertPushStatusBarInfo(PushStatusBarInfo pushStatusBarInfo); List<PushStatusBarInfo> getByPushId(int pushId); PushStatusBarInfo getById(String id); }
[ "tuxw19900512@126.com" ]
tuxw19900512@126.com
663b4e1069cbde504f24e9d933ed2e111437a574
7653e008384de73b57411b7748dab52b561d51e6
/SrcGame/dwo/scripts/quests/_10279_MutatedKaneusOren.java
436fe46bb10157fc4e2235a2228ab0814ac996aa
[]
no_license
BloodyDawn/Ertheia
14520ecd79c38acf079de05c316766280ae6c0e8
d90d7f079aa370b57999d483c8309ce833ff8af0
refs/heads/master
2021-01-11T22:10:19.455110
2017-01-14T12:15:56
2017-01-14T12:15:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,394
java
package dwo.scripts.quests; import dwo.gameserver.model.actor.L2Npc; import dwo.gameserver.model.actor.instance.L2PcInstance; import dwo.gameserver.model.player.formation.group.L2Party; import dwo.gameserver.model.world.quest.Quest; import dwo.gameserver.model.world.quest.QuestSound; import dwo.gameserver.model.world.quest.QuestState; import dwo.gameserver.model.world.quest.QuestType; /** * L2GOD Team * User: ANZO * Date: 13.08.11 * Time: 1:29 */ public class _10279_MutatedKaneusOren extends Quest { private static final int MOUEN = 30196; private static final int ROVIA = 30189; private static final int KAIM_ABIGORE = 18566; private static final int KNIGHT_MONTAGNAR = 18568; private static final int TISSUE_KA = 13836; private static final int TISSUE_KM = 13837; public _10279_MutatedKaneusOren() { addStartNpc(MOUEN); addTalkId(MOUEN, ROVIA); addKillId(KAIM_ABIGORE, KNIGHT_MONTAGNAR); questItemIds = new int[]{TISSUE_KA, TISSUE_KM}; } public static void main(String[] args) { new _10279_MutatedKaneusOren(); } @Override public int getQuestId() { return 10279; } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { QuestState st = player.getQuestState(getClass()); if(st == null) { return null; } if(event.equalsIgnoreCase("30196-03.htm")) { st.startQuest(); } else if(event.equalsIgnoreCase("30189-03.htm")) { st.giveAdena(100000, true); st.unset("cond"); st.exitQuest(QuestType.ONE_TIME); st.playSound(QuestSound.ITEMSOUND_QUEST_FINISH); } return event; } @Override public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) { L2Party party = player.getParty(); if(npc.getNpcId() == KAIM_ABIGORE) { if(party != null) { for(L2PcInstance partyMember : party.getMembersInRadius(player, 900)) { QuestState qs = partyMember.getQuestState(getClass()); if(qs == null) { return null; } if(qs.getState() == STARTED && qs.getCond() == 1 && !qs.hasQuestItems(TISSUE_KA)) { qs.giveItems(TISSUE_KA, 1); qs.playSound(QuestSound.ITEMSOUND_QUEST_MIDDLE); if(qs.hasQuestItems(TISSUE_KM)) { qs.setCond(2); } } } } else { QuestState qs = player.getQuestState(getClass()); if(qs == null) { return null; } if(qs.getState() == STARTED && qs.getCond() == 1 && !qs.hasQuestItems(TISSUE_KA)) { qs.giveItems(TISSUE_KA, 1); qs.playSound(QuestSound.ITEMSOUND_QUEST_MIDDLE); if(qs.hasQuestItems(TISSUE_KM)) { qs.setCond(2); } } } } else if(npc.getNpcId() == KNIGHT_MONTAGNAR) { if(party != null) { for(L2PcInstance partyMember : party.getMembersInRadius(player, 900)) { QuestState qs = partyMember.getQuestState(getClass()); if(qs == null) { return null; } if(qs.getState() == STARTED && qs.getCond() == 1 && !qs.hasQuestItems(TISSUE_KM)) { qs.giveItems(TISSUE_KM, 1); qs.playSound(QuestSound.ITEMSOUND_QUEST_MIDDLE); if(qs.hasQuestItems(TISSUE_KA)) { qs.setCond(2); } } } } else { QuestState qs = player.getQuestState(getClass()); if(qs == null) { return null; } if(qs.getState() == STARTED && qs.getCond() == 1 && !qs.hasQuestItems(TISSUE_KM)) { qs.giveItems(TISSUE_KM, 1); qs.playSound(QuestSound.ITEMSOUND_QUEST_MIDDLE); if(qs.hasQuestItems(TISSUE_KA)) { qs.setCond(2); } } } } return null; } @Override public String onTalk(L2Npc npc, QuestState st) { L2PcInstance player = st.getPlayer(); int npcId = npc.getNpcId(); switch(st.getState()) { case COMPLETED: if(npcId == MOUEN) { return "30196-06.htm"; } if(npcId == ROVIA) { return getAlreadyCompletedMsg(player, QuestType.ONE_TIME); } break; case CREATED: if(npcId == MOUEN) { return player.getLevel() >= 45 ? "30196-01.htm" : "30196-00.htm"; } break; case STARTED: if(npcId == MOUEN) { return st.hasQuestItems(TISSUE_KA) && st.hasQuestItems(TISSUE_KM) ? "30196-05.htm" : "30196-04.htm"; } if(npcId == ROVIA) { return st.hasQuestItems(TISSUE_KA) && st.hasQuestItems(TISSUE_KM) ? "30189-02.htm" : "30189-01.htm"; } break; } return null; } }
[ "echipachenko@gmail.com" ]
echipachenko@gmail.com
2d138f4c54d05537f1b481d38927e69cc5a8ffdd
047bb2e2f8e3700c22286f1c7d9ac9ddb7084721
/YjyMoreFunctions/app/src/main/java/com/yjymorefunctions/views/ShimmerTextView.java
6e7f734a309f5412c42a470113a0e68c0fde2414
[]
no_license
junyao-yu/YjyMoreFunction
3c94af293548fcfe133cccde6df0e9b3f9d9cc17
cf0fb31a61052541f4718f48f167ab0c1c58aefb
refs/heads/master
2020-05-21T23:21:30.543846
2018-03-14T03:48:42
2018-03-14T03:48:42
62,130,468
1
0
null
null
null
null
UTF-8
Java
false
false
2,384
java
package com.yjymorefunctions.views; import android.animation.ValueAnimator; import android.content.Context; import android.graphics.Canvas; import android.graphics.LinearGradient; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Shader; import android.util.AttributeSet; import android.widget.TextView; /** * Auth:yujunyao * Since: 2016/11/29 17:09 * Email:yujunyao@yonglibao.com */ public class ShimmerTextView extends TextView { private Paint mPaint = null; private ValueAnimator valueAnimator = null; private LinearGradient mLinearGradient = null; private int mDx = 0; public ShimmerTextView(Context context) { this(context, null); } public ShimmerTextView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public ShimmerTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(); } private void init() { mPaint = getPaint(); } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); valueAnimator = ValueAnimator.ofInt(0,2 * getMeasuredWidth()); valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { mDx = (Integer) animation.getAnimatedValue(); postInvalidate(); } }); valueAnimator.setRepeatMode(ValueAnimator.RESTART); valueAnimator.setRepeatCount(ValueAnimator.INFINITE); valueAnimator.setDuration(2000); valueAnimator.start(); mLinearGradient = new LinearGradient(- getMeasuredWidth(), 0, 0, 0,new int[]{ getCurrentTextColor(), 0xff00ff00, getCurrentTextColor() }, new float[]{ 0, 0.5f, 1 }, Shader.TileMode.CLAMP ); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Matrix matrix = new Matrix(); matrix.setTranslate(mDx,0); mLinearGradient.setLocalMatrix(matrix); mPaint.setShader(mLinearGradient); } }
[ "yujunyao@yonglibao.com" ]
yujunyao@yonglibao.com
5988362f2d515bf88bd5f29fce6e8f087f764a36
68b81db811954a5890ab180e428eb466bcbf6531
/Libraries/Minecraft/BuildTools/1.11.2/work/decompile-22de4839/net/minecraft/server/BlockJukeBox.java
c2be754bd45245ef51782c5eb5f0513c901555ad
[]
no_license
br45entei/RepoFiles
0aba657229fbe4878e8ccfc8977c44de66722c9b
5748079540b8127cf05048786a7db0d38b5ba46f
refs/heads/master
2020-04-06T04:43:26.372998
2017-03-12T10:33:12
2017-03-12T10:33:12
82,893,180
0
1
null
null
null
null
UTF-8
Java
false
false
6,120
java
package net.minecraft.server; public class BlockJukeBox extends BlockTileEntity { public static final BlockStateBoolean HAS_RECORD = BlockStateBoolean.of("has_record"); public static void a(DataConverterManager dataconvertermanager) { dataconvertermanager.a(DataConverterTypes.BLOCK_ENTITY, (DataInspector) (new DataInspectorItem(BlockJukeBox.TileEntityRecordPlayer.class, new String[] { "RecordItem"}))); } protected BlockJukeBox() { super(Material.WOOD, MaterialMapColor.l); this.y(this.blockStateList.getBlockData().set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(false))); this.a(CreativeModeTab.c); } public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumHand enumhand, EnumDirection enumdirection, float f, float f1, float f2) { if (((Boolean) iblockdata.get(BlockJukeBox.HAS_RECORD)).booleanValue()) { this.dropRecord(world, blockposition, iblockdata); iblockdata = iblockdata.set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(false)); world.setTypeAndData(blockposition, iblockdata, 2); return true; } else { return false; } } public void a(World world, BlockPosition blockposition, IBlockData iblockdata, ItemStack itemstack) { if (!world.isClientSide) { TileEntity tileentity = world.getTileEntity(blockposition); if (tileentity instanceof BlockJukeBox.TileEntityRecordPlayer) { ((BlockJukeBox.TileEntityRecordPlayer) tileentity).setRecord(itemstack.cloneItemStack()); world.setTypeAndData(blockposition, iblockdata.set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(true)), 2); } } } public void dropRecord(World world, BlockPosition blockposition, IBlockData iblockdata) { if (!world.isClientSide) { TileEntity tileentity = world.getTileEntity(blockposition); if (tileentity instanceof BlockJukeBox.TileEntityRecordPlayer) { BlockJukeBox.TileEntityRecordPlayer blockjukebox_tileentityrecordplayer = (BlockJukeBox.TileEntityRecordPlayer) tileentity; ItemStack itemstack = blockjukebox_tileentityrecordplayer.getRecord(); if (!itemstack.isEmpty()) { world.triggerEffect(1010, blockposition, 0); world.a(blockposition, (SoundEffect) null); blockjukebox_tileentityrecordplayer.setRecord(ItemStack.a); float f = 0.7F; double d0 = (double) (world.random.nextFloat() * 0.7F) + 0.15000000596046448D; double d1 = (double) (world.random.nextFloat() * 0.7F) + 0.06000000238418579D + 0.6D; double d2 = (double) (world.random.nextFloat() * 0.7F) + 0.15000000596046448D; ItemStack itemstack1 = itemstack.cloneItemStack(); EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + d0, (double) blockposition.getY() + d1, (double) blockposition.getZ() + d2, itemstack1); entityitem.q(); world.addEntity(entityitem); } } } } public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) { this.dropRecord(world, blockposition, iblockdata); super.remove(world, blockposition, iblockdata); } public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) { if (!world.isClientSide) { super.dropNaturally(world, blockposition, iblockdata, f, 0); } } public TileEntity a(World world, int i) { return new BlockJukeBox.TileEntityRecordPlayer(); } public boolean isComplexRedstone(IBlockData iblockdata) { return true; } public int c(IBlockData iblockdata, World world, BlockPosition blockposition) { TileEntity tileentity = world.getTileEntity(blockposition); if (tileentity instanceof BlockJukeBox.TileEntityRecordPlayer) { ItemStack itemstack = ((BlockJukeBox.TileEntityRecordPlayer) tileentity).getRecord(); if (!itemstack.isEmpty()) { return Item.getId(itemstack.getItem()) + 1 - Item.getId(Items.RECORD_13); } } return 0; } public EnumRenderType a(IBlockData iblockdata) { return EnumRenderType.MODEL; } public IBlockData fromLegacyData(int i) { return this.getBlockData().set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(i > 0)); } public int toLegacyData(IBlockData iblockdata) { return ((Boolean) iblockdata.get(BlockJukeBox.HAS_RECORD)).booleanValue() ? 1 : 0; } protected BlockStateList getStateList() { return new BlockStateList(this, new IBlockState[] { BlockJukeBox.HAS_RECORD}); } public static class TileEntityRecordPlayer extends TileEntity { private ItemStack record; public TileEntityRecordPlayer() { this.record = ItemStack.a; } public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); if (nbttagcompound.hasKeyOfType("RecordItem", 10)) { this.setRecord(new ItemStack(nbttagcompound.getCompound("RecordItem"))); } else if (nbttagcompound.getInt("Record") > 0) { this.setRecord(new ItemStack(Item.getById(nbttagcompound.getInt("Record")))); } } public NBTTagCompound save(NBTTagCompound nbttagcompound) { super.save(nbttagcompound); if (!this.getRecord().isEmpty()) { nbttagcompound.set("RecordItem", this.getRecord().save(new NBTTagCompound())); } return nbttagcompound; } public ItemStack getRecord() { return this.record; } public void setRecord(ItemStack itemstack) { this.record = itemstack; this.update(); } } }
[ "br45entei@gmail.com" ]
br45entei@gmail.com
e67c57acf7fa85396dd0f1689b9d35efa48a5258
75950d61f2e7517f3fe4c32f0109b203d41466bf
/modules/tags/fabric3-modules-parent-pom-1.8/kernel/impl/fabric3-pojo/src/test/java/org/fabric3/implementation/pojo/reflection/MethodInjectorTestCase.java
4864b5e404b6d5c572442a55af75f44330d1d5d2
[]
no_license
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
UTF-8
Java
false
false
4,249
java
/* * Fabric3 * Copyright (c) 2009-2011 Metaform Systems * * Fabric3 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the * GNU General Public License along with Fabric3. * If not, see <http://www.gnu.org/licenses/>. * * ---------------------------------------------------- * * Portions originally based on Apache Tuscany 2007 * licensed under the Apache 2.0 license. * */ package org.fabric3.implementation.pojo.reflection; import java.lang.reflect.Method; import junit.framework.TestCase; import org.easymock.EasyMock; import org.fabric3.spi.objectfactory.ObjectCreationException; import org.fabric3.spi.objectfactory.ObjectFactory; /** * @version $Rev$ $Date$ */ public class MethodInjectorTestCase extends TestCase { private Method fooMethod; private Method exceptionMethod; private ObjectFactory objectFactory; public void testIllegalArgument() throws Exception { EasyMock.expect(objectFactory.getInstance()).andReturn(new Object()); EasyMock.replay(objectFactory); MethodInjector injector = new MethodInjector(fooMethod, objectFactory); try { injector.inject(new Foo()); fail(); } catch (ObjectCreationException e) { // expected } } public void testException() throws Exception { EasyMock.expect(objectFactory.getInstance()).andReturn("foo"); EasyMock.replay(objectFactory); MethodInjector injector = new MethodInjector(exceptionMethod, objectFactory); try { injector.inject(new Foo()); fail(); } catch (ObjectCreationException e) { // expected } } public void testReinjectionOfNullValue() throws Exception { EasyMock.replay(objectFactory); MethodInjector injector = new MethodInjector(fooMethod, objectFactory); try { injector.clearObjectFactory(); Foo foo = new Foo(); injector.inject(foo); assertNull(foo.getFoo()); } catch (ObjectCreationException e) { // expected } } protected void setUp() throws Exception { super.setUp(); fooMethod = Foo.class.getMethod("setFoo", String.class); exceptionMethod = Foo.class.getDeclaredMethod("exception", String.class); objectFactory = EasyMock.createMock(ObjectFactory.class); } private class Foo { private String foo = "default"; public String getFoo() { return foo; } public void setFoo(String foo) { this.foo = foo; } private void hidden(String bar) { } public void exception(String bar) { throw new RuntimeException(); } } }
[ "jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
b2b22ae9d4fc171af6be2d9099932dd396854c58
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/p213co/znly/models/notifications/NotificationProto$ChatMessageNotificationOrBuilder.java
e882a4939df3f42d6a50b1360b07c773303c4530
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
724
java
package p213co.znly.models.notifications; import p213co.znly.core.vendor.com.google.protobuf.ByteString; import p213co.znly.core.vendor.com.google.protobuf.MessageLiteOrBuilder; import p213co.znly.models.PingProto$Ping2; import p213co.znly.models.UserProto$User; /* renamed from: co.znly.models.notifications.NotificationProto$ChatMessageNotificationOrBuilder */ public interface NotificationProto$ChatMessageNotificationOrBuilder extends MessageLiteOrBuilder { UserProto$User getAuthor(); String getConversationUuid(); ByteString getConversationUuidBytes(); String getCursor(); ByteString getCursorBytes(); PingProto$Ping2 getMessage(); boolean hasAuthor(); boolean hasMessage(); }
[ "developer@appzoc.com" ]
developer@appzoc.com
a8dcf616807929371340c148846aa79fece6a40f
ec1821602e059e58a3509ac528201cbf5470b377
/eclipse/common/plugins/com.liferay.ide.eclipse.core/src/com/liferay/ide/eclipse/core/util/DescriptorHelper.java
a00f67c1b493904ca7f8deb5188aa52a597e52e5
[]
no_license
adrianrm/liferay-ide
058ef2c3b4c2088bb01b38b84bba8c789c022337
1b88e31e08c38f95aae6e014f59a7093a5e14123
refs/heads/master
2021-01-16T22:47:35.590720
2011-08-12T08:37:39
2011-08-12T08:37:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,101
java
/******************************************************************************* * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. *******************************************************************************/ package com.liferay.ide.eclipse.core.util; import com.liferay.ide.eclipse.core.CorePlugin; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IStatus; import org.eclipse.wst.common.componentcore.ComponentCore; import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; import org.eclipse.wst.sse.core.StructuredModelManager; import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * Class for helping edit XML files in user projects. * * @author Greg Amerson */ @SuppressWarnings("restriction") public class DescriptorHelper { public abstract class DOMModelEditOperation extends DOMModelOperation { public DOMModelEditOperation(IFile descriptorFile) { super(descriptorFile); } public IStatus execute() { IStatus retval = null; if (!this.file.exists()) { return CorePlugin.createErrorStatus(this.file.getName() + " doesn't exist"); } IDOMModel domModel = null; try { domModel = (IDOMModel) StructuredModelManager.getModelManager().getModelForEdit(this.file); domModel.aboutToChangeModel(); IDOMDocument document = domModel.getDocument(); retval = doExecute(document); domModel.changedModel(); domModel.save(); } catch (Exception e) { retval = CorePlugin.createErrorStatus(e); } finally { if (domModel != null) { domModel.releaseFromEdit(); } } return retval; } } protected static abstract class DOMModelOperation { protected IFile file; public DOMModelOperation(IFile descriptorFile) { this.file = descriptorFile; } public abstract IStatus execute(); protected abstract IStatus doExecute(IDOMDocument document); } protected abstract class DOMModelReadOperation extends DOMModelOperation { public DOMModelReadOperation(IFile descriptorFile) { super(descriptorFile); } public IStatus execute() { IStatus retval = null; if (!this.file.exists()) { return CorePlugin.createErrorStatus(this.file.getName() + " doesn't exist"); } IDOMModel domModel = null; try { domModel = (IDOMModel) StructuredModelManager.getModelManager().getModelForRead(this.file); IDOMDocument document = domModel.getDocument(); retval = doExecute(document); } catch (Exception e) { retval = CorePlugin.createErrorStatus(e); } finally { if (domModel != null) { domModel.releaseFromRead(); } } return retval; } } public static Element appendChildElement(Element parentElement, String newElementName) { return appendChildElement(parentElement, newElementName, null); } public static Element appendChildElement(Element parentElement, String newElementName, String initialTextContent) { Element newChildElement = null; if (parentElement != null && newElementName != null) { Document ownerDocument = parentElement.getOwnerDocument(); newChildElement = ownerDocument.createElement(newElementName); if (initialTextContent != null) { newChildElement.appendChild(ownerDocument.createTextNode(initialTextContent)); } parentElement.appendChild(newChildElement); } return newChildElement; } public static Element findChildElement(Element parentElement, String elementName) { Element retval = null; if (parentElement == null) { return retval; } NodeList children = parentElement.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child instanceof Element && child.getNodeName().equals(elementName)) { retval = (Element) child; break; } } return retval; } public static IFile getDescriptorFile(IProject project, String fileName) { IVirtualComponent comp = ComponentCore.createComponent(project); if (comp == null) { return null; } IVirtualFolder webRoot = comp.getRootFolder(); IFolder webInfFolder = (IFolder) webRoot.getFolder("WEB-INF").getUnderlyingFolder(); return webInfFolder.getFile(fileName); } public static Element insertChildElement( Element parentElement, Node refNode, String newElementName, String initialTextContent) { Element newChildElement = null; if (parentElement != null && newElementName != null) { Document ownerDocument = parentElement.getOwnerDocument(); newChildElement = ownerDocument.createElement(newElementName); if (initialTextContent != null) { newChildElement.appendChild(ownerDocument.createTextNode(initialTextContent)); } parentElement.insertBefore(newChildElement, refNode); } return newChildElement; } public static void removeChildren(Node node) { if (node == null || node.getChildNodes() == null || node.getChildNodes().getLength() <= 0) { return; } NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { node.removeChild(children.item(i)); } } protected String descriptorPath; protected IProject project; public DescriptorHelper(IProject project) { this.project = project; } public List<Element> getChildElements(Element parent) { List<Element> retval = new ArrayList<Element>(); if (parent != null) { NodeList children = parent.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child instanceof Element) { retval.add((Element) child); } } } return retval; } public String getDescriptorPath() { return this.descriptorPath; } public void setDescriptorPath(String path) { this.descriptorPath = path; } protected IFile getDescriptorFile(String fileName) { return getDescriptorFile(project, fileName); } protected IProject getProject() { return project; } }
[ "gregory.amerson@liferay.com" ]
gregory.amerson@liferay.com
d42d9f2160c9e0188a01e8b6bf07970a981af73c
69b3640ea776eb3796c9754a2860066e2b571612
/lms-box-client/src/main/java/userManagementGUI/TestFindSubscriptionDetailByStudentAndCourse.java
85d8ba42cc37983df02ccee9006fa57f34cbd1f6
[]
no_license
medalibettaieb/1617csGL2
f9879f71b871deb9e799d5a52e276d12bf1f470b
36da782360c7a83cd54353588301c05dfca170f5
refs/heads/master
2021-06-08T19:10:18.022121
2016-12-03T15:59:28
2016-12-03T15:59:28
68,637,327
1
2
null
null
null
null
UTF-8
Java
false
false
1,054
java
package userManagementGUI; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import tn.esprit.cs.g2.entities.SubscriptionDetail; import tn.esprit.cs.g2.services.UserManagementRemote; public class TestFindSubscriptionDetailByStudentAndCourse { public static void main(String[] args) throws NamingException, ParseException { Context context = new InitialContext(); UserManagementRemote userManagementRemote = (UserManagementRemote) context .lookup("lms-box-ear/lms-box-ejb/UserManagement!tn.esprit.cs.g2.services.UserManagementRemote"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date dateOfTheSubscription = dateFormat.parse("2016-11-12"); SubscriptionDetail subscriptionDetail = userManagementRemote.findSubscriptionOfStudentInCourse(1, 1, dateOfTheSubscription); System.out.println(subscriptionDetail.getStateOfValidation()); } }
[ "medali.bettaieb@esprit.tn" ]
medali.bettaieb@esprit.tn
e97ce7aae4eb513b13bdbdb6507dde73661229a5
e18e4a485f3c0d1d9b1f1f931c83c664e0f376e2
/src/main/java/edu/jiangxin/apktoolbox/file/password/recovery/checker/BinaryOfficeChecker.java
cdcd399f8466c0e9a5effbc4408f0249b4b322c7
[ "Apache-2.0" ]
permissive
jiangxincode/ApkToolBoxGUI
fa3277a828730959c0e685280b3b1762e88fdf38
944d6374f89c22a4d1217406537965498fddeb8c
refs/heads/master
2023-09-01T10:11:24.523732
2023-08-12T13:36:26
2023-08-12T13:36:26
145,309,300
272
51
Apache-2.0
2023-09-11T22:46:25
2018-08-19T14:16:14
Java
UTF-8
Java
false
false
2,663
java
package edu.jiangxin.apktoolbox.file.password.recovery.checker; import org.apache.commons.io.FilenameUtils; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.POIDocument; import org.apache.poi.hslf.usermodel.HSLFSlideShow; import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.poifs.filesystem.POIFSFileSystem; import java.io.*; public class BinaryOfficeChecker extends FileChecker { private static final boolean DEBUG = true; public BinaryOfficeChecker() { super(); } @Override public String[] getFileExtensions() { return new String[]{"doc", "ppt", "xls"}; } @Override public String getFileDescription() { return "*.doc;*.ppt;*.xls"; } @Override public String getDescription() { return "Office File Checker(Binary formats)"; } @Override public boolean prepareChecker() { return true; } @Override public boolean checkPassword(String password) { if (DEBUG) { logger.info("checkPassword: " + password); } boolean result = false; Biff8EncryptionKey.setCurrentUserPassword(password); try (POIFSFileSystem pfs = new POIFSFileSystem(new FileInputStream(file))) { String extension = FilenameUtils.getExtension(file.getName()); if ("xls".equals(extension)) { try (POIDocument poiDocument = new HSSFWorkbook(pfs)) { logger.info("create workbook successfully" + poiDocument); result = true; } } else if ("doc".equals(extension)) { try (POIDocument poiDocument = new HWPFDocument(pfs)) { logger.info("create document successfully" + poiDocument); result = true; } } else if ("ppt".equals(extension)) { try (POIDocument poiDocument = new HSLFSlideShow(pfs)) { logger.info("create slideShow successfully" + poiDocument); result = true; } } else { logger.error("Not supported: " + file.getName()); } } catch (FileNotFoundException e) { logger.error("checkPassword FileNotFoundException"); } catch (IOException e) { logger.error("checkPassword IOException"); } catch (EncryptedDocumentException e) { logger.error("checkPassword EncryptedDocumentException"); } return result; } }
[ "jiangxinnju@163.com" ]
jiangxinnju@163.com
e8a062744e744d6ace48cd64d48dc6136de78ce2
d47bbec8dba0ba1963b86917c72d5e28f5fb53e2
/commons/src/main/java/be/fooda/backend/commons/model/woocommerce/product/variations/response/CollectionItem.java
7862ea8b243c10ec70f5d85f9925d3929fe01da6
[]
no_license
nozha-kannouf/fooda-backend
4563555fa301967ec6a7e7762d21a22aa92e6127
15ffd737f95609f16b7a4cb0cefe0b9d353a1556
refs/heads/master
2022-12-15T15:17:41.598819
2020-09-20T10:08:23
2020-09-20T10:08:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package be.fooda.backend.commons.model.woocommerce.product.variations.response; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @NoArgsConstructor @Getter @Setter public class CollectionItem { @JsonProperty("href") private String href; }
[ "yilmaz@mail.be" ]
yilmaz@mail.be
9fc8e9dfe156bce56b53a30416610c5104318ecc
6f149d706b9d5ec0287dad020983553a2dcfd749
/src/main/java/com/stars/network/server/codec/Decrypter.java
3ca6c704502c2bb9be49760b08acc988164a4637
[]
no_license
guihuoliuying/stars
baaa49d1a167ff2cefc28b85d87da5d5cb06dfa7
a83ccd5726db8d01e7e3d6e9b6dd1f3a87212a6b
refs/heads/master
2022-12-23T04:45:08.906978
2019-05-25T08:36:53
2019-05-25T08:36:53
180,155,705
4
5
null
2022-12-16T04:49:10
2019-04-08T13:31:50
Java
UTF-8
Java
false
false
1,359
java
package com.stars.network.server.codec; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufProcessor; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToMessageDecoder; import java.util.List; /** * Created by zhaowenshuo on 2016/2/1. */ public class Decrypter extends MessageToMessageDecoder<ByteBuf> { private static byte[] pow = new byte[1048576]; static { for (int i = 0; i < 1048576; i++) { int j = i + 1; pow[i] = (byte) ((j * j + j * 4) % 10); } } @Override protected void decode(ChannelHandlerContext ctx, ByteBuf inBuf, List<Object> list) throws Exception { final byte[] data = new byte[inBuf.readableBytes()]; inBuf.forEachByte(new ByteBufProcessor() { int i = 0; @Override public boolean process(byte value) throws Exception { if (i < 1048576) { data[i] = (byte) (value - pow[i]); } else { int index = i + 1; data[i] = (byte) (value - (index * index + index * 4) % 10); } i++; return true; } }); ByteBuf outBuf = inBuf.alloc().buffer(data.length); outBuf.writeBytes(data); list.add(outBuf); } }
[ "zhaowenshuo@zhaowenshuos-Mac-mini.local" ]
zhaowenshuo@zhaowenshuos-Mac-mini.local
81a0b704fc28625878998176494e593edebe301c
36a9840685a08606dc90a338efba142aa1e74022
/app/src/main/java/com/wwsl/mdsj/utils/tiktok/TikTokRenderViewFactory.java
9b07d7237d0e8035d557a2b25f42765843504fc8
[]
no_license
SnailMyth/mdsj
02513d95d4620a7d7ae3e390c7fd6e3ae0a8a9e3
84f786d10433ad26c2fffba33327c2c3777923f1
refs/heads/master
2023-01-13T02:03:45.771519
2020-11-16T16:01:50
2020-11-16T16:01:50
313,351,462
1
0
null
null
null
null
UTF-8
Java
false
false
558
java
package com.wwsl.mdsj.utils.tiktok; import android.content.Context; import com.dueeeke.videoplayer.render.IRenderView; import com.dueeeke.videoplayer.render.RenderViewFactory; import com.dueeeke.videoplayer.render.TextureRenderView; public class TikTokRenderViewFactory extends RenderViewFactory { public static TikTokRenderViewFactory create() { return new TikTokRenderViewFactory(); } @Override public IRenderView createRenderView(Context context) { return new TikTokRenderView(new TextureRenderView(context)); } }
[ "myth_hai@163.com" ]
myth_hai@163.com
0552987ee50e3df2fe1e840cb6300cb70df21f68
0a6cd084e20cf07955672dfddc96c06076b67313
/sxx-framework-common/src/main/java/com/sxx/framework/model/response/CommonCode.java
a069dfa8c38a7321479ae9bb4aaa1ebf4c38a933
[]
no_license
Hyz7/sxx-home
f014b520498ce8312023e7fb118e96849c406968
4458cb0691ce49a4f40678ca219293b3f5d61fb1
refs/heads/master
2020-04-09T07:20:50.578603
2019-05-10T02:05:22
2019-05-10T02:05:22
160,151,596
1
0
null
null
null
null
UTF-8
Java
false
false
1,300
java
package com.sxx.framework.model.response; import lombok.ToString; /** * 〈一句话功能简述〉<br> * 〈响应代码通用类〉 * * @author hyz * @create 2018/11/22 0022 * @since 1.0.0 */ @ToString public enum CommonCode implements ResultCode{ /** * 操作成功 */ SUCCESS(true,10000,"操作成功!"), FAIL(false,11111,"操作失败!"), SERVER_ERROR(false,99999,"抱歉,系统繁忙,请稍后重试!"), UNAUTHENTICATED(false,10001,"此操作需要登陆系统!"), UNAUTHORISE(false,10002,"权限不足,无权操作!"), EXISTUSER(false,10003,"用户名已存在!"), INVALID_PARAM(false,10004,"参数非法!"); // private static ImmutableMap<Integer, CommonCode> codes ; /** * 操作是否成功 */ boolean success; /** * 操作代码 */ int code; /** * 提示信息 */ String message; private CommonCode(boolean success,int code, String message){ this.success = success; this.code = code; this.message = message; } @Override public boolean success() { return success; } @Override public int code() { return code; } @Override public String message() { return message; } }
[ "123456" ]
123456
6dbef966ff8aaf3fc935522ec41ebb0cf635f4fe
81b77700cfa76121dc0b4dac3618625e3a1f0368
/family_service_platform/src/main/java/com/bayu/controller/base/WyEstateOutDetailSubController.java
a9fc6457c3a2663fc9abf2f807270b86f79c9c39
[]
no_license
jiajizhou02/bayu
d6ab250fa50f1aa2c9a330d218c3ff3ad33e66c1
4d8c19bc6569648c4cc0173ba3035852c375fc83
refs/heads/master
2023-02-05T16:39:22.679090
2020-12-23T04:00:21
2020-12-23T04:00:21
323,508,115
0
0
null
null
null
null
UTF-8
Java
false
false
395
java
package com.bayu.controller.base; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; /** * <p> * 楼盘经费支出明细_审批子表 前端控制器 * </p> * * @author lian * @since 2020-10-22 */ @Controller @RequestMapping("/wyEstateOutDetailSub") public class WyEstateOutDetailSubController { }
[ "zhou1" ]
zhou1
e5dd16cfe560559880e6eae01a57cdb363702f7f
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_198/Testnull_19757.java
04d0575dff00ed1f377d931d4301a3df8e86f73f
[]
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_198; import static org.junit.Assert.*; public class Testnull_19757 { private final Productionnull_19757 production = new Productionnull_19757("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
48c87428e0534b5ef6433e4b570cfcb660b37c14
cf7e9fcaa002d7e3a2e4396831bf122fd1ac7bbc
/cards/src/main/java/org/rnd/jmagic/cards/ExecutionersHood.java
865e18a8c45fea3d889dd68e73ed7e86301a895a
[]
no_license
NorthFury/jmagic
9b28d803ce6f8bf22f22eb41e2a6411bc11c8cdf
efe53d9d02716cc215456e2794a43011759322d9
refs/heads/master
2020-05-28T11:04:50.631220
2014-06-17T09:48:44
2014-06-17T09:48:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,212
java
package org.rnd.jmagic.cards; import static org.rnd.jmagic.Convenience.*; import org.rnd.jmagic.abilities.keywords.Equip; import org.rnd.jmagic.abilities.keywords.Intimidate; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Executioner's Hood") @Types({Type.ARTIFACT}) @SubTypes({SubType.EQUIPMENT}) @ManaCost("2") @Printings({@Printings.Printed(ex = Expansion.DARK_ASCENSION, r = Rarity.COMMON)}) @ColorIdentity({}) public final class ExecutionersHood extends Card { public static final class ExecutionersHoodAbility0 extends StaticAbility { public ExecutionersHoodAbility0(GameState state) { super(state, "Equipped creature has intimidate."); this.addEffectPart(addAbilityToObject(EquippedBy.instance(This.instance()), Intimidate.class)); } } public ExecutionersHood(GameState state) { super(state); // Equipped creature has intimidate. (This creature can't be blocked // except by artifact creatures and/or creatures that share a color with // it.) this.addAbility(new ExecutionersHoodAbility0(state)); // Equip (2) ((2): Attach to target creature you control. Equip only as // a sorcery.) this.addAbility(new Equip(state, "(2)")); } }
[ "robyter@gmail" ]
robyter@gmail
94ece5aab4678b90bd689edc0b35eab11c40c3a4
23ec52180e445c39a0b357d5b3a99154ba681ed7
/DesignPatternJava/src/main/java/CreationalPatterns/Builder/PersonBuilder.java
df32d7bb14b85dc7c98b2293632b8e1a91ceb360
[]
no_license
pisces312/MyJavaProjects
1408c5f33f1f39fc3929ebe34d39b6bcd6a5d166
0529ba813350e710d8aaca2d89c453570b244a64
refs/heads/master
2021-01-18T03:59:42.190929
2017-12-16T15:58:13
2017-12-16T15:58:13
84,271,420
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package CreationalPatterns.Builder; /** * * @author pisces312 */ public abstract class PersonBuilder { public abstract void buildHead(); public abstract void buildBody(); public abstract void buildLeftArm(); public abstract void buildRightArm(); public abstract void buildLeftLeg(); public abstract void buildRightLeg(); }
[ "lee.ni@emc.com" ]
lee.ni@emc.com
c03f29d67c839ef07e5e15d07fe56de2438b3196
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/346b1d3c1cdc3032d07222a8a5e0027a2abf95bb1697b9d367d7cca7db1af769d8298e232c56471a122f05e87e79f4bd965855c9c0f8b173ebc0ef5d0abebc7b/002/mutations/306/smallest_346b1d3c_002.java
2ef0ea0da5ff082b924f60020f8d38532d162665
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,506
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_346b1d3c_002 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_346b1d3c_002 mainClass = new smallest_346b1d3c_002 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj a = new IntObj (), b = new IntObj(value) , c = new IntObj (), d = new IntObj (), num_1 = new IntObj (), num_2 = new IntObj (), num_3 = new IntObj (), num_4 = new IntObj (); output += (String.format ("Please enter 4 numbers seperated by spaces > ")); num_1.value = scanner.nextInt (); num_2.value = scanner.nextInt (); num_3.value = scanner.nextInt (); num_4.value = scanner.nextInt (); a.value = (num_1.value); b.value = (num_2.value); c.value = (num_3.value); d.value = (num_4.value); if (a.value < b.value && a.value < c.value && a.value < d.value) { output += (String.format ("%d is the smallest\n", a.value)); } else if (b.value < a.value && b.value < c.value && b.value < d.value) { output += (String.format ("%d is the smalles\n", b.value)); } else if (c.value < a.value && c.value < b.value && c.value < d.value) { output += (String.format ("%d is the smallest\n", c.value)); } else if (d.value < a.value && d.value < b.value && d.value < c.value) { output += (String.format ("%d is the smallest\n", d.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
7faad33d6fb5c3c713bf09b1237759fa9a25ce05
767d7f3b37a806b47f090b59002dfe20aac2768b
/src/main/java/vlal/u7/User.java
1815a9996e609605e30c2b36e507c9f7b48313b1
[]
no_license
h5dde45/JEE_31_10_17
ccc75a8b068f2c5928f9e7e8229e9ebf7162621d
487a101dd985c3e5b12851eee78f1f045a50fcd6
refs/heads/master
2021-05-06T20:40:48.466623
2018-02-01T18:57:08
2018-02-01T18:57:08
112,363,129
0
0
null
null
null
null
UTF-8
Java
false
false
466
java
package vlal.u7; public class User { private String name; private int age; public User(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public int getAge() { return age; } @Override public String toString() { return "User{" + "name='" + name + '\'' + ", age=" + age + '}'; } }
[ "tmvf@yandex.ru" ]
tmvf@yandex.ru
9dd22807034c9db7e5789947d7ec8fc3edff008b
c9bdb85c82a1d2e3fa9f7cfff9590d774b222b26
/miser/miser-api/miser-api-itf-api/src/main/java/com/hoau/miser/module/api/itf/api/server/IPriceCorpSectionTyService.java
b66ffea9c8a9ad82701cad29ef6ad34ffc5669aa
[]
no_license
wangfuguo/mi-proj
9d5c159719ee3c4da7bedd01dd297713bb811ced
2920971b310262a575cd3b767827d4633c596666
refs/heads/master
2020-03-08T07:03:24.984087
2018-04-04T00:44:35
2018-04-04T00:44:35
127,985,673
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package com.hoau.miser.module.api.itf.api.server; import com.hoau.miser.module.api.itf.api.shared.domain.PriceCorpSectionTyEntity; import com.hoau.miser.module.api.itf.api.shared.vo.PriceQueryParam; /** * @author 廖文强 * @version V1.0 * @Title: IPriceCorpSectionTyService * @Package com.hoau.miser.module.api.itf.api.server * @Description: 分段网点价格 * @date 2016/07/05 */ public interface IPriceCorpSectionTyService { /** * * @param baseTyParam * @return * @Description: 查询网点价格 * @author 廖文强 * @date 2016年06月06日 */ public PriceCorpSectionTyEntity queryPriceSectionQueryParam(PriceQueryParam baseTyParam); }
[ "wangfuguo_wfg@163.com" ]
wangfuguo_wfg@163.com
f0ee11709abca199380d73033321ef000dd5ccf3
9254e7279570ac8ef687c416a79bb472146e9b35
/qualitycheck-20190115/src/main/java/com/aliyun/qualitycheck20190115/models/TestRuleResponse.java
ff04f6df1050219c6eb8de062d7eb8a6ae8fb0f3
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,007
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.qualitycheck20190115.models; import com.aliyun.tea.*; public class TestRuleResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public TestRuleResponseBody body; public static TestRuleResponse build(java.util.Map<String, ?> map) throws Exception { TestRuleResponse self = new TestRuleResponse(); return TeaModel.build(map, self); } public TestRuleResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public TestRuleResponse setBody(TestRuleResponseBody body) { this.body = body; return this; } public TestRuleResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
d9ef6f6319bb2245e973a89244cd55fdd59bb8db
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_f0b6358eb4eea2255ffa4fe46a795b2adf79c287/NginxConfigTemplate/6_f0b6358eb4eea2255ffa4fe46a795b2adf79c287_NginxConfigTemplate_s.java
e7a0f61a1fdf5f1e06020002340e4545a53f640d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,995
java
/* * Copyright 2012-2013 by Cloudsoft 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. */ package brooklyn.entity.proxy.nginx; import java.util.Collection; import java.util.Map; import brooklyn.entity.proxy.ProxySslConfig; import brooklyn.util.ResourceUtils; import brooklyn.util.collections.MutableMap; import brooklyn.util.text.Strings; import brooklyn.util.text.TemplateProcessor; import com.google.common.collect.LinkedHashMultimap; import com.google.common.collect.Multimap; /** * Processes a FreeMarker template for an {@link NginxController} configuration file. */ public class NginxConfigTemplate { private NginxDriver driver; public static NginxConfigTemplate generator(NginxDriver driver) { return new NginxConfigTemplate(driver); } private NginxConfigTemplate(NginxDriver driver) { this.driver = driver; } public String configFile() { // Check template URL exists String templateUrl = driver.getEntity().getConfig(NginxController.SERVER_CONF_TEMPLATE_URL); ResourceUtils.create(this).checkUrlExists(templateUrl); // Check SSL configuration ProxySslConfig ssl = driver.getEntity().getConfig(NginxController.SSL_CONFIG); if (ssl != null && Strings.isEmpty(ssl.getCertificateDestination()) && Strings.isEmpty(ssl.getCertificateSourceUrl())) { throw new IllegalStateException("ProxySslConfig can't have a null certificateDestination and null certificateSourceUrl. One or both need to be set"); } // For mapping by URL Iterable<UrlMapping> mappings = ((NginxController) driver.getEntity()).getUrlMappings(); Multimap<String, UrlMapping> mappingsByDomain = LinkedHashMultimap.create(); for (UrlMapping mapping : mappings) { Collection<String> addrs = mapping.getAttribute(UrlMapping.TARGET_ADDRESSES); if (addrs != null && addrs.size() > 0) { mappingsByDomain.put(mapping.getDomain(), mapping); } } Map<String, Object> substitutions = MutableMap.<String, Object>of("ssl", ssl, "urlMappings", mappings, "domainMappings", mappingsByDomain); // Get template contents and process String contents = ResourceUtils.create(driver.getEntity()).getResourceAsString(templateUrl); return TemplateProcessor.processTemplateContents(contents, driver, substitutions); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
180a826f203f1b61d60cef74fba40ef7b7f5c29e
96f7f6322c3e3a5f009dad9bce1e231b5a57a5e8
/LeaningJavaCollections/src/Pack13Collections/javaLinkedlistExamples/RemoveElementsFromLinkedListExample.java
2265270a1fc2d172eb9845f668a6129f0aeff633
[]
no_license
weder96/javaaula21
09cb63a2e6f3fe7ac34f166315ae3024113a4dd3
8f4245a922eea74747644ad2f4a0f2b3396c319e
refs/heads/main
2023-08-23T10:47:43.216438
2021-10-27T21:46:45
2021-10-27T21:46:45
421,982,565
3
0
null
null
null
null
UTF-8
Java
false
false
1,912
java
package Pack13Collections.javaLinkedlistExamples; import java.util.LinkedList; public class RemoveElementsFromLinkedListExample { public static void main(String[] args) { LinkedList<String> programmingLanguages = new LinkedList<>(); programmingLanguages.add("Assembly"); programmingLanguages.add("Fortran"); programmingLanguages.add("Pascal"); programmingLanguages.add("C"); programmingLanguages.add("C++"); programmingLanguages.add("Java"); programmingLanguages.add("C#"); programmingLanguages.add("Kotlin"); System.out.println("Initial LinkedList = " + programmingLanguages); // Remove the first element in the LinkedList String element = programmingLanguages.removeFirst(); // Throws NoSuchElementException if the LinkedList is empty System.out.println("Removed the first element " + element + " => " + programmingLanguages); // Remove the last element in the LinkedList element = programmingLanguages.removeLast(); // Throws NoSuchElementException if the LinkedList is empty System.out.println("Removed the last element " + element + " => " + programmingLanguages); // Remove the first occurrence of the specified element from the LinkedList boolean isRemoved = programmingLanguages.remove("C#"); if(isRemoved) { System.out.println("Removed C# => " + programmingLanguages); } // Remove all the elements that satisfy the given predicate programmingLanguages.removeIf(programmingLanguage -> programmingLanguage.startsWith("C")); System.out.println("Removed elements starting with C => " + programmingLanguages); // Clear the LinkedList by removing all elements programmingLanguages.clear(); System.out.println("Cleared the LinkedList => " + programmingLanguages); } }
[ "weder96@gmail.com" ]
weder96@gmail.com
c4b10399d8962abe4849281a1d8a71e9db21901a
48ae8e24dfe5a8e099eb1ce2d14c9a24f48975cc
/Product/Production/Services/DocumentRetrieveCore/src/test/java/gov/hhs/fha/nhinc/docretrieve/outbound/StandardOutboundDocRetrieveTest.java
9962b7b8fdc3a6203dff4e79a9ccd098e479a64f
[ "BSD-3-Clause" ]
permissive
CONNECT-Continuum/Continuum
f12394db3cc8b794fdfcb2cb3224e4a89f23c9d5
23acf3ea144c939905f82c59ffeff221efd9cc68
refs/heads/master
2022-12-16T15:04:50.675762
2019-09-07T16:14:08
2019-09-07T16:14:08
206,986,335
0
0
NOASSERTION
2022-12-05T23:32:14
2019-09-07T15:18:59
Java
UTF-8
Java
false
false
7,805
java
/* * Copyright (c) 2009-2019, United States Government, as represented by the Secretary of Health and Human Services. * 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 United States Government 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 UNITED STATES GOVERNMENT 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 gov.hhs.fha.nhinc.docretrieve.outbound; import gov.hhs.fha.nhinc.aspect.OutboundProcessingEvent; import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType; import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetCommunitiesType; import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType; import gov.hhs.fha.nhinc.docretrieve.aspect.RetrieveDocumentSetRequestTypeDescriptionBuilder; import gov.hhs.fha.nhinc.docretrieve.aspect.RetrieveDocumentSetResponseTypeDescriptionBuilder; import gov.hhs.fha.nhinc.docretrieve.audit.transform.DocRetrieveAuditTransforms; import gov.hhs.fha.nhinc.docretrieve.entity.OutboundDocRetrieveOrchestratable; import gov.hhs.fha.nhinc.nhinclib.NhincConstants; import gov.hhs.fha.nhinc.nhinclib.NhincConstants.ADAPTER_API_LEVEL; import gov.hhs.fha.nhinc.orchestration.CONNECTOutboundOrchestrator; import ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType; import ihe.iti.xds_b._2007.RetrieveDocumentSetResponseType; import java.lang.reflect.Method; import java.util.Properties; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; import org.junit.Test; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Matchers.isNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; /** * @author achidamb * */ public class StandardOutboundDocRetrieveTest extends AbstractOutboundDocRetrieveTest { @Test public void hasOutboundProcessingEvent() throws Exception { Class<StandardOutboundDocRetrieve> clazz = StandardOutboundDocRetrieve.class; Method method = clazz.getMethod("respondingGatewayCrossGatewayRetrieve", RetrieveDocumentSetRequestType.class, AssertionType.class, NhinTargetCommunitiesType.class, ADAPTER_API_LEVEL.class); OutboundProcessingEvent annotation = method.getAnnotation(OutboundProcessingEvent.class); assertNotNull(annotation); assertEquals(RetrieveDocumentSetRequestTypeDescriptionBuilder.class, annotation.beforeBuilder()); assertEquals(RetrieveDocumentSetResponseTypeDescriptionBuilder.class, annotation.afterReturningBuilder()); assertEquals("Retrieve Document", annotation.serviceType()); assertEquals("", annotation.version()); } @Test public void invoke() { RetrieveDocumentSetRequestType request = new RetrieveDocumentSetRequestType(); AssertionType assertion = new AssertionType(); NhinTargetCommunitiesType targets = new NhinTargetCommunitiesType(); targets.setUseSpecVersion("2.0"); RetrieveDocumentSetResponseType expectedResponse = new RetrieveDocumentSetResponseType(); CONNECTOutboundOrchestrator orchestrator = mock(CONNECTOutboundOrchestrator.class); OutboundDocRetrieveOrchestratable orchResponse = mock(OutboundDocRetrieveOrchestratable.class); when(orchestrator.process(any(OutboundDocRetrieveOrchestratable.class))).thenReturn(orchResponse); when(orchResponse.getResponse()).thenReturn(expectedResponse); StandardOutboundDocRetrieve outboundDocRetrieve = (StandardOutboundDocRetrieve) getOutboundDocRetrieve( orchestrator, true); RetrieveDocumentSetResponseType actualResponse = outboundDocRetrieve.respondingGatewayCrossGatewayRetrieve( request, assertion, targets, ADAPTER_API_LEVEL.LEVEL_a0); assertSame(expectedResponse, actualResponse); assertNotNull("Assertion MessageId is null", assertion.getMessageId()); verify(mockEJBLogger).auditRequestMessage(eq(request), eq(assertion), any(NhinTargetSystemType.class), eq(NhincConstants.AUDIT_LOG_OUTBOUND_DIRECTION), eq(NhincConstants.AUDIT_LOG_NHIN_INTERFACE), eq(Boolean.TRUE), isNull(Properties.class), eq(NhincConstants.DOC_RETRIEVE_SERVICE_NAME), any(DocRetrieveAuditTransforms.class)); } /* (non-Javadoc) * @see gov.hhs.fha.nhinc.docretrieve.outbound.AbstractOutboundDocRetrieveTest#getOutboundDocRetrieve(gov.hhs.fha.nhinc.orchestration.CONNECTOutboundOrchestrator) */ @Override protected OutboundDocRetrieve getOutboundDocRetrieve(CONNECTOutboundOrchestrator orchestrator, boolean isAuditOn) { return new StandardOutboundDocRetrieve(orchestrator, getAuditLogger(isAuditOn)); } @Test public void auditLoggingOffForOutboundDR() { RetrieveDocumentSetRequestType request = new RetrieveDocumentSetRequestType(); AssertionType assertion = new AssertionType(); NhinTargetCommunitiesType targets = new NhinTargetCommunitiesType(); targets.setUseSpecVersion("2.0"); RetrieveDocumentSetResponseType expectedResponse = new RetrieveDocumentSetResponseType(); CONNECTOutboundOrchestrator orchestrator = mock(CONNECTOutboundOrchestrator.class); OutboundDocRetrieveOrchestratable orchResponse = mock(OutboundDocRetrieveOrchestratable.class); when(orchestrator.process(any(OutboundDocRetrieveOrchestratable.class))).thenReturn(orchResponse); when(orchResponse.getResponse()).thenReturn(expectedResponse); StandardOutboundDocRetrieve outboundDocRetrieve = (StandardOutboundDocRetrieve) getOutboundDocRetrieve( orchestrator, false); RetrieveDocumentSetResponseType actualResponse = outboundDocRetrieve.respondingGatewayCrossGatewayRetrieve( request, assertion, targets, ADAPTER_API_LEVEL.LEVEL_a0); assertSame(expectedResponse, actualResponse); assertNotNull("Assertion MessageId is null", assertion.getMessageId()); verify(mockEJBLogger, never()).auditRequestMessage(eq(request), eq(assertion), any(NhinTargetSystemType.class), eq(NhincConstants.AUDIT_LOG_OUTBOUND_DIRECTION), eq(NhincConstants.AUDIT_LOG_NHIN_INTERFACE), eq(Boolean.TRUE), isNull(Properties.class), eq(NhincConstants.DOC_RETRIEVE_SERVICE_NAME), any(DocRetrieveAuditTransforms.class)); } }
[ "minh-hai.nguyen@cgi.com" ]
minh-hai.nguyen@cgi.com
09df2bfcd24fcb4c3fd12c003935fa51bb4cfd3f
6240a87133481874e293b36a93fdb64ca1f2106c
/taobao/src/com/taobao/api/response/AreasGetResponse.java
e9fe0ee57c7208f9c5085fcbcbf6d9a13e3e8941
[]
no_license
mrzeng/comments-monitor
596ba8822d70f8debb630f40b548f62d0ad48bd4
1451ec9c14829c7dc29a2297a6f3d6c4e490dc13
refs/heads/master
2021-01-15T08:58:05.997787
2013-07-17T16:29:23
2013-07-17T16:29:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
797
java
package com.taobao.api.response; import java.util.List; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.internal.mapping.ApiListField; import com.taobao.api.domain.Area; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.areas.get response. * * @author auto create * @since 1.0, null */ public class AreasGetResponse extends TaobaoResponse { private static final long serialVersionUID = 7152574726167639429L; /** * 地址区域信息列表.返回的Area包含的具体信息为入参fields请求的字段信息. */ @ApiListField("areas") @ApiField("area") private List<Area> areas; public void setAreas(List<Area> areas) { this.areas = areas; } public List<Area> getAreas( ) { return this.areas; } }
[ "qujian@gionee.com" ]
qujian@gionee.com
0363b8d860634d03dfdbe13846ab087ff67cbe87
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-32b-3-18-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/geometry/euclidean/threed/PolyhedronsSet$FacetsContributionVisitor_ESTest.java
a7a1c7325cc507a3beffaec205dbf088cadd3e1a
[]
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
637
java
/* * This file was automatically generated by EvoSuite * Thu Apr 02 12:32:16 UTC 2020 */ package org.apache.commons.math3.geometry.euclidean.threed; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class PolyhedronsSet$FacetsContributionVisitor_ESTest extends PolyhedronsSet$FacetsContributionVisitor_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c72ac0b13e825ad8d64f8b374521291ae0ee738e
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/29_apbsmem-jahuwaldt.plot.PlotRunList-1.0-4/jahuwaldt/plot/PlotRunList_ESTest.java
c306c077a73f59d2725e9851b64b55af29cdb9eb
[]
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
642
java
/* * This file was automatically generated by EvoSuite * Mon Oct 28 17:01:26 GMT 2019 */ package jahuwaldt.plot; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class PlotRunList_ESTest extends PlotRunList_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
4996f2451a23295bed3d828a901cd6185bf97f61
a63ec98898b43a6b9585f601991f5983fe771def
/HyperlinkHoverEffect/src/java/example/MainPanel.java
895b8f0f050cdfbad879759bf47275006276fe64
[ "MIT" ]
permissive
NKU915/java-swing-tips
ffd39bbcb2167e96cc2287201df24719d335de3e
074168845a24762b2bebdeacca19a01b4cff8c24
refs/heads/master
2020-03-26T18:02:21.759854
2018-08-18T05:07:48
2018-08-18T05:07:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,866
java
package example; // -*- mode:java; encoding:utf-8 -*- // vim:set fileencoding=utf-8: // @homepage@ import java.awt.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.text.html.HTML; public final class MainPanel extends JPanel { private static final String S = "https://ateraimemo.com/"; private static final String S0 = "<a href='%s' color='%s'>%s</a><br>"; private final String s1 = String.format(S0 + "aaaaaaaaaaaaaa<br>", S, "blue", S); private final String s2 = String.format(S0 + "cccc", S, "#0000FF", "bbbbbbbbbbb"); private final JEditorPane editor = new JEditorPane("text/html", "<html>" + s1 + s2); public MainPanel() { super(new BorderLayout()); editor.setEditable(false); // @see: BasicEditorPaneUI#propertyChange(PropertyChangeEvent evt) { // if ("foreground".equals(name)) { editor.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE); editor.addHyperlinkListener(e -> { if (e.getEventType() == HyperlinkEvent.EventType.ENTERED) { setElementColor(e.getSourceElement(), "red"); } else if (e.getEventType() == HyperlinkEvent.EventType.EXITED) { setElementColor(e.getSourceElement(), "blue"); } else if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { Toolkit.getDefaultToolkit().beep(); } // ??? call BasicTextUI#modelChanged() ??? editor.setForeground(Color.WHITE); editor.setForeground(Color.BLACK); }); add(new JScrollPane(editor)); setPreferredSize(new Dimension(320, 240)); } private void setElementColor(Element element, String color) { AttributeSet attrs = element.getAttributes(); Object o = attrs.getAttribute(HTML.Tag.A); if (o instanceof MutableAttributeSet) { MutableAttributeSet a = (MutableAttributeSet) o; a.addAttribute(HTML.Attribute.COLOR, color); } } public static void main(String... args) { EventQueue.invokeLater(new Runnable() { @Override public void run() { createAndShowGui(); } }); } public static void createAndShowGui() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } JFrame frame = new JFrame("@title@"); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.getContentPane().add(new MainPanel()); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } }
[ "aterai@outlook.com" ]
aterai@outlook.com
e92ce77f11801f05f34648f8ea75247c0210254a
5f88783e5bc891e869ea021723a30ea9ca0762db
/dbflute-sastruts-example/src/main/java/com/example/dbflute/sastruts/dbflute/exentity/MemberSecurity.java
967de48c1f692e2684f9864e0b14e4da948f68f4
[ "Apache-2.0" ]
permissive
seasarorg/dbflute-example-friends-frank
7c338728a6a8e07dad6a2bec922a8de234c3ac91
243a714bf4124eef46123e0fa73a33a851f80838
refs/heads/master
2016-09-06T07:58:47.800053
2014-11-29T13:38:08
2014-11-29T13:38:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,120
java
/* * Copyright 2004-2014 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package com.example.dbflute.sastruts.dbflute.exentity; import com.example.dbflute.sastruts.dbflute.bsentity.BsMemberSecurity; /** * The entity of MEMBER_SECURITY. * <p> * You can implement your original methods here. * This class remains when re-generating. * </p> * @author DBFlute(AutoGenerator) */ public class MemberSecurity extends BsMemberSecurity { /** Serial version UID. (Default) */ private static final long serialVersionUID = 1L; }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
b92154d586d7dbf690ab5f28336a6ab2aed44648
9ec1a8994193128b97989a3f99e909e7510db478
/mybatissourcecode/mybatis3.5.0/src/test/java/org/apache/ibatis/submitted/use_actual_param_name/Mapper.java
461ee98a96f38f7c61aeb33a84673d0b2fbdf348
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
1720653171/sourcecode
5f89dfb6eb94ec47ee95a2c7e99a655716d14f33
1b4933cb0bb9d8b44d02595aa99c73fac826a0ac
refs/heads/master
2023-01-19T09:30:45.187493
2020-11-28T13:13:35
2020-11-28T13:13:35
316,138,280
0
0
null
null
null
null
UTF-8
Java
false
false
1,137
java
/** * Copyright 2010-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.submitted.use_actual_param_name; import java.util.List; import org.apache.ibatis.annotations.Select; public interface Mapper { @Select("select * from users where id = #{foo}") User getUserById(Integer id); @Select("select * from users where id = #{id} and name = #{name}") User getUserByIdAndName(Integer id, String name); List<User> getUsersByIdList(List<Integer> ids); List<User> getUsersByIdListAndName(List<Integer> ids, String name); }
[ "37207723+1720653171@users.noreply.github.com" ]
37207723+1720653171@users.noreply.github.com
d939f7bf0035e07dbb1ed66f7ed4461530510782
cd06dc68aab095420317617b98aec254a0d5bb32
/app/src/main/java/com/jingna/xssapp/app/MyApplication.java
53e829ce1d4fa1a5b3909a6ed6d4f2793044ba7e
[]
no_license
huweidongls/XssApp
1b13e4547e1ed9a1ab76eb2942b6b3a1af0f21be
d985e3d2f42c374d24fffac492a2d80b3c7a55b0
refs/heads/master
2020-05-21T03:52:09.737467
2019-09-26T09:13:25
2019-09-26T09:13:25
185,897,917
0
0
null
null
null
null
UTF-8
Java
false
false
2,167
java
package com.jingna.xssapp.app; import android.app.Activity; import android.app.Application; import com.baidu.mapapi.CoordType; import com.baidu.mapapi.SDKInitializer; import com.jingna.xssapp.MainActivity; import com.jingna.xssapp.net.NetUrl; import com.jingna.xssapp.util.EditPwdTimeCount; import com.jingna.xssapp.util.ForgotTimeCount; import com.vise.xsnow.http.ViseHttp; import java.util.LinkedList; import java.util.List; /** * Created by Administrator on 2019/5/10. */ public class MyApplication extends Application { private static MyApplication instance; private List<Activity> mList = new LinkedList<Activity>(); public static EditPwdTimeCount editPwdTimeCount; public static ForgotTimeCount forgotTimeCount; public MainActivity mainActivity; public MyApplication() { } @Override public void onCreate() { super.onCreate(); //在使用SDK各组件之前初始化context信息,传入ApplicationContext SDKInitializer.initialize(this); //自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型. //包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。 SDKInitializer.setCoordType(CoordType.BD09LL); ViseHttp.init(this); ViseHttp.CONFIG().baseUrl(NetUrl.BASE_URL); editPwdTimeCount = new EditPwdTimeCount(60000, 1000); forgotTimeCount = new ForgotTimeCount(60000, 1000); } public synchronized static MyApplication getInstance() { if (null == instance) { instance = new MyApplication(); } return instance; } // add Activity public void addActivity(Activity activity) { mList.add(activity); } public void exit() { try { for (Activity activity : mList) { if (activity != null) activity.finish(); } } catch (Exception e) { e.printStackTrace(); } finally { System.exit(0); } } public void onLowMemory() { super.onLowMemory(); System.gc(); } }
[ "466463054@qq.com" ]
466463054@qq.com
a0079a4995b78391d280766d259f2c7aaa25eefb
dc164ac48b5ab982ac3f68afef6d7972130ba9c2
/springMVC_0903/src/test/java/com/kosta/myproject/HrEmpTest.java
203ec4c069b55c049516862c4daa1bb9b5b0b0e6
[]
no_license
yl9517/ETC_spring
a98d64d8423cc207707f53fa7afa46e0346c6012
80749432239a3ccd325c45d7be5fc125e34f3f50
refs/heads/main
2023-07-28T02:36:45.441175
2021-09-12T13:01:38
2021-09-12T13:01:38
399,488,840
0
0
null
null
null
null
UTF-8
Java
false
false
1,351
java
package com.kosta.myproject; import static org.junit.Assert.assertNotNull; import java.util.HashMap; import java.util.Iterator; import javax.annotation.Resource; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.kosta.service.HrEmpService; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("file:src\\main\\webapp\\WEB-INF\\spring\\root-context.xml") public class HrEmpTest { @Resource(name="hrEmpServiceImple") private HrEmpService service; @Test public void test() { assertNotNull(service); } @Test public void test2() { HashMap<String, Object> hm = service.list2().get(0); Iterator<String> ita = hm.keySet().iterator(); while(ita.hasNext()) { String key = ita.next(); System.out.println(key); } } //디테일 테스트 Logger logger = LoggerFactory.getLogger(HrEmpTest.class); @Test public void test3() { HashMap<String, Object> hm = service.detailEmp(100); logger.info("employee_id"+hm.get("EMPLOYEE_ID")); logger.info("FIRST_NAME"+hm.get("FIRST_NAME")); logger.info("HIRE_DATE"+hm.get("HIRE_DATE")); logger.info("DEPARTMENT_NAME"+hm.get("DEPARTMENT_NAME")); } }
[ "yl9517@naver.com" ]
yl9517@naver.com
4be19ca169dcef215a1d21bee60217bf8825f313
083d46343a651dd0a6332c5909e44c1e89f9c2ff
/examples/liveshadereditor/src/nl/esciencecenter/neon/examples/shadertest/LiveShaderEditor.java
5b42c7704121e0c7b35ff1bb3b736e549b3536cb
[ "Apache-2.0" ]
permissive
NLeSC/Neon
1bcd3bf5520d262847861e445ace8758fc23932d
6db8155800bc5cf3ac2825fe1de29ad217ccfc84
refs/heads/master
2021-01-01T20:16:04.925508
2014-04-11T15:21:09
2014-04-11T15:21:09
9,006,081
2
2
null
2013-10-17T14:47:36
2013-03-25T12:57:39
Java
UTF-8
Java
false
false
3,822
java
package nl.esciencecenter.neon.examples.shadertest; import javax.swing.JFrame; import nl.esciencecenter.neon.NeonNewtWindow; import nl.esciencecenter.neon.util.Settings; /* Copyright 2013 Netherlands eScience Center * * 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. */ /** * Example / toolbox item for the Neon library, focusing on the live editing of * shaders for tweaking of visual effects. Also very useful for educational * purposes. * * @author Maarten van Meersbergen <m.van.meersbergen@esciencecenter.nl> * */ public class LiveShaderEditor { // This static definition (singleton) of a settings class ensures that these // global settings are useable throughout the application. This settings // class reads from a file named "settings.properties" to allow default // settings to be changed by the user. private final static Settings settings = Settings.getInstance(); // This is an implementation of a 'loose' interface window. This is done to // allow java swing components as user interface elements. It is in a // seperate window because of MacOSX limitations in the JOGL library. private static LiveShaderEditorInterfacePanel examplePanel; // An example implementation of a GLEventlistener. These listeners are the // backbone of any OpenGL application, and provide the display cycle needed // for continuous updates of the screen. private static LiveShaderEditorGLEventListener exampleGLEventListener; // In this simple example, we only call the constructor. This is enough to // keep the program running, since the constructor will create new threads // for animation etc. Therefore, even though we do not use the new Object, // the program will not terminate. public static void main(String[] args) { new LiveShaderEditor(); } public LiveShaderEditor() { String cmdlnfileName = null; String path = ""; path = System.getProperty("user.dir"); exampleGLEventListener = new LiveShaderEditorGLEventListener(LiveShaderEditorInputHandler.getInstance()); examplePanel = new LiveShaderEditorInterfacePanel(exampleGLEventListener, path, cmdlnfileName); // } // // public void makeWindow() { new NeonNewtWindow(true, LiveShaderEditorInputHandler.getInstance(), exampleGLEventListener, 1920, 1080, "Live Shader Editor"); // Create the frame final JFrame frame = new JFrame("- LSE -"); frame.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent arg0) { System.exit(0); } }); frame.setSize(100, 100); frame.setResizable(false); javax.swing.SwingUtilities.invokeLater(new Runnable() { @Override public void run() { try { frame.getContentPane().add(examplePanel); } catch (final Exception e) { e.printStackTrace(System.err); System.exit(1); } } }); frame.setVisible(true); } }
[ "m.vanmeersbergen@esciencecenter.nl" ]
m.vanmeersbergen@esciencecenter.nl
f53aa95de4ac858f4bde8047cd7a11c5ae27b257
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_232f84149e7011533d974e9d022336f633f18cc9/OwnMessageList/7_232f84149e7011533d974e9d022336f633f18cc9_OwnMessageList_t.java
f0405112e8eb6ae17ff482eaf6ce96a0a3a5d4a5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,100
java
/* This code is part of Freenet. It is distributed under the GNU General * Public License, version 2 (or at your option any later version). See * http://www.gnu.org/ for further details of the GPL. */ package plugins.Freetalk; import plugins.Freetalk.Message.MessageID; import freenet.keys.FreenetURI; import freenet.support.Logger; // @IndexedField // I can't think of any query which would need to get all OwnMessageList objects. public abstract class OwnMessageList extends MessageList { private boolean iAmBeingInserted = false; // FIXME: Rename to mIsBeingInserted private boolean iWasInserted = false; // FIXME: Rename to mWasInserted /** * In opposite to it's parent class, for each <code>OwnMessage</code> only one <code>OwnMessageReference</code> is stored, no matter to how * many boards the OwnMessage is posted. * * @see MessageList.MessageReference */ public static final class OwnMessageReference extends MessageReference { public OwnMessageReference(OwnMessage myMessage) { super(MessageID.construct(myMessage), myMessage.getFreenetURI(), null, myMessage.getDate()); } public void databaseIntegrityTest() throws Exception { super.databaseIntegrityTest(); } } public void databaseIntegrityTest() throws Exception { super.databaseIntegrityTest(); checkedActivate(3); if(!(mAuthor instanceof OwnIdentity)) throw new IllegalStateException("mAuthor is no OwnIdentity: " + mAuthor); // FIXME: Re-enable this test in the 0.1-final-development branch. It won't work here due to old, bugged databases // if(iAmBeingInserted && iWasInserted) // throw new IllegalStateException("iAmBeingInserted == true and iWasInserted == true"); for(MessageReference ref : mMessages) { if(!(ref instanceof OwnMessageReference)) throw new IllegalStateException("Found non-own MessageReference: " + ref); } // TODO: Validate mMessages content. Size is validated by parent } public OwnMessageList(OwnIdentity newAuthor, long newIndex) { super(newAuthor, newIndex); } public OwnIdentity getAuthor() { return (OwnIdentity)super.getAuthor(); } /** * Get the SSK insert URI of this message list. * @return */ public FreenetURI getInsertURI() { return generateURI(getAuthor().getInsertURI(), mIndex).sskForUSK(); } /** * Add an <code>OwnMessage</code> to this <code>MessageList</code>. * This function synchronizes on the <code>MessageList</code> and the given message. * Stores the given message and this OwnMessageList in the database without committing the transaction. * * @throws Exception If the message list is full. */ public synchronized void addMessage(OwnMessage newMessage) { synchronized(newMessage) { if(iAmBeingInserted || iWasInserted) throw new IllegalStateException("Trying to add a message to a message list which is already being inserted."); if(newMessage.getAuthor() != mAuthor) throw new IllegalStateException("Trying to add a message with wrong author " + newMessage.getAuthor() + " to an own message list of " + mAuthor); OwnMessageReference ref = new OwnMessageReference(newMessage); mMessages.add(ref); if(mMessages.size() > 1 && fitsIntoContainer() == false) { mMessages.remove(ref); throw new IllegalStateException("OwnMessageList is full."); /* TODO: Chose a better exception */ } ref.setMessageList(this); newMessage.setMessageList(this); } } public synchronized int getMessageCount() { return mMessages.size(); } protected boolean fitsIntoContainer() { if(getMessageCount() > MAX_MESSAGES_PER_MESSAGELIST) return false; return true; } /** * Stores this OwnMessageList in the database without committing the transaction. */ public synchronized void beginOfInsert() { iAmBeingInserted = true; storeWithoutCommit(); } /** * Stores this OwnMessageList in the database without committing the transaction. */ public synchronized void cancelInsert() { if(iWasInserted) throw new RuntimeException("The OwnMessageList was already inserted."); iAmBeingInserted = false; storeWithoutCommit(); } public synchronized boolean wasInserted() { return iWasInserted; } /** * Stores this OwnMessageList in the database without committing the transaction. */ public synchronized void markAsInserted() { if(iAmBeingInserted == false) throw new RuntimeException("Trying to mark a MessageList as 'inserted' which was not marked as 'being inserted': This MUST NOT happen:" + " Messages can still be added to a list if it is not marked as being inserted. If it is being inserted already without being marked," + " the messages will not be contained in the actually inserted message list."); if(iWasInserted) Logger.error(this, "markAsInserted called for an already inserted message list: " + this); iWasInserted = true; iAmBeingInserted = false; storeWithoutCommit(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9e3da2ea3a1fb031f844b16714dec47437c6b369
5c016d691b30435c37a11e6f90f2b27f78fd7c05
/src/main/java/org/ccframe/client/module/core/view/AdminRoleListView.java
a06ee836b04d83db5c61f55651619ac9d82efe61
[]
no_license
tbs005/BikeServer
4a38788763221dd2cc40380ec8a8e0ec1398b1e9
11ca6fbc67cd922e481781a5d757927f90cb4dff
refs/heads/master
2021-05-05T20:37:06.266744
2017-07-29T03:38:13
2017-07-29T03:38:13
100,594,741
2
0
null
2017-08-17T11:08:44
2017-08-17T11:08:44
null
UTF-8
Java
false
false
7,353
java
package org.ccframe.client.module.core.view; import java.util.List; import org.ccframe.client.commons.ClientManager; import org.ccframe.client.commons.EventBusUtil; import org.ccframe.client.commons.ICcModule; import org.ccframe.client.commons.RestCallback; import org.ccframe.client.commons.ViewUtil; import org.ccframe.client.components.CcTextField; import org.ccframe.client.components.CcVBoxLayoutContainer; import org.ccframe.client.module.core.event.AdminRoleSelectEvent; import org.ccframe.client.module.core.event.BodyContentEvent; import org.ccframe.client.module.core.event.RoleSelectEvent; import org.ccframe.subsys.core.domain.entity.Role; import org.fusesource.restygwt.client.Method; import com.google.gwt.core.client.GWT; import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.user.client.ui.Widget; import com.google.inject.Singleton; import com.sencha.gxt.core.client.Style.SelectionMode; import com.sencha.gxt.core.client.ValueProvider; import com.sencha.gxt.core.client.util.Margins; import com.sencha.gxt.data.shared.ListStore; import com.sencha.gxt.data.shared.ModelKeyProvider; import com.sencha.gxt.widget.core.client.Component; import com.sencha.gxt.widget.core.client.ListView; import com.sencha.gxt.widget.core.client.Window; import com.sencha.gxt.widget.core.client.button.TextButton; import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData; import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack; import com.sencha.gxt.widget.core.client.event.SelectEvent; import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; import com.sencha.gxt.widget.core.client.form.FieldLabel; import com.sencha.gxt.widget.core.client.info.Info; @Singleton public class AdminRoleListView implements ICcModule{ public Widget widget; interface AdminRoleListUiBinder extends UiBinder<Component, AdminRoleListView> {} private static AdminRoleListUiBinder uiBinder = GWT.create(AdminRoleListUiBinder.class); @UiField TextButton addButton; @UiField TextButton editButton; @UiField TextButton deleteButton; @UiField(provided = true) ListView<Role, String> roleList; ListStore<Role> listStore; private Window simpleAddModifyWin; private TextButton simpleAddModifyButton; private CcTextField roleNm; Integer selectedId; @UiHandler({"addButton","editButton"}) public void handleAddClick(SelectEvent e){ boolean isAdd = (e.getSource() == addButton); simpleAddModifyWin.setHeadingText((isAdd ? "新增": "修改") + "角色"); //例如 新增文章分类 if(isAdd){ selectedId = null; }else{ selectedId = roleList.getSelectionModel().getSelectedItem().getRoleId(); } simpleAddModifyWin.show(); simpleAddModifyWin.center(); } private void reloadList(){ ClientManager.getAdminRoleClient().findRoleList(new RestCallback<List<Role>>(){ @Override public void onSuccess(Method method, List<Role> response) { listStore.clear(); listStore.addAll(response); roleList.getSelectionModel().select(0, false); //默认选择第一个 } }); } @UiHandler("deleteButton") public void handleDeleteClick(SelectEvent e){ if(listStore.size() <= 1){ ViewUtil.error("系统信息", "至少保留一个角色"); return; } final Role selectItem = roleList.getSelectionModel().getSelectedItem(); ViewUtil.confirm("系统信息", "您确定要删除角色 " + selectItem.getRoleNm() + " 吗?删除后将不可恢复", new Runnable(){ @Override public void run() { //二次确认 ClientManager.getAdminRoleClient().getRefUserCount(selectItem.getRoleId(), new RestCallback<Integer>(){ @Override public void onSuccess(Method method, Integer response) { if(response > 0){ ViewUtil.confirm("系统信息", "角色 " + selectItem.getRoleNm() + " 已被 " + response + "个用户使用,删除将解除这些用户与角色的关系,确定继续?", new Runnable(){ @Override public void run() { ClientManager.getAdminRoleClient().delete(selectItem.getRoleId(),new RestCallback<Void>(){ @Override public void onSuccess(Method method, Void response) { reloadList(); } }); } }); } } }); } }); } @Override public Widget asWidget() { if(widget == null){ listStore = new ListStore<Role>(new ModelKeyProvider<Role>(){ @Override public String getKey(Role item) { return item.getRoleId().toString(); } }); roleList = new ListView<Role, String>(listStore, new ValueProvider<Role, String>(){ @Override public String getValue(Role role) { return role.getRoleNm(); } @Override public void setValue(Role role, String value) { } @Override public String getPath() { return null; } }); widget = uiBinder.createAndBindUi(this); roleList.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); roleList.getSelectionModel().addSelectionHandler(new SelectionHandler<Role>(){ @Override public void onSelection(SelectionEvent<Role> selection) { EventBusUtil.fireEvent(new AdminRoleSelectEvent(selection.getSelectedItem())); } }); roleNm = new CcTextField(); roleNm.setWidth(150); roleNm.setAllowBlank(false); roleNm.setMaxLength(32); FieldLabel roleNmRow = new FieldLabel(roleNm, "角色名称"); simpleAddModifyButton = new TextButton("保存", new SelectHandler(){ @Override public void onSelect(SelectEvent event) { if(!roleNm.validate()){ return; } final Role role = new Role(); role.setRoleId(selectedId); role.setRoleNm(roleNm.getValue()); ClientManager.getAdminRoleClient().saveOrUpdate(role, new RestCallback<Void>(){ @Override public void onSuccess(Method method, Void response) { Info.display("保存角色", "保存成功!"); simpleAddModifyWin.hide(); if(selectedId == null){ reloadList(); }else{ listStore.update(role); } } }); } }); simpleAddModifyWin = new Window(); simpleAddModifyWin.setWidth(300); simpleAddModifyWin.setModal(true); CcVBoxLayoutContainer vBoxLayoutContainer = new CcVBoxLayoutContainer(); vBoxLayoutContainer.add(roleNmRow, new BoxLayoutData(new Margins(10, 10, 5, 10))); simpleAddModifyWin.setWidget(vBoxLayoutContainer); simpleAddModifyWin.addButton(simpleAddModifyButton); simpleAddModifyWin.addButton(new TextButton("取消", new SelectHandler(){ @Override public void onSelect(SelectEvent event) { simpleAddModifyWin.hide(); } })); simpleAddModifyWin.setResizable(false); simpleAddModifyWin.setButtonAlign(BoxLayoutPack.CENTER); roleList.getSelectionModel().addSelectionHandler(new SelectionHandler<Role>(){ @Override public void onSelection(SelectionEvent<Role> event) { EventBusUtil.fireEvent(new RoleSelectEvent(event.getSelectedItem())); } }); } return widget; } @Override public void onModuleReload(BodyContentEvent event) { reloadList(); } }
[ "1275563227@qq.com" ]
1275563227@qq.com
dbf35bb7188a6af3c2ea8139a32bb30cf31b64d6
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/wenote/model/nativenote/spans/k.java
18e6cf5c96dc5a7e99828ddc1feedb1fdef85423
[]
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
5,283
java
package com.tencent.mm.plugin.wenote.model.nativenote.spans; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Paint.FontMetricsInt; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.text.Layout; import android.text.Spannable; import android.text.Spanned; import android.text.style.LeadingMarginSpan; import android.view.MotionEvent; import android.widget.TextView; import androidx.core.content.a; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.R.g; import com.tencent.mm.plugin.wenote.model.a.i; import com.tencent.mm.plugin.wenote.model.nativenote.a.b; import com.tencent.mm.plugin.wenote.model.nativenote.manager.WXRTEditText; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MMApplicationContext; import java.lang.ref.WeakReference; public class k implements LeadingMarginSpan, f<Boolean>, g<Boolean> { private int xBG; public boolean xBH; public boolean xBN; public boolean xBO; public boolean xCj; public boolean xCk; private WeakReference<Drawable> xCl; public k(boolean paramBoolean1, int paramInt, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4) { AppMethodBeat.i(30641); this.xBN = false; this.xBO = false; this.xCj = false; this.xCk = false; this.xBG = paramInt; boolean bool1 = bool2; if (paramBoolean2) { bool1 = bool2; if (paramBoolean4) { bool1 = bool2; if (!paramBoolean3) { bool1 = true; } } } this.xBH = bool1; this.xCk = paramBoolean1; this.xBN = paramBoolean3; this.xBO = paramBoolean4; this.xCj = paramBoolean2; AppMethodBeat.o(30641); } private k iEw() { AppMethodBeat.i(30643); k localk = new k(this.xCk, this.xBG, this.xCj, this.xBN, this.xBO); AppMethodBeat.o(30643); return localk; } public final void a(TextView paramTextView, Spannable paramSpannable, MotionEvent paramMotionEvent, k paramk) { AppMethodBeat.i(30644); if (paramMotionEvent.getX() > this.xBG) { Log.e("MicroMsg.NoteTodoSpan", "x > mGapWidth"); AppMethodBeat.o(30644); return; } int i = paramSpannable.getSpanStart(paramk); int j = paramSpannable.getSpanEnd(paramk); if (this.xCk) { paramMotionEvent = "true"; Log.i("MicroMsg.NoteTodoSpan", "current mIsTodoCheck: %s", new Object[] { paramMotionEvent }); paramSpannable.removeSpan(this); if (this.xCk) { break label176; } } label176: for (boolean bool = true;; bool = false) { this.xCk = bool; paramSpannable.setSpan(iEw(), i, j, 33); paramTextView = (WXRTEditText)paramTextView; if (paramTextView.getEditTextType() == 0) { paramTextView = com.tencent.mm.plugin.wenote.model.nativenote.manager.c.iEg().avf(paramTextView.getRecyclerItemPosition()); if ((paramTextView != null) && (paramTextView.getType() == 1)) { ((i)paramTextView).content = b.a(paramSpannable); } } AppMethodBeat.o(30644); return; paramMotionEvent = "false"; break; } } public void drawLeadingMargin(Canvas paramCanvas, Paint paramPaint, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, CharSequence paramCharSequence, int paramInt6, int paramInt7, boolean paramBoolean, Layout paramLayout) { AppMethodBeat.i(30642); paramCharSequence = (Spanned)paramCharSequence; if ((!this.xBH) && (paramCharSequence.getSpanStart(this) == paramInt6)) { paramLayout = this.xCl; paramCharSequence = null; if (paramLayout != null) { paramCharSequence = (Drawable)paramLayout.get(); } paramLayout = paramCharSequence; if (paramCharSequence == null) { if (!this.xCk) { break label113; } } label113: for (paramCharSequence = a.m(MMApplicationContext.getContext(), R.g.foJ);; paramCharSequence = a.m(MMApplicationContext.getContext(), R.g.foK)) { this.xCl = new WeakReference(paramCharSequence); paramLayout = paramCharSequence; if (paramLayout != null) { break; } AppMethodBeat.o(30642); return; } paramLayout.setBounds(0, 0, paramLayout.getIntrinsicWidth(), paramLayout.getIntrinsicHeight()); paramCanvas.save(); paramPaint = paramPaint.getFontMetricsInt(); paramInt1 = paramPaint.descent; paramCanvas.translate(0.0F, (paramPaint.ascent + (paramInt1 + paramInt4 + paramInt4)) / 2 - paramLayout.getBounds().bottom / 2); paramLayout.draw(paramCanvas); paramCanvas.restore(); } AppMethodBeat.o(30642); } public int getLeadingMargin(boolean paramBoolean) { if (this.xBH) { return 0; } return this.xBG; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes6.jar * Qualified Name: com.tencent.mm.plugin.wenote.model.nativenote.spans.k * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
5f634c7ae7c1d594749853879fce337fc2fea563
0be92950649594e8109ceacfeb6f08061974587c
/ormate-core/src/main/java/cn/newphy/mate/sql/And.java
18494477b3c5efd8f4ca15e4f78796a73b85cdec
[]
no_license
Newphy/orm-mate
73f4a02a9ee0438ee09a4c449777f71fb5ada8d7
e74e0176a59f5b2956ea51db26a73a8a645a02a1
refs/heads/master
2020-03-27T17:10:17.436937
2018-08-31T06:30:25
2018-08-31T06:30:25
146,832,634
0
0
null
null
null
null
UTF-8
Java
false
false
1,376
java
package cn.newphy.mate.sql; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; /** * Mybatis And操作表达式 * * @author Newphy * @date 2018/7/30 **/ public class And implements QueryExpression { private List<QueryExpression> expressions = new ArrayList<>(); public And() { } public And(QueryExpression exp1, QueryExpression exp2, QueryExpression...expN) { if(exp1 == null || exp2 == null) { throw new IllegalArgumentException("参与and运算的表达式不能为空"); } expressions.add(exp1); expressions.add(exp2); and(expN); } public void and(QueryExpression... expression) { if (expression != null && expression.length > 0) { for (int i = 0; i < expression.length; i++) { expressions.add(expression[i]); }; } } public List<QueryExpression> getExpressions() { return expressions; } @Override public String toSql(SqlBuilder sqlBuilder) { return sqlBuilder.buildAndSql(this); } @Override public Map<String, Object> getParamValues() { Map<String, Object> paramValues = new LinkedHashMap<>(); for (QueryExpression expression : expressions) { Map<String, Object> paramMap = expression.getParamValues(); if (paramMap != null) { paramValues.putAll(paramMap); } } return paramValues; } }
[ "liuhui18@xiaoniu66.com" ]
liuhui18@xiaoniu66.com
156269eefc8fb8eb58804eff2b36af10d8ada9bc
952789d549bf98b84ffc02cb895f38c95b85e12c
/V_1.x/branch/SpagoBIQbeEngine/tag/ElisaQbeEngine/src/it/eng/spagobi/qbe/core/service/ValidateCatalogueAction.java
fbf393787e36e27bcd87e550b7c7287157490bb6
[]
no_license
emtee40/testingazuan
de6342378258fcd4e7cbb3133bb7eed0ebfebeee
f3bd91014e1b43f2538194a5eb4e92081d2ac3ae
refs/heads/master
2020-03-26T08:42:50.873491
2015-01-09T16:17:08
2015-01-09T16:17:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,762
java
/** * SpagoBI - The Business Intelligence Free Platform * * Copyright (C) 2004 - 2008 Engineering Ingegneria Informatica S.p.A. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * **/ package it.eng.spagobi.qbe.core.service; import java.io.IOException; import java.util.Iterator; import java.util.Set; import org.apache.log4j.Logger; import it.eng.qbe.model.HQLStatement; import it.eng.qbe.model.IStatement; import it.eng.qbe.query.Query; import it.eng.spago.base.SourceBean; import it.eng.spagobi.qbe.commons.service.AbstractQbeEngineAction; import it.eng.spagobi.utilities.engines.SpagoBIEngineServiceException; import it.eng.spagobi.utilities.engines.SpagoBIEngineServiceExceptionHandler; import it.eng.spagobi.utilities.service.JSONAcknowledge; /** * This action is responsible validate queries stored in current catalogues. * It actually executes the query . */ public class ValidateCatalogueAction extends AbstractQbeEngineAction { public static final String SERVICE_NAME = "VALIDATE_CATALOGUE_ACTION"; public String getActionName(){return SERVICE_NAME;} // INPUT PARAMETERS // no input public static transient Logger logger = Logger.getLogger(ValidateCatalogueAction.class); public void service(SourceBean request, SourceBean response) { Query query; IStatement statement; boolean validationResult = false; String hqlQueryStr; String sqlQueryStr; logger.debug("IN"); try { super.service(request, response); Set queries = getEngineInstance().getQueryCatalogue().getAllQueries(false); logger.debug("Query catalogue contains [" + queries.size() + "] first-class query"); Iterator it = queries.iterator(); while(it.hasNext()) { query = (Query)it.next(); logger.debug("Validating query [" + query.getName() +"] ..."); statement = getEngineInstance().getDatamartModel().createStatement( query ); statement.setParameters( getEnv() ); hqlQueryStr = statement.getQueryString(); sqlQueryStr = ((HQLStatement)statement).getSqlQueryString(); logger.debug("Validating query (HQL): [" + hqlQueryStr+ "]"); logger.debug("Validating query (SQL): [" + sqlQueryStr + "]"); try { //statement.execute(0, 1, 1, true); logger.debug("Query [" + query.getName() + "] validated sucesfully"); } catch (Throwable t) { logger.debug("Query [" + query.getName() + "] is not valid"); throw new SpagoBIEngineServiceException(getActionName(), "Query [" + query.getName() + "] is not valid", t); } } try { writeBackToClient( new JSONAcknowledge() ); } catch (IOException e) { String message = "Impossible to write back the responce to the client"; throw new SpagoBIEngineServiceException(getActionName(), message, e); } } catch(Throwable t) { throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t); } finally { logger.debug("OUT"); } } }
[ "gioia@99afaf0d-6903-0410-885a-c66a8bbb5f81" ]
gioia@99afaf0d-6903-0410-885a-c66a8bbb5f81
65e6ff654457479de09f1fdb0c9baea18a06dbfc
f1ff01a62963e15e2d76970b54466dfccf0e84c6
/JAVA/event/dao/EventPrizeDao.java
36f8dbe75572e8bde619b628b13cf7e5579e6d3c
[]
no_license
gshenyinshu/GTChina
7653224925a348ca5a54fe1c741aee2c662915a6
9d91cac2250aed2a42aebf9f5d86a27679fdc754
refs/heads/master
2023-03-08T18:22:12.540089
2023-02-21T08:17:56
2023-02-21T08:17:56
138,272,406
0
0
null
2020-05-15T05:36:36
2018-06-22T07:49:46
Java
GB18030
Java
false
false
885
java
/** * Title : * Description : Sample dao * Copyright : Copyright (c) 2004 * Company : CyberImagination * @author * @version 1.0 */ package gtone.changeminer.event.dao; import anyframe.data.DataSet; import gtone.changeminer.common.dao.Executor ; public class EventPrizeDao { /** * Sample Dao * @param * @return */ public DataSet selectPrize(DataSet input)throws Exception { DataSet output ;////[DB]input data Executor executor;////[DB]query전송 try { output = new DataSet(); executor = Executor.getInstance(); System.out.println("selectPrize_input --------------------------" + input); output = executor.execute("cybercenter/prudb_usp_prize_cyberevent", input); System.out.println("selectPrize_output --------------------------" + output); return output ; }catch(Exception e){ throw(e); } } }
[ "olivia@gtone.co.kr" ]
olivia@gtone.co.kr
bedbd5c856996162af0b7fd8f458e9fb378cb43a
77623d6dd90f2d1a401ee720adb41c3c0c264715
/DiffTGen-result/output/Math_75_tbar/target/0/14/evosuite-tests/org/apache/commons/math/stat/Frequency_ESTest_scaffolding.java
4782891d5654de831295f1ba02dd7a6a7a2fd06d
[]
no_license
wuhongjun15/overfitting-study
40be0f062bbd6716d8de6b06454b8c73bae3438d
5093979e861cda6575242d92ca12355a26ca55e0
refs/heads/master
2021-04-17T05:37:48.393527
2020-04-11T01:53:53
2020-04-11T01:53:53
249,413,962
0
0
null
null
null
null
UTF-8
Java
false
false
7,547
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Mar 23 05:47:23 GMT 2020 */ package org.apache.commons.math.stat; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class Frequency_ESTest_scaffolding { @org.junit.Rule public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(4000); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.stat.Frequency"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("java.vm.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.specification.version", "1.8"); java.lang.System.setProperty("java.home", "/usr/lib/jvm/jdk1.8.0_181/jre"); java.lang.System.setProperty("user.dir", "/home/whj/dowork/DiffTGen/output/Math_75_tbar/target/0/14"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); java.lang.System.setProperty("awt.toolkit", "sun.awt.X11.XToolkit"); java.lang.System.setProperty("file.encoding", "UTF-8"); java.lang.System.setProperty("file.separator", "/"); java.lang.System.setProperty("java.awt.graphicsenv", "sun.awt.X11GraphicsEnvironment"); java.lang.System.setProperty("java.awt.headless", "true"); java.lang.System.setProperty("java.awt.printerjob", "sun.print.PSPrinterJob"); java.lang.System.setProperty("java.class.path", "/tmp/EvoSuite_pathingJar2963973895431918889.jar"); java.lang.System.setProperty("java.class.version", "52.0"); java.lang.System.setProperty("java.endorsed.dirs", "/usr/lib/jvm/jdk1.8.0_181/jre/lib/endorsed"); java.lang.System.setProperty("java.ext.dirs", "/usr/lib/jvm/jdk1.8.0_181/jre/lib/ext:/usr/java/packages/lib/ext"); java.lang.System.setProperty("java.library.path", "lib"); java.lang.System.setProperty("java.runtime.name", "Java(TM) SE Runtime Environment"); java.lang.System.setProperty("java.runtime.version", "1.8.0_181-b13"); java.lang.System.setProperty("java.specification.name", "Java Platform API Specification"); java.lang.System.setProperty("java.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor.url", "http://java.oracle.com/"); java.lang.System.setProperty("java.version", "1.8.0_181"); java.lang.System.setProperty("java.vm.info", "mixed mode"); java.lang.System.setProperty("java.vm.name", "Java HotSpot(TM) 64-Bit Server VM"); java.lang.System.setProperty("java.vm.specification.name", "Java Virtual Machine Specification"); java.lang.System.setProperty("java.vm.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vm.specification.version", "1.8"); java.lang.System.setProperty("java.vm.version", "25.181-b13"); java.lang.System.setProperty("line.separator", "\n"); java.lang.System.setProperty("os.arch", "amd64"); java.lang.System.setProperty("os.name", "Linux"); java.lang.System.setProperty("os.version", "4.15.0-91-generic"); java.lang.System.setProperty("path.separator", ":"); java.lang.System.setProperty("user.country", "US"); java.lang.System.setProperty("user.home", "/home/whj"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.name", "whj"); java.lang.System.setProperty("user.timezone", "Asia/Shanghai"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Frequency_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.stat.Frequency$NaturalComparator", "org.apache.commons.math.stat.Frequency", "org.apache.commons.math.MathRuntimeException", "org.apache.commons.math.MathRuntimeException$1", "org.apache.commons.math.stat.Frequency$1", "org.apache.commons.math.MathRuntimeException$2", "org.apache.commons.math.MathRuntimeException$3", "org.apache.commons.math.MathRuntimeException$4", "org.apache.commons.math.MathRuntimeException$5", "org.apache.commons.math.MathRuntimeException$6", "org.apache.commons.math.MathRuntimeException$7", "org.apache.commons.math.MathRuntimeException$8", "org.apache.commons.math.MathRuntimeException$9", "org.apache.commons.math.MathRuntimeException$10" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Frequency_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.math.stat.Frequency$NaturalComparator", "org.apache.commons.math.stat.Frequency", "org.apache.commons.math.MathRuntimeException", "org.apache.commons.math.MathRuntimeException$4" ); } }
[ "375882286@qq.com" ]
375882286@qq.com
688f6c4dd88a23c165eed289d3ddece825e0054e
7c036648649367f79262c0a612c33bc1cba139cd
/src/stage2/SymbolTable.java
ea1353f217f6fb71a45b50e906516a2583ac97d3
[ "MIT" ]
permissive
bigfatnoob/Decaf
8d92a3cf3005bdc92ae7a59d0b28a0b8c9961d8d
5b7c38338c3ebd7193de97a4fc792b4d5def0999
refs/heads/master
2020-12-30T09:59:13.565725
2014-12-07T21:46:03
2014-12-07T21:46:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,798
java
/** * */ package stage2; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author George * */ public class SymbolTable { private Map<String, List<TableEntry>> table; private static SymbolTable symbolTable; private final static List<String> builtinTypes = new ArrayList<String>(Arrays.asList("Object","String","IO")); private SymbolTable(){ this.table = new HashMap<String, List<TableEntry>>(); } public static SymbolTable getSymbolTable(){ if (symbolTable == null) { symbolTable = new SymbolTable(); } return symbolTable; } public Map<String, List<TableEntry>> getTable(){ return table; } /*** * Return the most deep Unit with a * given name. * @param name * @return */ private Unit getLastUnit(String name) { List<TableEntry> tableEntries = table.get(name); if (tableEntries == null) return null; TableEntry lastEntry = null; for (TableEntry tableEntry: tableEntries) { if (tableEntry.getName().equals(name)) { lastEntry = tableEntry; break; } } if (lastEntry == null) return null; Unit lastUnit = lastEntry.getUnit(); while(lastUnit != null) { if (lastUnit.getLastNameUnit() == null) { return lastUnit; } lastUnit = lastUnit.getLastNameUnit(); } return lastUnit; } /** * Method to update a record in the symbol table * @param tableEntry */ private void updateTable(TableEntry tableEntry) { ScopeFactory scopeFactory = ScopeFactory.getScopeFactory(); String name = tableEntry.getName(); List<TableEntry> tableEntries = table.get(name); if (tableEntries == null) { tableEntries = new ArrayList<TableEntry>(); tableEntries.add(tableEntry); table.put(name, tableEntries); } else { TableEntry existingTableEntry = null; for (TableEntry tblEntry: tableEntries) { if (tblEntry.getName().equals(name)) { if((tblEntry.getUnit().equals(scopeFactory.getCurrentScopeElement().getUnit())) && (tblEntry.getUnit().getUnitType().equals(tableEntry.getUnit().getUnitType()))) { existingTableEntry = tblEntry; break; } } } if (existingTableEntry != null) { Unit unit = tableEntry.getUnit(); existingTableEntry.setUnit(unit); unit.setTableEntry(existingTableEntry); } else { tableEntries.add(tableEntry); } } } /*** * Method to clear symbol table entry for * a name * @param unit */ private void resetTableEntries(Unit unit) { UnitType unitType = unit.getUnitType(); Unit lastUnit = unit.getLastNameUnit(); if (lastUnit == null) { TableEntry tableEntry = unit.getTableEntry(); List<TableEntry> tableEntries = table.get(tableEntry.getName()); tableEntries.remove(tableEntry); } while (lastUnit != null) { if (lastUnit.getUnitType().equals(unitType)) { TableEntry tblEntry = lastUnit.getTableEntry(); tblEntry.setUnit(lastUnit); lastUnit.setTableEntry(tblEntry); break; } } } public Unit lookUp(String name, UnitType type, IntegerMuted scopeLevel) { ScopeFactory scopeFactory = ScopeFactory.getScopeFactory(); List<TableEntry> tableEntries = table.get(name); if ((tableEntries == null) || (tableEntries.size() == 0)) return null; if (!type.equals(UnitType.METHOD) && builtinTypes.contains(name)) { if (type.equals(UnitType.CLASS)) { return tableEntries.get(0).getUnit(); } else { ClassUnit cUnit = (ClassUnit)tableEntries.get(0).getUnit(); VariableUnit vUnit = new VariableUnit(); vUnit.setModifier(cUnit.getModifier()); idExpr_AST idExpr = new idExpr_AST(0); idExpr.typeObj = new Type(cUnit.getName(), false, 0, true); vUnit.setType(idExpr); return vUnit; } } TableEntry tableEntry = null; for (TableEntry tblEntry: tableEntries) { if (tblEntry.getName().equals(name)) { if(!type.equals(UnitType.METHOD)) { if(tblEntry.getUnit().getScopeLevel() <= 1) { // FOr Class declarations tableEntry = tblEntry; break; } } else { if(tblEntry.getUnit().getScopeLevel() <= 1 && type.equals(tblEntry.getUnit().getUnitType())) { // FOr Class declarations tableEntry = tblEntry; break; } } try{ if(scopeFactory.getCurrentScope().isBlock() && tblEntry.getUnit().getScopeLevel() <= (scopeFactory.getBlockScopeLevel()+1)) { if (type.equals(tblEntry.getUnit().getUnitType())) { tableEntry = tblEntry; break; } }else if((tblEntry.getUnit().getScopeLevel() <= (scopeFactory.getCurrentScopeElement().getUnit().getScopeLevel()+1))|| (tblEntry.getUnit().equals(scopeFactory.getCurrentScopeElement().getUnit()))) { if (type.equals(tblEntry.getUnit().getUnitType())) { tableEntry = tblEntry; break; } } else if (type.equals(tblEntry.getUnit().getUnitType()) && (tableEntries.size() == 1)){ tableEntry = tblEntry; break; } } catch (Exception e) { e.printStackTrace(); } } } if (tableEntry == null){ return null; } Unit currentUnit = tableEntry.getUnit(); while (currentUnit != null) { if (currentUnit.getUnitType().equals(type)) { scopeLevel.setValue(0); if (scopeFactory.getCurrentScopeElementLevel() == currentUnit.getScopeLevel()) scopeLevel.setValue(1); return currentUnit; } currentUnit = currentUnit.getLastNameUnit(); } return null; } public Unit add(String name, UnitType type) { IntegerMuted currentScope = new IntegerMuted(-1); ScopeFactory scopeFactory = ScopeFactory.getScopeFactory(); Unit unit = lookUp(name, type, currentScope); if (unit != null && currentScope.getValue().equals(1) && (unit.getParentScopeUnit()!=null) && unit.getParentScopeUnit().equals(scopeFactory.getCurrentScope().getScopeUnit().getUnit())) throw new RuntimeException(type.getName() + " " + name + " already declared"); TableEntry tableEntry = new TableEntry(); unit = UnitFactory.generateUnit(type); unit.setName(name); ScopeUnit currentScopeUnit = scopeFactory.getCurrentScopeElement(); Unit currentUnit = currentScopeUnit.getUnit(); //currentScopeUnit.setUnit(unit); Unit lastNameUnit = getLastUnit(name); unit.setLastNameUnit(lastNameUnit); unit.setParentScopeUnit(currentUnit); unit.setUnitType(type); unit.setScopeLevel(scopeFactory.getCurrentScopeElementLevel()); unit.setTableEntry(tableEntry); tableEntry.setName(name); tableEntry.setUnit(unit); updateTable(tableEntry); return unit; } public void enterScope(boolean isProgramStart, int MODE) { ScopeFactory scopeFactory = ScopeFactory.getScopeFactory(); scopeFactory.enterNewScope(isProgramStart, MODE); } public void exitScope(int MODE) { ScopeFactory scopeFactory = ScopeFactory.getScopeFactory(); ScopeUnit scopeUnit = scopeFactory.exitLastScope(MODE); //Unit lastUnit = scopeUnit.getUnit(); /*while (lastUnit != null) { resetTableEntries(lastUnit); lastUnit = lastUnit.getParentScopeUnit(); }*/ } public void enterScopeForUnit(Unit unit, int MODE) { ScopeFactory scopeFactory = ScopeFactory.getScopeFactory(); scopeFactory.enterNewScopeForUnit(unit, MODE); } public void addVariablesToMethod(List<Unit> variables) { ScopeFactory scopeFactory = ScopeFactory.getScopeFactory(); ScopeElement scopeElement = scopeFactory.getCurrentScope(); ScopeElement thisScope = scopeElement; while (thisScope.isBlock()) { thisScope = thisScope.getParent(); } if (thisScope.getScopeUnit().getUnit() != null && thisScope.getScopeUnit().getUnit() instanceof MethodUnit) { MethodUnit methodUnit = (MethodUnit)thisScope.getScopeUnit().getUnit(); methodUnit.localVariables.addAll(variables); } } }
[ "george.meg91@gmail.com" ]
george.meg91@gmail.com
70985b268e6078a5114867ce05a860db74a97bbb
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/com/iqoption/d/se.java
de2ae460af3131f9228d6d1f8bd4d1aebfd779fd
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
2,848
java
package com.iqoption.d; import android.databinding.DataBindingComponent; import android.databinding.ViewDataBinding; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.design.widget.TextInputEditText; import android.support.design.widget.TextInputLayout; import android.support.v7.widget.RecyclerView; import android.util.SparseIntArray; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.iqoption.core.ui.a; import com.iqoption.x.R; /* compiled from: FragmentSearchCountryBindingImpl */ public class se extends sd { @Nullable private static final IncludedLayouts awU = null; @Nullable private static final SparseIntArray awV = new SparseIntArray(); private long awW; @NonNull private final FrameLayout biH; protected boolean onFieldChange(int i, Object obj, int i2) { return false; } public boolean setVariable(int i, @Nullable Object obj) { return true; } static { awV.put(R.id.countryBackground, 2); awV.put(R.id.countryContainer, 3); awV.put(R.id.searchCountryToolbar, 4); awV.put(R.id.searchCountryTitle, 5); awV.put(R.id.searchCountryClose, 6); awV.put(R.id.countryInputContainer, 7); awV.put(R.id.countryInput, 8); awV.put(R.id.countryEdit, 9); awV.put(R.id.countrySuggestList, 10); } public se(@Nullable DataBindingComponent dataBindingComponent, @NonNull View view) { this(dataBindingComponent, view, ViewDataBinding.mapBindings(dataBindingComponent, view, 11, awU, awV)); } private se(DataBindingComponent dataBindingComponent, View view, Object[] objArr) { super(dataBindingComponent, view, 0, (View) objArr[2], (LinearLayout) objArr[3], (TextInputEditText) objArr[9], (TextInputLayout) objArr[8], (FrameLayout) objArr[7], (ImageView) objArr[1], (RecyclerView) objArr[10], (ImageView) objArr[6], (TextView) objArr[5], (LinearLayout) objArr[4]); this.awW = -1; this.bBY.setTag(null); this.biH = (FrameLayout) objArr[0]; this.biH.setTag(null); setRootTag(view); invalidateAll(); } public void invalidateAll() { synchronized (this) { this.awW = 1; } requestRebind(); } public boolean hasPendingBindings() { synchronized (this) { if (this.awW != 0) { return true; } return false; } } protected void executeBindings() { long j; synchronized (this) { j = this.awW; this.awW = 0; } if ((j & 1) != 0) { a.d(this.bBY, 0.5f); } } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
bcb31bbfd6e97525429c45448a6c950b75c79d4b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_8bfc28ab4476f15260744e6cea8962c2c704290d/MapArea/30_8bfc28ab4476f15260744e6cea8962c2c704290d_MapArea_t.java
00fb829f500dc8066da632a360b8f447e881573c
[]
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,243
java
package saneMap; import java.util.Random; /** * A collection of MapTiles. * Class will handle inter-tile environment things. (if that is ever included) */ public class MapArea { //Minimum and maximum sizes for map generation. public final int MAP_MIN_X_SIZE = 20; public final int MAP_MIN_Y_SIZE = 20; public final int MAP_MAX_X_SIZE = 100; public final int MAP_MAX_Y_SIZE = 100; private MapTile[][] mapTiles; private int mapXSize = 0; private int mapYSize = 0; private Random rng; //Map generation public MapArea(int seed){ rng = new Random(seed); mapXSize = rng.nextInt(MAP_MAX_X_SIZE - MAP_MIN_X_SIZE) + MAP_MIN_X_SIZE; mapYSize = rng.nextInt(MAP_MAX_Y_SIZE - MAP_MIN_Y_SIZE) + MAP_MIN_Y_SIZE; mapTiles = new MapTile[mapXSize][mapYSize]; for (int x = 0; x < mapXSize; x++){ for (int y = 0; y < mapYSize; y++){ mapTiles[x][y] = new MapTile(TileType.WALL); } } } public int getXSize(){ return mapXSize; } public int getYSize(){ return mapYSize; } public MapTile getTile(int x, int y){ return mapTiles[x][y]; } public Random getRandom(){ return rng; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e5dacfb344d44655a5a521b10700851f0aed106d
36db8ea6d43f04fd15b3168bcbdf1c86147f0dc6
/JMXSample/src/main/java/descriptors/QueueSamplerMXBean.java
3216d3fbd5b8c35d29fdc456a4f70e0e0138df45
[]
no_license
sunning9001/AllInOneSample
79685de54a8af2f85b1bf6d5dea93d8e8d4602f7
e5809b840d125e801989d60aab770c43d0648cc8
refs/heads/master
2022-12-22T21:13:30.880178
2020-11-10T08:10:13
2020-11-10T08:10:13
96,510,636
0
0
null
2022-12-16T03:08:00
2017-07-07T07:14:52
Java
UTF-8
Java
false
false
632
java
/* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /** * QueueSamplerMXBean.java - MXBean interface describing the management * operations and attributes for the QueueSampler MXBean. In this case * there is a read-only attribute "QueueSample" and an operation "clearQueue". */ package descriptors; @Author("Mr Bean") @Version("1.0") public interface QueueSamplerMXBean { @DisplayName("GETTER: QueueSample") public QueueSample getQueueSample(); @DisplayName("OPERATION: clearQueue") public void clearQueue(); }
[ "sunning@auto-fis.com" ]
sunning@auto-fis.com
586ce48f5b0f4fbc1a384ec8df595a1f46464171
027ad5f852e770e4da19d4a3877a3e4ff5107da6
/AdvanceJavaWS/JSP-Proj20-MiniProject/src/main/java/com/nt/dto/BookDetailsDTO.java
47a1c81d9e4ef6dc1336c9131a07563048eb8d58
[]
no_license
varunraj2297/AdvanceJavaWS
25a96a1b974586194c76b28434f2d036e5e74f7d
1f19b09d3d0d4abb109c35e582e243780e450e48
refs/heads/master
2021-06-29T23:51:42.544714
2019-08-04T14:50:42
2019-08-04T14:50:42
176,876,753
0
0
null
2020-10-13T14:07:19
2019-03-21T05:35:43
Java
UTF-8
Java
false
false
303
java
package com.nt.dto; import lombok.Data; @Data public class BookDetailsDTO { private int serNo; private int bookId; private String bookName; private String author; private String status; private float price; private String category; }
[ "varunraj2297@gmail.com" ]
varunraj2297@gmail.com
bddd2e3578275bc28acd99f5826c71c1e17dce6e
27d7e9922785758d4d480fabf32b99a1f4d51333
/FBReader/src/main/java/org/geometerplus/android/fbreader/network/AuthorizationMenuActivity.java
91a9fccc9e1df56b477eb15a4fa21de0b365d304
[]
no_license
philweaver/FBReaderJ
9f714deeb5341ef9cffadafedb7a1e4efee14576
3937077f27c5ca5951ed97bb2c715b16a85cf423
refs/heads/master
2021-01-22T16:18:07.027424
2017-08-30T13:04:52
2017-08-30T13:04:52
102,393,477
1
1
null
2017-09-04T19:05:32
2017-09-04T19:05:32
null
UTF-8
Java
false
false
2,938
java
/* * Copyright (C) 2010-2012 Geometer Plus <contact@geometerplus.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ package org.geometerplus.android.fbreader.network; import java.util.*; import android.app.Activity; import android.content.*; import android.net.Uri; import android.view.*; import android.widget.*; import org.geometerplus.fbreader.network.INetworkLink; import org.geometerplus.fbreader.network.NetworkLibrary; import org.geometerplus.fbreader.network.urlInfo.UrlInfo; import org.geometerplus.fbreader.network.authentication.NetworkAuthenticationManager; import org.geometerplus.android.util.PackageUtil; import org.geometerplus.android.fbreader.api.PluginApi; public class AuthorizationMenuActivity extends MenuActivity { public static void runMenu(Context context, INetworkLink link) { context.startActivity( Util.intentByLink(new Intent(context, AuthorizationMenuActivity.class), link) ); } public static void runMenu(Activity activity, INetworkLink link, int code) { activity.startActivityForResult( Util.intentByLink(new Intent(activity, AuthorizationMenuActivity.class), link), code ); } private INetworkLink myLink; @Override protected void init() { setTitle(NetworkLibrary.resource().getResource("authorizationMenuTitle").getValue()); final String url = getIntent().getData().toString(); myLink = NetworkLibrary.Instance().getLinkByUrl(url); if (myLink.getUrlInfo(UrlInfo.Type.SignIn) != null) { myInfos.add(new PluginApi.MenuActionInfo( Uri.parse(url + "/signIn"), NetworkLibrary.resource().getResource("signIn").getValue(), 0 )); } } @Override protected String getAction() { return Util.AUTHORIZATION_ACTION; } @Override protected void runItem(final PluginApi.MenuActionInfo info) { try { final NetworkAuthenticationManager mgr = myLink.authenticationManager(); if (info.getId().toString().endsWith("/signIn")) { Util.runAuthenticationDialog(AuthorizationMenuActivity.this, myLink, null); } else { final Intent intent = Util.authorizationIntent(myLink, info.getId()); if (PackageUtil.canBeStarted(AuthorizationMenuActivity.this, intent, true)) { startActivity(intent); } } } catch (Exception e) { // do nothing } } }
[ "geometer@fbreader.org" ]
geometer@fbreader.org
262bb6601aff3bc09361262a12d7b4abbe37e158
0ab323dec4af7f42ad05267052a39eec8bc6d840
/api/src/main/java/pico/erp/audit/AuditExceptions.java
196a8a03251c6da7edf7ae5b4e0308081a3fb7b7
[]
no_license
kkojaeh/pico-erp-audit
284271472dafc67c31b2d3e731aeccfd8eaf486a
7db3a967d949fd712f3597468e7d95b9b05f295d
refs/heads/master
2020-03-27T10:25:48.944401
2018-12-20T05:09:46
2018-12-20T05:09:46
146,419,489
0
0
null
null
null
null
UTF-8
Java
false
false
636
java
package pico.erp.audit; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; public interface AuditExceptions { @ResponseStatus(code = HttpStatus.UNPROCESSABLE_ENTITY, reason = "already.audit.alias.exists.exception") class AlreadyAuditAliasExistsException extends RuntimeException { private static final long serialVersionUID = 1L; } @ResponseStatus(code = HttpStatus.UNPROCESSABLE_ENTITY, reason = "not.registed.audit.type.exception") class NotRegisteredAuditTypeException extends RuntimeException { private static final long serialVersionUID = 1L; } }
[ "kkojaeh@gmail.com" ]
kkojaeh@gmail.com
4feb3fe8e09ca53f3fad71fd10cf213611824755
07dde126873cb2a0bd20a3af4ce2fd10ea94c810
/src/main/java/com/nd/auxo/recommend/core/api/oldelearning/ElearningProjectApi.java
6a0b01ecad3a266d2bbde462eab9bfd9e0fa1300
[]
no_license
azhangge/seniorWhy
0c280cc781b32e82745edeaf5a9a87f1bac3b2d8
1e9542e00cf72babeecefad3fd2b859f90e5eb48
refs/heads/master
2020-03-27T12:08:09.238373
2018-09-03T02:01:57
2018-09-03T02:01:57
146,528,572
0
1
null
null
null
null
UTF-8
Java
false
false
557
java
package com.nd.auxo.recommend.core.api.oldelearning; import com.nd.auxo.recommend.core.api.oldelearning.repository.org.UcOrg; import com.nd.auxo.recommend.core.api.oldelearning.repository.project.Project; /** * Created by way on 2016/7/19. */ public interface ElearningProjectApi { /** * 获取项目 * * @param projectId * @return */ Project get(Long projectId); /** * 获取项目 * * @param orgName * @return */ UcOrg getUcOrgByName(String orgName); }
[ "1007009258@qq.com" ]
1007009258@qq.com
e04cf10aec9338ffb095f0f1be96eda2da4e3b52
f998a098dad23557d41d1c0f591571fbcdb14373
/app/src/main/java/com/wearetogether/v2/ucrop/util/RotationGestureDetector.java
824acbf734a8739eb03233fbb1ac656d115ab6f9
[]
no_license
dkzver/app
14046b85111dd51a6a960245811c64dbe6c004b3
4b87b7aecec75ed9d3f0d6ab96d6094c4bd9dd8c
refs/heads/master
2023-04-04T06:26:22.478241
2021-04-12T02:13:26
2021-04-12T02:13:26
357,030,012
0
0
null
null
null
null
UTF-8
Java
false
false
3,704
java
package com.wearetogether.v2.ucrop.util; import androidx.annotation.*; import android.view.MotionEvent; public class RotationGestureDetector { private static final int INVALID_POINTER_INDEX = -1; private float fX, fY, sX, sY; private int mPointerIndex1, mPointerIndex2; private float mAngle; private boolean mIsFirstTouch; private OnRotationGestureListener mListener; public RotationGestureDetector(OnRotationGestureListener listener) { mListener = listener; mPointerIndex1 = INVALID_POINTER_INDEX; mPointerIndex2 = INVALID_POINTER_INDEX; } public float getAngle() { return mAngle; } public boolean onTouchEvent(@NonNull MotionEvent event) { switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: sX = event.getX(); sY = event.getY(); mPointerIndex1 = event.findPointerIndex(event.getPointerId(0)); mAngle = 0; mIsFirstTouch = true; break; case MotionEvent.ACTION_POINTER_DOWN: fX = event.getX(); fY = event.getY(); mPointerIndex2 = event.findPointerIndex(event.getPointerId(event.getActionIndex())); mAngle = 0; mIsFirstTouch = true; break; case MotionEvent.ACTION_MOVE: if (mPointerIndex1 != INVALID_POINTER_INDEX && mPointerIndex2 != INVALID_POINTER_INDEX && event.getPointerCount() > mPointerIndex2) { float nfX, nfY, nsX, nsY; nsX = event.getX(mPointerIndex1); nsY = event.getY(mPointerIndex1); nfX = event.getX(mPointerIndex2); nfY = event.getY(mPointerIndex2); if (mIsFirstTouch) { mAngle = 0; mIsFirstTouch = false; } else { calculateAngleBetweenLines(fX, fY, sX, sY, nfX, nfY, nsX, nsY); } if (mListener != null) { mListener.onRotation(this); } fX = nfX; fY = nfY; sX = nsX; sY = nsY; } break; case MotionEvent.ACTION_UP: mPointerIndex1 = INVALID_POINTER_INDEX; break; case MotionEvent.ACTION_POINTER_UP: mPointerIndex2 = INVALID_POINTER_INDEX; break; } return true; } private float calculateAngleBetweenLines(float fx1, float fy1, float fx2, float fy2, float sx1, float sy1, float sx2, float sy2) { return calculateAngleDelta( (float) Math.toDegrees((float) Math.atan2((fy1 - fy2), (fx1 - fx2))), (float) Math.toDegrees((float) Math.atan2((sy1 - sy2), (sx1 - sx2)))); } private float calculateAngleDelta(float angleFrom, float angleTo) { mAngle = angleTo % 360.0f - angleFrom % 360.0f; if (mAngle < -180.0f) { mAngle += 360.0f; } else if (mAngle > 180.0f) { mAngle -= 360.0f; } return mAngle; } public static class SimpleOnRotationGestureListener implements OnRotationGestureListener { @Override public boolean onRotation(RotationGestureDetector rotationDetector) { return false; } } public interface OnRotationGestureListener { boolean onRotation(RotationGestureDetector rotationDetector); } }
[ "dkrstudio@hotmail.com" ]
dkrstudio@hotmail.com
0fdac3099bfab41845ab563c1ab114473b1cdf47
2d2013c46190f7f9927d3a923b8413a91e91fbbb
/sources/i/b/a/n/n/u.java
1d620cbfdfe1a3291fd3a6d9f13bb33421b98d92
[]
no_license
ghuntley/Aarogya-Setu_v1.1.1.apk
af5b054feddc901ca62b9233bb4aac576f8c4249
ca931e596a31ab7298f3c7dc1ca3eaa327f84473
refs/heads/master
2022-05-26T15:50:36.276158
2020-05-02T12:06:54
2020-05-02T12:06:54
260,674,190
0
0
null
null
null
null
UTF-8
Java
false
false
1,822
java
package i.b.a.n.n; import android.content.res.AssetFileDescriptor; import android.net.Uri; import android.os.ParcelFileDescriptor; import android.text.TextUtils; import i.b.a.n.g; import i.b.a.n.n.n; import java.io.File; import java.io.InputStream; /* compiled from: StringLoader */ public class u<Data> implements n<String, Data> { public final n<Uri, Data> a; /* compiled from: StringLoader */ public static final class a implements o<String, AssetFileDescriptor> { public n<String, AssetFileDescriptor> a(r rVar) { return new u(rVar.a(Uri.class, AssetFileDescriptor.class)); } } /* compiled from: StringLoader */ public static class b implements o<String, ParcelFileDescriptor> { public n<String, ParcelFileDescriptor> a(r rVar) { return new u(rVar.a(Uri.class, ParcelFileDescriptor.class)); } } /* compiled from: StringLoader */ public static class c implements o<String, InputStream> { public n<String, InputStream> a(r rVar) { return new u(rVar.a(Uri.class, InputStream.class)); } } public u(n<Uri, Data> nVar) { this.a = nVar; } public n.a a(Object obj, int i2, int i3, g gVar) { Uri uri; String str = (String) obj; if (TextUtils.isEmpty(str)) { uri = null; } else if (str.charAt(0) == '/') { uri = Uri.fromFile(new File(str)); } else { Uri parse = Uri.parse(str); uri = parse.getScheme() == null ? Uri.fromFile(new File(str)) : parse; } if (uri == null || !this.a.a(uri)) { return null; } return this.a.a(uri, i2, i3, gVar); } public boolean a(Object obj) { String str = (String) obj; return true; } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
a9568cd1177f7096c116d0cd442c6785d1459e6f
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/46/org/apache/commons/lang/builder/EqualsBuilder_setEquals_844.java
515e4b8d6a86577a829fc69dff7fc796320747e4
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,132
java
org apach common lang builder assist implement link object equal object method method build good equal method rule laid href http java sun doc book effect index html effect java joshua bloch rule compar code doubl code code float code arrai tricki make code equal code code hash code hashcod code consist difficult object compar equal gener hash code object hash code equal relev field includ calcul equal deriv field field gener hash code equal method vice versa typic code pre equal object obj obj obj obj class getclass class getclass class myclass rh class myclass obj equal builder equalsbuild append super appendsup equal obj append field1 rh field1 append field2 rh field2 append field3 rh field3 equal isequ pre altern method reflect determin field test field method code reflect equal reflectionequ code code access object accessibleobject set access setaccess code chang visibl field fail secur manag permiss set correctli slower test explicitli typic invoc method pre equal object obj equal builder equalsbuild reflect equal reflectionequ obj pre author href mailto steve downei netfolio steve downei author stephen colebourn author gari gregori author pete gieser author arun mammen thoma version equal builder equalsbuild set code equal isequ code param equal isequ set set equal setequ equal isequ equal isequ equal isequ
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
5e7d28527e29066f8d5574d94b7fcdd911d6b67d
07ac433d94ef68715b5f18b834ac4dc8bb5b8261
/benchmarks/ModDiff/Eq/Add/oldV.java
6abdb3fac61767b4ffe884efea0e3bc96b58c810
[ "MIT" ]
permissive
shrBadihi/ARDiff_Equiv_Checking
a54fb2908303b14a5a1f2a32b69841b213b2c999
e8396ae4af2b1eda483cb316c51cd76949cd0ffc
refs/heads/master
2023-04-03T08:40:07.919031
2021-02-05T04:44:34
2021-02-05T04:44:34
266,228,060
4
4
MIT
2020-11-26T01:34:08
2020-05-22T23:39:32
Java
UTF-8
Java
false
false
157
java
package demo.benchmarks.ModDiffEq.Add; public class oldV { public static double snippet(int a, int b) { int c = a + b; return c; } }
[ "shr.badihi@gmail.com" ]
shr.badihi@gmail.com
4b4c7ab551270cafa4de37b6b50571145b5a955c
6c7510ea9afc8b4367197a4772c21f9465e9625a
/javaBasic/src/尚硅谷/java基础/day06_day18/day10/com/atguigu/exer1/TriAngleTest.java
0bc6e0ba8999b841fb85516b28e2e8719bc91853
[]
no_license
17551085204/javaStudy
4afa9bfe131a7996e19f93c1c97961c5bf863a2e
52e230f043c9fa2655f03a17ca23dd27deab86e5
refs/heads/main
2023-03-04T21:03:19.329229
2021-02-07T01:00:36
2021-02-07T01:00:36
315,607,992
0
0
null
null
null
null
UTF-8
Java
false
false
499
java
package 尚硅谷.java基础.day06_day18.day10.com.atguigu.exer1; public class TriAngleTest { public static void main(String[] args) { TriAngle t1 = new TriAngle(); t1.setBase(2.0); t1.setHeight(2.4); // t1.base = 2.5;//The field TriAngle.base is not visible // t1.height = 4.3; System.out.println("base : " + t1.getBase() + ",height : " + t1.getHeight()); TriAngle t2 = new TriAngle(5.1,5.6); System.out.println("base : " + t2.getBase() + ",height : " + t2.getHeight()); } }
[ "2890241339@qq.com" ]
2890241339@qq.com
e5416700a4163541312bccf5581e48ebdbd9ddee
b16bf07904756e3d79ce706537aa940cb5c2b432
/SpringBoot-17JPA/src/main/java/gjb/jpa/pojo/Menus.java
2781b45b0192112f665fd46c7f49171f61729c45
[]
no_license
G631233828/SpringBoot
906462ddcfb206e44ee560940b2dcc66bf757989
14f7f729e7c8489e3232ae2ba10a5bf840e75c32
refs/heads/master
2020-05-17T18:28:14.558074
2019-07-16T06:52:43
2019-07-16T06:52:43
140,913,461
0
0
null
null
null
null
UTF-8
Java
false
false
1,168
java
package gjb.jpa.pojo; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; @Entity @Getter @Setter @NoArgsConstructor @AllArgsConstructor @ToString @Table(name = "menus") public class Menus { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "menusId") private Integer menusId; @Column(name = "menusName") private String menusName; @Column(name = "menusUrl") private String menusUrl; @Column(name = "fatherId") private Integer fatherId; //CascadeType.PERSIST 级联添加 //fetch = FetchType.LAZY 延迟加载 //fetch = FetchType.EAGER立即加载 @ManyToMany(mappedBy="menu",cascade=CascadeType.PERSIST,fetch = FetchType.EAGER) private Set<Roles> role = new HashSet<>(); }
[ "631233828@qq.com" ]
631233828@qq.com
53408b947ae6654b7b58b02395ba4209dda0a167
89bac37e80efef6f1dcd859c9b7b154a010ef9b5
/src/main/java/edu/oca/java/se8/certification/_1Z0_808/chapter4/_protected/pond/swan/Swan.java
d91620f5029c66071e0b12cec7f10d861550de0c
[]
no_license
Fox-McCloud-MX/OCA-Java-SE8-Certification
33ed3d116b3cb65fcf0b3c53ef052eeb24c4dad0
cf3e9698f7d98be7ca1d656c975acf31631191b8
refs/heads/master
2021-05-18T04:48:07.796653
2019-08-29T05:55:18
2019-08-29T05:55:18
251,108,010
0
0
null
null
null
null
UTF-8
Java
false
false
826
java
package edu.oca.java.se8.certification._1Z0_808.chapter4._protected.pond.swan; import edu.oca.java.se8.certification._1Z0_808.chapter4._protected.pond.shore.Bird; // in different package than Bird public class Swan extends Bird { // but subclass of bird public void swim() { floatInWater(); // package access to superclass System.out.println(text); // package access to superclass } public void helpOtherSwanSwim() { Swan other = new Swan(); other.floatInWater(); // package access to superclass System.out.println(other.text);// package access to superclass } public void helpOtherBirdSwim() { Bird other = new Bird(); //other.floatInWater(); // DOES NOT COMPILE //System.out.println(other.text); // DOES NOT COMPILE } }
[ "kdsfoxy@gmail.com" ]
kdsfoxy@gmail.com
40b27f6571ab406f87af13bae7c0be5337e69b73
5a01335f0076ac048c558d60bc20acedf1390cdd
/collect-server/src/main/java/org/openforis/collect/designer/form/validator/TaxonAttributeDefinitionFormValidator.java
70c30fd3f7da1c56a3a7555417ed6e7681e11255
[]
no_license
Arbonaut/collect
c2fb05e8cf1e3c6ee8256a264c1e80157e5708da
989ee98fbe4d6db95eec003c042d76c7b6f08735
refs/heads/master
2021-01-18T12:26:40.178158
2013-05-14T19:28:58
2013-05-14T19:28:58
2,926,313
1
0
null
null
null
null
UTF-8
Java
false
false
438
java
package org.openforis.collect.designer.form.validator; import org.zkoss.bind.ValidationContext; /** * * @author S. Ricci * */ public class TaxonAttributeDefinitionFormValidator extends AttributeDefinitionFormValidator { protected static final String TAXONOMY_FIELD = "taxonomy"; @Override protected void internalValidate(ValidationContext ctx) { super.internalValidate(ctx); validateRequired(ctx, TAXONOMY_FIELD); } }
[ "stefano.ricci@fao.org" ]
stefano.ricci@fao.org
1fe06608237054cce57f55a5a8d7d791b4039c11
6b0dcff85194eddf0706e867162526b972b441eb
/kernel/api/fabric3-model/src/main/java/org/fabric3/model/type/component/Multiplicity.java
183c7a40f24ce13840bf00a79bbbbce58ada6f86
[]
no_license
jbaeck/fabric3-core
802ae3889169d7cc5c2f3e2704cfe3338931ec76
55aaa7b2228c9bf2c2630cc196938d48a71274ff
refs/heads/master
2021-01-18T15:27:25.959653
2012-11-04T00:36:36
2012-11-04T00:36:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,672
java
/* * Fabric3 * Copyright (c) 2009-2012 Metaform Systems * * Fabric3 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the * GNU General Public License along with Fabric3. * If not, see <http://www.gnu.org/licenses/>. * * ---------------------------------------------------- * * Portions originally based on Apache Tuscany 2007 * licensed under the Apache 2.0 license. * */ package org.fabric3.model.type.component; /** * Enumeration for multiplicity. */ public enum Multiplicity { /** * Indicates a relationship that is optionally connected to the requestor and which, if supplied, must be connected to exactly one provider. */ ZERO_ONE("0..1"), /** * Indicates a relationship that must be connected between exactly one requestor and exactly one provider. */ ONE_ONE("1..1"), /** * Indicates a relationship that is optionally connects the requestor to zero to unbounded providers. */ ZERO_N("0..n"), /** * Indicates a relationship that must be connected at the requestor and which connects it to zero to unbounded providers. */ ONE_N("1..n"); private final String text; Multiplicity(String value) { this.text = value; } /** * Returns the textual form of Multiplicity as defined by the Assembly spec. * * @return the textual form of Multiplicity as defined by the Assembly spec */ public String toString() { return text; } /** * Parse the text form as defined by the Assembly spec. * * @param text multiplicity value as text as described by the Assembly spec; may be null * @return the value corresponding to the text, or null if text is null * @throws IllegalArgumentException if the text is not a valid value */ public static Multiplicity fromString(String text) throws IllegalArgumentException { if (text == null) { return null; } for (Multiplicity multiplicity : Multiplicity.values()) { if (multiplicity.text.equals(text)) { return multiplicity; } } throw new IllegalArgumentException(text); } }
[ "jim.marino@gmail.com" ]
jim.marino@gmail.com
5a3b1916c5ea51492474e070eded89a631b23979
da66bf4cfc8c1db58f624426eee967cedbffc14e
/src/main/java/com/friday/colini/attach/utils/ApplicationContextProvider.java
46042e29bb8316809f9308ba7efb271a500f90fb
[]
no_license
team-friday/friday_colini_attach_api
9689eb85455077f9824479673984e52f018c06b0
c1267ac23ff54d94aea64ff1eb0348446513c1a7
refs/heads/master
2020-05-18T22:45:11.191181
2019-05-23T04:13:06
2019-05-24T13:19:39
184,697,442
2
1
null
2019-05-24T13:19:41
2019-05-03T04:15:21
Java
UTF-8
Java
false
false
705
java
package com.friday.colini.attach.utils; import lombok.AccessLevel; import lombok.Getter; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.lang.NonNull; import org.springframework.stereotype.Component; @Component class ApplicationContextProvider implements ApplicationContextAware { @Getter(AccessLevel.PACKAGE) private static ApplicationContext context; // // // @Override public void setApplicationContext(@NonNull final ApplicationContext applicationContext) throws BeansException { context = applicationContext; } }
[ "jaeyeonling@gmail.com" ]
jaeyeonling@gmail.com
3c1c550492ea30abd15891357a33e8c9c6acdb03
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2012-05-19/seasar2-2.4.46/seasar2/s2-extension/src/main/java/org/seasar/extension/jdbc/types/BinaryType.java
7d3717ff1652c41753ff3dc12b1f333746d163f2
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
3,950
java
/* * Copyright 2004-2012 the Seasar Foundation and the Others. * * 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.seasar.extension.jdbc.types; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.sql.Blob; import java.sql.CallableStatement; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import org.seasar.extension.jdbc.ValueType; import org.seasar.extension.jdbc.util.BindVariableUtil; /** * Binary用の {@link ValueType}です。 * * @author higa * */ public class BinaryType extends AbstractValueType { /** * インスタンスを構築します。 */ public BinaryType() { super(Types.BINARY); } public Object getValue(ResultSet resultSet, int index) throws SQLException { try { return toByteArray(resultSet.getBlob(index)); } catch (SQLException e) { return resultSet.getBytes(index); } } public Object getValue(ResultSet resultSet, String columnName) throws SQLException { try { return toByteArray(resultSet.getBlob(columnName)); } catch (SQLException e) { return resultSet.getBytes(columnName); } } public Object getValue(CallableStatement cs, int index) throws SQLException { try { return toByteArray(cs.getBlob(index)); } catch (SQLException e) { return cs.getBytes(index); } } public Object getValue(CallableStatement cs, String parameterName) throws SQLException { try { return toByteArray(cs.getBlob(parameterName)); } catch (SQLException e) { return cs.getBytes(parameterName); } } private byte[] toByteArray(Blob blob) throws SQLException { if (blob == null) { return null; } long l = blob.length(); if (Integer.MAX_VALUE < l) { throw new ArrayIndexOutOfBoundsException(); } return blob.getBytes(1, (int) l); } public void bindValue(PreparedStatement ps, int index, Object value) throws SQLException { if (value == null) { setNull(ps, index); } else if (value instanceof byte[]) { byte[] ba = (byte[]) value; InputStream in = new ByteArrayInputStream(ba); ps.setBinaryStream(index, in, ba.length); } else { ps.setObject(index, value); } } public void bindValue(CallableStatement cs, String parameterName, Object value) throws SQLException { if (value == null) { setNull(cs, parameterName); } else if (value instanceof byte[]) { byte[] ba = (byte[]) value; InputStream in = new ByteArrayInputStream(ba); cs.setBinaryStream(parameterName, in, ba.length); } else { cs.setObject(parameterName, value); } } public String toText(Object value) { if (value == null) { return BindVariableUtil.nullText(); } else if (value instanceof byte[]) { return BindVariableUtil.toText((byte[]) value); } return BindVariableUtil.toText(value); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
a59a70fbbdae9c68df9226326895d88bef21ef49
3ced8b1e83c2bd8dbb137668c0cceb6ac2486c45
/cronet-api/src/main/java/org/chromium/net/ICronetEngineBuilder.java
9106507abe4000601235655fe925163082fc636e
[ "BSD-3-Clause" ]
permissive
lizhangqu/cronet
1840f011047c5d25e286af873dce2d2cf9df5302
fdc8686a8b5ecf7a0d96ddebd74cc72847d70313
refs/heads/master
2022-03-03T01:05:57.680831
2019-11-23T05:43:17
2019-11-23T05:43:17
93,995,106
129
24
null
null
null
null
UTF-8
Java
false
false
2,529
java
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.net; import java.util.Date; import java.util.Set; /** * Defines methods that the actual implementation of {@link CronetEngine.Builder} has to implement. * {@code CronetEngine.Builder} uses this interface to delegate the calls. * For the documentation of individual methods, please see the identically named methods in * {@link org.chromium.net.CronetEngine.Builder} and * {@link org.chromium.net.ExperimentalCronetEngine.Builder}. * * {@hide internal class} */ public abstract class ICronetEngineBuilder { // Public API methods. public abstract ICronetEngineBuilder addPublicKeyPins(String hostName, Set<byte[]> pinsSha256, boolean includeSubdomains, Date expirationDate); public abstract ICronetEngineBuilder addQuicHint(String host, int port, int alternatePort); public abstract ICronetEngineBuilder enableHttp2(boolean value); public abstract ICronetEngineBuilder enableHttpCache(int cacheMode, long maxSize); public abstract ICronetEngineBuilder enablePublicKeyPinningBypassForLocalTrustAnchors( boolean value); public abstract ICronetEngineBuilder enableQuic(boolean value); public abstract ICronetEngineBuilder enableSdch(boolean value); public ICronetEngineBuilder enableBrotli(boolean value) { // Do nothing for older implementations. return this; } public abstract ICronetEngineBuilder setExperimentalOptions(String options); public abstract ICronetEngineBuilder setLibraryLoader( CronetEngine.Builder.LibraryLoader loader); public abstract ICronetEngineBuilder setStoragePath(String value); public abstract ICronetEngineBuilder setUserAgent(String userAgent); public abstract String getDefaultUserAgent(); public abstract ExperimentalCronetEngine build(); // Experimental API methods. // // Note: all experimental API methods should have default implementation. This will allow // removing the experimental methods from the implementation layer without breaking // the client. public ICronetEngineBuilder enableNetworkQualityEstimator(boolean value) { return this; } public ICronetEngineBuilder setThreadPriority(int priority) { return this; } public ICronetEngineBuilder setHostResolver(HostResolver hostResolver) { return this; } }
[ "lizhangqu@weidian.com" ]
lizhangqu@weidian.com
b50f49a0485e4fd0e2b740342adae1ac81bcb652
fd1b449af20b5c0b26dc7adbd73f6d5f8f81dd2d
/app/src/main/java/com/android/camera/one/v2/camera2proxy/AndroidImageReaderProxy.java
9f7917aa584ebcab463b0fb3868439a53ba48775
[]
no_license
yuchuangu85/Camera2-mx
aa753e1e030f7c582f84fc9ef48668fa33c14115
a0e88314e052a3dd084ec0cfc04a621ffbc4f912
refs/heads/master
2020-04-15T17:50:14.487603
2019-01-19T16:41:45
2019-01-19T16:41:45
164,889,746
7
0
null
null
null
null
UTF-8
Java
false
false
4,739
java
/* * Copyright (C) 2015 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.camera.one.v2.camera2proxy; import android.graphics.ImageFormat; import android.media.Image; import android.os.Handler; import android.view.Surface; import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; /** * A replacement for {@link android.media.ImageReader}. */ public final class AndroidImageReaderProxy implements ImageReaderProxy { private final Object mLock; @GuardedBy("mLock") private final android.media.ImageReader mDelegate; public AndroidImageReaderProxy(android.media.ImageReader delegate) { mLock = new Object(); mDelegate = delegate; } /** * @See {@link android.media.ImageReader} */ public static ImageReaderProxy newInstance(int width, int height, int format, int maxImages) { return new AndroidImageReaderProxy(android.media.ImageReader.newInstance(width, height, format, maxImages)); } private static String imageFormatToString(int imageFormat) { switch (imageFormat) { case ImageFormat.JPEG: return "JPEG"; case ImageFormat.NV16: return "NV16"; case ImageFormat.NV21: return "NV21"; case ImageFormat.RAW10: return "RAW10"; case ImageFormat.RAW_SENSOR: return "RAW_SENSOR"; case ImageFormat.RGB_565: return "RGB_565"; case ImageFormat.UNKNOWN: return "UNKNOWN"; case ImageFormat.YUV_420_888: return "YUV_420_888"; case ImageFormat.YUY2: return "YUY2"; case ImageFormat.YV12: return "YV12"; } return Integer.toString(imageFormat); } @Override public int getWidth() { synchronized (mLock) { return mDelegate.getWidth(); } } @Override public int getHeight() { synchronized (mLock) { return mDelegate.getHeight(); } } @Override public int getImageFormat() { synchronized (mLock) { return mDelegate.getImageFormat(); } } @Override public int getMaxImages() { synchronized (mLock) { return mDelegate.getMaxImages(); } } @Override @Nonnull public Surface getSurface() { synchronized (mLock) { return mDelegate.getSurface(); } } @Override @Nullable public ImageProxy acquireLatestImage() { synchronized (mLock) { Image image = mDelegate.acquireLatestImage(); if (image == null) { return null; } else { return new AndroidImageProxy(image); } } } @Override @Nullable public ImageProxy acquireNextImage() { synchronized (mLock) { Image image = mDelegate.acquireNextImage(); if (image == null) { return null; } else { return new AndroidImageProxy(image); } } } @Override public void setOnImageAvailableListener(@Nonnull final ImageReaderProxy.OnImageAvailableListener listener, Handler handler) { synchronized (mLock) { mDelegate.setOnImageAvailableListener( new android.media.ImageReader.OnImageAvailableListener() { @Override public void onImageAvailable(android.media.ImageReader imageReader) { listener.onImageAvailable(); } }, handler); } } @Override public void close() { synchronized (mLock) { mDelegate.close(); } } @Override public String toString() { return "width " + getWidth() + ",height " + getHeight() + ",format " + imageFormatToString(getImageFormat()); } }
[ "yuchuangu85@gmail.com" ]
yuchuangu85@gmail.com
89cabb9d6718e94fd8fbf2580930572c6e4a2fee
8906beb68b41f872dda02e20a994eaca2e0168a4
/web/support/src/test/java/org/yes/cart/cluster/service/impl/WsCacheDirectorImplTest.java
6242220284d96347be878b0a82294471db9d85bf
[]
no_license
4val0v/yes-cart
9dd518201fe97a35aae8d4b9d5279d29ccb8f99a
95ccea11ec79357f259b3e226a5503f87abef05e
refs/heads/master
2021-04-06T19:49:59.726173
2018-03-14T18:02:43
2018-03-14T18:02:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,185
java
/* * Copyright 2013 Denys Pavlov, Igor Azarnyi * * 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.yes.cart.cluster.service.impl; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.CacheManager; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.yes.cart.cluster.service.CacheDirector; import org.yes.cart.domain.dto.impl.CacheInfoDTOImpl; import org.yes.cart.domain.misc.Pair; import javax.naming.NamingException; import java.util.List; import java.util.Map; import java.util.Set; import static org.junit.Assert.*; /** * User: Igor Azarny iazarny@yahoo.com * Date: 8/19/13 * Time: 4:16 PM */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:testApplicationContext.xml") public class WsCacheDirectorImplTest { @Autowired private ApplicationContext context; private WsCacheDirectorImpl cacheDirector; @Before public void setUp() throws NamingException { cacheDirector = new WsCacheDirectorImpl(); cacheDirector.setEntityOperationCache((Map<String, Map<String, Set<Pair<String,String>>>>) context.getBean("evictionConfig")); cacheDirector.setCacheManager((CacheManager) context.getBean("cacheManager")); } @Test public void testResolveCacheNames() throws Exception { Set<Pair<String,String>> caches = cacheDirector.resolveCacheNames(CacheDirector.EntityOperation.CREATE, "AttributeEntity"); assertEquals(15, caches.size()); assertTrue(caches.contains(new Pair("attributeService-availableAttributesByProductTypeId", "all"))); assertTrue(caches.contains(new Pair("attributeService-availableImageAttributesByGroupCode", "all"))); assertTrue(caches.contains(new Pair("attributeService-availableAttributesByGroupCodeStartsWith", "all"))); assertTrue(caches.contains(new Pair("attributeService-byAttributeCode", "all"))); assertTrue(caches.contains(new Pair("attributeService-allAttributeCodes", "all"))); assertTrue(caches.contains(new Pair("attributeService-allNavigatableAttributeCodes", "all"))); assertTrue(caches.contains(new Pair("attributeService-allSearchableAttributeCodes", "all"))); assertTrue(caches.contains(new Pair("attributeService-allSearchablePrimaryAttributeCodes", "all"))); assertTrue(caches.contains(new Pair("attributeService-allStorableAttributeCodes", "all"))); assertTrue(caches.contains(new Pair("attributeService-singleNavigatableAttributeCodesByProductType", "all"))); assertTrue(caches.contains(new Pair("attributeService-navigatableAttributeDisplayValue", "all"))); assertTrue(caches.contains(new Pair("attributeService-allAttributeNames", "all"))); assertTrue(caches.contains(new Pair("attributeService-attributeNamesByCodes", "all"))); assertTrue(caches.contains(new Pair("breadCrumbBuilder-breadCrumbs", "all"))); assertTrue(caches.contains(new Pair("filteredNavigationSupport-attributeFilteredNavigationRecords", "all"))); caches = cacheDirector.resolveCacheNames(CacheDirector.EntityOperation.CREATE, "unknownEntity"); assertNull(caches); caches = cacheDirector.resolveCacheNames("unkbnownOperation", "ProductEntity"); assertNull(caches); } @Test public void testGetCacheInfo() { cacheDirector.getCacheManager().getCache("attributeService-availableAttributesByProductTypeId").put("hi", "there"); List<CacheInfoDTOImpl> rez = cacheDirector.getCacheInfo(); for (CacheInfoDTOImpl cacheInfoDTO : rez) { if (cacheInfoDTO.getCacheName().equals("attributeService-availableAttributesByProductTypeId")){ assertEquals(1, cacheInfoDTO.getInMemorySize()); } } cacheDirector.getCacheManager().getCache("attributeService-availableAttributesByProductTypeId").clear(); } @Test public void testAllEvictCache() { List<CacheInfoDTOImpl> rez; rez = cacheDirector.getCacheInfo(); for (CacheInfoDTOImpl cacheInfoDTO : rez) { cacheDirector.getCacheManager().getCache(cacheInfoDTO.getCacheName()).put("hi", "there"); } rez = cacheDirector.getCacheInfo(); for (CacheInfoDTOImpl cacheInfoDTO : rez) { assertTrue(cacheInfoDTO.getCacheSize() > 0); } cacheDirector.evictAllCache(false); rez = cacheDirector.getCacheInfo(); for (CacheInfoDTOImpl cacheInfoDTO : rez) { if (cacheDirector.getSkipEvictAll().contains(cacheInfoDTO.getCacheName())) { assertTrue(cacheInfoDTO.getCacheSize() > 0); } else { assertEquals(0, cacheInfoDTO.getCacheSize()); } } cacheDirector.evictAllCache(true); rez = cacheDirector.getCacheInfo(); for (CacheInfoDTOImpl cacheInfoDTO : rez) { assertEquals(0, cacheInfoDTO.getCacheSize()); } } @Test public void testEvictCache() { List<CacheInfoDTOImpl> rez; rez = cacheDirector.getCacheInfo(); final String first = rez.get(0).getCacheName(); cacheDirector.getCacheManager().getCache(first).put("hi", "there"); rez = cacheDirector.getCacheInfo(); for (CacheInfoDTOImpl cacheInfoDTO : rez) { if (cacheInfoDTO.getCacheName().equals(first)) { assertTrue(cacheInfoDTO.getCacheSize() > 0); } } cacheDirector.evictCache(first); rez = cacheDirector.getCacheInfo(); for (CacheInfoDTOImpl cacheInfoDTO : rez) { if (cacheInfoDTO.getCacheName().equals(first)) { assertEquals(0, cacheInfoDTO.getCacheSize()); } } } @Test public void testOnCacheableChange() { cacheDirector.getCacheManager().getCache("attributeService-availableAttributesByProductTypeId").put("hi", "there"); cacheDirector.getCacheManager().getCache("categoryService-categoryHasSubcategory").put("hi", "there"); cacheDirector.onCacheableChange(CacheDirector.EntityOperation.UPDATE, "AttributeEntity", 123L); assertNull(cacheDirector.getCacheManager().getCache("attributeService-availableAttributesByProductTypeId").get("hi")); assertNotNull(cacheDirector.getCacheManager().getCache("categoryService-categoryHasSubcategory").get("hi")); } }
[ "denis.v.pavlov@gmail.com" ]
denis.v.pavlov@gmail.com
e79750c1bd345a1ed8279f6ceb6451b18df32946
2562de77b4203cda3d06bcaa7d60c5a8a7d97e0a
/src/main/java/com/softwareverde/bitcoin/server/module/explorer/api/endpoint/BlockchainApi.java
b4e04ca1372a7b82c621313bebcb7909e118c2e9
[ "MIT" ]
permissive
dennischiume/bitcoin-verde
0a691c25eacf5aea458153638db00b397629cc87
90178f6ec2ef2913f0bdaa64110e5cf55efee6e7
refs/heads/master
2020-05-17T02:55:16.715675
2019-01-15T03:48:21
2019-01-15T03:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,613
java
package com.softwareverde.bitcoin.server.module.explorer.api.endpoint; import com.softwareverde.bitcoin.server.Configuration; import com.softwareverde.bitcoin.server.module.explorer.api.ApiResult; import com.softwareverde.json.Json; import com.softwareverde.servlet.GetParameters; import com.softwareverde.servlet.PostParameters; import com.softwareverde.servlet.request.Request; import com.softwareverde.servlet.response.JsonResponse; import com.softwareverde.servlet.response.Response; import com.softwareverde.socket.SocketConnection; import static com.softwareverde.servlet.response.Response.ResponseCodes; public class BlockchainApi extends ExplorerApiEndpoint { public static final Long RPC_DURATION_TIMEOUT_MS = 30000L; private static class BlockchainResult extends ApiResult { private Json _blockchainJson = new Json(); public void setBlockchainMetadataJson(final Json blockchainJson) { _blockchainJson = blockchainJson; } @Override public Json toJson() { final Json json = super.toJson(); json.put("blockchainMetadata", _blockchainJson); return json; } } public BlockchainApi(final Configuration.ExplorerProperties explorerProperties) { super(explorerProperties); } @Override protected Response _onRequest(final Request request) { final GetParameters getParameters = request.getGetParameters(); final PostParameters postParameters = request.getPostParameters(); { // GET BLOCKCHAIN TREE // Requires GET: // Requires POST: try (final SocketConnection socketConnection = _newRpcConnection()) { if (socketConnection == null) { final BlockchainResult result = new BlockchainResult(); result.setWasSuccess(false); return new JsonResponse(ResponseCodes.SERVER_ERROR, result); } final Json blockchainJson; { final Json rpcRequestJson = new Json(); { final Json rpcParametersJson = new Json(); rpcRequestJson.put("method", "GET"); rpcRequestJson.put("query", "BLOCKCHAIN"); rpcRequestJson.put("parameters", rpcParametersJson); } socketConnection.write(rpcRequestJson.toString()); final String rpcResponseString = socketConnection.waitForMessage(RPC_DURATION_TIMEOUT_MS); if (rpcResponseString == null) { return new JsonResponse(Response.ResponseCodes.SERVER_ERROR, new ApiResult(false, "Request timed out.")); } final Json rpcResponseJson = Json.parse(rpcResponseString); if (! rpcResponseJson.getBoolean("wasSuccess")) { final String errorMessage = rpcRequestJson.getString("errorMessage"); return new JsonResponse(Response.ResponseCodes.SERVER_ERROR, new ApiResult(false, errorMessage)); } blockchainJson = rpcResponseJson.get("blockchainMetadata"); } final BlockchainResult blockchainResult = new BlockchainResult(); blockchainResult.setWasSuccess(true); blockchainResult.setBlockchainMetadataJson(blockchainJson); return new JsonResponse(ResponseCodes.OK, blockchainResult); } } } }
[ "josh@softwareverde.com" ]
josh@softwareverde.com
91d221735cba15e80de8419a0b6a6826aebbe96c
50e54eed65d8d700da9b202dff74f730400920b5
/locationmanager/src/main/java/com/yayandroid/locationmanager/providers/dialogprovider/SimpleMessageDialogProvider.java
e1bda88644b7bbe0b3f7c18cc684912dcaa4aed8
[ "MIT" ]
permissive
Aviatoryona/FestaAndroid
2963eda3a570d0c12de586a5fbf7554ddd1d1cd9
9665fec7ab804caabb68881f7096763b2552dece
refs/heads/main
2023-01-07T20:04:35.932545
2020-11-05T06:29:47
2020-11-05T06:29:47
310,209,127
0
0
null
null
null
null
UTF-8
Java
false
false
1,370
java
package com.yayandroid.locationmanager.providers.dialogprovider; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; public class SimpleMessageDialogProvider extends DialogProvider implements DialogInterface.OnClickListener { private String message; public SimpleMessageDialogProvider(String message) { this.message = message; } public String message() { return message; } @Override public Dialog getDialog(@NonNull Context context) { return new AlertDialog.Builder(context) .setMessage(message) .setCancelable(false) .setPositiveButton(android.R.string.ok, this) .setNegativeButton(android.R.string.cancel, this) .create(); } @Override public void onClick(DialogInterface dialog, int which) { switch (which) { case DialogInterface.BUTTON_POSITIVE: { if (getDialogListener() != null) getDialogListener().onPositiveButtonClick(); break; } case DialogInterface.BUTTON_NEGATIVE: { if (getDialogListener() != null) getDialogListener().onNegativeButtonClick(); break; } } } }
[ "aviatoryona67@gmail.com" ]
aviatoryona67@gmail.com
c91ded99e0575d16f234b3400b8b2ee6f3742621
38867fe42125d3bff46eaed03c6ab140849923e3
/src/main/java/com/insights/monitoring/demo/config/LoggingAspectConfiguration.java
0bcaa2103c9535285ac45b33e8a709a976d9b663
[]
no_license
rkshnikhil/spring-boot-monitoring-app
8593708be2ea52d5b381439061fa9a0af0f5e94f
605f7982b634225cca97f0da22c9085ed706c4f6
refs/heads/master
2021-06-24T01:49:51.161515
2019-11-24T20:24:29
2019-11-24T20:24:29
223,792,372
0
0
null
2021-04-29T21:53:14
2019-11-24T18:42:44
Java
UTF-8
Java
false
false
518
java
package com.insights.monitoring.demo.config; import com.insights.monitoring.demo.aop.logging.LoggingAspect; import io.github.jhipster.config.JHipsterConstants; import org.springframework.context.annotation.*; import org.springframework.core.env.Environment; @Configuration @EnableAspectJAutoProxy public class LoggingAspectConfiguration { @Bean @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) public LoggingAspect loggingAspect(Environment env) { return new LoggingAspect(env); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
6179f32bc0ee84cda239d8b59ddd14ea7cc2444e
07bd89d994da04a94c84db8997a67ae118af7830
/LightingSalesSystem/SalesSystemClient/src/ui/approveBillUi/ApproveSalesBillUiController.java
591175f990afc7287df2ae9a15b371e05d28045b
[]
no_license
pilibb0712/myHomework
61e48163972b0ca0c42c736636c46b07492c40da
5d013e35ee930f730418cad0a9af4cc3bf9ba0a2
refs/heads/master
2023-08-24T09:41:17.561232
2019-11-30T05:18:26
2019-11-30T05:18:26
null
0
0
null
null
null
null
GB18030
Java
false
false
7,842
java
package ui.approveBillUi; import java.rmi.RemoteException; import java.util.ArrayList; import java.util.Optional; import assistant.type.BillStateEnum; import assistant.utility.Date; import blService.billService.approveBillBlService.ApproveSalesBillBlService; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleStringProperty; import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.geometry.Pos; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Button; import javafx.scene.control.ButtonType; import javafx.scene.control.CheckBox; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import rmi.remoteHelper.RemoteHelperFactory; import ui.billUi.viewBillUi.ViewSalesmanBillsUiStarter; import vo.BillVO; import vo.SalesBillVO; import vo.UserInfoVO; public class ApproveSalesBillUiController { private static final String DEFAULT_APPROVER_COMENT = "总经理不想理你,并甩给你一张单据"; private ObservableList<SalesBillVO> bills = FXCollections.observableArrayList(); private UserInfoVO user; private ApproveSalesBillBlService service = RemoteHelperFactory.getApproveBillRemoteHelper().getApproveSalesBillBlService(); /** * 界面bottom部分 * 通过审批按钮 * 拒绝审批按钮 * */ @FXML private Button passButton; @FXML private Button denyButton; /** * 界面center部分 * 单据信息tableview * */ @FXML private TableView<SalesBillVO> billTableView; @FXML private TableColumn<SalesBillVO, String> billIdColumn; @FXML private TableColumn<SalesBillVO, String> billCreateDateColumn; @FXML private TableColumn<SalesBillVO, String> billCreaterColumn; @FXML private TableColumn<SalesBillVO, Button> viewBillColumn; @FXML private TableColumn<SalesBillVO, CheckBox> chooseBillColumn; @FXML private TableColumn<SalesBillVO,Button> remarkTableColumn; @FXML private TableColumn<SalesBillVO, Button> assignTableColumn; private void initTableView(){ setBillIdColumn(); setBillCreateDateColumn(); setBillCreaterColumn(); setViewBillColumn(); setChooseBillColumn(); setRemarkTableColumn(); setAssignTableColumn(); billTableView.setItems(bills); } private void setBillIdColumn(){ billIdColumn.setCellValueFactory(cellDataFeatures->{ BillVO bill = cellDataFeatures.getValue(); ObservableValue<String> billId = new SimpleStringProperty(bill.getId()); return billId; }); } private void setBillCreateDateColumn(){ billCreateDateColumn.setCellValueFactory(cellDataFeatures->{ BillVO bill = cellDataFeatures.getValue(); Date date = bill.getCreateDate(); ObservableValue<String> dateString = new SimpleStringProperty(date.getYMDDate()); return dateString; }); } private void setBillCreaterColumn(){ billCreaterColumn.setCellValueFactory(cellDataFeatures->{ BillVO bill = cellDataFeatures.getValue(); UserInfoVO user = bill.getCreater(); ObservableValue<String> userName = new SimpleStringProperty(user.getName()); return userName; }); } private void setChooseBillColumn(){ chooseBillColumn.setCellValueFactory(cellDataFeatures->{ CheckBox checkBox = new CheckBox(); checkBox.setAlignment(Pos.CENTER); checkBox.selectedProperty().addListener((x,oldValue,newValue)->{ BillVO bill = cellDataFeatures.getValue(); bill.setSelected(newValue); }); ObservableValue<CheckBox> box = new SimpleObjectProperty<CheckBox>(checkBox); return box; }); } private void setViewBillColumn(){ viewBillColumn.setCellValueFactory(cellDataFeatures->{ Button button = new Button(); button.setText("查看"); button.setAlignment(Pos.CENTER); button.setOnMouseClicked(e->{ SalesBillVO bill = (SalesBillVO)cellDataFeatures.getValue(); String billId = bill.getId(); ViewSalesmanBillsUiStarter starter = new ViewSalesmanBillsUiStarter(); starter.viewSalesBill(billId); //TODO 库存赠送单view starter }); ObservableValue<Button> btn = new SimpleObjectProperty<Button>(button); return btn; }); } private void setRemarkTableColumn(){ remarkTableColumn.setCellValueFactory(cellDataFeature->{ Button button = new Button("批注"); button.setOnMouseClicked(e->{ SalesBillVO bill = (SalesBillVO)cellDataFeature.getValue(); CommentDialog dialog = new CommentDialog(bill.getApproverComment()); String comment = dialog.showAndWait(); bill.setApproverComment(comment); }); ObservableValue<Button> btn = new SimpleObjectProperty<Button>(button); return btn; }); } private void setAssignTableColumn(){ assignTableColumn.setCellValueFactory(cellDataFeature->{ Button button = new Button("分配"); button.setOnMouseClicked(e->{ BillVO bill = cellDataFeature.getValue(); AssignUiStarter starter = new AssignUiStarter(); starter.startAndWait(bill); }); ObservableValue<Button> btn = new SimpleObjectProperty<Button>(button); return btn; }); } /** * 初始化controller * */ protected void init(UserInfoVO user){ this.user = user; initBillList(); initTableView(); initPassButton(); initDenyButton(); } private void initBillList(){ ArrayList<SalesBillVO> SalesBills = new ArrayList<>(); try { SalesBills = service.getBillsList(); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } bills.addAll(SalesBills); } private void initPassButton(){ passButton.setOnMouseClicked(e->{ Alert alert = new Alert(AlertType.CONFIRMATION,"是否决定通过选中单据的审批"); //alert.getDialogPane().getScene().getStylesheets().add(" TODO "); Optional<ButtonType> result = alert.showAndWait(); if(result.isPresent()&&result.get()==ButtonType.OK){ try{ for(int i=0;i<bills.size();i++){ SalesBillVO bill = bills.get(i); if(bill.isSelected()){ bill.setBillStateEnum(BillStateEnum.TODO); setApproveInfo(bill); service.passBill(bill); bills.remove(bill); i--; } } }catch (RemoteException e1) { // TODO: handle exception } billTableView.refresh(); } }); } private void initDenyButton(){ denyButton.setOnMouseClicked(e->{ Alert alert = new Alert(AlertType.CONFIRMATION,"是否决定不通过选中单据的审批"); //alert.getDialogPane().getScene().getStylesheets().add(" TODO "); Optional<ButtonType> result = alert.showAndWait(); if(result.isPresent()&&result.get()==ButtonType.OK){ try{ for(int i=0;i<bills.size();i++){ SalesBillVO bill = bills.get(i); if(bill.isSelected()){ bill.setBillStateEnum(BillStateEnum.DENIED); setApproveInfo(bill); service.denyBill(bill); bills.remove(bill); i--; } } }catch (RemoteException e1) { // TODO: handle exception } billTableView.refresh(); } }); } /** * 单据提交前的准备 * 设置单据执行者信息,包括审批日期,审批人,审批人备注 * @param bill要设置的bill * */ private void setApproveInfo(BillVO bill){ bill.setApproveDate(new Date()); bill.setApprover(user); if(bill.getApproverComment()==null){bill.setApproverComment(DEFAULT_APPROVER_COMENT);} //如果审批未通过,不设置执行者 if(bill.getBillStateEnum()==BillStateEnum.DENIED){return;} //如果已分配执行者,则直接返回 if(bill.getExecutor()!=null){ return; } //没有分配执行者 //如果有创建者,默认创建者执行 if((bill.getCreater())!=null){ bill.setExecutor(bill.getCreater()); } if(bill.getCreater()==null){ //bill.setExecutor(); TODO 随机人员roll点 } } }
[ "1292155474@qq.com" ]
1292155474@qq.com
5b6cc222e13748590ad45509c5f0c7d61a9599bc
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/viber/voip/notif/b/f/b/o.java
c2f5d6dc7deeb9b696777876acb55deb1ef53189
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
327
java
package com.viber.voip.notif.b.f.b; import com.viber.voip.notif.h.m; public abstract interface o { public abstract e a(m paramm); } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar * Qualified Name: com.viber.voip.notif.b.f.b.o * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
dbb3bd04adf661737423a192837ed1b055c269e3
7941d6ed6d1f87954de73876c6d70b2b4b9e8a8c
/src/PART_I_Core/Day23_stringManipulation_lab3/copy/Task85.java
fd12e465db5c179421b381288b7db2c2c86d81f8
[]
no_license
Isso-Chan/Java-b13
d91524f41788882b85b8fa7ba69b770cd0042a98
a8d3697c7b8d77aba197077880b9657190da34a0
refs/heads/master
2022-11-14T05:47:48.062951
2020-07-02T11:23:43
2020-07-02T11:23:43
276,617,741
0
0
null
null
null
null
UTF-8
Java
false
false
957
java
package PART_I_Core.Day23_stringManipulation_lab3.copy; import java.util.Random; import java.util.Scanner; public class Task85 { public static void main(String[] args) { int repeat=0; int comp=0, user=0; int diceComp, diceUser; Scanner sc=new Scanner(System.in); Random rn=new Random(); for(int i=1;i<=10;i++) { System.out.print("Dice for me--> "); diceComp=rn.nextInt(6)+1; System.out.println(diceComp); System.out.print("Dice for you--> "); diceUser=rn.nextInt(6)+1; System.out.println(diceUser); if(diceComp>diceUser) { comp=comp+1; }else if (diceUser>diceComp){ user=user+1; } } if(comp>user) { System.out.println(comp+" "+user+" Dh hah hah!! I am the grand Winner!!"); }else if (user>comp) { System.out.println(comp+" "+user+" You are the grand winner :(("); }else System.out.println("No Winner"); } }
[ "ismailozcan73@gmail.com" ]
ismailozcan73@gmail.com
2fcf25b48ecdfe0c994ef8b452d69a57d9ce879b
7033d33d0ce820499b58da1d1f86f47e311fd0e1
/me/kaimson/melonclient/utils/ShaderProgram.java
8662e091b78af68de38d49b56cdb4030c5c5dead
[ "MIT" ]
permissive
gabrielvicenteYT/melon-client-src
1d3f1f65c5a3bf1b6bc3e1cb32a05bf1dd56ee62
e0bf34546ada3afa32443dab838b8ce12ce6aaf8
refs/heads/master
2023-04-04T05:47:35.053136
2021-04-19T18:34:36
2021-04-19T18:34:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,829
java
package me.kaimson.melonclient.utils; import org.lwjgl.opengl.*; import me.kaimson.melonclient.*; import java.io.*; public class ShaderProgram { private static final ave MINECRAFT; private int program; public ShaderProgram(final String domain, final String vertShaderFilename, final String fragShaderFilename) { try { this.init(domain, vertShaderFilename, fragShaderFilename); if (this.program > 0) { GL20.glUseProgram(this.program); GL20.glUniform1i(GL20.glGetUniformLocation(this.program, "texture"), 0); GL20.glUseProgram(0); } } catch (Exception e) { Client.error("Could not initialize shader program!", e); this.program = 0; } } private void init(final String domain, final String vertShaderFilename, final String fragShaderFilename) { if (!bqs.O) { this.program = 0; return; } this.program = GL20.glCreateProgram(); final int vertShader = this.loadAndCompileShader(domain, vertShaderFilename, 35633); final int fragShader = this.loadAndCompileShader(domain, fragShaderFilename, 35632); if (vertShader != 0) { GL20.glAttachShader(this.program, vertShader); } if (fragShader != 0) { GL20.glAttachShader(this.program, fragShader); } GL20.glLinkProgram(this.program); if (GL20.glGetProgrami(this.program, 35714) == 0) { Client.error("Could not link shader: {}", GL20.glGetProgramInfoLog(this.program, 1024)); GL20.glDeleteProgram(this.program); this.program = 0; return; } GL20.glValidateProgram(this.program); if (GL20.glGetProgrami(this.program, 35715) == 0) { Client.error("Could not validate shader: {}", GL20.glGetProgramInfoLog(this.program, 1024)); GL20.glDeleteProgram(this.program); this.program = 0; } } private int loadAndCompileShader(final String domain, final String filename, final int shaderType) { if (filename == null) { return 0; } final int handle = GL20.glCreateShader(shaderType); if (handle == 0) { Client.error("Could not create shader of type {} for {}: {}", shaderType, filename, GL20.glGetProgramInfoLog(this.program, 1024)); return 0; } final String code = this.loadFile(new jy(domain, filename)); if (code == null) { GL20.glDeleteShader(handle); return 0; } GL20.glShaderSource(handle, code); GL20.glCompileShader(handle); if (GL20.glGetShaderi(handle, 35713) == 0) { Client.error("Could not compile shader {}: {}", filename, GL20.glGetShaderInfoLog(this.program, 1024)); GL20.glDeleteShader(handle); return 0; } return handle; } private String loadFile(final jy resourceLocation) { try { final StringBuilder code = new StringBuilder(); final InputStream inputStream = ShaderProgram.MINECRAFT.Q().a(resourceLocation).b(); final BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); String line; while ((line = reader.readLine()) != null) { code.append(line); code.append('\n'); } reader.close(); return code.toString(); } catch (Exception e) { Client.error("Could not load shader file!", e); return null; } } public int getProgram() { return this.program; } static { MINECRAFT = ave.A(); } }
[ "haroldthesenpai@gmail.com" ]
haroldthesenpai@gmail.com
415e7daee521fd25588bcefd353807f4aa8bfe39
7653e008384de73b57411b7748dab52b561d51e6
/SrcGame/dwo/gameserver/model/skills/base/formulas/calculations/CancelAttack.java
1f507bbaf1c13cb22bc4280a0c14dd7e9cb30571
[]
no_license
BloodyDawn/Ertheia
14520ecd79c38acf079de05c316766280ae6c0e8
d90d7f079aa370b57999d483c8309ce833ff8af0
refs/heads/master
2021-01-11T22:10:19.455110
2017-01-14T12:15:56
2017-01-14T12:15:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,161
java
package dwo.gameserver.model.skills.base.formulas.calculations; import dwo.gameserver.model.actor.L2Character; import dwo.gameserver.model.skills.stats.BaseStats; import dwo.gameserver.model.skills.stats.Stats; import dwo.gameserver.util.Rnd; /** * L2GOD Team * User: ANZO * Date: 29.09.11 * Time: 22:48 */ public class CancelAttack { /** * Формула отмены каста при атаке кастера. */ public static void calcAtkBreak(L2Character target, double dmg) { if(calc(target, dmg)) { target.breakAttack(); target.breakCast(); } } private static boolean calc(L2Character target, double dmg) { if(target.isRaid() || !target.isCastingNow()) { return false; } if(target.getFusionSkill() != null) { return true; } // 5 * 100% * dmg double chance = 500 * dmg / (target.getMaxHp() + target.getMaxCp()); // учитываем резисты chance -= BaseStats.MEN.calcBonus(target) * 100 - 100; chance = target.calcStat(Stats.ATTACK_CANCEL, chance, null, null); if(chance > 99) { chance = 99; } if(chance < 1) { chance = 1; } return Rnd.get(100) < chance; } }
[ "echipachenko@gmail.com" ]
echipachenko@gmail.com
94364e31462c24ecc858d4677ca0e04e3c36bfdb
9ac8184133b176912b5489e9fe90046404cff6a3
/a-JavaSE/b-面向对象/interface/src/Class8.java
a0c3f24d541155c7322f2538f1e219e7b7d75f66
[]
no_license
IQQcode/Code-Java
d5524151b33811d423c6f877418b948f10f10c96
96b3157c16674be50e0b8a1ea58867a3de11d930
refs/heads/master
2022-12-27T12:32:05.824182
2022-07-31T09:32:18
2022-07-31T09:32:18
159,743,511
3
0
null
null
null
null
UTF-8
Java
false
false
2,300
java
/** * 一、interface定义 *I.子类实现接口使用"implement"关键字,同时实现多个接口继承<类继承多个接口>; * ---一个接口可以使用"extends"继承多个父接口<接口普继承多个接口>; * II.子类必须覆写所有的抽象方法,子类命名使用impl结尾; * III.多个接口若有共同子类,可以通过子类进行相互转化<父接口间的相互转换> */ /* interface IMessage { public static final String MSG = "Don't lose heart,come on!"; public abstract void print(); } interface IFun { public abstract String judge(); } class MessageImpl implements IMessage,IFun { */ /** * 抽象类必须覆写父类的所有方法 *//* public void print() { System.out.println(MSG); } public String judge() { return IMessage.MSG; } } public class Class8 { public static void main(String[] args) { //抽象类要实例化子类,发生向上转型 IMessage msg = new MessageImpl(); msg.print(); */ /** * 只能使用接口中定义的 IMessage方法,IFun asm = new MessageImpl(); *//* IFun acm = (IFun) msg; //通过共同的子类MessageImpl强转,等同于 IFun acm = new MessageImpl(); System.out.println(acm.judge()); } } */ /** * 二、interface的使用 * 1.当子类既需要实现接口又需要继承抽象类时: * 先"extends"一个接口,而后"implements"多个接口; * 当父类与父接口有相同子类时,父类和父接口可以通过子类相互转换 * ---class MessageImpl extends News implements IMessage { } * * 2.抽象类可以使用 implements实现若干个接口,而接口无法继承抽象类 * * 3.接口之间可以使用 extends继承多个接口 */ /* interface A { void playA(); } interface B { void playB(); } interface C extends A,B { void playC(); } abstract class CImpl implements C {} class Test extends CImpl { @Override public void playA() { } @Override public void playB() { } @Override public void playC() { } } public class Class8 { public static void main(String[] args) { C c = new Test(); c.playC(); } } */
[ "2726109782@qq.com" ]
2726109782@qq.com
56ae0b836abd686a4f55d9539efd91e817729bd6
a840a5e110b71b728da5801f1f3e591f6128f30e
/src/main/java/com/google/security/zynamics/reil/translators/ITranslationEnvironment.java
625e6e7fbc743ab8e0fb80b0879a7a5f1f7c0637
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
tpltnt/binnavi
0a25d2fde2c6029aeef4fcfec8eead5c8e51f4b4
598c361d618b2ca964d8eb319a686846ecc43314
refs/heads/master
2022-10-20T19:38:30.080808
2022-07-20T13:01:37
2022-07-20T13:01:37
107,143,332
0
0
Apache-2.0
2023-08-20T11:22:53
2017-10-16T15:02:35
Java
UTF-8
Java
false
false
1,944
java
/* Copyright 2011-2016 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 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.google.security.zynamics.reil.translators; import com.google.security.zynamics.reil.OperandSize; /** * Interface for all translation environments that can be used to translate native instructions to * REIL instructions. */ public interface ITranslationEnvironment { /** * Returns the index of the next unused REIL register. Afterwards the index is incremented. * * @return The index of the next unused REIL register. */ int generateNextVariable(); /** * Returns the size of the standard registers of the source architecture. * * @return The size of the standard registers of the source architecture. */ OperandSize getArchitectureSize(); /** * Returns the index of the next unused REIL register. * * @return The index of the next unused REIL register. */ int getNextVariable(); /** * Returns the name of the next unused REIL register. Afterwards the index is incremented. * * @return The name of the next unused REIL register. */ String getNextVariableString(); /** * This function is called before a new native instruction is translated. * */ void nextInstruction(); /** * Sets the index of the next unused REIL register. * * @param nextVariable The index of the next unused REIL register. */ void setNextVariable(int nextVariable); }
[ "cblichmann@google.com" ]
cblichmann@google.com
fd5c620800011bf7e84010d2cf9bf3e698874c17
c16c5b4e8d302164cc527951e075d13fe6c94794
/app/src/main/java/com/appslelo/eduwiseschoolmanagment/model/User.java
028eaddbc8625becad73084484c45383a45f21d8
[]
no_license
tsfapps/TsfSchoolManagment
e18b3f206929d68792f32ef653ac2a6c3ec60de5
f8e4160048b79e114b26f580063a0140f87c6aaf
refs/heads/master
2022-09-04T14:20:53.464612
2020-05-28T12:21:50
2020-05-28T12:21:50
267,582,538
0
0
null
null
null
null
UTF-8
Java
false
false
6,408
java
package com.appslelo.eduwiseschoolmanagment.model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class User { @SerializedName("id") @Expose private String id; @SerializedName("org_id") @Expose private String orgId; @SerializedName("user_id") @Expose private String userId; @SerializedName("user_password") @Expose private String userPassword; @SerializedName("user_phone") @Expose private String userPhone; @SerializedName("user_name") @Expose private String userName; @SerializedName("user_email") @Expose private String userEmail; @SerializedName("user_type") @Expose private String userType; @SerializedName("user_address") @Expose private String userAddress; @SerializedName("dl_no") @Expose private String dlNo; @SerializedName("user_doj") @Expose private String userDoj; @SerializedName("user_dob") @Expose private String userDob; @SerializedName("user_adhar_no") @Expose private String userAdharNo; @SerializedName("user_image") @Expose private String userImage; @SerializedName("user_asm_id") @Expose private String userAsmId; @SerializedName("user_sm_id") @Expose private String userSmId; @SerializedName("user_dm_id") @Expose private String userDmId; @SerializedName("user_imei_no") @Expose private String userImeiNo; @SerializedName("vehicle_no") @Expose private String vehicleNo; @SerializedName("branch_id") @Expose private String branchId; @SerializedName("group_id") @Expose private String groupId; @SerializedName("sub_group_id") @Expose private String subGroupId; @SerializedName("financial_year") @Expose private String financialYear; @SerializedName("target") @Expose private String target; @SerializedName("status") @Expose private String status; @SerializedName("datetime") @Expose private String datetime; @SerializedName("inactive_datetime") @Expose private String inactiveDatetime; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getOrgId() { return orgId; } public void setOrgId(String orgId) { this.orgId = orgId; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUserPassword() { return userPassword; } public void setUserPassword(String userPassword) { this.userPassword = userPassword; } public String getUserPhone() { return userPhone; } public void setUserPhone(String userPhone) { this.userPhone = userPhone; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getUserEmail() { return userEmail; } public void setUserEmail(String userEmail) { this.userEmail = userEmail; } public String getUserType() { return userType; } public void setUserType(String userType) { this.userType = userType; } public String getUserAddress() { return userAddress; } public void setUserAddress(String userAddress) { this.userAddress = userAddress; } public String getDlNo() { return dlNo; } public void setDlNo(String dlNo) { this.dlNo = dlNo; } public String getUserDoj() { return userDoj; } public void setUserDoj(String userDoj) { this.userDoj = userDoj; } public String getUserDob() { return userDob; } public void setUserDob(String userDob) { this.userDob = userDob; } public String getUserAdharNo() { return userAdharNo; } public void setUserAdharNo(String userAdharNo) { this.userAdharNo = userAdharNo; } public String getUserImage() { return userImage; } public void setUserImage(String userImage) { this.userImage = userImage; } public String getUserAsmId() { return userAsmId; } public void setUserAsmId(String userAsmId) { this.userAsmId = userAsmId; } public String getUserSmId() { return userSmId; } public void setUserSmId(String userSmId) { this.userSmId = userSmId; } public String getUserDmId() { return userDmId; } public void setUserDmId(String userDmId) { this.userDmId = userDmId; } public String getUserImeiNo() { return userImeiNo; } public void setUserImeiNo(String userImeiNo) { this.userImeiNo = userImeiNo; } public String getVehicleNo() { return vehicleNo; } public void setVehicleNo(String vehicleNo) { this.vehicleNo = vehicleNo; } public String getBranchId() { return branchId; } public void setBranchId(String branchId) { this.branchId = branchId; } public String getGroupId() { return groupId; } public void setGroupId(String groupId) { this.groupId = groupId; } public String getSubGroupId() { return subGroupId; } public void setSubGroupId(String subGroupId) { this.subGroupId = subGroupId; } public String getFinancialYear() { return financialYear; } public void setFinancialYear(String financialYear) { this.financialYear = financialYear; } public String getTarget() { return target; } public void setTarget(String target) { this.target = target; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getDatetime() { return datetime; } public void setDatetime(String datetime) { this.datetime = datetime; } public String getInactiveDatetime() { return inactiveDatetime; } public void setInactiveDatetime(String inactiveDatetime) { this.inactiveDatetime = inactiveDatetime; } }
[ "appslelo.com@gmail.com" ]
appslelo.com@gmail.com
e515cfd0cb8419cd27566a3ae198d1389387d9a1
59edd26866e43fd9d7451884060cad84f7c92f2f
/src/main/java/com/xthena/core/dbmigrate/DatabaseMigrator.java
4729ed36412357963c4fee883a48f3aad1fc4ea3
[ "Apache-2.0" ]
permissive
jianbingfang/xhf
fd61f49438721df84df4e009b1208622fca9f137
a9f008c904943e8a2cbed9c67e03e5c18c659444
refs/heads/master
2021-01-18T14:41:04.209961
2015-09-07T17:17:08
2015-09-07T17:17:08
33,782,876
2
5
null
null
null
null
UTF-8
Java
false
false
2,318
java
package com.xthena.core.dbmigrate; import java.util.Collection; import java.util.Properties; import javax.annotation.PostConstruct; import javax.sql.DataSource; import com.googlecode.flyway.core.Flyway; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class DatabaseMigrator { private static Logger logger = LoggerFactory .getLogger(DatabaseMigrator.class); private DataSource dataSource; private Properties applicationProperties; @PostConstruct public void execute() { if (!"true".equals(applicationProperties .getProperty("dbmigrate.enable"))) { logger.info("skip dbmigrate"); return; } if ("true".equals(applicationProperties.getProperty("dbmigrate.clean"))) { logger.info("clean database"); Flyway flyway = new Flyway(); flyway.setDataSource(dataSource); flyway.clean(); } Collection<DatabaseMigrateInfo> databaseMigrateInfos = new DatabaseMigrateInfoBuilder( applicationProperties).build(); for (DatabaseMigrateInfo databaseMigrateInfo : databaseMigrateInfos) { if (!databaseMigrateInfo.isEnabled()) { logger.info("skip migrate : {}, {}, {}", databaseMigrateInfo.getName(), databaseMigrateInfo.getTable(), databaseMigrateInfo.getLocation()); continue; } logger.info("migrate : {}, {}, {}", databaseMigrateInfo.getName(), databaseMigrateInfo.getTable(), databaseMigrateInfo.getLocation()); Flyway flyway = new Flyway(); flyway.setInitOnMigrate(true); flyway.setInitVersion("0"); flyway.setDataSource(dataSource); flyway.setTable(databaseMigrateInfo.getTable()); flyway.setLocations(new String[] { databaseMigrateInfo .getLocation() }); flyway.migrate(); } } public void setApplicationProperties(Properties applicationProperties) { this.applicationProperties = applicationProperties; } public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; } }
[ "jianbingfang@gmail.com" ]
jianbingfang@gmail.com
f46910a097333cfa41099f1b02f3159b92441324
16ea69af51869d4a4b8e8e4e3ab3eeba8f691f1b
/src/main/resources/code/M_522_LongestUncommonSubsequenceIi.java
fb86c8220b67bc2781a1dde950f7260ae1b88a70
[]
no_license
offerpie/LeetCodeSpider
e97f0b8b3278a27b0406e874ad93e14e367a92a2
3d6eb8244e2f03de49a168bcf94a57bd1c7bc7b9
refs/heads/master
2020-04-14T23:11:01.070872
2018-08-21T16:00:12
2018-08-21T16:00:12
164,192,792
1
0
null
2019-01-05T07:32:42
2019-01-05T07:32:42
null
UTF-8
Java
false
false
1,343
java
/** * [522] Longest Uncommon Subsequence II * * difficulty: Medium * * TestCase Example: ["aba","cdc","eae"] * * https://leetcode-cn.com/problems/longest-uncommon-subsequence-ii/ * * * * Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this subsequence should not be any subsequence of the other strings. * * * * A subsequence is a sequence that can be derived from one sequence by deleting some characters without changing the order of the remaining elements. Trivially, any string is a subsequence of itself and an empty string is a subsequence of any string. * * * * The input will be a list of strings, and the output needs to be the length of the longest uncommon subsequence. If the longest uncommon subsequence doesn't exist, return -1. * * * Example 1: * * Input: "aba", "cdc", "eae" * Output: 3 * * * * Note: * * All the given strings' lengths will not exceed 10. * The length of the given list will be in the range of [2, 50]. * * * * * >>>>>>中文描述<<<<<< * * * [522] null * * * */ public class M_522_LongestUncommonSubsequenceIi { public int findLUSlength(String[] strs) { } }
[ "techflowing@gmail.com" ]
techflowing@gmail.com
c7037395bb61076c5ba2506e6b112105fbee0da7
2033de1f3b146f7a545fa265630e426a074de319
/src/main/java/org/mfusco/fromgoftolambda/talk/template/TemplateLambda.java
bf6a7846933c23fa133752c17eef2fc90b6abf99
[]
no_license
notflorian/from-gof-to-lambda
d32fa6394d17d6c103712b3c864cc98998dea0ee
73efb920028089f772bbaf7383aa0640294574c6
refs/heads/master
2021-07-04T22:48:07.125911
2017-09-26T18:02:12
2017-09-26T18:02:12
94,628,649
2
1
null
2017-07-05T07:55:19
2017-06-17T14:26:24
Java
UTF-8
Java
false
false
138
java
package org.mfusco.fromgoftolambda.talk.template; public class TemplateLambda { public static void main( String[] args ) { } }
[ "mario.fusco@gmail.com" ]
mario.fusco@gmail.com
1bdd60821925f77df4cb57597495903128a1b77d
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_106/Testnull_10588.java
66bdff0dc8f4d15a71f574984c6de3038ec2799e
[]
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_106; import static org.junit.Assert.*; public class Testnull_10588 { private final Productionnull_10588 production = new Productionnull_10588("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
16501a256b05fd60f8ed7fd971cd1469455c9505
12b14b30fcaf3da3f6e9dc3cb3e717346a35870a
/examples/commons-math3/mutations/mutants-BinomialDistribution/54/org/apache/commons/math3/distribution/BinomialDistribution.java
749b0932b49f1ca68c343677e6362f75cd78ea30
[ "BSD-3-Clause", "Minpack", "Apache-2.0" ]
permissive
SmartTests/smartTest
b1de326998857e715dcd5075ee322482e4b34fb6
b30e8ec7d571e83e9f38cd003476a6842c06ef39
refs/heads/main
2023-01-03T01:27:05.262904
2020-10-27T20:24:48
2020-10-27T20:24:48
305,502,060
0
0
null
null
null
null
UTF-8
Java
false
false
5,765
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.commons.math3.distribution; import org.apache.commons.math3.exception.OutOfRangeException; import org.apache.commons.math3.exception.NotPositiveException; import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.special.Beta; import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.random.Well19937c; /** * Implementation of the binomial distribution. * * @see <a href="http://en.wikipedia.org/wiki/Binomial_distribution">Binomial distribution (Wikipedia)</a> * @see <a href="http://mathworld.wolfram.com/BinomialDistribution.html">Binomial Distribution (MathWorld)</a> * @version $Id$ */ public class BinomialDistribution extends AbstractIntegerDistribution { /** Serializable version identifier. */ private static final long serialVersionUID = 6751309484392813623L; /** The number of trials. */ private final int numberOfTrials; /** The probability of success. */ private final double probabilityOfSuccess; /** * Create a binomial distribution with the given number of trials and * probability of success. * * @param trials Number of trials. * @param p Probability of success. * @throws NotPositiveException if {@code trials < 0}. * @throws OutOfRangeException if {@code p < 0} or {@code p > 1}. */ public BinomialDistribution(int trials, double p) { this(new Well19937c(), trials, p); } /** * Creates a binomial distribution. * * @param rng Random number generator. * @param trials Number of trials. * @param p Probability of success. * @throws NotPositiveException if {@code trials < 0}. * @throws OutOfRangeException if {@code p < 0} or {@code p > 1}. * @since 3.1 */ public BinomialDistribution(RandomGenerator rng, int trials, double p) { super(rng); if (trials < 0) { throw new NotPositiveException(LocalizedFormats.NUMBER_OF_TRIALS, trials); } if (p < 0 || p > 1) { throw new OutOfRangeException(p, 0, 1); } probabilityOfSuccess = p; numberOfTrials = trials; } /** * Access the number of trials for this distribution. * * @return the number of trials. */ public int getNumberOfTrials() { return numberOfTrials; } /** * Access the probability of success for this distribution. * * @return the probability of success. */ public double getProbabilityOfSuccess() { return probabilityOfSuccess; } /** {@inheritDoc} */ public double probability(int x) { double ret; if (x < 0 || x > numberOfTrials) { ret = 0.0; } else { ret = FastMath.exp(SaddlePointExpansion.logBinomialProbability(x, numberOfTrials, probabilityOfSuccess, 1.0 - probabilityOfSuccess)); } return ret; } /** {@inheritDoc} */ public double cumulativeProbability(int x) { double ret; if (x < 0) { ret = 1.0; } else if (x >= numberOfTrials) { ret = 1.0; } else { ret = 1.0 - Beta.regularizedBeta(probabilityOfSuccess, x + 1.0, numberOfTrials - x); } return ret; } /** * {@inheritDoc} * * For {@code n} trials and probability parameter {@code p}, the mean is * {@code n * p}. */ public double getNumericalMean() { return numberOfTrials * probabilityOfSuccess; } /** * {@inheritDoc} * * For {@code n} trials and probability parameter {@code p}, the variance is * {@code n * p * (1 - p)}. */ public double getNumericalVariance() { final double p = probabilityOfSuccess; return numberOfTrials * p * (1 - p); } /** * {@inheritDoc} * * The lower bound of the support is always 0 except for the probability * parameter {@code p = 1}. * * @return lower bound of the support (0 or the number of trials) */ public int getSupportLowerBound() { return probabilityOfSuccess < 1.0 ? 0 : numberOfTrials; } /** * {@inheritDoc} * * The upper bound of the support is the number of trials except for the * probability parameter {@code p = 0}. * * @return upper bound of the support (number of trials or 0) */ public int getSupportUpperBound() { return probabilityOfSuccess > 0.0 ? numberOfTrials : 0; } /** * {@inheritDoc} * * The support of this distribution is connected. * * @return {@code true} */ public boolean isSupportConnected() { return true; } }
[ "kesina@Kesinas-MBP.lan" ]
kesina@Kesinas-MBP.lan
8583fe63ae809d977ccc7dd7205e561a4ebe2b4f
0efe32311acccaf215794a2e97b590e9a45dce28
/src/com/lbins/meetlove/data/Data.java
23317dec46f636c8e705253d2adec8dd15b2e25f
[]
no_license
eryiyi/MeetLoveApp
c17215d91f160af8ebeec6fe9f247de4833fb23b
4a7b47592a1ca0cb561585a48a02b3af14da4fe5
refs/heads/master
2020-12-02T18:19:34.958868
2017-09-21T03:29:04
2017-09-21T03:29:04
87,496,802
0
1
null
null
null
null
UTF-8
Java
false
false
607
java
package com.lbins.meetlove.data; /** * Created by liuzwei on 2015/1/12. */ public class Data { private String code; private String success; private String message; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getSuccess() { return success; } public void setSuccess(String success) { this.success = success; } }
[ "826321978@qq.com" ]
826321978@qq.com
84b090596dbb184db9aea55cea95490dc505acdd
23954a7d5713fbbe5e35a87c81745907cabc5462
/src/main/java/com/youedata/nncloud/core/util/SpringContextHolder.java
24d023275b2db32f7bbec7eb5abec3ac813959a1
[]
no_license
lj88811498/db
410a8c5af0f2e7c34bc78996e08650b16ee966e3
fd19c30fff7a5c44ebae34dbe10a6101d67eae74
refs/heads/master
2022-10-07T05:33:43.516126
2020-01-06T09:38:16
2020-01-06T09:38:16
232,068,336
0
0
null
2022-09-01T23:18:23
2020-01-06T09:35:38
JavaScript
UTF-8
Java
false
false
1,502
java
package com.youedata.nncloud.core.util; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; /** * Spring的ApplicationContext的持有者,可以用静态方法的方式获取spring容器中的bean * * @author fengshuonan * @date 2016年11月27日 下午3:32:11 */ @Component public class SpringContextHolder implements ApplicationContextAware { private static ApplicationContext applicationContext; @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { SpringContextHolder.applicationContext = applicationContext; } public static ApplicationContext getApplicationContext() { assertApplicationContext(); return applicationContext; } @SuppressWarnings("unchecked") public static <T> T getBean(String beanName) { assertApplicationContext(); return (T) applicationContext.getBean(beanName); } public static <T> T getBean(Class<T> requiredType) { assertApplicationContext(); return applicationContext.getBean(requiredType); } private static void assertApplicationContext() { if (SpringContextHolder.applicationContext == null) { throw new RuntimeException("applicaitonContext属性为null,请检查是否注入了SpringContextHolder!"); } } }
[ "450416064@qq.com" ]
450416064@qq.com
44b89fbfdc16d64e045813d7b91906cefc77388c
afab72f0209764c956d609873b7f2b517d67ad5f
/CentralSwitchEJB/ejbModule/zw/co/esolutions/ewallet/services/proxy/MerchantServiceProxy.java
4eb512467b416c4fea2468633263c339b6fe1eca
[]
no_license
wasadmin/ewallet
899e66d4d03e77a8f85974d9d2cba8940cf2018a
e132a5e569f4bb67a83df0c3012bb341ffaaf2ed
refs/heads/master
2021-01-23T13:48:34.618617
2012-11-15T10:47:55
2012-11-15T10:47:55
6,703,145
3
2
null
null
null
null
UTF-8
Java
false
false
376
java
package zw.co.esolutions.ewallet.services.proxy; import zw.co.esolutions.ewallet.merchantservices.service.MerchantServiceSOAPProxy; public class MerchantServiceProxy { private static MerchantServiceSOAPProxy proxy; public static final MerchantServiceSOAPProxy getInstance() { if(proxy == null) { proxy = new MerchantServiceSOAPProxy(); } return proxy; } }
[ "stanfordbangaba@gmail.com" ]
stanfordbangaba@gmail.com
97117bdd922a30cdf24ab33142fb117c5fcf1b76
1009e77f8e064afe85c21948c878352d1ebf19b1
/ahome-flash-core/src/main/java/com/ait/toolkit/flash/core/client/events/PressAndTapGestureEvent.java
e0a70bd9c51330539ddd60e63f75f31936a7e0ec
[]
no_license
dikalo/ahome-flash-core
58233169d16f1fdd7ea7486d16b78686629885c1
7d407344ff33d0e4436ddca2c487168c61511ef1
refs/heads/master
2021-05-30T08:25:42.886775
2015-09-02T23:30:50
2015-09-02T23:30:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,755
java
/* Copyright (c) 2014 Ahomé Innovation Technologies. 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.ait.toolkit.flash.core.client.events; import com.google.gwt.core.client.JavaScriptObject; /** * The Class PressAndTapGestureEvent. */ public class PressAndTapGestureEvent extends GestureEvent { /** The Constant GESTURE_PRESS_AND_TAP. */ public static String GESTURE_PRESS_AND_TAP = "gesturePressAndTap"; /** * Instantiates a new press and tap gesture event. */ protected PressAndTapGestureEvent() { } PressAndTapGestureEvent(JavaScriptObject obj) { jsObj = obj; } /** * Gets the tap local x. * * @return the tap local x */ public native double getTapLocalX() /*-{ var peer = this.@com.ait.toolkit.core.client.JsObject::getJsObj()(); return peer.gettapLocalX(); }-*/; /** * Sets the tap local x. * * @param value the new tap local x */ public native void setTapLocalX(double value) /*-{ var peer = this.@com.ait.toolkit.core.client.JsObject::getJsObj()(); peer.settapLocalX(value); }-*/; /** * Gets the tap local y. * * @return the tap local y */ public native double getTapLocalY() /*-{ var peer = this.@com.ait.toolkit.core.client.JsObject::getJsObj()(); return peer.gettapLocalY(); }-*/; /** * Sets the tap local y. * * @param value the new tap local y */ public native void setTapLocalY(double value) /*-{ var peer = this.@com.ait.toolkit.core.client.JsObject::getJsObj()(); peer.settapLocalY(value); }-*/; /** * Gets the tap stage x. * * @return the tap stage x */ public native double getTapStageX() /*-{ var peer = this.@com.ait.toolkit.core.client.JsObject::getJsObj()(); return peer.gettapStageX(); }-*/; /** * Gets the tap stage y. * * @return the tap stage y */ public native double getTapStageY() /*-{ var peer = this.@com.ait.toolkit.core.client.JsObject::getJsObj()(); return peer.gettapStageY(); }-*/; public static PressAndTapGestureEvent cast(Event event) { return new PressAndTapGestureEvent(event.getJsObj()); } }
[ "alainekambi@alaineksmacbook.fritz.box" ]
alainekambi@alaineksmacbook.fritz.box
9808537cb725c8b0eb312f8e4c3a322f91b43f12
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
/app/src/main/wechat6.5.3/com/tencent/mm/svg/a/a/qm.java
6b1a55e21571a549009ff27497711008a8924173
[]
no_license
newtonker/wechat6.5.3
8af53a870a752bb9e3c92ec92a63c1252cb81c10
637a69732afa3a936afc9f4679994b79a9222680
refs/heads/master
2020-04-16T03:32:32.230996
2017-06-15T09:54:10
2017-06-15T09:54:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,534
java
package com.tencent.mm.svg.a.a; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.mm.svg.WeChatSVGRenderC2Java; import com.tencent.mm.svg.c; import com.tencent.smtt.sdk.WebView; public final class qm extends c { private final int height = 96; private final int width = 96; protected final int j(int i, Object... objArr) { switch (i) { case 0: return 96; case 1: return 96; case 2: Canvas canvas = (Canvas) objArr[0]; Looper looper = (Looper) objArr[1]; Matrix d = c.d(looper); float[] c = c.c(looper); Paint g = c.g(looper); g.setFlags(385); g.setStyle(Style.FILL); Paint g2 = c.g(looper); g2.setFlags(385); g2.setStyle(Style.STROKE); g.setColor(WebView.NIGHT_MODE_COLOR); g2.setStrokeWidth(1.0f); g2.setStrokeCap(Cap.BUTT); g2.setStrokeJoin(Join.MITER); g2.setStrokeMiter(4.0f); g2.setPathEffect(null); c.a(g2, looper).setStrokeWidth(1.0f); canvas.save(); Paint a = c.a(g, looper); a.setColor(637534208); c = c.a(c, 1.0f, 0.0f, 8.0f, 0.0f, 1.0f, 8.0f); d.reset(); d.setValues(c); canvas.concat(d); canvas.save(); a = c.a(a, looper); c = c.a(c, 0.70710677f, 0.70710677f, -16.568542f, -0.70710677f, 0.70710677f, 40.0f); d.reset(); d.setValues(c); canvas.concat(d); Path h = c.h(looper); h.moveTo(37.0f, 37.0f); h.lineTo(37.0f, 12.995752f); h.cubicTo(37.0f, 12.450768f, 37.44359f, 12.0f, 37.99078f, 12.0f); h.lineTo(42.00922f, 12.0f); h.cubicTo(42.549026f, 12.0f, 43.0f, 12.445813f, 43.0f, 12.995752f); h.lineTo(43.0f, 37.0f); h.lineTo(67.00425f, 37.0f); h.cubicTo(67.54923f, 37.0f, 68.0f, 37.44359f, 68.0f, 37.99078f); h.lineTo(68.0f, 42.00922f); h.cubicTo(68.0f, 42.549026f, 67.554184f, 43.0f, 67.00425f, 43.0f); h.lineTo(43.0f, 43.0f); h.lineTo(43.0f, 67.00425f); h.cubicTo(43.0f, 67.54923f, 42.55641f, 68.0f, 42.00922f, 68.0f); h.lineTo(37.99078f, 68.0f); h.cubicTo(37.450974f, 68.0f, 37.0f, 67.554184f, 37.0f, 67.00425f); h.lineTo(37.0f, 43.0f); h.lineTo(12.995752f, 43.0f); h.cubicTo(12.450768f, 43.0f, 12.0f, 42.55641f, 12.0f, 42.00922f); h.lineTo(12.0f, 37.99078f); h.cubicTo(12.0f, 37.450974f, 12.445813f, 37.0f, 12.995752f, 37.0f); h.lineTo(37.0f, 37.0f); h.lineTo(37.0f, 37.0f); h.close(); WeChatSVGRenderC2Java.setFillType(h, 2); canvas.drawPath(h, a); canvas.restore(); canvas.restore(); c.f(looper); break; } return 0; } }
[ "zhangxhbeta@gmail.com" ]
zhangxhbeta@gmail.com
2acb9171015e580979826eac5ef2191ea77d9b93
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_c54a122ae65ebd1a838e4afaa9493cc60e914d01/PDFListGroupLM/6_c54a122ae65ebd1a838e4afaa9493cc60e914d01_PDFListGroupLM_t.java
2a362e3e951fb05273b27f12c5117ce0038c4f0c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,409
java
package org.eclipse.birt.report.engine.layout.pdf; import org.eclipse.birt.report.engine.content.IContent; import org.eclipse.birt.report.engine.content.IGroupContent; import org.eclipse.birt.report.engine.content.IListBandContent; import org.eclipse.birt.report.engine.emitter.IContentEmitter; import org.eclipse.birt.report.engine.executor.IReportItemExecutor; import org.eclipse.birt.report.engine.internal.executor.dom.DOMReportItemExecutor; import org.eclipse.birt.report.engine.layout.IBlockStackingLayoutManager; import org.eclipse.birt.report.engine.layout.area.impl.AreaFactory; import org.eclipse.birt.report.engine.layout.area.impl.ContainerArea; import org.eclipse.birt.report.engine.layout.content.ListContainerExecutor; public class PDFListGroupLM extends PDFGroupLM implements IBlockStackingLayoutManager { public PDFListGroupLM( PDFLayoutEngineContext context, PDFStackingLM parent, IContent content, IContentEmitter emitter, IReportItemExecutor executor ) { super( context, parent, content, emitter, executor ); } protected IListBandContent getHeader( ) { return (IListBandContent) ( (IGroupContent) content ).getHeader( ); } protected IReportItemExecutor createExecutor( ) { return new ListContainerExecutor( content, executor ); } protected void repeatHeader( ) { if ( isFirst ) { isFirst = false; return; } if ( !isRepeatHeader( ) ) { return; } IListBandContent band = getHeader( ); if ( band == null ) { return; } IReportItemExecutor headerExecutor = new DOMReportItemExecutor( band ); headerExecutor.execute( ); ContainerArea headerArea = (ContainerArea) AreaFactory .createLogicContainer( ); headerArea.setAllocatedWidth( parent.getMaxAvaWidth( ) ); PDFRegionLM regionLM = new PDFRegionLM( context, headerArea, band, emitter, headerExecutor ); boolean allowPB = context.allowPageBreak( ); context.setAllowPageBreak( false ); regionLM.layout( ); context.setAllowPageBreak( allowPB ); if ( headerArea.getAllocatedHeight( ) + currentBP < parent .getMaxAvaHeight( ) ) { addArea( headerArea ); repeatCount++; } } protected void createRoot( ) { root = (ContainerArea) AreaFactory.createBlockContainer( content ); } protected void newContext() { super.newContext( ); repeatCount = 0; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9231c72f078eca65504fd8ffddd8d74fb1f8fe83
8af8c37c63254fcc3fcefda386721ac66f32d3fc
/src/com/lftechnology/java/junit/TimeOutDemo.java
0bfdd57a2f0885bbed040a11960dfe0b622e20df
[]
no_license
romitamgai/playground
f5ac08b46dad6a96b1f691af7f3106a2f0d873d2
350c4ec8845053f5ceeec0b06663f76746546798
refs/heads/master
2021-01-11T06:37:17.626694
2015-09-01T15:26:51
2015-09-01T15:26:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
950
java
/** * */ package com.lftechnology.java.junit; import static org.junit.Assert.assertEquals; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; /** * @author bhuwan */ public class TimeOutDemo { @BeforeClass public static void beforeExecutingTestCase() { System.out.println("TimeOutDemo####Before Getting Test Started1 ::"); } @AfterClass public static void afterExecutingTestCase() { System.out.println("After Test Execution1 ::"); } @Test public void testHelloWorld() { assertEquals("Would Say Hello", "Hello", "Hello"); assertEquals(15, 45 / 3); } @Test(timeout = 1) public void testWait() { // Supposed Task Should Be Done Before Timeout for (int i = 0; i < 100; i++) { Math.random(); } System.out.println("Test Run Before Timeout :: This Test Has Finished Sucessfully ::"); } }
[ "bhuwangautam@lftechnology.com" ]
bhuwangautam@lftechnology.com
0b26305047bd8d30827977c6595b0def42a1d2cd
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/commerce-services/commercefacades/src/de/hybris/platform/commercefacades/customer/CustomerFacade.java
350ee072e187b576ecb168dca7b6598991218437
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
7,430
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.commercefacades.customer; import de.hybris.platform.commercefacades.user.data.CustomerData; import de.hybris.platform.commercefacades.user.data.RegisterData; import de.hybris.platform.commercefacades.user.exceptions.PasswordMismatchException; import de.hybris.platform.commerceservices.customer.DuplicateUidException; import de.hybris.platform.commerceservices.customer.TokenInvalidatedException; import de.hybris.platform.core.model.user.UserModel; import de.hybris.platform.servicelayer.dto.converter.ConversionException; import de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException; /** * Defines an API to perform various customer related operations */ public interface CustomerFacade { /** * Register a user with given parameters * * @param registerData * the user data the user will be registered with * @throws IllegalArgumentException * if required data is missing * @throws UnknownIdentifierException * if the title code is invalid * @throws DuplicateUidException * if the login is not unique */ void register(RegisterData registerData) throws DuplicateUidException, UnknownIdentifierException, IllegalArgumentException; /** * Generate dummy customer data with random customerId to return if user already exists in database. * * * @param registerData * data provided by user during registration * @return */ CustomerData nextDummyCustomerData(final RegisterData registerData); /** * Sends a forgotten password request for the customer specified. * The given <code>id</code> is one of the unique identifiers that is used to recognize the customer in matching strategies. * * @param id * the id of the customer to send the forgotten password mail for. * @throws UnknownIdentifierException * if the customer cannot be found for the id specified * @see de.hybris.platform.commerceservices.user.impl.DefaultUserMatchingService */ void forgottenPassword(String id); /** * Update the password for the user by decrypting and validating the token. * * @param token * the token to identify the the customer to reset the password for. * @param newPassword * the new password to set * @throws IllegalArgumentException * If the new password is empty or the token is invalid or expired * @throws TokenInvalidatedException * if the token was already used or there is a newer token */ void updatePassword(String token, String newPassword) throws TokenInvalidatedException; // Methods that operate on the current session user /** * Returns the current session user. * * @return current session user data * @throws ConversionException * the conversion exception when exception occurred when converting user */ CustomerData getCurrentCustomer() throws ConversionException; /** * Returns the uid of current session user. * * @return current session user uid */ String getCurrentCustomerUid(); /** * Change the current customer's UID. The current password is required for 2 reasons, firstly to validate that the * current visitor is actually the customer, secondly the password hash may be salted with the UID and therefore if * the UID is changed then the password needs to be re-hashed. * * @param newUid * the new UID for the current customer * @param currentPassword * current user password to validate user * @throws PasswordMismatchException * thrown if the password is invalid * @throws DuplicateUidException * thrown if the newUid is already in use */ void changeUid(String newUid, String currentPassword) throws DuplicateUidException, PasswordMismatchException; /** * Changes current user password. If current session user is anonymous nothing happens. * * @param oldPassword * old password to confirm * @param newPassword * new password to set * @throws de.hybris.platform.commercefacades.user.exceptions.PasswordMismatchException * if the given old password does not match the one stored in the system */ void changePassword(String oldPassword, String newPassword) throws PasswordMismatchException; /** * Updates current customer's profile with given parameters * * @param customerData * the updated customer data * @throws DuplicateUidException * if the login is not unique */ void updateProfile(CustomerData customerData) throws DuplicateUidException; /** * Updates current customer's profile with given parameters * * @param customerData * the updated customer data * @throws DuplicateUidException * if the login is not unique */ void updateFullProfile(CustomerData customerData) throws DuplicateUidException; /** * updates the session currency and language to the user settings, assigns the cart to the current user and * calculates the cart */ void loginSuccess(); /** * Create a regular customer from a guest customer who has just completed the guest checkout. * * @param pwd * the new password entered by the user * @param orderCode * the order code * @throws DuplicateUidException * if the login is not unique */ void changeGuestToCustomer(String pwd, String orderCode) throws DuplicateUidException; /** * Generates a random guid * * @return a unique random guid */ String generateGUID(); /** * Creates a new guest customer for anonymousCheckout and sets the email and name. * * @param email * the email address of the anonymous customer * @param name * the name of the anonymous customer * @throws DuplicateUidException */ void createGuestUserForAnonymousCheckout(String email, String name) throws DuplicateUidException; /** * Guest customer which is created for anonymous checkout will be the cart user. The session user will remain * anonymous. * * @param guestCustomerData * customer data to update the cart with */ void updateCartWithGuestForAnonymousCheckout(CustomerData guestCustomerData); /** * This method will be used by rememberMeServices when there is encoding attributes for language and currency. * * @param languageEncoding * enable/disable language encoding * @param currencyEncoding * enable/disable currency encoding */ void rememberMeLoginSuccessWithUrlEncoding(boolean languageEncoding, boolean currencyEncoding); /** * Gets the user for UID. * * @param userId * the user id * @return the user for UID */ CustomerData getUserForUID(final String userId); /** * Close Account for current session user. * * @return the customer with updated {@link UserModel#DEACTIVATIONDATE} attribute */ CustomerData closeAccount(); /** * Sets the new password for the user. * The given <code>userId</code> is one of the unique identifiers that is used to recognize the user in matching strategies. * * @param userId * id used to identify the user. * @param newPassword * new password for the user * @throws de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException * if user not found * @throws de.hybris.platform.servicelayer.user.exceptions.PasswordEncoderNotFoundException * if encoding not found * @see de.hybris.platform.commerceservices.user.impl.DefaultUserMatchingService */ void setPassword(final String userId, final String newPassword); }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
ba1c8e7970adf8e268ae7f9bfca5999ec53d4910
445afc586a4315594e8e74c58ea467e0527662fc
/src/crawler/KHOLEachCategoryCrawler.java
8b371a9426814c42f86ce7568c169f45395924d3
[]
no_license
ziggy192/course-source-crawler
07807f3f30c65264ae34d6edb872e6910104b121
682224690bc1cc6bbbc7b00c84b6572c41971d92
refs/heads/master
2020-04-05T08:40:39.885728
2018-11-18T14:38:53
2018-11-18T14:38:53
156,724,422
0
0
null
null
null
null
UTF-8
Java
false
false
2,747
java
package crawler; import config.ConfigManager; import config.model.SignType; import util.StaxParserUtils; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; import java.util.logging.Logger; public class KHOLEachCategoryCrawler implements Runnable { private static final Logger logger = Logger.getLogger(KHOLEachCategoryCrawler.class.toString()); private int categoryId; private String categoryUrl; public KHOLEachCategoryCrawler(int categoryId, String categoryUrl) { this.categoryId = categoryId; this.categoryUrl = categoryUrl; } private int getTotalPages() { int totalPages = 1; try { SignType signType = ConfigManager.getInstance().getConfigModel().getKhoaHocOnline().getPaginationSign(); String beginSign = signType.getBeginSign(); String endSign = signType.getEndSign(); String htmlContent = StaxParserUtils.parseHtml(categoryUrl, beginSign, endSign); htmlContent = StaxParserUtils.addMissingTag(htmlContent); logger.info(htmlContent); XMLEventReader staxReader = StaxParserUtils.getStaxReader(htmlContent); while (staxReader.hasNext()) { XMLEvent event = staxReader.nextEvent(); if (event.isStartElement()) { StartElement startElement = event.asStartElement(); if (!startElement.getName().getLocalPart().equals("ul") && StaxParserUtils.checkAttributeContainsKey(startElement, "class", "page-numbers")) { String pageContent = StaxParserUtils.getContentAndJumpToEndElement(staxReader, startElement); try { int pageNumber = Integer.parseInt(pageContent); totalPages = Math.max(totalPages, pageNumber); } catch (NumberFormatException e) { //do nothing } } } } } catch (XMLStreamException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return totalPages; } @Override public void run() { logger.info("Start Thread"); try { int totalPage = getTotalPages(); // logger.info("totalPage=" + totalPage); CrawlingThreadManager.getInstance().checkSuspendStatus(); for (int page = 1; page <= totalPage; page++) { String courseInEachPageUrl = categoryUrl + "page/" + page + "/"; KHOLCourseInEachCategoryPageCrawler inEachCategoryPageCrawler = new KHOLCourseInEachCategoryPageCrawler(categoryId, courseInEachPageUrl); CrawlingThreadManager.getInstance().getkHOLExcecutor().execute(inEachCategoryPageCrawler); CrawlingThreadManager.getInstance().checkSuspendStatus(); } CrawlingThreadManager.getInstance().checkSuspendStatus(); } catch (Exception e) { e.printStackTrace(); } logger.info("End Thread"); } }
[ "luuquangnghia97@gmail.com" ]
luuquangnghia97@gmail.com
c5f9c0c3cb196e100368609f58f28de17b6fd414
c6d4872031fe7f9d20c6a5c01eb07c92aab3a205
/tests/src/test/java/de/quantummaid/mapmaid/specs/examples/serializedobjects/success/transient_field/TransientFieldExample.java
6ee669e3236661cff0e849480cc4926de445076e
[ "Apache-2.0" ]
permissive
quantummaid/mapmaid
22cae89fa09c7cab1d1f73e20f2b92718f59bd49
348ed54a2dd46ffb66204ae573f242a01acb73c5
refs/heads/master
2022-12-24T06:56:45.809221
2021-08-03T09:56:58
2021-08-03T09:56:58
228,895,012
5
1
Apache-2.0
2022-12-14T20:53:54
2019-12-18T18:01:43
Java
UTF-8
Java
false
false
1,636
java
/* * Copyright (c) 2020 Richard Hauswald - https://quantummaid.de/. * * 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 de.quantummaid.mapmaid.specs.examples.serializedobjects.success.transient_field; import de.quantummaid.mapmaid.specs.examples.customprimitives.success.normal.example1.Name; import org.junit.jupiter.api.Test; import static de.quantummaid.mapmaid.specs.examples.system.ScenarioBuilder.scenarioBuilderFor; public final class TransientFieldExample { @Test public void transientFieldExample() { scenarioBuilderFor(AddALotRequest.class) .withSerializedForm("{\n" + " \"name\": \"foo\"\n" + "}") .withDeserializedForm(AddALotRequest.addALotRequest(Name.fromStringValue("foo"))) .withAllScenariosSuccessful() .run(); } }
[ "developer@quantummaid.de" ]
developer@quantummaid.de
9ba6c39c1ae152f7d63297c348701741a3c42412
ee4b29857c8546359cc2936a0d56d31bfb844472
/schemacrawler-api/src/main/java/sf/util/RegularExpressionColorMap.java
d87d0672e7cdabe7422d228834aa18d1c28b5365
[]
no_license
moooooooo/SchemaCrawler
68bc411ba714a7dd316478e12b54bfb5330cf310
05d524b7844b35e24cd1f7ea6e7369e31d3dd12a
refs/heads/master
2021-01-11T00:06:09.459697
2019-12-28T18:15:46
2019-12-28T18:15:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,278
java
/* ======================================================================== SchemaCrawler http://www.schemacrawler.com Copyright (c) 2000-2020, Sualeh Fatehi <sualeh@hotmail.com>. All rights reserved. ------------------------------------------------------------------------ SchemaCrawler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SchemaCrawler and the accompanying materials are made available under the terms of the Eclipse Public License v1.0, GNU General Public License v3 or GNU Lesser General Public License v3. You may elect to redistribute this code under any of these licenses. The Eclipse Public License is available at: http://www.eclipse.org/legal/epl-v10.html The GNU General Public License v3 and the GNU Lesser General Public License v3 are available at: http://www.gnu.org/licenses/ ======================================================================== */ package sf.util; import static sf.util.Utility.isBlank; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import java.util.Optional; import java.util.Properties; import java.util.logging.Level; import java.util.regex.Pattern; public class RegularExpressionColorMap { private static final SchemaCrawlerLogger LOGGER = SchemaCrawlerLogger .getLogger(RegularExpressionColorMap.class.getName()); private final Map<Pattern, Color> colorMap; public RegularExpressionColorMap() { colorMap = new HashMap<>(); } public RegularExpressionColorMap(final Properties properties) { this(); if (properties == null || properties.isEmpty()) { return; } for (final Entry<Object, Object> match: properties.entrySet()) { if (match != null) { final Object key = match.getKey(); final Object value = match.getValue(); if (key != null && value != null) { final String regExpPattern = value.toString(); final String htmlColor = key.toString(); if (!isBlank(regExpPattern) && !isBlank(htmlColor) && htmlColor.length() == 6) { put(regExpPattern, "#" + htmlColor); } else { LOGGER .log(Level.CONFIG, new StringFormat("Could not add color mapping for %s = %s", regExpPattern, htmlColor)); } } } } } public Optional<Color> match(final String value) { for (final Entry<Pattern, Color> entry: colorMap.entrySet()) { final Pattern pattern = entry.getKey(); if (pattern.matcher(value).matches()) { return Optional.of(entry.getValue()); } } return Optional.empty(); } public void put(final String regExpPattern, final String htmlColor) { try { if (isBlank(regExpPattern)) { throw new IllegalArgumentException("No regular expression pattern provided"); } final Pattern pattern = Pattern.compile(regExpPattern, 0); final Color color = Color.fromHexTriplet(htmlColor); colorMap.put(pattern, color); } catch (final Exception e) { LOGGER.log(Level.CONFIG, new StringFormat("Could not add color mapping for %s = %s", regExpPattern, htmlColor), e); } } public void putLiteral(final String literal, final Color color) { try { if (isBlank(literal)) { throw new IllegalArgumentException("No literal key provided"); } final Pattern pattern = Pattern.compile(literal, Pattern.LITERAL); colorMap.put(pattern, color); } catch (final Exception e) { LOGGER .log(Level.CONFIG, new StringFormat("Could not add literal color mapping for %s = %s", literal, color), e); } } public int size() { return colorMap.size(); } @Override public String toString() { return Objects.toString(colorMap); } }
[ "sualeh@hotmail.com" ]
sualeh@hotmail.com