blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
sequencelengths
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
sequencelengths
1
1
author_id
stringlengths
1
79
1afec16762ef9d49b6f7469750b502d1c6aabbf8
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/file_NoCallsException_php.java
37e786027f78126760b7f53b077bcfcf85741e72
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,154
java
package com.project.convertedCode.includes.vendor.phpspec.prophecy.src.Prophecy.Exception.Prediction; import com.runtimeconverter.runtime.RuntimeStack; import com.runtimeconverter.runtime.interfaces.ContextConstants; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.IncludeEventException; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php */ public class file_NoCallsException_php implements RuntimeIncludable { public static final file_NoCallsException_php instance = new file_NoCallsException_php(); public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException { Scope2451 scope = new Scope2451(); stack.pushScope(scope); this.include(env, stack, scope); stack.popScope(); } public final void include(RuntimeEnv env, RuntimeStack stack, Scope2451 scope) throws IncludeEventException { // Namespace import was here // Conversion Note: class named NoCallsException was here in the source code env.addManualClassLoad("Prophecy\\Exception\\Prediction\\NoCallsException"); } private static final ContextConstants runtimeConverterContextContantsInstance = new ContextConstants() .setDir("/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction") .setFile( "/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php"); public ContextConstants getContextConstants() { return runtimeConverterContextContantsInstance; } private static class Scope2451 implements UpdateRuntimeScopeInterface { public void updateStack(RuntimeStack stack) {} public void updateScope(RuntimeStack stack) {} } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
0d568fd23f31216a4cf76e56caa3568ee29afcb9
1e0d2613af81362370a59fc99bde1429088d4f2c
/src/test/java/tests/java/nio/file/FilesTest.java
03ae1e5cae783b3b88940e5dc558246b97d426d7
[ "Apache-2.0" ]
permissive
jjYBdx4IL/java-evaluation
3134605ae4a666cabf41494dd4261a0d21585a16
744dc4f4a26e264eb1aeab9383babb505aeae056
refs/heads/master
2021-07-01T16:25:16.416416
2021-06-19T14:44:44
2021-06-19T14:44:44
88,812,127
3
3
null
null
null
null
UTF-8
Java
false
false
658
java
package tests.java.nio.file; import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; import java.nio.file.Files; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Test; import com.github.jjYBdx4IL.utils.env.Maven; /** * * @author Github jjYBdx4IL Projects */ public class FilesTest { private static final File TEMP_DIR = Maven.getTempTestDir(FilesTest.class); @Before public void beforeTest() throws IOException { FileUtils.cleanDirectory(TEMP_DIR); } @Test public void testExists() { assertTrue(Files.exists(TEMP_DIR.toPath())); } }
[ "jjYBdx4IL@github.com" ]
jjYBdx4IL@github.com
a35d6db93c09a4bf998c94c84130f66df6bd5afd
25aa09263571a5074d3bd5655e83429b12103d6f
/EjerciciosJDBC/src/ej10_manipulacion_de_datos/InsertarDep.java
78a15fbbc37ce4a0fab6f3f2b018afffd8a3e011
[]
no_license
gasparpd/ADT
3de815cacf6a47f20244dfbc77243a4f8d4518c8
4fa498dfe7c2c631b6b76f20668b10d0b28ab6c2
refs/heads/master
2022-07-20T23:56:23.857092
2020-03-20T20:12:46
2020-03-20T20:12:46
233,665,830
0
0
null
2022-06-21T04:13:02
2020-01-13T18:33:55
Java
ISO-8859-1
Java
false
false
1,803
java
package ej10_manipulacion_de_datos; import java.sql.*; public class InsertarDep { public static void main(String[] args) { try { Class.forName("com.mysql.jdbc.Driver");// Cargar el driver // Establecemos la conexion con la BD Connection conexion = DriverManager.getConnection ("jdbc:mysql://localhost/ejemplo", "ejemplo", "ejemplo"); /*Class.forName("oracle.jdbc.driver.OracleDriver"); Connection conexion = DriverManager .getConnection("jdbc:oracle:thin:@localhost:1521:XE", "ejemplo", "ejemplo"); */ // recuperar argumentos de main String dep = args[0]; // num. departamento String dnombre = args[1]; // nombre String loc = args[2]; // localidad //construir orden INSERT String sql = String.format("INSERT INTO departamentos VALUES (%s, '%s', '%s')", dep,dnombre,loc); System.out.println(sql); //https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html System.out.println(sql); Statement sentencia = conexion.createStatement(); int filas=0; try { filas = sentencia.executeUpdate(sql.toString()); System.out.println("Filas afectadas: " + filas); } catch (SQLException e) { //e.printStackTrace(); System.out.printf("HA OCURRIDO UNA EXCEPCIÓN:%n"); System.out.printf("Mensaje : %s %n", e.getMessage()); System.out.printf("SQL estado: %s %n", e.getSQLState()); System.out.printf("Cód error : %s %n", e.getErrorCode()); } sentencia.close(); // Cerrar Statement conexion.close(); // Cerrar conexión } catch (ClassNotFoundException cn) { cn.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } }// fin de main }// fin de la clase
[ "you@example.com" ]
you@example.com
59764ab0ba269ba5ee1776223f10abce977ef645
696aa05ec959063d58807051902d8e2c48a989b9
/ole-docstore/ole-docstore-engine/src/test/java/org/kuali/ole/docstore/util/DocStoreEnvUtil_UT.java
332a79ac673b353f51f6667da91a2676a45c83fb
[]
no_license
sheiksalahudeen/ole-30-sprint-14-intermediate
3e8bcd647241eeb741d7a15ff9aef72f8ad34b33
2aef659b37628bd577e37077f42684e0977e1d43
refs/heads/master
2023-01-09T00:59:02.123787
2017-01-26T06:09:02
2017-01-26T06:09:02
80,089,548
0
0
null
2023-01-02T22:05:38
2017-01-26T05:47:58
PLSQL
UTF-8
Java
false
false
1,712
java
package org.kuali.ole.docstore.util; import org.junit.Test; import org.kuali.ole.BaseTestCase; import java.io.IOException; import java.util.Properties; /** * Created with IntelliJ IDEA. * User: ? * Date: 1/21/13 * Time: 5:04 PM * To change this template use File | Settings | File Templates. */ public class DocStoreEnvUtil_UT extends BaseTestCase { @Test public void testDocStoreEnvUtil() throws IOException { DocStoreEnvUtil docStoreEnvUtil = new DocStoreEnvUtil(); docStoreEnvUtil.getDocStorePropertiesFilePath(); docStoreEnvUtil.setDocStorePropertiesFilePath(docStoreEnvUtil.getDocStorePropertiesFilePath()); docStoreEnvUtil.getDocStorePropertiesFolderPath(); docStoreEnvUtil.setDocStorePropertiesFolderPath(docStoreEnvUtil.getDocStorePropertiesFolderPath()); // docStoreEnvUtil.getJackrabbitConfigFolderPath(); // docStoreEnvUtil.setJackrabbitConfigFolderPath(docStoreEnvUtil.getJackrabbitConfigFolderPath()); // docStoreEnvUtil.getJackrabbitPropertyFilePath(); // docStoreEnvUtil.setJackrabbitPropertyFilePath(docStoreEnvUtil.getJackrabbitPropertyFilePath()); // docStoreEnvUtil.getJackrabbitFolderPath(); // docStoreEnvUtil.setJackrabbitFolderPath(docStoreEnvUtil.getJackrabbitFolderPath()); docStoreEnvUtil.setRootFolderPath(docStoreEnvUtil.getRootFolderPath()); docStoreEnvUtil.setVendor("derby"); docStoreEnvUtil.setProperties(new Properties()); docStoreEnvUtil.initTestEnvironment(); docStoreEnvUtil.initEnvironment(); docStoreEnvUtil.getRootFolderPath(); docStoreEnvUtil.logEnvironment(); docStoreEnvUtil.printEnvironment(); } }
[ "sheiksalahudeen.m@kuali.org" ]
sheiksalahudeen.m@kuali.org
3387c862ae81598528975f639807b300418d0f20
83c2f56955a0c338e0c60db13ab7379ef106ca79
/src/main/java/com/badlogic/gdx/graphics/glutils/IndexArray.java
cab14fba454f6a67226519132923e71ec020a0d1
[]
no_license
Harium/propan-gdx-util
36b625bc2454861f618c4892424c9622fa0d56f9
4065ae04a569c01f65aa4550c32545483f3c02c9
refs/heads/master
2021-09-10T23:03:46.234187
2018-04-03T21:26:12
2018-04-03T21:26:12
100,196,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,004
java
/******************************************************************************* * Copyright 2011 See AUTHORS file. * * 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.badlogic.gdx.graphics.glutils; import com.badlogic.gdx.utils.BufferUtils; import java.nio.ByteBuffer; import java.nio.ShortBuffer; public class IndexArray implements IndexData { final ShortBuffer buffer; final ByteBuffer byteBuffer; // used to work around bug: https://android-review.googlesource.com/#/c/73175/ private final boolean empty; /** Creates a new IndexArray to be used with vertex arrays. * * @param maxIndices the maximum number of indices this buffer can hold */ public IndexArray (int maxIndices) { empty = maxIndices == 0; if (empty) { maxIndices = 1; // avoid allocating a zero-sized buffer because of bug in Android's ART < Android 5.0 } byteBuffer = BufferUtils.newUnsafeByteBuffer(maxIndices * 2); buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); } /** @return the number of indices currently stored in this buffer */ public int getNumIndices () { return empty ? 0 : buffer.limit(); } /** @return the maximum number of indices this IndexArray can store. */ public int getNumMaxIndices () { return empty ? 0 : buffer.capacity(); } /** <p> * Sets the indices of this IndexArray, discarding the old indices. The count must equal the number of indices to be copied to * this IndexArray. * </p> * * <p> * This can be called in between calls to {@link #bind()} and {@link #unbind()}. The index data will be updated instantly. * </p> * * @param indices the vertex data * @param offset the offset to start copying the data from * @param count the number of shorts to copy */ public void setIndices (short[] indices, int offset, int count) { buffer.clear(); buffer.put(indices, offset, count); buffer.flip(); byteBuffer.position(0); byteBuffer.limit(count << 1); } public void setIndices (ShortBuffer indices) { int pos = indices.position(); buffer.clear(); buffer.limit(indices.remaining()); buffer.put(indices); buffer.flip(); indices.position(pos); byteBuffer.position(0); byteBuffer.limit(buffer.limit() << 1); } @Override public void updateIndices (int targetOffset, short[] indices, int offset, int count) { final int pos = byteBuffer.position(); byteBuffer.position(targetOffset * 2); BufferUtils.copy(indices, offset, byteBuffer, count); byteBuffer.position(pos); } /** <p> * Returns the underlying ShortBuffer. If you modify the buffer contents they wil be uploaded on the call to {@link #bind()}. * If you need immediate uploading use {@link #setIndices(short[], int, int)}. * </p> * * @return the underlying short buffer. */ public ShortBuffer getBuffer () { return buffer; } /** Binds this IndexArray for rendering with glDrawElements. */ public void bind () { } /** Unbinds this IndexArray. */ public void unbind () { } /** Invalidates the IndexArray so a new OpenGL buffer handle is created. Use this in case of a context loss. */ public void invalidate () { } /** Disposes this IndexArray and all its associated OpenGL resources. */ public void dispose () { BufferUtils.disposeUnsafeByteBuffer(byteBuffer); } }
[ "yuripourre@gmail.com" ]
yuripourre@gmail.com
b2afc1d2aebeb995e51222168c288a66d4ee8348
affe223efe18ba4d5e676f685c1a5e73caac73eb
/clients/utilities/src/main/java/com/intalio/vmware/general/package-info.java
fab533468234f1e08dfcd178dd76a692e43f3663
[]
no_license
RohithEngu/VM27
486f6093e0af2f6df1196115950b0d978389a985
f0f4f177210fd25415c2e058ec10deb13b7c9247
refs/heads/master
2021-01-16T00:42:30.971054
2009-08-14T19:58:16
2009-08-14T19:58:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
291
java
/** * Several sample applications that demonstrate a variety of inventory operations, * such as connecting to the server (Connect), browsing the inventory (Browse), * and moving an entity from one location in the inventory to another (Move). */ package com.intalio.vmware.general;
[ "sankarachary@intalio.com" ]
sankarachary@intalio.com
dc4436f2292dac749fcf6e7e4b27431350de11e3
40dd2c2ba934bcbc611b366cf57762dcb14c48e3
/RI_Stack/jvm/security/gnu-crypto/source/gnu/crypto/jce/sig/DSSRawSignatureSpi.java
023038c4f99339efa7db240655de05a482fd5e7b
[]
no_license
amirna2/OCAP-RI
afe0d924dcf057020111406b1d29aa2b3a796e10
254f0a8ebaf5b4f09f4a7c8f4961e9596c49ccb7
refs/heads/master
2020-03-10T03:22:34.355822
2018-04-11T23:08:49
2018-04-11T23:08:49
129,163,048
0
0
null
null
null
null
UTF-8
Java
false
false
2,963
java
package gnu.crypto.jce.sig; // ---------------------------------------------------------------------------- // $Id: DSSRawSignatureSpi.java,v 1.2 2005/10/06 04:24:16 rsdio Exp $ // // Copyright (C) 2001, 2002, Free Software Foundation, Inc. // // This file is part of GNU Crypto. // // GNU Crypto 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, or (at your option) // any later version. // // GNU Crypto 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; see the file COPYING. If not, write to the // // Free Software Foundation Inc., // 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301 // USA // // Linking this library statically or dynamically with other modules is // making a combined work based on this library. Thus, the terms and // conditions of the GNU General Public License cover the whole // combination. // // As a special exception, the copyright holders of this library give // you permission to link this library 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 library. If you modify this // library, you may extend this exception to your version of the // library, but you are not obligated to do so. If you do not wish to // do so, delete this exception statement from your version. // ---------------------------------------------------------------------------- import gnu.crypto.Registry; import gnu.crypto.sig.dss.DSSSignatureRawCodec; /** * The implementation of <i>Service Provider Interface</i> (<b>SPI</b>) adapter * for the DSS (Digital Signature Standard) signature scheme, encoded and/or * decoded in RAW format.<p> * * @version $Revision: 33112 $ */ public class DSSRawSignatureSpi extends SignatureAdapter { // Constants and variables // ------------------------------------------------------------------------- // Constructor(s) // ------------------------------------------------------------------------- public DSSRawSignatureSpi() { super(Registry.DSS_SIG, new DSSSignatureRawCodec()); } // Class methods // ------------------------------------------------------------------------- // Instance methods // ------------------------------------------------------------------------- }
[ "amir.nathoo@ubnt.com" ]
amir.nathoo@ubnt.com
da6a663d5a0523c5384a78e08a47eb405e658c89
cb8d3696c404f489a92d98c820ffe1b67678f669
/dynamic-proxy/src/main/java/com/zwd/example/SpringApplication.java
9849ede222bdffe791f6e31e34ef6a5f90336855
[]
no_license
chenglinjava68/spring-examples
3dabae67d0523e43e7985c4cdc2eefba475e6c86
f39abb830751db310da1fe160bc73ef1f44569d8
refs/heads/master
2020-04-14T15:53:19.953747
2018-12-18T01:02:11
2018-12-18T01:02:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
503
java
package com.zwd.example; import java.lang.reflect.Proxy; public class SpringApplication { public static void main(String[] args) { LogicClassFir logicClassFir = new LogicClassFir(); ProxyService targetService = new ProxyServiceImpl(); ProxyService proxyService = (ProxyService) Proxy.newProxyInstance(ProxyCreator.class.getClassLoader(), new Class[]{ProxyService.class},new ProxyCreator(targetService,logicClassFir)); proxyService.testProxy(); } }
[ "810095178@qq.com" ]
810095178@qq.com
31d3c4b69f46590054a82c878332aa0fdcefcecc
79a68dbd94ff1261c778f65b9e4c9ce55920ed36
/teach_materials/src/com/zs/weixin/mp/bean/WxMpXmlOutVoiceMessage.java
867a3e97526870257c5cf05f7b092ab758853b07
[]
no_license
Allen5413/tm
e6ca0f6c509fb163e391265c65094ab6fdcbb663
595d44ccc787588f0995d5769908e12c3c6b387f
refs/heads/master
2021-01-23T09:33:16.232580
2019-11-26T13:50:25
2019-11-26T13:50:25
34,732,908
0
0
null
null
null
null
UTF-8
Java
false
false
672
java
package com.zs.weixin.mp.bean; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamConverter; import com.zs.weixin.common.api.WxConsts; import com.zs.weixin.common.util.xml.XStreamMediaIdConverter; @XStreamAlias("xml") public class WxMpXmlOutVoiceMessage extends WxMpXmlOutMessage { @XStreamAlias("Voice") @XStreamConverter(value = XStreamMediaIdConverter.class) private String mediaId; public WxMpXmlOutVoiceMessage() { this.msgType = WxConsts.XML_MSG_VOICE; } public String getMediaId() { return mediaId; } public void setMediaId(String mediaId) { this.mediaId = mediaId; } }
[ "2319772333@qq.com" ]
2319772333@qq.com
51b129c8da81b275c5968351f9793c75d87ceb45
6369a01f0d8f4727bdb6c7e556211e44eb5f1e72
/src/test/java/com/github/marschall/memoryfilesystem/FileSystemRule.java
b7c8dc9d1cc63c686d8e5c496c1e3c4d3b90e84e
[]
no_license
ferstl/memoryfilesystem
3a61c2a53e400373c0d25d81f9ef2fcfad6e83f6
248f766591f50bca8a46db1917ed15c2b6ee8714
refs/heads/master
2021-01-17T20:26:06.414623
2019-01-05T15:48:42
2019-01-05T15:48:42
45,345,697
0
0
null
2015-11-01T15:26:21
2015-11-01T15:26:21
null
UTF-8
Java
false
false
758
java
package com.github.marschall.memoryfilesystem; import java.nio.file.FileSystem; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; final class FileSystemRule implements TestRule { private FileSystem fileSystem; FileSystem getFileSystem() { return this.fileSystem; } @Override public Statement apply(final Statement base, Description description) { return new Statement() { @Override public void evaluate() throws Throwable { FileSystemRule.this.fileSystem = MemoryFileSystemBuilder.newEmpty().build("name"); try { base.evaluate(); } finally { FileSystemRule.this.fileSystem.close(); } } }; } }
[ "philippe.marschall@gmail.com" ]
philippe.marschall@gmail.com
6c27f47aecc7e9e0c1d488d5d9dc17b20d647368
de7b67d4f8aa124f09fc133be5295a0c18d80171
/workspace/ActiveMQ-5.5-Spring/src/com/springactivemq/HelloSender.java
5efd59ddee2f05a7cd8e6461726c44ceb1e02305
[]
no_license
lin-lee/eclipse_workspace_test
adce936e4ae8df97f7f28965a6728540d63224c7
37507f78bc942afb11490c49942cdfc6ef3dfef8
refs/heads/master
2021-05-09T10:02:55.854906
2018-01-31T07:19:02
2018-01-31T07:19:02
119,460,523
0
1
null
null
null
null
UTF-8
Java
false
false
999
java
package com.springactivemq; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.Session; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; public class HelloSender { public static void main(String [] args){ ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext-jms.xml"); JmsTemplate template = (JmsTemplate)applicationContext.getBean("jmsTemplate"); Destination destination = (Destination)applicationContext.getBean("destination"); template.send(destination, new MessageCreator(){ public Message createMessage(Session session)throws JMSException{ return session.createTextMessage("发送消息:Hello ActionMQ Text Messaage2!"); } }); System.out.println("成功发送了一条JMS消息"); } }
[ "lilin@lvmama.com" ]
lilin@lvmama.com
ed87fbeec14f61c9979f966ad8e5da13d4ee1b2a
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/2005_1.java
22ced82c7fff1be224537eee5666866acc9243cc
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
836
java
//,temp,TestDistCpViewFs.java,354,374,temp,TestIntegration.java,396,417 //,3 public class xxx { @Test public void testUpdateGlobTargetMissingSingleLevel() { try { Path listFile = new Path("target/tmp1/listing").makeQualified(fs.getUri(), fs.getWorkingDirectory()); addEntries(listFile, "*"); createFiles("multifile/file3", "multifile/file4", "multifile/file5"); createFiles("singledir/dir2/file6"); runTest(listFile, target, false, true); checkResult(target, 4, "file3", "file4", "file5", "dir2/file6"); } catch (IOException e) { LOG.error("Exception encountered while running distcp", e); Assert.fail("distcp failure"); } finally { TestDistCpUtils.delete(fs, root); TestDistCpUtils.delete(fs, "target/tmp1"); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
1149902ccc9deab6e892e778ffe8e48b85e83ddc
1d68f0e3655fbb687c1c008d638bc94056951cc0
/com.qbao.recommend.stream/src/main/java/com/qbao/recommend/stream/cmp/parser/binlog/CartBinLogParser.java
eaa57df04f5738a9d78bb91a9896cfd7f599963a
[]
no_license
jackandyao/com.qbao.common.parent
47fa5485e6763b3f04f3566153b82b3f94a790a2
a94595b88aacee9c66324e75ff4267001e3bb383
refs/heads/master
2021-05-09T02:55:50.583922
2018-01-28T03:45:06
2018-01-28T03:45:06
119,225,146
0
0
null
null
null
null
UTF-8
Java
false
false
1,021
java
/** * */ package com.qbao.recommend.stream.cmp.parser.binlog; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.qbao.recommend.stream.cmp.domain.nginx.Record; import com.qbao.recommend.stream.cmp.enums.EventType; import com.qbao.recommend.stream.cmp.enums.TopicType; import com.qbao.recommend.stream.cmp.parser.KafkaParser; /** * @author sjwangping@qbao.com * * $LastChangedDate: 2016-09-05 18:26:32 +0800 (Mon, 05 Sep 2016) $ * $LastChangedRevision: 896 $ * $LastChangedBy: jiahongping $ */ public class CartBinLogParser extends KafkaParser<Record> { private Gson gson = new GsonBuilder().serializeNulls().create(); public CartBinLogParser(TopicType type) { super(type); } @Override public Record parse(String line) { // TODO Auto-generated method stub return null; } @Override public EventType getEventType() { // TODO Auto-generated method stub return null; } }
[ "786648643@qq.com" ]
786648643@qq.com
2e1cc31edf75232588b5d9c030da67921f153843
af8f2d1b600d794aea496f5f8005a20ed016960b
/system/trunk/src/java/net/zdsoft/eis/system/frame/dao/FlowDiagramDao.java
8a84160fa262e4d82299f2fc8a2967abf15b8a03
[]
no_license
thyjxcf/learn
46c033f8434c0b0b0809e2a6b1d5601910b36c0d
99b9e04aa9c0e7ee00571dffb8735283cf33b1c1
refs/heads/master
2021-01-06T20:43:53.071081
2017-09-15T10:11:53
2017-09-15T10:11:53
99,546,817
0
0
null
null
null
null
UTF-8
Java
false
false
325
java
package net.zdsoft.eis.system.frame.dao; import java.util.List; import net.zdsoft.eis.system.frame.entity.FlowDiagram; public interface FlowDiagramDao { /** * 获取其流程图List * @param subSystem * @param unitClass * @return */ public List<FlowDiagram> getFlowDiagramList(int subSystem,int unitClass); }
[ "1129820421@qq.com" ]
1129820421@qq.com
de04a45aa0ea06f03455d965cf9277684acb7114
22012491da3f71140d3b8548eb59905baf95a7e0
/com/planet_ink/coffee_mud/Locales/UnderWaterThinGrid.java
a772b474bdbc3f33176ba628a3493fd01869f06e
[ "Apache-2.0" ]
permissive
griffenliu/CoffeeMud
01018dac96d0381ad27cb49e4e5e89557e2c6247
6fb04b990dc6528b01ca8e707a90e752a8310267
refs/heads/master
2020-03-23T02:38:38.136327
2018-07-15T02:18:23
2018-07-15T02:18:23
140,245,931
0
0
Apache-2.0
2018-07-09T07:15:15
2018-07-09T07:15:15
null
UTF-8
Java
false
false
5,671
java
package com.planet_ink.coffee_mud.Locales; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2004-2018 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class UnderWaterThinGrid extends StdThinGrid { @Override public String ID() { return "UnderWaterThinGrid"; } public UnderWaterThinGrid() { super(); basePhyStats().setDisposition(basePhyStats().disposition()|PhyStats.IS_SWIMMING); basePhyStats.setWeight(3); recoverPhyStats(); setDisplayText("Under the water"); setDescription(""); xsize=CMProps.getIntVar(CMProps.Int.SKYSIZE); ysize=CMProps.getIntVar(CMProps.Int.SKYSIZE); if(xsize<0) xsize=xsize*-1; if(ysize<0) ysize=ysize*-1; if((xsize==0)||(ysize==0)) { xsize=3; ysize=3; } climask=Places.CLIMASK_WET; atmosphere=RawMaterial.RESOURCE_FRESHWATER; } @Override public int domainType() { return Room.DOMAIN_OUTDOORS_UNDERWATER; } @Override protected int baseThirst() { return 0; } @Override public CMObject newInstance() { if(!CMSecurity.isDisabled(CMSecurity.DisFlag.THINGRIDS)) return super.newInstance(); return new UnderWaterGrid().newInstance(); } @Override public String getGridChildLocaleID() { return "UnderWater"; } @Override public void affectPhyStats(final Physical affected, final PhyStats affectableStats) { super.affectPhyStats(affected,affectableStats); affectableStats.setDisposition(affectableStats.disposition()|PhyStats.IS_SWIMMING); } @Override public List<Integer> resourceChoices() { return UnderWater.roomResources; } @Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { switch(UnderWater.isOkUnderWaterAffect(this,msg)) { case -1: return false; case 1: return true; } return super.okMessage(myHost,msg); } @Override public void executeMsg(final Environmental myHost, final CMMsg msg) { super.executeMsg(myHost,msg); UnderWater.sinkAffects(this,msg); } @Override protected void fillExitsOfGridRoom(Room R, int x, int y) { super.fillExitsOfGridRoom(R,x,y); if((x<0)||(y<0)||(y>=yGridSize())||(x>=xGridSize())) return; // the adjacent rooms created by this method should also take // into account the possibility that they are on the edge. // it does NOT if(ox==null) ox=CMClass.getExit("Open"); Room R2=null; if(R.rawDoors()[Directions.UP]==null) { if((y==0)&&(rawDoors()[Directions.UP]!=null)&&(exits[Directions.UP]!=null)) linkRoom(R,rawDoors()[Directions.UP],Directions.UP,exits[Directions.UP],exits[Directions.UP]); else if(y>0) { R2=getMakeSingleGridRoom(x,y-1); if(R2!=null) linkRoom(R,R2,Directions.UP,ox,ox); } else if(x>0) { R2=getMakeSingleGridRoom(x-1,yGridSize()-1); if(R2!=null) linkRoom(R,R2,Directions.UP,ox,ox); } else { R2=getMakeSingleGridRoom(xGridSize()-1,yGridSize()-1); if(R2!=null) linkRoom(R,R2,Directions.UP,ox,ox); } } if(R.rawDoors()[Directions.DOWN]==null) { if((y==yGridSize()-1)&&(rawDoors()[Directions.DOWN]!=null)&&(exits[Directions.DOWN]!=null)) linkRoom(R,rawDoors()[Directions.DOWN],Directions.DOWN,exits[Directions.DOWN],exits[Directions.DOWN]); else if(y<yGridSize()-1) { R2=getMakeSingleGridRoom(x,y+1); if(R2!=null) linkRoom(R,R2,Directions.DOWN,ox,ox); } else if(x<xGridSize()-1) { R2=getMakeSingleGridRoom(x+1,0); if(R2!=null) linkRoom(R,R2,Directions.DOWN,ox,ox); } } if((y==0)&&(R.rawDoors()[Directions.NORTH]==null)) { R2=getMakeSingleGridRoom(x,yGridSize()-1); if(R2!=null) linkRoom(R,R2,Directions.NORTH,ox,ox); } else if((y==yGridSize()-1)&&(R.rawDoors()[Directions.SOUTH]==null)) { R2=getMakeSingleGridRoom(x,0); if(R2!=null) linkRoom(R,R2,Directions.SOUTH,ox,ox); } if((x==0)&&(R.rawDoors()[Directions.WEST]==null)) { R2=getMakeSingleGridRoom(xGridSize()-1,y); if(R2!=null) linkRoom(R,R2,Directions.WEST,ox,ox); } else if((x==xGridSize()-1)&&(R.rawDoors()[Directions.EAST]==null)) { R2=getMakeSingleGridRoom(0,y); if(R2!=null) linkRoom(R,R2,Directions.EAST,ox,ox); } } }
[ "bo@zimmers.net" ]
bo@zimmers.net
a7847a14bd401f7f4b7d6005695c9da6eca44c30
a363c46e7cbb080db2b3a69a70ebf912195e25c7
/ls-modules/ls-business/src/main/java/cn/lonsun/system/systemlog/internal/service/ICmsLogService.java
eaf315322aaa3ea9612074fe2c0ac49cc7338113
[]
no_license
pologood/excms
601646dd7ea4f58f8423da007413978192090f8d
e1c03f574d0ecbf0200aaffa7facf93841bab02c
refs/heads/master
2020-05-14T20:07:22.979151
2018-10-06T10:51:37
2018-10-06T10:51:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,470
java
package cn.lonsun.system.systemlog.internal.service; import java.util.Date; import java.util.List; import cn.lonsun.core.base.service.IMockService; import cn.lonsun.core.util.Pagination; import cn.lonsun.system.systemlog.internal.entity.CmsLogEO; /** * * @ClassName: ICmsLogService * @Description: 操作日志业务逻辑层 * @author Hewbing * @date 2015年8月25日 上午10:54:22 * */ public interface ICmsLogService extends IMockService<CmsLogEO> { /** * 日志添加 * * @param description 内容 * @param caseType 业务对象类型,例如:UserEO * @param operation 操作,例如:LogEO.Operation.Add.toString(),//新增操作 */ public void recLog(String description, String caseType, String operation); /** * 日志删除 * * @param logId 日志ID */ public void deleteLog(Long logId); /** * 日志查询 * * @param request * @param pageIndex * @param pageSize * @param startDate * @param endDate * @param type * @param key * @return */ public Pagination getPage(Long pageIndex, Integer pageSize, Date startDate, Date endDate, String type, String key,Long siteId); /** * 获取所有日志 * @param startDate * @param endDate * @param type * @param key * @return */ public List<CmsLogEO> getAllLogs(Date startDate, Date endDate, String type, String key,Long siteId); }
[ "2885129077@qq.com" ]
2885129077@qq.com
5e37ec4cf82f53604464daa87df761ab557a4574
64995981fe2fbd07cce5ca7a3ba7b2d8183114eb
/zhao_sheng/build/generated/source/apt/debug/com/yfy/app/delay_service/DelayAdminToTeaEventActivity$$ViewBinder.java
f95b133d9de6c127f88972767b9eacaff1d9e9a0
[]
no_license
Zhaoxianxv/zhao_sheng_old_one
f34b71d48f7c671c2005c254e4cf2eb8818b27a7
94ca6b035546778b264ce89399e3e8aedde5bb45
refs/heads/master
2022-12-06T15:47:46.156918
2020-09-03T10:14:14
2020-09-03T10:14:14
292,534,564
0
0
null
null
null
null
UTF-8
Java
false
false
2,956
java
// Generated code from Butter Knife. Do not modify! package com.yfy.app.delay_service; import android.view.View; import butterknife.ButterKnife.Finder; public class DelayAdminToTeaEventActivity$$ViewBinder<T extends com.yfy.app.delay_service.DelayAdminToTeaEventActivity> extends com.yfy.base.activity.BaseActivity$$ViewBinder<T> { @Override public void bind(final Finder finder, final T target, Object source) { super.bind(finder, target, source); View view; view = finder.findRequiredView(source, 2131296578, "field 'multi'"); target.multi = finder.castView(view, 2131296578, "field 'multi'"); view = finder.findRequiredView(source, 2131296577, "field 'date_show'"); target.date_show = finder.castView(view, 2131296577, "field 'date_show'"); view = finder.findRequiredView(source, 2131296583, "field 'event_site'"); target.event_site = finder.castView(view, 2131296583, "field 'event_site'"); view = finder.findRequiredView(source, 2131296584, "field 'tea_name' and method 'setChoiceTea'"); target.tea_name = finder.castView(view, 2131296584, "field 'tea_name'"); view.setOnClickListener( new butterknife.internal.DebouncingOnClickListener() { @Override public void doClick( android.view.View p0 ) { target.setChoiceTea(); } }); view = finder.findRequiredView(source, 2131296582, "field 'repleace_layout'"); target.repleace_layout = finder.castView(view, 2131296582, "field 'repleace_layout'"); view = finder.findRequiredView(source, 2131296581, "field 'replace_tea' and method 'setChoiceReplaceTea'"); target.replace_tea = finder.castView(view, 2131296581, "field 'replace_tea'"); view.setOnClickListener( new butterknife.internal.DebouncingOnClickListener() { @Override public void doClick( android.view.View p0 ) { target.setChoiceReplaceTea(); } }); view = finder.findRequiredView(source, 2131296576, "field 'class_name'"); target.class_name = finder.castView(view, 2131296576, "field 'class_name'"); view = finder.findRequiredView(source, 2131296580, "field 'content_edit'"); target.content_edit = finder.castView(view, 2131296580, "field 'content_edit'"); view = finder.findRequiredView(source, 2131296579, "field 'num_edit'"); target.num_edit = finder.castView(view, 2131296579, "field 'num_edit'"); view = finder.findRequiredView(source, 2131296585, "field 'type_layout'"); target.type_layout = finder.castView(view, 2131296585, "field 'type_layout'"); } @Override public void unbind(T target) { super.unbind(target); target.multi = null; target.date_show = null; target.event_site = null; target.tea_name = null; target.repleace_layout = null; target.replace_tea = null; target.class_name = null; target.content_edit = null; target.num_edit = null; target.type_layout = null; } }
[ "1006584058@qq.com" ]
1006584058@qq.com
3ae67b1850bef10d682e7d32d2a58990c60c59b6
1ea4406414e9113b0316c114a17556d5344d4949
/src/ro/nextreports/server/web/core/ErrorPanel.java
14a24bc15581193a0d6e2faa6d05c9efc0526755
[ "Apache-2.0", "MIT" ]
permissive
nextreports/nextreports-server
34039167a0bd4f22d13b26d35b131ab886a300d9
0a6b5bde7cb6228a16e7109aaaac8595155c492e
refs/heads/master
2023-07-10T23:40:50.158795
2023-06-30T17:25:32
2023-06-30T17:25:32
12,408,453
30
21
Apache-2.0
2023-06-30T17:25:33
2013-08-27T14:37:09
Java
UTF-8
Java
false
false
1,668
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 ro.nextreports.server.web.core; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.panel.Panel; public class ErrorPanel extends Panel { private static final long serialVersionUID = 1L; public ErrorPanel(String id, String message) { super(id); add(new Label("message", "Error: " + message)); add(new AjaxLink<Void>("cancel") { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { back(target); } }); } private void back(AjaxRequestTarget target) { EntityBrowserPanel panel = findParent(EntityBrowserPanel.class); panel.backwardWorkspace(target); } }
[ "decebal.suiu@gmail.com" ]
decebal.suiu@gmail.com
7bb281b1e98685c6548d496fa64653c95eaeaaf9
e1d928d38b0abe6be9d1cc22347de8d06c74436e
/jmetal-component/src/test/java/org/uma/jmetal/component/algorithm/multiobjective/SMPSOBuilderIT.java
77a75782dc5a71246ae54c3f2aab69dab99881b8
[ "MIT" ]
permissive
dongzhiming/jMetal
d8132386af6988e38fa399f2ea02076f93af7075
7a40faa22298291ff155137a838da8bed9a7f8f4
refs/heads/master
2023-01-03T03:59:20.787752
2022-12-23T09:34:23
2022-12-23T09:34:23
185,506,721
0
0
MIT
2022-02-04T06:22:47
2019-05-08T01:44:46
Java
UTF-8
Java
false
false
4,423
java
package org.uma.jmetal.component.algorithm.multiobjective; import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.util.List; import org.junit.jupiter.api.Test; import org.uma.jmetal.component.algorithm.ParticleSwarmOptimizationAlgorithm; import org.uma.jmetal.component.catalogue.common.evaluation.Evaluation; import org.uma.jmetal.component.catalogue.common.evaluation.impl.SequentialEvaluationWithArchive; import org.uma.jmetal.component.catalogue.common.termination.Termination; import org.uma.jmetal.component.catalogue.common.termination.impl.TerminationByEvaluations; import org.uma.jmetal.operator.mutation.impl.PolynomialMutation; import org.uma.jmetal.problem.Problem; import org.uma.jmetal.problem.ProblemFactory; import org.uma.jmetal.problem.doubleproblem.DoubleProblem; import org.uma.jmetal.qualityindicator.QualityIndicator; import org.uma.jmetal.qualityindicator.impl.hypervolume.impl.PISAHypervolume; import org.uma.jmetal.solution.doublesolution.DoubleSolution; import org.uma.jmetal.util.NormalizeUtils; import org.uma.jmetal.util.SolutionListUtils; import org.uma.jmetal.util.VectorUtils; import org.uma.jmetal.util.archive.Archive; import org.uma.jmetal.util.archive.impl.BestSolutionsArchive; import org.uma.jmetal.util.archive.impl.NonDominatedSolutionListArchive; class SMPSOBuilderIT { @Test void SMPSOWithDefaultSettingsReturnsAFrontWithHVHigherThanZeroPointSixtyFiveOnProblemZDT4() { String problemName = "org.uma.jmetal.problem.multiobjective.zdt.ZDT4"; Problem<DoubleSolution> problem = ProblemFactory.<DoubleSolution>loadProblem(problemName); int swarmSize = 100; Termination termination = new TerminationByEvaluations(25000); ParticleSwarmOptimizationAlgorithm smpso = new SMPSOBuilder( (DoubleProblem) problem, swarmSize) .setTermination(termination) .build(); smpso.run(); double[][] referenceFront = new double[][]{{0.0, 1.0}, {1.0, 0.0}}; QualityIndicator hypervolume = new PISAHypervolume(referenceFront); double[][] normalizedFront = NormalizeUtils.normalize( SolutionListUtils.getMatrixWithObjectiveValues(smpso.getResult()), NormalizeUtils.getMinValuesOfTheColumnsOfAMatrix(referenceFront), NormalizeUtils.getMaxValuesOfTheColumnsOfAMatrix(referenceFront)); double hv = hypervolume.compute(normalizedFront); assertThat(smpso.getResult()).hasSizeGreaterThan(95); assertThat(hv).isGreaterThan(0.65); } @Test void SMPSOWithExternalUnboundedArchiveReturnsAFrontWithHVHigherThanZeroPointThirtyFiveOnProblemDTLZ2() throws IOException { String problemName = "org.uma.jmetal.problem.multiobjective.dtlz.DTLZ2"; String referenceFrontFileName = "DTLZ2.3D.csv"; Problem<DoubleSolution> problem = ProblemFactory.<DoubleSolution>loadProblem(problemName); double mutationProbability = 1.0 / problem.numberOfVariables(); double mutationDistributionIndex = 20.0; var mutation = new PolynomialMutation(mutationProbability, mutationDistributionIndex); int swarmSize = 100; Termination termination = new TerminationByEvaluations(50000); Archive<DoubleSolution> archive = new BestSolutionsArchive<>( new NonDominatedSolutionListArchive<>(), swarmSize); Evaluation<DoubleSolution> evaluation = new SequentialEvaluationWithArchive<>(problem, archive); ParticleSwarmOptimizationAlgorithm smpso = new SMPSOBuilder( (DoubleProblem) problem, swarmSize) .setTermination(termination) .setEvaluation(evaluation) .build(); smpso.run(); List<DoubleSolution> obtainedSolutions = archive.solutions(); String referenceFrontFile = "../resources/referenceFrontsCSV/" + referenceFrontFileName; double[][] referenceFront = VectorUtils.readVectors(referenceFrontFile, ","); QualityIndicator hypervolume = new PISAHypervolume(referenceFront); double[][] normalizedFront = NormalizeUtils.normalize( SolutionListUtils.getMatrixWithObjectiveValues(obtainedSolutions), NormalizeUtils.getMinValuesOfTheColumnsOfAMatrix(referenceFront), NormalizeUtils.getMaxValuesOfTheColumnsOfAMatrix(referenceFront)); double hv = hypervolume.compute(normalizedFront); assertThat(obtainedSolutions).hasSizeGreaterThan(95); assertThat(hv).isGreaterThan(0.35); } }
[ "ajnebro@users.noreply.github.com" ]
ajnebro@users.noreply.github.com
d02f99ac27bb952f71c458ad6f40b251d3ef1d27
f46891cca8db8bb3b4b7a1acdf4b60e50f709b0b
/thirdparty-osgi/sip/nist-sip/src/gov/nist/javax/sip/header/Expires.java
f704e1da8c0a532762ab320be60f6bf11b1324b5
[]
no_license
BackupTheBerlios/osgirepo
7778117c9850bbde753e5a470fd546b1ed39063d
581645f2d269a577c76c4bdc40cc01cd68bffbd3
refs/heads/master
2021-01-19T14:58:47.088987
2005-07-29T09:18:00
2005-07-29T09:18:00
40,255,705
0
0
null
null
null
null
UTF-8
Java
false
false
2,912
java
/******************************************************************************* * Product of NIST/ITL Advanced Networking Technologies Division (ANTD). * *******************************************************************************/ package gov.nist.javax.sip.header; import javax.sip.*; /** * Expires SIP Header. * * @version JAIN-SIP-1.1 $Revision: 1.1 $ $Date: 2004/11/15 14:24:53 $ * * @author M. Ranganathan <mranga@nist.gov> <br/> * * <a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a> */ public class Expires extends SIPHeader implements javax.sip.header.ExpiresHeader { /** expires field */ protected int expires; /** default constructor */ public Expires() { super(NAME); } /** * Return canonical form. * @return String */ public String encodeBody() { return new Integer(expires).toString(); } /** * Gets the expires value of the ExpiresHeader. This expires value is * * relative time. * * * * @return the expires value of the ExpiresHeader. * * @since JAIN SIP v1.1 * */ public int getExpires() { return expires; } /** * Sets the relative expires value of the ExpiresHeader. * The expires value MUST be greater than zero and MUST be * less than 2**31. * * @param expires - the new expires value of this ExpiresHeader * * @throws InvalidArgumentException if supplied value is less than zero. * * @since JAIN SIP v1.1 * */ public void setExpires(int expires) throws InvalidArgumentException { if (expires < 0) throw new InvalidArgumentException("bad argument " + expires); this.expires = expires; } } /* * $Log: Expires.java,v $ * Revision 1.1 2004/11/15 14:24:53 afrei * initial checkin to osgirepo * * Revision 1.1 2004/11/14 14:30:01 andfrei * checkin of sip, btapi, axis * * Revision 1.2 2004/01/22 13:26:29 sverker * Issue number: * Obtained from: * Submitted by: sverker * Reviewed by: mranga * * Major reformat of code to conform with style guide. Resolved compiler and javadoc warnings. Added CVS tags. * * CVS: ---------------------------------------------------------------------- * CVS: Issue number: * CVS: If this change addresses one or more issues, * CVS: then enter the issue number(s) here. * CVS: Obtained from: * CVS: If this change has been taken from another system, * CVS: then name the system in this line, otherwise delete it. * CVS: Submitted by: * CVS: If this code has been contributed to the project by someone else; i.e., * CVS: they sent us a patch or a set of diffs, then include their name/email * CVS: address here. If this is your work then delete this line. * CVS: Reviewed by: * CVS: If we are doing pre-commit code reviews and someone else has * CVS: reviewed your changes, include their name(s) here. * CVS: If you have not had it reviewed then delete this line. * */
[ "afrei" ]
afrei
2ab26be1d469aa61082606658c078b8fa10cf78f
8504b15ba9153caa24c1032f5482deef93b9e339
/JanLib/src/jan/util/CompileHelper.java
8a6404f190a3497f7b08f388c48ded46902ea40a
[]
no_license
AlexanderKwong/myProject
78d4507f0ef9bcc64c383151233d744fe3cc89ef
3828aff308babb689c035e25be71c743d769c093
refs/heads/master
2021-08-31T19:53:35.167478
2017-12-22T16:42:10
2017-12-22T16:42:10
111,092,218
0
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
package jan.util; import java.util.HashMap; import java.util.Map; public class CompileHelper { private boolean[] marks; private Map<String, Integer> markMap; public CompileHelper() { clear(); } private void clear() { marks = new boolean[1000]; for(int i=0; i<marks.length; ++i) { marks[i] = false; } markMap = new HashMap<String, Integer>(); } public boolean Assert(int mark) { if (mark < marks.length && marks[mark] == true) { return true; } return false; } public boolean initFormatMark(String formatMarksStr) { clear(); String[] strs = formatMarksStr.split(","); for (int i=0; i<strs.length; ++i) { marks[i+1] = false; markMap.put(strs[i].toUpperCase(), i+1); } return true; } public boolean initMark(String marksStr) { String[] strs = marksStr.split(","); for (int i=0; i<strs.length; ++i) { String markStr = strs[i].toUpperCase(); if(markMap.containsKey(markStr)) { int index = markMap.get(markStr); marks[index] = true; } } return true; } }
[ "601828006@qq.com" ]
601828006@qq.com
150713750c15b21b7f287d56e678f78279efcc33
74c0d9045182918895e5b4b429db4b0dff831784
/src/com/lingnet/hcm/dao/laobao/WupinhistoryDao.java
018ae5d2f88eb7c35072b974025aafc09dc73cf1
[]
no_license
yuyuliuyu/LAOBAO
c7d43c5e0bb62caacdb81b9417aee1382cd560d7
b7e832d53ed6fd148d235d70db7ba6e868c5ca29
refs/heads/master
2020-03-15T10:40:21.773695
2018-05-08T06:10:09
2018-05-08T06:10:09
132,104,336
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package com.lingnet.hcm.dao.laobao; import java.util.HashMap; import com.lingnet.util.Pager; public interface WupinhistoryDao { HashMap<String, Object> getPersonByDepId(Pager pager, String searchData,String ids); }
[ "392544641@qq.com" ]
392544641@qq.com
22a3a2da9ca2605e24ec6ed5ef9052675b76cb1b
5dfe78a5ae9e6f77cc5969df11284d44d0a415d5
/app/src/main/java/com/appslelo/ebgsoldier/utils/Constant.java
911ca9c4abc4ae90f6371b8137d85793060c0aeb
[]
no_license
cmFodWx5YWRhdjEyMTA5/EbgSoldier
95c4baa96058755e04d063373ee81e7ce6100cb3
5acb6498c3ff39236a91570d6a60d07a06e8ec3e
refs/heads/master
2020-07-02T06:53:20.227953
2019-08-09T06:26:28
2019-08-09T06:26:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,429
java
package com.appslelo.ebgsoldier.utils; public class Constant { public static final int xOffSet = 0 ; public static final int yOffSet =50 ; public static final String TAG = "tsfapps"; public static final String YOUTUBE_LINK = "youtube_link"; public static final String YOUTUBE_URL = "https://www.youtube.com/watch?v="; public static final String FORGOT_PASS_LINK = "https://www.ebgsoldier.com/forgot_password/password_forgot.php"; public static final String IMAGE_URL = "http://earnbygame.com/uploads/match_image/"; public static final String DATE_FORMAT_dd_MMMM_yyyy = "dd MMMM yyyy"; public static final String DATE_FORMAT_yyyy_MM_dd_HH_mm_ss = "yyyy-MM-dd HH:mm:ss"; public static final String TIME_FORMAT_hh_mm = "hh:mm a"; public static final String APP_URL = "app_url"; public static final String TSF_SHARED_PREFENCE = "apartment_shared_pref"; public static final String ID = "str_id"; public static final String USER_WALLET = "user_wallet"; public static final String USER_BONUS = "user_bonus"; public static final String USER_ID = "user_id"; public static final String USER_TOTAL_KILL = "total_kill"; public static final String USER_RANK = "user_rank"; public static final String USER_LEVEL = "user_level"; public static final String USER_DOJ = "user_doj"; public static final String USER_PRO_PIC = "user_pic"; public static final String USER_STATUS = "user_status"; public static final String USER_NAME = "user_name"; public static final String USER_PUBG_NAME = "pubg_name"; public static final String USER_DOB ="uaer_flat_no"; public static final String USER_PHONE_NO="user_phone_no"; public static final String USER_EMAIL="user_email"; public static final String USER_REFERRAL_CODE ="user_padhar_no"; public static final String USER_NO_OF_REFERRAL ="user_apartment"; public static final String USER_MATCH_PLAYED ="user_area"; public static final String USER_TOTAL_EARNED ="user_city"; public static final String USER_ADDRESS ="user_address"; public static final String USER_LOCATION ="user_location"; public static final String USER_ADDED_AMOUNT ="user_pin_no"; public static final String EMPTY=""; public static final String SOON="This service will start soon..."; public static final String SERVICE_NOT="Service Not Available."; public static final int SHOW_PROGRESS_DIALOG = 1001; public static final int HIDE_PROGRESS_DIALOG = 1002; public static final long HIDE_PROGRESS_DIALOG_DELAY = 500; public static final String MID = "MID"; public static final String ORDER_ID = "ORDER_ID"; public static final String CUST_ID = "CUST_ID"; public static final String MOBILE_NO = "MOBILE_NO"; public static final String EMAIL = "EMAIL"; public static final String CHANNEL_ID = "CHANNEL_ID"; public static final String TXN_AMOUNT = "TXN_AMOUNT"; public static final String WEBSITE = "WEBSITE"; public static final String INDUSTRY_TYPE_ID = "INDUSTRY_TYPE_ID"; public static final String CALLBACK_URL = "CALLBACK_URL"; public static final String CHECKSUMHASH = "CHECKSUMHASH"; public static final String TXN_SUCCESS = "TXN_SUCCESS"; public static final String STATUS = "STATUS"; public static final String RESPMSG = "RESPMSG"; public static final String Txn_Success = "Txn Success"; }
[ "appslelo.com@gmail.com" ]
appslelo.com@gmail.com
9f2aaa9a463f1ea948db63c58b87eebaa96b01f0
69824fef1d11ee59c47a193075d7402cee410f5d
/jOOQ-test/src/test/java/org/jooq/test/firebird/generatedclasses/tables/records/TExoticTypesRecord.java
eac618f377f4a8f4d7723c5eacd3608d1805a31e
[ "Apache-2.0" ]
permissive
gquintana/jOOQ
5db0590dfbabecc702f61afe6f63cca206472261
4a5105d4054606fb021808169394a118113422b4
refs/heads/master
2020-12-06T23:27:19.420528
2014-08-26T11:33:22
2014-08-26T11:33:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,347
java
/** * This class is generated by jOOQ */ package org.jooq.test.firebird.generatedclasses.tables.records; /** * This class is generated by jOOQ. */ @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) @javax.persistence.Entity @javax.persistence.Table(name = "T_EXOTIC_TYPES") public class TExoticTypesRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.test.firebird.generatedclasses.tables.records.TExoticTypesRecord> implements org.jooq.Record2<java.lang.Integer, java.util.UUID>, org.jooq.test.firebird.generatedclasses.tables.interfaces.ITExoticTypes { private static final long serialVersionUID = 870199176; /** * Setter for <code>T_EXOTIC_TYPES.ID</code>. */ @Override public void setId(java.lang.Integer value) { setValue(0, value); } /** * Getter for <code>T_EXOTIC_TYPES.ID</code>. */ @javax.persistence.Id @javax.persistence.Column(name = "ID", unique = true, nullable = false) @javax.validation.constraints.NotNull @Override public java.lang.Integer getId() { return (java.lang.Integer) getValue(0); } /** * Setter for <code>T_EXOTIC_TYPES.UU</code>. */ @Override public void setUu(java.util.UUID value) { setValue(1, value); } /** * Getter for <code>T_EXOTIC_TYPES.UU</code>. */ @javax.persistence.Column(name = "UU", length = 36) @Override public java.util.UUID getUu() { return (java.util.UUID) getValue(1); } // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public org.jooq.Record1<java.lang.Integer> key() { return (org.jooq.Record1) super.key(); } // ------------------------------------------------------------------------- // Record2 type implementation // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public org.jooq.Row2<java.lang.Integer, java.util.UUID> fieldsRow() { return (org.jooq.Row2) super.fieldsRow(); } /** * {@inheritDoc} */ @Override public org.jooq.Row2<java.lang.Integer, java.util.UUID> valuesRow() { return (org.jooq.Row2) super.valuesRow(); } /** * {@inheritDoc} */ @Override public org.jooq.Field<java.lang.Integer> field1() { return org.jooq.test.firebird.generatedclasses.tables.TExoticTypes.T_EXOTIC_TYPES.ID; } /** * {@inheritDoc} */ @Override public org.jooq.Field<java.util.UUID> field2() { return org.jooq.test.firebird.generatedclasses.tables.TExoticTypes.T_EXOTIC_TYPES.UU; } /** * {@inheritDoc} */ @Override public java.lang.Integer value1() { return getId(); } /** * {@inheritDoc} */ @Override public java.util.UUID value2() { return getUu(); } /** * {@inheritDoc} */ @Override public TExoticTypesRecord value1(java.lang.Integer value) { setId(value); return this; } /** * {@inheritDoc} */ @Override public TExoticTypesRecord value2(java.util.UUID value) { setUu(value); return this; } /** * {@inheritDoc} */ @Override public TExoticTypesRecord values(java.lang.Integer value1, java.util.UUID value2) { return this; } // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public void from(org.jooq.test.firebird.generatedclasses.tables.interfaces.ITExoticTypes from) { setId(from.getId()); setUu(from.getUu()); } /** * {@inheritDoc} */ @Override public <E extends org.jooq.test.firebird.generatedclasses.tables.interfaces.ITExoticTypes> E into(E into) { into.from(this); return into; } // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- /** * Create a detached TExoticTypesRecord */ public TExoticTypesRecord() { super(org.jooq.test.firebird.generatedclasses.tables.TExoticTypes.T_EXOTIC_TYPES); } /** * Create a detached, initialised TExoticTypesRecord */ public TExoticTypesRecord(java.lang.Integer id, java.util.UUID uu) { super(org.jooq.test.firebird.generatedclasses.tables.TExoticTypes.T_EXOTIC_TYPES); setValue(0, id); setValue(1, uu); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
7307125355507a12c9a6cdc74692417379c95dfe
128da67f3c15563a41b6adec87f62bf501d98f84
/com/emt/proteus/duchampopt/wcsset_1739.java
93f691b9edc74b550527e9441faa007712826f7d
[]
no_license
Creeper20428/PRT-S
60ff3bea6455c705457bcfcc30823d22f08340a4
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
refs/heads/master
2020-03-26T03:59:25.725508
2018-08-12T16:05:47
2018-08-12T16:05:47
73,244,383
0
0
null
null
null
null
UTF-8
Java
false
false
2,365
java
/* */ package com.emt.proteus.duchampopt; /* */ /* */ import com.emt.proteus.runtime.api.Env; /* */ import com.emt.proteus.runtime.api.Frame; /* */ import com.emt.proteus.runtime.api.Function; /* */ import com.emt.proteus.runtime.api.ImplementedFunction; /* */ /* */ public final class wcsset_1739 extends ImplementedFunction /* */ { /* */ public static final int FNID = Integer.MAX_VALUE; /* 11 */ public static final Function _instance = new wcsset_1739(); /* 12 */ public final Function resolve() { return _instance; } /* */ /* 14 */ public wcsset_1739() { super("wcsset_1739", 3, false); } /* */ /* */ public int execute(int paramInt1, int paramInt2, int paramInt3) /* */ { /* 18 */ call(paramInt1, paramInt2, paramInt3); /* 19 */ return 0; /* */ } /* */ /* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4) /* */ { /* 24 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 25 */ paramInt4 += 2; /* 26 */ paramInt3--; /* 27 */ int j = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 28 */ paramInt4 += 2; /* 29 */ paramInt3--; /* 30 */ int k = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 31 */ paramInt4 += 2; /* 32 */ paramInt3--; /* 33 */ call(i, j, k); /* 34 */ return paramInt4; /* */ } /* */ /* */ /* */ public static void call(int paramInt1, int paramInt2, int paramInt3) /* */ { /* 40 */ int i = 0; /* */ /* */ /* */ /* */ try /* */ { /* 46 */ if (paramInt1 < 4) /* */ { /* 48 */ paramInt3 = 3 - paramInt3; /* 49 */ i = 0; /* */ /* */ for (;;) /* */ { /* 53 */ com.emt.proteus.runtime.api.MainMemory.setI8(paramInt2 + 104 + (paramInt1 + i), (byte)0); /* 54 */ i += 1; /* 55 */ if (i == paramInt3) { /* */ break; /* */ } /* */ } /* */ } /* */ return; /* */ } /* */ finally {} /* */ } /* */ } /* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/wcsset_1739.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "kimjoey79@gmail.com" ]
kimjoey79@gmail.com
49999100b214e14e69cfff45871e841042fca877
b9746f8820b09e0bf665b1aceefa4c0cdf75e428
/app/src/main/java/com/example/anadministrator/recyclerview_moretypes/MyRecycleViewAdapter.java
a0e352932c8a386d32ecb1574eb461c3c0a1a177
[]
no_license
zhangqifan1/RecyclerView_MoreTypes
57f7112ea67d7760286552ff0ba545d88229b18b
846af090e29b659f0ae21777fac7ad3d4a2e3f8b
refs/heads/master
2021-01-23T14:11:29.663252
2017-09-07T01:38:06
2017-09-07T01:38:06
102,676,867
0
0
null
null
null
null
UTF-8
Java
false
false
4,379
java
package com.example.anadministrator.recyclerview_moretypes; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.youth.banner.Banner; import java.util.ArrayList; import java.util.List; /** * Created by 张祺钒 * on2017/9/6. */ public class MyRecycleViewAdapter extends RecyclerView.Adapter<MyRecycleViewAdapter.MyViewHolder> implements View.OnClickListener { private List<String> list; private Context context; private View view; private List<Integer> listImages=new ArrayList<>(); public MyRecycleViewAdapter(List<String> list, Context context) { this.list = list; this.context = context; listImages.add(R.drawable.e); listImages.add(R.drawable.d); } @Override public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view; if(viewType==Type){ view = View.inflate(context, R.layout.headeriew, null); return new MyViewHolder(view); } else if (viewType == Type0) { view = View.inflate(context, R.layout.item, null); return new MyViewHolder(view); } else if (viewType == Type1) { view = View.inflate(context, R.layout.item1, null); return new MyViewHolder(view); } else { view = View.inflate(context, R.layout.item2, null); return new MyViewHolder(view); } } @Override public void onClick(View view) { if (mMyItemclickListener != null) { mMyItemclickListener.itemclick(view, (Integer) view.getTag()); } } public interface MyItemclickListener { void itemclick(View view, int position); } public MyItemclickListener mMyItemclickListener; public void setmMyItemclickListener(MyItemclickListener mMyItemclickListener) { this.mMyItemclickListener = mMyItemclickListener; } @Override public void onBindViewHolder(MyViewHolder holder, int position) { int type = getItemViewType(position); switch (type) { case Type: holder.banner.setImageLoader(new GlideImageLoader()) // .isAutoPlay(false) .setDelayTime(3000) .setImages(listImages) .start(); break; case Type0: holder.tv_title.setText(list.get(position)); break; case Type1: holder.tv1.setText(list.get(position)); holder.tv2.setText(list.get(position + 2)); break; case Type2: holder.image1.setImageResource(R.drawable.d); holder.image2.setImageResource(R.drawable.e); break; default: break; } holder.itemView.setTag(position); } public final int Type = 212; public final int Type0 = 1; public final int Type1 = 2; public final int Type2 = 3; @Override public int getItemViewType(int position) { if (position==0) { return Type; } else if (position % 3 == 0) { return Type0; } else if (position % 3 == 1) { return Type1; } else { return Type2; } } @Override public int getItemCount() { return list.size(); } class MyViewHolder extends RecyclerView.ViewHolder { private final ImageView iv_icon; private final TextView tv_title; private final ImageView image1; private final ImageView image2; private final TextView tv1; private final TextView tv2; private final Banner banner; public MyViewHolder(View itemView) { super(itemView); banner = itemView.findViewById(R.id.banner); iv_icon = itemView.findViewById(R.id.iv_icon); tv_title = itemView.findViewById(R.id.tv_title); image1 = itemView.findViewById(R.id.image1); image2 = itemView.findViewById(R.id.image2); tv1 = itemView.findViewById(R.id.tv1); tv2 = itemView.findViewById(R.id.tv2); } } }
[ "852780161@qq.com" ]
852780161@qq.com
9e7ab73ab4084b1ff50ed10ed7124899ac9a25b5
c47bd9de64db3645f9415323b202306c50ad8cf5
/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/command/hive/CommandUtil.java
2d2dcb5a2eb281a02189213244d7aecaa5c2982d
[ "Apache-2.0", "MIT", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
scharanjit/sentry-kerberos-demo
6dca2285b133ab3bae4e90ba3c5cc47118d7630c
7e9921a8afe151c16c7e7779a169b656fd3bd739
refs/heads/master
2022-10-24T01:20:41.502173
2016-06-24T08:11:31
2016-06-24T08:11:31
61,621,595
0
0
Apache-2.0
2022-10-12T19:49:31
2016-06-21T09:40:29
Java
UTF-8
Java
false
false
6,123
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.sentry.provider.db.tools.command.hive; import org.apache.commons.lang.StringUtils; import org.apache.sentry.core.common.utils.SentryConstants; import org.apache.sentry.core.common.utils.KeyValue; import org.apache.sentry.core.common.utils.PolicyFileConstants; import org.apache.sentry.provider.db.service.thrift.TSentryGrantOption; import org.apache.sentry.provider.db.service.thrift.TSentryPrivilege; import org.apache.sentry.service.thrift.ServiceConstants; public final class CommandUtil { public static final String SPLIT_CHAR = ","; private CommandUtil() { // Make constructor private to avoid instantiation } // parse the privilege in String and get the TSentryPrivilege as result public static TSentryPrivilege convertToTSentryPrivilege(String privilegeStr) throws Exception { TSentryPrivilege tSentryPrivilege = new TSentryPrivilege(); for (String authorizable : SentryConstants.AUTHORIZABLE_SPLITTER.split(privilegeStr)) { KeyValue tempKV = new KeyValue(authorizable); String key = tempKV.getKey(); String value = tempKV.getValue(); if (PolicyFileConstants.PRIVILEGE_SERVER_NAME.equalsIgnoreCase(key)) { tSentryPrivilege.setServerName(value); } else if (PolicyFileConstants.PRIVILEGE_DATABASE_NAME.equalsIgnoreCase(key)) { tSentryPrivilege.setDbName(value); } else if (PolicyFileConstants.PRIVILEGE_TABLE_NAME.equalsIgnoreCase(key)) { tSentryPrivilege.setTableName(value); } else if (PolicyFileConstants.PRIVILEGE_COLUMN_NAME.equalsIgnoreCase(key)) { tSentryPrivilege.setColumnName(value); } else if (PolicyFileConstants.PRIVILEGE_URI_NAME.equalsIgnoreCase(key)) { tSentryPrivilege.setURI(value); } else if (PolicyFileConstants.PRIVILEGE_ACTION_NAME.equalsIgnoreCase(key)) { tSentryPrivilege.setAction(value); } else if (PolicyFileConstants.PRIVILEGE_GRANT_OPTION_NAME.equalsIgnoreCase(key)) { TSentryGrantOption grantOption = "true".equalsIgnoreCase(value) ? TSentryGrantOption.TRUE : TSentryGrantOption.FALSE; tSentryPrivilege.setGrantOption(grantOption); } } tSentryPrivilege.setPrivilegeScope(getPrivilegeScope(tSentryPrivilege)); validatePrivilegeHierarchy(tSentryPrivilege); return tSentryPrivilege; } // for the different hierarchy for hive: // 1: server->url // 2: server->database->table->column // if both of them are found in the privilege string, the privilege scope will be set as // PrivilegeScope.URI private static String getPrivilegeScope(TSentryPrivilege tSentryPrivilege) { ServiceConstants.PrivilegeScope privilegeScope = ServiceConstants.PrivilegeScope.SERVER; if (!StringUtils.isEmpty(tSentryPrivilege.getURI())) { privilegeScope = ServiceConstants.PrivilegeScope.URI; } else if (!StringUtils.isEmpty(tSentryPrivilege.getColumnName())) { privilegeScope = ServiceConstants.PrivilegeScope.COLUMN; } else if (!StringUtils.isEmpty(tSentryPrivilege.getTableName())) { privilegeScope = ServiceConstants.PrivilegeScope.TABLE; } else if (!StringUtils.isEmpty(tSentryPrivilege.getDbName())) { privilegeScope = ServiceConstants.PrivilegeScope.DATABASE; } return privilegeScope.toString(); } // check the privilege value for the specific privilege scope // eg, for the table scope, server and database can't be empty private static void validatePrivilegeHierarchy(TSentryPrivilege tSentryPrivilege) throws Exception { String serverName = tSentryPrivilege.getServerName(); String dbName = tSentryPrivilege.getDbName(); String tableName = tSentryPrivilege.getTableName(); String columnName = tSentryPrivilege.getColumnName(); String uri = tSentryPrivilege.getURI(); if (ServiceConstants.PrivilegeScope.SERVER.toString().equals(tSentryPrivilege.getPrivilegeScope())) { if (StringUtils.isEmpty(serverName)) { throw new IllegalArgumentException("The hierarchy of privilege is not correct."); } } else if (ServiceConstants.PrivilegeScope.URI.toString().equals(tSentryPrivilege.getPrivilegeScope())) { if (StringUtils.isEmpty(serverName) || StringUtils.isEmpty(uri)) { throw new IllegalArgumentException("The hierarchy of privilege is not correct."); } } else if (ServiceConstants.PrivilegeScope.DATABASE.toString().equals(tSentryPrivilege.getPrivilegeScope())) { if (StringUtils.isEmpty(serverName) || StringUtils.isEmpty(dbName)) { throw new IllegalArgumentException("The hierarchy of privilege is not correct."); } } else if (ServiceConstants.PrivilegeScope.TABLE.toString().equals(tSentryPrivilege.getPrivilegeScope())) { if (StringUtils.isEmpty(serverName) || StringUtils.isEmpty(dbName) || StringUtils.isEmpty(tableName)) { throw new IllegalArgumentException("The hierarchy of privilege is not correct."); } } else if (ServiceConstants.PrivilegeScope.COLUMN.toString().equals(tSentryPrivilege.getPrivilegeScope()) && (StringUtils.isEmpty(serverName) || StringUtils.isEmpty(dbName) || StringUtils.isEmpty(tableName) || StringUtils.isEmpty(columnName))) { throw new IllegalArgumentException("The hierarchy of privilege is not correct."); } } }
[ "charanjit.singh@imaginea.com" ]
charanjit.singh@imaginea.com
7e14631d8ec39d66f67cb0992db3f782d9ea0680
cee0b81e31c8a07c1c97dc49abfc3884f9e418fd
/src/test/java/com/github/seratch/jslack/Slack_incomingWebhooks_Test.java
bf705b5485371a63650fde78c8cccd67a182e48f
[ "MIT" ]
permissive
sean-heller/jslack
b60a6d3b32561ad2e568c60ccb0178e483ab41ba
e86dc3acae850a054dd10a62739c040a223b0e72
refs/heads/master
2020-05-17T22:01:49.118763
2019-04-29T01:26:07
2019-04-29T01:26:07
183,988,426
0
0
null
2019-04-29T02:46:26
2019-04-29T02:46:26
null
UTF-8
Java
false
false
4,317
java
package com.github.seratch.jslack; import com.github.seratch.jslack.api.model.Attachment; import com.github.seratch.jslack.api.model.Field; import com.github.seratch.jslack.api.model.block.ActionsBlock; import com.github.seratch.jslack.api.model.block.LayoutBlock; import com.github.seratch.jslack.api.model.block.composition.PlainTextObject; import com.github.seratch.jslack.api.model.block.element.ButtonElement; import com.github.seratch.jslack.api.webhook.Payload; import com.github.seratch.jslack.api.webhook.WebhookResponse; import lombok.extern.slf4j.Slf4j; import org.junit.Test; import testing.SlackTestConfig; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @Slf4j public class Slack_incomingWebhooks_Test { Slack slack = Slack.getInstance(SlackTestConfig.get()); @Test public void incomingWebhook() throws IOException { // String url = "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"; String url = System.getenv("SLACK_WEBHOOK_TEST_URL"); if (url == null) { throw new IllegalStateException("Environment variable SLACK_WEBHOOK_TEST_URL must be defined"); } Payload payload = Payload.builder() .channel("#random") .text("Hello World!") .iconEmoji(":smile_cat:") .username("jSlack") .attachments(new ArrayList<>()) .build(); Attachment attachment = Attachment.builder() .text("This is an *attachment*.") .authorName("Smiling Imp") .color("#36a64f") .fallback("Required plain-text summary of the attachment.") .title("Slack API Documentation") .titleLink("https://api.slack.com/") .footer("footer") .fields(new ArrayList<>()) .mrkdwnIn(new ArrayList<>()) .build(); attachment.getMrkdwnIn().add("text"); { Field field = Field.builder() .title("Long Title") .value("Long Value........................................................") .valueShortEnough(false).build(); attachment.getFields().add(field); attachment.getFields().add(field); } { Field field = Field.builder() .title("Short Title") .value("Short Value") .valueShortEnough(true).build(); attachment.getFields().add(field); attachment.getFields().add(field); } payload.getAttachments().add(attachment); WebhookResponse response = slack.send(url, payload); log.info(response.toString()); assertThat(response.getBody(), is("ok")); assertThat(response.getMessage(), is("OK")); assertThat(response.getCode(), is(200)); } @Test public void incomingWebhook_BlockKit() throws IOException { // String url = "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"; String url = System.getenv("SLACK_WEBHOOK_TEST_URL"); if (url == null) { throw new IllegalStateException("Environment variable SLACK_WEBHOOK_TEST_URL must be defined"); } Payload payload = Payload.builder() .channel("#random") .text("Hello World!") .iconEmoji(":smile_cat:") .username("jSlack") .blocks(new ArrayList<>()) .build(); ButtonElement button = ButtonElement.builder() .text(PlainTextObject.builder().emoji(true).text("Farmhouse").build()) .value("click_me_123") .build(); LayoutBlock block = ActionsBlock.builder().elements(Arrays.asList(button)).build(); payload.getBlocks().add(block); WebhookResponse response = slack.send(url, payload); log.info(response.toString()); assertThat(response.getBody(), is("ok")); assertThat(response.getMessage(), is("OK")); assertThat(response.getCode(), is(200)); } }
[ "seratch@gmail.com" ]
seratch@gmail.com
c52a82083653ac566cef6485efed71e351c5e0e1
43c3e196bf5113ed4167284e8dea45c6a0589337
/lib-gwt-svg/tags/0.5.1/src/main/java/org/vectomatic/dom/svg/OMSVGDescElement.java
b1a9ad9bcb47c4938b0cf8d44cc0d55d0deb3423
[]
no_license
toxic88/vectomatic
1bdec743b7dd4a7c582a792630c5c106db96b418
aa4138b47cf0d080d7a3a4571798114f719ade30
refs/heads/master
2016-09-06T06:16:50.032347
2012-02-07T20:54:46
2012-02-07T20:54:46
33,423,929
0
0
null
null
null
null
UTF-8
Java
false
false
3,276
java
/********************************************** * Copyright (C) 2010 Lukas Laag * This file is part of lib-gwt-svg. * * libgwtsvg 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 3 of the License, or * (at your option) any later version. * * libgwtsvg 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 libgwtsvg. If not, see http://www.gnu.org/licenses/ **********************************************/ /* * Copyright (c) 2004 World Wide Web Consortium, * * (Massachusetts Institute of Technology, European Research Consortium for * Informatics and Mathematics, Keio University). All Rights Reserved. This * work is distributed under the W3C(r) Software License [1] 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. * * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 */ package org.vectomatic.dom.svg; import org.vectomatic.dom.svg.impl.SVGDescElement; import org.vectomatic.dom.svg.itf.ISVGLangSpace; import org.vectomatic.dom.svg.itf.ISVGStylable; import com.google.gwt.core.client.JavaScriptException; import com.google.gwt.dom.client.TagName; /** * The {@link org.vectomatic.dom.svg.OMSVGDescElement} interface corresponds * to the <a href='http://www.w3.org/TR/SVG11/struct.html#DescElement' title='desc * element specification'>desc</a> element. */ @TagName("desc") public class OMSVGDescElement extends OMSVGElement implements ISVGLangSpace, ISVGStylable { protected OMSVGDescElement(SVGDescElement ot) { super(ot); } // Implementation of the svg::SVGDescElement W3C IDL interface // Implementation of the svg::SVGLangSpace W3C IDL interface /** * Corresponds to attribute <code>xml:lang</code> on the given element. */ public final String getXmllang() { return ((SVGDescElement)ot).getXmllang(); } /** * Corresponds to attribute <code>xml:lang</code> on the given element. * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only * attribute</a>. */ public final void setXmllang(java.lang.String value) throws JavaScriptException { ((SVGDescElement)ot).setXmllang(value); } /** * Corresponds to attribute <code>xml:space</code> on the given element. */ public final String getXmlspace() { return ((SVGDescElement)ot).getXmlspace(); } /** * Corresponds to attribute <code>xml:space</code> on the given element. * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) Raised on an attempt * to change the value of a <a href="svgdom.html#ReadOnlyNodes">read only * attribute</a>. */ public final void setXmlspace(java.lang.String value) throws JavaScriptException { ((SVGDescElement)ot).setXmlspace(value); } }
[ "laaglu@4ed4caa0-1436-11df-ad8c-0f209b884837" ]
laaglu@4ed4caa0-1436-11df-ad8c-0f209b884837
7ba84566db9c653f84ebca9816487e6db8425d1e
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/p005cm/aptoide/p006pt/view/C5549v.java
fbcede0b2b5438f9efaa9af1839f2f58bdc3b115
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
629
java
package p005cm.aptoide.p006pt.view; import p026rx.p027b.C0132p; /* renamed from: cm.aptoide.pt.view.v */ /* compiled from: lambda */ public final /* synthetic */ class C5549v implements C0132p { /* renamed from: a */ private final /* synthetic */ DeepLinkManager f9362a; /* renamed from: b */ private final /* synthetic */ String f9363b; public /* synthetic */ C5549v(DeepLinkManager deepLinkManager, String str) { this.f9362a = deepLinkManager; this.f9363b = str; } public final Object call(Object obj) { return this.f9362a.mo16895a(this.f9363b, (Boolean) obj); } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
b56d2e1ddab0372dd811bb8af293e9f1864e1ca2
6fee22ba95f0e1742cb0f665db4777025cd0eaac
/hqc_mp/src/main/java/com/hqc/payforparking/ws/GetParkingLotInfo.java
38e91baedf90640a5d0559fd7f263475ed654b48
[]
no_license
Elegant-Smile/hqc_mp
c26f528cd90a821c3612cdfb623e4d0bc9ab2dc3
c8054d66917cd2357cdca108023cfc63117bde81
refs/heads/master
2020-07-31T19:41:08.922565
2019-09-02T01:28:08
2019-09-02T01:28:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,063
java
package com.hqc.payforparking.ws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>anonymous complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="appId" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="parkId" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "appId", "key", "parkId" }) @XmlRootElement(name = "GetParkingLotInfo") public class GetParkingLotInfo { protected int appId; protected String key; protected int parkId; /** * 获取appId属性的值。 * */ public int getAppId() { return appId; } /** * 设置appId属性的值。 * */ public void setAppId(int value) { this.appId = value; } /** * 获取key属性的值。 * * @return * possible object is * {@link String } * */ public String getKey() { return key; } /** * 设置key属性的值。 * * @param value * allowed object is * {@link String } * */ public void setKey(String value) { this.key = value; } /** * 获取parkId属性的值。 * */ public int getParkId() { return parkId; } /** * 设置parkId属性的值。 * */ public void setParkId(int value) { this.parkId = value; } }
[ "2434387555@qq.com" ]
2434387555@qq.com
ff1cc5c2855209744c3b07039afc4a11f523cad3
cfcebeeb31b59e85a5bded9749c2df8c6e361daf
/src/main/java/com/pri/messenger/server/DataWaiter.java
febdabdb1ed1c2d7766c988e6ee2edd3e78edbaa
[]
no_license
mikegostev/Commons
f4a4cd6504347c77b83a3689b4a519dff4e0d9e9
5ff70df51258db766d57bcdea0d8ccd5448f346d
refs/heads/master
2021-07-03T16:46:05.941603
2017-04-18T16:05:19
2017-04-18T16:05:19
632,355
1
4
null
2020-10-13T09:40:28
2010-04-27T22:23:54
Java
UTF-8
Java
false
false
1,122
java
package com.pri.messenger.server; public class DataWaiter { private static final long MAX_WAIT_TIME_MSEC=60*1000; private boolean busy; private Object data; private String dest,meth; public DataWaiter() { } public synchronized void waitData() { busy=true; data=null; try { wait(MAX_WAIT_TIME_MSEC); } catch (InterruptedException e) { } busy=false; } public synchronized boolean dataReady( String d, String m, Object o ) { data=o; dest=d; meth=m; if( busy ) notify(); else return false; return true; } public synchronized void releaseWaiter() { if( busy ) notify(); } public synchronized boolean isBusy() { return busy; } public synchronized Object getData() { busy=true; data = null; try { wait(MAX_WAIT_TIME_MSEC); } catch (InterruptedException e) { } busy = false; Object o = data; data = null; return o; } public String getDestination() { return dest; } public String getMethod() { return meth; } }
[ "gostev@ebi.ac.uk" ]
gostev@ebi.ac.uk
06a824bc5203461d232e6bd5f0109f7cd6d99c63
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/ocso/OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultHandler.java
23621e5434b1251c8f06aa94563169b015a07c2a
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,148
java
package nta.med.service.ihis.handler.ocso; import java.util.Date; import javax.annotation.Resource; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.vertx.java.core.Vertx; import nta.med.core.utils.DateUtil; import nta.med.data.dao.medi.ocs.Ocs0503Repository; import nta.med.core.infrastructure.socket.handler.ScreenHandler; import nta.med.service.ihis.proto.CommonModelProto.LoadConsultEndYNInfo; import nta.med.service.ihis.proto.CommonModelProto.NoConfirmConsultInfo; import nta.med.service.ihis.proto.OcsoServiceProto; @Service @Scope("prototype") public class OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultHandler extends ScreenHandler<OcsoServiceProto.OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultRequest, OcsoServiceProto.OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultResponse> { private static final Log LOGGER = LogFactory.getLog(OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultHandler.class); @Resource private Ocs0503Repository ocs0503Repository; @Override @Transactional(readOnly = true) public OcsoServiceProto.OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultResponse handle(Vertx vertx, String clientId, String sessionId, long contextId, OcsoServiceProto.OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultRequest request) throws Exception { OcsoServiceProto.OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultResponse.Builder response = OcsoServiceProto.OCS1003P01LoadConsultEndYnAndIsNoConfirmConsultResponse.newBuilder(); String hospCode = getHospitalCode(vertx, sessionId); boolean colsultYn = false; LoadConsultEndYNInfo info = request.getItemInfo(); Date maxReqDate = ocs0503Repository.getLoadConsultEndYN(hospCode, info.getBunho(), info.getReqDoctor()); if(maxReqDate != null){ response.setReqDate(DateUtil.toString(maxReqDate, DateUtil.PATTERN_YYMMDD)); } NoConfirmConsultInfo cosultInfo = request.getConfirmConsultInfo(); Date naewonDate = DateUtil.toDate(cosultInfo.getNaewondate(), DateUtil.PATTERN_YYMMDD); String result = ocs0503Repository.getNoConfirmConsult(hospCode, cosultInfo.getBunho(), naewonDate, cosultInfo.getGwa(), cosultInfo.getDoctor(), cosultInfo.getIoGubun()); if("Y".equals(result)){ colsultYn = true; } response.setIsNoReturnConsultYn(colsultYn); return response.build(); } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
cf280a0e3b1bde6a95eb0e3efbdab00ef4264f6e
07dc7c560e59f6680851cc3ae4ea4bc4ddbd7702
/src/main/java/com/greglturnquist/links/DatabaseLoader.java
d0f0e97adf7fa38bce7b47961c8561fe7d43a13b
[]
no_license
avinashsaraogi/spring-data-rest-with-custom-links
b7b4a685ed65b473e9d88fa85da9c4f266534131
e5e69f6946b868b621e7c25ce0462513455e622c
refs/heads/master
2020-04-28T17:48:41.044007
2017-10-03T16:49:43
2017-10-03T16:49:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,116
java
/* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.greglturnquist.links; import org.springframework.boot.CommandLineRunner; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; /** * @author Greg Turnquist */ @Component public class DatabaseLoader { @Bean CommandLineRunner initDatabase(EmployeeRepository repository) { return args -> { repository.save(new Employee("Frodo", "Baggins", "ring bearer")); repository.save(new Employee("Bilbo", "Baggins", "burglar")); }; } }
[ "gturnquist@pivotal.io" ]
gturnquist@pivotal.io
c870359b089d1ea4358f157abf3eeb18569c0d68
d39fc8b3c72d7d2585b33104dbd90ee16db3db13
/subprojects/griffon-rt/src/main/groovy/org/codehaus/griffon/runtime/core/NoopEventRouter.java
0582a4bd7fafd1da3e2e7ba9fefc52519a7cae9f
[ "Apache-2.0" ]
permissive
fukkun/griffon
cb3e3f796f7c9cef8fc3df7850351011d139c534
7fb7f20ff1d9a2574672a8f4dc851d95d6694d97
refs/heads/master
2020-12-25T10:41:44.655942
2013-01-10T09:56:26
2013-01-10T09:56:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,314
java
/* * Copyright 2009-2013 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.codehaus.griffon.runtime.core; import griffon.core.EventRouter; import griffon.util.RunnableWithArgs; import groovy.lang.Closure; import java.util.List; import java.util.Map; /** * Implementation of {@code EventRouter} where all operations are ignored. * * @author Andres Almiray * @since 1.2.0 */ public class NoopEventRouter implements EventRouter { @Override public boolean isEnabled() { return false; } @Override public void setEnabled(boolean enabled) { } @Override public void publish(String eventName) { } @Override public void publish(String eventName, List params) { } @Override public void publishOutsideUI(String eventName) { } @Override public void publishOutsideUI(String eventName, List params) { } @Override public void publishAsync(String eventName) { } @Override public void publishAsync(String eventName, List params) { } @Override public void addEventListener(Object listener) { } @Override public void addEventListener(Map<String, Object> listener) { } @Override public void removeEventListener(Object listener) { } @Override public void removeEventListener(Map<String, Object> listener) { } @Override public void addEventListener(String eventName, Closure listener) { } @Override public void addEventListener(String eventName, RunnableWithArgs listener) { } @Override public void removeEventListener(String eventName, Closure listener) { } @Override public void removeEventListener(String eventName, RunnableWithArgs listener) { } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
a4f527e6b148e8e6d19c73ee53fe76862589ca8e
15f806745ef5cca72251254c24618a345fb3eb4c
/fintech-admin/src/main/java/com/qunar/fintech/plat/admin/query/enums/RepayStatusEnum.java
8873551e58a093adc05193e335a75e352916a65a
[]
no_license
GSIL-Monitor/QunarProjectsStave
005f863b178645d8e90a44bdd14c5c0593574734
c455cda3a3aa86c68203e5d9be2545b2e88b47b0
refs/heads/master
2020-04-23T20:52:59.058801
2019-02-19T09:55:38
2019-02-19T09:55:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,240
java
package com.qunar.fintech.plat.admin.query.enums; /** * Created by bob.li on 2015/9/18. */ public enum RepayStatusEnum { NOT_REPAY(0, "未还款"), REPAYING(1, "还款中"), BANK_GOT(2, "银行已受理"), BANK_REPAYED(3, "银行已还款"); private Integer code; private String name; private RepayStatusEnum(Integer code, String name) { this.code = code; this.name = name; } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public static RepayStatusEnum toEnum(int code) { switch (code) { case 0: return NOT_REPAY; case 1: return REPAYING; case 2: return BANK_GOT; case 3: return BANK_REPAYED; default: return null; } } @Override public String toString() { return "RepayStatusEnum{" + "code=" + code + ", name='" + name + '\'' + '}'; } }
[ "guijun.qu@quanr.com" ]
guijun.qu@quanr.com
924acf77b936a6beb8159ce0f927b55e9b8175f4
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
/jun_java_plugins/jun_javase/src/main/java/com/jun/plugin/javase/winterHomeWork/Exercise9/StringTest2.java
467f91ae5199567a2f061f41d5b3fa78d3e3b175
[]
no_license
wujun728/jun_java_plugin
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
e031bc451c817c6d665707852308fc3b31f47cb2
refs/heads/master
2023-09-04T08:23:52.095971
2023-08-18T06:54:29
2023-08-18T06:54:29
62,047,478
117
42
null
2023-08-21T16:02:15
2016-06-27T10:23:58
Java
UTF-8
Java
false
false
1,046
java
package com.jun.plugin.javase.winterHomeWork.Exercise9; import java.util.Scanner; public class StringTest2 { public static void main(String[] args) { Scanner scan=new Scanner(System.in); System.out.println("��������ĸ��"); String name=scan.next(); checkString(name); } static void checkString(String name) { System.out.println("���������ĸ���ǣ�"+name); String rege="[a-zA-Z]+"; String reget="\\p{Upper}+[a-zA-Z]*"; if(!name.matches(rege)) { System.out.println("����������������ĸ����"); } else if(!name.matches(reget)){ System.out.println("��һ����ĸ���Ǵ�д��ĸ"); } else if(name.matches(rege)&&name.matches(reget)) { char[] arr=name.toCharArray(); int count=0; for(int i=0;i<arr.length;i++) { String temp=String.valueOf(arr[i]); if(temp.matches(reget)) { count++; } } System.out.println("�ַ�����һ����"+count+"����д��ĸ"); } } }
[ "wujun728@163.com" ]
wujun728@163.com
5e82c0faa84d8aeb48f20501b38214c6fa74082f
a7717cb09e0a7c89a3409d01a58f62c2c41997e8
/src/main/java/project/conf/resource/ormapper/dao/HpAddressContactD/HpAddressContactDDao.java
0d3bf49a87375ccc745915955bca0783f5959da4
[]
no_license
sawhsong/alpaca
999989c2a06f8923cceb5f6c0432863b725a3e3d
783057130c19163b6b5eb2e901161155aefe10ba
refs/heads/master
2023-08-07T02:38:24.106460
2023-07-30T22:53:27
2023-07-30T22:53:27
143,237,867
0
0
null
null
null
null
UTF-8
Java
false
false
640
java
/************************************************************************************************** * Framework Generated DAO Source * - HP_ADDRESS_CONTACT_D - *************************************************************************************************/ package project.conf.resource.ormapper.dao.HpAddressContactD; import project.conf.resource.ormapper.dto.oracle.HpAddressContactD; import zebra.base.IDao; public interface HpAddressContactDDao extends IDao { public HpAddressContactD getAddressContactByPersonId(String personId) throws Exception; public String getPreferredEmailByPersonId(String personId) throws Exception; }
[ "sawhsong@gmail.com" ]
sawhsong@gmail.com
5f42c17513ca2a212a885b2b29a639b5a68a9a0b
ef2defbb5a523d114c32b4824ef29e81334b1604
/src/main/java/cn/liuyiyou/java/thread/JoinTest2.java
ed04d0ea14deb49223d2bdb0957ca97a577bf0aa
[]
no_license
liuyiyou/cn.liuyiyou.java
daf5c37cadf88596d07f7eb13a9a44c5dce9d813
48c71965fb407b201e46c6ff137dc537e34be4c8
refs/heads/master
2022-12-22T06:54:38.492277
2020-05-13T10:11:15
2020-05-13T10:11:15
110,930,489
0
0
null
2022-12-16T04:30:38
2017-11-16T06:07:11
Java
UTF-8
Java
false
false
1,581
java
/** * 所属项目:cn.liuyiyou.java * 文件名称:cn.liuyiyou.java.thread.JoinTest1.java * 日期: 2017年8月9日下午10:57:15 * Copyright (c) 2017, liuyiyou.cn All Rights Reserved. * */ package cn.liuyiyou.java.thread; /** * http://www.mamicode.com/info-detail-517008.html * @author liuyiyou.cn * @date 2017年8月9日 下午10:57:15 * @version */ public class JoinTest2 extends Thread { private String name; public JoinTest2(String name) { super(name); this.name = name; } public void run() { System.out.println(Thread.currentThread().getName() + " 线程运行开始!"); for (int i = 0; i < 5; i++) { System.out.println("子线程" + name + "运行 : " + i); try { sleep((int) Math.random() * 10); } catch (InterruptedException e) { e.printStackTrace(); } } System.out.println(Thread.currentThread().getName() + " 线程运行结束!"); } public static void main(String[] args) { System.out.println(Thread.currentThread().getName() + "主线程运行开始!"); Thread mTh1 = new Thread("A"); Thread mTh2 = new Thread("B"); mTh1.start(); mTh2.start(); try { // 这里需要理解的就是该线程是指的主线程等待子线程的终止。也就是在子线程调用了join()方法后面的代码,只有等到子线程结束了才能执行。 mTh1.join(); } catch (InterruptedException e) { e.printStackTrace(); } try { mTh2.join(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName() + "主线程运行结束!"); } }
[ "liuyiyou@daojia.com" ]
liuyiyou@daojia.com
37932e329ba70e386c2c0f2096dba118d55aacd8
374fa213d13d8739a1f81cd01716b63cf5cd50e7
/common/src/main/java/cn/wu1588/common/adapter/ImChatFacePagerAdapter.java
5b9a887e02b676ca825953de07fae177c3e0829f
[]
no_license
838245284/sbmall
22dea5509df20e77e53fe4e726308e0b0e74c438
cf975886955225cd54f48a69ba98a51ac95100ce
refs/heads/develop
2023-06-11T20:15:46.413200
2021-07-14T15:11:16
2021-07-14T15:11:16
380,426,907
0
0
null
2021-07-14T15:11:17
2021-06-26T06:02:48
Java
UTF-8
Java
false
false
2,678
java
package cn.wu1588.common.adapter; import android.content.Context; import android.support.annotation.Nullable; import android.support.v4.view.PagerAdapter; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; import java.util.List; import cn.wu1588.common.R; import cn.wu1588.common.interfaces.OnFaceClickListener; import cn.wu1588.common.utils.FaceUtil; /** * Created by cxf on 2018/7/11. * 聊天表情的ViewPager Adapter */ public class ImChatFacePagerAdapter extends PagerAdapter { private List<View> mViewList; private static final int FACE_COUNT = 20;//每页20个表情 public ImChatFacePagerAdapter(Context context, OnFaceClickListener onFaceClickListener) { LayoutInflater inflater = LayoutInflater.from(context); mViewList = new ArrayList<>(); List<String> faceList = FaceUtil.getFaceList(); int fromIndex = 0; int size = faceList.size(); int pageCount = size / FACE_COUNT; if (size % FACE_COUNT > 0) { pageCount++; for (int i = 0, count = pageCount * FACE_COUNT - size; i < count; i++) { faceList.add(""); } } for (int i = 0; i < pageCount; i++) { RecyclerView recyclerView = (RecyclerView) inflater.inflate(R.layout.view_chat_face_page, null, false); recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(new GridLayoutManager(context, 7, GridLayoutManager.VERTICAL, false)); int endIndex = fromIndex + FACE_COUNT; List<String> list = new ArrayList<>(); for (int j = fromIndex; j < endIndex; j++) { list.add(faceList.get(j)); } list.add("<"); recyclerView.setAdapter(new ImChatFaceAdapter(list, inflater, onFaceClickListener)); mViewList.add(recyclerView); fromIndex = endIndex; } } @Override public int getCount() { return mViewList.size(); } @Override public boolean isViewFromObject(@Nullable View view, @Nullable Object object) { return view == object; } @Override public Object instantiateItem(@Nullable ViewGroup container, int position) { View view = mViewList.get(position); container.addView(view); return view; } @Override public void destroyItem(@Nullable ViewGroup container, int position, @Nullable Object object) { container.removeView(mViewList.get(position)); } }
[ "838245284@qq.com" ]
838245284@qq.com
d5d4e828e493d11fc02a7bd9d20a68e935ce4746
83d56024094d15f64e07650dd2b606a38d7ec5f1
/sicc_druida/fuentes/java/PedSubtiPosicListFormatter.java
6fbc3ef24c6b9c2d6c60c83b6eb04b0c9d51fb2f
[]
no_license
cdiglesias/SICC
bdeba6af8f49e8d038ef30b61fcc6371c1083840
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
refs/heads/master
2021-01-19T19:45:14.788800
2016-04-07T16:20:51
2016-04-07T16:20:51
null
0
0
null
null
null
null
ISO-8859-10
Java
false
false
2,903
java
/* INDRA/CAR/mmg $Id: PedSubtiPosicListFormatter.java,v 1.1 2009/12/03 18:42:17 pecbazalar Exp $ DESC */ import java.util.Vector; import java.util.Hashtable; import java.util.Enumeration; import es.indra.belcorp.mso.*; import es.indra.druida.DruidaFormatoObjeto; import es.indra.druida.belcorp.MMGDruidaFormatoObjeto; import es.indra.druida.belcorp.MMGDruidaHelper; import es.indra.mare.common.dto.IMareDTO; import java.util.HashMap; import java.text.DecimalFormatSymbols; import es.indra.mare.common.mgu.manager.Property; import es.indra.utils.*; /** * Clase de formateo de objetos "PedSubtiPosic" para Druida * * @author Indra */ public class PedSubtiPosicListFormatter extends MMGDruidaFormatoObjeto { public PedSubtiPosicListFormatter() { } public void formatea(String s, Object obj) throws Exception { IMareDTO dto = (IMareDTO) obj; Vector pedSubtiPosicList = (Vector) dto.getProperty("result"); Vector result = new Vector(); HashMap propiedades = this.getUserProperties(); Property propiedadFecha = (Property)propiedades.get("FormatoFecha"); Property propiedadMiles = (Property)propiedades.get("FormatoNumericoSeparadorMiles"); Property propiedadDecimal = (Property)propiedades.get("FormatoNumericoSeparadorDecimales"); DecimalFormatSymbols symbols = new DecimalFormatSymbols(); symbols.setDecimalSeparator(propiedadDecimal.getValue().toString().charAt(0)); symbols.setGroupingSeparator(propiedadMiles.getValue().toString().charAt(0)); for (int i = 0; i < pedSubtiPosicList.size(); i++) { PedSubtiPosicData pedSubtiPosicData = (PedSubtiPosicData) pedSubtiPosicList.elementAt(i); Vector row = new Vector(); // Aņadir la clave Hashtable primaryKey = pedSubtiPosicData.mmgGetPrimaryKey(); Enumeration keys = primaryKey.keys(); while (keys.hasMoreElements()) { Object element = primaryKey.get(keys.nextElement()); row.add((element != null ? element.toString() : "")); } // Aņadir el resto de atributos row.add((pedSubtiPosicData.getCodSubtPosi() != null ? FormatUtils.formatObject(pedSubtiPosicData.getCodSubtPosi(), MMGDruidaHelper.getUserDecimalFormatPattern(this), symbols) : "")); row.add((pedSubtiPosicData.getTposOidTipoPosi() != null ? FormatUtils.formatObject(pedSubtiPosicData.getTposOidTipoPosi(), MMGDruidaHelper.getUserDecimalFormatPattern(this), symbols) : "")); row.add((pedSubtiPosicData.getDescripcion() != null ? FormatUtils.formatObject(pedSubtiPosicData.getDescripcion(), MMGDruidaHelper.getUserDecimalFormatPattern(this), symbols) : "")); // Aņadir el atributo timestamp. Por ahora queda deshabilitado (ponemos un 0) ya que no hay bloqueos.... //row.add(new Long(pedSubtiPosicData.jdoGetTimeStamp()).toString()); row.add(new Long(0).toString()); result.add(row); } setCampo(s, result); } }
[ "hp.vega@hotmail.com" ]
hp.vega@hotmail.com
d0f1da95aa3a19f9592a1a60e62a6b592b558cf5
a08ff306758d125264c9f7ce7f365316be8e172a
/app/src/main/java/com/cnews/guji/smart/helper/player/util/WindowUtil.java
f13c7c4606c09cc0a138092261d6f9a57651945c
[ "Apache-2.0" ]
permissive
xiamulo/GuJiNews_DayHot_2.0
bbbced3e1776e16ec44d1b00989ec8e588c5e113
4e0c748bc62db8112163d01013c0e524ea20c294
refs/heads/master
2023-07-11T04:09:09.449241
2021-08-25T06:25:45
2021-08-25T06:25:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,910
java
package com.cnews.guji.smart.helper.player.util; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.content.ContextWrapper; import android.content.res.Resources; import android.graphics.Point; import android.os.Build; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.view.ContextThemeWrapper; import android.util.TypedValue; import android.view.Display; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import android.view.WindowManager; /** * Window工具类 */ public class WindowUtil { /** * 获取状态栏高度 */ public static double getStatusBarHeight(Context context) { int statusBarHeight = 0; //获取status_bar_height资源的ID int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); if (resourceId > 0) { //根据资源ID获取响应的尺寸值 statusBarHeight = context.getResources().getDimensionPixelSize(resourceId); } return statusBarHeight; } /** * 获取NavigationBar的高度 */ public static int getNavigationBarHeight(Context context) { if (!hasNavigationBar(context)) { return 0; } Resources resources = context.getResources(); int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android"); //获取NavigationBar的高度 return resources.getDimensionPixelSize(resourceId); } /** * 是否存在NavigationBar */ public static boolean hasNavigationBar(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { Display display = getWindowManager(context).getDefaultDisplay(); Point size = new Point(); Point realSize = new Point(); display.getSize(size); display.getRealSize(realSize); return realSize.x != size.x || realSize.y != size.y; } else { boolean menu = ViewConfiguration.get(context).hasPermanentMenuKey(); boolean back = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK); return !(menu || back); } } /** * 获取屏幕宽度 */ public static int getScreenWidth(Context context) { return context.getResources().getDisplayMetrics().widthPixels; } /** * 获取屏幕高度 */ public static int getScreenHeight(Context context, boolean isIncludeNav) { if (isIncludeNav) { return context.getResources().getDisplayMetrics().heightPixels + getNavigationBarHeight(context); } else { return context.getResources().getDisplayMetrics().heightPixels; } } /** * 隐藏ActionBar,StatusBar,NavigationBar */ @SuppressLint("RestrictedApi") public static void hideSystemBar(Context context) { AppCompatActivity appCompatActivity = getAppCompActivity(context); if (appCompatActivity != null) { ActionBar ab = appCompatActivity.getSupportActionBar(); if (ab != null) { ab.setShowHideAnimationEnabled(false); ab.hide(); } } scanForActivity(context).getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); hideNavigationBar(context); } /** * 显示ActionBar,StatusBar,NavigationBar */ @SuppressLint("RestrictedApi") public static void showSystemBar(final Context context) { scanForActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); showNavigationBar(context); AppCompatActivity appCompatActivity = getAppCompActivity(context); if (appCompatActivity != null) { ActionBar ab = appCompatActivity.getSupportActionBar(); if (ab != null) { ab.setShowHideAnimationEnabled(false); ab.show(); } } } /** * 获取Activity */ public static Activity scanForActivity(Context context) { return context == null ? null : (context instanceof Activity ? (Activity) context : (context instanceof ContextWrapper ? scanForActivity(((ContextWrapper) context).getBaseContext()) : null)); } private static void hideNavigationBar(Context context) { View decorView = scanForActivity(context).getWindow().getDecorView(); decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN); } private static void showNavigationBar(Context context) { View decorView = scanForActivity(context).getWindow().getDecorView(); int systemUiVisibility = decorView.getSystemUiVisibility(); int flags = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN; systemUiVisibility &= ~flags; decorView.setSystemUiVisibility(systemUiVisibility); } /** * Get AppCompatActivity from context */ public static AppCompatActivity getAppCompActivity(Context context) { if (context == null) return null; if (context instanceof AppCompatActivity) { return (AppCompatActivity) context; } else if (context instanceof ContextThemeWrapper) { return getAppCompActivity(((ContextThemeWrapper) context).getBaseContext()); } return null; } /** * dp转为px */ public static int dp2px(Context context, float dpValue) { return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dpValue, context.getResources().getDisplayMetrics()); } /** * sp转为px */ public static int sp2px(Context context, float dpValue) { return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, dpValue, context.getResources().getDisplayMetrics()); } /** * 如果WindowManager还未创建,则创建一个新的WindowManager返回。否则返回当前已创建的WindowManager。 */ public static WindowManager getWindowManager(Context context) { return (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); } /** * 边缘检测 */ public static boolean isEdge(Context context, MotionEvent e) { int edgeSize = dp2px(context, 50); return e.getRawX() < edgeSize || e.getRawX() > getScreenWidth(context) - edgeSize || e.getRawY() < edgeSize || e.getRawY() > getScreenHeight(context, true) - edgeSize; } }
[ "dincl@jsyl.com.cn" ]
dincl@jsyl.com.cn
a88e54958d816654951056b6aa8b6c4a5fab2d33
91108aa0e65325b1b19dbc0798ae425074dfcbc6
/app/src/main/java/vision/genesis/clientapp/ui/ProfileDataView.java
822d939dcbdaea7a82cd7359e131cabe461620a0
[]
no_license
shvyrev/android-client
41fc3295f3d765b4290f346d4b0cdb6c498e81ad
b10f88997de3d8c535b24aedf18c8d1dfbc198ce
refs/heads/master
2020-04-27T16:20:36.440660
2018-11-15T17:36:23
2018-11-15T17:36:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,443
java
package vision.genesis.clientapp.ui; import android.content.Context; import android.graphics.PorterDuff; import android.support.design.widget.TextInputEditText; import android.support.design.widget.TextInputLayout; import android.support.v4.content.ContextCompat; import android.util.AttributeSet; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.RelativeLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.Unbinder; import vision.genesis.clientapp.R; /** * GenesisVisionAndroid * Created by Vitaly on 23/03/2018. */ public class ProfileDataView extends RelativeLayout { @BindView(R.id.text_input_layout) public TextInputLayout textInputLayout; @BindView(R.id.edit_text) public TextInputEditText editText; @BindView(R.id.edit_icon) public View editIcon; private Unbinder unbinder; public ProfileDataView(Context context) { super(context); initView(); } public ProfileDataView(Context context, AttributeSet attrs) { super(context, attrs); initView(); } public ProfileDataView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initView(); } @OnClick(R.id.edit_icon) public void onEditIconClicked() { editText.requestFocus(); InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); } public void onDestroy() { if (unbinder != null) { unbinder.unbind(); unbinder = null; } } private void initView() { inflate(getContext(), R.layout.view_profile_data, this); unbinder = ButterKnife.bind(this); setEditMode(false); } public void setEditMode(boolean editMode) { textInputLayout.setEnabled(editMode); if (editMode) { editText.getBackground().setColorFilter(ContextCompat.getColor(getContext(), R.color.grey300), PorterDuff.Mode.SRC_IN); editIcon.setVisibility(View.VISIBLE); } else { editText.getBackground().setColorFilter(ContextCompat.getColor(getContext(), android.R.color.transparent), PorterDuff.Mode.SRC_IN); editIcon.setVisibility(View.GONE); } } public void setHint(String hint) { textInputLayout.setHint(hint.toUpperCase()); } public String getText() { return editText.getText().toString(); } public void setText(String text) { editText.setText(text); } }
[ "dev.prus@gmail.com" ]
dev.prus@gmail.com
bfef2d87cfbc8b2adcace4c88b6861941cd6500e
9a9b4e8747ac943871b6128be6651fa40cb77180
/jtests/ua/gradsoft/termwaretests/systems/ListSystemTest.java
6a54f42c5024d58e5aa31d24fea06def8e7943e4
[]
no_license
rssh/termware2
8fa72f07f8f7874547bab9242276c15b29f7e0e4
95e6b312aa868758eeb1d5096db87049adbf0009
refs/heads/master
2021-01-23T08:38:32.274836
2012-09-20T05:29:37
2012-09-20T05:29:37
2,424,293
2
1
null
null
null
null
UTF-8
Java
false
false
3,541
java
/* * ListSystemTest.java * * Copyright (c) 2006 GradSoft Ukraine * All Rights Reserved */ package ua.gradsoft.termwaretests.systems; import junit.framework.TestCase; import ua.gradsoft.termware.Term; import ua.gradsoft.termware.TermSystem; import ua.gradsoft.termware.TermWare; import ua.gradsoft.termware.TermWareException; /** * * @author Ruslan Shevchenko */ public class ListSystemTest extends TestCase { protected void setUp() { TermWare.getInstance().init(); } public void testResolution() throws TermWareException { TermSystem listSystem=TermWare.getInstance().resolveSystem("List"); assertTrue(listSystem!=null); } /** * append(NIL,NIL) -> NIL */ public void testAppend1() throws TermWareException { TermSystem listSystem=TermWare.getInstance().resolveSystem("List"); Term l = TermWare.getInstance().getTermFactory().createNil(); Term e = TermWare.getInstance().getTermFactory().createNil(); Term t = TermWare.getInstance().getTermFactory().createTerm("append",e,l); t=listSystem.reduce(t); assertTrue(t.isNil()); } /** * append(NIL,q) -> cons(q,NIL) */ public void testAppend2() throws TermWareException { TermSystem listSystem=TermWare.getInstance().resolveSystem("List"); Term l = TermWare.getInstance().getTermFactory().createNil(); Term e = TermWare.getInstance().getTermFactory().createAtom("q"); Term t = TermWare.getInstance().getTermFactory().createTerm("append",e,l); t=listSystem.reduce(t); assertTrue(t.getName().equals("cons")); Term q=t.getSubtermAt(0); assertTrue(q.getName().equals("q")); Term n=t.getSubtermAt(1); assertTrue(n.isNil()); } /** * append(cons(a,NIL),q) -> cons(a,cons(q,NIL)) */ public void testAppend3() throws TermWareException { TermSystem listSystem=TermWare.getInstance().resolveSystem("List"); Term l = TermWare.getInstance().getTermFactory().createParsedTerm("cons(a,NIL)"); Term e = TermWare.getInstance().getTermFactory().createAtom("q"); Term t = TermWare.getInstance().getTermFactory().createTerm("append",e,l); t=listSystem.reduce(t); assertTrue(t.getName().equals("cons")); Term a=t.getSubtermAt(0); assertTrue(a.getName().equals("a")); t=t.getSubtermAt(1); assertTrue(t.getName().equals("cons")); Term q=t.getSubtermAt(0); assertTrue(q.getName().equals("q")); Term n=t.getSubtermAt(1); assertTrue(n.isNil()); } /** * append(q,q) must be unchanged */ public void testAppend4() throws TermWareException { TermSystem listSystem=TermWare.getInstance().resolveSystem("List"); Term l = TermWare.getInstance().getTermFactory().createAtom("q"); Term e = TermWare.getInstance().getTermFactory().createAtom("q"); Term t = TermWare.getInstance().getTermFactory().createTerm("append",e,l); t=listSystem.reduce(t); assertTrue(t.getName().equals("append")); } public void testLength1() throws TermWareException { TermSystem listSystem=TermWare.getInstance().resolveSystem("List"); Term l = TermWare.getInstance().getTermFactory().createNil(); Term t = TermWare.getInstance().getTermFactory().createTerm("length",l); t=listSystem.reduce(t); assertTrue(t.getInt()==0); } }
[ "rssh@e6263924-d73c-0410-abf9-b8ad5fbdd136" ]
rssh@e6263924-d73c-0410-abf9-b8ad5fbdd136
8c2c81aa2d0bf069c38cbb948e0f48a056dc7c91
0b657fbc76dcbb2544b01e8dbbe83e30289c142f
/403/20210620.java
f063f6287046eddf6c52dadf13bfee9f3cce9916
[]
no_license
MaCoredroid/leetcode
68cbd343ea4a99067a497d9c034e5ab1ca3525e6
58080590f3a4f4d1f8082474a3ec344b87b18b4d
refs/heads/master
2022-03-11T07:17:45.908007
2022-02-08T01:41:24
2022-02-08T01:41:24
227,243,204
0
0
null
null
null
null
UTF-8
Java
false
false
685
java
class Solution { public boolean canCross(int[] stones) { int n = stones.length; boolean[][] dp = new boolean[n][n]; dp[0][0] = true; for (int i = 1; i < n; ++i) { if (stones[i] - stones[i - 1] > i) { return false; } } for(int i=1;i<n;i++){ for(int j=i-1;j>=0;j--){ int k=stones[i]-stones[j]; if(k>j+1){ break; } dp[i][k]=dp[j][k-1]||dp[j][k]||dp[j][k+1]; if(i==n-1&&dp[i][k]){ return true; } } } return false; } }
[ "coredroid0401@gmail.com" ]
coredroid0401@gmail.com
6ce55d58cffdca7a364fc4b3443cf3ed1a8ed74e
ff026f7189dc7127c99bddf2067b67f2aeba9363
/erian/src/main/java/com/rambo/mysql/service/city/CityService.java
f42405e1097ece6e9edf61a997548a9f522d7abd
[]
no_license
freerambo/rambo
41e383c7b94d078de884f44af38387f317e5ba49
4e7d710c9a01e0ecb7e38480c4041cd902c022ae
refs/heads/master
2022-12-20T20:13:37.196253
2020-09-12T10:42:13
2020-09-12T10:42:13
25,810,606
1
2
null
2022-12-16T03:23:01
2014-10-27T08:53:33
JavaScript
UTF-8
Java
false
false
2,797
java
/******************************************************************************* * Copyright (c) 2005, 2014 springside.github.io * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ package com.rambo.mysql.service.city; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort.Direction; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import com.rambo.mysql.entity.City; import com.rambo.mysql.repository.CityDao; import org.springside.modules.persistence.DynamicSpecifications; import org.springside.modules.persistence.SearchFilter; import org.springside.modules.persistence.SearchFilter.Operator; // Spring Bean的标识. @Component // 类中所有public函数都纳入事务管理的标识. @Transactional(value="mysqlEM") public class CityService { private CityDao cityDao; public City getCity(Long id) { return cityDao.findOne(id); } public void saveCity(City entity) { cityDao.save(entity); } public void deleteCity(Long id) { cityDao.delete(id); } public List<City> getAllCity() { return (List<City>) cityDao.findAll(); } public Page<City> getUserCity(Long userId, Map<String, Object> searchParams, int pageNumber, int pageSize, String sortType) { PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType); Specification<City> spec = buildSpecification(userId, searchParams); return cityDao.findAll(spec, pageRequest); } /** * 创建分页请求. */ private PageRequest buildPageRequest(int pageNumber, int pagzSize, String sortType) { Sort sort = null; if ("auto".equals(sortType)) { sort = new Sort(Direction.DESC, "id"); } else if ("title".equals(sortType)) { sort = new Sort(Direction.ASC, "title"); } return new PageRequest(pageNumber - 1, pagzSize, sort); } /** * 创建动态查询条件组合. */ private Specification<City> buildSpecification(Long userId, Map<String, Object> searchParams) { Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); filters.put("user.id", new SearchFilter("user.id", Operator.EQ, userId)); Specification<City> spec = DynamicSpecifications.bySearchFilter(filters.values(), City.class); return spec; } @Autowired public void setCityDao(CityDao cityDao) { this.cityDao = cityDao; } }
[ "zhuyb@ntu.edu.sg" ]
zhuyb@ntu.edu.sg
8d8d235f816ee5b91bb5463ac0f42c93c0a6ecd3
a2881dfb3246eebda78c695ede7f5aa0b426aec9
/1.7.10 obfuscated/a/ads.java
49e46af4fda321fe97366eb346ebefa342eca672
[]
no_license
Jckf/mc-dev
ca03c1907b4b33c94a7bcb7a2067e3963bbf05d2
128dae1fe7e2b7772d89dcf130a49210bfd06aa3
refs/heads/master
2016-09-05T11:14:19.324416
2014-10-01T00:53:05
2014-10-01T00:53:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
940
java
public class ads extends adb { public ads() { this.a(abt.d); } public boolean a(add var1, yz var2, ahb var3, int var4, int var5, int var6, int var7, float var8, float var9, float var10) { if(var3.a(var4, var5, var6) != ajn.aC) { if(var7 == 0) { --var5; } if(var7 == 1) { ++var5; } if(var7 == 2) { --var6; } if(var7 == 3) { ++var6; } if(var7 == 4) { --var4; } if(var7 == 5) { ++var4; } if(!var3.c(var4, var5, var6)) { return false; } } if(!var2.a(var4, var5, var6, var7, var1)) { return false; } else { if(ajn.af.c(var3, var4, var5, var6)) { --var1.b; var3.b(var4, var5, var6, (aji)ajn.af); } return true; } } }
[ "jckf@jckf.no" ]
jckf@jckf.no
b8ce2f08dfd16f533727fc30f2fb3cdb1c15aea1
f3c58dccbc55101d6302634852aac8994874d3d3
/src/main/java/org/elasql/sql/Key.java
8c51e45a90d85c1cd2c86cc05255ef1d56c624e8
[ "Apache-2.0" ]
permissive
elasql/elasql
1dda91e044a19e8e6e881d44549b5cb99e40fe41
f92e6393437f01b04e8e682a1467c90b9550a7ce
refs/heads/master
2023-02-09T08:20:58.300962
2022-10-13T18:09:51
2022-10-13T18:09:51
61,373,806
25
13
Apache-2.0
2022-10-13T18:09:52
2016-06-17T13:00:38
Java
UTF-8
Java
false
false
5,469
java
package org.elasql.sql; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.Arrays; import java.util.Iterator; import java.util.List; import org.vanilladb.core.sql.Constant; import org.vanilladb.core.sql.Type; import org.vanilladb.core.sql.predicate.ConstantExpression; import org.vanilladb.core.sql.predicate.Expression; import org.vanilladb.core.sql.predicate.FieldNameExpression; import org.vanilladb.core.sql.predicate.Predicate; import org.vanilladb.core.sql.predicate.Term; import org.vanilladb.core.storage.index.SearchKey; public abstract class Key implements Serializable { private static final long serialVersionUID = 20200819002L; private String tableName; private String[] fields; // We serialize this field manually // because a Constant is non-serializable. private transient Constant[] values; private int hashCode; protected Key(String tableName, String fld, Constant val) { this.tableName = tableName; this.fields = new String[] { fld }; this.values = new Constant[] { val }; genHashCode(); } protected Key(String tableName, String[] fields, Constant[] values) { if (fields.length != values.length) throw new IllegalArgumentException(); this.tableName = tableName; this.fields = fields; this.values = values; genHashCode(); } protected Key(Key otherKey) { this.tableName = otherKey.tableName; this.fields = Arrays.copyOf(otherKey.fields, otherKey.fields.length); this.values = Arrays.copyOf(otherKey.values, otherKey.values.length); genHashCode(); } public String getTableName() { return tableName; } public boolean containsField(String fld) { for (int i = 0; i < fields.length; i++) { if (fields[i].equals(fld)) return true; } return false; } public int getNumOfFlds() { return fields.length; } public String getField(int index) { return fields[index]; } public Constant getVal(int index) { return values[index]; } public Constant getVal(String fld) { for (int i = 0; i < fields.length; i++) { if (fields[i].equals(fld)) return values[i]; } return null; } public Predicate toPredicate() { Predicate pred = new Predicate(); for (int i = 0; i < fields.length; i++) { Expression k = new FieldNameExpression(fields[i]); Expression v = new ConstantExpression(values[i]); pred.conjunctWith(new Term(k, Term.OP_EQ, v)); } return pred; } public SearchKey toSearchKey(List<String> indexedFields) { Constant[] vals = new Constant[indexedFields.size()]; Iterator<String> fldNameIter = indexedFields.iterator(); for (int i = 0; i < vals.length; i++) { String fldName = fldNameIter.next(); vals[i] = getVal(fldName); if (vals[i] == null) throw new NullPointerException("there is no value for '" + fldName + "'"); } return new SearchKey(vals); } // @Override // public int compareTo(RecordKey rk) { // if (tableName.compareTo("item") == 0) { // if ((int)getVal("i_id").asJavaVal() < (int)rk.getVal("i_id").asJavaVal()) // return -1; // else if ((int)getVal("i_id").asJavaVal() > (int)rk.getVal("i_id").asJavaVal()) // return 1; // } //// else if (tableName.compareTo("ycsb") == 0) { //// if ((String)getKeyVal("i_id").asJavaVal() < (int)rk.getKeyVal("i_id").asJavaVal()) //// return -1; //// else if ((int)getKeyVal("i_id").asJavaVal() > (int)rk.getKeyVal("i_id").asJavaVal()) //// return 1; //// } // return 0; // } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(tableName); sb.append(": "); for (int i = 0; i < fields.length; i++) { sb.append(fields[i]); sb.append(" -> "); sb.append(values[i]); sb.append(", "); } sb.delete(sb.length() - 2, sb.length()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (obj == this) return true; if (obj == null) return false; if (obj.getClass() != PrimaryKey.class) return false; Key k = (Key) obj; return k.tableName.equals(this.tableName) && Arrays.equals(k.fields, this.fields) && Arrays.equals(k.values, this.values); } @Override public int hashCode() { return hashCode; } private void genHashCode() { hashCode = 17; hashCode = 31 * hashCode + tableName.hashCode(); for (int i = 0; i < fields.length; i++) { hashCode = 31 * hashCode + fields[i].hashCode(); hashCode = 31 * hashCode + values[i].hashCode(); } } private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); out.writeInt(values.length); // Write out all elements in the proper order for (int i = 0; i < values.length; i++) { Constant val = values[i]; byte[] bytes = val.asBytes(); out.writeInt(val.getType().getSqlType()); out.writeInt(val.getType().getArgument()); out.writeInt(bytes.length); out.write(bytes); } } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); int numberOfVals = in.readInt(); this.values = new Constant[numberOfVals]; // Read in all values for (int i = 0; i < numberOfVals; i++) { int sqlType = in.readInt(); int argument = in.readInt(); byte[] bytes = new byte[in.readInt()]; in.read(bytes); Constant val = Constant.newInstance(Type.newInstance(sqlType, argument), bytes); values[i] = val; } } }
[ "sam123456777@gmail.com" ]
sam123456777@gmail.com
e92df34ec303e62811cd486c190ec92266a18327
04a8cd6e185c0a9fc75583926c9dcca1ca2d5c14
/app/src/main/java/com/hyt/advsmallscreen/ui/ChangPasswordActivity.java
1680f909531312f07916fcddd588824f63415c37
[]
no_license
expect-github/SmallScreenAdv
c7d147ef5a2d304d5c9d03082b66938656ac516f
2ad58f07ad4c3f1426b81cbad77c531d28f5e3cc
refs/heads/master
2020-03-26T10:15:07.269311
2018-08-15T01:03:44
2018-08-15T01:03:44
144,788,247
0
0
null
null
null
null
UTF-8
Java
false
false
3,362
java
package com.hyt.advsmallscreen.ui; import android.content.Context; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; import com.hyt.advsmallscreen.R; import com.hyt.advsmallscreen.global.Shared; import com.hyt.advsmallscreen.ui.base.BaseActivity; import com.hyt.advsmallscreen.utils.SharedUtlis; import com.hyt.advsmallscreen.utils.ToastTools; public class ChangPasswordActivity extends BaseActivity { Context context; private String TAG = getClass().getName(); private CheckBox cbUseface; private Button btChange; private Button btCancle; private EditText etOld; private EditText etNew; private EditText etConfirm; private SharedUtlis sharedUtlis; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_password_change); context = this; initview(); initdata(); } @Override protected void destory() { } private void initview() { btChange = (Button) findViewById(R.id.bt_confirm_change); btCancle = (Button) findViewById(R.id.bt_back_of); etOld = (EditText) findViewById(R.id.et_old_pas); etNew = (EditText) findViewById(R.id.et_new_pas); etConfirm = (EditText) findViewById(R.id.et_reInput_pas); } private void initdata() { sharedUtlis = new SharedUtlis(context, Shared.config); btCancle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); btChange.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String old = etOld.getText().toString().trim(); String newPas = etNew.getText().toString().trim(); String rePass = etConfirm.getText().toString().trim(); if (old == null || old.isEmpty()) { ToastTools.showShort(context, "请输入原始密码"); return; } if (newPas == null || newPas.isEmpty()) { ToastTools.showShort(context, "请输入新密码"); return; } if (rePass == null || rePass.isEmpty()) { ToastTools.showShort(context, "请重复输入新密码"); return; } if (old.equals(sharedUtlis.getString(Shared.moreSettingPass,""))){ if(newPas.equals(rePass)){ ToastTools.showShort(context, "密码修改成功!"); sharedUtlis.putString(Shared.moreSettingPass,rePass); }else { ToastTools.showShort(context, "两次输入的新密码不同"); return; } }else { ToastTools.showShort(context, "输入的原始密码有误"); return; } } }); } @Override public void ui() { } @Override public void data() { } }
[ "1" ]
1
f6446eb8d2dc590bd1396c6d4022852336d81895
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hive/13909_2.java
735d27e17bdc10acda365636725316bc5801f7d0
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
1,783
java
//,temp,ThriftHiveMetastore.java,32806,32837,temp,ThriftHiveMetastore.java,32667,32698 //,2 public class xxx { public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; get_partitions_spec_by_expr_result result = new get_partitions_spec_by_expr_result(); if (e instanceof MetaException) { result.o1 = (MetaException) e; result.setO1IsSet(true); msg = result; } else if (e instanceof NoSuchObjectException) { result.o2 = (NoSuchObjectException) e; result.setO2IsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } };
[ "SHOSHIN\\sgholamian@shoshin.uwaterloo.ca" ]
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
c43ea0e7c4a896773c64fa622c548a2a027623ae
ae124491d41fd9bbe79b982f689fd7d255061d9b
/modules/core/src/main/java/org/mycontroller/standalone/metrics/engine/conf/MetricEngineConfigInfluxDB.java
651d50e6832504475f63361a15675fdae74784b8
[ "Apache-2.0" ]
permissive
nino21/mycontroller
8d1a56256fdff04c16732a00873dac73ed3f31f1
1f162e269175980d243aeaab19d34c07a31a57b1
refs/heads/development
2021-01-25T14:49:16.492198
2018-10-29T14:50:06
2018-10-29T14:50:06
123,730,094
0
0
Apache-2.0
2019-03-11T20:25:32
2018-03-03T20:48:42
Java
UTF-8
Java
false
false
1,480
java
/* * Copyright 2015-2018 Jeeva Kandasamy (jkandasa@gmail.com) * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mycontroller.standalone.metrics.engine.conf; import org.mycontroller.restclient.core.TRUST_HOST_TYPE; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; /** * @author Jeeva Kandasamy (jkandasa) * @since 0.0.3 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = false) @ToString(exclude = "password", callSuper = true) public class MetricEngineConfigInfluxDB extends MetricEngineConf { /** */ private static final long serialVersionUID = 8099852875975145155L; private String url; private TRUST_HOST_TYPE trustHostType; private String database; private String username; private String password; }
[ "jkandasa@gmail.com" ]
jkandasa@gmail.com
7ac8e590c17f4aa420d6a75d2c6c8d8e6b879824
fbfcb88a9bfdc2868077a7035a74c98dc3eb25a0
/src/combiz/domain/workflow/Wfinstance.java
6b895d1b176853dd0a9e7b5d3d889383e34b74d5
[]
no_license
jackwysxw/combiz
817af9399251ff286d2a4c1d525953e8f66c8e06
9a84f3b4e8866a5030462eafa683bf5d7ad4bf40
refs/heads/master
2020-04-25T14:46:23.301900
2016-09-26T07:04:16
2016-09-26T07:04:16
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
3,872
java
package combiz.domain.workflow; import combiz.system.IBOBaseObject; public class Wfinstance extends IBOBaseObject implements java.io.Serializable { private Long id; //Fields private java.lang.String active; private java.lang.Long curnodeid; private java.lang.String description; private java.lang.Long ownerid; private java.lang.String ownertable; private java.lang.String startor; private java.util.Date starttime; private java.lang.String wfname; private java.lang.Long wfrevision; /** default constructor */ public Wfinstance(){} public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } //Property accessors /** * ×Ö¶ÎACTIVE * @return java.lang.String */ public java.lang.String getActive() { if(this.active==null || this.active.length()<=0) return null; else return this.active; } /** * ×Ö¶ÎACTIVE * @return java.lang.String */ public void setActive(java.lang.String active) { this.active = active; } /** * µ±Ç°½ÚµãID * @return java.lang.Long */ public java.lang.Long getCurnodeid() { return this.curnodeid; } /** * µ±Ç°½ÚµãID * @return java.lang.Long */ public void setCurnodeid(java.lang.Long curnodeid) { this.curnodeid = curnodeid; } /** * Á÷³ÌʵÀýÃèÊö * @return java.lang.String */ public java.lang.String getDescription() { if(this.description==null || this.description.length()<=0) return null; else return this.description; } /** * Á÷³ÌʵÀýÃèÊö * @return java.lang.String */ public void setDescription(java.lang.String description) { this.description = description; } /** * ×Ö¶ÎOWNERID * @return java.lang.Long */ public java.lang.Long getOwnerid() { return this.ownerid; } /** * ×Ö¶ÎOWNERID * @return java.lang.Long */ public void setOwnerid(java.lang.Long ownerid) { this.ownerid = ownerid; } /** * ×Ö¶ÎOWNERTABLE * @return java.lang.String */ public java.lang.String getOwnertable() { if(this.ownertable==null || this.ownertable.length()<=0) return null; else return this.ownertable; } /** * ×Ö¶ÎOWNERTABLE * @return java.lang.String */ public void setOwnertable(java.lang.String ownertable) { this.ownertable = ownertable; } /** * ×Ö¶ÎSTARTOR * @return java.lang.String */ public java.lang.String getStartor() { if(this.startor==null || this.startor.length()<=0) return null; else return this.startor; } /** * ×Ö¶ÎSTARTOR * @return java.lang.String */ public void setStartor(java.lang.String startor) { this.startor = startor; } /** * ×Ö¶ÎSTARTTIME * @return java.util.Date */ public java.util.Date getStarttime() { return this.starttime; } /** * ×Ö¶ÎSTARTTIME * @return java.util.Date */ public void setStarttime(java.util.Date starttime) { this.starttime = starttime; } /** * ×Ö¶ÎWFNAME * @return java.lang.String */ public java.lang.String getWfname() { if(this.wfname==null || this.wfname.length()<=0) return null; else return this.wfname; } /** * ×Ö¶ÎWFNAME * @return java.lang.String */ public void setWfname(java.lang.String wfname) { this.wfname = wfname; } /** * ×Ö¶ÎWFREVISION * @return java.lang.Long */ public java.lang.Long getWfrevision() { return this.wfrevision; } /** * ×Ö¶ÎWFREVISION * @return java.lang.Long */ public void setWfrevision(java.lang.Long wfrevision) { this.wfrevision = wfrevision; } }
[ "876301469@qq.com" ]
876301469@qq.com
93ffe3d8d481fea0cc1549b2f8ec7a9456cf0626
9049eabb2562cd3e854781dea6bd0a5e395812d3
/sources/com/google/android/gms/people/protomodel/PhoneEntity.java
01d29982bd807c2f8e1fcc57a5845097b8842291
[]
no_license
Romern/gms_decompiled
4c75449feab97321da23ecbaac054c2303150076
a9c245404f65b8af456b7b3440f48d49313600ba
refs/heads/master
2022-07-17T23:22:00.441901
2020-05-17T18:26:16
2020-05-17T18:26:16
264,227,100
2
5
null
null
null
null
UTF-8
Java
false
false
3,581
java
package com.google.android.gms.people.protomodel; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import java.util.Arrays; /* compiled from: :com.google.android.gms@201515033@20.15.15 (120300-306758586) */ public class PhoneEntity extends AbstractSafeParcelable implements Phone { public static final Parcelable.Creator CREATOR = new ampc(); /* renamed from: a */ public final PersonFieldMetadataEntity f82032a; /* renamed from: b */ public final String f82033b; /* renamed from: c */ public final String f82034c; public PhoneEntity(PersonFieldMetadata personFieldMetadata, String str, String str2, boolean z) { this.f82033b = str; this.f82034c = str2; if (z) { this.f82032a = (PersonFieldMetadataEntity) personFieldMetadata; } else { this.f82032a = personFieldMetadata != null ? new PersonFieldMetadataEntity(personFieldMetadata) : null; } } /* renamed from: a */ public final PersonFieldMetadata mo46453a() { return this.f82032a; } /* renamed from: b */ public final String mo46454b() { return this.f82033b; } /* renamed from: bF */ public final /* bridge */ /* synthetic */ Object mo7556bF() { return this; } /* renamed from: c */ public final String mo46455c() { return this.f82034c; } public final boolean equals(Object obj) { if (!(obj instanceof Phone)) { return false; } if (this == obj) { return true; } Phone phone = (Phone) obj; return sdg.m34949a(mo46453a(), phone.mo46453a()) && sdg.m34949a(mo46454b(), phone.mo46454b()) && sdg.m34949a(mo46455c(), phone.mo46455c()); } public final int hashCode() { return Arrays.hashCode(new Object[]{mo46453a(), mo46454b(), mo46455c()}); } /* JADX DEBUG: Failed to find minimal casts for resolve overloaded methods, cast all args instead method: see.a(android.os.Parcel, int, java.lang.String, boolean):void arg types: [android.os.Parcel, int, java.lang.String, int] candidates: see.a(android.os.Parcel, int, android.os.Bundle, boolean):void see.a(android.os.Parcel, int, android.os.Parcel, boolean):void see.a(android.os.Parcel, int, java.math.BigDecimal, boolean):void see.a(android.os.Parcel, int, java.util.List, boolean):void see.a(android.os.Parcel, int, byte[], boolean):void see.a(android.os.Parcel, int, double[], boolean):void see.a(android.os.Parcel, int, float[], boolean):void see.a(android.os.Parcel, int, int[], boolean):void see.a(android.os.Parcel, int, long[], boolean):void see.a(android.os.Parcel, int, android.os.Parcelable[], int):void see.a(android.os.Parcel, int, java.lang.String[], boolean):void see.a(android.os.Parcel, int, boolean[], boolean):void see.a(android.os.Parcel, int, java.lang.String, boolean):void */ public final void writeToParcel(Parcel parcel, int i) { int a = see.m35030a(parcel); see.m35040a(parcel, 2, this.f82032a, i, false); see.m35046a(parcel, 3, this.f82033b, false); see.m35046a(parcel, 4, this.f82034c, false); see.m35062b(parcel, a); } public PhoneEntity(PersonFieldMetadataEntity personFieldMetadataEntity, String str, String str2) { this.f82032a = personFieldMetadataEntity; this.f82033b = str; this.f82034c = str2; } }
[ "roman.karwacik@rwth-aachen.de" ]
roman.karwacik@rwth-aachen.de
a2d0ce9b2d2edc45726ae2bd9e8a366f975d5612
76b00b7be11ab2c21eb4a604a9484065a500c52f
/customerLR-service-portlet/docroot/WEB-INF/src/com/pacnet/connect/service/impl/FacilityStaffMappingServiceImpl.java
3ceb9c9e23f07573f2075251d9d645013a3986ff
[]
no_license
pankajsharmaatcloudsmartz/Pacnet-Connect
8cf201cbcf6de2deae4407df564784fb42fbf55c
2bdc4d44f35373aad6c83cd29ce8dc970091b79d
refs/heads/master
2021-01-23T14:47:10.167327
2015-03-10T11:21:56
2015-03-10T11:30:53
31,952,143
0
0
null
null
null
null
UTF-8
Java
false
false
1,684
java
/** * Copyright (c) 2000-2012 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.pacnet.connect.service.impl; import com.pacnet.connect.service.base.FacilityStaffMappingServiceBaseImpl; /** * The implementation of the facility staff mapping remote service. * * <p> * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link com.pacnet.connect.service.FacilityStaffMappingService} interface. * * <p> * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. * </p> * * @author CloudSmartz * @see com.pacnet.connect.service.base.FacilityStaffMappingServiceBaseImpl * @see com.pacnet.connect.service.FacilityStaffMappingServiceUtil */ public class FacilityStaffMappingServiceImpl extends FacilityStaffMappingServiceBaseImpl { /* * NOTE FOR DEVELOPERS: * * Never reference this interface directly. Always use {@link com.pacnet.connect.service.FacilityStaffMappingServiceUtil} to access the facility staff mapping remote service. */ }
[ "pankshar@IDCPANKSHAR-LT.cloudsmartz.net" ]
pankshar@IDCPANKSHAR-LT.cloudsmartz.net
1bc7732e087762f23bcb28f1a53991fb715c4992
ec2a02e1bc54560291d80b39e8461fcfd3e88f5c
/app/src/main/java/com/zfsbs/activity/CheckOperatorLoginActivity.java
fe3f765ad488654049863740d4a8dda6e57253b2
[]
no_license
beyond-snail/MySbsfor2N910
12579c9069fcefb82168c837d6d987b463e2dd67
c309bd2722c89c17d13464721666b3d18fecb42f
refs/heads/master
2021-08-17T19:45:10.066951
2018-10-29T07:47:02
2018-10-29T07:47:02
110,087,061
0
0
null
null
null
null
UTF-8
Java
false
false
2,280
java
package com.zfsbs.activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import com.tool.utils.utils.SPUtils; import com.tool.utils.utils.StringUtils; import com.tool.utils.utils.ToastUtils; import com.tool.utils.view.ClearEditText; import com.zfsbs.R; import com.zfsbs.common.CommonFunc; import com.zfsbs.config.Constants; public class CheckOperatorLoginActivity extends BaseActivity implements OnClickListener { private Button btnOperatorLogin; private ClearEditText edPassWord; private ClearEditText edUserName; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mContext = this; setContentView(R.layout.activity_check_operator); // AppManager.getAppManager().addActivity(this); initTitle("操作员登录"); initView(); addListener(); } private void initView() { btnOperatorLogin = (Button) findViewById(R.id.id_login); edPassWord = (ClearEditText) findViewById(R.id.password); edPassWord.setText(""); edUserName = (ClearEditText) findViewById(R.id.id_username); String usrName = (String) SPUtils.get(mContext, Constants.USER_NAME,""); edUserName.setText(usrName); edUserName.setSelection(edUserName.getText().length()); // edUserName.setEnabled(false); } @Override protected void onResume() { super.onResume(); edPassWord.setText(""); } private void addListener() { btnOperatorLogin.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.id_login: String psw = (String) SPUtils.get(mContext, Constants.USER_PSW, ""); if (StringUtils.isEquals(edPassWord.getText().toString().trim(), psw)){ CommonFunc.startAction(CheckOperatorLoginActivity.this, RechargeActivity.class, false); finish(); }else{ ToastUtils.CustomShow(mContext, "密码错误"); } break; default: break; } } }
[ "wu15979937502" ]
wu15979937502
b27dafb4fd91529f8b81efc30a68e7e8d5f41f25
27946456acb2fe726a5b9cf1f7f057e712ebe6d1
/src/main/java/com/rumaruka/powercraft/api/network/packet/PCPacketWindowItems.java
eaf262f463d85d1e407ef75a32b4330f9ec4ea5e
[]
no_license
Rumaruka/powercraft-newlife
6d7884d852db8f80d00a03083fb5084db7becc11
c6e69ef284b001229cda9b1fc22821b3767bff07
refs/heads/master
2020-12-05T17:51:47.901389
2020-01-10T15:34:17
2020-01-10T15:34:17
232,196,287
0
0
null
null
null
null
UTF-8
Java
false
false
1,876
java
package com.rumaruka.powercraft.api.network.packet; import com.rumaruka.powercraft.api.gres.PCGresBaseWithInventory; import com.rumaruka.powercraft.api.network.PCPacket; import com.rumaruka.powercraft.api.network.PCPacketServerToClient; import io.netty.buffer.ByteBuf; import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.network.play.server.SPacketWindowItems; import net.minecraft.util.NonNullList; import net.minecraft.world.World; import java.util.ArrayList; import java.util.List; public class PCPacketWindowItems extends PCPacketServerToClient { private int windowId; private NonNullList<ItemStack> itemStacks; public PCPacketWindowItems(){ } public PCPacketWindowItems(int windowId, NonNullList<ItemStack> itemStacks){ this.windowId = windowId; this.itemStacks = itemStacks; } @Override protected PCPacket doAndReply(NetHandlerPlayClient playClient, World world, EntityPlayer player) { PCGresBaseWithInventory.SETTING_OK = true; playClient.handleWindowItems(new SPacketWindowItems(this.windowId, this.itemStacks)); PCGresBaseWithInventory.SETTING_OK = false; return null; } @Override protected void fromByteBuffer(ByteBuf buf) { this.windowId = buf.readInt(); int size = buf.readInt(); this.itemStacks = NonNullList.<ItemStack>withSize(size, ItemStack.EMPTY); for(int i=0; i<size; i++){ this.itemStacks.add(readItemStackFromBuf(buf)); } } @Override protected void toByteBuffer(ByteBuf buf) { buf.writeInt(this.windowId); buf.writeInt(this.itemStacks.size()); for(ItemStack itemStack:this.itemStacks){ writeItemStackToBuf(buf, itemStack); } } }
[ "rumarukakunnya@gmail.com" ]
rumarukakunnya@gmail.com
433ecb9ae7cbfef994a4bf7846635dbf86d8ae30
85e989d34307c2667dfb5e135584eee18700ae60
/order-charge-gateway-notify/src/main/java/com/snowalker/notify/mq/notify/listener/NotifySendListenerImpl.java
7101c16e3ffcf025f87f54d0fb7dbd14cd61a910
[ "Apache-2.0" ]
permissive
TaXueWWL/order-charge-notify
37783634e47147b9c8909d2cd4fad2b07002fb0b
1533cca61b2145e115e64a3aa728f08b4af97011
refs/heads/master
2023-06-21T19:30:53.472976
2022-04-10T03:57:56
2022-04-10T03:57:56
191,669,118
61
32
Apache-2.0
2023-06-14T22:33:12
2019-06-13T01:31:50
Java
UTF-8
Java
false
false
8,061
java
package com.snowalker.notify.mq.notify.listener; import com.snowalker.notify.common.constant.NotifyConstant; import com.snowalker.notify.common.util.DateUtil; import com.snowalker.notify.common.util.LogExceptionWapper; import com.snowalker.notify.mq.payment.producer.OrderStatusUpdateProducer; import com.snowalker.order.charge.message.constant.MessageProtocolConst; import com.snowalker.order.charge.message.constant.UpdateEventTypeConst; import com.snowalker.order.charge.message.protocol.OrderResultNofityProtocol; import com.snowalker.order.charge.message.protocol.OrderStatusUpdateProtocol; import com.snowalker.order.charge.request.ChargeNotifyRequest; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently; import org.apache.rocketmq.client.exception.MQBrokerException; import org.apache.rocketmq.client.exception.MQClientException; import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.common.message.MessageExt; import org.apache.rocketmq.remoting.exception.RemotingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.*; import org.springframework.stereotype.Component; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; import java.util.Date; import java.util.List; /** * @author snowalker * @version 1.0 * @date 2019/6/12 14:17 * @className NotifySendListenerImpl * @desc 通知发送消息回调 */ @Component(value = "notifySendListenerImpl") public class NotifySendListenerImpl implements MessageListenerConcurrently { private static final Logger LOGGER = LoggerFactory.getLogger(NotifySendListenerImpl.class); @Autowired RestTemplate restTemplate; @Autowired OrderStatusUpdateProducer orderStatusUpdateProducer; private static final Integer MAX_RECONSUME_TIMES = 5; @Override public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) { try { for (MessageExt msg : msgs) { // 消息解码 String message = new String(msg.getBody()); // 消费次数 int reconsumeTimes = msg.getReconsumeTimes(); String msgId = msg.getMsgId(); String logSuffix = ",msgId=" + msgId + ",reconsumeTimes=" + reconsumeTimes; LOGGER.info("[通知发送消息消费者]-OrderNotifySendProducer-接收到消息,message={},{}", message, logSuffix); // 请求组装 OrderResultNofityProtocol protocol = new OrderResultNofityProtocol(); protocol.decode(message); // 参数加签,获取用户privatekey String privateKey = protocol.getPrivateKey(); String notifyUrl = protocol.getMerchantNotifyUrl(); String purseId = protocol.getPurseId(); ChargeNotifyRequest chargeNotifyRequest = new ChargeNotifyRequest(); chargeNotifyRequest.setChannel_orderid(protocol.getChannelOrderId()) .setFinish_time(DateUtil.formatDate(new Date(System.currentTimeMillis()))) .setOrder_status(NotifyConstant.NOTIFY_SUCCESS) .setPlat_orderid(protocol.getOrderId()) .setSign(chargeNotifyRequest.sign(privateKey)); LOGGER.info("[通知发送消息消费者]-OrderNotifySendProducer-订单结果通知入参:{},{}", chargeNotifyRequest.toString(), logSuffix); // 通知发送 return sendNotifyByPost(reconsumeTimes, logSuffix, protocol, notifyUrl, purseId, chargeNotifyRequest); } } catch (Exception e) { LOGGER.error("[通知发送消息消费者]消费异常,e={}", LogExceptionWapper.getStackTrace(e)); } return ConsumeConcurrentlyStatus.RECONSUME_LATER; } /** * 进行通知POST报文发送 * @param reconsumeTimes * @param logSuffix * @param protocol * @param notifyUrl * @param purseId * @param chargeNotifyRequest * @return * @throws MQClientException * @throws RemotingException * @throws MQBrokerException * @throws InterruptedException */ private ConsumeConcurrentlyStatus sendNotifyByPost(int reconsumeTimes, String logSuffix, OrderResultNofityProtocol protocol, String notifyUrl, String purseId, ChargeNotifyRequest chargeNotifyRequest) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); // 封装参数,千万不要替换为Map与HashMap,否则参数无法传递 MultiValueMap<String, String> params= new LinkedMultiValueMap<String, String>(); params.add("order_status", chargeNotifyRequest.getOrder_status()); params.add("channel_orderid", chargeNotifyRequest.getChannel_orderid()); params.add("plat_orderid", chargeNotifyRequest.getPlat_orderid()); params.add("finish_time", chargeNotifyRequest.getFinish_time()); params.add("sign", chargeNotifyRequest.getSign()); HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers); ResponseEntity<String> notifyResponse = restTemplate.exchange( notifyUrl, HttpMethod.POST, requestEntity, String.class); // 返回参校验 if (notifyResponse == null) { LOGGER.error("[通知发送消息消费者]-OrderNotifySendProducer-当前商户通知返回为空,等待下次通知.purseId={},{}", purseId, logSuffix); return ConsumeConcurrentlyStatus.RECONSUME_LATER; } if (reconsumeTimes > MAX_RECONSUME_TIMES) { // TODO 入冲发表 LOGGER.info("[通知发送消息消费者]-OrderNotifySendProducer-当前商户通知次数大于5次,不再通知,purseId={},{}", purseId, logSuffix); return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; } // 解析返回参 String notifyBody = notifyResponse.getBody(); LOGGER.info("[通知发送消息消费者]-OrderNotifySendProducer-订单结果通知出参:[{}],{}", notifyBody, logSuffix); if (!NotifyConstant.NOTIFY_RETURN_SUCC.equals(notifyBody)) { LOGGER.info("[通知发送消息消费者]-OrderNotifySendProducer-订单结果通知[失败],等待下次通知.purseId={},{}", purseId, logSuffix); return ConsumeConcurrentlyStatus.RECONSUME_LATER; } // 通知成功,发送订单状态更新消息,事件=EVENT_UPDATE_NOTIFY_OD_STATUS OrderStatusUpdateProtocol orderStatusUpdateProtocol = new OrderStatusUpdateProtocol(); orderStatusUpdateProtocol.setTopicName(MessageProtocolConst.ORDER_STATUS_UPDATE_TOPIC.getTopic()); orderStatusUpdateProtocol.setOrderId(protocol.getOrderId()) .setChargeMoney(protocol.getChargeMoney()) .setPurseId(protocol.getPurseId()) .setMerchantName(protocol.getMerchantName()) .setEventType(UpdateEventTypeConst.EVENT_UPDATE_NOTIFY_OD_STATUS.getEventType()); Message updateOrderStatusMsg = new Message(MessageProtocolConst.ORDER_STATUS_UPDATE_TOPIC.getTopic(), orderStatusUpdateProtocol.encode().getBytes()); orderStatusUpdateProducer.getProducer().send(updateOrderStatusMsg); LOGGER.info("[通知发送消息消费者]-OrderNotifySendProducer-发送通知状态更新消息结束,purseId={},{}", purseId, logSuffix); return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; } }
[ "1210812591@qq.com" ]
1210812591@qq.com
0f5a4211e9443e5777f2f7d2040bfe79a03ff802
de3eb812d5d91cbc5b81e852fc32e25e8dcca05f
/tags/5.0.4/Crux/src/core/org/cruxframework/crux/core/client/rpc/st/CruxSynchronizerTokenServiceAsync.java
11ac6653562c9f993f98bbb4977ff71e2a3e60d4
[]
no_license
svn2github/crux-framework
7dd52a951587d4635112987301c88db23325c427
58bcb4821752b405a209cfc21fb83e3bf528727b
refs/heads/master
2016-09-06T13:33:41.975737
2015-01-22T08:03:25
2015-01-22T08:03:25
13,135,398
0
0
null
null
null
null
UTF-8
Java
false
false
929
java
/* * Copyright 2011 cruxframework.org. * * 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.cruxframework.crux.core.client.rpc.st; import com.google.gwt.user.client.rpc.AsyncCallback; /** * @author Thiago da Rosa de Bustamante * */ public interface CruxSynchronizerTokenServiceAsync { void getSynchronizerToken(String methodFullSignature, AsyncCallback<String> callback); }
[ "samuel@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c" ]
samuel@cruxframework.org@a5d2bbaa-053c-11de-b17c-0f1ef23b492c
2d73f4746f21138895dab25d35bb8541f4ae6094
3183c15317d9bb7fb2a435280c42930cfed61dcd
/ymate-platform-persistence-jdbc/src/main/java/net/ymate/platform/persistence/jdbc/impl/DefaultModuleCfg.java
83884976c2035aa2257bd75bdf58f13440c0a618
[ "Apache-2.0" ]
permissive
zhiqinghuang/ymate-platform-v2
16c4d9fb8a0ed2063dd6d1abbaef15eaa3b023c3
f90601d488bc6262c770bc80e4ed3b9f5304c35f
refs/heads/master
2021-04-25T01:13:23.011398
2017-12-29T02:57:38
2017-12-29T02:57:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,552
java
/* * Copyright 2007-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.ymate.platform.persistence.jdbc.impl; import net.ymate.platform.core.YMP; import net.ymate.platform.core.lang.BlurObject; import net.ymate.platform.core.support.IPasswordProcessor; import net.ymate.platform.core.util.ClassUtils; import net.ymate.platform.core.util.RuntimeUtils; import net.ymate.platform.persistence.jdbc.*; import org.apache.commons.lang.StringUtils; import java.net.URI; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * 默认数据库JDBC持久化模块配置类 * * @author 刘镇 (suninformation@163.com) on 2012-12-29 下午2:19:18 * @version 1.0 */ public class DefaultModuleCfg implements IDatabaseModuleCfg { private String dataSourceDefaultName; private Map<String, DataSourceCfgMeta> dataSourceCfgMetas; public DefaultModuleCfg(YMP owner) throws Exception { Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IDatabase.MODULE_NAME); // this.dataSourceDefaultName = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_default_name"), "default"); // this.dataSourceCfgMetas = new HashMap<String, DataSourceCfgMeta>(); String _dsNameStr = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_name_list"), "default"); if (StringUtils.contains(_dsNameStr, this.dataSourceDefaultName)) { String[] _dsNameList = StringUtils.split(_dsNameStr, "|"); for (String _dsName : _dsNameList) { DataSourceCfgMeta _meta = __doParserDataSourceCfgMeta(_dsName, _moduleCfgs); if (_meta != null) { this.dataSourceCfgMetas.put(_dsName, _meta); } } } else { throw new IllegalArgumentException("The default datasource name does not match"); } } /** * @param dsName 数据源名称 * @param _moduleCfgs 模块配置参数映射 * @return 分析并封装数据源配置 * @throws Exception 可能产生的异常 */ @SuppressWarnings("unchecked") private DataSourceCfgMeta __doParserDataSourceCfgMeta(String dsName, Map<String, String> _moduleCfgs) throws Exception { Map<String, String> _dataSourceCfgs = RuntimeUtils.keyStartsWith(_moduleCfgs, "ds." + dsName + "."); if (!_dataSourceCfgs.isEmpty()) { // DataSourceCfgMeta _meta = new DataSourceCfgMeta(); _meta.setName(dsName); _meta.setConnectionUrl(_dataSourceCfgs.get("connection_url")); _meta.setUsername(_dataSourceCfgs.get("username")); // 验证必填参数 if (StringUtils.isNotBlank(_meta.getConnectionUrl()) && StringUtils.isNotBlank(_meta.getUsername())) { // 基础参数 _meta.setIsShowSQL(new BlurObject(_dataSourceCfgs.get("show_sql")).toBooleanValue()); _meta.setIsStackTraces(new BlurObject(_dataSourceCfgs.get("stack_traces")).toBooleanValue()); _meta.setStackTraceDepth(new BlurObject(_dataSourceCfgs.get("stack_trace_depth")).toIntValue()); _meta.setStackTracePackage(_dataSourceCfgs.get("stack_trace_package")); _meta.setTablePrefix(_dataSourceCfgs.get("table_prefix")); _meta.setIdentifierQuote(_dataSourceCfgs.get("identifier_quote")); // 数据源适配器 String _adapterClassName = JDBC.DS_ADAPTERS.get(StringUtils.defaultIfBlank(_dataSourceCfgs.get("adapter_class"), "default")); _meta.setAdapterClass((Class<? extends IDataSourceAdapter>) ClassUtils.loadClass(_adapterClassName, this.getClass())); // // 连接和数据库类型 try { _meta.setType(JDBC.DATABASE.valueOf(StringUtils.defaultIfBlank(_dataSourceCfgs.get("type"), "").toUpperCase())); } catch (IllegalArgumentException e) { // 通过连接字符串分析数据库类型 String _connUrl = URI.create(_meta.getConnectionUrl()).toString(); String[] _type = StringUtils.split(_connUrl, ":"); if (_type != null && _type.length > 0) { if ("microsoft".equals(_type[1])) { _type[1] = "sqlserver"; } _meta.setType(JDBC.DATABASE.valueOf(_type[1].toUpperCase())); } } // _meta.setDialectClass(_dataSourceCfgs.get("dialect_class")); _meta.setDriverClass(StringUtils.defaultIfBlank(_dataSourceCfgs.get("driver_class"), JDBC.DB_DRIVERS.get(_meta.getType()))); _meta.setPassword(_dataSourceCfgs.get("password")); _meta.setIsPasswordEncrypted(new BlurObject(_dataSourceCfgs.get("password_encrypted")).toBooleanValue()); // if (_meta.isPasswordEncrypted() && StringUtils.isNotBlank(_meta.getPassword()) && StringUtils.isNotBlank(_dataSourceCfgs.get("password_class"))) { _meta.setPasswordClass((Class<? extends IPasswordProcessor>) ClassUtils.loadClass(_dataSourceCfgs.get("password_class"), this.getClass())); } // return _meta; } } return null; } @Override public String getDataSourceDefaultName() { return dataSourceDefaultName; } @Override public Map<String, DataSourceCfgMeta> getDataSourceCfgs() { return Collections.unmodifiableMap(dataSourceCfgMetas); } @Override public DataSourceCfgMeta getDefaultDataSourceCfg() { return dataSourceCfgMetas.get(dataSourceDefaultName); } @Override public DataSourceCfgMeta getDataSourceCfg(String name) { return dataSourceCfgMetas.get(name); } }
[ "suninformation@163.com" ]
suninformation@163.com
de37ee6b3fc95ce8ae2fcd40a785442765e8eae7
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project18/src/test/java/org/gradle/test/performance18_1/Test18_25.java
a0428463e04d0f9d22634f590f33b3cb09c33781
[]
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
289
java
package org.gradle.test.performance18_1; import static org.junit.Assert.*; public class Test18_25 { private final Production18_25 production = new Production18_25("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
184d73a3a3ccb7fa9354195f02d4972b86bf39bd
3e97d2d3d0088588e3f78caea769511597516299
/src/com/zlx/nyoj/e144.java
fdfeedac02a5e31296cb3513925fc3353c47ef4e
[]
no_license
zoulux/JudgeOnline
631042d4bd5cde70e9f7f056893a9c6d1fe1b768
1b3a8c921979ef2ae1483f28aac901bf9b6328ce
refs/heads/master
2021-01-18T13:48:57.795824
2015-05-18T00:24:03
2015-05-18T00:24:03
32,773,208
0
0
null
null
null
null
UTF-8
Java
false
false
655
java
package com.zlx.nyoj; import java.util.Scanner; public class e144 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner cin = new Scanner(System.in); int T = cin.nextInt(); while (T-- > 0) { int a = cin.nextInt(); int b = cin.nextInt(); int n = cin.nextInt(); int gys = gys(a, b); if (gys % n == 0) System.out.println("Yes"); else System.out.println("No"); } } private static int gys(int a, int b) { int t = 1; if (a < b) { int temp = a; a = b; b = temp; } while ((t = a % b) != 0) { a = b; b = t; } return b; } }
[ "zoulux@126.com" ]
zoulux@126.com
789ab8f2e200410b6bb354dc28c0d752401bee20
7dbbe21b902fe362701d53714a6a736d86c451d7
/BzenStudio-5.6/Source/com/zend/ide/m/bc.java
f0cca978cc39d6475831e47b25d2b08e5b0e5f2d
[]
no_license
HS-matty/dev
51a53b4fd03ae01981549149433d5091462c65d0
576499588e47e01967f0c69cbac238065062da9b
refs/heads/master
2022-05-05T18:32:24.148716
2022-03-20T16:55:28
2022-03-20T16:55:28
196,147,486
0
0
null
null
null
null
UTF-8
Java
false
false
502
java
package com.zend.ide.m; import com.zend.ide.b.m; import java.io.Serializable; public class bc implements Serializable { private String a; private m b; public bc(String paramString, m paramm) { this.a = paramString; this.b = paramm; } public String c() { return this.a; } public m b() { return this.b; } } /* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar * Qualified Name: com.zend.ide.m.bc * JD-Core Version: 0.6.0 */
[ "byqdes@gmail.com" ]
byqdes@gmail.com
8eb500a84f9945ab7e66852df7f37ed08c43bc64
bdcfd9395419c01d2a6f97202668c17c16709a26
/src/exercices/AreaCirculo02.java
1c983360343783259b5975d026e7ab536173849a
[]
no_license
mucheniski/java-completo-2019
5735abb620752cd9443da7c6970bef9d4397eaa4
1c00e9341734f874de32d5124f13ab90252c221c
refs/heads/master
2020-07-08T12:54:01.567453
2019-09-08T19:37:38
2019-09-08T19:37:38
203,678,197
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package exercices; import java.util.Locale; import java.util.Scanner; public class AreaCirculo02 { public static void main(String[] args) { Locale.setDefault(Locale.US); Scanner sc = new Scanner(System.in); double raio, area, pi=3.14159; raio = sc.nextDouble(); area = pi * Math.pow(raio, 2); System.out.printf("A=%.4f%n", area); sc.close(); } }
[ "mucheniski@gmail.com" ]
mucheniski@gmail.com
ae6e2fb731d47d7d2277aa8b8966a910788dc058
f71a7ec87f7e90f8025a3079daced5dbf41aca9c
/sf-pay/src/main/java/com/alipay/api/request/AlipayAssetAccountUnbindRequest.java
e25792ad76f56705809c6931e13979f8095ea9e4
[]
no_license
luotianwen/yy
5ff456507e9ee3dc1a890c9bead4491d350f393d
083a05aac4271689419ee7457cd0727eb10a5847
refs/heads/master
2021-01-23T10:34:24.402548
2017-10-08T05:03:10
2017-10-08T05:03:10
102,618,007
1
3
null
null
null
null
UTF-8
Java
false
false
3,353
java
package com.alipay.api.request; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.AlipayAssetAccountUnbindResponse; import com.alipay.api.AlipayObject; /** * ALIPAY API: alipay.asset.account.unbind request * * @author auto create * @since 1.0, 2016-10-11 19:38:49 */ public class AlipayAssetAccountUnbindRequest implements AlipayRequest<AlipayAssetAccountUnbindResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 业务参数 使用该app提供用户信息的商户在支付宝签约时的支付宝账户userID,可以和app相同。 */ private String providerId; /** * 用户在商户网站的会员标识。商户需确保其唯一性,不可变更。 */ private String providerUserId; public void setProviderId(String providerId) { this.providerId = providerId; } public String getProviderId() { return this.providerId; } public void setProviderUserId(String providerUserId) { this.providerUserId = providerUserId; } public String getProviderUserId() { return this.providerUserId; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; private String returnUrl; private boolean needEncrypt=false; private AlipayObject bizModel=null; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getReturnUrl() { return this.returnUrl; } public void setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "alipay.asset.account.unbind"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("provider_id", this.providerId); txtParams.put("provider_user_id", this.providerUserId); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<AlipayAssetAccountUnbindResponse> getResponseClass() { return AlipayAssetAccountUnbindResponse.class; } public boolean isNeedEncrypt() { return this.needEncrypt; } public void setNeedEncrypt(boolean needEncrypt) { this.needEncrypt=needEncrypt; } public AlipayObject getBizModel() { return this.bizModel; } public void setBizModel(AlipayObject bizModel) { this.bizModel=bizModel; } }
[ "tw l" ]
tw l
1832c86726e49659f36da33b17f44da9f4d7a467
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/769cd811312cbbb82c87033a78ac9584ad282550bcb9cc3ae8c4e3da44c288c1a5b3954e01998c3c0654ee6774ceab66e9fe5b135750905c917d2b0bb5fab98b/000/mutations/120/grade_769cd811_000.java
e516b77a3f2597f33c92b9868d19fae57316cf12
[]
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,458
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_769cd811_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_769cd811_000 mainClass = new grade_769cd811_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj A = new FloatObj (), B = new FloatObj (), C = new FloatObj (), D = new FloatObj (), S = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ")); A.value = scanner.nextFloat (); B.value = scanner.nextFloat (); C.value = scanner.nextFloat (); D.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); S.value = scanner.nextFloat (); if (S.value >= A.value) { output += (String.format ("Student has an A grade\n")); } if (S.value >= B.value && S.value < A.value) { output += (String.format ("Student has an B grade\n")); } if (S.value >= D.value && S.value < B.value) { output += (String.format ("Student has an C grade\n")); } if (S.value >= D.value && S.value < C.value) { output += (String.format ("Student has an D grade\n")); } if (S.value < D.value) { output += (String.format ("Student has an F grade\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
d18f9eff09f5bdd3b36620d61e3314197a574b3a
993cae9edae998529d4ef06fc67e319d34ee83ef
/src/cn/edu/sau/eop/sdk/widget/IWidget.java
3c551c9a27d00ddccfa0e9e0e912d0f9024ef874
[]
no_license
zhangyuanqiao93/MySAUShop
77dfe4d46d8ac2a9de675a9df9ae29ca3cae1ef7
cc72727b2bc1148939666b0f1830ba522042b779
refs/heads/master
2021-01-25T05:02:20.602636
2017-08-03T01:06:43
2017-08-03T01:06:43
93,504,556
0
0
null
null
null
null
UTF-8
Java
false
false
626
java
package cn.edu.sau.eop.sdk.widget; import java.util.Map; /** * 挂件接口 */ public interface IWidget { /** * 解析挂件并返回解析后的html片段 * @param params 挂件参数Map * @return 解析后的html片段 */ public String process(Map<String, String> params); /** * 挂件设置 * @param params * @return */ public String setting(Map<String, String> params); /** * 挂件数据 更新操作 * @param params */ public void update(Map<String, String> params); /** * 挂件是否缓存 * @return true:缓存 false不缓存 */ public boolean cacheAble(); }
[ "zhangyuanqiao0912@163.com" ]
zhangyuanqiao0912@163.com
586c2a29516876ccbca0e46c993b30f4156f9b7b
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/MOCKITO-10b-4-25-Single_Objective_GGA-WeightedSum/org/mockito/internal/creation/MockSettingsImpl_ESTest.java
1b14fad6fe9296266201e8af74786e98e46c0e2d
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
568
java
/* * This file was automatically generated by EvoSuite * Tue Mar 31 12:21:17 UTC 2020 */ package org.mockito.internal.creation; 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 MockSettingsImpl_ESTest extends MockSettingsImpl_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
ed212681a9fdeab8b7d79d334bce6abcc0c1e2a8
5dd3daa15726c0c0782a630104a4a9a883ee2f72
/2.JavaCore/src/com/javarush/task/task15/task1529/Solution.java
f852048f47c04179c510827fb4ca35925386f13c
[]
no_license
TigranMonte/JavaRushTasks
3476c9b2396cf333f7807ffa6bfbb27a07bffb15
7a945d80745c153badbcbe1a4ab0acc407789179
refs/heads/master
2023-06-16T00:01:40.513230
2021-07-10T20:08:11
2021-07-10T20:08:11
298,334,349
0
0
null
null
null
null
UTF-8
Java
false
false
1,030
java
package com.javarush.task.task15.task1529; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* Осваивание статического блока */ public class Solution { public static void main(String[] args) { } static { try { reset();//add your code here - добавьте код тут } catch (IOException e) { e.printStackTrace(); } } public static CanFly result; public static void reset() throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String s = reader.readLine(); if (s.equals("helicopter")) { result = new Helicopter(); } else if ("plane".equals(s)) { String k = reader.readLine(); int n = Integer.parseInt(k); result = new Plane(n); } reader.close();//add your code here - добавьте код тут } }
[ "tigranma@gmail.com" ]
tigranma@gmail.com
76b7c72d1bb8684a8ebcb22f072dfa29e791bfae
12b75ba88d14631e2c99a2fff6b3f3683aafc976
/nts/texmf/source/nts/nts-1.00-beta/nts/node/HSkipNode.java
59456198c7b0f13c2695e36d2ec4177da67390d7
[]
no_license
tex-other/nts
50b4f66b3cafa870be4572dff92d23ab4321ddc8
b4b333723326dc06a84bcd28e2672a76537d9752
refs/heads/master
2021-09-09T07:41:55.366960
2018-03-14T07:37:37
2018-03-14T07:37:37
125,165,059
0
1
null
null
null
null
UTF-8
Java
false
false
1,707
java
// Copyright 2001 by // DANTE e.V. and any individual authors listed elsewhere in this file. // // This file is part of the NTS system. // ------------------------------------ // // It may be distributed and/or modified under the // conditions of the NTS Public License (NTSPL), either version 1.0 // of this license or (at your option) any later version. // The latest version of this license is in // http://www.dante.de/projects/nts/ntspl.txt // and version 1.0 or later is part of all distributions of NTS // version 1.0-beta or later. // // The list of all files belonging to the NTS distribution is given in // the file `manifest.txt'. // // Filename: nts/node/HSkipNode.java // $Id: HSkipNode.java,v 1.1.1.1 2001/03/06 14:55:56 ksk Exp $ package nts.node; import nts.base.Dimen; import nts.base.Glue; import nts.io.Log; public class HSkipNode extends AnySkipNode { /* corresponding to glue_node */ public HSkipNode(Glue skip) { super(skip); } public Dimen getWidth() { return skip.getDimen(); } public Dimen getWstr() { return skip.getStretch(); } public byte getWstrOrd() { return skip.getStrOrder(); } public Dimen getWshr() { return skip.getShrink(); } public byte getWshrOrd() { return skip.getShrOrder(); } public Dimen getWidth(GlueSetting setting) { return setting.set(skip, true); } public void contributeVisible(VisibleSummarizer summarizer) { if (summarizer.setting.makesElastic(skip)) summarizer.claimElastic(); super.contributeVisible(summarizer); } public boolean startsWordBlock() { return true; } public byte afterWord() { return SUCCESS; } public String toString() { return "HSkip(" + skip + ')'; } }
[ "shreevatsa.public@gmail.com" ]
shreevatsa.public@gmail.com
7933475e914caf78dbd027072b4c3054bc4e666a
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/alibaba/mtl/appmonitor/SdkMeta.java
1487fe76fd26ad80765812ce605d0c7415d8733c
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
1,296
java
package com.alibaba.mtl.appmonitor; import android.content.Context; import com.alibaba.mtl.log.a; import com.alibaba.mtl.log.d.i; import java.util.HashMap; import java.util.Map; public class SdkMeta { public static final String SDK_VERSION = "2.6.4.5_for_bc"; private static final Map<String, String> d; public static Map<String, String> getSDKMetaData() { a.getContext(); Map<String, String> map = d; if (!map.containsKey("sdk-version")) { map.put("sdk-version", "2.6.4.5_for_bc"); } return map; } static { HashMap hashMap = new HashMap(); d = hashMap; hashMap.put("sdk-version", "2.6.4.5_for_bc"); } public static void setExtra(Map<String, String> map) { if (map != null) { d.putAll(map); } } public static String getString(Context context, String str) { if (context == null) { return null; } int i = 0; try { i = context.getResources().getIdentifier(str, "string", context.getPackageName()); } catch (Throwable th) { i.a("SdkMeta", "getString Id error", th); } if (i != 0) { return context.getString(i); } return null; } }
[ "test@gmail.com" ]
test@gmail.com
50dae3672fcc5be837dc9abb8613dc62073995cc
440f26d3ee405d87fc26f4a3bc3cef4703733387
/src/main/java/io/opensec/oval/model/macos/Plist510Test.java
a3d83e8ef9ff24169d91dcf541496ddfe207171c
[ "Apache-2.0" ]
permissive
nakamura5akihito/opensec-oval
37e6e22d79da959a7d64eb7820c4aa81461d056e
7afea82fd919d882231a34e73c0e59d4b184e3e7
refs/heads/master
2021-01-10T06:58:02.597702
2015-06-17T10:56:33
2015-06-17T10:56:33
36,717,938
1
0
null
null
null
null
UTF-8
Java
false
false
2,922
java
/** * Opensec OVAL - https://nakamura5akihito.github.io/ * Copyright (C) 2015 Akihito Nakamura * * 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 io.opensec.oval.model.macos; import io.opensec.oval.model.ComponentType; import io.opensec.oval.model.Family; import io.opensec.oval.model.common.CheckEnumeration; import io.opensec.oval.model.definitions.StateRefType; import io.opensec.oval.model.definitions.SystemObjectRefType; import io.opensec.oval.model.definitions.TestType; /** * The plist510 test is used to check the value(s) associated with property list preference keys. * * @author Akihito Nakamura, AIST * @see <a href="http://oval.mitre.org/language/">OVAL Language</a> */ public class Plist510Test extends TestType { /** * Constructor. */ public Plist510Test() { this( null, 0 ); } public Plist510Test( final String id, final int version ) { this( id, version, null, null ); } public Plist510Test( final String id, final int version, final String comment, final CheckEnumeration check ) { this( id, version, comment, check, null, null ); } public Plist510Test( final String id, final int version, final String comment, final CheckEnumeration check, final SystemObjectRefType object, final StateRefType[] stateList ) { super( id, version, comment, check, object, stateList ); _oval_family = Family.MACOS; _oval_component = ComponentType.PLIST510; } //************************************************************** // java.lang.Object //************************************************************** @Override public int hashCode() { return super.hashCode(); } @Override public boolean equals( final Object obj ) { if (!(obj instanceof Plist510Test)) { return false; } return super.equals( obj ); } @Override public String toString() { return "plist510_test[" + super.toString() + "]"; } } //
[ "nakamura5akihito@gmail.com" ]
nakamura5akihito@gmail.com
0679857d3409cbb94667778220b53bc64e0f0923
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/servlets/vendor/laravel/framework/src/Illuminate/Notifications/Channels/servlet_DatabaseChannel_php.java
7abf1983cb01442ca4e2ad0c15b6047a188e778f
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
1,265
java
package com.project.convertedCode.servlets.vendor.laravel.framework.src.Illuminate.Notifications.Channels; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.RuntimeConverterServlet; import com.runtimeconverter.runtime.RuntimeEnv; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.annotation.WebServlet; @WebServlet("/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php") public class servlet_DatabaseChannel_php extends RuntimeConverterServlet { protected final RuntimeIncludable getInclude() { return com.project .convertedCode .includes .vendor .laravel .framework .src .Illuminate .Notifications .Channels .file_DatabaseChannel_php .instance; } protected final RuntimeEnv getRuntimeEnv( String httpRequestType, HttpServletRequest req, HttpServletResponse resp) { return new com.project.convertedCode.main.ConvertedProjectRuntimeEnv( req, resp, this.getInclude()); } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
364dbeabd6fac75bbeb7e40d1d530707c8ed3972
446d682a06969b04ff637f83fa71b2448fda423f
/tinker/tconstruct/items/CraftingItem.java
3f4c28efc07a9c8418546edc0ebc21d96d7f9dfc
[]
no_license
agaricusb/TinkersConstruct
21ad2db01f867a1397788e80be334c7b5bab9213
2f5d798753d1642eb5ee5f15270b6fe73bfdce3c
refs/heads/master
2021-01-16T00:17:33.310208
2013-03-09T11:49:04
2013-03-09T11:49:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
661
java
package tinker.tconstruct.items; import java.util.List; import tinker.tconstruct.TConstruct; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class CraftingItem extends Item { public CraftingItem(int id, int icon, String tex) { super(id); this.setCreativeTab(TConstruct.materialTab); this.iconIndex = icon; this.setTextureFile(tex); this.setMaxDamage(0); this.setHasSubtypes(true); } @SideOnly(Side.CLIENT) public int getIconFromDamage(int meta) { return this.iconIndex + meta; } }
[ "miellekyunni@gmail.com" ]
miellekyunni@gmail.com
e9bc916bb646886c8b1803221d60447148b22f76
0a4d4b808ee0724114e6153c1204de4e253c1dcb
/samples/86/a.java
a43b541a8e4dc293d0aeca2284b09759f39294ca
[ "MIT" ]
permissive
yura-hb/sesame-sampled-pairs
543b19bf340f6a35681cfca1084349bd3eb8f853
33b061e3612a7b26198c17245c2835193f861151
refs/heads/main
2023-07-09T04:15:05.821444
2021-08-08T12:01:04
2021-08-08T12:01:04
393,947,142
0
0
null
null
null
null
UTF-8
Java
false
false
958
java
import java.util.Hashtable; class LRUCache&lt;K, V&gt; implements Cloneable { /** * Flushes all entries from the cache. */ public void flush() { this.currentSpace = 0; LRUCacheEntry&lt;K, V&gt; entry = this.entryQueueTail; // Remember last entry this.entryTable = new Hashtable&lt;&gt;(); // Clear it out this.entryQueue = this.entryQueueTail = null; while (entry != null) { // send deletion notifications in LRU order entry = entry.previous; } } /** * Amount of cache space used so far */ protected int currentSpace; /** * End of queue (least recently used entry) */ protected LRUCacheEntry&lt;K, V&gt; entryQueueTail; /** * Hash table for fast random access to cache entries */ protected Hashtable&lt;K, LRUCacheEntry&lt;K, V&gt;&gt; entryTable; /** * Start of queue (most recently used entry) */ protected LRUCacheEntry&lt;K, V&gt; entryQueue; }
[ "hayeuyur@MacBook-Pro.local" ]
hayeuyur@MacBook-Pro.local
96d32dd0163ddfca742ca5e552892d4c68f7d39b
c1116c7ff8314ec43b16d455ee1aea7d8d289943
/enderio-base/src/main/java/crazypants/enderio/base/item/eggs/RenderEntityOwlEgg.java
ea3c62f67076ab299e64b71a403103925208b3d5
[ "Unlicense", "CC-BY-NC-3.0", "CC0-1.0", "CC-BY-3.0", "LicenseRef-scancode-public-domain" ]
permissive
FinalCraftMC/EnderIO
71054da73fe329d5d49c9a2c239b4545a8b7ed7b
a173868d1659d511154d9b195cd0d4759164029b
refs/heads/master
2023-04-23T19:20:36.682724
2021-05-10T18:42:24
2021-05-10T18:42:24
298,419,938
0
0
Unlicense
2020-09-26T23:02:13
2020-09-24T23:40:35
null
UTF-8
Java
false
false
1,533
java
package crazypants.enderio.base.item.eggs; import javax.annotation.Nonnull; import crazypants.enderio.base.init.ModObject; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderItem; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.client.registry.IRenderFactory; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderEntityOwlEgg extends RenderSnowball<EntityOwlEgg> { public static final Factory FACTORY = new Factory(); public RenderEntityOwlEgg(RenderManager renderManagerIn, RenderItem itemRendererIn) { super(renderManagerIn, ModObject.item_owl_egg.getItemNN(), itemRendererIn); } @Override public void doRender(@Nonnull EntityOwlEgg entity, double x, double y, double z, float entityYaw, float partialTicks) { super.doRender(entity, x, y, z, entityYaw, partialTicks); } @Override public @Nonnull ItemStack getStackToRender(@Nonnull EntityOwlEgg entityIn) { return new ItemStack(ModObject.item_owl_egg.getItemNN()); } public static class Factory implements IRenderFactory<EntityOwlEgg> { @Override public Render<? super EntityOwlEgg> createRenderFor(RenderManager manager) { return new RenderEntityOwlEgg(manager, Minecraft.getMinecraft().getRenderItem()); } } }
[ "henry@loenwind.info" ]
henry@loenwind.info
a2d57588cc329a340aa69c147c08372919653756
d4d1013d3215088f7ec445b393b58fb30249ca1b
/jonix-onix3/src/main/java/com/tectonica/jonix/onix3/TextItemIdentifier.java
ce62265601d253a0ea78266bc0f04f9553399749
[ "Apache-2.0" ]
permissive
miyewd/jonix
70de3ba4b2054e0a66f688185834c9b0c73a101f
2ce4c9d7fddd453c4c76cf2a4bfae17b98e9b91d
refs/heads/master
2022-11-28T18:00:52.049749
2020-08-06T09:21:47
2020-08-06T09:21:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,876
java
/* * Copyright (C) 2012-2020 Zach Melamed * * Latest version available online at https://github.com/zach-m/jonix * Contact me at zach@tectonica.co.il * * 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.tectonica.jonix.onix3; import com.tectonica.jonix.common.JPU; import com.tectonica.jonix.common.OnixComposite.OnixDataCompositeWithKey; import com.tectonica.jonix.common.codelist.RecordSourceTypes; import com.tectonica.jonix.common.codelist.TextItemIdentifierTypes; import com.tectonica.jonix.common.struct.JonixTextItemIdentifier; import java.io.Serializable; /* * NOTE: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT MANUALLY */ /** * <h1>Text item identifier composite</h1> * <p> * A repeatable group of data elements which together define an identifier of a text item in accordance with a specified * scheme. The composite is optional. * </p> * <table border='1' cellpadding='3'> * <tr> * <td>Reference name</td> * <td><tt>&lt;TextItemIdentifier&gt;</tt></td> * </tr> * <tr> * <td>Short tag</td> * <td><tt>&lt;textitemidentifier&gt;</tt></td> * </tr> * <tr> * <td>Cardinality</td> * <td>0&#8230;n</td> * </tr> * </table> * <p/> * This tag may be included in the following composites: * <ul> * <li>&lt;{@link TextItem}&gt;</li> * </ul> * <p/> * Possible placements within ONIX message: * <ul> * <li>{@link ONIXMessage} ⯈ {@link Product} ⯈ {@link ContentDetail} ⯈ {@link ContentItem} ⯈ {@link TextItem} ⯈ * {@link TextItemIdentifier}</li> * </ul> */ public class TextItemIdentifier implements OnixDataCompositeWithKey<JonixTextItemIdentifier, TextItemIdentifierTypes>, Serializable { private static final long serialVersionUID = 1L; public static final String refname = "TextItemIdentifier"; public static final String shortname = "textitemidentifier"; ///////////////////////////////////////////////////////////////////////////////// // ATTRIBUTES ///////////////////////////////////////////////////////////////////////////////// /** * (type: dt.DateOrDateTime) */ public String datestamp; public RecordSourceTypes sourcetype; /** * (type: dt.NonEmptyString) */ public String sourcename; ///////////////////////////////////////////////////////////////////////////////// // CONSTRUCTION ///////////////////////////////////////////////////////////////////////////////// private boolean initialized; private final boolean exists; private final org.w3c.dom.Element element; public static final TextItemIdentifier EMPTY = new TextItemIdentifier(); public TextItemIdentifier() { exists = false; element = null; initialized = true; // so that no further processing will be done on this intentionally-empty object } public TextItemIdentifier(org.w3c.dom.Element element) { exists = true; initialized = false; this.element = element; datestamp = JPU.getAttribute(element, "datestamp"); sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype")); sourcename = JPU.getAttribute(element, "sourcename"); } @Override public void _initialize() { if (initialized) { return; } initialized = true; JPU.forElementsOf(element, e -> { final String name = e.getNodeName(); switch (name) { case TextItemIDType.refname: case TextItemIDType.shortname: textItemIDType = new TextItemIDType(e); break; case IDValue.refname: case IDValue.shortname: idValue = new IDValue(e); break; case IDTypeName.refname: case IDTypeName.shortname: idTypeName = new IDTypeName(e); break; default: break; } }); } /** * @return whether this tag (&lt;TextItemIdentifier&gt; or &lt;textitemidentifier&gt;) is explicitly provided in the * ONIX XML */ @Override public boolean exists() { return exists; } @Override public org.w3c.dom.Element getXmlElement() { return element; } ///////////////////////////////////////////////////////////////////////////////// // MEMBERS ///////////////////////////////////////////////////////////////////////////////// private TextItemIDType textItemIDType = TextItemIDType.EMPTY; /** * <p> * An ONIX code identifying the scheme from which the identifier in &lt;IDValue&gt; is taken. Mandatory in each * occurrence of the &lt;TextItemIdentifier&gt; composite, and non-repeating. * </p> * Jonix-Comment: this field is required */ public TextItemIDType textItemIDType() { _initialize(); return textItemIDType; } private IDValue idValue = IDValue.EMPTY; /** * <p> * An identifier of the type specified in &lt;TextItemIDType&gt;. Mandatory in each occurrence of the * &lt;TextItemIdentifier&gt; composite, and non-repeating. * </p> * Jonix-Comment: this field is required */ public IDValue idValue() { _initialize(); return idValue; } private IDTypeName idTypeName = IDTypeName.EMPTY; /** * <p> * A name which identifies a proprietary identifier scheme (<i>ie</i> a scheme which is not a standard and for which * there is no individual ID type code). Must be included when, and only when, the code in &lt;TextItemIDType&gt; * indicates a proprietary scheme, <i>eg</i> a publisher’s own code. Optional and non-repeating * </p> * Jonix-Comment: this field is optional */ public IDTypeName idTypeName() { _initialize(); return idTypeName; } @Override public JonixTextItemIdentifier asStruct() { _initialize(); JonixTextItemIdentifier struct = new JonixTextItemIdentifier(); struct.textItemIDType = textItemIDType.value; struct.idTypeName = idTypeName.value; struct.idValue = idValue.value; return struct; } @Override public TextItemIdentifierTypes structKey() { return textItemIDType().value; } }
[ "zach@tectonica.co.il" ]
zach@tectonica.co.il
4672eef1ec6770d65be0193f6823a2e0659adb23
9a942a741f3ab466be8b2807aba5272f80377498
/app7/part0/src/X.java
21740bc39205b26cdb8dc7f33cea291034e98ff8
[]
no_license
Vijay-Ky/MyJavaPracticeTest
82db8c507be9fde66f68efe3c3b7bb35dc086f67
6d427886b847e9af8a1af7d73ae8e340a4f47dd5
refs/heads/master
2021-09-27T18:45:11.963373
2018-11-17T15:17:07
2018-11-17T15:17:07
154,494,698
0
3
null
2021-09-23T01:16:57
2018-10-24T12:10:37
Java
UTF-8
Java
false
false
186
java
class X { int i; public static void main(String[] args) { X x1 = new X(); X x2 = new X(); x1.i = 10; x2.i = 20; System.out.println(x1.i); System.out.println(x2.i); } }
[ "vijayky007@gmail.com" ]
vijayky007@gmail.com
8451ca74661e5ee58e92b8ea0d366c205e697e95
88e4c2a0f6e9097efe89b47612509f32b79badb8
/src/main/java/com/alipay/api/response/AlipayMobileBeaconDeviceModifyResponse.java
c1227a0bb86ad4c9e976539b4d7102ab0a2f9674
[]
no_license
xushaomin/alipay-sdk-java
15f8e311b6ded9a565f473cd732e2747ed33d8b0
a03324a1ddc6eb3469c18f831512d5248bc98461
refs/heads/master
2020-06-15T13:26:40.913354
2016-12-01T12:23:27
2016-12-01T12:23:27
75,289,929
0
0
null
null
null
null
UTF-8
Java
false
false
811
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.mobile.beacon.device.modify response. * * @author auto create * @since 1.0, 2015-02-03 19:48:29 */ public class AlipayMobileBeaconDeviceModifyResponse extends AlipayResponse { private static final long serialVersionUID = 8691383457445268438L; /** * 返回的操作码 */ @ApiField("code") private String code; /** * 操作结果说明 */ @ApiField("msg") private String msg; public void setCode(String code) { this.code = code; } public String getCode( ) { return this.code; } public void setMsg(String msg) { this.msg = msg; } public String getMsg( ) { return this.msg; } }
[ "xushaomin@foxmail.com" ]
xushaomin@foxmail.com
c3b25ada1834a1c0b891b7ad29f15e49b9963dfe
72c1f6c17f1d9a4cd70e9d2e7979b42d30fc7eb1
/app/src/main/java/com/xzwzz/lady/pay/alipay/SignUtils.java
4f4abce49282df888429c2daeca9d519cc3e2380
[]
no_license
gaoyuan117/Lady
e8845334bd436ce7f9222dfa7d190c0fb68be303
39a8f21eecd4d928262f4f0d55df8a6fce1d0670
refs/heads/master
2020-03-28T12:29:02.158314
2018-09-27T10:44:15
2018-09-27T10:44:15
148,303,083
0
0
null
null
null
null
UTF-8
Java
false
false
957
java
package com.xzwzz.lady.pay.alipay; import java.security.KeyFactory; import java.security.PrivateKey; import java.security.spec.PKCS8EncodedKeySpec; public class SignUtils { private static final String ALGORITHM = "RSA"; private static final String SIGN_ALGORITHMS = "SHA1WithRSA"; private static final String DEFAULT_CHARSET = "UTF-8"; public static String sign(String content, String privateKey) { try { PKCS8EncodedKeySpec priPKCS8 = new PKCS8EncodedKeySpec( Base64.decode(privateKey)); KeyFactory keyf = KeyFactory.getInstance(ALGORITHM); PrivateKey priKey = keyf.generatePrivate(priPKCS8); java.security.Signature signature = java.security.Signature .getInstance(SIGN_ALGORITHMS); signature.initSign(priKey); signature.update(content.getBytes(DEFAULT_CHARSET)); byte[] signed = signature.sign(); return Base64.encode(signed); } catch (Exception e) { e.printStackTrace(); } return null; } }
[ "1179074755@qq.com" ]
1179074755@qq.com
c93801054cafaa8377a431bcd9027565156a20f4
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a169/A169269Test.java
0664a693bd4593c8ca3639852050d930a7a20686
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a169; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A169269Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
7ff82360b158c0557aee74fa1bc9f5c86df3c68f
801c39e8bbeee2e25ed1ba2b74aa039f8b3d62ae
/fizteh-java-2014/src/ru/fizteh/fivt/students/ivan_ivanov/filemap/Get.java
26d512632d7f4c7e6e1b2a5098bd99fc66839b24
[]
no_license
grapefroot/mipt
2f6572b3120e28a0e63e28f2542782520384828f
51d13fa07b37bdbdda943bd47d7e356a3a126177
refs/heads/master
2020-12-24T21:12:03.706690
2016-11-08T07:40:20
2016-11-08T07:40:20
56,529,254
1
0
null
null
null
null
UTF-8
Java
false
false
702
java
package ru.fizteh.fivt.students.ivan_ivanov.filemap; import ru.fizteh.fivt.students.ivan_ivanov.shell.Shell; import ru.fizteh.fivt.students.ivan_ivanov.shell.Command; import java.io.IOException; public class Get implements Command { public final String getName() { return "get"; } public final void executeCmd(final Shell filemap, final String[] args) throws IOException { String key = args[0]; String value = ((FileMap) filemap).getFileMapState().getDataBase().get(key); if (value == null) { System.out.println("not found"); } else { System.out.println("found"); System.out.println(value); } } }
[ "salnikov.dmitri@gmail.com" ]
salnikov.dmitri@gmail.com
9fdd857c9981fd01b23f8e1ca85eb20b521d09df
d89f77bcbcd3474cbb038d79a407c912c6e00cf9
/src/main/java/com/tencentcloudapi/mongodb/v20190725/models/DescribeAsyncRequestInfoResponse.java
57dce0850c6bc014ed52de26d60c3a893b7d0259
[ "Apache-2.0" ]
permissive
victoryckl/tencentcloud-sdk-java
23e5486445d7e4316f85247b35a2e2ba69b92546
73a6e6632e0273cfdebd5487cc7ecff920c5e89c
refs/heads/master
2022-11-20T16:14:11.452984
2020-07-28T01:08:50
2020-07-28T01:08:50
283,146,154
0
1
Apache-2.0
2020-07-28T08:14:10
2020-07-28T08:14:09
null
UTF-8
Java
false
false
2,481
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.mongodb.v20190725.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeAsyncRequestInfoResponse extends AbstractModel{ /** * 状态 */ @SerializedName("Status") @Expose private String Status; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get 状态 * @return Status 状态 */ public String getStatus() { return this.Status; } /** * Set 状态 * @param Status 状态 */ public void setStatus(String Status) { this.Status = Status; } /** * Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "Status", this.Status); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tenent.com" ]
tencentcloudapi@tenent.com
9f400ca575d14ed9f106a0bfcac446163bf6f98f
fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d
/src/main/java/com/google/android/gms/internal/fitness/zzev.java
dbf8e21beb82671e8dc4d0e9fdff814b37f6ed64
[]
no_license
TL148/gorkiy
b6ac8772587e9e643d939ea399bf5e7a42e89f46
da8fbd017277cf72020c8c800326954bb1a0cee3
refs/heads/master
2021-05-21T08:24:39.286900
2020-04-03T02:57:49
2020-04-03T02:57:49
252,618,229
0
0
null
2020-04-03T02:54:39
2020-04-03T02:54:39
null
UTF-8
Java
false
false
1,201
java
package com.google.android.gms.internal.fitness; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelReader; import com.google.android.gms.fitness.data.DataSource; /* compiled from: com.google.android.gms:play-services-fitness@@18.0.0 */ public final class zzev implements Parcelable.Creator<zzes> { public final /* synthetic */ Object[] newArray(int i) { return new zzes[i]; } public final /* synthetic */ Object createFromParcel(Parcel parcel) { int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel); DataSource dataSource = null; while (parcel.dataPosition() < validateObjectHeader) { int readHeader = SafeParcelReader.readHeader(parcel); if (SafeParcelReader.getFieldId(readHeader) != 1) { SafeParcelReader.skipUnknownField(parcel, readHeader); } else { dataSource = (DataSource) SafeParcelReader.createParcelable(parcel, readHeader, DataSource.CREATOR); } } SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader); return new zzes(dataSource); } }
[ "itaysontesterlab@gmail.com" ]
itaysontesterlab@gmail.com
ab14633e6760fbf3a1b1b68c76086686ca3972e3
f886812ecab339023ecf23ff5aa28b7051cc951e
/src/main/java/com/twineworks/tweakflow/lang/interpreter/ops/ClosureReferenceOp.java
f82f288db299d24d9234ce60787e6c72290d3cac
[ "MIT" ]
permissive
twineworks/tweakflow
995608af17f309bacb0064769499077aca7e1f8d
b6aa5241b9347c14d58bb0ef8f6b75a955ea92b6
refs/heads/master
2023-02-21T12:51:35.647910
2023-02-17T10:52:09
2023-02-17T10:52:09
97,735,381
31
6
MIT
2022-01-07T18:52:04
2017-07-19T15:55:15
Java
UTF-8
Java
false
false
2,108
java
/* * The MIT License (MIT) * * Copyright (c) 2019 Twineworks GmbH * * 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 com.twineworks.tweakflow.lang.interpreter.ops; import com.twineworks.tweakflow.lang.ast.expressions.ReferenceNode; import com.twineworks.tweakflow.lang.values.Value; import com.twineworks.tweakflow.lang.values.ValueProvider; import com.twineworks.tweakflow.lang.interpreter.EvaluationContext; import com.twineworks.tweakflow.lang.interpreter.Stack; final public class ClosureReferenceOp implements ExpressionOp { private final ReferenceNode node; public ClosureReferenceOp(ReferenceNode node) { this.node = node; } @Override public Value eval(Stack stack, EvaluationContext context) { ValueProvider vp = stack.peek().getClosures().get(node); return vp.getValue(); } @Override public boolean isConstant() { return false; } @Override public ExpressionOp specialize() { return new ClosureReferenceOp(node); } @Override public ExpressionOp refresh() { return new ClosureReferenceOp(node); } }
[ "slawomir.chodnicki@gmail.com" ]
slawomir.chodnicki@gmail.com
906b2157f8c288fa0ab313d7a77104f61656878b
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/21/1932.java
7eefa5321fcf2e054eac002bfd1ee946041d975e
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package <missing>; public class GlobalMembers { public static int Main() { int n; int i; int middle; double[] a = new double[301]; double[] d = new double[301]; double dmax = 0; double sum = 0.0; double x; n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); for (i = 0;i < n;i++) { a[i] = Double.parseDouble(ConsoleInput.readToWhiteSpace(true)); } for (i = 0;i < n;i++) { sum = sum + a[i]; } x = sum / n; sort(a,a + n); for (i = 0;i < n;i++) { d[i] = Math.abs(a[i] - x); if (d[i] > dmax) { dmax = d[i]; } } for (i = 0;i < n;i++) { if (d[i] == dmax) { System.out.print(a[i]); middle = i; break; } } for (i = middle+1;i < n;i++) { if (d[i] == dmax) { System.out.print(","); System.out.print(a[i]); } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
7e3a5f811e997049e273786f1c38649ab2514171
7938f326cd023007ffeab60bb977a99edd30e86c
/src/test/java/fr/paris/lutece/util/beanvalidation/Bean.java
9ef2e8296f01cbdda94a30df143db4449ace7d5f
[ "LicenseRef-scancode-other-permissive", "BSD-3-Clause" ]
permissive
eahuma/lutece-core
0a83cbd24a0dcf37e80c4e8f1d6ad32acf2d060b
469c86d0263e9f68d94397b79adcd3c2c2092267
refs/heads/master
2022-12-22T04:52:32.298071
2020-07-01T16:38:01
2020-07-01T16:38:01
278,385,330
0
0
BSD-3-Clause
2020-07-09T14:21:13
2020-07-09T14:21:12
null
UTF-8
Java
false
false
4,095
java
/* * Copyright (c) 2002-2020, City of Paris * 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 * and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice * and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * License 1.0 */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package fr.paris.lutece.util.beanvalidation; import java.math.BigDecimal; import java.sql.Date; /** * * @author pierre */ public interface Bean { /** * Returns the Age * * @return The Age */ int getAge( ); /** * @return the _strCurrency */ String getCurrency( ); /** * @return the _dateBirth */ Date getDateBirth( ); /** * @return the _dateEndOfWorld */ Date getDateEndOfWorld( ); /** * Returns the Description * * @return The Description */ String getDescription( ); /** * Returns the Email * * @return The Email */ String getEmail( ); /** * Returns the IdObject * * @return The IdObject */ int getIdObject( ); /** * Returns the Name * * @return The Name */ String getName( ); /** * @return the _percent */ BigDecimal getPercent( ); /** * @return the _salary */ BigDecimal getSalary( ); /** * Sets the Age * * @param nAge * The Age */ void setAge( int nAge ); /** * @param strCurrency * the _strCurrency to set */ void setCurrency( String strCurrency ); /** * @param dateBirth * the _dateBirth to set */ void setDateBirth( Date dateBirth ); /** * @param dateEndOfWorld * the _dateEndOfWorld to set */ void setDateEndOfWorld( Date dateEndOfWorld ); /** * Sets the Description * * @param strDescription * The Description */ void setDescription( String strDescription ); /** * Sets the Email * * @param strEmail * The Email */ void setEmail( String strEmail ); /** * Sets the IdObject * * @param nIdObject * The IdObject */ void setIdObject( int nIdObject ); /** * Sets the Name * * @param strName * The Name */ void setName( String strName ); /** * @param percent * the _percent to set */ void setPercent( BigDecimal percent ); /** * @param salary * the _salary to set */ void setSalary( BigDecimal salary ); void setUrl( String strUrl ); String getUrl( ); }
[ "pierrelevy@users.noreply.github.com" ]
pierrelevy@users.noreply.github.com
bbcccc723418bf4d7edb2c8ff7ce8b5ba19c6142
6e6db7db5aa823c77d9858d2182d901684faaa24
/sample/webservice/HelloeBayTrading/src/com/ebay/trading/api/LocalListingDistancesNonSubscriptionDefinitionType.java
7e386b75a0bea63b8e7ce4b5be153752843522a8
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
4everalone/nano
68a480d07d80f0f50d73ec593443bfb362d646aa
71779b1ad546663ee90a29f1c2d4236a6948a621
refs/heads/master
2020-12-25T14:08:08.303942
2013-07-25T13:28:41
2013-07-25T13:28:41
10,792,684
0
1
Apache-2.0
2019-04-24T20:12:27
2013-06-19T13:14:26
Java
UTF-8
Java
false
false
673
java
// Generated by xsd compiler for android/java // DO NOT CHANGE! package com.ebay.trading.api; import java.io.Serializable; import com.leansoft.nano.annotation.*; import java.util.List; /** * * Defines the LocalListingDistancesNonSubscription feature. This feature displays all the supported local * listing distances for items listed by sellers who have not subscribed to either Local Market for Vehicles * or Local Market for Specialty Vehicles. * */ public class LocalListingDistancesNonSubscriptionDefinitionType implements Serializable { private static final long serialVersionUID = -1L; @AnyElement @Order(value=0) public List<Object> any; }
[ "51startup@sina.com" ]
51startup@sina.com
e76bffd20b407dd8696d3725b7dc5dc883069249
a63d907ad63ba6705420a6fb2788196d1bd3763c
/src/dataflow/codecheck/src/test/java/com/tencent/bk/base/dataflow/codecheck/util/db/DBConnectionUtilTest.java
f9530df69c4b2fdbefc61d583802d0ef7aa2a034
[ "MIT" ]
permissive
Tencent/bk-base
a38461072811667dc2880a13a5232004fe771a4b
6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2
refs/heads/master
2022-07-30T04:24:53.370661
2022-04-02T10:30:55
2022-04-02T10:30:55
381,257,882
101
51
NOASSERTION
2022-04-02T10:30:56
2021-06-29T06:10:01
Python
UTF-8
Java
false
false
6,106
java
/* * Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. * * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. * * BK-BASE 蓝鲸基础平台 is licensed under the MIT License. * * License for BK-BASE 蓝鲸基础平台: * -------------------------------------------------------------------- * 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 com.tencent.bk.base.dataflow.codecheck.util.db; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import com.tencent.bk.base.dataflow.codecheck.util.Configuration; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; import java.util.Properties; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.powermock.reflect.Whitebox; @RunWith(PowerMockRunner.class) @PrepareForTest({DBConnectionUtil.class, Configuration.class, HikariConfig.class, HikariDataSource.class}) public class DBConnectionUtilTest { private AutoCloseable closeable; @Before public void openMocks() { closeable = MockitoAnnotations.openMocks(this); } @After public void releaseMocks() throws Exception { closeable.close(); } @Test public void testGetSingleton() throws Exception { DBConnectionUtil singleton = PowerMockito.mock(DBConnectionUtil.class); Configuration configuration = PowerMockito.mock(Configuration.class); PowerMockito.mockStatic(Configuration.class); PowerMockito.when(Configuration.getSingleton()).thenReturn(configuration); Properties properties = new Properties(); PowerMockito.when(configuration.getDBConfig()).thenReturn(properties); HikariConfig hikariConfig = PowerMockito.mock(HikariConfig.class); HikariDataSource hikariDataSource = PowerMockito.mock(HikariDataSource.class); PowerMockito.whenNew(HikariConfig.class).withAnyArguments().thenReturn(hikariConfig); PowerMockito.whenNew(HikariDataSource.class).withArguments(hikariConfig).thenReturn(hikariDataSource); Whitebox.setInternalState(DBConnectionUtil.class, "dbConfig", hikariConfig); Whitebox.setInternalState(DBConnectionUtil.class, "ds", hikariDataSource); PowerMockito.whenNew(DBConnectionUtil.class).withAnyArguments().thenReturn(singleton); PowerMockito.mockStatic(DBConnectionUtil.class); PowerMockito.doCallRealMethod().when(DBConnectionUtil.class, "getSingleton"); Assert.assertEquals(DBConnectionUtil.getSingleton(), singleton); } @Test public void testGetConnection() throws Exception { DBConnectionUtil dbConnectionUtil = PowerMockito.mock(DBConnectionUtil.class); PowerMockito.mockStatic(DBConnectionUtil.class); PowerMockito.when(DBConnectionUtil.getSingleton()).thenReturn(dbConnectionUtil); Connection conn = PowerMockito.mock(Connection.class); HikariDataSource ds = PowerMockito.mock(HikariDataSource.class); PowerMockito.when(ds, "getConnection").thenReturn(conn); Whitebox.setInternalState(DBConnectionUtil.class, "ds", ds); PowerMockito.doCallRealMethod().when(dbConnectionUtil).getConnection(); Connection result = DBConnectionUtil.getSingleton().getConnection(); Assert.assertEquals(conn, result); } @Test public void testGetConnection2() throws Exception { DBConnectionUtil dbConnectionUtil = PowerMockito.mock(DBConnectionUtil.class); PowerMockito.mockStatic(DBConnectionUtil.class); PowerMockito.when(DBConnectionUtil.getSingleton()).thenReturn(dbConnectionUtil); HikariDataSource ds = PowerMockito.mock(HikariDataSource.class); PowerMockito.when(ds, "getConnection").thenThrow( new RuntimeException(), new RuntimeException(), new RuntimeException(), new RuntimeException()); Whitebox.setInternalState(DBConnectionUtil.class, "ds", ds); PowerMockito.doCallRealMethod().when(dbConnectionUtil).getConnection(); Connection result2 = DBConnectionUtil.getSingleton().getConnection(); Assert.assertNull(result2); } @Test public void testShutdown() throws Exception { DBConnectionUtil dBConnectionUtil = PowerMockito.mock(DBConnectionUtil.class); PowerMockito.mockStatic(DBConnectionUtil.class); HikariDataSource ds = PowerMockito.mock(HikariDataSource.class); PowerMockito.doNothing().when(ds, "close"); Whitebox.setInternalState(DBConnectionUtil.class, "ds", ds); PowerMockito.doCallRealMethod().when(dBConnectionUtil, "shutdown"); dBConnectionUtil.shutdown(); verify(dBConnectionUtil, times(3)).shutdown(); } }
[ "terrencehan@tencent.com" ]
terrencehan@tencent.com
28b608242afd72d9a4bd5b63c6fbdc85f15d99f2
5f63a60fd029b8a74d2b1b4bf6992f5e4c7b429b
/com/planet_ink/coffee_mud/core/database/GRaceLoader.java
a4ae1d625f5c16a227a5b45943a14efcb86d17d4
[ "Apache-2.0" ]
permissive
bozimmerman/CoffeeMud
5da8b5b98c25b70554ec9a2a8c0ef97f177dc041
647864922e07572b1f6c863de8f936982f553288
refs/heads/master
2023-09-04T09:17:12.656291
2023-09-02T00:30:19
2023-09-02T00:30:19
5,267,832
179
122
Apache-2.0
2023-04-30T11:09:14
2012-08-02T03:22:12
Java
UTF-8
Java
false
false
7,242
java
package com.planet_ink.coffee_mud.core.database; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.CMProps.Int; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.DatabaseEngine; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.sql.*; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /* Copyright 2008-2023 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class GRaceLoader { protected DBConnector DB=null; protected Set<String> updateQue = Collections.synchronizedSet(new TreeSet<String>()); public GRaceLoader(final DBConnector newDB) { DB=newDB; } public void DBDeleteRace(final String raceID) { DB.update("DELETE FROM CMGRAC WHERE CMRCID='"+raceID+"'"); } public void DBCreateRace(final String raceID, final String data) { DB.updateWithClobs( "INSERT INTO CMGRAC (" +"CMRCID, " +"CMRDAT," +"CMRCDT " +") values (" +"'"+raceID+"'," +"?," +System.currentTimeMillis() +")", data+" "); } public void DBUpdateRaceCreationDate(final String raceID) { DBConnection D=null; try { D=DB.DBFetch(); D.update("UPDATE CMGRAC SET CMRCDT="+System.currentTimeMillis()+" WHERE CMRCID='"+raceID+"';", 0); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } } public boolean isRaceExpired(String raceID) { raceID = DB.injectionClean(raceID); DBConnection D=null; try { D=DB.DBFetch(); final ResultSet R=D.query("SELECT * FROM CMGRAC WHERE CMRCID='"+raceID+"';"); if(R.next()) { final long oneHour = (60L * 60L * 1000L); final long expireDays = CMProps.getIntVar(Int.RACEEXPIRATIONDAYS); final long expireMs = (oneHour * expireDays * 24L); final long oldestDate = System.currentTimeMillis()- expireMs; final long creationDate = DBConnections.getLongRes(R, "CMRCDT"); R.close(); return (creationDate < oldestDate); } R.close(); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } return false; } public void registerRaceUsed(final Race R) { if((R!=null)&&(R.isGeneric())) updateQue.add(R.ID()); } public int updateAllRaceDates() { final List<String> que = new LinkedList<String>(updateQue); final List<String> updates = new ArrayList<String>(que.size()); updateQue.clear(); final long cDate = System.currentTimeMillis(); for(final String id : que) { if(!id.equalsIgnoreCase("GenRace")) updates.add("UPDATE CMGRAC SET CMRCDT="+cDate+" WHERE CMRCID='"+id+"';"); } if(updates.size()>0) { try { DB.update(updates.toArray(new String[0])); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } return updates.size(); } return 0; } public int DBPruneOldRaces() { final List<String> updates = new ArrayList<String>(1); final long oneHour = (60L * 60L * 1000L); final long expireDays = CMProps.getIntVar(Int.RACEEXPIRATIONDAYS); final long expireMs = (oneHour * expireDays * 24L); final long oldestDate = System.currentTimeMillis()- expireMs; final long oldestHour = System.currentTimeMillis()- oneHour; final List<DatabaseEngine.AckStats> ackStats = DBReadRaceStats(); for(final DatabaseEngine.AckStats stat : ackStats) { if(stat.creationDate() != 0) { final Race R=CMClass.getRace(stat.ID()); if(R.usageCount(0) == 0) { if(stat.creationDate() < oldestDate) { updates.add("DELETE FROM CMGRAC WHERE CMRCID='"+stat.ID()+"';"); CMClass.delRace(R); Log.sysOut("Expiring race '"+R.ID()+": "+R.name()+": "+CMLib.time().date2String(stat.creationDate())); } } } else { final long cDate = CMLib.dice().rollInRange(oldestDate, oldestHour); updates.add("UPDATE CMGRAC SET CMRCDT="+cDate+" WHERE CMRCID='"+stat.ID()+"';"); } } if(updates.size()>0) { try { DB.update(updates.toArray(new String[0])); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } } return updates.size(); } protected List<DatabaseEngine.AckStats> DBReadRaceStats() { DBConnection D=null; final List<DatabaseEngine.AckStats> rows=new Vector<DatabaseEngine.AckStats>(); try { D=DB.DBFetch(); final ResultSet R=D.query("SELECT * FROM CMGRAC"); while(R.next()) { final String rcid = DBConnections.getRes(R,"CMRCID"); final long rfirst = DBConnections.getLongRes(R, "CMRCDT"); final DatabaseEngine.AckStats ack=new DatabaseEngine.AckStats() { @Override public String ID() { return rcid; } @Override public long creationDate() { return rfirst; } }; rows.add(ack); } } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } // log comment return rows; } public List<DatabaseEngine.AckRecord> DBReadRaces() { DBConnection D=null; final List<DatabaseEngine.AckRecord> rows=new Vector<DatabaseEngine.AckRecord>(); try { D=DB.DBFetch(); final ResultSet R=D.query("SELECT * FROM CMGRAC"); while(R.next()) { final String rcid = DBConnections.getRes(R,"CMRCID"); final String rdat = DBConnections.getRes(R,"CMRDAT"); final DatabaseEngine.AckRecord ack=new DatabaseEngine.AckRecord() { @Override public String ID() { return rcid; } @Override public String data() { return rdat; } @Override public String typeClass() { return "GenRace"; } }; rows.add(ack); } } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } // log comment return rows; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
dd97c51cb607ad208e8723d5fc8a7a591f5f77dc
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/9/org/jfree/data/xy/DefaultIntervalXYDataset_getY_386.java
3d5dbd7f28e158a74dc44195d8203bc158009363
[]
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
1,202
java
org jfree data dataset defin rang interv valu valu implement arrai store start end start end valu altern implement link interv dataset intervalxydataset provid link interv seri collect xyintervalseriescollect default interv dataset defaultintervalxydataset abstract interv dataset abstractintervalxydataset return item seri param seri seri index rang code code code seri count getseriescount code param item item index rang code code code item count getitemcount seri code arrai index bound except arrayindexoutofboundsexcept code seri code rang arrai index bound except arrayindexoutofboundsexcept code item code rang getyvalu number geti seri item doubl getyvalu seri item
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
a1359f89a42862f1ded54df3b9288434360f8130
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/4/EncodeGroupsStep.java
aad182bc81d0f8698c10c745efaa8e406cf31f5b
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,120
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.unsafe.impl.batchimport; import org.neo4j.kernel.impl.store.RecordStore; import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord; import org.neo4j.unsafe.impl.batchimport.staging.BatchSender; import org.neo4j.unsafe.impl.batchimport.staging.ProcessorStep; import org.neo4j.unsafe.impl.batchimport.staging.StageControl; /** * Takes cached {@link RelationshipGroupRecord relationship groups} and sets real ids and * {@link RelationshipGroupRecord#getNext() next pointers}, making them ready for writing to store. */ public class EncodeGroupsStep extends ProcessorStep<RelationshipGroupRecord[]> { private long nextId = -1; private final RecordStore<RelationshipGroupRecord> store; public EncodeGroupsStep( StageControl control, Configuration config, RecordStore<RelationshipGroupRecord> store ) { super( control, "ENCODE", config, 1 ); this.store = store; } @Override protected void process( RelationshipGroupRecord[] batch, BatchSender sender ) throws Throwable { int groupStartIndex = 0; for ( int i = 0; i < batch.length; i++ ) { RelationshipGroupRecord group = batch[i]; // The iterator over the groups will not produce real next pointers, they are instead // a count meaning how many groups come after it. This encoder will set the real group ids. long count = group.getNext(); boolean lastInChain = count == 0; group.setId( nextId == -1 ? nextId = store.nextId() : nextId ); if ( !lastInChain ) { group.setNext( nextId = store.nextId() ); } else { group.setNext( nextId = -1 ); // OK so this group is the last in this chain, which means all the groups in this chain // are now fully populated. We can now prepare these groups so that their potential // secondary units ends up very close by. for ( int j = groupStartIndex; j <= i; j++ ) { store.prepareForCommit( batch[j] ); } groupStartIndex = i + 1; } } assert groupStartIndex == batch.length; sender.send( batch ); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
c4df0647b9f5c574da408a8fc4c231aac39ef6cf
0a537cdd945804c90d271415d43fe6d80dfe59e9
/src/main/java/com/wikift/config/WikiftErrorConfig.java
6e764322782e7606fbbdd551b7578c1a7a0dc1eb
[ "Apache-2.0" ]
permissive
hrony/wikift-web-java
5e2329154caa9d54e1140cfacb277741d4810677
f598559c089466e57bd29fd0d871005d223f251b
refs/heads/master
2022-01-24T05:01:43.617339
2018-05-02T07:29:46
2018-05-02T07:29:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,807
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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.wikift.config; import com.wikift.customizer.WikiftServletContainerCustomizer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Description; /** * WikiftErrorConfig <br/> * 描述 : WikiftErrorConfig <br/> * 作者 : qianmoQ <br/> * 版本 : 1.0 <br/> * 创建时间 : 2018-04-08 上午10:00 <br/> * 联系作者 : <a href="mailTo:shichengoooo@163.com">qianmoQ</a> */ @Configuration public class WikiftErrorConfig { @Autowired private WikiftServletContainerCustomizer wikiftServletContainerCustomizer; @Bean @Description(value = "wikift system error alert") public EmbeddedServletContainerCustomizer embeddedServletContainerCustomizer() { return wikiftServletContainerCustomizer; } }
[ "shicheng@ttxit.com" ]
shicheng@ttxit.com
fb2ac67b1b048797f53b5785e1d21166fca955f3
c38508bddde0a6f6639432380bdb8802849f60cb
/school-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
def78303487394f0785303892300aa44c5defaa8
[ "MIT" ]
permissive
organ-xqTeam/campus-management
fe06a043210ea1833d1de04c7331450e980fb430
fcabe667d3140ce84f9ea9ac5a33d596dc00f4d6
refs/heads/master
2022-12-13T20:58:45.433638
2020-06-08T01:48:51
2020-06-08T01:48:51
235,522,776
0
0
MIT
2022-07-06T20:47:04
2020-01-22T07:41:43
JavaScript
UTF-8
Java
false
false
4,850
java
package com.ruoyi.web.controller.common; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import com.ruoyi.common.config.Global; import com.ruoyi.common.config.ServerConfig; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.ueditor.ActionEnter; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.framework.config.RuoYiConfig; /** * 通用请求处理 * * @author ruoyi */ @Controller public class CommonController { private static final Logger log = LoggerFactory.getLogger(CommonController.class); @Autowired private ServerConfig serverConfig; /** * 通用下载请求 * * @param fileName 文件名称 * @param delete 是否删除 */ @GetMapping("common/download") public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) { try { if (!FileUtils.isValidFilename(fileName)) { throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName)); } String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); String filePath = Global.getDownloadPath() + fileName; response.setCharacterEncoding("utf-8"); response.setContentType("multipart/form-data"); response.setHeader("Content-Disposition", "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName)); FileUtils.writeBytes(filePath, response.getOutputStream()); if (delete) { FileUtils.deleteFile(filePath); } } catch (Exception e) { log.error("下载文件失败", e); } } /** * 通用上传请求 */ @PostMapping("/common/upload") @ResponseBody public AjaxResult uploadFile(MultipartFile file) throws Exception { try { // 上传文件路径 String filePath = Global.getUploadPath(); // 上传并返回新文件名称 String fileName = FileUploadUtils.upload(filePath, file); String url = serverConfig.getUrl() + fileName; AjaxResult ajax = AjaxResult.success(); ajax.put("fileName", fileName); ajax.put("url", url); return ajax; } catch (Exception e) { return AjaxResult.error(e.getMessage()); } } @RequestMapping(value="/js/config") public void config(HttpServletRequest request, HttpServletResponse response) { response.setContentType("application/json"); String rootPath = RuoYiConfig.getUploadPath(); try { String exec = new ActionEnter(request, rootPath).exec(); PrintWriter writer = response.getWriter(); writer.write(exec); writer.flush(); writer.close(); } catch (IOException e) { e.printStackTrace(); } } /** * 本地资源通用下载 */ @GetMapping("/common/download/resource") public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response) throws Exception { // 本地资源路径 String localPath = Global.getProfile(); // 数据库资源地址 String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX); // 下载名称 String downloadName = StringUtils.substringAfterLast(downloadPath, "/"); response.setCharacterEncoding("utf-8"); response.setContentType("multipart/form-data"); response.setHeader("Content-Disposition", "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, downloadName)); FileUtils.writeBytes(downloadPath, response.getOutputStream()); } }
[ "XingPanST@DESKTOP-E2I46F7" ]
XingPanST@DESKTOP-E2I46F7
0179b87366fc45e0e599daeedbbbacbf4422429c
90ad5696a7c20e9e74b995504c66b71d6b521772
/plugins/org.mondo.ifc.cstudy.metamodel.edit/src/org/bimserver/models/ifc2x3tc1/provider/IfcPumpTypeItemProvider.java
fd00ab40d399176e4c6f517ea04946874cfa250c
[]
no_license
mondo-project/mondo-demo-bim
5bbdffa5a61805256e476ec2fa84d6d93aeea29f
96d673eb14e5c191ea4ae7985eee4a10ac51ffec
refs/heads/master
2016-09-13T11:53:26.773266
2016-06-02T20:02:05
2016-06-02T20:02:05
56,190,032
1
0
null
null
null
null
UTF-8
Java
false
false
3,886
java
/** */ package org.bimserver.models.ifc2x3tc1.provider; import java.util.Collection; import java.util.List; import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; import org.bimserver.models.ifc2x3tc1.IfcPumpType; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; /** * This is the item provider adapter for a {@link org.bimserver.models.ifc2x3tc1.IfcPumpType} object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class IfcPumpTypeItemProvider extends IfcFlowMovingDeviceTypeItemProvider { /** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IfcPumpTypeItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addPredefinedTypePropertyDescriptor(object); } return itemPropertyDescriptors; } /** * This adds a property descriptor for the Predefined Type feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void addPredefinedTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IfcPumpType_PredefinedType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IfcPumpType_PredefinedType_feature", "_UI_IfcPumpType_type"), Ifc2x3tc1Package.eINSTANCE.getIfcPumpType_PredefinedType(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This returns IfcPumpType.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/IfcPumpType")); } /** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getText(Object object) { String label = ((IfcPumpType)object).getName(); return label == null || label.length() == 0 ? getString("_UI_IfcPumpType_type") : getString("_UI_IfcPumpType_type") + " " + label; } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(IfcPumpType.class)) { case Ifc2x3tc1Package.IFC_PUMP_TYPE__PREDEFINED_TYPE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } }
[ "debreceni@mit.bme.hu" ]
debreceni@mit.bme.hu
4eda8ec74fb4c9c1aba9a4a5fa77a7c381633ee6
7363aa5bfd1406af5094e50a8f2a4077f509897a
/firefly-nettool/src/main/java/com/firefly/net/buffer/ThreadSafeIOBufferPool.java
021650e767de79e37310a0351ca05efb58a99c51
[ "Apache-2.0" ]
permissive
oidwuhaihua/firefly
b3078b8625574ecf227ae7494aa75d073cc77e3d
87f60b4a1bfdc6a2c730adc97de471e86e4c4d8c
refs/heads/master
2021-01-21T05:29:15.914195
2017-02-10T16:35:14
2017-02-10T16:35:14
83,196,072
3
0
null
2017-02-26T09:05:57
2017-02-26T09:05:57
null
UTF-8
Java
false
false
502
java
package com.firefly.net.buffer; import com.firefly.net.BufferPool; import java.nio.ByteBuffer; public class ThreadSafeIOBufferPool implements BufferPool { private final ThreadLocal<BufferPool> safeBufferPool = ThreadLocal.withInitial(IOBufferPool::new); @Override public final ByteBuffer acquire(int size) { return safeBufferPool.get().acquire(size); } @Override public final void release(ByteBuffer buffer) { safeBufferPool.get().release(buffer); } }
[ "qptkk@163.com" ]
qptkk@163.com
4f898cf50d7494e42cb4694ed2e2fd737f36655c
e7818f3c8f1a86472c3060993d28f52cbde749b2
/src/ru/barsopen/plsqlconverter/ast/typed/constant_maxvalue.java
556330f502b5f0427c1aa6775dbf656ea2ef33dd
[]
no_license
liuyuanyuan/plsql-pgsql-converter
a9fbc59493b26b9ec06820358617a28cf35bc31a
428c86c09f3be7ef448fe704d7fff4abc90d97e6
refs/heads/master
2020-04-07T12:16:07.250078
2018-11-27T05:56:43
2018-11-27T05:56:43
158,360,845
1
0
null
null
null
null
UTF-8
Java
false
false
3,025
java
package ru.barsopen.plsqlconverter.ast.typed; public class constant_maxvalue implements constant, _baseNode { public int _line = -1; public int _col = -1; public int _tokenStartIndex = -1; public int _tokenStopIndex = -1; public _baseNode _parent = null; public _baseNode _getParent() { return _parent; } public void _setParent(_baseNode value) { _parent = value; } public void _setBaseNode(_baseNode value) { this._parent = value; } public int _getLine() { return _line; } public int _getCol() { return _col; } public int _getTokenStartIndex() { return _tokenStartIndex; } public int _getTokenStopIndex() { return _tokenStopIndex; } ru.barsopen.plsqlconverter.util.AttachedComments _comments; public void setComments(ru.barsopen.plsqlconverter.util.AttachedComments comments) { this._comments = comments; } public ru.barsopen.plsqlconverter.util.AttachedComments getAttachedComments() { return this._comments; } public void _setCol(int col) { this._col = col; } public void _setLine(int line) { this._line = line; } public void _walk(_visitor visitor) { if (!visitor.enter(this)) { return; } visitor.leave(this); } public java.util.List<_baseNode> _getChildren() { java.util.List<_baseNode> result = new java.util.ArrayList<_baseNode>(); return result; } public void _replace(_baseNode child, _baseNode replacement) { throw new RuntimeException("Failed to replace node: no such node"); } public org.antlr.runtime.tree.Tree unparse() { org.antlr.runtime.CommonToken _token = new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.MAXVALUE_VK); _token.setLine(_line); _token.setCharPositionInLine(_col); _token.setText("MAXVALUE_VK"); org.antlr.runtime.tree.CommonTree _result = new org.antlr.runtime.tree.CommonTree(_token); if (_comments != null) { org.antlr.runtime.tree.CommonTree commentsNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT)); org.antlr.runtime.tree.CommonTree commentsBeforeNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getBefore())); org.antlr.runtime.tree.CommonTree commentsAfterNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getAfter())); org.antlr.runtime.tree.CommonTree commentsInsideNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getInside())); commentsNode.addChild(commentsBeforeNode); commentsNode.addChild(commentsInsideNode); commentsNode.addChild(commentsAfterNode); _result.addChild(commentsNode); } _result.setTokenStartIndex(_tokenStartIndex); _result.setTokenStopIndex(_tokenStopIndex); return _result; } }
[ "liuyuanyuan@highgo.com" ]
liuyuanyuan@highgo.com
06f4fb7d2d33766cd93b598d641c8321b8f085f2
b214f96566446763ce5679dd2121ea3d277a9406
/modules/desktop-swt/desktop-swt-ide-impl/src/main/java/org/eclipse/nebula/cwt/svg/SvgPaint.java
2530cdcd7327505d9e20554b2a629685d171f52c
[ "Apache-2.0", "LicenseRef-scancode-jgraph" ]
permissive
consulo/consulo
aa340d719d05ac6cbadd3f7d1226cdb678e6c84f
d784f1ef5824b944c1ee3a24a8714edfc5e2b400
refs/heads/master
2023-09-06T06:55:04.987216
2023-09-01T06:42:16
2023-09-01T06:42:16
10,116,915
680
54
Apache-2.0
2023-06-05T18:28:51
2013-05-17T05:48:18
Java
UTF-8
Java
false
false
1,607
java
/**************************************************************************** * Copyright (c) 2008, 2009 Jeremy Dowdall * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Jeremy Dowdall <jeremyd@aspencloud.com> - initial API and implementation *****************************************************************************/ package org.eclipse.nebula.cwt.svg; import org.eclipse.swt.graphics.GC; abstract class SvgPaint { enum PaintType { None, Current, Color, Link } SvgGraphic parent; GC gc; SvgGradient paintServer; PaintType type = null; String linkId = null; Integer color = null; Float opacity = null; SvgPaint(SvgGraphic parent) { this.parent = parent; } abstract void apply(); public void create(GC gc) { if(parent instanceof SvgShape) { this.gc = gc; if(linkId != null) { SvgElement def = parent.getElement(linkId); if(def instanceof SvgGradient) { SvgGradient gradient = (SvgGradient) def; SvgShape shape = (SvgShape) parent; paintServer = gradient; paintServer.create(shape, gc); } } } else { throw new UnsupportedOperationException("only shapes can be painted..."); //$NON-NLS-1$ } } public boolean dispose() { if(paintServer != null) { paintServer.dispose(); return true; } return false; } public boolean isPaintable() { return type != PaintType.None; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
277761084b371bed753ca7fd5ff16727697c751d
280d09a59bcdae0eb061d3eda579aa0c7a43c084
/app/src/main/java/com/king/khcareer/home/k4/HomeData.java
6b76c95dc68649e7d0e00762bdca30757b59c779
[]
no_license
evrimulgen/KHCareer
3bcc529a21a14d84b57c813be9c6543029146cc2
81637b47f9e979d142f8c233a490b3de8cabd02d
refs/heads/master
2020-12-30T11:58:51.886985
2017-05-02T09:59:26
2017-05-02T09:59:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,678
java
package com.king.khcareer.home.k4; import com.king.khcareer.match.gallery.UserMatchBean; import com.king.khcareer.model.sql.player.bean.Record; import java.util.List; /** * Created by Administrator on 2017/4/3 0003. */ public class HomeData { private List<Record> recordList; private String recordMatch; private String recordCountry; private String recordRound; private String recordCourt; private String playerName1; private boolean isWinner1; private String playerName2; private boolean isWinner2; private String playerName3; private boolean isWinner3; private List<UserMatchBean> matchList; public List<Record> getRecordList() { return recordList; } public void setRecordList(List<Record> recordList) { this.recordList = recordList; } public String getRecordMatch() { return recordMatch; } public void setRecordMatch(String recordMatch) { this.recordMatch = recordMatch; } public String getRecordRound() { return recordRound; } public void setRecordRound(String recordRound) { this.recordRound = recordRound; } public String getRecordCourt() { return recordCourt; } public void setRecordCourt(String recordCourt) { this.recordCourt = recordCourt; } public String getPlayerName1() { return playerName1; } public void setPlayerName1(String playerName1) { this.playerName1 = playerName1; } public String getPlayerName2() { return playerName2; } public void setPlayerName2(String playerName2) { this.playerName2 = playerName2; } public String getPlayerName3() { return playerName3; } public void setPlayerName3(String playerName3) { this.playerName3 = playerName3; } public List<UserMatchBean> getMatchList() { return matchList; } public void setMatchList(List<UserMatchBean> matchList) { this.matchList = matchList; } public String getRecordCountry() { return recordCountry; } public void setRecordCountry(String recordCountry) { this.recordCountry = recordCountry; } public boolean isWinner1() { return isWinner1; } public void setWinner1(boolean winner1) { isWinner1 = winner1; } public boolean isWinner2() { return isWinner2; } public void setWinner2(boolean winner2) { isWinner2 = winner2; } public boolean isWinner3() { return isWinner3; } public void setWinner3(boolean winner3) { isWinner3 = winner3; } }
[ "jingyangsddx@163.com" ]
jingyangsddx@163.com
bb36b75074373d1651ab32e00c7e902481dd876d
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/core-java-modules/core-java-lang-syntax-2/src/main/java/com/surya/core/scope/LoopScopeExample.java
86579f8f9e7fd3f3f7035b645aecd878af9c9723
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
465
java
package com.surya.core.scope; import java.util.Arrays; import java.util.List; public class LoopScopeExample { List<String> listOfNames = Arrays.asList("Joe", "Susan", "Pattrick"); public void iterationOfNames() { String allNames = ""; for (String name : listOfNames) { allNames = allNames + " " + name; } // compiler error, name cannot be resolved to a variable // String lastNameUsed = name; } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
edbff3fe05d7c62ea3c151be67737d78c049dcd7
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/android/filterpacks/imageproc/ToRGBAFilter.java
381e79d98110774ee6ef6e2957c07fd8dd5be77c
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,584
java
package android.filterpacks.imageproc; import android.app.slice.SliceItem; import android.filterfw.core.Filter; import android.filterfw.core.FilterContext; import android.filterfw.core.Frame; import android.filterfw.core.FrameFormat; import android.filterfw.core.MutableFrameFormat; import android.filterfw.core.NativeProgram; import android.filterfw.core.Program; import android.filterfw.format.ImageFormat; public class ToRGBAFilter extends Filter { private int mInputBPP; private FrameFormat mLastFormat = null; private Program mProgram; public ToRGBAFilter(String name) { super(name); } public void setupPorts() { MutableFrameFormat mask = new MutableFrameFormat(2, 2); mask.setDimensionCount(2); addMaskedInputPort(SliceItem.FORMAT_IMAGE, mask); addOutputBasedOnInput(SliceItem.FORMAT_IMAGE, SliceItem.FORMAT_IMAGE); } public FrameFormat getOutputFormat(String portName, FrameFormat inputFormat) { return getConvertedFormat(inputFormat); } public FrameFormat getConvertedFormat(FrameFormat format) { MutableFrameFormat result = format.mutableCopy(); result.setMetaValue(ImageFormat.COLORSPACE_KEY, Integer.valueOf(3)); result.setBytesPerSample(4); return result; } public void createProgram(FilterContext context, FrameFormat format) { this.mInputBPP = format.getBytesPerSample(); if (this.mLastFormat == null || this.mLastFormat.getBytesPerSample() != this.mInputBPP) { this.mLastFormat = format; int i = this.mInputBPP; if (i == 1) { this.mProgram = new NativeProgram("filterpack_imageproc", "gray_to_rgba"); } else if (i == 3) { this.mProgram = new NativeProgram("filterpack_imageproc", "rgb_to_rgba"); } else { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("Unsupported BytesPerPixel: "); stringBuilder.append(this.mInputBPP); stringBuilder.append("!"); throw new RuntimeException(stringBuilder.toString()); } } } public void process(FilterContext context) { Frame input = pullInput(SliceItem.FORMAT_IMAGE); createProgram(context, input.getFormat()); Frame output = context.getFrameManager().newFrame(getConvertedFormat(input.getFormat())); this.mProgram.process(input, output); pushOutput(SliceItem.FORMAT_IMAGE, output); output.release(); } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com