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
7ecc20fddcf366844f6f2a56c77575e7b441d34a
66a93a510bfdb88f28e5b2ff68feffe193d9010c
/src/main/java/bitcamp/chopchop/domain/ProductReview.java
cdc3822b9cd536de2de4868d96bb596478d20753
[]
no_license
Hecklebot/study
8140826d74199ee391c3649c34929f895cbb9bf8
0f0e84a20d3fce7ee39b7809fe5ff62ca1d3e272
refs/heads/master
2020-09-11T02:48:31.123436
2019-11-14T12:55:55
2019-11-14T12:55:55
221,916,123
0
0
null
null
null
null
UTF-8
Java
false
false
1,560
java
package bitcamp.chopchop.domain; import java.sql.Date; public class ProductReview { private int productReviewNo; private int productNo; private int memberNo; private String filePath; private String content; private int rating; private Date createdDate; public int getProductReviewNo() { return productReviewNo; } public void setProductReviewNo(int productReviewNo) { this.productReviewNo = productReviewNo; } public int getProductNo() { return productNo; } public void setProductNo(int productNo) { this.productNo = productNo; } public int getMemberNo() { return memberNo; } public void setMemberNo(int memberNo) { this.memberNo = memberNo; } public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public int getRating() { return rating; } public void setRating(int rating) { this.rating = rating; } public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } @Override public String toString() { return "ProductReview [content=" + content + ", createdDate=" + createdDate + ", filePath=" + filePath + ", memberNo=" + memberNo + ", productNo=" + productNo + ", productReviewNo=" + productReviewNo + ", rating=" + rating + "]"; } }
[ "syamsyalla@naver.com" ]
syamsyalla@naver.com
f29d1bb5d8034d3616e0f6734a52d86337faf90b
48c98c47b78670301d634fbc8ad99e2fdc86d1f7
/simulator-cli/src/main/java/org/jetlinks/simulator/cmd/upd/CreateUDPCommand.java
a374a11d77353132faa7a0b3bd7e451d41858eb0
[ "Apache-2.0" ]
permissive
jetlinks/device-simulator
3c94385443dc02c9e766fd8930da3993b7dfc9f4
6184408f59b096696d6ba6509b9cc8bfc37b99c0
refs/heads/master
2023-04-13T04:58:03.782611
2023-04-10T02:57:26
2023-04-10T02:57:26
176,395,531
57
63
Apache-2.0
2023-08-25T10:35:55
2019-03-19T01:05:15
Java
UTF-8
Java
false
false
2,349
java
package org.jetlinks.simulator.cmd.upd; import org.jetlinks.simulator.cmd.AbstractCommand; import org.jetlinks.simulator.cmd.NetworkInterfaceCompleter; import org.jetlinks.simulator.core.ExceptionUtils; import org.jetlinks.simulator.core.network.mqtt.MqttClient; import org.jetlinks.simulator.core.network.udp.UDPClient; import org.jetlinks.simulator.core.network.udp.UDPOptions; import picocli.CommandLine; import java.time.Duration; @CommandLine.Command(name = "create", showDefaultValues = true, description = "Create UDP Client", headerHeading = "%n", sortOptions = false) public class CreateUDPCommand extends AbstractCommand implements Runnable { @CommandLine.Mixin private Options options; @Override public void run() { printf("create udp client %s", options.getId()); try { UDPClient client = UDPClient.create(options).block(Duration.ofSeconds(10)); if (client != null) { main().connectionManager().addConnection(client); printf(" success!%n"); main() .getCommandLine() .execute("udp", "attach", client.getId()); } else { printf(" error:%n"); } } catch (Throwable err) { printfError(" error: %s %n", ExceptionUtils.getErrorMessage(err)); } } static class Options extends UDPOptions { @Override @CommandLine.Option(names = {"--id"}, description = "Client ID", defaultValue = "udp-client") public void setId(String id) { super.setId(id); } @Override @CommandLine.Option(names = {"-h", "--host"}, description = "Remote host") public void setHost(String host) { super.setHost(host); } @Override @CommandLine.Option(names = {"-p", "--port"}, description = "Remote port") public void setPort(int port) { super.setPort(port); } @Override @CommandLine.Option(names = {"--interface"}, paramLabel = "interface", description = "Network Interface", order = 7, completionCandidates = NetworkInterfaceCompleter.class) public void setLocalAddress(String localAddress) { super.setLocalAddress(localAddress); } } }
[ "zh.sqy@qq.com" ]
zh.sqy@qq.com
268056287e09f94be2f4eae48deffc16c2cd074d
951be8021f4c7b96fd0d4088a93351a0d7477258
/src/main/java/com/github/steveice10/mc/protocol/data/game/setting/Difficulty.java
618d03c42e9cbcc60d99efd0ace55059f6f017a2
[ "MIT" ]
permissive
Paulomart/MCProtocolLib
5115e629031e664688eb35279e0ab363a83b9676
f03b176e1848cf40415ea66ce82fb165baffa5fa
refs/heads/master
2021-07-09T20:32:16.418123
2020-07-31T19:43:12
2020-07-31T19:43:12
183,654,843
1
3
MIT
2019-12-18T07:32:45
2019-04-26T15:42:44
Java
UTF-8
Java
false
false
135
java
package com.github.steveice10.mc.protocol.data.game.setting; public enum Difficulty { PEACEFUL, EASY, NORMAL, HARD; }
[ "Steveice10@gmail.com" ]
Steveice10@gmail.com
272bd6d33f654bb5bf1e3d043257f7b015fa4529
62e3f2e7c08c6e005c63f51bbfa61a637b45ac20
/B-Genius_AdFree/app/src/main/java/com/badlogic/gdx/Net$HttpResponse.java
8a20c51fde8fdb5b8836fc2a2ec1c5b685ad08a2
[]
no_license
prasad-ankit/B-Genius
669df9d9f3746e34c3e12261e1a55cf5c59dd1c6
1139ec152b743e30ec0af54fe1f746b57b0152bf
refs/heads/master
2021-01-22T21:00:04.735938
2016-05-20T19:03:46
2016-05-20T19:03:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
662
java
package com.badlogic.gdx; import com.badlogic.gdx.net.HttpStatus; import java.io.InputStream; import java.util.Map; public abstract interface Net$HttpResponse { public abstract String getHeader(String paramString); public abstract Map getHeaders(); public abstract byte[] getResult(); public abstract InputStream getResultAsStream(); public abstract String getResultAsString(); public abstract HttpStatus getStatus(); } /* Location: C:\Users\KSHITIZ GUPTA\Downloads\apktool-install-windws\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: com.badlogic.gdx.Net.HttpResponse * JD-Core Version: 0.6.0 */
[ "kshitiz1208@gmail.com" ]
kshitiz1208@gmail.com
8d6ba96977b9e9c6c3213f2f0b62fb7afcac66f1
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
/subject SPLs and test cases/Wiper(4)/Wiper_P2/evosuite-tests/Sensor_ESTest.java
6a6d8cdab67c3c823449bacfadac8439175ffd50
[]
no_license
psjung/SRTST_experiments
6f1ff67121ef43c00c01c9f48ce34f31724676b6
40961cb4b4a1e968d1e0857262df36832efb4910
refs/heads/master
2021-06-20T04:45:54.440905
2019-09-06T04:05:38
2019-09-06T04:05:38
206,693,757
1
0
null
2020-10-13T15:50:41
2019-09-06T02:10:06
Java
UTF-8
Java
false
false
2,041
java
/* * This file was automatically generated by EvoSuite * Wed Mar 13 10:06:40 KST 2019 */ import static org.junit.Assert.assertEquals; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVNET = true, separateClassLoader = true, useJEE = true) public class Sensor_ESTest extends Sensor_ESTest_scaffolding { @BeforeClass public static void initEvoSuiteFramework() { String a = "aa"; } @AfterClass public static void exitEvoSuiteFramework() { String a = "aa"; } @Test(timeout = 4000) public void test0() throws Throwable { Sensor sensor0 = new Sensor(); sensor0.transition(3); assertEquals(0, sensor0.getState()); } @Test(timeout = 4000) public void test1() throws Throwable { Sensor sensor0 = new Sensor(); sensor0.setNonRain(); assertEquals(0, sensor0.getState()); } @Test(timeout = 4000) public void test2() throws Throwable { Sensor sensor0 = new Sensor(); sensor0.transition((-1)); assertEquals(0, sensor0.getState()); } @Test(timeout = 4000) public void test4() throws Throwable { Sensor sensor0 = new Sensor(); assertEquals(0, sensor0.getState()); sensor0.transition(1); assertEquals(1, sensor0.getState()); } @Test(timeout = 4000) public void test5() throws Throwable { Sensor sensor0 = new Sensor(); sensor0.transition(0); assertEquals(0, sensor0.getState()); } @Test(timeout = 4000) public void test6() throws Throwable { Sensor sensor0 = new Sensor(); assertEquals(0, sensor0.getState()); sensor0.setLittleRain(); assertEquals(1, sensor0.getState()); } @Test(timeout = 4000) public void test8() throws Throwable { Sensor sensor0 = new Sensor(); int int0 = sensor0.getState(); assertEquals(0, int0); } }
[ "psjung@kaist.ac.kr" ]
psjung@kaist.ac.kr
fb9a1b2fe194271c7ddd8b7a2da681185551b663
27b052c54bcf922e1a85cad89c4a43adfca831ba
/src/android/support/v7/widget/RecyclerView$ViewCacheExtension.java
00e54ccab82f2607f17695630e3b336695157be5
[]
no_license
dreadiscool/YikYak-Decompiled
7169fd91f589f917b994487045916c56a261a3e8
ebd9e9dd8dba0e657613c2c3b7036f7ecc3fc95d
refs/heads/master
2020-04-01T10:30:36.903680
2015-04-14T15:40:09
2015-04-14T15:40:09
33,902,809
3
0
null
null
null
null
UTF-8
Java
false
false
450
java
package android.support.v7.widget; import android.view.View; public abstract class RecyclerView$ViewCacheExtension { public abstract View getViewForPositionAndType(RecyclerView.Recycler paramRecycler, int paramInt1, int paramInt2); } /* Location: C:\Users\dreadiscool\Desktop\tools\classes-dex2jar.jar * Qualified Name: android.support.v7.widget.RecyclerView.ViewCacheExtension * JD-Core Version: 0.7.0.1 */
[ "paras@protrafsolutions.com" ]
paras@protrafsolutions.com
1bb887a1d17452c083968d68d1f4ff5ce4bc637d
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module617/src/main/java/module617packageJava0/Foo2.java
9f1562e7127f7270d39c59bda56633213404e7f1
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
330
java
package module617packageJava0; import java.lang.Integer; public class Foo2 { Integer int0; public void foo0() { new module617packageJava0.Foo1().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
8a69d1e67d0321cc8ffdd299684a17b6aff260cd
8f78ab591f8c0ae0c19a88b2460bb8b3460993e8
/src/main/java/com/eshare/command/example5/Client.java
eb3fff66acd988baf0c1ddd27c432b8d0fd51b38
[]
no_license
EvanLeung08/designPattern
ccab257aceddd32ff9d0c68f1309c59ba1de1931
d72c3b2279b62c5cdfe834f79b2cc9e1645243b0
refs/heads/master
2021-09-02T06:31:44.382749
2017-12-31T02:41:33
2017-12-31T02:41:33
null
0
0
null
null
null
null
GB18030
Java
false
false
536
java
package com.eshare.command.example5; public class Client { public static void main(String[] args) { //只是负责向服务员点菜就好了 //创建服务员 Waiter waiter = new Waiter(); //创建命令对象,就是要点的菜 Command chop = new ChopCommand(); Command duck = new DuckCommand(); Command pork = new PorkCommand(); //点菜,就是把这些菜让服务员记录下来 waiter.orderDish(chop); waiter.orderDish(duck); waiter.orderDish(pork); //点菜完毕 waiter.orderOver(); } }
[ "10856214@163.com" ]
10856214@163.com
67012eb1381db806f30803dc4a4e09a13c47fcbf
7ea0410d8c21f7c761fbf3ba63a9ca0e92a179af
/src/test/java/io/github/jhipster/application/repository/CustomAuditEventRepositoryIT.java
dc59931d69847ee845c26018dd7e7b859f859205
[]
no_license
luiighi2693/jhipster-demo01-sqlserver
08cbb8f6cce4102d9fc6ebaf8e58e4b435a0a8d1
f7bc20b7580602e6dbf87f976f92a1a0da88fe18
refs/heads/master
2022-12-24T07:17:00.008674
2019-08-21T17:18:51
2019-08-21T17:18:51
203,631,302
0
0
null
2022-12-16T05:03:07
2019-08-21T17:18:38
Java
UTF-8
Java
false
false
7,755
java
package io.github.jhipster.application.repository; import io.github.jhipster.application.JhipsterDemo01SqlServerApp; import io.github.jhipster.application.config.Constants; import io.github.jhipster.application.config.audit.AuditEventConverter; import io.github.jhipster.application.domain.PersistentAuditEvent; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpSession; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.HashMap; import java.util.List; import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; import static io.github.jhipster.application.repository.CustomAuditEventRepository.EVENT_DATA_COLUMN_MAX_LENGTH; /** * Integration tests for {@link CustomAuditEventRepository}. */ @SpringBootTest(classes = JhipsterDemo01SqlServerApp.class) @Transactional public class CustomAuditEventRepositoryIT { @Autowired private PersistenceAuditEventRepository persistenceAuditEventRepository; @Autowired private AuditEventConverter auditEventConverter; private CustomAuditEventRepository customAuditEventRepository; private PersistentAuditEvent testUserEvent; private PersistentAuditEvent testOtherUserEvent; private PersistentAuditEvent testOldUserEvent; @BeforeEach public void setup() { customAuditEventRepository = new CustomAuditEventRepository(persistenceAuditEventRepository, auditEventConverter); persistenceAuditEventRepository.deleteAll(); Instant oneHourAgo = Instant.now().minusSeconds(3600); testUserEvent = new PersistentAuditEvent(); testUserEvent.setPrincipal("test-user"); testUserEvent.setAuditEventType("test-type"); testUserEvent.setAuditEventDate(oneHourAgo); Map<String, String> data = new HashMap<>(); data.put("test-key", "test-value"); testUserEvent.setData(data); testOldUserEvent = new PersistentAuditEvent(); testOldUserEvent.setPrincipal("test-user"); testOldUserEvent.setAuditEventType("test-type"); testOldUserEvent.setAuditEventDate(oneHourAgo.minusSeconds(10000)); testOtherUserEvent = new PersistentAuditEvent(); testOtherUserEvent.setPrincipal("other-test-user"); testOtherUserEvent.setAuditEventType("test-type"); testOtherUserEvent.setAuditEventDate(oneHourAgo); } @Test public void addAuditEvent() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("test-value"); assertThat(persistentAuditEvent.getAuditEventDate().truncatedTo(ChronoUnit.MILLIS)) .isEqualTo(event.getTimestamp().truncatedTo(ChronoUnit.MILLIS)); } @Test public void addAuditEventTruncateLargeData() { Map<String, Object> data = new HashMap<>(); StringBuilder largeData = new StringBuilder(); for (int i = 0; i < EVENT_DATA_COLUMN_MAX_LENGTH + 10; i++) { largeData.append("a"); } data.put("test-key", largeData); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); String actualData = persistentAuditEvent.getData().get("test-key"); assertThat(actualData.length()).isEqualTo(EVENT_DATA_COLUMN_MAX_LENGTH); assertThat(actualData).isSubstringOf(largeData); assertThat(persistentAuditEvent.getAuditEventDate().truncatedTo(ChronoUnit.MILLIS)) .isEqualTo(event.getTimestamp().truncatedTo(ChronoUnit.MILLIS)); } @Test public void testAddEventWithWebAuthenticationDetails() { HttpSession session = new MockHttpSession(null, "test-session-id"); MockHttpServletRequest request = new MockHttpServletRequest(); request.setSession(session); request.setRemoteAddr("1.2.3.4"); WebAuthenticationDetails details = new WebAuthenticationDetails(request); Map<String, Object> data = new HashMap<>(); data.put("test-key", details); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("remoteAddress")).isEqualTo("1.2.3.4"); assertThat(persistentAuditEvent.getData().get("sessionId")).isEqualTo("test-session-id"); } @Test public void testAddEventWithNullData() { Map<String, Object> data = new HashMap<>(); data.put("test-key", null); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("null"); } @Test public void addAuditEventWithAnonymousUser() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent(Constants.ANONYMOUS_USER, "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } @Test public void addAuditEventWithAuthorizationFailureType() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "AUTHORIZATION_FAILURE", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
58fbe6a88202742dba350a9f15a8c3ea38a673b2
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_18_0/Statistics/CellLevelRadioBearerQosDailyGet.java
08c600d759fec16e42f1238f29cbbb964417a188
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
4,746
java
package Netspan.NBI_18_0.Statistics; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="NodeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;element name="NodeId" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;element name="DateStart" type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt; * &lt;element name="DateEnd" type="{http://www.w3.org/2001/XMLSchema}dateTime"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "nodeName", "nodeId", "dateStart", "dateEnd" }) @XmlRootElement(name = "CellLevelRadioBearerQosDailyGet") public class CellLevelRadioBearerQosDailyGet { @XmlElement(name = "NodeName") protected List<String> nodeName; @XmlElement(name = "NodeId") protected List<String> nodeId; @XmlElement(name = "DateStart", required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar dateStart; @XmlElement(name = "DateEnd", required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar dateEnd; /** * Gets the value of the nodeName property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nodeName property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNodeName().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNodeName() { if (nodeName == null) { nodeName = new ArrayList<String>(); } return this.nodeName; } /** * Gets the value of the nodeId property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nodeId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNodeId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNodeId() { if (nodeId == null) { nodeId = new ArrayList<String>(); } return this.nodeId; } /** * Gets the value of the dateStart property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDateStart() { return dateStart; } /** * Sets the value of the dateStart property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateStart(XMLGregorianCalendar value) { this.dateStart = value; } /** * Gets the value of the dateEnd property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDateEnd() { return dateEnd; } /** * Sets the value of the dateEnd property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateEnd(XMLGregorianCalendar value) { this.dateEnd = value; } }
[ "ggrunwald@airspan.com" ]
ggrunwald@airspan.com
ac6177b97279243122fc3559189c3e075c10e42a
a8d1d39c311d0dbf2547b8266ea786428f1db2cb
/TermGenie/TermGenieUserManagement/TermGenieUserManagement-API/src/main/java/org/bbop/termgenie/user/simple/SimpleUserDataModule.java
49a66f4e04368cdfbcb89fa3601e9b2070ad5030
[]
no_license
nathandunn/termgenie
a664bedadbd8859a9abca8a638b29dd8c16a7c05
3d15815bc7f24127c2a811c02df0eea469f77b02
refs/heads/master
2020-07-03T11:53:31.463658
2016-12-06T15:38:26
2016-12-06T15:38:26
74,174,945
0
0
null
2016-11-18T23:37:02
2016-11-18T23:37:02
null
UTF-8
Java
false
false
517
java
package org.bbop.termgenie.user.simple; import java.util.Properties; import org.bbop.termgenie.core.ioc.IOCModule; import org.bbop.termgenie.user.UserDataProvider; /** * Module containing a simple implementation for a {@link UserDataProvider}. */ public class SimpleUserDataModule extends IOCModule { public SimpleUserDataModule(Properties applicationProperties) { super(applicationProperties); } @Override protected void configure() { bind(UserDataProvider.class, SimpleUserDataProvider.class); } }
[ "hdietze@lbl.gov" ]
hdietze@lbl.gov
1a99cd3c282f5fef5dd93dc0b03a65d2fcb6925d
659f2dfa9e5efcb6619aa5bdc087ed127f8c93e4
/sources/libraries/persistence/interfaces/src/main/java/com/minsait/onesait/platform/persistence/exceptions/NotSupportedStatementException.java
d6befd165d43ba11b690194e471c76c7dc68b08a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
onesaitplatform/onesaitplatform-revolution-the-minspait-crowd
cdb806cbcf5d38d9301a955a88b1e6f540f1be05
09937b4df0317013c2dfd0416cfe1c45090486f8
refs/heads/master
2021-06-17T10:53:26.819575
2019-10-09T14:58:20
2019-10-09T14:58:20
210,382,466
2
1
NOASSERTION
2021-06-04T02:20:29
2019-09-23T14:55:26
Java
UTF-8
Java
false
false
1,096
java
/** * Copyright Indra Soluciones Tecnologías de la Información, S.L.U. * 2013-2019 SPAIN * * 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.minsait.onesait.platform.persistence.exceptions; public class NotSupportedStatementException extends RuntimeException{ private static final long serialVersionUID = 1L; public NotSupportedStatementException(Exception e){ super(e); } public NotSupportedStatementException(String msg){ super(msg); } public NotSupportedStatementException(String msg, Throwable e){ super(msg, e); } }
[ "danzig6661@gmail.com" ]
danzig6661@gmail.com
02c18b69e04cf87b352b97d73926594860f4ae97
b24fc130639ecb4faded723592676127ba83adca
/platform/order/persist/src/main/java/com/prcsteel/platform/order/persist/dao/InvoiceOutReceiptDao.java
05f47f6df5fa94041605a7f69655a4be2f2fc27e
[]
no_license
859162000/cbms
097f1d844520d66e2461280b0bc20b89409f74f3
f5d4a0f18a33643902f1d390bae0d5be386c6dc9
refs/heads/master
2021-06-01T19:26:05.589104
2016-09-30T09:35:34
2016-09-30T09:35:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
461
java
package com.prcsteel.platform.order.persist.dao; import com.prcsteel.platform.order.model.model.InvoiceOutReceipt; import org.apache.ibatis.annotations.Param; /** * Created by Rolyer on 2015/9/28. */ public interface InvoiceOutReceiptDao { public int insert(InvoiceOutReceipt invoiceOutReceipt); public InvoiceOutReceipt query(@Param("itemDetailId") Long itemDetailId, @Param("checklistId") Long checklistId); }
[ "gelilnzhong@prcsteel.com" ]
gelilnzhong@prcsteel.com
dd6cc28aed6a69d1d8dbcadd28976c2a8950c04e
289e03ee2dca7ebd8babb3b62496b25c6409e828
/src/main/java/thaumcraftextras/items/TCEItemShard.java
773e7cd9dd13660d0202bf06ed52e7600e69e18f
[]
no_license
zetti68/ThaumcraftExtras2
7083e84b43a70c04c6cc973f8ae2becf7c560580
90f6c95138cc36cbbe308245c4a144eb45108377
refs/heads/master
2021-01-20T06:42:52.262654
2014-12-30T19:15:10
2014-12-30T19:15:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,180
java
package thaumcraftextras.items; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import thaumcraftextras.main.ThaumcraftExtras; import thaumcraftextras.main.init.TCETabs; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TCEItemShard extends Item{ public TCEItemShard(String itemName, int colorCode) { setUnlocalizedName(ThaumcraftExtras.modName.toLowerCase() + "." + "shard" + "." + itemName.toLowerCase()); setCreativeTab(TCETabs.tabMain); name = itemName; color = colorCode; init(); } String name; int color; public void init() { OreDictionary.registerOre("shard" + name, this); GameRegistry.registerItem(this, this.getUnlocalizedName()); } @Override public void registerIcons(IIconRegister ir) { itemIcon = ir.registerIcon(ThaumcraftExtras.modName.toLowerCase() + ":" + "shard_empty"); } @Override @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack stack, int pass) { return color; } }
[ "wasliebob@live.nl" ]
wasliebob@live.nl
519336f41e679e3382223af0839449fc372243a4
3081b5ae68036834293de7d341d96b9b088900a0
/src/main/java/com/craftsteamg/arguments/ArgumentParseException.java
76987e0ca51ec0eeb6f63117fbe3a9d468db9e08
[]
no_license
CraftSteamDev/jorjibot
a73357c12676ec7144af02c82d426cb01dfa4528
b23aa814d60eb52a8cf2803a5899fa2b488cbfdd
refs/heads/master
2022-01-09T18:27:22.762583
2019-06-21T22:40:50
2019-06-21T22:40:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
178
java
package com.craftsteamg.arguments; public class ArgumentParseException extends Throwable { public ArgumentParseException(String message) { super(message); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
45628e714e08575cb6045284f300621a99944cdd
c5c30ad08c63ec0b955b338f70518e7662357e6f
/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java
29eb10553727b40efa59421d6bde3dd70774937d
[]
no_license
shawnxjf1/jdk-src-read
635fef8469759b3fe7d8fd3259c2f761f061e690
2bcb3b80577b5ff0404acdcf1e7a39d059dd781f
refs/heads/master
2016-09-22T13:50:07.107771
2016-08-15T11:49:57
2016-08-15T11:49:57
65,729,824
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
package org.omg.CosNaming.NamingContextPackage; /** * org/omg/CosNaming/NamingContextPackage/AlreadyBound.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from d:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u20/1074/corba/src/share/classes/org/omg/CosNaming/nameservice.idl * Wednesday, July 30, 2014 1:52:57 PM PDT */ public final class AlreadyBound extends org.omg.CORBA.UserException { public AlreadyBound () { super(AlreadyBoundHelper.id()); } // ctor public AlreadyBound (String $reason) { super(AlreadyBoundHelper.id() + " " + $reason); } // ctor } // class AlreadyBound
[ "shawn_angel@qq.com" ]
shawn_angel@qq.com
81c41b2260ec0ab8a8f9bd9035197193d5467ff1
bcd546155fb4a21f61fb75da09e1602a7f8ae687
/app/src/main/java/com/Ajagoc/awt/Applet.java
cfe3f98406c742139af89c60ed593413c9ad9bb1
[]
no_license
sakachin2/Ajagot1w
c4f42d949cd1744aa2fe15636c34e443eb99966d
33817fbcb2f3efb8cb0640bed75ce6741c71fdd6
refs/heads/master
2021-06-20T04:13:34.762091
2017-08-15T07:32:41
2017-08-15T07:32:41
100,338,373
0
0
null
null
null
null
UTF-8
Java
false
false
1,024
java
package com.Ajagoc.awt; //~1108R~//~1109R~ import jagoclient.gui.CardPanel; public class Applet extends Panel //~1124R~//~1125R~//~1325R~ { //~1111I~ public Applet() //~1111I~//~1124R~//~1125R~ { //~1111I~ } //~1111I~ public void add(String Ppos,CardPanel Pcp) //~1325I~ { //~1325I~ } //~1325I~ public void start() //~1401I~ { //~1401I~ } //~1401I~ }
[ "sakachin2@yahoo.co.jp" ]
sakachin2@yahoo.co.jp
57ba4ca8b24ce8784a5cd3fb74eb484cb9e818ec
6be39fc2c882d0b9269f1530e0650fd3717df493
/weixin反编译/sources/com/tencent/mm/compatible/loader/d.java
db3447e34c18a5f10b2736f503033414f38ebf34
[]
no_license
sir-deng/res
f1819af90b366e8326bf23d1b2f1074dfe33848f
3cf9b044e1f4744350e5e89648d27247c9dc9877
refs/heads/master
2022-06-11T21:54:36.725180
2020-05-07T06:03:23
2020-05-07T06:03:23
155,177,067
5
0
null
null
null
null
UTF-8
Java
false
false
2,890
java
package com.tencent.mm.compatible.loader; import android.content.Context; import com.tencent.mm.a.g; import com.tencent.mm.loader.stub.b; import com.tencent.mm.sdk.platformtools.bi; import com.tencent.mm.sdk.platformtools.k; import com.tencent.mm.sdk.platformtools.r; import com.tencent.mm.sdk.platformtools.x; import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public final class d { private static Map<String, String> gIH; public static String t(Context context, String str) { long Wy = bi.Wy(); if (gIH == null) { try { Map Vz = r.Vz(bi.convertStreamToString(context.getAssets().open("preload/libraries.ini"))); x.v("MicroMsg.PluginClassLoader", "libraries.ini content\n%s", r0); if (Vz == null || Vz.size() <= 0) { x.e("MicroMsg.PluginClassLoader", "parse libraries.ini failed"); } else { gIH = new HashMap(Vz.size()); for (Entry entry : Vz.entrySet()) { x.d("MicroMsg.PluginClassLoader", "preload file, plugin=%s, md5=%s", entry.getKey(), entry.getValue()); gIH.put(entry.getKey(), entry.getValue()); } } } catch (Throwable e) { x.e("MicroMsg.PluginClassLoader", "load preload libraries failed"); x.printErrStackTrace("MicroMsg.PluginClassLoader", e, "", new Object[0]); } } String absolutePath = context.getDir("lib", 0).getAbsolutePath(); if (gIH == null) { x.e("MicroMsg.PluginClassLoader", "extractVoipDex preload so files loaded failed"); return null; } String str2 = absolutePath + "/" + str; absolutePath = (String) gIH.get(str); if (absolutePath == null) { x.w("MicroMsg.PluginClassLoader", "extractVoipDex not in preloadfiles"); return null; } File file = new File(str2); if (file.exists()) { String i = g.i(file); if (i == null || !i.equalsIgnoreCase(absolutePath)) { x.e("MicroMsg.PluginClassLoader", "extractVoipDex target file exists, but md5 check failed, target=%s assets=%s", i, absolutePath); } else { x.d("MicroMsg.PluginClassLoader", "extractVoipDex: targetFilePath:[%s] time:%d", file, Long.valueOf(bi.bA(Wy))); return str2; } } b.deleteFile(str2); if (k.A(context, "preload/" + str, str2)) { x.i("MicroMsg.PluginClassLoader", "extractVoipDex time:%d so:%s md5:%s ", Long.valueOf(bi.bA(Wy)), str, absolutePath); return str2; } x.f("MicroMsg.PluginClassLoader", "extractVoipDex copyAssets failed"); return null; } }
[ "denghailong@vargo.com.cn" ]
denghailong@vargo.com.cn
2b88a49d9a61f8d7fc13724f5cb49ea1ac12dcb3
92f7ba1ebc2f47ecb58581a2ed653590789a2136
/src/com/infodms/dms/po/TtAsRangeModDetailPO.java
8f1b16b28383c38abe634d8df27ff370cf846984
[]
no_license
dnd2/CQZTDMS
504acc1883bfe45842c4dae03ec2ba90f0f991ee
5319c062cf1932f8181fdd06cf7e606935514bf1
refs/heads/master
2021-01-23T15:30:45.704047
2017-09-07T07:47:51
2017-09-07T07:47:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,030
java
/* * Copyright (c) 2005 Infoservice, Inc. All Rights Reserved. * This software is published under the terms of the Infoservice Software * License version 1.0, a copy of which has been included with this * distribution in the LICENSE.txt file. * * CreateDate : 2014-06-04 17:23:32 * CreateBy : KFQ * Comment : generate by com.sgm.po.POGen */ package com.infodms.dms.po; import java.util.Date; import com.infoservice.po3.bean.PO; @SuppressWarnings("serial") public class TtAsRangeModDetailPO extends PO{ private Integer modType; private Long modBy; private String modBefor; private String modAfter; private Date modDate; private Long id; private Long dataId; private Double labourBefore; private Double labourAfter; private String labourCode; public Double getLabourBefore() { return labourBefore; } public void setLabourBefore(Double labourBefore) { this.labourBefore = labourBefore; } public Double getLabourAfter() { return labourAfter; } public void setLabourAfter(Double labourAfter) { this.labourAfter = labourAfter; } public String getLabourCode() { return labourCode; } public void setLabourCode(String labourCode) { this.labourCode = labourCode; } public Long getDataId() { return dataId; } public void setDataId(Long dataId) { this.dataId = dataId; } public void setModType(Integer modType){ this.modType=modType; } public Integer getModType(){ return this.modType; } public void setModBy(Long modBy){ this.modBy=modBy; } public Long getModBy(){ return this.modBy; } public void setModBefor(String modBefor){ this.modBefor=modBefor; } public String getModBefor(){ return this.modBefor; } public void setModAfter(String modAfter){ this.modAfter=modAfter; } public String getModAfter(){ return this.modAfter; } public void setModDate(Date modDate){ this.modDate=modDate; } public Date getModDate(){ return this.modDate; } public void setId(Long id){ this.id=id; } public Long getId(){ return this.id; } }
[ "wanghanxiancn@gmail.com" ]
wanghanxiancn@gmail.com
31c25988f2eea3ccd8cc343d5af1d9d38b0a169d
9cd474ff195074d2fa31cc6062e86ebd98e83329
/com.spark.psi.base.browser/src/com/spark/psi/base/browser/store/NotFoundStoreAlterWindowRender.java
b343cacecc2ae5ce53a7c4de7426ca6346b5d1ee
[]
no_license
jideas/spark-whxc-psi
543c24abe53b3243876f4a90198fd2a18276562a
cb3160395c61421685a110628da1d82a761d483f
refs/heads/master
2021-01-10T09:07:46.430871
2013-05-11T13:46:55
2013-05-11T13:46:55
47,181,021
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package com.spark.psi.base.browser.store; import com.spark.common.components.pages.AbstractBoxPageRender; public class NotFoundStoreAlterWindowRender extends AbstractBoxPageRender{ @Override protected void afterFooterRender(){ } @Override protected void beforeFooterRender(){ } }
[ "weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454" ]
weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454
411f557496f55842791db2afcb19b87796b4458d
7f0f6454b21b7a392a3385220c4265082435cfd6
/src/main/java/ls/spark/WordCount.java
a5e2767aa7ad69316c2fb439a17139c1c457db26
[]
no_license
lishuai2016/ls-spark
c219a77eb3d3702b1f0175524c139de005e6477b
fe5dc55e71c6be64f487ccfb7b2f884ac5cdb7d3
refs/heads/master
2023-03-30T01:32:33.601629
2021-09-05T09:25:14
2021-09-05T09:25:14
121,026,802
2
0
null
2023-03-22T21:27:46
2018-02-10T15:22:42
Java
UTF-8
Java
false
false
7,459
java
package ls.spark; import java.util.Arrays; import java.util.Iterator; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.api.java.function.FlatMapFunction; import org.apache.spark.api.java.function.Function2; import org.apache.spark.api.java.function.PairFunction; import org.apache.spark.api.java.function.VoidFunction; import scala.Tuple2; /** * 集群模式和本地local的区别: 如果要在spark集群上运行,需要修改的,只有两个地方 第一,将SparkConf的setMaster()方法给删掉,默认它自己会去连接 第二,我们针对的不是本地文件了,修改为hadoop hdfs上的真正的存储大数据的文件 实际执行步骤: 1、将spark.txt文件上传到hdfs上去 2、使用我们最早在pom.xml里配置的maven插件,对spark工程进行打包 3、将打包后的spark工程jar包,上传到机器上执行 4、编写spark-submit脚本 5、执行spark-submit脚本,提交spark应用到集群执行 */ public class WordCount extends HadoopBase { public static void main(String[] args) { // 第一步:创建SparkConf对象,设置Spark应用的配置信息 // 使用setMaster()可以设置Spark应用程序要连接的Spark集群的master节点的url // 但是如果设置为local则代表,在本地运行 SparkConf conf = new SparkConf().setAppName("WordCount").setMaster("local"); // 第二步:创建JavaSparkContext对象 // 在Spark中,SparkContext是Spark所有功能的一个入口,你无论是用java、scala,甚至是python编写 // 都必须要有一个SparkContext,它的主要作用,包括初始化Spark应用程序所需的一些核心组件,包括 // 调度器(DAGSchedule、TaskScheduler),还会去到Spark Master节点上进行注册,等等 // 一句话,SparkContext,是Spark应用中,可以说是最最重要的一个对象 // 但是呢,在Spark中,编写不同类型的Spark应用程序,使用的SparkContext是不同的,如果使用scala, // 使用的就是原生的SparkContext对象 // 但是如果使用Java,那么就是JavaSparkContext对象 // 如果是开发Spark SQL程序,那么就是SQLContext、HiveContext // 如果是开发Spark Streaming程序,那么就是它独有的SparkContext // 以此类推 JavaSparkContext sc = new JavaSparkContext(conf); // 第三步:要针对输入源(hdfs文件、本地文件,等等),创建一个初始的RDD // 输入源中的数据会打散,分配到RDD的每个partition中,从而形成一个初始的分布式的数据集 // 我们这里呢,因为是本地测试,所以呢,就是针对本地文件 // SparkContext中,用于根据文件类型的输入源创建RDD的方法,叫做textFile()方法 // 在Java中,创建的普通RDD,都叫做JavaRDD // 在这里呢,RDD中,有元素这种概念,如果是hdfs或者本地文件呢,创建的RDD,每一个元素就相当于 // 是文件里的一行 JavaRDD<String> lines = sc.textFile("spark.txt"); // 第四步:对初始RDD进行transformation操作,也就是一些计算操作 // 通常操作会通过创建function,并配合RDD的map、flatMap等算子来执行 // function,通常,如果比较简单,则创建指定Function的匿名内部类 // 但是如果function比较复杂,则会单独创建一个类,作为实现这个function接口的类 // 先将每一行拆分成单个的单词 // FlatMapFunction,有两个泛型参数,分别代表了输入和输出类型 // 我们这里呢,输入肯定是String,因为是一行一行的文本,输出,其实也是String,因为是每一行的文本 // 这里先简要介绍flatMap算子的作用,其实就是,将RDD的一个元素,给拆分成一个或多个元素 JavaRDD<String> words = lines.flatMap(new FlatMapFunction<String, String>(){ private static final long serialVersionUID = 1L; @Override public Iterator<String> call(String line) throws Exception { String[] words = line.split(" "); return Arrays.asList(words).iterator(); } }); // 接着,需要将每一个单词,映射为(单词, 1)的这种格式 // 因为只有这样,后面才能根据单词作为key,来进行每个单词的出现次数的累加 // mapToPair,其实就是将每个元素,映射为一个(v1,v2)这样的Tuple2类型的元素 // 如果大家还记得scala里面讲的tuple,那么没错,这里的tuple2就是scala类型,包含了两个值 // mapToPair这个算子,要求的是与PairFunction配合使用,第一个泛型参数代表了输入类型 // 第二个和第三个泛型参数,代表的输出的Tuple2的第一个值和第二个值的类型 // JavaPairRDD的两个泛型参数,分别代表了tuple元素的第一个值和第二个值的类型 JavaPairRDD<String, Integer> pairs = words.mapToPair(new PairFunction<String, String, Integer>() { private static final long serialVersionUID = 1L; @Override public Tuple2<String, Integer> call(String word) throws Exception { return new Tuple2<String, Integer>(word, 1); } }); // 接着,需要以单词作为key,统计每个单词出现的次数 // 这里要使用reduceByKey这个算子,对每个key对应的value,都进行reduce操作 // 比如JavaPairRDD中有几个元素,分别为(hello, 1) (hello, 1) (hello, 1) (world, 1) // reduce操作,相当于是把第一个值和第二个值进行计算,然后再将结果与第三个值进行计算 // 比如这里的hello,那么就相当于是,首先是1 + 1 = 2,然后再将2 + 1 = 3 // 最后返回的JavaPairRDD中的元素,也是tuple,但是第一个值就是每个key,第二个值就是key的value // reduce之后的结果,相当于就是每个单词出现的次数 JavaPairRDD<String, Integer> wcs = pairs.reduceByKey(new Function2<Integer, Integer, Integer>(){ private static final long serialVersionUID = 1L; @Override public Integer call(Integer v1, Integer v2) throws Exception { return v1 + v2; } }); //这里相当于把<key,value>变化为<value,key>,便于下面基于数字进行排序 JavaPairRDD<Integer, String> tempwcs = wcs.mapToPair(new PairFunction<Tuple2<String, Integer>, Integer, String>(){ private static final long serialVersionUID = 1L; @Override public Tuple2<Integer, String> call(Tuple2<String, Integer> tuple) throws Exception { return new Tuple2<Integer, String>(tuple._2(),tuple._1());//调换顺序 } }); JavaPairRDD<Integer, String> sortedwcs = tempwcs.sortByKey(false);//从大到小逆序排列 //下面再把顺序调整过来 JavaPairRDD<String, Integer> resultwcs = sortedwcs.mapToPair(new PairFunction<Tuple2<Integer, String>, String, Integer>(){ private static final long serialVersionUID = 1L; @Override public Tuple2<String, Integer> call(Tuple2<Integer, String> tuple) throws Exception { return new Tuple2<String, Integer>(tuple._2(),tuple._1()); } }); //遍历顺输出 resultwcs.foreach(new VoidFunction<Tuple2<String, Integer>>(){ private static final long serialVersionUID = 1L; @Override public void call(Tuple2<String, Integer> wc) throws Exception { System.out.println(wc._1() + " " + wc._2()); } }); sc.close(); } }
[ "1830473670@qq.com" ]
1830473670@qq.com
b1ac26b996e0ee2bdb66a207175d224e360ee751
9815d8e1fe79cfaea60ea45fb1f465e50a0f44d2
/cocoatouch/src/main/java/org/robovm/apple/audiounit/AudioComponent.java
af2a87f293d499e0e15163ab339120c0a640a8ac
[ "Apache-2.0" ]
permissive
ill-look-later/robovm
82cf9a16a14a6683e21efd904d657555ddadd567
0e2bb4e23432b38bf3cd611d40bbadbe98c84a5a
refs/heads/master
2021-01-21T15:49:03.756139
2015-05-29T14:27:56
2015-05-29T14:27:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,119
java
/* * Copyright (C) 2013-2015 RoboVM AB * * 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.robovm.apple.audiounit; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import org.robovm.objc.*; import org.robovm.objc.annotation.*; import org.robovm.objc.block.*; import org.robovm.rt.*; import org.robovm.rt.bro.*; import org.robovm.rt.bro.annotation.*; import org.robovm.rt.bro.ptr.*; import org.robovm.apple.foundation.*; import org.robovm.apple.audiotoolbox.*; import org.robovm.apple.corefoundation.*; import org.robovm.apple.coreaudio.*; import org.robovm.apple.uikit.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*/@Library("AudioToolbox")/*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/AudioComponent/*</name>*/ extends /*<extends>*/NativeObject/*</extends>*/ /*<implements>*//*</implements>*/ { public static class Notifications { /** * @since Available in iOS 7.0 and later. */ public static NSObject observeRegistrationsChanged(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(RegistrationsChangedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.run(); } }); } } /*<ptr>*/public static class AudioComponentPtr extends Ptr<AudioComponent, AudioComponentPtr> {}/*</ptr>*/ /*<bind>*/static { Bro.bind(AudioComponent.class); }/*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*/ protected AudioComponent() {} /*</constructors>*/ /*<properties>*//*</properties>*/ /*<members>*//*</members>*/ /** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public String getName() throws OSStatusException { CFString.CFStringPtr ptr = new CFString.CFStringPtr(); OSStatus status = getName0(ptr); if (OSStatusException.throwIfNecessary(status)) { return ptr.get().toString(); } return null; } /** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public AudioComponentDescription getDescription() throws OSStatusException { AudioComponentDescription.AudioComponentDescriptionPtr ptr = new AudioComponentDescription.AudioComponentDescriptionPtr(); OSStatus status = getDescription0(ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); } /** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public int getVersion() throws OSStatusException { IntPtr ptr = new IntPtr(); OSStatus status = getVersion0(ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); } /*<methods>*/ /** * @since Available in iOS 7.0 and later. */ @GlobalValue(symbol="kAudioComponentRegistrationsChangedNotification", optional=true) public static native NSString RegistrationsChangedNotification(); /** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="AudioComponentFindNext", optional=true) public static native AudioComponent findNext(AudioComponent inComponent, AudioComponentDescription inDesc); /** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="AudioComponentCount", optional=true) public static native int count(AudioComponentDescription inDesc); /** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="AudioComponentCopyName", optional=true) protected native OSStatus getName0(CFString.CFStringPtr outName); /** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="AudioComponentGetDescription", optional=true) protected native OSStatus getDescription0(AudioComponentDescription.AudioComponentDescriptionPtr desc); /** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="AudioComponentGetVersion", optional=true) protected native OSStatus getVersion0(IntPtr outVersion); /** * @since Available in iOS 7.0 and later. */ @Bridge(symbol="AudioComponentGetIcon", optional=true) public native UIImage getIcon(float desiredPointSize); /** * @since Available in iOS 7.0 and later. */ @Bridge(symbol="AudioComponentGetLastActiveTime", optional=true) public native double getLastActiveTime(); /*</methods>*/ }
[ "blueriverteam@gmail.com" ]
blueriverteam@gmail.com
a03a75a862976eacf27f88bc0dfdcfb704420588
7f53ff59587c1feea58fb71f7eff5608a5846798
/src/minecraft/net/minecraft/src/CompressedStreamTools.java
5f6427317ab64399cf180e00f9e9b5dac43469ae
[]
no_license
Orazur66/Minecraft-Client
45c918d488f2f9fca7d2df3b1a27733813d957a5
70a0b63a6a347fd87a7dbe28c7de588f87df97d3
refs/heads/master
2021-01-15T17:08:18.072298
2012-02-14T21:29:14
2012-02-14T21:29:14
3,423,624
3
0
null
null
null
null
UTF-8
Java
false
false
4,125
java
package net.minecraft.src; import java.io.*; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; public class CompressedStreamTools { public CompressedStreamTools() { } public static NBTTagCompound loadGzippedCompoundFromOutputStream(InputStream inputstream) throws IOException { DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new GZIPInputStream(inputstream))); try { NBTTagCompound nbttagcompound = read(datainputstream); return nbttagcompound; } finally { datainputstream.close(); } } public static void writeGzippedCompoundToOutputStream(NBTTagCompound nbttagcompound, OutputStream outputstream) throws IOException { DataOutputStream dataoutputstream = new DataOutputStream(new GZIPOutputStream(outputstream)); try { writeTo(nbttagcompound, dataoutputstream); } finally { dataoutputstream.close(); } } public static NBTTagCompound loadMapFromByteArray(byte abyte0[]) throws IOException { DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new GZIPInputStream(new ByteArrayInputStream(abyte0)))); try { NBTTagCompound nbttagcompound = read(datainputstream); return nbttagcompound; } finally { datainputstream.close(); } } public static byte[] writeMapToByteArray(NBTTagCompound nbttagcompound) throws IOException { ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(); DataOutputStream dataoutputstream = new DataOutputStream(new GZIPOutputStream(bytearrayoutputstream)); try { writeTo(nbttagcompound, dataoutputstream); } finally { dataoutputstream.close(); } return bytearrayoutputstream.toByteArray(); } public static void saveMapToFileWithBackup(NBTTagCompound nbttagcompound, File file) throws IOException { File file1 = new File((new StringBuilder()).append(file.getAbsolutePath()).append("_tmp").toString()); if (file1.exists()) { file1.delete(); } saveMapToFile(nbttagcompound, file1); if (file.exists()) { file.delete(); } if (file.exists()) { throw new IOException((new StringBuilder()).append("Failed to delete ").append(file).toString()); } else { file1.renameTo(file); return; } } public static void saveMapToFile(NBTTagCompound nbttagcompound, File file) throws IOException { DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(file)); try { writeTo(nbttagcompound, dataoutputstream); } finally { dataoutputstream.close(); } } public static NBTTagCompound writeMapToFileUncompressed(File file) throws IOException { if (!file.exists()) { return null; } DataInputStream datainputstream = new DataInputStream(new FileInputStream(file)); try { NBTTagCompound nbttagcompound = read(datainputstream); return nbttagcompound; } finally { datainputstream.close(); } } public static NBTTagCompound read(DataInput datainput) throws IOException { NBTBase nbtbase = NBTBase.readTag(datainput); if (nbtbase instanceof NBTTagCompound) { return (NBTTagCompound)nbtbase; } else { throw new IOException("Root tag must be a named compound tag"); } } public static void writeTo(NBTTagCompound nbttagcompound, DataOutput dataoutput) throws IOException { NBTBase.writeTag(nbttagcompound, dataoutput); } }
[ "Ninja_Buta@hotmail.fr" ]
Ninja_Buta@hotmail.fr
ba251e9fb3bb251d1956f040ca368de387162561
7e78adcea1601955621da5d15f2dcb6631a1d13e
/javademo/src/test/java/json/jackson/JsonAnnotationTest.java
3c7eb4922198a9e1614796c864b4e5717c614b4c
[]
no_license
zacscoding/java_example
fe0a8628fe274e6d150a606941d1e869650796b3
482c54f516edeb2d9dee436ce00ba33b3f1c038c
refs/heads/master
2021-05-14T12:34:34.541865
2019-11-28T15:38:41
2019-11-28T15:38:41
116,410,667
1
2
null
2020-03-04T22:14:20
2018-01-05T17:36:30
Java
UTF-8
Java
false
false
3,427
java
package json.jackson; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Test; /** * @author zacconding * @Date 2018-11-05 * @GitHub : https://github.com/zacscoding */ public class JsonAnnotationTest { @Test public void read() { String json = "{\"id\":1,\"name\":\"hivava\"}"; ObjectMapper objectMapper = new ObjectMapper(); try { JsonAnnotationTestEntity entity = objectMapper.readValue(json, JsonAnnotationTestEntity.class); assertTrue(entity.id == 1L); assertThat(entity.name, is("hivava")); } catch (Exception e) { e.printStackTrace(); } } @Test public void read2() throws Exception { ObjectMapper mapper = new ObjectMapper(); JsonAnnotationTestEntity2 temp1 = new JsonAnnotationTestEntity2(10, "hivava", 10.5); String json = mapper.writeValueAsString(temp1); assertThat(json, is("{\"customAge\":10,\"hiavaaName\":\"hivava\"}")); JsonAnnotationTestEntity2 read = mapper.readValue(json, JsonAnnotationTestEntity2.class); assertTrue(read.getScore() == 0D); String jsonValue = "{\"customAge\":10,\"hiavaaName\":\"hivava\", \"score\" : 2.2}"; read = mapper.readValue(jsonValue, JsonAnnotationTestEntity2.class); assertTrue(read.getScore() == 2.2D); } @JsonInclude(Include.NON_EMPTY) private static class JsonAnnotationTestEntity { private final long id; private String name; @JsonCreator public JsonAnnotationTestEntity(@JsonProperty("id") long id, @JsonProperty("name") String name) { this.id = id; this.name = name; } public long getId() { return id; } public String getName() { return name; } } private static class JsonAnnotationTestEntity2 { private int age; private String name; private double score; public JsonAnnotationTestEntity2() { } public JsonAnnotationTestEntity2(int age, String name, double score) { this.age = age; this.name = name; this.score = score; } @JsonProperty("customAge") public int getAge() { return age; } public void setAge(int age) { this.age = age; } @JsonGetter("hiavaaName") public String getName() { return name; } public void setName(String name) { this.name = name; } @JsonIgnore public double getScore() { return score; } @JsonProperty public void setScore(double score) { this.score = score; } @Override public String toString() { return "JacksonDemoTempClazz{" + "age=" + age + ", name='" + name + '\'' + ", score=" + score + '}'; } } }
[ "zaccoding725@gmail.com" ]
zaccoding725@gmail.com
90b560c1af4080709251d591341f9d6676b9dd50
5f1523f9c4f171535de44c123e25eb493e0dc22d
/aicai-dao/src/test/java/com/aicai/dao/example/service/BetPlanReadService.java
b1520ecf84f16c7f60cb611272455dc19d4767d7
[]
no_license
fxbyun/didi
76a6ec4a70074c82d11d5e8e774446476d266f66
17c10fe61949cf7c964b7ec8ac6a825dbfd3a346
refs/heads/master
2020-04-02T05:31:18.566902
2018-11-07T03:24:01
2018-11-07T03:24:01
154,084,668
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package com.aicai.dao.example.service; import com.aicai.dao.example.domain.BetGroupPlan; import com.aicai.dao.example.domain.query.QueryGroupPlanOption; import com.aicai.dao.example.domain.result.Result; /** * BetPlanReadService放置在两端都有的"aicai-betplan-common-1.1.0.jar" * @author zhoufeng * */ public interface BetPlanReadService { public Result<BetGroupPlan> queryGroupPlanById(long id, QueryGroupPlanOption queryOption); }
[ "1508622779@qq.com" ]
1508622779@qq.com
d4908beab9472b7a29339863209b2b213113aeb3
a39d06bbd03d845b79aa272a76b8e50a7ff0bcf2
/src/main/java/com/kirgiz/stocksndsalesmanagement/repository/PersistenceAuditEventRepository.java
aa5035291972ef156f43a48832887ecf904e2bb5
[]
no_license
kirgiz/newStockAndSalesManagement
17fb02b481822eed2dfe80e4c3a3721ce4e147c9
1cf8d160cfce2e59c564b56b69c76a730c0c650c
refs/heads/master
2023-05-15T08:57:48.111841
2019-06-23T15:09:52
2019-06-23T15:09:52
139,729,188
0
0
null
2023-04-26T03:11:34
2018-07-04T13:57:13
Java
UTF-8
Java
false
false
1,008
java
package com.kirgiz.stocksndsalesmanagement.repository; import com.kirgiz.stocksndsalesmanagement.domain.PersistentAuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import java.time.Instant; import java.util.List; /** * Spring Data JPA repository for the PersistentAuditEvent entity. */ public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> { List<PersistentAuditEvent> findByPrincipal(String principal); List<PersistentAuditEvent> findByAuditEventDateAfter(Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfter(String principal, Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principal, Instant after, String type); Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable); }
[ "vagrant@vagrant.vm" ]
vagrant@vagrant.vm
8c08f222735d1c1f7f096c67acbc6b68727e9656
91297ffb10fb4a601cf1d261e32886e7c746c201
/html.editor/src/org/netbeans/modules/html/editor/api/Utils.java
6516ced1cf1014d500eabad9418e7d5d41391db0
[]
no_license
JavaQualitasCorpus/netbeans-7.3
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
60018fd982f9b0c9fa81702c49980db5a47f241e
refs/heads/master
2023-08-12T09:29:23.549956
2019-03-16T17:06:32
2019-03-16T17:06:32
167,005,013
0
0
null
null
null
null
UTF-8
Java
false
false
4,871
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2010 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. * * Contributor(s): * * Portions Copyrighted 2008 Sun Microsystems, Inc. */ package org.netbeans.modules.html.editor.api; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.text.Document; import org.netbeans.api.html.lexer.HTMLTokenId; import org.netbeans.api.lexer.Token; import org.netbeans.api.lexer.TokenHierarchy; import org.netbeans.api.lexer.TokenId; import org.netbeans.api.lexer.TokenSequence; import org.openide.filesystems.FileObject; import org.openide.loaders.DataObject; import org.openide.loaders.DataObjectNotFoundException; /** * * @author marekfukala */ public class Utils { /** returns top most joined html token seuence for the document at the specified offset. */ public static TokenSequence<HTMLTokenId> getJoinedHtmlSequence(Document doc, int offset) { TokenHierarchy th = TokenHierarchy.get(doc); return getJoinedHtmlSequence(th, offset); } /** returns top most joined html token seuence for the document at the specified offset. */ public static TokenSequence<HTMLTokenId> getJoinedHtmlSequence(TokenHierarchy th, int offset) { TokenSequence ts = th.tokenSequence(); if(ts == null) { return null; } ts.move(offset); while(ts.moveNext() || ts.movePrevious()) { if(ts.language() == HTMLTokenId.language()) { return ts; } ts = ts.embeddedJoined(); if(ts == null) { break; } //position the embedded ts so we can search deeper //XXX this seems to be wrong, the return code should be checked ts.move(offset); } return null; } /** * Finds and returns a tag open token in token sequence positioned inside an html tag. * If tokens sequence contains <div onclick="alert()"/> and is positioned on a token * within the tag it will return OPEN_TAG token for the "div" text * * @param ts a TokenSequence to be used * @return */ public static Token<HTMLTokenId> findTagOpenToken(TokenSequence ts) { assert ts != null; //skip the tag close symbol if the sequence points to it if(ts.token().id() == HTMLTokenId.TAG_CLOSE_SYMBOL) { if(!ts.movePrevious()) { return null; } } do { Token t = ts.token(); TokenId id = t.id(); if( id == HTMLTokenId.TAG_OPEN) { return t; } if(id == HTMLTokenId.TAG_OPEN_SYMBOL || id == HTMLTokenId.TAG_CLOSE_SYMBOL || id == HTMLTokenId.TEXT) { break; } } while (ts.movePrevious()); return null; } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
549f3b902b6e27b9167811e49bb015eebf8744de
cdc02cf9d4d9c0d659d66261411e7dbca358e412
/vio/tmp/java/com/realsoft/commons/beans/control/BLabelImpl.java
789aee3ccc3fcc959e332616454e891e8937753c
[]
no_license
wassaby/freelance
e5346f06e307d14933f0e7573e936e271bf00dde
ea5638526e1780dad5d24e17721325b597dfae76
refs/heads/master
2023-02-12T12:49:46.017093
2021-01-13T12:31:53
2021-01-13T12:31:53
326,712,739
0
0
null
null
null
null
UTF-8
Java
false
false
2,339
java
/* * Created on 27.06.2006 * * Realsoft Ltd. * Dudorga Dmitry. * $Id: BLabelImpl.java,v 1.2 2016/04/15 10:37:06 dauren_home Exp $ */ package com.realsoft.commons.beans.control; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class BLabelImpl extends AbstractControl implements IBLabel, IBListControl { private static final long serialVersionUID = 3755278252660616841L; private List<BLabelItem> itemList = new ArrayList<BLabelItem>(); private Class type = null; private String image = null; public BLabelImpl(String name, Class type) { super(name); this.type = type; } public BLabelImpl(String name, Object value, Class type) throws CommonsControlException { super(name); this.type = type; setValue(value); } public BLabelImpl(String name, IBRequest request, Class type) { super(name, request); this.type = type; } public BLabelImpl(String name, IBRequest request, List<IBControl> dependOn, Class type) { super(name, request, dependOn); this.type = type; } public void setItemList(List itemList) { this.itemList = itemList; } public List getItemList() { return itemList; } public void setCurrentValue() throws CommonsControlException { Iterator<BLabelItem> iterator = itemList.iterator(); if (iterator.hasNext()) value = iterator.next(); else value = null; } public void setModel(Object model) throws CommonsControlException { if (model instanceof BLabelImpl) { copyFrom((BLabelImpl) model); } } public Object getModel() throws CommonsControlException { return this; } public Class getType() { return type; } public void setType(Class type) { this.type = type; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("\nLABEL[").append(name).append(",").append(value) .append(";").append(image).append("]\n\t").append("{"); for (BLabelItem item : itemList) { buffer.append(item.toString()).append("\n"); } buffer.append("}"); return buffer.toString(); } public void copyFrom(BLabelImpl labelImpl) throws CommonsControlException { super.copyFrom(labelImpl); setItemList(labelImpl.getItemList()); setImage(labelImpl.image); } }
[ "dauren.z.g@gmail.com" ]
dauren.z.g@gmail.com
266aca33d76edd9ee1f69b1d409f3f8a8deae365
6b0dcff85194eddf0706e867162526b972b441eb
/kernel/impl/fabric3-introspection-xml/src/main/java/org/fabric3/introspection/xml/definitions/ExternalAttachmentLoader.java
46b1b18b78c8274b2b859195d43b034efc52eace
[]
no_license
jbaeck/fabric3-core
802ae3889169d7cc5c2f3e2704cfe3338931ec76
55aaa7b2228c9bf2c2630cc196938d48a71274ff
refs/heads/master
2021-01-18T15:27:25.959653
2012-11-04T00:36:36
2012-11-04T00:36:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,141
java
/* * Fabric3 * Copyright (c) 2009-2012 Metaform Systems * * Fabric3 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the * GNU General Public License along with Fabric3. * If not, see <http://www.gnu.org/licenses/>. */ package org.fabric3.introspection.xml.definitions; import java.net.URI; import java.util.HashSet; import java.util.Set; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.oasisopen.sca.Constants; import org.oasisopen.sca.annotation.Reference; import org.fabric3.model.type.definitions.Intent; import org.fabric3.model.type.definitions.IntentType; import org.fabric3.model.type.definitions.Qualifier; import org.fabric3.spi.introspection.IntrospectionContext; import org.fabric3.spi.introspection.xml.InvalidPrefixException; import org.fabric3.spi.introspection.xml.InvalidQNamePrefix; import org.fabric3.spi.introspection.xml.InvalidValue; import org.fabric3.spi.introspection.xml.LoaderHelper; import org.fabric3.spi.introspection.xml.LoaderUtil; import org.fabric3.spi.introspection.xml.MissingAttribute; import org.fabric3.spi.introspection.xml.TypeLoader; import org.fabric3.spi.introspection.xml.UnrecognizedAttribute; import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; import static javax.xml.stream.XMLStreamConstants.START_ELEMENT; /** * Loader for the externalAttachment element. */ public class ExternalAttachmentLoader implements TypeLoader<Object> { public Object load(XMLStreamReader reader, IntrospectionContext context) throws XMLStreamException { // TODO implement LoaderUtil.skipToEndElement(reader); return null; } }
[ "jim.marino@gmail.com" ]
jim.marino@gmail.com
dd94f077998a4061230175a4c68f56da80b964c7
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/62_dom4j-org.dom4j.tree.LazyList-1.0-6/org/dom4j/tree/LazyList_ESTest_scaffolding.java
94824b0d6e5578540c8f841f7cf4b99e2ea62cb9
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 25 21:20:37 GMT 2019 */ package org.dom4j.tree; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class LazyList_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
c0cf1ce13ef4d6bc153db39ee3a1f02eb42a9cf7
b2ac08091476e3498e68ac4bc6ce02382d5933f0
/Spring/Spring-data/spring-data-solr-2.1.13.RELEASE/src/main/java/org/springframework/data/solr/core/query/Update.java
abd6ab9585a0511aba585643de3036f3d04064ef
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
xuqb981956807/bagdata-study
3f4ffbbf6afee15981badec4c9947d11462585a5
944217eb7b8dee2d414f55341d36f0332e278cbc
refs/heads/master
2023-05-28T12:46:04.712048
2021-06-03T06:04:34
2021-06-03T06:04:34
373,395,925
0
0
null
null
null
null
UTF-8
Java
false
false
1,104
java
/* * Copyright 2012 - 2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.solr.core.query; /** * Update one or more fields of a Document without touching the others. * * @author Christoph Strobl */ public interface Update { /** * get id field of document to update * * @return */ ValueHoldingField getIdField(); /** * List of fields and values to update * * @return */ Iterable<UpdateField> getUpdates(); /** * Document Version {@code _version_} * * @return */ Object getVersion(); }
[ "981956807@qq.com" ]
981956807@qq.com
7fef8daf69d10c9560c4ae59b52c3ffd4bd1102a
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/com/android/ims/internal/uce/presence/PresSubscriptionState.java
36ee8a5656c4e3d6089e3b6470072a911d8fa9c8
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,740
java
package com.android.ims.internal.uce.presence; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; public class PresSubscriptionState implements Parcelable { public static final Creator<PresSubscriptionState> CREATOR = new Creator<PresSubscriptionState>() { public PresSubscriptionState createFromParcel(Parcel source) { return new PresSubscriptionState(source, null); } public PresSubscriptionState[] newArray(int size) { return new PresSubscriptionState[size]; } }; public static final int UCE_PRES_SUBSCRIPTION_STATE_ACTIVE = 0; public static final int UCE_PRES_SUBSCRIPTION_STATE_PENDING = 1; public static final int UCE_PRES_SUBSCRIPTION_STATE_TERMINATED = 2; public static final int UCE_PRES_SUBSCRIPTION_STATE_UNKNOWN = 3; private int mPresSubscriptionState; /* synthetic */ PresSubscriptionState(Parcel x0, AnonymousClass1 x1) { this(x0); } public int describeContents() { return 0; } public void writeToParcel(Parcel dest, int flags) { dest.writeInt(this.mPresSubscriptionState); } private PresSubscriptionState(Parcel source) { this.mPresSubscriptionState = 3; readFromParcel(source); } public void readFromParcel(Parcel source) { this.mPresSubscriptionState = source.readInt(); } public PresSubscriptionState() { this.mPresSubscriptionState = 3; } public int getPresSubscriptionStateValue() { return this.mPresSubscriptionState; } public void setPresSubscriptionState(int nPresSubscriptionState) { this.mPresSubscriptionState = nPresSubscriptionState; } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
d15a4579b61932511b17886dce8c16a01f06de1b
86db3e80e9d6d6dd72e003ad43ff042437248386
/android/glshop2/app/src/main/java/com/glshop/net/ui/basic/fragment/PriceForecastFragment.java
5fc379e833b1c0c73bd8f9b79fc0108389445eb0
[]
no_license
RainerJava/gl_shop
35aee84aa806d0ee73ebdf041bb665c42ba0a8d7
ed3e0c53fb280347e35df1e5c6b709f57c662ef4
refs/heads/master
2021-01-17T20:20:33.994709
2015-10-20T06:19:16
2015-10-20T06:19:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,720
java
package com.glshop.net.ui.basic.fragment; import java.util.ArrayList; import java.util.List; import android.os.Bundle; import android.os.Message; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.glshop.net.R; import com.glshop.net.common.GlobalAction; import com.glshop.net.common.GlobalConstants.DataReqType; import com.glshop.net.common.GlobalConstants.DataStatus; import com.glshop.net.common.GlobalMessageType; import com.glshop.net.logic.buy.IBuyLogic; import com.glshop.net.logic.cache.DataCenter; import com.glshop.net.logic.cache.DataCenter.DataType; import com.glshop.net.logic.model.RespInfo; import com.glshop.net.ui.basic.BasicFragment; import com.glshop.net.ui.basic.adapter.buy.ForecastPriceAdapter; import com.glshop.net.ui.basic.view.PullRefreshListView; import com.glshop.platform.api.DataConstants.ProductType; import com.glshop.platform.api.DataConstants.SysCfgCode; import com.glshop.platform.api.buy.data.model.ForecastPriceModel; import com.glshop.platform.base.manager.LogicFactory; import com.glshop.platform.utils.BeanUtils; import com.glshop.platform.utils.Logger; /** * @Description : 价格预测Fragment * @Copyright : GL. All Rights Reserved * @Company : 深圳市国立数码动画有限公司 * @author : 叶跃丰 * @version : 1.0 * Create Date : 2014-8-11 下午3:04:53 */ public class PriceForecastFragment extends BasicFragment { private static final String TAG = "PriceForecastFragment"; private PullRefreshListView mLvPriceForecast; private ForecastPriceAdapter mAdapter; private ArrayList<ForecastPriceModel> mInitData; private boolean isRestored = false; protected ProductType type; protected String mAreaCode = ""; protected IBuyLogic mBuyLogic; public PriceForecastFragment() { //mInitData = new ArrayList<ForecastPriceModel>(); } @SuppressWarnings("unchecked") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { mInitData = (ArrayList<ForecastPriceModel>) savedInstanceState.getSerializable(GlobalAction.BuyAction.EXTRA_KEY_PRICE_FORECAST_DATA); if (mInitData != null) { isRestored = true; Logger.e(TAG, "InitData = " + mInitData); } } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Logger.e(TAG, "onCreateView & Type = " + type.toValue()); mRootView = inflater.inflate(R.layout.fragment_price_forecast, container, false); initView(); initData(); return mRootView; } @Override protected void initArgs() { Bundle bundle = getArguments(); type = ProductType.convert(bundle.getInt(GlobalAction.BuyAction.EXTRA_KEY_PRODUCT_TYPE)); } private void initView() { initLoadView(); mLvPriceForecast = getView(R.id.lv_price_forecast); mLvPriceForecast.setIsRefreshable(true); //mLvPriceForecast.hideFootView(); setOnRefreshListener(mLvPriceForecast); setOnScrollListener(mLvPriceForecast); mNormalDataView = mLvPriceForecast; } private void initData() { mAdapter = new ForecastPriceAdapter(mContext, mInitData); mLvPriceForecast.setAdapter(mAdapter); if (!isRestored) { updateDataStatus(DataStatus.LOADING); mBuyLogic.getPriceForecast(type, getProductCode(), mAreaCode, DataReqType.INIT); } else { isRestored = false; updateDataStatus(DataStatus.NORMAL); } } @Override protected void onReloadData() { updateDataStatus(DataStatus.LOADING); mBuyLogic.getPriceForecast(type, getProductCode(), mAreaCode, DataReqType.INIT); } @Override protected void onRefresh() { Logger.e(TAG, "---onRefresh---"); mBuyLogic.getPriceForecast(type, getProductCode(), mAreaCode, DataReqType.REFRESH); } public void refresh() { Logger.e(TAG, "---do refresh---"); updateDataStatus(DataStatus.LOADING); mBuyLogic.getPriceForecast(type, getProductCode(), mAreaCode, DataReqType.INIT); } @Override protected void handleStateMessage(Message message) { Logger.d(TAG, "handleStateMessage: what = " + message.what + " & Type = " + type.toValue() + " & RespInfo = " + message.obj); RespInfo respInfo = getRespInfo(message); switch (message.what) { case GlobalMessageType.BuyMessageType.MSG_GET_PRICE_FORECAST_SUCCESS: onGetSuccess(respInfo); break; case GlobalMessageType.BuyMessageType.MSG_GET_PRICE_FORECAST_FAILED: onGetFailed(respInfo); break; } } private void onGetSuccess(RespInfo respInfo) { if (respInfo != null && respInfo.intArg1 == type.toValue()) { List data = DataCenter.getInstance().getData(getDataType()); if (BeanUtils.isNotEmpty(data)) { mAdapter.setList(data); mLvPriceForecast.onRefreshSuccess(); mLvPriceForecast.showLoadFinish(); mLvPriceForecast.setSelection(0); updateDataStatus(DataStatus.NORMAL); } else { updateDataStatus(DataStatus.EMPTY); } } } private void onGetFailed(RespInfo respInfo) { if (respInfo != null && respInfo.intArg1 == type.toValue()) { updateDataStatus(DataStatus.ERROR); handleErrorAction(respInfo); } } @Override protected void showErrorMsg(RespInfo respInfo) { if (respInfo != null) { switch (respInfo.respMsgType) { case GlobalMessageType.BuyMessageType.MSG_GET_PRICE_FORECAST_FAILED: showToast(R.string.error_req_get_list); break; default: super.showErrorMsg(respInfo); break; } } } public void setAreaCode(String area) { this.mAreaCode = area; } public String getAreaCode() { return this.mAreaCode; } protected int getDataType() { int dataType = DataType.SAND_FORECAST_PRICE_LIST; switch (type) { case SAND: dataType = DataType.SAND_FORECAST_PRICE_LIST; break; case STONE: dataType = DataType.STONE_FORECAST_PRICE_LIST; break; } return dataType; } protected String getProductCode() { String productCode = SysCfgCode.TYPE_PRODUCT_SAND; switch (type) { case SAND: productCode = SysCfgCode.TYPE_PRODUCT_SAND; break; case STONE: productCode = SysCfgCode.TYPE_PRODUCT_STONE; break; } return productCode; } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mAdapter.getList().size() > 0) { outState.putSerializable(GlobalAction.BuyAction.EXTRA_KEY_PRICE_FORECAST_DATA, (ArrayList<ForecastPriceModel>) mAdapter.getList()); } } @Override protected void initLogics() { mBuyLogic = LogicFactory.getLogicByClass(IBuyLogic.class); } }
[ "jianshaosky@126.com" ]
jianshaosky@126.com
28077ccb09c089bcce1ebc66c81fe84540add17f
1ec1773fd62e0a48f5c042ab0c5547decc9ac11b
/presto-raptor/src/test/java/com/facebook/presto/raptor/RaptorQueryRunner.java
76d2ddd9d947c44e9f536f6d36db345c85037856
[ "Apache-2.0" ]
permissive
zuoyebushiwo/weiwodb
71c31a2c82c84eab959020aee9ce784ea43518cc
6768496f0b6aa1e8d6f486e71e4711a1a3432c84
refs/heads/master
2021-09-06T09:56:34.499258
2018-02-05T07:41:20
2018-02-05T07:41:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,138
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 com.facebook.presto.raptor; import com.facebook.presto.Session; import com.facebook.presto.metadata.QualifiedObjectName; import com.facebook.presto.metadata.SessionPropertyManager; import com.facebook.presto.raptor.storage.StorageManagerConfig; import com.facebook.presto.testing.QueryRunner; import com.facebook.presto.tests.DistributedQueryRunner; import com.facebook.presto.tpch.TpchPlugin; import com.facebook.presto.tpch.testing.SampledTpchPlugin; import com.google.common.collect.ImmutableMap; import io.airlift.log.Logger; import io.airlift.log.Logging; import io.airlift.tpch.TpchTable; import org.intellij.lang.annotations.Language; import java.io.File; import java.util.Map; import java.util.Map.Entry; import static com.facebook.presto.testing.TestingSession.testSessionBuilder; import static com.facebook.presto.tests.QueryAssertions.copyTpchTables; import static com.facebook.presto.tpch.TpchMetadata.TINY_SCHEMA_NAME; import static io.airlift.units.Duration.nanosSince; import static java.lang.String.format; public final class RaptorQueryRunner { private static final Logger log = Logger.get(RaptorQueryRunner.class); private RaptorQueryRunner() {} public static DistributedQueryRunner createRaptorQueryRunner(Map<String, String> extraProperties, boolean loadTpch, boolean bucketed) throws Exception { DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession("tpch"), 2, extraProperties); queryRunner.installPlugin(new TpchPlugin()); queryRunner.createCatalog("tpch", "tpch"); queryRunner.installPlugin(new SampledTpchPlugin()); queryRunner.createCatalog("tpch_sampled", "tpch_sampled"); queryRunner.installPlugin(new RaptorPlugin()); File baseDir = queryRunner.getCoordinator().getBaseDataDir().toFile(); Map<String, String> raptorProperties = ImmutableMap.<String, String>builder() .put("metadata.db.type", "h2") .put("metadata.db.connections.max", "100") .put("metadata.db.filename", new File(baseDir, "db").getAbsolutePath()) .put("storage.data-directory", new File(baseDir, "data").getAbsolutePath()) .put("storage.max-shard-rows", "2000") .put("backup.provider", "file") .put("backup.directory", new File(baseDir, "backup").getAbsolutePath()) .build(); queryRunner.createCatalog("raptor", "raptor", raptorProperties); if (loadTpch) { copyTables(queryRunner, "tpch", createSession(), bucketed); copyTables(queryRunner, "tpch_sampled", createSampledSession(), bucketed); } return queryRunner; } private static void copyTables(QueryRunner queryRunner, String catalog, Session session, boolean bucketed) throws Exception { String schema = TINY_SCHEMA_NAME; if (!bucketed) { copyTpchTables(queryRunner, catalog, schema, session, TpchTable.getTables()); return; } Map<TpchTable<?>, String> tables = ImmutableMap.<TpchTable<?>, String>builder() .put(TpchTable.ORDERS, "bucket_count = 25, bucketed_on = ARRAY['orderkey'], distribution_name = 'order'") .put(TpchTable.LINE_ITEM, "bucket_count = 25, bucketed_on = ARRAY['orderkey'], distribution_name = 'order'") .put(TpchTable.PART, "bucket_count = 20, bucketed_on = ARRAY['partkey'], distribution_name = 'part'") .put(TpchTable.PART_SUPPLIER, "bucket_count = 20, bucketed_on = ARRAY['partkey'], distribution_name = 'part'") .put(TpchTable.SUPPLIER, "bucket_count = 10, bucketed_on = ARRAY['suppkey']") .put(TpchTable.CUSTOMER, "bucket_count = 10, bucketed_on = ARRAY['custkey']") .put(TpchTable.NATION, "") .put(TpchTable.REGION, "") .build(); log.info("Loading data from %s.%s...", catalog, schema); long startTime = System.nanoTime(); for (Entry<TpchTable<?>, String> entry : tables.entrySet()) { copyTable(queryRunner, catalog, session, schema, entry.getKey(), entry.getValue()); } log.info("Loading from %s.%s complete in %s", catalog, schema, nanosSince(startTime)); } private static void copyTable(QueryRunner queryRunner, String catalog, Session session, String schema, TpchTable<?> table, String properties) { QualifiedObjectName source = new QualifiedObjectName(catalog, schema, table.getTableName()); String target = table.getTableName(); String with = properties.isEmpty() ? "" : format(" WITH (%s)", properties); @Language("SQL") String sql = format("CREATE TABLE %s%s AS SELECT * FROM %s", target, with, source); log.info("Running import for %s", target); long start = System.nanoTime(); long rows = queryRunner.execute(session, sql).getUpdateCount().getAsLong(); log.info("Imported %s rows for %s in %s", rows, target, nanosSince(start)); } public static Session createSession() { return createSession("tpch"); } public static Session createSampledSession() { return createSession("tpch_sampled"); } private static Session createSession(String schema) { SessionPropertyManager sessionPropertyManager = new SessionPropertyManager(); sessionPropertyManager.addConnectorSessionProperties("raptor", new RaptorSessionProperties(new StorageManagerConfig()).getSessionProperties()); return testSessionBuilder(sessionPropertyManager) .setCatalog("raptor") .setSchema(schema) .setSystemProperties(ImmutableMap.of("processing_optimization", "columnar_dictionary", "dictionary_aggregation", "true")) .build(); } public static void main(String[] args) throws Exception { Logging.initialize(); Map<String, String> properties = ImmutableMap.of("http-server.http.port", "8080"); DistributedQueryRunner queryRunner = createRaptorQueryRunner(properties, false, false); Thread.sleep(10); Logger log = Logger.get(RaptorQueryRunner.class); log.info("======== SERVER STARTED ========"); log.info("\n====\n%s\n====", queryRunner.getCoordinator().getBaseUrl()); } }
[ "27547073@qq.com" ]
27547073@qq.com
3f5f6eab133512e5a9600a001bdfe223ed9ffa18
68a19507f18acff18aa4fa67d6611f5b8ac8913c
/plfx/plfx-xl/plfx-xl-pojo/src/main/java/plfx/xl/pojo/dto/line/LinePayInfoDTO.java
944a175940ec4302131c7613812ca25f32eb6c71
[]
no_license
ksksks2222/pl-workspace
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
refs/heads/master
2021-09-13T08:59:17.177105
2018-04-27T09:46:42
2018-04-27T09:46:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,337
java
package plfx.xl.pojo.dto.line; import plfx.xl.pojo.dto.EmbeddDTO; /** * * *@类功能说明:线路支付信息DTO *@类修改者: *@修改日期: *@修改说明: *@公司名称:浙江汇购科技有限公司 *@部门:技术部 *@作者:luoyun *@创建时间:2014年12月8日上午9:11:03 * */ @SuppressWarnings("serial") public class LinePayInfoDTO extends EmbeddDTO{ /** * 订金支付比例 */ private Double downPayment; /** * 需付全款提前天数 */ private Integer payTotalDaysBeforeStart; /** * 最晚付款时间出发日期前 */ private Integer lastPayTotalDaysBeforeStart; public Double getDownPayment() { return downPayment; } public void setDownPayment(Double downPayment) { this.downPayment = downPayment; } public Integer getPayTotalDaysBeforeStart() { return payTotalDaysBeforeStart; } public void setPayTotalDaysBeforeStart(Integer payTotalDaysBeforeStart) { this.payTotalDaysBeforeStart = payTotalDaysBeforeStart; } public Integer getLastPayTotalDaysBeforeStart() { return lastPayTotalDaysBeforeStart; } public void setLastPayTotalDaysBeforeStart(Integer lastPayTotalDaysBeforeStart) { this.lastPayTotalDaysBeforeStart = lastPayTotalDaysBeforeStart; } }
[ "cangsong6908@gmail.com" ]
cangsong6908@gmail.com
8b8c3a90377ab6fd52bd07588c520abee0712490
1327e9451ce7d799ab251beb4bfd0913f381b360
/Forro/src/forrocore/FrameworkDriver.java
4b0e8ba84252c128608d582a35137e938b9ce9df
[]
no_license
jeffersoncarvalho/programas-grad
7290a1f67a1daa3e752f38f0643d7e02bcd9c81f
b413e4249a72d3ab5cd7167fa0665ed4cab4e5fb
refs/heads/master
2020-03-28T08:15:42.561997
2018-09-08T17:20:44
2018-09-08T17:20:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,204
java
/* project : forro2.0 * file name : FrameworkDriver.java * authors : Ricardo Corr�a (correa@lia.ufc.br), Francisco de Carvalho Junior (heron@lia.ufc.br), Gisele Ara�jo (gisele@lia.ufc.br) * created : 03/08/2006 * copyright : Federal University of Cear�, Brazil * * modifications: * */ package forrocore; import java.rmi.Remote; import java.rmi.RemoteException; import exceptions.CCAException; /** * A special object that runs at each location responsible for launching the framework at this location, * for logging on the sessions and for executing the end user commands. It is not itself a component. * * @author Ricardo Corrêa (correa@lia.ufc.br) * */ public interface FrameworkDriver extends Remote { /** * Logon a specified session with its name. It starts the corresponding session driver. * @param sessionName the name of this session * * @throws RemoteException TODO */ void logOn(String sessionName) throws RemoteException; void logOff(String sessionName) throws RemoteException; /** * Adds a location to the environment of the specified session. The added location must have been * registered itself. * * @param sessionName the session name * @param locationName the location name * @param registeredName the name the framework driver of the specified location has been registered * * @throws RemoteException TODO */ void addLocation(String sessionName, String locationName, String registeredName) throws RemoteException; /** * Executes the specified end user command with the specified keys and values. * * @param sessionName in which the command is to be executed * @param locationName where to execute the command. If it is remote, this object re-directs it. * @param commandName the command to be executed * @param optionKey an array with the keys of the specified command * @param optionValue an array with the value of each specified key. * @throws RemoteException TODO * @throws CCAException TODO */ void execute(String sessionName, String locationName, String commandName, String[] optionKey, String[] optionValue) throws RemoteException, CCAException; }
[ "jeffersoncarvalho@gmail.com" ]
jeffersoncarvalho@gmail.com
a7d43fed24415a716cfff972684e354c138e50c7
70d80759c7fe6158fc9f7aa41f335dd91e9b46e7
/SimpleGame/ref/flappy/com/google/android/gms/common/images/c.java
c38da71e9189e10f1708ff0f8d38f5bec582624f
[]
no_license
dazziest/word
fe1bc157f0f2cfd57312e5c9099cccd4f0398499
54d30f21c921525985a00b86b0fc933421d82ac0
refs/heads/master
2021-01-01T20:16:52.035457
2014-03-12T06:48:53
2014-03-12T06:48:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,207
java
package com.google.android.gms.common.images; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Handler; import android.os.ParcelFileDescriptor; import android.util.Log; import com.google.android.gms.internal.cn; import java.io.IOException; import java.util.concurrent.CountDownLatch; final class c implements Runnable { private final Uri b; private final ParcelFileDescriptor c; public c(ImageManager paramImageManager, Uri paramUri, ParcelFileDescriptor paramParcelFileDescriptor) { this.b = paramUri; this.c = paramParcelFileDescriptor; } public void run() { cn.b("LoadBitmapFromDiskRunnable can't be executed in the main thread"); ParcelFileDescriptor localParcelFileDescriptor = this.c; Object localObject = null; boolean bool = false; if (localParcelFileDescriptor != null) {} try { Bitmap localBitmap = BitmapFactory.decodeFileDescriptor(this.c.getFileDescriptor()); localObject = localBitmap; CountDownLatch localCountDownLatch; return; } catch (OutOfMemoryError localOutOfMemoryError) { try { for (;;) { this.c.close(); localCountDownLatch = new CountDownLatch(1); ImageManager.e(this.a).post(new d(this.a, this.b, localObject, bool, localCountDownLatch)); try { localCountDownLatch.await(); return; } catch (InterruptedException localInterruptedException) { Log.w("ImageManager", "Latch interrupted while posting " + this.b); } localOutOfMemoryError = localOutOfMemoryError; Log.e("ImageManager", "OOM while loading bitmap for uri: " + this.b, localOutOfMemoryError); bool = true; localObject = null; } } catch (IOException localIOException) { for (;;) { Log.e("ImageManager", "closed failed", localIOException); } } } } } /* Location: P:\Side\classes-dex2jar.jar * Qualified Name: com.google.android.gms.common.images.c * JD-Core Version: 0.7.0.1 */
[ "dazziest@gmail.com" ]
dazziest@gmail.com
172f4bf17b0a6d8f312e13fc85d0866b87e1f02a
5f89dd6e2bbf62cedb06b14d3ee5516bec3c7cc6
/src/main/java/org/contentmine/norma/biblio/RISEntry.java
775bd317a5d60514c69a98f0bdfd65dc006e307f
[ "Apache-2.0" ]
permissive
petermr/normami
d0dd99703e0e502f8a08c3d74373cae480119116
17b64f3d3dabf250d077af602345363983d24137
refs/heads/master
2022-07-13T13:49:36.468815
2019-09-02T13:03:00
2019-09-02T13:03:00
130,284,486
1
3
Apache-2.0
2022-06-24T02:14:46
2018-04-19T23:50:37
HTML
UTF-8
Java
false
false
3,194
java
package org.contentmine.norma.biblio; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.contentmine.graphics.html.HtmlDiv; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; public class RISEntry { public static final Logger LOG = Logger.getLogger(RISEntry.class); static { LOG.setLevel(Level.DEBUG); } private static final String AB = "AB"; private static final String ER = "ER"; public static final String TY = "TY"; public final static String START_DASH_SPACE = "^[A-Z][A-Z][A-Z ][A-Z ]\\- .*"; // PMID breaks the rules, this covers it public final static String DASH_SPACE = "- "; // PMID breaks the rules, this covers it public static final String PMID = "PMID"; private String type; private StringBuilder currentValue; private Multimap<String, StringBuilder> valuesByField = ArrayListMultimap.create(); private boolean canAdd; private List<String> fieldList; String abstractx; public RISEntry() { canAdd = true; fieldList = new ArrayList<String>(); } public String getType() { return type; } public String addLine(String line) { if (!canAdd) { System.err.println("Cannot add line: "+line); } String field = null; if (line.matches(START_DASH_SPACE)) { String[] ss = line.split(DASH_SPACE); field = ss[0].trim(); recordUnknownFields(field); if (!fieldList.contains(field)) { fieldList.add(field); } if (ss.length == 1) { currentValue = null; if (field.equals(ER)) { canAdd = false; } } else { currentValue = new StringBuilder(ss[1].trim()); valuesByField.put(field, currentValue); } } else { String v = line.trim(); if (canAdd) { if (currentValue != null) { currentValue.append(" "+v); } else { System.err.println("Cannot add "+line); } } else { System.err.println("Cannot add: "+line); } } return field; } private void recordUnknownFields(String field) { if (!RISParser.FIELD_MAP.containsKey(field)) { if (!RISParser.UNKNOWN_KEYS.contains(field)) { RISParser.addUnknownKey(field); LOG.trace("Unknown Key: "+field); } } } public HtmlDiv createAbstractHtml() { List<StringBuilder> abstracts = new ArrayList<StringBuilder>(valuesByField.get(AB)); HtmlDiv abstractDiv = null; if (abstracts.size() == 1) { abstractx = abstracts.get(0).toString(); BiblioAbstractAnalyzer abstractAnalyzer = new BiblioAbstractAnalyzer(); abstractDiv = abstractAnalyzer.createAndAnalyzeSections(abstractx); } return abstractDiv; } public String toString() { StringBuilder sb = new StringBuilder(); for (String key : fieldList) { sb.append(key+": "); List<StringBuilder> values = new ArrayList<StringBuilder>(valuesByField.get(key)); if (values.size() == 1) { sb.append(values.get(0).toString()+"\n"); } else { sb.append("\n"); for (StringBuilder sb0 : values) { sb.append(" "+sb0.toString()+"\n"); } } } return sb.toString(); } public String getAbstractString() { if (abstractx == null) { createAbstractHtml(); } return abstractx; } }
[ "peter.murray.rust@googlemail.com" ]
peter.murray.rust@googlemail.com
f3c0eee4470abd0f54e5e175f4de4aae9bfa3a2e
4ae82194056c93626de533474450187fdec37377
/model/BPHDutyReportService/src/main/java/com/tianyi/bph/service/duty/WeaponGroupService.java
b378ac543aa48f6a0c716162805b1b94336afaed
[]
no_license
duty-dev/bph
fd3af31429bd7651b8124c74b207cd62676bf050
bddc6e8c8c2658e577d27034afb176db71b8da55
refs/heads/master
2021-01-25T06:40:10.257522
2015-07-13T08:52:01
2015-07-13T08:52:01
33,935,357
1
1
null
null
null
null
UTF-8
Java
false
false
2,270
java
package com.tianyi.bph.service.duty; import java.util.List; import java.util.Map; import com.tianyi.bph.domain.duty.WeaponGroup; import com.tianyi.bph.domain.duty.WeaponGroupMember; import com.tianyi.bph.domain.duty.WeaponGroupOrg; import com.tianyi.bph.query.duty.WeaponGroupMemberVM; import com.tianyi.bph.query.duty.WeaponGroupVM; /** * 武器分组逻辑接口 * @author lq * */ public interface WeaponGroupService { /** * 根据组织机构id,获取武器分组记录总数 * @param map * @return */ int loadVMCountByOrgId(Map<String,Object> map); /** * 根据组织机构id,获取武器分组记录列表,并分页 * @param map * @return */ List<WeaponGroupVM> loadVMListByOrgId(Map<String,Object> map); /** * 获取共享组织机构 * @param pgid * @return */ List<WeaponGroupOrg> loadShareOrgList(int pgid); /** * 保存武器分组信息 * @param pg * @param orgIds */ void saveWeaponGroup(WeaponGroup pg,Object[] orgIds); /** * 根据id获取武器分组信息 * @param id * @return */ WeaponGroup loadById(Integer id); /** * 根据id,删除武器分组信息 * @param id */ void deleteById(Integer id); /** * 根据分组id,获取分组成员列表总数 * @param groupId * @return */ int countMemberByGroupId(Integer groupId); /** * 根据分组id,获取分组成员列表,并分页 * @param map * @return */ List<WeaponGroupMemberVM> loadMemberByGroupId(Map<String,Object> map); /** * 增加武器分组成员列表到分组成员 * @param ls */ void appendMemeber(List<WeaponGroupMember> ls); /** * 根据成员id,删除成员 * @param id */ void delMemberById(Integer id); /** * 根据分组id,清空分组成员列表 * @param groupId */ void cleanMember(Integer groupId); /** * 获取共享下级组织机构数据成员分组 * @param map * @return */ java.util.List<WeaponGroupVM> loadVMListByOrgIdShared( Map<String, Object> map); /** * 判断分组是否已经存在 * @param map * @return */ java.util.List<WeaponGroup> findByNameAndOrg(Map<String, Object> map); }
[ "xiaohutuxian5212@163.com" ]
xiaohutuxian5212@163.com
0c89f67f32ceb3c03de4b8eabfb178b094a0c7d1
3c0bd8f97d10c7eddd182dd0e89cd0a3938c5548
/src/com/dosmil_e/mall/core/custommgrs/MallShipping_addressBMgr.java
0518f24e14b5b1e91e5e705f03838eb7fe5a615f
[]
no_license
carrascoMDD/MallBrowser01
fa15afa0741eaebf97bca964def500810dc00a58
335184af1a0897f62e29b6c0070fe3ce3ba5f38c
refs/heads/master
2020-03-14T11:51:37.366449
2018-04-30T13:46:26
2018-04-30T13:46:26
131,598,493
0
0
null
null
null
null
UTF-8
Java
false
false
2,752
java
package com.dosmil_e.mall.core.custommgrs; // OneToManyOneBMgr import com.dosmil_e.modelbase.support.*; import com.dosmil_e.modelbase.flattrx.*; import com.dosmil_e.modelbase.ifc.*; import com.dosmil_e.browserbase.mgrs.*; import com.dosmil_e.browserbase.metamgrs.*; import com.dosmil_e.browserbase.tree.*; import com.dosmil_e.browserbase.shell.*; import java.awt.event.ActionEvent; import java.awt.Window; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.ActionEvent; import javax.swing.ImageIcon; import javax.swing.JOptionPane; import javax.swing.tree.TreeNode; import java.util.Vector; public class MallShipping_addressBMgr extends EAIBranchMgr { public MallShipping_addressBMgr() { super( ); } protected EAIMMElementIfc[] getMMElements( EAITreeNode theNode) { EAIMMElementIfc aMMElement = getAddress( theNode); if( aMMElement == null) { return null;} return new EAIMMElementIfc[] { aMMElement}; } protected com.dosmil_e.mall.core.ifc.MallAddressIfc getAddress( EAITreeNode theNode) { if( theNode == null) { return null;} Object aUserObject = theNode.getUserObject(); if( aUserObject == null) { return null;} com.dosmil_e.mall.core.ifc.MallShippingIfc aShipping = null; try { aShipping = (com.dosmil_e.mall.core.ifc.MallShippingIfc) aUserObject;} catch( ClassCastException anEx) {} if( aShipping == null) { return null;} EAIMMCtxtIfc aCtxt = theNode.getMMCtxt(); if( aCtxt == null) { return null;} com.dosmil_e.mall.core.ifc.MallAddressIfc aAddress = null; try { aAddress = aShipping.getAddress( aCtxt);} catch( EAIException anEx) {} return aAddress; } protected void observePropertiesForChildren( EAITreeNode theNode) { if( theNode == null) { return;} theNode.observePropertiesForAspect( new String[] { "Address"}, gChildrenAspect, this); } public String composeLabelPrefix( EAITreeNode theNode, EAINodeMgrIfc theNodeMgr) { return "address: "; } public EAIActionsMgrIfc[] getBranchActionsMgrsForChild( ) { return new EAIActionsMgrIfc[] { new EAIGenericActionsMgr( new Class[] { MallShipping_address_setChosen_Address.class, }, EAIActionsSetIfc.sMenuInliningModeInline, // setMenuInliningMode "address ? (1)" // setSubMenuLabel ) }; } public EAIActionsMgrIfc[] getBranchActionsMgrsForParent( ) { return new EAIActionsMgrIfc[] { new EAIGenericActionsMgr( new Class[] { MallShipping_address_remove.class } ) }; } }
[ "carrascomdd@gmail.com" ]
carrascomdd@gmail.com
51467d29bd6d85986e20d0af00b640a405db26b7
559a627496ff3ff7eb771a83a55966cc115be7c9
/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProviderExposingInterceptor.java
9993b8b8ac7d5a9e8914d303b36ed5b74bba240e
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Danbro007/spring-source-analysis
8a7cd5c0e382c332319c220ac320cefaea1dc81a
75dd673b05cb2bb219c361d0447567177c35bc00
refs/heads/master
2022-12-10T02:03:13.655449
2020-09-14T06:43:51
2020-09-14T06:43:51
268,418,449
0
0
null
null
null
null
UTF-8
Java
false
false
2,138
java
/* * Copyright 2002-2019 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.servlet.resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.util.Assert; import org.springframework.web.bind.ServletRequestBindingException; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; /** * An interceptor that exposes the {@link ResourceUrlProvider} instance it * is configured with as a request attribute. * * 暴露 ResourceUrlProvider 实例的拦截器,它被当做请求属性。 * * @author Rossen Stoyanchev * @since 4.1 */ public class ResourceUrlProviderExposingInterceptor extends HandlerInterceptorAdapter { /** * Name of the request attribute that holds the {@link ResourceUrlProvider}. */ public static final String RESOURCE_URL_PROVIDER_ATTR = ResourceUrlProvider.class.getName(); private final ResourceUrlProvider resourceUrlProvider; public ResourceUrlProviderExposingInterceptor(ResourceUrlProvider resourceUrlProvider) { Assert.notNull(resourceUrlProvider, "ResourceUrlProvider is required"); this.resourceUrlProvider = resourceUrlProvider; } @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { try { request.setAttribute(RESOURCE_URL_PROVIDER_ATTR, this.resourceUrlProvider); } catch (ResourceUrlEncodingFilter.LookupPathIndexException ex) { throw new ServletRequestBindingException(ex.getMessage(), ex); } return true; } }
[ "710170342@qq.com" ]
710170342@qq.com
476105812a6eb7fbe4a5ce0d7bff555b3df3e867
1674e12698dfcee79f24313ffdf7b9e52fd267d5
/doma/src/main/java/org/seasar/doma/jdbc/query/AutoBatchDeleteQuery.java
dfe380a03c54655ae818c6823c2a0e05f1d4e116
[ "Apache-2.0" ]
permissive
gakuzzzz/doma
2bc0bb1a0ad58ef3e5fe91dfae7a314a6c287337
95a8704d1fe816937ef8fe976ded0de60c82faf1
refs/heads/master
2020-05-29T12:18:45.351233
2014-01-22T13:47:47
2014-01-22T13:47:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,208
java
/* * Copyright 2004-2010 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.doma.jdbc.query; import static org.seasar.doma.internal.util.AssertionUtil.assertEquals; import static org.seasar.doma.internal.util.AssertionUtil.assertNotNull; import java.lang.reflect.Method; import java.util.ListIterator; import org.seasar.doma.internal.jdbc.entity.AbstractPostDeleteContext; import org.seasar.doma.internal.jdbc.entity.AbstractPreDeleteContext; import org.seasar.doma.internal.jdbc.sql.PreparedSql; import org.seasar.doma.internal.jdbc.sql.PreparedSqlBuilder; import org.seasar.doma.jdbc.Config; import org.seasar.doma.jdbc.SqlKind; import org.seasar.doma.jdbc.dialect.Dialect; import org.seasar.doma.jdbc.entity.EntityPropertyType; import org.seasar.doma.jdbc.entity.EntityType; import org.seasar.doma.jdbc.entity.Property; /** * @author taedium * @param <ENTITY> * エンティティ */ public class AutoBatchDeleteQuery<ENTITY> extends AutoBatchModifyQuery<ENTITY> implements BatchDeleteQuery { protected boolean versionIgnored; protected boolean optimisticLockExceptionSuppressed; public AutoBatchDeleteQuery(EntityType<ENTITY> entityType) { super(entityType); } @Override public void prepare() { assertNotNull(method, config, callerClassName, callerMethodName, entities, sqls); int size = entities.size(); if (size == 0) { return; } executable = true; executionSkipCause = null; currentEntity = entities.get(0); preDelete(); prepareIdAndVersionPropertyTypes(); validateIdExistent(); prepareOptions(); prepareOptimisticLock(); prepareSql(); entities.set(0, currentEntity); for (ListIterator<ENTITY> it = entities.listIterator(1); it.hasNext();) { currentEntity = it.next(); preDelete(); prepareSql(); it.set(currentEntity); } assertEquals(size, sqls.size()); } protected void preDelete() { AutoBatchPreDeleteContext<ENTITY> context = new AutoBatchPreDeleteContext<ENTITY>( entityType, method, config); entityType.preDelete(currentEntity, context); if (context.getNewEntity() != null) { currentEntity = context.getNewEntity(); } } protected void prepareOptimisticLock() { if (versionPropertyType != null && !versionIgnored) { if (!optimisticLockExceptionSuppressed) { optimisticLockCheckRequired = true; } } } protected void prepareSql() { Dialect dialect = config.getDialect(); PreparedSqlBuilder builder = new PreparedSqlBuilder(config, SqlKind.BATCH_DELETE); builder.appendSql("delete from "); builder.appendSql(entityType.getQualifiedTableName(dialect::applyQuote)); if (idPropertyTypes.size() > 0) { builder.appendSql(" where "); for (EntityPropertyType<ENTITY, ?> propertyType : idPropertyTypes) { Property<ENTITY, ?> property = propertyType.createProperty(); property.load(currentEntity); builder.appendSql(propertyType .getColumnName(dialect::applyQuote)); builder.appendSql(" = "); builder.appendParameter(property); builder.appendSql(" and "); } builder.cutBackSql(5); } if (versionPropertyType != null && !versionIgnored) { if (idPropertyTypes.size() == 0) { builder.appendSql(" where "); } else { builder.appendSql(" and "); } Property<ENTITY, ?> property = versionPropertyType.createProperty(); property.load(currentEntity); builder.appendSql(versionPropertyType .getColumnName(dialect::applyQuote)); builder.appendSql(" = "); builder.appendParameter(property); } PreparedSql sql = builder.build(); sqls.add(sql); } @Override public void complete() { for (ListIterator<ENTITY> it = entities.listIterator(); it.hasNext();) { currentEntity = it.next(); postDelete(); it.set(currentEntity); } } protected void postDelete() { AutoBatchPostDeleteContext<ENTITY> context = new AutoBatchPostDeleteContext<ENTITY>( entityType, method, config); entityType.postDelete(currentEntity, context); if (context.getNewEntity() != null) { currentEntity = context.getNewEntity(); } } public void setVersionIgnored(boolean versionIgnored) { this.versionIgnored = versionIgnored; } public void setOptimisticLockExceptionSuppressed( boolean optimisticLockExceptionSuppressed) { this.optimisticLockExceptionSuppressed = optimisticLockExceptionSuppressed; } protected static class AutoBatchPreDeleteContext<E> extends AbstractPreDeleteContext<E> { public AutoBatchPreDeleteContext(EntityType<E> entityType, Method method, Config config) { super(entityType, method, config); } } protected static class AutoBatchPostDeleteContext<E> extends AbstractPostDeleteContext<E> { public AutoBatchPostDeleteContext(EntityType<E> entityType, Method method, Config config) { super(entityType, method, config); } } }
[ "toshihiro.nakamura@gmail.com" ]
toshihiro.nakamura@gmail.com
41daa987a20b569f3166bf217b393790e3afaaa4
25125b0f108cac9dc126f795d5fb6c968bacc04a
/Magic/Interfaces/EnergyBeamRenderer.java
1964715e65fb1d94541fd43ee2938d660725899c
[]
no_license
wlich/ChromatiCraft
ebf35e64e20114cdcd92d8876367cf4d7a8942f6
4f8ea8bccba6e1ad72db83d894ee2cf010b867f9
refs/heads/master
2021-01-21T10:37:39.981177
2017-02-13T01:42:28
2017-02-13T01:42:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
937
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2016 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.ChromatiCraft.Magic.Interfaces; import java.util.Collection; import Reika.ChromatiCraft.Magic.CrystalTarget; import Reika.ChromatiCraft.Registry.CrystalElement; import Reika.DragonAPI.Instantiable.Data.Immutable.WorldLocation; public interface EnergyBeamRenderer { public Collection<CrystalTarget> getTargets(); public void addTarget(WorldLocation loc, CrystalElement e, double dx, double dy, double dz, double w); public void removeTarget(WorldLocation loc, CrystalElement e); public void clearTargets(boolean unload); public double getOutgoingBeamRadius(); }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
88a0e084e462e232d83db5a2b3edb2a6298d2b2f
a7b61632de3d80ca7c29a25d5eb0cbfa17fa01d9
/src/main/java/com/watson/mandlovutakeaways/services/gatsbys/SteakGatsbyService.java
57e4bbb9486b3b3cbf4025e5e68b84d91b285d43
[]
no_license
Watson9023/Mandlovu_Takeaways_App
1e491699b96586efd7750b4e678c203bb9e22d90
5fab71f4cb107162abd00d1292967a71ea644813
refs/heads/master
2021-06-23T20:02:08.109146
2017-08-14T18:03:56
2017-08-14T18:03:56
100,290,257
0
0
null
null
null
null
UTF-8
Java
false
false
289
java
package com.watson.mandlovutakeaways.services.gatsbys; import com.watson.mandlovutakeaways.domain.gatsbys.SteakGatsby; import com.watson.mandlovutakeaways.services.Service; /** * Created by Long on 8/14/2017. */ public interface SteakGatsbyService extends Service<SteakGatsby,Long> { }
[ "matunhirewendy@gmail.com" ]
matunhirewendy@gmail.com
885fcf2ac0064cc394bda997343004a4990fbc19
f086c6b7104b8fee7e29389df2be00e194c65c62
/src/airplanes2/Boeing.java
da0ee2b2618f6eab2a10047a82077d8dd097fe36
[]
no_license
75168859/design
c3cad7bf78e1e5fdf52e2162a2e818f5ec68c512
b74f7b2578d54f1549a342e354e187dda8862b1c
refs/heads/master
2021-01-13T00:38:47.296078
2016-04-01T15:14:34
2016-04-01T15:14:34
55,241,252
0
0
null
null
null
null
UTF-8
Java
false
false
138
java
package airplanes2; public class Boeing extends AirplaneMaker { public void produce() { //Write your code here } }
[ "75168859@qq.com" ]
75168859@qq.com
7c5434cac56d0656b7a19efd861d33e36d21c1f7
19989ad71f45ee2e1d182183a78a93530acc49b7
/Technology Fundamentals/Exams/Final Exam/December20th2018/VaporWinterSale.java
e8120973168acc089a50b087ec4a8cb35ac0ac7c
[]
no_license
goldenEAGL3/SoftUni
b811c070192e317492acc113d80443e58570f2d4
ba60411d4deea3d999af20ea10be9c015b899c4a
refs/heads/master
2023-08-09T10:04:45.414043
2020-03-21T18:45:44
2020-03-21T18:45:44
175,472,191
0
2
null
2023-07-21T17:50:00
2019-03-13T17:54:34
Java
UTF-8
Java
false
false
5,039
java
package December20th2018; import java.util.*; import java.util.regex.Pattern; public class VaporWinterSale { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] input = sc.nextLine().split(", "); Map<String, Map<Double, List<String>>> myGames = new LinkedHashMap<>(); for (String value : input) { if (!value.contains(":")) { String[] data = value.split("-"); String gameName = data[0]; double gamePrice = Double.parseDouble(data[1]); myGames.putIfAbsent(gameName, new LinkedHashMap<>()); myGames.get(gameName).put(gamePrice, new ArrayList<>()); } else { String[] data = value.split(":"); String gameName = data[0]; if (myGames.containsKey(gameName)) { String gameDLC = data[1]; double gamePrice = 0; for (Map.Entry<Double, List<String>> kvp : myGames.get(gameName).entrySet()) { gamePrice = kvp.getKey(); } List<String> helpList = new ArrayList<>(myGames.get(gameName).get(gamePrice)); myGames.get(gameName).remove(gamePrice); gamePrice *= 1.20; myGames.get(gameName).put(gamePrice, new ArrayList<>()); for (String s : helpList) { myGames.get(gameName).get(gamePrice).add(s); } myGames.get(gameName).get(gamePrice).add(gameDLC); } } } for (Map.Entry<String, Map<Double, List<String>>> outerLoop : myGames.entrySet()) { for (Map.Entry<Double, List<String>> innerLoop : outerLoop.getValue().entrySet()) { double key = innerLoop.getKey(); double newKey; if (innerLoop.getValue().size() == 0) { newKey = key * 0.8; } else { newKey = key * 0.5; } List<String> helpList = new ArrayList<>(innerLoop.getValue()); outerLoop.getValue().remove(key); outerLoop.getValue().put(newKey, new ArrayList<>()); for (String s : helpList) { outerLoop.getValue().get(newKey).add(s); } } } myGames.entrySet() .stream() .filter(a -> !a.getValue().values().isEmpty()) .sorted((a, b) -> { double keyA = 0; double keyB = 0; for (Double aDouble : a.getValue().keySet()) { keyA = aDouble; } for (Double bDouble : b.getValue().keySet()) { keyB = bDouble; } return Double.compare(keyA, keyB); }).forEach(c -> { for (Map.Entry<Double, List<String>> kvp : c.getValue().entrySet()) { int count = 0; for (String s : kvp.getValue()) { if (kvp.getValue().size() > 1) { count++; int numMultiply = kvp.getValue().size(); double price = 0; if (count != 1) { numMultiply--; } for (int i1 = 1; i1 < numMultiply; i1++) { price = kvp.getKey() * 0.8; } if (count != kvp.getValue().size()) { System.out.printf("%s - %s - %.2f%n", c.getKey(), s, price); } } if(count == 0 || count == kvp.getValue().size()) { System.out.printf("%s - %s - %.2f%n", c.getKey(), s, kvp.getKey()); } } } }); myGames.entrySet() .stream() .filter(a -> { int lenght = 0; for (Map.Entry<Double, List<String>> kvp : a.getValue().entrySet()) { lenght = kvp.getValue().size(); } return lenght == 0; }) .sorted((c, d) -> { double keyA = 0; double keyB = 0; for (Double aDouble : c.getValue().keySet()) { keyA = aDouble; } for (Double bDouble : d.getValue().keySet()) { keyB = bDouble; } return Double.compare(keyB, keyA); }).forEach(e -> { for (Double keys : e.getValue().keySet()) { System.out.printf("%s - %.2f%n", e.getKey(), keys); } }); } }
[ "48495509+goldenEAGL3@users.noreply.github.com" ]
48495509+goldenEAGL3@users.noreply.github.com
7a425386faf2c0a419e9ec750e5b344aeada573f
eeb0c87c85995ee8e108f76bbc25d486b82dfc5c
/server-plugin/server-plugin-report-clover/src/main/java/io/onedev/server/plugin/report/clover/JobJestCoverageReport.java
ad68d37af54e078744a2207accf001c2feb241d9
[ "MIT" ]
permissive
PRNDA/onedev
25be358956f71321f3829021285a5bf42c97ac45
ddbb2e3c4a49b863b8fc1b1a7489067ffe1bcfce
refs/heads/main
2023-04-13T04:11:36.641929
2021-04-25T01:27:50
2021-04-25T01:27:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,017
java
package io.onedev.server.plugin.report.clover; import org.hibernate.validator.constraints.NotEmpty; import io.onedev.server.web.editable.annotation.Editable; import io.onedev.server.web.editable.annotation.Interpolative; import io.onedev.server.web.editable.annotation.Patterns; @Editable(name="Jest Coverage Report") public class JobJestCoverageReport extends JobCloverReport { private static final long serialVersionUID = 1L; @Editable(order=100, description="Specify Jest coverage report file in clover format relative to repository root, " + "for instance <tt>coverage/clover.xml</tt>. This file can be generated with Jest option <tt>'--coverage'</tt>. " + "Use * or ? for pattern match") @Interpolative(variableSuggester="suggestVariables") @Patterns(path=true) @NotEmpty @Override public String getFilePatterns() { return super.getFilePatterns(); } @Override public void setFilePatterns(String filePatterns) { super.setFilePatterns(filePatterns); } }
[ "robin@onedev.io" ]
robin@onedev.io
73fb282c737c3fde5512cc7e58b773f26135b067
994ce8615ca245b08fa1900959cc6709484434a3
/JavaBasic/src/temp/Test.java
2e2adf69949e2d6dcc470cf34ea34cc255051cc5
[]
no_license
kguta143/java
f8303b443ff0ca17b3f2ac2206d8861e5fa38cf9
90d532822a4e2269cdb53539b08d5d931706a2eb
refs/heads/master
2022-04-24T23:57:49.615690
2020-04-05T02:53:48
2020-04-05T02:53:48
250,405,313
0
0
null
2020-03-30T09:20:17
2020-03-27T00:39:33
Java
UTF-8
Java
false
false
457
java
package temp; public class Test { public static void main(String [] args) { // // 1 부터 3까지 출력 // for(int i=1; i<4; i++) { //i<=3으로 써도 무방 // System.out.println(i); // } // // 3행 2열 행렬을 가상하고 번호붙이기 for(int i=0; i<=2; i++) { //줄반복(행) for(int j=0; j<2; j++) { //열반복 System.out.printf("<%d, %d>",i,j); //좌표값 } System.out.println(); } } }
[ "Canon@DESKTOP-PL2F7PK" ]
Canon@DESKTOP-PL2F7PK
ac68c0dbf0fb1f775ae07cd538b316803ae7877d
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/OpenRefine--OpenRefine/78b1eb7e731ff013937af3a39ce1405a36c1ea2f/before/ColumnRemovalOperation.java
5d364edbefd7fc530cd507905b6e463cebb38535
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,986
java
package com.metaweb.gridworks.operations; import java.util.Properties; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONWriter; import com.metaweb.gridworks.history.Change; import com.metaweb.gridworks.history.HistoryEntry; import com.metaweb.gridworks.model.AbstractOperation; import com.metaweb.gridworks.model.Column; import com.metaweb.gridworks.model.Project; import com.metaweb.gridworks.model.changes.ColumnRemovalChange; public class ColumnRemovalOperation extends AbstractOperation { private static final long serialVersionUID = 8422079695048733734L; final protected String _columnName; static public AbstractOperation reconstruct(Project project, JSONObject obj) throws Exception { return new ColumnRemovalOperation( obj.getString("columnName") ); } public ColumnRemovalOperation( String columnName ) { _columnName = columnName; } public void write(JSONWriter writer, Properties options) throws JSONException { writer.object(); writer.key("op"); writer.value(OperationRegistry.s_opClassToName.get(this.getClass())); writer.key("description"); writer.value("Remove column " + _columnName); writer.key("columnName"); writer.value(_columnName); writer.endObject(); } protected String getBriefDescription(Project project) { return "Remove column " + _columnName; } protected HistoryEntry createHistoryEntry(Project project) throws Exception { Column column = project.columnModel.getColumnByName(_columnName); if (column == null) { throw new Exception("No column named " + _columnName); } String description = "Remove column " + column.getHeaderLabel(); Change change = new ColumnRemovalChange(project.columnModel.columns.indexOf(column)); return new HistoryEntry(project, description, ColumnRemovalOperation.this, change); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
67db9413660e9107bf5a49304f5e9b5e357a17e3
b9e8ba3f2cb7cc3aec9025385129c1fdda6ec080
/src/com/click4care/wsdl/_6_5/integrationservices/PlaceOfServiceListFilter.java
a1cb4d7ea368fa4e4b094641df9603e8105ab905
[]
no_license
petecummings/AcopyOfAcopy
af2c75a7f066515569afff364b0faf11562024f8
c83293be0bf5aa51c508df0db0f29654b56a13f9
refs/heads/master
2020-03-14T18:26:18.217011
2018-05-01T12:38:05
2018-05-01T12:38:05
131,741,148
0
0
null
null
null
null
UTF-8
Java
false
false
7,763
java
package com.click4care.wsdl._6_5.integrationservices; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;choice> * &lt;element name="legacyId" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/> * &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}integer" maxOccurs="unbounded"/> * &lt;sequence> * &lt;element name="code" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="typeId" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/> * &lt;element name="typeUniversalId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;choice minOccurs="0"> * &lt;element name="createdDate" type="{http://click4care.com/wsdl/6.5/integrationServices}dateRange"/> * &lt;element name="lastActionDate" type="{http://click4care.com/wsdl/6.5/integrationServices}dateRange"/> * &lt;/choice> * &lt;element name="queryState" type="{http://click4care.com/wsdl/6.5/integrationServices}queryStateType" minOccurs="0"/> * &lt;/sequence> * &lt;/choice> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "legacyId", "id", "code", "description", "typeId", "typeUniversalId", "createdDate", "lastActionDate", "queryState" }) @XmlRootElement(name = "placeOfServiceListFilter") public class PlaceOfServiceListFilter { protected List<String> legacyId; protected List<BigInteger> id; protected String code; protected String description; protected BigInteger typeId; protected String typeUniversalId; protected DateRange createdDate; protected DateRange lastActionDate; protected BigInteger queryState; /** * Gets the value of the legacyId property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the legacyId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getLegacyId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getLegacyId() { if (legacyId == null) { legacyId = new ArrayList<String>(); } return this.legacyId; } /** * Gets the value of the id property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the id property. * * <p> * For example, to add a new item, do as follows: * <pre> * getId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link BigInteger } * * */ public List<BigInteger> getId() { if (id == null) { id = new ArrayList<BigInteger>(); } return this.id; } /** * Gets the value of the code property. * * @return * possible object is * {@link String } * */ public String getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link String } * */ public void setCode(String value) { this.code = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } /** * Gets the value of the typeId property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getTypeId() { return typeId; } /** * Sets the value of the typeId property. * * @param value * allowed object is * {@link BigInteger } * */ public void setTypeId(BigInteger value) { this.typeId = value; } /** * Gets the value of the typeUniversalId property. * * @return * possible object is * {@link String } * */ public String getTypeUniversalId() { return typeUniversalId; } /** * Sets the value of the typeUniversalId property. * * @param value * allowed object is * {@link String } * */ public void setTypeUniversalId(String value) { this.typeUniversalId = value; } /** * Gets the value of the createdDate property. * * @return * possible object is * {@link DateRange } * */ public DateRange getCreatedDate() { return createdDate; } /** * Sets the value of the createdDate property. * * @param value * allowed object is * {@link DateRange } * */ public void setCreatedDate(DateRange value) { this.createdDate = value; } /** * Gets the value of the lastActionDate property. * * @return * possible object is * {@link DateRange } * */ public DateRange getLastActionDate() { return lastActionDate; } /** * Sets the value of the lastActionDate property. * * @param value * allowed object is * {@link DateRange } * */ public void setLastActionDate(DateRange value) { this.lastActionDate = value; } /** * Gets the value of the queryState property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getQueryState() { return queryState; } /** * Sets the value of the queryState property. * * @param value * allowed object is * {@link BigInteger } * */ public void setQueryState(BigInteger value) { this.queryState = value; } }
[ "you@example.com" ]
you@example.com
98809818d9d2e71ea82e4f42900bd68959292565
a46efce7a625c1ef49bbcb49615f456c7fa0aae1
/lib/Soot/src/soot/coffi/Instruction_Istore_2.java
0b818fca4438add5563d819c9239c76564f75e18
[]
no_license
HistoricalValue/spawncamping-octo-ninja
e2acaf21d1c1d194430c22d5c14515de9d4c588e
ecf9772df4116e7013d883b94421159857e87d60
refs/heads/master
2016-09-10T22:11:20.553861
2014-11-23T23:22:55
2014-11-23T23:22:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,483
java
/* Soot - a J*va Optimization Framework * Copyright (C) 1997 Clark Verbrugge * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the Sable Research Group and others 1997-1999. * See the 'credits' file distributed with Soot for the complete list of * contributors. (Soot is distributed at http://www.sable.mcgill.ca/soot) */ package soot.coffi; /** Instruction subclasses are used to represent parsed bytecode; each * bytecode operation has a corresponding subclass of Instruction. * <p> * Each subclass is derived from one of * <ul><li>Instruction</li> * <li>Instruction_noargs (an Instruction with no embedded arguments)</li> * <li>Instruction_byte (an Instruction with a single byte data argument)</li> * <li>Instruction_bytevar (a byte argument specifying a local variable)</li> * <li>Instruction_byteindex (a byte argument specifying a constant pool index)</li> * <li>Instruction_int (an Instruction with a single short data argument)</li> * <li>Instruction_intvar (a short argument specifying a local variable)</li> * <li>Instruction_intindex (a short argument specifying a constant pool index)</li> * <li>Instruction_intbranch (a short argument specifying a code offset)</li> * <li>Instruction_longbranch (an int argument specifying a code offset)</li> * </ul> * @author Clark Verbrugge * @see Instruction * @see Instruction_noargs * @see Instruction_byte * @see Instruction_bytevar * @see Instruction_byteindex * @see Instruction_int * @see Instruction_intvar * @see Instruction_intindex * @see Instruction_intbranch * @see Instruction_longbranch * @see Instruction_Unknown */ class Instruction_Istore_2 extends Instruction_noargs { public Instruction_Istore_2() { super((byte)ByteCode.ISTORE_2); name = "istore_2"; } }
[ "devnull@localhost" ]
devnull@localhost
98ebd208646849c7cf2a8dff3f1372cb56b3e2ba
4277f4cf6dbace9c7743d1cd280e61789f6f96a1
/java/com/polis/gameserver/network/clientpackets/RequestWithdrawPartyRoom.java
ad40562b95bc1998861f9943ef640c9aa6fe4ed0
[]
no_license
polis77/polis_server_h5
cad220828de29e5b5a2267e2870095145d56179d
7e8789baa7255065962b5fdaa1aa7f379d74ff84
refs/heads/master
2021-01-23T21:53:34.935991
2017-02-25T07:35:03
2017-02-25T07:35:03
83,112,850
0
0
null
null
null
null
UTF-8
Java
false
false
2,373
java
/* * Copyright (C) 2004-2014 L2J Server * * This file is part of L2J Server. * * L2J Server 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 Server 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 com.polis.gameserver.network.clientpackets; import com.polis.gameserver.model.PartyMatchRoom; import com.polis.gameserver.model.PartyMatchRoomList; import com.polis.gameserver.model.actor.instance.L2PcInstance; import com.polis.gameserver.network.SystemMessageId; import com.polis.gameserver.network.serverpackets.ExClosePartyRoom; /** * @author Gnacik */ public final class RequestWithdrawPartyRoom extends L2GameClientPacket { private static final String _C__D0_0B_REQUESTWITHDRAWPARTYROOM = "[C] D0:0B RequestWithdrawPartyRoom"; private int _roomid; @SuppressWarnings("unused") private int _unk1; @Override protected void readImpl() { _roomid = readD(); _unk1 = readD(); } @Override protected void runImpl() { final L2PcInstance _activeChar = getClient().getActiveChar(); if (_activeChar == null) { return; } PartyMatchRoom _room = PartyMatchRoomList.getInstance().getRoom(_roomid); if (_room == null) { return; } if ((_activeChar.isInParty() && _room.getOwner().isInParty()) && (_activeChar.getParty().getLeaderObjectId() == _room.getOwner().getParty().getLeaderObjectId())) { // If user is in party with Room Owner // is not removed from Room // _activeChar.setPartyMatching(0); _activeChar.broadcastUserInfo(); } else { _room.deleteMember(_activeChar); _activeChar.setPartyRoom(0); // _activeChar.setPartyMatching(0); _activeChar.sendPacket(new ExClosePartyRoom()); _activeChar.sendPacket(SystemMessageId.PARTY_ROOM_EXITED); } } @Override public String getType() { return _C__D0_0B_REQUESTWITHDRAWPARTYROOM; } }
[ "policelazo@gmail.com" ]
policelazo@gmail.com
bbc99e770c741ec0e94bf5089380ad56beda0950
4b01c451fc756ccfdf149d4754485b506729b962
/core/src/main/java/org/apache/calcite/util/ZonelessTimestamp.java
40a7281fea868de1eda3cb39dc722aec213dbe90
[ "Apache-2.0", "MIT", "OFL-1.1" ]
permissive
zhangheihei/calcite-1.10.0
b1da0b8f4ac79b9361c834200658bd0e8f3de42d
dfe76cc1383a2c3505c42a09326adb38ffd1d3e5
refs/heads/master
2022-10-08T14:59:38.277495
2019-12-23T12:39:28
2019-12-23T12:39:28
229,748,768
0
0
Apache-2.0
2022-10-05T03:49:47
2019-12-23T12:30:26
Java
UTF-8
Java
false
false
5,220
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.calcite.util; import org.apache.calcite.avatica.util.DateTimeUtils; import java.sql.Timestamp; import java.text.DateFormat; /** * ZonelessTimestamp is a timestamp value without a time zone. */ public class ZonelessTimestamp extends ZonelessDatetime { //~ Static fields/initializers --------------------------------------------- /** * SerialVersionUID created with JDK 1.5 serialver tool. */ private static final long serialVersionUID = -6829714640541648394L; //~ Instance fields -------------------------------------------------------- protected final int precision; protected transient Timestamp tempTimestamp; //~ Constructors ----------------------------------------------------------- /** * Constructs a ZonelessTimestamp. */ public ZonelessTimestamp() { this.precision = 0; } /** * Constructs a ZonelessTimestamp with precision. * * <p>The precision is the number of digits to the right of the decimal * point in the seconds value. For example, a <code>TIMESTAMP(3)</code> has * a precision to milliseconds. * * @param precision Number of digits of precision */ public ZonelessTimestamp(int precision) { this.precision = precision; } //~ Methods ---------------------------------------------------------------- // implement ZonelessDatetime public Object toJdbcObject() { return new Timestamp(getJdbcTimestamp(DateTimeUtils.DEFAULT_ZONE)); } /** * Converts this ZonelessTimestamp to a java.sql.Timestamp and formats it * via the {@link java.sql.Timestamp#toString() toString()} method of that * class. * * <p>Note: Jdbc formatting always includes a decimal point and at least one * digit of milliseconds precision. Trailing zeros, except for the first one * after the decimal point, do not appear in the output. * * @return the formatted time string */ public String toString() { Timestamp ts = getTempTimestamp(getJdbcTimestamp(DateTimeUtils.DEFAULT_ZONE)); // Remove trailing '.0' so that format is consistent with SQL spec for // CAST(TIMESTAMP(0) TO VARCHAR). E.g. "1969-12-31 16:00:00.0" // becomes "1969-12-31 16:00:00" return ts.toString().substring(0, 19); } /** * Formats this ZonelessTimestamp via a SimpleDateFormat. This method does * not display milliseconds precision. * * @param format format string, as required by SimpleDateFormat * @return the formatted timestamp string */ public String toString(String format) { DateFormat formatter = getFormatter(format); Timestamp ts = getTempTimestamp(getTime()); return formatter.format(ts); } /** * Parses a string as a ZonelessTimestamp. * * <p>This method's parsing is strict and may parse fractional seconds (as * opposed to just milliseconds.) * * @param s a string representing a time in ISO format, i.e. according to * the SimpleDateFormat string "yyyy-MM-dd HH:mm:ss" * @return the parsed time, or null if parsing failed */ public static ZonelessTimestamp parse(String s) { return parse(s, DateTimeUtils.TIMESTAMP_FORMAT_STRING); } /** * Parses a string as a ZonelessTimestamp using a given format string. * * <p>This method's parsing is strict and may parse fractional seconds (as * opposed to just milliseconds.) * * @param s a string representing a time in ISO format, i.e. according to * the SimpleDateFormat string "yyyy-MM-dd HH:mm:ss" * @param format Format string as per {@link java.text.SimpleDateFormat} * @return the parsed timestamp, or null if parsing failed */ public static ZonelessTimestamp parse(String s, String format) { DateTimeUtils.PrecisionTime pt = DateTimeUtils.parsePrecisionDateTimeLiteral(s, format, DateTimeUtils.GMT_ZONE); if (pt == null) { return null; } ZonelessTimestamp zt = new ZonelessTimestamp(pt.getPrecision()); zt.setZonelessTime(pt.getCalendar().getTime().getTime()); return zt; } /** * Gets a temporary Timestamp object. The same object is returned every * time. */ protected Timestamp getTempTimestamp(long value) { if (tempTimestamp == null) { tempTimestamp = new Timestamp(value); } else { tempTimestamp.setTime(value); } return tempTimestamp; } } // End ZonelessTimestamp.java
[ "18700939@qq.com" ]
18700939@qq.com
edd17aa5e977f62f661e87ffae2195812d236e11
b04471b102b2285f0b8a94ce6e3dc88fc9c750af
/rest-assert-generator/src/test/java/com/github/mjeanroy/restassert/generator/ClassFileTest.java
a1fb6cf7cf6e8c604d81716dd76ee59ebe017705
[]
no_license
mjeanroy/rest-assert
795f59cbb2e1b6fac59408439a1fae5ee97d88d1
b9ea9318c1907cc45a6afd42ac200b1ead97f000
refs/heads/master
2022-12-25T06:02:07.555504
2022-05-21T14:25:43
2022-05-21T14:25:43
128,626,910
0
0
null
2022-11-16T03:00:14
2018-04-08T09:58:49
Java
UTF-8
Java
false
false
2,744
java
/** * The MIT License (MIT) * * Copyright (c) 2014-2021 Mickael Jeanroy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.github.mjeanroy.restassert.generator; import static org.apache.commons.io.FileUtils.deleteQuietly; import static org.apache.commons.io.FileUtils.getTempDirectoryPath; import static org.apache.commons.io.FileUtils.readFileToString; import static org.apache.commons.io.FilenameUtils.normalize; import static org.assertj.core.api.Assertions.assertThat; import java.io.File; import java.nio.charset.StandardCharsets; import org.junit.Test; public class ClassFileTest { @Test public void it_should_build_class_file() { String packageName = "com.github.mjeanroy"; String className = "Foo"; String content = "bar"; ClassFile classFile = new ClassFile(packageName, className, content); assertThat(classFile.getPackageName()).isEqualTo(packageName); assertThat(classFile.getClassName()).isEqualTo(className); assertThat(classFile.getContent()).isEqualTo(content); } @Test public void it_should_write_class_on_disk() throws Exception { String packageName = "com.github.mjeanroy"; String className = "Foo"; String content = "bar"; String directory = normalize(getTempDirectoryPath() + "/rest-assert"); File temp = new File(directory); deleteQuietly(temp); temp.mkdirs(); ClassFile classFile = new ClassFile(packageName, className, content); classFile.writeTo(directory); File klass = new File(directory + "/com/github/mjeanroy/Foo.java"); assertThat(klass).exists().isFile(); assertThat(readFileToString(klass, StandardCharsets.UTF_8).trim()).isEqualTo(content.trim()); deleteQuietly(temp); assertThat(temp).doesNotExist(); } }
[ "mickael.jeanroy@gmail.com" ]
mickael.jeanroy@gmail.com
91198f24a9263e08f93ef8a780bce7748cb13d1b
40cd4da5514eb920e6a6889e82590e48720c3d38
/desktop/applis/apps/core/games/tarot/src/main/java/cards/tarot/enumerations/ModeTarot.java
332f489c3008d66d3ba97edf3e6948b6c4f01b23
[]
no_license
Cardman/projects
02704237e81868f8cb614abb37468cebb4ef4b31
23a9477dd736795c3af10bccccb3cdfa10c8123c
refs/heads/master
2023-08-17T11:27:41.999350
2023-08-15T07:09:28
2023-08-15T07:09:28
34,724,613
4
0
null
2020-10-13T08:08:38
2015-04-28T10:39:03
Java
UTF-8
Java
false
false
132
java
package cards.tarot.enumerations; public enum ModeTarot { NORMAL,NORMAL_WITH_MISERE,NORMAL_WITH_ONE_FOR_ONE,MISERE,ONE_FOR_ONE; }
[ "f.desrochettes@gmail.com" ]
f.desrochettes@gmail.com
abf8e5228e1df2cefc1262b60c51769a7dc4780d
95a54e3f3617bf55883210f0b5753b896ad48549
/java_src/com/liber8tech/tago/service/ResetDevice$perform$notificationsObs$3.java
429390a27003d9c4e0f1afccae040500a400da71
[]
no_license
aidyk/TagoApp
ffc5a8832fbf9f9819f7f8aa7af29149fbab9ea5
e31a528c8f931df42075fc8694754be146eddc34
refs/heads/master
2022-12-22T02:20:58.486140
2021-05-16T07:42:02
2021-05-16T07:42:02
325,695,453
3
1
null
2022-12-16T00:32:10
2020-12-31T02:34:45
Smali
UTF-8
Java
false
false
1,119
java
package com.liber8tech.tago.service; import com.liber8tech.tago.protocol.Message; import io.reactivex.functions.Consumer; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; /* access modifiers changed from: package-private */ @Metadata(bv = {1, 0, 3}, d1 = {"\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"}, d2 = {"<anonymous>", "", "it", "Lcom/liber8tech/tago/protocol/Message;", "kotlin.jvm.PlatformType", "accept"}, k = 3, mv = {1, 1, 13}) /* compiled from: ResetDevice.kt */ public final class ResetDevice$perform$notificationsObs$3<T> implements Consumer<Message> { final /* synthetic */ ResetDevice this$0; ResetDevice$perform$notificationsObs$3(ResetDevice resetDevice) { this.this$0 = resetDevice; } public final void accept(Message message) { ResetDevice resetDevice = this.this$0; Intrinsics.checkExpressionValueIsNotNull(message, "it"); resetDevice.processMessage(message); } }
[ "ai@AIs-MacBook-Pro.local" ]
ai@AIs-MacBook-Pro.local
bab6ca2d0d84b196d1af52c2fd94e25c372c7466
b9b6c15155a17703d7add9b9badcbeb5f9f61aae
/COBieShared/src/org/erdc/cobie/shared/utility/COBieStringHandlerSettings.java
057f64502c9843e5c51c4537493d318f8e1b032b
[]
no_license
webdada/COBie-plugins
abf0a091d7a6ac59a7af86cbbd1d75f974049b82
4dc4b75f9026f47887258eeb67117188e3654668
refs/heads/master
2020-12-29T00:29:18.828171
2015-04-23T08:43:18
2015-04-23T08:43:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,175
java
package org.erdc.cobie.shared.utility; public class COBieStringHandlerSettings { public enum EmptyStringMode { REPLACE_WITH_NA, ALLOW; } public enum SpecialCharacterMode { REMOVE, ALLOW; } public enum TrailingDelimiterMode { REMOVE, ALLOW; } public enum InvalidDateTimeStringMode { SET_TO_CURRENT_DATETIME, SET_TO_MIN_DATETIME, SET_TO_NULL, SET_TO_TEXT; } private EmptyStringMode emptyStringMode; private SpecialCharacterMode specialCharacterMode; private TrailingDelimiterMode trailingDelimiterMode; private InvalidDateTimeStringMode invalidDateTimeStringMode; public EmptyStringMode getEmptyStringMode() { return emptyStringMode; } public void setEmptyStringMode(EmptyStringMode emptyStringMode) { this.emptyStringMode = emptyStringMode; } public COBieStringHandlerSettings(EmptyStringMode emptyStringMode, SpecialCharacterMode specialCharacterMode, TrailingDelimiterMode trailingDelimiterMode, InvalidDateTimeStringMode invalidDateTimeMode) { setEmptyStringMode(emptyStringMode); setSpecialCharacterMode(specialCharacterMode); setTrailingDelimiterMode(trailingDelimiterMode); setInvalidDateTimeStringMode(invalidDateTimeMode); } public SpecialCharacterMode getSpecialCharacterMode() { return specialCharacterMode; } public void setSpecialCharacterMode(SpecialCharacterMode specialCharacterMode) { this.specialCharacterMode = specialCharacterMode; } public TrailingDelimiterMode getTrailingDelimiterMode() { return trailingDelimiterMode; } public void setTrailingDelimiterMode(TrailingDelimiterMode trailingDelimiterMode) { this.trailingDelimiterMode = trailingDelimiterMode; } public InvalidDateTimeStringMode getInvalidDateTimeStringMode() { return invalidDateTimeStringMode; } public void setInvalidDateTimeStringMode(InvalidDateTimeStringMode invalidDateTimeStringMode) { this.invalidDateTimeStringMode = invalidDateTimeStringMode; } }
[ "chrisbogen@gmail.com" ]
chrisbogen@gmail.com
d3a07604ab98d31647eac4e6ed5b010ec867e6e6
1f6226ec9544a3f0bce228907369e593f8ed0856
/core/src/main/java/org/cybergarage/x3d/node/GeometricPropertyNode.java
1a9ff1c477270cf8d3f81f6fdd28fc45642ad80e
[ "BSD-3-Clause" ]
permissive
danke-sra/cybergarage-x3d
fd18a163c2b6acaa6169f447d219a947193a06dc
5651eafc9e3fdc74a917ba2bb916477127f871aa
refs/heads/master
2021-01-18T08:46:44.239939
2016-01-24T01:49:53
2016-01-24T01:49:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
/****************************************************************** * * CyberX3D for Java * * Copyright (C) Satoshi Konno 1997-2002 * * File: GeometricPropertyNode.java * * Revisions: * * 11/25/02 * - The first revision. * ******************************************************************/ package org.cybergarage.x3d.node; public abstract class GeometricPropertyNode extends Node { public GeometricPropertyNode() { } }
[ "skonno@cybergarage.org" ]
skonno@cybergarage.org
bc22b7c4b27518b41e8ed6ee2f47052782b99372
8350b95049403736057ecb75d5b4f66bcc7a35cb
/spring_demos/spring_jdbc_demo/src/main/java/com/demo/dao/PlayerDAO.java
2aae6e3a3c56575110e85d8ee6896518bb6dc9b0
[]
no_license
Bhagava/bnp_simplilearn
d86810d4147fcd64abefe4f5d94f5c9fe0f94d89
544eee418645f85eefe5d5f01c84a7aa76c4bba5
refs/heads/master
2022-11-14T09:27:39.008271
2020-07-09T12:56:24
2020-07-09T12:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package com.demo.dao; import java.util.List; import com.demo.model.Player; public interface PlayerDAO { public Player createPlayer(Player player); public Player getPlayerById(int id); public List<Player> getAllPlayers(); public List<Player> getPlayersByTeamName(String teamName); public void removePlayerById(int id); }
[ "vinay.ingalahalli@revature.com" ]
vinay.ingalahalli@revature.com
1ee709a0214b5706534c0b191ae407f3ccf61769
a3f098e3792e67dd6a07ec35e7915d3ae860a922
/CrazyLogin/src/de/st_ddt/crazylogin/ScheduledKickTask.java
ca676d6b5cc0394f90ff70ead1e61feb5db35965
[]
no_license
samschaap/Crazy
c36c5091057916261e1bcc20d7a4da28d7262534
0233f2a650c2df7caf2243d86bb5e20623c5e72a
refs/heads/master
2020-12-25T05:07:35.171654
2012-06-02T15:08:10
2012-06-02T15:08:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package de.st_ddt.crazylogin; import org.bukkit.entity.Player; import de.st_ddt.crazyutil.locales.CrazyLocale; public class ScheduledKickTask implements Runnable { protected final Player player; protected final CrazyLocale locale; protected final boolean requireAccount; public ScheduledKickTask(final Player player, final CrazyLocale message) { super(); this.player = player; this.locale = message; this.requireAccount = false; } public ScheduledKickTask(final Player player, final CrazyLocale message, final boolean requireAccount) { super(); this.player = player; this.locale = message; this.requireAccount = requireAccount; } @Override public void run() { if (requireAccount) if (!CrazyLogin.getPlugin().hasAccount(player)) player.kickPlayer(locale.getLanguageText(player)); if (!CrazyLogin.getPlugin().isLoggedIn(player)) player.kickPlayer(locale.getLanguageText(player)); } }
[ "ST-DDT@gmx.de" ]
ST-DDT@gmx.de
e0e94da96e9ce445841f13234ad01d64a4371ad2
258b5c34c69179dbcac8fc2d77a1afd5821d4ed6
/MVC+JPA+Freemarker-CarServis/src/main/java/car/servis/servis/AplicationIssuesService.java
9a71bb89ec78b5c4e438406223802b27f5b599ef
[]
no_license
rimmugygr/SpringBoot
199ef3fbd6254a258cfc87542b2bec7125f06a9c
f19f44ec9fbd298b9e90e9c7d7e94fb5fdbefa4c
refs/heads/master
2021-04-04T08:28:36.040921
2020-09-11T18:42:03
2020-09-11T18:42:03
248,441,023
1
0
null
null
null
null
UTF-8
Java
false
false
1,034
java
package car.servis.servis; import car.servis.model.Issue; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; public class AplicationIssuesService implements IssuesService { private List<Issue> issues; public AplicationIssuesService() { this.issues = new ArrayList<>(); issues.add(new Issue(1, "first issue", "small issue", new Date())); issues.add(new Issue(2, "second issue", "big issue", new Date())); issues.add(new Issue(3, "third issue", "small and big issue", new Date())); issues.add(new Issue(4, "four issue", "another issue", new Date())); } @Override public String getIssue() { return "Some Issue"; } @Override public List<Issue> listIssues() { return Collections.unmodifiableList(issues); } @Override public void addIssue(IssueForm issueForm) { issues.add(new Issue(issues.size() + 1, issueForm.getTitle(), issueForm.getContent(), new Date())); } }
[ "rimmugygr@gmail.com" ]
rimmugygr@gmail.com
e1247829f74aa4c861abc4ac140724b11516ba28
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_07f52ae6aa5cf85685a392d9649e436c2a7d0097/LoginViewImpl/2_07f52ae6aa5cf85685a392d9649e436c2a7d0097_LoginViewImpl_s.java
f9d1506ace7d43b83df0d6393b08e97af2674151
[]
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
4,088
java
/** * */ package org.mklab.taskit.client.ui; import org.mklab.taskit.client.ClientFactory; import org.mklab.taskit.client.Messages; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.HasClickHandlers; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.CheckBox; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.InlineLabel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.PasswordTextBox; import com.google.gwt.user.client.ui.TextBox; import com.google.gwt.user.client.ui.Widget; /** * {@link LoginView}の実装クラスです。 * * @author Yuhi Ishikura * @version $Revision$, Jan 21, 2011 */ public class LoginViewImpl extends Composite implements LoginView { private static LoginViewUiBinder uiBinder = GWT.create(LoginViewUiBinder.class); interface LoginViewUiBinder extends UiBinder<Widget, LoginViewImpl> { // no members } @UiField Button loginButton; @UiField TextBox idText; @UiField Label statusLabel; @UiField PasswordTextBox passwordText; @UiField CheckBox autoLoginCheck; @UiField InlineLabel idLabel; @UiField InlineLabel passwordLabel; /** * {@link LoginViewImpl}オブジェクトを構築します。 * * @param clientFactory クライアントファクトリ */ public LoginViewImpl(ClientFactory clientFactory) { initWidget(uiBinder.createAndBindUi(this)); final Messages messages = clientFactory.getMessages(); localizeStrings(messages); bindTextBoxEnterKeyToSubmitButton(); } private void localizeStrings(final Messages messages) { this.idLabel.setText(messages.idLabel()); this.passwordLabel.setText(messages.passwordLabel()); this.loginButton.setText(messages.loginButton()); this.autoLoginCheck.setText(messages.autoLoginCheck()); } /** * テキストフィールド内でEnterキーを入力したときの挙動と、サブミットボタンを押した時の挙動をバインドします。 */ private void bindTextBoxEnterKeyToSubmitButton() { final KeyDownHandler enterHandler = new KeyDownHandler() { @SuppressWarnings("synthetic-access") @Override public void onKeyDown(KeyDownEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER == false) return; enterKeyPressed(); } }; this.idText.addKeyDownHandler(enterHandler); this.passwordText.addKeyDownHandler(enterHandler); } private void enterKeyPressed() { this.loginButton.click(); } /** * @see org.mklab.taskit.client.ui.LoginView#getId() */ @Override public String getId() { return this.idText.getText(); } /** * @see org.mklab.taskit.client.ui.LoginView#getPassword() */ @Override public String getPassword() { return this.passwordText.getText(); } /** * @see org.mklab.taskit.client.ui.LoginView#isAutoLoginEnabled() */ @Override public boolean isAutoLoginEnabled() { final Boolean value = this.autoLoginCheck.getValue(); if (value == null) return false; return value.booleanValue(); } /** * @see org.mklab.taskit.client.ui.LoginView#getSubmitButton() */ @Override public HasClickHandlers getSubmitButton() { return this.loginButton; } /** * @see org.mklab.taskit.client.ui.LoginView#setStatusText(java.lang.String) */ @Override public void setStatusText(String status) { this.statusLabel.setText(status); } /** * @see org.mklab.taskit.client.ui.LoginView#requestFocus() */ @Override public void requestFocus() { this.idText.setFocus(true); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f20481162685c7e9d8672b6090d3ac2e92c380ed
a08d7307a73d77987d8d987444dd88719ed057d7
/java/src/pig/shangyangkeji/Hopeless.java
b7e53528924d80a6ddf0977e1285124029a6e507
[]
no_license
oweson/java--basic
4a5f419645b03373fc8174173a74e65984640661
31a827b6b3ca369b604d6ae52bc5de4acf7af33d
refs/heads/master
2021-06-12T13:17:19.357280
2021-04-12T13:57:24
2021-04-12T13:57:24
128,645,622
2
0
null
null
null
null
UTF-8
Java
false
false
741
java
package pig.shangyangkeji; /** * the class is create by @Author:oweson * * @Date:2019/3/14 0014 22:02 */ public class Hopeless { float f=3.4F; double aDouble=3.4; // 1 int和Integer的区别? // 2 String,stringbuffer,stringbuilder的区别? // 3 hashmap和hashtable的区别? // 4 重载和重写的区别? // 5 四中修饰符的作用? // 6 String x=new String("a")?创建几个对象? // 7 json和xml的解析方式有哪些? // 8 值传递和引用传递? // 9 xml定义有几种方式,有哪些区别? // 10 mvc的各个部分有哪些技术实现的,如何实现的? // 11 常见的约束有哪些?代表什么意思?如何的使用? // 12 }
[ "570347720@qq.com" ]
570347720@qq.com
e8c830379def125a24f2c0ed6e633714051d124d
f46891cca8db8bb3b4b7a1acdf4b60e50f709b0b
/thirdparty-osgi/sip/nist-sip/src/gov/nist/javax/sip/stack/DefaultRouter.java
79ce9c4bd7472191170c6554c382924a8746166d
[]
no_license
BackupTheBerlios/osgirepo
7778117c9850bbde753e5a470fd546b1ed39063d
581645f2d269a577c76c4bdc40cc01cd68bffbd3
refs/heads/master
2021-01-19T14:58:47.088987
2005-07-29T09:18:00
2005-07-29T09:18:00
40,255,705
0
0
null
null
null
null
UTF-8
Java
false
false
7,575
java
/******************************************************************************* * Product of NIST/ITL Advanced Networking Technologies Division (ANTD). * ******************************************************************************/ package gov.nist.javax.sip.stack; import gov.nist.javax.sip.message.*; import gov.nist.javax.sip.address.*; import gov.nist.javax.sip.header.*; import gov.nist.javax.sip.*; import gov.nist.core.*; import javax.sip.*; import java.util.Iterator; import java.util.LinkedList; import java.util.ListIterator; import javax.sip.message.*; import javax.sip.address.*; /** * This is the default router. When the implementation wants to forward * a request and had run out of othe options, then it calls this method * to figure out where to send the request. The default router implements * a simple "default routing algorithm" which just forwards to the configured * proxy address. Use this for UAC/UAS implementations and use the ProxyRouter * for proxies. * * @version JAIN-SIP-1.1 $Revision: 1.1 $ $Date: 2004/11/15 14:24:54 $ * * @author M. Ranganathan <mranga@nist.gov> <br/> * * <a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a> * */ public class DefaultRouter implements Router { protected SIPMessageStack sipStack; protected HopImpl defaultRoute; /** * Constructor. */ public DefaultRouter(SipStack sipStack, String defaultRoute) { this.sipStack = (SIPMessageStack) sipStack; if (defaultRoute != null) { this.defaultRoute = new HopImpl(defaultRoute); } } /** * Constructor given SIPStack as an argument (this is only for the * protocol tester. Normal implementation should not need this. */ public DefaultRouter(SIPMessageStack sipStack, String defaultRoute) { this.sipStack = sipStack; if (defaultRoute != null) { this.defaultRoute = new HopImpl(defaultRoute); } } /** * Return true if I have a listener listening here. */ private boolean hopsBackToMe(String host, int port) { Iterator it = ((SipStackImpl) sipStack).getListeningPoints(); while (it.hasNext()) { ListeningPoint lp = (ListeningPoint) it.next(); if (((SipStackImpl) sipStack).getIPAddress().equalsIgnoreCase(host) && lp.getPort() == port) return true; } return false; } /** * Return addresses for default proxy to forward the request to. * The list is organized in the following priority. * If the requestURI refers directly to a host, the host and port * information are extracted from it and made the next hop on the * list. * If the default route has been specified, then it is used * to construct the next element of the list. * Bug reported by Will Scullin -- maddr was being ignored when * routing requests. Bug reported by Antonis Karydas - the RequestURI can * be a non-sip URI. * * @param request is the sip request to route. * */ public ListIterator getNextHops(Request request) { SIPRequest sipRequest = (SIPRequest) request; RequestLine requestLine = sipRequest.getRequestLine(); if (requestLine == null) throw new IllegalArgumentException("Bad message"); javax.sip.address.URI requestURI = requestLine.getUri(); if (requestURI == null) throw new IllegalArgumentException("Bad message: Null requestURI"); LinkedList ll = null; RouteList routes = sipRequest.getRouteHeaders(); if (routes != null) { // This has a route header so lets use the address // specified in the record route header. // Bug reported by Jiang He ll = new LinkedList(); Route route = (Route) routes.getFirst(); SipUri uri = (SipUri) route.getAddress().getURI(); int port; if (uri.getHostPort().hasPort()) { sipStack.logWriter.logMessage("routeHeader = " + uri.encode()); sipStack.logWriter.logMessage( "port = " + uri.getHostPort().getPort()); port = uri.getHostPort().getPort(); } else { port = 5060; } String host = uri.getHost(); String transport = uri.getTransportParam(); if (transport == null) transport = SIPConstants.UDP; HopImpl hop = new HopImpl(host, port, transport); ll.add(hop); // routes.removeFirst(); // sipRequest.setRequestURI(uri); if (LogWriter.needsLogging) sipStack.logWriter.logMessage( "We use the Route header to " + "forward the message"); } else if ( requestURI instanceof SipURI && ((SipURI) requestURI).getMAddrParam() != null) { String maddr = ((SipURI) requestURI).getMAddrParam(); String transport = ((SipURI) requestURI).getTransportParam(); if (transport == null) transport = SIPConstants.UDP; int port = 5060; HopImpl hop = new HopImpl(maddr, port, transport); hop.setURIRouteFlag(); ll = new LinkedList(); ll.add(hop); if (LogWriter.needsLogging) sipStack.logWriter.logMessage("Added Hop = " + hop.toString()); } else if (requestURI instanceof SipURI) { String host = ((SipURI) requestURI).getHost(); int port = ((SipURI) requestURI).getPort(); if (port == -1) port = 5060; if (hopsBackToMe(host, port)) { // Egads! route points back at me - better bail. return null; } String transport = ((SipURI) requestURI).getTransportParam(); if (transport == null) transport = SIPConstants.UDP; HopImpl hop = new HopImpl(host, port, transport); ll = new LinkedList(); ll.add(hop); if (LogWriter.needsLogging) sipStack.logWriter.logMessage("Added Hop = " + hop.toString()); } if (defaultRoute != null) { if (ll == null) ll = new LinkedList(); ll.add(defaultRoute); if (LogWriter.needsLogging) { sipStack.logWriter.logMessage( "Added Hop = " + defaultRoute.toString()); } } return ll == null ? null : ll.listIterator(); } /** * Get the default hop. * * @return defaultRoute is the default route. * public java.util.Iterator getDefaultRoute(Request request) * { return this.getNextHops((SIPRequest)request); } */ public javax.sip.address.Hop getOutboundProxy() { return this.defaultRoute; } /** * Get the default route (does the same thing as getOutboundProxy). * * @return the default route. */ public Hop getDefaultRoute() { return this.defaultRoute; } } /* * $Log: DefaultRouter.java,v $ * Revision 1.1 2004/11/15 14:24:54 afrei * initial checkin to osgirepo * * Revision 1.1 2004/11/14 14:30:17 andfrei * checkin of sip, btapi, axis * * Revision 1.5 2004/06/21 04:59:49 mranga * Refactored code - no functional changes. * * Revision 1.4 2004/01/22 13:26:32 sverker * Issue number: * Obtained from: * Submitted by: sverker * Reviewed by: mranga * * Major reformat of code to conform with style guide. Resolved compiler and javadoc warnings. Added CVS tags. * * CVS: ---------------------------------------------------------------------- * CVS: Issue number: * CVS: If this change addresses one or more issues, * CVS: then enter the issue number(s) here. * CVS: Obtained from: * CVS: If this change has been taken from another system, * CVS: then name the system in this line, otherwise delete it. * CVS: Submitted by: * CVS: If this code has been contributed to the project by someone else; i.e., * CVS: they sent us a patch or a set of diffs, then include their name/email * CVS: address here. If this is your work then delete this line. * CVS: Reviewed by: * CVS: If we are doing pre-commit code reviews and someone else has * CVS: reviewed your changes, include their name(s) here. * CVS: If you have not had it reviewed then delete this line. * */
[ "afrei" ]
afrei
8522f87c26a5d27661149fec656aa8a327a91fea
87901d9fd3279eb58211befa5357553d123cfe0c
/bin/platform/bootstrap/gensrc/de/hybris/platform/cockpit/model/WidgetPreferencesModel.java
f8de972c3ed061b9c265ab10afcff1211724612e
[]
no_license
prafullnagane/learning
4d120b801222cbb0d7cc1cc329193575b1194537
02b46a0396cca808f4b29cd53088d2df31f43ea0
refs/heads/master
2020-03-27T23:04:17.390207
2014-02-27T06:19:49
2014-02-27T06:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,443
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at Dec 13, 2013 6:34:48 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2011 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * */ package de.hybris.platform.cockpit.model; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.core.model.user.UserModel; import de.hybris.platform.servicelayer.model.ItemModelContext; import java.util.Locale; /** * Generated model class for type WidgetPreferences first defined at extension cockpit. */ @SuppressWarnings("all") public class WidgetPreferencesModel extends ItemModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "WidgetPreferences"; /** <i>Generated constant</i> - Attribute key of <code>WidgetPreferences.ownerUser</code> attribute defined at extension <code>cockpit</code>. */ public static final String OWNERUSER = "ownerUser"; /** <i>Generated constant</i> - Attribute key of <code>WidgetPreferences.title</code> attribute defined at extension <code>cockpit</code>. */ public static final String TITLE = "title"; /** <i>Generated variable</i> - Variable of <code>WidgetPreferences.ownerUser</code> attribute defined at extension <code>cockpit</code>. */ private UserModel _ownerUser; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public WidgetPreferencesModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public WidgetPreferencesModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> */ @Deprecated public WidgetPreferencesModel(final ItemModel _owner) { super(); setOwner(_owner); } /** * <i>Generated method</i> - Getter of the <code>WidgetPreferences.ownerUser</code> attribute defined at extension <code>cockpit</code>. * @return the ownerUser */ public UserModel getOwnerUser() { return _ownerUser = getPersistenceContext().getValue(OWNERUSER, _ownerUser); } /** * <i>Generated method</i> - Getter of the <code>WidgetPreferences.title</code> attribute defined at extension <code>cockpit</code>. * @return the title */ public String getTitle() { return getTitle(null); } /** * <i>Generated method</i> - Getter of the <code>WidgetPreferences.title</code> attribute defined at extension <code>cockpit</code>. * @param loc the value localization key * @return the title * @throws IllegalArgumentException if localization key cannot be mapped to data language */ public String getTitle(final Locale loc) { return getPersistenceContext().getLocalizedValue(TITLE, loc); } /** * <i>Generated method</i> - Setter of <code>WidgetPreferences.ownerUser</code> attribute defined at extension <code>cockpit</code>. * * @param value the ownerUser */ public void setOwnerUser(final UserModel value) { _ownerUser = getPersistenceContext().setValue(OWNERUSER, value); } /** * <i>Generated method</i> - Setter of <code>WidgetPreferences.title</code> attribute defined at extension <code>cockpit</code>. * * @param value the title */ public void setTitle(final String value) { setTitle(value,null); } /** * <i>Generated method</i> - Setter of <code>WidgetPreferences.title</code> attribute defined at extension <code>cockpit</code>. * * @param value the title * @param loc the value localization key * @throws IllegalArgumentException if localization key cannot be mapped to data language */ public void setTitle(final String value, final Locale loc) { getPersistenceContext().setLocalizedValue(TITLE, loc, value); } }
[ "admin1@neev31.(none)" ]
admin1@neev31.(none)
0abdc338f6286989aeae7bab5b61b16d5ca9f0d8
75604d83db3d7c6e783a54097687a1bb9d1be338
/src/BaekJoon/P1269.java
24e58f1305de0786d010c70ccb1097f8a4a4b921
[]
no_license
nn98/Algorithm
262cbe20c71ff9b5de292c244b95a2a0c25e5bd7
c1999a8ef3bfc1370abee56c0597c286a1cb81af
refs/heads/master
2023-08-17T04:39:41.236707
2022-09-07T06:22:56
2022-09-07T06:22:56
178,701,901
0
0
null
null
null
null
UTF-8
Java
false
false
552
java
package BaekJoon; import java.util.Arrays; import java.util.Scanner; public class P1269 { public static void main(String[] args) { Scanner s=new Scanner(System.in); int n=s.nextInt(),m=s.nextInt(),i=0,j,r=0,v=0,c[]=new int[100000000]; s.nextLine(); String[]a=s.nextLine().split(" "),b=s.nextLine().split(" "); Arrays.sort(a); Arrays.sort(b); for(;i<n;i++) for(j=v;j<m;j++) { if(a[i].equals(b[j])) { r-=2; v=j+1; } if(a[i].compareTo(b[j])<0)break; } System.out.print(n+m+r); } }
[ "jkllhgb@gmail.com" ]
jkllhgb@gmail.com
c2e1aa8f5d695e7f49b30232be07e70353c95484
350736833b6be9d6ba7e3fe0a41b5fc60f1f0cb6
/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/IfModifiedSince.java
8261ea2c554d5387f35b90ca63ffcbefd1c37e93
[ "Apache-2.0" ]
permissive
jamesbognar/juneau
d798584365e8e948818810e20da844cb1ca35d39
f45834e0f86475a3bbbddfc0f79851ed8974bcc1
refs/heads/master
2021-09-04T22:37:12.558014
2018-01-21T15:47:05
2018-01-21T15:47:05
56,869,710
0
1
null
2016-08-02T13:11:14
2016-04-22T16:27:24
Java
UTF-8
Java
false
false
6,006
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.juneau.http; /** * Represents a parsed <l>If-Modified-Since</l> HTTP request header. * * <p> * Allows a 304 Not Modified to be returned if content is unchanged. * * <h6 class='figure'>Example</h6> * <p class='bcode'> * If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT * </p> * * <h6 class='topic'>RFC2616 Specification</h6> * * The If-Modified-Since request-header field is used with a method to make it conditional: * if the requested variant has not been modified since the time specified in this field, an entity will not be returned * from the server; instead, a 304 (not modified) response will be returned without any message-body. * * <p class='bcode'> * If-Modified-Since = "If-Modified-Since" ":" HTTP-date * </p> * * <p> * An example of the field is: * <p class='bcode'> * If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT * </p> * * <p> * A GET method with an If-Modified-Since header and no Range header requests that the identified entity be transferred * only if it has been modified since the date given by the If-Modified-Since header. * The algorithm for determining this includes the following cases: * <ol> * <li>If the request would normally result in anything other than a 200 (OK) status, or if the passed * If-Modified-Since date is invalid, the response is exactly the same as for a normal GET. * A date which is later than the server's current time is invalid. * <li>If the variant has been modified since the If-Modified-Since date, the response is exactly the same as for a * normal GET. * <li>If the variant has not been modified since a valid If-Modified-Since date, the server SHOULD return a 304 * (Not Modified) response. * </ol> * * <p> * The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction * overhead. * * <p> * Note: The Range request-header field modifies the meaning of If-Modified-Since; see section 14.35 for full details. * * <p> * Note: If-Modified-Since times are interpreted by the server, whose clock might not be synchronized with the client. * * <p> * Note: When handling an If-Modified-Since header field, some servers will use an exact date comparison function, * rather than a less-than function, for deciding whether to send a 304 (Not Modified) response. * To get best results when sending an If-Modified-Since header field for cache validation, clients are * advised to use the exact date string received in a previous Last-Modified header field whenever possible. * * <p> * Note: If a client uses an arbitrary date in the If-Modified-Since header instead of a date taken from the * Last-Modified header for the same request, the client should be aware of the fact that this date is interpreted in * the server's understanding of time. * The client should consider unsynchronized clocks and rounding problems due to the different encodings of time between * the client and server. * This includes the possibility of race conditions if the document has changed between the time it was first requested * and the If-Modified-Since date of a subsequent request, and the possibility of clock-skew-related problems if the * If-Modified-Since date is derived from the client's clock without correction to the server's clock. * Corrections for different time bases between client and server are at best approximate due to network latency. * The result of a request having both an If-Modified-Since header field and either an If-Match or an * If-Unmodified-Since header fields is undefined by this specification. * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> * <li class='jp'> * <a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.http</a> * <li class='extlink'> * <a class='doclink' href='https://www.w3.org/Protocols/rfc2616/rfc2616.html'> * Hypertext Transfer Protocol -- HTTP/1.1</a> * </ul> */ public final class IfModifiedSince extends HeaderDate { /** * Returns a parsed <code>If-Modified-Since</code> header. * * @param value The <code>If-Modified-Since</code> header string. * @return The parsed <code>If-Modified-Since</code> header, or <jk>null</jk> if the string was null. */ public static IfModifiedSince forString(String value) { if (value == null) return null; return new IfModifiedSince(value); } private IfModifiedSince(String value) { super(value); } }
[ "jamesbognar@apache.org" ]
jamesbognar@apache.org
469753f7049e2de5d45eb402f679e127aad19a2b
291657ca8cd3b2fd53c9ffe095dd658e0a01b5db
/components/core-services-common/src/main/java/org/squonk/jobdef/JobStatus.java
c9c21bd0dd5b823e35450d4f8dd0b05b71f56188
[ "Apache-2.0" ]
permissive
InformaticsMatters/lac
9f34df904af58656c27502c1fb1fa9fa61d0351d
34183eab1dea692c79ef42efe8e32adbcfdd4b11
refs/heads/master
2021-03-27T19:40:15.255189
2018-02-14T16:16:18
2018-02-14T16:16:18
21,137,261
0
0
null
null
null
null
UTF-8
Java
false
false
4,945
java
package org.squonk.jobdef; import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.UUID; /** Handles the status and definition of a job. * * @author timbo * @param <T> */ public class JobStatus<T extends JobDefinition> implements Serializable { public enum Status { PENDING(false), SUBMITTING(false), RUNNING(false), RESULTS_READY(false), COMPLETED(true), ERROR(true), CANCELLED(true); private boolean finished; Status(boolean finished) { this.finished = finished; } public boolean isFinished() { return finished; } } private final String jobId; private final String username; private final Status status; private final int totalCount; private final int processedCount; private final int errorCount; private final Date started; private final Date completed; private final T jobDefinition; private final List<String> events = new ArrayList<>(); public static <T extends JobDefinition> JobStatus<T> create(T jobDef, String username, Date started, Integer totalCount) { String jobId = UUID.randomUUID().toString(); return new JobStatus(jobId, username, Status.PENDING, totalCount == null ? 0 : totalCount, 0, 0, started, null, jobDef, null); } public JobStatus( @JsonProperty("jobId") String jobId, @JsonProperty("username") String username, @JsonProperty("status") Status status, @JsonProperty("totalCount") int totalCount, @JsonProperty("processedCount") int processedCount, @JsonProperty("errorCount") int errorCount, @JsonProperty("started") Date started, @JsonProperty("completed") Date completed, @JsonProperty("jobDefinition") T jobDefinition, @JsonProperty("events") List<String> events ) { this.jobId = jobId; this.username = username; this.status = status; this.totalCount = totalCount; this.processedCount = processedCount; this.errorCount = errorCount; this.started = started; this.completed = completed; this.jobDefinition = jobDefinition; if (events != null) { this.events.addAll(events); } } public String getJobId() { return jobId; } public String getUsername() { return username; } public Status getStatus() { return status; } public int getTotalCount() { return totalCount; } public int getProcessedCount() { return processedCount; } public int getErrorCount() { return errorCount; } public Date getStarted() { return started; } public Date getCompleted() { return completed; } public T getJobDefinition() { return jobDefinition; } public List<String> getEvents() { return events; } public JobStatus withEvent(String event) { List neu = new ArrayList<>(); neu.addAll(events); neu.add(event); return new JobStatus(jobId, username, status, totalCount, processedCount, errorCount, started, completed, jobDefinition, neu); } public JobStatus withCounts(Integer processedCount, Integer errorCount) { return withStatus(null, processedCount,errorCount, null); } public JobStatus withStatus(Status status, Integer processedCount, Integer errorCount, String event) { Date completed = null; // TODO - block certain status transitions e.g. once complete don't let status be changed int processed = (processedCount == null ? this.processedCount : this.processedCount + processedCount.intValue()); int error = (errorCount == null ? this.errorCount : this.errorCount + errorCount.intValue()); if (status == Status.COMPLETED || status == Status.ERROR || status == Status.CANCELLED) { // does the date come from java or the database? completed = new Date(); } List neu = new ArrayList<>(events); if (event != null) { neu.add(event); } return new JobStatus(jobId, username, status, totalCount, processed, error, started, completed, jobDefinition, neu); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("JobStatus: ").append(status) .append(" JobId=").append(jobId) .append(" Username=").append(username) .append(" Status=").append(status.toString()) .append(" TotalCount=").append(totalCount) .append(" ProcessedCount=").append(processedCount) .append(" ErrorCount=").append(errorCount); return b.toString(); } }
[ "tdudgeon@informaticsmatters.com" ]
tdudgeon@informaticsmatters.com
205bfcc9728004f2093e23e1f0b2685ef309ce2c
bbf526bca24e395fcc87ef627f6c196d30a1844f
/split-strings-by-separator/Solution.java
0059242b0423408f7b36fa349a2829acec99f2af
[]
no_license
charles-wangkai/leetcode
864e39505b230ec056e9b4fed3bb5bcb62c84f0f
778c16f6cbd69c0ef6ccab9780c102b40731aaf8
refs/heads/master
2023-08-31T14:44:52.850805
2023-08-31T03:04:02
2023-08-31T03:04:02
25,644,039
52
18
null
2021-06-05T00:02:50
2014-10-23T15:29:44
Java
UTF-8
Java
false
false
360
java
import java.util.Arrays; import java.util.List; import java.util.regex.Pattern; class Solution { public List<String> splitWordsBySeparator(List<String> words, char separator) { return words.stream() .flatMap(word -> Arrays.stream(word.split(Pattern.quote(String.valueOf(separator))))) .filter(s -> !s.isEmpty()) .toList(); } }
[ "charles.wangkai@gmail.com" ]
charles.wangkai@gmail.com
d8f4ba1c0e3d767cb8a99f3686b401cf94d260eb
5bc4400f0b1cedc14ecbbf35ee13ecd528347f77
/src/main/java/LeetCode/LC_601_800/LC750/Solution_2.java
57f35bd5ffbd6bff726e49152b757e6c10f985c1
[]
no_license
SLYJason/OJ-ALG
6de4ab14434b02f86fa21b00d5c636fffa324150
ecfd4bb6ee9e1c254bee1cfd143be82f02f6ec69
refs/heads/master
2023-07-06T06:57:21.943147
2023-06-21T05:21:25
2023-06-21T05:21:25
133,293,420
0
0
null
2022-09-06T02:04:40
2018-05-14T02:15:18
Java
UTF-8
Java
false
false
578
java
package LeetCode.LC_601_800.LC750; /** * Solution 2: fixed row scan by column. */ public class Solution_2 { public int countCornerRectangles(int[][] grid) { int rows = grid.length, cols = grid[0].length, res = 0; for(int r1=0; r1<rows-1; r1++) { for(int r2=r1+1; r2<rows; r2++) { int count = 0; for(int c=0; c<cols; c++) { if(grid[r1][c] == 1 && grid[r2][c] == 1) count++; } res += count * (count - 1) / 2; } } return res; } }
[ "songly91.6.1@gmail.com" ]
songly91.6.1@gmail.com
db4703c1c293664ae3810b4bb7b346e1cfe8fed4
9a513db24f6d400f5aafc97615c1d0653b8d05a1
/OCCJava/IGESData_IGESType.java
bd37b05acca566da9d0d0c0df2767126ffbd6748
[]
no_license
Aircraft-Design-UniNa/jpad-occt
71d44cb3c2a906554caeae006199e1885b6ebc6c
f0aae35a8ae7c25c860d6c5ca5262f2b9da53432
refs/heads/master
2020-05-01T04:52:43.335920
2019-03-23T15:08:04
2019-03-23T15:08:04
177,285,955
3
1
null
null
null
null
UTF-8
Java
false
false
2,270
java
package opencascade; /** * taken from directory part of an entity (from file or model), * gives "type" and "form" data, used to recognize entity's type */ public class IGESData_IGESType { protected long swigCPtr; protected boolean swigCMemOwn; protected Object swigParent; IGESData_IGESType(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } IGESData_IGESType(long cPtr, boolean cMemoryOwn, Object Parent) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; if ( ! cMemoryOwn ) swigParent = Parent; // keep reference to assumed parent object } static long getCPtr(IGESData_IGESType obj) { return (obj == null) ? 0 : obj.swigCPtr; } // Auxiliary structure for holding wrapped C reference to object // requiring explicit decision to use it either as reference or a copy /*public class CRef { public CRef (IGESData_IGESType ptr) { Ptr = ptr; } public IGESData_IGESType AsReference () { return Ptr; } public IGESData_IGESType AsCopy () { return Ptr.MakeCopy(); } public IGESData_IGESType Ptr; }*/ protected void finalize() { delete(); } public synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; OCCwrapJavaJNI.delete_IGESData_IGESType(swigCPtr); } swigCPtr = 0; } } public IGESData_IGESType() { this(OCCwrapJavaJNI.new_IGESData_IGESType__SWIG_0(), true); } public IGESData_IGESType(int atype, int aform) { this(OCCwrapJavaJNI.new_IGESData_IGESType__SWIG_1(atype, aform), true); } /** * returns "type" data */ public int Type() { return OCCwrapJavaJNI.IGESData_IGESType_Type(swigCPtr, this); } /** * returns "form" data */ public int Form() { return OCCwrapJavaJNI.IGESData_IGESType_Form(swigCPtr, this); } /** * compares two IGESTypes, avoiding comparing their fields */ public long IsEqual( IGESData_IGESType another) { return OCCwrapJavaJNI.IGESData_IGESType_IsEqual(swigCPtr, this, IGESData_IGESType.getCPtr(another), another); } /** * resets fields (usefull when an IGESType is stored as mask) */ public void Nullify() { OCCwrapJavaJNI.IGESData_IGESType_Nullify(swigCPtr, this); } }
[ "agostino.demarco@unina.it" ]
agostino.demarco@unina.it
3f406dbce24a1cceab6da628da52cc28320979f3
43c29aa47f551000e1f1ba81cec8495fbfb52806
/src/edu/washington/escience/myria/operator/network/CollectProducer.java
e57d504496a8d91fc24fd64950e4c82a7d0e64fc
[]
no_license
UFFeScience/Myria
2cad6b7ea139bef93e2497a87bd38b6c0a390599
bf2c64e7816a990e64fe893bd88143770e76aaed
refs/heads/master
2020-06-14T22:24:00.238666
2019-07-04T00:38:04
2019-07-04T00:38:04
195,143,737
0
0
null
null
null
null
UTF-8
Java
false
false
1,133
java
package edu.washington.escience.myria.operator.network; import edu.washington.escience.myria.operator.Operator; import edu.washington.escience.myria.operator.network.distribute.BroadcastDistributeFunction; import edu.washington.escience.myria.parallel.ExchangePairID; /** * The producer part of the Collect Exchange operator. The producer actively pushes the tuples generated by the child * operator to the paired CollectConsumer. */ public class CollectProducer extends GenericShuffleProducer { /** Required for Java serialization. */ private static final long serialVersionUID = 1L; /** * @param child the child who provides data for this producer to distribute. * @param operatorID destination operator the data goes * @param consumerWorkerID destination worker the data goes. */ public CollectProducer( final Operator child, final ExchangePairID operatorID, final int consumerWorkerID) { super( child, new ExchangePairID[] {operatorID}, new int[] {consumerWorkerID}, new BroadcastDistributeFunction()); this.distributeFunction.setDestinations(1, 1); } }
[ "danielcmo@ic.uff.br" ]
danielcmo@ic.uff.br
13ad20f8d2c5584108a372c691b3f4d8d9fb722f
d7b2a4a222d33f2e71d31b6a158e23d09635645c
/groundsdk/src/main/java/com/parrot/drone/groundsdk/device/peripheral/ThermalCamera.java
8532e7cd0dbce249d6c1e4fbe149a0b2f130356c
[]
permissive
BanditFly/groundsdk-android
fbe15cd834b28639c878737d04d3cb7b787525d0
e1e1dbd2f948524d51e10474d19176116f031643
refs/heads/master
2020-08-04T08:59:20.054023
2019-07-01T09:29:26
2019-07-01T09:29:26
212,081,464
1
0
BSD-3-Clause
2019-10-01T11:40:59
2019-10-01T11:40:59
null
UTF-8
Java
false
false
2,404
java
/* * Copyright (C) 2019 Parrot Drones SAS * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of the Parrot Company 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 * PARROT COMPANY BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ package com.parrot.drone.groundsdk.device.peripheral; import com.parrot.drone.groundsdk.Ref; import com.parrot.drone.groundsdk.device.Drone; import com.parrot.drone.groundsdk.device.peripheral.camera.Camera; /** * Thermal camera interface for drones. * <p> * Provides access to a drone's thermal camera, if available. * <p> * The thermal camera can be {@link Camera#isActive() activated} by changing the * {@link ThermalControl#mode() thermal mode}. * <p> * The thermal camera can be obtained from a {@link Drone drone} using: * <pre>{@code drone.getPeripheral(ThermalCamera.class)}</pre> * * @see Drone#getPeripheral(Class) * @see Drone#getPeripheral(Class, Ref.Observer) */ public interface ThermalCamera extends Peripheral, Camera { }
[ "mathieu.vinel@parrot.com" ]
mathieu.vinel@parrot.com
1e2ca1faeaea8f00c8c4e07b29342b7194c222f8
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/domain/KoubeiAdvertCommissionRoleQueryModel.java
b96a12d96e74ac5d163f97452df42f43673eebde
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,420
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 口碑客签约查询 * * @author auto create * @since 1.0, 2017-02-10 14:26:07 */ public class KoubeiAdvertCommissionRoleQueryModel extends AlipayObject { private static final long serialVersionUID = 8224299864591359733L; /** * 角色code码,如果不提供该字段,则会遍历所有角色,并返回user_identify是否拥有, MISSION_PROMO:任务推广角色 MISSION_PUBLISH:任务发布角色 */ @ApiField("role_code") private String roleCode; /** * 用户身份主键 user_identify_type=user_id -值必须是支付宝账户ID */ @ApiField("user_identify") private String userIdentify; /** * 用户身份主键类型 user_id - 支付宝账户ID */ @ApiField("user_identify_type") private String userIdentifyType; public String getRoleCode() { return this.roleCode; } public void setRoleCode(String roleCode) { this.roleCode = roleCode; } public String getUserIdentify() { return this.userIdentify; } public void setUserIdentify(String userIdentify) { this.userIdentify = userIdentify; } public String getUserIdentifyType() { return this.userIdentifyType; } public void setUserIdentifyType(String userIdentifyType) { this.userIdentifyType = userIdentifyType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
608a1209cfb15627acf0d0fdd2620defbd835a69
37031192d3e68c7f168da7d49bf28733e00927c3
/src/main/java/com/raro/web/config/social/SocialConfiguration.java
d50e3cc5e9d5b9b7ce3efb6f3b812068e92a2064
[]
no_license
Tonterias2/draft3
4dbb16d17273e09eec1ad8d251ceedfec49073db
4fd159beb8424e8a7ad8b82f60ce80d9c82b898c
refs/heads/master
2020-03-21T03:39:11.584377
2018-06-23T10:44:01
2018-06-23T10:44:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,540
java
package com.raro.web.config.social; import com.raro.web.repository.SocialUserConnectionRepository; import com.raro.web.repository.CustomSocialUsersConnectionRepository; import com.raro.web.security.social.CustomSignInAdapter; import io.github.jhipster.config.JHipsterProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.social.UserIdSource; import org.springframework.social.config.annotation.ConnectionFactoryConfigurer; import org.springframework.social.config.annotation.EnableSocial; import org.springframework.social.config.annotation.SocialConfigurer; import org.springframework.social.connect.ConnectionFactoryLocator; import org.springframework.social.connect.ConnectionRepository; import org.springframework.social.connect.UsersConnectionRepository; import org.springframework.social.connect.web.ConnectController; import org.springframework.social.connect.web.ProviderSignInController; import org.springframework.social.connect.web.ProviderSignInUtils; import org.springframework.social.connect.web.SignInAdapter; import org.springframework.social.facebook.connect.FacebookConnectionFactory; import org.springframework.social.google.connect.GoogleConnectionFactory; import org.springframework.social.security.AuthenticationNameUserIdSource; import org.springframework.social.twitter.connect.TwitterConnectionFactory; // jhipster-needle-add-social-connection-factory-import-package /** * Basic Spring Social configuration. * * <p> * Creates the beans necessary to manage Connections to social services and * link accounts from those services to internal Users. */ @Configuration @EnableSocial public class SocialConfiguration implements SocialConfigurer { private final Logger log = LoggerFactory.getLogger(SocialConfiguration.class); private final SocialUserConnectionRepository socialUserConnectionRepository; private final Environment environment; public SocialConfiguration(SocialUserConnectionRepository socialUserConnectionRepository, Environment environment) { this.socialUserConnectionRepository = socialUserConnectionRepository; this.environment = environment; } @Bean public ConnectController connectController(ConnectionFactoryLocator connectionFactoryLocator, ConnectionRepository connectionRepository) { ConnectController controller = new ConnectController(connectionFactoryLocator, connectionRepository); controller.setApplicationUrl(environment.getProperty("spring.application.url")); return controller; } @Override public void addConnectionFactories(ConnectionFactoryConfigurer connectionFactoryConfigurer, Environment environment) { // Google configuration String googleClientId = environment.getProperty("spring.social.google.client-id"); String googleClientSecret = environment.getProperty("spring.social.google.client-secret"); if (googleClientId != null && googleClientSecret != null) { log.debug("Configuring GoogleConnectionFactory"); connectionFactoryConfigurer.addConnectionFactory( new GoogleConnectionFactory( googleClientId, googleClientSecret ) ); } else { log.error("Cannot configure GoogleConnectionFactory id or secret null"); } // Facebook configuration String facebookClientId = environment.getProperty("spring.social.facebook.client-id"); String facebookClientSecret = environment.getProperty("spring.social.facebook.client-secret"); if (facebookClientId != null && facebookClientSecret != null) { log.debug("Configuring FacebookConnectionFactory"); connectionFactoryConfigurer.addConnectionFactory( new FacebookConnectionFactory( facebookClientId, facebookClientSecret ) ); } else { log.error("Cannot configure FacebookConnectionFactory id or secret null"); } // Twitter configuration String twitterClientId = environment.getProperty("spring.social.twitter.client-id"); String twitterClientSecret = environment.getProperty("spring.social.twitter.client-secret"); if (twitterClientId != null && twitterClientSecret != null) { log.debug("Configuring TwitterConnectionFactory"); connectionFactoryConfigurer.addConnectionFactory( new TwitterConnectionFactory( twitterClientId, twitterClientSecret ) ); } else { log.error("Cannot configure TwitterConnectionFactory id or secret null"); } // jhipster-needle-add-social-connection-factory } @Override public UserIdSource getUserIdSource() { return new AuthenticationNameUserIdSource(); } @Override public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) { return new CustomSocialUsersConnectionRepository(socialUserConnectionRepository, connectionFactoryLocator); } @Bean public SignInAdapter signInAdapter(UserDetailsService userDetailsService, JHipsterProperties jHipsterProperties) { return new CustomSignInAdapter(userDetailsService, jHipsterProperties); } @Bean public ProviderSignInController providerSignInController(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository, SignInAdapter signInAdapter) { ProviderSignInController providerSignInController = new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, signInAdapter); providerSignInController.setSignUpUrl("/social/signup"); providerSignInController.setApplicationUrl(environment.getProperty("spring.application.url")); return providerSignInController; } @Bean public ProviderSignInUtils getProviderSignInUtils(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository) { return new ProviderSignInUtils(connectionFactoryLocator, usersConnectionRepository); } }
[ "ecorreos@htomail.com" ]
ecorreos@htomail.com
708b10d68bee60944ecf6b13daa1b62d397cf7e0
95a92a0b1ad90c223e18c414c249ffbebd316d36
/src/pagina90/exercicio1/A.java
29495039c8bc87848042a437460c313db0608581
[]
no_license
mucheniski/java-se-8-programmer-1
0b5285c1455b23c66c87f5dece64674ec60a9066
bec177aa4994174f499c069745191ebf52956ce5
refs/heads/master
2020-09-13T13:51:09.708868
2019-12-24T20:24:34
2019-12-24T20:24:34
222,805,940
0
0
null
null
null
null
ISO-8859-1
Java
false
false
346
java
package pagina90.exercicio1; /* 1) Escolha a opção adequada ao tentar compilar e rodar o arquivo a seguir: b) Compila e garbage coleta 10 objetos do tipo B na linha do System.out */ class A { public static void main(String[] args) { B b; for (int i = 0; i < 10; i++) b = new B(); System.out.println("end!"); } }
[ "mucheniski@gmail.com" ]
mucheniski@gmail.com
22b1e3b33e453c8a5065eef5297f284dd7e476e3
f11168009752bf3f446227bf07ffa431fcb16964
/ph-xml/src/main/java/com/helger/xml/sax/WrappedCollectingSAXErrorHandler.java
1fb82d98036a1b9d7b33146827f5db031a387238
[ "Apache-2.0" ]
permissive
Ahmet-Kaplan/ph-commons
3f03a24371518bebdba19c7e67c77238d9681b2b
d86425c2e337e19bee4bd0cbf80b82bf0072cc9a
refs/heads/master
2021-01-13T03:59:56.988927
2017-01-05T09:59:40
2017-01-05T09:59:40
78,121,838
0
0
null
null
null
null
UTF-8
Java
false
false
2,074
java
/** * Copyright (C) 2014-2017 Philip Helger (www.helger.com) * philip[at]helger[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.helger.xml.sax; import javax.annotation.Nonnull; import javax.annotation.concurrent.ThreadSafe; import org.xml.sax.SAXParseException; import com.helger.commons.ValueEnforcer; import com.helger.commons.annotation.ReturnsMutableObject; import com.helger.commons.error.level.IErrorLevel; import com.helger.commons.error.list.ErrorList; import com.helger.commons.string.ToStringGenerator; /** * An error handler implementation that stores all warnings, errors and fatal * errors. * * @author Philip Helger * @since 8.5.1 */ @ThreadSafe public class WrappedCollectingSAXErrorHandler extends AbstractSAXErrorHandler { private final ErrorList m_aErrorList; public WrappedCollectingSAXErrorHandler (@Nonnull final ErrorList aErrorList) { m_aErrorList = ValueEnforcer.notNull (aErrorList, "ErrorList"); } /** * @return The error list object passed in the constructor. Never * <code>null</code>. */ @Nonnull @ReturnsMutableObject ("design") public ErrorList getWrappedErrorList () { return m_aErrorList; } @Override protected void internalLog (@Nonnull final IErrorLevel aErrorLevel, final SAXParseException aException) { m_aErrorList.add (getSaxParseError (aErrorLevel, aException)); } @Override public String toString () { return ToStringGenerator.getDerived (super.toString ()).append ("ErrorList", m_aErrorList).toString (); } }
[ "philip@helger.com" ]
philip@helger.com
e2a1935ce104f35289d6943036e88c86d838807d
97efc6fa9e64e2b8637a93dbe6da7abb573aa1b9
/src/main/java/com/servtech/servcloud/app/controller/yihcheng/YihChengLineOeeDayController.java
eef519580ff1a8813bc0a3135cf7ecc290ec2439
[]
no_license
smartaid1980/STOutsource
c65a1a77749973e6b05106d8dabdfa848be76a97
d5bc21c2d69d5cb72743a22ba79c794d18786ac3
refs/heads/master
2023-01-04T23:40:14.806766
2020-10-29T02:34:32
2020-10-29T02:34:32
301,026,621
0
0
null
null
null
null
UTF-8
Java
false
false
3,843
java
package com.servtech.servcloud.app.controller.yihcheng; import com.servtech.servcloud.app.model.servtrack.Line; import com.servtech.servcloud.app.model.servtrack.LineOee; import com.servtech.servcloud.app.model.servtrack.view.TrackingDetailView; import com.servtech.servcloud.core.db.ActiveJdbc; import com.servtech.servcloud.core.db.Operation; import com.servtech.servcloud.core.util.RequestResult; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.List; import java.util.Map; import static com.servtech.servcloud.app.controller.yihcheng.YihChengProductProcessQualityController.getToolMoldEmployee; import static com.servtech.servcloud.core.util.RequestResult.success; /** * Created by Frank on 2017/7/7. */ @RestController @RequestMapping("/yihcheng/lineoeeday") public class YihChengLineOeeDayController { @Autowired private HttpServletRequest request; @Autowired private HttpServletResponse response; @RequestMapping(value = "/readtracking", method = RequestMethod.POST) public RequestResult<List<Map>> readTracking(@RequestBody final Map data) { final String startDate = data.get("startDate").toString(); final String endDate = data.get("endDate").toString(); final String lineId = data.get("lineId") == null? "" : data.get("lineId").toString(); return ActiveJdbc.oper(new Operation<RequestResult<List<Map>>>() { @Override public RequestResult<List<Map>> operate() { StringBuilder sb = new StringBuilder(); sb.append("SELECT * FROM a_servtrack_view_tracking_detail "); sb.append("WHERE "); sb.append("(shift_day BETWEEN "); sb.append("'" + startDate + "'"); sb.append("AND "); sb.append("'" + endDate + "')"); if (!"".equals(lineId) && !lineId.equals("null")) { sb.append("AND "); sb.append("line_id = '" + lineId + "' "); } sb.append("ORDER BY move_in ASC"); String sql = sb.toString(); List<Map> result = TrackingDetailView.findBySQL(sql).toMaps(); for (Map data : result) { data.put("shift_day", data.get("shift_day").toString()); //新增資訊 String lot_purpose = data.get("lot_purpose") == null ? null : data.get("lot_purpose").toString(); String shift = data.get("shift") == null ? null : data.get("shift").toString(); String op = data.get("op").toString(); String lineId = data.get("line_id").toString(); String moveIn = data.get("move_in").toString(); Map<String, Object> toolMoldEmpInfo = getToolMoldEmployee(moveIn, lineId, data.get("work_id").toString(), op); Object toolId = toolMoldEmpInfo.get("toolId"); Object moldId = toolMoldEmpInfo.get("moldId"); Object employeeName = toolMoldEmpInfo.get("employeeName"); data.put("shift", shift); data.put("lot_purpose", lot_purpose); data.put("tool_id", toolId); data.put("mold_id", moldId); data.put("employee_name", employeeName); } return success(result); } }); } }
[ "jacokao@servtech.com.tw" ]
jacokao@servtech.com.tw
e37465425ad4371eed0d8570c53f1c61d3f9c94b
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a147/A147691.java
ec40f66fed9818d3919e5bb56f97a65779f70e84
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
package irvine.oeis.a147; // Generated by gen_linrec.pl - DO NOT EDIT here! import irvine.oeis.LinearRecurrence; /** * A147691 G.f.: <code>x*(1+x+x^2)*(1+6*x+8*x^2+4*x^3-x^4)/((1+x)^2*(1-x)^4)</code>. * @author Georg Fischer */ public class A147691 extends LinearRecurrence { /** Construct the sequence. */ public A147691() { super(new long[] {-1L, 2L, 1L, -4L, 1L, 2L}, new long[] {9L, 34L, 91L, 192L, 353L, 584L}, new long[] {0L, 1L}); } // constructor() } // A147691
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
b25a77bac8ed2229e8104a650cd78b18004b15ef
70f7a06017ece67137586e1567726579206d71c7
/alimama/src/main/java/com/huawei/hms/support/api/push/a/c/e.java
b55317b43341d5da22c521f0939c1cd69d586021
[]
no_license
liepeiming/xposed_chatbot
5a3842bd07250bafaffa9f468562021cfc38ca25
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
refs/heads/master
2022-12-20T16:48:21.747036
2020-10-14T02:37:49
2020-10-14T02:37:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,988
java
package com.huawei.hms.support.api.push.a.c; import android.app.Notification; import android.content.Context; import android.graphics.Bitmap; import android.text.TextUtils; import com.huawei.hms.support.api.push.a.b.a; /* compiled from: PushNotificationStyle */ public class e { public static void a(Context context, Notification.Builder builder, int i, Bitmap bitmap, a aVar) { if (aVar == null || aVar.l() == null) { com.huawei.hms.support.log.a.b("PushSelfShowLog", "msg is null"); } else if (!TextUtils.isEmpty(aVar.l()) && aVar.l().contains("##")) { builder.setTicker(aVar.l().replace("##", ",")); if (!com.huawei.hms.support.api.push.a.d.a.b()) { builder.setContentText(aVar.l().replace("##", ",")); return; } builder.setLargeIcon(bitmap); builder.setContentTitle(c.a(context, aVar)); Notification.InboxStyle inboxStyle = new Notification.InboxStyle(); String[] split = aVar.l().split("##"); int length = split.length; if (length > 4) { length = 4; } if (!TextUtils.isEmpty(aVar.x())) { inboxStyle.setBigContentTitle(aVar.x()); builder.setContentText(aVar.x()); if (4 == length) { length--; } } for (int i2 = 0; i2 < length; i2++) { inboxStyle.addLine(split[i2]); } if (aVar.v() != null && aVar.v().length > 0) { int length2 = aVar.v().length; for (int i3 = 0; i3 < length2; i3++) { if (!TextUtils.isEmpty(aVar.v()[i3]) && !TextUtils.isEmpty(aVar.w()[i3])) { builder.addAction(0, aVar.v()[i3], c.a(context, i, aVar.w()[i3])); } } } builder.setStyle(inboxStyle); } } }
[ "zhangquan@snqu.com" ]
zhangquan@snqu.com
644c45b276a5bc6d8c3e42df59192bf979cb8006
b21155955c6c18e1bbe3ee527084ad33fa0cabe0
/app/src/main/java/com/ronda/audiodemo/VoiceSearchParams.java
dfdb58c74b2908b6284c739c6fa2cc9ea31aa529
[]
no_license
githubRonda/AudioDemo
da1ffee47c1e98a60b536189aaa09019d3db56ab
55613b0b3138b7923312b3bae3c1a4574e3ab3f1
refs/heads/master
2021-05-14T15:42:55.392111
2018-01-02T09:25:33
2018-01-02T09:25:33
115,997,900
2
1
null
null
null
null
UTF-8
Java
false
false
4,189
java
package com.ronda.audiodemo; import android.os.Build; import android.os.Bundle; import android.provider.MediaStore; import android.text.TextUtils; /** * For more information about voice search parameters, * check https://developer.android.com/guide/components/intents-common.html#PlaySearch */ public final class VoiceSearchParams { public final String query; public boolean isAny; public boolean isUnstructured; public boolean isGenreFocus; public boolean isArtistFocus; public boolean isAlbumFocus; public boolean isSongFocus; public String genre; public String artist; public String album; public String song; /** * Creates a simple object describing the search criteria(条件) from the query and extras. * @param query the query parameter from a voice search * @param extras the extras parameter from a voice search */ public VoiceSearchParams(String query, Bundle extras) { this.query = query; if (TextUtils.isEmpty(query)) { // A generic search like "Play music" sends an empty query isAny = true; } else { if (extras == null) { isUnstructured = true; } else { String genreKey; if (Build.VERSION.SDK_INT >= 21) { genreKey = MediaStore.EXTRA_MEDIA_GENRE; } else { genreKey = "android.intent.extra.genre"; } String mediaFocus = extras.getString(MediaStore.EXTRA_MEDIA_FOCUS); if (TextUtils.equals(mediaFocus, MediaStore.Audio.Genres.ENTRY_CONTENT_TYPE)) { // for a Genre focused search, only genre is set: isGenreFocus = true; genre = extras.getString(genreKey); if (TextUtils.isEmpty(genre)) { // Because of a bug on the platform, genre is only sent as a query, not as // the semantic-aware extras. This check makes it future-proof when the // bug is fixed. genre = query; } } else if (TextUtils.equals(mediaFocus, MediaStore.Audio.Artists.ENTRY_CONTENT_TYPE)) { // for an Artist focused search, both artist and genre are set: isArtistFocus = true; genre = extras.getString(genreKey); artist = extras.getString(MediaStore.EXTRA_MEDIA_ARTIST); } else if (TextUtils.equals(mediaFocus, MediaStore.Audio.Albums.ENTRY_CONTENT_TYPE)) { // for an Album focused search, album, artist and genre are set: isAlbumFocus = true; album = extras.getString(MediaStore.EXTRA_MEDIA_ALBUM); genre = extras.getString(genreKey); artist = extras.getString(MediaStore.EXTRA_MEDIA_ARTIST); } else if (TextUtils.equals(mediaFocus, MediaStore.Audio.Media.ENTRY_CONTENT_TYPE)) { // for a Song focused search, title, album, artist and genre are set: isSongFocus = true; song = extras.getString(MediaStore.EXTRA_MEDIA_TITLE); album = extras.getString(MediaStore.EXTRA_MEDIA_ALBUM); genre = extras.getString(genreKey); artist = extras.getString(MediaStore.EXTRA_MEDIA_ARTIST); } else { // If we don't know the focus, we treat it is an unstructured query: isUnstructured = true; } } } } @Override public String toString() { return "query=" + query + " isAny=" + isAny + " isUnstructured=" + isUnstructured + " isGenreFocus=" + isGenreFocus + " isArtistFocus=" + isArtistFocus + " isAlbumFocus=" + isAlbumFocus + " isSongFocus=" + isSongFocus + " genre=" + genre + " artist=" + artist + " album=" + album + " song=" + song; } }
[ "1575558177@qq.com" ]
1575558177@qq.com
a01b5e39a019adfa68d7e53a953cd8c207dd0046
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/45663/src_1.java
c574974063cb1c0c660aa72060c22a9043370c0a
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,387
java
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation 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 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.core.index; import org.eclipse.jdt.internal.compiler.util.HashtableOfObject; import org.eclipse.jdt.internal.core.util.SimpleSet; public class EntryResult { private char[] word; private HashtableOfObject[] documentTables; private SimpleSet documentNames; public EntryResult(char[] word, HashtableOfObject table) { this.word = word; if (table != null) this.documentTables = new HashtableOfObject[] {table}; } public void addDocumentName(String documentName) { if (this.documentNames == null) this.documentNames = new SimpleSet(3); this.documentNames.add(documentName); } public void addDocumentTable(HashtableOfObject table) { if (this.documentTables == null) { this.documentTables = new HashtableOfObject[] {table}; return; } int length = this.documentTables.length; System.arraycopy(this.documentTables, 0, this.documentTables = new HashtableOfObject[length + 1], 0, length); this.documentTables[length] = table; } public char[] getWord() { return this.word; } public String[] getDocumentNames(Index index) throws java.io.IOException { if (this.documentTables != null) { for (int i = 0, l = this.documentTables.length; i < l; i++) { Object offset = this.documentTables[i].get(word); int[] numbers = index.diskIndex.readDocumentNumbers(offset); for (int j = 0, k = numbers.length; j < k; j++) addDocumentName(index.diskIndex.readDocumentName(numbers[j])); } } if (this.documentNames == null) return new String[0]; String[] names = new String[this.documentNames.elementSize]; int count = 0; Object[] values = this.documentNames.values; for (int i = 0, l = values.length; i < l; i++) if (values[i] != null) names[count++] = (String) values[i]; return names; } public boolean isEmpty() { return this.documentTables == null && this.documentNames == null; } }
[ "375833274@qq.com" ]
375833274@qq.com
f377d5a6c105f7ef0ff60336af022c4af03aa44b
0529524c95045b3232f6553d18a7fef5a059545e
/app/src/androidTest/java/TestCase_abdelrahman_guesspicture_471865509.java
e0013e5edefde5b5e6b13ab352efd0b1c8d2de70
[]
no_license
sunxiaobiu/BasicUnitAndroidTest
432aa3e10f6a1ef5d674f269db50e2f1faad2096
fed24f163d21408ef88588b8eaf7ce60d1809931
refs/heads/main
2023-02-11T21:02:03.784493
2021-01-03T10:07:07
2021-01-03T10:07:07
322,577,379
0
0
null
null
null
null
UTF-8
Java
false
false
700
java
import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import androidx.test.runner.AndroidJUnit4; import org.easymock.EasyMock; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class TestCase_abdelrahman_guesspicture_471865509 { @Test public void testCase() throws Exception { Object var4 = EasyMock.createMock(Canvas.class); Object var1 = EasyMock.createMock(Bitmap.class); Object var2 = EasyMock.createMock(Matrix.class); Object var3 = EasyMock.createMock(Paint.class); ((Canvas)var4).drawBitmap((Bitmap)var1, (Matrix)var2, (Paint)var3); } }
[ "sunxiaobiu@gmail.com" ]
sunxiaobiu@gmail.com
90daf7d4bb1eb8f0e41fef56c1adda714d6658d1
114fb922fda1a339a452c3e1a4ba031e81aabd7e
/src/main/java/no/ica/fraf/common/BookingInterface.java
5ecf7d87bafe4b1886b7b28f717d91dc08b4dfa8
[]
no_license
abrekka/fraf
bfb788b0db784925c998dcc844957657efa79fae
f8995ff2b0fece657017224a112f79cf3eb11e7d
refs/heads/master
2021-01-22T14:45:09.740555
2015-07-31T09:07:00
2015-07-31T09:07:00
39,994,857
0
0
null
null
null
null
ISO-8859-15
Java
false
false
659
java
package no.ica.fraf.common; import java.io.PrintWriter; import no.ica.fraf.FrafException; import no.ica.fraf.xml.InvoiceInterface; /** * Interface for bokføring * * @author abr99 * */ public interface BookingInterface { /** * Bokfører fakturalinje * * @param invoiceInterface * @param batchable * @param printWriter * @throws FrafException */ void bookInvoiceLine(InvoiceInterface invoiceInterface, Batchable batchable, PrintWriter printWriter) throws FrafException; /** * Henter filnavn for bokføringsfil * * @param seq * @return filnavn */ String getFileName(Integer seq); }
[ "atle@brekka.no" ]
atle@brekka.no
09877c4942dc9e506154b35d3216f932b80c9127
26e611565ce0e9eed154caaf6548a281a829d356
/onvif-ws-client/src/main/java/org/onvif/ver10/search/wsdl/GetEventSearchResultsResponse.java
22a2c0162e508187e5ccf894a310676c828ead3d
[ "Apache-2.0" ]
permissive
doniexun/onvif-1
ecb366070dca73781c7baf3b9bcff94dd68001f5
ff9839c099e5f81d877a1753598a508c5c0bfc6b
refs/heads/master
2020-05-27T09:14:42.784064
2017-12-20T18:15:59
2017-12-20T18:15:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,716
java
package org.onvif.ver10.search.wsdl; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.onvif.ver10.schema.FindEventResultList; /** * <p>Classe Java per anonymous complex type. * * <p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="ResultList" type="{http://www.onvif.org/ver10/schema}FindEventResultList"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "resultList" }) @XmlRootElement(name = "GetEventSearchResultsResponse") public class GetEventSearchResultsResponse { @XmlElement(name = "ResultList", required = true) protected FindEventResultList resultList; /** * Recupera il valore della proprietà resultList. * * @return * possible object is * {@link FindEventResultList } * */ public FindEventResultList getResultList() { return resultList; } /** * Imposta il valore della proprietà resultList. * * @param value * allowed object is * {@link FindEventResultList } * */ public void setResultList(FindEventResultList value) { this.resultList = value; } }
[ "f.pompermaier@gmail.com" ]
f.pompermaier@gmail.com
643407160a2d6d8e6d5e9cfd651d4ed3dc50fa99
cc703ea9392d0f4480d5116e7cee2895771a3127
/src/main/java/com/company/learn/RPC/client/entity/MainClient.java
2d696ee195d6d7d857cf437bfcec87b0c50a851d
[]
no_license
gm504117608/guomin
239c352ddab0d5c2ad5ea2f5b6adaf5bbc9f9ab0
3a53713db00edd634634c1b0cf0d902c356b7c39
refs/heads/master
2020-05-30T12:27:20.630406
2017-03-10T09:48:26
2017-03-10T09:48:26
65,165,840
1
0
null
null
null
null
UTF-8
Java
false
false
1,275
java
package com.company.learn.RPC.client.entity; import com.company.learn.RPC.server.service.Hello; /** 服务器端有 Interface 和 Implement 类(实现类), 客户端只有 Interface . 原理: 服务器启动了一个线程监听 Socket 端口, 有Socket访问了, 反序列化解析出 调用哪个Service 哪个 方法, 以及传入的 参数, 再用Socket 写回去. 客户端 利用 Jdk 的Proxy 生成了一个代理类, 在创建 Proxy 时建立与服务器的Socket连接. 调用 Proxy 的方法时, 向服务器发送数据, 等待结果返回. */ public class MainClient { public static void main(String[] args) { // Echo echo = RPC.getProxy(Echo.class, "127.0.0.1", 20382); // // System.out.println(echo.print("hello,hello")); // System.out.println(echo.print("hellow,rod")); // System.out.println(echo.print("hellow,rod")); // System.out.println(echo.print("hellow,rod")); // System.out.println(echo.print("hellow,rod")); // System.out.println(echo.print("hellow,rod")); // System.out.println(echo.print("hellow,rod")); Hello hello = RPC.getProxy(Hello.class, "127.0.0.1", 20382); System.out.println(hello.say("how are you!")); } }
[ "504117608@qq.com" ]
504117608@qq.com
84ce58e2f089a60c95f022932a0764f2ea40af32
764c94d4cf116b0e4d98a38e842e4e6a0468a666
/ebaysdkcore/src/main/java/com/ebay/soap/eBLBaseComponents/BestOfferCounterEnabledDefinitionType.java
72f3b41de297944f082526f7943afc6d2fa5eedb
[]
no_license
linus87/ebaysdk
26dde361dbb75e03fca137eaf6a61c5e892f1303
2fb2cbade57ae654fa83ae1b7c5f3e4f741b1fc1
refs/heads/master
2023-07-19T10:34:02.644641
2021-06-01T13:30:36
2021-06-01T13:30:36
150,661,586
1
0
null
2023-07-18T06:53:34
2018-09-28T00:06:01
Java
UTF-8
Java
false
false
4,057
java
package com.ebay.soap.eBLBaseComponents; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * * Type defining the <b>BestOfferCounterEnabled</b> field that is * returned under the <b>FeatureDefinitions</b> container of the * <b>GetCategoryFeatures</b> response (as long as * <code>BestOfferCounterEnabled</code> is included as a <b>FeatureID</b> value in * the call request or no <b>FeatureID</b> values are passed into the call * request). This field is returned as an * empty element (a boolean value is not returned) if one or more eBay API-enabled sites * support the Best Offer Counter Offer feature. * <br/><br/> * To verify if a specific eBay site supports the Best Offer Counter Offer feature (for most * categories), look for a <code>true</code> value in the * <b>SiteDefaults.BestOfferCounterEnabled</b> field. * <br/><br/> * To verify if a specific category on a specific eBay site supports the Best Offer Counter Offer feature, pass in a <b>CategoryID</b> value in the request, and then * look for a <code>true</code> value in the <b>BestOfferCounterEnabled</b> field * of the corresponding Category node (match up the <b>CategoryID</b> values * if more than one Category IDs were passed in the request). * * * <p>Java class for BestOfferCounterEnabledDefinitionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="BestOfferCounterEnabledDefinitionType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;any/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BestOfferCounterEnabledDefinitionType", propOrder = { "any" }) public class BestOfferCounterEnabledDefinitionType implements Serializable { private final static long serialVersionUID = 12343L; @XmlAnyElement(lax = true) protected List<Object> any; /** * * * @return * array of * {@link Object } * {@link Element } * */ public Object[] getAny() { if (this.any == null) { return new Object[ 0 ] ; } return ((Object[]) this.any.toArray(new Object[this.any.size()] )); } /** * * * @return * one of * {@link Object } * {@link Element } * */ public Object getAny(int idx) { if (this.any == null) { throw new IndexOutOfBoundsException(); } return this.any.get(idx); } public int getAnyLength() { if (this.any == null) { return 0; } return this.any.size(); } /** * * * @param values * allowed objects are * {@link Object } * {@link Element } * */ public void setAny(Object[] values) { this._getAny().clear(); int len = values.length; for (int i = 0; (i<len); i ++) { this.any.add(values[i]); } } protected List<Object> _getAny() { if (any == null) { any = new ArrayList<Object>(); } return any; } /** * * * @param value * allowed object is * {@link Object } * {@link Element } * */ public Object setAny(int idx, Object value) { return this.any.set(idx, value); } }
[ "lyan2@ebay.com" ]
lyan2@ebay.com
d5f0797146388412550db290c576c19abe78ac38
98b34aefc00d6b4c9bde6bbd304de2e913867d3a
/workflow/src/main/java/org/zk/workflow/util/Assert.java
65f3b13abc69130961d559b8140fbf5bc052628b
[]
no_license
zuokai666/WorkFlow
7a05bbf13bd826c7fce057315aac91b824b8f8eb
229265e3c996211bf872b03bf547e0340276a072
refs/heads/master
2020-05-24T08:09:00.676680
2019-08-10T10:27:46
2019-08-10T10:27:46
187,178,321
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package org.zk.workflow.util; import org.springframework.dao.IncorrectResultSizeDataAccessException; public class Assert extends org.springframework.util.Assert{ public static void oneData(int actualSize) { int expectedSize = 1; if (actualSize != expectedSize) { throw new IncorrectResultSizeDataAccessException(expectedSize, actualSize); } } }
[ "13703391897@163.com" ]
13703391897@163.com
4b6d5a45b90601d722174e3ca9bfd0bfc02b7b55
9e20645e45cc51e94c345108b7b8a2dd5d33193e
/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q153_DeliverGoods/Q153_DeliverGoods.java
c5c33a23f074606075ed191b11bb43256e4963cf
[]
no_license
Enryu99/L2jMobius-01-11
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
4683916852a03573b2fe590842f6cac4cc8177b8
refs/heads/master
2023-09-01T22:09:52.702058
2021-11-02T17:37:29
2021-11-02T17:37:29
423,405,362
2
2
null
null
null
null
UTF-8
Java
false
false
5,354
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 quests.Q153_DeliverGoods; import org.l2jmobius.gameserver.model.actor.instance.NpcInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.model.quest.State; public class Q153_DeliverGoods extends Quest { // NPCs private static final int JACKSON = 30002; private static final int SILVIA = 30003; private static final int ARNOLD = 30041; private static final int RANT = 30054; // Items private static final int DELIVERY_LIST = 1012; private static final int HEAVY_WOOD_BOX = 1013; private static final int CLOTH_BUNDLE = 1014; private static final int CLAY_POT = 1015; private static final int JACKSON_RECEIPT = 1016; private static final int SILVIA_RECEIPT = 1017; private static final int RANT_RECEIPT = 1018; // Rewards private static final int SOULSHOT_NO_GRADE = 1835; private static final int RING_OF_KNOWLEDGE = 875; public Q153_DeliverGoods() { super(153, "Deliver Goods"); registerQuestItems(DELIVERY_LIST, HEAVY_WOOD_BOX, CLOTH_BUNDLE, CLAY_POT, JACKSON_RECEIPT, SILVIA_RECEIPT, RANT_RECEIPT); addStartNpc(ARNOLD); addTalkId(JACKSON, SILVIA, ARNOLD, RANT); } @Override public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player) { final String htmltext = event; final QuestState st = player.getQuestState(getName()); if (st == null) { return htmltext; } if (event.equals("30041-02.htm")) { st.setState(State.STARTED); st.set("cond", "1"); st.playSound(QuestState.SOUND_ACCEPT); st.giveItems(DELIVERY_LIST, 1); st.giveItems(CLAY_POT, 1); st.giveItems(CLOTH_BUNDLE, 1); st.giveItems(HEAVY_WOOD_BOX, 1); } return htmltext; } @Override public String onTalk(NpcInstance npc, PlayerInstance player) { final QuestState st = player.getQuestState(getName()); String htmltext = getNoQuestMsg(); if (st == null) { return htmltext; } switch (st.getState()) { case State.CREATED: htmltext = (player.getLevel() < 2) ? "30041-00.htm" : "30041-01.htm"; break; case State.STARTED: switch (npc.getNpcId()) { case ARNOLD: if (st.getInt("cond") == 1) { htmltext = "30041-03.htm"; } else if (st.getInt("cond") == 2) { htmltext = "30041-04.htm"; st.takeItems(DELIVERY_LIST, 1); st.takeItems(JACKSON_RECEIPT, 1); st.takeItems(SILVIA_RECEIPT, 1); st.takeItems(RANT_RECEIPT, 1); st.giveItems(RING_OF_KNOWLEDGE, 1); st.giveItems(RING_OF_KNOWLEDGE, 1); st.rewardExpAndSp(600, 0); st.playSound(QuestState.SOUND_FINISH); st.exitQuest(false); } break; case JACKSON: if (st.hasQuestItems(HEAVY_WOOD_BOX)) { htmltext = "30002-01.htm"; st.takeItems(HEAVY_WOOD_BOX, 1); st.giveItems(JACKSON_RECEIPT, 1); if (st.hasQuestItems(SILVIA_RECEIPT, RANT_RECEIPT)) { st.set("cond", "2"); st.playSound(QuestState.SOUND_MIDDLE); } else { st.playSound(QuestState.SOUND_ITEMGET); } } else { htmltext = "30002-02.htm"; } break; case SILVIA: if (st.hasQuestItems(CLOTH_BUNDLE)) { htmltext = "30003-01.htm"; st.takeItems(CLOTH_BUNDLE, 1); st.giveItems(SILVIA_RECEIPT, 1); st.giveItems(SOULSHOT_NO_GRADE, 3); if (st.hasQuestItems(JACKSON_RECEIPT, RANT_RECEIPT)) { st.set("cond", "2"); st.playSound(QuestState.SOUND_MIDDLE); } else { st.playSound(QuestState.SOUND_ITEMGET); } } else { htmltext = "30003-02.htm"; } break; case RANT: if (st.hasQuestItems(CLAY_POT)) { htmltext = "30054-01.htm"; st.takeItems(CLAY_POT, 1); st.giveItems(RANT_RECEIPT, 1); if (st.hasQuestItems(JACKSON_RECEIPT, SILVIA_RECEIPT)) { st.set("cond", "2"); st.playSound(QuestState.SOUND_MIDDLE); } else { st.playSound(QuestState.SOUND_ITEMGET); } } else { htmltext = "30054-02.htm"; } break; } break; case State.COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; } }
[ "MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b" ]
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
b363163d4551c70b43ca473b0e342c33fff9d817
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/CHART-13b-3-4-SPEA2-WeightedSum:TestLen:CallDiversity/org/jfree/chart/block/BorderArrangement_ESTest.java
0e326d29c65ea02d320602143cfaf260c19af101
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
/* * This file was automatically generated by EvoSuite * Sun Jan 19 01:52:43 UTC 2020 */ package org.jfree.chart.block; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class BorderArrangement_ESTest extends BorderArrangement_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
331286105e478742f3a28570945404969f7247f4
4a3207614a10193c121075605ab45363b44dc8a7
/android/app/src/main/java/com/vitawerks_23533/MainActivity.java
9452caff5a2b377a813a147f3f64ce459968862c
[]
no_license
crowdbotics-apps/vitawerks-23533
1c98b3a51a2c350da53b12085a5cb924e53e36f7
3016a01d4aecc9a0d3d960056486fa6715f6b93c
refs/heads/master
2023-02-05T21:48:04.509785
2020-12-24T05:57:51
2020-12-24T05:57:51
324,075,916
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
package com.vitawerks_23533; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. This is used to schedule * rendering of the component. */ @Override protected String getMainComponentName() { return "vitawerks_23533"; } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
feddf33cc2eeddec717ec796835b333a219243de
7eb351d9585f81bfe5147920ce2cda278e248cd2
/rtp-debtor-core-banking/src/main/java/rtp/demo/debtor/corebanking/routes/DebtorCoreBankingRouteBuilder.java
45116ad764dff63a1cede54ecf9de5db885bbbe5
[ "Apache-2.0" ]
permissive
anurag-saran/rtp-reference
fb1d03fad0492d11b84d3841b08038dfb0b37885
eec7bb2ed200811b17df201d98eee2301d15307f
refs/heads/master
2020-04-23T22:54:19.482108
2019-02-19T10:33:02
2019-02-19T10:33:02
171,517,240
0
0
null
2019-02-19T17:20:44
2019-02-19T17:20:44
null
UTF-8
Java
false
false
1,559
java
package rtp.demo.debtor.corebanking.routes; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.kafka.KafkaComponent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; @Component public class DebtorCoreBankingRouteBuilder extends RouteBuilder { private static final Logger LOG = LoggerFactory.getLogger(DebtorCoreBankingRouteBuilder.class); private String kafkaBootstrap = System.getenv("BOOTSTRAP_SERVERS"); private String kafkaDebtorCompletedPaymentsTopic = System.getenv("DEBTOR_COMPLETED_PAYMENTS_TOPIC"); private String consumerMaxPollRecords = System.getenv("CONSUMER_MAX_POLL_RECORDS"); private String consumerCount = System.getenv("CONSUMER_COUNT"); private String consumerSeekTo = System.getenv("CONSUMER_SEEK_TO"); private String consumerGroup = System.getenv("CONSUMER_GROUP"); @Override public void configure() throws Exception { LOG.info("Configuring Debtor Core Banking Routes"); KafkaComponent kafka = new KafkaComponent(); kafka.setBrokers(kafkaBootstrap); this.getContext().addComponent("kafka", kafka); from("kafka:" + kafkaDebtorCompletedPaymentsTopic + "?brokers=" + kafkaBootstrap + "&maxPollRecords=" + consumerMaxPollRecords + "&consumersCount=" + consumerCount + "&seekTo=" + consumerSeekTo + "&groupId=" + consumerGroup + "&valueDeserializer=rtp.demo.debtor.domain.payments.serde.PaymentDeserializer").routeId("FromKafka") .log("\n/// Debtor Core Banking stub service received payment >>> ${body}"); } }
[ "lizspan@gmail.com" ]
lizspan@gmail.com
40f6c56d99f4c4e737cd6a046c8d3f705f9b4583
43e2ed1afe8fcc9355db34df39bd7299b7b1a9ff
/src/main/java/com/ets/model/Clinician.java
eceda661e09cc7b3609431bb77b43872565cc174
[]
no_license
topdeveloper424/EHR-JAVA
0b420d75d6e6adafdebc3c91610fbed90d388d01
61c7ee66fa844fc5dd65a3a145405489088559ff
refs/heads/master
2022-12-09T21:30:44.241621
2019-10-11T05:28:49
2019-10-11T05:28:49
209,291,391
1
0
null
2022-11-24T05:49:09
2019-09-18T11:27:06
Java
UTF-8
Java
false
false
8,100
java
package com.ets.model; import java.util.Date; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javafx.beans.property.BooleanProperty; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; /** * Original Author: Sumanta Deyashi on Behalf of ETS for Client Company File * Creation Date: 12-09-2016 Initial Version: 0.01 Module Name: Parameter * Definition: Type object of Clinician Class Description: Entity class * Copyright 2016 @Eclipse Technoconsulting Global Pvt. Ltd. * * Modification: Owner: Date: Version: Description: Backup Location for Previous * Version: * * Copyright 2016 @Eclipse Technoconsulting Global Pvt. Ltd. * */ @Entity @Table(name="clinician") public class Clinician { /*************** * Column property ( 1 ) *****************************************/ private IntegerProperty id = new SimpleIntegerProperty(this, "id"); @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") public Integer getId() { return id.get(); } public void setId(Integer id) { this.id.set(id); } public IntegerProperty idProperty() { return this.id; } /*************** * Column property ( 2 ) *****************************************/ private StringProperty code = new SimpleStringProperty(this, "code"); @Column(name = "code") public String getCode() { return code.get(); } public void setCode(String code) { this.code.set(code); } public StringProperty codeProperty() { return code; } // Collumn 3 private StringProperty type = new SimpleStringProperty(this, "type"); @Column(name = "type") public String getType() { return type.get(); } public void setType(String type) { this.type.set(type); } public StringProperty typeProperty() { return type; } // Column 4 private StringProperty firstName = new SimpleStringProperty(this, "firstName"); @Column(name = "first_name") public String getFirstName() { return firstName.get(); } public void setFirstName(String firstName) { this.firstName.set(firstName); } public StringProperty firstNameProperty() { return firstName; } // Column 5 private StringProperty middleName = new SimpleStringProperty(this, "middleName"); @Column(name = "middle_name") public String getMiddleName() { return middleName.get(); } public void setMiddleName(String middleName) { this.middleName.set(middleName); } public StringProperty middleNameProperty() { return middleName; } // Column 6 private StringProperty lastName = new SimpleStringProperty(this, "lastName"); @Column(name = "last_name") public String getLastName() { return lastName.get(); } public void setLastName(String lastName) { this.lastName.set(lastName); } public StringProperty lastNameProperty() { return lastName; } // Column 7 private StringProperty suffix = new SimpleStringProperty(this, "suffix"); @Column(name = "suffix") public String getSuffix() { return suffix.get(); } public void setSuffix(String suffix) { this.suffix.set(suffix); } public StringProperty suffixProperty() { return suffix; } // Column 7 private StringProperty blockSchedule = new SimpleStringProperty(this, "blockSchedule"); @Column(name = "block_schedule") public String getBlockSchedule() { return blockSchedule.get(); } public void setBlockSchedule(String blockSchedule) { this.blockSchedule.set(blockSchedule); } public StringProperty blockScheduleProperty() { return blockSchedule; } // Column 7 private StringProperty lookupName = new SimpleStringProperty(this, "lookupName"); @Column(name = "lookup_name") public String getLookupName() { return lookupName.get(); } public void setLookupName(String lookupName) { this.lookupName.set(lookupName); } public StringProperty lookupNameProperty() { return lookupName; } // Column 8 private StringProperty federalId = new SimpleStringProperty(this, "federalId"); @Column(name = "federal_id") public String getFederalId() { return federalId.get(); } public void setFederalId(String federalId) { this.federalId.set(federalId); } public StringProperty federalIdProperty() { return federalId; } // Collumn 9 private StringProperty licenseState = new SimpleStringProperty(this, "licenseState"); @Column(name = "license_state") public String getLicenseState() { return licenseState.get(); } public void setLicenseState(String licenseState) { this.licenseState.set(licenseState); } public StringProperty licenseStateProperty() { return licenseState; } // Collumn 10 private StringProperty licenseNo = new SimpleStringProperty(this, "licenseNo"); @Column(name = "license_no") public String getLicenseNo() { return licenseNo.get(); } public void setLicenseNo(String licenseNo) { this.licenseNo.set(licenseNo); } public StringProperty licenseNoProperty() { return licenseNo; } // Column 11 private ObjectProperty<Date> licenseEffectiveDate = new SimpleObjectProperty<Date>(); @Column(name = "dea_license_effective_date") @Temporal(TemporalType.DATE) public Date getLicenseEffectiveDate() { return licenseEffectiveDate.get(); } public void setLicenseEffectiveDate(Date licenseEffectiveDate) { this.licenseEffectiveDate.set(licenseEffectiveDate); } public ObjectProperty<Date> licenseEffectiveDateProperty() { return this.licenseEffectiveDate; } // Column 12 private ObjectProperty<Date> licenseExpiryDate = new SimpleObjectProperty<Date>(); @Column(name = "dea_license_expiry_date") @Temporal(TemporalType.DATE) public Date getLicenseExpiryDate() { return licenseExpiryDate.get(); } public void setLicenseExpiryDate(Date licenseExpiryDate) { this.licenseExpiryDate.set(licenseExpiryDate); } public ObjectProperty<Date> licenseExpiryDateProperty() { return this.licenseExpiryDate; } // Column 13 private StringProperty caohcNo = new SimpleStringProperty(this, "caohcNo"); @Column(name = "caohc_no") public String getCaohcNo() { return caohcNo.get(); } public void setCaohcNo(String caohcNo) { this.caohcNo.set(caohcNo); } public StringProperty caohcNoProperty() { return caohcNo; } // Column 14 private SimpleObjectProperty<Clinic> homeClinic = new SimpleObjectProperty<Clinic>(this, "homeClinic"); @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "home_clinic_id") public Clinic getHomeClinic() { return homeClinic.get(); } public void setHomeClinic(Clinic homeClinic) { this.homeClinic.set(homeClinic); } public SimpleObjectProperty<Clinic> homeClinicProperty() { return homeClinic; } // Column 15 private SimpleBooleanProperty inactive = new SimpleBooleanProperty(this, "inactive"); @Column(name = "inactive") public boolean getInactive() { return inactive.get(); } public void setInactive(boolean inactive) { this.inactive.set(inactive); } public BooleanProperty inactiveProperty() { return inactive; } public Clinician() { } }
[ "badar.khann1@gmail.com" ]
badar.khann1@gmail.com
21afc8a115f7f91666ceebe8d6a9316f5fef8c58
dfe5caf190661c003619bfe7a7944c527c917ee4
/src/main/java/com/vmware/vim25/VirtualVmxnet3VrdmaOptionDeviceProtocols.java
c0dd04e05bb2447994244e75357bf00a7663d979
[ "BSD-3-Clause" ]
permissive
timtasse/vijava
c9787f9f9b3116a01f70a89d6ea29cc4f6dc3cd0
5d75bc0bd212534d44f78e5a287abf3f909a2e8e
refs/heads/master
2023-06-01T08:20:39.601418
2022-10-31T12:43:24
2022-10-31T12:43:24
150,118,529
4
1
BSD-3-Clause
2023-05-01T21:19:53
2018-09-24T14:46:15
Java
UTF-8
Java
false
false
273
java
package com.vmware.vim25; /** * Created by Stefan Dilk {@literal <stefan.dilk@freenet.ag>} on 25.05.18. * * @author Stefan Dilk <stefan.dilk@freenet.ag> * @version 6.7 * @since 6.7 */ public enum VirtualVmxnet3VrdmaOptionDeviceProtocols { rocev1, rocev2 }
[ "stefan.dilk@freenet.ag" ]
stefan.dilk@freenet.ag
786cf3561c8c21ed76be20124b247004580209d6
fd67cf9851be0c30031ad62ba11f59ab6b47dd0f
/src/array_practice/LeftShiftedArray.java
d6ca39b54c4aa9ac8f31e03b646e63d00ee56764
[]
no_license
aygol/JavaProject
47287c00434a05dfd364e22514b7d7a24c4e3fbb
a9221d285bdee58ab1a503f34ab522b1eef70a25
refs/heads/master
2021-01-14T04:36:31.294406
2020-02-23T22:15:58
2020-02-23T22:15:58
242,600,824
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package array_practice; import java.util.Arrays; public class LeftShiftedArray { public static void main(String[] args) { int [] num=new int [] {1,8,13,4,48,7,10};//8,13,4,48,7,10,1; //left shift int []num1=new int[num.length]; int tem=num[0]; for(int i=0;i<num.length-1;i++){ num1[i]=num[i+1] ; }num1[num.length-1]=tem; System.out.println(Arrays.toString(num1)); } }
[ "golcuayse@hotmail.com" ]
golcuayse@hotmail.com
25564cae4100b7b62533f8575fa67c6169e94e9e
d48bdd82717d123eb14776188225d404c4caa02c
/ser-xml-stream/src/test/java/com/jasper/rpc/serialize/xml/xstream/Xml2SerializerTestsTest.java
aa8ea1b54b76eb4ff18817a17b4a13a4dc8e3bad
[]
no_license
guoyufu-study/rpc
cbfc7cb7a8062000ae6b8fc59ed496593977dfe3
36ed10ab9394d9dd8d82ba6b8c5114396928555d
refs/heads/master
2020-04-28T00:16:43.411456
2019-03-10T14:55:21
2019-03-10T14:55:21
174,809,457
0
0
null
null
null
null
UTF-8
Java
false
false
846
java
package com.jasper.rpc.serialize.xml.xstream; import org.junit.Before; import org.junit.Test; import com.jasper.rpc.serialize.beans.Person; import com.jasper.rpc.serialize.beans.PhoneNumber; import com.jasper.rpc.serialize.xml.java.Xml2Serializer; public class Xml2SerializerTestsTest { Xml2Serializer xs = null; Person p = null; @Before public void before() { xs = new Xml2Serializer(); p = new Person(); p.setFirstname("jasper"); p.setLastname("郭"); p.setFax(new PhoneNumber(123, "1234-456")); p.setPhone(new PhoneNumber(123, "9999-999")); } @Test public void testSerialize() { byte[] data = xs.serialize(p); System.out.println(new String(data)); } @Test public void testDeserialize() { byte[] data = xs.serialize(p); Person obj = xs.deserialize(data, Person.class); System.out.println(obj); } }
[ "guoyufu_study@163.com" ]
guoyufu_study@163.com
1f6a3990aecf6cc7d3be547f87a0cf682193e1dd
ed49254b278b48473c9bdf1c3e70ef8010e83cf7
/BayesBaseNew/src/edu/cmu/tetrad/util/dist/Indicator.java
27eb0f526262dda97d6c6229b5f488f2fac5c35d
[]
no_license
sfu-cl-lab/exception-mining
5ac1e70a9a527d4129d77df66e536c287e5b4e25
7b80481f7d906a49db99901adb4059b273ac6af6
refs/heads/master
2021-05-31T22:36:21.973306
2016-05-15T22:05:14
2016-05-15T22:05:14
58,755,606
1
0
null
null
null
null
UTF-8
Java
false
false
3,426
java
/////////////////////////////////////////////////////////////////////////////// // For information as to what this class does, see the Javadoc, below. // // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, // // 2007, 2008, 2009, 2010 by Peter Spirtes, Richard Scheines, Joseph Ramsey, // // and Clark Glymour. // // // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // /////////////////////////////////////////////////////////////////////////////// package edu.cmu.tetrad.util.dist; import edu.cmu.tetrad.util.RandomUtil; /** * Created by IntelliJ IDEA. User: jdramsey Date: Jan 15, 2008 Time: 5:07:01 PM * To change this template use File | Settings | File Templates. */ public class Indicator implements Distribution { static final long serialVersionUID = 23L; private double p; /** * Returns 0 with probably 1 - p and 1 with probability p. * @param p Ibid. */ public Indicator(double p) { if (p < 0 || p > 1) throw new IllegalArgumentException("P is in [0, 1]."); this.p = p; } /** * Generates a simple exemplar of this class to test serialization. * * @return The exemplar. * @see edu.cmu.TestSerialization * @see edu.cmu.tetradapp.util.TetradSerializableUtils */ @SuppressWarnings({"UnusedDeclaration"}) public static Indicator serializableInstance() { return new Indicator(0.5); } public int getNumParameters() { return 1; } public String getName() { return "Indicator"; } public void setParameter(int index, double value) { if (index == 0) { p = value; } throw new IllegalArgumentException(); } public double getParameter(int index) { if (index == 0) { return p; } throw new IllegalArgumentException(); } public String getParameterName(int index) { if (index == 0) { return "Cutuff"; } throw new IllegalArgumentException(); } public double nextRandom() { return RandomUtil.getInstance().nextDouble() < p ? 1 : 0; } public String toString() { return "Indicator(" + p + ")"; } }
[ "sriahi@sfu.ca" ]
sriahi@sfu.ca
8982adddd041dab5a68d7ecd82a279868d3c39a2
882d3591752a93792bd8c734dd91b1e5439c5ffe
/android/QNLiveShow_independent/liveshowApp/src/main/java/com/qpidnetwork/livemodule/framework/base/BaseCustomWebViewClient.java
bbc2a8f94120ec00c8df5f22dd8d08c540409752
[]
no_license
KingsleyYau/LiveClient
f4d4d2ae23cbad565668b1c4d9cd849ea5ca2231
cdd2694ddb4f1933bef40c5da3cc7d1de8249ae2
refs/heads/master
2022-10-15T13:01:57.566157
2022-09-22T07:37:05
2022-09-22T07:37:05
93,734,517
27
14
null
null
null
null
UTF-8
Java
false
false
2,866
java
package com.qpidnetwork.livemodule.framework.base; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.text.TextUtils; import android.webkit.WebView; import android.webkit.WebViewClient; import com.qpidnetwork.livemodule.liveshow.WebViewActivity; import com.qpidnetwork.livemodule.liveshow.manager.URL2ActivityManager; import com.qpidnetwork.livemodule.utils.IPConfigUtil; import java.util.HashMap; /*** * 自定义WebViewClient,用于处理重定向时自定义跳转 * @author Hunter Mun * @since 8.19. 2016 */ public class BaseCustomWebViewClient extends WebViewClient{ private static final String WEBVIEW_JUMP_ARGUMENT = "opentype"; private Context mContext; public BaseCustomWebViewClient(Context context){ mContext = context; } @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { UrlOpenType openType = parseDefaultOpenType(url); if(openType == UrlOpenType.OPENBYSYSTEMBROWSER){ Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); mContext.startActivity(intent); }else if(openType == UrlOpenType.OPENBYNEWACTIVITY){ if(!URL2ActivityManager.getInstance().URL2Activity(mContext,url)){ mContext.startActivity(WebViewActivity.getIntent(mContext, "", IPConfigUtil.addCommonParamsToH5Url(url), true)); } }else{ view.loadUrl(url); } return true; } /** * 根据Url获取默认打开方式 * @return */ private UrlOpenType parseDefaultOpenType(String url){ UrlOpenType urlOpenType = UrlOpenType.OPENDEFAULT; HashMap<String, String> argMap = parseUrlKeyValue(url); if(argMap.containsKey(WEBVIEW_JUMP_ARGUMENT)){ String value = argMap.get(WEBVIEW_JUMP_ARGUMENT); if(!TextUtils.isEmpty(value)){ if(value.equals("1")){ urlOpenType = UrlOpenType.OPENBYSYSTEMBROWSER; }else if(value.equals("2")){ urlOpenType = UrlOpenType.OPENBYNEWACTIVITY; } } } return urlOpenType; } //根据Url参数决定重定向Url打开方式 private enum UrlOpenType{ OPENDEFAULT, OPENBYSYSTEMBROWSER, OPENBYNEWACTIVITY } /** * 解析Url中参数 * @param url * @return */ private HashMap<String, String> parseUrlKeyValue(String url){ HashMap<String, String> argMap = new HashMap<String, String>(); if(!TextUtils.isEmpty(url)){ if(url.contains("?")){ String[] result = url.split("\\?"); if(result != null && result.length > 1){ String[] params = result[1].split("&"); if(params != null){ for(String param : params){ String[] keyValue = param.split("="); if(keyValue != null && keyValue.length > 1){ argMap.put(keyValue[0], keyValue[1]); } } } } } } return argMap; } }
[ "Kingsleyyau@gmail.com" ]
Kingsleyyau@gmail.com
a6ab7cb41f1adec588046fb4ad67d8a41ff0395e
97e9f3de19546f9486b3b88f238e65439af4c55c
/uikit/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/android/support/graphics/drawable/R.java
5e76dae83566d4f1f7ece854fecf9b1fd6d7398b
[ "MIT" ]
permissive
printlybyte/peizhen
1351f12c89a5e3254026a0b29b3acbd5f8c80e6f
7dd7d2215e2ac9b286350250100c9386e77c4bb5
refs/heads/master
2022-11-23T03:10:34.545106
2020-07-23T07:59:01
2020-07-23T07:59:01
281,886,788
0
0
null
null
null
null
UTF-8
Java
false
false
7,655
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.graphics.drawable; public final class R { private R() {} public static final class attr { private attr() {} public static int font = 0x7f04009e; public static int fontProviderAuthority = 0x7f0400a0; public static int fontProviderCerts = 0x7f0400a1; public static int fontProviderFetchStrategy = 0x7f0400a2; public static int fontProviderFetchTimeout = 0x7f0400a3; public static int fontProviderPackage = 0x7f0400a4; public static int fontProviderQuery = 0x7f0400a5; public static int fontStyle = 0x7f0400a6; public static int fontWeight = 0x7f0400a7; } public static final class bool { private bool() {} public static int abc_action_bar_embed_tabs = 0x7f050001; } public static final class color { private color() {} public static int notification_action_color_filter = 0x7f06007a; public static int notification_icon_bg_color = 0x7f06007b; public static int ripple_material_light = 0x7f060088; public static int secondary_text_default_material_light = 0x7f06008b; } public static final class dimen { private dimen() {} public static int compat_button_inset_horizontal_material = 0x7f080067; public static int compat_button_inset_vertical_material = 0x7f080068; public static int compat_button_padding_horizontal_material = 0x7f080069; public static int compat_button_padding_vertical_material = 0x7f08006a; public static int compat_control_corner_material = 0x7f08006b; public static int notification_action_icon_size = 0x7f0800c4; public static int notification_action_text_size = 0x7f0800c5; public static int notification_big_circle_margin = 0x7f0800c6; public static int notification_content_margin_start = 0x7f0800c7; public static int notification_large_icon_height = 0x7f0800c8; public static int notification_large_icon_width = 0x7f0800c9; public static int notification_main_column_padding_top = 0x7f0800ca; public static int notification_media_narrow_margin = 0x7f0800cb; public static int notification_right_icon_size = 0x7f0800cc; public static int notification_right_side_padding_top = 0x7f0800cd; public static int notification_small_icon_background_padding = 0x7f0800ce; public static int notification_small_icon_size_as_large = 0x7f0800cf; public static int notification_subtext_size = 0x7f0800d0; public static int notification_top_pad = 0x7f0800d1; public static int notification_top_pad_large_text = 0x7f0800d2; } public static final class drawable { private drawable() {} public static int notification_action_background = 0x7f09011d; public static int notification_bg = 0x7f09011e; public static int notification_bg_low = 0x7f09011f; public static int notification_bg_low_normal = 0x7f090120; public static int notification_bg_low_pressed = 0x7f090121; public static int notification_bg_normal = 0x7f090122; public static int notification_bg_normal_pressed = 0x7f090123; public static int notification_icon_background = 0x7f090124; public static int notification_template_icon_bg = 0x7f090125; public static int notification_template_icon_low_bg = 0x7f090126; public static int notification_tile_bg = 0x7f090127; public static int notify_panel_notification_icon_bg = 0x7f090128; } public static final class id { private id() {} public static int action_container = 0x7f0c000f; public static int action_divider = 0x7f0c0011; public static int action_image = 0x7f0c0012; public static int action_text = 0x7f0c0019; public static int actions = 0x7f0c001b; public static int async = 0x7f0c0026; public static int blocking = 0x7f0c002b; public static int chronometer = 0x7f0c003b; public static int forever = 0x7f0c0085; public static int icon = 0x7f0c008c; public static int icon_group = 0x7f0c008d; public static int info = 0x7f0c009b; public static int italic = 0x7f0c009f; public static int line1 = 0x7f0c00ac; public static int line3 = 0x7f0c00ad; public static int normal = 0x7f0c00f2; public static int notification_background = 0x7f0c00f3; public static int notification_main_column = 0x7f0c00f4; public static int notification_main_column_container = 0x7f0c00f5; public static int right_icon = 0x7f0c012b; public static int right_side = 0x7f0c012c; public static int tag_transition_group = 0x7f0c0164; public static int text = 0x7f0c0188; public static int text2 = 0x7f0c0189; public static int time = 0x7f0c0194; public static int title = 0x7f0c0199; } public static final class integer { private integer() {} public static int status_bar_notification_info_maxnum = 0x7f0d000a; } public static final class layout { private layout() {} public static int notification_action = 0x7f0f009e; public static int notification_action_tombstone = 0x7f0f009f; public static int notification_template_custom_big = 0x7f0f00a6; public static int notification_template_icon_group = 0x7f0f00a7; public static int notification_template_part_chronometer = 0x7f0f00ab; public static int notification_template_part_time = 0x7f0f00ac; } public static final class string { private string() {} public static int status_bar_notification_info_overflow = 0x7f1500b3; } public static final class style { private style() {} public static int TextAppearance_Compat_Notification = 0x7f1600f1; public static int TextAppearance_Compat_Notification_Info = 0x7f1600f2; public static int TextAppearance_Compat_Notification_Line2 = 0x7f1600f4; public static int TextAppearance_Compat_Notification_Time = 0x7f1600f7; public static int TextAppearance_Compat_Notification_Title = 0x7f1600f9; public static int Widget_Compat_NotificationActionContainer = 0x7f160171; public static int Widget_Compat_NotificationActionText = 0x7f160172; } public static final class styleable { private styleable() {} public static int[] FontFamily = { 0x7f0400a0, 0x7f0400a1, 0x7f0400a2, 0x7f0400a3, 0x7f0400a4, 0x7f0400a5 }; public static int FontFamily_fontProviderAuthority = 0; public static int FontFamily_fontProviderCerts = 1; public static int FontFamily_fontProviderFetchStrategy = 2; public static int FontFamily_fontProviderFetchTimeout = 3; public static int FontFamily_fontProviderPackage = 4; public static int FontFamily_fontProviderQuery = 5; public static int[] FontFamilyFont = { 0x1010532, 0x101053f, 0x1010533, 0x7f04009e, 0x7f0400a6, 0x7f0400a7 }; public static int FontFamilyFont_android_font = 0; public static int FontFamilyFont_android_fontStyle = 1; public static int FontFamilyFont_android_fontWeight = 2; public static int FontFamilyFont_font = 3; public static int FontFamilyFont_fontStyle = 4; public static int FontFamilyFont_fontWeight = 5; } }
[ "18701403668@163.com" ]
18701403668@163.com
3ac1f6736f660dc7dcdde7e115cf1a6ceab48e81
be59c0ca127a4f7041758b2709e1327bc71b6e12
/qipai/game-csmj/src/main/java/com/sy599/game/qipai/csmj/robot/actions/peng.java
c02041d9f35c8335187af1e76ef579ed1ec90a37
[]
no_license
Yiwei-TEST/xxqp-server
2389dd6b12614b0a9557d59b473f88a3a59620cf
c2c683ce8060c0cbaee86c3ee550e0195e1bb7e4
refs/heads/main
2023-08-14T08:49:37.586893
2021-09-15T03:21:13
2021-09-15T03:21:13
401,583,086
1
4
null
null
null
null
UTF-8
Java
false
false
996
java
// ******************************************************* // MACHINE GENERATED CODE // DO NOT MODIFY // // Generated on 07/10/2020 09:18:44 // ******************************************************* package com.sy599.game.qipai.csmj.robot.actions; /** ModelAction class created from MMPM action peng. */ public class peng extends jbt.model.task.leaf.action.ModelAction { /** Constructor. Constructs an instance of peng. */ public peng(jbt.model.core.ModelTask guard) { super(guard); } /** * Returns a com.sy599.game.qipai.csmj.robot.actions.execution.peng task * that is able to run this task. */ public jbt.execution.core.ExecutionTask createExecutor( jbt.execution.core.BTExecutor executor, jbt.execution.core.ExecutionTask parent) { return new com.sy599.game.qipai.csmj.robot.actions.execution.peng(this, executor, parent); } }
[ "ee68i5@yeah.net" ]
ee68i5@yeah.net