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
38b9fbc5e3dda9c64697d714dbc88be4704fdf8d
ed6bbcb57c3cb21edce7e29424567b54b7aa2518
/ACE/Practice/Student.java
12a4fcb54eed65ce0fd7926d869651df092ac26f
[]
no_license
xingchenpro/HlyAlgorithm
b6fabaf5c516cbda22e6e6b0863dcffbfe9047fe
01aaa1b75362a8a6e51e7e8114a86c3cb154db42
refs/heads/master
2022-01-17T01:46:57.204178
2019-04-28T13:19:53
2019-04-28T13:19:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
285
java
package Practice; public class Student extends Person { public String school; public String id; public String discipline; public String grade; public String classes; public String print(){ return super.prinf()+"school"+school+" "+"id"+id; } public Student() { } }
[ "1136513099@qq.com" ]
1136513099@qq.com
210915a270663d92e0588eb0e975e89c87988473
a15d4565864d8cecf88f4a9a92139c9c41578c8f
/modules/core/org.jowidgets.cap.service/src/main/java/org/jowidgets/cap/service/tools/lookup/StaticLookUpService.java
8af0bf4dcaa3450188df9a7772269c5d31b1b8f7
[]
no_license
jo-source/jo-client-platform
f4800d121df6b982639390f3507da237fc5426c1
2f346b26fa956c6d6612fef2d0ef3eedbb390d7a
refs/heads/master
2021-01-23T10:03:16.067646
2019-04-29T11:43:04
2019-04-29T11:43:04
39,776,103
2
3
null
2016-08-24T13:53:07
2015-07-27T13:33:59
Java
UTF-8
Java
false
false
2,383
java
/* * Copyright (c) 2012, grossmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the jo-widgets.org 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 jo-widgets.org 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 org.jowidgets.cap.service.tools.lookup; import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.jowidgets.cap.common.api.execution.IExecutionCallback; import org.jowidgets.cap.common.api.lookup.ILookUpEntry; import org.jowidgets.cap.service.api.adapter.ISyncLookUpService; import org.jowidgets.util.Assert; public final class StaticLookUpService implements ISyncLookUpService { private final List<ILookUpEntry> entries; public StaticLookUpService(final List<ILookUpEntry> entries) { Assert.paramNotNull(entries, "entries"); this.entries = Collections.unmodifiableList(new LinkedList<ILookUpEntry>(entries)); } @Override public List<ILookUpEntry> readValues(final IExecutionCallback executionCallback) { return entries; } }
[ "herr.grossmann@gmx.de" ]
herr.grossmann@gmx.de
14bf64a7435b72131c23babfad1fbc1dcd5c1a6c
d18af2a6333b1a868e8388f68733b3fccb0b4450
/java/src/com/flurry/android/monolithic/sdk/impl/or.java
2af8507bea285aa63c13b86fa7b3c02e8a79410e
[]
no_license
showmaxAlt/showmaxAndroid
60576436172495709121f08bd9f157d36a077aad
d732f46d89acdeafea545a863c10566834ba1dec
refs/heads/master
2021-03-12T20:01:11.543987
2015-08-19T20:31:46
2015-08-19T20:31:46
41,050,587
0
1
null
null
null
null
UTF-8
Java
false
false
3,379
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.flurry.android.monolithic.sdk.impl; import java.io.Closeable; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; // Referenced classes of package com.flurry.android.monolithic.sdk.impl: // oq, oz, pe, pw, // oo, pd, pp, on, // ou public abstract class or implements Closeable { protected pd a; protected or() { } public abstract or a(); public or a(int i) { return this; } public or a(pd pd) { a = pd; return this; } public or a(pp pp) { return this; } public abstract void a(char c1) throws IOException, oq; public abstract void a(double d1) throws IOException, oq; public abstract void a(float f1) throws IOException, oq; public abstract void a(long l) throws IOException, oq; public abstract void a(on on, byte abyte0[], int i, int j) throws IOException, oq; public abstract void a(ou ou) throws IOException, oz; public void a(pe pe1) throws IOException, oq { a(pe1.a()); } public void a(pw pw1) throws IOException, oq { a(pw1.a()); } public abstract void a(Object obj) throws IOException, oz; public abstract void a(String s) throws IOException, oq; public final void a(String s, int i) throws IOException, oq { a(s); b(i); } public void a(String s, String s1) throws IOException, oq { a(s); b(s1); } public abstract void a(BigDecimal bigdecimal) throws IOException, oq; public abstract void a(BigInteger biginteger) throws IOException, oq; public abstract void a(boolean flag) throws IOException, oq; public void a(byte abyte0[]) throws IOException, oq { a(oo.a(), abyte0, 0, abyte0.length); } public abstract void a(char ac[], int i, int j) throws IOException, oq; public abstract void b() throws IOException, oq; public abstract void b(int i) throws IOException, oq; public void b(pe pe1) throws IOException, oq { b(pe1.a()); } public abstract void b(String s) throws IOException, oq; public abstract void b(char ac[], int i, int j) throws IOException, oq; public abstract void c() throws IOException, oq; public abstract void c(String s) throws IOException, oq; public abstract void d() throws IOException, oq; public abstract void d(String s) throws IOException, oq; public abstract void e() throws IOException, oq; public abstract void e(String s) throws IOException, oq, UnsupportedOperationException; public abstract void f() throws IOException, oq; public final void f(String s) throws IOException, oq { a(s); b(); } public abstract void g() throws IOException; public final void g(String s) throws IOException, oq { a(s); d(); } }
[ "invisible@example.com" ]
invisible@example.com
aa7988cf3a8d78f20e47fb8f299702ed39c70021
04a4bd2ab9434ad5d0b6ca2e4b50d9b2b55bc4ef
/blossom-ui/blossom-ui-web/src/main/java/fr/mgargadennec/blossom/ui/web/system/scheduler/SchedulerController.java
3fccb7274e6f56bb85393b68179ef8f4036be1d4
[]
no_license
jarvisxiong/blossom
6499904903baa6dd2c07d466c6a5d3fca76a6774
a607a9886c7604294c3d149896e1183faf1f0bf5
refs/heads/master
2021-07-02T06:45:00.029851
2017-09-19T09:08:46
2017-09-19T09:08:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,230
java
package fr.mgargadennec.blossom.ui.web.system.scheduler; import fr.mgargadennec.blossom.core.scheduler.job.ScheduledJobServiceImpl; import fr.mgargadennec.blossom.ui.menu.OpenedMenu; import fr.mgargadennec.blossom.ui.stereotype.BlossomController; import org.quartz.JobKey; import org.quartz.SchedulerException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; /** * Created by Maël Gargadennnec on 04/05/2017. */ @BlossomController("/system/scheduler") @OpenedMenu("schedulerManager") public class SchedulerController { private final ScheduledJobServiceImpl scheduledJobService; @Autowired public SchedulerController(ScheduledJobServiceImpl scheduledJobService) { this.scheduledJobService = scheduledJobService; } @GetMapping public ModelAndView scheduler(Model model) throws SchedulerException { model.addAttribute("scheduler", this.scheduledJobService.getScheduler()); model.addAttribute("groups", this.scheduledJobService.getGroups()); return new ModelAndView("system/scheduler/scheduler", model.asMap()); } @GetMapping("/{group}") public ModelAndView tasks(Model model, @PathVariable String group) throws SchedulerException { model.addAttribute("scheduler", this.scheduledJobService.getScheduler()); model.addAttribute("jobInfos", this.scheduledJobService.getAll(group)); return new ModelAndView("system/scheduler/list", model.asMap()); } @GetMapping("/{group}/{name}") public ModelAndView task(Model model, @PathVariable String group, @PathVariable String name) throws SchedulerException { model.addAttribute("scheduler", this.scheduledJobService.getScheduler()); model.addAttribute("jobInfo", this.scheduledJobService.getOne(JobKey.jobKey(name, group))); return new ModelAndView("system/scheduler/detail", model.asMap()); } @PostMapping("/_changeState") @ResponseStatus(HttpStatus.OK) public void scheduler(Model model, @RequestParam("state") boolean state) throws SchedulerException { this.scheduledJobService.changeState(state); } }
[ "mael.gargadennec@gmail.com" ]
mael.gargadennec@gmail.com
589e0f9826fa3a69c126718b446e1d56f1ac4348
98cd71808bbb9f27081f1ac499142323fcdf605d
/src/main/java/com/wjxselenium/enums/ResponseCode.java
fa7279e286ad2e532ee96b417ff1b103a3e00cf6
[]
no_license
wangjunxiong66/seleniumTest
f0e76e075b020f94748a79544fbf8fbaf036706f
6ca4dde398142506499aa3c401a14b568db9040b
refs/heads/master
2023-03-05T00:11:04.817338
2020-07-21T06:38:05
2020-07-21T06:38:05
253,968,659
1
0
null
null
null
null
UTF-8
Java
false
false
513
java
package com.wjxselenium.enums; /** * @author wjx * @version 1.0 * @date 2020/7/21 上午9:36 */ public enum ResponseCode { SUCCESS(1,"OK"), INTERNAL_SERVER_ERROR(500, "服务器开小差了,请稍后再试!"), ; private int code; private String message; ResponseCode(int code,String message){ this.code = code; this.message = message; } public int getCode(){ return code; } public String getMessage(){ return message; } }
[ "123456" ]
123456
e49e802094134eae916cad50d9475436629bf18f
f009dc33f9624aac592cb66c71a461270f932ffa
/src/main/java/com/alipay/api/response/AlipayUserCertdocQueryResponse.java
a095fed7eeae95608cfc8b9198f266c2044bd9f6
[ "Apache-2.0" ]
permissive
1093445609/alipay-sdk-java-all
d685f635af9ac587bb8288def54d94e399412542
6bb77665389ba27f47d71cb7fa747109fe713f04
refs/heads/master
2021-04-02T16:49:18.593902
2020-03-06T03:04:53
2020-03-06T03:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,725
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.AlipayUserCertDocDrivingLicense; import com.alipay.api.domain.AlipayUserCertDocIDCard; import com.alipay.api.domain.AlipayUserCertDocPassport; import com.alipay.api.domain.AlipayUserCertDocVehicleLicense; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.user.certdoc.query response. * * @author auto create * @since 1.0, 2019-04-18 20:50:01 */ public class AlipayUserCertdocQueryResponse extends AlipayResponse { private static final long serialVersionUID = 2543519228375157797L; /** * 进行授权的用户本人的驾驶证信息 */ @ApiField("driving_license") private AlipayUserCertDocDrivingLicense drivingLicense; /** * 所有驾驶证信息列表 */ @ApiListField("driving_license_list") @ApiField("alipay_user_cert_doc_driving_license") private List<AlipayUserCertDocDrivingLicense> drivingLicenseList; /** * 进行授权的用户本人的身份证信息 */ @ApiField("identity_card") private AlipayUserCertDocIDCard identityCard; /** * 所有身份证信息列表 */ @ApiListField("identity_card_list") @ApiField("alipay_user_cert_doc_i_d_card") private List<AlipayUserCertDocIDCard> identityCardList; /** * 护照列表 */ @ApiListField("passport_list") @ApiField("alipay_user_cert_doc_passport") private List<AlipayUserCertDocPassport> passportList; /** * 进行授权的用户本人的行驶证信息列表 */ @ApiListField("self_vehicle_license_list") @ApiField("alipay_user_cert_doc_vehicle_license") private List<AlipayUserCertDocVehicleLicense> selfVehicleLicenseList; /** * 所有行驶证信息列表 */ @ApiListField("vehicle_license_list") @ApiField("alipay_user_cert_doc_vehicle_license") private List<AlipayUserCertDocVehicleLicense> vehicleLicenseList; public void setDrivingLicense(AlipayUserCertDocDrivingLicense drivingLicense) { this.drivingLicense = drivingLicense; } public AlipayUserCertDocDrivingLicense getDrivingLicense( ) { return this.drivingLicense; } public void setDrivingLicenseList(List<AlipayUserCertDocDrivingLicense> drivingLicenseList) { this.drivingLicenseList = drivingLicenseList; } public List<AlipayUserCertDocDrivingLicense> getDrivingLicenseList( ) { return this.drivingLicenseList; } public void setIdentityCard(AlipayUserCertDocIDCard identityCard) { this.identityCard = identityCard; } public AlipayUserCertDocIDCard getIdentityCard( ) { return this.identityCard; } public void setIdentityCardList(List<AlipayUserCertDocIDCard> identityCardList) { this.identityCardList = identityCardList; } public List<AlipayUserCertDocIDCard> getIdentityCardList( ) { return this.identityCardList; } public void setPassportList(List<AlipayUserCertDocPassport> passportList) { this.passportList = passportList; } public List<AlipayUserCertDocPassport> getPassportList( ) { return this.passportList; } public void setSelfVehicleLicenseList(List<AlipayUserCertDocVehicleLicense> selfVehicleLicenseList) { this.selfVehicleLicenseList = selfVehicleLicenseList; } public List<AlipayUserCertDocVehicleLicense> getSelfVehicleLicenseList( ) { return this.selfVehicleLicenseList; } public void setVehicleLicenseList(List<AlipayUserCertDocVehicleLicense> vehicleLicenseList) { this.vehicleLicenseList = vehicleLicenseList; } public List<AlipayUserCertDocVehicleLicense> getVehicleLicenseList( ) { return this.vehicleLicenseList; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
0d80b5401b2ff45dd7a80a246d9053f217dfc571
71007018bfae36117fd2f779dbe6e6d7bb9bde9c
/src/main/java/com/magento/test/service/SessionService.java
52d5745b852541cb798564f555c2e8963f12fcaa
[]
no_license
gmai2006/magentotest
819201760b720a90d55ef853be964651ace125ac
ca67d16d6280ddaefbf57fa1129b6ae7bd80408f
refs/heads/main
2023-09-03T05:14:27.788984
2021-10-17T06:25:09
2021-10-17T06:25:09
418,040,494
0
0
null
null
null
null
UTF-8
Java
false
false
1,629
java
/** * %% Copyright (C) 2021 DataScience 9 LLC %% 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 * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing permissions and * limitations under the License. #L% * * <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or * function or changes please update the templates then submit the template through our web * interface. */ package com.magento.test.service; import java.util.List; import com.magento.test.entity.Session; public interface SessionService { public Session find(java.lang.String id); /** * Select a list of Session based on a given maximum number of returning records. * * @param maxResult : a specified maximum number of returned records. * @return Session records. */ public List<Session> select(int maxResult); /** * Select all Session. * * @return all Session records. */ public List<Session> selectAll(); /** * Create Session. * * @param bean The Session. * @return The Session. */ public Session create(Session bean); /** * Update a Session. * * @param bean - The Session. * @return Session. */ public Session update(Session bean); }
[ "gmai2006@gmail.com" ]
gmai2006@gmail.com
e956cf4d001f0031923ea1757cb18880d4e8cb4d
738ac9a7db9a7fae0212d67ae7c9ca617af91d03
/spring-boot-samples/spring-boot-sample-gae-2.5/src/main/java/demo/Application.java
21a810c32a0b12fdbc959c82df09fae9187740d6
[]
no_license
maborg/spring-boot-legacy
66cbb8f325984b5e8dbe06cccff6eb99b15a2433
847ebc0484c9cc47f237120c8290cd19de7782e2
refs/heads/master
2020-03-21T19:43:47.324609
2018-06-19T09:18:31
2018-06-19T09:18:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,040
java
/* * Copyright 2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 demo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.ServletContext; @Configuration @ComponentScan(basePackages = "demo.hello") @SpringBootApplication @RestController public class Application extends SpringBootServletInitializer { @Autowired private ServletContext context; @Value("${info.version}") private String version; public static void main(String[] args) { SpringApplication.run(Application.class, args); } @RequestMapping("/") public String home() { return "Spring Boot Sample - Google AppEngine - Java 8 Runtime with Servlet 2.5 Web Descriptor"; } @RequestMapping("/version") public String getVersion() { return version; } @RequestMapping("/servlet-version") public String getServletVersion() { return context.getEffectiveMajorVersion() + "." + context.getEffectiveMinorVersion(); } }
[ "dsyer@pivotal.io" ]
dsyer@pivotal.io
b46908602eb975abed89514708727dfa14f5e382
4baf4719b1e34569bc4439419bddcacdb9836bf0
/Section 1/Chapter09/airline-fare/src/main/java/springfive/airline/airlinefare/domain/Class.java
85b8d042afec0dfdff84d110cb32cb2df288f2fd
[ "MIT" ]
permissive
PacktPublishing/Developing-Java-Applications-with-Spring-and-Spring-Boot
1cd94c3ba5b5f4b98709fa1f5e90ade3952817d3
dc480767ddcbc7053b68682b28ba19fa93f420d3
refs/heads/master
2023-07-24T04:06:15.159293
2023-01-30T08:10:32
2023-01-30T08:10:32
136,295,735
24
16
MIT
2023-07-18T20:52:04
2018-06-06T08:14:12
Java
UTF-8
Java
false
false
129
java
package springfive.airline.airlinefare.domain; import lombok.Data; @Data public class Class { String id; String name; }
[ "32731556+mehulsingh7@users.noreply.github.com" ]
32731556+mehulsingh7@users.noreply.github.com
be3870001e406dd69ab91cbe96ba3538d680ffa6
2d678fff672d582fcd0c25a1f10a0c11c2cd0207
/JavaOOP/Inheritance/src/MultipleInheritance/Dog.java
0c885b2ba81012f519cba427318fa423adb8a2b1
[]
no_license
totopopov/SoftUniJavaOOP
32aea6928ba8a1eef51ad5e8a40a724d4c844a78
0b2eeb06fa1c9b547e0ef42bb74b6bbb16d05d7e
refs/heads/master
2021-01-18T17:53:27.274139
2017-08-16T17:06:21
2017-08-16T17:06:21
100,505,616
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package MultipleInheritance; /** * Created by Todor Popov using Lenovo on 28.2.2017 г. at 15:25. */ public class Dog extends Animal { public void bark(){ System.out.println("barking..."); } }
[ "totopopov@gmail.com" ]
totopopov@gmail.com
cc6685138c3749dcb46a060d42af81f246663648
185d3c9ad29e61bcb5ce576ba1e99c9ed1f49e13
/spring-groovy-resource/src/main/java/com/hbsoo/resouce/GroovyResourceApplication.java
5a7f8fcd33982d6b7edd77fce36287a49fc47d10
[]
no_license
zunzhuowei/spring-java-groovy
e0a7b1e192da5410310c179428c4e200ceeb6919
72afa53311fb4d63a81f0ceef10181edba2f716b
refs/heads/main
2023-06-25T19:38:16.692638
2021-07-23T02:46:34
2021-07-23T02:46:34
388,360,428
0
0
null
null
null
null
UTF-8
Java
false
false
496
java
package com.hbsoo.resouce; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Created by zun.wei on 2021/7/22. */ public class GroovyResourceApplication { public static void main(String[] args) { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-groovy.xml"); HelloService bean = context.getBean(HelloService.class); String sayHello = bean.sayHello(); System.out.println(sayHello); } }
[ "1808862723@qq.com" ]
1808862723@qq.com
cd1cf931e3bd33e7a6089dff32e916d3c02f5125
21c88c20150e1943200e8a9ef829bf6391b5e4ad
/quicksale/src/main/java/com/nahuo/quicksale/SelectAreaDialogFragment.java
0801c219e3e6496f702d061f41227447c0e03f24
[]
no_license
JameChen/shopping
cd212101372855ad48d0a0d514c3e5ab5ad991e4
9f325ffbc1e3ea98ce002464f7e8fecd21c19c7f
refs/heads/master
2020-07-12T00:13:58.900576
2019-08-28T08:49:49
2019-08-28T08:49:49
204,668,342
2
2
null
null
null
null
UTF-8
Java
false
false
6,039
java
package com.nahuo.quicksale; import java.util.List; import android.content.Context; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.ArrayAdapter; import android.widget.Spinner; import com.nahuo.quicksale.db.AreaDao; import com.nahuo.quicksale.oldermodel.Address; import com.nahuo.quicksale.oldermodel.Area; /** * @description 选择区域 * @created 2014-8-28 下午2:59:50 * @author ZZB */ public class SelectAreaDialogFragment extends DialogFragment implements OnItemSelectedListener, View.OnClickListener{ public static final String TAG = SelectAreaDialogFragment.class.getSimpleName(); private static final String ARG_ADDRESS = "ARGS_ADDRESS"; private Context mContext; private AreaDao mDao; private Spinner mSpProvince, mSpCity, mSpArea; private View mBtnCancle, mBtnConfirm; private List<Area> mProvincies, mCities, mAreas; private Address mAddress; private int mOnSelectedCounter = 0; private DailogResultListener mListener; public static interface DailogResultListener{ /** dialog选择后的结果 */ void onResult(Address address); } public static SelectAreaDialogFragment newInstance(Address address) { SelectAreaDialogFragment f = new SelectAreaDialogFragment(); Bundle args = new Bundle(); args.putSerializable(ARG_ADDRESS, address); f.setArguments(args); return f; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Dialog); mContext = getActivity(); mDao = new AreaDao(mContext); mProvincies = mDao.getAreas(0); mAddress = (Address) getArguments().getSerializable(ARG_ADDRESS); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View contentView = inflater.inflate(R.layout.dlg_select_area, container, false); initView(contentView); return contentView; } private void initView(View contentView) { mBtnCancle = contentView.findViewById(R.id.btn_cancle); mBtnCancle.setOnClickListener(this); mBtnConfirm = contentView.findViewById(R.id.btn_confirm); mBtnConfirm.setOnClickListener(this); mSpProvince = (Spinner) contentView.findViewById(R.id.sp_province); mSpCity = (Spinner) contentView.findViewById(R.id.sp_city); mSpArea = (Spinner) contentView.findViewById(R.id.sp_area); mSpProvince.setAdapter(newAdapter(mProvincies)); mSpProvince.setOnItemSelectedListener(this); mSpCity.setOnItemSelectedListener(this); mSpArea.setOnItemSelectedListener(this); if(mAddress != null){ int pos = getSelection(mProvincies, mAddress.getProvince().getId()); mSpProvince.setSelection(pos); } } @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { mOnSelectedCounter ++; if(mOnSelectedCounter < 3 && mAddress != null){ handleFirstLoad(); return; } int parentId = -1; switch (parent.getId()) { case R.id.sp_province: parentId = mProvincies.get(position).getId(); mCities = mDao.getAreas(parentId); mSpCity.setAdapter(newAdapter(mCities)); break; case R.id.sp_city: parentId = mCities.get(position).getId(); mAreas = mDao.getAreas(parentId); mSpArea.setAdapter(newAdapter(mAreas)); break; case R.id.sp_area: break; } } /** * @description 处理第一次加载 * @created 2014-8-29 上午9:58:00 * @author ZZB */ private void handleFirstLoad() { if(mOnSelectedCounter == 1){ mCities = mDao.getAreas(mAddress.getProvince().getId()); int cityPos = getSelection(mCities, mAddress.getCity().getId()); mSpCity.setAdapter(newAdapter(mCities)); mSpCity.setSelection(cityPos); }else if(mOnSelectedCounter == 2){ mAreas = mDao.getAreas(mAddress.getCity().getId()); int areaPos = getSelection(mAreas, mAddress.getArea().getId()); mSpArea.setAdapter(newAdapter(mAreas)); mSpArea.setSelection(areaPos); } } @Override public void onNothingSelected(AdapterView<?> parent) { } private ArrayAdapter<Area> newAdapter(List<Area> data){ ArrayAdapter<Area> adapter = new ArrayAdapter<Area>(mContext, android.R.layout.simple_spinner_item, data);; adapter.setDropDownViewResource(R.layout.drop_down_item); return adapter; } private int getSelection(List<Area> area, int id){ int counter = 0; for(Area a : area){ if(a.getId() == id){ return counter; } counter++; } return counter; } public void setListener(DailogResultListener listener) { mListener = listener; } @Override public void onClick(View v) { switch(v.getId()){ case R.id.btn_cancle: dismiss(); break; case R.id.btn_confirm: if(mListener != null){ Area province = (Area) mSpProvince.getSelectedItem(); Area city = (Area) mSpCity.getSelectedItem(); Area area = (Area) mSpArea.getSelectedItem(); Address add = new Address(province, city, area); mListener.onResult(add); } dismiss(); break; } } }
[ "1210686304@qq.com" ]
1210686304@qq.com
baf73807d5b524255e8a1d5537832524edcb71d3
37f6d3588aa800c967ac36fabf0176ba7afe592a
/src/main/java/org/vs/practice/string/StringUtils.java
1159870fccca73dd02114f34489d65b80047004f
[]
no_license
vishalsinha21/java-problems
30d064bd1c58dacee9848d0de6b197c70cd6362e
dd3eb2222bc797b4b9639c4dddeaa14fcfa102e9
refs/heads/master
2023-04-16T12:20:59.684969
2023-03-31T13:28:27
2023-03-31T13:28:27
140,075,453
0
0
null
null
null
null
UTF-8
Java
false
false
1,447
java
package org.vs.practice.string; import java.util.*; import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.IntStream; public class StringUtils { public static boolean isAnagram(String str1, String str2) { if (str1 == null || str2 == null || str1.length() != str2.length()) { return false; } if (str1.equals(str2)) { return true; } char[] chars1 = str1.toCharArray(); char[] chars2 = str2.toCharArray(); Map<Character, Long> map1 = IntStream.range(0, chars1.length).mapToObj(i -> Character.valueOf(chars1[i])) .collect(Collectors.groupingBy(Function.identity(), Collectors.counting())); Map<Character, Long> map2 = IntStream.range(0, chars2.length).mapToObj(i -> Character.valueOf(chars2[i])) .collect(Collectors.groupingBy(Function.identity(), Collectors.counting())); if (map1.size() != map2.size()) { return false; } for (Character key : map1.keySet()) { if (!map2.containsKey(key) || map1.get(key) != map2.get(key)) { return false; } } Optional<Character> result = map1.keySet().stream() .filter(key -> !(map2.containsKey(key) && map2.get(key) == map1.get(key))) .findFirst(); return result.isEmpty(); } }
[ "vishal.sinha21@gmail.com" ]
vishal.sinha21@gmail.com
44a80373180273a53e1150d78ed31c0b48aa9119
5683544d8cca4cfd7897aafaa0a66b1e8fd704e4
/WrapPortal-1/src/main/java/ObjectRepository_CPO/CPO_ReportsModule.java
94742539241d52bee078439fbb91bd6295a3cdf3
[]
no_license
automationrepoMaster/jenkins-Master-
cd4855922913b1e76ea183547f7cfe5172e51f56
3e9456e73387977b206bbf0977cc34962167fbbc
refs/heads/master
2023-04-22T22:04:29.750690
2021-05-08T13:26:20
2021-05-08T13:26:20
364,281,879
0
0
null
null
null
null
UTF-8
Java
false
false
1,077
java
package ObjectRepository_CPO; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class CPO_ReportsModule { public static WebElement element; static String selectProgram="//select[@id='ddlProject']"; static String selectCategory="//select[@id='ddlCategory']"; static String openReport="//table[@id='ReportsGrid']/tbody/tr[position()>1]//td[contains(text(),'Contractor Deduct Tracking')]/following::td[position()=1]/a"; public static WebElement selectProgram(WebDriver driver) { element=driver.findElement(By.xpath(selectProgram)); return element; } public static WebElement selectCategory(WebDriver driver) { element=driver.findElement(By.xpath(selectCategory)); return element; } public static WebElement openReport(WebDriver driver, String reportName) { element=driver.findElement(By.xpath("//table[@id='ReportsGrid']/tbody/tr[position()>1]//td[contains(text(),'"+reportName+"')]/following::td[position()=1]/a")); return element; } }
[ "User@User-PC" ]
User@User-PC
d84150442089331cdc25a957de6bed725ac4d47d
200430fd5e85aae4c95a0528a9b0ef88efa856aa
/viajei-microservice-transports/src/main/java/br/edu/ifpb/pos/soap/viajei/microservice/transports/api/TicketsEndPoint.java
cfe8acc5b124fb6d1956f3bd889a4e036e8d7283
[]
no_license
pedroviniv/viajei-microservices
66fbf70093c89978f2b79e048e988f071a147570
23fc0fc5e15032ae5c3d808ff1b2359c0905a6cb
refs/heads/master
2021-07-17T18:10:25.285102
2017-10-22T21:57:40
2017-10-22T21:57:40
107,030,322
0
0
null
null
null
null
UTF-8
Java
false
false
3,779
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.edu.ifpb.pos.soap.viajei.microservice.transports.api; import br.edu.ifpb.pos.soap.viajei.microservice.transports.api.converters.TicketConverter; import br.edu.ifpb.pos.soap.viajei.microservice.transports.api.resources.TicketRequestResource; import br.edu.ifpb.pos.soap.viajei.microservice.transports.api.resources.TicketResponseResource; import br.edu.ifpb.pos.soap.viajei.microservice.transports.infra.Repository; import br.edu.ifpb.pos.soap.viajei.microservice.transports.infra.TicketJPA; import br.edu.ifpb.pos.soap.viajei.microservice.transports.model.Ticket; import br.edu.ifpb.pos.soap.viajei.microservice.transports.services.TicketService; import java.net.URI; import java.util.List; import java.util.stream.Collectors; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.GenericEntity; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; /** * * @author kieckegard */ @Path("tickets") @RequestScoped public class TicketsEndPoint { @Inject @TicketJPA private Repository<Ticket, Long> tickets; @Inject private TicketService ticketService; @Inject private TicketConverter ticketConverter; @GET @Path("{ticketId}") @Produces(MediaType.APPLICATION_JSON) public Response findById( @DefaultValue("-1") @PathParam("ticketId") Long ticketId, @Context UriInfo uriInfo) { Ticket ticketFound = this.tickets.findById(ticketId); return Response .ok(ticketConverter.convert(ticketFound, uriInfo)) .build(); } @GET @Produces(MediaType.APPLICATION_JSON) public Response listAll(@Context UriInfo uriInfo) { List<Ticket> ticketList = this.tickets.listAll(); List<TicketResponseResource> ticketResourceList = ticketList .stream() .map(t -> ticketConverter.convert(t, uriInfo)) .collect(Collectors.toList()); GenericEntity<List<TicketResponseResource>> entity = new GenericEntity<List<TicketResponseResource>> (ticketResourceList){}; return Response.ok(entity).build(); } @POST @Consumes(MediaType.APPLICATION_JSON) public Response add(TicketRequestResource req, @Context UriInfo uriInfo) { Long ticketId = this.ticketService.add(req.getTransport_id(), req.getRoute_id(), req.getClient_id(), req.getSeat_number()); URI createdUri = uriInfo.getBaseUriBuilder() .path(this.getClass()) .path(String.valueOf(ticketId)) .build(); return Response.created(createdUri).build(); } @DELETE @Path("{ticketId}") public Response remove( @DefaultValue("-1") @PathParam("ticketId") Long ticketId) { this.tickets.remove(ticketId); return Response.ok().build(); } @PUT public Response update(Ticket ticket) { this.tickets.update(ticket); return Response.ok().build(); } }
[ "pfernandesvasconcelos@gmail.com" ]
pfernandesvasconcelos@gmail.com
04084f5ace422348ce90c498134ad4902e3029f9
128da67f3c15563a41b6adec87f62bf501d98f84
/com/emt/proteus/duchampopt/fffr8int.java
9b1db0d4ffc52246f9d7a5d895b6ec3c2d612b76
[]
no_license
Creeper20428/PRT-S
60ff3bea6455c705457bcfcc30823d22f08340a4
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
refs/heads/master
2020-03-26T03:59:25.725508
2018-08-12T16:05:47
2018-08-12T16:05:47
73,244,383
0
0
null
null
null
null
UTF-8
Java
false
false
3,681
java
/* */ package com.emt.proteus.duchampopt; /* */ /* */ import com.emt.proteus.runtime.api.Env; /* */ import com.emt.proteus.runtime.api.Frame; /* */ import com.emt.proteus.runtime.api.Function; /* */ import com.emt.proteus.runtime.api.MainMemory; /* */ /* */ public final class fffr8int extends com.emt.proteus.runtime.api.ImplementedFunction /* */ { /* */ public static final int FNID = 3354; /* 11 */ public static final Function _instance = new fffr8int(); /* 12 */ public final Function resolve() { return _instance; } /* */ /* 14 */ public fffr8int() { super("fffr8int", 3, false); } /* */ /* */ public int execute(int paramInt1, int paramInt2, int paramInt3) /* */ { /* 18 */ call(paramInt1, paramInt2, paramInt3); /* 19 */ return 0; /* */ } /* */ /* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4) /* */ { /* 24 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 25 */ paramInt4 += 2; /* 26 */ paramInt3--; /* 27 */ int j = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 28 */ paramInt4 += 2; /* 29 */ paramInt3--; /* 30 */ int k = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 31 */ paramInt4 += 2; /* 32 */ paramInt3--; /* 33 */ call(i, j, k); /* 34 */ return paramInt4; /* */ } /* */ /* */ /* */ public static void call(int paramInt1, int paramInt2, int paramInt3) /* */ { /* 40 */ int i = 0; /* 41 */ int j = 0; /* 42 */ double d = 0.0D; /* */ /* */ /* */ /* */ try /* */ { /* 48 */ if (paramInt2 > 0) { /* 49 */ i = 0; /* */ } else { /* */ break label175; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ for (;;) /* */ { /* 60 */ j = paramInt3 + (i << 2); /* 61 */ d = MainMemory.getF64(paramInt1 + (i << 3)); /* 62 */ if (!com.emt.proteus.lib.api.MathUtils.f_olt(d, -2.14748364849E9D)) { /* */ break label92; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 72 */ MainMemory.setI32Aligned(470852, -11); /* 73 */ MainMemory.setI32(j, Integer.MIN_VALUE); /* */ /* */ break label153; /* */ /* */ label92: /* 78 */ if (!com.emt.proteus.lib.api.MathUtils.f_ogt(d, 2.14748364749E9D)) { /* */ break label140; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 88 */ MainMemory.setI32Aligned(470852, -11); /* 89 */ MainMemory.setI32(j, Integer.MAX_VALUE); /* */ /* */ break label153; /* */ /* */ label140: /* 94 */ MainMemory.setI32(j, (int)d); /* */ /* */ /* */ label153: /* */ /* */ /* 100 */ i += 1; /* 101 */ if (i == paramInt2) { /* */ break; /* */ } /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ label175: /* */ /* */ /* */ /* */ /* */ /* 117 */ return; /* */ } /* */ finally {} /* */ } /* */ } /* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/fffr8int.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "kimjoey79@gmail.com" ]
kimjoey79@gmail.com
65016b8a5a0fbb5050a09374c547cd5d62586c86
c79a207f5efdc03a2eecea3832b248ca8c385785
/com.googlecode.jinahya/activity-state-machine/trunk/src/main/java/com/googlecode/jinahya/util/fsm/ActivityResourceLoader.java
3dcda6617b97f2a2b58e98fdb92736abb7cdc06b
[]
no_license
jinahya/jinahya
977e51ac2ad0af7b7c8bcd825ca3a576408f18b8
5aef255b49da46ae62fb97bffc0c51beae40b8a4
refs/heads/master
2023-07-26T19:08:55.170759
2015-12-02T07:32:18
2015-12-02T07:32:18
32,245,127
2
1
null
2023-07-12T19:42:46
2015-03-15T04:34:19
Java
UTF-8
Java
false
false
1,633
java
/* * Copyright 2011 <a href="mailto:jinahya@gmail.com">Jin Kwon</a>. * * 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.googlecode.jinahya.util.fsm; import android.content.res.AssetManager; import java.io.IOException; import java.io.InputStream; /** * A <code>ResourceLoader</code> implementation uses {@link AssetManager}s for * loading resources. * * @author <a href="mailto:jinahya@gmail.com">Jin Kwon</a> */ public class ActivityResourceLoader implements ResourceLoader { /** * Creates a new instance. * * @param assetManager the <code>AssetManager</code> for opening asset file. */ public ActivityResourceLoader(final AssetManager assetManager) { super(); if (assetManager == null) { throw new NullPointerException("null assetManager"); } this.assetManager = assetManager; } @Override public InputStream loadResource(final String name) throws IOException, FSMException { return assetManager.open(name); } /** asset manager. */ private final AssetManager assetManager; }
[ "onacit@e3df469a-503a-0410-a62b-eff8d5f2b914" ]
onacit@e3df469a-503a-0410-a62b-eff8d5f2b914
f7be6766f3170ddaa7ca9ca204ace1aa73ccb398
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/35/35_a0a3d638b31fd7345bab801ef45063c7f1851f2c/QueueDispatchSelector/35_a0a3d638b31fd7345bab801ef45063c7f1851f2c_QueueDispatchSelector_t.java
54ed16e39fabc8ecaa537d949ec2f6e7009e6cd0
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,112
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.activemq.broker.region; import java.io.IOException; import java.util.List; import javax.jms.JMSException; import org.apache.activemq.broker.region.group.MessageGroupMap; import org.apache.activemq.broker.region.policy.SimpleDispatchSelector; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ConsumerId; import org.apache.activemq.command.Message; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Queue dispatch policy that determines if a message can be sent to a subscription * * @org.apache.xbean.XBean * @version $Revision$ */ public class QueueDispatchSelector extends SimpleDispatchSelector { private static final Log LOG = LogFactory.getLog(QueueDispatchSelector.class); private Subscription exclusiveConsumer; /** * @param destination */ public QueueDispatchSelector(ActiveMQDestination destination) { super(destination); } public Subscription getExclusiveConsumer() { return exclusiveConsumer; } public void setExclusiveConsumer(Subscription exclusiveConsumer) { this.exclusiveConsumer = exclusiveConsumer; } public boolean isExclusiveConsumer(Subscription s) { return s == this.exclusiveConsumer; } public boolean canSelect(Subscription subscription, MessageReference m) throws Exception { if (subscription.isBrowser() && super.canDispatch(subscription, m)) { return true; } boolean result = super.canDispatch(subscription, m) ; if (result) { result = exclusiveConsumer == null || exclusiveConsumer == subscription; if (result) { QueueMessageReference node = (QueueMessageReference) m; // Keep message groups together. String groupId = node.getGroupID(); int sequence = node.getGroupSequence(); if (groupId != null) { MessageGroupMap messageGroupOwners = ((Queue) node .getRegionDestination()).getMessageGroupOwners(); // If we can own the first, then no-one else should own the // rest. if (sequence == 1) { assignGroup(subscription, messageGroupOwners, node,groupId); }else { // Make sure that the previous owner is still valid, we may // need to become the new owner. ConsumerId groupOwner; groupOwner = messageGroupOwners.get(groupId); if (groupOwner == null) { assignGroup(subscription, messageGroupOwners, node,groupId); } else { if (groupOwner.equals(subscription.getConsumerInfo().getConsumerId())) { // A group sequence < 1 is an end of group signal. if (sequence < 0) { messageGroupOwners.removeGroup(groupId); } } else { result = false; } } } } } } return result; } protected void assignGroup(Subscription subs,MessageGroupMap messageGroupOwners, MessageReference n, String groupId) throws IOException { messageGroupOwners.put(groupId, subs.getConsumerInfo().getConsumerId()); Message message = n.getMessage(); if (message instanceof ActiveMQMessage) { ActiveMQMessage activeMessage = (ActiveMQMessage)message; try { activeMessage.setBooleanProperty("JMSXGroupFirstForConsumer", true, false); } catch (JMSException e) { LOG.warn("Failed to set boolean header: " + e, e); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6b8c44041cb054995071573329d20ce498dcf246
9eb3d46bd07c90b0e481f40ee848b2404900fd49
/javafxTest/src/kr/or/ddit/prod/service/IProdService.java
0d43220c2a942c9452a345f8c4dec558c5514c84
[]
no_license
so0487/HighJava
b32a66e7d681808484f29552e703e2c5e6e6097c
d2a3ee667e23ce6876742dd40ed85992f6a8f62c
refs/heads/main
2023-02-06T07:35:24.740381
2020-12-26T05:36:44
2020-12-26T05:36:44
311,550,702
0
0
null
null
null
null
UTF-8
Java
false
false
294
java
package kr.or.ddit.prod.service; import java.util.List; import kr.or.ddit.prod.vo.LProdVo; import kr.or.ddit.prod.vo.ProdVo; public interface IProdService { public List<LProdVo> getLprod(); public List<ProdVo> getProdId(String prodId); public List<ProdVo> getProdLgu(String prodLgu); }
[ "so04876725@gmail.com" ]
so04876725@gmail.com
b01a340bbc4b4b30d83c3027e3c26459ef37f8d8
62b27ffb9d320335d5149ecfb97642ce9cf60a53
/springmvc-study/ch09/src/main/java/edu/nf/ch09/exceptioon/DataAccessException.java
028d88a826e69a9b1a78c629ec9f9239a218d2fd
[]
no_license
twx31420/s3s160-2
51035103f7c17ac6d46d1b35bf2961db4f90498d
d2ed1ffbbd983b611d643c220711c4027a6705c0
refs/heads/master
2023-02-26T09:27:19.904797
2021-02-03T05:47:51
2021-02-03T05:47:51
335,522,718
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
package edu.nf.ch09.exceptioon; /** * @author 天文学 * @date 2021/1/12 * 自定义数据库访问异常 */ public class DataAccessException extends RuntimeException { public DataAccessException(String message, Throwable cause) { super(message, cause); } public DataAccessException(String message) { super(message); } public DataAccessException(Throwable cause) { super(cause); } }
[ "3073239759@qq.com" ]
3073239759@qq.com
2b526b8f7ad216dd860e9726b9e792e9f751d3f6
013e83b707fe5cd48f58af61e392e3820d370c36
/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/JsonViewResponseBodyAdvice.java
658030a801378cd74945680566b7df035d6621a6
[]
no_license
yuexiaoguang/spring4
8376f551fefd33206adc3e04bc58d6d32a825c37
95ea25bbf46ee7bad48307e41dcd027f1a0c67ae
refs/heads/master
2020-05-27T20:27:54.768860
2019-09-02T03:39:57
2019-09-02T03:39:57
188,770,867
0
1
null
null
null
null
UTF-8
Java
false
false
1,856
java
package org.springframework.web.servlet.mvc.method.annotation; import com.fasterxml.jackson.annotation.JsonView; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJacksonValue; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; /** * {@link ResponseBodyAdvice}实现, 增加了对在Spring MVC {@code @RequestMapping} * 或{@code @ExceptionHandler}方法上声明的Jackson {@code @JsonView}注解的支持. * * <p>注解中指定的序列化视图将传递给 * {@link org.springframework.http.converter.json.MappingJackson2HttpMessageConverter}, * 然后将使用它来序列化响应正文. * * <p>请注意, 尽管{@code @JsonView}允许指定多个类, 但只有一个类参数时才支持使用响应正文增强. * 考虑使用复合接口. */ public class JsonViewResponseBodyAdvice extends AbstractMappingJacksonResponseBodyAdvice { @Override public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType) { return super.supports(returnType, converterType) && returnType.hasMethodAnnotation(JsonView.class); } @Override protected void beforeBodyWriteInternal(MappingJacksonValue bodyContainer, MediaType contentType, MethodParameter returnType, ServerHttpRequest request, ServerHttpResponse response) { JsonView annotation = returnType.getMethodAnnotation(JsonView.class); Class<?>[] classes = annotation.value(); if (classes.length != 1) { throw new IllegalArgumentException( "@JsonView only supported for response body advice with exactly 1 class argument: " + returnType); } bodyContainer.setSerializationView(classes[0]); } }
[ "yuexiaoguang@vortexinfo.cn" ]
yuexiaoguang@vortexinfo.cn
0effbcbc164898a54bc3b8939a6b6d22a392f8c3
608cf243607bfa7a2f4c91298463f2f199ae0ec1
/android/versioned-abis/expoview-abi39_0_0/src/main/java/abi39_0_0/host/exp/exponent/modules/universal/sensors/ScopedRotationVectorSensorService.java
85506d25e60f9a321334b9dadc3fb1b3357d9e53
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
kodeco835/symmetrical-happiness
ca79bd6c7cdd3f7258dec06ac306aae89692f62a
4f91cb07abef56118c35f893d9f5cc637b9310ef
refs/heads/master
2023-04-30T04:02:09.478971
2021-03-23T03:19:05
2021-03-23T03:19:05
350,565,410
0
1
MIT
2023-04-12T19:49:48
2021-03-23T03:18:02
Objective-C
UTF-8
Java
false
false
944
java
package abi39_0_0.host.exp.exponent.modules.universal.sensors; import java.util.Collections; import java.util.List; import abi39_0_0.org.unimodules.core.interfaces.InternalModule; import abi39_0_0.org.unimodules.interfaces.sensors.services.RotationVectorSensorService; import host.exp.exponent.kernel.ExperienceId; import host.exp.exponent.kernel.services.sensors.SubscribableSensorKernelService; public class ScopedRotationVectorSensorService extends BaseSensorService implements InternalModule, RotationVectorSensorService { public ScopedRotationVectorSensorService(ExperienceId experienceId) { super(experienceId); } @Override protected SubscribableSensorKernelService getSensorKernelService() { return getKernelServiceRegistry().getRotationVectorSensorKernelService(); } @Override public List<Class> getExportedInterfaces() { return Collections.<Class>singletonList(RotationVectorSensorService.class); } }
[ "81201147+kodeco835@users.noreply.github.com" ]
81201147+kodeco835@users.noreply.github.com
ded031043062e82d14d96d6e30d9415c18693f0d
0480f00464d50b2e2a80567db2e00897507f8d5b
/server/src/main/java/com/zhat/servlet/ZLHttpServletHelper.java
30bee7482e87066751208bb3305eac07dabce0d4
[]
no_license
lizhieffe/zhat
92bc9f9e2a9dad4aabb08ade114b231f444ebbf3
77274abd19774b3f1a28263a49858e86f1e25559
refs/heads/master
2016-09-03T07:03:23.101964
2015-04-16T01:48:35
2015-04-16T01:48:35
32,075,695
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package com.zhat.servlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.httpclient.HttpStatus; public class ZLHttpServletHelper { /** * Capture the exception thrown by servlet and return 500 error. * TODO: implement the feature to capture pre-defined exception and throws corresponding error code. * @param server * @param socket * @param request */ public static void doGetException(HttpServletRequest request, HttpServletResponse response , Exception e) { response.setStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR); response.setHeader("ZL-Exception", e.getMessage()); } }
[ "lizhieffe@gmail.com" ]
lizhieffe@gmail.com
f94d9d8b776ba1b5d610631a18d34d9872f80431
db97ce70bd53e5c258ecda4c34a5ec641e12d488
/src/main/java/com/alipay/api/domain/AlipayInsSceneInsserviceprodSerprogressSyncModel.java
2d890d1b3a74120f30c371a85b5b1b54c0634284
[ "Apache-2.0" ]
permissive
smitzhang/alipay-sdk-java-all
dccc7493c03b3c937f93e7e2be750619f9bed068
a835a9c91e800e7c9350d479e84f9a74b211f0c4
refs/heads/master
2022-11-23T20:32:27.041116
2020-08-03T13:03:02
2020-08-03T13:03:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,499
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 增值服务进度同步接口 * * @author auto create * @since 1.0, 2020-06-19 18:25:02 */ public class AlipayInsSceneInsserviceprodSerprogressSyncModel extends AlipayObject { private static final long serialVersionUID = 3458659471759324258L; /** * 蚂蚁服务合约编号 */ @ApiField("ant_ser_contract_no") private String antSerContractNo; /** * 蚂蚁服务产品号 */ @ApiField("ant_ser_prod_no") private String antSerProdNo; /** * 扩展信息,JSON字符串格式。该接口为通用接口,需要和增值服务中台的开发同学根据不同的业务约定不同的字段。 */ @ApiField("biz_data") private String bizData; /** * 状态变更时间 */ @ApiField("change_time") private Date changeTime; /** * 外部业务号 */ @ApiField("out_biz_no") private String outBizNo; /** * 服务业务单号 */ @ApiField("ser_biz_no") private String serBizNo; /** * 服务业务类型 */ @ApiField("ser_biz_type") private String serBizType; /** * 状态 */ @ApiField("status") private String status; public String getAntSerContractNo() { return this.antSerContractNo; } public void setAntSerContractNo(String antSerContractNo) { this.antSerContractNo = antSerContractNo; } public String getAntSerProdNo() { return this.antSerProdNo; } public void setAntSerProdNo(String antSerProdNo) { this.antSerProdNo = antSerProdNo; } public String getBizData() { return this.bizData; } public void setBizData(String bizData) { this.bizData = bizData; } public Date getChangeTime() { return this.changeTime; } public void setChangeTime(Date changeTime) { this.changeTime = changeTime; } public String getOutBizNo() { return this.outBizNo; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public String getSerBizNo() { return this.serBizNo; } public void setSerBizNo(String serBizNo) { this.serBizNo = serBizNo; } public String getSerBizType() { return this.serBizType; } public void setSerBizType(String serBizType) { this.serBizType = serBizType; } public String getStatus() { return this.status; } public void setStatus(String status) { this.status = status; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
463aaeb890d8484accdce2bc7ea8fd3dbdecc4e8
cbc61ffb33570a1bc55bb1e754510192b0366de2
/ole-app/olefs/src/main/java/org/kuali/ole/sys/batch/dataaccess/impl/AbstractPreparedStatementCachingDaoJdbc.java
789c6aa17d728eb7f6c1106e9da996e6f7079ca7
[ "ECL-2.0" ]
permissive
VU-libtech/OLE-INST
42b3656d145a50deeb22f496f6f430f1d55283cb
9f5efae4dfaf810fa671c6ac6670a6051303b43d
refs/heads/master
2021-07-08T11:01:19.692655
2015-05-15T14:40:50
2015-05-15T14:40:50
24,459,494
1
0
ECL-2.0
2021-04-26T17:01:11
2014-09-25T13:40:33
Java
UTF-8
Java
false
false
5,707
java
/* * Copyright 2009 The Kuali Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ecl2.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kuali.ole.sys.batch.dataaccess.impl; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.kuali.ole.sys.batch.dataaccess.PreparedStatementCachingDao; import org.kuali.rice.core.framework.persistence.jdbc.dao.PlatformAwareDaoBaseJdbc; public abstract class AbstractPreparedStatementCachingDaoJdbc extends PlatformAwareDaoBaseJdbc implements PreparedStatementCachingDao { protected static final String RETRIEVE_PREFIX = "retrieve-"; protected static final String INSERT_PREFIX = "insert-"; protected static final String UPDATE_PREFIX = "update-"; protected abstract class JdbcWrapper<T> { protected abstract void populateStatement(PreparedStatement preparedStatement) throws SQLException; void update(Class<T> type, PreparedStatement preparedStatement) { try { populateStatement(preparedStatement); preparedStatement.executeUpdate(); } catch (SQLException e) { throw new RuntimeException("AbstractUpdatingPreparedStatementCachingDaoJdbc.UpdatingJdbcWrapper encountered exception during getObject method for type: " + type, e); } } } protected abstract class RetrievingJdbcWrapper<T> extends JdbcWrapper { protected abstract T extractResult(ResultSet resultSet) throws SQLException; public T get(Class<T> type) { T value = null; PreparedStatement statement = preparedStatementCache.get(RETRIEVE_PREFIX + type); try { populateStatement(statement); ResultSet resultSet = statement.executeQuery(); if (resultSet.next()) { value = extractResult(resultSet); if (resultSet.next()) { throw new RuntimeException("More that one row returned when selecting by primary key in AbstractRetrievingPreparedStatementCachingDaoJdbc.RetrievingJdbcWrapper for: " + type); } } resultSet.close(); } catch (SQLException e) { throw new RuntimeException("AbstractRetrievingPreparedStatementCachingDaoJdbc.RetrievingJdbcWrapper encountered exception during getObject method for type: " + type, e); } return (T) value; } } /** * Retrieve list jdbc objects */ protected abstract class RetrievingListJdbcWrapper<T> extends JdbcWrapper { protected abstract T extractResult(ResultSet resultSet) throws SQLException; public List<T> get(Class<T> type) { List<T> resultList = new ArrayList<T>(); PreparedStatement statement = preparedStatementCache.get(RETRIEVE_PREFIX + type); try { populateStatement(statement); ResultSet resultSet = statement.executeQuery(); while (resultSet.next()) { resultList.add(extractResult(resultSet)); } resultSet.close(); } catch (SQLException e) { throw new RuntimeException("AbstractRetrievingPreparedStatementCachingDaoJdbc.RetrievingListJdbcWrapper encountered exception during getObject method for type: " + type, e); } return resultList; } } protected abstract class InsertingJdbcWrapper<T> extends JdbcWrapper { public void execute(Class<T> type) { update(type, preparedStatementCache.get(INSERT_PREFIX + type)); } } protected abstract class UpdatingJdbcWrapper<T> extends JdbcWrapper { public void execute(Class<T> type) { update(type, preparedStatementCache.get(UPDATE_PREFIX + type)); } } protected Map<String, PreparedStatement> preparedStatementCache; protected abstract Map<String, String> getSql(); public void initialize() { preparedStatementCache = new HashMap<String, PreparedStatement>(); try { for (String statementKey : getSql().keySet()) { preparedStatementCache.put(statementKey, getConnection().prepareStatement(getSql().get(statementKey))); } } catch (SQLException e) { throw new RuntimeException("Caught exception preparing statements in CachingDaoJdbc initialize method", e); } } public void destroy() { try { for (PreparedStatement preparedStatement : preparedStatementCache.values()) { preparedStatement.close(); } preparedStatementCache = null; } catch (SQLException e) { throw new RuntimeException("Caught exception closing statements in CachingDaoJdbc destroy method", e); } } }
[ "david.lacy@villanova.edu" ]
david.lacy@villanova.edu
54b1e835bf1f7115739035fd4d624a51108e47ec
45062b71a6b9ac818ba99ff6f48eb8a9dcd0b68a
/src/main/java/com/github/instagram4j/instagram4j/responses/tags/TagsSearchResponse.java
f39d12e06962b52bc92d094b97f6d2d08fc9d432
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference" ]
permissive
mehc77/instagram4j
fa2e89072de32eda435009c71629ef6d9e1760c0
76333472e9412eb3c0e65b04c6fd407b4fbd58a3
refs/heads/master
2023-02-02T16:18:49.426232
2020-12-14T23:07:45
2020-12-14T23:07:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
710
java
package com.github.instagram4j.instagram4j.responses.tags; import com.github.instagram4j.instagram4j.responses.IGResponse; import lombok.Data; import java.util.List; @Data public class TagsSearchResponse extends IGResponse { private String rank_token; private String page_token; private String status; private boolean has_more; private List<SearchTagTag> results; @Data public static class SearchTagTag { private long id; private String name; private String formatted_media_count; private String search_result_subtitle; private String profile_pic_url; private int media_count; private boolean use_default_avatar; } }
[ "justinxvopro@gmail.com" ]
justinxvopro@gmail.com
5777ace78995498c613c32cb138dc5320f0abc85
032de1a3418a0b1eeddb93767c162a5710b91074
/ratpack-core/src/main/java/org/ratpackframework/context/internal/RootContext.java
00263e25e63e6b13b0cbe618b2382b69886a1b57
[ "Apache-2.0" ]
permissive
c089/ratpack
4aa7fbbcb8702cd31b1147d084b7091ae525017a
f8bbeb7869ef3414ca6308b77c5a7824fcf77ae1
refs/heads/master
2021-01-20T21:29:04.902119
2013-05-22T19:53:06
2013-05-22T19:53:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,148
java
/* * Copyright 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.ratpackframework.context.internal; import java.util.Arrays; public class RootContext extends ContextSupport { private final Object[] objects; public RootContext(Object... objects) { this.objects = objects; } @Override public String toString() { return "RootContext{" + Arrays.toString(objects) + '}'; } protected <T> T doMaybeGet(Class<T> type) { for (Object object : objects) { if (type.isInstance(object)) { return type.cast(object); } } return null; } }
[ "ld@ldaley.com" ]
ld@ldaley.com
2eaf8d19282cf105add4a44e8ecce2602973a7d1
6f66744b7aa5334425d183fffac8f258503784e5
/app/src/main/java/com/mamacgroup/hamtest/HaamMerge/WishListActivity.java
3846a2d092f048b7c1bb39be51221f76c29fdba1
[]
no_license
prudhviraj038/haam
561654c404e7ab7cff0ed0b15726e5f0df61adb7
f19dca616ea911c86bb45c6237acc3d5a997c7ab
refs/heads/master
2021-04-12T08:17:08.936029
2018-03-22T06:32:29
2018-03-22T06:32:29
125,964,418
0
0
null
null
null
null
UTF-8
Java
false
false
6,448
java
package com.mamacgroup.hamtest.HaamMerge; import android.app.Activity; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.AbsListView; import android.widget.GridView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Toast; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonArrayRequest; import com.astuetz.PagerSlidingTabStrip; import com.google.android.gms.analytics.HitBuilders; import com.mamacgroup.hamtest.R; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.Hashtable; import java.util.Map; /** * Created by Chinni on 04-05-2016. */ public class WishListActivity extends Activity { PagerSlidingTabStrip pagerSlidingTabStrip; ViewPager viewPager; ImageView setting,back; MyTextView tittle,no_fav,pd_tv; GridView gv; LinearLayout pd; ArrayList<News> newses; WishAdapter newsAdapter; int page=0; int preLast=0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Settings.settingsforceRTLIfSupported(this); setContentView(R.layout.haam_wishlist_activity); newses=new ArrayList<>(); tittle = (MyTextView) findViewById(R.id.tittlee); no_fav = (MyTextView) findViewById(R.id.no_fav_tv); no_fav.setText(Settings.getword(this,"No favorite news")); tittle.setText(Settings.getword(this,"WISH LIST")); pd_tv=(MyTextView)findViewById(R.id.pd_tv_cat_wish); pd_tv.setText(Settings.getword(this,"Loading")); back=(ImageView)findViewById(R.id.back_cs_wish); setting=(ImageView)findViewById(R.id.slid_setting_wish); gv = (GridView)findViewById(R.id.gridView_neews_wish); pd=(LinearLayout)findViewById(R.id.progressBar_llll_wish); if(!AppController.getInstance().selected_channels.isEmpty()) { Log.e("wish",AppController.getInstance().selected_channels.toString()); get_news(); }else{ no_fav.setVisibility(View.VISIBLE); Toast.makeText(WishListActivity.this, Settings.getword(WishListActivity.this,"Wish List Empty"), Toast.LENGTH_SHORT).show(); } // gv.setOnScrollListener(new AbsListView.OnScrollListener() { // @Override // public void onScrollStateChanged(AbsListView absListView, int i) { // // // } // // @Override // public void onScroll(AbsListView absListView, int i, int i1, int i2) { // final int last = i + i1; // if (last >= i2) { // if (preLast != last) { // preLast = last; // page++; // get_news(); // } // } // // } // }); setting.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(WishListActivity.this, SettingsActivity.class); startActivity(intent); } }); back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onBackPressed(); } }); } static WishListActivity mInstance; public static WishListActivity getInstance() { return mInstance; } @Override protected void onPause() { super.onPause(); try { AppController.getInstance().cancelPendingRequests(); Settings.set_minimizetime(this); } catch (Exception ex) { ex.printStackTrace(); } } @Override protected void onResume(){ super.onResume(); //AppController.getInstance().getDefaultTracker().setScreenName("WISHLIST SCREEN"); //AppController.getInstance().getDefaultTracker().send(new HitBuilders.ScreenViewBuilder().build()); try { Settings.get_minimizetime(this); } catch (Exception ex) { ex.printStackTrace(); } } public void get_news() { String url; url = Settings.SERVERURL + "news.php?news="+android.text.TextUtils.join(",", AppController.getInstance().selected_channels); Log.e("url--->", url); // final ProgressDialog progressDialog = new ProgressDialog(getActivity()); // progressDialog.setMessage("Please wait...."); // progressDialog.setCancelable(false); pd.setVisibility(View.VISIBLE); JsonArrayRequest jsObjRequest = new JsonArrayRequest(url, new Response.Listener<JSONArray>() { @Override public void onResponse(JSONArray jsonObject) { pd.setVisibility(View.GONE); // newses.clear(); Log.e("response is: ", jsonObject.toString()); try { for (int i = 0; i < jsonObject.length(); i++) { JSONObject sub = jsonObject.getJSONObject(i); News prod = new News(sub); newses.add(prod); } newsAdapter=new WishAdapter(WishListActivity.this,newses); gv.setAdapter(newsAdapter); newsAdapter.notifyDataSetChanged(); } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { // TODO Auto-generated method stub Log.e("response is:", error.toString()); Toast.makeText(WishListActivity.this, Settings.getword(WishListActivity.this,"server_not_connected"), Toast.LENGTH_SHORT).show(); pd.setVisibility(View.GONE); } }); AppController.getInstance().addToRequestQueue(jsObjRequest); } }
[ "prudhviraj038@gmail.com" ]
prudhviraj038@gmail.com
a96dac74a09627ec522006fdab2f6d00c57faacc
bf390e6589e240c6ccc325355cfd0c21fbe9d884
/3.JavaMultithreading/src/com/javarush/task/task31/task3110/command/ZipContentCommand.java
9b7c5c9f5ad33dc97a986177b75a78a44f57ff2c
[]
no_license
vladmeh/jrt
84878788fbb1f10aa55d320d205f886d1df9e417
0272ded03ac8eced7bf901bdfcc503a4eb6da12a
refs/heads/master
2020-04-05T11:20:15.441176
2019-05-22T22:24:56
2019-05-22T22:24:56
81,300,849
4
5
null
null
null
null
UTF-8
Java
false
false
870
java
package com.javarush.task.task31.task3110.command; import com.javarush.task.task31.task3110.ConsoleHelper; import com.javarush.task.task31.task3110.FileProperties; import com.javarush.task.task31.task3110.ZipFileManager; import java.util.List; public class ZipContentCommand extends ZipCommand { @Override public void execute() throws Exception { ConsoleHelper.writeMessage("Просмотр содержимого архива."); ZipFileManager zipFileManager = getZipFileManager(); ConsoleHelper.writeMessage("Содержимое архива:"); List<FileProperties> files = zipFileManager.getFilesList(); for (FileProperties file : files) { ConsoleHelper.writeMessage(file.toString()); } ConsoleHelper.writeMessage("Содержимое архива прочитано."); } }
[ "vladmeh@gmail.com" ]
vladmeh@gmail.com
92e38cdc3a9487d34593595345d4fd29f5493a01
1671d87c2e414de8186570983c65c220888f20b1
/第一阶段/day18/src/com/atguigu/java/InstantTest.java
3116e9064e8f008a89401ce199186cda1f957d8e
[]
no_license
qisirendexudoudou/BigData_0722
4f25b508b4c20088d4155abb2d52e1d39c8b0e81
e474e6ebcbbfedd12f859f0198238f58b73e5bec
refs/heads/master
2022-07-21T17:41:47.611707
2019-11-16T05:59:11
2019-11-16T05:59:11
221,875,869
0
0
null
2022-06-21T02:14:43
2019-11-15T08:10:07
Java
UTF-8
Java
false
false
935
java
package com.atguigu.java; import java.time.Instant; import java.time.OffsetDateTime; import java.time.ZoneOffset; import org.junit.Test; import java.time.Instant; /** * Instant : 用来获取UTC时区的时间 * * 了解 * */ public class InstantTest { @Test public void test(){ //静态方法,返回默认UTC时区的Instant类的对象 Instant now = Instant.now(); System.out.println(now); //静态方法,返回在1970-01-01 00:00:00基础上加上指定毫秒数之后的Instant类的对象 Instant now2 = Instant.ofEpochMilli(152123123131L); System.out.println(now2); //结合即时的偏移来创建一个 OffsetDateTime OffsetDateTime atOffset = now.atOffset(ZoneOffset.ofHours(8)); System.out.println(atOffset); //返回1970-01-01 00:00:00到当前时间的毫秒数,即为时间戳 long epochMilli = now.toEpochMilli();//1566005615581 System.out.println(epochMilli); } }
[ "546223079@qq.com" ]
546223079@qq.com
07bf498a0515796cf4d602dab61f63b51ea5cb48
5cc2b1774512958324253b244b5cce304eb07063
/spring-boot-testing-mock-bean/src/test/java/net/nicoll/boot/test/mockbean/AbstractIntegrationTests.java
a2b83686e5c3e0a10c46fdd1e954b388d3b952bd
[]
no_license
snicoll-scratches/spring-boot-testing-use-cases
1b0970d3040a42c961701fd3d9b69fc05c64a80c
67af502f0f4221a170520c43cbaaad05201cb42d
refs/heads/main
2021-06-08T04:45:42.179879
2016-07-11T11:00:36
2016-07-11T11:00:36
39,764,288
1
0
null
null
null
null
UTF-8
Java
false
false
294
java
package net.nicoll.boot.test.mockbean; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public abstract class AbstractIntegrationTests { }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
48d060bb69ad63cac8d9e4748d66bef49f61d160
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_59e810fd38aa41ab65f484aca29011cb962ceeaf/DrumInstrument/2_59e810fd38aa41ab65f484aca29011cb962ceeaf_DrumInstrument_s.java
d3b63704cec50dc0d625c6f32f82ed43fafcd4ad
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,774
java
package GUI; import messaging.SongFragment; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Created with IntelliJ IDEA. * User: Tae Kim * Date: 5/2/13 * Time: 12:21 AM * To change this template use File | Settings | File Templates. */ public class DrumInstrument extends AbstractInstrument { private instruments.Drums drums; private String[] keys = {"Crash", "Hi-Tom", "Kick", "Low-Tom", "Snare"}; public DrumInstrument(final CardLayout cl, final JPanel mainPanel) { // Call Abstract Instrument's constructor super(cl, mainPanel); // Instantiate the instrument this.drums = new instruments.DrumMachine(); // Add image to the image panel JLabel instrumentsLabel = new JLabel(); instrumentsLabel.setAlignmentX(JComponent.CENTER_ALIGNMENT); instrumentsLabel.setIcon(new ImageIcon("Resources/images/drumtitle.jpg")); titlePanel.add(instrumentsLabel); // Create buttons for the piano for (int i = 0; i < keys.length; i++) { final JButton key = new JButton(keys[i]); key.setPreferredSize(new Dimension(75, 200)); key.setBackground(Color.WHITE); key.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { SongFragment fragment = new SongFragment(drums.getNoteByName(key.getText())); Session.songController.play(fragment, true); } }); buttonPanel.add(key); } // add components this.addComponents(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
bf1a9b94d874ae9a158c5dbe27eac9381a0f0a39
3676ca2c16308e8894a4fd6f43218330d63febaf
/app/src/main/java/com/sun/study/framework/proxy/Enhancer.java
6a2164dbcc4c8c1c4fea3d9c9f1fd3c0f651699d
[]
no_license
jyyxxgz/In-depthStudy
945d16abf8703ead3de914fcff0483d33580895c
9440d1a0319f7bd771543761fdc5d96d99d82ca4
refs/heads/master
2021-04-25T11:13:15.823815
2017-11-30T05:56:19
2017-11-30T05:56:19
111,894,492
0
0
null
2017-11-24T08:29:22
2017-11-24T08:29:21
null
UTF-8
Java
false
false
2,618
java
package com.sun.study.framework.proxy; import com.google.dexmaker.stock.ProxyBuilder; import com.sun.study.framework.proxy.callback.Interceptor; import com.sun.study.framework.proxy.filter.InterceptorFilter; import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; public class Enhancer<T> implements InvocationHandler { private Interceptor[] callBacks; private InterceptorFilter filter; private Class<T> superClazz; private Class<?>[] constructorArgTypes; private Object[] constructorArgValues; private File mCacheDir; /** * @param superClazz 构造函数需要的class */ public Enhancer(File cacheFileDir, Class<T> superClazz) { this.superClazz = superClazz; this.mCacheDir = cacheFileDir; } /** * @param superClazz * @param clazzes * @param args */ public Enhancer(File cacheFileDir, Class<T> superClazz, Class<?>[] clazzes, Object[] args) { this(cacheFileDir, superClazz); this.constructorArgTypes = clazzes; this.constructorArgValues = args; } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (filter == null) { return null; } int accept = filter.accept(method); if (accept >= callBacks.length) { return null; } if (method.getName().equals("hashCode") || method.getName().equals("toString")) { return ProxyBuilder.callSuper(proxy, method, args); } return callBacks[accept].intercept(proxy, method, args); } public void setCacheDir(File file) { this.mCacheDir = file; } /** * 添加拦截器 */ public void addCallBacks(Interceptor[] callBacks) { this.callBacks = callBacks; } /** * 添加过滤器 */ public void addFilter(InterceptorFilter filter) { this.filter = filter; } /** * 生成代理类对象 */ public T create() { ProxyBuilder<T> proxy = ProxyBuilder.forClass(superClazz); if (constructorArgTypes != null && constructorArgValues != null && constructorArgValues.length == constructorArgTypes.length) { proxy.constructorArgTypes(constructorArgTypes).constructorArgValues(constructorArgValues); } proxy.handler(this); proxy.dexCache(mCacheDir); try { return proxy.build(); } catch (IOException e) { e.printStackTrace(); } return null; } }
[ "sfsheng0322@gmail.com" ]
sfsheng0322@gmail.com
a27737a77bb01a8458f81a614cbb19ca09d24aed
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_62e758cc8a48019b39c2cd9f89ec8a90329bb676/MgcpCommandException/1_62e758cc8a48019b39c2cd9f89ec8a90329bb676_MgcpCommandException_s.java
3745d10a56fd5fe2e90e9681dbd9804f2c6329ea
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,651
java
/* * JBoss, Home of Professional Open Source * Copyright 2011, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.mobicents.media.server.mgcp.tx.cmd; import org.mobicents.media.server.utils.Text; /** * * @author kulikov */ public class MgcpCommandException extends RuntimeException { private int code; private Text message; /** * Creates a new instance of <code>MgcpCommandException</code> without detail message. */ public MgcpCommandException(int code, Text message) { this.code = code; this.message = message; } public int getCode() { return code; } public Text getErrorMessage() { return message; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
dc9e2b7593d4ed4b170d99bde071b17d287674f5
05e5bee54209901d233f4bfa425eb6702970d6ab
/net/minecraft/util/io/netty/channel/AddressedEnvelope.java
a04168fdba8823591e99f9669abd96fe4e213b9a
[]
no_license
TheShermanTanker/PaperSpigot-1.7.10
23f51ff301e7eb05ef6a3d6999dd2c62175c270f
ea9d33bcd075e00db27b7f26450f9dc8e6d18262
refs/heads/master
2022-12-24T10:32:09.048106
2020-09-25T15:43:22
2020-09-25T15:43:22
298,614,646
0
1
null
null
null
null
UTF-8
Java
false
false
477
java
package net.minecraft.util.io.netty.channel; import net.minecraft.util.io.netty.util.ReferenceCounted; public interface AddressedEnvelope<M, A extends java.net.SocketAddress> extends ReferenceCounted { M content(); A sender(); A recipient(); } /* Location: D:\Paper-1.7.10\PaperSpigot-1.7.10-R0.1-SNAPSHOT-latest.jar!\net\minecraf\\util\io\netty\channel\AddressedEnvelope.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
3d0d51966adff1e97d40840000779206a137ac12
df79dbcfc869b9d2180a44e34aa1e5ef208d1655
/hibernate/Hibernate_mvccrud/src/com/wcs/mvccrud/model/Student.java
bbed322684669e5b7c78cc634723d953d1aaa67c
[]
no_license
paragkhedkar07/TotalProjects
a170e3d5455a046b62709986f3f00a95b49fee70
7791da688c121d2422a4f4e52e91256c9b7606e5
refs/heads/master
2023-03-14T23:47:43.492749
2021-03-27T14:59:08
2021-03-27T14:59:08
352,097,373
0
0
null
null
null
null
UTF-8
Java
false
false
720
java
package com.wcs.mvccrud.model; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Student { @Id private int rollno; private String name; private String addr; private String un; private String ps; public int getRollno() { return rollno; } public void setRollno(int rollno) { this.rollno = rollno; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddr() { return addr; } public void setAddr(String addr) { this.addr = addr; } public String getUn() { return un; } public void setUn(String un) { this.un = un; } public String getPs() { return ps; } public void setPs(String ps) { this.ps = ps; } }
[ "paragkhedkar07@gmail.com" ]
paragkhedkar07@gmail.com
e537e30deb78b49e8ab6f3700dc3cbc18944a896
812be6b9d1ba4036652df166fbf8662323f0bdc9
/java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/attributesetinstance/AttributeSetInstanceEventId.java
1e8466c5cc908dba3f1826db88895f1908641bd9
[]
no_license
lanmolsz/wms
8503e54a065670b48a15955b15cea4926f05b5d6
4b71afd80127a43890102167a3af979268e24fa2
refs/heads/master
2020-03-12T15:10:26.133106
2018-09-27T08:28:05
2018-09-27T08:28:05
130,684,482
0
0
null
2018-04-23T11:11:24
2018-04-23T11:11:24
null
UTF-8
Java
false
false
5,597
java
package org.dddml.wms.domain.attributesetinstance; import java.io.Serializable; import org.dddml.wms.domain.*; public class AttributeSetInstanceEventId implements Serializable { private String attributeSetInstanceId; public String getAttributeSetInstanceId() { return this.attributeSetInstanceId; } public void setAttributeSetInstanceId(String attributeSetInstanceId) { this.attributeSetInstanceId = attributeSetInstanceId; } private Long version; public Long getVersion() { return this.version; } public void setVersion(Long version) { this.version = version; } public AttributeSetInstanceEventId() { } public AttributeSetInstanceEventId(String attributeSetInstanceId, Long version) { this.attributeSetInstanceId = attributeSetInstanceId; this.version = version; } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || obj.getClass() != this.getClass()) { return false; } AttributeSetInstanceEventId other = (AttributeSetInstanceEventId)obj; return true && (attributeSetInstanceId == other.attributeSetInstanceId || (attributeSetInstanceId != null && attributeSetInstanceId.equals(other.attributeSetInstanceId))) && (version == other.version || (version != null && version.equals(other.version))) ; } @Override public int hashCode() { int hash = 0; if (this.attributeSetInstanceId != null) { hash += 13 * this.attributeSetInstanceId.hashCode(); } if (this.version != null) { hash += 13 * this.version.hashCode(); } return hash; } protected static final String[] FLATTENED_PROPERTY_NAMES = new String[]{ "attributeSetInstanceId", "version", }; protected static final String[] FLATTENED_PROPERTY_TYPES = new String[]{ "String", "Long", }; protected static final java.util.Map<String, String> FLATTENED_PROPERTY_TYPE_MAP; static { java.util.Map<String, String> m = new java.util.HashMap<String, String>(); for (int i = 0; i < FLATTENED_PROPERTY_NAMES.length; i++) { m.put(FLATTENED_PROPERTY_NAMES[i], FLATTENED_PROPERTY_TYPES[i]); } FLATTENED_PROPERTY_TYPE_MAP = m; } protected void forEachFlattenedProperty(java.util.function.BiConsumer<String, Object> consumer) { for (int i = 0; i < FLATTENED_PROPERTY_NAMES.length; i++) { String pn = FLATTENED_PROPERTY_NAMES[i]; if (Character.isLowerCase(pn.charAt(0))) { pn = Character.toUpperCase(pn.charAt(0)) + pn.substring(1); } java.lang.reflect.Method m = null; try { m = this.getClass().getDeclaredMethod("get" + pn, new Class[0]); } catch (NoSuchMethodException e) { try { m = this.getClass().getMethod("get" + pn, new Class[0]); } catch (NoSuchMethodException e1) { throw new RuntimeException(e); } } Object pv = null; try { pv = m.invoke(this); } catch (IllegalAccessException | java.lang.reflect.InvocationTargetException e) { throw new RuntimeException(e); } consumer.accept(pn, pv); } } protected void setFlattenedPropertyValues(Object... values) { for (int i = 0; i < FLATTENED_PROPERTY_NAMES.length; i++) { String pn = FLATTENED_PROPERTY_NAMES[i]; if (Character.isLowerCase(pn.charAt(0))) { pn = Character.toUpperCase(pn.charAt(0)) + pn.substring(1); } Object v = values[i]; Class propCls = v == null ? Object.class : v.getClass(); java.lang.reflect.Method setterMethod = null; if (v == null) { setterMethod = getNullValueSetterMethod(pn); } if (setterMethod == null) { try { setterMethod = this.getClass().getDeclaredMethod("set" + pn, new Class[]{propCls}); } catch (NoSuchMethodException e) { try { setterMethod = this.getClass().getMethod("set" + pn, new Class[]{propCls}); } catch (NoSuchMethodException e1) { throw new RuntimeException(e1); } } } try { setterMethod.invoke(this, v); } catch (IllegalAccessException | java.lang.reflect.InvocationTargetException e) { throw new RuntimeException(e); } } } private java.lang.reflect.Method getNullValueSetterMethod(String pascalPropName) { java.lang.reflect.Method m; final String methodName = "set" + pascalPropName; m = java.util.Arrays.stream(this.getClass().getDeclaredMethods()) .filter(me -> me.getName().equals(methodName) && me.getParameterCount() == 1) .findFirst().orElse(null); if (m == null) { m = java.util.Arrays.stream(this.getClass().getMethods()) .filter(me -> me.getName().equals(methodName) && me.getParameterCount() == 1) .findFirst().orElse(null); } return m; } }
[ "yangjiefeng@gmail.com" ]
yangjiefeng@gmail.com
54078d90d741f26c5960b9771d8c5c41671d4dd3
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13141-4-23-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/XWiki_ESTest_scaffolding.java
d9165a5e2312cea95eaa95a882a211a41d50ea9a
[]
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
423
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Jan 22 04:18:20 UTC 2020 */ package com.xpn.xwiki; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWiki_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2bb9632c1643f39caf58485307216a993a279417
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava7/Foo299Test.java
4f26e2bc8cd6b0a65827e9baaf30804510dbcdfb
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
481
java
package applicationModulepackageJava7; import org.junit.Test; public class Foo299Test { @Test public void testFoo0() { new Foo299().foo0(); } @Test public void testFoo1() { new Foo299().foo1(); } @Test public void testFoo2() { new Foo299().foo2(); } @Test public void testFoo3() { new Foo299().foo3(); } @Test public void testFoo4() { new Foo299().foo4(); } @Test public void testFoo5() { new Foo299().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
8eca26580a073a0bb2171b21bde43ad8748d8ace
e68bbc077e62033e90d15886f4a858e2eaf5bf78
/decorator_pattern/src/CondimentDecorator.java
59c1a52bfbfc4483515ee2b08038f4dba60efcac
[]
no_license
datadiskpfv/java_reference
eba22583c3e5298040015898174fe0b84fa48b76
8ec37dc0e4447a046e0d4b5dedbff897cd093fe7
refs/heads/master
2021-01-19T16:35:22.383117
2017-07-08T16:44:59
2017-07-08T16:44:59
88,274,962
2
0
null
null
null
null
UTF-8
Java
false
false
150
java
/** * Created by vallep on 22/06/2017. */ public abstract class CondimentDecorator extends Beverage { public abstract String getDescription(); }
[ "paul.valle@datadisk.co.uk" ]
paul.valle@datadisk.co.uk
3f0473e4b1e39b2ce28f66c3dac35f4ebacbc755
cb5a6c4df1d053d8249ccd43ec28ca09ab6ffbe6
/baselibrary/src/main/java/com/example/handsomelibrary/retrofit/RxHttpUtils.java
c812d2985fa0973f129b1f307ecbd1a4c079f154
[]
no_license
SetAdapter/KtPlayAndroid
03119c47f1692bb89e4915f6b81426408bbb879d
6b7c312f2380ebed85bea4b778d1ef3f15fe890c
refs/heads/master
2020-04-17T03:50:58.342390
2019-02-15T08:15:08
2019-02-15T08:15:08
166,202,908
0
0
null
null
null
null
UTF-8
Java
false
false
4,093
java
package com.example.handsomelibrary.retrofit; import android.app.Application; import android.content.Context; import com.example.handsomelibrary.constant.SPKeys; import com.example.handsomelibrary.utils.SPUtils; import io.reactivex.disposables.Disposable; import java.util.ArrayList; import java.util.HashSet; import java.util.List; /** * 网络请求 * Created by Stefan on 2018/4/23. */ public class RxHttpUtils { private volatile static RxHttpUtils instance; private static Application mContext; private static List<Disposable> disposables; //单例模式 双重锁 public static RxHttpUtils getInstance() { if (instance == null) { synchronized (RxHttpUtils.class) { if (instance == null) { instance = new RxHttpUtils(); disposables = new ArrayList<>(); } } } return instance; } /** * 必须在全局Application先调用,获取context上下文,否则缓存无法使用 * * @param app Application */ public static void init(Application app) { mContext = app; } /** * 获取全局上下文 */ public static Context getContext() { checkInitialize(); return mContext; } /** * 检测是否调用初始化方法 */ private static void checkInitialize() { if (mContext == null) { throw new ExceptionInInitializerError("请先在全局Application中调用 RxHttpUtils.init() 初始化!"); } } public GlobalRxHttp config() { return GlobalRxHttp.getInstance(); } /** * 使用全局参数创建请求 * * @param cls Class * @param <K> K * @return 返回 */ public static <K> K createApi(Class<K> cls) { return GlobalRxHttp.createGApi(cls); } /** * 获取单个请求配置实例 * * @return SingleRxHttp */ public static SingleRxHttp getSingleInstance() { return SingleRxHttp.getInstance(); } /** * 下载文件 * * @param fileUrl * @return */ //TODO 下载文件 待完成 /* public static Observable<ResponseBody> downloadFile(String fileUrl) { return DownloadRetrofit.downloadFile(fileUrl); }*/ /** * 上传单张图片 * * @param uploadUrl 地址 * @param filePath 文件路径 * @return ResponseBody */ //TODO 上传图片 待完成 /* public static Observable<ResponseBody> uploadImg(String uploadUrl, String filePath) { return UploadRetrofit.uploadImg(uploadUrl, filePath); }*/ /** * 上传多张图片 * * @param uploadUrl 地址 * @param filePaths 文件路径 * @return ResponseBody */ //TODO 上传多张图片 待完成 /* public static Observable<ResponseBody> uploadImgs(String uploadUrl, List<String> filePaths) { return UploadRetrofit.uploadImgs(uploadUrl, filePaths); }*/ /** * 获取Cookie * * @return HashSet */ public static HashSet<String> getCookie() { HashSet<String> preferences = (HashSet<String>) SPUtils.get(SPKeys.COOKIE, new HashSet<String>()); return preferences; } /** * 获取disposable 在onDestroy方法中取消订阅disposable.dispose() * * @param disposable disposable */ public static void addDisposable(Disposable disposable) { if (disposables != null) { disposables.add(disposable); } } /** * 取消所有请求 */ public static void cancelAllRequest() { if (disposables != null) { for (Disposable disposable : disposables) { disposable.dispose(); } disposables.clear(); } } /** * 取消单个请求 */ public static void cancelSingleRequest(Disposable disposable) { if (disposable != null && !disposable.isDisposed()) { disposable.dispose(); } } }
[ "383411934@qq.com" ]
383411934@qq.com
0b1e390d18281ff5c7df67a9c90f43b2748d7bde
61a10a03959a1d4f94b244373f8a37565c555a7d
/luajpp2-core/src/main/java/nl/weeaboo/lua2/stdlib/FileLib.java
aec78d6a073519ec90b526cf71041a419d3aa36b
[ "MIT" ]
permissive
anonl/luajpp2
beaf479b7494bcf876e83d7be12fd0ed65e3c707
5128c8143e80302d38f6245f72baa53110efdd54
refs/heads/master
2021-07-23T20:39:43.941457
2021-07-22T18:51:12
2021-07-22T18:51:12
53,208,592
7
3
NOASSERTION
2021-03-31T19:03:19
2016-03-05T15:38:33
Java
UTF-8
Java
false
false
5,118
java
package nl.weeaboo.lua2.stdlib; import static nl.weeaboo.lua2.stdlib.IoLib.checkfile; import static nl.weeaboo.lua2.stdlib.IoLib.optfile; import static nl.weeaboo.lua2.vm.LuaBoolean.TRUE; import static nl.weeaboo.lua2.vm.LuaConstants.NONE; import static nl.weeaboo.lua2.vm.LuaNil.NIL; import static nl.weeaboo.lua2.vm.LuaValue.valueOf; import static nl.weeaboo.lua2.vm.LuaValue.varargsOf; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import nl.weeaboo.lua2.LuaException; import nl.weeaboo.lua2.LuaRunState; import nl.weeaboo.lua2.io.LuaSerializable; import nl.weeaboo.lua2.lib.LuaBoundFunction; import nl.weeaboo.lua2.lib.LuaFileHandle; import nl.weeaboo.lua2.lib.LuaLib; import nl.weeaboo.lua2.lib.VarArgFunction; import nl.weeaboo.lua2.vm.LuaTable; import nl.weeaboo.lua2.vm.LuaValue; import nl.weeaboo.lua2.vm.Varargs; /** * File library */ @LuaSerializable public final class FileLib extends LuaLib { private static final long serialVersionUID = 1L; private static final Logger LOG = LoggerFactory.getLogger(FileLib.class); FileLib() { } @Override public void register() throws LuaException { LuaRunState lrs = LuaRunState.getCurrent(); LuaTable globals = lrs.getGlobalEnvironment(); LuaTable fileTable = new LuaTable(); registerFunctions(globals, fileTable); globals.rawset("file", fileTable); } /** * {@code file:close() -> void} * @throws IOException if this operation fails. */ @LuaBoundFunction public Varargs close(Varargs args) throws IOException { LuaFileHandle file = optfile(args.arg1()); if (file == null) { return NONE; } return IoLib.doClose(file); } /** * {@code file:flush() -> void} * @throws IOException if this operation fails. */ @LuaBoundFunction public Varargs flush(Varargs args) throws IOException { checkfile(args.arg1()).flush(); return TRUE; } /** * {@code file:setvbuf(mode,[size]) -> void} * @throws IOException if this operation fails. */ @LuaBoundFunction public Varargs setvbuf(Varargs args) throws IOException { LuaFileHandle file = checkfile(args.arg1()); String mode = args.checkjstring(2); int size = args.optint(3, 1024); file.setvbuf(mode, size); return TRUE; } /** * {@code file:lines() -> iterator} */ @LuaBoundFunction public Varargs lines(Varargs args) { LuaFileHandle file = checkfile(args.arg1()); return new LinesIterFunction(file, false); } /** * {@code file:seek([whence][,offset]) -> pos | nil,error} * @throws IOException if this operation fails. */ @LuaBoundFunction public Varargs seek(Varargs args) throws IOException { LuaFileHandle file = checkfile(args.arg1()); String whence = args.optjstring(2, "cur"); int offset = args.optint(3, 0); return valueOf(file.seek(whence, offset)); } /** * {@code file:read(...) -> (...)} */ @LuaBoundFunction public Varargs read(Varargs args) { LuaFileHandle file = checkfile(args.arg1()); Varargs subargs = args.subargs(2); try { return IoLib.doRead(file, subargs); } catch (IOException e) { return varargsOf(NIL, valueOf(e.toString()), valueOf(1)); } } /** * {@code file:write(...) -> void} */ @LuaBoundFunction public Varargs write(Varargs args) { LuaFileHandle file = checkfile(args.arg1()); Varargs subargs = args.subargs(2); try { return IoLib.doWrite(file, subargs); } catch (IOException e) { return varargsOf(NIL, valueOf(e.toString()), valueOf(1)); } } @LuaSerializable static class LinesIterFunction extends VarArgFunction { private static final long serialVersionUID = 1L; private final LuaFileHandle file; private final boolean shouldClose; public LinesIterFunction(LuaFileHandle file, boolean shouldClose) { this.file = file; this.shouldClose = shouldClose; } /** {@code lines iterator(s,var) -> var'} */ @Override public Varargs invoke(Varargs args) { try { LuaValue line = IoLib.freadline(file); if (line.isnil()) { closeFileIfNeeded(); } return line; } catch (IOException ioe) { closeFileIfNeeded(); throw LuaException.wrap("I/O error from lines iterator for: " + file, ioe); } } private void closeFileIfNeeded() { if (shouldClose && !file.isStdFile()) { LOG.debug("Closing file after lines() iterator finished: {}", file); try { file.close(); } catch (IOException e) { // Ignore } } } } }
[ "mail@weeaboo.nl" ]
mail@weeaboo.nl
eb4a563903b4253007d31a3f31801dff8358257c
21bcd1da03415fec0a4f3fa7287f250df1d14051
/sources/com/google/gson/p321x/p322m/C8882l.java
1436965b292b057614b38266c5e21e79c3dd1b71
[]
no_license
lestseeandtest/Delivery
9a5cc96bd6bd2316a535271ec9ca3865080c3ec8
bc3fae8f30804a2520e6699df92c2e6a4a0a7cfc
refs/heads/master
2022-04-24T12:14:22.396398
2020-04-25T21:50:29
2020-04-25T21:50:29
258,875,870
0
1
null
null
null
null
UTF-8
Java
false
false
5,079
java
package com.google.gson.p321x.p322m; import com.google.gson.C8775f; import com.google.gson.C8785j; import com.google.gson.C8786k; import com.google.gson.C8787l; import com.google.gson.C8792q; import com.google.gson.C8793r; import com.google.gson.C8803u; import com.google.gson.C8805v; import com.google.gson.JsonParseException; import com.google.gson.p321x.C8806a; import com.google.gson.p321x.C8850k; import com.google.gson.p324y.C8928a; import com.google.gson.stream.C8795a; import com.google.gson.stream.C8799d; import java.io.IOException; import java.lang.reflect.Type; /* renamed from: com.google.gson.x.m.l */ /* compiled from: TreeTypeAdapter */ public final class C8882l<T> extends C8803u<T> { /* renamed from: a */ private final C8793r<T> f23265a; /* renamed from: b */ private final C8786k<T> f23266b; /* renamed from: c */ final C8775f f23267c; /* renamed from: d */ private final C8928a<T> f23268d; /* renamed from: e */ private final C8805v f23269e; /* renamed from: f */ private final C8884b f23270f = new C8884b<>(); /* renamed from: g */ private C8803u<T> f23271g; /* renamed from: com.google.gson.x.m.l$b */ /* compiled from: TreeTypeAdapter */ private final class C8884b implements C8792q, C8785j { private C8884b() { } /* renamed from: a */ public C8787l mo32428a(Object obj) { return C8882l.this.f23267c.mo32325b(obj); } /* renamed from: a */ public C8787l mo32429a(Object obj, Type type) { return C8882l.this.f23267c.mo32326b(obj, type); } /* renamed from: a */ public <R> R mo32389a(C8787l lVar, Type type) throws JsonParseException { return C8882l.this.f23267c.mo32310a(lVar, type); } } /* renamed from: com.google.gson.x.m.l$c */ /* compiled from: TreeTypeAdapter */ private static final class C8885c implements C8805v { /* renamed from: N */ private final Class<?> f23273N; /* renamed from: O */ private final C8793r<?> f23274O; /* renamed from: P */ private final C8786k<?> f23275P; /* renamed from: a */ private final C8928a<?> f23276a; /* renamed from: b */ private final boolean f23277b; C8885c(Object obj, C8928a<?> aVar, boolean z, Class<?> cls) { C8786k<?> kVar = null; this.f23274O = obj instanceof C8793r ? (C8793r) obj : null; if (obj instanceof C8786k) { kVar = (C8786k) obj; } this.f23275P = kVar; C8806a.m41345a((this.f23274O == null && this.f23275P == null) ? false : true); this.f23276a = aVar; this.f23277b = z; this.f23273N = cls; } /* renamed from: a */ public <T> C8803u<T> mo32486a(C8775f fVar, C8928a<T> aVar) { C8928a<?> aVar2 = this.f23276a; boolean z = aVar2 != null ? aVar2.equals(aVar) || (this.f23277b && this.f23276a.mo32664b() == aVar.mo32660a()) : this.f23273N.isAssignableFrom(aVar.mo32660a()); if (!z) { return null; } C8882l lVar = new C8882l(this.f23274O, this.f23275P, fVar, aVar, this); return lVar; } } public C8882l(C8793r<T> rVar, C8786k<T> kVar, C8775f fVar, C8928a<T> aVar, C8805v vVar) { this.f23265a = rVar; this.f23266b = kVar; this.f23267c = fVar; this.f23268d = aVar; this.f23269e = vVar; } /* renamed from: b */ private C8803u<T> m41540b() { C8803u<T> uVar = this.f23271g; if (uVar != null) { return uVar; } C8803u<T> a = this.f23267c.mo32305a(this.f23269e, this.f23268d); this.f23271g = a; return a; } /* renamed from: a */ public T mo32287a(C8795a aVar) throws IOException { if (this.f23266b == null) { return m41540b().mo32287a(aVar); } C8787l a = C8850k.m41444a(aVar); if (a.mo32391A()) { return null; } return this.f23266b.mo32390a(a, this.f23268d.mo32664b(), this.f23270f); } /* renamed from: b */ public static C8805v m41541b(C8928a<?> aVar, Object obj) { return new C8885c(obj, aVar, aVar.mo32664b() == aVar.mo32660a(), null); } /* renamed from: a */ public void mo32288a(C8799d dVar, T t) throws IOException { C8793r<T> rVar = this.f23265a; if (rVar == null) { m41540b().mo32288a(dVar, t); } else if (t == null) { dVar.mo32456B(); } else { C8850k.m41446a(rVar.mo32430a(t, this.f23268d.mo32664b(), this.f23270f), dVar); } } /* renamed from: a */ public static C8805v m41538a(C8928a<?> aVar, Object obj) { return new C8885c(obj, aVar, false, null); } /* renamed from: a */ public static C8805v m41539a(Class<?> cls, Object obj) { return new C8885c(obj, null, false, cls); } }
[ "zsolimana@uaedomain.local" ]
zsolimana@uaedomain.local
3b110c421178bcdb3d6b4347503e050e3c8a002b
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-appengine/v1/1.30.1/com/google/api/services/appengine/v1/model/CreateVersionMetadataV1.java
41fcba4fb7cd3b511a083965f8dfd65315f0de9a
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
2,395
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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.appengine.v1.model; /** * Metadata for the given google.longrunning.Operation during a * google.appengine.v1.CreateVersionRequest. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the App Engine Admin API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class CreateVersionMetadataV1 extends com.google.api.client.json.GenericJson { /** * The Cloud Build ID if one was created as part of the version create. @OutputOnly * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String cloudBuildId; /** * The Cloud Build ID if one was created as part of the version create. @OutputOnly * @return value or {@code null} for none */ public java.lang.String getCloudBuildId() { return cloudBuildId; } /** * The Cloud Build ID if one was created as part of the version create. @OutputOnly * @param cloudBuildId cloudBuildId or {@code null} for none */ public CreateVersionMetadataV1 setCloudBuildId(java.lang.String cloudBuildId) { this.cloudBuildId = cloudBuildId; return this; } @Override public CreateVersionMetadataV1 set(String fieldName, Object value) { return (CreateVersionMetadataV1) super.set(fieldName, value); } @Override public CreateVersionMetadataV1 clone() { return (CreateVersionMetadataV1) super.clone(); } }
[ "chingor@google.com" ]
chingor@google.com
6a125971f5735f27f484b9fc45d4a5a47111e68b
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new2466.java
ba718131335149599c148f0096a4e9d02a6925a5
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
// clone pairs:3046:70% // 3424:beam/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/PTransformMatchers.java public class Nicad_t1_beam_new2466 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } EqualUrnPTransformMatcher that = (EqualUrnPTransformMatcher) o; return urn.equals(that.urn); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
ae83c919630971259bf3a060f388683a0c3f242a
e1da7ab2eb478ec6e323b62dcb2932d2e17fba00
/ahome-ext/src/main/java/com/ait/toolkit/sencha/ext/client/laf/Alignment.java
525a177e54ec04d89e65d4625da620132ba1d9d4
[ "Apache-2.0" ]
permissive
dikalo/ahome-ext
bf4bd834ba64ff9af3c07ef214f7307c4cfd86c7
c1c9a9255ebb0bcc0ad3ced7384511e634b98d75
refs/heads/master
2021-06-01T03:30:52.796454
2016-07-19T12:10:31
2016-07-19T12:10:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
/* Copyright (c) 2014 Ahomé Innovation Technologies. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.ait.toolkit.sencha.ext.client.laf; /** * Enum for alignment * * @author alainekambi * */ public enum Alignment { BOTTOM("bottom"), RIGHT("right"), LEFT("left"), TOP("top"), CENTER("center"); private String align; private Alignment(String value) { align = value; } public String getValue() { return align; } }
[ "jazzmatadazz@gmail.com" ]
jazzmatadazz@gmail.com
f1ca1d2c8ef37cc024327fc14af56e4026bfeb58
2a19b2f3eb1ed8a5393676724c77b4f03206dad8
/src/main/java/org/acord/standards/life/_2/OLILUDRUGTYPE.java
533133261c58446546bfdf8ef083c96de5f52bb5
[]
no_license
SamratChatterjee/xsdTowsdl
489777c2d7d66e8e5379fec49dffe15a19cb5650
807f1c948490f2c021dd401ff9dd5937688a24b2
refs/heads/master
2021-05-15T03:45:56.250598
2017-11-15T10:55:24
2017-11-15T10:55:24
110,820,957
0
0
null
null
null
null
UTF-8
Java
false
false
2,289
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.11.13 at 07:49:02 PM IST // package org.acord.standards.life._2; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * <p>Java class for OLI_LU_DRUGTYPE complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="OLI_LU_DRUGTYPE"> * &lt;simpleContent> * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string"> * &lt;attribute name="tc" use="required" type="{http://ACORD.org/Standards/Life/2}OLI_LU_DRUGTYPE_TC" /> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "OLI_LU_DRUGTYPE", propOrder = { "value" }) public class OLILUDRUGTYPE { @XmlValue protected String value; @XmlAttribute(name = "tc", required = true) protected BigInteger tc; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the tc property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getTc() { return tc; } /** * Sets the value of the tc property. * * @param value * allowed object is * {@link BigInteger } * */ public void setTc(BigInteger value) { this.tc = value; } }
[ "33487722+SamratChatterjee@users.noreply.github.com" ]
33487722+SamratChatterjee@users.noreply.github.com
0c95a1bbf9785cd7916dbebc7e3520b18a45d450
029010881febc6c5b7e2f0dee144f20559e6bd38
/Notes/Java SE/Net/src/IPDemo.java
4a2a0a61f1de4516d6271ca8f761b931fa559b4f
[]
no_license
chuishengzhang/zcs
127d48751447d31f7e2602c0e7eeb3d84f6f459d
332d724c9c3e7c2518b169e1e7ed64419e542d61
refs/heads/master
2020-03-08T15:05:03.088784
2018-05-04T10:45:58
2018-05-04T10:45:58
null
0
0
null
null
null
null
GB18030
Java
false
false
579
java
import java.net.InetAddress; import java.net.UnknownHostException; public class IPDemo { public static void main(String[] args) throws UnknownHostException { InetAddress ip = InetAddress.getLocalHost(); System.out.println(ip.toString()); //单独获取主机名和IP地址 InetAddress ia = InetAddress.getByName("ykhwsz.cn"); System.out.println(ia.getHostName()+" "+ia.getHostAddress()); InetAddress ia2[] = InetAddress.getAllByName("ykhwsz.cn"); for(InetAddress i : ia2){ System.out.println(i.getHostAddress()+"\\"+i.getHostName()); } } }
[ "you@example.com" ]
you@example.com
65252295ebaa5961228047513f07a38af041c4e3
d95838dccad21111f7aa342e2de791754ecd6fa2
/src/main/java/com/hendisantika/springbootadminlte3/config/WebSecurityConfig.java
1c7fdc78aa23b725aeae71bc7eac3267fb0b3b36
[]
no_license
qlwy321/springboot-adminlte3-test
b9d9308d64131fba4249099b4f5c150f464acc45
a68282894468826429adc0c53b3de85577e2d323
refs/heads/main
2023-01-15T03:36:40.086834
2020-11-25T01:05:37
2020-11-25T01:05:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,238
java
package com.hendisantika.springbootadminlte3.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; /** * Created by IntelliJ IDEA. * Project : springboot-adminlte3 * User: hendisantika * Email: hendisantika@gmail.com * Telegram : @hendisantika34 * Date: 25/11/20 * Time: 08.01 */ @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/adminlte/**", "/dist/**", "/plugins/**").permitAll() .anyRequest().authenticated() .and() .formLogin() .loginPage("/login") .failureUrl("/login?error=true") .permitAll() .and() .logout() .permitAll() .and().csrf().disable(); } }
[ "hendisantika@yahoo.co.id" ]
hendisantika@yahoo.co.id
b90b2e598dcd6825e2473c7546d58e4ec31af6ff
9db6efa2f14baa0f4172272e361e1ed0c9940065
/aliyun-java-sdk-vpc/src/main/java/com/aliyuncs/vpc/model/v20160428/TerminatePhysicalConnectionRequest.java
04b02762b04a4485cd61f9c6280575c3f27eff4e
[ "Apache-2.0" ]
permissive
ResetFull/aliyun-openapi-java-sdk
31fb2c2f7c2b939df4c9067f7a221c3f2c7cef2e
e299d1778d514cd555c870a3b1de117ae3b34474
refs/heads/master
2021-08-31T04:50:07.771585
2017-12-20T12:28:50
2017-12-20T12:28:50
114,978,860
1
0
null
2017-12-21T07:57:54
2017-12-21T07:57:54
null
UTF-8
Java
false
false
3,399
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.aliyuncs.vpc.model.v20160428; import com.aliyuncs.RpcAcsRequest; /** * @author auto create * @version */ public class TerminatePhysicalConnectionRequest extends RpcAcsRequest<TerminatePhysicalConnectionResponse> { public TerminatePhysicalConnectionRequest() { super("Vpc", "2016-04-28", "TerminatePhysicalConnection", "vpc"); } private Long resourceOwnerId; private String resourceOwnerAccount; private String clientToken; private String physicalConnectionId; private String ownerAccount; private String userCidr; private Long ownerId; public Long getResourceOwnerId() { return this.resourceOwnerId; } public void setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; if(resourceOwnerId != null){ putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); } } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public void setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; if(resourceOwnerAccount != null){ putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); } } public String getClientToken() { return this.clientToken; } public void setClientToken(String clientToken) { this.clientToken = clientToken; if(clientToken != null){ putQueryParameter("ClientToken", clientToken); } } public String getPhysicalConnectionId() { return this.physicalConnectionId; } public void setPhysicalConnectionId(String physicalConnectionId) { this.physicalConnectionId = physicalConnectionId; if(physicalConnectionId != null){ putQueryParameter("PhysicalConnectionId", physicalConnectionId); } } public String getOwnerAccount() { return this.ownerAccount; } public void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; if(ownerAccount != null){ putQueryParameter("OwnerAccount", ownerAccount); } } public String getUserCidr() { return this.userCidr; } public void setUserCidr(String userCidr) { this.userCidr = userCidr; if(userCidr != null){ putQueryParameter("UserCidr", userCidr); } } public Long getOwnerId() { return this.ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; if(ownerId != null){ putQueryParameter("OwnerId", ownerId.toString()); } } @Override public Class<TerminatePhysicalConnectionResponse> getResponseClass() { return TerminatePhysicalConnectionResponse.class; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
bacb43d51fe7f5e82742eee00ed5f19ed90ce905
a4cb372ced240bf1cf0a9d123bdd4a805ff05df6
/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/restdocs/AutoConfigureRestDocs.java
855d616a07123fff1110e0e99baf39e34bc5eba8
[]
no_license
ZhaoBinxian/spring-boot-maven-ben
c7ea6a431c3206959009ff5344547436e98d75ca
ebd43548bae1e35fff174c316ad154cd0e5defb3
refs/heads/master
2023-07-18T12:53:49.028864
2021-09-07T04:55:54
2021-09-07T04:55:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,511
java
/* * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.boot.test.autoconfigure.restdocs; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import io.restassured.RestAssured; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.test.autoconfigure.properties.PropertyMapping; import org.springframework.context.annotation.Import; import org.springframework.core.annotation.AliasFor; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.servlet.MockMvc; /** * Annotation that can be applied to a test class to enable and configure * auto-configuration of Spring REST Docs. The auto-configuration sets up * {@link MockMvc}-based testing of a servlet web application, {@link WebTestClient}-based * testing of a reactive web application, or {@link RestAssured}-based testing of any web * application over HTTP. * <p> * Allows configuration of the output directory and the host, scheme, and port of * generated URIs. When further configuration is required a * {@link RestDocsMockMvcConfigurationCustomizer}, * {@link RestDocsWebTestClientConfigurationCustomizer}, or * {@link RestDocsRestAssuredConfigurationCustomizer} bean can be used. * * @author Andy Wilkinson * @see RestDocsAutoConfiguration * @see RestDocsMockMvcConfigurationCustomizer * @see RestDocsWebTestClientConfigurationCustomizer * @see RestDocsRestAssuredConfigurationCustomizer * @since 1.4.0 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Inherited @ImportAutoConfiguration @Import(RestDocumentationContextProviderRegistrar.class) @PropertyMapping("spring.test.restdocs") public @interface AutoConfigureRestDocs { /** * The output directory to which generated snippets will be written. An alias for * {@link #outputDir}. * * @return the output directory */ @AliasFor("outputDir") String value() default ""; /** * The output directory to which generated snippets will be written. An alias for * {@link #value}. * * @return the output directory */ @AliasFor("value") String outputDir() default ""; /** * The scheme (typically {@code http} or {@code https}) to be used in documented URIs. * Defaults to {@code http}. * * @return the scheme */ String uriScheme() default "http"; /** * The host to be used in documented URIs. Defaults to {@code localhost}. * * @return the host */ String uriHost() default "localhost"; /** * The port to be used in documented URIs. Defaults to {@code 8080}. * * @return the port */ int uriPort() default 8080; }
[ "zhaobinxian@greatyun.com" ]
zhaobinxian@greatyun.com
646fdcb17b4ee876603a72a00ab3f24ae78bd0a9
0d71d1491728d99cfa90cc968b35ee73055351a7
/algotrader-provider/algotrader-provider-csv/src/test/java/com/unisoft/algotrader/provider/csv/CSVHistoricalDataStoreTest.java
48ad832ffdecaf29a224264bb8d263c85c4ae8bd
[]
no_license
alexcwyu/algotrader
8b2f625d1ca4d95dcb68dde13c0ad0a6c0e96df9
74567b310cb080618e92ba88c84ddb3ae7022039
refs/heads/master
2021-01-20T11:47:44.929000
2015-09-22T15:49:41
2015-09-22T15:49:41
37,007,492
24
16
null
null
null
null
UTF-8
Java
false
false
1,246
java
package com.unisoft.algotrader.provider.csv; import com.unisoft.algotrader.model.event.bus.MarketDataEventBus; import com.unisoft.algotrader.model.event.data.Bar; import com.unisoft.algotrader.persistence.InMemoryRefDataStore; import com.unisoft.algotrader.provider.ProviderManager; import org.junit.Test; import java.io.StringWriter; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; /** * Created by alex on 6/16/15. */ public class CSVHistoricalDataStoreTest { String EXPECTED = "Date,Open,High,Low,Close,Volume,OpenInt\n"+ "19999,500.0,9999.0,100.0,600.0,0,0\n"+ "20000,600.0,20000.0,120.0,700.0,0,0\n"; @Test public void testCsvImport(){ StringWriter sw = new StringWriter(); CSVHistoricalDataStore csvImport = new CSVHistoricalDataStore(mock(ProviderManager.class), sw, new InMemoryRefDataStore(), mock(MarketDataEventBus.class)); Bar bar1 = new Bar(1, 60, 19999, 500, 9999, 100, 600); Bar bar2 = new Bar(1, 60, 20000, 600, 20000, 120, 700); csvImport.onBar(bar1); csvImport.onBar(bar2); csvImport.disconnect(); assertEquals(EXPECTED, sw.toString()); } }
[ "alexcwyu@gmail.com" ]
alexcwyu@gmail.com
6608b5e4cf57d7c0e250d888c3509317f0b965ab
db2c49a189e13554e73713ed2a69ca887a2ad9f0
/org.orbit.component.model/src/org/orbit/component/model/tier3/nodecontrol/CreateNodeRequest.java
8056a85b3a8fe248c35f0696140ded73af7f9e89
[]
no_license
EngineerBarsik/dev
fa501b6ff58e0b6b263d54d6e85c6d69a323f612
81715414de121e1d7cead7d4066d626b095816d6
refs/heads/master
2023-02-11T01:20:29.217287
2021-01-08T01:14:21
2021-01-08T01:14:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
package org.orbit.component.model.tier3.nodecontrol; import org.origin.common.rest.model.Request; public class CreateNodeRequest extends Request { public static final String REQUEST_NAME = "create_node"; protected String nodeName; public CreateNodeRequest() { super(REQUEST_NAME); } public String getNodeName() { return this.nodeName; } public void setNodeName(String nodeName) { this.nodeName = nodeName; } }
[ "yangyang4cs@gmail.com" ]
yangyang4cs@gmail.com
63e5adc1a86507fe643ab5d2d4c8a79469ed31f0
2727b1521ffc6a0b158b9b84b2ae3990d5bfc59d
/secure-login-demo/secure-login-domain/src/main/java/org/terasoluna/securelogin/domain/repository/authenticationevent/FailedAuthenticationRepository.java
dfd75ffb09c3e98c323e1cadff730728635047e8
[]
no_license
btnoguchimnm/tutorial-apps
116f1449b0c77cdac0ca486402171a34393c7dfb
3ae4ea2ca0f9963483e646be226666e671812147
refs/heads/master
2020-06-11T10:26:09.138022
2016-12-13T05:51:27
2016-12-13T05:51:27
75,694,408
0
0
null
2016-12-06T04:27:23
2016-12-06T04:27:23
null
UTF-8
Java
false
false
476
java
package org.terasoluna.securelogin.domain.repository.authenticationevent; import java.util.List; import org.apache.ibatis.annotations.Param; import org.terasoluna.securelogin.domain.model.FailedAuthentication; public interface FailedAuthenticationRepository { int create(FailedAuthentication event); List<FailedAuthentication> findLatest(@Param("username") String username, @Param("count") long count); int deleteByUsername(@Param("username") String username); }
[ "takuya.iwatsuka@gmail.com" ]
takuya.iwatsuka@gmail.com
825195ed64c0c8124cd97773a737d7f8368798bf
7df62a93d307a01b1a42bb858d6b06d65b92b33b
/src/com/afunms/application/dao/DnsConfigDao.java
cc42919538311062ccb2ce4058d1762fad7eac06
[]
no_license
wu6660563/afunms_fd
79ebef9e8bca4399be338d1504faf9630c42a6e1
3fae79abad4f3eb107f1558199eab04e5e38569a
refs/heads/master
2021-01-10T01:54:38.934469
2016-01-05T09:16:38
2016-01-05T09:16:38
48,276,889
0
1
null
null
null
null
GB18030
Java
false
false
6,461
java
package com.afunms.application.dao; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; import java.util.Vector; import com.afunms.application.model.DnsConfig; import com.afunms.application.model.FTPConfig; import com.afunms.application.model.WebConfig; import com.afunms.common.base.BaseDao; import com.afunms.common.base.BaseVo; import com.afunms.common.base.DaoInterface; import com.afunms.common.util.SysLogger; import com.sun.org.apache.xml.internal.utils.NSInfo; public class DnsConfigDao extends BaseDao implements DaoInterface { public DnsConfigDao() { super("nms_dnsconfig"); } public boolean delete(String []ids){ return super.delete(ids); } /** * * 取出的数值放到vo里 */ public BaseVo loadFromRS(ResultSet rs) { DnsConfig vo=new DnsConfig(); try { vo.setId(rs.getInt("id")); vo.setUsername(rs.getString("username")); vo.setPassword(rs.getString("password")); vo.setHostip(rs.getString("hostip")); vo.setHostinter(rs.getInt("hostinter")); vo.setDns(rs.getString("dns")); vo.setDnsip(rs.getString("dnsip")); vo.setFlag(rs.getInt("flag")); vo.setSendmobiles(rs.getString("sendmobiles")); vo.setSendemail(rs.getString("sendemail")); vo.setNetid(rs.getString("netid")); vo.setSendphone(rs.getString("sendphone")); vo.setSupperid(rs.getInt("supperid"));// snow add supperid at 2010-5-20 } catch (SQLException e) { SysLogger.error("DnsConfigDao.loadFromRS()",e); } return vo; } /** * DNS * 添加一条记录 */ public boolean save(BaseVo vo) { DnsConfig vo1=(DnsConfig)vo; StringBuffer sql=new StringBuffer(); // snow add id at 2010-5-20 sql.append("insert into nms_dnsconfig(id,username,password,hostip,hostinter,dns,dnsip,flag,sendmobiles,sendemail,sendphone,netid,supperid) values('"); sql.append(vo1.getId()); sql.append("','"); sql.append(vo1.getUsername()); sql.append("','"); sql.append(vo1.getPassword()); sql.append("','"); sql.append(vo1.getHostip()); sql.append("','"); sql.append(vo1.getHostinter()); sql.append("','"); sql.append(vo1. getDns()); sql.append("','"); sql.append(vo1.getDnsip()); sql.append("','"); sql.append(vo1.getFlag()); sql.append("','"); sql.append(vo1.getSendmobiles()); sql.append("','"); sql.append(vo1.getSendemail()); sql.append("','"); sql.append(vo1.getSendphone()); sql.append("','"); sql.append(vo1.getNetid()); sql.append("','"); sql.append(vo1.getSupperid()); sql.append("')"); return saveOrUpdate(sql.toString()); } /** * DNS * 根据id 查处所有 * @param bids * @return */ public List getDnsByBID(Vector bids){ List rlist = new ArrayList(); StringBuffer sql = new StringBuffer(); String wstr = ""; if(bids != null && bids.size()>0){ for(int i=0;i<bids.size();i++){ if(wstr.trim().length()==0){ wstr = wstr+" where ( netid like '%,"+bids.get(i)+",%' "; }else{ wstr = wstr+" or netid like '%,"+bids.get(i)+",%' "; } } wstr=wstr+")"; } sql.append("select * from nms_dnsconfig "+wstr); return findByCriteria(sql.toString()); } /** * DNS * 根据flag查询一条记录 * @param flag * @return */ public List getDnsByFlag(int flag){ List rlist = new ArrayList(); StringBuffer sql = new StringBuffer(); sql.append("select * from nms_dnsconfig where flag = "+flag); return findByCriteria(sql.toString()); } /** * DNS * 根据id 查询某条记录 * @param id * @return */ public List getDnsById(int id){ List rlist = new ArrayList(); StringBuffer sql = new StringBuffer(); sql.append("select * from nms_dnsconfig where id = "+id); return findByCriteria(sql.toString()); } /** * DNS * 修改一条记录 */ public boolean update(BaseVo vo) { DnsConfig vo1=(DnsConfig)vo; StringBuffer sql=new StringBuffer(); sql.append("update nms_dnsconfig set username ='"); sql.append(vo1.getUsername()); sql.append("',password='"); sql.append(vo1.getPassword()); sql.append("',hostip='"); sql.append(vo1.getHostip()); sql.append("',hostinter='"); sql.append(vo1.getHostinter()); sql.append("',dns='"); sql.append(vo1.getDns()); sql.append("',dnsip='"); sql.append(vo1.getDnsip()); sql.append("',flag='"); sql.append(vo1.getFlag()); sql.append("',sendmobiles='"); sql.append(vo1.getSendmobiles()); sql.append("',sendemail='"); sql.append(vo1.getSendemail()); sql.append("',sendphone='"); sql.append(vo1.getSendphone()); sql.append("',netid='"); sql.append(vo1.getNetid()); sql.append("',supperid='"); sql.append(vo1.getSupperid()); sql.append("' where id="+vo1.getId()); return saveOrUpdate(sql.toString()); } public List<DnsConfig> getDNSConfigListByMonFlag(Integer flag){ StringBuffer sql = new StringBuffer(); sql.append("select * from nms_dnsconfig where flag= "); sql.append(flag); return findByCriteria(sql.toString()); } /** * 从数据库获取采集的dns的数据信息 * @param nodeid * @return * @throws Exception */ public Hashtable getDnsDataHashtable(String nodeid) throws Exception{ Hashtable retHash = new Hashtable(); try { //SysLogger.info(); StringBuffer sqlBuffer = new StringBuffer(); sqlBuffer.append("select * from nms_dns_temp where nodeid = '"); sqlBuffer.append(nodeid); sqlBuffer.append("'"); rs = conn.executeQuery(sqlBuffer.toString()); List mx = new ArrayList(); List ns = new ArrayList(); List cache = new ArrayList(); while (rs.next()) { String entity = rs.getString("entity"); String value = rs.getString("value"); if("mx".equalsIgnoreCase(entity)){//key为mx的情况 mx.add(value); }else if("ns".equalsIgnoreCase(entity)){//key为ns的情况 ns.add(value); }else if ("cache".equalsIgnoreCase(entity)) {//key为cache的情况 cache.add(value); }else{//普通键值对的情形 retHash.put(entity, value); } } retHash.put("mx", mx); retHash.put("ns", ns); retHash.put("cache", cache); } catch (SQLException e) { e.printStackTrace(); } finally{ if(rs != null){ rs.close(); } } return retHash; } }
[ "nick@comprame.com" ]
nick@comprame.com
fdc125a9952239a3d05d4f0a52262ae53cd77121
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/34/1578.java
3bbb710655d5ddd9123cf564863a0a26cf13b00c
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
784
java
package <missing>; public class GlobalMembers { public static int Main() { int n; n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); int a; while (n > 1) { if (n % 2 == 1) { a = n * 3 + 1; System.out.print(n); System.out.print("*"); System.out.print(3); System.out.print("+"); System.out.print(1); System.out.print("="); System.out.print(a); System.out.print("\n"); n = a; } else { a = n / 2; System.out.print(n); System.out.print("/"); System.out.print(2); System.out.print("="); System.out.print(a); System.out.print("\n"); n = a; } } System.out.print("End"); System.out.print("\n"); System.in.read(); System.in.read(); System.in.read(); return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
875193b38d9a78731aacf08ec61ebaf871f92e99
e1d87c5ae5e3b625c2155a4b43f9243edfabfa36
/Android-PullToRefresh/src/main/java/com/handmark/pulltorefresh/library/internal/CustomAnimLoadingLayout.java
51ef2d61b03d2052df0dd603e7b8e9c11367aa61
[]
no_license
MrZJ/bangelvyou
22a2ba37903b18efb1efb921a39f3153d39f3b3c
d5f9e9e3bd819009be88d6c18c3309b4577bcf21
refs/heads/main
2023-01-10T03:46:21.469892
2020-11-17T07:24:56
2020-11-17T07:24:56
307,940,686
0
0
null
null
null
null
UTF-8
Java
false
false
2,812
java
package com.handmark.pulltorefresh.library.internal; import android.annotation.SuppressLint; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Matrix; import android.graphics.drawable.Drawable; import android.view.View; import android.widget.ImageView.ScaleType; import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode; import com.handmark.pulltorefresh.library.PullToRefreshBase.Orientation; import com.handmark.pulltorefresh.library.R; /** * 自定义下拉刷新动画 * @author KevinLi * */ @SuppressLint("ViewConstructor") public class CustomAnimLoadingLayout extends LoadingLayout { //private AnimationDrawable animationDrawable; private final Matrix mHeaderImageMatrix; private float mPivotX, mPivotY; public CustomAnimLoadingLayout(Context context, Mode mode, Orientation scrollDirection, TypedArray attrs) { super(context, mode, scrollDirection, attrs); // 初始化 //mHeaderImage.setImageResource(R.anim.custom_anim); //animationDrawable = (AnimationDrawable) mHeaderImage.getDrawable(); mHeaderImage.setScaleType(ScaleType.MATRIX); mHeaderImageMatrix = new Matrix(); mHeaderImage.setImageMatrix(mHeaderImageMatrix); } // 默认图片 @Override protected int getDefaultDrawableResId() { return R.drawable.app_loading0; } @Override protected void onLoadingDrawableSet(Drawable imageDrawable) { // NO-OP if (null != imageDrawable) { mPivotX = Math.round(imageDrawable.getIntrinsicWidth() / 2); mPivotY = Math.round(imageDrawable.getIntrinsicHeight() / 2); } } @Override protected void onPullImpl(float scaleOfLayout) { // NO-OP if(scaleOfLayout > 1){ scaleOfLayout = 1; } mHeaderImageMatrix.setScale(scaleOfLayout, scaleOfLayout, mPivotX, mPivotY); mHeaderImage.setImageMatrix(mHeaderImageMatrix); } // 下拉以刷新 @Override protected void pullToRefreshImpl() { // NO-OP } // 正在刷新时回调 @Override protected void refreshingImpl() { // 播放帧动画 //animationDrawable.start(); // mHeaderImage.setImageResource(R.anim.custom_anim); } // 释放以刷新 @Override protected void releaseToRefreshImpl() { // NO-OP } // 重新设置 @Override protected void resetImpl() { mHeaderImage.setImageResource(R.drawable.app_loading0); mHeaderImage.setVisibility(View.VISIBLE); if (null != mHeaderImageMatrix) { mHeaderImageMatrix.reset(); mHeaderImage.setImageMatrix(mHeaderImageMatrix); } } }
[ "1176851478@qq.com" ]
1176851478@qq.com
4840a4cc151de71d813127333091d7ff8b943be1
d15803d5b16adab18b0aa43d7dca0531703bac4a
/com/whatsapp/protocol/ax.java
2289af5f654b981257a9e71fdfc3a5b476098f76
[]
no_license
kenuosec/Decompiled-Whatsapp
375c249abdf90241be3352aea38eb32a9ca513ba
652bec1376e6cd201d54262cc1d4e7637c6334ed
refs/heads/master
2021-12-08T15:09:13.929944
2016-03-23T06:04:08
2016-03-23T06:04:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
548
java
package com.whatsapp.protocol; import java.util.Vector; class ax extends a { final Runnable a; final b5 b; final by c; public void a(int i) { if (this.b != null) { this.b.a(i); } } public void a(cw cwVar, String str) { by.a(this.c, cwVar, new Vector()); by.b(this.c).a(); if (this.a != null) { this.a.run(); } } ax(by byVar, Runnable runnable, b5 b5Var) { this.c = byVar; this.a = runnable; this.b = b5Var; } }
[ "gigalitelk@gmail.com" ]
gigalitelk@gmail.com
b799379066b0ba60b85287627acadb2699dcfa02
cb1b1f451e9c155116a8ba6e56acbbe582c07caa
/src/com/mb/sociality/aspact/LogAspact.java
28f31e4995116aca9dcf9a9acda3aaab3343fef2
[]
no_license
rockrock0850/MB_SOCIALITY_SYSTEM
2a2fdf5ea153b067dd3343d6bb9f4dcda492a5f6
68a21a8d4886826982f325defb0ff6d1b6ac2f9e
refs/heads/master
2021-01-17T11:23:22.965897
2017-03-06T05:25:10
2017-03-06T05:25:10
84,033,054
0
0
null
null
null
null
UTF-8
Java
false
false
2,220
java
package com.mb.sociality.aspact; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.servlet.ModelAndView; import com.mb.sociality.service.ExceptionRecordService; import com.mb.sociality.utils.ShareTool; @Controller @Aspect public class LogAspact { private Logger log = Logger.getLogger(this.getClass()); @Autowired private ExceptionRecordService service; @Around("execution(* com.mb.sociality..*.*(..))") public Object around(ProceedingJoinPoint joinPoint) throws Throwable{ String className = joinPoint.getTarget().getClass().getSimpleName(); String methodName = joinPoint.getSignature().getName(); Object[] argList = joinPoint.getArgs(); for(Object arg : argList){ /* *過濾掉不想Log出來的條件 */ if(arg == null || arg instanceof BindingResult || arg instanceof HttpServletRequest || arg.getClass().getName().endsWith("Example")){ continue; } log.info(className + "." + methodName + "() argument: " + ShareTool.toStringBuilder(arg)); } Object proceed = joinPoint.proceed(); if(proceed != null){ Object data = null; if(proceed instanceof ModelAndView){ ModelAndView mv = (ModelAndView) proceed; Map<String, Object> map = mv.getModel(); for(String key : map.keySet()){ data = map.get(key); break; } }else{ data = proceed; } log.info(className + "." + methodName + "() return: " + ShareTool.toStringBuilder(data)); } return proceed; } @AfterThrowing( pointcut = "execution(* com.mb.sociality..*.*(..))", throwing = "error") public void afterThrow(JoinPoint joinPoint, Throwable error){ try { log.info("Throwable: " + error.getMessage()); } catch (Throwable t) { log.error(t, t); } } }
[ "b9670094@gmail.com" ]
b9670094@gmail.com
81ee79f9334017e26fba80413cd903b272b5c9e3
6ef1a4f65da5cea03af3f1b7d541e35db88b0ead
/task2/smvcdemo/src/main/java/pers/hdh/model/Course.java
3225f814cede40d92bc02b0aa0902535e7a69715
[]
no_license
hdonghong/codetask
57b3581993cbee843b6a7e783650360382364db6
18bc123854dc9bec069f6fc34660c7caa83a0fe7
refs/heads/master
2021-12-30T03:37:25.862629
2018-01-22T15:42:32
2018-01-22T15:42:32
104,606,284
0
1
null
null
null
null
UTF-8
Java
false
false
1,637
java
package pers.hdh.model; import java.util.List; public class Course { // 课程Id private Integer courseId; // 课程名称 private String title; // 图片路径 private String imgPath; // 学习人数 private Integer learningNum; // 课程时长 private Long duration; // 课程难度 private Integer level; // 课程难度描述 private String levelDesc; // 课程介绍 private String descr; // 课程提纲 private List<Chapter> chapterList; public Integer getCourseId() { return courseId; } public void setCourseId(Integer courseId) { this.courseId = courseId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Integer getLearningNum() { return learningNum; } public void setLearningNum(Integer learningNum) { this.learningNum = learningNum; } public Integer getLevel() { return level; } public void setLevel(Integer level) { this.level = level; } public String getImgPath() { return imgPath; } public void setImgPath(String imgPath) { this.imgPath = imgPath; } public List<Chapter> getChapterList() { return chapterList; } public void setChapterList(List<Chapter> chapterList) { this.chapterList = chapterList; } public Long getDuration() { return duration; } public void setDuration(Long duration) { this.duration = duration; } public String getDescr() { return descr; } public void setDescr(String descr) { this.descr = descr; } public String getLevelDesc() { return levelDesc; } public void setLevelDesc(String levelDesc) { this.levelDesc = levelDesc; } }
[ "799108252@qq.com" ]
799108252@qq.com
41180e318074c2cdc4480cebcd4c1659a33cfa9d
407beebf6e6432d2abdfb47f17ddb2be58badfa8
/src/main/java/com/dhrov/msitm/service/impl/JobHistoryServiceImpl.java
cfd6e325cd0aa1d6ed9d564776306f220bfbd214
[]
no_license
madhavs/msitm-application
59a89b13f8eed9734f36522ec36bc1c1995217b5
7f6a161d14e80efae61fb2a1db891896cc7d92c8
refs/heads/master
2022-05-02T11:46:22.157371
2020-04-05T03:59:08
2020-04-05T03:59:08
253,150,297
0
0
null
2022-03-08T21:19:08
2020-04-05T03:47:50
Java
UTF-8
Java
false
false
2,216
java
package com.dhrov.msitm.service.impl; import com.dhrov.msitm.service.JobHistoryService; import com.dhrov.msitm.domain.JobHistory; import com.dhrov.msitm.repository.JobHistoryRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Optional; /** * Service Implementation for managing {@link JobHistory}. */ @Service @Transactional public class JobHistoryServiceImpl implements JobHistoryService { private final Logger log = LoggerFactory.getLogger(JobHistoryServiceImpl.class); private final JobHistoryRepository jobHistoryRepository; public JobHistoryServiceImpl(JobHistoryRepository jobHistoryRepository) { this.jobHistoryRepository = jobHistoryRepository; } /** * Save a jobHistory. * * @param jobHistory the entity to save. * @return the persisted entity. */ @Override public JobHistory save(JobHistory jobHistory) { log.debug("Request to save JobHistory : {}", jobHistory); return jobHistoryRepository.save(jobHistory); } /** * Get all the jobHistories. * * @param pageable the pagination information. * @return the list of entities. */ @Override @Transactional(readOnly = true) public Page<JobHistory> findAll(Pageable pageable) { log.debug("Request to get all JobHistories"); return jobHistoryRepository.findAll(pageable); } /** * Get one jobHistory by id. * * @param id the id of the entity. * @return the entity. */ @Override @Transactional(readOnly = true) public Optional<JobHistory> findOne(Long id) { log.debug("Request to get JobHistory : {}", id); return jobHistoryRepository.findById(id); } /** * Delete the jobHistory by id. * * @param id the id of the entity. */ @Override public void delete(Long id) { log.debug("Request to delete JobHistory : {}", id); jobHistoryRepository.deleteById(id); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e032e3f07611949c3fd70cc215545294495a26a6
8267fd21d8ab7486816f8423b29fe2948fe07064
/app/src/main/java/mw/ankara/uikit/image/WebImageView.java
09618da3c6b7d530f8f194cfbf238bea3f141f01
[]
no_license
MasaWong/AnUIKit
a7a4adf07cccb60923b1a070581f8af949211034
d3ef2ddb3f63f7ed1a8bf3832e4d6af44e745bb6
refs/heads/master
2020-04-06T03:48:10.597711
2016-05-29T03:29:40
2016-05-29T03:29:40
43,666,738
0
0
null
null
null
null
UTF-8
Java
false
false
3,429
java
package mw.ankara.uikit.image; import android.annotation.TargetApi; import android.content.Context; import android.net.Uri; import android.os.Build; import android.util.AttributeSet; import android.widget.ImageView; import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator; import com.squareup.picasso.Transformation; import java.io.File; /** * @author masawong * @since 16/4/14 */ public class WebImageView extends ImageView { private Transformation mTransformation; public WebImageView(Context context) { super(context); } public WebImageView(Context context, AttributeSet attrs) { super(context, attrs); } public WebImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @TargetApi(Build.VERSION_CODES.LOLLIPOP) public WebImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } public void setTransformation(Transformation transformation) { mTransformation = transformation; } // web image public void setImageUrl(String url) { setImageUrl(url, 0, 0, 0, 0); } public void setImageUrlWithHolder(String url, int placeHolder, int error) { setImageUrl(url, placeHolder, error, 0, 0); } public void setImageUrlWithSize(String url, int width, int height) { setImageUrl(url, 0, 0, width, height); } public void setImageUrl(String url, int placeHolder, int error, int width, int height) { setImageUri(Uri.parse(url), placeHolder, error, width, height); } // local image public void setImagePath(String path) { setImagePath(path, 0, 0, 0, 0); } public void setImagePathWithHolder(String path, int placeHolder, int error) { setImagePath(path, placeHolder, error, 0, 0); } public void setImagePathWithSize(String path, int width, int height) { setImagePath(path, 0, 0, width, height); } public void setImagePath(String path, int placeHolder, int error, int width, int height) { setImageUri(Uri.fromFile(new File(path)), placeHolder, error, width, height); } // uri public void setImageUri(Uri uri) { setImageUri(uri, 0, 0, 0, 0); } public void setImageUriWithHolder(Uri uri, int placeHolder, int error) { setImageUri(uri, placeHolder, error, 0, 0); } public void setImageUriWithSize(Uri uri, int width, int height) { setImageUri(uri, 0, 0, width, height); } public void setImageUri(Uri uri, int placeHolder, int error, int width, int height) { RequestCreator creator = Picasso.with(getContext()).load(uri); // size if (width <= 0) { width = getMeasuredWidth(); } if (height <= 0) { height = getMeasuredHeight(); } if (width > 0 && height > 0) { creator.resize(width, height).centerCrop(); } // place holder if (placeHolder > 0) { creator.placeholder(placeHolder); } // error holder if (error > 0) { creator.error(error); } // transformation if (mTransformation != null) { creator.transform(mTransformation); } // execute creator.into(this); } }
[ "admin@example.com" ]
admin@example.com
1553472e6975291fb47a1be5c89b725d50040487
c827a8b6af4228e50a5977c69920de95a8927903
/zxy-game-server/src/com/jtang/gameserver/module/app/model/extension/rule/RuleConfigVO12.java
3e43a7936c71e611c356b334264458b7c3546c5d
[]
no_license
tyler-he/wkzj
15012bf29082d941cfbe2bb725db1de54390d410
5e43b83a85e11414c12962d368c2dfdf3cb23d25
refs/heads/master
2023-03-20T03:47:18.275196
2019-03-07T09:42:13
2019-03-07T09:42:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package com.jtang.gameserver.module.app.model.extension.rule; import com.jtang.core.utility.StringUtils; import com.jtang.gameserver.module.app.model.annotation.AppVO; import com.jtang.gameserver.module.app.model.extension.BaseRuleConfigVO; import com.jtang.gameserver.module.app.type.EffectId; @AppVO public class RuleConfigVO12 implements BaseRuleConfigVO{ /** * 充值金额 */ private int num; @Override public EffectId getEffectId() { return EffectId.EFFECT_ID_12; } @Override public void init(String record) { if(StringUtils.isBlank(record) == false){ this.num = Integer.valueOf(record); } } public int getNum() { return num; } }
[ "ityuany@126.com" ]
ityuany@126.com
b09d449653891ef866e7d03159cb9d299ee2b72b
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/7/org/apache/commons/lang3/math/NumberUtils_toDouble_249.java
e6416e517f669951073fdc65f86c5dc8829c9da6
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,843
java
org apach common lang3 math extra function java number class version number util numberutil convert code string code code code return code code convers fail string code str code code code code code return pre number util numberutil doubl todoubl number util numberutil doubl todoubl number util numberutil doubl todoubl pre param str string convert code code repres string code code convers fail doubl todoubl string str doubl todoubl str
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
bbeab7e92e5d7e6dd3ad9539e33662fc389e1c29
50ec1cd86d8db986d3222b34a43a94bf2a86b9d7
/Milkomeda/src/main/java/com/github/yizzuide/milkomeda/comet/collector/CollectorFactory.java
b70bd44c78d4e64ec2546ac14bafae8deee8e3a0
[ "MIT" ]
permissive
Loeng/Milkomeda
2edcd8bd385f9c203d8838ade5ce2a32a214564b
18c714f3296f39056a3e96ed485beb34b62ede7c
refs/heads/master
2022-07-04T20:50:14.028745
2020-05-22T09:31:50
2020-05-22T09:31:50
266,247,643
1
0
MIT
2020-05-23T02:25:11
2020-05-23T02:25:10
null
UTF-8
Java
false
false
753
java
package com.github.yizzuide.milkomeda.comet.collector; import com.github.yizzuide.milkomeda.comet.core.CometData; import com.github.yizzuide.milkomeda.pillar.PillarExecutor; import lombok.AllArgsConstructor; import lombok.Data; /** * CollectorFactory * 收集器工厂 * * @author yizzuide * @since 1.15.0 * @version 1.16.0 * Create at 2019/11/13 19:11 */ @Data @AllArgsConstructor public class CollectorFactory { /** * 分流执行器 */ private PillarExecutor<CometData, Object> pillarExecutor; /** * 根据标识符获取一个收集器 * @param tag 收集器的tag * @return 收集器 */ public Collector get(String tag) { return (Collector) pillarExecutor.getPillar(tag); } }
[ "fu837014586@163.com" ]
fu837014586@163.com
65c486dfcab6f71a2640f4de944c06976629769a
bcb3e750e703acc65d2fcd2b18228717aebdd1af
/src/main/java/com/zkw/concurrent/java_Multithread_programmingbook/C7/c7_1/c7_1_3/MyThread1.java
d76bea4f93a832c28e538075cee3f0879dc8c8d7
[]
no_license
jameszkw/demo
095879f15339411d4c02de45d207343c271f8d90
ace9b39c5498c4476483476e886a05b19104bbde
refs/heads/master
2020-05-29T20:16:38.762554
2018-04-18T01:23:18
2018-04-18T01:23:18
32,331,158
4
0
null
null
null
null
UTF-8
Java
false
false
383
java
package com.zkw.concurrent.java_Multithread_programmingbook.C7.c7_1.c7_1_3; import com.zkw.concurrent.java_Multithread_programmingbook.C7.c7_1.c7_1_3.MyService; /** * ${DESCRIPTION} * * @author James * @create 2017-09-19 下午 8:18 **/ public class MyThread1 extends Thread { @Override public void run() { MyService.serviceMethod(); } }
[ "zhangkewu@paypalm.cn" ]
zhangkewu@paypalm.cn
56d6f39f5e7431f4ca6defe7e49ed1fe9b3ab5ea
406757a1fd3624bdc64c97a905bfa6d31f48293f
/externals/src/main/java/llnl/gnem/core/polygon/PolygonSetType.java
2d74f8ba1617d00fc03d7cb933fc7b61b5a18474
[ "Apache-2.0" ]
permissive
LLNL/coda-calibration-tool
67e349f9c0653b5ab0804cc8a90e77c1817394a1
f86cdc694ca7cc6a34b965321d5c87684afb9cf4
refs/heads/master
2023-08-30T05:03:58.686698
2023-08-23T20:44:10
2023-08-23T20:44:10
114,670,393
18
1
Apache-2.0
2023-02-20T10:09:05
2017-12-18T17:42:33
Java
UTF-8
Java
false
false
1,048
java
/* * Copyright (c) 2018, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory * CODE-743439. * All rights reserved. * This file is part of CCT. For details, see https://github.com/LLNL/coda-calibration-tool. * * Licensed under the Apache License, Version 2.0 (the “Licensee”); 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. * * This work was performed under the auspices of the U.S. Department of Energy * by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344. */ package llnl.gnem.core.polygon; public enum PolygonSetType { country, state, network }
[ "barno1@llnl.gov" ]
barno1@llnl.gov
02ea810f6ab116ce23b8d91d553a6daf0d69b1ee
7e713646a0619267b421aafa41a9afeeaf7a0108
/src/main/java/com/gdztyy/inca/service/IPubDdlDtlService.java
ebd7f123be00277d582c4fdf8bb6114e7dbb6986
[]
no_license
liutaota/ipl
4757e35d1100ca892f2137b690ee4b43b908dc19
9d53b9044ba56b6ea65f1347a779d4b66e075bea
refs/heads/master
2023-03-21T11:28:42.663574
2021-03-05T08:49:33
2021-03-05T08:49:33
344,747,852
0
0
null
null
null
null
UTF-8
Java
false
false
282
java
package com.gdztyy.inca.service; import com.gdztyy.inca.entity.PubDdlDtl; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 服务类 * </p> * * @author peiqy * @since 2020-08-18 */ public interface IPubDdlDtlService extends IService<PubDdlDtl> { }
[ "liutao@qq.com" ]
liutao@qq.com
d7b4ac9e238a53eaa6f4ebec76ae33a3b1cc6390
c188408c9ec0425666250b45734f8b4c9644a946
/open-sphere-base/core/src/main/java/io/opensphere/core/animationhelper/TimeSpanGovernor.java
4d56fe58b4b88b7d89152e60deed0afcda2519ae
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
rkausch/opensphere-desktop
ef8067eb03197c758e3af40ebe49e182a450cc02
c871c4364b3456685411fddd22414fd40ce65699
refs/heads/snapshot_5.2.7
2023-04-13T21:00:00.575303
2020-07-29T17:56:10
2020-07-29T17:56:10
360,594,280
0
0
Apache-2.0
2021-04-22T17:40:38
2021-04-22T16:58:41
null
UTF-8
Java
false
false
6,320
java
package io.opensphere.core.animationhelper; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.concurrent.Executor; import io.opensphere.core.model.time.TimeSpan; import io.opensphere.core.model.time.TimeSpanList; import io.opensphere.core.util.collections.New; import io.opensphere.core.util.concurrent.ProcrastinatingExecutor; import net.jcip.annotations.GuardedBy; import net.jcip.annotations.ThreadSafe; /** Manages which time spans have been queried, so you don't have to. */ @ThreadSafe public abstract class TimeSpanGovernor { /** The callbacks to execute when after pending requests are handled. */ @GuardedBy("this") private final List<Runnable> myCallbacks = New.list(); /** The executor. */ private final Executor myExecutor = new ProcrastinatingExecutor("TimeSpanQueryTracker", 500, 2000); /** The pending times to request. */ @GuardedBy("this") private final List<TimeSpan> myPendingTimes = New.list(); /** The times that have not been requested. */ private final List<TimeSpan> myUnrequestedTimes; /** The original available span. */ private final TimeSpan myAvailableSpan; /** * Calculates the intersections of the two collections of spans. * * @param spans1 the first spans * @param spans2 the second spans * @return the intersections */ private static List<TimeSpan> getIntersections(Collection<? extends TimeSpan> spans1, Collection<? extends TimeSpan> spans2) { List<TimeSpan> intersections = New.list(); for (TimeSpan span1 : spans1) { for (TimeSpan span2 : spans2) { TimeSpan intersection = span1.getIntersection(span2); if (intersection != null) { intersections.add(intersection); } } } return intersections; } /** * Subtracts the span from the spans. * * @param spans the spans * @param span the span to subtract * @return the differences */ private static List<TimeSpan> subtract(Collection<? extends TimeSpan> spans, TimeSpan span) { List<TimeSpan> differences = New.list(); for (TimeSpan span1 : spans) { if (span1.overlaps(span)) { differences.addAll(span1.subtract(span)); } else { differences.add(span1); } } return differences; } /** * Constructor. * * @param availableSpan the span of available data */ public TimeSpanGovernor(TimeSpan availableSpan) { myUnrequestedTimes = Collections.synchronizedList(New.list(availableSpan)); myAvailableSpan = availableSpan; } /** * Requests that data be requested for the span. * * @param span the span * @param callbacks callbacks to run after the request is performed */ public void requestData(TimeSpan span, Runnable... callbacks) { addCallbacks(span, callbacks); myExecutor.execute(this::handleRequests); } /** * Requests that data be requested for the span. * * @param span the span * @param callbacks callbacks to run after the request is performed */ public void requestDataNow(TimeSpan span, Runnable... callbacks) { addCallbacks(span, callbacks); handleRequests(); } /** * Clears the data. Intended to be overridden. */ public void clearData() { myExecutor.execute(() -> { synchronized (myUnrequestedTimes) { myUnrequestedTimes.clear(); myUnrequestedTimes.add(myAvailableSpan); } }); } /** * Adds back the specified times so they can be queryable again. * * @param spans The spans to add back as queryable. */ public void clearData(Collection<? extends TimeSpan> spans) { synchronized (myUnrequestedTimes) { myUnrequestedTimes.addAll(spans); } } /** * Called when a request needs to be performed. * * @param spans the time spans to request * @return whether the request was completed */ protected abstract boolean performRequest(List<? extends TimeSpan> spans); /** * Adds the callbacks for the time span. * * @param span The time span. * @param callbacks The callbacks to add. */ private void addCallbacks(TimeSpan span, Runnable... callbacks) { synchronized (this) { myPendingTimes.add(span); for (Runnable callback : callbacks) { myCallbacks.add(callback); } } } /** * Handles the pending requests. */ private void handleRequests() { List<TimeSpan> timesToRequest; synchronized (this) { TimeSpanList.mergeOverlaps(myPendingTimes, true); synchronized (myUnrequestedTimes) { timesToRequest = getIntersections(myPendingTimes, myUnrequestedTimes); } myPendingTimes.clear(); } if (!timesToRequest.isEmpty()) { boolean requestComplete = performRequest(timesToRequest); if (requestComplete) { for (TimeSpan span : timesToRequest) { synchronized (myUnrequestedTimes) { List<TimeSpan> differences = subtract(myUnrequestedTimes, span); myUnrequestedTimes.clear(); myUnrequestedTimes.addAll(differences); } } } } List<Runnable> callbacks; synchronized (this) { callbacks = New.list(myCallbacks); myCallbacks.clear(); } callbacks.forEach(c -> c.run()); } }
[ "kauschr@opensphere.io" ]
kauschr@opensphere.io
4b3206bb75b27416cf54941859559f3de9ae2391
816e53ced1f741006ed5dd568365aba0ec03f0cf
/TeamBattle/temp/src/minecraft/net/minecraft/command/server/CommandListPlayers.java
67236b066b48d8002eb0135d93b66a9e5ea8fa4e
[]
no_license
TeamBattleClient/TeamBattleRemake
ad4eb8379ebc673ef1e58d0f2c1a34e900bd85fe
859afd1ff2cd7527abedfbfe0b3d1dae09d5cbbc
refs/heads/master
2021-03-12T19:41:51.521287
2015-03-08T21:34:32
2015-03-08T21:34:32
31,624,440
3
0
null
null
null
null
UTF-8
Java
false
false
1,102
java
package net.minecraft.command.server; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; import net.minecraft.server.MinecraftServer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; public class CommandListPlayers extends CommandBase { private static final String __OBFID = "CL_00000615"; public String func_71517_b() { return "list"; } public int func_82362_a() { return 0; } public String func_71518_a(ICommandSender p_71518_1_) { return "commands.players.usage"; } public void func_71515_b(ICommandSender p_71515_1_, String[] p_71515_2_) { p_71515_1_.func_145747_a(new ChatComponentTranslation("commands.players.list", new Object[]{Integer.valueOf(MinecraftServer.func_71276_C().func_71233_x()), Integer.valueOf(MinecraftServer.func_71276_C().func_71275_y())})); p_71515_1_.func_145747_a(new ChatComponentText(MinecraftServer.func_71276_C().func_71203_ab().func_152609_b(p_71515_2_.length > 0 && "uuids".equalsIgnoreCase(p_71515_2_[0])))); } }
[ "honzajurak@hotmail.co.uk" ]
honzajurak@hotmail.co.uk
eedbdf7122d540b0d97777f3f61b2f80e672041e
3ddb764069d303c7400fb096956ab065562786c3
/app/src/main/java/com/example/nazmuddinmavliwala/ewallet/ui/transactions/presenter/TransactionDomainVOConverter.java
4c14b4d096ad49c3b46a3809e068a66ac1bd2d56
[]
no_license
nazmuddin77/Bounty-Android-Personal-Finance
1204f492f31a69b4b827c1c93511a288f3425477
ee10030e259235003261d912cb5a197176b0cc2f
refs/heads/master
2021-07-22T10:51:35.267395
2017-11-01T08:33:33
2017-11-01T08:33:33
106,899,267
0
0
null
2017-10-14T04:53:22
2017-10-14T04:53:22
null
UTF-8
Java
false
false
846
java
package com.example.nazmuddinmavliwala.ewallet.ui.transactions.presenter; import com.example.domain.Converter; import com.example.domain.interactors.Transaction; import com.example.nazmuddinmavliwala.ewallet.ui.overview.di.ConverterModule; import com.example.nazmuddinmavliwala.ewallet.ui.transactions.models.TransactionVO; /** * Created by nazmuddinmavliwala on 01/11/2017. */ public class TransactionDomainVOConverter implements Converter<Transaction,TransactionVO> { @Override public TransactionVO convert(Transaction data) { return new TransactionVO.TransactionVOBuilder() .setAmount(data.getAmount()) .setTransactionType(data.getTransactionType()) .setExpenseType(data.getExpenseType()) .setId(data.getId()) .createTransactionVO(); } }
[ "nazmuddinmavliwala@gmail.com" ]
nazmuddinmavliwala@gmail.com
05e58c622ac6b348cc1fb3c4633569f756b850a4
7c01f9b8c697cc412a40480218a1e991c485d9a9
/src/main/java/codingbat/string3/EqualIsNot.java
5d42d4045a5662088a966e612640faf1c30406a2
[]
no_license
ThomassenMichiel/CodingChallenges
5d8c4e8b4921a387edc7aa0fbf43be6c8097307e
4c5f147fd144c4c61a6d1ef1e0ef0025a441616b
refs/heads/master
2023-06-25T17:15:10.189768
2023-03-16T08:53:57
2023-03-16T08:53:57
220,125,452
0
0
null
2023-06-14T22:21:04
2019-11-07T01:33:04
Java
UTF-8
Java
false
false
528
java
package codingbat.string3; public class EqualIsNot { public boolean equalIsNot(String str) { long is = java.util.stream.IntStream.range(0, str.length()-1) .mapToObj(i -> str.substring(i, i + 2)) .filter(s -> s.equals("is")) .count(); long not = java.util.stream.IntStream.range(0, str.length()-2) .mapToObj(i -> str.substring(i, i + 3)) .filter(s -> s.equals("not")) .count(); return is == not; } }
[ "bunzzbunzz@gmail.com" ]
bunzzbunzz@gmail.com
e8360fece9ebe19f6a83f2d71afbf3d158ae4f2f
fd34bc57a54757fd6c29980347eb0a22213f5430
/copymob/server/src/main/java/it/mate/copymob/client/view/OrderEditView.java
951aa43422f3f3b39c3474b6ddeded2307491b77
[]
no_license
urazovm/marcelatelab
7b64c1c3f6bad786590964e5115d811787bc91a2
b9e264ecb4fe99b8966a8e4babc588b4aec4725f
refs/heads/master
2021-06-01T06:25:35.860311
2016-04-29T12:22:07
2016-04-29T12:22:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,324
java
package it.mate.copymob.client.view; import it.mate.copymob.client.view.OrderEditView.Presenter; import it.mate.copymob.shared.model.Order; import it.mate.copymob.shared.model.OrderItem; import it.mate.gwtcommons.client.mvp.AbstractBaseView; import it.mate.gwtcommons.client.mvp.BasePresenter; import it.mate.gwtcommons.client.utils.Delegate; import it.mate.gwtcommons.client.utils.GwtUtils; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.client.ui.ListBox; import com.google.gwt.user.client.ui.Widget; public class OrderEditView extends AbstractBaseView<Presenter> { public interface Presenter extends BasePresenter { public void updateOrder(Order order, Delegate<Order> delegate); } public interface ViewUiBinder extends UiBinder<Widget, OrderEditView> { } private static ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class); @UiField FlexTable flexTable; @UiField ListBox lbxOrderStates; private Order order; public OrderEditView() { initUI(); } protected void initUI() { initWidget(uiBinder.createAndBindUi(this)); lbxOrderStates.addItem("Ricevuto", ""+Order.STATE_RECEIVED); lbxOrderStates.addItem("Preventivo in elaborazione", ""+Order.STATE_PREVIEW_IN_PROGRESS); lbxOrderStates.addItem("Preventivo disponibile", ""+Order.STATE_PREVIEW_AVAILABLE); lbxOrderStates.addItem("Pagato", ""+Order.STATE_PREVIEW_PAYED); lbxOrderStates.addItem("In lavorazione", ""+Order.STATE_WORK_IN_PROGRESS); lbxOrderStates.addItem("Spedito", ""+Order.STATE_SHIPED); lbxOrderStates.addItem("Chiuso", ""+Order.STATE_CLOSE); } @Override public void setModel(Object model, String tag) { if (model instanceof Order) { this.order = (Order)model; updateOrderState(order); populateTable(order); } } private void updateOrderState(Order order) { String orderStateCode = order.getState().toString(); for (int it = 0; it < lbxOrderStates.getItemCount(); it++) { if (lbxOrderStates.getValue(it).equals(orderStateCode) ) { lbxOrderStates.setSelectedIndex(it); } } } private void populateTable(Order order) { int row = 0; for (OrderItem item : order.getItems()) { OrderItemView itemView = new OrderItemView(); itemView.setPresenter((OrderItemView.Presenter)getPresenter()); itemView.setModel(item); itemView.setOrder(order); flexTable.setWidget(row, 0, itemView.asWidget()); row++; } } private Order flushOrder() { String stateCode = lbxOrderStates.getValue(lbxOrderStates.getSelectedIndex()); Integer newState = Integer.parseInt(stateCode); order.setState(newState); return order; } @UiHandler ("btnUpdate") public void onBtnUpdate(ClickEvent event) { getPresenter().updateOrder(flushOrder(), new Delegate<Order>() { public void execute(Order element) { GwtUtils.log("ORDINE SALVATO!"); } }); } }
[ "demarco.m73@gmail.com" ]
demarco.m73@gmail.com
54733cfd4c4ed38894cfe398ad3cc21c97838d36
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/bjx.java
de9e725aae647cfcfa9fa4c4f679236195c266cd
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
502
java
import android.view.View; import android.view.View.OnClickListener; import com.tencent.mobileqq.activity.SnapScreenActivity; public class bjx implements View.OnClickListener { public bjx(SnapScreenActivity paramSnapScreenActivity) {} public void onClick(View paramView) { this.a.a.a(true); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar * Qualified Name: bjx * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
d6ff95b3951b11cb7723acae16950499000d431e
b4733a6e323188215f084ce8badd8144405844b8
/app/src/main/java/com/toda/broker/bean/RegionBean.java
78f486208b4a9ab7c5323c6c687b09baa2a8808e
[]
no_license
guguangzhu/Broker
2540c47df4c05f4279f78d79fb1a0885b347611a
b0e8805d023301d729b56d3a507bed9bb9670295
refs/heads/master
2021-01-12T12:32:39.072244
2017-02-23T14:02:07
2017-02-23T14:02:07
72,546,539
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package com.toda.broker.bean; import java.util.List; /** * Created by guugangzhu on 2017/2/20. */ public class RegionBean { private List<ListBean> list; public List<ListBean> getList() { return list; } public void setList(List<ListBean> list) { this.list = list; } public static class ListBean { /** * areaId : 820004 * areaName : 西湖区 * description : */ private int areaId; private String areaName; private String description; public int getAreaId() { return areaId; } public void setAreaId(int areaId) { this.areaId = areaId; } public String getAreaName() { return areaName; } public void setAreaName(String areaName) { this.areaName = areaName; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } } }
[ "574496377@qq.com" ]
574496377@qq.com
21ebffdddc2478410ace6a3c6f2ce8f3527e11c6
c164d8f1a6068b871372bae8262609fd279d774c
/src/main/java/edu/uiowa/slis/VIVOISF/NamedIndividual/NamedIndividualDescription.java
dbddc7460a4b303c34d9ed01aace6bcbf62876b7
[ "Apache-2.0" ]
permissive
eichmann/VIVOISF
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
e80cd8b74915974fac7ebae8e5e7be8615355262
refs/heads/master
2020-03-19T03:44:27.662527
2018-06-03T22:44:58
2018-06-03T22:44:58
135,757,275
0
1
null
null
null
null
UTF-8
Java
false
false
1,027
java
package edu.uiowa.slis.VIVOISF.NamedIndividual; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; @SuppressWarnings("serial") public class NamedIndividualDescription extends edu.uiowa.slis.VIVOISF.TagLibSupport { static NamedIndividualDescription currentInstance = null; private static final Log log = LogFactory.getLog(NamedIndividualDescription.class); // non-functional property public int doStartTag() throws JspException { try { NamedIndividualDescriptionIterator theNamedIndividual = (NamedIndividualDescriptionIterator)findAncestorWithClass(this, NamedIndividualDescriptionIterator.class); pageContext.getOut().print(theNamedIndividual.getDescription()); } catch (Exception e) { log.error("Can't find enclosing NamedIndividual for description tag ", e); throw new JspTagException("Error: Can't find enclosing NamedIndividual for description tag "); } return SKIP_BODY; } }
[ "david-eichmann@uiowa.edu" ]
david-eichmann@uiowa.edu
7ca4cb9c1e7cd57912521add25bf41e125dbf1cb
aeedb1c5d4e4d82f01c78df95fe8606030f1c5ed
/java/value/dev/d20081115-2253/src/test/java/org/ppwcode/value_III/organization/id11n/state/be/BeEnterpriseNumberTest.java
7146d620787e5b24ac5e7b55210b24878a4921f4
[ "Apache-2.0" ]
permissive
jandppw/ppwcode-recovered-from-google-code
8cca772cbd76d4fcf97e5f98422039ec56b73b98
7878d1c1c9efff2982d73e4b10fd141f78e7c200
refs/heads/master
2021-01-10T08:53:28.688114
2015-04-05T14:24:28
2015-04-05T14:24:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,015
java
/*<license> Copyright 2004 - $Date$ by PeopleWare n.v.. 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. </license>*/ package org.ppwcode.value_III.organization.id11n.state.be; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.ppwcode.value_III.organization.id11n.state.be.BeEnterpriseNumber.CONTROL_CONSTANT; import static org.ppwcode.value_III.organization.id11n.state.be.BeEnterpriseNumber.REGEX_PATTERN; import static org.ppwcode.value_III.organization.id11n.state.be.BeEnterpriseNumber.REGEX_PATTERN_STRING; import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; import org.junit.Before; import org.junit.Test; import org.ppwcode.value_III.id11n.AbstractRegexIdentifierTest; import org.ppwcode.value_III.id11n.Identifier; import org.ppwcode.value_III.id11n.IdentifierWellformednessException; import org.ppwcode.vernacular.value_III.SemanticValueException; public class BeEnterpriseNumberTest extends AbstractRegexIdentifierTest { @Override @Before public void setUp() throws Exception { List<BeEnterpriseNumber> s = new ArrayList<BeEnterpriseNumber>(); BeEnterpriseNumber subject = new BeEnterpriseNumber("0453834195"); // PeopleWare s.add(subject); subject = new BeEnterpriseNumber(fakeEnterpriseNumberString(12345678)); s.add(subject); subject = new BeEnterpriseNumber(fakeEnterpriseNumberString(0)); s.add(subject); subject = new BeEnterpriseNumber(fakeEnterpriseNumberString(1)); s.add(subject); subject = new BeEnterpriseNumber(fakeEnterpriseNumberString(10000000)); s.add(subject); subject = new BeEnterpriseNumber(fakeEnterpriseNumberString(/*0*/7654321)); s.add(subject); $subjects = s; } @SuppressWarnings("unchecked") @Override public List<? extends BeEnterpriseNumber> subjects() { return (List<? extends BeEnterpriseNumber>)$subjects; } @Override protected void assertInvariants(Identifier subject) { super.assertInvariants(subject); assertEquals(REGEX_PATTERN.pattern(), REGEX_PATTERN_STRING); } @Test(expected = IdentifierWellformednessException.class) public void testBeEnterpriseNumber1() throws IdentifierWellformednessException { new BeEnterpriseNumber("0123456789"); } @Test public void testBeEnterpriseNumber2() throws IdentifierWellformednessException { String identifier = "0453834195"; // PeopleWare BeEnterpriseNumber subject = new BeEnterpriseNumber("0453834195"); testBeEnterpriseNumber(subject, identifier); } @Test(expected = IdentifierWellformednessException.class) public void testBeEnterpriseNumber2b() throws IdentifierWellformednessException { String identifier = "0453834195"; // PeopleWare BeEnterpriseNumber subject = new BeEnterpriseNumber("0453834194"); testBeEnterpriseNumber(subject, identifier); } @Test(expected = IdentifierWellformednessException.class) public void testBeEnterpriseNumber3() throws IdentifierWellformednessException { new BeEnterpriseNumber("BE 0453834195"); } @Test(expected = IdentifierWellformednessException.class) public void testBeEnterpriseNumber4() throws IdentifierWellformednessException { new BeEnterpriseNumber(" 0453834195"); } @Test(expected = IdentifierWellformednessException.class) public void testBeEnterpriseNumber5() throws IdentifierWellformednessException { new BeEnterpriseNumber("0453.834.195"); } @Test public void testBeEnterpriseNumber6() throws IdentifierWellformednessException { String identifier = fakeEnterpriseNumberString(12345678); BeEnterpriseNumber subject = new BeEnterpriseNumber(identifier); testBeEnterpriseNumber(subject, identifier); } private void testBeEnterpriseNumber(BeEnterpriseNumber subject, String identifier) { assertEquals(identifier, subject.getIdentifier()); assertInvariants(subject); } private String fakeEnterpriseNumberString(int base) { NumberFormat nf = NumberFormat.getIntegerInstance(); nf.setGroupingUsed(false); nf.setMinimumIntegerDigits(8); nf.setMaximumIntegerDigits(8); String baseString = nf.format(base); int mod = base % CONTROL_CONSTANT; int control = CONTROL_CONSTANT - mod; // System.out.println(control); nf.setMinimumIntegerDigits(2); nf.setMaximumIntegerDigits(2); String controlString = nf.format(control); String result = baseString + controlString; return result; } @Test public void testGetMain() { for (BeEnterpriseNumber subject : subjects()) { String result = subject.getMain(); assertEquals(subject.patternGroup(1), result); assertInvariants(subject); } } @Test public void testGetMainAsInt() { for (BeEnterpriseNumber subject : subjects()) { int result = subject.getMainAsInt(); assertEquals(Integer.parseInt(subject.getMain()), result); assertInvariants(subject); } } @Test public void testGetControl() { for (BeEnterpriseNumber subject : subjects()) { String result = subject.getControl(); assertEquals(subject.patternGroup(4), result); assertInvariants(subject); } } @Test public void testGetControlAsInt() { for (BeEnterpriseNumber subject : subjects()) { int result = subject.getControlAsInt(); assertEquals(Integer.parseInt(subject.getControl()), result); assertInvariants(subject); } } @Test public void testGetPrefix() { for (BeEnterpriseNumber subject : subjects()) { String result = subject.getPrefix(); assertEquals(subject.patternGroup(2), result); assertInvariants(subject); } } @Test public void testIsOldVatNumberBased() { for (BeEnterpriseNumber subject : subjects()) { boolean result = subject.isOldVatNumberBased(); assertEquals(subject.patternGroup(2).equals("0"), result); assertInvariants(subject); } } @Test public void testGetOldVatNumber() { for (BeEnterpriseNumber subject : subjects()) { try { String result = subject.getOldVatNumber(); assertEquals(subject.patternGroup(3) + subject.getControl(), result); } catch (SemanticValueException svExc) { assertTrue(! subject.isOldVatNumberBased()); } assertInvariants(subject); } } // @Override // @Test // public void testToString() { // for (BeEnterpriseNumber subject : subjects()) { // System.out.println(subject.toString()); // assertInvariants(subject); // } // } }
[ "jandockx@463e38ab-4f4e-0410-907a-65d2b3888964" ]
jandockx@463e38ab-4f4e-0410-907a-65d2b3888964
b8ad8a090b4efa98a8a01a89e79c9f460b97ba98
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13546-5-23-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/configuration/internal/AbstractDocumentConfigurationSource_ESTest_scaffolding.java
87e5be269b5763f649f42673b5eb62ba6b77b608
[]
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
5,572
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Apr 05 15:51:18 UTC 2020 */ package org.xwiki.configuration.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class AbstractDocumentConfigurationSource_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.configuration.internal.AbstractDocumentConfigurationSource"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader() , "com.xpn.xwiki.XWikiException", "org.xwiki.observation.ObservationManager", "org.xwiki.component.phase.Initializable", "org.xwiki.model.internal.reference.AbstractStringEntityReferenceSerializer", "org.xwiki.component.annotation.Component", "org.xwiki.model.reference.EntityReference", "org.xwiki.configuration.internal.WikiPreferencesConfigurationSource", "org.xwiki.properties.ConverterManager", "org.xwiki.component.manager.ComponentLookupException", "org.xwiki.component.phase.Disposable", "org.xwiki.component.phase.InitializationException", "org.xwiki.component.manager.ComponentLifecycleException", "org.apache.commons.lang3.StringUtils", "com.xpn.xwiki.objects.ObjectInterface", "com.xpn.xwiki.objects.BaseCollection", "org.xwiki.component.annotation.Role", "org.xwiki.model.reference.LocalDocumentReference", "org.xwiki.cache.CacheFactory", "org.xwiki.configuration.internal.AbstractConfigurationSource", "org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource", "org.xwiki.cache.CacheManager", "org.xwiki.model.EntityType", "org.xwiki.model.reference.EntityReferenceSerializer", "org.xwiki.model.reference.RegexEntityReference", "org.xwiki.model.internal.reference.LocalizedStringEntityReferenceSerializer", "org.xwiki.cache.config.CacheConfiguration", "com.xpn.xwiki.objects.BaseObject", "org.xwiki.model.reference.PartialEntityReference", "com.xpn.xwiki.objects.BaseElement", "org.xwiki.wiki.descriptor.WikiDescriptor", "org.xwiki.configuration.internal.AbstractDocumentConfigurationSource", "org.xwiki.wiki.manager.WikiManagerException", "org.xwiki.model.internal.reference.DefaultStringEntityReferenceSerializer", "org.xwiki.component.util.DefaultParameterizedType", "org.xwiki.model.reference.DocumentReference", "org.xwiki.observation.event.Event", "org.xwiki.configuration.ConfigurationSource", "org.xwiki.observation.EventListener", "org.xwiki.model.reference.WikiReference", "org.xwiki.cache.CacheException", "org.xwiki.wiki.descriptor.WikiDescriptorManager", "com.xpn.xwiki.objects.ElementInterface", "org.xwiki.cache.Cache" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("javax.inject.Provider", false, AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.slf4j.Logger", false, AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.xwiki.cache.CacheManager", false, AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.xwiki.model.reference.EntityReferenceSerializer", false, AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.xwiki.observation.ObservationManager", false, AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.xwiki.properties.ConverterManager", false, AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.xwiki.wiki.descriptor.WikiDescriptorManager", false, AbstractDocumentConfigurationSource_ESTest_scaffolding.class.getClassLoader())); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
75a8bad426711251152393ecfe30ffbd3e54c5cf
7a80372dba083443b8837a88cb8a27e08a8c1d58
/osm2geography/src/main/java/de/uzl/itm/osm/adapter/osm2geography/OsmWays2WaySectionsAdapter.java
a7ba42283466e85da7d029bee956de7fac302659
[]
no_license
okleine/osm-adapter
cc9892725c82ee727a92104d67d950b37091eb1e
27fe9cdda06f917d845932f17be9fd0789356b2d
refs/heads/master
2021-01-22T06:58:15.278693
2015-08-24T23:40:40
2015-08-24T23:40:40
39,583,134
0
0
null
null
null
null
UTF-8
Java
false
false
7,734
java
/** * Copyright (c) 2015, Oliver Kleine, Institute of Telematics, University of Luebeck * All rights reserved * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source messageCode 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 University of Luebeck nor the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package de.uzl.itm.osm.adapter.osm2geography; import com.google.common.collect.HashBasedTable; import com.google.common.collect.Table; import com.grum.geocalc.DegreeCoordinate; import com.grum.geocalc.Point; import de.uzl.itm.jaxb4osm.jaxb.NodeElement; import de.uzl.itm.jaxb4osm.jaxb.OsmElement; import de.uzl.itm.jaxb4osm.jaxb.WayElement; import de.uzl.itm.jaxb4osm.tools.OsmUnmarshaller; import de.uzl.itm.jaxb4osm.tools.WayElementFilter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.FileInputStream; import java.io.UnsupportedEncodingException; import java.util.*; /** * This is the "intermediate" Adapter to convert data from OSM files to instances classes from the geocalc * framework. This is useful to make calculations, such as lengths or distances. * * @author Oliver Kleine */ public class OsmWays2WaySectionsAdapter { public static Logger LOG = LoggerFactory.getLogger(OsmWays2WaySectionsAdapter.class.getName()); public static final int COUNTRY_CODE = 0; public static final int POSTAL_CODE = 1; public static final int CITY = 2; public static final int STREET_NAME = 3; public static final String UNKNOWN = "unknown"; private File osmFile; private final WayElementFilter filter; private final boolean splitWays; private HashBasedTable <Long, Integer, WaySection> waySections = null; private Map<Long, Map<Integer, String>> metadata = null; /** * * @param osmFile the OSM (XML) file to be unmarshalled * @param filter the {@link de.uzl.itm.jaxb4osm.tools.WayElementFilter} to filter e.g. certain ways * @param splitWays <code>true</code> if each {@link de.uzl.itm.jaxb4osm.jaxb.WayElement} is to be * split at crossings or <code>false</code> otherwise * @throws Exception */ public OsmWays2WaySectionsAdapter(File osmFile, WayElementFilter filter, boolean splitWays) throws Exception { this.osmFile = osmFile; this.filter = filter; this.splitWays = splitWays; } /** * Returns a map containing an OSM-ID based key and a {@link WaySection} as * values. The key consists of the ID of the corresponding OSM Way and a (consecutive) number. * * @return A map containing an OSM-ID based key and a {@link WaySection} as * values. The key consists of the ID of the corresponding OSM Way and a (consecutive) number. */ public Table<Long, Integer, WaySection> getWaySections(){ return this.waySections; } public Map<Long, Map<Integer, String>> getMetadata() throws Exception { if(this.metadata == null){ this.initialize(); } return this.metadata; } /** * Creates {@link de.uzl.itm.osm.adapter.osm2geography.WaySection}s and metadata */ public void initialize() throws Exception { createWaySectionsAndMetadata(); } private void createWaySectionsAndMetadata() throws Exception{ try{ long start = System.currentTimeMillis(); FileInputStream fileInputStream = new FileInputStream(osmFile); OsmElement osmElement = OsmUnmarshaller.unmarshal(fileInputStream, filter, splitWays); this.waySections = HashBasedTable.create(); this.metadata = new HashMap<>(); for(WayElement wayElement : osmElement.getWayElements()){ String country = wayElement.getTagValue(WayElement.TAG_COUNTRY); String postalCode = wayElement.getTagValue(WayElement.TAG_POSTAL_CODE); String city = wayElement.getTagValue(WayElement.TAG_CITY); String streetName = wayElement.getTagValue(WayElement.TAG_NAME); List<Point> points = new ArrayList<>(); int segmentID = 0; for(int i = 0; i < wayElement.getNdElements().size(); i++){ long nodeID = wayElement.getNdElements().get(i).getReference(); points.add(toPoint(osmElement.getNodeElement(nodeID))); if((splitWays && osmElement.getReferencingWayIDs(nodeID).size() > 1) || nodeID == wayElement.getLastNdElement().getReference()){ if(points.size() > 1){ this.waySections.put(wayElement.getID(), ++segmentID, new WaySection(points, wayElement.getTagValue("name"), wayElement.isOneWay())); Map<Integer, String> tmp = new HashMap<>(); tmp.put(COUNTRY_CODE, country == null ? UNKNOWN : country); tmp.put(POSTAL_CODE, postalCode == null ? UNKNOWN : postalCode); tmp.put(CITY, city == null ? UNKNOWN : city); tmp.put(STREET_NAME, streetName == null ? UNKNOWN : streetName); this.metadata.put(wayElement.getID(), tmp); } points = new ArrayList<>(); points.add(toPoint(osmElement.getNodeElement(nodeID))); } } } long duration = System.currentTimeMillis() - start; int lanes = 0; for(WaySection waySection : this.waySections.values()){ if(waySection.isOneWay()) { lanes += 1; } else{ lanes += 2; } } LOG.info("Created {} ways with {} sections with {} lanes (duration: {} ms).", new Object[]{this.metadata.size(), this.waySections.size(), lanes, duration}); } catch(UnsupportedEncodingException ex){ System.err.println("This should never happen!" + ex.getMessage()); } } private static Point toPoint(NodeElement nodeElement){ return new Point( new DegreeCoordinate(nodeElement.getLatitude()), new DegreeCoordinate(nodeElement.getLongitude()) ); } }
[ "kleine@itm.uni-luebeck.de" ]
kleine@itm.uni-luebeck.de
be16cfa8f503a4f05ed1d40e1904c4d890bb05d5
9f907527f44fdfc33b5add9f8d313bbeb96d1192
/src/codeforces/contests301_400/problemset352/JeffAndDigits.java
41d005b4133ba24ceb0be4388e4fd5a195cdcc5f
[]
no_license
kocko/algorithms
7af7052b13a080992dcfbff57171a2cac7c50c67
382b6b50538220a26e1af1644e72a4e1796374b6
refs/heads/master
2023-08-03T21:15:27.070471
2023-08-03T14:39:45
2023-08-03T14:39:45
45,342,667
5
0
null
null
null
null
UTF-8
Java
false
false
2,482
java
package codeforces.contests301_400.problemset352; import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class JeffAndDigits implements Closeable { private InputReader in = new InputReader(System.in); private PrintWriter out = new PrintWriter(System.out); public void solve() { int n = in.ni(); int five = 0, zero = 0; for (int i = 0; i < n; i++) { if (in.ni() == 5) { five++; } else { zero++; } } int fives = 9 * (five / 9); if (fives == 0) { if (zero == 0) { out.println(-1); } else { out.println(0); } } else { if (zero == 0) { out.println(-1); } else { for (int i = 0; i < fives; i++) { out.print(5); } for (int i = 0; i < zero; i++) { out.print(0); } } } } @Override public void close() throws IOException { in.close(); out.close(); } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int ni() { return Integer.parseInt(next()); } public long nl() { return Long.parseLong(next()); } public void close() throws IOException { reader.close(); } } public static void main(String[] args) throws IOException { try (JeffAndDigits instance = new JeffAndDigits()) { instance.solve(); } } }
[ "konstantin.yovkov@tis.biz" ]
konstantin.yovkov@tis.biz
c071c0ffba825c2ce0eaa71488c298130eb771da
ffc3c5e51d0ac126c2a36e6ac45f7a6a0eda9164
/src/main/java/wenyu/learning/Arrays/SortByAnotherArr.java
ff7015c841dbe233353c0e4050ec578b14ff9e54
[]
no_license
WenyuChang/data-structure-algorithm-leaning
203646bd537542e4cd33ca2b549e497e90d97297
9f9df7eb6d438493a1a91c87c766969a1f2147d9
refs/heads/master
2021-01-22T20:08:05.117890
2017-03-17T07:20:14
2017-03-17T07:20:14
85,282,459
0
0
null
null
null
null
UTF-8
Java
false
false
1,228
java
package wenyu.learning.Arrays; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; /* * Given two arrays sort the first array in the order of numbers given in the second array. * For the numbers that do not appear in the second array, sort according to face value. */ public class SortByAnotherArr { public static <E extends Comparable<E>> void sort(E[] arr, E[] base) { final HashMap<E, Integer> map = new HashMap<E, Integer>(); for(int i=0; i<base.length; i++) { if(!map.containsKey(base[i])) { map.put(base[i], i); } } Comparator<E> comp = new Comparator<E>() { public int compare(E o1, E o2) { if(map.containsKey(o1) && map.containsKey(o2)) { return map.get(o1) - map.get(o2); } else { return o1.compareTo(o2); } } }; Arrays.sort(arr, comp); } public static void main(String[] args) { int[] arr = UtilsForArray.generateRandomIntegerArray(9, 10); Integer[] arrInteger = new Integer[arr.length]; for(int i=0; i<arr.length; i++) { arrInteger[i] = arr[i]; } Integer[] base = {2,0,6,8,3,9}; sort(arrInteger, base); System.out.println(Arrays.toString(arrInteger)); } }
[ "changwy_1987@hotmail.com" ]
changwy_1987@hotmail.com
ee4cc57a6e4f3f51b444dbcff4b208fb0278639f
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XRENDERING-418-24-15-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter_ESTest_scaffolding.java
9f5499e76dbd58244c646018673b3ffef55e40d8
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 29 00:25:15 UTC 2021 */ package org.xwiki.rendering.wikimodel.xhtml.filter; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XHTMLWhitespaceXMLFilter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
59ba44fa92b6428926bce71a2ca1560889753336
48631c3851b15fbc20e61e29b82480b64eec2885
/swaggertoword/src/main/java/com/prosayj/springboot/toword/service/WordService.java
56c2e731a850cfa186234ed772c26f1f69441aec
[ "Apache-2.0" ]
permissive
ProSayJ/springbootstudy
56cb7f80502888d2c564d7a4bda23dd0650750f7
04b5ce563b9e6163ab6d6217292d7dd266e105c3
refs/heads/master
2022-12-25T10:42:49.047945
2021-04-09T15:20:12
2021-04-09T15:20:12
147,488,466
0
0
Apache-2.0
2022-12-16T03:22:22
2018-09-05T08:52:00
Java
UTF-8
Java
false
false
376
java
package com.prosayj.springboot.toword.service; import com.prosayj.springboot.toword.dto.Table; import java.util.List; import java.util.Map; /** * @author yangjian * @description TODO * @email ProSayJ@gmail.cn * @creatTime 2019/11/19 下午 05:40 * @since 1.0.0 */ public interface WordService { Map<String, List<Table>> tableList(String var1); }
[ "prosayj@gmail.com" ]
prosayj@gmail.com
99971c96a99a860ae85582c0d9898aaf9221a6e5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_935e72e5c3c4254bbbb2e5cd2c72f13b3d3bf219/RServiceTest/7_935e72e5c3c4254bbbb2e5cd2c72f13b3d3bf219_RServiceTest_s.java
c7993cd2441ae94273239c0e5631fd92a2712c8d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,214
java
package org.nexusbpm.service.r; import org.nexusbpm.common.NexusTestCase; import org.nexusbpm.service.NexusServiceException; import java.net.URI; import java.net.URL; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JOptionPane; import junit.framework.Assert; import org.apache.commons.vfs.FileObject; import org.apache.commons.vfs.VFS; import org.junit.Test; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.assertThat; public class RServiceTest extends NexusTestCase { private String unique = "output-" + System.currentTimeMillis(); private RWorkItem getPlotData() throws Exception { RWorkItem data = new RWorkItem(); data.setServerAddress("localhost"); data.getParameters().put("radius", new Integer(1000)); data.getParameters().put("imageLocation", "test.png"); data.setCode( "t=seq(0,2*pi,length=10000);\n" + "png(filename=imageLocation, width=800, height=600, bg=\"grey\");\n" + "plot(radius*cos(t * 5),radius*sin(t * 3), type=\"l\", col=\"blue\");\n" + "dev.off();\n" + "myfile = file(imageLocation);\n" + "radius <- radius + 1;\n" ); return data; } @Test public void testRPlottingWithOutputGraph() throws Exception{ RServiceImpl r = new RServiceImpl(); RWorkItem data = getPlotData(); r.execute(data); System.out.println(data.getCode()); System.out.println(data.getOut()); System.out.println(data.getErr()); if (data.getErr() != null) { Assert.fail("R command did not complete properly due to " + data.getErr()); } else { System.out.println(data.getResults().get("imageLocation")); // JOptionPane.showConfirmDialog(null, "", "", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, icon); } assertThat("radius should reflect change from R code", (Double) data.getResults().get("radius"), equalTo(1001.0D)); URI uri = (URI) data.getResults().get("myfile"); FileObject file = VFS.getManager().resolveFile(uri.toString()); Assert.assertEquals(9585, file.getContent().getSize()); } @Test public void testRSyntaxExceptionHandling() throws Exception { RServiceImpl r = new RServiceImpl(); RWorkItem data = new RWorkItem(); data.setCode("xxx"); data.setServerAddress(getProperty("test.r.server")); try { r.execute(data); Assert.fail("Exception should have been thrown"); } catch(NexusServiceException e) { } System.out.println("Code:\n" + data.getCode()); System.out.println("Output:\n" + data.getOut()); System.out.println("Error:\n" + data.getErr()); Assert.assertTrue(data.getErr().contains("Error in try({ : object 'xxx' not found")); } // private RParameterMap getDBData() throws Exception { // RParameterMap data = new RParameterMap(); // setSharedData(data); // data.put(new Parameter("fileName", null, null, ParameterType.FILE.getType(), URI.create("test.csv"), false, Parameter.DIRECTION_INPUT)); // String code = // "library(\"rJava\");\nlibrary(RJDBC);\n" + // "location<-sprintf(\"%s.csv\", reqId);\n" + // "fileName=sprintf(\"//%s/rserve/%s\", serverAddress, location);\n" + // "drv<-JDBC(\"org.postgresql.Driver\",\"D:/workspace/yawl/build/3rdParty/lib/postgresql-8.0-311.jdbc3.jar\");\n" + // "conn<-dbConnect(drv,\"jdbc:postgresql:yawl\",\"postgres\",\"admin\");\n" + // "d<-dbGetQuery(conn, \"select * from yspecification\");\n" + // "write.table(d, file=location,sep=\",\",row.names=FALSE);\n" // ; // data.setCode(code); // // return data; // } private RWorkItem get2WayData() throws Exception { RWorkItem data = new RWorkItem(); data.setServerAddress("localhost"); // URI testUri = DataflowStreamProviderFactory.getInstance().getOutputProvider("testService", "testproc", "12", "111", "test.csv").getURI(); // data.put(new Parameter("file", null, null, ParameterType.ASCII_FILE, testUri, false, Parameter.DIRECTION_INPUT)); // data.put(new Parameter("imageLocation", null, null, ParameterType.BINARY_FILE, URI.create("my2.png"), false, Parameter.DIRECTION_OUTPUT)); data.setCode( "mydata<-read.csv(file);\n" + "png(filename=imageLocation, width=800, height=600, bg=\"grey\");\n" + "plot(mydata);\n" + "dev.off();\n" ); return data; } public void xtestDBR() throws Exception { //first i installed the rjdbc package on R... RServiceImpl r = new RServiceImpl(); RWorkItem data = get2WayData(); r.execute(data); Assert.assertNotNull(data.getResults().get("file")); System.out.println(data.getOut()); System.out.println(data.getErr()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f1fb5392358dcfd4c73071dde6bf467f4fb6c047
8047f2870d782018e91e6cdd7e4130989c81c286
/product/src/test/java/com/novli/product/service/ICategoryServiceTest.java
4374dd29f30280a057b09304f750569ea0b5dbe2
[]
no_license
FatLi1989/spring_cloud_sell
362aaf47f196492140c9625d81874341e132faa0
b57cafaabe4f1ebd7391c96c27a06e3d46407b7b
refs/heads/master
2020-04-15T03:23:42.744831
2019-03-04T11:42:35
2019-03-04T11:42:35
164,346,950
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package com.novli.product.service; import com.novli.product.ProductApplicationTests; import com.novli.product.vo.CategoryVo; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; /** * @author NovLi * @Title: * @ProjectName spring_cloud_sell * @Description: TODO * @date 2019/1/8 14:22 */ @Component public class ICategoryServiceTest extends ProductApplicationTests { @Autowired ICategoryService iCategoryService; @Test public void listProductsByCategory () { List<CategoryVo> categoryVoList = iCategoryService.listProductsByCategory (); Assert.assertTrue (categoryVoList.size ()>0); } }
[ "514340686@qq.com" ]
514340686@qq.com
41f5b8f75358043fbdd8881797fafc603f1cce4a
3e3b8edd2357bca697abde020301089cf7e8392a
/src/main/java/com/dn/onlinestore/web/rest/ProfileInfoResource.java
ddc8c93c91027fe8d86e9372713c01cc5eb5adf6
[]
no_license
luffyMonster/OnlineStore
79c688bcab0f338843f516ba1a5104e08601352c
3fea1355266651bf65498047847564053305fe05
refs/heads/master
2021-05-08T14:59:50.951121
2018-02-03T15:20:01
2018-02-03T15:20:01
120,102,590
0
0
null
null
null
null
UTF-8
Java
false
false
2,037
java
package com.dn.onlinestore.web.rest; import com.dn.onlinestore.config.DefaultProfileUtil; import io.github.jhipster.config.JHipsterProperties; import org.springframework.core.env.Environment; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Resource to return information about the currently running Spring profiles. */ @RestController @RequestMapping("/api") public class ProfileInfoResource { private final Environment env; private final JHipsterProperties jHipsterProperties; public ProfileInfoResource(Environment env, JHipsterProperties jHipsterProperties) { this.env = env; this.jHipsterProperties = jHipsterProperties; } @GetMapping("/profile-info") public ProfileInfoVM getActiveProfiles() { String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env); return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles)); } private String getRibbonEnv(String[] activeProfiles) { String[] displayOnActiveProfiles = jHipsterProperties.getRibbon().getDisplayOnActiveProfiles(); if (displayOnActiveProfiles == null) { return null; } List<String> ribbonProfiles = new ArrayList<>(Arrays.asList(displayOnActiveProfiles)); List<String> springBootProfiles = Arrays.asList(activeProfiles); ribbonProfiles.retainAll(springBootProfiles); if (!ribbonProfiles.isEmpty()) { return ribbonProfiles.get(0); } return null; } class ProfileInfoVM { private String[] activeProfiles; private String ribbonEnv; ProfileInfoVM(String[] activeProfiles, String ribbonEnv) { this.activeProfiles = activeProfiles; this.ribbonEnv = ribbonEnv; } public String[] getActiveProfiles() { return activeProfiles; } public String getRibbonEnv() { return ribbonEnv; } } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
086e3a2292839005bfed2d254f5b56ba6c5b5e03
34dcfed241b2403e333b2e9fa19cd623524ba9b9
/actionables-pmc-ref/src/main/java/com/oculussoftware/bus/mkt/prod/MarketInputTrashColl.java
f95ecadb9a9a9a688eb11edf1732441032665519
[ "Apache-2.0" ]
permissive
jimcoles/actionable
3bb5653c35dce9e2ff57aefb04b4b8a508ca49aa
ed9640958311155f0a950ff5d9b2ff50300319a8
refs/heads/master
2021-01-12T19:43:59.027379
2016-08-26T23:25:31
2016-08-26T23:25:31
64,573,631
0
0
null
null
null
null
UTF-8
Java
false
false
2,231
java
package com.oculussoftware.bus.mkt.prod; import com.oculussoftware.api.repi.*; import com.oculussoftware.api.busi.mkt.prod.*; import com.oculussoftware.api.sysi.*; import java.util.*; /** * Filename: MarketInputTrashColl.java * Date: 4-20-00 * Description: * * Copyright 1-31-2000 Oculus Software. All Rights Reserved. * * @author Egan Royal * @version 1.2 */ public class MarketInputTrashColl extends MarketInputColl implements IMarketInputColl { protected String COL_NAME = "SUBJECT"; /* * Change Activity * * Issue number Programmer Date Description BUG00419 apota Compass trash fix effort. Currently there is no trash for compass. */ //----------------------------- Public Constructor ------------------------- /** Default constructor just initializes the product list */ public MarketInputTrashColl() throws OculusException { super(); } //----------------------------- Protected Constructor ------------------------- /** Default constructor just initializes the product list */ protected MarketInputTrashColl(Comparator sortCrit) throws OculusException { super(sortCrit); } //------------------------ Protected Methods -------------------------------- protected String getLoadQuery() throws ORIOException { return "SELECT * FROM MARKETINPUT WHERE DELETESTATE=0"; } //------------------- IBusinessObjectList Methods -------------------------- public IRCollection setSort(Comparator sortCrit) throws OculusException { MarketInputTrashColl sortedList = new MarketInputTrashColl(sortCrit); sortedList._items.addAll(this._items); return sortedList; } //----------------- IPoolable Methods ------------------------------------ /** Returns a duplicate IProductColl object, but without the ObjectContext */ public Object dolly() throws OculusException { MarketInputTrashColl catList = null; catList = new MarketInputTrashColl(); catList.setIID(_iid); catList._items = this._items; catList.reset(); return catList; } }
[ "jameskcoles@gmail.com" ]
jameskcoles@gmail.com
e0d6d64b3f8fd476bd671ea5b48055671f2c5791
fc1bf26252525f1dca780f0c26cea165c3b3f531
/com/planet_ink/coffee_mud/Abilities/Properties/Prop_NoSummon.java
e887849fdaa4e1e23ea2a8264935ac2a2a47a132
[ "Apache-2.0" ]
permissive
mikael2/CoffeeMud
8ade6ff60022dbe01f55172ba3f86be0de752124
a70112b6c67e712df398c940b2ce00b589596de0
refs/heads/master
2020-03-07T14:13:04.765442
2018-03-28T03:59:22
2018-03-28T03:59:22
127,521,360
1
0
null
2018-03-31T10:11:54
2018-03-31T10:11:53
null
UTF-8
Java
false
false
3,116
java
package com.planet_ink.coffee_mud.Abilities.Properties; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; /* Copyright 2003-2018 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Prop_NoSummon extends Property { @Override public String ID() { return "Prop_NoSummon"; } @Override public String name() { return "Summon Spell Neutralizing"; } @Override protected int canAffectCode() { return Ability.CAN_ROOMS|Ability.CAN_AREAS|Ability.CAN_MOBS; } protected boolean nonAggroOK=false; @Override public long flags() { return Ability.FLAG_IMMUNER; } @Override public void setMiscText(String text) { nonAggroOK=CMParms.parse(text.toUpperCase()).contains("ALLOWNONAGGR"); } @Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { if(!super.okMessage(myHost,msg)) return false; if((msg.tool() instanceof Ability) &&(msg.source().location()!=null) &&((msg.source().location()==affected) ||((affected instanceof Area)&&(((Area)affected).inMyMetroArea(msg.source().location().getArea())))) &&((!nonAggroOK)||(!(msg.target() instanceof MOB))||(!CMLib.flags().isAggressiveTo((MOB)msg.target(),null))) &&(CMath.bset(((Ability)msg.tool()).flags(),Ability.FLAG_SUMMONING))) { final Ability A=(Ability)msg.tool(); if(((A.classificationCode()&Ability.ALL_ACODES)==Ability.ACODE_CHANT) ||((A.classificationCode()&Ability.ALL_ACODES)==Ability.ACODE_SPELL) ||((A.classificationCode()&Ability.ALL_ACODES)==Ability.ACODE_PRAYER) ||((A.classificationCode()&Ability.ALL_ACODES)==Ability.ACODE_SONG)) msg.source().location().showHappens(CMMsg.MSG_OK_VISUAL,L("Magic energy fizzles and is absorbed into the air.")); return false; } return true; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
7af89a153662f5e400f8fd5a6358d9924e0ff19e
1374065426cfb2d41d0f55c80e8e819cc09551e1
/design-pattern/src/main/java/com/mark/proxy/staticproxy/IPerson.java
ce5edd5cf6f9fe4a876e17b04d0f4ce7f324cb7d
[]
no_license
ruicongMa/springcloud2020
3a2ce0eddaa3828e1b5c4c3ac03b45104d77ce6f
785999efe9fbe41ad16205e85eaeb734ee860047
refs/heads/master
2022-12-29T05:46:50.022438
2022-09-20T02:25:10
2022-09-20T02:25:10
250,131,954
0
0
null
2022-12-14T20:21:13
2020-03-26T01:29:14
Java
UTF-8
Java
false
false
153
java
package com.mark.proxy.staticproxy; /** * @author Mark * @date 2020/5/4 11:10 */ public interface IPerson { void findLove(); void test(); }
[ "mrc666888@gmail.com" ]
mrc666888@gmail.com
ea63f7c8e0792dc1f8ea9bca4a7f296d805562cf
516ce71685ea714ff648a21e0689628cc8f73297
/ZB0420/src/com/mobile/meishang/utils/view/ImageViewHome.java
423fe22fb4ece78b2dc7f5c3460770480cd3215f
[]
no_license
qq466455592/HelloWord
dcbef820ebc3593bff03f27a34e61f7b5d9e9eb3
e9b7d089011cc2d9dd31c99c91a6d40c38780730
refs/heads/master
2020-06-03T19:44:27.436829
2015-04-21T03:58:21
2015-04-21T03:58:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,627
java
package com.mobile.meishang.utils.view; import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Camera; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.PaintFlagsDrawFilter; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.animation.OvershootInterpolator; import android.widget.ImageView; import android.widget.Scroller; import com.mobile.meishang.R; @TargetApi(Build.VERSION_CODES.HONEYCOMB) public class ImageViewHome extends ImageView { private Camera mCamera; private Matrix mMatrix; private int mCenterX; private int mCenterY; private int[] mCurrentRotate; private int mCurrentDepth; private int mMaxDepth; private int mMaxRotateDegree; private Scroller mScroller; private Scroller mDepthScroller; public ImageViewHome(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); PaintFlagsDrawFilter mSetfil = new PaintFlagsDrawFilter(0, Paint.FILTER_BITMAP_FLAG); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TileButton, defStyle, 0); mMaxDepth = a.getInt(R.styleable.TileButton_maxDepth, 80); mMaxRotateDegree = Math.abs(a.getInt( R.styleable.TileButton_maxRotateDegree, 0)); a.recycle(); mCamera = new Camera(); mMatrix = new Matrix(); mScroller = new Scroller(context); mDepthScroller = new Scroller(context, new OvershootInterpolator()); mCurrentRotate = new int[2]; } public ImageViewHome(Context context, AttributeSet attrs) { this(context, attrs, android.R.attr.buttonStyle); } public ImageViewHome(Context context) { this(context, null); } @Override public boolean onTouchEvent(MotionEvent event) { final int centerX = mCenterX; final int centerY = mCenterY; // final float x = event.getX(); // final float y = event.getY(); final float x = centerX; final float y = centerY; final int[] currentRotate = mCurrentRotate; switch (event.getAction() & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_DOWN: final int[] rotate = new int[2]; mDepthScroller.startScroll(mCurrentDepth, 0, mMaxDepth - mCurrentDepth, 0); computeRotate(rotate, x, y, centerX, centerY); mScroller.startScroll(currentRotate[0], currentRotate[1], rotate[0] - currentRotate[0], rotate[1] - currentRotate[1]); break; case MotionEvent.ACTION_MOVE: computeRotate(currentRotate, x, y, centerX, centerY); applyRotate(currentRotate[0], currentRotate[1], mCurrentDepth); break; case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_OUTSIDE: case MotionEvent.ACTION_UP: mDepthScroller.startScroll(mCurrentDepth, 0, 0 - mCurrentDepth, 0); mScroller.startScroll(currentRotate[0], currentRotate[1], 0 - currentRotate[0], 0 - currentRotate[1]); break; } invalidate(); requestLayout(); return super.onTouchEvent(event); } @Override public void computeScroll() { super.computeScroll(); final int[] currentRotate = mCurrentRotate; if (mDepthScroller.computeScrollOffset()) { mCurrentDepth = mDepthScroller.getCurrX(); applyRotate(currentRotate[0], currentRotate[1], mCurrentDepth); invalidate(); requestLayout(); } if (mScroller.computeScrollOffset()) { currentRotate[0] = mScroller.getCurrX(); currentRotate[1] = mScroller.getCurrY(); applyRotate(currentRotate[0], currentRotate[1], mCurrentDepth); invalidate(); requestLayout(); } } protected void computeRotate(int[] rotate, float x, float y, int centerX, int centerY) { final int maxRotateDegree = mMaxRotateDegree; rotate[0] = (int) Math.min(Math.max(-(y - centerY) * maxRotateDegree / centerY, -maxRotateDegree), maxRotateDegree); rotate[1] = (int) Math.min(Math.max((x - centerX) * maxRotateDegree / centerX, -maxRotateDegree), maxRotateDegree); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); mCenterX = w / 2; mCenterY = h / 2; } private void applyRotate(float x, float y, float depth) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { setRotationX(x); setRotationY(y); float scale = depthToScale(depth); setScaleX(scale); setScaleY(scale); } else { final Camera camera = mCamera; final Matrix matrix = mMatrix; camera.save(); camera.translate(0.0f, 0.0f, depth); camera.rotateY(y); camera.rotateX(x); camera.getMatrix(matrix); camera.restore(); matrix.preTranslate(-mCenterX, -mCenterY); matrix.postTranslate(mCenterX, mCenterY); } } private float depthToScale(float depth) { if (depth <= 0) { return 1; } return (1000 - depth) / 1000; } @Override public void draw(Canvas canvas) { canvas.save(); canvas.concat(mMatrix); super.draw(canvas); canvas.restore(); } public int getMaxDepth() { return mMaxDepth; } public void setMaxDepth(int maxDepth) { this.mMaxDepth = maxDepth; } public int getMaxRotateDegree() { return mMaxRotateDegree; } public void setMaxRotateDegree(int maxRotateDegree) { this.mMaxRotateDegree = maxRotateDegree; } @Override public Parcelable onSaveInstanceState() { SavedState savedState = new SavedState(super.onSaveInstanceState()); savedState.maxDepth = mMaxDepth; savedState.maxRotateDegree = mMaxRotateDegree; return savedState; } @Override public void onRestoreInstanceState(Parcelable state) { SavedState savedState = (SavedState) state; super.onRestoreInstanceState(savedState.getSuperState()); mMaxDepth = savedState.maxDepth; mMaxRotateDegree = savedState.maxRotateDegree; } /** * Base class for save the state of this view. * * @author Tank * */ static class SavedState extends BaseSavedState { public int maxDepth; public int maxRotateDegree; SavedState(Parcelable superState) { super(superState); } private SavedState(Parcel in) { super(in); maxDepth = in.readInt(); maxRotateDegree = in.readInt(); } @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(maxDepth); out.writeInt(maxRotateDegree); } public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() { @Override public SavedState createFromParcel(Parcel in) { return new SavedState(in); } @Override public SavedState[] newArray(int size) { return new SavedState[size]; } }; } }
[ "zhangbin131421@163.com" ]
zhangbin131421@163.com
f2cf95403df7253dce2bf2b5f3c8c0de3e4479ba
1a01f79f50066c6faf3718b541bd7c7c5fa63f1f
/minecraft/pixelmon/gui/pc/SlotPCParty.java
d119a741eefaa70e7558beda8cec64d827db8c33
[]
no_license
Tashafi/Pixelmon
01a799d470ab4e105538e5df3f91ca582e8ed91c
9b3c8858fc2d3b9db4a621ebffc1b6fc0565776e
refs/heads/master
2020-04-07T19:08:40.778999
2012-07-29T04:37:06
2012-07-29T04:37:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
291
java
package pixelmon.gui.pc; import net.minecraft.src.NBTTagCompound; public class SlotPCParty extends SlotPC{ public int partyPosition; public SlotPCParty(int x, int y, int partyNumber, NBTTagCompound pokemon){ super(x, y, pokemon); partyPosition = partyNumber; } }
[ "malc.geddes@gmail.com" ]
malc.geddes@gmail.com
bbd6db0fbea17f68d30e367c3386a1724915cf4e
2f4a058ab684068be5af77fea0bf07665b675ac0
/app/com/facebook/orca/login/WildfireRegStartViewGroup$5.java
5fdfe6d485f7d56f8b768a6af49234dbfe3df2a4
[]
no_license
cengizgoren/facebook_apk_crack
ee812a57c746df3c28fb1f9263ae77190f08d8d2
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
refs/heads/master
2021-05-26T14:44:04.092474
2013-01-16T08:39:00
2013-01-16T08:39:00
8,321,708
1
0
null
null
null
null
UTF-8
Java
false
false
479
java
package com.facebook.orca.login; import com.facebook.orca.common.ui.widgets.text.CustomUrlLikeSpan.OnUrlClickHandler; class WildfireRegStartViewGroup$5 extends CustomUrlLikeSpan.OnUrlClickHandler { public void a() { WildfireRegStartViewGroup.access$400(this.a); } } /* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar * Qualified Name: com.facebook.orca.login.WildfireRegStartViewGroup.5 * JD-Core Version: 0.6.0 */
[ "macluz@msn.com" ]
macluz@msn.com
a661b78eaa9c74b377504704183e78b49d89553b
09a1155785a66cdbd0c18dc01a16e185c872b14e
/src/main/java/dbfexample/dbflute/exbhv/SalesSlipBhv.java
520f6edff360904d53794ba608ecebd8ebb923cb
[]
no_license
mikeshimura/java-dbflute-example
7403966f89aa18d37d521e58fc60289474036452
5274d88e26159879b540d266eb31ff201dcbaa9c
refs/heads/master
2016-09-06T14:59:53.300807
2015-07-12T00:39:04
2015-07-12T00:39:04
38,715,101
0
0
null
null
null
null
UTF-8
Java
false
false
316
java
package dbfexample.dbflute.exbhv; import dbfexample.dbflute.bsbhv.BsSalesSlipBhv; /** * The behavior of sales_slip. * <p> * You can implement your original methods here. * This class remains when re-generating. * </p> * @author DBFlute(AutoGenerator) */ public class SalesSlipBhv extends BsSalesSlipBhv { }
[ "mikeshimura@gmail.com" ]
mikeshimura@gmail.com
0ef6d958b90f734d45d1b112182b34b44950975b
12cca0e87b82f816e7765a8ec77c8d997e1e087a
/reuze/ib_FilterDiffuse.java
0782daf34a59c3eb86e4f9b2a2ae81d120f4fe62
[]
no_license
mageru/softwarereuse
b970e734783bfb6b6de846d226f1dac53f6e68b6
b72af735321ec29e768c76b0cd0c1addb7a07c98
refs/heads/master
2020-06-08T21:26:41.704118
2012-10-25T02:24:28
2012-10-25T02:24:28
5,502,804
1
0
null
null
null
null
UTF-8
Java
false
false
1,642
java
package reuze; import java.awt.image.BufferedImage; /* Copyright 2006 Jerry Huxtable 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. */ /** * This filter diffuses an image by moving its pixels in random directions. */ public class ib_FilterDiffuse extends ib_a_FilterTransform { public float[] sinTable, cosTable; public float scale = 4; public ib_FilterDiffuse() { setEdgeAction(CLAMP); } public void setScale(float scale) { this.scale = scale; } public float getScale() { return scale; } protected void transformInverse(int x, int y, float[] out) { int angle = (int)(Math.random() * 255); float distance = (float)Math.random(); out[0] = x + distance * sinTable[angle]; out[1] = y + distance * cosTable[angle]; } public BufferedImage filter( BufferedImage src, BufferedImage dst ) { sinTable = new float[256]; cosTable = new float[256]; for (int i = 0; i < 256; i++) { float angle = m_MathUtils.TWO_PI*i/256f; sinTable[i] = (float)(scale*Math.sin(angle)); cosTable[i] = (float)(scale*Math.cos(angle)); } return super.filter( src, dst ); } public String toString() { return "Distort/Diffuse..."; } }
[ "jmiller9@gmail.com" ]
jmiller9@gmail.com
b6d00c8214130b1dbac6157b3ce09df3b6f4eec9
f72971fbab14458776400d240216442d8a46cbe1
/modules/common/src/main/java/wsimport/lib/amadeus/wsairseatmap/WmAirSeatMapResponse.java
f4b506304d084ebacb30344bc5eeb2f160f478d6
[]
no_license
hamzzy/Amadeus-Sabre-Java-Multi-GDS-SDK
cea5ee9f3be520bfbf509d5207adcc7c0f4ec4b8
a21e706c17b85d99e1ef573f66c88efa9e2918fe
refs/heads/master
2022-11-05T16:49:24.067050
2020-06-28T03:59:13
2020-06-28T03:59:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,641
java
package wsimport.lib.amadeus.wsairseatmap; 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; /** * <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;sequence> * &lt;element name="OTA_AirSeatMapRS" type="{http://traveltalk.com/wsAirSeatMap}OTA_AirSeatMapRS" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "otaAirSeatMapRS" }) @XmlRootElement(name = "wmAirSeatMapResponse") public class WmAirSeatMapResponse { @XmlElement(name = "OTA_AirSeatMapRS") protected OTAAirSeatMapRS otaAirSeatMapRS; /** * Gets the value of the otaAirSeatMapRS property. * * @return * possible object is * {@link OTAAirSeatMapRS } * */ public OTAAirSeatMapRS getOTAAirSeatMapRS() { return otaAirSeatMapRS; } /** * Sets the value of the otaAirSeatMapRS property. * * @param value * allowed object is * {@link OTAAirSeatMapRS } * */ public void setOTAAirSeatMapRS(OTAAirSeatMapRS value) { this.otaAirSeatMapRS = value; } }
[ "info@brakket.tech" ]
info@brakket.tech
414d7c59f9de567ad9fe902ab8bbb8422ec67451
7a76838d738be65d601f164cb5a97b699be1da2b
/spring-batch-in-action/base/base/spring-batch/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/internal/DelegatingTradeLineAggregator.java
422e7158c928754e79996a8a16e42910b19e79f5
[ "Apache-2.0" ]
permissive
jinminer/spring-batch
fafdedec5de3198aa0c05353a26f0238b396bebc
f2e29682f882c8656b283030279e95ebcf08868a
refs/heads/master
2022-12-22T21:04:27.438433
2019-10-08T16:58:10
2019-10-08T16:58:10
209,073,938
1
1
Apache-2.0
2022-12-16T01:35:27
2019-09-17T14:18:30
Java
UTF-8
Java
false
false
1,734
java
/* * Copyright 2006-2014 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.batch.sample.iosample.internal; import org.springframework.batch.item.file.transform.LineAggregator; import org.springframework.batch.sample.domain.trade.CustomerCredit; import org.springframework.batch.sample.domain.trade.Trade; /** * @author Dan Garrette * @since 2.0 */ public class DelegatingTradeLineAggregator implements LineAggregator<Object> { private LineAggregator<Trade> tradeLineAggregator; private LineAggregator<CustomerCredit> customerLineAggregator; @Override public String aggregate(Object item) { if (item instanceof Trade) { return this.tradeLineAggregator.aggregate((Trade) item); } else if (item instanceof CustomerCredit) { return this.customerLineAggregator.aggregate((CustomerCredit) item); } else { throw new RuntimeException(); } } public void setTradeLineAggregator(LineAggregator<Trade> tradeLineAggregator) { this.tradeLineAggregator = tradeLineAggregator; } public void setCustomerLineAggregator(LineAggregator<CustomerCredit> customerLineAggregator) { this.customerLineAggregator = customerLineAggregator; } }
[ "jinm@uxunchina.com" ]
jinm@uxunchina.com
a8e992fee7010349c340897084add9ace46c4e9a
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/outboundbot-20191226/src/main/java/com/aliyun/outboundbot20191226/models/ModifyJobGroupResponse.java
73318908a89191f0c954b317bbe1e03932a438d6
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,365
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.outboundbot20191226.models; import com.aliyun.tea.*; public class ModifyJobGroupResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public ModifyJobGroupResponseBody body; public static ModifyJobGroupResponse build(java.util.Map<String, ?> map) throws Exception { ModifyJobGroupResponse self = new ModifyJobGroupResponse(); return TeaModel.build(map, self); } public ModifyJobGroupResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ModifyJobGroupResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public ModifyJobGroupResponse setBody(ModifyJobGroupResponseBody body) { this.body = body; return this; } public ModifyJobGroupResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
5e6d87bd58c84a95d264889111053c440ecc146c
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/15a09a04f2cc62650d54a20ae85c94e92d4d7de9/after/OrQueryBuilderTest.java
8989f6b742e3f9b9c88f48e61be6e4cad2d17732
[]
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
3,811
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.index.query; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.Query; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.junit.Test; import java.io.IOException; @SuppressWarnings("deprecation") public class OrQueryBuilderTest extends BaseQueryTestCase<OrQueryBuilder> { @Override protected Query doCreateExpectedQuery(OrQueryBuilder queryBuilder, QueryParseContext context) throws QueryParsingException, IOException { if (queryBuilder.filters().isEmpty()) { return null; } BooleanQuery query = new BooleanQuery(); for (QueryBuilder subQuery : queryBuilder.filters()) { Query innerQuery = subQuery.toQuery(context); // ignore queries that are null if (innerQuery != null) { query.add(innerQuery, Occur.SHOULD); } } if (query.clauses().isEmpty()) { return null; } return query; } /** * @return an OrQueryBuilder with random limit between 0 and 20 */ @Override protected OrQueryBuilder doCreateTestQueryBuilder() { OrQueryBuilder query = new OrQueryBuilder(); int subQueries = randomIntBetween(1, 5); for (int i = 0; i < subQueries; i++ ) { query.add(RandomQueryBuilder.createQuery(random())); } return query; } /** * test corner case where no inner queries exist */ @Test public void testNoInnerQueries() throws QueryParsingException, IOException { OrQueryBuilder orQuery = new OrQueryBuilder(); assertNull(orQuery.toQuery(createContext())); } @Test(expected=QueryParsingException.class) public void testMissingFiltersSection() throws IOException { QueryParseContext context = createContext(); String queryString = "{ \"or\" : {}"; XContentParser parser = XContentFactory.xContent(queryString).createParser(queryString); context.reset(parser); assertQueryHeader(parser, OrQueryBuilder.PROTOTYPE.getName()); context.indexQueryParserService().queryParser(OrQueryBuilder.PROTOTYPE.getName()).fromXContent(context); } @Test public void testValidate() { OrQueryBuilder orQuery = new OrQueryBuilder(); int iters = randomIntBetween(0, 5); int totalExpectedErrors = 0; for (int i = 0; i < iters; i++) { if (randomBoolean()) { if (randomBoolean()) { orQuery.add(RandomQueryBuilder.createInvalidQuery(random())); } else { orQuery.add(null); } totalExpectedErrors++; } else { orQuery.add(RandomQueryBuilder.createQuery(random())); } } assertValidate(orQuery, totalExpectedErrors); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
212419076320d85a159007372c0489e134fe1398
2f7b585bc87c88e46747c969f49b86706e05cfa6
/iefas-core/src/main/java/hk/oro/iefas/core/util/BatchUtils.java
6ea2d90b7ad6340d86de806ec6fe2220ae3940ae
[]
no_license
peterso05168/oro
3fd5ee3e86838215b02b73e8c5a536ba2bb7c525
6ca20e6dc77d4716df29873c110eb68abbacbdbd
refs/heads/master
2020-03-21T17:10:58.381531
2018-06-27T02:19:08
2018-06-27T02:19:08
138,818,244
0
0
null
null
null
null
UTF-8
Java
false
false
1,284
java
package hk.oro.iefas.core.util; import org.springframework.batch.item.file.transform.FixedLengthTokenizer; import org.springframework.batch.item.file.transform.Range; import hk.oro.iefas.core.exceptions.BaseException; public class BatchUtils { public static Range[] createRanges(int ... rangeNums) { if (CommonUtils.isEmpty(rangeNums)) { throw new BaseException("rangeNums must be not empty"); } int rangeLength = rangeNums.length; Range[] ranges = new Range[rangeLength]; int startRange = 1; int endRange; for (int i = 0; i < rangeLength; i++) { endRange = startRange + rangeNums[i]; ranges[i] = new Range(startRange, endRange - 1); startRange = endRange; } return ranges; } public static FixedLengthTokenizer createFixedLengthTokenizer(String[] names,int ... rangeNums) { if (CommonUtils.isEmpty(names)) { throw new BaseException("names must be not empty"); } Range[] ranges = createRanges(rangeNums); FixedLengthTokenizer tokenizer = new FixedLengthTokenizer(); tokenizer.setNames(names); tokenizer.setColumns(ranges); return tokenizer; } }
[ "peterso05168@gmail.com" ]
peterso05168@gmail.com
dcbdcbf7a4939c7c871c4ffda09f87faca91c9e9
0a6b421792d142ae7307fc3414fbe2db51d3152f
/src/test/java/com/example/bddspring1593170902/DemoApplicationTests.java
c326a85834cd81fac71146dda5fd28d91a2948f5
[]
no_license
cb-kubecd/bdd-spring-1593170902
a130996330c1239a377a0ce3cf8930fd8541035b
3673a534b1915a04a353e5c4e9f5b346efce22bd
refs/heads/master
2022-11-14T08:39:40.440292
2020-06-26T11:29:13
2020-06-26T11:29:13
275,140,060
0
0
null
2020-06-26T11:39:02
2020-06-26T11:29:19
Makefile
UTF-8
Java
false
false
221
java
package com.example.bddspring1593170902; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class DemoApplicationTests { @Test void contextLoads() { } }
[ "cjxd-bot@cloudbees.com" ]
cjxd-bot@cloudbees.com