blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 390 | content_id stringlengths 40 40 | detected_licenses listlengths 0 35 | license_type stringclasses 2 values | repo_name stringlengths 6 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 539 values | visit_date timestamp[us]date 2016-08-02 21:09:20 2023-09-06 10:10:07 | revision_date timestamp[us]date 1990-01-30 01:55:47 2023-09-05 21:45:37 | committer_date timestamp[us]date 2003-07-12 18:48:29 2023-09-05 21:45:37 | github_id int64 7.28k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 13 values | gha_event_created_at timestamp[us]date 2012-06-11 04:05:37 2023-09-14 21:59:18 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-28 02:39:21 ⌀ | gha_language stringclasses 62 values | src_encoding stringclasses 26 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 128 12.8k | extension stringclasses 11 values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 79 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
844fde580168c0f2834c3cf1839941bd9c4b13b4 | 91ca3dfc64fc8aaaab9dfe872e7ff9bf2cb1975e | /leetcode/ContainerWithMostWater.java | 26ec9ccd413402f5c6cc519ca500fa2d9145aa03 | [] | no_license | mtawaken/AlgoSolutions | 6d18b1073f846e5f4d351ae2ed4b5a5cdab5be3d | ea45f5482f72ea8f3dc4d61924ecaf2d61681ac6 | refs/heads/master | 2021-01-21T06:06:22.489983 | 2015-06-21T07:41:52 | 2015-06-21T07:41:52 | 26,682,798 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 785 | java | /*
* Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai).
* n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two
* lines, which together with x-axis forms * a container, such that the container contains the most water.
* Note: You may not slant the container.
*/
public class ContainerWithMostWater {
public int maxArea(int[] height) {
int maxArea = 0;
int low = 0, high = height.length - 1;
while(low < high) {
maxArea = Math.max(maxArea, (high - low) * Math.min(height[low], height[high]));
if(height[low] < height[high])
low++;
else
high--;
}
return maxArea;
}
}
| [
"mitcc@qq.com"
] | mitcc@qq.com |
ba3412965c03ff34cd9ee42bdbc152543f6601be | 38d71395d37d04ea5ee2d75274faa7cb0677fb11 | /software/nbia-services-commons/test/gov/nih/nci/nbia/basket/BasketSeriesItemBeanTestCase.java | 0a844b82a454c89089f3703d5b588147962d4027 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | CBIIT/NBIA-TCIA | 2d9cd401de611ef96684b7d1b92a3815744ce268 | fcae8647a2ad375397444678751652e35cf716a3 | refs/heads/master | 2023-08-18T00:05:32.870581 | 2023-08-17T05:27:51 | 2023-08-17T05:27:51 | 69,281,028 | 15 | 6 | NOASSERTION | 2020-07-22T13:21:00 | 2016-09-26T18:40:19 | Java | UTF-8 | Java | false | false | 619 | java | /*L
* Copyright SAIC, Ellumen and RSNA (CTP)
*
*
* Distributed under the OSI-approved BSD 3-Clause License.
* See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details.
*/
package gov.nih.nci.nbia.basket;
import gov.nih.nci.nbia.lookup.BasketSeriesItemBean;
import junit.framework.TestCase;
public class BasketSeriesItemBeanTestCase extends TestCase {
public void testGetAnnotationSize3Digits() {
BasketSeriesItemBean item = new BasketSeriesItemBean();
item.setAnnotationsSize(626743L);
String size = item.getAnnotationSize3Digits();
assertEquals(size, "0.627");
}
}
| [
"panq@mail.nih.gov"
] | panq@mail.nih.gov |
c86816fef20d30951ace8930c2a4bcafc8265fc5 | 8618354b67bef48eacfb844e7464b4640f81809c | /src/main/xmpp/org/androidpn/server/xmpp/UnauthenticatedException.java | 18d8f46969c829d9d553fbbac472cbd8cf138eac | [] | no_license | jinyu-liang/isms | d20e0118f9f92294fa69e999ead03e62eb76311e | 9cefd53111673e9bbe4fc1c9f7099a8701cae779 | refs/heads/master | 2020-05-29T14:36:04.398721 | 2020-05-09T06:56:37 | 2020-05-09T06:56:37 | 65,609,375 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,400 | java | /*
* Copyright (C) 2010 Moduad Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.androidpn.server.xmpp;
/**
* Thrown if a user was not authenticated to do a particular operation.
*
* @author Sehwan Noh (devnoh@gmail.com)
*/
public class UnauthenticatedException extends Exception
{
private static final long serialVersionUID = 1L;
public UnauthenticatedException()
{
super();
}
public UnauthenticatedException(String message)
{
super(message);
}
public UnauthenticatedException(Throwable cause)
{
super(cause);
}
public UnauthenticatedException(String message, Throwable cause)
{
super(message, cause);
}
} | [
"ljyshiqian@126.com"
] | ljyshiqian@126.com |
23d21114fbfeb7ca46c701ac547f35d9c8d4ba16 | bfffc3ad873946992f2c243d6c4d866ccf0eee0d | /Servlet/ServletWeek3.5/src/cookie/GetCookies.java | 4518e66f55d2c047c9c611f387b65fc3f5fd3e50 | [] | no_license | huseyinsaglam/Java-EE | 05a5cb1e5f445513abae785195a9b0d2b535ed8e | 7902d3c45fad5c9756f9fb19cd8618b87726e6f7 | refs/heads/master | 2020-04-07T20:16:46.707292 | 2018-11-22T10:54:33 | 2018-11-22T10:54:33 | 158,682,001 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 725 | java | package cookie;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/cookies1")
public class GetCookies extends HttpServlet{
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Cookie [] cookies = req.getCookies();
if(cookies != null)
{
for(Cookie cookie : cookies)
{
System.out.println("name : " + cookie.getValue());
}
}
else
{
System.out.println("no cookies!!!");
}
}
}
| [
"hsaglam001@gmail.com"
] | hsaglam001@gmail.com |
b1aa6fd8932947c2e8d4b47a5c6de26ad8328510 | a2c0a2defe7886352fb7b724eabddafaa33ae09d | /SyntaxPro/src/level13/task1316/JavarushQuest.java | 62118076c3d6c638953fbcdcd56e4ad95ee52462 | [] | no_license | VadHead/JRSyntaxPro | 54eba224a25f100d43e2a923694d6aa9749b61ae | 3a89e7208b17909774e8a17359032d9d33e6b438 | refs/heads/master | 2023-09-02T07:17:54.540966 | 2021-11-19T16:39:12 | 2021-11-19T16:39:12 | 429,866,387 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 149 | java | package level13.task1316;
public enum JavarushQuest {
JAVA_SYNTAX,
JAVA_CORE,
JAVA_MULTITHREADING,
JAVA_COLLECTIONS,
CS_50,
ANDROID,
GAMES
}
| [
"vadhead@gmail.com"
] | vadhead@gmail.com |
b90ae0ecc197494ec0a841aec444c958ca42a664 | dc670f3e59a56627322276ae3f7e0be5b301ef42 | /src/test/java/exceptions/polinom/PolynomialTest.java | 8e14b2c1f9dc68026b0583b6b7f5851a286d7e4c | [] | no_license | BirkasTivadar/training-solutions | d3241a1d33cbb7388366a59ec654d8cf809a9855 | 36c7a47c634e93b80b2440d99a18f90359085fa1 | refs/heads/master | 2023-04-30T03:00:06.395524 | 2021-05-16T09:15:48 | 2021-05-16T09:15:48 | 308,813,466 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,024 | java | package exceptions.polinom;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class PolynomialTest {
@Test
public void constructorDoubleNullParameterShouldThrowException() throws Exception {
double[] coefficients = null;
Exception ex = assertThrows(NullPointerException.class, () -> new Polynomial(coefficients));
assertEquals("coefficients is null", ex.getMessage());
}
@Test
public void constructorStringNullParameterShouldThrowException() throws Exception {
String[] coefficients = null;
Exception ex = assertThrows(NullPointerException.class, () -> new Polynomial(coefficients));
assertEquals("coefficientStrs is null", ex.getMessage());
}
@Test
public void constructorStringInvalidCoefficientShouldThrowException() throws Exception {
String[] coefficientStrs = new String[]{"a", "1", "2"};
Exception ex = assertThrows(IllegalArgumentException.class, () -> new Polynomial(coefficientStrs));
assertEquals("Illegal coefficients, not a number", ex.getMessage());
assertEquals("For input string: \"a\"", ex.getCause().getMessage());
}
@Test
public void constructorStringShouldConvert() throws Exception {
String[] coefficientStrs = new String[]{"1", "2", "2"};
Polynomial polynomial = new Polynomial(coefficientStrs);
double[] expected = new double[]{1, 2, 2};
assertArrayEquals(expected, polynomial.getCoefficients());
}
@Test
public void evaluate() throws Exception {
Polynomial p = new Polynomial(new double[]{1, 2, 3});
double x = 1;
assertEquals(x * x + 2 * x + 3, p.evaluate(x));
x = 2;
assertEquals(x * x + 2 * x + 3, p.evaluate(x));
x = -2;
assertEquals(x * x + 2 * x + 3, p.evaluate(x));
Polynomial p2 = new Polynomial(new double[]{1, 1, 0, 1});
x = 3;
assertEquals(x * x * x + x * x + 1, p2.evaluate(x));
}
} | [
"birkastivadar@gmail.com"
] | birkastivadar@gmail.com |
b170a3a451e12e74f3f3726f74000e9f79e43958 | ce1a693343bda16dc75fd64f1688bbfa5d27ac07 | /system/src/tests/org/jboss/test/server/profileservice/MainWithSimpleHotDeployTestCase.java | 46d8c3df9c07dcbb3c2826ffa1fef15eb2592569 | [] | no_license | JavaQualitasCorpus/jboss-5.1.0 | 641c412b1e4f5f75bb650cecdbb2a56de2f6a321 | 9307e841b1edc37cc97c732e4b87125530d8ae49 | refs/heads/master | 2023-08-12T08:39:55.319337 | 2020-06-02T17:48:09 | 2020-06-02T17:48:09 | 167,004,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,753 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This 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 software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.test.server.profileservice;
import java.io.File;
import java.security.CodeSource;
import org.jboss.Main;
import org.jboss.bootstrap.microcontainer.ServerImpl;
import org.jboss.bootstrap.spi.Server;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.test.BaseTestCase;
/**
* Test of the jboss main loading a bootstrap configuration via the ProfileService
* and additional service via a simple hot deployment service.
*
* @author Scott.Stark@jboss.org
* @version $Revision: 85526 $
*/
public class MainWithSimpleHotDeployTestCase extends BaseTestCase
{
public MainWithSimpleHotDeployTestCase(String name)
{
super(name);
}
// Public --------------------------------------------------------
/* (non-Javadoc)
* @see org.jboss.test.AbstractTestCase#configureLogging()
*/
@Override
protected void configureLogging()
{
//enableTrace("org.jboss.kernel");
}
/**
* Test the startup of the org.jboss.Main entry point using the "default"
* profile and bootstrap deployer-beans.xml search logic.
* @throws Exception
*/
public void testDefaultStartup() throws Exception
{
String deployPrefix = "";
// If jbosstest.deploy.dir is not defined fail
String deployDirEnv = System.getenv("jbosstest.deploy.dir");
String deployDirProp = System.getProperty("jbosstest.deploy.dir");
if( deployDirProp == null && deployDirEnv != null )
{
System.setProperty("jbosstest.deploy.dir", deployDirEnv);
deployDirProp = deployDirEnv;
}
String supportDirEnv = System.getenv("jbosstest.support.dir");
String supportDirProp = System.getProperty("jbosstest.support.dir");
if( supportDirProp == null && supportDirEnv != null )
{
System.setProperty("jbosstest.support.dir", supportDirEnv);
supportDirProp = supportDirEnv;
}
if( supportDirProp == null )
{
// If these have not been set, assume running inside eclipse from the system folder
File resourcesDir = new File("output/eclipse-resources");
File classesDir = new File("output/eclipse-test-classes");
deployDirProp = resourcesDir.toURL().toExternalForm();
supportDirProp = classesDir.toURL().toExternalForm();
System.setProperty("jbosstest.deploy.dir", deployDirProp);
System.setProperty("jbosstest.support.dir", supportDirProp);
deployPrefix = "tests/bootstrap/defaulthotdeploy/";
}
assertNotNull("jbosstest.support.dir != null", supportDirProp);
assertNotNull("jbosstest.deploy.dir != null", deployDirProp);
// Set the deploy prefix
String[] args = {"-c", "defaulthotdeploy", "-Djboss.server.deployerBeansPrefix="+deployPrefix};
Main main = new Main();
main.boot(args);
Server server = main.getServer();
assertTrue("Server", server instanceof ServerImpl);
ServerImpl serverImpl = (ServerImpl) server;
// Validate that the expected deployment beans exist
Kernel kernel = serverImpl.getKernel();
assertInstalled(kernel, "ProfileService");
assertInstalled(kernel, "MainDeployer");
assertInstalled(kernel, "BeanDeployer");
assertInstalled(kernel, "VFSDeploymentScanner");
KernelRegistry registry = kernel.getRegistry();
KernelRegistryEntry entry = registry.getEntry("VFSDeploymentScanner");
/** TODO DeploymentScanner scanner = (DeploymentScanner) entry.getTarget();
synchronized( scanner )
{
while( scanner.getScanCount() <= 0 )
scanner.wait(10000);
}
log.info("Notified of scan: "+scanner.getScanCount());
*/
// Expected hot deployments
assertInstalled(kernel, "VFSClassLoader");
assertInstalled(kernel, "TestBean");
assertInstalled(kernel, "VFSClassLoader-unpacked");
assertInstalled(kernel, "TestBean-unpacked");
entry = registry.getEntry("TestBean");
Object testBean = entry.getTarget();
CodeSource testBeanCS = testBean.getClass().getProtectionDomain().getCodeSource();
log.info("TestBean.CS: "+testBeanCS);
log.info("TestBean.ClassLoader: "+testBean.getClass().getClassLoader());
// Shutdown
main.shutdown();
}
private void assertInstalled(Kernel kernel, String name)
{
KernelRegistry registry = kernel.getRegistry();
KernelRegistryEntry entry = registry.getEntry(name);
assertEquals(name+" Installed", ControllerState.INSTALLED, entry.getState());
}
}
| [
"taibi@sonar-scheduler.rd.tut.fi"
] | taibi@sonar-scheduler.rd.tut.fi |
f6d6495f8fe3ed1c75e367a844216ab6d6af5896 | a8ad44e4b334a6461cc92445e9a0819eae268215 | /src/com/luoExpress/_00_leetcode/list/_237_deleteListNode.java | 062588eb82e86204d3fa8ce3b7037f8280310bbe | [] | no_license | Marvelrex/ByteTube_dataStructure-Algorithm-1 | f489a86b9e9c8ce868ce7c853446cf44b2a474ce | 6546bfeffdfc4bee1e0b0bec4e650051d93fe227 | refs/heads/master | 2020-12-22T17:28:37.824094 | 2019-12-01T15:11:52 | 2019-12-01T15:11:52 | 236,874,134 | 1 | 0 | null | 2020-01-29T00:33:25 | 2020-01-29T00:33:25 | null | UTF-8 | Java | false | false | 369 | java | package com.luoExpress._00_leetcode.list;
/**
* https://leetcode.com/problems/delete-node-in-a-linked-list/
* @author Dal
*
*/
public class _237_deleteListNode {
public void deleteNode(ListNode node) {
if(node == null || node.next == null) return;
//做法:覆盖的方式
node.val = node.next.val;
node.next = node.next.next;
}
}
| [
"dallucus@gmail.com"
] | dallucus@gmail.com |
46ba62199bba5c21ea3ba2f5a213d2a3a25d49c3 | 0fb5a33837b8c6bf8edb2538a9c083ef44f610d7 | /app/src/main/java/com/example/administrator/newsdf/pzgc/bean/OrgDetailsFBean.java | b9603e56abaf4dc9afb4242828edaa0e70480166 | [] | no_license | winelx/newPro | 1974948ce97133dec8a18fc58a27e914ed14e005 | 6897b9a0dd6b2808b03a892c03b3ababf18c344e | refs/heads/master | 2022-11-01T22:11:30.313506 | 2022-10-09T06:44:37 | 2022-10-09T06:44:37 | 123,560,400 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,164 | java | package com.example.administrator.newsdf.pzgc.bean;
/**
* Created by Administrator on 2018/8/28 0028.
*/
public class OrgDetailsFBean {
/**
* check_date : 2018-08-23 20:08:52
* check_org_name : 测试公司
* check_person_name : 测试分公司质安负责人001
* id : 01ee44b85d0a4567884158ad472514e2
* part_details : 安卓
* rectification_date : 2018-08-04 00:00:00
* rectification_org_name : 测试9标
* rectification_person_name : 九标项目经理001
* rectification_reason : 嗷呜good
* standard_del_name : 对危险性较大的高边坡、高墩、大跨桥梁和地质复杂隧道,未进行风险评估
* standard_del_score : 10.0
* wbs_name : 桐木冲1号大桥桥梁总体
*/
private String checkDate;
private String checkOrgName;
private String checkPersonName;
private String id;
private String partDetails;
private String rectificationDate;
private String rectificationOrgName;
private String rectificationPersonName;
private String rectificationReason;
private String standardDelName;
private String standardDelScore;
private String wbsName;
private String standardtypeName;
private int iwork;
private String wbs_main_id;
public OrgDetailsFBean(String checkDate, String checkOrgName, String checkPersonName, String id, String partDetails,
String rectificationDate, String rectificationOrgName, String rectificationPersonName,
String rectificationReason, String standardDelName, String standardDelScore,
String wbsName, String standardtypeName, int iwork,String wbs_main_id) {
this.checkDate = checkDate;
this.checkOrgName = checkOrgName;
this.checkPersonName = checkPersonName;
this.id = id;
this.partDetails = partDetails;
this.rectificationDate = rectificationDate;
this.rectificationOrgName = rectificationOrgName;
this.rectificationPersonName = rectificationPersonName;
this.rectificationReason = rectificationReason;
this.standardDelName = standardDelName;
this.standardDelScore = standardDelScore;
this.wbsName = wbsName;
this.standardtypeName = standardtypeName;
this.iwork = iwork;
this.wbs_main_id = wbs_main_id;
}
public String getCheckDate() {
return checkDate;
}
public void setCheckDate(String checkDate) {
this.checkDate = checkDate;
}
public String getCheckOrgName() {
return checkOrgName;
}
public void setCheckOrgName(String checkOrgName) {
this.checkOrgName = checkOrgName;
}
public String getCheckPersonName() {
return checkPersonName;
}
public void setCheckPersonName(String checkPersonName) {
this.checkPersonName = checkPersonName;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPartDetails() {
return partDetails;
}
public void setPartDetails(String partDetails) {
this.partDetails = partDetails;
}
public String getRectificationDate() {
return rectificationDate;
}
public void setRectificationDate(String rectificationDate) {
this.rectificationDate = rectificationDate;
}
public String getRectificationOrgName() {
return rectificationOrgName;
}
public void setRectificationOrgName(String rectificationOrgName) {
this.rectificationOrgName = rectificationOrgName;
}
public String getRectificationPersonName() {
return rectificationPersonName;
}
public void setRectificationPersonName(String rectificationPersonName) {
this.rectificationPersonName = rectificationPersonName;
}
public String getRectificationReason() {
return rectificationReason;
}
public void setRectificationReason(String rectificationReason) {
this.rectificationReason = rectificationReason;
}
public String getStandardDelName() {
return standardDelName;
}
public void setStandardDelName(String standardDelName) {
this.standardDelName = standardDelName;
}
public String getStandardDelScore() {
return standardDelScore;
}
public void setStandardDelScore(String standardDelScore) {
this.standardDelScore = standardDelScore;
}
public String getWbsName() {
return wbsName;
}
public void setWbsName(String wbsName) {
this.wbsName = wbsName;
}
public String getStandardtypeName() {
return standardtypeName;
}
public void setStandardtypeName(String standardtypeName) {
this.standardtypeName = standardtypeName;
}
public int getIwork() {
return iwork;
}
public void setIwork(int iwork) {
this.iwork = iwork;
}
public String getWbs_main_id() {
return wbs_main_id;
}
public void setWbs_main_id(String wbs_main_id) {
this.wbs_main_id = wbs_main_id;
}
}
| [
"1094290855@qq.com"
] | 1094290855@qq.com |
195a361a2daaf5cc8b96e091bc58ab8c14ab44b9 | b280a34244a58fddd7e76bddb13bc25c83215010 | /scmv6/center-oauth/src/main/java/com/smate/center/oauth/filter/ExceptionLogInterceptor.java | d4ff5bffc9ba7f913d2731992e938a96fdadbbda | [] | no_license | hzr958/myProjects | 910d7b7473c33ef2754d79e67ced0245e987f522 | d2e8f61b7b99a92ffe19209fcda3c2db37315422 | refs/heads/master | 2022-12-24T16:43:21.527071 | 2019-08-16T01:46:18 | 2019-08-16T01:46:18 | 202,512,072 | 2 | 3 | null | 2022-12-16T05:31:05 | 2019-08-15T09:21:04 | Java | UTF-8 | Java | false | false | 1,535 | java | package com.smate.center.oauth.filter;
import java.util.Date;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.smate.core.base.utils.security.SecurityUtils;
import com.smate.core.base.utils.struts2.Struts2Utils;
/**
* 错误记录拦截器 记录用户操作出错信息 继承自AbstractInterceptor.
*
* @author zk
*
*/
public class ExceptionLogInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = -6153263768867359067L;
protected final Log log = LogFactory.getLog(ExceptionLogInterceptor.class);
@Override
public String intercept(ActionInvocation invocation) throws Exception {
// 返回结果
String returnValue = null;
try {
returnValue = invocation.invoke();
} catch (Exception e) {
// 安全环境
Long userId = SecurityUtils.getCurrentUserId();
// 出错日志
log.error(" Exception : " + e.getMessage() + " , user : [ " + userId + " ] , class : "
+ invocation.getProxy().getAction().getClass() + ", method :" + invocation.getProxy().getMethod()
+ ", time : " + (new Date()), e);
String uri = Struts2Utils.getRequest().getRequestURI();
Struts2Utils.getRequest().setAttribute("action_request_uri", uri);
// 把错误抛出,由struts2 的错误处理框架完成后续处理
throw e;
}
return returnValue;
}
}
| [
"zhiranhe@irissz.com"
] | zhiranhe@irissz.com |
954f99235a5fe354df9e0c08324ea1a02bcc913c | 5eae683a6df0c4b97ab1ebcd4724a4bf062c1889 | /bin/ext-template/yacceleratorfulfilmentprocess/src/de/hybris/platform/yacceleratorfulfilmentprocess/exceptions/PaymentMethodException.java | 2b44d3fd60d400980ead0336a5ca42f017753f00 | [] | no_license | sujanrimal/GiftCardProject | 1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb | e0398eec9f4ec436d20764898a0255f32aac3d0c | refs/heads/master | 2020-12-11T18:05:17.413472 | 2020-01-17T18:23:44 | 2020-01-17T18:23:44 | 233,911,127 | 0 | 0 | null | 2020-06-18T15:26:11 | 2020-01-14T18:44:18 | null | UTF-8 | Java | false | false | 671 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.yacceleratorfulfilmentprocess.exceptions;
/**
*
*/
public class PaymentMethodException extends RuntimeException
{
/**
*
* @param message
*/
public PaymentMethodException(final String message)
{
super(message);
}
}
| [
"travis.d.crawford@accenture.com"
] | travis.d.crawford@accenture.com |
912ebdc8fac4112c71576b801f1ce45b1cadbbe2 | ee19c5b7a48f34b965040ce895dc1337bab1559a | /gwtcx/samples/sample-gxt-mgwt-basic-project/src/main/java/com/kiahu/sample/client/view/mobile/MainPageMobileView.java | 2e28f038e1f536b264562638cf03b10e65f55685 | [] | no_license | hejunion/gwt-cx | 7895a9737ec22571a8e58685883a6563f9a25f00 | 2729985042b7c7d7ff41da4f2795b1ad291dbbce | refs/heads/master | 2020-04-22T18:26:38.854865 | 2015-05-22T16:07:44 | 2015-05-22T16:07:44 | 36,079,778 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,770 | java | /**
* (C) Copyright 2012 Kiahu
*
* Licensed under the terms of the GNU General Public License version 3
* as published by the Free Software Foundation. You may obtain a copy of the
* License at: http://www.gnu.org/copyleft/gpl.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.kiahu.sample.client.view.mobile;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiFactory;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtcx.client.uihandlers.MainPageUiHandlers;
import com.gwtcx.extgwt.client.ExtGwtCx;
import com.gwtcx.extgwt.client.desktop.view.AbstractMainPageDesktopView;
import com.gwtcx.extgwt.client.widgets.ApplicationMenu;
import com.gwtcx.extgwt.client.widgets.Masthead;
import com.kiahu.sample.client.presenter.MainPagePresenter;
import com.sencha.gxt.widget.core.client.ContentPanel;
import com.sencha.gxt.widget.core.client.ContentPanel.ContentPanelAppearance;
import com.sencha.gxt.widget.core.client.container.Viewport;
import com.sencha.gxt.widget.core.client.info.Info;
import com.sencha.gxt.widget.core.client.menu.Item;
import com.sencha.gxt.widget.core.client.menu.MenuItem;
public class MainPageMobileView extends AbstractMainPageDesktopView<MainPageUiHandlers> implements
MainPagePresenter.MyView {
public interface MainPageUiBinder extends UiBinder<Viewport, MainPageMobileView> { }
private static MainPageUiBinder uiBinder = GWT.create(MainPageUiBinder.class);
@Inject
public MainPageMobileView(final EventBus eventBus, final Masthead masthead, final ApplicationMenu applicationMenu) {
super(eventBus, masthead, applicationMenu);
Log.debug("MainPageMobileView()");
getNavigationPane().setActiveWidget(getNavigationPane().getWidget(0));
}
@Override
protected void createAndBindUi() {
Log.debug("createAndBindUi()");
viewport = uiBinder.createAndBindUi(this);
}
@UiFactory
public ContentPanel createContentPanel(ContentPanelAppearance appearance) {
return new ContentPanel(appearance);
}
@Override
public void setInSlot(Object slot, Widget content) {
Log.debug("setInSlot()");
if (slot == MainPagePresenter.TYPE_SetContextAreaContent) {
if (content != null) {
// getSouthLayout().setMembers(getWestLayout(), (VLayout) content);
}
} else {
super.setInSlot(slot, content);
}
}
@Override
public void removeFromSlot(Object slot, Widget content) {
super.removeFromSlot(slot, content);
Log.debug("removeFromSlot()");
}
@Override
protected void initApplicationMenu() {
Log.debug("initApplicationMenu()");
getApplicationMenu().addMenu(ExtGwtCx.getConstant().newActivityMenuName(),
ExtGwtCx.getConstant().newActivityMenuItemNames(),
new NewActivitySelectionHandler());
}
@Override
protected void initNavigationPane() {
Log.debug("initNavigationPane()");
}
public class NewActivitySelectionHandler implements SelectionHandler<Item> {
@Override
public void onSelection(SelectionEvent<Item> event) {
MenuItem item = (MenuItem) event.getSelectedItem();
Info.display("Action", "You selected the " + item.getText());
}
}
} | [
"rob.ferguson@uptick.com.au@47729709-52d1-c6db-8006-95f89ab1258a"
] | rob.ferguson@uptick.com.au@47729709-52d1-c6db-8006-95f89ab1258a |
5dd335bb3467015073aeef6ad75b0752b72e0866 | d4c3659ac9ddb5e3c0010b326f3bcc7e33ce0bed | /ren-regression/src/main/java/com/exigen/modules/claim/common/metadata/EventInformationLossEventTabMetaData.java | 488a6cbb85244087ce4ca52d93fb4101d7240296 | [] | no_license | NandiniDR29/regression-test | cbfdae60e8b462cf32485afb3df0d9504200d0e1 | c4acbc3488195217f9d6a780130d2e5dfe01d6e5 | refs/heads/master | 2023-07-03T14:35:40.673146 | 2021-08-11T07:03:13 | 2021-08-11T07:03:13 | 369,527,619 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,239 | java | /*
* Copyright © 2019 EIS Group and/or one of its affiliates. All rights reserved. Unpublished work under U.S. copyright laws.
* CONFIDENTIAL AND TRADE SECRET INFORMATION. No portion of this work may be copied, distributed, modified, or incorporated into any other media without EIS Group prior written consent.
*/
package com.exigen.modules.claim.common.metadata;
import com.exigen.ipb.eisa.controls.AutoCompleteBox;
import com.exigen.istf.webdriver.controls.ComboBox;
import com.exigen.istf.webdriver.controls.RadioGroup;
import com.exigen.istf.webdriver.controls.TextBox;
import com.exigen.istf.webdriver.controls.composite.assets.metadata.AssetDescriptor;
import com.exigen.istf.webdriver.controls.composite.assets.metadata.MetaData;
public class EventInformationLossEventTabMetaData extends MetaData {
public static final AssetDescriptor<TextBox> DATE_OF_LOSS = declare("Date of Loss", TextBox.class);
public static final AssetDescriptor<TextBox> TIME_OF_LOSS = declare("Time of Loss", TextBox.class);
public static final AssetDescriptor<ComboBox> LOSS_LOCATION = declare("Loss Location", ComboBox.class);
public static final AssetDescriptor<TextBox> DESCRIPTION_OF_LOSS_LOCATION = declare("Description of Loss Location", TextBox.class);
public static final AssetDescriptor<ComboBox> CAUSE_OF_LOSS = declare("Cause of Loss", ComboBox.class);
public static final AssetDescriptor<TextBox> SECONDARY_CAUSE_OF_LOSS = declare("Secondary Cause of Loss", TextBox.class);
public static final AssetDescriptor<TextBox> DESCRIPTION_OF_LOSS_EVENT = declare("Description of Loss Event", TextBox.class);
public static final AssetDescriptor<TextBox> ROAD_CONDITION = declare("Road Condition", TextBox.class);
public static final AssetDescriptor<TextBox> WEATHER_CONDITION = declare("Weather Condition", TextBox.class);
public static final AssetDescriptor<TextBox> GENERAL_COMMENTS = declare("General Comments", TextBox.class);
public static final AssetDescriptor<ComboBox> CLAIM_TYPE = declare("Claim Type", ComboBox.class);
public static final AssetDescriptor<ComboBox> CONTRIBUTING_FACTOR = declare("Contributing Factor", ComboBox.class);
public static final AssetDescriptor<ComboBox> ADDRESS_TYPE = declare("Address Type", ComboBox.class);
public static final AssetDescriptor<ComboBox> COUNTRY = declare("Country", ComboBox.class);
public static final AssetDescriptor<TextBox> ZIP_POSTAL_CODE = declare("Zip / Postal Code", TextBox.class);
public static final AssetDescriptor<TextBox> ADDRESS_LINE_1 = declare("Address Line 1", TextBox.class);
public static final AssetDescriptor<TextBox> ADDRESS_LINE_2 = declare("Address Line 2", TextBox.class);
public static final AssetDescriptor<TextBox> ADDRESS_LINE_3 = declare("Address Line 3", TextBox.class);
public static final AssetDescriptor<TextBox> CITY = declare("City", TextBox.class);
public static final AssetDescriptor<ComboBox> STATE_PROVINCE = declare("State / Province", ComboBox.class);
public static final AssetDescriptor<TextBox> COUNTY = declare("County", TextBox.class);
//benefits
public static final AssetDescriptor<TextBox> REPORTED_DATE_OF_LOSS = declare("Reported Date of Loss", TextBox.class);
public static final AssetDescriptor<TextBox> REPORTED_CAUSE_OF_LOSS = declare("Reported Cause of Loss", TextBox.class);
public static final AssetDescriptor<TextBox> DESCRIPTION_OF_LOSS = declare("Description of Loss", TextBox.class);
public static final AssetDescriptor<TextBox> PROOF_OF_LOSS_RECEIVED = declare("Proof of Loss Received", TextBox.class);
public static final AssetDescriptor<TextBox> REPORTED_UNDERLYING_CONDITIONS = declare("Reported Underlying Conditions", TextBox.class);
public static final AssetDescriptor<RadioGroup> IS_IT_PRIMARY_ICD_CODE = declare("Is it Primary ICD Code?", RadioGroup.class);
public static final AssetDescriptor<AutoCompleteBox> ICD_CODE = declare("ICD Code", AutoCompleteBox.class);
public static final AssetDescriptor<TextBox> ICD_CODE_DESCRIPTION = declare("ICD Code Description", TextBox.class);
public static final AssetDescriptor<ComboBox> DISABILITY_REASON = declare("Disability Reason", ComboBox.class);
}
| [
"Nramachandra@previseit.com"
] | Nramachandra@previseit.com |
c287dcdf2da42cc5b9259263d56d0a43274410a3 | 739b63e7a6f95aff655aa2a5cdb7e13198f9c1ed | /app/src/main/java/com/duitku/e_study/customfonts/TextViewSFProDisplayMedium.java | 9affe5289fa2fb2f2d898c1871ce0fc89e9783f5 | [] | no_license | bambangm88/EstudyBaru | c27bf5172e986d8bd15086bb71fc283718b3ab65 | 0d59bb09122c518038782c9561f13707c03b8609 | refs/heads/master | 2023-01-24T06:48:11.743903 | 2020-12-07T04:09:11 | 2020-12-07T04:09:11 | 311,383,652 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 898 | java | package
com.duitku.e_study.customfonts;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
public
class
TextViewSFProDisplayMedium
extends
androidx.appcompat.widget.AppCompatTextView
{
public
TextViewSFProDisplayMedium(Context
context,
AttributeSet
attrs,
int
defStyle)
{
super(context,
attrs,
defStyle);
init();
}
public
TextViewSFProDisplayMedium(Context
context,
AttributeSet
attrs)
{
super(context,
attrs);
init();
}
public
TextViewSFProDisplayMedium(Context
context)
{
super(context);
init();
}
private
void
init()
{
if
(!isInEditMode())
{
setTypeface(Typeface.createFromAsset(getContext().getAssets(),
"fonts/NeoSansPro_Medium.ttf"));
}
}
}
| [
"bambangm88@gmail.com"
] | bambangm88@gmail.com |
32245cb9d8ac95f21be9f74d70c703a23df32561 | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /cytoscape/tags/Cyto-2.6.0-beta1/src/cytoscape/data/AttributeFilter.java | 1d1aa4bf792be36bd2402e7ca513a9dda36d07f5 | [] | no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,720 | java | /*
File: AttributeFilter.java
Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
The Cytoscape Consortium is:
- Institute for Systems Biology
- University of California San Diego
- Memorial Sloan-Kettering Cancer Center
- Institut Pasteur
- Agilent Technologies
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
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. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. See
the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package cytoscape.data;
/**
* Interface for defining CyEdge-based filters used for determining
* which Edges should be used for a particular operation, such as
* CyAttributesUtils.copyAttributes().
* @see cytoscape.data.CyAttributesUtils#copyAttributes
*/
public interface AttributeFilter {
/**
* Return true iff a given attribute should be included in
* some operation, such as {@link
* cytoscape.data.CyAttributesUtils#copyAttributes
* CyAttributesUtils.copyAttributes()}.
* @param CyAttributes attrs the CyAttributes where attrName
* is stored.
* @param objID the identifer of the object whose attrName attribute
* is stored in attrs.
* @param attrName the name of the Attribute to test.
* For example, if we were performing a CyAttributesUtils.copyAttributes(),
* returning true would mean to copy the attribute attrName
* for the object with key objID, within the CyAttributes attrs.
* @see cytoscape.data.CyAttributesUtils#copyAttributes
*/
boolean includeAttribute(CyAttributes attrs, String objID, String attrName);
}
| [
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] | mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
30acef3af9aa86dd329b2c5f3478881ecfab2d67 | d16f17f3b9d0aa12c240d01902a41adba20fad12 | /src/leetcode/leetcode19xx/leetcode1962/Solution.java | af85c9adcf109eb03f53e4ed6cb9ca8c646c786b | [] | no_license | redsun9/leetcode | 79f9293b88723d2fd123d9e10977b685d19b2505 | 67d6c16a1b4098277af458849d352b47410518ee | refs/heads/master | 2023-06-23T19:37:42.719681 | 2023-06-09T21:11:39 | 2023-06-09T21:11:39 | 242,967,296 | 38 | 3 | null | null | null | null | UTF-8 | Java | false | false | 602 | java | package leetcode.leetcode19xx.leetcode1962;
import java.util.Comparator;
import java.util.PriorityQueue;
@SuppressWarnings("ConstantConditions")
public class Solution {
public int minStoneSum(int[] piles, int k) {
PriorityQueue<Integer> pq = new PriorityQueue<>(Comparator.reverseOrder());
int ans = 0;
for (int pile : piles) {
pq.offer(pile);
ans += pile;
}
while (k-- > 0 && ans != 0) {
Integer poll = pq.poll();
ans -= poll / 2;
pq.offer((poll + 1) / 2);
}
return ans;
}
}
| [
"mokeev.vladimir@gmail.com"
] | mokeev.vladimir@gmail.com |
893acf74af7e493ce161622d6279c2c85c5b7d2b | 261354cfb9111edd9a78b5cabaca64af9687628c | /src/main/java/com/megacrit/cardcrawl/mod/replay/actions/unique/BlackTransmuteAction.java | 47e282419518857362d075dd109ca37f05808494 | [] | no_license | The-Evil-Pickle/Replay-the-Spire | 1c9258bd664ba0ff41f79d57180a090c502cdca3 | 1fcb4cedafa61f32b3d9c3bab2d6a687f9cbe718 | refs/heads/master | 2022-11-14T15:56:19.255784 | 2022-11-01T13:30:14 | 2022-11-01T13:30:14 | 122,853,479 | 39 | 19 | null | 2022-11-01T13:30:15 | 2018-02-25T16:26:38 | Java | UTF-8 | Java | false | false | 2,238 | java | package com.megacrit.cardcrawl.mod.replay.actions.unique;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
//import com.megacrit.cardcrawl.actions.ActionType;
import com.megacrit.cardcrawl.actions.common.MakeTempCardInHandAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.*;
import com.megacrit.cardcrawl.core.*;
import com.megacrit.cardcrawl.ui.panels.*;
import com.megacrit.cardcrawl.dungeons.*;
import com.megacrit.cardcrawl.mod.replay.actions.*;
import com.megacrit.cardcrawl.mod.replay.actions.common.*;
import com.megacrit.cardcrawl.mod.replay.cards.*;
public class BlackTransmuteAction extends AbstractGameAction
{
private boolean freeToPlayOnce;
private boolean upgraded;
private AbstractPlayer p;
private int energyOnUse;
public BlackTransmuteAction(final AbstractPlayer p, final boolean upgraded, final boolean freeToPlayOnce, final int energyOnUse) {
this.p = p;
this.upgraded = upgraded;
this.freeToPlayOnce = freeToPlayOnce;
this.duration = Settings.ACTION_DUR_XFAST;
this.actionType = ActionType.SPECIAL;
this.energyOnUse = energyOnUse;
}
@Override
public void update() {
int effect = EnergyPanel.totalCount;
if (this.energyOnUse != -1) {
effect = this.energyOnUse;
}
if (this.p.hasRelic("Chemical X")) {
effect += 2;
this.p.getRelic("Chemical X").flash();
}
if (effect > 0) {
for (int i = 0; i < effect; ++i) {
final AbstractCard c = infinitespire.helpers.CardHelper.getRandomBlackCard().makeCopy();
if (c.cost > 0) {
c.setCostForTurn(c.cost - 1);
}
AbstractDungeon.actionManager.addToBottom(new MakeTempCardInHandAction(c, 1));
}
if (!this.freeToPlayOnce) {
//if (this.upgraded && EnergyPanel.totalCount > 0) {
//this.p.energy.use(EnergyPanel.totalCount - 1);
//} else {
this.p.energy.use(EnergyPanel.totalCount);
//}
}
}
this.isDone = true;
}
}
| [
"tobiaskipps@gmail.com"
] | tobiaskipps@gmail.com |
455954b11cfa750265d5ee769fba8d638f89ccaa | e256dea3b5a49d7e183f16dca35347365a4c2a5d | /programme/1_04_Chars_Strings/MatchResultDemo.java | 8d834355acf1393f50f76cddd1f36f309aecbb25 | [] | no_license | wbs-students/javainsel10 | c8769993f7f8c07afe50f9624cb7579e5110ef84 | f360e6f3d1b9fb8ed78481e03f641c492aac04cd | refs/heads/master | 2021-03-12T23:15:46.845992 | 2013-07-05T22:03:48 | 2013-07-05T22:03:48 | 11,209,217 | 1 | 1 | null | null | null | null | ISO-8859-1 | Java | false | false | 766 | java | import java.util.ArrayList;
import java.util.List;
import java.util.regex.MatchResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class MatchResultDemo
{
static Iterable<MatchResult> findMatches( String pattern, CharSequence s )
{
List<MatchResult> results = new ArrayList<MatchResult>();
for ( Matcher m = Pattern.compile(pattern).matcher(s); m.find(); )
results.add( m.toMatchResult() );
return results;
}
public static void main( String[] args )
{
String pattern = "\\d{9,10}[\\d|x|X]";
String s = "Insel: 3898425266, Reguläre Ausdrücke: 3897213494";
for ( MatchResult r : findMatches( pattern, s ) )
System.out.println( r.group() + " von " + r.start() + " bis " + r.end() );
}
}
| [
"grunwald.markus@arcor.de"
] | grunwald.markus@arcor.de |
7d76132aaa27141003fa2f8a29c2d2e01373d0fa | b1105e327a8b13c18dd2d38a1791b4760cbc5d5e | /leetcode/src/main/java/L1240_Stone_Game_II.java | 3ba95086cf772d12273855a020333f0d693b90a1 | [] | no_license | shengmingqijiquan/LeetCode | 56eaf674822a180b605ea999353f35d15b766c60 | 64f622a1d98ec05ee2928906b9681b72b1ca98af | refs/heads/master | 2022-12-01T11:13:13.816908 | 2020-08-19T13:02:19 | 2020-08-19T13:02:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 130 | java |
// https://leetcode-cn.com/problems/stone-game-ii/
class L1240_Stone_Game_II {
public int stoneGameII(int[] piles) {
}
} | [
"15822882820@163.com"
] | 15822882820@163.com |
33ee50c05c537a42d199cd664707943b0464f20e | 8d9afa95870a2ce78abde9fb349e443175a56b18 | /BLM103_2017_2018Bahar/src/Ders03Lab/Ornek1c.java | 6bfc4bed903f7cfc635bd85e7a265740b01f37cd | [] | no_license | alinizam/FSM_BLM103_2017_2018Bahar | ec6fa423de18ed1109a213ee1c2ce063a875b4a7 | 2a2ef1b8fcec86c72c69d5a8aec6b6fd76b8dc88 | refs/heads/master | 2021-04-30T11:31:02.649653 | 2018-05-15T12:03:41 | 2018-05-15T12:03:41 | 121,254,493 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 732 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Ders03Lab;
/**
*
* @author anizam
*/
public class Ornek1c {
public static void main(String[] args) {
int not = -70;
String harfNot = "";
if (not < 0 ) {
harfNot = "Hata";
}
if (not >= 0 && not <= 40) {
harfNot = "FF";
}else if (not < 70) {
harfNot = "CC";
}else if (not < 100) {
harfNot = "AA";
} else {
harfNot = "Hata";
}
System.out.println(harfNot);
}
}
| [
"alinizam99@gmail.com"
] | alinizam99@gmail.com |
e27a6fb3987f6307e9e1d184d79aaa4f674a2103 | b48f7fee57c532dd6e02f58d1fb4f3232662d2b0 | /winter-usecases/src/main/java/de/uni_mannheim/informatik/dws/winter/usecase/restaurants/model/RestaurantXMLReader.java | 0b863f0ce440e5bba25553063f96a052c62a68dd | [
"Apache-2.0"
] | permissive | olehmberg/winter | 9fd0bccdec57b04bef1e3271748e1add4ee08456 | 9715392e6b9069a484eb3a99813538c7584277ee | refs/heads/master | 2022-05-27T12:39:43.778646 | 2021-12-17T11:21:54 | 2021-12-17T11:21:54 | 88,765,628 | 113 | 38 | Apache-2.0 | 2022-05-20T20:48:08 | 2017-04-19T16:16:31 | Java | UTF-8 | Java | false | false | 3,126 | java | /*
* Copyright (c) 2017 Data and Web Science Group, University of Mannheim, Germany (http://dws.informatik.uni-mannheim.de/)
*
* 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 de.uni_mannheim.informatik.dws.winter.usecase.restaurants.model;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.w3c.dom.Node;
import de.uni_mannheim.informatik.dws.winter.model.DataSet;
import de.uni_mannheim.informatik.dws.winter.model.FusibleFactory;
import de.uni_mannheim.informatik.dws.winter.model.RecordGroup;
import de.uni_mannheim.informatik.dws.winter.model.defaultmodel.Attribute;
import de.uni_mannheim.informatik.dws.winter.model.io.XMLMatchableReader;
/**
* A {@link XMLMatchableReader} for {@link Restaurant}s.
*
* @author Alexander Brinkmann (albrinkm@mail.uni-mannheim.de)
*
*/
public class RestaurantXMLReader extends XMLMatchableReader<Restaurant, Attribute> implements
FusibleFactory<Restaurant, Attribute> {
/* (non-Javadoc)
* @see de.uni_mannheim.informatik.wdi.model.io.XMLMatchableReader#initialiseDataset(de.uni_mannheim.informatik.wdi.model.DataSet)
*/
@Override
protected void initialiseDataset(DataSet<Restaurant, Attribute> dataset) {
super.initialiseDataset(dataset);
// the schema is defined in the Restaurant class and not interpreted from the file, so we have to set the attributes manually
dataset.addAttribute(Restaurant.NAME);
dataset.addAttribute(Restaurant.ADDRESS);
dataset.addAttribute(Restaurant.CITY);
dataset.addAttribute(Restaurant.PHONE);
dataset.addAttribute(Restaurant.STYLE);
}
@Override
public Restaurant createModelFromElement(Node node, String provenanceInfo) {
String id = getValueFromChildElement(node, "id");
// create the object with id and provenance information
Restaurant Restaurant = new Restaurant(id, provenanceInfo);
// fill the attributes
Restaurant.setName(getValueFromChildElement(node, "Name"));
Restaurant.setAddress(getValueFromChildElement(node, "Address"));
Restaurant.setCity(getValueFromChildElement(node, "City"));
Restaurant.setPhone(getValueFromChildElement(node, "Phone"));
Restaurant.setStyle(getValueFromChildElement(node, "Style"));
return Restaurant;
}
@Override
public Restaurant createInstanceForFusion(RecordGroup<Restaurant, Attribute> cluster) {
List<String> ids = new LinkedList<>();
for (Restaurant m : cluster.getRecords()) {
ids.add(m.getIdentifier());
}
Collections.sort(ids);
String mergedId = StringUtils.join(ids, '+');
return new Restaurant(mergedId, "fused");
}
}
| [
"oliver.lehmberg@live.de"
] | oliver.lehmberg@live.de |
89b12d37e5a29beb28feeb4d1deb63557bfd2dce | e9d1b2db15b3ae752d61ea120185093d57381f73 | /mytcuml-src/src/java/components/uml_tool_actions_-_activity_elements_actions/trunk/src/java/tests/com/topcoder/uml/actions/model/activity/RemoveActionStateActionTests.java | 378e4bdb34e2db05ecfa56a60208f419aa7a9498 | [] | no_license | kinfkong/mytcuml | 9c65804d511ad997e0c4ba3004e7b831bf590757 | 0786c55945510e0004ff886ff01f7d714d7853ab | refs/heads/master | 2020-06-04T21:34:05.260363 | 2014-10-21T02:31:16 | 2014-10-21T02:31:16 | 25,495,964 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,596 | java | /*
* Copyright (C) 2006 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.uml.actions.model.activity;
import com.topcoder.uml.model.activitygraphs.ActionState;
import com.topcoder.uml.model.activitygraphs.ActionStateImpl;
import com.topcoder.uml.model.statemachines.CompositeStateImpl;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.framework.Test;
/**
* <p>
* Unit test cases for RemoveActionStateAction.
* </p>
*
* @author TCSDEVELOPER
* @version 1.0
*/
public class RemoveActionStateActionTests extends TestCase {
/**
* <p>
* The RemoveActionStateAction instance for testing.
* </p>
*/
private RemoveActionStateAction action;
/**
* <p>
* The ActionState instance for testing.
* </p>
*/
private ActionState state;
/**
* <p>
* Setup test environment.
* </p>
*
* @throws Exception to JUnit
*
*/
protected void setUp() throws Exception {
TestHelper.loadSingleXMLConfig(TestHelper.LOG_NAMESPACE, TestHelper.LOG_CONFIGFILE);
state = new ActionStateImpl();
state.setContainer(new CompositeStateImpl());
action = new RemoveActionStateAction(state);
}
/**
* <p>
* Tears down test environment.
* </p>
*
* @throws Exception to JUnit
*
*/
protected void tearDown() throws Exception {
action = null;
state = null;
TestHelper.clearConfigFile(TestHelper.LOG_NAMESPACE);
}
/**
* <p>
* Return all tests.
* </p>
*
* @return all tests
*/
public static Test suite() {
return new TestSuite(RemoveActionStateActionTests.class);
}
/**
* <p>
* Tests ctor RemoveActionStateAction#RemoveActionStateAction(ActionState) for accuracy.
* </p>
*
* <p>
* Verify : the newly created RemoveActionStateAction instance should not be null.
* </p>
*/
public void testCtor() {
assertNotNull("Failed to create a new RemoveActionStateAction instance.", action);
}
/**
* <p>
* Tests ctor RemoveActionStateAction#RemoveActionStateAction(ActionState) for failure.
* </p>
*
* <p>
* It tests the case that when state is null and expects IllegalArgumentException.
* </p>
*/
public void testCtor_NullState() {
try {
new RemoveActionStateAction(null);
fail("IllegalArgumentException expected.");
} catch (IllegalArgumentException iae) {
//good
}
}
} | [
"kinfkong@126.com"
] | kinfkong@126.com |
5739931e6bc5d87fb33cd2f5861ddda9582bdee7 | 9b12f82541adbdde88bf0f29c95670b301b52921 | /src/main/java/DiamonShop/Dto/CartDto.java | 2fc58bd4b51fa669f2cb837ec5533a8e066615aa | [] | no_license | tranthanhnha1999/Diamond | 1e905ed1b1b09bcf18701d0f7408d1d595cfaa6e | ae07251ba8af9e44f42b01a1eb6f88c9b5fdbcab | refs/heads/master | 2023-05-29T10:29:34.239125 | 2021-06-09T13:18:40 | 2021-06-09T13:18:40 | 375,237,728 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 707 | java | package DiamonShop.Dto;
public class CartDto {
private int quanty;
private double totalPrice;
private ProductsDto product;
public CartDto() {
}
public CartDto(int quanty, double totalPrice, ProductsDto product) {
this.quanty = quanty;
this.totalPrice = totalPrice;
this.product = product;
}
public int getQuanty() {
return quanty;
}
public void setQuanty(int quanty) {
this.quanty = quanty;
}
public double getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(double totalPrice) {
this.totalPrice = totalPrice;
}
public ProductsDto getProduct() {
return product;
}
public void setProduct(ProductsDto product) {
this.product = product;
}
}
| [
"="
] | = |
f72abe87f9986ce6fb035636857685af4124d2f9 | b96481a5b2550b5145b146e7bad0678b6dab54d8 | /src/main/java/com/massoftware/windows/sucursales/SucursalesFiltro.java | 8101e5c4fa48e61e9e3c3e967a6bd033436adf2a | [] | no_license | sebaalvarez/massoftware | 49f308029bc0a5ff3e1e040b18d673abfaa8a2e7 | a57de5c9c0c2cc73933b4e5b4d49c72eb47bce62 | refs/heads/master | 2020-03-31T19:28:23.840521 | 2018-10-10T20:23:06 | 2018-10-10T20:23:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 544 | java | package com.massoftware.windows.sucursales;
import com.massoftware.windows.UtilModel;
public class SucursalesFiltro {
private Integer numero;
private String nombre;
public Integer getNumero() {
return numero;
}
public void setNumero(Integer numero) {
this.numero = numero;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = UtilModel.format(nombre);
}
@Override
public String toString() {
return "PaisesFiltro [numero=" + numero + ", nombre=" + nombre + "]";
}
}
| [
"diegopablomansilla@gmail.com"
] | diegopablomansilla@gmail.com |
b5c597bb91476eaf4cb82e226dba555c856b202b | f4975d6249933a19c104b79cd5abd72c80a65b34 | /src/main/java/com/jiin/admin/website/view/component/HostnameRefreshComponent.java | db337b12c7448cbcc52938fa9df6cc1e67dce896 | [] | no_license | tails5555/admin-view | 1e77f8555a340e9cb5dc8227acbea58b3ad0d75c | 9ca3c66f651e0eb30f1c68c66c1e867d5a44a587 | refs/heads/master | 2023-02-03T18:34:43.518629 | 2020-12-22T16:44:25 | 2020-12-22T16:44:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 622 | java | package com.jiin.admin.website.view.component;
import com.jiin.admin.mapper.data.ContainerHistoryMapper;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
// 서버 HOSTNAME 이 변경될 때, 실행 정보에 대한 HISTORY 의 HOSTNAME 을 정정하기 위한 컴포넌트.
@Component
public class HostnameRefreshComponent {
@Resource
private ContainerHistoryMapper containerHistoryMapper;
public boolean setHostnameInContainerHistoryList(String beforeName, String afterName){
return containerHistoryMapper.updateHostnameData(beforeName, afterName) >= 0;
}
}
| [
"tails5555@naver.com"
] | tails5555@naver.com |
f7c7f6885d74499dc2ecd922dc63840b0b559a79 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /cdn-20180510/src/main/java/com/aliyun/cdn20180510/models/DescribeCdnReportResponse.java | a963332933bf90092636406c60a54d5e364d5d97 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,387 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.cdn20180510.models;
import com.aliyun.tea.*;
public class DescribeCdnReportResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public DescribeCdnReportResponseBody body;
public static DescribeCdnReportResponse build(java.util.Map<String, ?> map) throws Exception {
DescribeCdnReportResponse self = new DescribeCdnReportResponse();
return TeaModel.build(map, self);
}
public DescribeCdnReportResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DescribeCdnReportResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public DescribeCdnReportResponse setBody(DescribeCdnReportResponseBody body) {
this.body = body;
return this;
}
public DescribeCdnReportResponseBody getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
6ec514969da7d25eb561b17771598b9aa02aec65 | c3c44630c52bda7727e7e65a234785c236b9e7c2 | /ui/src/main/java/org/microapp/ui/membership/MembershipPage.java | 91343f460fe1735c85b0b12ad8c18da0d35e1faf | [] | no_license | Cajova-Houba/microapp-diary | 69b8342c80dc66e70769ef6cabb991d9e5bead68 | 02aa8fd3c1fe7f229e90920640621a65800cbcca | refs/heads/master | 2021-01-13T01:03:02.671643 | 2016-05-02T21:06:21 | 2016-05-02T21:06:21 | 54,346,528 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,597 | java | package org.microapp.ui.membership;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
import org.apache.wicket.markup.html.link.AbstractLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.IModel;
import org.microapp.membernet.vo.MembershipVO;
import org.microapp.ui.HomePage;
import org.microapp.ui.base.GenericPage;
import org.microapp.ui.base.genericTable.ButtonColumn;
import org.microapp.ui.base.genericTable.ComponentColumn;
import org.microapp.ui.base.genericTable.CustomButton;
import org.microapp.ui.base.genericTable.GenericTable;
public class MembershipPage extends GenericPage {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void addComponents() {
super.addComponents();
addMembershipTable("membershipTable");
}
private void addMembershipTable(String tableID) {
List<String> fieldNames = Arrays.asList(new String[]{"id","name","society.id","society.name","isSocietyAdmin"});
List<MembershipVO> values = new ArrayList<MembershipVO>();
for(Integer societyId : Arrays.asList(-3,-2,-1,1,2,3)) {
values.addAll(membernetManager.listAll(societyId));
}
MembershipTable table = new MembershipTable(tableID, MembershipVO.class, values, fieldNames, null);
add(table);
}
class MembershipTable extends GenericTable {
private static final long serialVersionUID = 1L;
public MembershipTable(String id, Class<? extends Serializable> clazz,
List<? extends Serializable> values, List<String> fieldNames,
Map<String, String> headers) {
super(id, clazz, values, fieldNames, headers);
}
@Override
protected List<ComponentColumn> getComponentColumns() {
List<ComponentColumn> columns = super.getComponentColumns();
//link to diary application + authentication
ButtonColumn diaryColumn = new ButtonColumn("id", "diaryColumn") {
@Override
public AbstractLink getLink( final IModel<Object> rowModel) {
return new Link(CustomButton.LINK_ID) {
@Override
public void onClick() {
String id = getDataModel(rowModel).getObject().toString();
logDebug("Log as member with id="+id);
boolean authRes = AuthenticatedWebSession.get().signIn(id, null);
if(authRes) {
setResponsePage(HomePage.class);
}
}
};
}
};
columns.add(diaryColumn);
return columns;
}
}
}
| [
"tkmushroomer@gmail.com"
] | tkmushroomer@gmail.com |
e4bb31743c649ff8b1e9d2f02d9c2cfb453d92c6 | 1af048cb33ff887c649fded9c747e8108b13b586 | /example-springboot/Spring4Intoturial/src/main/java/com/edu/spring/User.java | 41661e8807bbd5a7f51bae130894f01e4e4663ab | [] | no_license | bulidWorld/toturial | b2451453518b6d93aa40431bf3480f9675a8f73b | a7d57c174cd3a5b85a44f6c9a78053cdbde57366 | refs/heads/master | 2021-01-15T23:21:41.729629 | 2018-06-26T15:52:52 | 2018-06-26T15:52:52 | 99,930,958 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 583 | java | package com.edu.spring;
import javax.annotation.Resource;
import javax.inject.Inject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
//没有明确角色的时候使用
@Component("myUser")
public class User {
//Spring提供的注解
@Autowired
private UserService userService;
//JSR-250 的注解
@Resource
private Car car;
//JSR-330 的注解
@Inject
private Cat cat;
@Override
public String toString() {
return "User [userService=" + userService + ", car=" + car + ", cat=" + cat + "]";
}
}
| [
"782213745@qq.com"
] | 782213745@qq.com |
d96ccfa5b8a3c271a63d747100c6184665811989 | 065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be | /ant_cluster/13228/src_10.java | 2c95bfae7aa61177ce216329c160fed4b2b7da8b | [] | no_license | martinezmatias/GenPat-data-C3 | 63cfe27efee2946831139747e6c20cf952f1d6f6 | b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4 | refs/heads/master | 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,647 | java | /*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Ant", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.tools.ant.taskdefs;
import org.apache.tools.ant.*;
import org.apache.tools.ant.types.ZipFileSet;
import org.apache.tools.zip.*;
import java.io.*;
/**
* Creates a JAR archive.
*
* @author James Davidson <a href="mailto:duncan@x180.com">duncan@x180.com</a>
*/
public class Jar extends Zip {
private File manifest;
private boolean manifestAdded;
public Jar() {
super();
archiveType = "jar";
emptyBehavior = "create";
setEncoding("UTF8");
}
public void setJarfile(File jarFile) {
super.setZipfile(jarFile);
}
public void setManifest(File manifestFile) {
manifest = manifestFile;
if (!manifest.exists())
throw new BuildException("Manifest file: " + manifest + " does not exist.");
// Create a ZipFileSet for this file, and pass it up.
ZipFileSet fs = new ZipFileSet();
fs.setDir(new File(manifest.getParent()));
fs.setIncludes(manifest.getName());
fs.setFullpath("META-INF/MANIFEST.MF");
super.addFileset(fs);
}
public void addMetainf(ZipFileSet fs) {
// We just set the prefix for this fileset, and pass it up.
fs.setPrefix("META-INF/");
super.addFileset(fs);
}
protected void initZipOutputStream(ZipOutputStream zOut)
throws IOException, BuildException
{
// If no manifest is specified, add the default one.
if (manifest == null) {
String s = "/org/apache/tools/ant/defaultManifest.mf";
InputStream in = this.getClass().getResourceAsStream(s);
if ( in == null )
throw new BuildException ( "Could not find: " + s );
zipDir(null, zOut, "META-INF/");
zipFile(in, zOut, "META-INF/MANIFEST.MF", System.currentTimeMillis());
}
super.initZipOutputStream(zOut);
}
protected void zipFile(File file, ZipOutputStream zOut, String vPath)
throws IOException
{
// If the file being added is META-INF/MANIFEST.MF, we warn if it's not the
// one specified in the "manifest" attribute - or if it's being added twice,
// meaning the same file is specified by the "manifeset" attribute and in
// a <fileset> element.
if (vPath.equalsIgnoreCase("META-INF/MANIFEST.MF")) {
if (manifest == null || !manifest.equals(file) || manifestAdded) {
log("Warning: selected "+archiveType+" files include a META-INF/MANIFEST.MF which will be ignored " +
"(please use manifest attribute to "+archiveType+" task)", Project.MSG_WARN);
} else {
super.zipFile(file, zOut, vPath);
manifestAdded = true;
}
} else {
super.zipFile(file, zOut, vPath);
}
}
/**
* Make sure we don't think we already have a MANIFEST next time this task
* gets executed.
*/
protected void cleanUp() {
manifestAdded = false;
super.cleanUp();
}
}
| [
"375833274@qq.com"
] | 375833274@qq.com |
95cfa894cce7a79f8e021e65c1cb1dce190f6dac | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/85/org/apache/commons/math/fraction/BigFraction_pow_999.java | 653ce17cd2200a64389f59c21a329e4e8f83743e | [] | 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,504 | java |
org apach common math fraction
represent ration number overflow
immut
version revis date
big fraction bigfract number field element fieldel big fraction bigfract compar big fraction bigfract serializ
return code code
expon return result reduc form
param expon
expon code big fraction bigfract code rais
expon
pow expon
math pow numer doublevalu expon
math pow denomin doublevalu expon
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
bf7c8628caf14aa684f68cae1311bd4dc1f504b1 | 243eaf02e124f89a21c5d5afa707db40feda5144 | /src/unk/com/tencent/mm/model/ac.java | 4eae1ed3a52c14903e33fcd04813e9262cf9078f | [] | no_license | laohanmsa/WeChatRE | e6671221ac6237c6565bd1aae02f847718e4ac9d | 4b249bce4062e1f338f3e4bbee273b2a88814bf3 | refs/heads/master | 2020-05-03T08:43:38.647468 | 2013-05-18T14:04:23 | 2013-05-18T14:04:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 398 | java | package unk.com.tencent.mm.model;
import android.os.Message;
final class ac
implements Runnable
{
ac(ab paramab, ae paramae, Message paramMessage)
{
}
public final void run()
{
this.Ed.Ea.DZ.e(this.Eb.url, this.Ec.arg1);
}
}
/* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar
* Qualified Name: com.tencent.mm.model.ac
* JD-Core Version: 0.6.2
*/ | [
"danghvu@gmail.com"
] | danghvu@gmail.com |
0ba55211af47684cb1d629fefddfdadd7b6f2bcd | 511909dece65ca69e44d89e7cb30013afe599b71 | /es-project/src/main/java/com/soufang/esproject/config/RedisSessionConfig.java | 46aac7d5bd4dd507f6dd1e2688abd920ef083b05 | [] | no_license | liangxifeng833/java | b0b84eb7cb719ebf588e6856ab7d8441573213ae | fe9fe02a91671df789ad45664752ffa1f9da7821 | refs/heads/master | 2023-05-25T21:02:32.522297 | 2023-05-12T03:37:33 | 2023-05-12T03:37:33 | 253,181,449 | 0 | 0 | null | 2022-12-16T15:27:56 | 2020-04-05T07:44:02 | JavaScript | UTF-8 | Java | false | false | 764 | java | package com.soufang.esproject.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
/**
* session会话
* Created by 瓦力.
*/
//@Configuration
//@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 86400)
public class RedisSessionConfig {
@Bean
public RedisTemplate<String, String> redisTemplate(RedisConnectionFactory factory) {
return new StringRedisTemplate(factory);
}
}
| [
"liangxifeng833@163.com"
] | liangxifeng833@163.com |
8b6393e7b263c4773e25ce89bcb6550a560f1821 | 1f0ab0c54709bfd24d4c4d2aa5b82189ccb5d40d | /app/src/main/java/org/xiangbalao/selectname/ui/NameDetailActivity.java | 87c8f491dbc772c9b374b2e3d61f7f0b861c208c | [
"Apache-2.0"
] | permissive | superbase-zz/SelectName | 6722428d72da7b44d0672364bc330bd4771158aa | 290cd8560313c00084a83f71a74bb87d6e08c08c | refs/heads/master | 2021-06-11T22:55:35.319478 | 2017-02-08T15:40:06 | 2017-02-08T15:40:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,462 | java | package org.xiangbalao.selectname.ui;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import com.j256.ormlite.dao.Dao;
import org.xiangbalao.common.Constant;
import org.xiangbalao.common.db.DatabaseHelper;
import org.xiangbalao.common.toast.ToastUtils;
import org.xiangbalao.common.util.LogUtils;
import org.xiangbalao.selectname.R;
import org.xiangbalao.selectname.base.BaseActivity;
import org.xiangbalao.common.weight.NumberItem;
import org.xiangbalao.selectname.model.Number;
import org.xiangbalao.selectname.model.Word;
import java.sql.SQLException;
import java.util.List;
public class NameDetailActivity extends BaseActivity implements OnClickListener {
private TextView tvTextView;
private Dao<Number, String> numberDao;
private Dao<Word, String> wordDao;
private DatabaseHelper helper;
private String TAG = NameDetailActivity.class.getName();
private String name;
private NumberItem numberitem_1;
private NumberItem numberitem_2;
private NumberItem numberitem_3;
private NumberItem numberitem_4;
private NumberItem numberitem_5;
private String fristName;
private String secendName;
private String thirdName;
private int fristBihua;
private int secendBihua;
private int thirdBihua;
private TextView tv_name;
private ImageView btn_back;
@Override
protected void initData() {
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_name_detail);
helper = DatabaseHelper.getInstance(NameDetailActivity.this);
try {
numberDao = helper.getDao(Number.class);
wordDao = helper.getDao(Word.class);
} catch (SQLException e) {
e.printStackTrace();
}
initView();
name = getIntent().getStringExtra(Constant.NAMES);
tv_name.setText(name);
char[] names = name.toCharArray();
if (names != null && names.length >= 2) {
fristName = String.valueOf(names[0]);
secendName = String.valueOf(names[1]);
if (names.length > 2) {
thirdName = String.valueOf(names[2]);
}
}
try {
List<Word> wordList1 = wordDao.queryForEq("simplified", fristName);
List<Word> wordList2 = wordDao.queryForEq("simplified", secendName);
List<Word> wordList3 = wordDao.queryForEq("simplified", thirdName);
if (wordList1.size() > 0) {
fristBihua = wordList1.get(0).getNumber();
} else {
ToastUtils.e("暂无 " + fristName + " 数据").show();
LogUtils.i(NameDetailActivity.class.getSimpleName(), fristName);
}
if (wordList2.size() > 0) {
secendBihua = wordList2.get(0).getNumber();
} else {
LogUtils.i(NameDetailActivity.class.getSimpleName(), secendName);
ToastUtils.e("暂无 " + secendName + " 数据").show();
}
if (wordList3.size() > 0) {
thirdBihua = wordList3.get(0).getNumber();
} else {
LogUtils.i(NameDetailActivity.class.getSimpleName(), thirdName);
ToastUtils.e("暂无 " + thirdName + " 数据").show();
}
} catch (Exception e) {
e.printStackTrace();
ToastUtils.e(e.toString() + " " + name).show();
}
int number1 = fristBihua + secendBihua + thirdBihua;
int number2 = fristBihua + 1;
int number3 = thirdBihua + secendBihua;
int number4 = fristBihua + secendBihua;
int number5 = thirdBihua + 1;
try {
List<Number> numberList1 = numberDao.queryForEq("number", number1);
List<Number> numberList2 = numberDao.queryForEq("number", number2);
List<Number> numberList3 = numberDao.queryForEq("number", number3);
List<Number> numberList4 = numberDao.queryForEq("number", number4);
List<Number> numberList5 = numberDao.queryForEq("number", number5);
Number n1 = numberList1.get(0);
Number n2 = numberList2.get(0);
Number n3 = numberList3.get(0);
Number n4 = numberList4.get(0);
Number n5 = numberList5.get(0);
numberitem_1.setTitle("总格(" + number1 + ") " + n1.getJixiong());
numberitem_2.setTitle("天格(" + number2 + ") " + n2.getJixiong());
numberitem_3.setTitle("地格(" + number3 + ") " + n3.getJixiong());
numberitem_4.setTitle("人格(" + number4 + ") " + n4.getJixiong());
numberitem_5.setTitle("外格(" + number5 + ") " + n5.getJixiong());
numberitem_1.setDes(n1.getLishu_miaoshu());
numberitem_2.setDes(n2.getLishu_miaoshu());
numberitem_3.setDes(n3.getLishu_miaoshu());
numberitem_4.setDes(n4.getLishu_miaoshu());
numberitem_5.setDes(n5.getLishu_miaoshu());
} catch (SQLException e) {
e.printStackTrace();
}
LogUtils.i(TAG, name);
}
private void initView() {
tvTextView = (TextView) findViewById(R.id.tv);
tvTextView.setFocusable(true);
numberitem_1 = (NumberItem) findViewById(R.id.numberitem_1);
numberitem_1.setOnClickListener(this);
numberitem_2 = (NumberItem) findViewById(R.id.numberitem_2);
numberitem_2.setOnClickListener(this);
numberitem_3 = (NumberItem) findViewById(R.id.numberitem_3);
numberitem_3.setOnClickListener(this);
numberitem_4 = (NumberItem) findViewById(R.id.numberitem_4);
numberitem_4.setOnClickListener(this);
numberitem_5 = (NumberItem) findViewById(R.id.numberitem_5);
numberitem_5.setOnClickListener(this);
tv_name = (TextView) findViewById(R.id.tv_name);
tv_name.setOnClickListener(this);
btn_back = (ImageView) findViewById(R.id.btn_back);
btn_back.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_back:
onBackPressed();
break;
}
}
}
| [
"61852263@qq.com"
] | 61852263@qq.com |
c5be325c9d3e1d6482ffe2243c788de669d3f8e5 | 2f7b2b2eb9aa291769e8d86a5ce5dd7552f333e6 | /src/main/java/com/evasive/me/supernodes/config/TimerConfig.java | 33acb624f74871533c1377d9f654bccf79dab962 | [] | no_license | 3vasive/SuperNodes | 89f023c47996b20eb4447139af0e1d2eea5ee781 | c3ee61c4548549f953bd88a8fe2ebd67bd00c50e | refs/heads/master | 2023-04-06T01:21:18.035883 | 2021-04-22T18:16:15 | 2021-04-22T18:16:15 | 360,641,754 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,191 | java | package com.evasive.me.supernodes.config;
import com.evasive.me.supernodes.SuperNodes;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.io.IOException;
public class TimerConfig {
public SuperNodes plugin;
public TimerConfig(SuperNodes plugin) {
this.plugin = plugin;
}
private static File file;
private static FileConfiguration timerfile;
public static void setup() {
file = new File(Bukkit.getServer().getPluginManager().getPlugin("SuperNodes").getDataFolder(), "data/timerfile.yml");
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
}
}
timerfile = YamlConfiguration.loadConfiguration(file);
}
public static FileConfiguration get() {
return timerfile;
}
public static void save() {
try {
timerfile.save(file);
} catch (IOException e) {
}
}
public static void reload() {
timerfile = YamlConfiguration.loadConfiguration(file);
}
} | [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
5bc25abe957c6b73dc718145e83bad7dbe9f5117 | 7afb316837db86a84e56878c5561e2b82f693f84 | /MyAppProto/app/src/main/java/madbarsoft/com/myappproto/DetailsShowActivity.java | 8ea0897348e63df9711e98f4131a6246e4bd22d1 | [] | no_license | madbarsolutionsgthub/MyApplicationProtype | 3b8ec5fa713efd8b392ee44c88cc970dbec3e4b1 | f9728689e0d328f7b20fef2bda6a2fb38545515f | refs/heads/master | 2020-03-21T02:06:43.054562 | 2018-06-20T04:38:30 | 2018-06-20T04:38:30 | 137,980,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,406 | java | package madbarsoft.com.myappproto;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
public class DetailsShowActivity extends AppCompatActivity implements NextAndBackDetailsListenerInteF{
Button btnNext, btnBack;
int currentDataPosition = 0;
int startPoint = 0;
int categoryId = 0;
Person person = null;
List<QuestionAndAns> questionAndAnsList = new ArrayList<>();
QuestionAndAns questionAndAns;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_details_show);
Intent intent = getIntent();
startPoint = intent.getIntExtra("itemPosition",-1);
categoryId = intent.getIntExtra("categoryId",-1);
try {
generateQuestionAndAnswerData(categoryId);
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
questionAndAns = questionAndAnsList.get(startPoint);
/*
person = new Person();
person.setName(questionAndAns.getQst());
person.setAge(questionAndAns.getsNo());
person.setCity(questionAndAns.getAns());
Toast.makeText(this, "You Select: "+questionAndAns.getQst().toString(), Toast.LENGTH_SHORT).show();
*/
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
DetailsFragment detailsFragment = new DetailsFragment();
Bundle bundle = new Bundle();
bundle.putInt("currentDataPosition", startPoint);
bundle.putSerializable("questionAndAns", questionAndAns);
detailsFragment.setArguments(bundle);
fragmentTransaction.add(R.id.fragmentContainerId, detailsFragment);
// fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
}
@Override
public void nextData(QuestionAndAns questionAndAns, int currentDataPosition) {
// Toast.makeText(this, "Msg: You Click Next Button, Pos:"+currentDataPosition+"\n Person Name: "+person.getName(), Toast.LENGTH_SHORT).show();
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
DetailsFragment detailsFragment = new DetailsFragment();
Bundle bundle = new Bundle();
bundle.putInt("currentDataPosition", currentDataPosition);
bundle.putSerializable("questionAndAns", questionAndAns);
detailsFragment.setArguments(bundle);
fragmentTransaction.replace(R.id.fragmentContainerId, detailsFragment);
fragmentTransaction.commit();
}
@Override
public void backData(QuestionAndAns questionAndAns, int currentDataPosition) {
// Toast.makeText(this, "Msg: You Click Back Button, Pos:"+currentDataPosition+"\n Person Name: "+person.getName(), Toast.LENGTH_SHORT).show();
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
DetailsFragment detailsFragment = new DetailsFragment();
Bundle bundle = new Bundle();
bundle.putInt("currentDataPosition", currentDataPosition);
bundle.putSerializable("questionAndAns", questionAndAns);
detailsFragment.setArguments(bundle);
fragmentTransaction.replace(R.id.fragmentContainerId, detailsFragment);
fragmentTransaction.commit();
}
public void generateQuestionAndAnswerData(int categoryId) throws IOException, JSONException {
String json;
InputStream inputStream=null;
if(categoryId==77){
inputStream = getResources().openRawResource(R.raw.file_networking);
}else if(categoryId==22){
inputStream = getResources().openRawResource(R.raw.file_operatingsystem);
}else if(categoryId==10){
inputStream = getResources().openRawResource(R.raw.computer_bangladesh);
}else{
inputStream = getResources().openRawResource(R.raw.question_answer_empty_data);
}
int size = inputStream.available();
byte[] buffer = new byte[size];
inputStream.read(buffer);
inputStream.close();
json = new String(buffer, "UTF-8");
JSONArray jsonArray=new JSONArray(json);
for(int i=0; i<jsonArray.length(); i++){
JSONObject obj = jsonArray.getJSONObject(i);
// personList.add(new Person(obj.getString("qst"),Integer.parseInt(obj.getString("sNo")), obj.getString("ans")));
questionAndAnsList.add(new QuestionAndAns(Integer.parseInt(obj.getString("sNo")), Integer.parseInt(obj.getString("categoryId")), obj.getString("qst").toString(), obj.getString("ans").toString()));
}
// Toast.makeText(this, "Data: "+dataList.toString(), Toast.LENGTH_SHORT).show();
}
}
| [
"imranmadbar@gmail.com"
] | imranmadbar@gmail.com |
ab10d9b2a97a8cd566b6fd3f2527a6ffee03365d | 5067d13ba6abc9aea2a03927b9f7468e73095273 | /src/com/dcms/cms/action/front/SearchAct.java | db734dbacfd6fcf6676f493774440e5007df9ebb | [] | no_license | dailinyi/dcmsv5-postgreSQL | ced164536a7c0fe99c53446f1d499de3bff8f3a4 | 09985b1519533090f4d67dd1ee410a37242d93b4 | refs/heads/master | 2021-01-01T05:51:51.135571 | 2015-02-02T15:18:11 | 2015-02-02T15:18:11 | 30,084,495 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,471 | java | package com.dcms.cms.action.front;
import static com.dcms.cms.Constants.TPLDIR_SPECIAL;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.dcms.cms.entity.main.CmsSite;
import com.dcms.cms.web.CmsUtils;
import com.dcms.cms.web.FrontUtils;
import com.dcms.common.web.RequestUtils;
@Controller
public class SearchAct {
public static final String SEARCH_INPUT = "tpl.searchInput";
public static final String SEARCH_RESULT = "tpl.searchResult";
public static final String SEARCH_ERROR = "tpl.searchError";
public static final String SEARCH_JOB = "tpl.searchJob";
@RequestMapping(value = "/search*.jspx", method = RequestMethod.GET)
public String index(HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
CmsSite site = CmsUtils.getSite(request);
// 将request中所有参数保存至model中。
model.putAll(RequestUtils.getQueryParams(request));
FrontUtils.frontData(request, model, site);
FrontUtils.frontPageData(request, model);
String q = RequestUtils.getQueryParam(request, "q");
String parseQ=parseKeywords(q);
model.addAttribute("input",q);
model.addAttribute("q",parseQ);
String channelId = RequestUtils.getQueryParam(request, "channelId");
if (StringUtils.isBlank(q) && StringUtils.isBlank(channelId)) {
return FrontUtils.getTplPath(request, site.getSolutionPath(),
TPLDIR_SPECIAL, SEARCH_INPUT);
} else {
return FrontUtils.getTplPath(request, site.getSolutionPath(),
TPLDIR_SPECIAL, SEARCH_RESULT);
}
}
@RequestMapping(value = "/searchJob*.jspx", method = RequestMethod.GET)
public String searchJob(HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
CmsSite site = CmsUtils.getSite(request);
String q = RequestUtils.getQueryParam(request, "q");
String category = RequestUtils.getQueryParam(request, "category");
String workplace = RequestUtils.getQueryParam(request, "workplace");
model.putAll(RequestUtils.getQueryParams(request));
FrontUtils.frontData(request, model, site);
FrontUtils.frontPageData(request, model);
//处理lucene查询字符串中的关键字
String parseQ=parseKeywords(q);
model.addAttribute("input",q);
model.addAttribute("q",parseQ);
model.addAttribute("queryCategory",category);
model.addAttribute("queryWorkplace",workplace);
if (StringUtils.isBlank(q)) {
model.remove("q");
}
return FrontUtils.getTplPath(request, site.getSolutionPath(),
TPLDIR_SPECIAL, SEARCH_JOB);
}
public static String parseKeywords(String q){
char c='\\';
int cIndex=q.indexOf(c);
if(cIndex!=-1&&cIndex==0){
q=q.substring(1);
}
if(cIndex!=-1&&cIndex==q.length()-1){
q=q.substring(0,q.length()-1);
}
try {
String regular = "[\\+\\-\\&\\|\\!\\(\\)\\{\\}\\[\\]\\^\\~\\*\\?\\:\\\\]";
Pattern p = Pattern.compile(regular);
Matcher m = p.matcher(q);
String src = null;
while (m.find()) {
src = m.group();
q = q.replaceAll("\\" + src, ("\\\\" + src));
}
q = q.replaceAll("AND", "and").replaceAll("OR", "or").replace("NOT", "not");
} catch (Exception e) {
q=q;
}
return q;
}
}
| [
"dailinyi@rd.tuan800.com"
] | dailinyi@rd.tuan800.com |
b3a53e55103f8e6b86d902895cab14e93dc36115 | 31e198531cad335afd17b661f28e8c5e336edd66 | /src/com/kingdee/eas/custom/bill/app/TtaskListListUIHandler.java | d3b4728f4d349ca3df72c6dd5b21565ad9552723 | [] | no_license | javaobjects/Project_0 | 2e17e4e400447b97a6a5f902fdaa9219c94ed66e | 7009cce7d249051eb2c05219dca27de3adf1f48f | refs/heads/master | 2020-09-29T14:47:48.373140 | 2020-01-15T09:13:49 | 2020-01-15T09:13:49 | 227,056,515 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | /**
* output package name
*/
package com.kingdee.eas.custom.bill.app;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.eas.framework.batchHandler.ResponseContext;
/**
* output class name
*/
public class TtaskListListUIHandler extends AbstractTtaskListListUIHandler
{
protected void _handleInit(RequestContext request,ResponseContext response, Context context) throws Exception {
super._handleInit(request,response,context);
}
} | [
"yanbo0039@yeah.net"
] | yanbo0039@yeah.net |
bbbebade18aa0d5c56968ea26471c7c957b4035e | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a286/A286939.java | 80952eefd7ffdf356fa2d45d561d6f2e8a033be0 | [] | 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 | 438 | java | package irvine.oeis.a286;
// Generated by gen_seq4.pl morfix 00 00->001, 1->000 at 2019-07-19 19:57
// DO NOT EDIT here!
import irvine.oeis.MorphismSequence;
/**
* A286939 Fixed point of the mapping <code>00->001, 1->000</code>, starting with 00.
* @author Georg Fischer
*/
public class A286939 extends MorphismSequence {
/** Construct the sequence. */
public A286939() {
super(1, "00", "", "00->001, 1->000");
}
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
0efa9fbca1704e0ef0b4185a07d9d17ce607f70a | fe06f97c2cf33a8b4acb7cb324b79a6cb6bb9dac | /java/dao/impl/EHU_SACT/Mview$AdvExceptionsDAOImpl.java | 5758067e84c1bdd66dac2f622804151490e19bc8 | [] | no_license | HeimlichLin/TableSchema | 3f67dae0b5b169ee3a1b34837ea9a2d34265f175 | 64b66a2968c3a169b75d70d9e5cf75fa3bb65354 | refs/heads/master | 2023-02-11T09:42:47.210289 | 2023-02-01T02:58:44 | 2023-02-01T02:58:44 | 196,526,843 | 0 | 0 | null | 2022-06-29T18:53:55 | 2019-07-12T07:03:58 | Java | UTF-8 | Java | false | false | 2,497 | java | package com.doc.common.dao.impl;
public class Mview$AdvExceptionsDAOImpl extends GeneralDAOImpl<Mview$AdvExceptionsPo> implements IMview$AdvExceptionsDAO {
public static final Mview$AdvExceptionsDAOImpl INSTANCE = new Mview$AdvExceptionsDAOImpl();
public static final String TABLENAME = "MVIEW$_ADV_EXCEPTIONS";
public Mview$AdvExceptionsDAOImpl() {
super(TABLENAME);
}
protected static final MapConverter<Mview$AdvExceptionsPo> CONVERTER = new MapConverter<Mview$AdvExceptionsPo>() {
@Override
public Mview$AdvExceptionsPo convert(final DataObject dataObject) {
final Mview$AdvExceptionsPo mview$AdvExceptionsPo = new Mview$AdvExceptionsPo();
mview$AdvExceptionsPo.setRunid#(BigDecimalUtils.formObj(dataObject.getValue(Mview$AdvExceptionsPo.COLUMNS.RUNID#.name())));
mview$AdvExceptionsPo.setOwner(dataObject.getString(Mview$AdvExceptionsPo.COLUMNS.OWNER.name()));
mview$AdvExceptionsPo.setTableName(dataObject.getString(Mview$AdvExceptionsPo.COLUMNS.TABLE_NAME.name()));
mview$AdvExceptionsPo.setDimensionName(dataObject.getString(Mview$AdvExceptionsPo.COLUMNS.DIMENSION_NAME.name()));
mview$AdvExceptionsPo.setRelationship(dataObject.getString(Mview$AdvExceptionsPo.COLUMNS.RELATIONSHIP.name()));
mview$AdvExceptionsPo.setBadRowid();
return mview$AdvExceptionsPo;
}
@Override
public DataObject toDataObject(final Mview$AdvExceptionsPo mview$AdvExceptionsPo) {
final DataObject dataObject = new DataObject();
dataObject.setValue(Mview$AdvExceptionsPo.COLUMNS.RUNID#.name(), mview$AdvExceptionsPo.getRunid#());
dataObject.setValue(Mview$AdvExceptionsPo.COLUMNS.OWNER.name(), mview$AdvExceptionsPo.getOwner());
dataObject.setValue(Mview$AdvExceptionsPo.COLUMNS.TABLE_NAME.name(), mview$AdvExceptionsPo.getTableName());
dataObject.setValue(Mview$AdvExceptionsPo.COLUMNS.DIMENSION_NAME.name(), mview$AdvExceptionsPo.getDimensionName());
dataObject.setValue(Mview$AdvExceptionsPo.COLUMNS.RELATIONSHIP.name(), mview$AdvExceptionsPo.getRelationship());
dataObject.setValue(Mview$AdvExceptionsPo.COLUMNS.BAD_ROWID.name(), mview$AdvExceptionsPo.getBadRowid());
return dataObject;
}
};
public MapConverter<Mview$AdvExceptionsPo> getConverter() {
return CONVERTER;
}
@Override
public SqlWhere getPkSqlWhere(Mview$AdvExceptionsPo po) {
SqlWhere sqlWhere = new SqlWhere();
sqlWhere.add(Mview$AdvExceptionsPo.COLUMNS.RUNID#.name(), po.getRunid#());
return sqlWhere;
}
}
| [
"jerry.l@acer.com"
] | jerry.l@acer.com |
8fbc39e2f3c869bdf88b2204927b7305bde9fda8 | b0b7f0e90f1f1508fe04eac9141429ad869b9653 | /src/google/Q63.java | 93b0dfdc1c46ba64ae16f121a1be3d5713c647d4 | [] | no_license | Hennessyan/leetcode | a4652db02fee4231746f358a92b5c452eb2dc2ab | 00b1c0a4a5b9c25a01585e3bc4aacef294b3b95b | refs/heads/master | 2022-02-06T20:16:41.012056 | 2022-01-29T01:02:10 | 2022-01-29T01:02:10 | 215,460,839 | 0 | 0 | null | 2022-01-29T01:02:11 | 2019-10-16T05:01:41 | Java | UTF-8 | Java | false | false | 895 | java | package google;
// Unique Paths II
public class Q63 {
public static void main(String[] args) {
Q63 q = new Q63();
int[][] obs = {{0, 0, 0},
{0, 1, 0},
{0, 0, 0}};
System.out.println(q.uniquePathsWithObstacles(obs));
}
// O(m*n) O(min(m,n))
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
if (obstacleGrid == null || obstacleGrid.length == 0) {
return 0;
}
int m = obstacleGrid.length, n = obstacleGrid[0].length;
int[] dp = new int[n];
dp[0] = 1;
for (int[] row : obstacleGrid) {
for (int i = 0; i < row.length; i++) {
if (row[i] == 1) {
dp[i] = 0;
} else if (i > 0) {
dp[i] += dp[i - 1];
}
}
}
return dp[n - 1];
}
}
| [
"llu17@binghamton.edu"
] | llu17@binghamton.edu |
4c175ed239207c3e24eb9bd6bf318f7ca7e84815 | 5b5f90c99f66587cea981a640063a54b6ea75185 | /src/main/java/com/coxandkings/travel/operations/utils/DateTimeUtil.java | 432eb52b52d269ecf5f4501f45e9a394024fbd9f | [] | no_license | suyash-capiot/operations | 02558d5f4c72a895d4a7e7e743495a118b953e97 | b6ad01cbdd60190e3be1f2a12d94258091fec934 | refs/heads/master | 2020-04-02T06:22:30.589898 | 2018-10-26T12:11:11 | 2018-10-26T12:11:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,298 | java | package com.coxandkings.travel.operations.utils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
public class DateTimeUtil {
private static Logger log = LogManager.getLogger(DateTimeUtil.class);
public static String formatBEDateTime( String aBEDateTime ) throws ParseException {
if( aBEDateTime == null || aBEDateTime.trim().length() == 0 ) {
return null;
}
String opsDateTime = null;
String beDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z['z']'";
String opsDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
SimpleDateFormat formatter = new SimpleDateFormat( beDateFormat );
SimpleDateFormat opsFormatter = new SimpleDateFormat( opsDateFormat );
java.util.Date aDate = formatter.parse( aBEDateTime );
opsDateTime = opsFormatter.format( aDate );
return opsDateTime;
}
public static ZonedDateTime formatBEDateTimeZone(String aBEDateTime ) {
if( aBEDateTime == null || aBEDateTime.trim().length() == 0 ) {
return null;
}
ZonedDateTime zonedDateTime = null;
String opsDateTime = null;
String beDateFormats[] = {"yyyy-MM-dd'T'HH:mm:ss.SSSz", "yyyy-MM-dd'T'HH:mm:ss'Z['z']'",
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z['z']'", "yyyy-MM-dd", "yyyy-MM-dd'T'HH:mm:ss.SSSX'['z']'",
"yyyy-MM-dd'T'HH:mm:ss.SSSX'['zzzz']'", "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "yyyy-MM-dd'T'HH:mm:ssXXX"};
java.util.Date aDate = null;
try {
aDate = DateUtils.parseDate(aBEDateTime, beDateFormats);
} catch (Exception e) {
try {
zonedDateTime = ZonedDateTime.parse(
aBEDateTime, DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(ZoneId.systemDefault()));
return zonedDateTime;
}catch(Exception x){
log.error("Unable to parse date from Booking Engine");
Calendar rightNow = Calendar.getInstance();
rightNow.add(Calendar.DAY_OF_MONTH, 1 );
aDate = rightNow.getTime();
}
}
// DateFormat originalFormat = new SimpleDateFormat("MMMM dd, yyyy", Locale.ENGLISH);
// DateFormat targetFormat = new SimpleDateFormat("yyyyMMdd");
// Date date = originalFormat.parse("August 21, 2012");
// String formattedDate = targetFormat.format(date);
//
// SimpleDateFormat formatter = new SimpleDateFormat( beDateFormat );
// SimpleDateFormat opsFormatter = new SimpleDateFormat( opsDateFormat );
// java.util.Date aDate = formatter.parse( aBEDateTime );
zonedDateTime = ZonedDateTime.ofInstant(aDate.toInstant(),
ZoneId.systemDefault());
return zonedDateTime;
}
public static void main( String[] args ) throws ParseException {
System.out.println( DateTimeUtil.formatBEDateTime( "2018-03-07T11:50:09.017Z[UTC]" ) );
}
}
| [
"sahil@capiot.com"
] | sahil@capiot.com |
e3e324558fc90ebb25f8805fbd0d1870c7d25c11 | 719786b440bda077e4105a1c14a51a2751bca45d | /src/main/java/com.javarush.glushko/level30/lesson06/home01/BinaryRepresentationTask.java | 9c67cfcc4bbb6f6f7acd9210403a00eb371ef330 | [] | no_license | dase1243/JavaRush | e486e6b135d0ac2ccc615c9b475290fad3bd7f9e | 48553f8e5c7c34b9a568c99ae6b14c1358d5858e | refs/heads/master | 2021-10-11T11:29:35.327809 | 2019-01-25T09:09:30 | 2019-01-25T09:09:30 | 74,195,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 668 | java | package com.javarush.glushko.level30.lesson06.home01;
import java.util.concurrent.RecursiveTask;
/**
* Created by dreikaa on 03.01.2016.
*/
public class BinaryRepresentationTask extends RecursiveTask<String> {
private int number;
public BinaryRepresentationTask(int i) {
this.number = i;
}
@Override
protected String compute() {
int a = number % 2;
int b = number / 2;
String result = String.valueOf(a);
if (b > 0) {
BinaryRepresentationTask task = new BinaryRepresentationTask(b);
task.fork();
return task.join() + result;
}
return result;
}
}
| [
"dreiglushko@gmail.com"
] | dreiglushko@gmail.com |
47ac6ceb3999b838e12bc4ce4fd2fd6b5ba893b3 | 4b560934b647d52f4e0f7c4bd0e388500ca801a8 | /src/main/java/com/ivoronline/springboot_serialize_xml_annotations_properties/SpringbootSerializeXmlAnnotationsPropertiesApplication.java | 72152f6b4118742c1f880e788b62a854153b5c9b | [] | no_license | ivoronline/springboot_serialize_xml_annotations_properties | 727e66d05b2aca432ecaf4729a14ded41cba92a7 | 3b9e86e09d2d7db7868ba44054b5cbad2f31402d | refs/heads/master | 2023-05-29T20:32:58.810859 | 2021-06-07T10:26:49 | 2021-06-07T10:26:49 | 374,624,672 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 433 | java | package com.ivoronline.springboot_serialize_xml_annotations_properties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringbootSerializeXmlAnnotationsPropertiesApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootSerializeXmlAnnotationsPropertiesApplication.class, args);
}
}
| [
"ivoronline@gmail.com"
] | ivoronline@gmail.com |
3903c32134490dc659ae492b39d6ef210d1b96ee | 22b1fe6a0af8ab3c662551185967bf2a6034a5d2 | /experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/Class_342.java | 84ee0788e31355ac40a8971653609a747dcae5cf | [
"Apache-2.0"
] | permissive | lesaint/experimenting-annotation-processing | b64ed2182570007cb65e9b62bb2b1b3f69d168d6 | 1e9692ceb0d3d2cda709e06ccc13290262f51b39 | refs/heads/master | 2021-01-23T11:20:19.836331 | 2014-11-13T10:37:14 | 2014-11-13T10:37:14 | 26,336,984 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 145 | java | package fr.javatronic.blog.massive.annotation1;
import fr.javatronic.blog.processor.Annotation_001;
@Annotation_001
public class Class_342 {
}
| [
"sebastien.lesaint@gmail.com"
] | sebastien.lesaint@gmail.com |
1c242e1b15bbc83b484aeb5aba1323d31ed32e63 | b1f51f8ba05ad83ecfbd80e6e7f140e70850bf01 | /ACE_ERP/WebContent/Payroll/java/p050001_t2.java | 6ab3e59d260c35f786dd3aed130fc3a3e78abd64 | [] | no_license | hyundaimovex-asanwas/asanwas-homepage | 27e0ba1ed7b41313069e732f3dc9df20053caddd | 75e30546f11258d8b70159cfbe8ee36b18371bd0 | refs/heads/master | 2023-06-07T03:41:10.170367 | 2021-07-01T10:23:54 | 2021-07-01T10:23:54 | 376,739,168 | 1 | 1 | null | null | null | null | UHC | Java | false | false | 4,757 | java | package Payroll;
import com.gauce.*;
import com.gauce.io.*;
import com.gauce.common.*;
import com.gauce.log.*;
import com.gauce.db.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class p050001_t2 extends HttpServlet{
public void doPost(HttpServletRequest req,HttpServletResponse res) {
ServiceLoader loader = null;
GauceService service = null;
GauceContext context = null;
Logger logger = null;
GauceDBConnection conn = null;
try{
loader = new ServiceLoader(req, res);
service = loader.newService();
context = service.getContext();
logger = context.getLogger();
GauceRequest reqGauce = null;
GauceResponse resGauce = null;
try {
conn = service.getDBConnection();
reqGauce = service.getGauceRequest();
resGauce = service.getGauceResponse();
GauceDataSet userSet = reqGauce.getGauceDataSet("USER");
int idxSTDYM = userSet.indexOfColumn("STDYM");
int idxGRDCD = userSet.indexOfColumn("GRDCD");
int idxLOWAMT = userSet.indexOfColumn("LOWAMT");
int idxHIGAMT = userSet.indexOfColumn("HIGAMT");
int idxSTDAMT = userSet.indexOfColumn("STDAMT");
int idxINSAMT1 = userSet.indexOfColumn("INSAMT1");
int idxINSAMT2 = userSet.indexOfColumn("INSAMT2");
int idxINSSUM = userSet.indexOfColumn("INSSUM");
GauceDataRow[] rows = userSet.getDataRows();
/*Statement stmt2 = conn.createStatement();
String sql2 = " SELECT MAX(ZIPSEQ) + 1 ZIPSEQ FROM PAYROLL.HCPOSTNO ";
ResultSet rs2 = stmt2.executeQuery(sql2);
int dbl_zipseq = 0;
if(rs2.next()){
dbl_zipseq = rs2.getInt(1);
}*/
StringBuffer InsertSql = null;
StringBuffer UpdateSql = null;
StringBuffer DeleteSql = null;
for (int j = 0; j < rows.length; j++){
if(rows[j].getJobType() == GauceDataRow.TB_JOB_INSERT) {
InsertSql = new StringBuffer();
InsertSql.append( "INSERT INTO PAYROLL.PWPENTBL ( " );
InsertSql.append( "STDYM,GRDCD,LOWAMT,HIGAMT,STDAMT,INSAMT1,INSAMT2,INSSUM " );
InsertSql.append( ") VALUES( " );
InsertSql.append( " ?, ?, ?, ?, ?, ?, ?, ?) " );
GauceStatement gsmt = conn.getGauceStatement(InsertSql.toString());
gsmt.setGauceDataRow(rows[j]);
gsmt.bindColumn(1, idxSTDYM);
gsmt.bindColumn(2, idxGRDCD);
gsmt.bindColumn(3, idxLOWAMT);
gsmt.bindColumn(4, idxHIGAMT);
gsmt.bindColumn(5, idxSTDAMT);
gsmt.bindColumn(6, idxINSAMT1);
gsmt.bindColumn(7, idxINSAMT2);
gsmt.bindColumn(8, idxINSSUM);
gsmt.executeUpdate();
gsmt.close();
InsertSql=null;
}
if(rows[j].getJobType() == GauceDataRow.TB_JOB_UPDATE) {
UpdateSql = new StringBuffer();
UpdateSql.append( "UPDATE PAYROLL.PWPENTBL SET " );
UpdateSql.append( " LOWAMT = ?, " );
UpdateSql.append( " HIGAMT = ?, " );
UpdateSql.append( " STDAMT = ?, " );
UpdateSql.append( " INSAMT1 = ?, " );
UpdateSql.append( " INSAMT2 = ?, " );
UpdateSql.append( " INSSUM = ? " );
UpdateSql.append( " WHERE STDYM = ? " );
UpdateSql.append( " AND GRDCD = ? " );
GauceStatement gsmt = conn.getGauceStatement(UpdateSql.toString());
logger.dbg.println(this,UpdateSql.toString());
gsmt.setGauceDataRow(rows[j]);
gsmt.bindColumn(1, idxLOWAMT);
gsmt.bindColumn(2, idxHIGAMT);
gsmt.bindColumn(3, idxSTDAMT);
gsmt.bindColumn(4, idxINSAMT1);
gsmt.bindColumn(5, idxINSAMT2);
gsmt.bindColumn(6, idxINSSUM);
gsmt.bindColumn(7, idxSTDYM);
gsmt.bindColumn(8, idxGRDCD);
gsmt.executeUpdate();
gsmt.close();
UpdateSql=null;
}
if(rows[j].getJobType() == GauceDataRow.TB_JOB_DELETE ) {
DeleteSql = new StringBuffer();
DeleteSql.append( "DELETE FROM PAYROLL.PWPENTBL WHERE STDYM = ? AND GRDCD = ? " );
logger.dbg.println(this,"DeleteSql :"+ DeleteSql.toString());
GauceStatement gsmt = conn.getGauceStatement(DeleteSql.toString());
logger.dbg.println(this,DeleteSql.toString());
gsmt.setGauceDataRow(rows[j]);
gsmt.bindColumn(1, idxSTDYM);
gsmt.bindColumn(2, idxGRDCD);
gsmt.executeUpdate();
gsmt.close();
DeleteSql=null;
}
}
}
catch(Exception e){
resGauce.writeException("Native","1111","저장시 알수없는 에러발생!!(Error Code :"+e.toString()+")");
}
resGauce.flush();
resGauce.commit();
resGauce.close();
}
catch (Exception e) {
logger.err.println(this,e);
logger.dbg.println(this,e.toString());
}
finally {
if (conn != null) { try { conn.close(true); } catch (Exception e) {}}
loader.restoreService(service);
}
}
} | [
"86274611+evnmoon@users.noreply.github.com"
] | 86274611+evnmoon@users.noreply.github.com |
a6aa6fbd14a2f954dd928225f58a7390562e7553 | 6240a87133481874e293b36a93fdb64ca1f2106c | /taobao/src/com/taobao/api/response/SimbaAdgroupDeleteResponse.java | 27312442ce4ee944e77d15d8b39a5e56a8a79315 | [] | no_license | mrzeng/comments-monitor | 596ba8822d70f8debb630f40b548f62d0ad48bd4 | 1451ec9c14829c7dc29a2297a6f3d6c4e490dc13 | refs/heads/master | 2021-01-15T08:58:05.997787 | 2013-07-17T16:29:23 | 2013-07-17T16:29:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 651 | java | package com.taobao.api.response;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.domain.ADGroup;
import com.taobao.api.TaobaoResponse;
/**
* TOP API: taobao.simba.adgroup.delete response.
*
* @author auto create
* @since 1.0, null
*/
public class SimbaAdgroupDeleteResponse extends TaobaoResponse {
private static final long serialVersionUID = 8345268713165827863L;
/**
* 被删除的推广组
*/
@ApiField("adgroup")
private ADGroup adgroup;
public void setAdgroup(ADGroup adgroup) {
this.adgroup = adgroup;
}
public ADGroup getAdgroup( ) {
return this.adgroup;
}
}
| [
"qujian@gionee.com"
] | qujian@gionee.com |
1c7384d540e038a90e38d9f1ad77556677eb4d02 | c612f9fd2fba45dfeaf2cb27884b30f520287f77 | /chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIncognitoManager.java | 46dd2b9ed6d42b9a72bb268a68a55d0215530975 | [
"BSD-3-Clause"
] | permissive | Turno/chromium | c498ab6d3c058d737b17439029989f69f58fe9c7 | 4e5eb9aba6c91df5e965f3eecd76c3ae17b0b216 | refs/heads/master | 2022-12-07T22:58:55.989642 | 2020-08-10T12:03:21 | 2020-08-10T12:03:21 | 286,471,394 | 1 | 0 | BSD-3-Clause | 2020-08-10T12:39:55 | 2020-08-10T12:39:54 | null | UTF-8 | Java | false | false | 4,550 | java | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.customtabs;
import android.view.WindowManager;
import androidx.annotation.Nullable;
import org.chromium.base.CommandLine;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.browserservices.BrowserServicesIntentDataProvider;
import org.chromium.chrome.browser.customtabs.content.CustomTabActivityNavigationController;
import org.chromium.chrome.browser.customtabs.content.CustomTabActivityTabProvider;
import org.chromium.chrome.browser.dependency_injection.ActivityScope;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.browser.incognito.IncognitoTabHost;
import org.chromium.chrome.browser.incognito.IncognitoTabHostRegistry;
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
import org.chromium.chrome.browser.lifecycle.Destroyable;
import org.chromium.chrome.browser.lifecycle.NativeInitObserver;
import org.chromium.chrome.browser.profiles.OTRProfileID;
import org.chromium.chrome.browser.profiles.Profile;
import javax.inject.Inject;
/**
* Implements incognito tab host for the given instance of Custom Tab activity.
* This class exists for every custom tab, but its only active if
* |isEnabledIncognitoCCT| returns true.
*/
@ActivityScope
public class CustomTabIncognitoManager implements NativeInitObserver, Destroyable {
private static final String TAG = "CctIncognito";
private final ChromeActivity<?> mChromeActivity;
private final CustomTabActivityNavigationController mNavigationController;
private final BrowserServicesIntentDataProvider mIntentDataProvider;
private final CustomTabActivityTabProvider mTabProvider;
private OTRProfileID mOTRProfileID;
@Nullable
private IncognitoTabHost mIncognitoTabHost;
@Inject
public CustomTabIncognitoManager(ChromeActivity<?> customTabActivity,
BrowserServicesIntentDataProvider intentDataProvider,
CustomTabActivityNavigationController navigationController,
CustomTabActivityTabProvider tabProvider,
ActivityLifecycleDispatcher lifecycleDispatcher) {
mChromeActivity = customTabActivity;
mIntentDataProvider = intentDataProvider;
mNavigationController = navigationController;
mTabProvider = tabProvider;
lifecycleDispatcher.register(this);
}
public boolean isEnabledIncognitoCCT() {
return mIntentDataProvider.isIncognito()
&& ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_INCOGNITO);
}
public Profile getProfile() {
if (mOTRProfileID == null) mOTRProfileID = OTRProfileID.createUnique("CCT:Incognito");
return Profile.getLastUsedRegularProfile().getOffTheRecordProfile(mOTRProfileID);
}
@Override
public void onFinishNativeInitialization() {
if (isEnabledIncognitoCCT()) {
initializeIncognito();
}
}
@Override
public void destroy() {
if (mIncognitoTabHost != null) {
IncognitoTabHostRegistry.getInstance().unregister(mIncognitoTabHost);
}
if (mOTRProfileID != null) {
Profile.getLastUsedRegularProfile()
.getOffTheRecordProfile(mOTRProfileID)
.destroyWhenAppropriate();
mOTRProfileID = null;
}
}
private void initializeIncognito() {
mIncognitoTabHost = new IncognitoCustomTabHost();
IncognitoTabHostRegistry.getInstance().register(mIncognitoTabHost);
if (!CommandLine.getInstance().hasSwitch(
ChromeSwitches.ENABLE_INCOGNITO_SNAPSHOTS_IN_ANDROID_RECENTS)) {
// Disable taking screenshots and seeing snapshots in recents.
mChromeActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
}
}
private class IncognitoCustomTabHost implements IncognitoTabHost {
public IncognitoCustomTabHost() {
assert mIntentDataProvider.isIncognito();
}
@Override
public boolean hasIncognitoTabs() {
return !mChromeActivity.isFinishing();
}
@Override
public void closeAllIncognitoTabs() {
mNavigationController.finish(CustomTabActivityNavigationController.FinishReason.OTHER);
}
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
1316828055c805c67bca4eac11c85ea76a2a77d8 | 1a32d704493deb99d3040646afbd0f6568d2c8e7 | /BOOT-INF/lib/org/springframework/context/annotation/EnableMBeanExport.java | 1939d30292ddd54846d01314ebdc9f492a70390f | [] | no_license | yanrumei/bullet-zone-server-2.0 | e748ff40f601792405143ec21d3f77aa4d34ce69 | 474c4d1a8172a114986d16e00f5752dc019cdcd2 | refs/heads/master | 2020-05-19T11:16:31.172482 | 2019-03-25T17:38:31 | 2019-03-25T17:38:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 906 | java | package org.springframework.context.annotation;
import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.jmx.support.RegistrationPolicy;
@Target({java.lang.annotation.ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import({MBeanExportConfiguration.class})
public @interface EnableMBeanExport
{
String defaultDomain() default "";
String server() default "";
RegistrationPolicy registration() default RegistrationPolicy.FAIL_ON_EXISTING;
}
/* Location: C:\Users\ikatwal\Downloads\bullet-zone-server-2.0.jar!\BOOT-INF\lib\spring-context-4.3.14.RELEASE.jar!\org\springframework\context\annotation\EnableMBeanExport.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"ishankatwal@gmail.com"
] | ishankatwal@gmail.com |
657eb67fcaee89830de9766008a0e362bd685e53 | 76852b1b29410436817bafa34c6dedaedd0786cd | /sources-2020-07-19-tempmail/sources/com/google/android/gms/internal/ads/zzcas.java | 95efb7ab36a0ef96a8fe088740060a7f137e9152 | [] | no_license | zteeed/tempmail-apks | 040e64e07beadd8f5e48cd7bea8b47233e99611c | 19f8da1993c2f783b8847234afb52d94b9d1aa4c | refs/heads/master | 2023-01-09T06:43:40.830942 | 2020-11-04T18:55:05 | 2020-11-04T18:55:05 | 310,075,224 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | package com.google.android.gms.internal.ads;
import android.content.Context;
/* compiled from: com.google.android.gms:play-services-ads@@19.2.0 */
public final class zzcas implements zzbyd {
/* renamed from: a reason: collision with root package name */
private final zzbtf f6757a;
public zzcas(zzbtf zzbtf) {
this.f6757a = zzbtf;
}
public final void a() {
this.f6757a.F0((Context) null);
}
public final void b() {
}
}
| [
"zteeed@minet.net"
] | zteeed@minet.net |
f673aa11e7440a23ebb5efc2e72e25da96afbaee | 13f6652c77abd41d4bc944887e4b94d8dff40dde | /archstudio/src/edu/uci/ics/bna/NoThingPeer.java | a72b4899b1510b755fa495e357e0cae903b77826 | [] | no_license | isr-uci-edu/ArchStudio3 | 5bed3be243981d944577787f3a47c7a94c8adbd3 | b8aeb7286ea00d4b6c6a229c83b0ee0d1c9b2960 | refs/heads/master | 2021-01-10T21:01:43.330204 | 2014-05-31T16:15:53 | 2014-05-31T16:15:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 557 | java | package edu.uci.ics.bna;
import java.awt.*;
public class NoThingPeer extends ThingPeer{
public NoThingPeer(BNAComponent c, Thing t){
super(c, t);
if(!(t instanceof NoThing)){
throw new IllegalArgumentException("NoThingPeer can only peer for NoThing");
}
}
public void draw(Graphics2D g, CoordinateMapper cm){}
public boolean isInThing(Graphics2D g, CoordinateMapper cm, int worldX, int worldY){
return false;
}
public Rectangle getLocalBoundingBox(Graphics2D g, CoordinateMapper cm){
return BNAUtils.NONEXISTENT_RECTANGLE;
}
}
| [
"sahendrickson@gmail.com"
] | sahendrickson@gmail.com |
7daa157f1e31259fcf0d47ec66171de78e31307c | bbf3b869e58d41be55b6a9ff353fe44b24462dc1 | /app/src/main/java/com/medicinedot/www/medicinedot/wxapi/WXPayEntryActivity.java | 739db472ca0c00bcea7e85e3edb09c0dff346f12 | [] | no_license | 15010487565/drugroom1 | 95f5918ed0b941c3b29d6ef54f1dee309f22d4cc | ab5eecc2b350348c4fe27b79e5af0501f85f3c87 | refs/heads/master | 2021-07-16T19:30:16.435864 | 2017-10-22T08:56:15 | 2017-10-22T08:56:15 | 104,013,783 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,013 | java | package com.medicinedot.www.medicinedot.wxapi;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.medicinedot.www.medicinedot.entity.Config;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import java.io.IOException;
import java.util.Map;
import www.xcd.com.mylibrary.base.activity.SimpleTopbarActivity;
import www.xcd.com.mylibrary.utils.ToastUtil;
/**
* 成功后回调也闪烁,将包名wxapi修改包名为wxap,暂时不执行回调页
*/
public class WXPayEntryActivity extends SimpleTopbarActivity implements IWXAPIEventHandler {
private static final String TAG = "TAG_";
private IWXAPI api;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
api = WXAPIFactory.createWXAPI(this, Config.APP_ID);
api.handleIntent(getIntent(), this);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
api.handleIntent(intent, this);
}
@Override
public void onReq(BaseReq req) {
}
@Override
public void onResp(BaseResp resp) {
if(resp.errCode==0){
ToastUtil.showToast("支付成功!");
}else if(resp.errCode==-1){
ToastUtil.showToast("支付失败!");
}else if(resp.errCode==-2){
ToastUtil.showToast("取消支付!");
}
Log.e(TAG, "onPayFinish, errCode = " + resp.errCode);
finish();
}
@Override
public void onSuccessResult(int requestCode, int returnCode, String returnMsg, String returnData, Map<String, Object> paramsMaps) {
}
@Override
public void onCancelResult() {
}
@Override
public void onErrorResult(int errorCode, IOException errorExcep) {
}
@Override
public void onParseErrorResult(int errorCode) {
}
@Override
public void onFinishResult() {
}
} | [
"xcd158454996@163.com"
] | xcd158454996@163.com |
6f73efc90f3ee4fed7ebc674ac5109c7ee52a4fc | 8356422d745cac79c86d260335208ccf6d361a88 | /dina-naturarv-portal/src/main/java/se/nrm/dina/naturarv/portal/vo/StatisticDataInstitution.java | 1c6185309d6ca6572930265d530cc7f8e439e15a | [] | no_license | idali0226/naturarv | 1019a2ffa2aff6e684776716f927017179b3b284 | 2b22f15a29dc0f0c34ca68c0055df26c2a42a308 | refs/heads/master | 2021-01-20T15:04:19.710598 | 2018-08-10T07:48:37 | 2018-08-10T07:48:37 | 90,713,730 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,911 | java | package se.nrm.dina.naturarv.portal.vo;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author idali
*/
public class StatisticDataInstitution implements Serializable {
private String institution; // name of the institution
private String instCode; // institution code
private int numOfRecords; // total number of registied specimens in instituion collection
private List<String> subCollectionList = new ArrayList<>(); // collections in institution
public StatisticDataInstitution() {
}
public StatisticDataInstitution(String institution, String instCode, int numOfRecords, List<String> subCollectionList) {
this.institution = institution;
this.instCode = instCode;
this.numOfRecords = numOfRecords;
this.subCollectionList = subCollectionList;
}
public String getInstitution() {
return institution;
}
public void setInstitution(String institution) {
this.institution = institution;
}
public String getInstCode() {
return instCode;
}
public void setInstCode(String instCode) {
this.instCode = instCode;
}
public int getNumOfRecords() {
return numOfRecords;
}
public void setNumOfRecords(int numOfRecords) {
this.numOfRecords = numOfRecords;
}
public List<String> getSubCollectionList() {
return subCollectionList;
}
public void setSubCollectionList(List<String> subCollectionList) {
this.subCollectionList = subCollectionList;
}
@Override
public String toString() {
return institution + " [" + numOfRecords + "]";
}
}
| [
"ida.li@nrm.se"
] | ida.li@nrm.se |
24c540c0a7fea0f18776fbd6a28fa16e0593113e | 6fae6fea4f8c6be7f2ca642044911654d3585f89 | /src/test/java/com/javaguru/shoppinglist/service/validation/product/ProductValidationServiceTest.java | 227ff3d38a8bba0e33364fe76c769e59eea50679 | [] | no_license | Art1985ss/ProjectJava2 | e3c818dfe32ef7c094a6276e80644411e27f5654 | 6fe82108a4a8b6f4b6439cc410e8e0714c64cdb8 | refs/heads/master | 2022-12-23T23:12:41.870641 | 2021-06-10T08:53:30 | 2021-06-10T08:53:30 | 210,909,294 | 1 | 1 | null | 2022-12-16T10:00:51 | 2019-09-25T18:05:08 | Java | UTF-8 | Java | false | false | 2,517 | java | package com.javaguru.shoppinglist.service.validation.product;
import com.javaguru.shoppinglist.entity.Product;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.*;
import org.mockito.junit.MockitoJUnitRunner;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import static org.mockito.Mockito.*;
import static org.assertj.core.api.Assertions.*;
@RunWith(MockitoJUnitRunner.class)
public class ProductValidationServiceTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Mock
private ProductNameValidation productNameValidation;
@Mock
private ProductPriceValidation productPriceValidation;
@Mock
private ProductDiscountValidation productDiscountValidation;
@InjectMocks
private ProductValidationService victim;
private Product testProduct;
@Captor
ArgumentCaptor<Product> captor = ArgumentCaptor.forClass(Product.class);
@Before
public void setUp() {
Set<ProductValidation> validations = new HashSet<>();
validations.add(productNameValidation);
validations.add(productPriceValidation);
validations.add(productDiscountValidation);
victim = new ProductValidationService(validations);
testProduct = product();
}
@Test
public void validateTest() {
String exceptionMessage = "Product should not be null.";
expectedException.expect(ProductValidationException.class);
expectedException.expectMessage(exceptionMessage);
doThrow(new ProductValidationException(exceptionMessage)).when(productNameValidation).validate(null);
victim.validate(null);
}
@Test
public void shouldPassValidation() {
victim.validate(testProduct);
verify(productNameValidation).validate(captor.capture());
verify(productPriceValidation).validate(captor.capture());
verify(productDiscountValidation).validate(captor.capture());
assertThat(captor.getAllValues()).containsOnly(testProduct);
}
private Product product() {
Product product = new Product();
product.setId(1L);
product.setName("Apple");
product.setPrice(new BigDecimal("32.20"));
product.setCategory("Fruit");
product.setDiscount(new BigDecimal("5"));
product.setDescription("This is apple for testing.");
return product;
}
} | [
"art_1985@inbox.lv"
] | art_1985@inbox.lv |
3654b6dca069f56f445c74712d58c7f3941abc93 | 178f3299d250c8618955cde711a6dc83700a053a | /subjects/are-we-there-yet/k9mail/src/com/fsck/k9/mail/filter/EOLConvertingOutputStream.java | dc6733ca7748bb8786ae79c4dfcee14557f5c9d5 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | FlyingPumba/evolutiz | cffe8c5da35562e7924f5d8d217e48a833c78044 | 521515dbd172bed10d95af3364a59340ddd24027 | refs/heads/master | 2022-08-18T09:21:25.014692 | 2021-08-28T01:21:09 | 2021-08-28T01:21:09 | 133,412,307 | 3 | 1 | NOASSERTION | 2022-06-21T21:23:16 | 2018-05-14T19:37:25 | Java | UTF-8 | Java | false | false | 1,151 | java | package com.fsck.k9.mail.filter;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
public class EOLConvertingOutputStream extends FilterOutputStream
{
private int lastChar;
private boolean ignoreNextIfLF = false;
public EOLConvertingOutputStream(OutputStream out)
{
super(out);
}
@Override
public void write(int oneByte) throws IOException
{
if (!ignoreNextIfLF)
{
if ((oneByte == '\n') && (lastChar != '\r'))
{
super.write('\r');
}
super.write(oneByte);
lastChar = oneByte;
}
ignoreNextIfLF = false;
}
@Override
public void flush() throws IOException
{
if (lastChar == '\r')
{
super.write('\n');
lastChar = '\n';
// We have to ignore the next character if it is <LF>. Otherwise it
// will be expanded to an additional <CR><LF> sequence although it
// belongs to the one just completed.
ignoreNextIfLF = true;
}
super.flush();
}
}
| [
"iarcuschin@gmail.com"
] | iarcuschin@gmail.com |
2a20abdb1f91f7a088e837d20c7d2e6fd7d25177 | 941ae6da679417e8dd8103daa75d2c3abde9d9f1 | /app/src/main/java/com/example/bamboo/myview/PlayerView.java | 7d7b08d16cbd5b646c0c631c0dcda9140ce79d04 | [] | no_license | Tziyu/Bamboo | 2753fe4857e81252c42c4cf736ad85210c3fc783 | 826cda8f8a0dc1fde82ca24da674a8597bbfae4c | refs/heads/master | 2020-04-09T02:24:19.294010 | 2018-12-01T08:42:44 | 2018-12-01T08:42:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 847 | java | package com.example.bamboo.myview;
import android.os.Handler;
import android.os.HandlerThread;
import android.view.Surface;
/**
* @author yetote QQ:503779938
* @name Bamboo
* @class name:com.example.bamboo.util
* @class describe
* @time 2018/10/20 14:02
* @change
* @chang time
* @class describe
*/
public class PlayerView extends HandlerThread {
static {
System.loadLibrary("native-lib");
}
public PlayerView() {
super("PlayerView");
}
@Override
public synchronized void start() {
super.start();
new Handler(getLooper()).post(this::configEGLContext);
}
public native void configEGLContext();
public native void destroyEGLContext();
public native void play(String path, String outPath, String vertexCode, String fragCode, Surface surface, int w, int h);
}
| [
"503779938@qq.com"
] | 503779938@qq.com |
e4c2e278b5a4636b6b42d07c9e2e1ab3869500ef | e19f4b3e98f52d122191de6296945ef4fddc51fe | /src/main/java/com/gcs/aol/dao/PgDAO.java | 93cb78ee5ef8cc0d8fa88a5fac85bfc445eeac5c | [] | no_license | ys305751572/bhc_server | 781058ba4e7c4b9bef0f31b9a83ac852038cc16f | 7bb789754db68c984d6c74b9e4642ade9158f8c5 | refs/heads/master | 2021-01-10T00:56:03.020575 | 2016-02-17T09:41:27 | 2016-02-17T09:41:27 | 45,826,009 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 234 | java | package com.gcs.aol.dao;
import com.gcs.aol.entity.Pg;
import com.gcs.sysmgr.service.IBaseJpaRepository;
/**
* 病理/讲座
* @author Administrator
*
*/
public interface PgDAO extends IBaseJpaRepository<Pg>{
}
| [
"305751572@qq.com"
] | 305751572@qq.com |
87acc82cb3615bc51b5fb67a61729c9e5f2df573 | e27942cce249f7d62b7dc8c9b86cd40391c1ddd4 | /modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201708/cm/LocationTargetingStatus.java | 6c4479e78c936e21b9ee048c1ed5f5e4c5630010 | [
"Apache-2.0"
] | permissive | mo4ss/googleads-java-lib | b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a | efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641 | refs/heads/master | 2022-12-05T00:30:56.740813 | 2022-11-16T10:47:15 | 2022-11-16T10:47:15 | 108,132,394 | 0 | 0 | Apache-2.0 | 2022-11-16T10:47:16 | 2017-10-24T13:41:43 | Java | UTF-8 | Java | false | false | 1,876 | java | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.jaxws.v201708.cm;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for LocationTargetingStatus.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="LocationTargetingStatus">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="ACTIVE"/>
* <enumeration value="OBSOLETE"/>
* <enumeration value="PHASING_OUT"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "LocationTargetingStatus")
@XmlEnum
public enum LocationTargetingStatus {
/**
*
* The location is active.
*
*
*/
ACTIVE,
/**
*
* The location is not available for targeting.
*
*
*/
OBSOLETE,
/**
*
* The location is phasing out, it will marked obsolete soon.
*
*
*/
PHASING_OUT;
public String value() {
return name();
}
public static LocationTargetingStatus fromValue(String v) {
return valueOf(v);
}
}
| [
"jradcliff@users.noreply.github.com"
] | jradcliff@users.noreply.github.com |
8f6c8ffb125ce1a99fd1fd224e0ba671804349eb | a03ddb4111faca852088ea25738bc8b3657e7b5c | /TestTransit/src/com/google/android/gms/analytics/s$2.java | f76a7f6ff30c8cf4b4fbd27b8e0acb7c2d568dd2 | [] | no_license | randhika/TestMM | 5f0de3aee77b45ca00f59cac227450e79abc801f | 4278b34cfe421bcfb8c4e218981069a7d7505628 | refs/heads/master | 2020-12-26T20:48:28.446555 | 2014-09-29T14:37:51 | 2014-09-29T14:37:51 | 24,874,176 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 467 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.analytics;
// Referenced classes of package com.google.android.gms.analytics:
// s
class uw
implements Runnable
{
final s uw;
public void run()
{
s.a(uw);
}
(s s1)
{
uw = s1;
super();
}
}
| [
"metromancn@gmail.com"
] | metromancn@gmail.com |
841878db64676517d9f9e7ed905092969af9aee3 | abc696c280e33c6a3dca3226264351eb307130d0 | /ser-common/src/main/java/com/hrp/utils/math/HashCodeUtil.java | 96c94a6489d0a307a2f63c2de51790720c02d923 | [] | no_license | davidsky11/scaffold | 1eaac5243e073eb7a214ca243d4c6e359f8b846b | 0da040e90e5477182c3dbdaef2d8588fb62352a9 | refs/heads/master | 2021-01-20T04:12:10.639047 | 2017-07-20T06:31:35 | 2017-07-20T06:31:35 | 89,658,840 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 236 | java | package com.hrp.utils.math;
/**
* 工具类-》IO处理工具类-》 HashCode工具类
* <p>
* [依赖 ]
* </p>
*/
public final class HashCodeUtil {
private HashCodeUtil() {
throw new Error("工具类不能实例化!");
}
}
| [
"kv@dell.com"
] | kv@dell.com |
30c358e4c25c52c27827764f5362052e8c04ede2 | 5f041a866abff66852264dbae755cba5da19a222 | /src/wyklad/_07wyjatki/ExcB.java | 48bf63acec79177bef0a227eb0507d0cae897361 | [] | no_license | Darkorzerarko/Java_Wyklad | 6f66ac4288d8c7c5ff750a2fd48ff5d5e6995e88 | ee46253bccdc7024037189729bc4b2eda6725485 | refs/heads/master | 2023-05-27T10:16:41.678876 | 2021-06-12T10:56:10 | 2021-06-12T10:56:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 918 | java | package wyklad._07wyjatki;
class Switch {
boolean state = false;
boolean getState() {
return state;
}
void on() {
state = true;
}
void off() {
state = false;
}
public String toString() {
return state ? "true" : "false";
}
}
class ExcB {
static Switch sw = new Switch();
public static void main(String[] args) {
try {
sw.on();
System.out.println("Włącznik :" + sw);
throw new NullPointerException("To tylko test");
//sw.off();
//System.out.println("Włącznik :" + sw);
} catch (NullPointerException e) {
System.out.println("NullPointerException");
//sw.off();
System.out.println("Włącznik :" + sw);
} catch (IllegalArgumentException e) {
System.out.println("IOException");
//sw.off();
System.out.println("Włącznik :" + sw);
} finally {
sw.off();
System.out.println("Włącznik :" + sw);
}
System.out.println("Włącznik :" + sw);
}
}
| [
"t.borzyszkowski@gmail.com"
] | t.borzyszkowski@gmail.com |
3a43e3a47b212a81c541ec80660c2af6e82edada | 01088e78c1cf46e3d20c6115e6b7cacc4fdc426b | /app/src/main/java/org/jboss/hal/client/runtime/subsystem/datasource/AddressTemplates.java | 9fc055c6f90cd7ac5b00b7ab11f911688d892715 | [
"Apache-2.0"
] | permissive | gitter-badger/hal.next | 3dcd080053a78c73deabe893e40976702f4af654 | 22683378c907d32d0351bf71dfbcecea6307e5ce | refs/heads/develop | 2021-01-21T18:50:15.036957 | 2017-05-21T18:57:34 | 2017-05-21T18:57:34 | 92,086,705 | 0 | 0 | null | 2017-05-22T18:32:06 | 2017-05-22T18:32:06 | null | UTF-8 | Java | false | false | 2,198 | java | /*
* Copyright 2015-2016 Red Hat, Inc, and individual contributors.
*
* 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.jboss.hal.client.runtime.subsystem.datasource;
import org.jboss.hal.meta.AddressTemplate;
import static org.jboss.hal.meta.StatementContext.Tuple.SELECTED_HOST;
import static org.jboss.hal.meta.StatementContext.Tuple.SELECTED_SERVER;
/**
* @author Harald Pehl
*/
interface AddressTemplates {
String DATA_SOURCE_ADDRESS = "/{selected.host}/{selected.server}/subsystem=datasources/data-source=*";
String DATA_SOURCE_POOL_ADDRESS = DATA_SOURCE_ADDRESS + "/statistics=pool";
String DATA_SOURCE_JDBC_ADDRESS = DATA_SOURCE_ADDRESS + "/statistics=jdbc";
String XA_DATA_SOURCE_ADDRESS = "/{selected.host}/{selected.server}/subsystem=datasources/xa-data-source=*";
String XA_DATA_SOURCE_POOL_ADDRESS = XA_DATA_SOURCE_ADDRESS + "/statistics=pool";
String XA_DATA_SOURCE_JDBC_ADDRESS = XA_DATA_SOURCE_ADDRESS + "/statistics=jdbc";
AddressTemplate DATA_SOURCE_TEMPLATE = AddressTemplate.of(DATA_SOURCE_ADDRESS);
AddressTemplate DATA_SOURCE_POOL_TEMPLATE = AddressTemplate.of(DATA_SOURCE_POOL_ADDRESS);
AddressTemplate DATA_SOURCE_JDBC_TEMPLATE = AddressTemplate.of(DATA_SOURCE_JDBC_ADDRESS);
AddressTemplate XA_DATA_SOURCE_TEMPLATE = AddressTemplate.of(XA_DATA_SOURCE_ADDRESS);
AddressTemplate XA_DATA_SOURCE_POOL_TEMPLATE = AddressTemplate.of(XA_DATA_SOURCE_POOL_ADDRESS);
AddressTemplate XA_DATA_SOURCE_JDBC_TEMPLATE = AddressTemplate.of(XA_DATA_SOURCE_JDBC_ADDRESS);
AddressTemplate DATA_SOURCE_SUBSYSTEM_TEMPLATE = AddressTemplate
.of(SELECTED_HOST, SELECTED_SERVER, "subsystem=datasources");
}
| [
"harald.pehl@gmail.com"
] | harald.pehl@gmail.com |
783a9caee3805c3d4c7984c76e7aa68174787168 | cde2cc5ddf47cef2de2e03c7fd63028ee02ec34f | /J2SE/day7/src/eshop/src/shop/Customer.java | c278e5daf7d7f5fdfc50a079e69aed521c355414 | [] | no_license | pratyushjava/Java_J2SE_J2EE | e93dd5ec75643149a79334f89e60ac7c56c1c20a | 7fadcaa95d5fcba1a616a189dd65707c60572d77 | refs/heads/master | 2021-01-22T23:25:42.769072 | 2018-09-10T05:25:26 | 2018-09-10T05:25:26 | 85,630,861 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,578 | java | package shop;
import java.util.*;
public class Customer implements Comparable<Customer>{
private int id;
private String email;
private GregorianCalendar dob;
private String items;
private ContactInfo ci;
public class ContactInfo
{
public int countrycode;
public int statecode;
public int zipcode;
ContactInfo(int cc,int sc,int zc)
{
countrycode=cc;
statecode=sc;
zipcode=zc;
}
}
@Override
public String toString() {
System.out.printf("dob=%tD ",dob);
return "Customer [id=" + id + ", email=" + email +", contrycode=" + ci.countrycode + "statecode="+ci.statecode+"zipcode="+ci.zipcode+"]";
}
public Customer(int id, String email, GregorianCalendar dob) {
this.id = id;
this.email = email;
this.dob = dob;
}
public Customer(int i)
{
id=i;
}
public void createContactInfo(int cc,int sc,int zc)
{
ci=new ContactInfo(cc,sc,zc);
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public GregorianCalendar getDob() {
return dob;
}
public void setDob(GregorianCalendar dob) {
this.dob = dob;
}
public String getItems() {
return items;
}
public void setItems(String items) {
this.items = items;
}
@Override
public int compareTo(Customer o) {
if(o instanceof Customer)
return id-o.id;
return -1;
}
public boolean equals(Object c)
{ System.out.println("in equals");
if (c instanceof Customer)
return id==((Customer)c).id;
return false;
}
}
| [
"pratyus@g.clemson.edu"
] | pratyus@g.clemson.edu |
fa0154c6d2f7d2e8fda66d4a2c3bbd7fd329b759 | d71e879b3517cf4fccde29f7bf82cff69856cfcd | /ExtractedJars/PACT_com.pactforcure.app/javafiles/com/raizlabs/android/dbflow/runtime/FlowContentObserver$OnTableChangedListener.java | dd758f0aa852b198ff7c58ce13b1300b230e9af9 | [
"MIT"
] | permissive | Andreas237/AndroidPolicyAutomation | b8e949e072d08cf6c6166c3f15c9c63379b8f6ce | c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a | refs/heads/master | 2020-04-10T02:14:08.789751 | 2019-05-16T19:29:11 | 2019-05-16T19:29:11 | 160,739,088 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 495 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.raizlabs.android.dbflow.runtime;
// Referenced classes of package com.raizlabs.android.dbflow.runtime:
// FlowContentObserver
public static interface FlowContentObserver$OnTableChangedListener
{
public abstract void onTableChanged(Class class1, com.raizlabs.android.dbflow.structure.BaseModel.Action action);
}
| [
"silenta237@gmail.com"
] | silenta237@gmail.com |
82d2b4e51a698fbf88685b38f5f09eb00505d076 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava19/Foo350Test.java | 1a1b61c6f904dc87c330e2085a04203b90aea989 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package applicationModulepackageJava19;
import org.junit.Test;
public class Foo350Test {
@Test
public void testFoo0() {
new Foo350().foo0();
}
@Test
public void testFoo1() {
new Foo350().foo1();
}
@Test
public void testFoo2() {
new Foo350().foo2();
}
@Test
public void testFoo3() {
new Foo350().foo3();
}
@Test
public void testFoo4() {
new Foo350().foo4();
}
@Test
public void testFoo5() {
new Foo350().foo5();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
4d97f5d37769c71ec0e39a4076f228806a55be79 | caa4240261bafa67e9d209606bf3e1bf84ae9796 | /app/src/test/java/io/github/hidroh/materialistic/test/TestItemManager.java | f0ddb6e6deda2f2a5291094c331ee21028d2f9a0 | [
"Apache-2.0"
] | permissive | winiceo/materialistic | ab2e7e3fa8e4e5fce9003acde853bfd2b7ef2ee6 | e53fe2114daa84577caa913df20b313b80d31d9e | refs/heads/master | 2021-01-16T22:11:02.741500 | 2015-03-02T16:12:29 | 2015-03-02T16:12:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 361 | java | package io.github.hidroh.materialistic.test;
import io.github.hidroh.materialistic.data.ItemManager;
public class TestItemManager implements ItemManager {
@Override
public void getStories(FetchMode fetchMode, ResponseListener<Item[]> listener) {
}
@Override
public void getItem(String itemId, ResponseListener<Item> listener) {
}
}
| [
"haduytrung@gmail.com"
] | haduytrung@gmail.com |
6f8639fc44207bf4c210b7cd302d9ba9a5e5369e | 40df4983d86a3f691fc3f5ec6a8a54e813f7fe72 | /app/src/main/java/com/p070qq/p071e/comm/p073pi/NADI.java | ddbd73716a25d217625792024bd745c7e144d215 | [] | no_license | hlwhsunshine/RootGeniusTrunAK | 5c63599a939b24a94c6f083a0ee69694fac5a0da | 1f94603a9165e8b02e4bc9651c3528b66c19be68 | refs/heads/master | 2020-04-11T12:25:21.389753 | 2018-12-24T10:09:15 | 2018-12-24T10:09:15 | 161,779,612 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 297 | java | package com.p070qq.p071e.comm.p073pi;
import com.p070qq.p071e.ads.cfg.DownAPPConfirmPolicy;
/* renamed from: com.qq.e.comm.pi.NADI */
public interface NADI {
void loadAd(int i);
void setBrowserType(int i);
void setDownAPPConfirmPolicy(DownAPPConfirmPolicy downAPPConfirmPolicy);
}
| [
"603820467@qq.com"
] | 603820467@qq.com |
703f91a8a0f814e937c88434c0db1f7cdbdf5152 | 0f1a58e0cfc612e21ddd5810b52425381b6663b2 | /src/model/java/io/k8s/core/v1/PortworxVolumeSource.java | aafb1d54e801a6ded3c17abef41ca1683b37b555 | [
"Apache-2.0"
] | permissive | nebhale/reactive-k8s-client | d58667f3486e2d2795ba8cceab5a27a7e4a6a902 | bf61d6c11ea0f3e53890e4678f20f43f87044de7 | refs/heads/main | 2023-02-07T11:07:48.951794 | 2021-01-03T16:30:55 | 2021-01-03T16:30:55 | 317,999,209 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,462 | java | /*
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.k8s.core.v1;
import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
/**
* PortworxVolumeSource represents a Portworx volume resource.
*/
@Builder
@Jacksonized
@Value
public class PortworxVolumeSource {
/**
* FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system.
* Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
*/
@Nullable
String fsType;
/**
* Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
*/
@Nullable
Boolean readOnly;
/**
* VolumeID uniquely identifies a Portworx volume
*/
@NonNull
String volumeID;
}
| [
"bhale@vmware.com"
] | bhale@vmware.com |
6421951c48de0acfaf652e9c773ed8bcdea1efc5 | bb05fc62169b49e01078b6bd211f18374c25cdc9 | /soft/form/src/com/chimu/formTools/examples/schema4c/Money.java | 38e1b540d933915c310a7524f3940ea1f4278887 | [] | no_license | markfussell/form | 58717dd84af1462d8e3fe221535edcc8f18a8029 | d227c510ff072334a715611875c5ae6a13535510 | refs/heads/master | 2016-09-10T00:12:07.602440 | 2013-02-07T01:24:14 | 2013-02-07T01:24:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,671 | java | /*======================================================================
**
** File: com/chimu/formTools/examples/schema4c/Money.java
**
** Copyright (c) 1997-2000, ChiMu Corporation. All Rights Reserved.
** See the file COPYING for copyright permissions.
**
======================================================================*/
package com.chimu.formTools.examples.schema4c;
import java.math.BigDecimal;
public interface Money {
//==========================================================
//(P)===================== Asking ==========================
//==========================================================
public String toString();
public String info();
//==========================================================
//(P)===================== Asking ==========================
//==========================================================
public String currency();
public BigDecimal amount();
public Money inUSD();
public Money toCurrency(String newCurrency);
//==========================================================
//(P)==================== Altering =========================
//==========================================================
public void setAmount(BigDecimal amount);
//==========================================================
//(P)================== Calculations =======================
//==========================================================
public Money add(Money money);
public Money subtract(Money money);
public Money multiply(double scaling);
public Money divide(double scaling);
}
| [
"mark.fussell@emenar.com"
] | mark.fussell@emenar.com |
13b69a5b2f790b3e037374df0851b45febe4aa91 | a43d4202628ecb52e806d09f0f3dc1f5bab3ef4f | /src/main/java/pnc/mesadmin/dto/SaveOpertInfo/SaveOpertInfoResD.java | 72dd08a41a3ca1041b87f7888d9df5687e0fc164 | [] | no_license | pnc-mes/base | b88583929e53670340a704f848e4e9e2027f1334 | 162135b8752b4edc397b218ffd26664929f6920d | refs/heads/main | 2023-01-07T22:06:10.794300 | 2020-10-27T07:47:20 | 2020-10-27T07:47:20 | 307,621,190 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package pnc.mesadmin.dto.SaveOpertInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by PNC on 2017/6/3.
*/
public class SaveOpertInfoResD {
@JsonProperty("Data")
private String Data;
@JsonIgnore
public String getData() {
return Data;
}
@JsonIgnore
public void setData(String data) {
Data = data;
}
}
| [
"95887577@qq.com"
] | 95887577@qq.com |
212ded0d35dd043f3dbb25ffced98ace02235a48 | 5d69794430a1992c82b7aeac0dd6ae9b1bead74f | /src/main/java/org/assertj/core/error/BasicErrorMessageFactory.java | 17b1be79eeb09857444888928d00070e795a5935 | [
"Apache-2.0"
] | permissive | kijmaster/assertj-core | d353cff9cf0d5627ce7795ee331d9b5620604ef2 | 94b93f2813b77b420e138390725386db753b1899 | refs/heads/master | 2021-01-16T17:43:07.743033 | 2013-04-15T08:46:25 | 2013-04-15T08:46:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,732 | java | /*
* Created on Oct 18, 2010
*
* 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.
*
* Copyright @2010-2011 the original author or authors.
*/
package org.assertj.core.error;
import static java.lang.String.format;
import static org.assertj.core.util.Arrays.format;
import static org.assertj.core.util.Objects.*;
import static org.assertj.core.util.Strings.quote;
import java.util.Arrays;
import org.assertj.core.description.Description;
import org.assertj.core.util.VisibleForTesting;
/**
* A factory of error messages typically shown when an assertion fails.
*
* @author Alex Ruiz
*/
public class BasicErrorMessageFactory implements ErrorMessageFactory {
protected final String format;
protected final Object[] arguments;
@VisibleForTesting
MessageFormatter formatter = MessageFormatter.instance();
/**
* Creates a new </code>{@link BasicErrorMessageFactory}</code>.
* @param format the format string.
* @param arguments arguments referenced by the format specifiers in the format string.
*/
public BasicErrorMessageFactory(String format, Object... arguments) {
this.format = format;
this.arguments = arguments;
}
/** {@inheritDoc} */
public String create(Description d) {
return formatter.format(d, format, arguments);
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
BasicErrorMessageFactory other = (BasicErrorMessageFactory) obj;
if (!areEqual(format, other.format)) return false;
// because it does not manage array recursively, don't use : Arrays.equals(arguments, other.arguments);
// example if arguments[1] and other.arguments[1] are logically same arrays but not same object, it will return false
return areEqual(arguments, other.arguments);
}
@Override
public int hashCode() {
int result = 1;
result = HASH_CODE_PRIME * result + hashCodeFor(format);
result = HASH_CODE_PRIME * result + Arrays.hashCode(arguments);
return result;
}
@Override
public String toString() {
return format("%s[format=%s, arguments=%s]", getClass().getSimpleName(), quote(format), format(arguments));
}
}
| [
"joel.costigliola@gmail.com"
] | joel.costigliola@gmail.com |
9cb434be77cab4f5cac5b2251e1a1fe3c6e7c4a5 | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-new-fitness/results/XWIKI-13196-1-3-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/xwiki/model/reference/EntityReference_ESTest.java | 885d8f41fbbe053a463c58d3d876ed85a6154f34 | [
"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 | 1,298 | java | /*
* This file was automatically generated by EvoSuite
* Sat May 16 20:50:20 UTC 2020
*/
package org.xwiki.model.reference;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.io.Serializable;
import java.util.Map;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.xwiki.model.EntityType;
import org.xwiki.model.reference.EntityReference;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class EntityReference_ESTest extends EntityReference_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
String string0 = "";
EntityType entityType0 = EntityType.BLOCK;
String string1 = "An Entity Reference type cannot be null";
EntityReference entityReference0 = new EntityReference("An Entity Reference type cannot be null", entityType0);
EntityReference entityReference1 = new EntityReference(entityReference0);
EntityReference entityReference2 = new EntityReference(entityReference1, entityReference1);
EntityReference entityReference3 = new EntityReference("", entityType0, entityReference2, (Map<String, Serializable>) null);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
3c134e63dd87734f1006a67909e6c43c5095fd2c | 505384b2cc8fddbb544d91e2f16aff58a36cc94f | /data-server2/src/main/java/com/ninuxgithub/dataserver/model/Order.java | 66542a8543779907e9a88908554beec27607e6e9 | [] | no_license | ninuxGithub/spring-cloud-order-manage | cbaaeaf15a4f08b6724e96457a22f59a8148171e | 5c730a238b28199c54703152d90618bc2990b628 | refs/heads/master | 2020-04-05T07:13:12.138449 | 2019-01-28T10:30:15 | 2019-01-28T10:30:15 | 156,667,344 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,604 | java | package com.ninuxgithub.dataserver.model;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* 坑: 表的名称不能为关键字: order
*/
@Entity
@Table(name = "torder")
public class Order implements Serializable {
private static final long serialVersionUID = -4298152122761680527L;
@Id
@Column(name = "id")
@GeneratedValue(generator = "uuidGenerator")
@GenericGenerator(name = "uuidGenerator", strategy = "uuid")
private String id;
@OneToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "product_id")
private Product product;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "customer_id")
private Customer customer;
private Date createTime;
public Order() {
}
public Order(Product product, Customer customer, Date createTime) {
this.product = product;
this.customer = customer;
this.createTime = createTime;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Product getProduct() {
return product;
}
public void setProduct(Product product) {
this.product = product;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
| [
"1732768613@qq.com"
] | 1732768613@qq.com |
54933b77af5962fa9dc16c08c97d6b0c396c150f | 3001fcfe996fb82ad6cfb1843a71e54434975373 | /CodeForces/CodeForces Round 150/TaskC.java | 3a526d78e676ec1ac6247644d699da94e144a380 | [] | no_license | niyaznigmatullin/nncontests | 751d8cde9c18feae165dd7d1b0ea2cf1f075d39c | 59748ce96f521e832c5a511ba849a523e35ad469 | refs/heads/master | 2022-07-14T08:33:27.055971 | 2022-06-28T17:58:23 | 2022-06-28T17:58:23 | 36,932,376 | 7 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,019 | java | package mypackage;
import arrayutils.ArrayUtils;
import niyazio.FastScanner;
import niyazio.FastPrinter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class TaskC {
static class Segment {
int type;
int x;
int left;
int right;
Segment(int type, int x, int left, int right) {
this.type = type;
this.x = x;
this.left = left;
this.right = right;
}
}
static final int[] DX = {1, 0, -1, 0};
static final int[] DY = {0, 1, 0, -1};
static class Event implements Comparable<Event> {
int type;
int x;
Event(int type, int x) {
this.type = type;
this.x = x;
}
public int compareTo(Event o) {
if (x != o.x) {
return x - o.x;
}
return type - o.type;
}
}
public void solve(int testNumber, FastScanner in, FastPrinter out) {
int n = in.nextInt();
List<Segment> all = new ArrayList<Segment>();
int curX = 0;
int curY = 0;
int[] x = new int[n + 1];
int[] y = new int[n + 1];
all.add(new Segment(0, 0, 0, 0));
for (int i = 1; i <= n; i++) {
int dir = "RULD".indexOf(in.next());
int count = in.nextInt();
curX += DX[dir] * count;
curY += DY[dir] * count;
x[i] = curX;
y[i] = curY;
}
int[] ux = x.clone();
int[] uy = y.clone();
x = ArrayUtils.sortAndUnique(x);
y = ArrayUtils.sortAndUnique(y);
int[] mapX = new int[x.length];
int[] mapY = new int[y.length];
int[] sizeX = getSize(x, mapX);
int[] sizeY = getSize(y, mapY);
boolean[][] a = new boolean[sizeX.length][sizeY.length];
curX = 0;
curY = 0;
for (int i = 0; i < n; i++) {
int j = i + 1;
int x1 = mapX[Arrays.binarySearch(x, ux[i])];
int y1 = mapY[Arrays.binarySearch(y, uy[i])];
int x2 = mapX[Arrays.binarySearch(x, ux[j])];
int y2 = mapY[Arrays.binarySearch(y, uy[j])];
if (x1 > x2) {
int t = x1;
x1 = x2;
x2 = t;
}
if (y1 > y2) {
int t = y1;
y1 = y2;
y2 = t;
}
while (x1 != x2 || y1 != y2) {
a[x1][y1] = true;
if (x1 != x2) {
++x1;
}
if (y1 != y2) {
++y1;
}
}
a[x1][y1] = true;
}
int[] q = new int[sizeX.length * sizeY.length];
boolean[][] was = new boolean[sizeX.length][sizeY.length];
int head = 0;
int tail = 0;
n = sizeX.length;
int m = sizeY.length;
for (int i = 0; i < sizeX.length; i++) {
if (!was[i][0]) {
q[tail++] = i * m;
was[i][0] = true;
}
if (!was[i][m - 1]) {
was[i][m - 1] = true;
q[tail++] = i * m + (m - 1);
}
}
for (int i = 0; i < sizeY.length; i++) {
if (!was[0][i]) {
q[tail++] = i;
was[0][i] = true;
}
if (!was[n - 1][i]) {
q[tail++] = (n - 1) * m + i;
was[n - 1][i] = true;
}
}
while (head < tail) {
int vx = q[head] / m;
int vy = q[head] % m;
++head;
for (int dir = 0; dir < 4; dir++) {
int nx = vx + DX[dir];
int ny = vy + DY[dir];
if (nx < 0 || ny < 0 || nx >= n || ny >= m || a[nx][ny] || was[nx][ny]) {
continue;
}
was[nx][ny] = true;
q[tail++] = nx * m + ny;
}
}
long answer = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (!was[i][j]) {
answer += (long) sizeX[i] * sizeY[j];
}
}
}
out.println(answer);
}
static int[] getSize(int[] x, int[] mapX) {
int count = 0;
int n = x.length;
for (int i = 0; i + 1 < n; i++) {
if (x[i + 1] - x[i] - 1 > 0) {
++count;
}
}
int[] size = new int[2 + count + n];
int cur = 0;
size[cur++] = 1;
for (int i = 0; i < n; i++) {
mapX[i] = cur;
size[cur++] = 1;
if (i + 1 < n && x[i + 1] - x[i] - 1 > 0) {
size[cur++] = x[i + 1] - x[i] - 1;
}
}
size[cur++] = 1;
if (cur != size.length) {
throw new AssertionError();
}
return size;
}
}
| [
"niyaz.nigmatullin@gmail.com"
] | niyaz.nigmatullin@gmail.com |
0ff81cefbf8832c36ea3f495a09374720e691dc8 | 106cce45fa593bc6ef7ea105f5055b5d13d251d0 | /Examples/Github/src/generated/java/api/github/com/definitions/GitCommit.java | 24532902614bb9e739f0f9f293066ac6c27913d4 | [] | no_license | glelouet/JSwaggerMaker | f7faf2267e900d78019db42979922d2f2c2fcb33 | 1bf9572d313406d1d9e596094714daec6f50e068 | refs/heads/master | 2022-12-08T04:28:53.468581 | 2022-12-04T14:37:47 | 2022-12-04T14:37:47 | 177,210,549 | 0 | 0 | null | 2022-12-04T14:37:48 | 2019-03-22T21:19:28 | Java | UTF-8 | Java | false | false | 1,292 | java | package api.github.com.definitions;
import api.github.com.definitions.branch.commit.commit.Author;
public class GitCommit {
public Author author;
public String message;
public String parents;
public String tree;
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other == null)||(other.getClass()!= getClass())) {
return false;
}
GitCommit othersame = ((GitCommit) other);
if ((author!= othersame.author)&&((author == null)||(!author.equals(othersame.author)))) {
return false;
}
if ((message!= othersame.message)&&((message == null)||(!message.equals(othersame.message)))) {
return false;
}
if ((parents!= othersame.parents)&&((parents == null)||(!parents.equals(othersame.parents)))) {
return false;
}
if ((tree!= othersame.tree)&&((tree == null)||(!tree.equals(othersame.tree)))) {
return false;
}
return true;
}
public int hashCode() {
return (((((author == null)? 0 :author.hashCode())+((message == null)? 0 :message.hashCode()))+((parents == null)? 0 :parents.hashCode()))+((tree == null)? 0 :tree.hashCode()));
}
}
| [
"guillaume.lelouet@gmail.com"
] | guillaume.lelouet@gmail.com |
3c68b6fba613ec794438ca3a74a98827d88ce601 | e543a345b8d6c62720b8ff584eba53b833202711 | /twinkle-common/twinkle-common-asm/src/main/java/com/twinkle/cloud/common/asm/transformer/AddFieldTransformer.java | ba5296187de3a768b3c664c7f9ba214e7d240d22 | [] | no_license | cxj110/twinkle-cloud | d565d573a644d1ce03f66c1926834ab5a07e533c | 0c8a263ebebbc7b1c0e244cd10abd91e68cae0c6 | refs/heads/master | 2022-06-30T05:12:54.452003 | 2019-07-04T10:13:03 | 2019-07-04T10:13:03 | 137,180,030 | 0 | 1 | null | 2022-06-17T02:16:29 | 2018-06-13T07:37:47 | Java | UTF-8 | Java | false | false | 3,202 | java | package com.twinkle.cloud.common.asm.transformer;
import com.twinkle.cloud.common.asm.data.AnnotationDefine;
import com.twinkle.cloud.common.asm.data.FieldDefine;
import com.twinkle.cloud.common.asm.utils.TypeUtil;
import lombok.extern.slf4j.Slf4j;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldNode;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Function: TODO ADD FUNCTION. <br/>
* Reason: TODO ADD REASON. <br/>
* Date: 2019-06-26 21:50<br/>
*
* @author chenxj
* @see
* @since JDK 1.8
*/
@Slf4j
public class AddFieldTransformer extends ClassTransformer {
/**
* Field Definition.
*/
private FieldDefine fieldDefine;
public AddFieldTransformer(ClassTransformer _transformer, FieldDefine _fieldDefine) {
super(_transformer);
this.fieldDefine = _fieldDefine;
}
@Override
public void transform(ClassNode _classNode) {
boolean isPresent = false;
for (FieldNode tempFieldNode : _classNode.fields) {
if (this.fieldDefine.getName().equals(tempFieldNode.name)) {
isPresent = true;
break;
}
}
if (!isPresent) {
FieldNode tempFieldNode = new FieldNode(
this.fieldDefine.getAccess(),
this.fieldDefine.getName(),
Type.getDescriptor(this.fieldDefine.getTypeDefine().getTypeClass()),
TypeUtil.getTypeSignature(this.fieldDefine.getTypeDefine()),
this.fieldDefine.getIntialValue());
tempFieldNode.visibleAnnotations = this.getAnnotationNode();
//Add Class Visitor.
tempFieldNode.accept(_classNode);
// _classNode.fields.add(tempFieldNode);
}
super.transform(_classNode);
}
/**
* Going to Pack the Annotation Node List.
*
* @return
*/
private List<AnnotationNode> getAnnotationNode() {
if (CollectionUtils.isEmpty(this.fieldDefine.getAnnotationDefineList())) {
return new ArrayList<>();
}
return this.fieldDefine.getAnnotationDefineList().stream().map(this::packAnnotationNode).collect(Collectors.toList());
}
/**
* Pack the Annotation Node.
*
* @param _define
* @return
*/
private AnnotationNode packAnnotationNode(AnnotationDefine _define) {
log.debug("Going to add field's annotation {}", _define);
AnnotationNode tempNode = new AnnotationNode(Type.getDescriptor(_define.getAnnotationClass()));
Map<String, Object> tempItemMap = _define.getValuesMap();
if (CollectionUtils.isEmpty(tempItemMap)) {
return tempNode;
}
List<Object> tempValuesList = new ArrayList<>();
tempItemMap.forEach((k, v) -> {tempValuesList.add(k); tempValuesList.add(v);});
tempNode.values = tempValuesList;
// tempItemMap.forEach((k, v) -> tempNode.visit(k, v));
return tempNode;
}
}
| [
"xuejin.chen@gemii.cc"
] | xuejin.chen@gemii.cc |
8b0e85bfb87ed37c3d89f4ee1ecc974d73c079cb | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/2b3d732f05e22081dc0b7c6f753e3b3e8d0cf047/after/PlatformFacadeImpl.java | fd06852df399f8baca1cd66687c713727750f291 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,894 | java | package org.jetbrains.plugins.gradle.diff;
import com.intellij.openapi.fileTypes.FileTypes;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.LanguageLevelProjectExtension;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.roots.OrderEntry;
import com.intellij.openapi.roots.impl.libraries.ProjectLibraryTable;
import com.intellij.openapi.roots.libraries.LibraryTable;
import com.intellij.openapi.vfs.JarFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.pom.java.LanguageLevel;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.Collection;
/**
* @author Denis Zhdanov
* @since 1/26/12 11:54 AM
*/
public class PlatformFacadeImpl implements PlatformFacade {
@NotNull
@Override
public LibraryTable getProjectLibraryTable(@NotNull Project project) {
return ProjectLibraryTable.getInstance(project);
}
@NotNull
@Override
public LanguageLevel getLanguageLevel(@NotNull Project project) {
return LanguageLevelProjectExtension.getInstance(project).getLanguageLevel();
}
@NotNull
@Override
public Collection<Module> getModules(@NotNull Project project) {
return Arrays.asList(ModuleManager.getInstance(project).getModules());
}
@NotNull
@Override
public Collection<OrderEntry> getOrderEntries(@NotNull Module module) {
return Arrays.asList(ModuleRootManager.getInstance(module).getOrderEntries());
}
@NotNull
@Override
public String getLocalFileSystemPath(@NotNull VirtualFile file) {
if (file.getFileType() == FileTypes.ARCHIVE) {
final VirtualFile jar = JarFileSystem.getInstance().getVirtualFileForJar(file);
if (jar != null) {
return jar.getPath();
}
}
return file.getPath();
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
94df46711b03f5636bcab43ca697b1aace9fb44d | 8759da2b77b1c48ad1e015cdd9737e5566a6f24e | /src/JavaKonusalSorular/Pratik11_ForLoop/Pr14.java | c6ab6fcc67a2d0dee8bdb61955cf7988d0958d8b | [] | no_license | Mehmet0626/Java2021allFiles | aa1e55f652476a6538d7e897b90133af37f24e7d | 3a84ba2cfc9f966a23597f0bee3bb4b58846803d | refs/heads/master | 2023-08-31T05:05:45.057755 | 2021-10-11T09:06:04 | 2021-10-11T09:06:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 650 | java | package JavaKonusalSorular.Pratik11_ForLoop;
import java.util.Scanner;
public class Pr14 {
public static void main(String[] args) {
/*
* Soru 8 ) Interview Question
* Kullanicidan bir String isteyin ve Stringi
* tersine ceviren bir program yazin.
*/
Scanner scan = new Scanner(System.in);
System.out.println("Lutfen tersten yazdirmak icin bir String yaziniz ");
String kelime = scan.nextLine();
String terstenKelime = "";
for (int i = 0; i < kelime.length(); i++) {
terstenKelime += kelime.substring(kelime.length() - 1 - i, kelime.length() - i);
}
System.out.println(terstenKelime);
scan.close();
}
} | [
"delenkar2825@gmail.com"
] | delenkar2825@gmail.com |
9d5692bbe33a6402d998a69a03814dc4a06a4a5d | 1b105dde312926e19b5f07e5308e97015a320504 | /src/main/java/de/intarsys/tools/reflect/ReflectionException.java | a9e8e3d7f702be860b490b94da2ccc332ee932b0 | [
"BSD-3-Clause"
] | permissive | RWTH-i5-IDSG/runtime | 28444fe741247c91deeb2612b4a7424320711a26 | eafbf169b7b848bb299b4e235c2941ac9f5d2fa0 | refs/heads/master | 2021-01-16T20:49:29.421226 | 2016-06-01T12:12:46 | 2016-06-01T12:15:30 | 60,166,551 | 0 | 0 | null | 2016-06-01T10:08:25 | 2016-06-01T10:08:24 | null | UTF-8 | Java | false | false | 2,194 | java | /*
* Copyright (c) 2008, intarsys consulting GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package de.intarsys.tools.reflect;
/**
*
*/
abstract public class ReflectionException extends Exception {
final private Class targetClass;
public ReflectionException(Class clazz) {
super();
this.targetClass = clazz;
}
public ReflectionException(Class clazz, String message) {
super(message);
this.targetClass = clazz;
}
public ReflectionException(Class clazz, String message, Throwable cause) {
super(message, cause);
this.targetClass = clazz;
}
public ReflectionException(Class clazz, Throwable cause) {
super(cause);
this.targetClass = clazz;
}
public Class getTargetClass() {
return targetClass;
}
}
| [
"mtraut@intarsys.de"
] | mtraut@intarsys.de |
1650e4fa4cc2075e1151bf208edbbca3a0fb714c | f249c74908a8273fdc58853597bd07c2f9a60316 | /protobuf/target/generated-sources/protobuf/java/cn/edu/cug/cs/gtl/protos/TetrahedralMesh3DOrBuilder.java | d00428739c42d6d0dc7c94ff7385197a798bfb67 | [
"MIT"
] | permissive | zhaohhit/gtl-java | 4819d7554f86e3c008e25a884a3a7fb44bae97d0 | 63581c2bfca3ea989a4ba1497dca5e3c36190d46 | refs/heads/master | 2020-08-10T17:58:53.937394 | 2019-10-30T03:06:06 | 2019-10-30T03:06:06 | 214,390,871 | 1 | 0 | MIT | 2019-10-30T03:06:08 | 2019-10-11T09:00:26 | null | UTF-8 | Java | false | true | 1,598 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: cn/edu/cug/cs/gtl/protos/geometry.proto
package cn.edu.cug.cs.gtl.protos;
public interface TetrahedralMesh3DOrBuilder extends
// @@protoc_insertion_point(interface_extends:cn.edu.cug.cs.gtl.protos.TetrahedralMesh3D)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated .cn.edu.cug.cs.gtl.protos.Vertex3d vertices = 1;</code>
*/
java.util.List<cn.edu.cug.cs.gtl.protos.Vertex3d>
getVerticesList();
/**
* <code>repeated .cn.edu.cug.cs.gtl.protos.Vertex3d vertices = 1;</code>
*/
cn.edu.cug.cs.gtl.protos.Vertex3d getVertices(int index);
/**
* <code>repeated .cn.edu.cug.cs.gtl.protos.Vertex3d vertices = 1;</code>
*/
int getVerticesCount();
/**
* <code>repeated .cn.edu.cug.cs.gtl.protos.Vertex3d vertices = 1;</code>
*/
java.util.List<? extends cn.edu.cug.cs.gtl.protos.Vertex3dOrBuilder>
getVerticesOrBuilderList();
/**
* <code>repeated .cn.edu.cug.cs.gtl.protos.Vertex3d vertices = 1;</code>
*/
cn.edu.cug.cs.gtl.protos.Vertex3dOrBuilder getVerticesOrBuilder(
int index);
/**
* <code>repeated uint32 indices = 2;</code>
* @return A list containing the indices.
*/
java.util.List<java.lang.Integer> getIndicesList();
/**
* <code>repeated uint32 indices = 2;</code>
* @return The count of indices.
*/
int getIndicesCount();
/**
* <code>repeated uint32 indices = 2;</code>
* @param index The index of the element to return.
* @return The indices at the given index.
*/
int getIndices(int index);
}
| [
"zwhe@cug.edu.cn"
] | zwhe@cug.edu.cn |
51bee2838da36f7233be58dd397a4438d1971774 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1580_public/tests/more/src/java/module1580_public_tests_more/a/Foo3.java | 25961e4102f69922ef78e03de3a3c26193859ae4 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,596 | java | package module1580_public_tests_more.a;
import java.beans.beancontext.*;
import java.io.*;
import java.rmi.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.io.File
* @see java.rmi.Remote
* @see java.nio.file.FileStore
*/
@SuppressWarnings("all")
public abstract class Foo3<N> extends module1580_public_tests_more.a.Foo2<N> implements module1580_public_tests_more.a.IFoo3<N> {
java.sql.Array f0 = null;
java.util.logging.Filter f1 = null;
java.util.zip.Deflater f2 = null;
public N element;
public static Foo3 instance;
public static Foo3 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1580_public_tests_more.a.Foo2.create(input);
}
public String getName() {
return module1580_public_tests_more.a.Foo2.getInstance().getName();
}
public void setName(String string) {
module1580_public_tests_more.a.Foo2.getInstance().setName(getName());
return;
}
public N get() {
return (N)module1580_public_tests_more.a.Foo2.getInstance().get();
}
public void set(Object element) {
this.element = (N)element;
module1580_public_tests_more.a.Foo2.getInstance().set(this.element);
}
public N call() throws Exception {
return (N)module1580_public_tests_more.a.Foo2.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
254d5b1cf816838e540f13db0d806991670577d3 | 662ae94dd9b6dc08e92d2d1b9768e3d8eeda009b | /src/main/java/ejercicio/ParallelForParaleloThreads.java | e976212cb657f570907d0b69e3d41bd27effaedc | [] | no_license | codeurjc/concurrencia-tema7 | 8ec3b4cc6a73cf95c59284b440a382a31bd4a7cc | 59e37a6b132e709af9ebd76bf18f340a100b8ef9 | refs/heads/master | 2020-06-14T15:05:25.600335 | 2016-11-30T09:51:06 | 2016-11-30T09:51:06 | 75,168,350 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,382 | java | package ejercicio;
import java.util.function.Function;
public class ParallelForParaleloThreads {
private static final int NUM_THREADS = 2;
private double[] sumaCompar = new double[NUM_THREADS];
private Function<Integer,Double> iteration;
private int globalSize;
public double parallelForSum(int size,
Function<Integer, Double> iteration) throws InterruptedException {
this.iteration = iteration;
this.globalSize = size;
Thread[] threads = new Thread[NUM_THREADS];
for (int i = 0; i < NUM_THREADS; i++) {
int numThread = i;
Thread t = new Thread(() -> suma(numThread));
threads[i] = t;
t.start();
}
int suma = 0;
for (int i = 0; i < NUM_THREADS; i++) {
threads[i].join();
suma += sumaCompar[i];
}
return suma;
}
private void suma(int numThread) {
int sumaLocal = 0;
int size = globalSize / NUM_THREADS;
int start = numThread * size;
int end = start + size;
for (int i = start; i < end; i++) {
sumaLocal += iteration.apply(i);
}
sumaCompar[numThread] = sumaLocal;
}
public void exec() throws InterruptedException {
double[] data = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
double sum = parallelForSum(data.length, i -> data[i]);
System.out.println("Suma: " + sum);
}
public static void main(String[] args) throws InterruptedException {
new ParallelForParaleloThreads().exec();
}
}
| [
"micael.gallego@gmail.com"
] | micael.gallego@gmail.com |
506ea01305e8dbef6510c505557e1e8a7c41167b | 369e50dff508122efc3340b2e80ce073b03f147c | /datatables-thymeleaf/src/main/java/com/github/dandelion/datatables/thymeleaf/processor/attr/export/TheadExportLinkLabelAttrProcessor.java | f62617df2b747da3979c7e3008039458bd336a2d | [
"BSD-3-Clause"
] | permissive | ccabanes/dandelion-datatables | 2bcb4a5dd4e892724b90e00c738da4a7cbd75b4b | e7695d08657acc29a5a7d9222e38e5b0dafb7bbb | refs/heads/master | 2020-12-25T05:08:28.108433 | 2014-02-11T14:11:17 | 2014-02-11T14:11:17 | 30,875,452 | 0 | 0 | null | 2015-02-16T15:55:39 | 2015-02-16T15:55:39 | null | UTF-8 | Java | false | false | 3,728 | java | /*
* [The "BSD licence"]
* Copyright (c) 2012 Dandelion
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Dandelion 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 AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.github.dandelion.datatables.thymeleaf.processor.attr.export;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.thymeleaf.Arguments;
import org.thymeleaf.context.IWebContext;
import org.thymeleaf.dom.Element;
import org.thymeleaf.processor.IAttributeNameProcessorMatcher;
import org.thymeleaf.processor.ProcessorResult;
import com.github.dandelion.datatables.core.configuration.Configuration;
import com.github.dandelion.datatables.core.export.ExportConf;
import com.github.dandelion.datatables.core.export.ExportType;
import com.github.dandelion.datatables.core.html.HtmlTable;
import com.github.dandelion.datatables.thymeleaf.dialect.DataTablesDialect;
import com.github.dandelion.datatables.thymeleaf.processor.AbstractDatatablesAttrProcessor;
import com.github.dandelion.datatables.thymeleaf.util.Utils;
/**
* Attribute processor applied to the <code>tbody</code> tag for the following
* attributes :
* <ul>
* <li>dt:csv:label</li>
* <li>dt:xml:label</li>
* <li>dt:xls:label</li>
* <li>dt:xlsx:label</li>
* <li>dt:pdf:label</li>
* </ul>
*
* @author Thibault Duchateau
* @since 0.8.8
*/
public class TheadExportLinkLabelAttrProcessor extends AbstractDatatablesAttrProcessor {
public TheadExportLinkLabelAttrProcessor(IAttributeNameProcessorMatcher matcher) {
super(matcher);
}
@Override
public int getPrecedence() {
return 8000;
}
@SuppressWarnings("unchecked")
@Override
protected ProcessorResult doProcessAttribute(Arguments arguments, Element element,
String attributeName, HtmlTable table, Map<Configuration, Object> localConf) {
// Get the HTTP request
HttpServletRequest request = ((IWebContext) arguments.getContext()).getHttpServletRequest();
String attrValue = Utils.parseElementAttribute(arguments, element.getAttributeValue(attributeName), null, String.class);
ExportType exportType = ExportType.valueOf(attributeName.split(":")[1].toUpperCase().trim());
Map<ExportType, ExportConf> exportConfMap = (Map<ExportType, ExportConf>) request
.getAttribute(DataTablesDialect.INTERNAL_EXPORT_CONF_MAP);
exportConfMap.get(exportType).setLabel(attrValue);
return ProcessorResult.ok();
}
} | [
"thibault.duchateau@gmail.com"
] | thibault.duchateau@gmail.com |
b9b7f228185ab3d9b588981981ac77d4b88ea498 | 9d0517091fe2313c40bcc88a7c82218030d2075c | /apis/cloudstack/src/test/java/org/jclouds/cloudstack/options/ListTagsOptionsTest.java | 9fa59dee1d0a57bcff06f6541c21682391649aae | [
"Apache-2.0"
] | permissive | nucoupons/Mobile_Applications | 5c63c8d97f48e1051049c5c3b183bbbaae1fa6e6 | 62239dd0f17066c12a86d10d26bef350e6e9bd43 | refs/heads/master | 2020-12-04T11:49:53.121041 | 2020-01-04T12:00:04 | 2020-01-04T12:00:04 | 231,754,011 | 0 | 0 | Apache-2.0 | 2020-01-04T12:02:30 | 2020-01-04T11:46:54 | Java | UTF-8 | Java | false | false | 6,526 | 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.jclouds.cloudstack.options;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.accountInDomain;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.customer;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.domainId;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.isRecursive;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.key;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.keyword;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.projectId;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.resourceId;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.resourceType;
import static org.jclouds.cloudstack.options.ListTagsOptions.Builder.value;
import static org.testng.Assert.assertEquals;
import com.google.common.collect.ImmutableList;
import org.jclouds.cloudstack.domain.Tag;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code ListTagsOptions}
*/
@Test(groups = "unit")
public class ListTagsOptionsTest {
public void testCustomer() {
ListTagsOptions options = new ListTagsOptions().customer("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("customer"));
}
public void testCustomerStatic() {
ListTagsOptions options = customer("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("customer"));
}
public void testDomainId() {
ListTagsOptions options = new ListTagsOptions().domainId("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
}
public void testDomainIdStatic() {
ListTagsOptions options = domainId("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
}
public void testAccountInDomainId() {
ListTagsOptions options = new ListTagsOptions().accountInDomain("adrian", "6");
assertEquals(ImmutableList.of("adrian"), options.buildQueryParameters().get("account"));
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
}
public void testAccountInDomainIdStatic() {
ListTagsOptions options = accountInDomain("adrian", "6");
assertEquals(ImmutableList.of("adrian"), options.buildQueryParameters().get("account"));
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
}
public void testIsRecursive() {
ListTagsOptions options = new ListTagsOptions().isRecursive(true);
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isrecursive"));
}
public void testIsRecursiveStatic() {
ListTagsOptions options = isRecursive(true);
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isrecursive"));
}
public void testKey() {
ListTagsOptions options = new ListTagsOptions().key("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("key"));
}
public void testKeyStatic() {
ListTagsOptions options = key("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("key"));
}
public void testKeyword() {
ListTagsOptions options = new ListTagsOptions().keyword("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("keyword"));
}
public void testKeywordStatic() {
ListTagsOptions options = keyword("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("keyword"));
}
public void testProjectId() {
ListTagsOptions options = new ListTagsOptions().projectId("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("projectid"));
}
public void testProjectIdStatic() {
ListTagsOptions options = projectId("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("projectid"));
}
public void testResourceId() {
ListTagsOptions options = new ListTagsOptions().resourceId("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("resourceid"));
}
public void testResourceIdStatic() {
ListTagsOptions options = resourceId("6");
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("resourceid"));
}
public void testResourceType() {
ListTagsOptions options = new ListTagsOptions().resourceType(Tag.ResourceType.TEMPLATE);
assertEquals(ImmutableList.of("Template"), options.buildQueryParameters().get("resourcetype"));
}
public void testResourceTypeStatic() {
ListTagsOptions options = resourceType(Tag.ResourceType.TEMPLATE);
assertEquals(ImmutableList.of("Template"), options.buildQueryParameters().get("resourcetype"));
}
public void testResourceTypeAsString() {
ListTagsOptions options = new ListTagsOptions().resourceType("Template");
assertEquals(ImmutableList.of("Template"), options.buildQueryParameters().get("resourcetype"));
}
public void testResourceTypeAsStringStatic() {
ListTagsOptions options = resourceType("Template");
assertEquals(ImmutableList.of("Template"), options.buildQueryParameters().get("resourcetype"));
}
public void testValue() {
ListTagsOptions options = new ListTagsOptions().value("some-value");
assertEquals(ImmutableList.of("some-value"), options.buildQueryParameters().get("value"));
}
public void testValueStatic() {
ListTagsOptions options = value("some-value");
assertEquals(ImmutableList.of("some-value"), options.buildQueryParameters().get("value"));
}
}
| [
"Administrator@fdp"
] | Administrator@fdp |
15cb5625aa0251789f9594686e13b87fce510df1 | 38ae33ee28f3836f6d77b46917825c9f9a07729e | /codility/src/com/codility/examples/SaddlePoint.java | 452d119c7db7a6304369e47d5f310743c659b0d2 | [] | no_license | chinmaysept/java_general | c4f771cd30cffdcd24870f93ea699ac4703e838c | cb391b0dd1a3908814f6f3d1c26251576afa9c74 | refs/heads/master | 2022-12-22T20:25:16.680389 | 2019-11-14T08:44:53 | 2019-11-14T08:44:53 | 221,638,495 | 0 | 0 | null | 2022-12-16T03:32:16 | 2019-11-14T07:36:18 | Java | UTF-8 | Java | false | false | 1,937 | java | package com.codility.examples;
public class SaddlePoint
{
static void findSaddlePoint(int[][] matrix)
{
for (int i = 0; i < matrix.length; i++)
{
int rowMin = matrix[i][0];
int colIndex = 0;
boolean saddlePoint = true;
//Finding the smallest element in ith row
for (int j = 1; j < matrix[i].length; j++)
{
if(matrix[i][j] < rowMin)
{
rowMin = matrix[i][j];
colIndex = j;
}
}
//Checking rowMin is also the largest element in its column
for (int j = 0; j < matrix.length; j++)
{
if(matrix[j][colIndex] > rowMin)
{
saddlePoint = false;
break;
}
}
if(saddlePoint)
{
System.out.println("Saddle Point is : "+rowMin);
}
}
}
public static void main(String[] args)
{
int[][] matrix = {{6,3,1}, {9,7,8}, {2,4,5}};
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
matrix[i][j] = matrix[i++][j++];
}
}
System.out.println("The input matrix is :");
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
System.out.print(matrix[i][j]+"\t");
}
System.out.println();
}
findSaddlePoint(matrix);
}
}
| [
"chinmaya.sept@rediffmail.com"
] | chinmaya.sept@rediffmail.com |
ba4e550f8117b9637d23138692ce15cb6469acae | 4a30370bcf0b9f95d81a97e1832b2f4b9d7d3c54 | /src/main/java/eu/javaexperience/datareprez/DataReceiver.java | 5463bea1eacab567dab7c573df75eda587c234f8 | [
"MIT"
] | permissive | danko-david/javaexperience-datareprez | b313a661c16d62e0ff8676661668b6610f85d521 | 49214319fdaccd7d37bdc2e421a4df0e883c3c74 | refs/heads/master | 2021-11-10T20:05:40.664841 | 2021-10-30T21:35:59 | 2021-10-30T21:35:59 | 173,982,503 | 0 | 1 | null | 2020-10-13T12:14:04 | 2019-03-05T16:32:30 | Java | UTF-8 | Java | false | false | 270 | java | package eu.javaexperience.datareprez;
import java.io.Closeable;
import java.io.IOException;
public interface DataReceiver extends DataCommon, Closeable
{
public DataObject receiveDataObject() throws IOException;
public DataArray readDataArray() throws IOException;
} | [
"info@dankodavid.hu"
] | info@dankodavid.hu |
a69319bac64cb18f676c63b0ae0f8e295531c913 | a4b111fcca1be07af77a34f4f233c626036afc42 | /BSIMS/src/main/java/com/bs/bsims/model/LeaveDetailResultVO.java | f09e16129077e063dbdeb1ceca7df7ee3bcacc99 | [] | no_license | wodewzl/wzllibrary | 340bf08a13f0dab26c0653948c53d032ee955b92 | be7c4d81a5108dd9123e84eeeebecf30e2f8d607 | refs/heads/master | 2021-06-30T00:11:32.667131 | 2017-09-19T06:07:59 | 2017-09-19T06:07:59 | 104,013,642 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 786 | java |
package com.bs.bsims.model;
public class LeaveDetailResultVO {
private LeaveDetailVO array;
private String code;
private String retinfo;
private String system_time;
public LeaveDetailVO getArray() {
return array;
}
public void setArray(LeaveDetailVO array) {
this.array = array;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getRetinfo() {
return retinfo;
}
public void setRetinfo(String retinfo) {
this.retinfo = retinfo;
}
public String getSystem_time() {
return system_time;
}
public void setSystem_time(String system_time) {
this.system_time = system_time;
}
}
| [
"273415345@qq.com"
] | 273415345@qq.com |
ecb020a21968665a23d47f5a296518961f2af8e5 | a80d3b90783a8ac32efb90c09c4688247e53ff45 | /src/main/java/com/idea/core/tags/html/AbstractHtmlTag.java | fe2d6271092f9c3bbe8900750ba71de28fc92c27 | [] | no_license | guanzheyuan/JBXQInte | 547e7bc95c7aec6fa97bd307110103496da8c9a3 | c96c3484acdef45df8f885b070f12214b7be9bf5 | refs/heads/master | 2020-03-28T10:27:40.391219 | 2018-08-29T02:56:26 | 2018-08-29T02:56:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,064 | java | package com.idea.core.tags.html;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.BodyTagSupport;
import com.idea.core.tags.html.manager.HtmlComponentManager;
import com.idea.core.utils.SpringContextHolder;
import com.idea.core.utils.StringUtils;
import com.idea.modules.sys.tags.SysFunctions;
import freemarker.cache.StringTemplateLoader;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
/**
*
* All rights Reserved, Designed By change.cn
*
* @title: ComponentTag.java
* @package com.idea.core.tags.html
* @description: 组建获取标签
* @author: 王存见
* @date: 2017年5月13日 上午9:05:06
* @version V1.0
* @copyright: 2017 change.cn Inc. All rights reserved.
*
*/
@SuppressWarnings("serial")
public abstract class AbstractHtmlTag extends BodyTagSupport {
// private static final String[] HTML_COMPONENTS = { "bootstrap",
// "bootstrap-fileinput" };
protected HtmlComponentManager htmlComponentManager = SpringContextHolder.getApplicationContext()
.getBean(HtmlComponentManager.class);
private static final String[] SUPPORT_TYPES = { "CSS", "JS" };
private String name = ""; // 组件名称
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/*
* 获取支持的html
*/
public String[] getHtmlComponents() {
return null;
}
/**
*
* @title: getSupportTypes
* @description: 获取支持的类型
* @return
* @return: String[]
*/
public abstract String[] getSupportTypes();
@Override
public int doStartTag() throws JspException {
return EVAL_PAGE;
}
public int doEndTag() throws JspTagException {
try {
// 初始化数据
JspWriter out = this.pageContext.getOut();
String content = "";
String[] components = name.split(",");
for (String component : components) {
if (isComponent(component)) {
String[] types = getSupportTypes();
if (types == null) {
types = SUPPORT_TYPES;
}
for (String type : types) {
String componentContent = getComponentHtml(component.toLowerCase(), type);
if (!StringUtils.isEmpty(componentContent)) {
content += componentContent + "\r\n";
}
}
}
}
content = parseContent(content);
out.print(content);
out.flush();
} catch (IOException e) {
e.printStackTrace();
} catch (TemplateException e) {
e.printStackTrace();
}
return EVAL_PAGE;
}
public String getComponentHtml(String component, String type) {
// String ftl = "/tags/html/" + type.toLowerCase() + "/" +
// component.toLowerCase() + ".flt";
try {
// String content =
// FreeMarkerUtils.initByDefaultTemplate().processToString(ftl,
// rootMap);
String content = "";
if (type.equals("CSS")) {
content = htmlComponentManager.getCssComponent(component);
} else if (type.equals("JS")) {
content = htmlComponentManager.getJsComponent(component);
} else if (type.equals("FRAGMENT")) {
content = htmlComponentManager.getFragmentComponent(component);
}
return content;
} catch (Exception e) {
return null;
}
}
private String parseContent(String content) throws TemplateException, IOException {
Map<String, Object> rootMap = new HashMap<String, Object>();
String ctx = pageContext.getServletContext().getContextPath() + SysFunctions.getAdminUrlPrefix();
String adminPath = pageContext.getServletContext().getContextPath() + SysFunctions.getAdminUrlPrefix()+"/admin";
String staticPath = pageContext.getServletContext().getContextPath() + "/static";
rootMap.put("ctx", ctx);
rootMap.put("adminPath", adminPath);
rootMap.put("staticPath", staticPath);
String tempname = StringUtils.hashKeyForDisk(content);
Configuration configuration = new Configuration();
configuration.setNumberFormat("#");
StringTemplateLoader stringLoader = new StringTemplateLoader();
stringLoader.putTemplate(tempname, content);
@SuppressWarnings("deprecation")
Template template = new Template(tempname, new StringReader(content));
StringWriter stringWriter = new StringWriter();
template.process(rootMap, stringWriter);
configuration.setTemplateLoader(stringLoader);
content = stringWriter.toString();
return content;
}
/**
*
* @title: isComponent
* @description:是否为组件
* @param name
* @return
* @return: boolean
*/
private boolean isComponent(String name) {
/*
* if (StringUtils.isEmpty(name)) { return false; } for (String
* component : HTML_COMPONENTS) { if (component.equals(name.trim())) {
* return true; } } // 扩展中的 String[] htmlComponents =
* getHtmlComponents(); if (htmlComponents != null) { for (String
* component : HTML_COMPONENTS) { if (component.equals(name.trim())) {
* return true; } } }
*/
return true;
}
}
| [
"834155417@qq.com"
] | 834155417@qq.com |
1b27ad8254324bf500aaab6ff8b1796a8fb64fb0 | 2c319d505e8f6a21708be831e9b5426aaa86d61e | /base/core/src/main/java/leap/core/meta/AbstractMTypeContainerCreator.java | fe1de18c4970210a9ebae6abd88edfae9fa14389 | [
"Apache-2.0"
] | permissive | leapframework/framework | ed0584a1468288b3a6af83c1923fad2fd228a952 | 0703acbc0e246519ee50aa9957f68d931fab10c5 | refs/heads/dev | 2023-08-17T02:14:02.236354 | 2023-08-01T09:39:07 | 2023-08-01T09:39:07 | 48,562,236 | 47 | 23 | Apache-2.0 | 2022-12-14T20:36:57 | 2015-12-25T01:54:52 | Java | UTF-8 | Java | false | false | 1,561 | java | /*
*
* * Copyright 2016 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 leap.core.meta;
import leap.lang.Args;
import leap.lang.meta.MTypeListener;
import leap.lang.meta.MTypeStrategy;
public abstract class AbstractMTypeContainerCreator implements MTypeContainerCreator {
protected MTypeStrategy strategy = MTypeStrategy.DEFAULT;
protected MTypeListener listener = MTypeListener.NOP;
protected boolean alwaysReturnComplexTypeRef;
@Override
public MTypeContainerCreator setListener(MTypeListener listener) {
Args.notNull(listener);
this.listener = listener;
return this;
}
@Override
public MTypeContainerCreator setStrategy(MTypeStrategy strategy) {
Args.notNull(strategy);
this.strategy = strategy;
return this;
}
@Override
public MTypeContainerCreator setAlwaysReturnComplexTypeRef(boolean b) {
alwaysReturnComplexTypeRef = b;
return this;
}
} | [
"live.evan@gmail.com"
] | live.evan@gmail.com |
38f2d14928cf2151edeb118036aacde09cdeab8b | a8b8caf6f930b509a778b4ffb275cc18a7ef3466 | /user-tests/persistence/src/main/java/com/collective/usertests/persistence/mappers/UserFeedbackMapper.java | 9eb6d4753469adca8696da4a1a8c9a69e3bdd127 | [] | no_license | Jsalim/collective | f0a37d8e57f810eda66d4bd47be358a9d618bbf5 | 3bea33759b7a161e35ab4031c830ef05a6d2064c | refs/heads/master | 2020-12-28T19:57:52.275624 | 2013-07-01T11:18:28 | 2013-07-01T11:18:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 527 | java | package com.collective.usertests.persistence.mappers;
import com.collective.usertests.model.UserFeedback;
import java.util.List;
/**
* @author Matteo Moci ( matteo.moci (at) gmail.com )
*/
public interface UserFeedbackMapper {
public void insertUserFeedback(UserFeedback userFeedback);
public UserFeedback getUserFeedback(Long id);
public void updateUserFeedback(UserFeedback userFeedback);
public void deleteUserFeedback(Long id);
public List<UserFeedback> getAllUserFeedbackByUserId(Long userId);
}
| [
"matteo.moci@gmail.com"
] | matteo.moci@gmail.com |
6a48f5dfebeb7ec1db504794182aa43fe3bb44eb | 1918ed55ad8c6b461b0dfd9496046fab77e2c879 | /src/main/java/com/cloudera/cdp/datahub/model/DescribeClusterDefinitionRequest.java | df78c9554c18821f05a8b25d48675b17f3fe5e71 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | gynyc/cdp-sdk-java | 70ee9caf8af9b11d47b3de2e886817d9bbd28258 | 62db48996cdf3a729b79fe2ef5d9b5e00c839448 | refs/heads/master | 2020-12-04T22:29:14.396789 | 2019-09-19T21:18:08 | 2019-09-19T21:18:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,870 | java | /*
* Copyright (c) 2018 Cloudera, Inc. All Rights Reserved.
*
* Portions Copyright (c) Copyright 2013-2018 Amazon.com, Inc. or its
* affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.cloudera.cdp.datahub.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.cloudera.cdp.client.CdpResponse;
/**
* Request object for describe cluster definition request.
**/
@javax.annotation.Generated(value = "com.cloudera.cdp.client.codegen.CdpSDKJavaCodegen", date = "2019-09-19T14:17:01.940-07:00")
public class DescribeClusterDefinitionRequest {
/**
* The name or CRN of the cluster definition.
**/
private String clusterDefinitionName = null;
/**
* Getter for clusterDefinitionName.
* The name or CRN of the cluster definition.
**/
@JsonProperty("clusterDefinitionName")
public String getClusterDefinitionName() {
return clusterDefinitionName;
}
/**
* Setter for clusterDefinitionName.
* The name or CRN of the cluster definition.
**/
public void setClusterDefinitionName(String clusterDefinitionName) {
this.clusterDefinitionName = clusterDefinitionName;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DescribeClusterDefinitionRequest describeClusterDefinitionRequest = (DescribeClusterDefinitionRequest) o;
if (!Objects.equals(this.clusterDefinitionName, describeClusterDefinitionRequest.clusterDefinitionName)) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash(clusterDefinitionName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DescribeClusterDefinitionRequest {\n");
sb.append(" clusterDefinitionName: ").append(toIndentedString(clusterDefinitionName)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line except the first indented by 4 spaces.
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"dev-kitchen@cloudera.com"
] | dev-kitchen@cloudera.com |
45bbc31d0dec831351b2f7a5175db80571b359bd | edec43f0c6aabb40771f8d7b64ded6595e211bbb | /core-ng/src/main/java/core/framework/internal/web/response/FileBody.java | 3e3bd9d4676ccb1cd1de46b5b351b83d91d90ef3 | [
"Apache-2.0"
] | permissive | neowu/core-ng-project | c8fc070e79687a98c0b004c7f608c4eece9effa1 | 3b51e65ca0746626d65ea3b3d830076325cdf59f | refs/heads/master | 2023-09-01T11:55:13.908848 | 2023-09-01T03:04:10 | 2023-09-01T03:04:10 | 38,562,009 | 145 | 63 | Apache-2.0 | 2023-06-06T13:45:30 | 2015-07-05T08:21:08 | Java | UTF-8 | Java | false | false | 2,870 | java | package core.framework.internal.web.response;
import core.framework.log.ErrorCode;
import core.framework.log.Severity;
import core.framework.util.Files;
import io.undertow.io.IoCallback;
import io.undertow.io.Sender;
import io.undertow.server.HttpServerExchange;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xnio.IoUtils;
import java.io.IOException;
import java.io.Serial;
import java.io.UncheckedIOException;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.FileChannel;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
/**
* @author neo
*/
public final class FileBody implements Body {
private static final Logger LOGGER = LoggerFactory.getLogger(FileBody.class);
private final Path path;
public FileBody(Path path) {
this.path = path;
}
@Override
public long send(Sender sender, ResponseHandlerContext context) {
LOGGER.debug("[response] file={}", path);
try {
long size = Files.size(path);
FileChannel channel = FileChannel.open(path, StandardOpenOption.READ);
sender.transferFrom(channel, new FileBodyCallback(channel));
return size;
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
static class FileBodyCallback implements IoCallback {
private final FileChannel channel;
FileBodyCallback(FileChannel channel) {
this.channel = channel;
}
@Override
public void onComplete(HttpServerExchange exchange, Sender sender) {
IoUtils.safeClose(channel);
END_EXCHANGE.onComplete(exchange, sender);
}
@Override
public void onException(HttpServerExchange exchange, Sender sender, IOException exception) {
IoUtils.safeClose(channel);
END_EXCHANGE.onException(exchange, sender, exception);
throw convertException(exception);
}
UncheckedIOException convertException(IOException exception) {
// convert client abort exception to warning, e.g. user closed browser before content is transferred completely
if (exception instanceof ClosedChannelException) {
return new ClientAbortException(exception);
}
return new UncheckedIOException(exception);
}
}
static class ClientAbortException extends UncheckedIOException implements ErrorCode {
@Serial
private static final long serialVersionUID = 3981103270777664274L;
ClientAbortException(IOException cause) {
super(cause);
}
@Override
public String errorCode() {
return "CLIENT_ABORT";
}
@Override
public Severity severity() {
return Severity.WARN;
}
}
}
| [
"neowu.us@gmail.com"
] | neowu.us@gmail.com |
430d1a5864809cb38d0fe1cbfb42f6f1c8cfbdfb | d5f09c7b0e954cd20dd613af600afd91b039c48a | /sources/androidx/appcompat/text/AllCapsTransformationMethod.java | 2d02eed409ef0d8c0f794d707eea66f6cc33096a | [] | 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 | 889 | java | package androidx.appcompat.text;
import android.content.Context;
import android.graphics.Rect;
import android.text.method.TransformationMethod;
import android.view.View;
import java.util.Locale;
public class AllCapsTransformationMethod implements TransformationMethod {
private Locale mLocale;
@Override // android.text.method.TransformationMethod
public void onFocusChanged(View view, CharSequence charSequence, boolean z, int i, Rect rect) {
}
public AllCapsTransformationMethod(Context context) {
this.mLocale = context.getResources().getConfiguration().locale;
}
@Override // android.text.method.TransformationMethod
public CharSequence getTransformation(CharSequence charSequence, View view) {
if (charSequence != null) {
return charSequence.toString().toUpperCase(this.mLocale);
}
return null;
}
}
| [
"test@gmail.com"
] | test@gmail.com |
a57ca757d52ee02ee9f4fdb805ce9b3e10ccb0b1 | c06837ffd4009cd700b25b8a565a08187b0f720e | /im/src/main/java/cn/lds/im/view/CostSheetActivity.java | e9194d09b2df0656e14c283420883b82d8b477fb | [] | no_license | binbin5257/A002 | 034c469b8607a368aa80c0c31fc833ab858f45f4 | 9a78f4516b7be45c30eed4ff66c44410042b9828 | refs/heads/master | 2020-04-06T08:27:10.603355 | 2019-08-08T01:35:20 | 2019-08-08T01:35:20 | 157,305,134 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,259 | java | package cn.lds.im.view;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
import cn.lds.chat.R;
import cn.lds.chatcore.common.GsonImplHelp;
import cn.lds.chatcore.common.LoadingDialog;
import cn.lds.chatcore.common.LogHelper;
import cn.lds.chatcore.common.PopWindowHelper;
import cn.lds.chatcore.common.ToolsHelper;
import cn.lds.chatcore.data.HttpResult;
import cn.lds.chatcore.db.AccountsTable;
import cn.lds.chatcore.event.HttpRequestErrorEvent;
import cn.lds.chatcore.event.HttpRequestEvent;
import cn.lds.chatcore.manager.AccountManager;
import cn.lds.chatcore.view.BaseActivity;
import cn.lds.im.common.ModuleHttpApi;
import cn.lds.im.common.ModuleHttpApiKey;
import cn.lds.im.data.PaymentsDetailModel;
import de.greenrobot.event.EventBus;
/**
* 费用明细页面
*/
public class CostSheetActivity extends BaseActivity {
// 标题
@ViewInject(R.id.top_title_tv)
protected TextView topTitle;
// 返回按钮
@ViewInject(R.id.top_back_btn)
protected Button btnBack;
@ViewInject(R.id.top_menu_btn_del)
protected ImageView topbar_menu_service;
@ViewInject(R.id.costsheetactivity_paymentDescription)
protected TextView costsheetactivity_paymentDescription;
@ViewInject(R.id.costsheetactivity_odometer)
protected TextView costsheetactivity_odometer;
@ViewInject(R.id.costsheetactivity_time)
protected TextView costsheetactivity_time;
@ViewInject(R.id.costsheetactivity_amountPayable)
protected TextView costsheetactivity_amountPayable;
@ViewInject(R.id.costsheetactivity_amount)
protected TextView costsheetactivity_amount;
@ViewInject(R.id.costsheetactivity_amountaccount)
protected TextView costsheetactivity_amountaccount;
@ViewInject(R.id.costsheetactivity_timecost)
protected TextView costsheetactivity_timecost;
@ViewInject(R.id.costsheetactivity_distancecost)
protected TextView costsheetactivity_distancecost;
@ViewInject(R.id.costsheetactivity_yajin)
protected TextView costsheetactivity_yajin;
protected String id;
protected CostSheetActivity activity;
protected int layoutID = R.layout.activity_cost_sheet;
public void setActivity(CostSheetActivity activity) {
this.activity = activity;
}
public void setLayoutID(int layoutID) {
this.layoutID = layoutID;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layoutID);
ViewUtils.inject(CostSheetActivity.class,this);
if(null != activity){
ViewUtils.inject(activity);
}
initConfig();
}
protected void initConfig() {
id = getIntent().getAction();
init();
}
public void init() {
topTitle.setVisibility(View.VISIBLE);
topTitle.setText(getString(R.string.costsheetactivity_title));
btnBack.setVisibility(View.VISIBLE);
topbar_menu_service.setVisibility(View.VISIBLE);
topbar_menu_service.setImageResource(R.drawable.topbar_menu_customerservice);
}
@OnClick({R.id.top_back_btn,
R.id.top_menu_btn_del
})
public void onClick(View view) {
switch (view.getId()) {
case R.id.top_back_btn:
finish();
break;
case R.id.top_menu_btn_del:
PopWindowHelper.getInstance().openCustomerservice(mContext).show(findViewById(R.id.top__iv));
break;
}
}
@Override
protected void onStart() {
super.onStart();
try {
EventBus.getDefault().register(this);
ModuleHttpApi.reservationOrderPaymentsDetail(id);
} catch (Exception e) {
LogHelper.e(getString(R.string.default_bus_register), e);
}
}
@Override
protected void onStop() {
super.onStop();
try {
EventBus.getDefault().unregister(this);
} catch (Exception e) {
}
}
public void onEventMainThread(HttpRequestEvent event) {
HttpResult httpResult = event.httpResult;
String apiNo = httpResult.getApiNo();
if (!(ModuleHttpApiKey.reservationOrderPaymentsDetail.equals(apiNo))) {
return;
}
LoadingDialog.dismissDialog();
String result = httpResult.getResult();
if (!ToolsHelper.isNull(result)) {
switch (apiNo) {
case ModuleHttpApiKey.reservationOrderPaymentsDetail:
C007(httpResult.getResult());
break;
}
}
}
public void onEventMainThread(HttpRequestErrorEvent event) {
HttpResult httpResult = event.httpResult;
String apiNo = httpResult.getApiNo();
if (!(ModuleHttpApiKey.reservationOrderPaymentsDetail.equals(apiNo))) {
return;
}
LoadingDialog.dismissDialog();
ToolsHelper.showStatus(mContext, false, "获取费用明细失败");
}
protected void C007(String result) {
PaymentsDetailModel detailModel = GsonImplHelp.get().toObject(result, PaymentsDetailModel.class);
if (null != detailModel.getData())
setData(detailModel.getData());
}
protected void setData(PaymentsDetailModel.DataBean data) {
try {
//计费说明
costsheetactivity_paymentDescription.setText(ToolsHelper.getDouble(data.getTimeCost() / 100)
+ mContext.getString(R.string.order_unit_minute)
+ ToolsHelper.getDouble(data.getDistanceCost() / 100)
+ mContext.getString(R.string.order_unit_mileage));
//总里程
costsheetactivity_odometer.setText(ToolsHelper.getDouble(data.getOdometer()));
//总时长
costsheetactivity_time.setText(ToolsHelper.getDouble(data.getTime()));
// 应付金额
costsheetactivity_amountPayable.setText(ToolsHelper.getDouble(data.getAmountPayable() / 100));
//余额支付
costsheetactivity_amountaccount.setText("0.00");
//实付
costsheetactivity_amount.setText(ToolsHelper.getDouble(data.getAmount() / 100));
//里程费
double b = data.getDistanceCost() * data.getOdometer();
costsheetactivity_distancecost.setText(ToolsHelper.getDouble(b / 100));
//用时费
double t = data.getTimeCost() * data.getTime();
costsheetactivity_timecost.setText(ToolsHelper.getDouble(t / 100));
AccountsTable table = AccountManager.getInstance().findByNo();
//押金
costsheetactivity_yajin.setText(table.getForegiftAmount());
} catch (Exception e) {
LogHelper.e(e.toString());
}
}
}
| [
"13624266523@163.com"
] | 13624266523@163.com |
704fbf30551c530dca652a1809306b4b23622643 | 37b02b3e23ca271d8786314469ea9cf5f6c69095 | /$101_symmetric_tree/SymmetricTree.java | e0d3cd735cd1c86a510bb1758fd52c718f1a0946 | [
"Apache-2.0"
] | permissive | xandersu/MyLeetCode | 1d16177a0c15c853aa474db9046b0f4555a6d84a | 3572c35209cae550a6ce84480155ebdc0e59052f | refs/heads/master | 2021-07-01T08:38:52.232566 | 2020-08-30T11:17:35 | 2020-08-30T11:17:35 | 142,386,168 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 907 | java | package $101_symmetric_tree;
/**
* @author: suxun
* @date: 2020/4/29 14:20
* @description: 101. 对称二叉树
* 给定一个二叉树,检查它是否是镜像对称的。
*/
public class SymmetricTree {
public static class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) {
val = x;
}
}
public boolean isSymmetric(TreeNode root) {
if (root == null) {
return true;
}
return isMirror(root.left, root.right);
}
public static boolean isMirror(TreeNode t1, TreeNode t2) {
if (t1 == null && t2 == null) {
return true;
} else if (t1 == null || t2 == null) {
return false;
}
if (t1.val != t2.val) {
return false;
}
return isMirror(t1.left, t2.right) && isMirror(t1.right, t2.left);
}
}
| [
"840595532@qq.com"
] | 840595532@qq.com |
0c10602f35b24bfbdbe545d6e20e1cd585caa6f3 | 3a99f2a3a7d368641592e41806bae1a882c6263b | /KalturaClient/src/main/java/com/kaltura/client/enums/LiveChannelOrderBy.java | 35d6ea10aedd3a4fa6e05943ce60e7e7aea56da0 | [
"MIT"
] | permissive | fahadnasrullah109/KalturaClient-Android | 762934a818ecdd0527ff7275594beb6e60724354 | f753b968023e55b7629ccefce845e2482d2f6dae | refs/heads/master | 2020-04-04T18:50:15.830303 | 2018-11-05T10:56:19 | 2018-11-05T10:56:19 | 156,181,417 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,415 | java | // ===================================================================================================
// _ __ _ _
// | |/ /__ _| | |_ _ _ _ _ __ _
// | ' </ _` | | _| || | '_/ _` |
// |_|\_\__,_|_|\__|\_,_|_| \__,_|
//
// This file is part of the Kaltura Collaborative Media Suite which allows users
// to do with audio, video, and animation what Wiki platfroms allow them to do with
// text.
//
// Copyright (C) 2006-2018 Kaltura Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// @ignore
// ===================================================================================================
package com.kaltura.client.enums;
/**
* This class was generated using exec.php
* against an XML schema provided by Kaltura.
*
* MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN.
*/
public enum LiveChannelOrderBy implements EnumAsString {
CREATED_AT_ASC("+createdAt"),
DURATION_ASC("+duration"),
END_DATE_ASC("+endDate"),
FIRST_BROADCAST_ASC("+firstBroadcast"),
LAST_BROADCAST_ASC("+lastBroadcast"),
LAST_PLAYED_AT_ASC("+lastPlayedAt"),
MEDIA_TYPE_ASC("+mediaType"),
MODERATION_COUNT_ASC("+moderationCount"),
NAME_ASC("+name"),
PARTNER_SORT_VALUE_ASC("+partnerSortValue"),
PLAYS_ASC("+plays"),
RANK_ASC("+rank"),
RECENT_ASC("+recent"),
START_DATE_ASC("+startDate"),
TOTAL_RANK_ASC("+totalRank"),
UPDATED_AT_ASC("+updatedAt"),
VIEWS_ASC("+views"),
WEIGHT_ASC("+weight"),
CREATED_AT_DESC("-createdAt"),
DURATION_DESC("-duration"),
END_DATE_DESC("-endDate"),
FIRST_BROADCAST_DESC("-firstBroadcast"),
LAST_BROADCAST_DESC("-lastBroadcast"),
LAST_PLAYED_AT_DESC("-lastPlayedAt"),
MEDIA_TYPE_DESC("-mediaType"),
MODERATION_COUNT_DESC("-moderationCount"),
NAME_DESC("-name"),
PARTNER_SORT_VALUE_DESC("-partnerSortValue"),
PLAYS_DESC("-plays"),
RANK_DESC("-rank"),
RECENT_DESC("-recent"),
START_DATE_DESC("-startDate"),
TOTAL_RANK_DESC("-totalRank"),
UPDATED_AT_DESC("-updatedAt"),
VIEWS_DESC("-views"),
WEIGHT_DESC("-weight");
private String value;
LiveChannelOrderBy(String value) {
this.value = value;
}
@Override
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
public static LiveChannelOrderBy get(String value) {
if(value == null)
{
return null;
}
// goes over LiveChannelOrderBy defined values and compare the inner value with the given one:
for(LiveChannelOrderBy item: values()) {
if(item.getValue().equals(value)) {
return item;
}
}
// in case the requested value was not found in the enum values, we return the first item as default.
return LiveChannelOrderBy.values().length > 0 ? LiveChannelOrderBy.values()[0]: null;
}
}
| [
"fahad.nasrullah@sofodynamix.com"
] | fahad.nasrullah@sofodynamix.com |
557eaebee2728beaa8eae922c6837fa539473281 | fba2092bf9c8df1fb6c053792c4932b6de017ceb | /wms/WEB-INF/src/jp/co/daifuku/wms/base/common/tool/logViewer/LvDateTimePanel.java | 8fe8e825747cc753ea9e2a0e537ae3c17ea03217 | [] | no_license | FlashChenZhi/exercise | 419c55c40b2a353e098ce5695377158bd98975d3 | 51c5f76928e79a4b3e1f0d68fae66ba584681900 | refs/heads/master | 2020-04-04T03:23:44.912803 | 2018-11-01T12:36:21 | 2018-11-01T12:36:21 | 155,712,318 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,054 | java | //$Id: LvDateTimePanel.java 87 2008-10-04 03:07:38Z admin $
package jp.co.daifuku.wms.base.common.tool.logViewer;
/**
* Copyright 2006 DAIFUKU Co.,Ltd. All Rights Reserved.
*
* This software is the proprietary information of DAIFUKU Co.,Ltd.
* Use is subject to license terms.
*/
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
/**
* ログビューワで使用する処理日時表示ラベル、テキストフィールドのパネルコンポーネントです。
*/
public class LvDateTimePanel extends JPanel
{
/**
* このクラスのバージョンを返します
* @return バージョンと日付
*/
public static String getVersion()
{
return "$Revision: 87 $,$Date: 2008-10-04 12:07:38 +0900 (土, 04 10 2008) $";
}
/**
* 設定ファイルから背景色を取得
*/
protected final int[] formBackColor = LogViewerParam.BackColor;
/**
* テキストフィールド背景色のRGB値
*/
protected final Color textColor = new Color(255, 255, 255);
/**
* ラベルサイズ
*/
final Dimension LabelSize = new Dimension(100, 26);
/**
* ボタンラベルのフォント
*/
protected final Font LabelFont = new Font("Serif", Font.PLAIN, 12);
/**
* デフォルトコンストラクタ
*/
public LvDateTimePanel()
{
super(new FlowLayout());
}
/**
* 表示するラベル文字列の番号を指定するコンストラクタ
*
* @param msgNo DispResourceの番号
* @param date 処理日時
*/
public LvDateTimePanel(String msgNo, String date)
{
super();
initialize(msgNo, date);
}
/**
* 表示するラベル文字列の番号を指定します。
*
* @param msgNo DispResourceの番号
* @param processDate 処理日時
*/
public void initialize (String msgNo, String processDate)
{
// 処理日時ラベル
JLabel lblDate;
// 処理日時表示テキストフィールド
JTextField txtDate;
// パネル構成
String title = DispResourceFile.getText(msgNo);
lblDate = new JLabel(title); // 処理日時ラベル
txtDate = new JTextField(processDate); // 処理日時表示テキストフィールド
lblDate.setPreferredSize(LabelSize);
lblDate.setHorizontalAlignment(JLabel.RIGHT);
lblDate.setFont(LabelFont);
// パネル内設定
txtDate.setEditable(false); // 入力不可設定
txtDate.setBackground(textColor); // 日時処理テキストフィールド背景色
Color backColor = new Color(formBackColor[0], formBackColor[1], formBackColor[2]);
lblDate.setBackground(backColor);
this.setBackground(backColor); // パネル背景色を指定
this.setSize(100,100); // パネルサイズを指定
// RFT入力ラベル・RFT入力欄を追加
this.add(lblDate);
this.add(txtDate);
}
}
| [
"zhangming@worgsoft.com"
] | zhangming@worgsoft.com |
11d9d4116ef43f4bee65caf9b299c109ee80a16f | dbde38010aee32c5d04e58feca47c0d30abe34f5 | /subprojects/opennaef.devicedriver.core/src/main/java/voss/model/PortCrossConnection.java | 699d98024cc790e478a52a7d19c04ed117e39438 | [
"Apache-2.0"
] | permissive | openNaEF/openNaEF | c2c8d5645b499aae36d90205dbc91421f4d0bd7b | c88f0e17adc8d3f266787846911787f9b8aa3b0d | refs/heads/master | 2020-12-30T15:41:09.806501 | 2017-05-22T22:37:24 | 2017-05-22T22:38:36 | 91,155,672 | 13 | 0 | null | null | null | null | UTF-8 | Java | false | false | 775 | java | package voss.model;
import java.io.Serializable;
import java.util.Set;
public interface PortCrossConnection extends Serializable {
void initDevice(Device device);
String getName();
void initName(String name);
void addPort(Port port);
void addPort(Port port, Priority priority);
boolean contains(Port port);
Port getConnectedPort(Port port);
Set<Port> getConnectedPorts(Port port);
Set<Port> getConnectedPorts();
Priority getPriority(Port port);
Port getPrioritizedPort(Priority priority);
ConnectionMode getConnectionMode();
public static enum ConnectionMode {
PORT_TO_PORT,
MULTIPLE_PORT,;
}
public static enum Priority {
PRIMARY,
SECONDARY,
NORNAL,;
}
} | [
"t.yamazaki@ttscweb.jp"
] | t.yamazaki@ttscweb.jp |
cf64403cf87af23295c59a097b3c0b2dd431d243 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /ehpc-20180412/src/main/java/com/aliyun/ehpc20180412/models/StopNodesResponseBody.java | 832173ba10718660a8ef1778c7710cd0ed66067c | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 987 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ehpc20180412.models;
import com.aliyun.tea.*;
public class StopNodesResponseBody extends TeaModel {
/**
* <p>The ID of the request.</p>
*/
@NameInMap("RequestId")
public String requestId;
/**
* <p>The ID of the task.</p>
*/
@NameInMap("TaskId")
public String taskId;
public static StopNodesResponseBody build(java.util.Map<String, ?> map) throws Exception {
StopNodesResponseBody self = new StopNodesResponseBody();
return TeaModel.build(map, self);
}
public StopNodesResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public StopNodesResponseBody setTaskId(String taskId) {
this.taskId = taskId;
return this;
}
public String getTaskId() {
return this.taskId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
f5a5ae9a03a7b12d2cbbe45c18e926dd7c999977 | 98f72ba07cce0f6f6df13c314e06ec39f816e907 | /src/main/java/com/github/houbb/pinyin/model/ToneItem.java | 921845d6ef1f831a02a90d180b8e257fa872c2f0 | [
"Apache-2.0"
] | permissive | houbb/pinyin | e75046d826e6cc8c3d660a8c13ffeb0c554dd372 | 839e4a972b539d480101841cd663f4f773d3a4cb | refs/heads/master | 2023-09-03T12:21:11.932253 | 2023-03-27T09:50:02 | 2023-03-27T09:50:02 | 234,240,960 | 179 | 34 | Apache-2.0 | 2022-03-15T03:58:52 | 2020-01-16T05:15:22 | Java | UTF-8 | Java | false | false | 972 | java | package com.github.houbb.pinyin.model;
/**
* <p> project: pinyin-ToneItem </p>
* <p> create on 2020/1/18 16:14 </p>
*
* @author Administrator
* @since 0.0.3
*/
public class ToneItem {
/**
* 字母
*/
private char letter;
/**
* 声调
* @since 0.0.3
*/
private int tone;
/**
* 构建对象实例
* @param letter 字母
* @param tone 声调
* @return 结果
* @since 0.0.3
*/
public static ToneItem of(final char letter,
final int tone) {
ToneItem item = new ToneItem();
item.letter = letter;
item.tone = tone;
return item;
}
public char getLetter() {
return letter;
}
public int getTone() {
return tone;
}
@Override
public String toString() {
return "ToneItem{" +
"letter=" + letter +
", tone=" + tone +
'}';
}
}
| [
"1060732496@qq.com"
] | 1060732496@qq.com |
487506f865fb3f3f368a3ade9649356acdd7adfc | 25abb3e2162d8219ab5c4697f2f25c5d8239a15b | /java9_concurrency_cookbook/src/main/java/ua/kruart/chapter03_concurrent_utilities/recipe03_cyclicbarrier/utils/MatrixMock.java | 5338bb672f20e225a35b6ff2f7fc69b43cd516d8 | [] | no_license | kruart/concurrency_learning | 6821a35a1712efec8f9c7420aac8a22eb03b0d82 | 151e4c5b2543c859844ab06bb33e35a851cd1adc | refs/heads/master | 2021-08-14T17:15:07.107383 | 2017-10-28T10:45:33 | 2017-10-28T10:45:33 | 110,950,978 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,575 | java | package ua.kruart.chapter03_concurrent_utilities.recipe03_cyclicbarrier.utils;
import java.util.Random;
/**
* This class generates a random matrix of integer numbers between 1 and 10
*
*/
public class MatrixMock {
/**
* Bi-dimensional array with the random numbers
*/
private final int data[][];
/**
* Constructor of the class. Generates the bi-dimensional array of numbers.
* While generates the array, it counts the times that appears the number we are going
* to look for so we can check that the CiclycBarrier class does a good job
* @param size Number of rows of the array
* @param length Number of columns of the array
* @param number Number we are going to look for
*/
public MatrixMock(int size, int length, int number){
int counter = 0;
data = new int[size][length];
Random random = new Random();
for (int i = 0; i < size; i++) {
for (int j = 0; j < length; j++){
data[i][j] = random.nextInt(10);
if (data[i][j] == number){
counter++;
}
}
}
System.out.printf("Mock: There are %d occurrences of %d in generated data.\n", counter, number);
}
/**
* This methods returns a row of the bi-dimensional array
* @param row the number of the row to return
* @return the selected row
*/
public int[] getRow(int row){
if ((row >= 0) && (row < data.length)){
return data[row];
}
return null;
}
}
| [
"weoz@ukr.net"
] | weoz@ukr.net |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.