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
8ba1ad2fdb0b98360664f5685a1b386fe30f49fd
115430aad62f0aadfaf717e3244b00cefb7e83fa
/practicaBD01/src/main/java/net/tecgurus/bd01/persistence/ClientDAO.java
5ee47cf8a7d7e22587f8239b4c14c857059c1734
[]
no_license
amaro-coria/tec_gurus_spring_marzo_abril_2019
4460f1baa18fb946a22f9b7e9a19c6b3dc227eb4
c2267fec0c2bfe50f12830e35ead6e7f2a3ab12f
refs/heads/master
2020-04-29T08:55:15.527092
2019-04-20T18:23:03
2019-04-20T18:23:03
176,004,192
0
0
null
null
null
null
UTF-8
Java
false
false
163
java
package net.tecgurus.bd01.persistence; import java.util.List; import net.tecgurus.bd01.dto.Client; public interface ClientDAO { List<Client> findAll(); }
[ "amaro.coria@gmail.com" ]
amaro.coria@gmail.com
8326b6b5d0b48d2c3325021d0dc2bf77e7b18678
2232caab5e3053ad696545ddbb6cf8e1f5b1cec1
/oasis-regrep-4.0/src/org/oasis/ebxml/registry/bindings/rim/ActionType.java
85e44c1d0e3fd39e8cff70650183b5229c271427
[]
no_license
IcarPA-TBlab/OASIS-ebXML-RegRep-v4.0
d6da9f6cfdb2f9bb28420b96b869c0840de3d160
f425aa254c80839a7d6baa9074b5308c3d17c8ea
refs/heads/master
2016-09-06T07:01:04.985101
2015-02-10T09:12:42
2015-02-10T09:12:42
29,960,235
2
0
null
null
null
null
UTF-8
Java
false
false
3,778
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.02.03 at 05:40:14 PM MEZ // package org.oasis.ebxml.registry.bindings.rim; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Represents an action on a set of affected RegistryObjects within an AuditableEvent. * * <p>Java class for ActionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ActionType"> * &lt;complexContent> * &lt;extension base="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0}ExtensibleObjectType"> * &lt;sequence> * &lt;element name="AffectedObjects" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0}RegistryObjectListType" minOccurs="0"/> * &lt;element name="AffectedObjectRefs" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0}ObjectRefListType" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="eventType" use="required" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0}objectReferenceType" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ActionType", propOrder = { "affectedObjects", "affectedObjectRefs" }) public class ActionType extends ExtensibleObjectType { @XmlElement(name = "AffectedObjects") protected RegistryObjectListType affectedObjects; @XmlElement(name = "AffectedObjectRefs") protected ObjectRefListType affectedObjectRefs; @XmlAttribute(required = true) protected String eventType; /** * Gets the value of the affectedObjects property. * * @return * possible object is * {@link RegistryObjectListType } * */ public RegistryObjectListType getAffectedObjects() { return affectedObjects; } /** * Sets the value of the affectedObjects property. * * @param value * allowed object is * {@link RegistryObjectListType } * */ public void setAffectedObjects(RegistryObjectListType value) { this.affectedObjects = value; } /** * Gets the value of the affectedObjectRefs property. * * @return * possible object is * {@link ObjectRefListType } * */ public ObjectRefListType getAffectedObjectRefs() { return affectedObjectRefs; } /** * Sets the value of the affectedObjectRefs property. * * @param value * allowed object is * {@link ObjectRefListType } * */ public void setAffectedObjectRefs(ObjectRefListType value) { this.affectedObjectRefs = value; } /** * Gets the value of the eventType property. * * @return * possible object is * {@link String } * */ public String getEventType() { return eventType; } /** * Sets the value of the eventType property. * * @param value * allowed object is * {@link String } * */ public void setEventType(String value) { this.eventType = value; } }
[ "messina@pa.icar.cnr.it" ]
messina@pa.icar.cnr.it
8787da4b7d00894fd25b0b63f988726dd9d06af5
d3e7a9e24de77e45bd79dacde2e4e192267eab95
/modules/lottery-guilvweb/src/main/java/com/sky/apps/action/lottery/web/scanner/guilv/cq/CqGuilvScanner33.java
f64a7065db50c32112a7a31acfc40b3dc5ecdaea
[]
no_license
sky8866/lottery
95dc902c95e084bd6320aa39c415d645a16867b0
b315ad1a3c79e2d3fe4b1761bacbe2aeb717a8b8
refs/heads/master
2021-01-20T08:33:25.720748
2017-08-28T02:29:14
2017-08-28T02:29:14
101,560,668
0
0
null
null
null
null
UTF-8
Java
false
false
4,377
java
/******************************************************************************* * Copyright (c) 2005, 2014 springside.github.io * * Licensed under the Apache License, Version 2.0 (the "License"); *******************************************************************************/ package com.sky.apps.action.lottery.web.scanner.guilv.cq; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; import com.sky.apps.action.lottery.web.job.guilv.QueryComm; import com.sky.apps.action.lottery.web.utils.guilv.CqLotteryUtils; import com.sky.apps.action.lottery.web.utils.guilv.LotteryUtils; import com.sky.apps.action.lottery.web.utils.guilv.NumCountUtils; import com.sky.apps.action.lottery.web.utils.guilv.CqGuilvUtils; import com.sky.apps.action.lottery.web.utils.guilv.CqNumCountUtils; import com.sky.apps.action.lottery.web.vo.guilv.ComparatorCqsscGuilv; import com.sky.modules.core.bean.MatchType; import com.sky.modules.core.bean.PageView; import com.sky.modules.core.bean.PropertyFilter; import com.sky.modules.core.utils.StringUtils; import com.sky.modules.core.utils.UtilDate; import com.sky.modules.lottery.entity.guilv.Guilv; import com.sky.modules.lottery.entity.guilv.GuilvRemoveCount; import com.sky.modules.lottery.entity.guilv.CqsscGuilv; import com.sky.modules.lottery.entity.guilv.CqGuilv; import com.sky.modules.lottery.entity.guilv.GuilvPeer; import com.sky.modules.lottery.entity.guilv.GuilvSum; import com.sky.modules.lottery.entity.guilv.Invest; import com.sky.modules.lottery.entity.guilv.InvestSum; import com.sky.modules.lottery.entity.guilv.Lottery; import com.sky.modules.lottery.entity.guilv.CqsscLottery; import com.sky.modules.lottery.entity.guilv.XjsscLottery; import com.sky.modules.lottery.entity.guilv.CqsscLottery; import com.sky.modules.lottery.entity.guilv.CqsscPlan; import com.sky.modules.lottery.entity.guilv.XjsscPlan; import com.sky.modules.lottery.service.guilv.GuilvRemoveConditionService; import com.sky.modules.lottery.service.guilv.GuilvRemoveCountService; import com.sky.modules.lottery.service.guilv.GuilvInvestService; import com.sky.modules.lottery.service.guilv.GuilvInvestSumService; import com.sky.modules.lottery.service.guilv.CqGuilvRemoveConditionService; import com.sky.modules.lottery.service.guilv.CqGuilvRemoveCountService; import com.sky.modules.lottery.service.guilv.CqGuilvService; import com.sky.modules.lottery.service.guilv.CqsscGuilvService; import com.sky.modules.lottery.service.guilv.GuilvPeerService; import com.sky.modules.lottery.service.guilv.GuilvService; import com.sky.modules.lottery.service.guilv.GuilvSumService; import com.sky.modules.lottery.service.guilv.CqsscLotteryService; import com.sky.modules.lottery.service.guilv.LotteryService; import com.sky.modules.lottery.service.guilv.XjsscPlanService; import com.sky.modules.lottery.service.guilv.CqsscPlanService; import com.sky.modules.lottery.utils.guilv.Hangqing2Utils; import com.sky.modules.lottery.utils.guilv.Hangqing3Utils; import com.sky.modules.lottery.utils.guilv.Hangqing5Utils; import com.sky.modules.lottery.utils.guilv.HangqingUtils; @Service("CqGuilvScanner33") public class CqGuilvScanner33 implements QueryComm{ @Autowired private CqsscLotteryService lotteryService; @Autowired private CqGuilvService guilvService; @Autowired CqGuilvRemoveCountService cocuntService; @Autowired private CqGuilvRemoveConditionService conditionService; public void job() { for(int buchang=5;buchang<=5;buchang++){ for(int type=0;type<=4;type++){ for(int number=0;number<=0;number++){ for(int addition=3;addition<=3;addition++){ List<CqGuilv> sbr = new ArrayList<CqGuilv>(); CqLotteryUtils.setQuery(addition, buchang, type, CqNumCountUtils.getCount(addition, buchang, 1, number), 1, 1, number, lotteryService, guilvService, sbr,true,cocuntService,conditionService); } } } } System.out.println("cq_guilv2็ป“ๆŸ3๏ผš๏ผš"+UtilDate.getDateFormatter()); } }
[ "286549429@qq.com" ]
286549429@qq.com
c79b4e3f2ff638830f522906a339eb575c485bf4
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE89_SQL_Injection/CWE89_SQL_Injection__File_prepareStatement_54a.java
95252210b5605203350aee34183989f46fc29815
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
6,346
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE89_SQL_Injection__File_prepareStatement_54a.java Label Definition File: CWE89_SQL_Injection.label.xml Template File: sources-sinks-54a.tmpl.java */ /* * @description * CWE: 89 SQL Injection * BadSource: File Read data from file (named c:\data.txt) * GoodSource: A hardcoded string * Sinks: prepareStatement * GoodSink: Use prepared statement and execute (properly) * BadSink : data concatenated into SQL statment used in prepareStatement() call, which could result in SQL Injection * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE89_SQL_Injection; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; import java.util.logging.Level; import java.util.logging.Logger; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.FileInputStream; import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; public class CWE89_SQL_Injection__File_prepareStatement_54a extends AbstractTestCase { public void bad() throws Throwable { String data; data = ""; /* Initialize data */ { File f = new File("C:\\data.txt"); FileInputStream fis = null; InputStreamReader isread = null; BufferedReader buffread = null; try { /* read string from file into data */ fis = new FileInputStream(f); isread = new InputStreamReader(fis, "UTF-8"); buffread = new BufferedReader(isread); /* POTENTIAL FLAW: Read data from a file */ data = buffread.readLine(); // This will be reading the first "line" of the file, which // could be very long if there are little or no newlines in the file } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error with stream reading", ioe); } finally { /* Close stream reading objects */ try { if( buffread != null ) { buffread.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe); } try { if( isread != null ) { isread.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe); } try { if( fis != null ) { fis.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe); } } } (new CWE89_SQL_Injection__File_prepareStatement_54b()).bad_sink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { String data; /* FIX: Use a hardcoded string */ data = "foo"; (new CWE89_SQL_Injection__File_prepareStatement_54b()).goodG2B_sink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { String data; data = ""; /* Initialize data */ { File f = new File("C:\\data.txt"); FileInputStream fis = null; InputStreamReader isread = null; BufferedReader buffread = null; try { /* read string from file into data */ fis = new FileInputStream(f); isread = new InputStreamReader(fis, "UTF-8"); buffread = new BufferedReader(isread); /* POTENTIAL FLAW: Read data from a file */ data = buffread.readLine(); // This will be reading the first "line" of the file, which // could be very long if there are little or no newlines in the file } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error with stream reading", ioe); } finally { /* Close stream reading objects */ try { if( buffread != null ) { buffread.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe); } try { if( isread != null ) { isread.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe); } try { if( fis != null ) { fis.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe); } } } (new CWE89_SQL_Injection__File_prepareStatement_54b()).goodB2G_sink(data ); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
815846767d868e96e61bbd5bd1966d577e0e8582
bce5b2859bdaee188985725200dd2b0b702a0f96
/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/faultdetail/TestWSCommons202.java
7fc926df543c0eef833704bd6adfbcecebdeb08c
[ "Apache-2.0" ]
permissive
wso2/wso2-axiom
6c2fd0ecf23ba8321230d82d90bd26b1373caee0
c815e34d9866465bff53b785067cd0e8aa873635
refs/heads/master
2023-09-05T02:27:44.573813
2022-11-08T03:00:05
2022-11-08T03:00:05
16,400,930
34
83
null
2022-11-08T02:39:07
2014-01-31T05:58:21
Java
UTF-8
Java
false
false
1,936
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.axiom.ts.soap.faultdetail; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMMetaFactory; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.ts.soap.SOAPSpec; import org.apache.axiom.ts.soap.SOAPTestCase; public class TestWSCommons202 extends SOAPTestCase { public TestWSCommons202(OMMetaFactory metaFactory, SOAPSpec spec) { super(metaFactory, spec); } protected void runTest() throws Throwable { SOAPFaultDetail soapFaultDetail = soapFactory.createSOAPFaultDetail(); soapFaultDetail.setText("a"); assertTrue(soapFaultDetail.getText().trim().equals("a")); assertTrue("Text serialization has problems. It had serialized same text twice", soapFaultDetail.toString().indexOf("aa") == -1); OMElement omElement = soapFactory.createOMElement("DummyElement", null); soapFaultDetail.addChild(omElement); omElement.setText("Some text is here"); assertTrue("Children of SOAP Fault Detail element are not serialized properly", soapFaultDetail.toString().indexOf("Some text is here") != -1); } }
[ "eranda@wso2.com" ]
eranda@wso2.com
482b69e4ad62bcb57ebd3f3f5ffd241d90674d56
b777c7a10237da84c132238af66a942da563529e
/Rusted/game-lib/android/os/IMessenger.java
8625a513e4d60feccc908f10e5a7b92104898739
[]
no_license
macuser47/SaltyRust
6ce11ffe9a8d6bcd609e3346f6c17f5f580ce4a8
02db02c7dadbd5397367d66e9e39331fe3f438b7
refs/heads/master
2020-04-20T13:09:11.311551
2019-02-02T18:03:02
2019-02-02T18:03:02
168,861,365
0
0
null
null
null
null
UTF-8
Java
false
false
158
java
package android.os; public interface IMessenger extends IInterface { // $FF: renamed from: a (android.os.Message) void void method_52(Message var1); }
[ "nichodlofski@gmail.com" ]
nichodlofski@gmail.com
54acdb264b775e6560f1898112e242ccd3512385
3093a2393cc807425404613120ca6f7eabdc61e5
/transaction-demo/API-TEST/src/main/java/com/anhe/model/type/ServerLevel.java
433d0c0f95d684dbd3c86e80705740cc39f6723e
[]
no_license
tangyongshuang/practice-parent
928e1505f48bd84a4f8e7eaa28c0e08e617c4d38
ef74210f74f84722ee1220e8f11c9e3614dc98a7
refs/heads/master
2022-06-23T23:34:20.343807
2019-06-19T08:16:47
2019-06-19T08:16:47
190,373,049
0
0
null
2022-06-17T03:25:50
2019-06-05T10:13:58
Java
UTF-8
Java
false
false
667
java
package com.anhe.model.type; public enum ServerLevel { FedExGround,FedExGroundHomeDelivery,FedEx2Day,FedEx2DayAM,FedExExpressSaver,FedExFirstOvernight,FedExPriorityOvernight, FedExStandardOvernight,FedExInternationalEconomy,FedExInternationalPriority,FedExSmartPost, UPSGround,UPSNextDayAir,UPS2ndDayAir,UPS3DaySelect,UPSNextDayAirSaver,UPSNextDayAirEarlyAM, UPS2ndDayAirAM,UPSSurePostLessthan1lb,UPSSurePost1lborGreater,UPSWorldwideExpress,UPSWorldwideExpedited, UPSWorldwideSaver, USPSPriorityMail,USPSPriorityMailExpress,USPSFirstClassMail,USPSMediaMail,USPSPriorityMailInternational, USPSPriorityMailExpressInternational,USPSFirstClassMailInternational }
[ "albert.tang@circle.us" ]
albert.tang@circle.us
ab2a41ffbb737d62dd7f2dc444d13cd8bb719184
e55d6023fdd2639781d00340faa13e0a14fedd6b
/citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/pageclicklistener/ComplianceCheckPageItemRendererClickListener.java
898bd9078e2fe9a2a1c87b6fb0c8a9ca9ff5ba8f
[ "Apache-2.0" ]
permissive
renovate-tests/cia
0579594de04b76bc6d23d38622e77bd9b641c7d7
4b340ef8afa17cffb5ffe6a5607428a5ce8c70d1
refs/heads/master
2020-05-24T04:53:39.941847
2019-05-16T18:20:25
2019-05-16T18:20:25
187,101,527
0
0
Apache-2.0
2019-05-16T21:14:50
2019-05-16T21:08:43
Java
UTF-8
Java
false
false
2,423
java
/* * Copyright 2010-2019 James Pether Sรถrling * * 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. * * $Id$ * $HeadURL$ */ package com.hack23.cia.web.impl.ui.application.views.pageclicklistener; import java.util.Set; import com.hack23.cia.service.api.action.kpi.ComplianceCheck; import com.hack23.cia.service.api.action.kpi.ResourceType; import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews; import com.vaadin.event.selection.SelectionEvent; import com.vaadin.ui.UI; import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent; /** * The Class RuleViolationPageItemRendererClickListener. */ public final class ComplianceCheckPageItemRendererClickListener implements PageItemRendererClickListener<ComplianceCheck> { /** The Constant PAGE_SEPARATOR. */ private static final Character PAGE_SEPARATOR = '/'; /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1L; /** * Instantiates a new compliance check page item renderer click listener. */ public ComplianceCheckPageItemRendererClickListener() { super(); } @Override public void click(final RendererClickEvent<ComplianceCheck> event) { navigateToPage(event.getItem()); } /** * Navigate to page. * * @param violation * the violation */ private static void navigateToPage(final ComplianceCheck violation) { if (violation.getResourceType() == ResourceType.PARTY) { UI.getCurrent().getNavigator().navigateTo(UserViews.PARTY_VIEW_NAME + PAGE_SEPARATOR + violation.getId()); } else { UI.getCurrent().getNavigator().navigateTo(UserViews.POLITICIAN_VIEW_NAME + PAGE_SEPARATOR + violation.getId()); } } @Override public void selectionChange(final SelectionEvent<ComplianceCheck> event) { final Set<ComplianceCheck> added =event.getAllSelectedItems(); if (!added.isEmpty()) { navigateToPage(added.iterator().next()); } } }
[ "pether.sorling@gmail.com" ]
pether.sorling@gmail.com
d36ca3616f5a76b226304f8bdb24582170f436ee
c753b739b8e5484c0251113b797c442ef0b3bb49
/src/org/greatfree/framework/cps/cache/terminal/replicating/ReplicateMuchMyStoreDataMapStoreThread.java
5b464c4010edbf6c2e1816b5c108b4c0739338eb
[]
no_license
640351963/Wind
144c0e9e9f3fdf3ee398f9f1a26a3434ca2dfabf
0493d95a1fa8de2de218e651e8ce16be00b8ba38
refs/heads/master
2023-05-03T03:17:06.737980
2021-05-22T19:24:41
2021-05-22T19:24:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,173
java
package org.greatfree.framework.cps.cache.terminal.replicating; import org.greatfree.concurrency.reactive.NotificationQueue; import org.greatfree.data.ServerConfig; import org.greatfree.framework.cps.cache.message.replicate.ReplicateMuchMyStoreDataMapStoreNotification; import org.greatfree.framework.cps.cache.terminal.MyTerminalMapStore; // Created: 08/25/2018, Bing Li public class ReplicateMuchMyStoreDataMapStoreThread extends NotificationQueue<ReplicateMuchMyStoreDataMapStoreNotification> { public ReplicateMuchMyStoreDataMapStoreThread(int taskSize) { super(taskSize); } @Override public void run() { ReplicateMuchMyStoreDataMapStoreNotification notification; while (!this.isShutdown()) { while (!this.isEmpty()) { try { notification = this.dequeue(); MyTerminalMapStore.BACKEND().putAll(notification.getMapKey(), notification.getData()); this.disposeMessage(notification); } catch (InterruptedException e) { e.printStackTrace(); } } try { this.holdOn(ServerConfig.NOTIFICATION_THREAD_WAIT_TIME); } catch (InterruptedException e) { e.printStackTrace(); } } } }
[ "bing.li@asu.edu" ]
bing.li@asu.edu
16bdbe77940c2319ba626990fdcc1cb3f8e40b7b
3c8dcccd9fcd6abeca1b38294347d05f310b5eea
/ycsoft-lib/src/main/java/com/ycsoft/business/dao/core/bank/CBankAgreeHisDao.java
b76c79689a275117bee8b2fd827abb1de1320bad
[ "Apache-2.0" ]
permissive
leopardoooo/cambodia
023963df2b13d775a0117bb429b2f0d72802def6
a6b552e3ceb60237f058bf8dfea369f47769542c
refs/heads/master
2016-09-06T17:38:24.959190
2015-12-03T05:58:26
2015-12-03T05:58:26
38,999,232
6
6
null
null
null
null
UTF-8
Java
false
false
569
java
/** * CBankAgreeHisDao.java 2010/11/01 */ package com.ycsoft.business.dao.core.bank; import org.springframework.stereotype.Component; import com.ycsoft.beans.core.bank.CBankAgreeHis; import com.ycsoft.daos.abstracts.BaseEntityDao; /** * CBankAgreeHisDao -> C_BANK_AGREE_HIS table's operator */ @Component public class CBankAgreeHisDao extends BaseEntityDao<CBankAgreeHis> { /** * */ private static final long serialVersionUID = 2530602133614361808L; /** * default empty constructor */ public CBankAgreeHisDao() {} }
[ "leopardoooo@163.com" ]
leopardoooo@163.com
d8b362203c3c52714a06cc093a55667143b38b22
b5f910918f36dc399e2eaa745e43d5b04ad9ec41
/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/permissions/FilePermissions.java
6d2a268afb8204a6db5990f7074bf263e781345c
[ "Apache-2.0" ]
permissive
webbukkit/dynmap
ba2c8b04cc52c5b07f68f161717b2fabfff7b310
eed1a2b4440c5ef7f9e45f351c631bf4e573f552
refs/heads/v3.0
2023-08-31T17:57:45.191734
2023-08-30T15:59:46
2023-08-30T15:59:46
1,201,104
1,897
671
Apache-2.0
2023-09-14T00:54:20
2010-12-27T18:47:24
Java
UTF-8
Java
false
false
3,011
java
package org.dynmap.forge_1_14_4.permissions; import java.io.File; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; import net.minecraft.entity.player.PlayerEntity; import org.dynmap.ConfigurationNode; import org.dynmap.Log; import org.dynmap.forge_1_14_4.DynmapPlugin; public class FilePermissions implements PermissionProvider { private HashMap<String, Set<String>> perms; private Set<String> defperms; public static FilePermissions create() { File f = new File("dynmap/permissions.yml"); if(!f.exists()) return null; ConfigurationNode cfg = new ConfigurationNode(f); cfg.load(); Log.info("Using permissions.yml for access control"); return new FilePermissions(cfg); } private FilePermissions(ConfigurationNode cfg) { perms = new HashMap<String,Set<String>>(); for(String k : cfg.keySet()) { List<String> p = cfg.getStrings(k, null); if(p != null) { k = k.toLowerCase(); HashSet<String> pset = new HashSet<String>(); for(String perm : p) { pset.add(perm.toLowerCase()); } perms.put(k, pset); if(k.equals("defaultuser")) { defperms = pset; } } } } private boolean hasPerm(String player, String perm) { Set<String> ps = perms.get(player); if((ps != null) && (ps.contains(perm))) { return true; } if(defperms.contains(perm)) { return true; } return false; } @Override public Set<String> hasOfflinePermissions(String player, Set<String> perms) { player = player.toLowerCase(); HashSet<String> rslt = new HashSet<String>(); if(DynmapPlugin.plugin.isOp(player)) { rslt.addAll(perms); } else { for(String p : perms) { if(hasPerm(player, p)) { rslt.add(p); } } } return rslt; } @Override public boolean hasOfflinePermission(String player, String perm) { player = player.toLowerCase(); if(DynmapPlugin.plugin.isOp(player)) { return true; } else { return hasPerm(player, perm); } } @Override public boolean has(PlayerEntity psender, String permission) { if(psender != null) { String n = psender.getName().getString().toLowerCase(); return hasPerm(n, permission); } return true; } @Override public boolean hasPermissionNode(PlayerEntity psender, String permission) { if(psender != null) { String player = psender.getName().getString().toLowerCase(); return DynmapPlugin.plugin.isOp(player); } return false; } }
[ "mike@primmhome.com" ]
mike@primmhome.com
f4bbc7fed3e5c2c5032b4061e815a37994acb7b2
0e06e096a9f95ab094b8078ea2cd310759af008b
/classes64-dex2jar/com/applovin/impl/sdk/w.java
866266f12fa93dca7c7a6db4c01355e06b28bcd3
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
2,015
java
// // Decompiled by Procyon v0.5.34 // package com.applovin.impl.sdk; class w extends dx { final /* synthetic */ AppLovinAdServiceImpl a; private final n b; private w(final AppLovinAdServiceImpl a, final n b) { this.a = a; super("UpdateAdTask", a.a); this.b = b; } @Override public void run() { Label_0102_Outer: while (true) { boolean b = true; this.e.d("AppLovinAdService", "Attempt update for spec: " + this.b); final v b2 = this.a.a(this.b); while (true) { Label_0275: while (true) { synchronized (b2.a) { final boolean i = this.b.i(); final boolean d = this.a.a(); if (!b2.e.isEmpty()) { final boolean b3 = true; if (System.currentTimeMillis() > b2.c) { this.e.d("AppLovinAdService", "Update ad states - isRefreshEnabled=" + i + " hasUpdateListeners=" + b3 + " isCurrentAdExpired=" + b + " isDeviceOn=" + d + " isWaitingForAd=" + b2.d); if (i && b3 && b && d && !b2.d) { this.e.d("AppLovinAdService", "Performing ad update..."); b2.d = true; this.a.a(this.b, new u(this.a, b2, null)); } else { this.e.d("AppLovinAdService", "Ad update skipped"); } return; } break Label_0275; } } final boolean b3 = false; continue Label_0102_Outer; } b = false; continue; } } } }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
8bccf8bed691ed1e1befa67299011421f9bed7f8
25e46c022e2a07cc65e57996bb7b105f7fdd22c0
/agentweb-core/src/main/java/com/just/agentweb/JsBaseInterfaceHolder.java
b12806672801281597594a085c9d8ad8aa007fb1
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
wankey/AgentWeb
2f91bbc93b3c9774b2aa34913d1aa9204e411eb6
2c382b1e6f641ace967f3524f49131f00afeea66
refs/heads/master
2020-09-10T20:15:51.668480
2019-11-15T08:21:32
2019-11-15T08:21:32
221,824,264
0
0
Apache-2.0
2019-11-15T02:07:12
2019-11-15T02:07:09
null
UTF-8
Java
false
false
2,245
java
/* * Copyright (C) Justson(https://github.com/Justson/AgentWeb) * * 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.just.agentweb; import android.os.Build; import android.webkit.JavascriptInterface; import java.lang.annotation.Annotation; import java.lang.reflect.Method; /** * @author cenxiaozhong * @date 2017/5/13 * @since 1.0.0 */ public abstract class JsBaseInterfaceHolder implements JsInterfaceHolder { private AgentWeb.SecurityType mSecurityType; protected JsBaseInterfaceHolder(AgentWeb.SecurityType securityType) { this.mSecurityType = securityType; } @Override public boolean checkObject(Object v) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1){ return true; } if (AgentWebConfig.WEBVIEW_TYPE == AgentWebConfig.WEBVIEW_AGENTWEB_SAFE_TYPE){ return true; } boolean tag = false; Class clazz = v.getClass(); Method[] mMethods = clazz.getMethods(); for (Method mMethod : mMethods) { Annotation[] mAnnotations = mMethod.getAnnotations(); for (Annotation mAnnotation : mAnnotations) { if (mAnnotation instanceof JavascriptInterface) { tag = true; break; } } if (tag){ break; } } return tag; } protected boolean checkSecurity() { return mSecurityType != AgentWeb.SecurityType.STRICT_CHECK ? true : AgentWebConfig.WEBVIEW_TYPE == AgentWebConfig.WEBVIEW_AGENTWEB_SAFE_TYPE ? true : Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR1; } }
[ "xiaozhongcen@gmail.com" ]
xiaozhongcen@gmail.com
d7786914c9afb9332bdff6d8237f6dfe7cd55715
5e902c8486fc4761709ae7377e9573a53556875f
/Untouched/sunrisedata/branches/L2J_SunriseProject_Data/dist/game/data/scripts/handlers/effecthandlers/Fishing.java
4b9ca8a7877d3cc39b4882df8c3a7b7639fcc1aa
[ "Unlicense" ]
permissive
Hl4p3x/L2J_Sunrise_Official
79a3a170417474e28efe825734d73f23048a4b2a
5cfab25a520e8328862105c31cfc9e14fa17cba7
refs/heads/master
2023-06-08T01:42:17.982179
2021-04-20T13:50:39
2021-04-20T13:50:39
271,591,076
0
0
null
null
null
null
UTF-8
Java
false
false
7,411
java
/* * Copyright (C) 2004-2015 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J DataPack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.effecthandlers; import l2r.Config; import l2r.gameserver.GeoData; import l2r.gameserver.enums.PcCondOverride; import l2r.gameserver.enums.ZoneIdType; import l2r.gameserver.instancemanager.ZoneManager; import l2r.gameserver.model.actor.L2Character; import l2r.gameserver.model.actor.instance.L2PcInstance; import l2r.gameserver.model.effects.EffectTemplate; import l2r.gameserver.model.effects.L2Effect; import l2r.gameserver.model.effects.L2EffectType; import l2r.gameserver.model.itemcontainer.Inventory; import l2r.gameserver.model.items.L2Weapon; import l2r.gameserver.model.items.instance.L2ItemInstance; import l2r.gameserver.model.items.type.EtcItemType; import l2r.gameserver.model.items.type.WeaponType; import l2r.gameserver.model.stats.Env; import l2r.gameserver.model.zone.L2ZoneType; import l2r.gameserver.model.zone.type.L2FishingZone; import l2r.gameserver.model.zone.type.L2WaterZone; import l2r.gameserver.network.SystemMessageId; import l2r.gameserver.util.Util; import l2r.util.Rnd; /** * Fishing effect implementation. * @author UnAfraid */ public final class Fishing extends L2Effect { private static final int MIN_BAIT_DISTANCE = 90; private static final int MAX_BAIT_DISTANCE = 250; public Fishing(Env env, EffectTemplate template) { super(env, template); } @Override public boolean isInstant() { return true; } @Override public L2EffectType getEffectType() { return L2EffectType.FISHING_START; } @Override public boolean onStart() { final L2Character activeChar = getEffector(); if (!activeChar.isPlayer()) { return false; } final L2PcInstance player = activeChar.getActingPlayer(); if (!Config.ALLOWFISHING && !player.canOverrideCond(PcCondOverride.SKILL_CONDITIONS)) { player.sendMessage("Fishing is disabled!"); return false; } if (player.getFishingEx().isFishing()) { if (player.getFishingEx().getFishCombat() != null) { player.getFishingEx().getFishCombat().doDie(false); } else { player.getFishingEx().endFishing(false); } player.sendPacket(SystemMessageId.FISHING_ATTEMPT_CANCELLED); return false; } // check for equiped fishing rod L2Weapon equipedWeapon = player.getActiveWeaponItem(); if (((equipedWeapon == null) || (equipedWeapon.getItemType() != WeaponType.FISHINGROD))) { player.sendPacket(SystemMessageId.FISHING_POLE_NOT_EQUIPPED); return false; } // check for equiped lure L2ItemInstance equipedLeftHand = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND); if ((equipedLeftHand == null) || (equipedLeftHand.getItemType() != EtcItemType.LURE)) { player.sendPacket(SystemMessageId.BAIT_ON_HOOK_BEFORE_FISHING); return false; } if (!player.isGM()) { if (player.isInBoat()) { player.sendPacket(SystemMessageId.CANNOT_FISH_ON_BOAT); return false; } if (player.isInCraftMode() || player.isInStoreMode()) { player.sendPacket(SystemMessageId.CANNOT_FISH_WHILE_USING_RECIPE_BOOK); return false; } if (player.isInsideZone(ZoneIdType.WATER)) { player.sendPacket(SystemMessageId.CANNOT_FISH_UNDER_WATER); return false; } } // calculate a position in front of the player with a random distance int distance = Rnd.get(MIN_BAIT_DISTANCE, MAX_BAIT_DISTANCE); final double angle = Util.convertHeadingToDegree(player.getHeading()); final double radian = Math.toRadians(angle); final double sin = Math.sin(radian); final double cos = Math.cos(radian); int baitX = (int) (player.getX() + (cos * distance)); int baitY = (int) (player.getY() + (sin * distance)); // search for fishing and water zone L2FishingZone fishingZone = null; L2WaterZone waterZone = null; for (final L2ZoneType zone : ZoneManager.getInstance().getZones(baitX, baitY)) { if (zone instanceof L2FishingZone) { fishingZone = (L2FishingZone) zone; } else if (zone instanceof L2WaterZone) { waterZone = (L2WaterZone) zone; } if ((fishingZone != null) && (waterZone != null)) { break; } } int baitZ = computeBaitZ(player, baitX, baitY, fishingZone, waterZone); if (baitZ == Integer.MIN_VALUE) { for (distance = MAX_BAIT_DISTANCE; distance >= MIN_BAIT_DISTANCE; --distance) { baitX = (int) (player.getX() + (cos * distance)); baitY = (int) (player.getY() + (sin * distance)); // search for fishing and water zone again fishingZone = null; waterZone = null; for (final L2ZoneType zone : ZoneManager.getInstance().getZones(baitX, baitY)) { if (zone instanceof L2FishingZone) { fishingZone = (L2FishingZone) zone; } else if (zone instanceof L2WaterZone) { waterZone = (L2WaterZone) zone; } if ((fishingZone != null) && (waterZone != null)) { break; } } baitZ = computeBaitZ(player, baitX, baitY, fishingZone, waterZone); if (baitZ != Integer.MIN_VALUE) { break; } } if (baitZ == Integer.MIN_VALUE) { if (player.isGM()) { baitZ = player.getZ(); } else { player.sendPacket(SystemMessageId.CANNOT_FISH_HERE); return false; } } } if (!player.destroyItem("Fishing", equipedLeftHand, 1, null, false)) { player.sendPacket(SystemMessageId.NOT_ENOUGH_BAIT); return false; } player.getFishingEx().setLure(equipedLeftHand); player.getFishingEx().startFishing(baitX, baitY, baitZ); return true; } /** * Computes the Z of the bait. * @param player the player * @param baitX the bait x * @param baitY the bait y * @param fishingZone the fishing zone * @param waterZone the water zone * @return the bait z or {@link Integer#MIN_VALUE} when you cannot fish here */ private static int computeBaitZ(final L2PcInstance player, final int baitX, final int baitY, final L2FishingZone fishingZone, final L2WaterZone waterZone) { if ((fishingZone == null)) { return Integer.MIN_VALUE; } if ((waterZone == null)) { return Integer.MIN_VALUE; } // always use water zone, fishing zone high z is high in the air... int baitZ = waterZone.getWaterZ(); if (!GeoData.getInstance().canSeeTarget(player.getX(), player.getY(), player.getZ(), baitX, baitY, baitZ)) { return Integer.MIN_VALUE; } if (GeoData.getInstance().hasGeo(baitX, baitY)) { if (GeoData.getInstance().getHeight(baitX, baitY, baitZ) > baitZ) { return Integer.MIN_VALUE; } if (GeoData.getInstance().getHeight(baitX, baitY, player.getZ()) > baitZ) { return Integer.MIN_VALUE; } } return baitZ; } }
[ "libera.libera@gmail.com" ]
libera.libera@gmail.com
c7fd7910d5735858c833e9b295589b82461b8c1c
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
/src/main/java/com/alipay/api/response/AlipayUserAntarchiveCustrelationCloseResponse.java
472a20c1055426c6be86330a440753c2d4658eec
[ "Apache-2.0" ]
permissive
zhangpo/alipay-sdk-java-all
13f79e34d5f030ac2f4367a93e879e0e60f335f7
e69305d18fce0cc01d03ca52389f461527b25865
refs/heads/master
2022-11-04T20:47:21.777559
2020-06-15T08:31:02
2020-06-15T08:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
393
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.user.antarchive.custrelation.close response. * * @author auto create * @since 1.0, 2020-06-05 19:20:11 */ public class AlipayUserAntarchiveCustrelationCloseResponse extends AlipayResponse { private static final long serialVersionUID = 2726993692815947511L; }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
724e1ce6c85e6b4d7252de8bba019d56494fb20c
0197e9c4d93cf32f961abcdfedd8ad1239a2ce66
/app/src/main/java/com/lefuorgn/lefu/bean/OldPeopleInfo.java
cf53d0b8a81e95a05680f3dd02caf56ec5df6a3f
[]
no_license
afailer/lefuOrg
fbcd37cfa42ac02875907458c6ac032be52fe12d
8facb4d4f87164356da26c61babe118f36b0e836
refs/heads/master
2020-05-15T11:08:09.445145
2019-04-19T06:17:10
2019-04-19T06:17:10
182,212,171
0
1
null
null
null
null
UTF-8
Java
false
false
584
java
package com.lefuorgn.lefu.bean; /** * ๅฑ•็คบ่€ไบบไฟกๆฏๆˆ–่€…่€ไบบไฝ้™ขไฟกๆฏ็š„bean็ฑป */ public class OldPeopleInfo { private String key; private String value; public OldPeopleInfo(String key, String value) { this.key = key; this.value = value; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "liuting@chuangxin.com" ]
liuting@chuangxin.com
e379c76a83be26fcc8965de7ae036fba02d12066
19291357e1224d96bf9b15290c86e2f19f8076c1
/src/com/brainacad/oop/testthread2/MySumCount.java
b44132da20e5c3325e419b3822cea251c4dc4e7e
[]
no_license
aleknek/LabWork_2-17-3
fe0f4eacf446e8729f5a1e60877d6c260c50d9d1
b8d1a91e261846b18690f598791c8c89621311a5
refs/heads/master
2021-04-05T23:24:34.469627
2016-08-03T08:56:21
2016-08-03T08:56:21
64,831,098
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
java
package com.brainacad.oop.testthread2; import java.util.Arrays; public class MySumCount implements Runnable { private int startIndex; private int stopIndex; private volatile int[] array; private volatile long resultSum; public int getStartIndex() { return startIndex; } public void setStartIndex(int startIndex) { this.startIndex = startIndex; } public int getStopIndex() { return stopIndex; } public void setStopIndex(int stopIndex) { this.stopIndex = stopIndex; } public void setArray(int[] array) { this.array = array; } public long getResultSum() { return resultSum; } @Override public void run() { if (startIndex >= stopIndex) { return; } //System.out.println(Thread.currentThread().getName()); for (int i = startIndex; i < stopIndex; i++) { this.resultSum = array[i] + this.resultSum; } } @Override public String toString() { return "MySumCount [" + "array=" + Arrays.toString(array) + ']'; } }
[ "you@example.com" ]
you@example.com
94f58bbd40354e8307813a035cf86e3b63fd3f40
5a076617e29016fe75d6421d235f22cc79f8f157
/Android ๅ›พๅƒๆŸ”ๅŒ–็พŽ็™ฝ็‰นๆ•ˆๆบ็ /src/com/imageFilters/SoftGlowFilter.java
bf504840fe49b8749476afe698ef8b4762fb2db7
[]
no_license
dddddttttt/androidsourcecodes
516b8c79cae7f4fa71b97a2a470eab52844e1334
3d13ab72163bbeed2ef226a476e29ca79766ea0b
refs/heads/master
2020-08-17T01:38:54.095515
2018-04-08T15:17:24
2018-04-08T15:17:24
null
0
0
null
null
null
null
GB18030
Java
false
false
1,420
java
package com.imageFilters; import android.graphics.Bitmap; public class SoftGlowFilter implements ImageFilterInterface { /** * ้ซ˜ไบฎๅฏนๆฏ”ๅบฆ็‰นๆ•ˆ */ BrightContrastFilter contrastFx; GaussianBlurFilter gaussianBlurFx; private ImageData image = null; public SoftGlowFilter(Bitmap bmp) { image = new ImageData(bmp); } public SoftGlowFilter(Bitmap bmp, int nSigma, float nBrightness, float nContrast) { gaussianBlurFx = new GaussianBlurFilter(bmp); gaussianBlurFx.Sigma = nSigma; image = gaussianBlurFx.imageProcess(); // ๆŸ”ๅŒ–ๅค„็† contrastFx = new BrightContrastFilter(image); contrastFx.BrightnessFactor = nBrightness; contrastFx.ContrastFactor = nContrast; image = contrastFx.imageProcess(); // ้ซ˜ไบฎๅฏนๆฏ”ๅบฆ } public ImageData imageProcess() { int width = image.getWidth(); int height = image.getHeight(); ImageData clone = image.clone(); int old_r, old_g, old_b, r, g, b; for (int x = 0; x < (width - 1); x++) { for (int y = 0; y < (height - 1); y++) { old_r = clone.getRComponent(x, y); old_g = clone.getGComponent(x, y); old_b = clone.getBComponent(x, y); r = 255 - (255 - old_r) * (255 - image.getRComponent(x, y)) / 255; g = 255 - (255 - old_g) * (255 - image.getGComponent(x, y)) / 255; b = 255 - (255 - old_b) * (255 - image.getBComponent(x, y)) / 255; image.setPixelColor(x, y, r, g, b); } } return image; } }
[ "harry.han@gmail.com" ]
harry.han@gmail.com
d9372799a8e77ae345138b3d46730691d1758e25
9304c9b397c1883af8d99a275729f516c66de325
/registries-readers/src/main/java/pro/biocontainers/readers/biotools/services/BioToolsQueryService.java
171209dfde59e97205eeb9ff047b762327449ea6
[ "Apache-2.0" ]
permissive
BioContainers/registry-backend-deprecated
6bf5388c51748f457e339767155bd6293e3e9bda
b123eec28b96fe251947bb9acfb525dc832c9db8
refs/heads/master
2020-03-23T16:11:56.107961
2018-10-09T09:23:10
2018-10-09T09:23:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,420
java
package pro.biocontainers.readers.biotools.services; import lombok.extern.log4j.Log4j2; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; import pro.biocontainers.readers.biotools.configs.BioToolsConfiguration; import pro.biocontainers.readers.biotools.model.BioToolEntry; import java.util.Optional; @Service @Log4j2 public class BioToolsQueryService { private RestTemplate restTemplate; private BioToolsConfiguration configuration; public BioToolsQueryService(RestTemplateBuilder builder, BioToolsConfiguration configuration) { restTemplate = builder.build(); this.configuration = configuration; } /** * Get Bio.tools information for an specific container. * * @return Container. */ public Optional<BioToolEntry> getBioToolEntry(String biotoolName) { String containersListUrl = configuration.getBiotoolsAPIURL(); String url = containersListUrl.replaceAll("%%namespace%%", biotoolName); try { BioToolEntry fetcher = restTemplate.getForObject(url, BioToolEntry.class); return Optional.of(fetcher); } catch (Exception ex) { log.error(ex.getMessage()); } return Optional.empty(); } }
[ "ypriverol@gmail.com" ]
ypriverol@gmail.com
a79977f7dbb3fd5366f7a7a481edcd7cd8beacf9
de2eff0e71efe69175d7e54889d84d449d6ed974
/ext-api/src/main/java/org/omg/CosTypedEventChannelAdmin/TypedConsumerAdminHelper.java
488e29745dacf87ad794665381a33506fb34b73e
[]
no_license
mmusgrov/corba
bb266f631ebdcbabb4719f7d70cb8c766609a3e5
03d993498b68d745018061b39196e7818e0fe64d
refs/heads/master
2021-01-18T10:42:20.114343
2013-01-22T06:02:07
2013-01-22T06:02:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,505
java
package org.omg.CosTypedEventChannelAdmin; /** * Generated from IDL interface "TypedConsumerAdmin". * * @author JacORB IDL compiler V 2.3.1, 27-May-2009 * @version generated at 10/01/2013 11:46:23 AM */ public final class TypedConsumerAdminHelper { public static void insert (final org.omg.CORBA.Any any, final org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin s) { any.insert_Object(s); } public static org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin extract(final org.omg.CORBA.Any any) { return narrow(any.extract_Object()) ; } public static org.omg.CORBA.TypeCode type() { return org.omg.CORBA.ORB.init().create_interface_tc("IDL:omg.org/CosTypedEventChannelAdmin/TypedConsumerAdmin:1.0", "TypedConsumerAdmin"); } public static String id() { return "IDL:omg.org/CosTypedEventChannelAdmin/TypedConsumerAdmin:1.0"; } public static TypedConsumerAdmin read(final org.omg.CORBA.portable.InputStream in) { return narrow(in.read_Object(org.omg.CosTypedEventChannelAdmin._TypedConsumerAdminStub.class)); } public static void write(final org.omg.CORBA.portable.OutputStream _out, final org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin s) { _out.write_Object(s); } public static org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin narrow(final org.omg.CORBA.Object obj) { if (obj == null) { return null; } else if (obj instanceof org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin) { return (org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin)obj; } else if (obj._is_a("IDL:omg.org/CosTypedEventChannelAdmin/TypedConsumerAdmin:1.0")) { org.omg.CosTypedEventChannelAdmin._TypedConsumerAdminStub stub; stub = new org.omg.CosTypedEventChannelAdmin._TypedConsumerAdminStub(); stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } else { throw new org.omg.CORBA.BAD_PARAM("Narrow failed"); } } public static org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin unchecked_narrow(final org.omg.CORBA.Object obj) { if (obj == null) { return null; } else if (obj instanceof org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin) { return (org.omg.CosTypedEventChannelAdmin.TypedConsumerAdmin)obj; } else { org.omg.CosTypedEventChannelAdmin._TypedConsumerAdminStub stub; stub = new org.omg.CosTypedEventChannelAdmin._TypedConsumerAdminStub(); stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
d7082578ab0cd299dba8be2de8377c25497d5c98
adfc518a40bae0e7e0ef08700de231869cdc9e07
/src/main/java/zes/openworks/web/common/CommonDutyConstant.java
b5d7df25b7cd54bcd718fc3072c9b03b99deee59
[ "Apache-2.0" ]
permissive
tenbirds/OPENWORKS-3.0
49d28a2f9f9c9243b8f652de1d6bc97118956053
d9ea72589854380d7ad95a1df7e5397ad6d726a6
refs/heads/master
2020-04-10T02:49:18.841692
2018-12-07T03:40:00
2018-12-07T03:40:00
160,753,369
0
1
null
null
null
null
UTF-8
Java
false
false
6,394
java
/* * Copyright (c) 2012 ZES Inc. All rights reserved. * This software is the confidential and proprietary information of ZES Inc. * 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 ZES Inc. (http://www.zesinc.co.kr/) */ package zes.openworks.web.common; import java.util.HashMap; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import zes.core.lang.Validate; import zes.core.spi.commons.configuration.Config; import zes.openworks.intra.cms.support.CmsUtil; /** * * * @version 1.0 * @since visitkorea ํ”„๋กœ์ ํŠธ. (After JDK 1.6) * @author (์ฃผ)์ œ์Šค์•„์ด์—”์”จ ๊ธฐ์ˆ ์—ฐ๊ตฌ์†Œ *<pre> *<< ๊ฐœ์ •์ด๋ ฅ(Modification Information) >> * * ์ˆ˜์ •์ผ ์ˆ˜์ •์ž ์ˆ˜์ •๋‚ด์šฉ *-------------- -------- ------------------------------- * 2014. 4. 17. ๊น€์˜์ƒ ์‹ ๊ทœ *</pre> * @see */ public class CommonDutyConstant { @Resource private CommonDutyService codService; /** ๋„๋ฉ”์ธ๊ณผ ๋„๋ฉ”์ธ์ฝ”๋“œ ๋งคํ•‘์ •๋ณด */ /*String domainName[] = {"korean","english","spanish"}; String domainCode[] = {"2","3","4"};*/ /*{{ BH, 2015.11.19, ๋„๋ฉ”์ธ๊ด€๋ฆฌ์‚ญ์ œ๋กœ ์ธํ•œ ์†Œ์Šค๋ณ€๊ฒฝ */ String domainName[] = {"korean","english","spanish","www"}; String domainCode[] = {"2","3","4","2"}; //}} Map<String,String> domainMap = new HashMap<String,String>(); public CommonDutyConstant(){ for(int i = 0 ; i < domainName.length ; i ++){ domainMap.put(domainName[i],domainCode[i]); } } /** * ์ ‘์† ๋„๋ฉ”์ธ์ฝ”๋“œ ๊ตฌํ•˜๊ธฐ */ public String getDomainCode(String subDomain){ return domainMap.get(subDomain); } /** * ์ ‘์† ์‚ฌ์ดํŠธ๊ตฌ๋ถ„์ฝ”๋“œ ๊ตฌํ•˜๊ธฐ */ public String getJoinSiteDivCd(HttpServletRequest request) { String sbscrbSiteSeCd = ""; String url = Validate.isEmpty(request.getRequestURL()) ? "" : request.getRequestURL().toString(); String hostNm = ""; // ์ด์ „์†Œ์Šค //hostNm = CmsUtil.getHostName(request.getServerName()); //{{ BH, 2015.11.23, ๋„๋ฉ”์ธ๊ด€๋ฆฌ์‚ญ์ œ๋กœ ์ธํ•œ ์†Œ์Šค๋ณ€๊ฒฝ //๋ณ€๊ฒฝ์†Œ์Šค hostNm = "korean"; //}} if("".equals(hostNm)){ hostNm = "korean"; //๊ธฐ๋ณธ ํ•œ๊ตญ์–ด }else{ //ํ•œ๊ตญ์–ดํฌํ„ธ if("korean".equals(hostNm)){ if(url.indexOf(Config.getString("url.mobileUrlPrefix")) > -1){ //๋ชจ๋ฐ”์ผ์‚ฌ์ดํŠธ sbscrbSiteSeCd = "2002"; }else{ sbscrbSiteSeCd = "2001"; } //์˜์–ดํฌํ„ธ }else if("english".equals(hostNm)){ if(url.indexOf(Config.getString("url.mobileUrlPrefix")) > -1){ //๋ชจ๋ฐ”์ผ์‚ฌ์ดํŠธ sbscrbSiteSeCd = "3002"; }else{ sbscrbSiteSeCd = "3001"; } //์ŠคํŽ˜์ธํฌํ„ธ }else if("spanish".equals(hostNm)){ if(url.indexOf(Config.getString("url.mobileUrlPrefix")) > -1){ //๋ชจ๋ฐ”์ผ์‚ฌ์ดํŠธ sbscrbSiteSeCd = "4002"; }else{ sbscrbSiteSeCd = "4001"; } }else{ /*System.out.println("################################"); System.out.println("####hostNm###"+hostNm+"########"); System.out.println("################################"); System.out.println("[ " + "๊ฐœ์„ค๋˜์ง€ ์•Š์€ ๋„๋ฉ”์ธ?" + " ]"); System.out.println("################################");*/ } } return sbscrbSiteSeCd; } /** * ๋ฆฌํ„ดurl๊ตฌํ•˜๊ธฐ */ public String getRedirectUrl(HttpServletRequest request) { String url = Validate.isEmpty(request.getRequestURL()) ? "" : request.getRequestURL().toString(); String query = Validate.isEmpty(request.getQueryString()) ? "" : request.getQueryString().toString(); String uri = url + "?" + query; String rtnDomUrl = ""; String rtnDomain = ""; String hostNm = ""; String protoc = ""; if(!"".equals(uri)){ rtnDomain = CmsUtil.getRtnDomain(uri); hostNm = CmsUtil.getHostName(request.getServerName()); if("Y".equals(Config.getString("global.sslUse"))){ protoc = "https"; }else{ protoc = "http"; url = url.replace(":446", ""); url = url.replace(":445", ""); url = url.replace(":444", ""); url = url.replace(":443", ""); url = url.replace(":80", ""); } /* ์ด์ „์†Œ์Šค if(uri.indexOf(Config.getString("url.mobileUrlPrefix")) > -1){ rtnDomUrl = protoc + "://" + rtnDomain + "/" + hostNm + Config.getString("url.mobileUrlPrefix"); //๋ชจ๋ฐ”์ผ ๋Œ๋ ค๋ณด๋‚ผ ๋„๋ฉ”์ธ๊ณผ URL }else if(uri.indexOf(Config.getString("url.boardMobileUrlPrefix")) > -1) { rtnDomUrl = protoc + "://" + rtnDomain + "/" + hostNm + Config.getString("url.mobileUrlPrefix"); //๋ชจ๋ฐ”์ผ ๋Œ๋ ค๋ณด๋‚ผ ๋„๋ฉ”์ธ๊ณผ URL(๊ฒŒ์‹œํŒ์šฉ) }else{ rtnDomUrl = protoc + "://" + rtnDomain + "/" + hostNm + Config.getString("url.portalUrlPrefix"); } */ //{{ BH, 2015.11.20, ๋„๋ฉ”์ธ๊ด€๋ฆฌ์‚ญ์ œ๋กœ ์ธํ•œ ์†Œ์Šค๋ณ€๊ฒฝ // ๋ณ€๊ฒฝ์†Œ์Šค if(uri.indexOf(Config.getString("url.mobileUrlPrefix")) > -1){ rtnDomUrl = protoc + "://" + rtnDomain + "/korean" + Config.getString("url.mobileUrlPrefix"); //๋ชจ๋ฐ”์ผ ๋Œ๋ ค๋ณด๋‚ผ ๋„๋ฉ”์ธ๊ณผ URL }else if(uri.indexOf(Config.getString("url.boardMobileUrlPrefix")) > -1) { rtnDomUrl = protoc + "://" + rtnDomain + "/korean" + Config.getString("url.mobileUrlPrefix"); //๋ชจ๋ฐ”์ผ ๋Œ๋ ค๋ณด๋‚ผ ๋„๋ฉ”์ธ๊ณผ URL(๊ฒŒ์‹œํŒ์šฉ) }else{ rtnDomUrl = protoc + "://" + rtnDomain + "/korean" + Config.getString("url.portalUrlPrefix"); } // }} } return rtnDomUrl; } }
[ "tenbirds@gmail.com" ]
tenbirds@gmail.com
f08f5336383f9530b22c202ba976c77df8afe2cc
5f9ef996e5be954ccf95df44d94164fc7588dec7
/payasia-web/src/main/java/com/payasia/web/controller/DataImportController.java
04bae91611ed078cdec3d663ce1f5d203a3d1bbf
[]
no_license
VaibhavMind/dummycode
26f5e6db2820470b6e958947c21984443187ca0b
a0679a042f817719b90f00101037f83a1e918b59
refs/heads/master
2022-12-06T02:02:25.251493
2019-10-01T07:19:44
2019-10-01T07:19:44
212,033,145
3
0
null
2022-12-06T00:33:03
2019-10-01T07:06:32
Java
UTF-8
Java
false
false
2,921
java
/** * @author abhisheksachdeva * */ package com.payasia.web.controller; import java.util.Locale; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import com.payasia.common.form.DataImportForm; /** * The Interface DataImportController. */ public interface DataImportController { /** * Purpose: To get the company payslip frequency details. * * @param request * the request * @param response * the response * @return the company freq */ String getCompanyFreq(HttpServletRequest request, HttpServletResponse response); /** * Purpose: To show the previous import attempts history. * * @param request * the request * @param response * the response * @return the string */ String showHistory(HttpServletRequest request, HttpServletResponse response); /** * Purpose: To show the import template list. * * @param entityId * the entity id * @param request * the request * @param response * the response * @return the string */ String showTemplateList(long entityId, HttpServletRequest request, HttpServletResponse response); /** * Purpose: To perform import via file upload. * * @param dataImportForm * the data import form * @param result * the result * @param model * the model * @param request * the request * @param response * the response * @param session * the session * @param locale * the locale * @return the string */ String uploadFile(DataImportForm dataImportForm, BindingResult result, ModelMap model, HttpServletRequest request, HttpServletResponse response, HttpSession session, Locale locale); String dataImportStatus(String fileName, HttpServletRequest request, HttpServletResponse response, Locale locale); String getPayslipFormat(HttpServletRequest request, HttpServletResponse response); String previewTextPayslipPdf(DataImportForm dataImportForm, BindingResult result, ModelMap model, HttpServletRequest request, HttpServletResponse response); void getPreviewTextPayslipPdf(String previewPdfFilePath, HttpServletRequest request, HttpServletResponse response); String getCompanyFilterList(HttpServletRequest request, HttpServletResponse response, Locale locale); String configureCompanyAddress(String[] dataDictionaryIds, HttpServletRequest request, HttpServletResponse response, Locale locale); String getCompanyAddressMappingList(HttpServletRequest request, HttpServletResponse response, Locale locale); String getCompanyAddress(HttpServletRequest request, HttpServletResponse response, Locale locale); }
[ "Vaibhav.Dhawan@mind-infotech.com" ]
Vaibhav.Dhawan@mind-infotech.com
07b8d5ad39f1a1aae4bcb3abac5e5d93049faacc
98c2845f69b56358f885c193bcda5b610731a415
/cool-jsfml/src/main/java/jp/gr/java_conf/kgd/library/cool/jsfml/application/ApplicatonConfig.java
aa1dd58d2f3bd3ee4eb331f9fb5d2f815854517b
[ "MIT" ]
permissive
t-kgd/library-cool
a797fb2b7848a1a7cd9c7b4d8e5cc535e742ad3d
a38a3bf1009cafbd888363e1fc19df27c35f9f62
refs/heads/master
2016-09-16T04:03:25.037228
2015-07-09T08:09:48
2015-07-09T08:09:48
38,791,179
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
package jp.gr.java_conf.kgd.library.cool.jsfml.application; public class ApplicatonConfig implements IApplicationConfig { public static final int DEFAULT_TARGET_FPS = 60; // private boolean isClosedEventIgnored = false; private boolean isUpdateNeedsFocus = false; private int targetFPS = DEFAULT_TARGET_FPS; private int drawSkipInterval = 0; // @Override public boolean isClosedEventIgnored() { return isClosedEventIgnored; } @Override public void setClosedEventIgnored(boolean flag) { isClosedEventIgnored = flag; } @Override public boolean isUpdateNeedsFocus() { return isUpdateNeedsFocus; } @Override public void setUpdateNeedsFocus(boolean flag) { isUpdateNeedsFocus = flag; } @Override public int getDrawSkipInterval() { return drawSkipInterval; } @Override public void setDrawSkipInterval(int interval) { drawSkipInterval = Math.max(0, interval); } public int getTargetFPS() { return targetFPS; } public void setTargetFPS(int fps) { this.targetFPS = Math.max(1, fps); } }
[ "t-kgd@users.noreply.github.com" ]
t-kgd@users.noreply.github.com
940ceffef6c32ec29c33489edd4a364da7d8586e
55a35db7dfbd226d205ef884a1c93c3f15ae4b46
/mongo/src/main/java/me/wonwoo/sink/MongoSink.java
5b3a19b6b9911812fbcf4d5f89e4b93e328c03da
[]
no_license
wonwoo/logback-flume
1d197018a33d30b004571e1b83145bfabff00231
8448e7df09bc849e1087441de08cca6778700343
refs/heads/master
2021-01-18T13:16:28.588907
2017-11-19T06:50:57
2017-11-19T06:50:57
100,371,831
2
0
null
null
null
null
UTF-8
Java
false
false
3,701
java
package me.wonwoo.sink; import com.google.common.base.Throwables; import com.mongodb.MongoClient; import com.mongodb.MongoClientOptions; import com.mongodb.MongoCredential; import com.mongodb.ServerAddress; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.apache.commons.lang.StringUtils; import org.apache.flume.*; import org.apache.flume.conf.Configurable; import org.apache.flume.sink.AbstractSink; import org.bson.Document; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.List; import static me.wonwoo.sink.MongoSinkConstants.*; /** * Created by wonwoolee on 2017. 9. 10.. */ public class MongoSink extends AbstractSink implements Configurable { private MongoClient client; private MongoCollection<Document> collection; private String host; private Integer port; private String username; private char[] password; private String database; private String collectionName; @Override public synchronized void start() { this.client = createNetworkMongoClient(null); MongoDatabase mongoDatabase = client.getDatabase(database); this.collection = mongoDatabase.getCollection(collectionName); super.start(); } private MongoClient createNetworkMongoClient(MongoClientOptions options) { if (options == null) { options = MongoClientOptions.builder().build(); } if (hasCredential()) { List<MongoCredential> credentials = new ArrayList<>(); credentials.add(MongoCredential.createCredential(this.username, database, this.password)); return new MongoClient( Collections.singletonList(new ServerAddress(host, port)), credentials, options); } return new MongoClient(Collections.singletonList(new ServerAddress(host, port)), options); } public boolean hasCredential() { return username != null && password != null; } @Override public synchronized void stop() { if (this.client != null) { this.client.close(); } super.stop(); } //TODO mongo ๋Š” json ํ˜•ํƒœ๋งŒ.. @Override public Status process() throws EventDeliveryException { Status result = Status.READY; Channel channel = getChannel(); Transaction transaction = null; try { transaction = channel.getTransaction(); transaction.begin(); Event event = channel.take(); String jsonEvent = new String(event.getBody(), StandardCharsets.UTF_8); collection.insertOne(Document.parse(jsonEvent)); transaction.commit(); } catch (Exception ex) { String errorMsg = "Failed to publish events : " + ex; if (transaction != null) { try { transaction.rollback(); } catch (Exception e) { throw Throwables.propagate(e); } } throw new EventDeliveryException(errorMsg, ex); } return result; } @Override public void configure(Context context) { this.username = context.getString(USERNAME); String password = context.getString(PASSWORD); if (password != null) { this.password = password.toCharArray(); } String host = context.getString(HOST); this.host = StringUtils.isBlank(host) ? DEFAULT_HOST : host; Integer port = context.getInteger(PORT); this.port = context.getInteger(PORT) == null ? DEFAULT_PORT : port; String database = context.getString(DATABASE); this.database = StringUtils.isBlank(database) ? DEFAULT_DATABASE : database; String collectionName = context.getString(COLLECTION_NAME); this.collectionName = StringUtils.isBlank(collectionName) ? DEFAULT_COLLECTION_NAME : collectionName; } }
[ "aoruqjfu@gmail.com" ]
aoruqjfu@gmail.com
9eb60cbf90c416189cca1e9f64f8401a86033c9d
2c42ff8e677790139f972934d0604ed9baf61930
/JavaIdea/new_project/SpringMVC/src/com/cxz/annotation/Controller.java
0a353d278154ec28f05254cdb50ebac57962e2e0
[]
no_license
DukeTiny/education
ee845c0e5b0d171337c6f52052e054379e1ddc1b
8ec8aaec07897ca93d16b08a7ef431beb680eaf3
refs/heads/master
2022-12-25T03:46:06.741009
2019-10-15T17:11:04
2019-10-15T17:11:04
215,351,747
0
0
null
2022-12-16T09:59:04
2019-10-15T16:56:27
TSQL
UTF-8
Java
false
false
286
java
package com.cxz.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface Controller { }
[ "329087464@qq.com" ]
329087464@qq.com
cd45c52f77e81d0c2dd272328f6ee2eb0f58d516
112a579bcf27a2d63c367bf476b34fcf2faeb707
/spring-framework/spring-beans/src/main/java/org/springframework/beans/factory/support/ObjectProvider.java
238af5860c6c0e092b96275b0a5f0beca21c5859
[]
no_license
ProSayJ/think-in-spring
78b4a7d0b4f0e08bf42c16fcda48c451fcb41165
507a2bacd16af92b1320781fc4d1739118c8323d
refs/heads/main
2023-06-22T16:58:36.037144
2021-07-21T07:20:34
2021-07-21T07:20:34
332,664,184
0
0
null
null
null
null
UTF-8
Java
false
false
6,494
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.beans.factory.support; import java.util.Iterator; import java.util.function.Consumer; import java.util.function.Supplier; import java.util.stream.Stream; import org.springframework.beans.expection_.BeansException; import org.springframework.beans.factory.support.bean_.factory_.BeanFactory; import org.springframework.lang.Nullable; /** * A variant of {@link ObjectFactory} designed specifically for injection points, * allowing for programmatic optionality and lenient not-unique handling. * * <p>As of 5.1, this interface extends {@link Iterable} and provides {@link Stream} * support. It can be therefore be used in {@code for} loops, provides {@link #forEach} * iteration and allows for collection-style {@link #stream} access. * * @author Juergen Hoeller * @since 4.3 * @param <T> the object type * @see BeanFactory#getBeanProvider * @see org.springframework.beans.factory.annotation.Autowired */ public interface ObjectProvider<T> extends ObjectFactory<T>, Iterable<T> { /** * Return an instance (possibly shared or independent) of the object * managed by this factory. * <p>Allows for specifying explicit construction arguments, along the * lines of {@link BeanFactory#getBean(String, Object...)}. * @param args arguments to use when creating a corresponding instance * @return an instance of the bean * @throws BeansException in case of creation errors * @see #getObject() */ T getObject(Object... args) throws BeansException; /** * Return an instance (possibly shared or independent) of the object * managed by this factory. * @return an instance of the bean, or {@code null} if not available * @throws BeansException in case of creation errors * @see #getObject() */ @Nullable T getIfAvailable() throws BeansException; /** * Return an instance (possibly shared or independent) of the object * managed by this factory. * @param defaultSupplier a callback for supplying a default object * if none is present in the factory * @return an instance of the bean, or the supplied default object * if no such bean is available * @throws BeansException in case of creation errors * @since 5.0 * @see #getIfAvailable() */ default T getIfAvailable(Supplier<T> defaultSupplier) throws BeansException { T dependency = getIfAvailable(); return (dependency != null ? dependency : defaultSupplier.get()); } /** * Consume an instance (possibly shared or independent) of the object * managed by this factory, if available. * @param dependencyConsumer a callback for processing the target object * if available (not called otherwise) * @throws BeansException in case of creation errors * @since 5.0 * @see #getIfAvailable() */ default void ifAvailable(Consumer<T> dependencyConsumer) throws BeansException { T dependency = getIfAvailable(); if (dependency != null) { dependencyConsumer.accept(dependency); } } /** * Return an instance (possibly shared or independent) of the object * managed by this factory. * @return an instance of the bean, or {@code null} if not available or * not unique (i.e. multiple candidates found with none marked as primary) * @throws BeansException in case of creation errors * @see #getObject() */ @Nullable T getIfUnique() throws BeansException; /** * Return an instance (possibly shared or independent) of the object * managed by this factory. * @param defaultSupplier a callback for supplying a default object * if no unique candidate is present in the factory * @return an instance of the bean, or the supplied default object * if no such bean is available or if it is not unique in the factory * (i.e. multiple candidates found with none marked as primary) * @throws BeansException in case of creation errors * @since 5.0 * @see #getIfUnique() */ default T getIfUnique(Supplier<T> defaultSupplier) throws BeansException { T dependency = getIfUnique(); return (dependency != null ? dependency : defaultSupplier.get()); } /** * Consume an instance (possibly shared or independent) of the object * managed by this factory, if unique. * @param dependencyConsumer a callback for processing the target object * if unique (not called otherwise) * @throws BeansException in case of creation errors * @since 5.0 * @see #getIfAvailable() */ default void ifUnique(Consumer<T> dependencyConsumer) throws BeansException { T dependency = getIfUnique(); if (dependency != null) { dependencyConsumer.accept(dependency); } } /** * Return an {@link Iterator} over all matching object instances, * without specific ordering guarantees (but typically in registration order). * @since 5.1 * @see #stream() */ @Override default Iterator<T> iterator() { return stream().iterator(); } /** * Return a sequential {@link Stream} over all matching object instances, * without specific ordering guarantees (but typically in registration order). * @since 5.1 * @see #iterator() * @see #orderedStream() */ default Stream<T> stream() { throw new UnsupportedOperationException("Multi element access not supported"); } /** * Return a sequential {@link Stream} over all matching object instances, * pre-ordered according to the factory's common order comparator. * <p>In a standard Spring application context, this will be ordered * according to {@link org.springframework.core.Ordered} conventions, * and in case of annotation-based configuration also considering the * {@link org.springframework.core.annotation.Order} annotation, * analogous to multi-element injection points of list/array type. * @since 5.1 * @see #stream() * @see org.springframework.core.OrderComparator */ default Stream<T> orderedStream() { throw new UnsupportedOperationException("Ordered element access not supported"); } }
[ "15665662468@163.com" ]
15665662468@163.com
b3a449da50cd35d34d92ab0545accdecdc738e75
bb07201c25c20a393b12f2fd2b71b5a0b0ed4caa
/AGACEApp/FIS-DAO/src/main/java/mx/gob/sat/siat/feagace/modelo/dao/insumos/mapper/ContadorInsumosSubAdminMapper.java
1f49691725f0f728a4fbea257f67ad1929993930
[]
no_license
xtaticzero/AGACEApp
cff6187bfd3656519ba4429af39545e6ba236589
9c29cd6c2d559827aed99edf02121e626db46ccb
refs/heads/master
2020-07-19T18:35:14.882685
2018-03-19T23:49:51
2018-03-19T23:49:51
73,757,634
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
package mx.gob.sat.siat.feagace.modelo.dao.insumos.mapper; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.simple.ParameterizedRowMapper; import mx.gob.sat.siat.feagace.modelo.dao.util.UtileriasMapperDao; import mx.gob.sat.siat.feagace.modelo.dto.insumos.ContadorInsumosSubAdmin; public class ContadorInsumosSubAdminMapper implements ParameterizedRowMapper<ContadorInsumosSubAdmin> { private static final String COLUMN_RFC_SUBADMINISTRADOR = "RFC_SUBADMINISTRADOR"; private static final String COLUMN_NOMBRE = "NOMBRE"; private static final String COLUMN_TOTAL_ASIGNADOS = "TOTAL_ASIGNADOS"; public ContadorInsumosSubAdmin mapRow(ResultSet rs, int rowNum) throws SQLException { ContadorInsumosSubAdmin contador = new ContadorInsumosSubAdmin(); if (UtileriasMapperDao.existeColumna(rs, COLUMN_RFC_SUBADMINISTRADOR)) { contador.setNombre(rs.getString(COLUMN_RFC_SUBADMINISTRADOR)); } if (UtileriasMapperDao.existeColumna(rs, COLUMN_NOMBRE)) { contador.setNombre(rs.getString(COLUMN_NOMBRE)); } contador.setTotalInsumos(rs.getLong(COLUMN_TOTAL_ASIGNADOS)); return contador; } }
[ "emmanuel.estrada@stksat.com" ]
emmanuel.estrada@stksat.com
9ad308f1241ebf64b43359a098e17ec6d6b5e5f3
106b8a7adcef08e780c2def9431a807407daa15d
/src/main/java/com/jokolelung/travel/service/impl/OfferServiceImpl.java
1a690f7670c1e82518d36a98cc188b215d493720
[]
no_license
jokolelungdevelopment/travel
26fba7ba0ccd8e581834acb029ad62e33b388464
f14cf641757e80323f56288296fe6b8fe903feab
refs/heads/master
2020-03-10T04:35:42.625401
2018-04-12T06:57:32
2018-04-12T06:57:32
129,196,087
0
0
null
2018-04-12T06:57:34
2018-04-12T05:06:10
Java
UTF-8
Java
false
false
2,429
java
package com.jokolelung.travel.service.impl; import com.jokolelung.travel.service.OfferService; import com.jokolelung.travel.domain.Offer; import com.jokolelung.travel.repository.OfferRepository; import com.jokolelung.travel.service.dto.OfferDTO; import com.jokolelung.travel.service.mapper.OfferMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * Service Implementation for managing Offer. */ @Service @Transactional public class OfferServiceImpl implements OfferService { private final Logger log = LoggerFactory.getLogger(OfferServiceImpl.class); private final OfferRepository offerRepository; private final OfferMapper offerMapper; public OfferServiceImpl(OfferRepository offerRepository, OfferMapper offerMapper) { this.offerRepository = offerRepository; this.offerMapper = offerMapper; } /** * Save a offer. * * @param offerDTO the entity to save * @return the persisted entity */ @Override public OfferDTO save(OfferDTO offerDTO) { log.debug("Request to save Offer : {}", offerDTO); Offer offer = offerMapper.toEntity(offerDTO); offer = offerRepository.save(offer); return offerMapper.toDto(offer); } /** * Get all the offers. * * @param pageable the pagination information * @return the list of entities */ @Override @Transactional(readOnly = true) public Page<OfferDTO> findAll(Pageable pageable) { log.debug("Request to get all Offers"); return offerRepository.findAll(pageable) .map(offerMapper::toDto); } /** * Get one offer by id. * * @param id the id of the entity * @return the entity */ @Override @Transactional(readOnly = true) public OfferDTO findOne(Long id) { log.debug("Request to get Offer : {}", id); Offer offer = offerRepository.findOne(id); return offerMapper.toDto(offer); } /** * Delete the offer by id. * * @param id the id of the entity */ @Override public void delete(Long id) { log.debug("Request to delete Offer : {}", id); offerRepository.delete(id); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
64919e07025fe6994c7f6aec9cbd45b773a10c60
9db6efa2f14baa0f4172272e361e1ed0c9940065
/aliyun-java-sdk-cs/src/main/java/com/aliyuncs/cs/model/v20151215/DescribeClusterNodeInfoWithInstanceRequest.java
fc256b511fd681be09bc9ae13f0da050b3eb3ff8
[ "Apache-2.0" ]
permissive
ResetFull/aliyun-openapi-java-sdk
31fb2c2f7c2b939df4c9067f7a221c3f2c7cef2e
e299d1778d514cd555c870a3b1de117ae3b34474
refs/heads/master
2021-08-31T04:50:07.771585
2017-12-20T12:28:50
2017-12-20T12:28:50
114,978,860
1
0
null
2017-12-21T07:57:54
2017-12-21T07:57:54
null
UTF-8
Java
false
false
1,900
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 com.aliyuncs.cs.model.v20151215; import com.aliyuncs.RoaAcsRequest; import com.aliyuncs.http.MethodType; /** * @author auto create * @version */ public class DescribeClusterNodeInfoWithInstanceRequest extends RoaAcsRequest<DescribeClusterNodeInfoWithInstanceResponse> { public DescribeClusterNodeInfoWithInstanceRequest() { super("CS", "2015-12-15", "DescribeClusterNodeInfoWithInstance"); setUriPattern("/token/[Token]/instance/[InstanceId]/node_info"); setMethod(MethodType.GET); } private String token; private String instanceId; public String getToken() { return this.token; } public void setToken(String token) { this.token = token; putPathParameter("Token", token); } public String getInstanceId() { return this.instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; putPathParameter("InstanceId", instanceId); } @Override public Class<DescribeClusterNodeInfoWithInstanceResponse> getResponseClass() { return DescribeClusterNodeInfoWithInstanceResponse.class; } }
[ "ling.wu@alibaba-inc.com" ]
ling.wu@alibaba-inc.com
e8f9b1f70bad0784f91edf0f4b77d4c1d9c28659
86414e5dc4ab68df154508948a6fcaa4ee3644c0
/carnival-spring-boot-starter-graphql/src/main/java/com/github/yingzhuo/carnival/graphql/exceptionhandler/ExceptionHandlerUtils.java
39ecc842f092c094838c2e168a0b8ca7390a25ab
[ "Apache-2.0" ]
permissive
yingzhuo/carnival
7121a8a789c4257e8cc5edb690c68b82a832d713
f93396c1c223b660f29fa78e97ab13fe2db4316f
refs/heads/master
2022-06-02T17:15:10.999229
2021-12-14T01:18:39
2021-12-14T01:18:39
110,480,126
16
9
Apache-2.0
2022-05-25T23:10:24
2017-11-13T00:05:32
Java
UTF-8
Java
false
false
2,781
java
/* * ____ _ ____ _ _ _____ ___ _ * / ___| / \ | _ \| \ | |_ _\ \ / / \ | | * | | / _ \ | |_) | \| || | \ \ / / _ \ | | * | |___/ ___ \| _ <| |\ || | \ V / ___ \| |___ * \____/_/ \_\_| \_\_| \_|___| \_/_/ \_\_____| * * https://github.com/yingzhuo/carnival */ package com.github.yingzhuo.carnival.graphql.exceptionhandler; import com.github.yingzhuo.carnival.exception.business.BusinessException; import graphql.GraphQLError; import graphql.GraphqlErrorBuilder; import graphql.schema.DataFetchingEnvironment; import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolationException; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; /** * @author ๅบ”ๅ“ * @since 1.10.15 */ public final class ExceptionHandlerUtils { private ExceptionHandlerUtils() { } public static List<GraphQLError> handle( final DataFetchingEnvironment environment, final ConstraintViolationException exception) { return handle(environment, exception, true); } public static List<GraphQLError> handle( final DataFetchingEnvironment environment, final ConstraintViolationException exception, final boolean joinMessage) { if (joinMessage) { final String msg = exception.getConstraintViolations() .stream() .map(ConstraintViolation::getMessage) .sorted() .collect(Collectors.joining(",")); return Collections.singletonList( GraphqlErrorBuilder .newError(environment) .errorType(ErrorType.BAD_REQUEST) .message(msg) .build() ); } else { return exception.getConstraintViolations().stream() .map(ConstraintViolation::getMessage) .sorted() .map(msg -> GraphqlErrorBuilder .newError(environment) .errorType(ErrorType.BAD_REQUEST) .message(msg) .build() ).collect(Collectors.toList()); } } public static List<GraphQLError> handle( final DataFetchingEnvironment environment, final BusinessException exception) { return Collections.singletonList( GraphqlErrorBuilder .newError(environment) .errorType(ErrorType.BUSINESS_ERROR) .message(exception.getMessage()) .build() ); } }
[ "yingzhor@gmail.com" ]
yingzhor@gmail.com
c36a15e4b9bab0271d35d8aeea998f7c890858d3
0bfd35893ec68c908ed928551ce0839ed36d78ac
/work/src/org/kuali/kfs/sec/businessobject/inquiry/SecurityModelMemberInquirable.java
ba6574b4b8c1c2da55a768e9aa479b0e48c2b664
[]
no_license
dazali/kfs_dataobject_restservice
06f8464f65f6c232828f337dc2aabbfe8298f240
434272c1f58564802e59f1038e5239324fe14cfa
refs/heads/master
2020-12-25T10:36:35.663227
2014-07-28T19:07:28
2014-07-28T19:07:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,008
java
/* * Copyright 2010 The Kuali Foundation. * * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php * * 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.kuali.kfs.sec.businessobject.inquiry; import java.util.HashMap; import java.util.Map; import java.util.Properties; import org.apache.commons.lang.StringUtils; import org.kuali.kfs.sec.SecPropertyConstants; import org.kuali.kfs.sec.businessobject.SecurityModelDefinition; import org.kuali.kfs.sys.KFSConstants; import org.kuali.kfs.sys.businessobject.inquiry.KfsInquirableImpl; import org.kuali.rice.core.api.membership.MemberType; import org.kuali.rice.kim.api.KimConstants; import org.kuali.rice.kim.api.identity.Person; import org.kuali.rice.kim.framework.group.GroupEbo; import org.kuali.rice.kim.framework.role.RoleEbo; import org.kuali.rice.kns.lookup.HtmlData; import org.kuali.rice.krad.bo.BusinessObject; import org.kuali.rice.krad.util.KRADConstants; import org.kuali.rice.krad.util.ObjectUtils; import org.kuali.rice.krad.util.UrlFactory; /** * Sets inquiry for member name based on type */ public class SecurityModelMemberInquirable extends KfsInquirableImpl { /** * @see org.kuali.kfs.sys.businessobject.inquiry.KfsInquirableImpl#getInquiryUrl(org.kuali.rice.krad.bo.BusinessObject, java.lang.String, boolean) */ @Override public HtmlData getInquiryUrl(BusinessObject businessObject, String attributeName, boolean forceInquiry) { if (SecPropertyConstants.MEMBER_ID.equals(attributeName)) { Properties parameters = new Properties(); parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KFSConstants.START_METHOD); Map<String, String> fieldList = new HashMap<String, String>(); String memberId = (String) ObjectUtils.getPropertyValue(businessObject, SecPropertyConstants.MEMBER_ID); String memberTypeCode = (String) ObjectUtils.getPropertyValue(businessObject, SecPropertyConstants.MEMBER_TYPE_CODE); if (StringUtils.isNotBlank(memberId) && StringUtils.isNotBlank(memberTypeCode)) { if (MemberType.ROLE.getCode().equals(memberTypeCode)) { parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, RoleEbo.class.getName()); parameters.put(KimConstants.PrimaryKeyConstants.ROLE_ID, memberId); fieldList.put(KimConstants.PrimaryKeyConstants.ROLE_ID, memberId.toString()); } else if (MemberType.GROUP.getCode().equals(memberTypeCode)) { parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, GroupEbo.class.getName()); parameters.put(KimConstants.PrimaryKeyConstants.GROUP_ID, memberId); fieldList.put(KimConstants.PrimaryKeyConstants.GROUP_ID, memberId.toString()); } else { parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, Person.class.getName()); parameters.put(KimConstants.PrimaryKeyConstants.PRINCIPAL_ID, memberId); fieldList.put(KimConstants.PrimaryKeyConstants.PRINCIPAL_ID, memberId.toString()); } return getHyperLink(SecurityModelDefinition.class, fieldList, UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, parameters)); } } return super.getInquiryUrl(businessObject, attributeName, forceInquiry); } }
[ "dazali@8e488046-810e-0410-995a-d32c8891de31" ]
dazali@8e488046-810e-0410-995a-d32c8891de31
246488a22ad44d5fa5fbfcb8f40d69f8ff9dbdf2
68871cfeaf37c12fd2e3608180d6ebd1689e9fec
/gen/com/numhero/client/widget/panelsubmenu/TimeSubmenuPanel_TimeSubmenuPanelUiBinderImpl_GenCss_style.java
d1181b3fe9524773775f5bef9f4ca50e605c7cfd
[]
no_license
uberto/netnumero
5e0170ed14d3f343f5eba651b73a6c82f8ec5d0e
18c462fed7a046281f88edcf3b47fcc61dedcbf6
refs/heads/master
2021-04-06T19:29:13.461683
2017-03-10T10:03:07
2017-03-10T10:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
202
java
package com.numhero.client.widget.panelsubmenu; import com.google.gwt.resources.client.CssResource; public interface TimeSubmenuPanel_TimeSubmenuPanelUiBinderImpl_GenCss_style extends CssResource { }
[ "antonio.signore@gmail.com" ]
antonio.signore@gmail.com
70328b1848562d252db0931ce1f7d57bf1a7234e
2ac446efa49bf64094b99ee5fcf12bacc7633ed8
/src/test/java/com/loserico/algorithm/MingmingRandom.java
f03d6714f175fe996113c64249c42ae930622ceb
[ "MIT" ]
permissive
ricoyu/loser-tests
56c2eb4ff4088721f999865c339f666ffce7aaea
e542191c1885ab4c94d2541bc26490f23d20cdb5
refs/heads/master
2022-09-11T19:17:22.138725
2020-07-14T02:54:34
2020-07-14T02:54:34
221,432,188
1
0
MIT
2022-09-01T23:21:09
2019-11-13T10:23:20
Java
UTF-8
Java
false
false
1,304
java
package com.loserico.algorithm; import java.util.Arrays; import java.util.Scanner; /** * <p> * Copyright: (C), 2020/4/22 20:33 * <p> * <p> * Company: Sexy Uncle Inc. * * @author Rico Yu ricoyu520@gmail.com * @version 1.0 */ public class MingmingRandom { /** * ๆ˜Žๆ˜Ž็š„้šๆœบๆ•ฐ * * ๆ˜Žๆ˜Žๆƒณๅœจๅญฆๆ กไธญ่ฏทไธ€ไบ›ๅŒๅญฆไธ€่ตทๅšไธ€้กน้—ฎๅท่ฐƒๆŸฅ๏ผŒไธบไบ†ๅฎž้ชŒ็š„ๅฎข่ง‚ๆ€ง๏ผŒไป–ๅ…ˆ็”จ่ฎก็ฎ—ๆœบ็”Ÿๆˆไบ†Nไธช1ๅˆฐ1000ไน‹้—ด็š„้šๆœบๆ•ดๆ•ฐ๏ผˆNโ‰ค1000๏ผ‰๏ผŒๅฏนไบŽๅ…ถไธญ้‡ๅค็š„ๆ•ฐๅญ—๏ผŒๅชไฟ็•™ไธ€ไธช๏ผŒๆŠŠๅ…ถไฝ™็›ธๅŒ็š„ๆ•ฐๅŽปๆމ๏ผŒไธๅŒ็š„ๆ•ฐๅฏนๅบ”็€ไธๅŒ็š„ๅญฆ็”Ÿ็š„ๅญฆๅทใ€‚็„ถๅŽๅ†ๆŠŠ่ฟ™ไบ›ๆ•ฐไปŽๅฐๅˆฐๅคงๆŽ’ๅบ๏ผŒๆŒ‰็…งๆŽ’ๅฅฝ็š„้กบๅบๅŽปๆ‰พๅŒๅญฆๅš่ฐƒๆŸฅใ€‚่ฏทไฝ ๅๅŠฉๆ˜Žๆ˜ŽๅฎŒๆˆโ€œๅŽป้‡โ€ไธŽโ€œๆŽ’ๅบโ€็š„ๅทฅไฝœ(ๅŒไธ€ไธชๆต‹่ฏ•็”จไพ‹้‡Œๅฏ่ƒฝไผšๆœ‰ๅคš็ป„ๆ•ฐๆฎ๏ผŒๅธŒๆœ›ๅคงๅฎถ่ƒฝๆญฃ็กฎๅค„็†)ใ€‚ * @param args */ public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int n = sc.nextInt(); int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = sc.nextInt(); } Arrays.sort(arr); //็ฌฌไธ€ไธชๆ•ฐๅญ— ๆˆ–่€…่ฏฅๆ•ฐๅญ—ไธ็ญ‰ไบŽๅ‰ไธ€ไธชๆ•ฐๅญ— ้ƒฝๅฏไปฅ่พ“ๅ‡บ for (int i = 0; i < n; i++) { if (i == 0 || arr[i] != arr[i - 1]) { System.out.println(arr[i]); } } } } }
[ "ricoyu520@gmail.com" ]
ricoyu520@gmail.com
affb1aa4a3c8bcfea603ac451f534e78a01112c8
08be78ee28957fe393bea727228fbe13e5c00df1
/modules/other/src/main/java/com/other/findconflict/ClassInfosDO.java
f2609b54e3eac2977482adc9fde104fd0353664f
[]
no_license
javachengwc/java-apply
432259eadfca88c6f3f2b80aae8e1e8a93df5159
98a45c716f18657f0e4181d0c125a73feb402b16
refs/heads/master
2023-08-22T12:30:05.708710
2023-08-15T08:21:15
2023-08-15T08:21:15
54,971,501
10
4
null
2022-12-16T11:03:56
2016-03-29T11:50:21
Java
UTF-8
Java
false
false
913
java
package com.other.findconflict; /** * ็ฑปไฟกๆฏDO */ public class ClassInfosDO { private String classFullName; private String jarName; /** * @param classFullName * @param jarName */ public ClassInfosDO(String classFullName, String jarName) { this.classFullName = classFullName; this.jarName = jarName; } /** * @return the classFullName */ public String getClassFullName() { return classFullName; } /** * @param classFullName the classFullName to set */ public void setClassFullName(String classFullName) { this.classFullName = classFullName; } /** * @return the jarName */ public String getJarName() { return jarName; } /** * @param jarName the jarName to set */ public void setJarName(String jarName) { this.jarName = jarName; } }
[ "chengwenchao@cd.tuan800.com" ]
chengwenchao@cd.tuan800.com
a8b83bf2eef328bb88841e467fe6a238e45113dd
cacec52e5653ab773d35d7f1b4f4f660580d7826
/web-admin/src/main/java/com/alipay/api/response/AlipayOfflineMaterialImageUploadResponse.java
3fcb9eeabc91af7c56b51ddd6a66763381c91927
[]
no_license
liuyuhua1984/GameAdminWeb
6d830e7ad1551ac1803abd12e9359c6bfd5965ec
c590fd88d768c8231e2160bf7415996b0027ac98
refs/heads/master
2021-08-28T13:40:50.540862
2017-12-12T10:20:06
2017-12-12T10:20:06
106,268,614
0
2
null
null
null
null
UTF-8
Java
false
false
969
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.offline.material.image.upload response. * * @author auto create * @since 1.0, 2017-07-06 12:01:21 */ public class AlipayOfflineMaterialImageUploadResponse extends AlipayResponse { private static final long serialVersionUID = 3884887731535816796L; /** * ๅ›พ็‰‡/่ง†้ข‘ๅœจๅ•†ๅฎถไธญๅฟƒ็š„ๅ”ฏไธ€ๆ ‡่ฏ† */ @ApiField("image_id") private String imageId; /** * ๅ›พ็‰‡/่ง†้ข‘็š„่ฎฟ้—ฎๅœฐๅ€๏ผˆไธบไบ†้˜ฒๆญข็›—้“พ๏ผŒ่ฏฅๅœฐๅ€ไธๅ…่ฎธๅตŒๅœจๅ…ถไป–้กต้ขๅฑ•็คบ๏ผŒๅช่ƒฝๅœจๆ–ฐ้กต้ขๅฑ•็คบ๏ผ‰ */ @ApiField("image_url") private String imageUrl; public void setImageId(String imageId) { this.imageId = imageId; } public String getImageId( ) { return this.imageId; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public String getImageUrl( ) { return this.imageUrl; } }
[ "lyh@163.com" ]
lyh@163.com
b7ed688d3eec70d399297e84e8423d15d86f8624
19177178af6ad41be50a1bc1de321b37af691c1f
/SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/aliases/AliasPlugin.java
37dbb9e055505e794c246f2d01dbddbae5b7da06
[ "MIT" ]
permissive
mskjaldgaard/SwissKnightMinecraft
12d33899278a1757edb9af16d54cd3e9c714c6ff
fbab2c8c893f9f34e4cc458758f59f28289492ff
refs/heads/master
2020-06-17T17:23:49.126672
2016-09-06T01:49:50
2016-09-06T01:49:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,432
java
package ch.vorburger.minecraft.aliases; import java.util.Collection; import java.util.Map; import java.util.Optional; import org.slf4j.Logger; import org.spongepowered.api.Game; import org.spongepowered.api.command.CommandManager; import org.spongepowered.api.command.CommandMapping; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.command.args.GenericArguments; import org.spongepowered.api.command.spec.CommandSpec; import org.spongepowered.api.event.Listener; import org.spongepowered.api.event.game.state.GameStartingServerEvent; import org.spongepowered.api.event.game.state.GameStoppingServerEvent; import org.spongepowered.api.plugin.PluginContainer; import org.spongepowered.api.text.Text; import com.google.common.base.Joiner; import com.google.common.collect.MapMaker; import com.google.inject.Inject; import ch.vorburger.minecraft.command.CommandExecutorAdapter; import ch.vorburger.minecraft.command.CommandHelper; import ch.vorburger.minecraft.command.CommandRegistry; /** * Aliases. For example: * /x 4 fd * @author Michael Vorburger */ //@Plugin(id = "VAliases", name = "Aliasing commands", version = "1.0") public class AliasPlugin { protected @Inject Logger logger; // TODO Persistence.. save the aliases, to survive restarts! protected @Inject Game game; protected @Inject PluginContainer plugin; protected @Inject CommandRegistry commandRegistry; protected @Inject CommandHelper commandHelper; protected CommandManager commandService; // cannot @Inject this :( protected Map<String, Script> aliases = new MapMaker().makeMap(); protected static final Joiner joiner = Joiner.on(' '); // @Command(value = "repeat command N times", aliases = { "n", "repeat", "loop" }) public void x(CommandSource commandSource, int n, String... commandsToRepeat) { String joinedCommandsToRepeat = joiner.join(commandsToRepeat); if (joinedCommandsToRepeat.startsWith("/")) joinedCommandsToRepeat = joinedCommandsToRepeat.substring(1); for (int i = 0; i < n; i++) { // TODO use same impl. as alias, to be able to use Script multi-commands here also (and for same error handling) commandService.process(commandSource, joinedCommandsToRepeat); // TODO handle returned result.. but doing above change will already take care of this, differently } } // @Command("list all / register new / delete Alias command") public void alias(CommandSource commandSource, Optional<String> name, Optional<String> commandsToAlias) { if (name.isPresent() && commandsToAlias.isPresent()) alias(commandSource, name.get(), commandsToAlias.get()); else if (name.isPresent() && !commandsToAlias.isPresent()) alias(commandSource, name.get()); else // !name.isPresent() && !commandsToAlias.isPresent() alias(commandSource); } //// @Command("register a new Alias command") public void alias(CommandSource commandSource, String name, String commandsToAlias) { Script script = new Script(/*name, */commandsToAlias); Optional<CommandMapping> command = commandHelper.createCommand(plugin, name, script.getCommands().toString(), script.asCommandExecutor(commandService)); if (command.isPresent()) commandRegistry.register(command.get()); else // logger.error("Failed to create CommandMapping to register: " + name); throw new IllegalArgumentException("Failed to create CommandMapping to register: " + name); aliases.put(name, script); } //// @Command("list all available Aliases commands") public void alias(CommandSource commandSource) { // TODO Format more nicely! if (!aliases.keySet().isEmpty()) commandSource.sendMessage(Text.of(aliases.keySet().toString())); } //// @Command("delete an Alias command") public void alias(CommandSource commandSource, String name) { if (aliases.remove(name) != null) commandRegistry.unregister(name); } @Listener public void onServerStopping(GameStoppingServerEvent event) { commandRegistry.unregisterAll(); } @Listener public void onServerStarting(GameStartingServerEvent event) { this.commandService = game.getCommandManager(); commandRegistry.register(CommandSpec.builder().description(Text.of("repeat command N times")).arguments( // GenericArguments.playerOrSource(Text.of("player"), game) GenericArguments.integer(Text.of("n")), GenericArguments.allOf(GenericArguments.string(Text.of("commandToRepeat"))) ).executor(CommandExecutorAdapter.adapt((src, args) -> { // Player player = (Player) src; // TODO if instanceof Integer n = args.<Integer>getOne("n").get(); Collection<String> commandsToRepeat = args.<String>getAll("commandToRepeat"); this.x(src, n, commandsToRepeat.toArray(new String[0])); })).build(), "x"); commandRegistry.register(CommandSpec.builder().description(Text.of("list all / register new / delete Alias command")).arguments( // GenericArguments.playerOrSource(Text.of("player"), game) GenericArguments.optional(GenericArguments.string(Text.of("cmd"))), GenericArguments.optional(GenericArguments.remainingJoinedStrings(Text.of("commandsToAlias"))) ).executor(CommandExecutorAdapter.adapt((src, args) -> { // Player player = (Player) src; // TODO if instanceof Optional<String> name = args.<String>getOne("cmd"); Optional<String> commandsToAlias = args.<String>getOne("commandsToAlias"); this.alias(src, name, commandsToAlias); })).build(), "def", "alias"); } }
[ "mike@vorburger.ch" ]
mike@vorburger.ch
e402cfb909504661480d2a907589ebde2a913ef9
499ddcef7a15bbeb45ba898f9e7153c3030c41f3
/consumer/src/main/java/com/web/controller/VersionController.java
ef45ad34a207eb62c88f48108056f2eb632e1605
[]
no_license
chywx/spring-boot-dubbo
c5ec9d9fbee5f71330e22f2d5d90f601ca86a4fb
910c816b7e4e2dc7a388b3e1ca8ccf7979d0339c
refs/heads/master
2022-01-26T18:14:03.688407
2021-05-07T02:23:46
2021-05-07T02:23:46
196,176,404
6
8
null
2022-01-12T23:04:23
2019-07-10T09:32:38
Java
UTF-8
Java
false
false
1,316
java
package com.web.controller; import com.service.SmsService; import org.apache.dubbo.config.annotation.Reference; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; ; /** * ๅŠŸ่ƒฝๆ่ฟฐ * * @author chy * @date 2019/10/23 0023 */ @RestController @RequestMapping("/msg") public class VersionController { @Reference(version = "1.0.1:*") SmsService Aaa; @Reference(version = "1.0.0") SmsService Bbb; @Reference(version = "*") SmsService Ccc; @Reference SmsService Ddd; @GetMapping("/aaa") public String send1() { String hello = Aaa.sendMsg("aaa"); System.out.println("aaa:" + hello); return hello; } @GetMapping("/bbb") public String send2() { String hello = Bbb.sendMsg("bbb"); System.out.println("bbb:" + hello); return hello; } @GetMapping("/ccc") public String send3() { String hello = Ccc.sendMsg("ccc"); System.out.println("ccc:" + hello); return hello; } @GetMapping("/ddd") public String send4() { String hello = Ddd.sendMsg("ddd"); System.out.println("ddd:" + hello); return hello; } }
[ "1559843332@qq.com" ]
1559843332@qq.com
a9eb622070e1d9a0effa7dc48dec7db900a5499b
19dc4b795d50f177a74438a0192af69c3849ac5e
/goshop-service-cms/src/main/java/org/goshop/cms/service/DubboProvider.java
6a189083840b83568c6e4fe7eb94657fc8590c9d
[]
no_license
spidermandl/stoneshop
6e2d469ce0fe05d66c3bb56e04f160b54dd63ebc
ecff96a61d8f2fc3b5cd279e7209da0ae07bc26d
refs/heads/master
2021-09-09T17:44:14.847907
2018-03-18T17:05:03
2018-03-18T17:05:03
111,582,391
0
1
null
null
null
null
UTF-8
Java
false
false
927
java
package org.goshop.cms.service; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * * @ๆ่ฟฐ: ๅฏๅŠจDubboๆœๅŠก็”จ็š„MainClass. * @ไฝœ่€…: WuShuicheng . * @ๅˆ›ๅปบๆ—ถ้—ด: 2013-11-5,ไธ‹ๅˆ9:47:55 . * @็‰ˆๆœฌ: 1.0 . */ public class DubboProvider { private static final Log log = LogFactory.getLog(DubboProvider.class); public static void main(String[] args) { try { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring/spring-context.xml"); context.start(); } catch (Exception e) { log.error("== DubboProvider context start error:",e); } synchronized (DubboProvider.class) { while (true) { try { DubboProvider.class.wait(); } catch (InterruptedException e) { log.error("== synchronized error:",e); } } } } }
[ "Desmond@Desmonds-MacBook-Pro.local" ]
Desmond@Desmonds-MacBook-Pro.local
2631be809bda1651547d22b4c6d9f019c60bf533
dfb7075efb55d2f2688eec947971aef81154ee56
/src/WhileDemo.java
2aa8856fadaa94eb4c61b09387165c6fd916e699
[]
no_license
amolujagare123/JAVA830AMfeb21
c8713c3ad242440adcab35a081cb926e896b023f
bfd25dd2e6b1be3519f7b8787d4060fa93ae38ea
refs/heads/master
2023-04-17T12:18:26.292305
2021-04-28T07:59:52
2021-04-28T07:59:52
335,822,310
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
public class WhileDemo { public static void main(String[] args) { int i = 1; // initialization while(i<=10) // condition checking { System.out.println(i); i=i++; // increment } } }
[ "amolujagare@gmail.com" ]
amolujagare@gmail.com
a1747cc8e93de976c758cc0c1009f2b5167b87ab
20cfebfb1552d2cc6637bb2be13be76fd3170e46
/EPI/test/puzzles/LargestRectangleUnderSkylineTest.java
d1cda7954dd13d62dba5d47badc8a55f9422dc67
[]
no_license
pankajmore/DPP
af7f66b3df36e49e9042eb0344f5dd8a39fc1bbb
bbbd2e8b0033411a98b63eba51486215a001ec46
refs/heads/master
2020-04-04T06:12:13.632124
2018-10-12T01:09:37
2018-10-12T01:09:37
8,388,144
9
5
null
null
null
null
UTF-8
Java
false
false
396
java
package puzzles; import org.junit.Test; import java.util.Arrays; import java.util.List; import static puzzles.LargestRectangleUnderSkyline.calculateLargestRectangle; public class LargestRectangleUnderSkylineTest { @Test public void testCalculateLargestRectangle() throws Exception { List<Integer> A = Arrays.asList(2, 3, 4, 1, 2); assert calculateLargestRectangle(A) == 6; } }
[ "pankajmore@gmail.com" ]
pankajmore@gmail.com
8d4691545203951d4aaf5e66e895bb82df13d1ab
cbc61ffb33570a1bc55bb1e754510192b0366de2
/ole-app/olefs/src/it/java/org/kuali/ole/deliver/OLEPatronHelper.java
eee0f7bcf7263becaa52dc8de18946d49627abca
[ "ECL-2.0" ]
permissive
VU-libtech/OLE-INST
42b3656d145a50deeb22f496f6f430f1d55283cb
9f5efae4dfaf810fa671c6ac6670a6051303b43d
refs/heads/master
2021-07-08T11:01:19.692655
2015-05-15T14:40:50
2015-05-15T14:40:50
24,459,494
1
0
ECL-2.0
2021-04-26T17:01:11
2014-09-25T13:40:33
Java
UTF-8
Java
false
false
7,684
java
package org.kuali.ole.deliver; import org.kuali.ole.deliver.bo.*; import org.kuali.rice.kim.impl.identity.address.EntityAddressBo; import org.kuali.rice.kim.impl.identity.email.EntityEmailBo; import org.kuali.rice.kim.impl.identity.entity.EntityBo; import org.kuali.rice.kim.impl.identity.name.EntityNameBo; import org.kuali.rice.kim.impl.identity.phone.EntityPhoneBo; import org.kuali.rice.kim.impl.identity.type.EntityTypeContactInfoBo; import java.util.ArrayList; import java.util.List; /** * Created with IntelliJ IDEA. * User: sheiksalahudeenm * Date: 9/19/13 * Time: 10:01 PM * To change this template use File | Settings | File Templates. */ public class OLEPatronHelper { private EntityBo entityBo =new EntityBo(); private EntityNameBo entityNameBo=new EntityNameBo(); private EntityAddressBo entityAddressBo=new EntityAddressBo(); private EntityTypeContactInfoBo entityTypeContactInfoBo=new EntityTypeContactInfoBo(); private EntityEmailBo entityEmailBo=new EntityEmailBo(); private EntityPhoneBo entityPhoneBo=new EntityPhoneBo(); public static int idValue=2001; public OlePatronDocument changeId(OlePatronDocument olePatronDocument){ /* private EntityBo entityBo =new EntityBo(); private EntityNameBo entityNameBo=new EntityNameBo(); private EntityAddressBo entityAddressBo=new EntityAddressBo(); private EntityTypeContactInfoBo entityTypeContactInfoBo=new EntityTypeContactInfoBo(); private EntityEmailBo entityEmailBo=new EntityEmailBo(); private EntityPhoneBo entityPhoneBo=new EntityPhoneBo();*/ idValue=idValue+1; int id=idValue; List<EntityAddressBo> addressList=new ArrayList<>(); List<EntityEmailBo> emailList=new ArrayList<>(); List<EntityPhoneBo> phoneList=new ArrayList<>(); List<EntityPhoneBo> contactPhoneList=new ArrayList<>(); List<EntityTypeContactInfoBo> contactList=new ArrayList<>(); olePatronDocument.setOlePatronId(String.valueOf(id)); olePatronDocument.getEntity().setId(String.valueOf(id)); for(EntityTypeContactInfoBo entityTypeContactInfoBo1:olePatronDocument.getEntity().getEntityTypeContactInfos()){ entityTypeContactInfoBo=entityTypeContactInfoBo1; entityTypeContactInfoBo.setEntityId(String.valueOf(id)); contactList.add(entityTypeContactInfoBo); } olePatronDocument.getEntity().setEntityTypeContactInfos(contactList); for(EntityAddressBo entityAddressBo1:olePatronDocument.getAddresses()){ entityAddressBo=entityAddressBo1; entityAddressBo.setId(String.valueOf(id)); entityAddressBo.setEntityId(String.valueOf(id)); addressList.add(entityAddressBo); } for(EntityEmailBo entityEmailBo1:olePatronDocument.getEmails()){ entityEmailBo=entityEmailBo1; entityEmailBo.setEntityId(String.valueOf(id)); entityEmailBo.setId(String.valueOf(id)); emailList.add(entityEmailBo); } olePatronDocument.getName().setId(String.valueOf(id)); for(EntityPhoneBo entityPhoneBo1:olePatronDocument.getPhones()){ entityPhoneBo=entityPhoneBo1; entityPhoneBo.setId(String.valueOf(id)); entityPhoneBo.setEntityId(String.valueOf(id)); phoneList.add(entityPhoneBo); } List<OlePatronNotes> olePatronNotesList=new ArrayList<>(); for(OlePatronNotes OlePatronNotes:olePatronDocument.getNotes()){ OlePatronNotes.setPatronNoteId(String.valueOf(id)); OlePatronNotes.setOlePatronId(String.valueOf(id)); olePatronNotesList.add(OlePatronNotes); } List<OlePatronLostBarcode> olePatronLostBarcodeList=new ArrayList<>(); for(OlePatronLostBarcode olePatronLostBarcode:olePatronDocument.getLostBarcodes()){ olePatronLostBarcode.setOlePatronLostBarcodeId(String.valueOf(id)); olePatronLostBarcode.setOlePatronId(String.valueOf(id)); olePatronLostBarcodeList.add(olePatronLostBarcode); } olePatronDocument.getOleBorrowerType().setBorrowerTypeId(String.valueOf(id)); List<OlePatronAffiliation> olePatronAffiliationList=new ArrayList<>(); for(OlePatronAffiliation olePatronAffiliation:olePatronDocument.getPatronAffiliations()){ olePatronAffiliation.setEntityAffiliationId(String.valueOf(id)); olePatronAffiliation.setEntityId(String.valueOf(id)); olePatronAffiliationList.add(olePatronAffiliation); } List<OleProxyPatronDocument> oleProxyPatronDocumentList=new ArrayList<>(); for(OleProxyPatronDocument oleProxyPatronDocument:olePatronDocument.getOleProxyPatronDocumentList()){ oleProxyPatronDocument.setProxyPatronId(String.valueOf(id)); oleProxyPatronDocument.setOleProxyPatronDocumentId(String.valueOf(id)); oleProxyPatronDocument.setOlePatronId(String.valueOf(id)); oleProxyPatronDocumentList.add(oleProxyPatronDocument); } List<OlePatronLocalIdentificationBo> olePatronLocalIdentificationBoList=new ArrayList<>(); for(OlePatronLocalIdentificationBo olePatronLocalIdentificationBo:olePatronDocument.getOlePatronLocalIds()){ olePatronLocalIdentificationBo.setPatronLocalSeqId(String.valueOf(id)); olePatronLocalIdentificationBo.setLocalId(String.valueOf(id)); olePatronLocalIdentificationBo.setOlePatronId(String.valueOf(id)); olePatronLocalIdentificationBoList.add(olePatronLocalIdentificationBo); } List<OleAddressBo> oleAddressBoList=new ArrayList<>(); for(OleAddressBo oleAddressBo:olePatronDocument.getOleAddresses()){ oleAddressBo.setOleAddressId(String.valueOf(id)); oleAddressBo.setOlePatronId(String.valueOf(id)); oleAddressBoList.add(oleAddressBo); } /*private List<OlePatronLostBarcode> lostBarcodes = new ArrayList<OlePatronLostBarcode>(); private OleBorrowerType oleBorrowerType; private EntityBo entity = new EntityBo(); private OleSourceBo sourceBo; private OleStatisticalCategoryBo statisticalCategoryBo; private List<OlePatronAffiliation> patronAffiliations = new ArrayList<OlePatronAffiliation>(); private List<EntityEmploymentBo> employments = new ArrayList<EntityEmploymentBo>(); private List<OleDeliverRequestBo> oleDeliverRequestBos = new ArrayList<OleDeliverRequestBo>(); private List<OleProxyPatronDocument> oleProxyPatronDocuments = new ArrayList<OleProxyPatronDocument>(); private List<OleTemporaryCirculationHistory> oleTemporaryCirculationHistoryRecords = new ArrayList<OleTemporaryCirculationHistory>(); private List<OlePatronLocalIdentificationBo> olePatronLocalIds = new ArrayList<OlePatronLocalIdentificationBo>(); private List<OleProxyPatronDocument> oleProxyPatronDocumentList = new ArrayList<OleProxyPatronDocument>();*/ olePatronDocument.setAddresses(addressList); olePatronDocument.setEmails(emailList); olePatronDocument.setPhones(phoneList); olePatronDocument.setNotes(olePatronNotesList); olePatronDocument.setLostBarcodes(olePatronLostBarcodeList); olePatronDocument.setPatronAffiliations(olePatronAffiliationList); olePatronDocument.setOleProxyPatronDocuments(oleProxyPatronDocumentList); olePatronDocument.setOlePatronLocalIds(olePatronLocalIdentificationBoList); olePatronDocument.setOleAddresses(oleAddressBoList); return olePatronDocument; } }
[ "david.lacy@villanova.edu" ]
david.lacy@villanova.edu
adfc5894bf25b6003cf0ae48f06421b39dfb4964
995f73d30450a6dce6bc7145d89344b4ad6e0622
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/com/android/internal/telephony/uicc/euicc/$$Lambda$EuiccCard$UxQlywWQ3cqQ7G7vS2KuMEwtYro.java
66b3bcaf7497b116d50672e32918ad946eb1827b
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,008
java
package com.android.internal.telephony.uicc.euicc; import com.android.internal.telephony.uicc.asn1.Asn1Node; import com.android.internal.telephony.uicc.euicc.EuiccCard; import com.android.internal.telephony.uicc.euicc.apdu.RequestBuilder; /* renamed from: com.android.internal.telephony.uicc.euicc.-$$Lambda$EuiccCard$UxQlywWQ3cqQ7G7vS2KuMEwtYro reason: invalid class name */ /* compiled from: lambda */ public final /* synthetic */ class $$Lambda$EuiccCard$UxQlywWQ3cqQ7G7vS2KuMEwtYro implements EuiccCard.ApduRequestBuilder { public static final /* synthetic */ $$Lambda$EuiccCard$UxQlywWQ3cqQ7G7vS2KuMEwtYro INSTANCE = new $$Lambda$EuiccCard$UxQlywWQ3cqQ7G7vS2KuMEwtYro(); private /* synthetic */ $$Lambda$EuiccCard$UxQlywWQ3cqQ7G7vS2KuMEwtYro() { } @Override // com.android.internal.telephony.uicc.euicc.EuiccCard.ApduRequestBuilder public final void build(RequestBuilder requestBuilder) { requestBuilder.addStoreData(Asn1Node.newBuilder(48930).build().toHex()); } }
[ "dstmath@163.com" ]
dstmath@163.com
1ff3a519b8c08da6c98b222d335db7497781ce02
b26fa0b184d9121c8ce8a77b1cb983e63f8bc609
/codeForces/Codeforces_160A_Twins.java
be64c09128101d93563fede4bd63bd73836f7b0d
[]
no_license
Ignorance-of-Dong/Algorithm
ecc1e143ddccd56f2c5e556cfc0de936ac4831f5
ee3403dcd73c302674e0f911bcfec4d648d3229a
refs/heads/master
2023-08-16T11:02:23.156599
2023-08-13T06:41:37
2023-08-13T06:41:37
246,977,114
1
0
null
2023-09-12T11:56:06
2020-03-13T03:03:46
Java
UTF-8
Java
false
false
946
java
// AC: Time: 434 ms // Memory: 0 KB // . // T:O(nlogn), S:O(n) // import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Scanner; public class Codeforces_160A_Twins { public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(), sum = 0, curSum = 0, count = 0; List<Integer> record = new ArrayList<>(); while (sc.hasNext()) { int i = sc.nextInt(); record.add(i); sum += i; } record.sort(new Comparator<Integer>() { @Override public int compare(Integer o1, Integer o2) { return o2 - o1; } }); for (int i : record) { curSum += i; count++; if (curSum * 2 > sum) { System.out.println(count); return; } } } }
[ "1460018362@qq.com" ]
1460018362@qq.com
45c81d25a0bc9c6879f30c516f77302ea5ccbdec
63e0cd899972adbb117a17d8d40eef8fefb56d62
/lunch_and_learn/lal_springboot/sc04_spring_xml_jdbc/src/main/java/com/lal/modal/Item.java
8c91979ba7850d072e541c3223b96b021edafed5
[]
no_license
sherazc/playground
8b90e1f7b624a77a3f3e9cf5f71eecf984aa8180
7fe926d2564b12d96f237b253511dd7c2a302b64
refs/heads/master
2023-08-16T17:22:29.564713
2023-08-16T04:34:52
2023-08-16T04:34:52
87,116,642
2
1
null
2023-05-04T18:25:45
2017-04-03T20:15:15
PHP
UTF-8
Java
false
false
662
java
package com.lal.modal; public class Item { private long id; private String name; private double price; public Item() { } public Item(long id, String name, double price) { this.id = id; this.name = name; this.price = price; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } }
[ "sheraz@mbp.com" ]
sheraz@mbp.com
60cf4d6ea88b6c07eb96605de865766714931f37
1f906975ef58c3236985a7545c93327f45bcade4
/httpmapper-core/src/main/java/cn/yxffcode/httpmapper/core/HttpMethod.java
8bd11069e74a03e512f22bdad17013ef0d71fc08
[]
no_license
gaohanghbut/httpmapper
63cac58ab8b672d63de72139a4bc794496bf58ed
40f8b5e6475eb6875a650e2cb010db70230b7e66
refs/heads/master
2021-01-16T18:10:42.552153
2017-11-26T09:40:38
2017-11-26T09:40:38
100,046,241
7
3
null
null
null
null
UTF-8
Java
false
false
128
java
package cn.yxffcode.httpmapper.core; /** * @author gaohang on 8/6/17. */ public enum HttpMethod { GET, PUT, POST, DELETE }
[ "568720503@qq.com" ]
568720503@qq.com
c89ed4dce223bdf8f17be955a96d65abbf6786a3
47f8685b905ed2926ad10e55b49f7f1ed56b0bbd
/java/thebetweenlands/client/render/block/water/WaterMireCoralRenderer.java
8c2121119e1dddba5b4d8a5d0481841e5bcaf52e
[]
no_license
Alexander175/The-Betweenlands
98b93bbb840c6be5819c942076cc42bf98259e39
e2e4a6127ace1e4040eb72cf0333f5fd8238cd98
refs/heads/master
2021-01-15T13:07:50.584417
2015-04-26T20:59:46
2015-04-26T20:59:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
package thebetweenlands.client.render.block.water; import org.lwjgl.opengl.GL11; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.IBlockAccess; import thebetweenlands.blocks.plants.BlockMireCoral; public class WaterMireCoralRenderer implements IWaterRenderer { @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { Tessellator tessellator = Tessellator.instance; GL11.glDisable(GL11.GL_LIGHTING); Tessellator.instance.setColorOpaque(255, 255, 255); Minecraft mc = Minecraft.getMinecraft(); if(mc.theWorld != null && mc.thePlayer != null) { tessellator.setBrightness(mc.theWorld.getLightBrightnessForSkyBlocks( (int)(mc.thePlayer.posX), (int)(mc.thePlayer.posY), (int)(mc.thePlayer.posZ), 0)); } tessellator.startDrawingQuads(); renderer.drawCrossedSquares(((BlockMireCoral)block).iconMireCoral, -0.5, -0.5, -0.5, 1.0f); tessellator.draw(); GL11.glEnable(GL11.GL_LIGHTING); } @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { Tessellator.instance.setColorOpaque(255, 255, 255); renderer.drawCrossedSquares(((BlockMireCoral)block).iconMireCoral, x, y, z, 1.0f); return true; } }
[ "samuelboerlin@bluewin.ch" ]
samuelboerlin@bluewin.ch
e26191764842a8e255e7b5fe82229180a7cbfb1a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_3d73da564fc659f15f827a303cce006cc80659e5/TaskListInterestFilter/6_3d73da564fc659f15f827a303cce006cc80659e5_TaskListInterestFilter_s.java
40ec23cc7e3206b2204c050d7ab25c0cded6e1e4
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,427
java
/******************************************************************************* * Copyright (c) 2004, 2007 Mylyn project committers and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.eclipse.mylyn.internal.context.ui; import java.util.Calendar; import java.util.Set; import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants; import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector; import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer; import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager; import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter; import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; /** * Goal is to have this reuse as much of the super as possible. * * @author Mik Kersten * @author Rob Elves */ public class TaskListInterestFilter extends AbstractTaskListFilter { @Override public boolean select(Object parent, Object child) { try { if (child instanceof ScheduledTaskContainer) { ScheduledTaskContainer dateRangeTaskContainer = (ScheduledTaskContainer) child; return isDateRangeInteresting(dateRangeTaskContainer); } if (child instanceof AbstractTask) { AbstractTask task = null; if (child instanceof AbstractTask) { task = (AbstractTask) child; } if (task != null) { if (isUninteresting(parent, task)) { return false; } else if (isInteresting(parent, task)) { return true; } } } else if (child instanceof AbstractTaskContainer) { Set<AbstractTask> children = ((AbstractTaskContainer) child).getChildren(); // Always display empty containers if (children.size() == 0) { return false; } for (AbstractTask task : children) { if (shouldAlwaysShow(child, task, ITasksCoreConstants.MAX_SUBTASK_DEPTH)) { return true; } } } } catch (Throwable t) { StatusHandler.fail(t, "interest filter failed", false); } return false; } private boolean isDateRangeInteresting(ScheduledTaskContainer scheduleContainer) { if (TasksUiPlugin.getTaskActivityManager().isWeekDay(scheduleContainer) && (scheduleContainer.isPresent() || scheduleContainer.isFuture())) { return true; } return false; //return TasksUiPlugin.getTaskActivityManager().isWeekDay(container); } protected boolean isUninteresting(Object parent, AbstractTask task) { return !task.isActive() && !hasInterestingSubTasks(parent, task, ITasksCoreConstants.MAX_SUBTASK_DEPTH) && ((task.isCompleted() && !TaskActivityManager.getInstance().isCompletedToday(task) && !hasChanges( parent, task)) || (TaskActivityManager.getInstance().isScheduledAfterThisWeek(task)) && !hasChanges(parent, task)); } // TODO: make meta-context more explicit protected boolean isInteresting(Object parent, AbstractTask task) { return shouldAlwaysShow(parent, task, ITasksCoreConstants.MAX_SUBTASK_DEPTH); } public boolean shouldAlwaysShow(Object parent, AbstractTask task, int depth) { return task.isActive() || hasChanges(parent, task) || (TaskActivityManager.getInstance().isCompletedToday(task)) || shouldShowInFocusedWorkweekDateContainer(parent, task) || (isInterestingForThisWeek(parent, task) && !task.isCompleted()) || (TaskActivityManager.getInstance().isOverdue(task)) || hasInterestingSubTasks(parent, task, depth) || LocalRepositoryConnector.DEFAULT_SUMMARY.equals(task.getSummary()); // || isCurrentlySelectedInEditor(task); } private boolean hasInterestingSubTasks(Object parent, AbstractTask task, int depth) { if (depth > 0) { if (!TasksUiPlugin.getDefault().groupSubtasks(task)) { return false; } if (task.getChildren() != null && task.getChildren().size() > 0) { for (AbstractTask subTask : task.getChildren()) { if (shouldAlwaysShow(parent, subTask, depth - 1)) { return true; } } } } return false; } private static boolean shouldShowInFocusedWorkweekDateContainer(Object parent, AbstractTask task) { if (parent instanceof ScheduledTaskContainer) { if (!TasksUiPlugin.getTaskActivityManager().isWeekDay((ScheduledTaskContainer) parent)) { return false; } if (TaskActivityManager.getInstance().isOverdue(task) || task.isPastReminder()) return true; ScheduledTaskContainer container = (ScheduledTaskContainer) parent; Calendar previousCal = TasksUiPlugin.getTaskActivityManager().getActivityPrevious().getEnd(); Calendar nextCal = TasksUiPlugin.getTaskActivityManager().getActivityNextWeek().getStart(); if (container.getEnd().compareTo(previousCal) > 0 && container.getStart().compareTo(nextCal) < 0) { // within workweek return true; } } return false; } public static boolean isInterestingForThisWeek(Object parent, AbstractTask task) { if (parent instanceof ScheduledTaskContainer) { return shouldShowInFocusedWorkweekDateContainer(parent, task); } else { return TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task) || TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task) || task.isPastReminder() || TasksUiPlugin.getTaskActivityManager().isDueThisWeek(task); } } public static boolean hasChanges(Object parent, AbstractTask task) { if (parent instanceof ScheduledTaskContainer) { if (!shouldShowInFocusedWorkweekDateContainer(parent, task)) { return false; } } boolean result = false; if (task != null) { if (task.getLastReadTimeStamp() == null) { return true; } else if (task.getSynchronizationState() == RepositoryTaskSyncState.OUTGOING) { return true; } else if (task.getSynchronizationState() == RepositoryTaskSyncState.INCOMING && !(parent instanceof ScheduledTaskContainer)) { return true; } else if (task.getSynchronizationState() == RepositoryTaskSyncState.CONFLICT) { return true; } return hasChangesHelper(parent, task); } return result; } private static boolean hasChangesHelper(Object parent, AbstractTaskContainer container) { boolean result = false; for (AbstractTask task : container.getChildren()) { if (task != null) { if (task.getLastReadTimeStamp() == null) { result = true; } else if (task.getSynchronizationState() == RepositoryTaskSyncState.OUTGOING) { result = true; } else if (task.getSynchronizationState() == RepositoryTaskSyncState.INCOMING && !(parent instanceof ScheduledTaskContainer)) { result = true; } else if (task.getSynchronizationState() == RepositoryTaskSyncState.CONFLICT) { result = true; } else if (task.getChildren() != null && task.getChildren().size() > 0) { result = hasChangesHelper(parent, task); } } } return result; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d64bc4156d5c540e319bcbd8bc7c37ee250a42f4
4c6aa87d92651490441d2e25541d3e8378240cfb
/src/main/java/grondag/exotic_matter/concurrency/SharableTask.java
c33b3d17f94e0f3cc5ba8ded2cb9cadaa19621aa
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown" ]
permissive
grondag/Exotic-Matter
2c2741376bee7aaec5efb3d08f52c831febd02a1
561e3c9fbce506c05dcd0868e7cf015cd9138ec7
refs/heads/master
2021-04-09T11:09:55.954344
2019-07-09T16:11:41
2019-07-09T16:11:41
125,532,996
0
1
MIT
2018-04-10T15:28:49
2018-03-16T15:11:42
Java
UTF-8
Java
false
false
1,165
java
package grondag.exotic_matter.concurrency; public interface SharableTask { /** * Return true if more work remains. Must be safe * to call if there is no work or all work is done.<p> * * The provided batch index is an atomically increasing zero-based * positive integer. batchIndex 0 is always sent to the initiating thread.<p> * * The task is responsible for knowing how many batches of work it has * and must ignore (and return false) for batches beyond that range.<p> * * The task is also responsible for knowing what state is affected * by the batch identified by the given index and for managing the * synchronization of shared state affected by processing the batch. */ public boolean doSomeWork(int batchIndex); /** * Called on each thread after it has completed all work it * will do for the current task being executed. Meant as a hook * for aggregating results, clean up etc. Will not be * called if the thread did not participate, but cannot * guarantee the thread actually completed any work. */ public void onThreadComplete(); }
[ "grondag@gmail.com" ]
grondag@gmail.com
e5ea82e8832fa93a5c90826c4ce265a0719dc8be
8f6b6c6409393adbc3480f3987cbc1b7dda1751b
/src/main/java/crazypants/structures/creator/block/BlockTemplateEditor.java
b440af427179ab018cb9546e642826ef57e6685a
[ "CC0-1.0" ]
permissive
SleepyTrousers/StructuresCreator
26fa1bcc104d7b4d1f2541bea23ab98696f533df
cd7b1162405881210ca1667b39669054860f4789
refs/heads/master
2021-01-10T15:47:19.766048
2016-01-02T09:06:04
2016-01-02T09:06:04
43,886,894
2
2
null
null
null
null
UTF-8
Java
false
false
3,657
java
package crazypants.structures.creator.block; import com.enderio.core.common.BlockEnder; import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import crazypants.structures.creator.EnderStructuresCreator; import crazypants.structures.creator.EnderStructuresCreatorTab; import crazypants.structures.creator.GuiHandler; import crazypants.structures.creator.PacketHandler; import crazypants.structures.creator.block.template.DialogTemplateEditor; import crazypants.structures.creator.block.template.GuiTemplateEditor; import crazypants.structures.creator.block.template.TileTemplateEditor; import crazypants.structures.creator.block.template.packet.PacketBuildStructure; import crazypants.structures.creator.block.template.packet.PacketClearStructure; import crazypants.structures.creator.block.template.packet.PacketResourceTileGui; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; public class BlockTemplateEditor extends BlockEnder implements IGuiHandler { public static final String NAME = "blockTemplateEditor"; public static BlockTemplateEditor create() { PacketHandler.INSTANCE.registerMessage(PacketResourceTileGui.class, PacketResourceTileGui.class, PacketHandler.nextID(), Side.SERVER); PacketHandler.INSTANCE.registerMessage(PacketBuildStructure.class, PacketBuildStructure.class, PacketHandler.nextID(), Side.SERVER); PacketHandler.INSTANCE.registerMessage(PacketClearStructure.class, PacketClearStructure.class, PacketHandler.nextID(), Side.SERVER); BlockTemplateEditor res = new BlockTemplateEditor(); res.init(); return res; } protected BlockTemplateEditor() { super(NAME, TileTemplateEditor.class); setCreativeTab(EnderStructuresCreatorTab.tabEnderStructures); setLightOpacity(0); setResistance(2000); } @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { return null; } @Override public int getRenderBlockPass() { return 0; } @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iIconRegister) { blockIcon = iIconRegister.registerIcon(EnderStructuresCreator.MODID.toLowerCase() + ":" + NAME); } @Override protected boolean openGui(World world, int x, int y, int z, EntityPlayer entityPlayer, int side) { if(!world.isRemote) { entityPlayer.openGui(EnderStructuresCreator.instance, GuiHandler.GUI_ID_TEMPLATE_EDITOR, world, x, y, z); } if(world.isRemote) { TileEntity te = world.getTileEntity(x, y, z); if(te instanceof TileTemplateEditor) { DialogTemplateEditor.openDialog((TileTemplateEditor) te); } } return true; } @Override protected void init() { super.init(); EnderStructuresCreator.guiHandler.registerGuiHandler(GuiHandler.GUI_ID_TEMPLATE_EDITOR, this); } @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity te = world.getTileEntity(x, y, z); if(te instanceof TileTemplateEditor) { return new EmptyContainer(); } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity te = world.getTileEntity(x, y, z); if(te instanceof TileTemplateEditor) { return new GuiTemplateEditor(); } return null; } }
[ "crazypants.mc@gmail.com" ]
crazypants.mc@gmail.com
8dcd0c58a80941059f490a9cbe7b2951564aa1b5
ef23d9b833a84ad79a9df816bd3fd1321b09851e
/L2J_SunriseProject_Data/dist/game/data/scripts/handlers/punishmenthandlers/JailHandler.java
5b871364df83295df950f1b639625516bb417521
[]
no_license
nascimentolh/JBlueHeart-Source
c05c07137a7a4baf5fe8a793375f1700618ef12c
4179e6a6dbd0f74d614d7cc1ab7eb90ff41af218
refs/heads/master
2022-05-28T22:05:06.858469
2020-04-26T15:22:17
2020-04-26T15:22:17
259,045,356
1
0
null
null
null
null
UTF-8
Java
false
false
6,497
java
/* * Copyright (C) 2004-2013 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J DataPack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.punishmenthandlers; import l2r.gameserver.LoginServerThread; import l2r.gameserver.ThreadPoolManager; import l2r.gameserver.cache.HtmCache; import l2r.gameserver.enums.ZoneIdType; import l2r.gameserver.handler.IPunishmentHandler; import l2r.gameserver.model.L2World; import l2r.gameserver.model.actor.instance.L2PcInstance; import l2r.gameserver.model.actor.tasks.player.TeleportTask; import l2r.gameserver.model.entity.olympiad.OlympiadManager; import l2r.gameserver.model.events.Containers; import l2r.gameserver.model.events.EventType; import l2r.gameserver.model.events.impl.character.player.OnPlayerLogin; import l2r.gameserver.model.events.listeners.ConsumerEventListener; import l2r.gameserver.model.punishment.PunishmentTask; import l2r.gameserver.model.punishment.PunishmentType; import l2r.gameserver.model.zone.type.L2JailZone; import l2r.gameserver.network.L2GameClient; import l2r.gameserver.network.serverpackets.NpcHtmlMessage; import l2r.gameserver.util.Util; /** * This class handles jail punishment. * @author UnAfraid */ public class JailHandler implements IPunishmentHandler { public JailHandler() { // Register global listener Containers.Global().addListener(new ConsumerEventListener(Containers.Global(), EventType.ON_PLAYER_LOGIN, (OnPlayerLogin event) -> onPlayerLogin(event), this)); } public void onPlayerLogin(OnPlayerLogin event) { final L2PcInstance activeChar = event.getActiveChar(); if (activeChar.isJailed() && !activeChar.isInsideZone(ZoneIdType.JAIL)) { applyToPlayer(null, activeChar); } else if (!activeChar.isJailed() && activeChar.isInsideZone(ZoneIdType.JAIL) && !activeChar.isGM()) { removeFromPlayer(activeChar); } } @Override public void onStart(PunishmentTask task) { switch (task.getAffect()) { case CHARACTER: { String value = String.valueOf(task.getKey()); if (!Util.isDigit(value)) { return; } final L2PcInstance player = L2World.getInstance().getPlayer(Integer.parseInt(value)); if (player != null) { applyToPlayer(task, player); } break; } case ACCOUNT: { String account = String.valueOf(task.getKey()); final L2GameClient client = LoginServerThread.getInstance().getClient(account); if (client != null) { final L2PcInstance player = client.getActiveChar(); if (player != null) { applyToPlayer(task, player); } } break; } case IP: { String ip = String.valueOf(task.getKey()); for (L2PcInstance player : L2World.getInstance().getPlayers()) { if (player.getIPAddress().equals(ip)) { applyToPlayer(task, player); } } break; } } } @Override public void onEnd(PunishmentTask task) { switch (task.getAffect()) { case CHARACTER: { int objectId = Integer.parseInt(String.valueOf(task.getKey())); final L2PcInstance player = L2World.getInstance().getPlayer(objectId); if (player != null) { removeFromPlayer(player); } break; } case ACCOUNT: { String account = String.valueOf(task.getKey()); final L2GameClient client = LoginServerThread.getInstance().getClient(account); if (client != null) { final L2PcInstance player = client.getActiveChar(); if (player != null) { removeFromPlayer(player); } } break; } case IP: { String ip = String.valueOf(task.getKey()); for (L2PcInstance player : L2World.getInstance().getPlayers()) { if (player.getIPAddress().equals(ip)) { removeFromPlayer(player); } } break; } } } /** * Applies all punishment effects from the player. * @param task * @param player */ private static void applyToPlayer(PunishmentTask task, L2PcInstance player) { player.setInstanceId(0); player.setIsIn7sDungeon(false); if (OlympiadManager.getInstance().isRegisteredInComp(player)) { OlympiadManager.getInstance().removeDisconnectedCompetitor(player); } ThreadPoolManager.getInstance().scheduleGeneral(new TeleportTask(player, L2JailZone.getLocationIn()), 2000); // Open a Html message to inform the player final NpcHtmlMessage msg = new NpcHtmlMessage(); String content = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/jail_in.htm"); if (content != null) { content = content.replaceAll("%reason%", task != null ? task.getReason() : ""); content = content.replaceAll("%punishedBy%", task != null ? task.getPunishedBy() : ""); msg.setHtml(content); } else { msg.setHtml("<html><body>You have been put in jail by an admin.</body></html>"); } player.sendPacket(msg); if (task != null) { long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000); if (delay > 0) { player.sendMessage("You've been jailed for " + (delay > 60 ? ((delay / 60) + " minutes.") : delay + " seconds.")); } else { player.sendMessage("You've been jailed forever."); } } } /** * Removes any punishment effects from the player. * @param player */ private static void removeFromPlayer(L2PcInstance player) { ThreadPoolManager.getInstance().scheduleGeneral(new TeleportTask(player, L2JailZone.getLocationOut()), 2000); // Open a Html message to inform the player final NpcHtmlMessage msg = new NpcHtmlMessage(); String content = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/jail_out.htm"); if (content != null) { msg.setHtml(content); } else { msg.setHtml("<html><body>You are free for now, respect server rules!</body></html>"); } player.sendPacket(msg); } @Override public PunishmentType getType() { return PunishmentType.JAIL; } }
[ "luizh.nnh@gmail.com" ]
luizh.nnh@gmail.com
17f310b4d5ede1d60a8a4b2d0d1d56efd7ae70d3
254fdb8729b639fd0fb9896364d0e89186521b6a
/src/main/java/com/will/greedy/CourseScheduleIII.java
4106e16c76f965cdd8fd9ef937cca2dd26967b9b
[]
no_license
jiangxf/java_interview
99e9601aefa058a2465946803ad348ffb91f804e
1a1794689d7a977464e7e47a994140de67cf56be
refs/heads/master
2020-04-08T14:54:06.386481
2018-12-04T06:03:31
2018-12-04T06:03:31
159,456,451
0
0
null
null
null
null
UTF-8
Java
false
false
2,481
java
package com.will.greedy; import java.util.Arrays; import java.util.PriorityQueue; import java.util.Queue; /** * Created by gouthamvidyapradhan on 27/06/2017. * <p> * There are n different online courses numbered from 1 to n. Each course has some duration(course length) t and closed on dth day. A course should be taken continuously for t days and must be finished before or on the dth day. You MySolution start at the 1st day. * <p> * Given n online courses represented by pairs (t,d), your task is to find the maximal number of courses that can be taken. * <p> * Example: * Input: [[100, 200], [200, 1300], [1000, 1250], [2000, 3200]] * Output: 3 * Explanation: * There're totally 4 courses, but you can take 3 courses at most: * First, take the 1st course, it costs 100 days so you MySolution finish it on the 100th day, and ready to take the next course on the 101st day. * Second, take the 3rd course, it costs 1000 days so you MySolution finish it on the 1100th day, and ready to take the next course on the 1101st day. * Third, take the 2nd course, it costs 200 days so you MySolution finish it on the 1300th day. * The 4th course cannot be taken now, since you MySolution finish it on the 3300th day, which exceeds the closed date. * <p> * Note: * The integer 1 <= d, t, n <= 10,000. * You can't take two courses simultaneously. * <p> * Solution: O(N log N) * 1. Sort the courses with earliest deadline time (Greedy sort) * 2. Maintain a max-com.MySolution.heap of course duration. * 3. Iterate through each course and increment the total time by current course time and include this in the * max-com.MySolution.heap created in step 2. * 4. If the total time exceeds the current course deadline then, remove the course with max duration from max-com.MySolution.heap * inorder to accommodate the new course. */ public class CourseScheduleIII { public static void main(String[] args) throws Exception { int[][] course = {{5, 5}, {2, 6}, {4, 6}}; System.out.println(new CourseScheduleIII().scheduleCourse(course)); } public int scheduleCourse(int[][] courses) { Arrays.sort(courses, (a, b) -> a[1] - b[1]); Queue<Integer> pq = new PriorityQueue<>((a, b) -> b - a); int time = 0; for (int[] course : courses) { time += course[0]; pq.add(course[0]); if (time > course[1]) time -= pq.poll(); } return pq.size(); } }
[ "jiangxiaofeng@simuyun.com" ]
jiangxiaofeng@simuyun.com
053293c5302d3e831e332a3f8dcdc40f0519f30e
9b7538062e99fc1ae18de2a18dd3afad5666c627
/src/main/java/com/sparrow/orm/query/sql/impl/operation/ModOperation.java
f89135bbec6ca60f74adc7ca6c70d99d7ac42816
[]
no_license
zhenxiu/sparrow-orm
f3bf3c175ec363309e0c60026f64166390ac35bb
38f609fb784b7f0b8e1ce5240495879f9eaf4a22
refs/heads/master
2020-03-06T17:53:27.999730
2018-02-06T07:12:52
2018-02-06T07:12:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,028
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 com.sparrow.orm.query.sql.impl.operation; import com.sparrow.constant.magic.SYMBOL; import com.sparrow.orm.EntityManager; import com.sparrow.orm.Field; import com.sparrow.orm.Parameter; import com.sparrow.orm.query.Criteria; import com.sparrow.orm.query.CriteriaField; import com.sparrow.orm.query.sql.RelationOperationEntity; import com.sparrow.orm.query.sql.RelationalOperation; /** * Created by harry on 2018/1/15. */ public class ModOperation implements RelationalOperation { @Override public RelationOperationEntity operation(Criteria criteria) { CriteriaField criteriaField = criteria.getField(); EntityManager entityManager = EntityManager.get(criteriaField.getAlias()); Field field = entityManager.getField(criteriaField.getName()); String condition = (criteria.isAlias() ? criteria.getField().getAlias() + SYMBOL.DOT : SYMBOL.EMPTY) + field.getColumnName() + SYMBOL.BLANK + criteria.getCriteriaEntry().getKey().rendered() + SYMBOL.BLANK + criteria.getCriteriaEntry().getMod() + SYMBOL.BLANK + "=?"; Parameter parameter = new Parameter(field, criteria.getCriteriaEntry().getValue()); return new RelationOperationEntity(condition, parameter); } }
[ "zh_harry@163.com" ]
zh_harry@163.com
c27d3ad87d0dfae00d07b43375650f2ba13eca36
c1a566424cbe162e99a761679185dcb76980002e
/src/main/java/com/bisket/api/repository/AnimalMedicineWholesaleStoreRepository.java
d2be1958be16d91b6a44ba879f04bbfd05812cd0
[]
no_license
soohyeon317/bisket-api
b150d8a6ba6193eeb71606b34e399c5140ed1a56
b882a9298aad1bf8801e6d7e64bdc7f81ab680cd
refs/heads/master
2023-01-09T01:55:13.892140
2020-11-08T13:57:55
2020-11-08T13:57:55
306,935,955
0
0
null
null
null
null
UTF-8
Java
false
false
276
java
package com.bisket.api.repository; import com.bisket.api.entity.AnimalMedicineWholesaleStore; import org.springframework.data.jpa.repository.JpaRepository; public interface AnimalMedicineWholesaleStoreRepository extends JpaRepository<AnimalMedicineWholesaleStore, Long> { }
[ "tngus90!" ]
tngus90!
3d3fc4a1e34569e18d3fd806c99cac3c6a89b73e
ed865190ed878874174df0493b4268fccb636a29
/PuridiomRequestForQuotes/src/com/tsa/puridiom/rfqbidhistory/tasks/RfqBidHistoryListSave.java
3390e3fa93a4523db00c0f336c12bb758d987cae
[]
no_license
zach-hu/srr_java8
6841936eda9fdcc2e8185b85b4a524b509ea4b1b
9b6096ba76e54da3fe7eba70989978edb5a33d8e
refs/heads/master
2021-01-10T00:57:42.107554
2015-11-06T14:12:56
2015-11-06T14:12:56
45,641,885
0
0
null
null
null
null
UTF-8
Java
false
false
2,737
java
package com.tsa.puridiom.rfqbidhistory.tasks; import com.tsagate.foundation.processengine.*; import com.tsagate.foundation.utility.*; import java.util.List; import java.util.Map; import java.util.HashMap; import com.tsa.puridiom.entity.*; import java.util.ArrayList; public class RfqBidHistoryListSave extends Task{ public Object executeTask (Object object) throws Exception { Map incomingRequest = (Map) object; List rfqBidHistoryList = new ArrayList(); try { String organizationId = (String) incomingRequest.get("organizationId"); String userId = (String) incomingRequest.get("userId"); String RfqBidHistory_icRfqHeader = (String)incomingRequest.get("RfqBidHistory_icRfqHeader"); String RfqBidHistory_icRfqLine[] = (String[])incomingRequest.get("RfqBidHistory_icRfqLine"); String RfqBidHistory_unitPrice[] = (String[])incomingRequest.get("RfqBidHistory_unitPrice"); String RfqBidHistory_quantity[] = (String[]) incomingRequest.get("RfqBidHistory_quantity"); String RfqBidHistory_vendorId[] = (String[])incomingRequest.get("RfqBidHistory_vendorId"); String RfqBidHistory_bidSequence = (String)incomingRequest.get("RfqBidHistory_bidSequence"); String RfqBidHistory_processName = (String)incomingRequest.get("RfqBidHistory_processName"); if (Utility.isEmpty(RfqBidHistory_bidSequence)) { RfqBidHistory_bidSequence = "0"; } for (int i=0; i<RfqBidHistory_icRfqLine.length;i++) { Map newIncomingRequest = new HashMap(); newIncomingRequest.put("organizationId",organizationId); newIncomingRequest.put("userId",userId); newIncomingRequest.put("RfqBidHistory_icRfqHeader",RfqBidHistory_icRfqHeader); newIncomingRequest.put("RfqBidHistory_icRfqLine", RfqBidHistory_icRfqLine[i]); newIncomingRequest.put("RfqBidHistory_unitPrice",RfqBidHistory_unitPrice[i]); newIncomingRequest.put("RfqBidHistory_quantity",RfqBidHistory_quantity[i]); newIncomingRequest.put("RfqBidHistory_vendorId",RfqBidHistory_vendorId[i]); newIncomingRequest.put("RfqBidHistory_bidSequence",RfqBidHistory_bidSequence); PuridiomProcessLoader processLoader = new PuridiomProcessLoader(organizationId); processLoader.setApplicationName(this.getApplicationName()); PuridiomProcess process = processLoader.loadProcess(RfqBidHistory_processName); process.executeProcess(newIncomingRequest); RfqBidHistory rfqBidHistory = (RfqBidHistory )newIncomingRequest.get("rfqBidHistory"); //Log.debug(this, "RfqBidHistory : " + rfqBidHistory ); rfqBidHistoryList.add(rfqBidHistory ); } this.setStatus(Status.SUCCEEDED); } catch (Exception e) { Log.error(this, e.toString()); this.setStatus(Status.FAILED); } return rfqBidHistoryList; } }
[ "brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466" ]
brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466
c2f3e4840da2b23688650b78ca4b1b322577c63d
0167f77a8364fe86aed16510c97ffc348c0d9132
/src/com/jetcms/cms/entity/main/base/BaseCmsThirdAccount.java
b1ba612919853806dc69718cc0e36612e2f96c4a
[]
no_license
barrycom/kgmx
1bc379b7472ec11f8d807fbdf38644b59449410f
f2ad7902d06d36fdb908c6c098f36c978907b05f
refs/heads/master
2021-07-13T14:06:20.966837
2017-09-26T03:14:54
2017-09-26T03:16:42
104,827,608
2
0
null
null
null
null
UTF-8
Java
false
false
3,524
java
package com.jetcms.cms.entity.main.base; import java.io.Serializable; /** * This is an object that contains data related to the jc_third_account table. * Do not modify this class because it will be overwritten if the configuration file * related to this class is modified. * * @hibernate.class * table="jc_third_account" */ public abstract class BaseCmsThirdAccount implements Serializable { public static String REF = "CmsThirdAccount"; public static String PROP_SOURCE = "source"; public static String PROP_ACCOUNT_KEY = "accountKey"; public static String PROP_USERNAME = "username"; public static String PROP_ID = "id"; // constructors public BaseCmsThirdAccount () { initialize(); } /** * Constructor for primary key */ public BaseCmsThirdAccount (java.lang.Long id) { this.setId(id); initialize(); } /** * Constructor for required fields */ public BaseCmsThirdAccount ( java.lang.Long id, java.lang.String accountKey, java.lang.String username, java.lang.String source) { this.setId(id); this.setAccountKey(accountKey); this.setUsername(username); this.setSource(source); initialize(); } protected void initialize () {} private int hashCode = Integer.MIN_VALUE; // primary key private java.lang.Long id; // fields private java.lang.String accountKey; private java.lang.String username; private java.lang.String source; /** * Return the unique identifier of this class * @hibernate.id * generator-class="sequence" * column="account_id" */ public java.lang.Long getId () { return id; } /** * Set the unique identifier of this class * @param id the new ID */ public void setId (java.lang.Long id) { this.id = id; this.hashCode = Integer.MIN_VALUE; } /** * Return the value associated with the column: account_key */ public java.lang.String getAccountKey () { return accountKey; } /** * Set the value related to the column: account_key * @param accountKey the account_key value */ public void setAccountKey (java.lang.String accountKey) { this.accountKey = accountKey; } /** * Return the value associated with the column: username */ public java.lang.String getUsername () { return username; } /** * Set the value related to the column: username * @param username the username value */ public void setUsername (java.lang.String username) { this.username = username; } /** * Return the value associated with the column: source */ public java.lang.String getSource () { return source; } /** * Set the value related to the column: source * @param source the source value */ public void setSource (java.lang.String source) { this.source = source; } public boolean equals (Object obj) { if (null == obj) return false; if (!(obj instanceof com.jetcms.cms.entity.main.CmsThirdAccount)) return false; else { com.jetcms.cms.entity.main.CmsThirdAccount cmsThirdAccount = (com.jetcms.cms.entity.main.CmsThirdAccount) obj; if (null == this.getId() || null == cmsThirdAccount.getId()) return false; else return (this.getId().equals(cmsThirdAccount.getId())); } } public int hashCode () { if (Integer.MIN_VALUE == this.hashCode) { if (null == this.getId()) return super.hashCode(); else { String hashStr = this.getClass().getName() + ":" + this.getId().hashCode(); this.hashCode = hashStr.hashCode(); } } return this.hashCode; } public String toString () { return super.toString(); } }
[ "whlitiger_yp@163.com" ]
whlitiger_yp@163.com
13e0d97b4810ff878d1a29d0b00f32ba6233620d
0ffe5765b6a5ed454707fb5875ef174dbe576944
/src/Binary_Search/Search_in_Rotated_Sorted_Array_II/Search_in_Rotated_Sorted_Array_II.java
518739236dceedab1a6223ec99685a39d2a96dcf
[]
no_license
liupenny/algorithms
92b68c6de9abf95747dacda90d15f03791aa5ac5
f42801c4a5881686905214eddbb8e8ac204fa90d
refs/heads/master
2021-07-13T08:26:59.691297
2018-12-31T13:56:37
2018-12-31T13:56:37
116,551,822
0
0
null
null
null
null
UTF-8
Java
false
false
1,651
java
package Binary_Search.Search_in_Rotated_Sorted_Array_II; /** * Created by PennyLiu on 2018/1/11. */ public class Search_in_Rotated_Sorted_Array_II { public boolean search(int[] nums, int target) { int left=0, right=nums.length-1, mid; if(nums.length == 0) { return false; } while (left < right) { mid = left + ((right-left)>>1); if(nums[mid] == target) { return true; } if (nums[mid] > nums[left]) //ๅทฆๅŠ้ƒจๅˆ†ๆ˜ฏๆœ‰ๅบ็š„ ๅญ้›†๏ผ { if(target >= nums[left] && target < nums[mid]) //ๅœจๅทฆๅŠ้ƒจๅˆ†้‡Œ { right = mid - 1; } else { left = mid + 1; } } else if (nums[mid] < nums[left]) { if(target <= nums[right] && target > nums[mid]) //่ฟ™ไธคไธชๅˆคๆ–ญๆ‰พๅˆฐไบ†ไธ€ๅฎš่Œƒๅ›ด็š„ๆœ‰ๅบๅŒบ้—ด { left = mid + 1; } else { right = mid - 1; } } else //ๆญคๆ—ถๅ› ไธบ็Ÿฅ้“ mid==left,mid!=target,ๆ‰€ไปฅleft!=target๏ผŒๆ‰€ไปฅๅช่ƒฝๅทฆ็งปไธ€ๆญฅใ€‚ๆ‰€ไปฅๆƒ…ๅ†ตๆœ€็ณŸ็ณ•ๅฏ่ƒฝๆ˜ฏO๏ผˆn๏ผ‰ { left++; } } return nums[left]==target?true:false; } public static void main(String[] algs) { int[] arr={1,3,1,1,1}; int target = 3; Search_in_Rotated_Sorted_Array_II test = new Search_in_Rotated_Sorted_Array_II(); System.out.println(test.search(arr,target)); } }
[ "651023146@qq.com" ]
651023146@qq.com
180732e9ca33325e19dda8021c2165e3a08e426a
09649412e12bdc15cf61607e881203735cfafa50
/src/main/java/com/microsoft/bingads/internal/bulk/ConditionalBulkMapping.java
6036346ba39f8becec6d330870c40a3871cff22f
[ "MIT" ]
permissive
yosefarr/BingAds-Java-SDK
cec603b74a921e71c6173ce112caccdf7c1fdbc8
d1c333d0ba5b7e434c85a92c7a80dad0add0d634
refs/heads/master
2021-01-18T15:02:53.945816
2016-03-06T13:18:32
2016-03-06T13:18:32
51,738,651
0
1
null
2016-02-15T07:38:14
2016-02-15T07:38:13
null
UTF-8
Java
false
false
1,127
java
package com.microsoft.bingads.internal.bulk; import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; import com.microsoft.bingads.internal.functionalinterfaces.Function; public class ConditionalBulkMapping<TEntity, TProperty> implements BulkMapping<TEntity> { private SimpleBulkMapping<TEntity, TProperty> simpleMapping; private Function<TEntity, Boolean> condition; public ConditionalBulkMapping(String csvHeader, Function<TEntity, Boolean> condition, Function<TEntity, TProperty> fieldToCsv, BiConsumer<String, TEntity> csvToField) { simpleMapping = new SimpleBulkMapping<TEntity, TProperty>(csvHeader, fieldToCsv, csvToField); this.condition = condition; } @Override public void convertToCsv(TEntity entity, RowValues values) { if (condition.apply(entity)) { simpleMapping.convertToCsv(entity, values); } } @Override public void convertToEntity(RowValues values, TEntity entity) { if (condition.apply(entity)) { simpleMapping.convertToEntity(values, entity); } } }
[ "bing_ads_sdk@microsoft.com" ]
bing_ads_sdk@microsoft.com
2249b6381365dbf5b705a9ee990a9bab486d5efc
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes6.dex_source_from_JADX/com/facebook/messaging/model/attribution/AttributionVisibilityBuilder.java
51718537c351c55afef6a2d673136e75b041a875
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
647
java
package com.facebook.messaging.model.attribution; /* compiled from: user_longitude */ public class AttributionVisibilityBuilder { public boolean f1909a; public boolean f1910b; public boolean f1911c; public boolean f1912d; public boolean f1913e; AttributionVisibilityBuilder() { } public final AttributionVisibilityBuilder m3266f() { this.f1909a = false; this.f1910b = false; this.f1911c = false; this.f1912d = false; this.f1913e = false; return this; } public final AttributionVisibility m3267h() { return new AttributionVisibility(this); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
27dbc99a03cc0928f092a4b19f60ee9bc9fb6b01
b4cc861bf70792e1e587efe827dfdb0157442e95
/mcp62/temp/src/minecraft/net/minecraft/src/GuiContainerCreative.java
34747eb155ba991273d92dddf851755df6d68a76
[]
no_license
popnob/ooptest
8c61729343bf0ed113c3038b5a0f681387805ef7
856b396adfe5bb3a2dbdca0e22ea724776d2ce8a
refs/heads/master
2021-01-23T08:04:35.318303
2012-05-30T18:05:25
2012-05-30T18:05:25
4,483,121
4
0
null
null
null
null
UTF-8
Java
false
false
8,175
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode fieldsfirst package net.minecraft.src; import java.util.List; import net.minecraft.client.Minecraft; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; // Referenced classes of package net.minecraft.src: // GuiContainer, ContainerCreative, EntityPlayer, AchievementList, // PlayerController, GuiInventory, Slot, EntityPlayerSP, // InventoryPlayer, ItemStack, Container, StatCollector, // FontRenderer, RenderEngine, GuiButton, GuiAchievements, // GuiStats, InventoryBasic public class GuiContainerCreative extends GuiContainer { private static InventoryBasic field_35311_f = new InventoryBasic("tmp", 72); private float field_35312_g; private boolean field_35313_h; private boolean field_35314_i; public GuiContainerCreative(EntityPlayer p_i599_1_) { super(new ContainerCreative(p_i599_1_)); field_35312_g = 0.0F; field_35313_h = false; p_i599_1_.field_20068_h = field_973_i; field_948_f = true; p_i599_1_.func_25058_a(AchievementList.field_25195_b, 1); field_974_h = 208; } public void func_570_g() { if(!field_945_b.field_6327_b.func_35640_h()) { field_945_b.func_6272_a(new GuiInventory(field_945_b.field_6322_g)); } } protected void func_35309_a(Slot p_35309_1_, int p_35309_2_, int p_35309_3_, boolean p_35309_4_) { if(p_35309_1_ != null) { if(p_35309_1_.field_1118_b == field_35311_f) { InventoryPlayer inventoryplayer = field_945_b.field_6322_g.field_778_b; ItemStack itemstack1 = inventoryplayer.func_20075_i(); ItemStack itemstack4 = p_35309_1_.func_777_b(); if(itemstack1 != null && itemstack4 != null && itemstack1.field_1617_c == itemstack4.field_1617_c) { if(p_35309_3_ == 0) { if(p_35309_4_) { itemstack1.field_1615_a = itemstack1.func_1089_c(); } else if(itemstack1.field_1615_a < itemstack1.func_1089_c()) { itemstack1.field_1615_a++; } } else if(itemstack1.field_1615_a <= 1) { inventoryplayer.func_20076_b(null); } else { itemstack1.field_1615_a--; } } else if(itemstack1 != null) { inventoryplayer.func_20076_b(null); } else if(itemstack4 == null) { inventoryplayer.func_20076_b(null); } else if(itemstack1 == null || itemstack1.field_1617_c != itemstack4.field_1617_c) { inventoryplayer.func_20076_b(ItemStack.func_30010_b(itemstack4)); ItemStack itemstack2 = inventoryplayer.func_20075_i(); if(p_35309_4_) { itemstack2.field_1615_a = itemstack2.func_1089_c(); } } } else { field_973_i.func_27280_a(p_35309_1_.field_20007_a, p_35309_3_, p_35309_4_, field_945_b.field_6322_g); ItemStack itemstack = field_973_i.func_20118_a(p_35309_1_.field_20007_a).func_777_b(); field_945_b.field_6327_b.func_35637_a(itemstack, (p_35309_1_.field_20007_a - field_973_i.field_20122_e.size()) + 9 + 36); } } else { InventoryPlayer inventoryplayer1 = field_945_b.field_6322_g.field_778_b; if(inventoryplayer1.func_20075_i() != null) { if(p_35309_3_ == 0) { field_945_b.field_6322_g.func_48153_a(inventoryplayer1.func_20075_i()); field_945_b.field_6327_b.func_35639_a(inventoryplayer1.func_20075_i()); inventoryplayer1.func_20076_b(null); } if(p_35309_3_ == 1) { ItemStack itemstack3 = inventoryplayer1.func_20075_i().func_1085_a(1); field_945_b.field_6322_g.func_48153_a(itemstack3); field_945_b.field_6327_b.func_35639_a(itemstack3); if(inventoryplayer1.func_20075_i().field_1615_a == 0) { inventoryplayer1.func_20076_b(null); } } } } } public void func_6448_a() { if(!field_945_b.field_6327_b.func_35640_h()) { field_945_b.func_6272_a(new GuiInventory(field_945_b.field_6322_g)); } else { super.func_6448_a(); field_949_e.clear(); } } protected void func_587_j() { field_6451_g.func_873_b(StatCollector.func_25200_a("container.creative"), 8, 6, 0x404040); } public void func_566_e() { super.func_566_e(); int i = Mouse.getEventDWheel(); if(i != 0) { int j = (((ContainerCreative)field_973_i).field_35375_a.size() / 8 - 8) + 1; if(i > 0) { i = 1; } if(i < 0) { i = -1; } field_35312_g -= (double)i / (double)j; if(field_35312_g < 0.0F) { field_35312_g = 0.0F; } if(field_35312_g > 1.0F) { field_35312_g = 1.0F; } ((ContainerCreative)field_973_i).func_35374_a(field_35312_g); } } public void func_571_a(int p_571_1_, int p_571_2_, float p_571_3_) { boolean flag = Mouse.isButtonDown(0); int i = field_40216_e; int j = field_40215_f; int k = i + 155; int l = j + 17; int i1 = k + 14; int j1 = l + 160 + 2; if(!field_35314_i && flag && p_571_1_ >= k && p_571_2_ >= l && p_571_1_ < i1 && p_571_2_ < j1) { field_35313_h = true; } if(!flag) { field_35313_h = false; } field_35314_i = flag; if(field_35313_h) { field_35312_g = (float)(p_571_2_ - (l + 8)) / ((float)(j1 - l) - 16F); if(field_35312_g < 0.0F) { field_35312_g = 0.0F; } if(field_35312_g > 1.0F) { field_35312_g = 1.0F; } ((ContainerCreative)field_973_i).func_35374_a(field_35312_g); } super.func_571_a(p_571_1_, p_571_2_, p_571_3_); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(2896); } protected void func_589_a(float p_589_1_, int p_589_2_, int p_589_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int i = field_945_b.field_6315_n.func_1070_a("/gui/allitems.png"); field_945_b.field_6315_n.func_1076_b(i); int j = field_40216_e; int k = field_40215_f; func_550_b(j, k, 0, 0, field_971_a, field_974_h); int l = j + 155; int i1 = k + 17; int j1 = i1 + 160 + 2; func_550_b(j + 154, k + 17 + (int)((float)(j1 - i1 - 17) * field_35312_g), 0, 208, 16, 16); } protected void func_572_a(GuiButton p_572_1_) { if(p_572_1_.field_938_f == 0) { field_945_b.func_6272_a(new GuiAchievements(field_945_b.field_25001_G)); } if(p_572_1_.field_938_f == 1) { field_945_b.func_6272_a(new GuiStats(this, field_945_b.field_25001_G)); } } static InventoryBasic func_35310_g() { return field_35311_f; } }
[ "dicks@negro.com" ]
dicks@negro.com
a369803eca61dcaeadd4c5f49e8de372b0714e69
bf4d71dc1ceb45d05cc89a0c4fabbefc6a4d7917
/alogic-rpc/src/main/java/com/alogic/remote/cluster/Cluster.java
12b91bb3659ce38054e2e769cae7ce22ac3aeb23
[]
no_license
yanzhy1001/alogic
feae0e76a92cd66c8bce378c6f5fbe73a611bee6
0d89050bd6f17ce8f68b6999f1f85c772da8af91
refs/heads/master
2021-08-31T18:14:28.723481
2017-12-22T09:52:20
2017-12-22T09:52:20
115,503,417
1
0
null
2017-12-27T09:13:14
2017-12-27T09:13:13
null
UTF-8
Java
false
false
5,643
java
package com.alogic.remote.cluster; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import com.alogic.remote.backend.AppBackends; import com.alogic.remote.backend.BackendProvider; import com.alogic.remote.route.Route; import com.alogic.remote.route.impl.Simple; import com.anysoft.util.Configurable; import com.anysoft.util.Factory; import com.anysoft.util.IOTools; import com.anysoft.util.JsonTools; import com.anysoft.util.Properties; import com.anysoft.util.PropertiesConstants; import com.anysoft.util.Reportable; import com.anysoft.util.Watcher; import com.anysoft.util.XMLConfigurable; import com.anysoft.util.XmlElementProperties; import com.anysoft.util.XmlTools; /** * ้›†็พค * * ้›†็พคๆ˜ฏ่ทฏ็”ฑ็š„้›†ๅˆ * * @author duanyy * @version 1.1.11.3 [20170201 duanyy] <br> * - ้‡‡็”จSLF4jๆ—ฅๅฟ—ๆก†ๆžถ่พ“ๅ‡บๆ—ฅๅฟ— <br> * * @since 1.6.8.12 */ public interface Cluster extends Reportable,Configurable,XMLConfigurable,AutoCloseable{ /** * ่Žทๅ–id * @return id */ public String getId(); /** * ่Žทๅ–็ผบ็œ่ทฏ็”ฑ * @return Route */ public Route getDefaultRoute(); /** * ๆ นๆฎID่Žทๅ–ไธ€ไธชๅ†…้ƒจ้ข„ๅฎšไน‰็š„่ทฏ็”ฑ * @param id id * @return Route */ public Route getRoute(String id); /** * ่Žทๅ–Route็š„ๅˆ—่กจ * @return Routeๅˆ—่กจ */ public Route[] getRoutes(); /** * ่™šๅŸบ็ฑป * * @author duanyy * */ public abstract static class Abstract implements Cluster,BackendProvider{ /** * a logger of log4j */ protected final static Logger LOG = LoggerFactory.getLogger(Cluster.class); /** * id */ protected String id = null; /** * ็ผบ็œ็š„่ทฏ็”ฑๅฎž็Žฐ็ฑป */ protected String dftRouteClazz = Simple.class.getName(); /** * ็ผบ็œ็š„่ทฏ็”ฑid */ protected String dftRouteId = "default"; /** * ้ข„ๅฎšไน‰็š„Route */ protected Map<String,Route> routes = new ConcurrentHashMap<String,Route>(); @Override public void report(Element xml) { if (xml != null){ XmlTools.setString(xml,"id",getId()); XmlTools.setString(xml, "module", getClass().getName()); XmlTools.setString(xml,"dftRouteClass",dftRouteClazz); XmlTools.setString(xml, "dftRouteId", dftRouteId); if (!routes.isEmpty()){ Document doc = xml.getOwnerDocument(); Route[] list = getRoutes(); for (Route c:list){ Element e = doc.createElement("route"); XmlTools.setBoolean(e,"detail",false); c.report(e); xml.appendChild(e); } } } } @Override public void report(Map<String, Object> json) { if (json != null){ JsonTools.setString(json,"id",getId()); JsonTools.setString(json, "module", getClass().getName()); JsonTools.setString(json,"dftRouteClass",dftRouteClazz); JsonTools.setString(json, "dftRouteId", dftRouteId); if (!routes.isEmpty()){ List<Object> clusters = new ArrayList<Object>(); Route[] list = getRoutes(); for (Route c:list){ Map<String,Object> map = new HashMap<String,Object>(); JsonTools.setBoolean(json, "detail", false); c.report(map); clusters.add(map); } json.put("route", clusters); } } } @Override public void configure(Properties p) { id = PropertiesConstants.getString(p,"id",id); dftRouteClazz = PropertiesConstants.getString(p,"dftRouteClass",dftRouteClazz); dftRouteId = PropertiesConstants.getString(p,"dftRouteId",dftRouteId); } @Override public void configure(Element root,Properties p){ Properties props = new XmlElementProperties(root,p); configure(props); /** * Route Factory */ Factory<Route> factory = new Factory<Route>(){ public String getClassName(String module){ if (module.indexOf(".") < 0){ return "com.alogic.remote.route.impl." + module; } return module; } }; NodeList nodeList = XmlTools.getNodeListByPath(root, "route"); for (int i = 0 ; i < nodeList.getLength(); i ++){ Node n = nodeList.item(i); if (Node.ELEMENT_NODE != n.getNodeType()){ continue; } Element e = (Element)n; try { Route c = factory.newInstance(e, props, "module",Simple.class.getName()); if (c != null && StringUtils.isNotEmpty(c.id())){ c.setBackendProvider(this); routes.put(c.id(), c); } }catch (Exception ex){ LOG.error("Can not create instance,Ignored.",ex); } } /** * ๅฆ‚ๆžœๆฒกๆœ‰ๅฎšไน‰็ผบ็œ่ทฏ็”ฑ๏ผŒๅˆ™็”Ÿๆˆไธ€ไธช */ Route dftRoute = getDefaultRoute(); if (dftRoute == null){ dftRoute = new Simple(dftRouteId,this); routes.put(dftRouteId, dftRoute); } } @Override public void close() { Route[] list = getRoutes(); for (Route c:list){ IOTools.close(c); } routes.clear(); } @Override public Route getDefaultRoute() { return getRoute(dftRouteId); } @Override public String getId() { return id; } @Override public Route getRoute(String id) { return routes.get(id); } @Override public void addWatcher(Watcher<AppBackends> watcher) { // nothing to do } @Override public void removeWatcher(Watcher<AppBackends> watcher) { // nothing to do } @Override public Route[] getRoutes() { return routes.values().toArray(new Route[0]); } } }
[ "szduanyy@189.cn" ]
szduanyy@189.cn
8bb01d33ed62ca561ad57864f110769428b5550e
fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d
/src/main/java/com/google/android/gms/fitness/request/zzbd.java
fb33dd8cd9b0e441d12572d45a28e55863b75f11
[]
no_license
TL148/gorkiy
b6ac8772587e9e643d939ea399bf5e7a42e89f46
da8fbd017277cf72020c8c800326954bb1a0cee3
refs/heads/master
2021-05-21T08:24:39.286900
2020-04-03T02:57:49
2020-04-03T02:57:49
252,618,229
0
0
null
2020-04-03T02:54:39
2020-04-03T02:54:39
null
UTF-8
Java
false
false
1,415
java
package com.google.android.gms.fitness.request; import android.app.PendingIntent; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelReader; /* compiled from: com.google.android.gms:play-services-fitness@@18.0.0 */ public final class zzbd implements Parcelable.Creator<zzbe> { public final /* synthetic */ Object[] newArray(int i) { return new zzbe[i]; } public final /* synthetic */ Object createFromParcel(Parcel parcel) { int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel); PendingIntent pendingIntent = null; IBinder iBinder = null; while (parcel.dataPosition() < validateObjectHeader) { int readHeader = SafeParcelReader.readHeader(parcel); int fieldId = SafeParcelReader.getFieldId(readHeader); if (fieldId == 1) { pendingIntent = (PendingIntent) SafeParcelReader.createParcelable(parcel, readHeader, PendingIntent.CREATOR); } else if (fieldId != 2) { SafeParcelReader.skipUnknownField(parcel, readHeader); } else { iBinder = SafeParcelReader.readIBinder(parcel, readHeader); } } SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader); return new zzbe(pendingIntent, iBinder); } }
[ "itaysontesterlab@gmail.com" ]
itaysontesterlab@gmail.com
df236d539047e265053cafb4108075a7aabebb29
57edb737df8e9de3822d4f08d0de81f028403209
/spring-web/src/main/java/org/springframework/web/client/ExtractingResponseErrorHandler.java
8ea31f4a5bdfde7673ecc3ecff7a2f570bd2dbe1
[ "Apache-2.0" ]
permissive
haoxianrui/spring-framework
20d904fffe7ddddcd7d78445537f66e0b4cf65f5
e5163351c47feb69483e79fa782eec3e4d8613e8
refs/heads/master
2023-05-25T14:27:18.935575
2020-10-23T01:04:05
2020-10-23T01:04:05
260,652,424
1
1
null
null
null
null
UTF-8
Java
false
false
6,392
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.client; import java.io.IOException; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.springframework.http.HttpStatus; import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.lang.Nullable; import org.springframework.util.CollectionUtils; /** * Implementation of {@link ResponseErrorHandler} that uses {@link HttpMessageConverter * HttpMessageConverters} to convert HTTP error responses to {@link RestClientException * RestClientExceptions}. * * <p>To use this error handler, you must specify a * {@linkplain #setStatusMapping(Map) status mapping} and/or a * {@linkplain #setSeriesMapping(Map) series mapping}. If either of these mappings has a match * for the {@linkplain ClientHttpResponse#getStatusCode() status code} of a given * {@code ClientHttpResponse}, {@link #hasError(ClientHttpResponse)} will return * {@code true}, and {@link #handleError(ClientHttpResponse)} will attempt to use the * {@linkplain #setMessageConverters(List) configured message converters} to convert the response * into the mapped subclass of {@link RestClientException}. Note that the * {@linkplain #setStatusMapping(Map) status mapping} takes precedence over * {@linkplain #setSeriesMapping(Map) series mapping}. * * <p>If there is no match, this error handler will default to the behavior of * {@link DefaultResponseErrorHandler}. Note that you can override this default behavior * by specifying a {@linkplain #setSeriesMapping(Map) series mapping} from * {@code HttpStatus.Series#CLIENT_ERROR} and/or {@code HttpStatus.Series#SERVER_ERROR} * to {@code null}. * * @author Simon Galperin * @author Arjen Poutsma * @see RestTemplate#setErrorHandler(ResponseErrorHandler) * @since 5.0 */ public class ExtractingResponseErrorHandler extends DefaultResponseErrorHandler { private List<HttpMessageConverter<?>> messageConverters = Collections.emptyList(); private final Map<HttpStatus, Class<? extends RestClientException>> statusMapping = new LinkedHashMap<>(); private final Map<HttpStatus.Series, Class<? extends RestClientException>> seriesMapping = new LinkedHashMap<>(); /** * Create a new, empty {@code ExtractingResponseErrorHandler}. * <p>Note that {@link #setMessageConverters(List)} must be called when using this constructor. */ public ExtractingResponseErrorHandler() { } /** * Create a new {@code ExtractingResponseErrorHandler} with the given * {@link HttpMessageConverter} instances. * * @param messageConverters the message converters to use */ public ExtractingResponseErrorHandler(List<HttpMessageConverter<?>> messageConverters) { this.messageConverters = messageConverters; } /** * Set the message converters to use by this extractor. */ public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters) { this.messageConverters = messageConverters; } /** * Set the mapping from HTTP status code to {@code RestClientException} subclass. * If this mapping has a match * for the {@linkplain ClientHttpResponse#getStatusCode() status code} of a given * {@code ClientHttpResponse}, {@link #hasError(ClientHttpResponse)} will return * {@code true} and {@link #handleError(ClientHttpResponse)} will attempt to use the * {@linkplain #setMessageConverters(List) configured message converters} to convert the * response into the mapped subclass of {@link RestClientException}. */ public void setStatusMapping(Map<HttpStatus, Class<? extends RestClientException>> statusMapping) { if (!CollectionUtils.isEmpty(statusMapping)) { this.statusMapping.putAll(statusMapping); } } /** * Set the mapping from HTTP status series to {@code RestClientException} subclass. * If this mapping has a match * for the {@linkplain ClientHttpResponse#getStatusCode() status code} of a given * {@code ClientHttpResponse}, {@link #hasError(ClientHttpResponse)} will return * {@code true} and {@link #handleError(ClientHttpResponse)} will attempt to use the * {@linkplain #setMessageConverters(List) configured message converters} to convert the * response into the mapped subclass of {@link RestClientException}. */ public void setSeriesMapping(Map<HttpStatus.Series, Class<? extends RestClientException>> seriesMapping) { if (!CollectionUtils.isEmpty(seriesMapping)) { this.seriesMapping.putAll(seriesMapping); } } @Override protected boolean hasError(HttpStatus statusCode) { if (this.statusMapping.containsKey(statusCode)) { return this.statusMapping.get(statusCode) != null; } else if (this.seriesMapping.containsKey(statusCode.series())) { return this.seriesMapping.get(statusCode.series()) != null; } else { return super.hasError(statusCode); } } @Override public void handleError(ClientHttpResponse response, HttpStatus statusCode) throws IOException { if (this.statusMapping.containsKey(statusCode)) { extract(this.statusMapping.get(statusCode), response); } else if (this.seriesMapping.containsKey(statusCode.series())) { extract(this.seriesMapping.get(statusCode.series()), response); } else { super.handleError(response, statusCode); } } private void extract(@Nullable Class<? extends RestClientException> exceptionClass, ClientHttpResponse response) throws IOException { if (exceptionClass == null) { return; } HttpMessageConverterExtractor<? extends RestClientException> extractor = new HttpMessageConverterExtractor<>(exceptionClass, this.messageConverters); RestClientException exception = extractor.extractData(response); if (exception != null) { throw exception; } } }
[ "1490493387@qq.com" ]
1490493387@qq.com
29cae421ab89dcf318c840cfb568565901ff0619
812be6b9d1ba4036652df166fbf8662323f0bdc9
/java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/goodidentificationtype/GoodIdentificationTypeStateRepository.java
de207d8650ce9181163f1171af009f3e5a93718e
[]
no_license
lanmolsz/wms
8503e54a065670b48a15955b15cea4926f05b5d6
4b71afd80127a43890102167a3af979268e24fa2
refs/heads/master
2020-03-12T15:10:26.133106
2018-09-27T08:28:05
2018-09-27T08:28:05
130,684,482
0
0
null
2018-04-23T11:11:24
2018-04-23T11:11:24
null
UTF-8
Java
false
false
356
java
package org.dddml.wms.domain.goodidentificationtype; import java.util.*; import org.dddml.support.criterion.Criterion; import java.util.Date; import org.dddml.wms.domain.*; public interface GoodIdentificationTypeStateRepository { GoodIdentificationTypeState get(String id, boolean nullAllowed); void save(GoodIdentificationTypeState state); }
[ "yangjiefeng@gmail.com" ]
yangjiefeng@gmail.com
d55040ccb11a44fcb80b45eb0d36b9dc0a702d70
d3526344a1fbc8772f0c930269ff4f94851c6c41
/analytics-web/src/main/java/com/toucha/analytics/utils/MdRewardSub.java
e00d63b4c7f43b86ba038198977d5bd56417ee1d
[]
no_license
dev000il/analytics-web
c110b98d4b57da1b1b684853c3a26829e00e82d2
e26fa1d40792df534329d539b130673fe550749a
refs/heads/master
2020-06-10T19:46:13.906970
2016-12-08T01:57:19
2016-12-08T01:57:19
75,892,717
0
0
null
null
null
null
UTF-8
Java
false
false
938
java
package com.toucha.analytics.utils; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Map; import com.google.common.collect.Maps; import com.toucha.analytics.common.common.ApplicationConfig; public class MdRewardSub { public static final Map<String, String> rewardMapping = Maps.newHashMap(); static { try { InputStream in = new FileInputStream(ApplicationConfig.MAPPING_FOLDER + "reward.csv"); BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8")); String s = null; while ((s = reader.readLine()) != null) { String ss[] = s.split(","); rewardMapping.put(ss[0], ss[1]); } reader.close(); in.close(); } catch (Exception e) { e.printStackTrace(); } } }
[ "dev000il@hotmail.com" ]
dev000il@hotmail.com
bf53c7c0f0743639fdea328b6c2a9c2d24e7cc7e
f9d4e15a7a5008cd81eb19cb62835966938be8a7
/colombo-brognoli-thesis/ValidationNumAltWrappers/src/it/polimi/valwrappers/Wrapper70.java
cc650d2387eeb8393a1fa67d48fec046a421f2e0
[]
no_license
nicolobrognoli/colombo-brognoli-thesis
6e607ef1d802b946ede8e8db124d818493a3cc93
912bcfc5e37b9df916929e6f014b1ce2085bac43
refs/heads/master
2021-01-01T05:38:43.665817
2015-03-15T20:07:28
2015-03-15T20:07:28
32,281,276
0
0
null
null
null
null
UTF-8
Java
false
false
1,102
java
package it.polimi.valwrappers;import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class Wrapper70{ private Map<String,Float> mapReward = new HashMap<String,Float>(); private List<String> rewardNameList = new ArrayList<String>(); private List<String> alternatives = new ArrayList<String>();public Wrapper70(){ rewardNameList.add("time");rewardNameList.add("usability"); mapReward.put("totaltime", 100.0f);mapReward.put("weighttime", 0.7f); mapReward.put("totalusability",2000f);mapReward.put("weightusability", 0.3f); mapReward.put("policyusability", 1.0f);mapReward.put("policytime", 0.0f); alternatives.add("A"); mapReward.put("Atime",0f); mapReward.put("AtimeMin",0.09808053946187542f); mapReward.put("AtimeMax",0.08332708166091081f); mapReward.put("Ausability",1f); mapReward.put("AusabilityMin",1933.2902330478144f); mapReward.put("AusabilityMax",1933.7769093190489f); } public void doActivity(){ String choice= "A"; ActivityInterface obj = new A(); obj.doActivity();AlternativeUtility.updateContext(rewardNameList, choice, mapReward);}}
[ "nicolo@Laptop.local" ]
nicolo@Laptop.local
0a6fb39f42a4d9bea8f3242c485a9f2ee95774a7
c6f3fbce0b7304c672fc99a94fe43b418eae9e6c
/src/main/java/com/junyou/bus/bag/configure/export/DuoXuanLiXiangBiaoConfigExportService.java
0effdf8b3f81c30f36a112d7842f608ac638133d
[]
no_license
hw233/cq_game-java
a6f1fa6526062c10a9ea322cc832b4c42e6b8f9a
c2384b58efa73472752742a93bf36ef02d65fe48
refs/heads/master
2020-04-27T11:24:29.835913
2018-06-03T14:03:36
2018-06-03T14:03:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,847
java
package com.junyou.bus.bag.configure.export; import java.util.HashMap; import java.util.Map; import org.springframework.stereotype.Component; import com.junyou.configure.parser.impl.AbsClasspathConfigureParser; import com.junyou.gameconfig.utils.ConfigAnalysisUtils; import com.junyou.gameconfig.utils.GameConfigUtil; import com.junyou.utils.common.CovertObjectUtil; /** * ๅคš้€‰ๅฎ็ฎฑ้…็ฝฎ่กจ * @description * @author Hanchun * @email 279444454@qq.com * @date 2015-4-23 ไธ‹ๅˆ6:42:03 */ @Component public class DuoXuanLiXiangBiaoConfigExportService extends AbsClasspathConfigureParser { private Map<Integer, DuoXuanLiXiangBiaoConfig> config ; /** * configFileName */ private String configureName = "DuoXuanLiXiangBiao.jat"; @SuppressWarnings("unchecked") protected void configureDataResolve(byte[] data) { Map<Integer, DuoXuanLiXiangBiaoConfig> tmpConfig = new HashMap<>(); Object[] dataList = GameConfigUtil.getResource(data); for (Object obj : dataList) { Map<String, Object> tmp = (Map<String, Object>)obj; if (null != tmp) { DuoXuanLiXiangBiaoConfig config = createDuoXuanLiXiangBiaoConfig(tmp); if(config != null){ tmpConfig.put(config.getId(), config); } } } this.config = tmpConfig; } public DuoXuanLiXiangBiaoConfig createDuoXuanLiXiangBiaoConfig(Map<String, Object> tmp) { DuoXuanLiXiangBiaoConfig config = new DuoXuanLiXiangBiaoConfig(); config.setId(CovertObjectUtil.object2int(tmp.get("id"))); config.setPaixu1(CovertObjectUtil.object2int(tmp.get("paixu1"))); config.setPaixu2(CovertObjectUtil.object2int(tmp.get("paixu2"))); config.setPaixu3(CovertObjectUtil.object2int(tmp.get("paixu3"))); config.setPaixu4(CovertObjectUtil.object2int(tmp.get("paixu4"))); Map<Integer, Integer> moneyTypeMap = new HashMap<>(); Map<Integer, Integer> goldMap = new HashMap<>(); Map<Integer, Map<String, Integer>> tmpMap = new HashMap<>(); String item1 = CovertObjectUtil.object2String(tmp.get("item1")); if(!CovertObjectUtil.isEmpty(item1)){ Map<String,Integer> map = ConfigAnalysisUtils.getConfigMap(item1); tmpMap.put(config.getPaixu1(), map); moneyTypeMap.put(config.getPaixu1(), CovertObjectUtil.object2Integer(tmp.get("moneytype1"))); goldMap.put(config.getPaixu1(), CovertObjectUtil.object2int(tmp.get("gold1"))); } String item2 = CovertObjectUtil.object2String(tmp.get("item2")); if(!CovertObjectUtil.isEmpty(item2)){ Map<String,Integer> map = ConfigAnalysisUtils.getConfigMap(item2); tmpMap.put(config.getPaixu2(), map); moneyTypeMap.put(config.getPaixu2(), CovertObjectUtil.object2Integer(tmp.get("moneytype2"))); goldMap.put(config.getPaixu2(), CovertObjectUtil.object2int(tmp.get("gold2"))); } String item3 = CovertObjectUtil.object2String(tmp.get("item3")); if(!CovertObjectUtil.isEmpty(item3)){ Map<String,Integer> map = ConfigAnalysisUtils.getConfigMap(item3); tmpMap.put(config.getPaixu3(), map); moneyTypeMap.put(config.getPaixu3(), CovertObjectUtil.object2Integer(tmp.get("moneytype3"))); goldMap.put(config.getPaixu3(), CovertObjectUtil.object2int(tmp.get("gold3"))); } String item4 = CovertObjectUtil.object2String(tmp.get("item4")); if(!CovertObjectUtil.isEmpty(item4)){ Map<String,Integer> map = ConfigAnalysisUtils.getConfigMap(item4); tmpMap.put(config.getPaixu4(), map); moneyTypeMap.put(config.getPaixu4(), CovertObjectUtil.object2Integer(tmp.get("moneytype4"))); goldMap.put(config.getPaixu4(), CovertObjectUtil.object2int(tmp.get("gold4"))); } config.setGoldMap(goldMap); config.setMoneytypeMap(moneyTypeMap); config.setConfigMap(tmpMap); return config; } protected String getConfigureName() { return configureName; } public DuoXuanLiXiangBiaoConfig loadById(Integer id){ return config.get(id); } }
[ "18221610336@163.com" ]
18221610336@163.com
acc5d4ed9d70922da984eee032de05368b5f4b32
7f20b1bddf9f48108a43a9922433b141fac66a6d
/cytoscape/tags/parent-2.8.3/trunk/coreplugins/NetworkAnalyzer/src/main/java/de/mpg/mpi_inf/bioinf/netanalyzer/ui/ComboBoxRenderer.java
1d83b358fb7f3cd17416547e664e6b422e208278
[]
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,897
java
/* * Copyright (c) 2006, 2007, 2008, 2010, Max Planck Institute for Informatics, Saarbruecken, Germany. * * This file is part of NetworkAnalyzer. * * NetworkAnalyzer is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) * any later version. * * NetworkAnalyzer 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 NetworkAnalyzer. If not, see * <http://www.gnu.org/licenses/>. */ package de.mpg.mpi_inf.bioinf.netanalyzer.ui; import java.awt.Component; import java.awt.Dimension; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JSeparator; import javax.swing.ListCellRenderer; import javax.swing.SwingConstants; import javax.swing.border.EmptyBorder; /** * A class that extends the ListCellRenderer class to visualize a separator * line at a certain position between the JComboBoxItems. */ class ComboBoxRenderer extends JLabel implements ListCellRenderer { /** * Default constructor for creation of a ComboBoxRenderer. */ public ComboBoxRenderer() { setOpaque(true); setBorder(new EmptyBorder(1, 1, 1, 1)); separator = new JSeparator(SwingConstants.HORIZONTAL); fixedHeight = new JLabel( "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ(){}[]'\",;/?!@#$%^&*()_+") .getPreferredSize().height * 12 / 10; } /* * (non-Javadoc) * * @see javax.swing.ListCellRenderer#getListCellRenderer */ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String str = (value == null) ? null : value.toString(); if (Utils.SEPARATOR.equals(str)) { return separator; } if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } setFont(list.getFont()); setText(str); updateHeight(); return this; } /** * Unique ID for this version of this class. It is used in serialization. */ private static final long serialVersionUID = 1977983924324671280L; private void updateHeight() { setPreferredSize(null); final Dimension size = getPreferredSize(); size.height = fixedHeight; setPreferredSize(size); } /** * A separator line in a JComboBox. */ private JSeparator separator; /** * A fixed height of the separator line. */ private int fixedHeight; }
[ "mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
72837573c70d4cd46ca5e0c1ead6400ae418a7e9
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/PhysicalAttackSaveHp.java
5a6dbf9f4add5bfdafe54008c8af21ea44a76587
[]
no_license
BETAJIb/ikol
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
f3709ea10be2d155b0bf1dee487f53c723f570cf
refs/heads/master
2021-01-05T10:37:17.831153
2019-12-24T22:23:02
2019-12-24T22:23:02
240,993,482
0
0
null
null
null
null
UTF-8
Java
false
false
5,612
java
/* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.effecthandlers; import org.l2jmobius.Config; import org.l2jmobius.gameserver.enums.ShotType; import org.l2jmobius.gameserver.model.StatsSet; import org.l2jmobius.gameserver.model.actor.Attackable; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.effects.AbstractEffect; import org.l2jmobius.gameserver.model.effects.EffectType; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.skills.Skill; import org.l2jmobius.gameserver.model.stats.Formulas; import org.l2jmobius.gameserver.model.stats.Stats; /** * Physical Attack effect implementation. <br> * <b>Note</b>: Initial formula taken from PhysicalAttack. * @author Adry_85, Nik */ public class PhysicalAttackSaveHp extends AbstractEffect { private final double _power; private final double _criticalChance; private final boolean _ignoreShieldDefence; private final boolean _overHit; private final double _saveHp; public PhysicalAttackSaveHp(StatsSet params) { _power = params.getDouble("power", 0); _criticalChance = params.getDouble("criticalChance", 0); _ignoreShieldDefence = params.getBoolean("ignoreShieldDefence", false); _overHit = params.getBoolean("overHit", false); _saveHp = params.getDouble("saveHp", 0); } @Override public boolean calcSuccess(Creature effector, Creature effected, Skill skill) { return !Formulas.calcPhysicalSkillEvasion(effector, effected, skill); } @Override public EffectType getEffectType() { return EffectType.PHYSICAL_ATTACK; } @Override public boolean isInstant() { return true; } @Override public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item) { if (effector.isAlikeDead()) { return; } if (effected.isPlayer() && effected.getActingPlayer().isFakeDeath() && Config.FAKE_DEATH_DAMAGE_STAND) { effected.stopFakeDeath(true); } if (_overHit && effected.isAttackable()) { ((Attackable) effected).overhitEnabled(true); } final double attack = effector.getPAtk(); double defence = effected.getPDef(); if (!_ignoreShieldDefence) { switch (Formulas.calcShldUse(effector, effected)) { case Formulas.SHIELD_DEFENSE_SUCCEED: { defence += effected.getShldDef(); break; } case Formulas.SHIELD_DEFENSE_PERFECT_BLOCK: { defence = -1; break; } } } double damage = 1; final boolean critical = Formulas.calcCrit(_criticalChance, effector, effected, skill); if (defence != -1) { // Trait, elements final double weaponTraitMod = Formulas.calcWeaponTraitBonus(effector, effected); final double generalTraitMod = Formulas.calcGeneralTraitBonus(effector, effected, skill.getTraitType(), true); final double weaknessMod = Formulas.calcWeaknessBonus(effector, effected, skill.getTraitType()); final double attributeMod = Formulas.calcAttributeBonus(effector, effected, skill); final double pvpPveMod = Formulas.calculatePvpPveBonus(effector, effected, skill, true); final double randomMod = effector.getRandomDamageMultiplier(); // Skill specific mods. final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; final double power = _power + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0); final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; double ssmod = 1; if (skill.useSoulShot()) { if (effector.isChargedShot(ShotType.SOULSHOTS)) { ssmod = 2 * effector.getStat().getValue(Stats.SHOTS_BONUS); // 2.04 for dual weapon? } else if (effector.isChargedShot(ShotType.BLESSED_SOULSHOTS)) { ssmod = 4 * effector.getStat().getValue(Stats.SHOTS_BONUS); } } // ...................____________Melee Damage_____________......................................___________________Ranged Damage____________________ // ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdefย ย ย ย ย ย ย ย ย ย ย ย RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef // ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; damage = baseMod * ssmod * critMod * weaponTraitMod * generalTraitMod * weaknessMod * attributeMod * pvpPveMod * randomMod; damage *= effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1); } final double minHp = (effected.getMaxHp() * _saveHp) / 100; if ((effected.getCurrentHp() - damage) < minHp) { damage = effected.getCurrentHp() - minHp; } effector.doAttack(damage, effected, skill, false, false, critical, false); } }
[ "mobius@cyber-wizard.com" ]
mobius@cyber-wizard.com
79136605f198018bae11348e40b720c8878b0fcf
255ff79057c0ff14d0b760fc2d6da1165f1806c8
/08Advanced/05่ต„ๆ–™-ๆ•ฐๆฎ็ป“ๆž„ไธŽ็ฎ—ๆณ•/2ใ€ๆ•ฐๆฎ็ป“ๆž„ไธŽ็ฎ—ๆณ•๏ผˆไบŒ๏ผ‰/ไปฃ็ /algo/src/main/java/com/itheima/sort/BubbleSort(1).java
ba64bcc95e39aa3a582f902478d5e88c580b18fe
[]
no_license
wjphappy90/Resource
7f1f817d323db5adae06d26da17dfc09ee5f9d3a
6574c8399f3cdfb6d6b39cd64dc9507e784a2549
refs/heads/master
2022-07-30T03:33:59.869345
2020-08-10T02:31:35
2020-08-10T02:31:35
285,701,650
2
6
null
null
null
null
UTF-8
Java
false
false
3,392
java
package com.itheima.sort; import org.junit.Test; import java.util.Arrays; /** * ๅ†’ๆณกๆŽ’ๅบ็ฎ—ๆณ• * ๅ†’ๆณกๆŽ’ๅบๆ˜ฏไธ€็ง็ฎ€ๅ•็š„ๆŽ’ๅบ็ฎ—ๆณ•ใ€‚ๅฎƒ้‡ๅคๅœฐ่ตฐ่ฎฟ่ฟ‡่ฆๆŽ’ๅบ็š„ๆ•ฐๅˆ—๏ผŒไธ€ๆฌกๆฏ”่พƒไธคไธชๅ…ƒ็ด ๏ผŒๅฆ‚ๆžœๅฎƒไปฌ็š„้กบๅบ้”™่ฏฏๅฐฑๆŠŠๅฎƒไปฌไบคๆข่ฟ‡ๆฅใ€‚ * ่ตฐ่ฎฟๆ•ฐๅˆ—็š„ๅทฅไฝœๆ˜ฏ้‡ๅคๅœฐ่ฟ›่กŒ็›ดๅˆฐๆฒกๆœ‰ๅ†้œ€่ฆไบคๆข๏ผŒไนŸๅฐฑๆ˜ฏ่ฏด่ฏฅๆ•ฐๅˆ—ๅทฒ็ปๆŽ’ๅบๅฎŒๆˆใ€‚ * ่ฟ™ไธช็ฎ—ๆณ•็š„ๅๅญ—็”ฑๆฅๆ˜ฏๅ› ไธบ่ถŠๅฐ็š„ๅ…ƒ็ด ไผš็ป็”ฑไบคๆขๆ…ขๆ…ขโ€œๆตฎโ€ๅˆฐๆ•ฐๅˆ—็š„้กถ็ซฏ * * ๆญฅ้ชค: * 1๏ผšๆฏ”่พƒ็›ธ้‚ป็š„ๅ…ƒ็ด ใ€‚ๅฆ‚ๆžœ็ฌฌไธ€ไธชๆฏ”็ฌฌไบŒไธชๅคง๏ผŒๅฐฑไบคๆขๅฎƒไปฌไธคไธช๏ผ› 2๏ผšๅฏนๆฏไธ€ๅฏน็›ธ้‚ปๅ…ƒ็ด ไฝœๅŒๆ ท็š„ๅทฅไฝœ๏ผŒไปŽๅผ€ๅง‹็ฌฌไธ€ๅฏนๅˆฐ็ป“ๅฐพ็š„ๆœ€ๅŽไธ€ๅฏน๏ผŒ่ฟ™ๆ ทๅœจๆœ€ๅŽ็š„ๅ…ƒ็ด ๅบ”่ฏฅไผšๆ˜ฏๆœ€ๅคง็š„ๆ•ฐ๏ผ› 3๏ผš้’ˆๅฏนๆ‰€ๆœ‰็š„ๅ…ƒ็ด ้‡ๅคไปฅไธŠ็š„ๆญฅ้ชค๏ผŒ้™คไบ†ๆœ€ๅŽไธ€ไธช๏ผ› 4๏ผš้‡ๅคๆญฅ้ชค1~3๏ผŒ็›ดๅˆฐๆŽ’ๅบๅฎŒๆˆใ€‚ */ public class BubbleSort { public void bubbleSort1(int[] array){ int len = array.length; if(len<=1){ return; } //ๅผ€ๅง‹ๅ†’ๆณก for(int i=0;i<len;i++){ for(int j=0;j< len - i -1;j++){ //ๅˆคๆ–ญๅ‰ๅŽๆ•ฐๆฎๆ˜ฏๅฆ้œ€่ฆไบคๆข ๅฆ‚ๆžœๅ‰ไธ€ไธชๆ•ฐๆฎๅคงไบŽๅŽไธ€ไธชๆ•ฐๆฎๅˆ™่ฟ›่กŒไบคๆขๅฆๅˆ™ไธไบคๆข if(array[j] > array[j+1]){ int temp = array[j]; array[j] = array[j+1]; array[j+1] = temp; } } } } /** * ๆต‹่ฏ•ๅ†’ๆณกๆŽ’ๅบ */ @Test public void testBubbleSort1(){ //ๅ‡†ๅค‡ไธ€ไธชintๆ•ฐ็ป„ int[] array = new int[6]; array[0] = 5; array[1] = 2; array[2] = 6; array[3] = 9; array[4] = 0; array[5] = 3; //่ฟ›่กŒๆŽ’ๅบ System.out.println(Arrays.toString(array)); bubbleSort1(array); //่พ“ๅ‡บๆŽ’ๅบ็ป“ๆžœ System.out.println(Arrays.toString(array)); } /** * ๅ†’ๆณกๆŽ’ๅบไผ˜ๅŒ– * @param array */ public void bubbleSort2(int[] array){ int len = array.length; if(len<=1){ return; } //ๅผ€ๅง‹ๅ†’ๆณก for(int i=0;i<len;i++){ //ๆ˜ฏๅฆ้œ€่ฆๆๅ‰็ป“ๆŸๅ†’ๆณก็š„ๆ ‡่ฏ† boolean flag = true; for(int j=0;j< len - i -1;j++){ //ๅˆคๆ–ญๅ‰ๅŽๆ•ฐๆฎๆ˜ฏๅฆ้œ€่ฆไบคๆข ๅฆ‚ๆžœๅ‰ไธ€ไธชๆ•ฐๆฎๅคงไบŽๅŽไธ€ไธชๆ•ฐๆฎๅˆ™่ฟ›่กŒไบคๆขๅฆๅˆ™ไธไบคๆข if(array[j] > array[j+1]){ int temp = array[j]; array[j] = array[j+1]; array[j+1] = temp; flag = false; } } //ๅœจๅฝ“ๅ‰่ฟ™ๆฌกๅ†’ๆณกไธญๅฆ‚ๆžœๆ‰€ๆœ‰ๅ…ƒ็ด ้ƒฝไธ้œ€่ฆ่ฟ›่กŒไบคๆขๅˆ™่ฏๆ˜Žๆ‰€ๆœ‰ๅ…ƒ็ด ้ƒฝๅทฒๆœ‰ๅบ,ๅˆ™ๆ— ้œ€่ฟ›่กŒๅŽ็ปญ็š„ๅ†’ๆณกๆ“ไฝœไบ† if(flag){ break; } } } @Test public void testBubbleSort2(){ //ๅ‡†ๅค‡ไธ€ไธชintๆ•ฐ็ป„ int[] array = new int[6]; array[0] = 5; array[1] = 2; array[2] = 6; array[3] = 9; array[4] = 0; array[5] = 3; //่ฟ›่กŒๆŽ’ๅบ System.out.println(Arrays.toString(array)); bubbleSort2(array); //่พ“ๅ‡บๆŽ’ๅบ็ป“ๆžœ System.out.println(Arrays.toString(array)); } }
[ "981146457@qq.com" ]
981146457@qq.com
eb48c922e0bedfcb4010cd0d978cdd84ba6fc3ce
0716ecaeb7e5b5cd296618efb5300cb84765ebf5
/hpsdf-ngp-module-ui/src/main/java/com/hp/sdf/ngp/ui/provider/CommentDataProvider.java
19b5eb627a199af426fec51cf0c7c622884990bf
[]
no_license
liweisnake/storefront
2b21f491d12ac7e8eb04a26040b453b69220404a
d0886a906516618ac220f35abfe9b60dc976b1e2
refs/heads/master
2020-06-06T03:33:16.518238
2013-08-31T03:30:05
2013-08-31T06:35:22
12,499,948
1
0
null
null
null
null
UTF-8
Java
false
false
1,749
java
/* * Copyright (c) 2009 Hewlett-Packard Company, All Rights Reserved. * * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the U.S. * Government is subject to restrictions as set forth in sub-paragraph * (c)(1)(ii) of the Rights in Technical Data and Computer Software * clause in DFARS 252.227-7013. * * Hewlett-Packard Company * 3000 Hanover Street * Palo Alto, CA 94304 U.S.A. * Rights for non-DOD U.S. Government Departments and Agencies are as * set forth in FAR 52.227-19(c)(1,2). */ package com.hp.sdf.ngp.ui.provider; import java.util.Iterator; import java.util.List; import org.apache.wicket.markup.repeater.data.IDataProvider; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import com.hp.sdf.ngp.model.Comments; import com.hp.sdf.ngp.service.ApplicationService; /** * * CommentDataProvider. * */ public class CommentDataProvider implements IDataProvider<Comments> { private static final long serialVersionUID = 6080358671456933625L; private ApplicationService applicationService; private Long appId; public CommentDataProvider(ApplicationService applicationService, Long appId) { this.applicationService = applicationService; this.appId = appId; } public Iterator<? extends Comments> iterator(int first, int count) { List<Comments> list = applicationService.getAllCommentsByAssetId(appId,first,count); if (list != null) { return list.iterator(); } return null; } public IModel<Comments> model(Comments object) { return new Model<Comments>(object); } public int size() { return (int) applicationService.getAllCommentsCountByAssetId(appId); } public void detach() { } }
[ "liwei_snake@163.com" ]
liwei_snake@163.com
ce70d37ab4adeb7166441a8d36a71005e63813ae
997093d6e990d6e5603cfca58eab17ecbe5f8c45
/src/main/java/com/lll/util/esb/PublicRunWsClientInterface.java
7f41bf1dacfde043100a33680ba253db0e0972c6
[]
no_license
jmsliujiajie/WSDL
b878341f19d45a9bdb39fd4557c51d2eb089758e
07fe483c37e109972a4f21b79ee36b5096d3d39b
refs/heads/master
2020-12-24T17:26:27.360771
2016-07-22T12:56:23
2016-07-22T12:56:23
63,872,017
0
0
null
null
null
null
UTF-8
Java
false
false
272
java
/*** * * author ningtn */ package com.lll.util.esb; import java.util.ArrayList; public interface PublicRunWsClientInterface { @SuppressWarnings("rawtypes") public ArrayList invokESBServer(String serverPath, String[] param,int transFlag); }
[ "admin@admin-PC" ]
admin@admin-PC
226459e1c8fac928aa859c10b88d2768b25c85fe
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p035ru/unicorn/ujin/view/fragments/chats/ChatListFragment$onCreateView$4.java
3b79a277b60da5d84ac7b86ad4076465bf56fb50
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,267
java
package p035ru.unicorn.ujin.view.fragments.chats; import androidx.lifecycle.Observer; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; import p035ru.unicorn.ujin.viewModel.events.UpdateEvent; @Metadata(mo51341bv = {1, 0, 3}, mo51342d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\nยข\u0006\u0002\b\u0005"}, mo51343d2 = {"<anonymous>", "", "event", "Lru/unicorn/ujin/viewModel/events/UpdateEvent;", "kotlin.jvm.PlatformType", "onChanged"}, mo51344k = 3, mo51345mv = {1, 4, 1}) /* renamed from: ru.unicorn.ujin.view.fragments.chats.ChatListFragment$onCreateView$4 */ /* compiled from: ChatListFragment.kt */ final class ChatListFragment$onCreateView$4<T> implements Observer<UpdateEvent> { final /* synthetic */ ChatListFragment this$0; ChatListFragment$onCreateView$4(ChatListFragment chatListFragment) { this.this$0 = chatListFragment; } public final void onChanged(UpdateEvent updateEvent) { ChatListFragment chatListFragment = this.this$0; Intrinsics.checkNotNullExpressionValue(updateEvent, "event"); chatListFragment.handleChatExit(updateEvent); } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
598d6a0157fbc1ff208f81f4febfa9abeb7f7f9b
da71f6a9b8a4949c8de43c738fa61730129bdf5e
/src/minecraft/net/minecraft/src/WeightedRandomItem.java
e38a32b7b099c6264749c532fef7278e3b536569
[]
no_license
nmg43/mcp70-src
1c7b8938178a08f70d3e21b02fe1c2f21c2a3329
030db5929c75f4096b12b1c5a8a2282aeea7545d
refs/heads/master
2020-12-30T09:57:42.156980
2012-09-09T20:59:42
2012-09-09T20:59:42
5,654,713
0
1
null
null
null
null
UTF-8
Java
false
false
288
java
package net.minecraft.src; public class WeightedRandomItem { /** * The Weight is how often the item is chosen(higher number is higher chance(lower is lower)) */ protected int itemWeight; public WeightedRandomItem(int par1) { itemWeight = par1; } }
[ "nmg43@cornell.edu" ]
nmg43@cornell.edu
1763ea3a39af11af13f71d944c490ec60ea81482
a6f4d8a6c8bd1097cd468240bdc8eed241ef9f0e
/plugins/t-jsonLdToRdf/src/main/java/org/semarglproject/package-info.java
9ea67ec673b0a3e37b3a82946bc68e98300fbc37
[ "MIT" ]
permissive
linkedpipes/etl
e9cdb00bd53e8f720dbbfcbac32c8f0d48fd024c
52e904241be27fccd9d9b966b19f03f1ef00b647
refs/heads/develop
2023-08-21T23:49:17.746028
2023-07-20T15:51:02
2023-07-20T15:51:02
49,733,838
139
37
NOASSERTION
2022-07-12T07:51:18
2016-01-15T17:23:57
Java
UTF-8
Java
false
false
180
java
/** * The code in this package originates from * https://github.com/semarglproject/semargl * * the code was modified for use in LinkedPipes ETL. */ package org.semarglproject;
[ "skodapetr@gmail.com" ]
skodapetr@gmail.com
d8959a36a60b76373d6bacc914d8300937de312e
0fc4aa42cf1609231bd5a59a4860f89c96878252
/stackoverflow/joe-program/src/main/java/com/joe/qiao/headfirst/proxy/gumballmonitor/GumballMonitor.java
32a77b23d423bf1b66ed80874f32795249bfc0a3
[]
no_license
qiaoyunlai66/JOE
6a7dbd3075df55ac2f90e4373b4765b1c37d83e3
deadacbae9a06246946de8230c30daa063fe3124
refs/heads/master
2021-09-12T07:06:01.971653
2018-04-15T08:30:02
2018-04-15T08:30:02
113,730,225
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package com.joe.qiao.headfirst.proxy.gumballmonitor; public class GumballMonitor { GumballMachine machine; public GumballMonitor(GumballMachine machine) { this.machine = machine; } public void report() { System.out.println("Gumball Machine: " + machine.getLocation()); System.out.println("Current inventory: " + machine.getCount() + " gumballs"); System.out.println("Current state: " + machine.getState()); } }
[ "joeqiao@fortinet.com" ]
joeqiao@fortinet.com
1feb952a7a12a92590d2c51d0132903ce4c9c5a1
7653e008384de73b57411b7748dab52b561d51e6
/SrcGame/dwo/gameserver/model/world/zone/AbstractZoneSettings.java
76be8a93d8de16276b9ad69eb9915ae4f919dde7
[]
no_license
BloodyDawn/Ertheia
14520ecd79c38acf079de05c316766280ae6c0e8
d90d7f079aa370b57999d483c8309ce833ff8af0
refs/heads/master
2021-01-11T22:10:19.455110
2017-01-14T12:15:56
2017-01-14T12:15:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package dwo.gameserver.model.world.zone; /** * Abstract class for Zone settings. * @author UnAfraid */ public abstract class AbstractZoneSettings { /** * Clear the Zone settings. */ public abstract void clear(); }
[ "echipachenko@gmail.com" ]
echipachenko@gmail.com
ab23616c98a2f9c04cef6df761aa317aa49fa67b
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/com/tencent/mobileqq/highway/utils/HwStatisticMgr.java
b3e3d1abe4657f6e4e2f77c0cf585292fa16d2b4
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
4,104
java
package com.tencent.mobileqq.highway.utils; import android.os.SystemClock; import com.tencent.mobileqq.msf.sdk.MsfMsgUtil; import com.tencent.mobileqq.msf.sdk.MsfServiceSdk; import com.tencent.mobileqq.msf.sdk.RdmReq; import com.tencent.qphone.base.remote.ToServiceMsg; import java.util.ArrayList; import java.util.HashMap; public class HwStatisticMgr { public static final String KEY_CONNCNT = "ConnCnt"; public static final String KEY_CONNFAILCNT = "ConnFailCnt"; public static final String KEY_CONNSUCCCNT = "ConnSuccCnt"; public static final String KEY_CTIMECOST = "param_conncnt"; public static final String KEY_IPINFO = "param_ipinfo"; public static int MAX_REPORT_NUM_PER_PERIOD = 1; public static final long PERIOD_DUATION = 60000L; public static final String REPORT_TAG_ACTBDHCHANNEL = "actBDHChannel"; public static boolean hasStartReport = false; public static long lastStartTime; public static int reportNumSinceLastTime; public static void doReportConnection(int paramInt1, String paramString, boolean paramBoolean, int paramInt2, int paramInt3, int paramInt4, ArrayList<EndPoint> paramArrayList, ArrayList<Integer> paramArrayList1, ArrayList<Long> paramArrayList2, long paramLong) { long l = SystemClock.uptimeMillis(); if (!hasStartReport) { hasStartReport = true; lastStartTime = l; } for (reportNumSinceLastTime = 0; lastStartTime + 60000L < l; reportNumSinceLastTime = 0) { lastStartTime += 60000L; } reportNumSinceLastTime += 1; if (reportNumSinceLastTime > MAX_REPORT_NUM_PER_PERIOD) { return; } HashMap localHashMap = new HashMap(); localHashMap.put("ConnCnt", String.valueOf(paramInt2)); localHashMap.put("ConnSuccCnt", String.valueOf(paramInt3)); localHashMap.put("ConnFailCnt", String.valueOf(paramInt4)); localHashMap.put("param_conncnt", String.valueOf(paramLong)); StringBuilder localStringBuilder; if (paramArrayList.size() > 0) { localStringBuilder = new StringBuilder(); paramInt2 = 0; } for (;;) { if ((paramInt2 >= paramArrayList.size()) || (paramInt2 > 3)) { localHashMap.put("param_ipinfo", localStringBuilder.toString()); report(paramInt1, paramString, "actBDHChannel", paramBoolean, 0L, 0L, localHashMap); BdhLogUtil.LogEvent("HwStatisticMgr", "REPORT event= actBDHChannel value= " + localHashMap.toString()); return; } if (paramInt2 != 0) { localStringBuilder.append(";"); } if ((paramInt2 < paramArrayList.size()) && (paramInt2 < paramArrayList1.size()) && (paramInt2 < paramArrayList2.size())) { localStringBuilder.append("ip" + (paramInt2 + 1) + "_" + ((EndPoint)paramArrayList.get(paramInt2)).host + "_" + ((EndPoint)paramArrayList.get(paramInt2)).port + "_" + paramArrayList1.get(paramInt2) + "_" + paramArrayList2.get(paramInt2)); } paramInt2 += 1; } } public static void report(int paramInt, String paramString1, String paramString2, boolean paramBoolean, long paramLong1, long paramLong2, HashMap<String, String> paramHashMap) { paramString1 = new RdmReq(); paramString1.eventName = paramString2; paramString1.elapse = paramLong1; paramString1.size = paramLong2; paramString1.isSucceed = paramBoolean; paramString1.isRealTime = true; paramString1.isMerge = false; paramString1.params = paramHashMap; try { paramString1 = MsfMsgUtil.getRdmReportMsg(MsfServiceSdk.get().getMsfServiceName(), paramString1); paramString1.setAppId(paramInt); paramString1.setTimeout(30000L); MsfServiceSdk.get().sendMsg(paramString1); return; } catch (Exception paramString1) { paramString1.printStackTrace(); } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar * Qualified Name: com.tencent.mobileqq.highway.utils.HwStatisticMgr * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
ece8e1b5b111eddaf24fc3a7726cd6ffd1532ab8
dc0919c9609f03f5b239ec0799cea22ed070f411
/android/support/v4/view/accessibility/AccessibilityNodeProviderCompatJellyBean.java
8f02b5c7f221d536aa0f27efc1b360a6ba2c0442
[]
no_license
jjensn/milight-decompile
a8f98af475f452c18a74fd1032dce8680f23abc0
47c4b9eea53c279f6fab3e89091e2fef495c6159
refs/heads/master
2021-06-01T17:23:28.555123
2016-10-12T18:07:53
2016-10-12T18:07:53
70,721,205
5
0
null
null
null
null
UTF-8
Java
false
false
1,715
java
package android.support.v4.view.accessibility; import android.os.Bundle; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; import java.util.List; class AccessibilityNodeProviderCompatJellyBean { AccessibilityNodeProviderCompatJellyBean() { } public static Object newAccessibilityNodeProviderBridge(AccessibilityNodeInfoBridge paramAccessibilityNodeInfoBridge) { return new AccessibilityNodeProvider() { public AccessibilityNodeInfo createAccessibilityNodeInfo(int paramAnonymousInt) { return (AccessibilityNodeInfo)this.val$bridge.createAccessibilityNodeInfo(paramAnonymousInt); } public List<AccessibilityNodeInfo> findAccessibilityNodeInfosByText(String paramAnonymousString, int paramAnonymousInt) { return this.val$bridge.findAccessibilityNodeInfosByText(paramAnonymousString, paramAnonymousInt); } public boolean performAction(int paramAnonymousInt1, int paramAnonymousInt2, Bundle paramAnonymousBundle) { return this.val$bridge.performAction(paramAnonymousInt1, paramAnonymousInt2, paramAnonymousBundle); } }; } static abstract interface AccessibilityNodeInfoBridge { public abstract Object createAccessibilityNodeInfo(int paramInt); public abstract List<Object> findAccessibilityNodeInfosByText(String paramString, int paramInt); public abstract boolean performAction(int paramInt1, int paramInt2, Bundle paramBundle); } } /* Location: * Qualified Name: android.support.v4.view.accessibility.AccessibilityNodeProviderCompatJellyBean * Java Class Version: 6 (50.0) * JD-Core Version: 0.6.1-SNAPSHOT */
[ "jjensen@GAM5YG3QC-MAC.local" ]
jjensen@GAM5YG3QC-MAC.local
cc54633bdbd0753a6171a2911b56519519c237cd
72e1e90dd8e1e43bad4a6ba46a44d1f30aa76fe6
/java/core/javaee7-samples-master/jms/temp-destination/src/test/java/org/javaee7/jms/temp/destination/TempQueueTest.java
569ac8c4efaafd7b41c18ffe2b34485ead23733a
[ "CDDL-1.0", "MIT", "GPL-2.0-only", "LicenseRef-scancode-oracle-openjdk-exception-2.0", "Apache-2.0" ]
permissive
fernando-romulo-silva/myStudies
bfdf9f02778d2f4993999f0ffc0ddd0066ec41b4
aa8867cda5edd54348f59583555b1f8fff3cd6b3
refs/heads/master
2023-08-16T17:18:50.665674
2023-08-09T19:47:15
2023-08-09T19:47:15
230,160,136
3
0
Apache-2.0
2023-02-08T19:49:02
2019-12-25T22:27:59
null
UTF-8
Java
false
false
1,934
java
package org.javaee7.jms.temp.destination; import static org.junit.Assert.assertEquals; import javax.ejb.EJB; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; import org.junit.runner.RunWith; /** * Temporary queues are JMS queues that exist for the lifetime of single JMS connection. * Also the reception of the messages is exclusive to the connection, therefore no * reasonable use case exist for temporary topic within Java EE container, as connection * is exclusive to single component. * * Temporary queues are usually used as reply channels for request / response communication * over JMS. */ @RunWith(Arquillian.class) public class TempQueueTest { /** * In this test we created a server component +RequestResponseOverJMS+, that * listens on a Queue and passes the response to the destination specified in * +JMSReplyTo+ header of the message. * * include::RequestResponseOverJMS#onMessage[] * * +JmsClient+ is a client to this server, and has to be non transactional, * otherwise the request would be first sent upon commit, i. e. after the * business method finishes. That would be too late. We need to send the message * immediately, and wait for the response to arrive. * * include::JmsClient#process[] * */ @Deployment public static WebArchive deployment() { return ShrinkWrap.create(WebArchive.class) .addClasses(RequestResponseOverJMS.class, JmsClient.class, Resources.class); } @EJB private JmsClient client; /** * We invoke the client, and verify that the response is processed */ @Test public void testRequestResposne() { assertEquals("Processed: Hello", client.process("Hello")); } }
[ "fernando.romulo.silva@gmail.com" ]
fernando.romulo.silva@gmail.com
bf61716d9836e30bfa0ff17cbd9ef9fcea7e33ba
85fa1f4bf5e4ad2df27a77bf7633e203b6421245
/forever/src/main/java/com/forever/zhb/page/PageUtil.java
d68b56a78dd86ccb68071ae6bf6028ef2a8e2e21
[]
no_license
ZHB1024/zhb-forever
1765d1926121be5046aded899b56d2525fa420a7
4a1e71d776b0bf004aaf0cf5089029e1a9300f73
refs/heads/master
2018-10-16T09:18:32.855468
2018-08-18T15:36:37
2018-08-18T15:36:37
112,721,046
0
0
null
null
null
null
UTF-8
Java
false
false
1,365
java
package com.forever.zhb.page; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class PageUtil { private static final Logger logger = LoggerFactory.getLogger(PageUtil.class); public static <T> Page<T> getPage(Iterator<T> itr, long start, int pageCount, long totalCount) { List list = new ArrayList((int) pageCount); while (itr.hasNext()) { Object pageObject = itr.next(); if (null != pageObject) list.add(pageObject); else { logger.error("Null object founded!"); } } if ((0 == list.size()) || (0 == pageCount)) { return new Page(new ArrayList(0), 0, 0, pageCount, false); } boolean hasNext = start + pageCount < totalCount; return new Page(list, (int) start, (int) totalCount, pageCount, hasNext); } public static int getValidateStart(int start, int pageSize, int totalCount) { if ((start <= 0) || (totalCount <= 0)) { return 0; } if (start < totalCount) { return start; } boolean flag = totalCount % pageSize == 0; int lastPageCount = (flag) ? pageSize : totalCount % pageSize; return (totalCount - lastPageCount); } }
[ "zhb20111503@126.com" ]
zhb20111503@126.com
7f67ace815bbcf38e6719ecf76104f12f19f2883
117a24dc265bbc965dc4f8b14ce4399b8e0f8ba6
/src/main/java/DSA/String/EncodeAndDecodeStrings.java
4814a1a9afb6a270bac82aaabcc2dd955ff36a26
[]
no_license
sureshrmdec/Preparation26EatSleepDrinkCode
e240393eabdc3343bb1165d5c432217f085aa353
aa5b81907205f9d435835e2150100e8f53027212
refs/heads/master
2021-09-29T14:28:24.691090
2018-11-25T13:52:43
2018-11-25T13:52:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,736
java
/** * */ package DSA.String; import java.util.ArrayList; import java.util.List; /** * @author Raj * * Design an algorithm to encode a list of strings to a string. The * encoded string is then sent over the network and is decoded back to * the original list of strings. * * Machine 1 (sender) has the function: * * string encode(vector<string> strs) { * * // ... your code return encoded_string; * * } * * Machine 2 (receiver) has the function: * * vector <string> decode(string s) { * * //... your code return strs; * * } * * So Machine 1 does: * * string encoded_string = encode(strs); * * and Machine 2 does: * * vector<string> strs2 = decode(encoded_string); * * strs2 in Machine 2 should be the same as strs in Machine 1. * * Implement the encode and decode methods. * * Note: The string may contain any possible characters out of 256 valid * ascii characters. Your algorithm should be generalized enough to work * on any possible characters. Do not use class member/global/static * variables to store states. Your encode and decode algorithms should * be stateless. Do not rely on any library method such as eval or * serialize methods. You should implement your own encode/decode * algorithm.. */ public class EncodeAndDecodeStrings { // Encodes a list of strings to a single string. public String encode(List<String> strs) { StringBuilder sb = new StringBuilder(); for (String st : strs) { // leetcode OJ is not handling nulls, so we don't have to add this condition sb.append(null == st ? 0 : st.length()); sb.append("#"); sb.append(st); } return sb.toString(); } // Decodes a single string to a list of strings. public List<String> decode(String s) { List<String> res = new ArrayList<>(); int i = 0; while (i < s.length()) { char ch = s.charAt(i); if (Character.isDigit(ch)) { int len = ch - '0'; i++; while (Character.isDigit(s.charAt(i))) { len = (len * 10) + s.charAt(i++) - '0'; } i++; // '#' found res.add(s.substring(i, i + len)); i = i + len; } } return res; } /** * @param args */ public static void main(String[] args) { EncodeAndDecodeStrings obj = new EncodeAndDecodeStrings(); String result = null; List<String> res = null; List<String> a = new ArrayList<>(); a.add("prithvi"); a.add("raj"); a.add("kumar"); a.add("dasari"); a.add(""); result = obj.encode(a); System.out.println(result); res = obj.decode(result); System.out.println(res); } }
[ "rahuja@twitter.com" ]
rahuja@twitter.com
f1f1ea550c7fb41bb1a74661f42b06e67c87ee1b
2e743d39b9928e352f1a8c7ecc33bf7c9f7481fb
/AE-Game/data/scripts/system/handlers/quest/pandaemonium/_4973MarraWorry.java
7f047aa19c7ef15cf8502e4849a82e6ebb8de2c8
[]
no_license
webdes27/AionTypeZero
40461b3b99ae7ca229735889277e62eed4c5db7e
ff234a0a515c1155f18e61e5b5ba2afad7dfd8c9
refs/heads/master
2021-05-30T12:14:08.672390
2016-01-29T13:54:32
2016-01-29T13:54:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,081
java
/* * Copyright (c) 2015, TypeZero Engine (game.developpers.com) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of TypeZero Engine 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 HOLDER 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 quest.pandaemonium; import org.typezero.gameserver.model.gameobjects.player.Player; import org.typezero.gameserver.questEngine.handlers.QuestHandler; import org.typezero.gameserver.model.DialogAction; import org.typezero.gameserver.questEngine.model.QuestEnv; import org.typezero.gameserver.questEngine.model.QuestState; import org.typezero.gameserver.questEngine.model.QuestStatus; /** * @author Cheatkiller * */ public class _4973MarraWorry extends QuestHandler { private final static int questId = 4973; public _4973MarraWorry() { super(questId); } public void register() { qe.registerQuestNpc(798392).addOnQuestStart(questId); qe.registerQuestNpc(798392).addOnTalkEvent(questId); qe.registerQuestNpc(204130).addOnTalkEvent(questId); qe.registerQuestNpc(204728).addOnTalkEvent(questId); qe.registerQuestNpc(204324).addOnTalkEvent(questId); } @Override public boolean onDialogEvent(QuestEnv env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); DialogAction dialog = env.getDialog(); int targetId = env.getTargetId(); if (qs == null || qs.getStatus() == QuestStatus.NONE) { if (targetId == 798392) { if (dialog == DialogAction.QUEST_SELECT) { return sendQuestDialog(env, 1011); } else { return sendQuestStartDialog(env); } } } else if (qs.getStatus() == QuestStatus.START) { if (targetId == 204130) { if (dialog == DialogAction.QUEST_SELECT) { if(qs.getQuestVarById(0) == 0) { return sendQuestDialog(env, 1352); } } else if (dialog == DialogAction.SETPRO1) { return defaultCloseDialog(env, 0, 1); } } if (targetId == 204728) { if (dialog == DialogAction.QUEST_SELECT) { if(qs.getQuestVarById(0) == 1) { return sendQuestDialog(env, 1693); } } else if (dialog == DialogAction.SETPRO2) { return defaultCloseDialog(env, 1, 2); } } if (targetId == 204324) { if (dialog == DialogAction.QUEST_SELECT) { if(qs.getQuestVarById(0) == 2) { return sendQuestDialog(env, 2034); } } else if (dialog == DialogAction.SETPRO3) { qs.setQuestVar(3); return defaultCloseDialog(env, 3, 3, true, false); } } } else if (qs.getStatus() == QuestStatus.REWARD) { if (targetId == 798392) { if (dialog == DialogAction.USE_OBJECT) { return sendQuestDialog(env, 2375); } return sendQuestEndDialog(env); } } return false; } }
[ "game.fanpage@gmail.com" ]
game.fanpage@gmail.com
d56500a4a2ac8109418527c49f740b4ec61b12a3
d40d438a822bdbd8e3dcc69af9ff52849dd9d4ab
/app/src/main/java/com/deelock/wifilock/presenter/AboutPresenter.java
e54facd8309272fcd0632c4dbb7655859d533c62
[]
no_license
emtee40/wifilock-cn
58922aa51eca54f41e6a5f2d25799114d67ede28
f32f1a7287832552419050e5dd143dd258d99cdb
refs/heads/master
2023-07-29T03:09:56.305885
2020-01-07T10:01:22
2020-01-07T10:01:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,522
java
package com.deelock.wifilock.presenter; import android.app.Activity; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.util.Log; import com.deelock.wifilock.model.IAboutView; import com.deelock.wifilock.ui.activity.AboutActivity; import java.util.Calendar; import java.util.TimeZone; /** * Created by forgive for on 2018\3\22 0022. */ public class AboutPresenter implements AboutPresenterImpl { private IAboutView view; private AboutActivity activity; public AboutPresenter(Activity activity, IAboutView view){ this.view = view; } @Override public void getInfo() { String versionName = ""; Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT+08:00")); int year = c.get(Calendar.YEAR); if (view != null){ view.setCopyRight("ๆˆ้ƒฝ่ฟชๆด›ๅฏ็ง‘ๆŠ€ๆœ‰้™ๅ…ฌๅธ ็‰ˆๆƒๆ‰€ๆœ‰\nCopyright ยฉ 2017 - "+year+" Chengdu Deelock Technology Co., Ltd. \nAll rights reserved."); } try { PackageInfo packageInfo = activity.getApplicationContext() .getPackageManager() .getPackageInfo(activity.getPackageName(), 0); versionName = packageInfo.versionName; Log.d("TAG", "ๆœฌ่ฝฏไปถ็š„็‰ˆๆœฌๅทใ€‚ใ€‚" + versionName); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } if (view != null){ view.setVersion("v"+versionName); } } }
[ "179292126@qq.com" ]
179292126@qq.com
a66d90c0b88640b24e3b740ac90d48c19b453bd5
95f2fdb228c3021634c573769ec9e46e26549391
/premiun-springJPA/jpacore/jpashop/src/main/java/jpacore/jpashop/repository/ItemRepository.java
febec1b02da0e3a0a3b923860aa174b598a4c5de
[]
no_license
Yumin-Kim/Java-SpringStudy
aafeb50042f3ea9af7de30e58d356ae22b332281
72a4cd76a55febd1bd842687ac80a3db24214454
refs/heads/master
2023-08-25T17:47:45.667803
2021-10-20T14:41:30
2021-10-20T14:41:30
380,800,790
0
0
null
null
null
null
UTF-8
Java
false
false
695
java
package jpacore.jpashop.repository; import jpacore.jpashop.domain.Item; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import java.util.List; @Repository @RequiredArgsConstructor public class ItemRepository { private final EntityManager em; public void save(Item item){ if (item.getId() == null) { em.persist(item); }else{ em.merge(item); } } public Item findOne(Long id){ return em.find(Item.class,id); } public List<Item> findAll(){ return em.createQuery("select i from Item i ", Item.class).getResultList(); } }
[ "dbals0@naver.com" ]
dbals0@naver.com
f032627a7d61f93cc2e85250298d598222362f9b
ed79c59100d2b9452470a68d0213f1c1b35473cf
/core/trino-spi/src/main/java/io/trino/spi/function/FunctionId.java
d78bee164bc21042decbe3b1f8bc23a618376988
[ "Apache-2.0" ]
permissive
trinodb/trino
3ce066dde7d1b84511af96f5f77b20bbd5abe0d9
5c3326fd8cfd9d7e676e9bd36f54467fde23dc94
refs/heads/master
2023-08-18T15:36:55.838928
2023-08-10T11:40:10
2023-08-18T09:11:40
166,515,022
7,046
1,949
Apache-2.0
2023-09-14T21:51:07
2019-01-19T06:38:14
Java
UTF-8
Java
false
false
2,004
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.trino.spi.function; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.trino.spi.Experimental; import java.util.Locale; import static java.util.Objects.requireNonNull; @Experimental(eta = "2022-10-31") public class FunctionId { private final String id; @JsonCreator public FunctionId(String id) { requireNonNull(id, "id is null"); if (id.isEmpty()) { throw new IllegalArgumentException("id must not be empty"); } if (!id.toLowerCase(Locale.US).equals(id)) { throw new IllegalArgumentException("id must be lowercase"); } if (id.contains("@")) { throw new IllegalArgumentException("id must not contain '@'"); } this.id = id; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FunctionId that = (FunctionId) o; return id.equals(that.id); } @Override public int hashCode() { return id.hashCode(); } @JsonValue @Override public String toString() { return id; } public static FunctionId toFunctionId(Signature signature) { return new FunctionId(signature.toString().toLowerCase(Locale.US)); } }
[ "dain@iq80.com" ]
dain@iq80.com
4eb7b32658069de4ed46409060252be69fdc1fb6
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_48934.java
dad868444b7bf533225743b247296b01b8446f27
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
145
java
public static boolean isEmpty(Condition<?> condition){ return condition.getType() != Condition.Type.LITERAL && condition.numChildren() == 0; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
15afacb46a2a815b591a97f63d5f23f99cd5bc2f
e6ca60700ca3d46e9e8fbf8ac6c7d7d56ba3dafb
/src/test/java/JavaDateAndTimeTest.java
6e967538761e6e8a0bfda7582cf31fc27a67fa91
[]
no_license
adacayi/hackerrank
0fec2986d6f3b116c5a2a9afb4b3e7756f7c3eb4
914c3c54496f076ebbeab022ec79cbfb311a2935
refs/heads/master
2020-03-18T01:31:15.734194
2018-11-07T14:47:58
2018-11-07T14:47:58
134,145,138
0
0
null
null
null
null
UTF-8
Java
false
false
704
java
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class JavaDateAndTimeTest { @Test public void shouldReturnMonday() { String day = "20"; String month = "8"; String year = "2018"; String expected="MONDAY"; String actual = new JavaDateAndTime().getDay(day,month,year); Assertions.assertEquals(expected, actual); } @Test public void shouldReturnSunday() { String day = "19"; String month = "8"; String year = "2018"; String expected="SUNDAY"; String actual = new JavaDateAndTime().getDay(day,month,year); Assertions.assertEquals(expected, actual); } }
[ "a_sanver@hotmail.com" ]
a_sanver@hotmail.com
837970d3d9d6d8adc99eea6b31ab40e26b2b1945
6b12b6c6dbb014c9bc35a34feb8593fc9dfe6805
/ApplicationMetricsSubSystemTests/ApplicationMetricsApiTest6/ApplicationMetricsApiTest6-web/src/main/java/org/jam/metrics/PrintMetrics.java
cd6e29ca74c63b75ba092a647002eed42afc2f71
[ "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
pansot2/jam-metrics
122169f37adc0198ba3c495b8c83d8f448dc80e0
287daf62383e9211e31b2e962ce4a2c540721404
refs/heads/master
2020-03-18T17:43:57.360395
2018-05-27T12:51:18
2018-05-27T12:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,453
java
/* * Copyleft 2015 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jam.metrics; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.HashMap; import javax.ejb.EJB; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jam.metrics.applicationmetricsapi.MetricsCacheApi; import org.jam.metrics.applicationmetricsapi.MetricsPropertiesApi; import org.jam.metrics.applicationmetricsproperties.MetricProperties; /** * * @author Panagiotis Sotiropoulos */ public class PrintMetrics extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @EJB private MetricsApiSessionBean metricsApiSessionBean; private String groupName = "myTestGroup"; protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); initializeMetricProperties(); try (PrintWriter out = response.getWriter()) { out.println("<!DOCTYPE html>"); out.println("<html>"); out.println("<head>"); out.println("<title>Servlet PrintMetrics</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet PrintMetrics : </h1>"); metricsApiSessionBean.countMethod(); out.println(MetricsCacheApi.printMetricsCache(groupName)); out.println("<br>Successful Run ...</br>"); out.println("</body>"); out.println("</html>"); } } private void initializeMetricProperties() { HashMap<String,String> rhqScheduleIds = new HashMap<String,String>(); rhqScheduleIds.put("count", "11401"); rhqScheduleIds.put("count2", "11402"); MetricProperties metricProperties = new MetricProperties(); metricProperties.setRhqMonitoring("false"); metricProperties.setCacheStore("true"); metricProperties.setRhqServerUrl("lz-panos-jon33.bc.jonqe.lab.eng.bos.redhat.com"); metricProperties.setRhqScheduleIds(rhqScheduleIds); metricProperties.setDatabaseStore("true"); try { Connection connection = DriverManager.getConnection("jdbc:mariadb://localhost:3306", "root", "panos"); Statement stmt = connection.createStatement(); createDbTable(stmt); HashMap<String,Statement> dbStmt = new HashMap<String,Statement>(); dbStmt.put("statement_1", stmt); metricProperties.setDatabaseStatement(dbStmt); HashMap<String,String> query1 = new HashMap<String,String>(); query1.put("StoreDBMetric", "INSERT INTO MyMETRICS.metricValues(METRIC_NAME,METRIC_VALUE,METRIC_INSTANCE,RECORD_TIME) VALUES('{1}', [1], '{instance}', '{time}');"); metricProperties.setUpdateDbQueries(query1); } catch(Exception e) { e.printStackTrace(); } MetricsPropertiesApi.storeProperties(groupName, metricProperties); } private void createDbTable(Statement stmt) { try { String query = "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'MyMETRICS' AND table_name = 'metricValues'"; ResultSet rs = stmt.executeQuery(query); rs.next(); boolean exists = rs.getInt("COUNT(*)") > 0; if (!exists) { String sql = "CREATE DATABASE MyMETRICS"; stmt.executeUpdate(sql); System.out.println("Database created successfully..."); sql = "CREATE TABLE MyMETRICS.metricValues(ID int NOT NULL AUTO_INCREMENT, METRIC_NAME varchar(255) NOT NULL," + " METRIC_VALUE varchar(255) NOT NULL, METRIC_INSTANCE varchar(255), RECORD_TIME DATETIME, PRIMARY KEY(ID));"; stmt.executeUpdate(sql); } } catch(Exception e){ e.printStackTrace(); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "psotirop@redhat.com" ]
psotirop@redhat.com
4641fae429ef8e7affe2dac91d0a3a03a2748dcd
6f1ae57aa8f1f3da3cd5eeea434d4b640673fb17
/src/main/java/com/epam/cafe/FrontServlet.java
06e24d4524e6b62c8c38e9a9fab8a3e183c1fe53
[]
no_license
kononir/EPAM-cafe
f7c9aa9bad6b3337a07b62553eeca0f54f4e49da
edb65eeaf6f436e5c62ecb19a69119b2e3ae5e3c
refs/heads/master
2022-07-01T16:49:08.601490
2019-10-08T21:36:29
2019-10-08T21:36:29
178,615,910
0
0
null
2021-12-14T21:19:07
2019-03-30T22:03:04
Java
UTF-8
Java
false
false
3,950
java
package com.epam.cafe; import com.epam.cafe.api.Command; import com.epam.cafe.command.factory.CommandFactory; import com.epam.cafe.connection.pool.ConnectionPool; import com.epam.cafe.entitie.user.User; import com.epam.cafe.entitie.user.UserRole; import com.epam.cafe.page.NavigationWay; import com.epam.cafe.service.ServiceException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.sql.SQLException; public class FrontServlet extends HttpServlet { private static final String CLIENT_ERROR_PAGE = "/view/page/client/client_error.jsp"; private static final String ADMIN_ERROR_PAGE = "/view/page/administrator/admin_error.jsp"; private static final String DEFAULT_PAGE = "/view/page/general/authorization.jsp"; private static final Logger LOGGER = LogManager.getRootLogger(); @Override public void destroy() { try { ConnectionPool pool = ConnectionPool.getInstance(); pool.closeAll(); } catch (SQLException e) { LOGGER.error("Closing database connections exception", e); } } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { processRequest(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { processRequest(req, resp); } private void processRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String page; String navigationWayParam = req.getParameter("navigationWay"); NavigationWay navigationWay = NavigationWay.valueOf(navigationWayParam.toUpperCase()); try { String commandName = req.getParameter("command"); CommandFactory commandFactory = new CommandFactory(req); Command command = commandFactory.create(commandName); page = command.execute(); } catch (ServiceException e) { LOGGER.error("", e); page = handleErrorMessage(e.getMessage(), req); navigationWay = NavigationWay.FORWARD; } catch (Exception e) { LOGGER.error("", e); page = handleErrorMessage("Internal server error.", req); navigationWay = NavigationWay.FORWARD; } dispatch(req, resp, page, navigationWay); } private void dispatch(HttpServletRequest req, HttpServletResponse resp, String page, NavigationWay navigationWay) throws ServletException, IOException { switch (navigationWay) { case FORWARD: RequestDispatcher requestDispatcher = getServletContext().getRequestDispatcher(page); requestDispatcher.forward(req, resp); break; case REDIRECT: String url = req.getContextPath() + page; resp.sendRedirect(url); break; } } private String handleErrorMessage(String errorMessage, HttpServletRequest req) { HttpSession session = req.getSession(); session.setAttribute("errorMessage", errorMessage); User user = (User) session.getAttribute("user"); UserRole role = user.getRole(); String page; switch (role) { case CLIENT: page = CLIENT_ERROR_PAGE; break; case ADMINISTRATOR: page = ADMIN_ERROR_PAGE; break; default: page = DEFAULT_PAGE; } return page; } }
[ "novlad26@gmail.com" ]
novlad26@gmail.com
9f65153ca54de12e00f82f80ba0b81905c3cd8da
7e186fb8b8232bb57a9799cf19346ed955b635fe
/tripoin-root-core/tripoin-core-integration/src/main/java/id/co/tripoin/core/integration/endpoint/impl/SecurityFunctionEndPointImpl.java
4ac8846f01fb34480efc797af03129b8a9f39b5d
[]
no_license
Tripoin/tripoin-gateway
722f1648b239257300fc4fa0882378169b9d8057
6fad5400aebf45dd857dd9101772c99d5dae173b
refs/heads/master
2020-09-20T06:54:34.988132
2017-09-19T06:16:10
2017-09-19T06:16:10
66,863,743
1
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
package id.co.tripoin.core.integration.endpoint.impl; import id.co.tripoin.core.constant.statics.BeanNameConstant; import id.co.tripoin.core.integration.endpoint.ISecurityFunctionEndPoint; import id.co.tripoin.core.integration.endpoint.scaffolding.impl.AScaffoldingEndPoint; import id.co.tripoin.core.pojo.security.SecurityFunction; import id.co.tripoin.core.service.ISecurityFunctionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; /** * created on 1/3/2017 * * @author <a href="mailto:fauzi.knightmaster.achmad@gmail.com">Achmad Fauzi</a> */ @Component(BeanNameConstant.Security.SECURITY_FUNCTION_BEAN) public class SecurityFunctionEndPointImpl extends AScaffoldingEndPoint<SecurityFunction> implements ISecurityFunctionEndPoint { @Autowired ISecurityFunctionService securityFunctionService; @PostConstruct @Override public void init() { scaffoldingService = securityFunctionService; } }
[ "fauzi.knightmaster.achmad@gmail.com" ]
fauzi.knightmaster.achmad@gmail.com
d4b820cf4ec8f184899bfaec181844e41cc77c45
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/Math/Math_280/new/3/AstorMain-Math280/src/variant-257/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
603f369fdd1e83f304411ef07d70304197974b98
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
2,393
java
package org.apache.commons.math.distribution; public abstract class AbstractContinuousDistribution extends org.apache.commons.math.distribution.AbstractDistribution implements java.io.Serializable , org.apache.commons.math.distribution.ContinuousDistribution { private static final long serialVersionUID = -38038050983108802L; protected AbstractContinuousDistribution() { super(); } public double inverseCumulativeProbability(final double p) throws org.apache.commons.math.MathException { if ((p < 0.0) || (p > 1.0)) { throw org.apache.commons.math.MathRuntimeException.createIllegalArgumentException("{0} out of [{1}, {2}] range", p, 0.0, 1.0); } org.apache.commons.math.analysis.UnivariateRealFunction rootFindingFunction = new org.apache.commons.math.analysis.UnivariateRealFunction() { public double value(double x) throws org.apache.commons.math.FunctionEvaluationException { try { return (cumulativeProbability(x)) - p; } catch (org.apache.commons.math.MathException ex) { throw new org.apache.commons.math.FunctionEvaluationException(ex , x , ex.getPattern() , ex.getArguments()); } } }; double lowerBound = getDomainLowerBound(p); double upperBound = getDomainUpperBound(p); double[] bracket = null; try { bracket = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.bracket(rootFindingFunction, getInitialDomain(p), lowerBound, upperBound); } catch (org.apache.commons.math.ConvergenceException ex) { if ((java.lang.Math.abs(rootFindingFunction.value(lowerBound))) < 1.0E-6) { return lowerBound; } if ((java.lang.Math.abs(rootFindingFunction.value(upperBound))) < 1.0E-6) { return upperBound; } double oldx; throw new org.apache.commons.math.MathException(ex); } double root = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.solve(rootFindingFunction, bracket[0], bracket[1]); return root; } protected abstract double getInitialDomain(double p); protected abstract double getDomainLowerBound(double p); protected abstract double getDomainUpperBound(double p); }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
2473000d1a6794228c76ac0264647d47e9de08d9
25c5d8d230ecf9572e22c1bcbea52896c18e3e52
/src/main/java/com/tolochko/periodicals/model/domain/periodical/Periodical.java
7cb203faa64715da80c86cb8cde357c5e09192cc
[]
no_license
timatimtem/periodicals
e1d1295c561253a56f5ee1f8b85838c40222d70f
8b91d6ba861f7f91e73a61687e7a5f13e1ab0605
refs/heads/master
2022-04-30T19:20:41.845283
2017-04-25T13:27:12
2017-04-25T13:27:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,053
java
package com.tolochko.periodicals.model.domain.periodical; import java.io.Serializable; public class Periodical implements Serializable { private static final long serialVersionUID = 2223323888L; private long id; private String name; private PeriodicalCategory category; private String publisher; private String description; private long oneMonthCost; private Status status; public enum Status { ACTIVE, INACTIVE, DISCARDED } public enum OperationType { CREATE, UPDATE } public static class Builder { private Periodical periodical; public Builder() { periodical = new Periodical(); } public Builder setId(long id) { periodical.setId(id); return this; } public Builder setName(String name) { periodical.setName(name); return this; } public Builder setCategory(PeriodicalCategory category) { periodical.setCategory(category); return this; } public Builder setPublisher(String publisher) { periodical.setPublisher(publisher); return this; } public Builder setDescription(String description) { periodical.setDescription(description); return this; } public Builder setOneMonthCost(long oneMonthCost) { periodical.setOneMonthCost(oneMonthCost); return this; } public Builder setStatus(Status status) { periodical.setStatus(status); return this; } public Periodical build() { return periodical; } } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public PeriodicalCategory getCategory() { return category; } public void setCategory(PeriodicalCategory category) { this.category = category; } public String getPublisher() { return publisher; } public void setPublisher(String publisher) { this.publisher = publisher; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public long getOneMonthCost() { return oneMonthCost; } public void setOneMonthCost(long oneMonthCost) { this.oneMonthCost = oneMonthCost; } public Status getStatus() { return status; } public void setStatus(Status status) { this.status = status; } @Override public String toString() { String shortDescription = (this.description.length() <= 15) ? this.description : this.description.substring(0, 15); return String.format("Periodical{id=%d, name='%s', category='%s', publisher='%s', " + "description='%s', oneMonthCost='%d', status='%s'}", id, name, category, publisher, shortDescription, oneMonthCost, status); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Periodical that = (Periodical) o; if (id != that.id) { return false; } if (name != null ? !name.equals(that.name) : that.name != null) { return false; } return publisher != null ? publisher.equals(that.publisher) : that.publisher == null; } @Override public int hashCode() { int result = (int) (id ^ (id >>> 32)); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (publisher != null ? publisher.hashCode() : 0); return result; } }
[ "timur10645@icloud.com" ]
timur10645@icloud.com
2f205ae3be4a244562431b7e537e7d5b056789a1
2f4a058ab684068be5af77fea0bf07665b675ac0
/utils/com/facebook/analytics/AnalyticsInitializer.java
b610c8adcea4c38ac769afe9e758d73ca3424aa8
[]
no_license
cengizgoren/facebook_apk_crack
ee812a57c746df3c28fb1f9263ae77190f08d8d2
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
refs/heads/master
2021-05-26T14:44:04.092474
2013-01-16T08:39:00
2013-01-16T08:39:00
8,321,708
1
0
null
null
null
null
UTF-8
Java
false
false
1,332
java
package com.facebook.analytics; import com.facebook.common.util.FbErrorReporter; import com.facebook.device_id.DeviceIdChangedCallback; import com.facebook.device_id.UniqueDeviceId; import com.facebook.device_id.UniqueIdForDeviceHolder; import com.facebook.orca.app.INeedInit; import com.facebook.orca.debug.BLog; public class AnalyticsInitializer implements DeviceIdChangedCallback, INeedInit { private final Class<?> a = AnalyticsInitializer.class; private final UniqueIdForDeviceHolder b; private final FbErrorReporter c; public AnalyticsInitializer(FbErrorReporter paramFbErrorReporter, UniqueIdForDeviceHolder paramUniqueIdForDeviceHolder) { this.b = paramUniqueIdForDeviceHolder; this.c = paramFbErrorReporter; } private void a(String paramString) { if (paramString != null) { this.c.b("marauder_device_id", paramString); BLog.b(this.a, "ErrorReporter DEVICE_ID_KEY set to: " + paramString); } } public void a(UniqueDeviceId paramUniqueDeviceId1, UniqueDeviceId paramUniqueDeviceId2) { a(paramUniqueDeviceId2.a()); } public void i_() { a(this.b.b()); } } /* Location: /data1/software/apk2java/dex2jar-0.0.9.12/secondary-1.dex_dex2jar.jar * Qualified Name: com.facebook.analytics.AnalyticsInitializer * JD-Core Version: 0.6.2 */
[ "macluz@msn.com" ]
macluz@msn.com
85771de766bc33d0f5c653630614988b7c7bcf49
269a361c16f50fd36a6e19afb94890d0ea567b30
/src/lotrec/gui/LogicTabComponent.java
8dca68e2e81d637afcbf9d787ccc23e5b43ea4a5
[]
no_license
bilals/lotrec
2344c0189dcabcedb009b881c22d95769d6fd8ba
c30b6e707c17f9b2ab34840054e391318a38c18a
refs/heads/master
2020-03-14T00:19:54.598637
2018-11-14T20:49:03
2018-11-14T20:49:03
131,354,452
3
6
null
2018-04-28T00:48:07
2018-04-27T23:47:21
Java
UTF-8
Java
false
false
4,126
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package lotrec.gui; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.AbstractButton; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.plaf.basic.BasicButtonUI; /** * * @author said */ public class LogicTabComponent extends JPanel { private JButton closeButton; private JLabel label; public LogicTabComponent(final JTabbedPane logicDefTabsPane) { super(new FlowLayout(FlowLayout.LEFT, 0, 0)); setOpaque(false); label = new JLabel() { @Override public String getText() { int i = logicDefTabsPane.indexOfTabComponent(LogicTabComponent.this); if (i != -1) { return logicDefTabsPane.getTitleAt(i); } return null; } }; add(label); //add more space between the label and the button label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); //tab button closeButton = new TabButton(); add(closeButton); //add more space to the top of the component setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); validate(); } public JButton getCloseButton() { return this.closeButton; } public JLabel getLabel() { return this.label; } private class TabButton extends JButton { public TabButton() { int size = 17; setPreferredSize(new Dimension(size, size)); setToolTipText("close this tab"); //Make the button looks the same for all Laf's setUI(new BasicButtonUI()); //Make it transparent setContentAreaFilled(false); //No need to be focusable setFocusable(false); setBorder(BorderFactory.createEtchedBorder()); setBorderPainted(false); //Making nice rollover effect //we use the same listener for all buttons addMouseListener(buttonMouseListener); setRolloverEnabled(true); } //we don't want to update UI for this button @Override public void updateUI() { } //paint the cross @Override protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g.create(); //shift the image for pressed buttons if (getModel().isPressed()) { g2.translate(1, 1); } g2.setStroke(new BasicStroke(2)); g2.setColor(Color.BLACK); if (getModel().isRollover()) { g2.setColor(Color.MAGENTA); } int delta = 6; g2.drawLine(delta, delta, getWidth() - delta - 1, getHeight() - delta - 1); g2.drawLine(getWidth() - delta - 1, delta, delta, getHeight() - delta - 1); g2.dispose(); } } private final static MouseListener buttonMouseListener = new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { Component component = e.getComponent(); if (component instanceof AbstractButton) { AbstractButton button = (AbstractButton) component; button.setBorderPainted(true); } } @Override public void mouseExited(MouseEvent e) { Component component = e.getComponent(); if (component instanceof AbstractButton) { AbstractButton button = (AbstractButton) component; button.setBorderPainted(false); } } }; }
[ "bilal.said@gmail.com" ]
bilal.said@gmail.com
7d0e66efb66492e68ce4d147d0d5e409091e70ca
4985ef6259566f2c97c455df4c641a3a65d7432e
/app/src/main/java/com/xacheliangroup/check/common/type/MineMenuEnum.java
ac98607034b496fb7838b859940d545564cab3ca
[]
no_license
Fgfj/xwLine
2477ae7bc65eadcda0db21728eed6827149039d2
70653e733a42ed20c5ba0d171dba9eb85c11853a
refs/heads/master
2020-09-26T10:30:01.741803
2020-01-02T10:45:59
2020-01-02T10:45:59
226,236,241
0
0
null
null
null
null
UTF-8
Java
false
false
812
java
package com.xacheliangroup.check.common.type; import java.io.Serializable; /** * author:yz * data: 2019/2/28,10:26 */ public enum MineMenuEnum implements Serializable { CARD_LIST(1,"ๆˆ‘็š„ๅกๅท"), ORDER_LIST(2,"ๆˆ‘็š„่ฎขๅ•"), BILL_LIST(3,"ๆˆ‘็š„ๅ‘็ฅจ"), DOPE_LIST(4,"ๆˆ‘็š„ๆถˆๆฏ"), ADDRESS_LIST(5,"ๅœฐๅ€่ฎพ็ฝฎ"), SYSTEM_SETTING(6,"็ณป็ปŸ่ฎพ็ฝฎ"); private Integer value; private String desc; MineMenuEnum(Integer value, String desc) { this.value = value; this.desc = desc; } public Integer getValue() { return value; } public void setValue(Integer value) { this.value = value; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } }
[ "zq090428" ]
zq090428
483b59625f65fb666b032208af008eeb6ede037b
e02ab7944d096dfd71f86ffe9b46e63da2962f6c
/src/main/java/com/thanthu/recipeappmongo/commands/NotesCommand.java
1eea12fe1bc845f22381bf77a82327bca4862628
[]
no_license
Thanthu/recipe-app-mongo-reactive
cfa1d974774db19531e0d4447fa5fbea26d17e0a
582f1c3acaf4fad420f9a0340bb0f4f85ba7eceb
refs/heads/master
2023-07-25T17:30:07.200573
2021-08-22T02:48:57
2021-08-22T02:48:57
398,586,058
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package com.thanthu.recipeappmongo.commands; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor public class NotesCommand { private String id; private String recipeNotes; }
[ "tnair@orthofx.com" ]
tnair@orthofx.com
884e78b37e8f73d6d00feb0340889da4fe6eff4d
d5bcef447e51e55d9999884f942628ba78185427
/sxcfu/app/src/main/java/com/hz/zdjfu/application/widget/view/FocusRelativeLayout.java
820f474b7ccee3f5cee191baf97407caff920951
[]
no_license
heguogui/zdjfu
4b43095c85c982d7b795cecd4988fb2c5f739c9c
a3e9bd76ae3a09f495d580fd5864fcc8126bdf2b
refs/heads/master
2020-03-21T22:31:58.836439
2018-07-11T09:22:49
2018-07-11T09:22:49
139,132,538
0
0
null
null
null
null
UTF-8
Java
false
false
1,674
java
package com.hz.zdjfu.application.widget.view; import android.content.Context; import android.graphics.Rect; import android.util.AttributeSet; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.RelativeLayout; import com.hz.zdjfu.application.R; /** * [็ฑปๅŠŸ่ƒฝ่ฏดๆ˜Ž] * * @author HeGuoGui * @version 3.0.0 * @time 2017/10/19 0019. */ public class FocusRelativeLayout extends RelativeLayout { private Animation scaleSmallAnimation; private Animation scaleBigAnimation; public FocusRelativeLayout(Context context) { super(context); } public FocusRelativeLayout(Context context, AttributeSet attrs) { super(context, attrs); } public FocusRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Override protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(gainFocus, direction, previouslyFocusedRect); if (gainFocus) { getRootView().invalidate(); zoomOut(); } else { zoomIn(); } } private void zoomIn() { if (scaleSmallAnimation == null) { scaleSmallAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.anim_scale_small); } startAnimation(scaleSmallAnimation); } private void zoomOut() { if (scaleBigAnimation == null) { scaleBigAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.anim_scale_big); } startAnimation(scaleBigAnimation); } }
[ "86100992@qq.com" ]
86100992@qq.com
433a4ee0ed2610134765313279a8f63f7c62f9df
8e374ebe2e88f8701d18602a612ade06c4245280
/java01/src/day03/test03.java
3af40eefe6363d5e7bad0fd88ef35e81033c75ca
[]
no_license
jakeshin89/bit_java
4c4d5b08214e39f41eef5fccfa55f3a1ab89e7db
9fe56c84a55af914c51e4c682101d610c031257e
refs/heads/master
2020-07-03T09:52:32.541332
2019-08-13T00:40:42
2019-08-13T00:40:42
201,861,661
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
package day03; // ๋‹ค์‹œ ํ•œ ๋ฒˆ ํ•ด๋ณด๊ธฐ. ์ž…๋ ฅ, if, else, return import java.util.Scanner; public class test03 { public static void main(String[] args) { int score; Scanner input = new Scanner(System.in); //out์€ ์ฝ˜์†”์ฐฝ, in์€ ์ž…๋ ฅ๋ฐ›๊ธฐ System.out.println("์ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”."); score = Integer.parseInt(input.nextLine()); //nextline์ด๋ž€? // int = string, ์ŠคํŠธ๋ง ๋ฐ”๊พธ๋Š” ๋งˆ๋ฒ• input.close(); input = null; // ๋‹ซ์•„๋ฒ„๋ฆฌ๊ธฐ if(!(score>=0 && score<=100)) { System.out.println("์œ ํšจํ•˜์ง€ ์•Š์€ ์ ์ˆ˜์ž…๋‹ˆ๋‹ค."); return; //์ ์ˆ˜ ๋ฒ”์œ„ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ, ์œ ํšจํ•˜์ง€ ์•Š๋‹ค๋ฉด ์ž˜๊ฐ€~ } System.out.println("์ ์ˆ˜ : "+score); if(score>=80) { System.out.println("Pass"); } else { System.out.println("No Pass"); } String result = score>=80 ? "Pass" : "No Pass"; System.out.println("๋‹น์‹ ์˜ ์ ์ˆ˜๋Š” "+score+"์ ์ด๋ฏ€๋กœ "+result+"์ž…๋‹ˆ๋‹ค."); return; } } // ๋„์Šค์—์„œ ์‹คํ–‰ํ•˜๊ธฐ
[ "user@DESKTOP-V882PTR" ]
user@DESKTOP-V882PTR
bafb639c09ff1c470360b9a3a04828ee97022286
c25e23ef29c7cfc0ad65cca639ecf9d6f012061d
/components/camel-jmx/src/main/java/org/apache/camel/component/jmx/JMXComponent.java
8822ed9ec4ae48a7dae837b207ef19a29792ac89
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown", "Apache-2.0" ]
permissive
sarvex/camel
e8bfe583d8220155492ed0caecad70e66e86ea87
1d2b4ec72403dc787d2515862a3511f9adbb3c9d
refs/heads/master
2023-05-11T18:05:22.102302
2023-05-02T02:06:27
2023-05-02T02:06:27
32,274,776
0
0
Apache-2.0
2023-05-02T02:06:28
2015-03-15T17:46:52
Java
UTF-8
Java
false
false
3,097
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.component.jmx; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import org.apache.camel.Endpoint; import org.apache.camel.impl.UriEndpointComponent; import org.apache.camel.util.EndpointHelper; /** * Component for connecting JMX Notification events to a camel route. * The endpoint created from this component allows users to specify * an ObjectName to listen to and any JMX Notifications received from * that object will flow into the route. */ public class JMXComponent extends UriEndpointComponent { public JMXComponent() { super(JMXEndpoint.class); } @Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { JMXEndpoint endpoint = new JMXEndpoint(uri, this); // use the helper class to set all of the properties EndpointHelper.setReferenceProperties(getCamelContext(), endpoint, parameters); EndpointHelper.setProperties(getCamelContext(), endpoint, parameters); endpoint.setServerURL(remaining); // we may have some extra params left over for the object properties hashtable // these properties need to be consumed or the framework will throw an exception // for unused params if (!parameters.isEmpty()) { Hashtable<String, String> objectProperties = new Hashtable<String, String>(); for (Iterator<Entry<String, Object>> it = parameters.entrySet().iterator(); it.hasNext();) { Entry<String, Object> entry = it.next(); if (entry.getKey().startsWith("key.")) { objectProperties.put(entry.getKey().substring("key.".length()), entry.getValue().toString()); it.remove(); } } endpoint.setObjectProperties(objectProperties); } if (endpoint.getObjectDomain() == null) { throw new IllegalArgumentException("Must specify domain"); } if (endpoint.getObjectName() == null && endpoint.getObjectProperties() == null) { throw new IllegalArgumentException("Must specify object name or object properties"); } return endpoint; } }
[ "davsclaus@apache.org" ]
davsclaus@apache.org
a83ea4c996b563a9f472c2a3342d073a0292ba67
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/naver--pinpoint/a53ff87c5df0304f628bbc37b37232ca97bb89b4/before/TraceContext.java
43caeafef7278f409cec1c27f9ef09db57fcc1f1
[]
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
2,564
java
/* * Copyright 2014 NAVER Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.navercorp.pinpoint.bootstrap.context; import com.navercorp.pinpoint.bootstrap.config.ProfilerConfig; import com.navercorp.pinpoint.bootstrap.interceptor.MethodDescriptor; import com.navercorp.pinpoint.common.trace.ServiceType; import com.navercorp.pinpoint.common.util.ParsingResult; /** * @author emeroad * @author hyungil.jeong */ public interface TraceContext { Trace currentTraceObject(); /** * return a trace whose sampling rate should be further verified * @return */ Trace currentRawTraceObject(); Trace continueTraceObject(TraceId traceID); Trace newTraceObject(); Trace continueAsyncTraceObject(TraceId traceId, int asyncId, long startTime); Trace removeTraceObject(); void attachTraceObject(Trace trace); void detachTraceObject(); // ActiveThreadCounter getActiveThreadCounter(); String getAgentId(); String getApplicationName(); long getAgentStartTime(); short getServerTypeCode(); String getServerType(); int cacheApi(MethodDescriptor methodDescriptor); int cacheString(String value); // TODO extract jdbc related methods ParsingResult parseSql(String sql); boolean cacheSql(ParsingResult parsingResult); DatabaseInfo parseJdbcUrl(String sql); DatabaseInfo createDatabaseInfo(ServiceType type, ServiceType executeQueryType, String url, int port, String databaseId); TraceId createTraceId(String transactionId, long parentSpanID, long spanID, short flags); Trace disableSampling(); ProfilerConfig getProfilerConfig(); Metric getRpcMetric(ServiceType serviceType); void recordContextMetricIsError(); void recordContextMetric(int elapsedTime); void recordAcceptResponseTime(String parentApplicationName, short parentApplicationType, int elapsedTime); void recordUserAcceptResponseTime(int elapsedTime); ServerMetaDataHolder getServerMetaDataHolder(); int getAsyncId(); }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com