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
97b228dec7b1b9e2230b39647735339fb37276eb
3ea90852ce844b9fdb21e5d391aed7929013bce5
/rapla-source-1.8.4/src/org/rapla/storage/xml/IOContext.java
cb83c6e2fa0e0e623dc064bb935443a94c8e8a79
[]
no_license
Ayce45/OverwatchBTS
5e2b932d9b3d7744b0f6bc2bba1cb2b0f5bfc06c
eb1ece3695b0b34ecad0422e9e878563f486e01f
refs/heads/master
2020-04-12T19:26:13.116600
2019-09-14T12:50:41
2019-09-14T12:50:41
162,708,924
1
0
null
null
null
null
UTF-8
Java
false
false
5,870
java
package org.rapla.storage.xml; import java.util.HashMap; import java.util.Map; import org.rapla.entities.Category; import org.rapla.entities.RaplaType; import org.rapla.entities.User; import org.rapla.entities.configuration.CalendarModelConfiguration; import org.rapla.entities.configuration.Preferences; import org.rapla.entities.configuration.RaplaConfiguration; import org.rapla.entities.configuration.RaplaMap; import org.rapla.entities.domain.Allocatable; import org.rapla.entities.domain.Appointment; import org.rapla.entities.domain.Period; import org.rapla.entities.domain.Reservation; import org.rapla.entities.dynamictype.Attribute; import org.rapla.entities.dynamictype.DynamicType; import org.rapla.facade.Conflict; import org.rapla.framework.Provider; import org.rapla.framework.RaplaContext; import org.rapla.framework.RaplaDefaultContext; import org.rapla.framework.RaplaException; import org.rapla.framework.TypedComponentRole; import org.rapla.storage.IdCreator; import org.rapla.storage.impl.EntityStore; public class IOContext { protected Map<String,RaplaType> getLocalnameMap() { //WARNING We can't use RaplaType.getRegisteredTypes() because the class could not be registered on load time Map<String,RaplaType> localnameMap = new HashMap<String,RaplaType>(); localnameMap.put( Reservation.TYPE.getLocalName(), Reservation.TYPE); localnameMap.put( Appointment.TYPE.getLocalName(), Appointment.TYPE); localnameMap.put( Allocatable.TYPE.getLocalName(), Allocatable.TYPE); localnameMap.put( User.TYPE.getLocalName(), User.TYPE); localnameMap.put( Preferences.TYPE.getLocalName(), Preferences.TYPE); localnameMap.put( Period.TYPE.getLocalName(), Period.TYPE); localnameMap.put( Category.TYPE.getLocalName(), Category.TYPE); localnameMap.put( DynamicType.TYPE.getLocalName(), DynamicType.TYPE); localnameMap.put( Attribute.TYPE.getLocalName(), Attribute.TYPE); localnameMap.put( RaplaConfiguration.TYPE.getLocalName(), RaplaConfiguration.TYPE); localnameMap.put( RaplaMap.TYPE.getLocalName(), RaplaMap.TYPE); localnameMap.put( CalendarModelConfiguration.TYPE.getLocalName(), CalendarModelConfiguration.TYPE); localnameMap.put( Conflict.TYPE.getLocalName(), Conflict.TYPE); return localnameMap; } protected void addReaders(Map<RaplaType,RaplaXMLReader> readerMap,RaplaContext context) throws RaplaException { readerMap.put( Category.TYPE,new CategoryReader( context)); readerMap.put( Conflict.TYPE,new ConflictReader( context)); readerMap.put( Preferences.TYPE, new PreferenceReader(context) ); readerMap.put( DynamicType.TYPE, new DynamicTypeReader(context) ); readerMap.put( User.TYPE, new UserReader(context)); readerMap.put( Allocatable.TYPE, new AllocatableReader(context) ); readerMap.put( Period.TYPE, new PeriodReader(context) ); readerMap.put( Reservation.TYPE,new ReservationReader(context)); readerMap.put( RaplaConfiguration.TYPE, new RaplaConfigurationReader(context)); readerMap.put( RaplaMap.TYPE, new RaplaMapReader(context)); readerMap.put( CalendarModelConfiguration.TYPE, new RaplaCalendarSettingsReader(context) ); } protected void addWriters(Map<RaplaType,RaplaXMLWriter> writerMap,RaplaContext context) throws RaplaException { writerMap.put( Category.TYPE,new CategoryWriter(context)); writerMap.put( Preferences.TYPE,new PreferenceWriter(context) ); writerMap.put( DynamicType.TYPE,new DynamicTypeWriter(context)); writerMap.put( User.TYPE, new UserWriter(context) ); writerMap.put( Allocatable.TYPE, new AllocatableWriter(context) ); writerMap.put( Reservation.TYPE,new ReservationWriter(context)); writerMap.put( RaplaConfiguration.TYPE,new RaplaConfigurationWriter(context) ); writerMap.put( RaplaMap.TYPE, new RaplaMapWriter(context) ); writerMap.put( Preferences.TYPE, new PreferenceWriter(context) ); writerMap.put( CalendarModelConfiguration.TYPE, new RaplaCalendarSettingsWriter(context) ); } public RaplaDefaultContext createInputContext(RaplaContext parentContext, EntityStore store, IdCreator idTable) throws RaplaException { RaplaDefaultContext ioContext = new RaplaDefaultContext( parentContext); ioContext.put(EntityStore.class, store); ioContext.put(IdCreator.class,idTable); ioContext.put(PreferenceReader.LOCALNAMEMAPENTRY, getLocalnameMap()); Map<RaplaType,RaplaXMLReader> readerMap = new HashMap<RaplaType,RaplaXMLReader>(); ioContext.put(PreferenceReader.READERMAP, readerMap); addReaders( readerMap, ioContext); return ioContext; } public static TypedComponentRole<Boolean> PRINTID = new TypedComponentRole<Boolean>( IOContext.class.getName() + ".idonly"); public static TypedComponentRole<Provider<Category>> SUPERCATEGORY = new TypedComponentRole<Provider<Category>>( IOContext.class.getName() + ".supercategory"); public RaplaDefaultContext createOutputContext(RaplaContext parentContext, Provider<Category> superCategory,boolean includeIds) throws RaplaException { RaplaDefaultContext ioContext = new RaplaDefaultContext( parentContext); if ( includeIds) { ioContext.put(PRINTID, Boolean.TRUE); } if ( superCategory != null) { ioContext.put( SUPERCATEGORY, superCategory); } ioContext.put(PreferenceReader.LOCALNAMEMAPENTRY, getLocalnameMap()); Map<RaplaType,RaplaXMLWriter> writerMap = new HashMap<RaplaType,RaplaXMLWriter>(); ioContext.put(PreferenceWriter.WRITERMAP, writerMap); addWriters( writerMap, ioContext ); return ioContext; } }
[ "32338891+Ayce45@users.noreply.github.com" ]
32338891+Ayce45@users.noreply.github.com
17e44bebb9b89b18e359420cacb73b663dea9a1c
ed35c13f6758e2c3a0a051b02552b3b7c72d57e3
/src/main/java/com/atguigu/consumeruser/controller/UserController.java
46106eabbe67852b1cf5bcbdc69a434dcd835c5a
[]
no_license
gitking/springcloud-consumer
385b97ae1be34c510935d230505ba80137054074
723ca9ec4f50c3477976b0ee30fdcf320779a239
refs/heads/main
2023-04-08T19:56:15.327197
2021-04-21T05:18:35
2021-04-21T05:18:35
360,041,514
0
0
null
null
null
null
UTF-8
Java
false
false
691
java
package com.atguigu.consumeruser.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; @RestController public class UserController { @Autowired RestTemplate restTemplate; @GetMapping("/buy") public String buyTicket(String name) { //http://PROVIDER-TICKET/ticket的意思是请求Eureka注册中心上面的PROVIDER-TICKET服务里面的ticket请求 String ticket = restTemplate.getForObject("http://PROVIDER-TICKET/ticket", String.class); return name + "购买了" + ticket; } }
[ "yale268sh@163.com" ]
yale268sh@163.com
0a4df1296c166ef0140906108395e1e6be8dcd9b
1e8a5381b67b594777147541253352e974b641c5
/com/google/android/gms/common/internal/zzaa.java
3094a9ce67d9ef6798c91e18001102b87da18e4e
[]
no_license
jramos92/Verify-Prueba
d45f48829e663122922f57720341990956390b7f
94765f020d52dbfe258dab9e36b9bb8f9578f907
refs/heads/master
2020-05-21T14:35:36.319179
2017-03-11T04:24:40
2017-03-11T04:24:40
84,623,529
1
0
null
null
null
null
UTF-8
Java
false
false
1,432
java
package com.google.android.gms.common.internal; import android.content.Context; import android.os.IBinder; import android.view.View; import com.google.android.gms.dynamic.zzd; import com.google.android.gms.dynamic.zze; import com.google.android.gms.dynamic.zzg; import com.google.android.gms.dynamic.zzg.zza; public final class zzaa extends zzg<zzu> { private static final zzaa zzags = new zzaa(); private zzaa() { super("com.google.android.gms.common.ui.SignInButtonCreatorImpl"); } public static View zzb(Context paramContext, int paramInt1, int paramInt2) throws zzg.zza { return zzags.zzc(paramContext, paramInt1, paramInt2); } private View zzc(Context paramContext, int paramInt1, int paramInt2) throws zzg.zza { try { zzd localzzd = zze.zzy(paramContext); paramContext = (View)zze.zzp(((zzu)zzas(paramContext)).zza(localzzd, paramInt1, paramInt2)); return paramContext; } catch (Exception paramContext) { throw new zzg.zza("Could not get button with size " + paramInt1 + " and color " + paramInt2, paramContext); } } public zzu zzaN(IBinder paramIBinder) { return zzu.zza.zzaM(paramIBinder); } } /* Location: C:\Users\julian\Downloads\Veryfit 2 0_vV2.0.28_apkpure.com-dex2jar.jar!\com\google\android\gms\common\internal\zzaa.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ramos.marin92@gmail.com" ]
ramos.marin92@gmail.com
272ca219dbd5b7056cd62c8052d9839ec93d77ef
5979994b215fabe125cd756559ef2166c7df7519
/aimir-mdms-iesco/src/main/java/org/multispeak/version_4/GetProjectResponse.java
e217cc9e06d1fd09e99594e461666cf431490a59
[]
no_license
TechTinkerer42/Haiti
91c45cb1b784c9afc61bf60d43e1d5623aeba888
debaea96056d1d4611b79bd846af8f7484b93e6e
refs/heads/master
2023-04-28T23:39:43.176592
2021-05-03T10:49:42
2021-05-03T10:49:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,932
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.07.22 at 06:38:23 PM KST // package org.multispeak.version_4; 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="GetProjectResult" type="{http://www.multispeak.org/Version_4.1_Release}project" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "getProjectResult" }) @XmlRootElement(name = "GetProjectResponse") public class GetProjectResponse { @XmlElement(name = "GetProjectResult") protected Project getProjectResult; /** * Gets the value of the getProjectResult property. * * @return * possible object is * {@link Project } * */ public Project getGetProjectResult() { return getProjectResult; } /** * Sets the value of the getProjectResult property. * * @param value * allowed object is * {@link Project } * */ public void setGetProjectResult(Project value) { this.getProjectResult = value; } }
[ "marsr0913@nuritelecom.com" ]
marsr0913@nuritelecom.com
3a7dcbe2d518cf62f697b96738cb554d151345f5
23a210a857e1d8cda630f3ad40830e2fc8bb2876
/emp_7.3/emp/rms/com/montnets/emp/rms/meditor/table/TableLfTempContent.java
52b90bb0e686ced501470c39e92382374f83f5f8
[]
no_license
zengyijava/shaoguang
415a613b20f73cabf9ab171f3bf64a8233e994f8
5d8ad6fa54536e946a15b5e7e7a62eb2e110c6b0
refs/heads/main
2023-04-25T07:57:11.656001
2021-05-18T01:18:49
2021-05-18T01:18:49
368,159,409
0
0
null
null
null
null
UTF-8
Java
false
false
1,170
java
package com.montnets.emp.rms.meditor.table; import java.util.HashMap; import java.util.Map; /** * @Description: 存储模板结构的JSON串Table 类 * @Auther:xuty * @Date: 2018/9/10 14:36 */ public class TableLfTempContent { public static final String TABLE_NAME = "LF_TEMPCONTENT"; public static final String ID = "ID"; public static final String TM_ID = "TMID"; public static final String CONTTYPE = "CONTTYPE"; public static final String TMPTYPE = "TMPTYPE"; public static final String TMPCONTENT = "TMPCONTENT"; protected static final Map<String, String> columns = new HashMap<String, String>(); /** * 加载字段 */ static{ columns.put("LfTempContent",TABLE_NAME); columns.put("tableId",ID); columns.put("id",ID); columns.put("tmId",TM_ID); columns.put("contType",CONTTYPE); columns.put("tmpType",TMPTYPE); columns.put("tmpContent",TMPCONTENT); } /** * 返回实体类字段与数据库字段实体类映射的map集合 * * @return */ public static Map<String, String> getORM() { return columns; } }
[ "2461418944@qq.com" ]
2461418944@qq.com
ab5a24455c67909eb0a8a88d1b679e94c111b09d
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/smn/src/main/java/com/huaweicloud/sdk/smn/v2/model/ListLogtankResponse.java
87df76b821529914647261320836010751121026
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
3,637
java
package com.huaweicloud.sdk.smn.v2.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.huaweicloud.sdk.core.SdkResponse; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Consumer; /** * Response Object */ public class ListLogtankResponse extends SdkResponse { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "request_id") private String requestId; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "count") private Integer count; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "logtanks") private List<LogtankItem> logtanks = null; public ListLogtankResponse withRequestId(String requestId) { this.requestId = requestId; return this; } /** * 请求的唯一标识 * @return requestId */ public String getRequestId() { return requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public ListLogtankResponse withCount(Integer count) { this.count = count; return this; } /** * 云日志信息数量 * @return count */ public Integer getCount() { return count; } public void setCount(Integer count) { this.count = count; } public ListLogtankResponse withLogtanks(List<LogtankItem> logtanks) { this.logtanks = logtanks; return this; } public ListLogtankResponse addLogtanksItem(LogtankItem logtanksItem) { if (this.logtanks == null) { this.logtanks = new ArrayList<>(); } this.logtanks.add(logtanksItem); return this; } public ListLogtankResponse withLogtanks(Consumer<List<LogtankItem>> logtanksSetter) { if (this.logtanks == null) { this.logtanks = new ArrayList<>(); } logtanksSetter.accept(this.logtanks); return this; } /** * 云日志信息列表 * @return logtanks */ public List<LogtankItem> getLogtanks() { return logtanks; } public void setLogtanks(List<LogtankItem> logtanks) { this.logtanks = logtanks; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } ListLogtankResponse that = (ListLogtankResponse) obj; return Objects.equals(this.requestId, that.requestId) && Objects.equals(this.count, that.count) && Objects.equals(this.logtanks, that.logtanks); } @Override public int hashCode() { return Objects.hash(requestId, count, logtanks); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListLogtankResponse {\n"); sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); sb.append(" count: ").append(toIndentedString(count)).append("\n"); sb.append(" logtanks: ").append(toIndentedString(logtanks)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
f7c7bb6db5252f389599b2de318abf2d6cc40278
55830c1bb38731e14e7e13e78bc9f3b7d85fef50
/인프런 강의 정리/06.자바ORM표준JPA프로그래밍 - 김영한/11. 객체지향 쿼리 언어1 - 기본 문법/02. 기본 문법과 쿼리API/src/main/java/jpql/jpaMain.java
c2785b983821a59e2334b989645c02c7fc2641b3
[]
no_license
zepetto7065/study
bfba0a994678bd985397090c84dd1966cf39f40d
ed406c37cdd02f435870f8c37a80f6b99d4c3f98
refs/heads/main
2022-11-05T10:22:49.240357
2022-11-02T11:52:12
2022-11-02T11:52:12
152,854,603
0
0
null
2020-06-23T03:48:59
2018-10-13T09:08:25
null
UTF-8
Java
false
false
1,521
java
package jpql; import javax.persistence.*; import java.util.List; public class jpaMain { public static void main(String[] args) { final EntityManagerFactory emf = Persistence.createEntityManagerFactory("hello"); final EntityManager em = emf.createEntityManager(); final EntityTransaction tx = em.getTransaction(); tx.begin(); try { Member member = new Member(); member.setUsername("member1"); em.persist(member); TypedQuery<Member> query = em.createQuery("select m from Member m", Member.class); List<Member> resultList = query.getResultList(); TypedQuery<String> query2 = em.createQuery("select m.username from Member m", String.class); Query query3 = em.createQuery("select m.username, m.age from Member m"); //try catch를 쓰면 되지만... Member result = query.getSingleResult(); System.out.println("result = " + result); //파라미터 바인딩 TypedQuery<Member> query4 = em.createQuery("select m from Member m " + "where m.username = :username", Member.class) .setParameter("username", "member1"); tx.commit(); } catch (Exception e) { tx.rollback(); e.printStackTrace(); } finally { em.close(); } emf.close(); } }
[ "zepetto.yoo@gmail.com" ]
zepetto.yoo@gmail.com
73505beeae399cf31ded937c52cca55ca491bf64
44d041667d54d8eaaa89bfced19fac0ddb6f76c8
/gfac-refactoring/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/message/impl/WorkflowContextImpl.java
2b40b2e590b47085ec9c5567f04cadb256583a0c
[]
no_license
apache/airavata-sandbox
7f2bc0550fe64ee1ee8ad40d6a5abb2a44be596a
fabf8b7d753570f2404f2d9830c59786a8c78468
refs/heads/master
2023-09-04T06:34:34.830828
2023-03-27T18:33:51
2023-03-27T19:03:58
20,473,416
3
43
null
2023-09-06T20:29:39
2014-06-04T07:00:07
JavaScript
UTF-8
Java
false
false
1,978
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.airavata.core.gfac.context.message.impl; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.apache.airavata.core.gfac.context.message.MessageContext; /** * This class contains actual parameters in service invocation. */ public class WorkflowContextImpl implements MessageContext<String> { public static final String WORKFLOW_CONTEXT_NAME = "workflow_context"; public static final String WORKFLOW_ID = "workflowId"; private Map<String, String> value; public WorkflowContextImpl() { this.value = new HashMap<String, String>(); } public Iterator<String> getNames() { return this.value.keySet().iterator(); } public String getValue(String name) { return this.value.get(name); } public String getStringValue(String name) { return this.value.get(name); } public void add(String name, String value) { this.value.put(name, value); } public void setValue(String name, String value) { this.value.put(name, value); } @Override public void remove(String name) { this.value.remove(name); } }
[ "lahiru@apache.org" ]
lahiru@apache.org
731953ee5da5b10bbe6a8cea9b1d9bd279b968d6
e2ce778ecea9302a4ad229da1fb351da3e3e70f4
/src/abstract_factory/LinuxWidgetFactory.java
716707d8a525f77298106ba06e76099d5c0d5ec2
[]
no_license
ChanakaR/design-patterns-
bcd4df2183e4eea0d8093e87bcdca00afe071115
74b27c775d342cf84368990e98e4f96a3483b9de
refs/heads/master
2020-03-19T05:06:45.167269
2018-06-03T12:33:21
2018-06-03T12:33:21
135,901,411
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package abstract_factory; /** * Created by root on 03/06/18. */ public class LinuxWidgetFactory implements AbstractWidgetFactory { @Override public Window createWindow() { return new LinuxWindow(); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
1aee557faa632f4416bfa838cad0c669ddba8eae
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_b6838f30ed5947852462288343a77ec5269db7e6/TagOccurrence/16_b6838f30ed5947852462288343a77ec5269db7e6_TagOccurrence_t.java
4f25b13c25fa8ad5f974383ee58ad2d324d537cf
[]
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,853
java
package com.github.hakko.musiccabinet.domain.model.aggr; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; /* * TagOccurrence doesn't map to a single database table but is rather aggregated * from music.tag, music|library.artisttoptag, library.toptag. */ public class TagOccurrence { private String tag; private String correctedTag; private int occurrence; private boolean use; public TagOccurrence(String tag, String correctedTag, int occurrence, boolean use) { this.tag = tag; this.correctedTag = correctedTag; this.occurrence = occurrence; this.use = use; } public String getTag() { return tag; } public void setTag(String tag) { this.tag = tag; } public String getCorrectedTag() { return correctedTag; } public void setCorrectedTag(String correctedTag) { this.correctedTag = correctedTag; } public int getOccurrence() { return occurrence; } public void setOccurrence(int occurrence) { this.occurrence = occurrence; } public boolean isUse() { return use; } public void setUse(boolean use) { this.use = use; } // tag is used as primary id, which is what we want to use for equals method. @Override public int hashCode() { return new HashCodeBuilder() .append(tag) .toHashCode(); } @Override public boolean equals(Object o) { if (o == null) return false; if (o == this) return true; if (o.getClass() != getClass()) return false; TagOccurrence to = (TagOccurrence) o; return new EqualsBuilder() .append(tag, to.tag) .append(occurrence, to.occurrence) .isEquals(); } @Override public String toString() { return "[tag=" + tag + ", corrected=" + correctedTag + ", occurrence=" + occurrence + ", use=" + use + "]"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6806c9b3b17fbadfb6edec0837943b327d8cf757
81b3984cce8eab7e04a5b0b6bcef593bc0181e5a
/android/CarLife/app/src/main/java/com/facebook/imagepipeline/p153l/C5594o.java
fdf7389f09e1b8c241941b6d682b473f1ed64f56
[]
no_license
ausdruck/Demo
20ee124734d3a56b99b8a8e38466f2adc28024d6
e11f8844f4852cec901ba784ce93fcbb4200edc6
refs/heads/master
2020-04-10T03:49:24.198527
2018-07-27T10:14:56
2018-07-27T10:14:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,847
java
package com.facebook.imagepipeline.p153l; import com.baidu.platform.comapi.util.C4820d; import com.facebook.common.internal.C5350k; import com.facebook.common.internal.VisibleForTesting; import com.facebook.common.p257e.C5320a; import com.facebook.imagepipeline.p152i.C2952d; import com.facebook.imagepipeline.p154m.C2959c; import com.facebook.imagepipeline.p276e.C5495d; import com.facebook.p269f.C5434b; /* compiled from: DownsampleUtil */ /* renamed from: com.facebook.imagepipeline.l.o */ public class C5594o { /* renamed from: a */ private static final float f22650a = 2048.0f; /* renamed from: b */ private static final float f22651b = 0.33333334f; /* renamed from: c */ private static final int f22652c = 1; private C5594o() { } /* renamed from: a */ public static int m19375a(C2959c imageRequest, C2952d encodedImage) { if (!C2952d.c(encodedImage)) { return 1; } int sampleSize; float ratio = C5594o.m19376b(imageRequest, encodedImage); if (encodedImage.e() == C5434b.JPEG) { sampleSize = C5594o.m19377b(ratio); } else { sampleSize = C5594o.m19373a(ratio); } int maxDimension = Math.max(encodedImage.h(), encodedImage.g()); while (((float) (maxDimension / sampleSize)) > 2048.0f) { if (encodedImage.e() == C5434b.JPEG) { sampleSize *= 2; } else { sampleSize++; } } return sampleSize; } @VisibleForTesting /* renamed from: b */ static float m19376b(C2959c imageRequest, C2952d encodedImage) { C5350k.m18315a(C2952d.c(encodedImage)); C5495d resizeOptions = imageRequest.e(); if (resizeOptions == null || resizeOptions.f22341b <= 0 || resizeOptions.f22340a <= 0 || encodedImage.g() == 0 || encodedImage.h() == 0) { return 1.0f; } boolean swapDimensions; int rotationAngle = C5594o.m19378c(imageRequest, encodedImage); if (rotationAngle == 90 || rotationAngle == 270) { swapDimensions = true; } else { swapDimensions = false; } C5320a.m18136a("DownsampleUtil", "Downsample - Specified size: %dx%d, image size: %dx%d ratio: %.1f x %.1f, ratio: %.3f for %s", Integer.valueOf(resizeOptions.f22340a), Integer.valueOf(resizeOptions.f22341b), Integer.valueOf(swapDimensions ? encodedImage.h() : encodedImage.g()), Integer.valueOf(swapDimensions ? encodedImage.g() : encodedImage.h()), Float.valueOf(((float) resizeOptions.f22340a) / ((float) (swapDimensions ? encodedImage.h() : encodedImage.g()))), Float.valueOf(((float) resizeOptions.f22341b) / ((float) (swapDimensions ? encodedImage.g() : encodedImage.h()))), Float.valueOf(Math.max(((float) resizeOptions.f22340a) / ((float) (swapDimensions ? encodedImage.h() : encodedImage.g())), ((float) resizeOptions.f22341b) / ((float) (swapDimensions ? encodedImage.g() : encodedImage.h())))), imageRequest.b().toString()); return Math.max(((float) resizeOptions.f22340a) / ((float) (swapDimensions ? encodedImage.h() : encodedImage.g())), ((float) resizeOptions.f22341b) / ((float) (swapDimensions ? encodedImage.g() : encodedImage.h()))); } @VisibleForTesting /* renamed from: a */ static int m19373a(float ratio) { if (ratio > 0.6666667f) { return 1; } int sampleSize = 2; while (true) { if ((1.0d / ((double) sampleSize)) + (0.3333333432674408d * (1.0d / (Math.pow((double) sampleSize, 2.0d) - ((double) sampleSize)))) <= ((double) ratio)) { return sampleSize - 1; } sampleSize++; } } @VisibleForTesting /* renamed from: b */ static int m19377b(float ratio) { if (ratio > 0.6666667f) { return 1; } int sampleSize = 2; while (true) { if ((1.0d / ((double) (sampleSize * 2))) + (0.3333333432674408d * (1.0d / ((double) (sampleSize * 2)))) <= ((double) ratio)) { return sampleSize; } sampleSize *= 2; } } /* renamed from: c */ private static int m19378c(C2959c imageRequest, C2952d encodedImage) { boolean z = false; if (!imageRequest.g()) { return 0; } int rotationAngle = encodedImage.f(); if (rotationAngle == 0 || rotationAngle == 90 || rotationAngle == C4820d.f19955a || rotationAngle == 270) { z = true; } C5350k.m18315a(z); return rotationAngle; } @VisibleForTesting /* renamed from: a */ static int m19374a(int sampleSize) { int compare = 1; while (compare < sampleSize) { compare *= 2; } return compare; } }
[ "objectyan@gmail.com" ]
objectyan@gmail.com
a41d343d5b22e7b2b002f23bc521aa926b345e09
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE190_Integer_Overflow/s07/CWE190_Integer_Overflow__byte_rand_preinc_52a.java
1e177d69681ea6b3199d7660fda516aece322bdf
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
2,484
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__byte_rand_preinc_52a.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-52a.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: rand Set data to result of rand() * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: increment * GoodSink: Ensure there will not be an overflow before incrementing data * BadSink : Increment data, which can cause an overflow * Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package * * */ package testcases.CWE190_Integer_Overflow.s07; import testcasesupport.*; import javax.servlet.http.*; public class CWE190_Integer_Overflow__byte_rand_preinc_52a extends AbstractTestCase { public void bad() throws Throwable { byte data; /* POTENTIAL FLAW: Use a random value */ data = (byte)((new java.security.SecureRandom()).nextInt(1+Byte.MAX_VALUE-Byte.MIN_VALUE) + Byte.MIN_VALUE); (new CWE190_Integer_Overflow__byte_rand_preinc_52b()).badSink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { byte data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE190_Integer_Overflow__byte_rand_preinc_52b()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { byte data; /* POTENTIAL FLAW: Use a random value */ data = (byte)((new java.security.SecureRandom()).nextInt(1+Byte.MAX_VALUE-Byte.MIN_VALUE) + Byte.MIN_VALUE); (new CWE190_Integer_Overflow__byte_rand_preinc_52b()).goodB2GSink(data ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "you@example.com" ]
you@example.com
b5119afd92b348dd0b0e72b2eb50e5634735e398
646d1ccf98dfe380575dc2b6c192ad078bd06b7a
/src/RobotFrameworkCore/org.robotframework.ide.core-functions/src/test/java/org/rf/ide/core/dryrun/RobotDryRunKeywordEventListenerTest.java
5bb253c01b407ae2658713fe569700d0e3b302bb
[ "Apache-2.0" ]
permissive
avinashvenkateswarlu/RED
832a7dfc1ce70303b9cfd73db608a87ec213c6a9
c915a4e6859c1995e84a19c652bf06490d1231c8
refs/heads/master
2020-04-07T16:11:59.814179
2018-11-20T12:03:16
2018-11-20T13:13:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,657
java
/* * Copyright 2017 Nokia Solutions and Networks * Licensed under the Apache License, Version 2.0, * see license.txt file for details. */ package org.rf.ide.core.dryrun; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyZeroInteractions; import java.net.URI; import java.util.Arrays; import java.util.function.Consumer; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.rf.ide.core.execution.agent.LogLevel; import org.rf.ide.core.execution.agent.event.LibraryImportEvent; import org.rf.ide.core.execution.agent.event.MessageEvent; @RunWith(MockitoJUnitRunner.class) public class RobotDryRunKeywordEventListenerTest { @Mock private RobotDryRunKeywordSourceCollector kwSourceCollector; @Mock private Consumer<String> libNameHandler; @Test public void libraryImportEventIsHandled() throws Exception { final RobotDryRunKeywordEventListener listener = new RobotDryRunKeywordEventListener(kwSourceCollector, libNameHandler); final LibraryImportEvent event = new LibraryImportEvent("String", new URI("file:///suite.robot"), new URI("file:///String.py"), Arrays.asList("a1", "a2")); listener.handleLibraryImport(event); verifyZeroInteractions(kwSourceCollector); verify(libNameHandler).accept("String"); verifyNoMoreInteractions(libNameHandler); } @Test public void keywordSourceMessageEventIsHandled() throws Exception { final RobotDryRunKeywordEventListener listener = new RobotDryRunKeywordEventListener(kwSourceCollector, libNameHandler); final MessageEvent event = new MessageEvent("kw_message", LogLevel.NONE, null); listener.handleMessage(event); verify(kwSourceCollector).collectFromMessageEvent(event); verifyNoMoreInteractions(kwSourceCollector); verifyZeroInteractions(libNameHandler); } @Test public void unsupportedLevelMessageEventsAreIgnored() throws Exception { final RobotDryRunKeywordEventListener listener = new RobotDryRunKeywordEventListener(kwSourceCollector, libNameHandler); listener.handleMessage(new MessageEvent("msg", LogLevel.TRACE, null)); listener.handleMessage(new MessageEvent("msg", LogLevel.DEBUG, null)); listener.handleMessage(new MessageEvent("msg", LogLevel.INFO, null)); listener.handleMessage(new MessageEvent("msg", LogLevel.WARN, null)); listener.handleMessage(new MessageEvent("msg", LogLevel.ERROR, null)); listener.handleMessage(new MessageEvent("msg", LogLevel.FAIL, null)); verifyZeroInteractions(kwSourceCollector); verifyZeroInteractions(libNameHandler); } @Test public void multipleEventsAreHandledInRightOrder() throws Exception { final RobotDryRunKeywordEventListener listener = new RobotDryRunKeywordEventListener(kwSourceCollector, libNameHandler); final MessageEvent event1 = new MessageEvent("kw_1", LogLevel.NONE, null); final LibraryImportEvent event2 = new LibraryImportEvent("lib2", new URI("file:///suite1.robot"), new URI("file:///lib2.py"), Arrays.asList("a", "b")); final MessageEvent event3 = new MessageEvent("kw_2", LogLevel.NONE, null); final MessageEvent event4 = new MessageEvent("kw_3", LogLevel.NONE, null); final LibraryImportEvent event5 = new LibraryImportEvent("lib1", new URI("file:///suite1.robot"), new URI("file:///lib1.py"), Arrays.asList("x")); listener.handleMessage(event1); listener.handleLibraryImport(event2); listener.handleMessage(event3); listener.handleMessage(event4); listener.handleLibraryImport(event5); final InOrder kwSourceCollectorOrder = inOrder(kwSourceCollector); kwSourceCollectorOrder.verify(kwSourceCollector).collectFromMessageEvent(event1); kwSourceCollectorOrder.verify(kwSourceCollector).collectFromMessageEvent(event3); kwSourceCollectorOrder.verify(kwSourceCollector).collectFromMessageEvent(event4); verifyNoMoreInteractions(kwSourceCollector); final InOrder libNameHandlerOrder = inOrder(libNameHandler); libNameHandlerOrder.verify(libNameHandler).accept("lib2"); libNameHandlerOrder.verify(libNameHandler).accept("lib1"); verifyNoMoreInteractions(libNameHandler); } }
[ "modrz@users.noreply.github.com" ]
modrz@users.noreply.github.com
debe5a4fedfa7a03698b8baeac2380966b25a968
eb9b7c8caef80635b6c1c63d6e1c6cb68c35479a
/Prof Materials/Demo/lesson7/SecurityAuthenticationGroup/src/main/java/edu/mum/service/impl/MemberServiceImpl.java
8a0709a16aeec71204ca96f660d70799b7f8f784
[]
no_license
lukpheakdey/Enterprise-Architecture-EA
55640c34da02a05dc7e1e99f484fcbb132fd4f12
440d7d8ac59f0c778c9d109f2d0f6e1a689384d5
refs/heads/master
2020-06-08T07:26:37.240644
2019-06-22T03:35:00
2019-06-22T03:35:00
193,185,600
1
0
null
null
null
null
UTF-8
Java
false
false
1,716
java
package edu.mum.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import edu.mum.dao.MemberDao; import edu.mum.domain.Member; import edu.mum.service.CredentialsService; @Service @Transactional public class MemberServiceImpl implements edu.mum.service.MemberService { @Autowired private MemberDao memberDao; @Autowired CredentialsService credentialsService; public void saveFull( Member member) { credentialsService.save(member.getUserCredentials()); memberDao.save(member); } public void save( Member member) { memberDao.save(member); } public void update( Member member) { memberDao.update(member); } @PreAuthorize("hasRole('ROLE_ADMIN')") public List<Member> findAll() { return (List<Member>)memberDao.findAll(); } public Member findByMemberNumber(Integer memberId) { return memberDao.findByMemberNumber(memberId); } @PreAuthorize("hasRole('ROLE_SUPER')") public Member findOne(Long id) { return memberDao.findOne(id); } public Member findOneFull(Long id) { Member member = this.findOne(id); // OR "SELECT p FROM Member m JOIN FETCH m.userCredentials WHERE m.id = (:id)" member.getUserCredentials(); return member; } public List<Member> findAllJoinFetch() { return memberDao.findAllJoinFetch(); } @Override public List<Member> findByGraph() { return memberDao.findByGraph(); } }
[ "luk.pheakdey@gmail.com" ]
luk.pheakdey@gmail.com
8d20b9b0c7287623dbcf0a2d903fad3b6fa276a2
286f781f87fcf4bf83cdf7fe01d4ab56f1352595
/src/main/java/behaviorTree/entity/component/AiComponent.java
9e9958411260a58258e6de264589e55d20d78d02
[]
no_license
yutuer/javaFx
0244215ab4916964a7f8090bba3936de67cede31
9a382ebaed021853d653ce65ca8bafcc47119df2
refs/heads/master
2022-10-21T03:38:08.938483
2021-03-02T12:42:02
2021-03-02T12:42:02
166,778,709
0
0
null
2022-10-05T03:20:58
2019-01-21T08:45:09
Java
UTF-8
Java
false
false
643
java
package behaviorTree.entity.component; import behaviorTree.BehaviorTree; import behaviorTree.entity.BehaviourEntity; import behaviorTree.entity.BotBehaviourTreeBuilder; import behaviorTree.ifs.IBehaviourNode; /** * @Description ai组件, 使用行为树来实现 * @Author zhangfan * @Date 2020/11/23 11:03 * @Version 1.0 */ public class AiComponent extends BaseComponent { public BehaviorTree<BehaviourEntity> tree; public AiComponent(BehaviourEntity entity) { super(entity); IBehaviourNode<BehaviourEntity> root = BotBehaviourTreeBuilder.BotBehaviour(); tree = new BehaviorTree<>(root); } }
[ "yutuerzf@163.com" ]
yutuerzf@163.com
81ac38fd96482b7105b53790c8803163f90f7771
d34715aacf99456c37dad669912890e4451d39cd
/abook23Library/src/main/java/com/abook23/utils/task/PauseOnScrollHandler.java
8a8d0d6810bfa42e15b262d8ae9192e3a9441232
[]
no_license
abook23/abook23Library
a20e7ef69ac12498e705c2c7a41c3898844e822e
61132683ca4743939f0ae1ddf291e927aebb65b4
refs/heads/master
2021-01-17T11:38:03.803827
2016-06-28T03:38:59
2016-06-28T03:38:59
62,035,362
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package com.abook23.utils.task; /** * Created by abook23 on 2015/9/7. */ public interface PauseOnScrollHandler { boolean supportPause(); boolean supportResume(); boolean supportCancel(); void pause(); void resume(); void cancel(); boolean isPaused(); boolean isCancelled(); }
[ "abook23@163.com" ]
abook23@163.com
05e8f43d6d1aa05c5dddd5b7001f27843c50705b
73858300b5e04e531738161cbac1f6f4c1f9c5fd
/src/main/java/com/example/designmode/company/strategy/section5/Sub.java
e4e13644a99a13f6a3ab09af0b16f8d8f5061a79
[]
no_license
175272511/spring-boot-demo
37099c8f36133b02bbfb9f48fe20fc21db75aa9d
548c74f4671ea9af8351a6ce8be3936ba6378ee4
refs/heads/master
2023-04-29T09:13:24.603325
2021-09-08T08:44:55
2021-09-08T08:44:55
50,085,429
0
1
null
2023-04-16T23:59:37
2016-01-21T05:51:48
Java
UTF-8
Java
false
false
257
java
package com.example.designmode.company.strategy.section5; /** * @author cbf4Life cbf4life@126.com * I'm glad to share my knowledge with you all. */ public class Sub implements Calculator { //减法 public int exec(int a, int b) { return a-b; } }
[ "liuhui3@meilele.com" ]
liuhui3@meilele.com
023ee70f64c371214a0110aa851d6bb27a9f4ec6
996798b974a225b7f0bcff1eeac64f21c3006e74
/User Mobile App/app/src/main/java/in/techware/lataxicustomer/net/WSAsyncTasks/LandingPageDetailsTask.java
80367a9f3f8600efd7a10e85ba848840fb788112
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
hardikamal/On-Demand-Taxi-Booking-Application
39a9da5623b9afacbda2d7b3bf2adac38810eb46
ba28a9ba6129a502a3f5081d9a999d4b2c2da165
refs/heads/master
2022-11-07T09:57:12.989346
2016-06-22T08:13:00
2016-06-22T08:13:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
package in.techware.lataxicustomer.net.WSAsyncTasks; import android.os.AsyncTask; import java.util.HashMap; import in.techware.lataxicustomer.model.LandingPageBean; import in.techware.lataxicustomer.net.invokers.LandingPageDetailsInvoker; public class LandingPageDetailsTask extends AsyncTask<String, Integer, LandingPageBean> { private LandingPageDetailsTaskListener landingPageDetailsTaskListener; private HashMap<String, String> urlParams; public LandingPageDetailsTask(HashMap<String, String> urlParams) { super(); this.urlParams = urlParams; } @Override protected LandingPageBean doInBackground(String... params) { System.out.println(">>>>>>>>>doInBackground"); LandingPageDetailsInvoker landingPageDetailsInvoker = new LandingPageDetailsInvoker(urlParams, null); return landingPageDetailsInvoker.invokeLandingPageDetailsWS(); } @Override protected void onPostExecute(LandingPageBean result) { if (result != null) landingPageDetailsTaskListener.dataDownloadedSuccessfully(result); else landingPageDetailsTaskListener.dataDownloadFailed(); } public interface LandingPageDetailsTaskListener { void dataDownloadedSuccessfully(LandingPageBean landingPageBean); void dataDownloadFailed(); } public LandingPageDetailsTaskListener getLandingPageDetailsTaskListener() { return landingPageDetailsTaskListener; } public void setLandingPageDetailsTaskListener(LandingPageDetailsTaskListener landingPageDetailsTaskListener) { this.landingPageDetailsTaskListener = landingPageDetailsTaskListener; } }
[ "seumoblondel@gmail.com" ]
seumoblondel@gmail.com
a07cb47a5a4dfcc6c240dc1b89d7af246e32495c
db2d7241afcb02a7de80503bf492fa02251f9018
/services/kms/src/main/java/com/huaweicloud/sdk/kms/v1/model/CancelSelfGrantRequest.java
0ba0e650022553504737bc6805e5c106e6ac13ae
[ "Apache-2.0" ]
permissive
yasuor/huaweicloud-sdk-java-v3
64359e3ab599144d1dc2df08fb15f8e404295be5
3407632f294cdd40a62d4f9167f9708d95464cb8
refs/heads/master
2022-11-23T23:38:12.977127
2020-07-30T08:46:12
2020-07-30T08:46:12
286,420,644
1
0
NOASSERTION
2020-08-10T08:35:22
2020-08-10T08:35:21
null
UTF-8
Java
false
false
2,861
java
package com.huaweicloud.sdk.kms.v1.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.huaweicloud.sdk.kms.v1.model.RevokeGrantReq; import java.util.function.Consumer; import java.util.Objects; /** * Request Object */ public class CancelSelfGrantRequest { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="version_id") private String versionId = "v1.0"; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="body") private RevokeGrantReq body = null; public CancelSelfGrantRequest withVersionId(String versionId) { this.versionId = versionId; return this; } /** * Get versionId * @return versionId */ public String getVersionId() { return versionId; } public void setVersionId(String versionId) { this.versionId = versionId; } public CancelSelfGrantRequest withBody(RevokeGrantReq body) { this.body = body; return this; } public CancelSelfGrantRequest withBody(Consumer<RevokeGrantReq> bodySetter) { if(this.body == null ){ this.body = new RevokeGrantReq(); bodySetter.accept(this.body); } return this; } /** * Get body * @return body */ public RevokeGrantReq getBody() { return body; } public void setBody(RevokeGrantReq body) { this.body = body; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CancelSelfGrantRequest cancelSelfGrantRequest = (CancelSelfGrantRequest) o; return Objects.equals(this.versionId, cancelSelfGrantRequest.versionId) && Objects.equals(this.body, cancelSelfGrantRequest.body); } @Override public int hashCode() { return Objects.hash(versionId, body); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CancelSelfGrantRequest {\n"); sb.append(" versionId: ").append(toIndentedString(versionId)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
91df2d516d1979b023a695a3590800562e5be96c
7db836ec2dd47dc3f6b1dff35aa6d06df18c47b9
/src/main/java/net/imagej/legacy/convert/roi/point/PointRoiWrapper.java
6a5eef9cf7d000e3bd4f2541c8215cf11f29ad1c
[ "BSD-2-Clause" ]
permissive
juglab/imagej-legacy
025063e5996b2cb90b00cadabf96d6136c71e0cc
b4b30dcf8df6b78c4552c5b6f8f98c9d0af1e734
refs/heads/master
2020-04-05T07:32:37.671438
2018-11-07T01:25:52
2018-11-07T01:25:52
156,679,632
0
0
null
2018-11-08T09:09:37
2018-11-08T09:09:36
null
UTF-8
Java
false
false
8,025
java
/* * #%L * ImageJ software for multidimensional image processing and analysis. * %% * Copyright (C) 2009 - 2018 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * #L% */ package net.imagej.legacy.convert.roi.point; import ij.ImagePlus; import ij.gui.PointRoi; import ij.process.FloatPolygon; import java.awt.Polygon; import java.util.ArrayList; import java.util.List; import net.imagej.legacy.convert.roi.IJRealRoiWrapper; import net.imagej.legacy.convert.roi.Rois; import net.imglib2.AbstractRealLocalizable; import net.imglib2.RealLocalizable; import net.imglib2.roi.geom.real.RealPointCollection; import net.imglib2.roi.geom.real.WritableRealPointCollection; /** * Wraps an ImageJ 1.x {@link PointRoi} as an ImgLib2 * {@link RealPointCollection}. * * @author Alison Walter */ public class PointRoiWrapper implements IJRealRoiWrapper<PointRoi>, WritableRealPointCollection<RealLocalizable> { private final PointRoi points; /** * Creates an ImageJ 1.x {@link PointRoi} and wraps it as an ImgLib2 * {@link RealPointCollection}. * * @param x x coordinates of the points * @param y y coordinates of the points * @param numPoints total number of points in the collection */ public PointRoiWrapper(final int[] x, final int[] y, final int numPoints) { this.points = new PointRoi(x, y, numPoints); } /** * Creates an ImageJ 1.x {@link PointRoi} and wraps it as an ImgLib2 * {@link RealPointCollection}. * * @param x x coordinates of the points * @param y y coordinates of the points * @param numPoints total number of points in the collection */ public PointRoiWrapper(final float[] x, final float[] y, final int numPoints) { this.points = new PointRoi(x, y, numPoints); } /** * Creates an ImageJ 1.x {@link PointRoi} and wraps it as an ImgLib2 * {@link RealPointCollection}. * * @param x x coordinates of the points * @param y y coordinates of the points */ public PointRoiWrapper(final float[] x, final float[] y) { points = new PointRoi(x, y); } /** * Creates an ImageJ 1.x {@link PointRoi} and wraps it as an ImgLib2 * {@link RealPointCollection}. * * @param polygon {@link FloatPolygon} whose vertices will be the points * contained in this collection */ public PointRoiWrapper(final FloatPolygon polygon) { points = new PointRoi(polygon); } /** * Creates an ImageJ 1.x {@link PointRoi} and wraps it as an ImgLib2 * {@link RealPointCollection}. * * @param polygon {@link Polygon} whose vertices will be the points contained * in this collection */ public PointRoiWrapper(final Polygon polygon) { points = new PointRoi(polygon); } /** * Creates an ImageJ 1.x {@link PointRoi} and wraps it as an ImgLib2 * {@link RealPointCollection}. * * @param x x coordinate of the point * @param y y coordinate of the point */ public PointRoiWrapper(final int x, final int y) { points = new PointRoi(x, y); } /** * Creates an ImageJ 1.x {@link PointRoi} and wraps it as an ImgLib2 * {@link RealPointCollection}. * * @param x x coordinate of the point * @param y y coordinate of the point */ public PointRoiWrapper(final double x, final double y) { points = new PointRoi(x, y); } /** * Wraps the given ImageJ 1.x {@link PointRoi} as an ImgLib2 * {@link RealPointCollection}. * * @param points {@link PointRoi} to be wrapped */ public PointRoiWrapper(final PointRoi points) { this.points = points; } @Override public boolean test(final RealLocalizable t) { // NB: ImageJ 1.x contains(...) is not used due to the limitations of // integer coordinates. final float xt = t.getFloatPosition(0); final float yt = t.getFloatPosition(1); final float[] x = points.getContainedFloatPoints().xpoints; final float[] y = points.getContainedFloatPoints().ypoints; final int numPoints = points.getNCoordinates(); for (int i = 0; i < numPoints; i++) if (xt == x[i] && yt == y[i]) return true; return false; } @Override public double realMin(final int d) { if (d != 0 && d != 1) throw new IllegalArgumentException( "Invalid dimension " + d); final int numPoints = points.getNCoordinates(); double min = Double.POSITIVE_INFINITY; if (d == 0) { final float[] x = points.getContainedFloatPoints().xpoints; for (int i = 0; i < numPoints; i++) if (x[i] < min) min = x[i]; return min; } final float[] y = points.getContainedFloatPoints().ypoints; for (int i = 0; i < numPoints; i++) if (y[i] < min) min = y[i]; return min; } @Override public double realMax(final int d) { if (d != 0 && d != 1) throw new IllegalArgumentException( "Invalid dimension " + d); final int numPoints = points.getNCoordinates(); double max = Double.NEGATIVE_INFINITY; if (d == 0) { final float[] x = points.getContainedFloatPoints().xpoints; for (int i = 0; i < numPoints; i++) if (x[i] > max) max = x[i]; return max; } final float[] y = points.getContainedFloatPoints().ypoints; for (int i = 0; i < numPoints; i++) if (y[i] > max) max = y[i]; return max; } @Override public Iterable<RealLocalizable> points() { final List<RealLocalizable> pts = new ArrayList<>(); final float[] x = points.getContainedFloatPoints().xpoints; final float[] y = points.getContainedFloatPoints().ypoints; final int numPoints = points.getNCoordinates(); for (int i = 0; i < numPoints; i++) { pts.add(new AbstractRealLocalizable(new double[] { x[i], y[i] }) {}); } return pts; } /** * {@inheritDoc} * <p> * The position of this point will be stored as a {@code float}, which may * result in a loss of precision. * </p> */ @Override public void addPoint(final RealLocalizable point) { points.addPoint(point.getDoublePosition(0), point.getDoublePosition(1)); } /** * {@inheritDoc} * <p> * If there is no {@link ImagePlus} associated with the wrapped * {@link PointRoi}, then an {@code UnsupportedOperationException} will always * be thrown. Otherwise, the point will be removed if it matches any of the * points in the collection. * </p> */ @Override public void removePoint(final RealLocalizable point) { if (points.getImage() != null) { // NB: deleteHandle will remove the point nearest to the given point // if an // exact match is not found. So test that the point is part of the // roi // first. if (test(point)) points.deleteHandle(point.getDoublePosition(0), point .getDoublePosition(1)); } else Rois.unsupported("removePoint"); } @Override public PointRoi getRoi() { return points; } }
[ "ctrueden@wisc.edu" ]
ctrueden@wisc.edu
633ad77ec209a78a9e22500ccf6eb67342e712e8
235dfb33d21d5c1fcbbc3ff450739250c50abbb6
/ode/Development/apps/webapp/ode-core/src/main/java/com/bah/ode/util/CommonUtils.java
65219f6ccb45a9851c6f3e6baf4198e2f201e8c7
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
OSADP/SEMI-ODE
91bf6d32d3f638f8f5a3d5678836a43690f9f9de
37cba20a7a54d891338068c1134c797ae977f279
refs/heads/master
2021-06-18T16:07:35.170019
2017-02-18T20:23:34
2017-02-18T20:23:34
61,062,240
0
0
null
null
null
null
UTF-8
Java
false
false
822
java
package com.bah.ode.util; import java.lang.reflect.Field; import org.apache.spark.SparkConf; import org.slf4j.Logger; import scala.Tuple2; public class CommonUtils { public static long getPidOfProcess(Process p) { long pid = -1; try { if (p.getClass().getName().equals("java.lang.UNIXProcess")) { Field f = p.getClass().getDeclaredField("pid"); f.setAccessible(true); pid = f.getLong(p); f.setAccessible(false); } } catch (Exception e) { pid = -1; } return pid; } public static void logSparkConf(SparkConf conf, Logger logger) { Tuple2<String, String>[] params = conf.getAll(); for (Tuple2<String, String> param : params) { logger.info(param._1 + "=" + param._2); } } }
[ "musavi_hamid@bah.com" ]
musavi_hamid@bah.com
7413b63019cc4c35213f43a3cfb2ab3c22db4ef4
7c20d7db37a629bf859cc1b3f14d5906076c78a4
/src/com/master/ed/Cliente_VendedorRelED.java
9b7e4b5e0b1e4efd636d9d9bf264978ef2a4ebe2
[]
no_license
tbaiocco/nfe4
9055b237338f45afe7ec708c94880cea04887325
8e2416d30797dc8a2b1deaed1633f88ac26b75b2
refs/heads/master
2020-03-24T19:33:25.169266
2018-11-22T18:39:27
2018-11-22T18:39:27
142,933,673
1
0
null
null
null
null
UTF-8
Java
false
false
4,059
java
/* * Created on 25/08/2004 */ package com.master.ed; /** * @author Andre Valadas */ public class Cliente_VendedorRelED extends MasterED{ public static final String LAYOUT_VEND_SIMPLES = "S"; public static final String LAYOUT_VEND_COMPLETO = "C"; public static final String LAYOUT_ROTA = "R"; public static final String ORDENAR_NOME = "N"; public static final String ORDENAR_CODIGO = "C"; private String oid_cliente; private String oid_vendedor; private String cd_cliente; private String cd_vendedor; private String nm_vendedor; private String nm_cliente; private String cd_rota_venda; private String nm_inscricao_estadual; private String nm_cidade; private String nm_endereco; private String nm_bairro; private String nr_cep; private String nr_telefone; /** * @return Returns the nr_telefone. */ public String getNr_telefone() { return nr_telefone; } /** * @param nr_telefone The nr_telefone to set. */ public void setNr_telefone(String nr_telefone) { this.nr_telefone = nr_telefone; } public String getOid_cliente() { return oid_cliente; } public void setOid_cliente(String oid_cliente) { this.oid_cliente = oid_cliente; } public String getOid_vendedor() { return oid_vendedor; } public void setOid_vendedor(String oid_vendedor) { this.oid_vendedor = oid_vendedor; } /** * @return Returns the nm_vendedor. */ public String getNm_vendedor() { return nm_vendedor; } /** * @param nm_vendedor The nm_vendedor to set. */ public void setNm_vendedor(String nm_vendedor) { this.nm_vendedor = nm_vendedor; } /** * @return Returns the cd_cliente. */ public String getCd_cliente() { return cd_cliente; } /** * @param cd_cliente The cd_cliente to set. */ public void setCd_cliente(String cd_cliente) { this.cd_cliente = cd_cliente; } /** * @return Returns the cd_vendedor. */ public String getCd_vendedor() { return cd_vendedor; } /** * @param cd_vendedor The cd_vendedor to set. */ public void setCd_vendedor(String cd_vendedor) { this.cd_vendedor = cd_vendedor; } public String getNm_cliente() { return nm_cliente; } public void setNm_cliente(String nm_cliente) { this.nm_cliente = nm_cliente; } /** * @return Returns the cd_rota_venda. */ public String getCd_rota_venda() { return cd_rota_venda; } /** * @param cd_rota_venda The cd_rota_venda to set. */ public void setCd_rota_venda(String cd_rota_venda) { this.cd_rota_venda = cd_rota_venda; } /** * @return Returns the nm_bairro. */ public String getNm_bairro() { return nm_bairro; } /** * @param nm_bairro The nm_bairro to set. */ public void setNm_bairro(String nm_bairro) { this.nm_bairro = nm_bairro; } /** * @return Returns the nm_cidade. */ public String getNm_cidade() { return nm_cidade; } /** * @param nm_cidade The nm_cidade to set. */ public void setNm_cidade(String nm_cidade) { this.nm_cidade = nm_cidade; } /** * @return Returns the nm_endereco. */ public String getNm_endereco() { return nm_endereco; } /** * @param nm_endereco The nm_endereco to set. */ public void setNm_endereco(String nm_endereco) { this.nm_endereco = nm_endereco; } /** * @return Returns the nm_inscricao_estadual. */ public String getNm_inscricao_estadual() { return nm_inscricao_estadual; } /** * @param nm_inscricao_estadual The nm_inscricao_estadual to set. */ public void setNm_inscricao_estadual(String nm_inscricao_estadual) { this.nm_inscricao_estadual = nm_inscricao_estadual; } /** * @return Returns the nr_cep. */ public String getNr_cep() { return nr_cep; } /** * @param nr_cep The nr_cep to set. */ public void setNr_cep(String nr_cep) { this.nr_cep = nr_cep; } }
[ "teofilo.baiocco@letshare.com" ]
teofilo.baiocco@letshare.com
d781fa8b25eb77d2ba4b090ef8279aaf6358e2d9
547d70d0de48b61b6a1af5b28be13e2997d2551d
/framework/application/engine/sdk/src/test/java/org/ldp4j/application/sdk/CustomTypeObjectFactory.java
d2bf382cfcce59d226ea4d90644baee2778a818b
[ "Apache-2.0" ]
permissive
sreezoro/ldp4j
94224471cfa3458816087cf203e8caf668edfae1
a275c2c039c9de7187c877a361c09bff0c583e10
refs/heads/master
2021-01-15T07:53:16.419033
2015-12-17T13:39:27
2015-12-17T13:39:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,118
java
/** * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * This file is part of the LDP4j Project: * http://www.ldp4j.org/ * * Center for Open Middleware * http://www.centeropenmiddleware.com/ * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * Copyright (C) 2014 Center for Open Middleware. * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * 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. * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * Artifact : org.ldp4j.framework:ldp4j-application-engine-sdk:0.2.0 * Bundle : ldp4j-application-engine-sdk-0.2.0.jar * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# */ package org.ldp4j.application.sdk; /** * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * This file is part of the LDP4j Project: * http://www.ldp4j.org/ * * Center for Open Middleware * http://www.centeropenmiddleware.com/ * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * Copyright (C) 2014 Center for Open Middleware. * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * 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. * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# * Artifact : org.ldp4j.framework:ldp4j-application-engine-sdk:0.2.0-SNAPSHOT * Bundle : ldp4j-application-engine-sdk-0.2.0-SNAPSHOT.jar * #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# */ import org.ldp4j.application.sdk.spi.ObjectFactory; public class CustomTypeObjectFactory implements ObjectFactory<CustomType> { @Override public Class<? extends CustomType> targetClass() { return CustomType.class; } @Override public CustomType fromString(String rawValue) { return CustomType.valueOf(rawValue); } @Override public String toString(CustomType value) { return value.toString(); } }
[ "m.esteban.gutierrez@gmail.com" ]
m.esteban.gutierrez@gmail.com
d388b4999487701e816493ca68753b3feecf96ed
0646a4c3d9e0a496e98911e5670aa40bc1bbaef1
/src/main/java/mcjty/rftools/commands/CommandRftDim.java
e86bd02dd53693a3252ba79195f551a36a7383f4
[ "MIT" ]
permissive
natedogith1/RFTools
d83b93976d4e5517ee607723025bdd9eb57bb55e
7037c6bb796956a2c78fd939b5acab40ad66025e
refs/heads/master
2021-01-14T09:20:06.617605
2015-11-13T05:33:57
2015-11-13T05:33:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
986
java
package mcjty.rftools.commands; public class CommandRftDim extends DefaultCommand { public CommandRftDim() { super(); registerCommand(new CmdListDimensions()); registerCommand(new CmdDelDimension()); registerCommand(new CmdTeleport()); registerCommand(new CmdDumpRarity()); registerCommand(new CmdDumpMRarity()); registerCommand(new CmdListEffects()); registerCommand(new CmdAddEffect()); registerCommand(new CmdDelEffect()); registerCommand(new CmdSetPower()); registerCommand(new CmdInfo()); registerCommand(new CmdReclaim()); registerCommand(new CmdSafeDelete()); registerCommand(new CmdCreateTab()); registerCommand(new CmdRecover()); registerCommand(new CmdSaveDims()); registerCommand(new CmdSaveDim()); registerCommand(new CmdLoadDim()); } @Override public String getCommandName() { return "rftdim"; } }
[ "mcjty1@gmail.com" ]
mcjty1@gmail.com
5fea6fba5d04442f453c5970d9b71a392c66682f
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
/src/modules/agrega/soporte/parseadorXML/src/main/java/es/pode/parseadorXML/castor/ComplexTypeRoleMetaVocabValue.java
f2b41356dcf4922bac96ac3305d3a110289de42c
[]
no_license
nwlg/Colony
0170b0990c1f592500d4869ec8583a1c6eccb786
07c908706991fc0979e4b6c41d30812d861776fb
refs/heads/master
2021-01-22T05:24:40.082349
2010-12-23T14:49:00
2010-12-23T14:49:00
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
4,654
java
/* Agrega es una federación de repositorios de objetos digitales educativos formada por todas las Comunidades Autónomas propiedad de Red.es. Este código ha sido desarrollado por la Entidad Pública Empresarial red.es adscrita al Ministerio de Industria,Turismo y Comercio a través de la Secretaría de Estado de Telecomunicaciones y para la Sociedad de la Información, dentro del Programa Internet en el Aula, que se encuadra dentro de las actuaciones previstas en el Plan Avanza (Plan 2006-2010 para el desarrollo de la Sociedad de la Información y de Convergencia con Europa y entre Comunidades Autónomas y Ciudades Autónomas) y ha sido cofinanciado con fondos FEDER del Programa Operativo FEDER 2000-2006 “Sociedad de la Información” This program is free software: you can redistribute it and/or modify it under the terms of the European Union Public Licence (EUPL v.1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the European Union Public Licence (EUPL v.1.0). You should have received a copy of the EUPL licence along with this program. If not, see http://ec.europa.eu/idabc/en/document/7330. */ /* * This class was automatically generated with * <a href="http://www.castor.org">Castor 1.1</a>, using an XML * Schema. * $Id$ */ package es.pode.parseadorXML.castor; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; /** * Class ComplexTypeRoleMetaVocabValue. * * @version $Revision$ $Date$ */ public class ComplexTypeRoleMetaVocabValue extends RoleMetaValue implements java.io.Serializable { //----------------/ //- Constructors -/ //----------------/ public ComplexTypeRoleMetaVocabValue() { super(); } //-----------/ //- Methods -/ //-----------/ /** * Method isValid. * * @return true if this object is valid according to the schema */ public boolean isValid( ) { try { validate(); } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; } /** * * * @param out * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema */ public void marshal( final java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); } /** * * * @param handler * @throws java.io.IOException if an IOException occurs during * marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling */ public void marshal( final org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, handler); } /** * Method unmarshal. * * @param reader * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema * @return the unmarshaled * es.pode.parseadorXML.castor.RoleMetaValue */ public static es.pode.parseadorXML.castor.RoleMetaValue unmarshal( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (es.pode.parseadorXML.castor.RoleMetaValue) Unmarshaller.unmarshal(es.pode.parseadorXML.castor.ComplexTypeRoleMetaVocabValue.class, reader); } /** * * * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema */ public void validate( ) throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); } }
[ "build@zeno.siriusit.co.uk" ]
build@zeno.siriusit.co.uk
fcc8f7249d7344444da470705d478cb79e67356d
55b37ce3215c99e608d9fba1c404e75300095815
/turing-java/src/main/java/com/turing/java/jvm/concurrent/sync/LockAppend.java
e215f142cf2368d56a84ece144a77d609f85bbd1
[]
no_license
xwzl/turing
278bc98058df37121bc8f3ffceac2431b03f1669
301abe63ba8f617cfa7ff5517817e3415a29eeef
refs/heads/master
2023-04-26T07:53:11.401823
2021-05-21T02:57:17
2021-05-21T02:57:17
285,156,331
0
1
null
null
null
null
UTF-8
Java
false
false
276
java
package com.turing.java.jvm.concurrent.sync; public class LockAppend { StringBuffer stb = new StringBuffer(); private void method() { stb.append("杨过"); stb.append("小龙女"); stb.append("大雕"); stb.append("郭靖"); } }
[ "624244232@qq.com" ]
624244232@qq.com
fc33bf9f3205628d94dc4b4d88d25cec6dd00961
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/vending/h/g.java
583ef3288b6d5d01e3a344db01dbd4b93f7f46c2
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,311
java
package com.tencent.mm.vending.h; import android.os.Looper; import com.tencent.mm.vending.f.a; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import junit.framework.Assert; public class g { private static Map<String, d> uRG = new ConcurrentHashMap(); private static Map<Looper, d> uRH = new HashMap(); private static boolean uRI = false; static { cBN(); } public static void a(String str, d dVar) { Assert.assertNotNull("Scheduler type is null", str); String toUpperCase = str.toUpperCase(); if (uRG.containsKey(toUpperCase)) { IllegalStateException illegalStateException = new IllegalStateException("Fatal error! Duplicate scheduler type " + str.toUpperCase()); } uRG.put(toUpperCase, dVar); if (dVar instanceof h) { synchronized (g.class) { uRH.put(((h) dVar).mLooper, dVar); } } } public static void abF(String str) { uRG.remove(str.toUpperCase()); } public static d abG(String str) { Assert.assertNotNull("Scheduler type is null", str); d dVar = (d) uRG.get(str.toUpperCase()); Assert.assertNotNull("Scheduler type not found: " + str.toUpperCase(), dVar); return dVar; } public static synchronized d cBM() { d cVar; synchronized (g.class) { Looper myLooper = Looper.myLooper(); if (myLooper == null) { a.w("Vending.SchedulerProvider", "This is not a handler thread! %s", Thread.currentThread()); cVar = new c(); } else { cVar = (d) uRH.get(myLooper); if (cVar == null) { cVar = new h(myLooper, myLooper.toString()); uRH.put(myLooper, cVar); } } } return cVar; } static synchronized void cBN() { synchronized (g.class) { if (!uRI) { a.i("Vending.SchedulerProvider", "SchedulerProvider provided.", new Object[0]); uRI = true; a("Vending.UI", d.uRC); a("Vending.LOGIC", d.uRD); a("Vending.HEAVY_WORK", d.uRE); } } } }
[ "707194831@qq.com" ]
707194831@qq.com
5eb126b4b314be8a19d403c008409b3e8d8f7ea2
36032d1bb8f40a4dd7329186628f6f79836eca07
/aliyun-java-sdk-mpaas/src/main/java/com/aliyuncs/mpaas/model/v20201028/DeleteMcdpMaterialRequest.java
b90cf8b4ef7cd307eefc29dd0db81f3097bb310e
[ "Apache-2.0" ]
permissive
aiical/aliyun-openapi-java-sdk
5cd7d509f8df43823bcd826b1b61b419c462c4c5
71e7a7a55f48019bc9f2c6115081cb0d13801205
refs/heads/master
2023-07-07T23:27:20.196222
2021-08-20T06:57:29
2021-08-20T06:57:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,668
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.mpaas.model.v20201028; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.mpaas.Endpoint; /** * @author auto create * @version */ public class DeleteMcdpMaterialRequest extends RpcAcsRequest<DeleteMcdpMaterialResponse> { private String tenantId; private String mpaasMappcenterMcdpMaterialDeleteJsonStr; private String appId; private String workspaceId; public DeleteMcdpMaterialRequest() { super("mPaaS", "2020-10-28", "DeleteMcdpMaterial", "mpaas"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getTenantId() { return this.tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; if(tenantId != null){ putBodyParameter("TenantId", tenantId); } } public String getMpaasMappcenterMcdpMaterialDeleteJsonStr() { return this.mpaasMappcenterMcdpMaterialDeleteJsonStr; } public void setMpaasMappcenterMcdpMaterialDeleteJsonStr(String mpaasMappcenterMcdpMaterialDeleteJsonStr) { this.mpaasMappcenterMcdpMaterialDeleteJsonStr = mpaasMappcenterMcdpMaterialDeleteJsonStr; if(mpaasMappcenterMcdpMaterialDeleteJsonStr != null){ putBodyParameter("MpaasMappcenterMcdpMaterialDeleteJsonStr", mpaasMappcenterMcdpMaterialDeleteJsonStr); } } public String getAppId() { return this.appId; } public void setAppId(String appId) { this.appId = appId; if(appId != null){ putBodyParameter("AppId", appId); } } public String getWorkspaceId() { return this.workspaceId; } public void setWorkspaceId(String workspaceId) { this.workspaceId = workspaceId; if(workspaceId != null){ putBodyParameter("WorkspaceId", workspaceId); } } @Override public Class<DeleteMcdpMaterialResponse> getResponseClass() { return DeleteMcdpMaterialResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
828ac963360634b54635930089547dd299ab44ab
a48f425b9767eff4f2a361e69cc35470a2e95d46
/core/src/main/java/com/qihoo/qsql/codegen/flink/FlinkElasticsearchGenerator.java
9d0e47f1a350306e95d50f3910b2b41553aa3682
[ "MIT" ]
permissive
Functor10/Quicksql
784dad585701ab6c899c57c7fca0a9d2455f5b49
417ce18a6f7b2717be232e2775e736bdf3e5aea0
refs/heads/master
2021-07-04T20:36:37.349765
2020-09-09T14:21:04
2020-09-10T07:48:28
165,583,556
2
1
MIT
2019-03-04T06:35:58
2019-01-14T02:39:50
Java
UTF-8
Java
false
false
583
java
package com.qihoo.qsql.codegen.flink; import com.qihoo.qsql.codegen.QueryGenerator; /** * Code generator, used when {@link com.qihoo.qsql.exec.flink.FlinkPipeline} is chosen and source data of query is in * Elasticsearch at the same time. */ public class FlinkElasticsearchGenerator extends QueryGenerator { @Override protected void importDependency() { } @Override protected void prepareQuery() { } @Override protected void executeQuery() { } @Override public void saveToTempTable() { } }
[ "xushengguo-xy@360.cn" ]
xushengguo-xy@360.cn
0e655c3b49d9cba3b2a29fd5a216f7b89addcd63
79c6e0bddbead42db766bb22cb7315d9ce2d3b6f
/ProjectTest/src/main/java/network/URL/DialogAuthenticator.java
78a70895c8cb07ece001ac0465616590e49f91f5
[]
no_license
LUCKYZHOUSTAR/ProjectTest
6ac1b85c411e27b961b085b24b05f34d25819292
2d67dde598851dca4550fbd123134025405c0c25
refs/heads/master
2021-01-15T15:32:19.218585
2016-08-10T03:00:23
2016-08-10T03:00:23
54,181,033
0
0
null
null
null
null
UTF-8
Java
false
false
3,726
java
package network.URL; import java.awt.Container; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.Authenticator; import java.net.PasswordAuthentication; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; public class DialogAuthenticator extends Authenticator { private JDialog passwordDialog; private JLabel mainLabel = new JLabel("Please enter username and password: "); private JLabel userLabel = new JLabel("Username: "); private JLabel passwordLabel = new JLabel("Password: "); private JTextField usernameField = new JTextField(20); private JPasswordField passwordField = new JPasswordField(20); private JButton okButton = new JButton("OK"); private JButton cancelButton = new JButton("Cancel"); public DialogAuthenticator() { this("", new JFrame()); } public DialogAuthenticator(String username) { this(username, new JFrame()); } public DialogAuthenticator(JFrame parent) { this("", parent); } public DialogAuthenticator(String username, JFrame parent) { this.passwordDialog = new JDialog(parent, true); Container pane = passwordDialog.getContentPane(); pane.setLayout(new GridLayout(4, 1)); pane.add(mainLabel); JPanel p2 = new JPanel(); p2.add(userLabel); p2.add(usernameField); usernameField.setText(username); pane.add(p2); JPanel p3 = new JPanel(); p3.add(passwordLabel); p3.add(passwordField); pane.add(p3); JPanel p4 = new JPanel(); p4.add(okButton); p4.add(cancelButton); pane.add(p4); passwordDialog.pack(); ActionListener al = new OKResponse(); okButton.addActionListener(al); usernameField.addActionListener(al); passwordField.addActionListener(al); cancelButton.addActionListener(new CancelResponse()); } private void show() { String prompt = this.getRequestingPrompt(); if (prompt == null) { String site = this.getRequestingSite().getHostName(); String protocol = this.getRequestingProtocol(); int port = this.getRequestingPort(); if (site != null & protocol != null) { prompt = protocol + "://" + site; if (port > 0) prompt += ":" + port; } else { prompt = ""; } } mainLabel.setText("Please enter username and password for " + prompt + ": "); passwordDialog.pack(); passwordDialog.show(); } PasswordAuthentication response = null; class OKResponse implements ActionListener { public void actionPerformed(ActionEvent e) { passwordDialog.hide(); // The password is returned as an array of // chars for security reasons. char[] password = passwordField.getPassword(); String username = usernameField.getText(); // Erase the password in case this is used again. passwordField.setText(""); response = new PasswordAuthentication(username, password); } } class CancelResponse implements ActionListener { public void actionPerformed(ActionEvent e) { passwordDialog.hide(); // Erase the password in case this is used again. passwordField.setText(""); response = null; } } public PasswordAuthentication getPasswordAuthentication() { this.show(); return this.response; } }
[ "LUCKY@ZHOU" ]
LUCKY@ZHOU
d8cdbb3d1cea4fd661a1a0f19cdaeccb7c107475
8fe50ecb5bf11e264a84d2f80846a9c245f5f678
/app/src/main/java/lekt02_intents/FangBrowserIntent.java
2dd6bd31be89bdbe6f55f265e9ef7f8886f53c12
[ "Apache-2.0" ]
permissive
nordfalk/AndroidElementer
07eea776cf7868909530a7a283859b68469d31a7
c2c53ffd07f83c2747784d6f439ac0fe677a4054
refs/heads/master
2021-06-09T09:22:52.754099
2021-02-07T19:52:59
2021-02-07T19:52:59
99,353,645
2
9
null
null
null
null
UTF-8
Java
false
false
1,382
java
package lekt02_intents; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.text.util.Linkify; import android.webkit.WebView; import android.widget.TextView; import android.widget.Toast; public class FangBrowserIntent extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Tjek om vi er blevet startet med et Intent med en URL, f.eks. som // new Intent(Intent.ACTION_VIEW, Uri.parse("https://javabog.dk/OOP/kapitel3.jsp")); Intent i = getIntent(); String urlFraIntent = i.getDataString(); if (urlFraIntent == null) { TextView tv = new TextView(this); tv.setText("Dette eksempel viser hvordan man fanger et browserintent.\n" + "Gå ind på https://javabog.dk og vælg et kapitel fra grundbogen, " + "f.eks https://javabog.dk/OOP/kapitel3.jsp "); Linkify.addLinks(tv, Linkify.ALL); setContentView(tv); } else { // Ok, der var en URL med i intentet Toast.makeText(this, "AndroidElementer viser\n" + urlFraIntent, Toast.LENGTH_LONG).show(); Toast.makeText(this, "Intent var\n" + i, Toast.LENGTH_LONG).show(); WebView webView = new WebView(this); webView.loadUrl(urlFraIntent); setContentView(webView); } } }
[ "jacob.nordfalk@gmail.com" ]
jacob.nordfalk@gmail.com
062fde00e5e232c0227533592f13c63ce6d5e6c6
f458dc768b285e2c36d873c8fc8d790aadbd5743
/service/implement/src/test/java/com/alonelaval/cornerstone/service/UserServiceTest.java
7d41961873dba602730f23b698f08f8ee6c4dc53
[]
no_license
miraclehjt/cornerstone
faaf3601eec6c0602c8a05613e83e95bc4a7af90
e9c6d0b77aefa6cfd12813013fa3136741872a0c
refs/heads/master
2022-12-27T08:45:35.384218
2020-04-09T04:31:06
2020-04-09T04:31:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,974
java
package com.alonelaval.cornerstone.service; import com.alonelaval.common.page.Page; import com.alonelaval.cornerstone.dao.DaoImplApplication; import com.alonelaval.cornerstone.dao.repository.jpa.JpaApplication; import com.alonelaval.cornerstone.dao.repository.jpa.base.BaseRepositoryImpl; import com.alonelaval.cornerstone.entity.EntityAppllation; import com.alonelaval.cornerstone.entity.biz.User; import com.alonelaval.cornerstone.entity.model.UserModel; import com.alonelaval.cornerstone.servce.impl.ServiceImplApplication; import com.alonelaval.cornerstone.service.user.UserService; import lombok.extern.slf4j.Slf4j; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @author huawei * @create 2018-07-08 **/ @EnableAutoConfiguration @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = {EntityAppllation.class,JpaApplication.class,DaoImplApplication.class,ServiceImplApplication.class}) @EnableJpaRepositories(repositoryBaseClass = BaseRepositoryImpl.class,basePackages = "com.alonelaval.cornerstone.dao.repository") @SpringBootApplication(scanBasePackages="com.alonelaval") @EntityScan("com.alonelaval.cornerstone.entity") @Slf4j public class UserServiceTest { // @Configuration static class ContextConfiguration { @Bean PasswordEncoder passwordEncoder(){ return new BCryptPasswordEncoder(); } } @Autowired UserService userService; @Test public void providesFindOneWithOptional() throws Exception { // User user = User.userBuilder().loginName("11").phone("111").loginPassword("11").userRealName("huawei").build(); // user.setState(State.DELETE); // userService.addUser(user); Page<User> page = userService.findUser(new UserModel(),new Page(10)); System.out.println(page); page = userService.findByModelAndPage(null,new Page(10)); System.out.println(page); // String userId = user.getId(); // user.setUserId(0); // System.out.println(user.getId()); // user.setId(userId); // System.out.println(user.getUserId()); // System.out.println(user.getLastUpdateTime()); } }
[ "huawei@bit-s.cn" ]
huawei@bit-s.cn
86cbc0dcdf3be4879b2f3562de8fb91f39c05786
697bc1c20a33ba0a500b92fc7a9dd4cfeb477746
/src/cn/com/easytaxi/airport/view/ScrollingTextView.java
03cff9c5d17c97e112568aa53c27fdfb5391d3fc
[]
no_license
aitonjiaotong/BaMinGongWuCar
a81a93ac142ac0184ee887509711ad5df0d73924
406763bdc024cfdd32537462e891f2c48c83daf0
refs/heads/master
2020-06-30T18:43:53.571286
2016-08-25T06:19:50
2016-08-25T06:19:50
66,531,360
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package cn.com.easytaxi.airport.view; import android.content.Context; import android.util.AttributeSet; import android.widget.TextView; /** * 跑马灯效果的TextView * @author longhuaiyang * */ public class ScrollingTextView extends TextView { public ScrollingTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public ScrollingTextView(Context context, AttributeSet attrs) { super(context, attrs); } public ScrollingTextView(Context context) { super(context); } /** * 重写此方法:返回true,因为TextView的跑马灯效果是在判断其获取焦点的时候移动 */ @Override public boolean isFocused() { return true; } }
[ "zjb@aiton.com.cn" ]
zjb@aiton.com.cn
3d54b38288c1b7ef904ae2f7379f3fdb1f5a8fe4
c156bf50086becbca180f9c1c9fbfcef7f5dc42c
/src/main/java/com/waterelephant/sctx/controller/BigsFintechController.java
9fd6d1b664479c85e6b1d78da5287519c7242f8a
[]
no_license
zhanght86/beadwalletloanapp
9e3def26370efd327dade99694006a6e8b18a48f
66d0ae7b0861f40a75b8228e3a3b67009a1cf7b8
refs/heads/master
2020-12-02T15:01:55.982023
2019-11-20T09:27:24
2019-11-20T09:27:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,239
java
/** * @author wurenbiao * */ package com.waterelephant.sctx.controller; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.math.NumberUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.alibaba.druid.util.StringUtils; import com.alibaba.fastjson.JSONObject; import com.beadwallet.utils.CommUtils; import com.waterelephant.bjsms.entity.DefaultResponse; import com.waterelephant.entity.BwBigsFintech; import com.waterelephant.sctx.entity.SctxResponse; import com.waterelephant.sctx.service.IBigsFintechService; import com.waterelephant.service.IBigsFintechSqlService; @Controller @RequestMapping("/bigsfintech") public class BigsFintechController{ private static Logger logger = LoggerFactory.getLogger(BigsFintechController.class); @Autowired private IBigsFintechService bigsfintechserviceimpl; @Autowired private IBigsFintechSqlService bigsfintechsqlserviceimpl; @ResponseBody @RequestMapping(value = "/getApply.do",method=RequestMethod.POST) public DefaultResponse getApply(HttpServletRequest request){ String method_name = getClass().getName().concat("register.do"); DefaultResponse response = null; String mobile = request.getParameter("mobile"); String order_id = request.getParameter("order_id"); String borrower_id = request.getParameter("borrower_id"); try { if(CommUtils.isNull(mobile)){ throw new IllegalArgumentException("缺少必填字段或填入值为空"); } Assert.isTrue(CommUtils.validate(3, mobile),"请填写正确的手机号码格式!!!!!"); Assert.isTrue(NumberUtils.isNumber(mobile),"mobile的值必须为数字类型"); if(!CommUtils.isNull(order_id)){ Assert.isTrue(NumberUtils.isNumber(order_id),"order_id的值必须为数字类型"); } if(!CommUtils.isNull(borrower_id)){ Assert.isTrue(NumberUtils.isNumber(borrower_id),"borrower_id的值必须为数字类型"); } String resp = bigsfintechserviceimpl.saveApplyInfo(mobile, order_id, borrower_id); if(!StringUtils.isEmpty(resp)){ JSONObject res = JSONObject.parseObject(resp); if(res.getString("resCode").equals("0000")){ response = new SctxResponse("0000","请求成功",res.getString("phone_apply")); }else{ response = new DefaultResponse("600","请求失败"); } }else{ response = new DefaultResponse("700","请求结果为空"); } }catch (IllegalArgumentException e) { response = new DefaultResponse("900",e.getMessage()); } catch (Exception e) { logger.error("请求{}接口,系统异常:{}",method_name,e.getMessage()); return new DefaultResponse("800", "调用接口异常"); } return response; } @ResponseBody @RequestMapping(value = "/getApplyV1.do",method=RequestMethod.POST) public DefaultResponse getApplyV1(HttpServletRequest request){ String method_name = getClass().getName().concat("getApplyV1.do"); DefaultResponse response = null; String mobile = request.getParameter("mobile"); String order_id = request.getParameter("order_id"); String borrower_id = request.getParameter("borrower_id"); try { Assert.hasText(mobile, "缺少必填字段[mobile]为空"); // if(CommUtils.isNull(mobile)){ // throw new IllegalArgumentException("缺少必填字段或填入值为空"); // } // Assert.isTrue(NumberUtils.isNumber(mobile),"mobile的值必须为数字类型"); // Assert.isTrue(CommUtils.validate(3, mobile),"请填写正确的手机号码格式!!!!!"); // if(!CommUtils.isNull(order_id)){ // Assert.isTrue(NumberUtils.isNumber(order_id),"order_id的值必须为数字类型"); // } // if(!CommUtils.isNull(borrower_id)){ // Assert.isTrue(NumberUtils.isNumber(borrower_id),"borrower_id的值必须为数字类型"); // } // TODO 从数据库获取 网贷平台注册数(1周内有效) BwBigsFintech fintech = bigsfintechsqlserviceimpl.selectPhoneQueryTotal(mobile, order_id, borrower_id); // TODO 如果数据取不到,就去调用SDK获取,存数据并返回~ if(!CommUtils.isNull(fintech)){ response = new SctxResponse("0000","请求成功",fintech.getPhoneApply()); }else{ String resp = bigsfintechserviceimpl.saveApplyInfo(mobile, order_id, borrower_id); if(!StringUtils.isEmpty(resp)){ JSONObject res = JSONObject.parseObject(resp); if(res.getString("resCode").equals("0000")){ response = new SctxResponse("0000","请求成功",res.getString("phone_apply")); }else{ response = new DefaultResponse("600","请求失败"); } }else{ response = new DefaultResponse("700","请求结果为空"); } } }catch (IllegalArgumentException e) { response = new DefaultResponse("900",e.getMessage()); } catch (Exception e) { logger.error("请求{}接口,系统异常:{}",method_name,e.getMessage()); return new DefaultResponse("800", "调用接口异常"); } return response; } }
[ "wurenbiao@beadwallet.com" ]
wurenbiao@beadwallet.com
af45c8e5d91ab2b7862d76e1d1579acd3a75470e
bdb04dac99fffedc003e28fdec46e31d5b246f9c
/work_java/hw_java_0717_정준호/src/com/java/first/Compute.java
cc3139d9c199d9a2b04c2a160c7c609292284ff5
[]
no_license
JeongJunHo/java
bef5d546e9a050255db007700e54da933aaa0e19
e8274a58ef9e444ff35ef2747622bc3601a9b3ac
refs/heads/master
2020-09-22T03:30:02.247923
2019-11-30T15:34:04
2019-11-30T15:34:04
225,032,053
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.java.first; import java.util.Scanner; public class Compute { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num1 = sc.nextInt(); int num2 = sc.nextInt(); int multi = num1 * num2; int div = num1 / num2; System.out.println("곱=" + multi); System.out.println("몫=" + div); } }
[ "jjh49470826@gmail.com" ]
jjh49470826@gmail.com
35da851ae20bcb33722e7a6690d9d26cc13cb47e
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/codeInspection/redundantLambdaParameterType/InferredFromOtherArgs_after.java
5f24cd9ac9365d2f74cf6721d1ecd06212fe6cda
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
275
java
// "Remove redundant types" "true" class ReturnTypeCompatibility { interface I1<L> { L m(L x); } static <P> void call(P p, I1<P> i2) { i2.m(null); } public static void main(String[] args) { call("", i -> /*comment*/ ""); } }
[ "anna.kozlova@jetbrains.com" ]
anna.kozlova@jetbrains.com
815ae10e605bc1a9e1c4c70d2bf05f8a4f1ebe3b
42ed12696748a102487c2f951832b77740a6b70d
/Mage.Sets/src/mage/sets/dragonsmaze/RakdosDrake.java
2cf1ed0f429a270cf6c3027cd9e498b1f7322d17
[]
no_license
p3trichor/mage
fcb354a8fc791be4713e96e4722617af86bd3865
5373076a7e9c2bdabdabc19ffd69a8a567f2188a
refs/heads/master
2021-01-16T20:21:52.382334
2013-05-09T21:13:25
2013-05-09T21:13:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,182
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``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 BetaSteward_at_googlemail.com 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. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.sets.dragonsmaze; import java.util.UUID; import mage.Constants; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.UnleashAbility; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.ControllerPredicate; /** * * @author LevelX2 */ public class RakdosDrake extends CardImpl<RakdosDrake> { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other creatures you control"); static { filter.add(new AnotherPredicate()); filter.add(new ControllerPredicate(Constants.TargetController.YOU)); } public RakdosDrake (UUID ownerId) { super(ownerId, 28, "Rakdos Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.expansionSetCode = "DGM"; this.subtype.add("Drake"); this.color.setBlack(true); this.power = new MageInt(1); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // Unleash this.addAbility(new UnleashAbility()); } public RakdosDrake (final RakdosDrake card) { super(card); } @Override public RakdosDrake copy() { return new RakdosDrake(this); } }
[ "ludwig.hirth@online.de" ]
ludwig.hirth@online.de
086d13d5f1e0ed9a9c308647ca45a8000ee3c424
3d268e0080aa43e23cade269f5854f95e407133d
/processor/src/main/java/org/treblereel/gwt/crysknife/annotation/Generator.java
62d7bcf0cb6f204e4e2793f413bfcf5bdf081e5f
[]
no_license
baldram/crysknife
eeae29025347f91a2fe4177818ccb2b340efe0ae
b5179822072e4db5c115a7103d67453846f0b9b6
refs/heads/master
2020-09-21T12:44:13.035111
2019-11-25T20:38:28
2019-11-25T20:38:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
524
java
package org.treblereel.gwt.crysknife.annotation; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import static java.lang.annotation.RetentionPolicy.SOURCE; /** * @author Dmitrii Tikhomirov * Created by treblereel 3/2/19 */ @Target({TYPE}) @Retention(RUNTIME) @Documented public @interface Generator { int priority() default 10000; }
[ "chani@me.com" ]
chani@me.com
a66a106560f5fbfa6079aa827775e343eef2c396
b22a26199fefbfd40f7b1e918b728a800f564f51
/clasfx/src/main/java/org/clas12/fx/ui/UIExperience.java
e6c5b6318b11b3f8b19ebc124d94367c72990eb5
[]
no_license
wphelps/clas12
e3a6c307df5e56e20343c4197f304fe114e803e4
b429f8598331be1c23ca48c2d5583de465e29e92
refs/heads/master
2020-05-29T11:57:02.055519
2016-07-09T20:31:40
2016-07-09T20:31:40
55,807,936
0
1
null
2016-04-08T20:31:33
2016-04-08T20:31:32
null
UTF-8
Java
false
false
922
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 org.clas12.fx.ui; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; /** * * @author gavalian */ public class UIExperience extends Application { @Override public void start(Stage stage) throws Exception { Group root = new Group(); // Tests On Particle Pane ParticlePane pane = new ParticlePane(); root.getChildren().add(pane.getPane()); //-------------------------------- Scene scene = new Scene(root, 800, 700); stage.setTitle("My JavaFX Application"); stage.setScene(scene); stage.show(); } public static void main(String[] args){ launch(args); } }
[ "gavalian@meson.jlab.org" ]
gavalian@meson.jlab.org
db1b95c959dbd23092cf02ec6fcfd70484a00f41
f4707d50e8ecb894c57adbb4a24bf8c2534a8106
/基础语法/src/com/jerry/struct/SwitchDemo01.java
a47cdbb2c2daef401932ef82c4ebce35d64dad75
[]
no_license
Jasonpyt/JavaSE
86a0a36297e65d47eb2624926b7f95dacc1b822b
7dad2a32360d01a4fb0bffd037d6fd6f4c5f7cc5
refs/heads/master
2023-03-09T08:06:11.848578
2021-02-28T03:49:20
2021-02-28T03:49:20
302,519,029
0
0
null
null
null
null
UTF-8
Java
false
false
750
java
package com.jerry.struct; /** * @ClassName SwitchDemo01 * @Description TOOO * @Author 34678 * @Date 2020/10/7 14:01 * @Version 1.0 **/ public class SwitchDemo01 { public static void main(String[] args) { //swithc case char grade = 'C'; switch (grade){ case 'A': System.out.println("优秀"); break; case 'B': System.out.println("良好"); break; case 'C': System.out.println("及格"); break; case 'D': System.out.println("不及格"); break; default: System.out.println("不合法!!"); } } }
[ "346785150@qq.com" ]
346785150@qq.com
428636c860bf3a8cfc744392bd70bf76acd461ef
2221cc76af6d26b9dcc49c0722a4a577601692e3
/Egbert/Algorithm/Algorithm/src/BFST/ConnectLevelOrderSiblingsII.java
e3a66fe58d46df2903faee5f6957034081cbbaea
[]
no_license
hanrick2000/A-Record-of-My-Problem-Solving-Journey
f8cca769ce08f0b1cd9ab36abcb4f7c8b91ba591
1b9326adcf61eacf0649bc4724b11d8259a79621
refs/heads/master
2022-02-24T03:09:54.644809
2019-09-24T18:32:53
2019-09-24T18:32:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,430
java
package BFST; import java.util.ArrayDeque; import java.util.Queue; /** * @leetcode https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/ * @author Egbert Li * @date 8/7/2019 * @Time O N * @Space O 1 */ public class ConnectLevelOrderSiblingsII { // Solution 1: O N, O 1 Space public static void connect(TreeNode root) { TreeNode dummyHead = new TreeNode(-1); TreeNode current = null; while (root != null) { current = dummyHead; while (root != null) { if (root.left != null) { current.next = root.left; current = current.next; } if (root.right != null) { current.next = root.right; current = current.next; } root = root.next; } root = dummyHead.next; dummyHead.next = null; } } public static void main(String[] args) { TreeNode root = new TreeNode(12); root.left = new TreeNode(7); root.right = new TreeNode(1); root.left.left = new TreeNode(9); root.right.left = new TreeNode(10); root.right.right = new TreeNode(5); ConnectLevelOrderSiblings.connect(root); System.out.println("Level order traversal using 'next' pointer: "); root.printLevelOrder(); } }
[ "egbert1121@gmail.com" ]
egbert1121@gmail.com
f9a3d0dcbd8b536fe781609a1207f0aea6dd282a
37d8b470e71ea6edff6ed108ffd2b796322b7943
/joffice/src/com/htsoft/oa/dao/archive/impl/ArchivesDepDaoImpl.java
972aa21541229a4529993f29e1c28375de573491
[]
no_license
haifeiforwork/myfcms
ef9575be5fc7f476a048d819e7c0c0f2210be8ca
fefce24467df59d878ec5fef2750b91a29e74781
refs/heads/master
2020-05-15T11:37:50.734759
2014-06-28T08:31:55
2014-06-28T08:31:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package com.htsoft.oa.dao.archive.impl; import com.htsoft.core.dao.impl.BaseDaoImpl; import com.htsoft.oa.dao.archive.ArchivesDepDao; import com.htsoft.oa.model.archive.ArchivesDep; public class ArchivesDepDaoImpl extends BaseDaoImpl<ArchivesDep> implements ArchivesDepDao { public ArchivesDepDaoImpl() { super(ArchivesDep.class); } }
[ "xiacc1984@gmail.com@c1c2bf6e-ae9d-b823-7fc2-ff1dc594729e" ]
xiacc1984@gmail.com@c1c2bf6e-ae9d-b823-7fc2-ff1dc594729e
496772ed27e4afe4e43148b8aad618c706bdfc1c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_a70b879c7a7f9b3c6f0875fd342e9a65b6d191d8/SearchBoxController/18_a70b879c7a7f9b3c6f0875fd342e9a65b6d191d8_SearchBoxController_t.java
7ec21cda5b86d454b8e2346ebba63504d30fc501
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,721
java
/* * * */ package adg.red.controllers; import adg.red.models.Course; import adg.red.models.Section; import adg.red.models.User; import adg.red.session.Context; import adg.red.utils.ViewLoader; import adg.red.locale.LocaleManager; import adg.red.models.skeleton.ILocalizable; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.ResourceBundle; import java.util.logging.Level; import java.util.logging.Logger; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; /** * FXML Controller class for SearchBox.fxml * <p/> * @author harsimran.maan */ public class SearchBoxController implements Initializable, ILocalizable { @FXML private Button btnGo; @FXML private Label lblSearch; @FXML private TextField txtSearch; public void localize() { lblSearch.setText(LocaleManager.get(25) + ":"); btnGo.setText(LocaleManager.get(26)); } /** * Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { localize(); } /** * Search the input keywords. Can only search by department, course number * and instructor name. * <p/> * @param event */ @FXML private void search(ActionEvent event) throws Exception { Context.getInstance().setSearching(true); Context.getInstance().setSearchResultList(new ArrayList()); String keywords[] = txtSearch.getText().trim().split(" "); int courseNumber = 0; String deptId = ""; for (int i = 0; i < keywords.length; i++) { try { courseNumber = Integer.parseInt(keywords[i]); } catch (NumberFormatException e) { deptId = keywords[i]; } } // search both course number and deptId if (courseNumber != 0 && !deptId.equalsIgnoreCase("")) { Context.getInstance().setSearchResultList(Course.getByDepartmentIdAndCourseNumber(deptId, courseNumber)); } // search only depId else if (courseNumber == 0 && !deptId.equalsIgnoreCase("")) { if (deptId.length() <= 4) { Context.getInstance().setSearchResultList(Course.getByDepartmentId(deptId)); } else { List<User> users = null; try { users = User.getUserByFirstName(deptId); } catch (Exception ex) { try { users = User.getUserByLastName(deptId); } catch (Exception ex1) { } } if (users != null) { try { ArrayList<Section> sections = new ArrayList(); for (User user : users) { sections.addAll(Section.getByFacultyMemberId(user.getFacultyMember())); } if (!sections.isEmpty()) { ArrayList<Course> courseList = new ArrayList(); for (Section sec : sections) { if (!courseList.contains(sec.getCourse())) { courseList.add(sec.getCourse()); } } Context.getInstance().setSearchResultList(courseList); } } catch (Exception ex) { Logger.getLogger(SearchBoxController.class.getName()).log(Level.WARNING, null, ex); } } } } // search only course number else if (courseNumber != 0 && deptId.equalsIgnoreCase("")) { Context.getInstance().setSearchResultList(Course.getCourseByCourseNumer(courseNumber)); } ViewLoader view = new ViewLoader(Context.getInstance().getDisplayView()); view.loadView("student/CourseListView"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d90fb8388d58ebae60670d2dcaeb1eba9033aa8a
a7b868c8c81984dbcb17c1acc09c0f0ab8e36c59
/src/main/java/com/alipay/api/response/AlipayInsDataDiseaseIdentifyResponse.java
f40c099b9cc0cb8ee4ad0ee54ae3c8c9dade04db
[ "Apache-2.0" ]
permissive
1755616537/alipay-sdk-java-all
a7ebd46213f22b866fa3ab20c738335fc42c4043
3ff52e7212c762f030302493aadf859a78e3ebf7
refs/heads/master
2023-02-26T01:46:16.159565
2021-02-02T01:54:36
2021-02-02T01:54:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,172
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ins.data.disease.identify response. * * @author auto create * @since 1.0, 2021-02-01 13:54:42 */ public class AlipayInsDataDiseaseIdentifyResponse extends AlipayResponse { private static final long serialVersionUID = 1294397828549432638L; /** * 疾病标准编码 */ @ApiField("disease_code") private String diseaseCode; /** * 疾病标准名称 */ @ApiField("disease_name") private String diseaseName; /** * 疾病标签 */ @ApiField("disease_tag") private String diseaseTag; public void setDiseaseCode(String diseaseCode) { this.diseaseCode = diseaseCode; } public String getDiseaseCode( ) { return this.diseaseCode; } public void setDiseaseName(String diseaseName) { this.diseaseName = diseaseName; } public String getDiseaseName( ) { return this.diseaseName; } public void setDiseaseTag(String diseaseTag) { this.diseaseTag = diseaseTag; } public String getDiseaseTag( ) { return this.diseaseTag; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
6f75661d9684ad5319771ae55fbda06b17e412c6
e7658e4a4bed0e1aecfc6dcb20ff6c46530b465d
/app/src/main/java/com/eip/red/caritathelp/Presenters/SubMenu/MyEvents/IOnMyEventsFinishedListener.java
b0f4627c8fc834452962f3e1df2fd083a95daf09
[]
no_license
Caritathelp/caritathelp-android
844ef0b95b1b36f2a9357a31e68e92e63bf92c5e
5fcbc2d49b07ebd0056b1923772c80b90ccb10a4
refs/heads/master
2021-01-18T16:22:16.721296
2016-12-08T11:57:13
2016-12-08T11:57:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package com.eip.red.caritathelp.Presenters.SubMenu.MyEvents; import com.eip.red.caritathelp.Models.Organisation.Event; import com.eip.red.caritathelp.Models.Organisation.Organisation; import java.util.List; /** * Created by pierr on 18/03/2016. */ public interface IOnMyEventsFinishedListener { void onDialog(String title, String msg, boolean isSwipeRefresh); void onSuccessGetMyEventsInit(List<Event> events, boolean owner); void onSuccessGetMyEvents(List<Event> events, boolean swipeRefresh); void onSuccessGetMyOrganisations(List<Organisation> organisations); }
[ "pierre.enjalbert@epitech.eu" ]
pierre.enjalbert@epitech.eu
cba773745648c3014ae9efd63455cd54233d9ec8
6a94bda5d11eb4887fc90cff81c6c220dd848fcd
/rxutil/src/main/java/com/xuexiang/rxutil/lifecycle/LifecycleV4Fragment.java
0814ef1e42b0c9e60d339cf17323d242f7ec1b9b
[]
no_license
xuexiangjys/RxUtil
ad93f961af80465f028a53064e4a8194979c7ac2
d651cadcfc1fae314b24215088532a8e947616d2
refs/heads/master
2021-10-11T12:00:56.076152
2019-01-25T14:33:42
2019-01-25T14:33:42
123,368,857
35
5
null
null
null
null
UTF-8
Java
false
false
2,158
java
package com.xuexiang.rxutil.lifecycle; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import rx.Observable; import rx.subjects.BehaviorSubject; /** * 用于添加到Activity中的Fragment,使得和activity的生命周期同步,从而间接绑定了activity的生命周期 * * @author xuexiang * @since 2018/6/11 上午1:01 */ public class LifecycleV4Fragment extends Fragment implements LifecycleManager { private final BehaviorSubject<ActivityLifecycle> mLifecycleSubject; public LifecycleV4Fragment() { mLifecycleSubject = BehaviorSubject.create(); } @Override public void onCreate(@Nullable Bundle savedInstanceState) { mLifecycleSubject.onNext(ActivityLifecycle.onCreate); super.onCreate(savedInstanceState); } @Override public void onStart() { mLifecycleSubject.onNext(ActivityLifecycle.onStart); super.onStart(); } @Override public void onResume() { mLifecycleSubject.onNext(ActivityLifecycle.onResume); super.onResume(); } @Override public void onPause() { mLifecycleSubject.onNext(ActivityLifecycle.onPause); super.onPause(); } @Override public void onStop() { mLifecycleSubject.onNext(ActivityLifecycle.onStop); super.onStop(); } @Override public void onDestroy() { mLifecycleSubject.onNext(ActivityLifecycle.onDestroy); super.onDestroy(); } @Override public Observable<ActivityLifecycle> getActivityLifecycle() { return mLifecycleSubject.asObservable(); } @Override public <T> LifecycleTransformer<T> bindToActivityLifecycle(final ActivityLifecycle activityLifecycle) { return new LifecycleTransformer<>(mLifecycleSubject, activityLifecycle); } @Override public <T> LifecycleTransformer<T> bindToLifecycle() { return new LifecycleTransformer<>(mLifecycleSubject); } @Override public <T> LifecycleTransformer<T> bindOnDestroy() { return bindToActivityLifecycle(ActivityLifecycle.onDestroy); } }
[ "xuexiangjys@163.com" ]
xuexiangjys@163.com
051a30dd5b45aece5bdd7f00a4964911c19630be
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/mockito--mockito/bfce585f089d373a20a435d6c93c40afe389430c/before/AtLeastXNumberOfInvocationsChecker.java
47280a663e0175b8511b2c4a1030b6b932f7c0d5
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,230
java
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.verification.checkers; import java.util.List; import org.mockito.exceptions.Reporter; import org.mockito.exceptions.base.HasStackTrace; import org.mockito.internal.invocation.Invocation; import org.mockito.internal.invocation.InvocationMatcher; import org.mockito.internal.invocation.InvocationsFinder; public class AtLeastXNumberOfInvocationsChecker { private final Reporter reporter = new Reporter(); private final InvocationsFinder finder = new InvocationsFinder(); public void check(List<Invocation> invocations, InvocationMatcher wanted, int wantedCount) { List<Invocation> actualInvocations = finder.findInvocations(invocations, wanted); int actualCount = actualInvocations.size(); if (wantedCount > actualCount) { HasStackTrace lastInvocation = finder.getLastStackTrace(actualInvocations); reporter.tooLittleActualInvocations(new AtLeastDiscrepancy(wantedCount, actualCount), wanted, lastInvocation); } for (Invocation i : actualInvocations) { i.markVerified(); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
d21e928f0ba588dd54af4593a30cc637e3f81ed9
de7c91011f287f6a4a54ffbc04e17f0dc32ae9ff
/app/src/main/java/com/br/reserva_prototipo/session/SessionManager.java
ccf1385ebf5a576ac720fa4f6053688249464b29
[]
no_license
MarioJunio/RESERVANDO-PROTOTIPO
8d394a6c2d4de6875f3d14e8c5eb2de0a3f46556
c07aa9c23437b9f318efc22392eb1817f8b00635
refs/heads/master
2020-12-30T13:21:03.457120
2017-05-13T21:36:15
2017-05-13T21:36:15
91,204,040
0
0
null
null
null
null
UTF-8
Java
false
false
2,087
java
package com.br.reserva_prototipo.session; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import com.br.reserva_prototipo.activity.Login; /** * Created by MarioJ on 08/07/16. */ public class SessionManager { public static final String PREF_SESSION = "SESSION"; public static final String SESSION_IDENTIFIER = "AUTH-SESSION-ID"; public static final String SESSION_TOKEN = "AUTH-SESSION-TOKEN"; private static SharedPreferences preferences; private static SharedPreferences.Editor editor; private static void instance(Context context) { preferences = context.getSharedPreferences(PREF_SESSION, Context.MODE_PRIVATE); editor = preferences.edit(); } public static void createLoginSession(Context context, String sessionId, String sessionToken) { instance(context); editor.putString(SESSION_IDENTIFIER, sessionId); editor.putString(SESSION_TOKEN, sessionToken); editor.commit(); } public static void checkLogin(Context context) { instance(context); // checa se o sessionid é vazio, se sim então não está logado if (preferences.getString(SESSION_IDENTIFIER, "").isEmpty() || preferences.getString(SESSION_TOKEN, "").isEmpty()) redirectToLogin(context); } public static void logout(Context context) { instance(context); editor.clear().commit(); redirectToLogin(context); } public static String readLoginSessionIdentifier(Context context) { instance(context); return preferences.getString(SESSION_IDENTIFIER, ""); } public static String readLoginSessionToken(Context context) { instance(context); return preferences.getString(SESSION_TOKEN, ""); } private static void redirectToLogin(Context context) { Intent i = new Intent(context, Login.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); } }
[ "mario.mj.95@gmail.com" ]
mario.mj.95@gmail.com
c41c5ecab7c7aee456d69ca4ed4fff3fa82bbc57
8f3633a215fc69bb7402c13b57f48e8b21fc1829
/ch13Interfaces/src/com/coderbd/interfaces/other/ex4/Dog.java
de7f334b2a1639ae3939876351a31b53239e5885
[]
no_license
springapidev/Java-8
44c167c2ef607de135b83de44c42943a317870f0
6801f2f003631c10fcb39c899443ec5b6cc11752
refs/heads/master
2021-06-06T12:25:16.111508
2020-02-23T08:51:28
2020-02-23T08:51:28
145,200,749
10
11
null
null
null
null
UTF-8
Java
false
false
303
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 com.coderbd.day8.interfaces.ex4; /** * * @author Instructor */ public interface Dog { void bark(); }
[ "springapidev@gmail.com" ]
springapidev@gmail.com
112bc7fc690a78853451cbf400f06a0cb8362631
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_cfr/com/google/protobuf/EnumOrBuilder.java
04f5d19b0dc6918ada9d8b5599c64f601c800e84
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,155
java
/* * Decompiled with CFR 0_115. */ package com.google.protobuf; import com.google.protobuf.ByteString; import com.google.protobuf.EnumValue; import com.google.protobuf.EnumValueOrBuilder; import com.google.protobuf.MessageOrBuilder; import com.google.protobuf.Option; import com.google.protobuf.OptionOrBuilder; import com.google.protobuf.SourceContext; import com.google.protobuf.SourceContextOrBuilder; import java.util.List; public interface EnumOrBuilder extends MessageOrBuilder { public String getName(); public ByteString getNameBytes(); public List getEnumvalueList(); public EnumValue getEnumvalue(int var1); public int getEnumvalueCount(); public List getEnumvalueOrBuilderList(); public EnumValueOrBuilder getEnumvalueOrBuilder(int var1); public List getOptionsList(); public Option getOptions(int var1); public int getOptionsCount(); public List getOptionsOrBuilderList(); public OptionOrBuilder getOptionsOrBuilder(int var1); public boolean hasSourceContext(); public SourceContext getSourceContext(); public SourceContextOrBuilder getSourceContextOrBuilder(); }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
da41aeca47f8c896efda7a6472a8b902d312ccbb
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XCOMMONS-1057-7-15-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/job/AbstractJob_ESTest.java
9a433eb68c9b9db62c0648362b65142dbbd8fecd
[]
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
542
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 11:11:57 UTC 2020 */ package org.xwiki.job; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
e51c45974b878029a470f7cc98f88c284271ac3c
f62b80bf6a8df55c83f035e79639ef279c677d01
/src/main/java/com/ringcentral/definitions/IVRMenuListInfo.java
aed3fd40af2de6cc957a80312872cbeaa0471b81
[]
no_license
ringcentral/ringcentral-java
2776c83b7ec822b2ac01b8abed6a29e9d288d9da
b0fb081ffa48151d1a9b72517d2a5144a41144a5
refs/heads/master
2023-09-01T19:01:31.720178
2023-08-21T20:51:29
2023-08-21T20:51:29
55,440,696
17
27
null
2023-08-21T20:27:22
2016-04-04T20:00:47
Java
UTF-8
Java
false
false
1,052
java
package com.ringcentral.definitions; public class IVRMenuListInfo { /** * Internal identifier of an IVR Menu extension * Example: 7258440006 */ public String id; /** * Link to an IVR Menu extension resource * Format: uri * Example: https://api-example.rincentral.com/restapi/v1.0/account/5936989006/ivr-menus/7258440006 */ public String uri; /** * First name of an IVR Menu user * Example: IVR Menu 1001 */ public String name; /** * Number of an IVR Menu extension * Example: 1001 */ public String extensionNumber; public IVRMenuListInfo id(String id) { this.id = id; return this; } public IVRMenuListInfo uri(String uri) { this.uri = uri; return this; } public IVRMenuListInfo name(String name) { this.name = name; return this; } public IVRMenuListInfo extensionNumber(String extensionNumber) { this.extensionNumber = extensionNumber; return this; } }
[ "tyler4long@gmail.com" ]
tyler4long@gmail.com
87412b4578e51a0ca65c3fe6e1e6d84f7e989ae5
0eee1968138e463b5567b6caa7310561ac92c00e
/spring-boot-actuator/spring-boot-actuator-intro/actuator-1x/src/main/java/com/ymmihw/spring/boot/actuator1/CustomEndpoint.java
59c2f7af042a4012c31b869459c373c2385bcd7e
[]
no_license
ymmihw/spring-boot
3f68f11b49cff59e45220d12d416679a06e4c29f
01a7219e2a9925e94cb33efeeb2d8bbe386b4332
refs/heads/master
2023-02-09T02:10:54.306721
2023-01-31T06:43:59
2023-01-31T06:43:59
132,859,297
0
0
null
2023-01-31T06:44:00
2018-05-10T06:38:05
Java
UTF-8
Java
false
false
726
java
package com.ymmihw.spring.boot.actuator1; import java.util.ArrayList; import java.util.List; import org.springframework.boot.actuate.endpoint.Endpoint; import org.springframework.stereotype.Component; @Component public class CustomEndpoint implements Endpoint<List<String>> { @Override public String getId() { return "customEndpoint"; } @Override public boolean isEnabled() { return true; } @Override public boolean isSensitive() { return true; } @Override public List<String> invoke() { // Custom logic to build the output List<String> messages = new ArrayList<String>(); messages.add("This is message 1"); messages.add("This is message 2"); return messages; } }
[ "whimmy@126.com" ]
whimmy@126.com
1a0b80e7d89bed876b4f4e8e82763c1066f6ce3c
637b5525c9314bf3d430a037144f2e0f027681ab
/trunk/kalkulator.java
9fd2d09c7b3399b369a6752f6eda7507a746d851
[]
no_license
BGCX262/zukihold13-svn-to-git
b3a528698ce2d5ab12ee32f2dc0a9f619a279f29
12c919e829fac7bcfd7f5fba4d2d506bbb1a7029
refs/heads/master
2016-09-05T17:35:33.520493
2015-08-23T06:54:19
2015-08-23T06:54:19
41,310,334
0
0
null
null
null
null
UTF-8
Java
false
false
1,401
java
import java.util.Scanner; public class kalkulator { public static void main(String[] args){ int pil; double bil1, bil2, hasil; Scanner input = new Scanner(System.in); System.out.println("Kalkulator"); System.out.println("================"); System.out.println("1. Penambahan"); System.out.println("2. Pengurangan"); System.out.println("3. Perkalian"); System.out.println("4. Pembagian"); System.out.println("================"); System.out.printf("Masukkan Pilihan Anda : "); pil=input.nextInt(); System.out.printf("Masukkan Bilangan pertama : "); bil1=input.nextDouble(); System.out.printf("Masukkan Bilangan kedua : "); bil2=input.nextDouble(); switch(pil) { case 1: hasil = bil1 + bil2; System.out.printf("Hasil dari penambahan adalah " +hasil); break; case 2: hasil = bil1 - bil2; System.out.printf("Hasil dari pengurangan adalah " +hasil); break; case 3: hasil = bil1 * bil2; System.out.printf("Hasil dari perkalian adalah " +hasil); break; case 4: hasil = bil1 / bil2; System.out.printf("Hasil dari pembagian adalah " +hasil); break; default: System.out.println("Maaf, pilihan yang Anda Masukkan salah"); } } }
[ "you@example.com" ]
you@example.com
0e0b79ee08487e54f0678d7e9783b45ba68f775b
bd7ec3a3cee7bbfbd1ef126037d92f8cf2fbee0c
/solifeAdmin/src/com/cartmatic/estore/system/dao/StoreDao.java
beaec1bda2fd9c7d7fa7c03f165d33b2e7ade190
[]
no_license
1649865412/solifeAdmin
eef96d47b0ed112470bc7c44647c816004240a8d
d45d249513379e1d93868fbcebf6eb61acd08999
refs/heads/master
2020-06-29T03:38:44.894919
2015-06-26T06:53:37
2015-06-26T06:53:37
38,095,812
2
3
null
null
null
null
UTF-8
Java
false
false
238
java
package com.cartmatic.estore.system.dao; import com.cartmatic.estore.common.model.system.Store; import com.cartmatic.estore.core.dao.GenericDao; /** * Dao interface for Store. */ public interface StoreDao extends GenericDao<Store> { }
[ "1649865412@qq.com" ]
1649865412@qq.com
4eb6276a78d7a6f325d32c81477cf580bf1030d8
967502523508f5bb48fdaac93b33e4c4aca20a4b
/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/transform/DeleteIdentitiesResultJsonUnmarshaller.java
590ec65a6eff068b460e99ced2d220edb5b90c72
[ "Apache-2.0", "JSON" ]
permissive
hanjk1234/aws-sdk-java
3ac0d8a9bf6f7d9bf1bc5db8e73a441375df10c0
07da997c6b05ae068230401921860f5e81086c58
refs/heads/master
2021-01-17T18:25:34.913778
2015-10-23T03:20:07
2015-10-23T03:20:07
44,951,249
1
0
null
2015-10-26T06:53:25
2015-10-26T06:53:24
null
UTF-8
Java
false
false
3,066
java
/* * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.cognitoidentity.model.transform; import java.util.Map; import java.util.Map.Entry; import com.amazonaws.services.cognitoidentity.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * DeleteIdentitiesResult JSON Unmarshaller */ public class DeleteIdentitiesResultJsonUnmarshaller implements Unmarshaller<DeleteIdentitiesResult, JsonUnmarshallerContext> { public DeleteIdentitiesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DeleteIdentitiesResult deleteIdentitiesResult = new DeleteIdentitiesResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) return null; while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("UnprocessedIdentityIds", targetDepth)) { context.nextToken(); deleteIdentitiesResult .setUnprocessedIdentityIds(new ListUnmarshaller<UnprocessedIdentityId>( UnprocessedIdentityIdJsonUnmarshaller .getInstance()).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals( currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return deleteIdentitiesResult; } private static DeleteIdentitiesResultJsonUnmarshaller instance; public static DeleteIdentitiesResultJsonUnmarshaller getInstance() { if (instance == null) instance = new DeleteIdentitiesResultJsonUnmarshaller(); return instance; } }
[ "aws@amazon.com" ]
aws@amazon.com
69be0fb575e37c021975f1134e2be921f22d5707
851580a361b7b4b2a638cf5166ef28e477e02caa
/src/main/java/ru/javawebinar/topjava/web/meal/MealRestController.java
620b69d3a68794ff0a0f23f4a37003d8c877c41e
[]
no_license
isokolov/topjava
b666afc65275565208bfa56c9dd8b7c4b380730d
d62f91bd4b515fc3de60d999465a6b74fbff0fe2
refs/heads/master
2020-05-24T21:34:59.217507
2019-09-15T14:58:28
2019-09-15T14:58:28
187,478,540
0
0
null
2019-05-19T13:13:04
2019-05-19T13:13:03
null
UTF-8
Java
false
false
2,395
java
package ru.javawebinar.topjava.web.meal; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import ru.javawebinar.topjava.View; import ru.javawebinar.topjava.model.Meal; import ru.javawebinar.topjava.to.MealTo; import java.net.URI; import java.time.LocalDate; import java.time.LocalTime; import java.util.List; @RestController @RequestMapping(value = MealRestController.REST_URL, produces = MediaType.APPLICATION_JSON_VALUE) public class MealRestController extends AbstractMealController { static final String REST_URL = "/rest/profile/meals"; @Override @GetMapping("/{id}") public Meal get(@PathVariable int id) { return super.get(id); } @Override @DeleteMapping("/{id}") @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable int id) { super.delete(id); } @Override @GetMapping public List<MealTo> getAll() { return super.getAll(); } @Override @PutMapping(value = "/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void update(@Validated(View.Web.class) @RequestBody Meal meal, @PathVariable int id) { super.update(meal, id); } @PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Meal> createWithLocation(@Validated(View.Web.class) @RequestBody Meal meal) { Meal created = super.create(meal); URI uriOfNewResource = ServletUriComponentsBuilder.fromCurrentContextPath() .path(REST_URL + "/{id}") .buildAndExpand(created.getId()).toUri(); return ResponseEntity.created(uriOfNewResource).body(created); } @Override @GetMapping(value = "/filter") public List<MealTo> getBetween( @RequestParam(required = false) LocalDate startDate, @RequestParam(required = false) LocalTime startTime, @RequestParam(required = false) LocalDate endDate, @RequestParam(required = false) LocalTime endTime) { return super.getBetween(startDate, startTime, endDate, endTime); } }
[ "illya.sokolov82@gmail.com" ]
illya.sokolov82@gmail.com
8ba394a0ffde03796075d7b0bafee5294aaec99c
858761a5810934c51cb0987903f3f97f161bc4a6
/branches/SAK-13408/api-k2/src/main/java/org/sakaiproject/site/api/Group.java
645dd7c7f19440953be649992464b3cb991faf30
[]
no_license
svn2github/sakai-kernel
f10821d51e39651788c97e1d2739f762c25e79de
2b97c9b7ad53becc8de57a5233c7d35873edd10d
refs/heads/master
2020-04-14T21:44:05.973159
2014-12-23T21:38:01
2014-12-23T21:38:01
10,166,725
1
0
null
null
null
null
UTF-8
Java
false
false
1,875
java
/********************************************************************************** * $URL$ * $Id$ *********************************************************************************** * * Copyright 2005, 2006, 2008 Sakai 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.osedu.org/licenses/ECL-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.sakaiproject.site.api; import java.io.Serializable; import org.sakaiproject.authz.api.AuthzGroup; import org.sakaiproject.entity.api.Edit; /** * <p> * A Site Group is a way to divide up a Site into separate units, each with its own authorization group and descriptive information. * </p> */ public interface Group extends Edit, Serializable, AuthzGroup { /** @return a human readable short title of this group. */ String getTitle(); /** @return a text describing the group. */ String getDescription(); /** * Access the site in which this group lives. * * @return the site in which this group lives. */ public Site getContainingSite(); /** * Set the human readable short title of this group. * * @param title * The new title. */ void setTitle(String title); /** * Set the text describing this group. * * @param description * The new description. */ void setDescription(String description); }
[ "matthew@longsight.com@66ffb92e-73f9-0310-93c1-f5514f145a0a" ]
matthew@longsight.com@66ffb92e-73f9-0310-93c1-f5514f145a0a
317d3f1b128acc2b6331c182aac3fbf1c1de2b8d
5585d7f4a78f5158121e0d0ec127427e888f3ca7
/generator/src/test/java/org/stjs/generator/lib/string/String2.java
10165ab668b8bc5b68b3a575ee1b480a023d6d47
[ "Apache-2.0" ]
permissive
mcanthony/st-js
d22076cc029326da07170d13aaf74a18faddd416
27b78d8197d19d07bcf3b8fbb2b5ade6097c9dab
refs/heads/master
2020-12-11T07:38:18.725689
2015-10-21T10:17:36
2015-10-21T10:17:36
45,141,051
2
0
null
2015-10-28T20:51:14
2015-10-28T20:51:14
null
UTF-8
Java
false
false
156
java
package org.stjs.generator.lib.string; public class String2 { public static boolean main(String[] args) { return "abc".startsWith("bc", 1); } }
[ "ax.craciun@gmail.com" ]
ax.craciun@gmail.com
9410f80add4629d5971a5453f51ca024943ef4f5
3221b6bc93eea51d46d9baec8b76ac6f24b90313
/Studio/plugins/com.wizzer.mle.studio.dwp/src/java/com/wizzer/mle/studio/dwp/ui/DwpIntArrayPropertyCellEditor.java
e679fdeb26380aeb4af75b51cf122c28c5a95573
[ "MIT" ]
permissive
magic-lantern-studio/mle-studio
67224f61d0ba8542b39c4a6ed6bd65b60beab15d
06520cbff5b052b98c7280f51f25e528b1c98b64
refs/heads/master
2022-01-12T04:11:56.033265
2022-01-06T23:40:11
2022-01-06T23:40:11
128,479,137
0
0
null
null
null
null
UTF-8
Java
false
false
5,299
java
/* * DwpIntArrayPropertyCellEditor.java */ // COPYRIGHT_BEGIN // // The MIT License (MIT) // // Copyright (c) 2000-2020 Wizzer Works // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // // COPYRIGHT_END // Declare package. package com.wizzer.mle.studio.dwp.ui; // Import Eclipse classes. import org.eclipse.swt.widgets.Composite; import com.wizzer.mle.studio.framework.attribute.Attribute; import com.wizzer.mle.studio.dwp.attribute.DwpIntArrayPropertyAttribute; import com.wizzer.mle.studio.dwp.attribute.DwpNameTypeValueAttribute; /** * @author Mark S. Millard */ public class DwpIntArrayPropertyCellEditor extends DwpNameTypeValueCellEditor { /** * A constructor that creates its controls under the specified <code>Composite</code> parent. * * @param parent The parent <code>Composite</code> in the display hierarchy. */ public DwpIntArrayPropertyCellEditor(Composite parent) { super(parent); } /** * A constructor that creates its controls under the specified <code>Composite</code> parent * with the specified style. * * @param parent The parent <code>Composite</code> in the display hierarchy. * @param style The style to use for the new editor component. */ public DwpIntArrayPropertyCellEditor(Composite parent, int style) { super(parent, style); } /** * Sets the <code>DwpIntArrayPropertyAttribute</code> for the editor. * * @param attr A reference to the <code>DwpIntArrayPropertyAttribute</code> to use with the * editor. * * @see com.wizzer.mle.studio.framework.ui.AttributeCellEditor#setAttribute(com.wizzer.mle.studio.framework.attribute.Attribute) */ public void setAttribute(Attribute attr) { if (! (attr instanceof DwpIntArrayPropertyAttribute)) System.out.println("XXX: Throw An Exception!"); else m_attribute = (DwpNameTypeValueAttribute)attr; //String val = attr.toString(); String valueName = ((DwpIntArrayPropertyAttribute)attr).getValueName(); String valueType = ((DwpIntArrayPropertyAttribute)attr).getValueType(); Integer[] valueValue = (Integer[])((DwpIntArrayPropertyAttribute)attr).getValueValue(); String name = attr.getName(); int bits = attr.getBits(); // Set the value of the CellEditor. m_nameText.setVisible(bits != 0); m_nameText.setText(valueName); m_typeText.setVisible(bits != 0); m_typeText.setText(valueType); StringBuffer strBuf = new StringBuffer(); strBuf.append("["); for (int i = 0; i < valueValue.length; i++) { strBuf.append(" "); strBuf.append(valueValue[i]); if (i != (valueValue.length - 1)) strBuf.append(" ,"); } strBuf.append(" ]"); m_valueText.setText(strBuf.toString()); // Set read only state. if (attr.isReadOnly()) { m_nameText.setEnabled(false); m_typeText.setEnabled(false); m_valueText.setEnabled(false); } else { m_nameText.setEnabled(true); m_nameText.selectAll(); m_nameText.setFocus(); m_typeText.setEnabled(true); m_valueText.setEnabled(true); } // Update label and tool tip. if (! m_label.isDisposed()) { m_label.setText(name); m_label.setToolTipText("String [" + attr.getName() + "] - bits = " + attr.getBits() + " - value = " + ((DwpNameTypeValueAttribute)attr).getValue()); } } /** * Returns whether the value of this cell editor has changed since the * last call to <code>setValue</code>. * * @return <code>true</code> is returned if the value has changed, * and <code>false</code> is returned if the value is unchanged. */ public boolean isDirty() { boolean dirty = false; if (! ((String)m_nameText.getText()).equals(m_attribute.getValueName())) dirty = true; else if (! ((String)m_typeText.getText()).equals(m_attribute.getValueType())) dirty = true; else { Integer[] intValue = (Integer[])(m_attribute.getValueValue()); StringBuffer strBuf = new StringBuffer(); strBuf.append("["); for (int i = 0; i < intValue.length; i++) { strBuf.append(" "); strBuf.append(intValue[i]); if (i != (intValue.length - 1)) strBuf.append(" ,"); } strBuf.append(" ]"); if (! ((String)m_valueText.getText()).equals(strBuf.toString())) dirty = true; } return dirty; } }
[ "msm@wizzerworks.com" ]
msm@wizzerworks.com
f2843153a132eecfeff41406947c2550102ec41c
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/premium/model/VipPurchaseQAItem.java
e2eea83f29c44890aa21faddbb9dd48d5dc3b6a0
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
264
java
package com.zhihu.android.premium.model; import com.fasterxml.jackson.p518a.JsonProperty; public class VipPurchaseQAItem { @JsonProperty(mo29184a = "jump_url") public String jumpUrl; @JsonProperty(mo29184a = "question") public String question; }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
3fdd9b62edff37991574dea1e1d4bf45d2ad882e
8afb5afd38548c631f6f9536846039ef6cb297b9
/MY_REPOS/INTERVIEW-PREP-COMPLETE/notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/__MY_OPRIGINAL_DS/_Extra-Practice/08_greedy_algorithms/java/01_set_covering/src/SetCovering.java
c9cbff646869650c86cda473ad80429228b4dff7
[ "MIT" ]
permissive
bgoonz/UsefulResourceRepo2.0
d87588ffd668bb498f7787b896cc7b20d83ce0ad
2cb4b45dd14a230aa0e800042e893f8dfb23beda
refs/heads/master
2023-03-17T01:22:05.254751
2022-08-11T03:18:22
2022-08-11T03:18:22
382,628,698
10
12
MIT
2022-10-10T14:13:54
2021-07-03T13:58:52
null
UTF-8
Java
false
false
1,449
java
import java.util.*; public class SetCovering { public static void main(String... args) { var statesNeeded = new HashSet<>(Arrays.asList("mt", "wa", "or", "id", "nv", "ut", "ca", "az")); var stations = new LinkedHashMap<String, Set<String>>(); stations.put("kone", new HashSet<>(Arrays.asList("id", "nv", "ut"))); stations.put("ktwo", new HashSet<>(Arrays.asList("wa", "id", "mt"))); stations.put("kthree", new HashSet<>(Arrays.asList("or", "nv", "ca"))); stations.put("kfour", new HashSet<>(Arrays.asList("nv", "ut"))); stations.put("kfive", new HashSet<>(Arrays.asList("ca", "az"))); var finalStations = new HashSet<String>(); while (!statesNeeded.isEmpty()) { String bestStation = null; var statesCovered = new HashSet<String>(); for (var station : stations.entrySet()) { var covered = new HashSet<>(statesNeeded); covered.retainAll(station.getValue()); if (covered.size() > statesCovered.size()) { bestStation = station.getKey(); statesCovered = covered; } } statesNeeded.removeIf(statesCovered::contains); if (bestStation != null) { finalStations.add(bestStation); } } System.out.println(finalStations); // [ktwo, kone, kthree, kfive] } }
[ "bryan.guner@gmail.com" ]
bryan.guner@gmail.com
beb5c65ab1b09ef3be05848fa882207aa7437bd4
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/huawei/android/widget/loader/PluginContextWrapper.java
544aa2638ba9087b0caf2fd769a0d2e288eff10b
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
870
java
package huawei.android.widget.loader; import android.content.Context; import android.content.ContextWrapper; import android.content.res.Resources; import android.content.res.Resources.Theme; public class PluginContextWrapper extends ContextWrapper { private Resources mResource; private Theme mTheme; public PluginContextWrapper(Context base) { super(base); this.mResource = ResLoader.getInstance().getResources(base); this.mTheme = ResLoader.getInstance().getTheme(base); } public Resources getResources() { return this.mResource; } public Theme getTheme() { return this.mTheme; } public Object getSystemService(String name) { if (name.equals("layout_inflater")) { return new PluginLayoutInflater(this); } return super.getSystemService(name); } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
83b7c3edf002e416f4765c187702d605de0be051
862f8509b973a8c81adc10ba29d840a4ba70a815
/Back to Basics Approach 3rd Edition/chapter4_conditionals/Ex4_5_pow.java
2ab10399a211a3eb2ff9057cc864974a7bbc68c7
[ "MIT" ]
permissive
Alex-Golub/various-books-exercise-solutions
183ad2a48ef3ac368549b5f92c9aa87a5a9044f0
2d61e3e2593cec549fe14ef21f675fdd14c906d9
refs/heads/master
2023-07-23T14:34:40.393166
2023-07-21T20:23:25
2023-07-22T09:49:48
273,867,210
7
4
null
null
null
null
UTF-8
Java
false
false
837
java
package chapter4_conditionals; /** * 5. Write a method called pow that accepts a base and an exponent as * parameters and returns the base raised to the given power. * For example, the call pow(3, 4) should return 3 * 3 * 3 * 3, or 81. * Assume that the base and exponent are nonnegative. * * @author Mr.Dr.Professor * @since 10-Dec-20 1:46 PM */ class Ex4_5_pow { public static void main(String[] args) { for (int i = 0; i < 10; i++) { int rnd = (int) (Math.random() * 1_000); int b = rnd % 10; int e = rnd / 10 % 10; System.out.printf("%d^%d = %,d\n", b, e, pow(b, e)); } } public static int pow(int b, int e) { if (b == 0 && e == 0) throw new IllegalArgumentException("0^0 = UNDEFINED"); int res = 1; for (int i = 0; i < e; i++) res *= b; return res; } }
[ "55350522+Alex-Golub@users.noreply.github.com" ]
55350522+Alex-Golub@users.noreply.github.com
c8bc65fb609b847ccfca30f9d06646c3337a7174
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
/src/main/java/com/alipay/api/response/KoubeiRetailWmsInboundorderQueryResponse.java
d78add6e29e0aa8be3322cdecd52f36d3477fbea
[ "Apache-2.0" ]
permissive
cc-shifo/alipay-sdk-java-all
38b23cf946b73768981fdeee792e3dae568da48c
938d6850e63160e867d35317a4a00ed7ba078257
refs/heads/master
2022-12-22T14:06:26.961978
2020-09-23T04:00:10
2020-09-23T04:00:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,330
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.InboundOrderLine; import com.alipay.api.domain.InboundOrderVO; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.retail.wms.inboundorder.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiRetailWmsInboundorderQueryResponse extends AlipayResponse { private static final long serialVersionUID = 5694792915178428587L; /** * 入库通知单明细列表 */ @ApiListField("inbound_order_line_list") @ApiField("inbound_order_line") private List<InboundOrderLine> inboundOrderLineList; /** * 入库通知单信息 */ @ApiField("inbound_order_vo") private InboundOrderVO inboundOrderVo; public void setInboundOrderLineList(List<InboundOrderLine> inboundOrderLineList) { this.inboundOrderLineList = inboundOrderLineList; } public List<InboundOrderLine> getInboundOrderLineList( ) { return this.inboundOrderLineList; } public void setInboundOrderVo(InboundOrderVO inboundOrderVo) { this.inboundOrderVo = inboundOrderVo; } public InboundOrderVO getInboundOrderVo( ) { return this.inboundOrderVo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
697225675e16ba17273b4aa3010243464bada623
3937a9df4304746ba684880acf1fdd3fe0c50a44
/src/main/java/com/vgtech/auditapp/service/InventorySupplierDetailsService.java
dd958a6e3aa64e2516902c617cbeaa21188b30bc
[]
no_license
SunnyTechV/AuditAppV1
5832248368b0dfe91a4470ac61fd2eebc788df86
9b5b88fdf9f69093190eb73103b8efa3a2196db1
refs/heads/main
2023-08-05T05:29:09.440556
2021-09-23T11:18:09
2021-09-23T11:18:09
409,558,457
0
0
null
2021-09-23T11:18:10
2021-09-23T11:10:57
null
UTF-8
Java
false
false
4,034
java
package com.vgtech.auditapp.service; import com.vgtech.auditapp.domain.InventorySupplierDetails; import com.vgtech.auditapp.repository.InventorySupplierDetailsRepository; import com.vgtech.auditapp.service.dto.InventorySupplierDetails; import com.vgtech.auditapp.service.mapper.InventorySupplierDetailsMapper; import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * Service Implementation for managing {@link InventorySupplierDetails}. */ @Service @Transactional public class InventorySupplierDetailsService { private final Logger log = LoggerFactory.getLogger( InventorySupplierDetailsService.class ); private final InventorySupplierDetailsRepository inventorySupplierDetailsRepository; private final InventorySupplierDetailsMapper inventorySupplierDetailsMapper; public InventorySupplierDetailsService( InventorySupplierDetailsRepository inventorySupplierDetailsRepository, InventorySupplierDetailsMapper inventorySupplierDetailsMapper ) { this.inventorySupplierDetailsRepository = inventorySupplierDetailsRepository; this.inventorySupplierDetailsMapper = inventorySupplierDetailsMapper; } /** * Save a inventorySupplierDetails. * * @param inventorySupplierDetails the entity to save. * @return the persisted entity. */ public InventorySupplierDetails save( InventorySupplierDetails inventorySupplierDetails ) { log.debug( "Request to save InventorySupplierDetails : {}", inventorySupplierDetails ); InventorySupplierDetails inventorySupplierDetails = inventorySupplierDetailsMapper.toEntity( inventorySupplierDetails ); inventorySupplierDetails = inventorySupplierDetailsRepository.save(inventorySupplierDetails); return inventorySupplierDetailsMapper.toDto(inventorySupplierDetails); } /** * Partially update a inventorySupplierDetails. * * @param inventorySupplierDetails the entity to update partially. * @return the persisted entity. */ public Optional<InventorySupplierDetails> partialUpdate( InventorySupplierDetails inventorySupplierDetails ) { log.debug( "Request to partially update InventorySupplierDetails : {}", inventorySupplierDetails ); return inventorySupplierDetailsRepository .findById(inventorySupplierDetails.getId()) .map(existingInventorySupplierDetails -> { inventorySupplierDetailsMapper.partialUpdate( existingInventorySupplierDetails, inventorySupplierDetails ); return existingInventorySupplierDetails; }) .map(inventorySupplierDetailsRepository::save) .map(inventorySupplierDetailsMapper::toDto); } /** * Get all the inventorySupplierDetails. * * @param pageable the pagination information. * @return the list of entities. */ @Transactional(readOnly = true) public Page<InventorySupplierDetails> findAll(Pageable pageable) { log.debug("Request to get all InventorySupplierDetails"); return inventorySupplierDetailsRepository .findAll(pageable) .map(inventorySupplierDetailsMapper::toDto); } /** * Get one inventorySupplierDetails by id. * * @param id the id of the entity. * @return the entity. */ @Transactional(readOnly = true) public Optional<InventorySupplierDetails> findOne(Long id) { log.debug("Request to get InventorySupplierDetails : {}", id); return inventorySupplierDetailsRepository .findById(id) .map(inventorySupplierDetailsMapper::toDto); } /** * Delete the inventorySupplierDetails by id. * * @param id the id of the entity. */ public void delete(Long id) { log.debug("Request to delete InventorySupplierDetails : {}", id); inventorySupplierDetailsRepository.deleteById(id); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
4d5f9bf7f6892a6c917f9431be296afea1961e7e
475695fce8249e4f17c0ea31e2e9d52697b79f7f
/src/test/java/com/hwz/hadoop/HDFSApi1.java
5d281372fa0e4b18f287671be14fa3ed8039ac7d
[]
no_license
ZhangZaipeng/hdfsapi
9a7fa62c354e8aa1a15ff465aa435441738df321
586743012b65638406f9e1c048f92dac58199513
refs/heads/master
2021-01-15T08:14:05.764157
2017-08-18T08:55:12
2017-08-18T08:55:12
99,560,417
0
0
null
null
null
null
UTF-8
Java
false
false
4,478
java
package com.hwz.hadoop; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IOUtils; import java.io.IOException; import java.io.InputStream; /** * Created by ZhangZaipeng on 2017/8/7 0007. * 尹 */ public class HDFSApi1 { //创建新文件 public static void createFile(String dst , byte[] contents) throws IOException { Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(conf); Path dstPath = new Path(dst); //目标路径 //打开一个输出流 FSDataOutputStream outputStream = fs.create(dstPath); outputStream.write(contents); outputStream.close(); fs.close(); System.out.println("文件创建成功!"); } //上传本地文件 public static void uploadFile(String src,String dst) throws IOException{ Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(conf); Path srcPath = new Path(src); //原路径 Path dstPath = new Path(dst); //目标路径 //调用文件系统的文件复制函数,前面参数是指是否删除原文件,true为删除,默认为false fs.copyFromLocalFile(false,srcPath, dstPath); //打印文件路径 System.out.println("Upload to "+conf.get("fs.default.name")); System.out.println("------------list files------------"+"\n"); FileStatus [] fileStatus = fs.listStatus(dstPath); for (FileStatus file : fileStatus) { System.out.println(file.getPath()); } fs.close(); } //文件重命名 public static void rename(String oldName,String newName) throws IOException{ Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(conf); Path oldPath = new Path(oldName); Path newPath = new Path(newName); boolean isok = fs.rename(oldPath, newPath); if(isok){ System.out.println("rename ok!"); }else{ System.out.println("rename failure"); } fs.close(); } //删除文件 public static void delete(String filePath) throws IOException{ Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(conf); Path path = new Path(filePath); boolean isok = fs.deleteOnExit(path); if(isok){ System.out.println("delete ok!"); }else{ System.out.println("delete failure"); } fs.close(); } //创建目录 public static void mkdir(String path) throws IOException{ Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(conf); Path srcPath = new Path(path); boolean isok = fs.mkdirs(srcPath); if(isok){ System.out.println("create dir ok!"); }else{ System.out.println("create dir failure"); } fs.close(); } //读取文件的内容 public static void readFile(String filePath) throws IOException{ Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(conf); Path srcPath = new Path(filePath); InputStream in = null; try { in = fs.open(srcPath); IOUtils.copyBytes(in, System.out, 4096, false); //复制到标准输出流 } finally { IOUtils.closeStream(in); } } public static void main(String[] args) throws IOException { //测试上传文件 //uploadFile("/home/hadoop/music1.txt","hdfs://master:9000/user/hadoop/test.txt"); //测试创建文件 //byte[] contents = "hello world 世界你好\n".getBytes(); //createFile("hdfs://master:9000/user/hadoop/test1/d.txt",contents); //测试重命名 //rename("hdfs://master:9000/user/hadoop/test1/d.txt", "hdfs://master:9000/user/hadoop/test1/dd.txt"); //测试删除文件 //delete("hdfs://master:9000/user/hadoop/test1/d.txt"); //使用相对路径 //delete("hdfs://master:9000/user/hadoop/test1"); //删除目录 //测试新建目录 // mkdir("hdfs://master:9000/user/hadoop/test1"); //测试读取文件 //readFile("hdfs://master:9000/user/hadoop/test1/d.txt"); } }
[ "you@example.com" ]
you@example.com
708c7a95ae4f35a5d525744ac297018573e8c131
fde12555b15598267c8042deea260e841f4b93a0
/06 - Spring Data/13 - Exam/Exam-RealDeal/src/main/java/softuni/exam/models/entities/Offer.java
3ebbac60dd3eb4146ede32ca4deeed51c17f6749
[]
no_license
elenaborisova/SoftUni-Java-Web-Developer-Path
de4cc3c0bb85784815246f23c186aff3f56cc4e8
49b435de458df4d89fcb88742ce96461c325270e
refs/heads/master
2023-07-14T21:10:46.689598
2021-09-03T13:06:28
2021-09-03T13:06:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,775
java
package softuni.exam.models.entities; import javax.persistence.Entity; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.Table; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Set; @Entity @Table public class Offer extends BaseEntity { private LocalDateTime addedOn; private String description; private Boolean hasGoldStatus; private BigDecimal price; private Car car; private Seller seller; private Set<Picture> pictures; public Offer() { } public LocalDateTime getAddedOn() { return addedOn; } public void setAddedOn(LocalDateTime addedOn) { this.addedOn = addedOn; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Boolean getHasGoldStatus() { return hasGoldStatus; } public void setHasGoldStatus(Boolean hasGoldStatus) { this.hasGoldStatus = hasGoldStatus; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } @ManyToOne public Car getCar() { return car; } public void setCar(Car car) { this.car = car; } @ManyToOne public Seller getSeller() { return seller; } public void setSeller(Seller seller) { this.seller = seller; } @ManyToMany(mappedBy = "offers", targetEntity = Picture.class) public Set<Picture> getPictures() { return pictures; } public void setPictures(Set<Picture> pictures) { this.pictures = pictures; } }
[ "p.bozidarova@gmail.com" ]
p.bozidarova@gmail.com
8265671eafe09ada1c1602a02d60b9e899527a72
c39cd76699b393a049b1e924a0cac53f024ba5ad
/src/lli/Comments/RevisedComment.java
82762bbcd1d71399b4fb6ca1174d5277a7f8252f
[]
no_license
duranto2009/btcl-automation
402f26dc6d8e745c0e8368c946f74a5eab703015
33ffa0b8e488d6a0d13c8f08e6b8058fe1b4764b
refs/heads/master
2022-02-27T07:38:19.181886
2019-09-18T10:42:21
2019-09-18T10:42:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
package lli.Comments; import annotation.ColumnName; import annotation.PrimaryKey; import annotation.TableName; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @TableName("at_lli_connection_revise_client_comments") @Getter @Setter @NoArgsConstructor public class RevisedComment { @PrimaryKey @ColumnName("id") long id; @ColumnName("userID") long userID; @ColumnName("stateID") long stateID; @ColumnName("applicationID") long applicationID; @ColumnName("sequenceID") long sequenceID; @ColumnName("comments") String comments; @ColumnName("submissionDate") long submissionDate; }
[ "shariful.bony@gmail.com" ]
shariful.bony@gmail.com
1bbd002749e468f19838065361db17088b2bd3b3
4627d514d6664526f58fbe3cac830a54679749cd
/results/evosuite5/lang-org.apache.commons.lang3.time.DurationFormatUtils-16/org/apache/commons/lang3/time/DurationFormatUtils_ESTest_scaffolding.java
f1cbc0ef85d3b31a9ffdb6b4b223f279e0d9cd72
[]
no_license
STAMP-project/Cling-application
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
refs/heads/master
2022-07-27T09:30:16.423362
2022-07-19T12:01:46
2022-07-19T12:01:46
254,310,667
2
2
null
2021-07-12T12:29:50
2020-04-09T08:11:35
null
UTF-8
Java
false
false
4,083
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Aug 21 16:13:19 GMT 2019 */ package org.apache.commons.lang3.time; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class DurationFormatUtils_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 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.apache.commons.lang3.time.DurationFormatUtils"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); 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.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/pderakhshanfar/rq3/botsing-integration-experiment"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DurationFormatUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.lang3.time.DurationFormatUtils$Token", "org.apache.commons.lang3.time.DurationFormatUtils", "org.apache.commons.lang3.StringUtils" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DurationFormatUtils_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.lang3.time.DurationFormatUtils", "org.apache.commons.lang3.time.DurationFormatUtils$Token", "org.apache.commons.lang3.StringUtils" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3468520366ae2f9c3f16d110cf2466906bec9aeb
d5af8a0c3d6da19c16cbe0a74b4635336689f789
/app/src/main/java/com/im/myim/base/IBaseView_Response.java
70b5abda5518872d5421a0588c3a684ce2cd6a86
[]
no_license
Yunzhong-Zhou/MyIM
93963cad021575add5166f3f1ccf9a22df9d6370
77bec6f4bc11ef6d41aa182a0a11f72bc663ebfd
refs/heads/master
2023-08-18T01:32:35.477485
2021-10-01T13:23:14
2021-10-01T13:23:14
410,797,149
0
0
null
null
null
null
UTF-8
Java
false
false
983
java
package com.im.myim.base; /** * Created by ling on 2015/9/7. * description:公共的请求返回,界面上的提示 */ public interface IBaseView_Response { /** * 显示进度条 * */ void showProgress(boolean flag, String message); /** * 隐藏进度条 */ void hideProgress(); /** * 根据资源文件id弹出toast * * @param resId 资源文件id */ void showToast(int resId); /** * 根据字符串弹出toast * * @param msg 提示内容 */ void showToast(String msg); String getStringbyid(int resId); /** * 显示加载界面 */ void showLoadingPage(); /** * 显示错误界面 */ void showErrorPage(); /** * 显示空数据界面 */ void showEmptyPage(); /** * 显示数据界面 */ void showContentPage(); /** * 是否加载更多 */ void setSpringViewMore(boolean flag); }
[ "1125213018@qq.com" ]
1125213018@qq.com
16b62f6873e5f23c36122e9fc2b84c9827a25d7d
6ee92ecc85ba29f13769329bc5a90acea6ef594f
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/RetailscmException.java
ae8bccd5b7741ba29462f4ac941709effce20bf5
[]
no_license
doublechaintech/scm-biz-suite
b82628bdf182630bca20ce50277c41f4a60e7a08
52db94d58b9bd52230a948e4692525ac78b047c7
refs/heads/master
2023-08-16T12:16:26.133012
2023-05-26T03:20:08
2023-05-26T03:20:08
162,171,043
1,387
500
null
2023-07-08T00:08:42
2018-12-17T18:07:12
Java
UTF-8
Java
false
false
2,155
java
package com.doublechaintech.retailscm; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @JsonSerialize(using = RetailscmExceptionJsonSerializer.class) public class RetailscmException extends com.terapico.BusinessException implements MessageContainer { static final long serialVersionUID = -1; @Override public String getMessage() { String pMessage = super.getMessage(); if (this.getErrorMessageList().size() <= 0) { return pMessage; } StringBuilder stringBuilder = new StringBuilder(); if (pMessage != null) { stringBuilder.append(pMessage).append(':'); } for (Message message : getErrorMessageList()) { stringBuilder.append(message.getBody()); } return stringBuilder.toString(); } public RetailscmException() { super(); } public RetailscmException(String message) { super(message); } public RetailscmException(Message message) { super(); this.addErrorMessage(message); } public RetailscmException(List<Message> messageList) { super(); this.addErrorMessages(messageList); } public RetailscmException(String message, Throwable cause) { super(message, cause); } public RetailscmException(Throwable cause) { super(cause); } private List<Message> errorMessageList; public List<Message> getErrorMessageList() { ensureErrorList(); return errorMessageList; } public void setErrorMessageList(List<Message> errorMessageList) { this.errorMessageList = errorMessageList; } protected void ensureErrorList() { if (errorMessageList == null) { errorMessageList = new ArrayList<Message>(); } } public void addErrorMessage(Message errorMessage) { ensureErrorList(); errorMessageList.add(errorMessage); } public void addErrorMessages(List<Message> messageList) { ensureErrorList(); errorMessageList.addAll(messageList); } public boolean hasErrors() { if (errorMessageList == null) { return false; } if (errorMessageList.isEmpty()) { return false; } return true; } }
[ "zhangxilai@doublechaintech.com" ]
zhangxilai@doublechaintech.com
999666265d54689247bd67b8783992052a950692
b4efdd8984d79016ad091923f08112ab76f0730a
/cuke4duke/src/main/java/cuke4duke/spi/ExceptionFactory.java
750dd1da6478db43d9d5797571bb3ba3a070cca2
[ "MIT" ]
permissive
oferrigni/cuke4duke
41705ef7a6d0f3b4669ba682d613aaf28ca95f29
3583200c5cd652099b08e406311d205ff00a97a4
refs/heads/master
2021-01-21T01:18:08.633406
2011-01-17T00:42:32
2011-01-17T00:42:32
1,626,596
0
1
null
null
null
null
UTF-8
Java
false
false
225
java
package cuke4duke.spi; public interface ExceptionFactory { Exception error(String errorClass, String message); Exception cucumberPending(String message); Exception cucumberArityMismatchError(String message); }
[ "aslak.hellesoy@gmail.com" ]
aslak.hellesoy@gmail.com
a5a3b71c5e73f5adc5edaa1df3558078aa5f0301
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201705/cm/BatchJobOpsService.java
4099b166af29c0cca02ade9c70d06ab0c2d378c0
[ "Apache-2.0" ]
permissive
mo4ss/googleads-java-lib
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
refs/heads/master
2022-12-05T00:30:56.740813
2022-11-16T10:47:15
2022-11-16T10:47:15
108,132,394
0
0
Apache-2.0
2022-11-16T10:47:16
2017-10-24T13:41:43
Java
UTF-8
Java
false
false
3,463
java
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.adwords.jaxws.v201705.cm; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.9-b130926.1035 * Generated source version: 2.1 * */ @WebServiceClient(name = "BatchJobOpsService", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201705", wsdlLocation = "https://adwords.google.com/api/adwords/cm/v201705/BatchJobOpsService?wsdl") public class BatchJobOpsService extends Service { private final static URL BATCHJOBOPSSERVICE_WSDL_LOCATION; private final static WebServiceException BATCHJOBOPSSERVICE_EXCEPTION; private final static QName BATCHJOBOPSSERVICE_QNAME = new QName("https://adwords.google.com/api/adwords/cm/v201705", "BatchJobOpsService"); static { URL url = null; WebServiceException e = null; try { url = new URL("https://adwords.google.com/api/adwords/cm/v201705/BatchJobOpsService?wsdl"); } catch (MalformedURLException ex) { e = new WebServiceException(ex); } BATCHJOBOPSSERVICE_WSDL_LOCATION = url; BATCHJOBOPSSERVICE_EXCEPTION = e; } public BatchJobOpsService() { super(__getWsdlLocation(), BATCHJOBOPSSERVICE_QNAME); } public BatchJobOpsService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } /** * * @return * returns BatchJobOpsServiceInterface */ @WebEndpoint(name = "BatchJobOpsServiceInterfacePort") public BatchJobOpsServiceInterface getBatchJobOpsServiceInterfacePort() { return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201705", "BatchJobOpsServiceInterfacePort"), BatchJobOpsServiceInterface.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns BatchJobOpsServiceInterface */ @WebEndpoint(name = "BatchJobOpsServiceInterfacePort") public BatchJobOpsServiceInterface getBatchJobOpsServiceInterfacePort(WebServiceFeature... features) { return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201705", "BatchJobOpsServiceInterfacePort"), BatchJobOpsServiceInterface.class, features); } private static URL __getWsdlLocation() { if (BATCHJOBOPSSERVICE_EXCEPTION!= null) { throw BATCHJOBOPSSERVICE_EXCEPTION; } return BATCHJOBOPSSERVICE_WSDL_LOCATION; } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
c5fe6379a3c684d5ca44eba9bc30b20242b7186d
5be8c5c03c12e05d845c3102ff0a2948cf6638a8
/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderUriFactoryResolver.java
5ddbe0b37685bab0a2a51bf0ca247bb81665eeca
[ "Apache-2.0" ]
permissive
Talend/apache-camel
cfc4657dc28a6c5701854b0889b9e0d090675b05
fe9484bf5236f7af665c35cc7ed29527def8fe48
refs/heads/master
2023-08-10T14:15:19.145861
2023-06-28T06:30:44
2023-06-28T06:30:44
35,226,644
15
61
Apache-2.0
2023-08-29T11:53:02
2015-05-07T15:03:34
Java
UTF-8
Java
false
false
2,171
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.main.download; import org.apache.camel.CamelContext; import org.apache.camel.catalog.CamelCatalog; import org.apache.camel.catalog.DefaultCamelCatalog; import org.apache.camel.impl.engine.DefaultUriFactoryResolver; import org.apache.camel.spi.EndpointUriFactory; import org.apache.camel.tooling.model.ComponentModel; /** * Auto downloaded needed JARs when resolving uri factory. */ public class DependencyDownloaderUriFactoryResolver extends DefaultUriFactoryResolver { private final CamelCatalog catalog = new DefaultCamelCatalog(); private final CamelContext camelContext; private final DependencyDownloader downloader; public DependencyDownloaderUriFactoryResolver(CamelContext camelContext) { this.camelContext = camelContext; this.downloader = camelContext.hasService(DependencyDownloader.class); } @Override public EndpointUriFactory resolveFactory(String name, CamelContext context) { ComponentModel model = catalog.componentModel(name); if (model != null && !downloader.alreadyOnClasspath(model.getGroupId(), model.getArtifactId(), model.getVersion())) { downloader.downloadDependency(model.getGroupId(), model.getArtifactId(), model.getVersion()); } return super.resolveFactory(name, context); } }
[ "claus.ibsen@gmail.com" ]
claus.ibsen@gmail.com
75cbc700caa8348b98a959fde7a8d19472f7b4fa
85659db6cd40fcbd0d4eca9654a018d3ac4d0925
/packages/apps/Contacts/src/com/android/contacts/service/LocalAuthenticatorService.java
0b4d1a2865c68e17b55a804947665c74e681869e
[]
no_license
qwe00921/switchui
28e6e9e7da559c27a3a6663495a5f75593f48fb8
6d859b67402fb0cd9f7e7a9808428df108357e4d
refs/heads/master
2021-01-17T06:34:05.414076
2014-01-15T15:40:35
2014-01-15T15:40:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,941
java
/* * Copyright (C) 2009 The Android Open Source Project * * 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.android.contacts.service; import android.accounts.AbstractAccountAuthenticator; import android.accounts.Account; import android.accounts.AccountAuthenticatorResponse; import android.accounts.AccountManager; import android.accounts.NetworkErrorException; import android.app.Service; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.provider.ContactsContract; /** * A very basic authenticator service for Local contacts. At the moment, it has no UI hooks. When called * with addAccount, it simply adds the account to AccountManager directly with a username and * password. We will need to implement confirmPassword, confirmCredentials, and updateCredentials. */ public class LocalAuthenticatorService extends Service { public static final String OPTIONS_USERNAME = "username"; public static final String OPTIONS_PASSWORD = "password"; public static final String OPTIONS_CONTACTS_SYNC_ENABLED = "contacts"; class LocalAuthenticator extends AbstractAccountAuthenticator { public LocalAuthenticator(Context context) { super(context); } @Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { if (options != null && options.containsKey(OPTIONS_PASSWORD) && options.containsKey(OPTIONS_USERNAME)) { final Account account = new Account(options.getString(OPTIONS_USERNAME), accountType); AccountManager.get(LocalAuthenticatorService.this).addAccountExplicitly( account, options.getString(OPTIONS_PASSWORD), null); // Set up contacts syncing. SyncManager will use information from ContentResolver // to determine syncability of Contacts for Exchange ContentResolver.setIsSyncable(account, ContactsContract.AUTHORITY, 1); ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true); Bundle b = new Bundle(); b.putString(AccountManager.KEY_ACCOUNT_NAME, options.getString(OPTIONS_USERNAME)); b.putString(AccountManager.KEY_ACCOUNT_TYPE, accountType); return b; } else { return null; } } @Override public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options) { // TODO Auto-generated method stub return null; } @Override public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) { return null; } @Override public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle loginOptions) throws NetworkErrorException { return null; } @Override public String getAuthTokenLabel(String authTokenType) { // null means we don't have compartmentalized authtoken types return null; } @Override public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) throws NetworkErrorException { return null; } @Override public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle loginOptions) { // TODO Auto-generated method stub return null; } } @Override public IBinder onBind(Intent intent) { // TODO Replace this with an appropriate constant in AccountManager, when it's created String authenticatorIntent = "android.accounts.AccountAuthenticator"; if (authenticatorIntent.equals(intent.getAction())) { return new LocalAuthenticator(this).getIBinder(); } else { return null; } } }
[ "cheng.carmark@gmail.com" ]
cheng.carmark@gmail.com
9bf3a5e0e7f671b377e7a2d028f4b35b30e23dc4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_3d6642061ab94233048e949e0e59ec1723fe5eb5/HasPermission/23_3d6642061ab94233048e949e0e59ec1723fe5eb5_HasPermission_s.java
60533d156b44be35c0997524f330c5cb49c4a85d
[]
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
549
java
package de.bananaco.permissions.worlds; import java.util.Set; import org.bukkit.entity.Player; import org.bukkit.permissions.PermissionAttachmentInfo; public class HasPermission { public static boolean has(Player player, String node) { Set<PermissionAttachmentInfo> pf = player.getEffectivePermissions(); for(PermissionAttachmentInfo pa : pf) { String permission = pa.getPermission(); boolean result = pa.getValue(); if(permission.equalsIgnoreCase(node)) return result; } return player.isOp(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
dba7ef29836db8ab530bdccf2d832b143398b981
d381092dd5f26df756dc9d0a2474b253b9e97bfb
/impe3/impe3-api/src/main/java/com/isotrol/impe3/api/component/CacheScope.java
417a7aaad0530292fb08d3f60fe665e90bd32b09
[]
no_license
isotrol-portal3/portal3
2d21cbe07a6f874fff65e85108dcfb0d56651aab
7bd4dede31efbaf659dd5aec72b193763bfc85fe
refs/heads/master
2016-09-15T13:32:35.878605
2016-03-07T09:50:45
2016-03-07T09:50:45
39,732,690
0
1
null
null
null
null
UTF-8
Java
false
false
1,027
java
/** * This file is part of Port@l * Port@l 3.0 - Portal Engine and Management System * Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com * * Port@l is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Port@l is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Port@l. If not, see <http://www.gnu.org/licenses/>. */ package com.isotrol.impe3.api.component; /** * Enumeration of supported cache scopes. * @author Andres Rodriguez */ public enum CacheScope { /** Public cache. */ PUBLIC, /** Private cache. */ PRIVATE; }
[ "isotrol-portal@portal.isotrol.com" ]
isotrol-portal@portal.isotrol.com
3f7658733129bbc70cca4fe73095cdbb351d50b6
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/56/org/apache/commons/math/analysis/polynomials/PolynomialFunction_equals_345.java
ad2070195e8cf8a12a95c2d40e3b0b2bb783aa2b
[]
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
870
java
org apach common math analysi polynomi immut represent real polynomi function real coeffici href http mathworld wolfram horner method hornersmethod html horner' method evalu function version revis date polynomi function polynomialfunct differenti univari real function differentiableunivariaterealfunct serializ inherit doc inheritdoc overrid equal object obj obj obj polynomi function polynomialfunct polynomi function polynomialfunct polynomi function polynomialfunct obj arrai equal coeffici coeffici
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
d7e38263f4e7928cc60e4f45e260158e8432fd8f
1f1b0abab5d4f89c971629a957e83a85093786f7
/spooned/org/apache/ant/antcore/antlib/DefinitionHandler.java
fd7c5348cb1f56f702e337a3684c011b40d6038c
[]
no_license
yueyuep/CIA
c16e577478bac0c0307dde5aa3cd0a4b4248650d
7851d4fa8d4ce96d7cfae4705068510d75cb8814
refs/heads/master
2023-04-16T05:00:44.956767
2021-04-28T09:42:30
2021-04-28T09:42:30
327,919,224
1
0
null
null
null
null
UTF-8
Java
false
false
5,303
java
/* The Apache Software License, Version 1.1 Copyright (c) 2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowlegement: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowlegement may appear in the software itself, if and wherever such third-party acknowlegements normally appear. 4. The names "The Jakarta Project", "Ant", and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their names without prior written permission of the Apache Group. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================== This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.ant.antcore.antlib; import org.xml.sax.SAXParseException; import org.apache.ant.antcore.xml.ElementHandler; /** * Handler for definition within an Ant Library * * @author Conor MacNeill * @created 13 January 2002 */ public class DefinitionHandler extends org.apache.ant.antcore.xml.ElementHandler { /** * The name attribute name */ public static final java.lang.String NAME_ATTR = "name"; /** * The classname attribute name */ public static final java.lang.String CLASSNAME_ATTR = "classname"; /** * the type of the definition */ private java.lang.String definitionType; /** * Create a definition handler to handle a specific type of definition * * @param definitionType * the type of the definition being handled */ public DefinitionHandler(java.lang.String definitionType) { this.definitionType = definitionType; } /** * Get the type of definition being handled * * @return the type of the definition */ public java.lang.String getDefinitionType() { return definitionType; } /** * Gets the name of the TaskdefHandler * * @return the name value */ public java.lang.String getName() { return getAttribute(org.apache.ant.antcore.antlib.DefinitionHandler.NAME_ATTR); } /** * Gets the className of the TaskdefHandler * * @return the className value */ public java.lang.String getClassName() { return getAttribute(org.apache.ant.antcore.antlib.DefinitionHandler.CLASSNAME_ATTR); } /** * Process the definition element * * @param elementName * the name of the element * @exception SAXParseException * if there is a problem parsing the * element */ public void processElement(java.lang.String elementName) throws org.xml.sax.SAXParseException { if ((getName() == null) || (getClassName() == null)) { throw new org.xml.sax.SAXParseException(("name and classname must be " + "specified for a ") + definitionType, getLocator()); } } /** * Validate that the given attribute and value are valid. * * @param attributeName * The name of the attributes * @param attributeValue * The value of the attributes * @exception SAXParseException * if the attribute is not allowed on the * element. */ protected void validateAttribute(java.lang.String attributeName, java.lang.String attributeValue) throws org.xml.sax.SAXParseException { if ((!attributeName.equals(org.apache.ant.antcore.antlib.DefinitionHandler.NAME_ATTR)) && (!attributeName.equals(org.apache.ant.antcore.antlib.DefinitionHandler.CLASSNAME_ATTR))) { throwInvalidAttribute(attributeName); } } }
[ "1195083604@qq.com" ]
1195083604@qq.com
df39b1da201f5189e8a39aed1b6fd3f1686f3d4e
a2353e4d9dc2b7797dee2587c66c950924b141e2
/control-stress-application/src/main/java/com/extl/jade/user/Status.java
49b7beb97c275579e998339e9cea4f31ac17f4e3
[ "Apache-2.0" ]
permissive
tuwiendsg/ADVISE
d06f8efe6658cb0d7b6502ff8d537cf9c1cd8f7e
b7ffadb286fc4e65fbd083b47842c8a62b338af8
refs/heads/master
2020-03-30T20:25:35.023813
2015-01-30T14:56:28
2015-01-30T14:56:28
19,457,103
1
0
null
null
null
null
UTF-8
Java
false
false
1,231
java
package com.extl.jade.user; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for status. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="status"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="DELETED"/> * &lt;enumeration value="DISABLED"/> * &lt;enumeration value="CLOSED"/> * &lt;enumeration value="ACTIVE"/> * &lt;enumeration value="ADMIN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "status") @XmlEnum public enum Status { /** * The customer has been deleted * */ DELETED, /** * The customer has been disabled * */ DISABLED, /** * The account has been closed * */ CLOSED, /** * The account is active, and a normal customer * */ ACTIVE, /** * The account is active, and an admin customer * */ ADMIN; public String value() { return name(); } public static Status fromValue(String v) { return valueOf(v); } }
[ "e.copil@dsg.tuwien.ac.at" ]
e.copil@dsg.tuwien.ac.at
a30d0747d3571c987fb07b98d6bbc13b8b09db4b
e0282213c96a4421a40ca07444ce79f841181d6f
/src/com/exam/problems/Palindrome.java
e8b7a86578f0587f16e041556f05c546a74ee801
[]
no_license
shah-smit/JavaTutorial
59d74532f891fc219c3934611563968e6721948a
cc20a7f4bb4b25d13b6c14314f2af76692092db0
refs/heads/master
2021-01-18T16:47:36.560058
2018-10-21T04:33:02
2018-10-21T04:33:02
78,260,548
0
1
null
2018-10-01T08:43:38
2017-01-07T05:27:46
Java
UTF-8
Java
false
false
550
java
package com.exam.problems; public class Palindrome { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(isPalindrome("rac!car")); } public static boolean isPalindrome(String s){ boolean palindrome = true; for(int i=0; i<s.length()/2;i++){ char start = s.charAt(i); if(!Character.isLetter(start)) continue; char end = s.charAt(s.length()-1-i); System.out.println(start+" "+end); if(start != end) {palindrome=false; break; } } return palindrome; } }
[ "smitshah95@hotmail.com" ]
smitshah95@hotmail.com
56311b5f2f04a5a49c4aeeb46fa46811be10eb86
6c9f8482a0af74b87be939926c0569231456ed2c
/eclipse/portal/plugins/com.liferay.ide.eclipse.service.core/src/com/liferay/ide/eclipse/service/core/model/IServiceBuilder.java
ae08d2c222dd8ab73cbf1d23fc18282c112ee12b
[]
no_license
juanferrub/liferay-ide
f179886a100583deb985ce911a7b54008676205e
db43228aa2dca6db7df4a39caf0eb9b0d5ac06ec
refs/heads/master
2021-01-16T21:55:11.387514
2011-10-31T09:19:31
2011-10-31T09:19:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,479
java
/******************************************************************************* * Copyright (c) 2010-2011 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * *******************************************************************************/ package com.liferay.ide.eclipse.service.core.model; import com.liferay.ide.eclipse.service.core.model.internal.ServiceBuilderRootElementController; import com.liferay.ide.eclipse.service.core.model.internal.ShowRelationshipLabelsBinding; import org.eclipse.sapphire.modeling.IModelElement; import org.eclipse.sapphire.modeling.ListProperty; import org.eclipse.sapphire.modeling.ModelElementList; import org.eclipse.sapphire.modeling.ModelElementType; import org.eclipse.sapphire.modeling.Value; import org.eclipse.sapphire.modeling.ValueProperty; import org.eclipse.sapphire.modeling.annotations.DefaultValue; import org.eclipse.sapphire.modeling.annotations.GenerateImpl; import org.eclipse.sapphire.modeling.annotations.Label; import org.eclipse.sapphire.modeling.annotations.Type; import org.eclipse.sapphire.modeling.xml.annotations.CustomXmlRootBinding; import org.eclipse.sapphire.modeling.xml.annotations.CustomXmlValueBinding; import org.eclipse.sapphire.modeling.xml.annotations.XmlBinding; import org.eclipse.sapphire.modeling.xml.annotations.XmlListBinding; @GenerateImpl @CustomXmlRootBinding(value = ServiceBuilderRootElementController.class) public interface IServiceBuilder extends IModelElement { ModelElementType TYPE = new ModelElementType(IServiceBuilder.class); // *** Package-path *** @XmlBinding(path = "@package-path") @Label(standard = "&Package path") ValueProperty PROP_PACKAGE_PATH = new ValueProperty(TYPE, "PackagePath"); Value<String> getPackagePath(); void setPackagePath(String value); // *** Auto-Namespace-Tables *** @Type(base = Boolean.class) @Label(standard = "&Auto namespace tables") @XmlBinding(path = "@auto-namespace-tables") ValueProperty PROP_AUTO_NAMESPACE_TABLES = new ValueProperty(TYPE, "AutoNamespaceTables"); Value<Boolean> isAutoNamespaceTables(); void setAutoNamespaceTables(String value); void setAutoNamespaceTables(Boolean value); // *** Author *** @XmlBinding(path = "author") @Label(standard = "&Author") ValueProperty PROP_AUTHOR = new ValueProperty(TYPE, "Author"); Value<String> getAuthor(); void setAuthor(String value); // *** namespace *** @XmlBinding(path = "namespace") @Label(standard = "&Namespace") ValueProperty PROP_NAMESPACE = new ValueProperty(TYPE, "Namespace"); Value<String> getNamespace(); void setNamespace(String value); // *** Entities *** @Type(base = IEntity.class) @Label(standard = "Entities") @XmlListBinding(mappings = @XmlListBinding.Mapping(element = "entity", type = IEntity.class)) ListProperty PROP_ENTITIES = new ListProperty(TYPE, "Entities"); ModelElementList<IEntity> getEntities(); // *** Exceptions *** @Type(base = IException.class) @Label(standard = "exceptions") @XmlListBinding(path = "exceptions", mappings = @XmlListBinding.Mapping(element = "exception", type = IException.class)) ListProperty PROP_EXCEPTIONS = new ListProperty(TYPE, "Exceptions"); ModelElementList<IException> getExceptions(); @Type(base = IServiceBuilderImport.class) @Label(standard = "service builder imports") @XmlListBinding(mappings = @XmlListBinding.Mapping(element = "service-builder-import", type = IServiceBuilderImport.class)) ListProperty PROP_SERVICE_BUILDER_IMPORTS = new ListProperty(TYPE, "ServiceBuilderImports"); ModelElementList<IServiceBuilderImport> getServiceBuilderImports(); @Type( base = Boolean.class ) @DefaultValue( text = "true" ) @CustomXmlValueBinding( impl = ShowRelationshipLabelsBinding.class ) ValueProperty PROP_SHOW_RELATIONSHIP_LABELS = new ValueProperty( TYPE, "ShowRelationshipLabels" ); Value<Boolean> getShowRelationshipLabels(); void setShowRelationshipLabels( String value ); void setShowRelationshipLabels( Boolean value ); }
[ "gregory.amerson@liferay.com" ]
gregory.amerson@liferay.com
032a09a586c2bdba8a4163d1e2878f94d2ce29a6
d262cde8c4859ecd6032b56edb4a1d24395948c8
/app/src/main/java/com/verbosetech1/yoohoo/fragments/UserMediaFragment.java
25f0d88e9537bd1d7331e705ed0587735db3c542
[]
no_license
WafaaHarbJame/Yoohoo
fc96921d72554dcaf438a8f53fd2b7760ba93a72
10eb7392c793ad192832fbbb6c4df780a74ef466
refs/heads/master
2020-08-06T05:00:38.359863
2019-10-28T16:14:28
2019-10-28T16:14:28
212,832,674
0
0
null
null
null
null
UTF-8
Java
false
false
3,396
java
package com.verbosetech1.yoohoo.fragments; import android.content.Context; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.android.material.tabs.TabLayout; import androidx.fragment.app.Fragment; import androidx.viewpager.widget.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.verbosetech1.yoohoo.R; import com.verbosetech1.yoohoo.adapters.ViewPagerAdapter; import com.verbosetech1.yoohoo.interfaces.OnUserDetailFragmentInteraction; public class UserMediaFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; private TabLayout tabLayout; private ViewPager viewPager; private ViewPagerAdapter viewPagerAdapter; private OnUserDetailFragmentInteraction mListener; public UserMediaFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_user_media, container, false); tabLayout = (TabLayout) view.findViewById(R.id.tabs); viewPager = (ViewPager) view.findViewById(R.id.viewpager); return view; } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); setupViewPager(); } private void setupViewPager() { viewPagerAdapter = new ViewPagerAdapter(getChildFragmentManager()); for (int i = 0; i < 3; i++) { String title = null; switch (i) { case 0: title = getString(R.string.media); break; case 1: title = getString(R.string.audio); break; case 2: title = getString(R.string.docs); break; } UserSubMediaFragment fragment = UserSubMediaFragment.newInstance(i); fragment.setAttachment(mListener.getAttachments(i)); viewPagerAdapter.addFrag(fragment, title); } viewPager.setAdapter(viewPagerAdapter); tabLayout.setupWithViewPager(viewPager); } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnUserDetailFragmentInteraction) { mListener = (OnUserDetailFragmentInteraction) context; } else { throw new RuntimeException(context.toString() + " must implement OnUserDetailFragmentInteraction"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } }
[ "wafaajame@gmail.com" ]
wafaajame@gmail.com
3aea54ff8961b8b0cf7ea308ce1e18771e26329a
24e0347594c3a099ae79337b8d60a5db3d7ff586
/src/main/java/com/wsk/service/OrderFormService.java
d6a2769ae39be495e8f300484de9d2f605614908
[ "MIT" ]
permissive
wsk1103/Used-Trading-Platform
fe166e65f5494b21846795099619bd550e6c6b6d
cf7214586463c27a052e916b070ef719a4c67fc7
refs/heads/master
2023-04-27T05:52:44.304603
2022-05-02T10:21:13
2022-05-02T10:21:13
90,808,953
775
153
MIT
2023-04-18T06:59:13
2017-05-10T01:46:07
Java
UTF-8
Java
false
false
516
java
package com.wsk.service; import com.wsk.pojo.OrderForm; import java.util.List; /** * Created by wsk1103 on 2017/5/13. */ public interface OrderFormService { int deleteByPrimaryKey(Integer id); int insert(OrderForm record); int insertSelective(OrderForm record); OrderForm selectByPrimaryKey(Integer id); int updateByPrimaryKeySelective(OrderForm record); int updateByPrimaryKey(OrderForm record); int getCounts(int uid); List<OrderForm> selectByUid(int uid, int start); }
[ "1261709167@qq.com" ]
1261709167@qq.com
614a50676c72bffec6c057701edb3ab8492926e8
47e3740b9ec46637d820e981053a51745dc66b73
/Dashboard/DashboardViewer/src/org/simbiosis/ui/bprs/dashboard/client/AppActivityMapper.java
a544f0dd0ebad8a4ddbe29750b1bb6081d04da8a
[]
no_license
simbiosis1/MicrobankApp
4051a30d9147085df905b9105dc6669e9aa2b365
7d9ac104893985aa0e6c39b850a51b360852ff3c
refs/heads/master
2020-06-04T22:39:58.886792
2015-07-21T00:50:01
2015-07-21T00:50:01
33,455,226
0
1
null
null
null
null
UTF-8
Java
false
false
1,526
java
package org.simbiosis.ui.bprs.dashboard.client; import org.kembang.module.client.mvp.KembangActivityMapper; import org.simbiosis.ui.bprs.dashboard.client.dashboard.DashboardActivity; import org.simbiosis.ui.bprs.dashboard.client.loan.DashboardLoanActivity; import org.simbiosis.ui.bprs.dashboard.client.loanmonitor.LoanMonitorActivity; import org.simbiosis.ui.bprs.dashboard.client.places.Dashboard; import org.simbiosis.ui.bprs.dashboard.client.places.DashboardLoan; import org.simbiosis.ui.bprs.dashboard.client.places.DashboardTks; import org.simbiosis.ui.bprs.dashboard.client.places.LoanMonitor; import org.simbiosis.ui.bprs.dashboard.client.tks.DashboardTksActivity; import com.google.gwt.activity.shared.Activity; import com.google.gwt.place.shared.Place; public class AppActivityMapper extends KembangActivityMapper { public AppActivityMapper(AppFactory clientFactory) { super(clientFactory); } @Override public Activity createActivity(Place place) { AppFactory clientFactory = (AppFactory) getClientFactory(); if (place instanceof Dashboard) { return new DashboardActivity((Dashboard) place, clientFactory); } else if (place instanceof DashboardLoan) { return new DashboardLoanActivity((DashboardLoan) place, clientFactory); } else if (place instanceof DashboardTks) { return new DashboardTksActivity((DashboardTks) place, clientFactory); } else if (place instanceof LoanMonitor) { return new LoanMonitorActivity((LoanMonitor) place, clientFactory); } return null; } }
[ "iwanaf@gmail.com" ]
iwanaf@gmail.com
a868ddb1aab5cb97fc6154cdf647cfb604942f85
19b3772876daa6f7c23506f0f50017626ba83fd5
/app/src/main/java/com/android2ee/formation/oif/juinmmxvi/myapplication/view/main/MainActivity.java
4ebbe23c67759ce637f116b1ae08ea254da65fc3
[ "Apache-2.0" ]
permissive
MathiasSeguy-Android2EE/MyApplicationOIF
b1611f3b98febdb877a6c24e6c2f28e62447ee5d
3b2fe18c30a9d11ebd96fd863dc1272d9b731995
refs/heads/master
2020-04-01T17:47:30.565716
2019-06-05T18:12:08
2019-06-05T18:12:08
60,270,474
6
2
null
null
null
null
UTF-8
Java
false
false
3,523
java
package com.android2ee.formation.oif.juinmmxvi.myapplication.view.main; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import com.android2ee.formation.oif.juinmmxvi.myapplication.R; import com.android2ee.formation.oif.juinmmxvi.myapplication.transverse.pojo.Human; import java.util.ArrayList; public class MainActivity extends AppCompatActivity { /*********************************************************** * Attributes **********************************************************/ /** * The edittext */ private EditText edtMessage; /** * The button to add the content of the edit text in the result area */ private Button btnAdd; /** * The result area */ private ListView lsvResult; /** * The list of items to display */ private ArrayList<Human> humen; /** * The arrayadapter of the listview */ private HumanArrayAdapter humanArrayAdapter; /*********************************************************** * Temp Var **********************************************************/ /** * A temp string to use when you need a temp string */ private String messageTemp; /*********************************************************** * Managing LifeCycle **********************************************************/ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //inflate the view setContentView(R.layout.activity_main); //instanciate the graphical components edtMessage= (EditText) findViewById(R.id.edtMessage); btnAdd= (Button) findViewById(R.id.btnAdd); lsvResult= (ListView) findViewById(R.id.lsvResult); humen =new ArrayList<>(); for(int i=0;i<10000;i++){ humen.add(new Human("Toto num "+i,i)); } humanArrayAdapter =new HumanArrayAdapter(this,humen); lsvResult.setAdapter(humanArrayAdapter); //add listeners btnAdd.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { addMessageToResult(); } }); lsvResult.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { fillEdtWithSelectedElement(position); } }); } /*********************************************************** * Business Methods **********************************************************/ /** * Copy the content of the dittext in the result area */ private void addMessageToResult(){ messageTemp= edtMessage.getText().toString(); //manage the list of data directly // messages.add(messageTemp); // arrayAdapter.notifyDataSetChanged(); //use the arrayadapter humanArrayAdapter.add(new Human(messageTemp,humen.size())); edtMessage.setText(""); } /** * Copy the selected element in the EdtText * @param position */ private void fillEdtWithSelectedElement(int position){ messageTemp= humen.get(position).getMessage(); edtMessage.setText(messageTemp); } }
[ "mathias.seguy@android2ee.com" ]
mathias.seguy@android2ee.com
9c451bbde3a9529f465c9de736055abf541d28fe
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_d457fee8f9f06b35b6e8f4ff52b7179609a2c0f7/TruncationSelector/5_d457fee8f9f06b35b6e8f4ff52b7179609a2c0f7_TruncationSelector_s.java
7ba2ebff04634be7b4a7e68b95d789d85698315c
[]
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
3,278
java
package SigmaEC.select; import SigmaEC.evaluate.ObjectiveFunction; import SigmaEC.represent.Individual; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; /** * Truncation selection strategy. * * @author Eric 'Siggy' Scott */ public class TruncationSelector<T extends Individual> extends Selector<T> { private ObjectiveFunction<T> objective; public ObjectiveFunction<T> getObjective() { return objective; } public TruncationSelector(ObjectiveFunction objective) { super(); if (objective == null) throw new IllegalArgumentException("TruncationSelector(): objective is null."); this.objective = objective; } /** * Loops through the population to find the highest fitness individual. * In the case that this individual is not unique, the *latest* individual * with the highest fitness value is chosen. */ @Override public T selectIndividual(List<T> population) throws NullPointerException { if (population.isEmpty()) throw new IllegalArgumentException("TruncationSelector.selectMultipleIndividuals(): population is empty."); double bestFitness = 0.0; T best = null; for (T ind : population) { double fitness = objective.fitness(ind); if (fitness >= bestFitness) { bestFitness = fitness; best = ind; } } return best; } /** * Sort the population (nondestructively) by fitness and select the top * [count] individuals. */ @Override public List<T> selectMultipleIndividuals(List<T> population, int numToSelect) throws IllegalArgumentException, NullPointerException { if (numToSelect < 1) throw new IllegalArgumentException("TruncationSelector.selectMultipleIndividuals(): numToSelect is zero."); else if (population.isEmpty()) throw new IllegalArgumentException("TruncationSelector.selectMultipleIndividuals(): population is empty."); else if (numToSelect > population.size()) throw new IllegalArgumentException("TruncationSelector.selectMultipleIndividuals(): numToSelect is greater than population size."); List<T> sortedPop = new ArrayList(population); Collections.sort(sortedPop, new fitnessComparator()); List<T> topIndividuals = new ArrayList(numToSelect); for (int i = 0; i < numToSelect; i++) topIndividuals.add(sortedPop.get(sortedPop.size() - 1 - i)); return topIndividuals; } public boolean repOK() { return (objective != null); } private class fitnessComparator implements Comparator<T> { @Override public int compare(T ind1, T ind2) { double x = objective.fitness(ind1); double y = objective.fitness(ind2); if (x > y) return 1; if (x < y) return -1; return 0; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e75f3264c87a690d9eedd4d5728565be5ea4b468
2a48e6b7b02bc0e3b11f7616b6bb4fee3a14e882
/src/main/java/ch/spacebase/openclassic/game/network/codec/PlayerTeleportCodec.java
4f29d724d8c3c7f44c323e19f77d48a2d7b46021
[ "MIT" ]
permissive
Rhynex/OpenClassic
97b6a6c86ddc2c6e78be09555c43c13081fe63be
0a3128a0d9d7e7b1807d1aa553c97fec135753a9
refs/heads/master
2021-01-17T21:53:05.626947
2013-12-06T02:24:03
2013-12-06T02:24:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,398
java
package ch.spacebase.openclassic.game.network.codec; import java.io.IOException; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import ch.spacebase.openclassic.game.network.MessageCodec; import ch.spacebase.openclassic.game.network.msg.PlayerTeleportMessage; public class PlayerTeleportCodec extends MessageCodec<PlayerTeleportMessage> { public PlayerTeleportCodec() { super(PlayerTeleportMessage.class, (byte) 0x08); } @Override public ChannelBuffer encode(PlayerTeleportMessage message) throws IOException { ChannelBuffer buffer = ChannelBuffers.buffer(9); buffer.writeByte(message.getPlayerId()); buffer.writeShort((short) (message.getX() * 32)); buffer.writeShort((short) (message.getY() * 32)); buffer.writeShort((short) (message.getZ() * 32)); buffer.writeByte((byte) ((int) (message.getYaw() * 256 / 360) & 255)); buffer.writeByte((byte) ((int) (message.getPitch() * 256 / 360) & 255)); return buffer; } @Override public PlayerTeleportMessage decode(ChannelBuffer buffer) throws IOException { byte playerId = buffer.readByte(); float x = buffer.readShort() / 32; float y = buffer.readShort() / 32; float z = buffer.readShort() / 32; float yaw = (buffer.readByte() * 360) / 256f; float pitch = (buffer.readByte() * 360) / 256f; return new PlayerTeleportMessage(playerId, x, y, z, yaw, pitch); } }
[ "Steveice10@gmail.com" ]
Steveice10@gmail.com
804b1afb186ae21e8f319826ff9bc5bd88b7b1b2
1a4ba66af6a87e197194b61042e22fac3cca27e7
/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java
8d606dba299ab686548fe68a0a3986ef58625c26
[]
no_license
bkapukaranov/Virgo-kernel-sandbox
80f11291c24e38b151f5a98bc508d61a50776d65
9352d0dac0f4451a2b389cea330e833a595920ec
refs/heads/master
2021-01-18T18:11:59.260106
2010-10-22T12:07:25
2010-11-02T12:37:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,145
java
/******************************************************************************* * Copyright (c) 2008, 2010 VMware Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * VMware Inc. - initial contribution *******************************************************************************/ package org.eclipse.virgo.kernel.artifact.bundle; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; import java.util.Dictionary; import java.util.HashSet; import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarFile; import org.eclipse.virgo.kernel.artifact.StubHashGenerator; import org.eclipse.virgo.repository.ArtifactDescriptor; import org.eclipse.virgo.repository.ArtifactGenerationException; import org.eclipse.virgo.repository.Attribute; import org.junit.Before; import org.junit.Test; import org.osgi.framework.Constants; import org.osgi.framework.Version; /** * <p> * Unit tests for {@link org.eclipse.virgo.kernel.artifact.bundle.BundleBridge BundleBridge}. Uses a combination of real bundle files and * static test data. * </p> * * <strong>Concurrent Semantics</strong><br /> * * Threadsafe test case * */ public class BundleBridgeTests { //Test Data private final static String ARTEFACT_ATTRIBUTE_NAME = "name"; private final static String ARTEFACT_ATTRIBUTE_VERSION = "version"; //End Test Data private static BundleBridge BUNDLE_BRIDGE; private static final StubBundleArtefactBridge STUB_ARTEFACT_DEFINITION = new StubBundleArtefactBridge(); private static final String BUNDLE_MANIFEST_VERSION_HEADER_NAME = "Bundle-ManifestVersion"; private static final String BUNDLE_NAME_HEADER_NAME = "Bundle-Name"; @Before public void setUp() throws Exception { BUNDLE_BRIDGE = new BundleBridge(new StubHashGenerator()); } @Test public void testFictionalURI() { File file = new File("/foo/bar.jar"); try { BUNDLE_BRIDGE.generateArtifactDescriptor(file); assertTrue("Should throw exception", false); } catch (ArtifactGenerationException age) { assertEquals("ArtifactType in exception is incorrect", age.getArtifactType(), BundleBridge.BRIDGE_TYPE); } } @Test public void testBadManifest01() { File file = new File("./src/test/resources/wars/testbad01.war"); try { BUNDLE_BRIDGE.generateArtifactDescriptor(file); assertTrue("Should throw exception", false); } catch (ArtifactGenerationException age) { assertEquals("ArtifactType in exception is incorrect", age.getArtifactType(), BundleBridge.BRIDGE_TYPE); } } @Test public void testBadManifest02() { File file = new File("./src/test/resources/wars/testbad02.war"); try { BUNDLE_BRIDGE.generateArtifactDescriptor(file); assertTrue("Should throw exception", false); } catch (ArtifactGenerationException age) { assertEquals("ArtifactType in exception is incorrect", age.getArtifactType(), BundleBridge.BRIDGE_TYPE); } } @Test public void testGenerateArtefact() throws ArtifactGenerationException { File jarsDirectory = new File("../ivy-cache/repository/org.apache.commons/com.springsource.org.apache.commons.dbcp/1.2.2.osgi/com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar"); File directoriesDirectory = new File("./src/test/resources/directories"); Set<ArtifactDescriptor> artefacts = new HashSet<ArtifactDescriptor>(); artefacts.add(BUNDLE_BRIDGE.generateArtifactDescriptor(jarsDirectory)); assertEquals("Wrong number of artefacts have been parsed", 1, artefacts.size()); artefacts.addAll(generateArtefacts(directoriesDirectory)); assertEquals("Wrong number of artefacts have been parsed", 2, artefacts.size()); ArtifactDescriptor stubArtefact; Set<Attribute> stubAttributes; Set<Attribute> testAttributes; for (ArtifactDescriptor testArtefact : artefacts) { stubArtefact = STUB_ARTEFACT_DEFINITION.generateArtifactDescriptor(new File(testArtefact.getUri())); stubAttributes = stubArtefact.getAttribute(ARTEFACT_ATTRIBUTE_NAME); testAttributes = testArtefact.getAttribute(Constants.BUNDLE_SYMBOLICNAME); assertEquals("Error on: " + testArtefact.toString(), stubAttributes.iterator().next().getValue(), testAttributes.iterator().next().getValue()); stubAttributes = stubArtefact.getAttribute(ARTEFACT_ATTRIBUTE_VERSION); testAttributes = testArtefact.getAttribute(Constants.BUNDLE_VERSION); assertEquals("Error on: " + testArtefact.toString(), stubAttributes.iterator().next().getValue(), testAttributes.iterator().next().getValue()); } } @Test public void testBuildDictionary() throws ArtifactGenerationException, IOException { File testFile = new File("../ivy-cache/repository/javax.servlet/com.springsource.javax.servlet/2.5.0/com.springsource.javax.servlet-2.5.0.jar"); ArtifactDescriptor inputArtefact = BUNDLE_BRIDGE.generateArtifactDescriptor(testFile); Dictionary<String, String> dictionary = BundleBridge.convertToDictionary(inputArtefact); JarFile testJar = new JarFile(testFile); Attributes attributes = testJar.getManifest().getMainAttributes(); testJar.close(); assertEquals("Failed to match regenerated " + Constants.BUNDLE_SYMBOLICNAME, dictionary.get(Constants.BUNDLE_SYMBOLICNAME), attributes.getValue(Constants.BUNDLE_SYMBOLICNAME)); assertEquals("Failed to match regenerated " + Constants.BUNDLE_VERSION, dictionary.get(Constants.BUNDLE_VERSION), attributes.getValue(Constants.BUNDLE_VERSION)); assertEquals("Failed to match regenerated " + BUNDLE_MANIFEST_VERSION_HEADER_NAME, dictionary.get(BUNDLE_MANIFEST_VERSION_HEADER_NAME), attributes.getValue(BUNDLE_MANIFEST_VERSION_HEADER_NAME)); assertEquals("Failed to match regenerated " + BUNDLE_NAME_HEADER_NAME, dictionary.get(BUNDLE_NAME_HEADER_NAME), attributes.getValue(BUNDLE_NAME_HEADER_NAME)); } @Test public void webBundleWar() throws ArtifactGenerationException { ArtifactDescriptor descriptor = BUNDLE_BRIDGE.generateArtifactDescriptor(new File("src/test/resources/wars/test.war")); assertNotNull(descriptor); assertEquals("bundle", descriptor.getType()); assertEquals("com.springsource.server.admin.web", descriptor.getName()); assertEquals(new Version(2, 0, 0), descriptor.getVersion()); } @Test public void explodedBundle() throws ArtifactGenerationException { ArtifactDescriptor descriptor = BUNDLE_BRIDGE.generateArtifactDescriptor(new File("src/test/resources/bundle.jar")); assertNotNull(descriptor); assertEquals("bundle", descriptor.getType()); assertEquals("exploded.bundle", descriptor.getName()); assertEquals(new Version(1, 0, 0), descriptor.getVersion()); } private Set<ArtifactDescriptor> generateArtefacts(File directory) throws ArtifactGenerationException { Set<ArtifactDescriptor> artefacts = new HashSet<ArtifactDescriptor>(); for (File fileInDir : directory.listFiles()) { if(!fileInDir.getName().endsWith(".jar") && !fileInDir.getName().contains("sources")){ ArtifactDescriptor artefact = BUNDLE_BRIDGE.generateArtifactDescriptor(fileInDir); if (artefact != null) { artefacts.add(BUNDLE_BRIDGE.generateArtifactDescriptor(fileInDir)); } } } return artefacts; } }
[ "gnormington@vmware.com" ]
gnormington@vmware.com
19e6ea831bad971b239c7022bdc85581c13693db
dfb3f631ed8c18bd4605739f1ecb6e47d715a236
/disconnect-highcharts/src/main/java/js/lang/external/highcharts/SeriesPieDataDragDropGuideBoxOptions.java
cd3b69d0ad1b646e9e032f7b7ccd8b7960536a76
[ "Apache-2.0" ]
permissive
fluorumlabs/disconnect-project
ceb788b901d1bf7cfc5ee676592f55f8a584a34e
54f4ea5e6f05265ea985e1ee615cc3d59d5842b4
refs/heads/master
2022-12-26T11:26:46.539891
2020-08-20T16:37:19
2020-08-20T16:37:19
203,577,241
6
1
Apache-2.0
2022-12-16T00:41:56
2019-08-21T12:14:42
Java
UTF-8
Java
false
false
1,471
java
package js.lang.external.highcharts; import com.github.fluorumlabs.disconnect.core.annotations.Import; import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage; import js.lang.Any; import org.teavm.jso.JSProperty; import javax.annotation.Nullable; /** * (Highcharts) Style options for the guide box. The guide box has one state by * default, the <code>default</code> state. * */ @NpmPackage( name = "highcharts", version = "^8.1.2" ) @Import( module = "highcharts/es-modules/masters/highcharts.src.js" ) public interface SeriesPieDataDragDropGuideBoxOptions extends Any { /** * (Highcharts) Style options for the guide box default state. * */ @JSProperty("default") @Nullable DragDropGuideBoxOptionsObject getDefaultValue(); /** * (Highcharts) Style options for the guide box default state. * */ @JSProperty("default") void setDefaultValue(@Nullable DragDropGuideBoxOptionsObject value); static Builder builder() { return new Builder(); } final class Builder { private final SeriesPieDataDragDropGuideBoxOptions object = Any.empty(); private Builder() { } public SeriesPieDataDragDropGuideBoxOptions build() { return object; } /** * (Highcharts) Style options for the guide box default state. * */ public Builder defaultValue(@Nullable DragDropGuideBoxOptionsObject value) { object.setDefaultValue(value); return this; } } }
[ "fluorumlabs@users.noreply.github.com" ]
fluorumlabs@users.noreply.github.com
8e8697233c04fdc5a4d454d2016fc8558aa160b4
eeb83e80f006d44d74620b0a7ea8ec20e877578c
/godsoft.20161116-com351-tibero6/src/main/java/egovframework/com/cmm/web/EgovComIndexController.java
ed5982b9a3a2f059fc7448eefa0d26cb3df4fb2c
[]
no_license
LeeBaekHaeng/GodTest2016
52bd1c867647acd40a00b5ce4035f718201544fb
a080fc963eaaf372ec5fab132b954849090a3225
refs/heads/master
2022-12-24T21:19:46.464098
2020-06-21T12:39:28
2020-06-21T12:39:28
67,454,036
3
2
null
2022-12-16T04:27:05
2016-09-05T22:14:42
PLSQL
UTF-8
Java
false
false
6,820
java
package egovframework.com.cmm.web; /** * 컴포넌트 설치 후 설치된 컴포넌트들을 IncludedInfo annotation을 통해 찾아낸 후 * 화면에 표시할 정보를 처리하는 Controller 클래스 * <Notice> * 개발시 메뉴 구조가 잡히기 전에 배포파일들에 포함된 공통 컴포넌트들의 목록성 화면에 * URL을 제공하여 개발자가 편하게 활용하도록 하기 위해 작성된 것으로, * 실제 운영되는 시스템에서는 적용해서는 안 됨 * 실 운영 시에는 삭제해서 배포해도 좋음 * <Disclaimer> * 운영시에 본 컨트롤을 사용하여 메뉴를 구성하는 경우 성능 문제를 일으키거나 * 사용자별 메뉴 구성에 오류를 발생할 수 있음 * @author 공통컴포넌트 정진오 * @since 2011.08.26 * @version 2.0.0 * @see * * <pre> * << 개정이력(Modification Information) >> * * 수정일 수정자 수정내용 * ------- -------- --------------------------- * 2011.08.26 정진오 최초 생성 * 2011.09.16 서준식 컨텐츠 페이지 생성 * 2011.09.26 이기하 header, footer 페이지 생성 * </pre> */ import java.lang.reflect.Method; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import egovframework.com.cmm.ComDefaultCodeVO; import egovframework.com.cmm.IncludedCompInfoVO; import egovframework.com.cmm.LoginVO; import egovframework.com.cmm.annotation.IncludedInfo; import egovframework.com.cmm.service.CmmnDetailCode; import egovframework.com.cmm.service.impl.CmmUseDAO; import egovframework.com.cmm.util.EgovUserDetailsHelper; @Controller public class EgovComIndexController implements ApplicationContextAware, InitializingBean { private ApplicationContext applicationContext; private static final Logger LOGGER = LoggerFactory .getLogger(EgovComIndexController.class); private Map<Integer, IncludedCompInfoVO> map; @Autowired private CmmUseDAO cmmUseDAO; @Override public void afterPropertiesSet() throws Exception { } @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; LOGGER.info("EgovComIndexController setApplicationContext method has called!"); } @RequestMapping("/index.do") public String index(ModelMap model) { return "egovframework/com/cmm/EgovUnitMain"; } @RequestMapping("/EgovTop.do") public String top() { return "egovframework/com/cmm/EgovUnitTop"; } @RequestMapping("/EgovBottom.do") public String bottom() { return "egovframework/com/cmm/EgovUnitBottom"; } @RequestMapping("/EgovContent.do") public String setContent(ModelMap model) { LoginVO loginVO = (LoginVO) EgovUserDetailsHelper .getAuthenticatedUser(); model.addAttribute("loginVO", loginVO); setContentA1(model); return "egovframework/com/cmm/EgovUnitContent"; } public void setContentA1(ModelMap model) { ComDefaultCodeVO vo = new ComDefaultCodeVO(); vo.setCodeId("COM001"); try { List<CmmnDetailCode> items = cmmUseDAO.selectCmmCodeDetail(vo); model.addAttribute("COM001", items); } catch (Exception e) { LOGGER.error(e.getMessage()); } } @RequestMapping("/EgovLeft.do") public String setLeftMenu(ModelMap model) { /* 최초 한 번만 실행하여 map에 저장해 놓는다. */ if (map == null) { map = new TreeMap<Integer, IncludedCompInfoVO>(); RequestMapping rmAnnotation; IncludedInfo annotation; IncludedCompInfoVO zooVO; /* * EgovLoginController가 AOP Proxy되는 바람에 클래스를 reflection으로 가져올 수 없음 */ try { Class<?> loginController = Class .forName("egovframework.com.uat.uia.web.EgovLoginController"); Method[] methods = loginController.getMethods(); for (int i = 0; i < methods.length; i++) { annotation = methods[i].getAnnotation(IncludedInfo.class); if (annotation != null) { LOGGER.debug("Found @IncludedInfo Method : {}", methods[i]); zooVO = new IncludedCompInfoVO(); zooVO.setName(annotation.name()); zooVO.setOrder(annotation.order()); zooVO.setGid(annotation.gid()); rmAnnotation = methods[i] .getAnnotation(RequestMapping.class); if ("".equals(annotation.listUrl()) && rmAnnotation != null) { zooVO.setListUrl(rmAnnotation.value()[0]); } else { zooVO.setListUrl(annotation.listUrl()); } map.put(zooVO.getOrder(), zooVO); } } } catch (ClassNotFoundException e) { LOGGER.error("No egovframework.com.uat.uia.web.EgovLoginController!!"); } /* 여기까지 AOP Proxy로 인한 코드 */ /* @Controller Annotation 처리된 클래스를 모두 찾는다. */ Map<String, Object> myZoos = applicationContext .getBeansWithAnnotation(Controller.class); LOGGER.debug("How many Controllers : ", myZoos.size()); for (final Object myZoo : myZoos.values()) { Class<? extends Object> zooClass = myZoo.getClass(); Method[] methods = zooClass.getMethods(); LOGGER.debug("Controller Detected {}", zooClass); for (int i = 0; i < methods.length; i++) { annotation = methods[i].getAnnotation(IncludedInfo.class); if (annotation != null) { // LOG.debug("Found @IncludedInfo Method : " + // methods[i] ); zooVO = new IncludedCompInfoVO(); zooVO.setName(annotation.name()); zooVO.setOrder(annotation.order()); zooVO.setGid(annotation.gid()); /* * 목록형 조회를 위한 url 매핑은 @IncludedInfo나 @RequestMapping에서 * 가져온다 */ rmAnnotation = methods[i] .getAnnotation(RequestMapping.class); if ("".equals(annotation.listUrl())) { zooVO.setListUrl(rmAnnotation.value()[0]); } else { zooVO.setListUrl(annotation.listUrl()); } map.put(zooVO.getOrder(), zooVO); } } } } model.addAttribute("resultList", map.values()); LOGGER.debug("EgovComIndexController index is called "); return "egovframework/com/cmm/EgovUnitLeft"; } }
[ "dlqorgod@naver.com" ]
dlqorgod@naver.com
1179651fe37fc8694bcbe5b67d138349a87f47ad
4ab2794c9530f3a6884519c74b43df979b9c3f65
/controltheland/src/main/java/com/btxtech/game/services/socialnet/facebook/FacebookSignedRequest.java
c77ae4d8f5f40dc226938b70e741cd9148a5667f
[]
no_license
kurdoxxx/controltheland
759b825b9e19c95a27f8b3345f1f620a6f8f308d
22fb17ff19446a9ed7c91b5a8e6d091488bf475e
refs/heads/master
2021-01-19T06:58:47.541857
2014-07-25T22:05:37
2014-07-25T22:05:37
37,353,316
0
0
null
null
null
null
UTF-8
Java
false
false
2,056
java
package com.btxtech.game.services.socialnet.facebook; import java.io.Serializable; /** * User: beat * Date: 22.07.12 * Time: 14:44 */ public class FacebookSignedRequest implements Serializable { private String algorithm; private long issued_at; // camel notation does not work here private FacebookUser user; private String oauth_token; // camel notation does not work here private String user_id; // camel notation does not work here private String email; private String firstName; private String lastName; private String link; public FacebookSignedRequest(String algorithm, long issuedAt, FacebookUser user, String oAuthToken, String userId) { this.algorithm = algorithm; issued_at = issuedAt; this.user = user; oauth_token = oAuthToken; user_id = userId; } public String getAlgorithm() { return algorithm; } public long getIssuedAt() { return issued_at; } public FacebookUser getUser() { return user; } public String getOAuthToken() { return oauth_token; } public boolean hasOAuthToken() { return oauth_token != null && !oauth_token.isEmpty(); } public String getUserId() { return user_id; } public boolean hasUserId() { return user_id != null && !user_id.isEmpty(); } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getLink() { return link; } public void setLink(String link) { this.link = link; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String secondName) { this.lastName = secondName; } }
[ "beat.keller@btxtech.com" ]
beat.keller@btxtech.com
86685ec856f8420b566ef7c9e81442582e3dbd74
1cad3bd1cbe6c1f71bed367eef619f8bcba5d337
/app/src/main/java/com/saas/saasuser/view/datechoice/widget/WeekView.java
ec847d838cb06424641ed166ad05cd4e22af615d
[ "Apache-2.0" ]
permissive
Fuge2008/VC
07aea36e9fdf0d1d27f1db931e23bb0baf4c1aad
164b1f234f51abe9816b094f97868d52d0eecfdf
refs/heads/master
2020-03-22T17:14:05.938318
2018-07-10T06:11:57
2018-07-10T06:11:57
140,382,841
1
0
null
null
null
null
UTF-8
Java
false
false
1,839
java
package com.saas.saasuser.view.datechoice.widget; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; public class WeekView extends ViewGroup { public static final String TAG = "WeekView"; public WeekView(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int widthSize = MeasureSpec.getSize(widthMeasureSpec); int maxSize = widthSize / 7; int baseSize = 0; int cnt = getChildCount(); for(int i = 0; i < cnt; i++) { View child = getChildAt(i); if(child.getVisibility() == View.GONE) { continue; } child.measure( MeasureSpec.makeMeasureSpec(maxSize, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(maxSize, MeasureSpec.AT_MOST) ); baseSize = Math.max(baseSize, child.getMeasuredHeight()); } for (int i = 0; i < cnt; i++) { View child = getChildAt(i); if (child.getVisibility() == GONE) { continue; } child.measure( MeasureSpec.makeMeasureSpec(baseSize, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(baseSize, MeasureSpec.EXACTLY) ); } setMeasuredDimension(widthSize, getLayoutParams().height >= 0 ? getLayoutParams().height : baseSize + getPaddingBottom() + getPaddingTop()); } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { int cnt = getChildCount(); int width = getMeasuredWidth(); int part = width / cnt; for(int i = 0; i < cnt; i++) { View child = getChildAt(i); if(child.getVisibility() == View.GONE) { continue; } int childWidth = child.getMeasuredWidth(); int x = i * part + ((part - childWidth) / 2); child.layout(x, 0, x + childWidth, child.getMeasuredHeight()); } } }
[ "fzwooo@163.com" ]
fzwooo@163.com
abb1f7c257e929a078399e0b534d3276e0f31952
6aa8173702d8d196a3d1884a8e03ecbdaee56f6d
/src/test/java/io/naztech/jobharvestar/scraper/TestMapfreHTMLUnit.java
85625f4452870c0774496e5de09f84d68e8d4e2a
[]
no_license
armfahim/Job-Harvester
df762053cf285da87498faa705ec7a099fce1ea9
51dbc836a60b03c27c52cb38db7c19db5d91ddc9
refs/heads/master
2023-08-11T18:30:56.842891
2020-02-27T09:16:56
2020-02-27T09:16:56
243,461,410
3
0
null
2023-07-23T06:59:54
2020-02-27T07:48:57
Java
UTF-8
Java
false
false
3,276
java
package io.naztech.jobharvestar.scraper; import java.io.IOException; import java.net.MalformedURLException; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; import io.naztech.talent.model.Job; /** * Mapfre Jobsite parser<br> * URL: * https://jobs.mapfre.com/search/?q=&sortColumn=referencedate&sortDirection=desc&startrow= * * @author sohid.ullah * @since 2019-04-18 */ public class TestMapfreHTMLUnit extends TestAbstractScrapper { private static final String BASE_URL = "https://jobs.mapfre.com/search/?q=&sortColumn=referencedate&sortDirection=desc&startrow=0"; private static HtmlPage page; private static WebClient webClient; private static final DateTimeFormatter DF = DateTimeFormatter.ofPattern("dd-MMM-yyyy"); private static final String ROW_EL_PATH = "//*[@id=\"searchresults\"]/tbody/tr/td[1]/span/a"; private static final String DAT_EL_PATH = "//*[@id=\"job-date\"]/span"; private static final String LOC_EL_PATH = "//*[@id=\"job-location\"]/span"; private static final String SPEC_EL_PATH = "//*[@id=\"content\"]/div/div[2]/div/div[2]/span/div[1]"; private static final String TOTAL_JOB_EL_PATH = "//*[@id=\"content\"]/div/div[5]/div/div/div/span[1]/b[2]"; @BeforeClass public static void setUpBeforeClass() throws Exception { webClient = getFirefoxClient(); } @AfterClass public static void tearDownAfterClass() throws Exception { webClient.close(); } @Test public void testJobSummaryPage() throws InterruptedException { try { page = webClient.getPage(BASE_URL); webClient.waitForBackgroundJavaScript(40000); List<HtmlElement> numberOfJobEl = page.getBody().getByXPath(TOTAL_JOB_EL_PATH); double totalPage = (Double.parseDouble(numberOfJobEl.get(0).asText().trim())) / 25; totalPage = Math.ceil(totalPage); System.out.println(totalPage); } catch (FailingHttpStatusCodeException | IOException e) { System.out.println(e.getMessage()); } } @Test public void testJobDetailElement() throws FailingHttpStatusCodeException, MalformedURLException, IOException, InterruptedException { WebClient client = getFirefoxClient(); try { String url = "https://jobs.mapfre.com/job/GIRONA-AGENTE-COMERCIAL-NEGOCIO-VIDA-GI/515578201/"; HtmlPage page = client.getPage(url); client.waitForBackgroundJavaScript(7 * 1000); HtmlElement el = (HtmlElement) page.getElementById("job-title"); Job job = new Job(url); job.setName(el.getTextContent()); job.setTitle(job.getName()); el = page.getBody().getFirstByXPath(DAT_EL_PATH); System.out.println(el.getTextContent().trim()); job.setPostedDate(parseDate(el.getTextContent(), DF)); el = page.getBody().getFirstByXPath(LOC_EL_PATH); job.setLocation(el.getTextContent()); el = page.getBody().getFirstByXPath(SPEC_EL_PATH); job.setSpec(el.getTextContent()); } catch (FailingHttpStatusCodeException | IOException | NullPointerException e) { } } }
[ "armfahim4010@gmail.com" ]
armfahim4010@gmail.com
25b58de7ab7d7a544ab0e5f394ff5e2464a9d472
39515c110bae97169fd04de9bfbe181e98899cf7
/src/com/transaksi/main.java
76b5b28739d0cccb2a9f73778dda88dff164de97
[]
no_license
dickanirwansyah/Transaksi_Java
7fd28f1e943259fcd93562e85f1745efcc797e5a
e93708e23188bab120ccf6b1314bad0cfcb6581d
refs/heads/master
2020-06-14T16:26:36.012077
2016-11-30T06:53:53
2016-11-30T06:53:53
75,159,749
0
0
null
null
null
null
UTF-8
Java
false
false
425
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 com.transaksi; /** * * @author krypton */ public class main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } }
[ "dickanirwansyah@gmail.com" ]
dickanirwansyah@gmail.com
6ad547e25cbaff3e88fbe91b2f60bea3e216035f
55dca62e858f1a44c2186774339823a301b48dc7
/code/my-app/functions/16/readFile_MergeTranslations.java
6b06fbb1ab253b8aa70b707493f6931ff1c140e0
[]
no_license
jwiszowata/code_reaper
4fff256250299225879d1412eb1f70b136d7a174
17dde61138cec117047a6ebb412ee1972886f143
refs/heads/master
2022-12-15T14:46:30.640628
2022-02-10T14:02:45
2022-02-10T14:02:45
84,747,455
0
0
null
2022-12-07T23:48:18
2017-03-12T18:26:11
Java
UTF-8
Java
false
false
591
java
private static Map<String, String> readFile(File file) { Map<String, String> result = new HashMap<>(); try (Reader reader = Utils.getFileUTF8Reader(file); BufferedReader bufferedReader = new BufferedReader(reader)) { String line = bufferedReader.readLine(); while (line != null) { int index = line.indexOf('='); if (index >= 0) { result.put(line.substring(0, index), line.substring(index + 1)); } line = bufferedReader.readLine(); } } catch (Exception e) { } return result; }
[ "wiszowata.joanna@gmail.com" ]
wiszowata.joanna@gmail.com
7340d2996d5489e9b55ac2d66713778c6297b273
a0cd546101594e679544d24f92ae8fcc17013142
/refactorit-core/src/test/projects/ExtractSuper/ReplaceImplement/in/Test.java
b04e3ec127b9977061c9aac4fd6a090f82d64303
[]
no_license
svn2github/RefactorIT
f65198bb64f6c11e20d35ace5f9563d781b7fe5c
4b1fc1ebd06c8e192af9ccd94eb5c2d96f79f94c
refs/heads/master
2021-01-10T03:09:28.310366
2008-09-18T10:17:56
2008-09-18T10:17:56
47,540,746
0
1
null
null
null
null
UTF-8
Java
false
false
151
java
public class Test extends A implements X { public void methodA() { } public void methodX() { } public void methodZ() { } }
[ "l950637@285b47d1-db48-0410-a9c5-fb61d244d46c" ]
l950637@285b47d1-db48-0410-a9c5-fb61d244d46c
e7d1beb2de0e112507659a4968f9439a6564134d
eef448aff1abee98c700344cbfdfd4d753f0f26a
/hsweb-easy-orm-rdb/src/main/java/org/hswebframework/ezorm/rdb/meta/converter/NumberValueConverter.java
e688f9997968f5db471896dfbc3f1995f201c95e
[]
no_license
lianganjian/hsweb-easy-orm
92574eae89968a21e25c539a2e82f4642bc8c952
39aefe2ad2ef5718e4c99197564bc324ddfeb407
refs/heads/master
2020-08-02T18:46:59.197687
2020-05-08T11:37:29
2020-05-08T11:37:29
211,469,607
0
0
null
2020-04-22T07:04:43
2019-09-28T08:33:33
Java
UTF-8
Java
false
false
3,128
java
package org.hswebframework.ezorm.rdb.meta.converter; import org.hswebframework.ezorm.core.ValueConverter; import org.hswebframework.utils.ClassUtils; import org.hswebframework.utils.StringUtils; import org.hswebframework.utils.time.DateFormatter; import java.math.BigDecimal; import java.util.Date; import java.util.function.Function; public class NumberValueConverter implements ValueConverter { private Function<Number, Object> converter; public NumberValueConverter(Function<Number, Object> converter) { this.converter = converter; } public NumberValueConverter(Class javaType) { if (javaType == int.class || javaType == Integer.class) { converter = Number::intValue; } else if (javaType == double.class || javaType == Double.class) { converter = Number::doubleValue; } else if (javaType == long.class || javaType == Long.class) { converter = Number::longValue; } else if (javaType == byte.class || javaType == Byte.class) { converter = Number::byteValue; } else if (javaType == boolean.class || javaType == Boolean.class) { converter = num -> num.byteValue() != 0; } else if (javaType == char.class || javaType == Character.class) { converter = num -> (char) num.intValue(); } else if (ClassUtils.instanceOf(javaType, Date.class)) { converter = num -> { try { Date date = (Date) javaType.newInstance(); date.setTime(num.longValue()); return date; } catch (Exception e) { throw new RuntimeException(e); } }; } else { converter = num -> num; } } @Override public Object getData(Object value) { if (StringUtils.isNullOrEmpty(value)) return null; if (value instanceof Number) return value; if (value instanceof Date) { value = ((Date) value).getTime(); } else if (!StringUtils.isNumber(value)) { Date date = DateFormatter.fromString(String.valueOf(value)); if (null != date) value = date.getTime(); } if (StringUtils.isNumber(value)) { return converter.apply(new BigDecimal(String.valueOf(value))); } if (Boolean.TRUE.equals(value)) { return 1; } if (Boolean.FALSE.equals(value)) { return 0; } throw new UnsupportedOperationException("值" + value + "无法转换为数字"); } @Override public Object getValue(Object data) { if (data instanceof String) { if (StringUtils.isNumber(data)) { data = new BigDecimal(((String) data)); } } else if (!StringUtils.isNumber(data)) { Date date = DateFormatter.fromString(String.valueOf(data)); if (null != date) data = date.getTime(); } if (data instanceof Number) { return converter.apply(((Number) data)); } return data; } }
[ "zh.sqy@qq.com" ]
zh.sqy@qq.com
b1f7bc4ca25214d43f2a767a81e0bce34cb674b7
c6cb484aded802b2453994fb4f6ddc98a28426a9
/src/java.corba/com/sun/corba/se/PortableActivationIDL/ActivatorHolder.java
43529d4b6d6a042366284a5a1564cdf656021989
[]
no_license
shitapatilptc/java
de4ed8452d4810c62a6b15a643856d8ddb4cc917
445b4b3816fe703a68dbdda8ef73e6aaa8ba2972
refs/heads/master
2021-01-22T05:43:41.450356
2017-05-26T10:51:36
2017-05-26T10:51:36
92,491,357
1
2
null
null
null
null
UTF-8
Java
false
false
1,125
java
package com.sun.corba.se.PortableActivationIDL; /** * com/sun/corba/se/PortableActivationIDL/ActivatorHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/workspace/9-2-build-windows-amd64-cygwin-phase2/jdk9/6180.nc/corba/src/java.corba/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl * Wednesday, March 8, 2017 10:24:45 PM PST */ public final class ActivatorHolder implements org.omg.CORBA.portable.Streamable { public com.sun.corba.se.PortableActivationIDL.Activator value = null; public ActivatorHolder () { } public ActivatorHolder (com.sun.corba.se.PortableActivationIDL.Activator initialValue) { value = initialValue; } public void _read (org.omg.CORBA.portable.InputStream i) { value = com.sun.corba.se.PortableActivationIDL.ActivatorHelper.read (i); } public void _write (org.omg.CORBA.portable.OutputStream o) { com.sun.corba.se.PortableActivationIDL.ActivatorHelper.write (o, value); } public org.omg.CORBA.TypeCode _type () { return com.sun.corba.se.PortableActivationIDL.ActivatorHelper.type (); } }
[ "shitapatil@ptc.com" ]
shitapatil@ptc.com