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
12d583e6427ad532b45faac7c1e4e5b0917eddc4
3b33d6e3c2067446ecb2475f68de74328a6ea66a
/CrowdFundingWorkspace/crowd-funding-project-workspace/modules/crowd-funding-database/crowd-funding-database-service/src/main/java/com/crowd/funding/database/model/impl/CandidateRegistrationCacheModel.java
72eb5d4a6d1f79f9bb34735d5666c20644c51a54
[]
no_license
Sumit9727/QuickDaan_LifeRay1
bbeced3e386f732be861073106848b4237e967ba
96320146033f182ab32f13a54bdc7a2306986b53
refs/heads/master
2020-09-18T11:21:16.519127
2019-11-26T09:04:17
2019-11-26T09:04:17
224,142,985
0
0
null
null
null
null
UTF-8
Java
false
false
5,281
java
/** * Copyright (c) 2000-present 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.crowd.funding.database.model.impl; import aQute.bnd.annotation.ProviderType; import com.crowd.funding.database.model.CandidateRegistration; import com.liferay.portal.kernel.model.CacheModel; import com.liferay.portal.kernel.util.HashUtil; import com.liferay.portal.kernel.util.StringBundler; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.Date; /** * The cache model class for representing CandidateRegistration in entity cache. * * @author Brian Wing Shun Chan * @see CandidateRegistration * @generated */ @ProviderType public class CandidateRegistrationCacheModel implements CacheModel<CandidateRegistration>, Externalizable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CandidateRegistrationCacheModel)) { return false; } CandidateRegistrationCacheModel candidateRegistrationCacheModel = (CandidateRegistrationCacheModel)obj; if (CANDIDATE_ID == candidateRegistrationCacheModel.CANDIDATE_ID) { return true; } return false; } @Override public int hashCode() { return HashUtil.hash(0, CANDIDATE_ID); } @Override public String toString() { StringBundler sb = new StringBundler(21); sb.append("{uuid="); sb.append(uuid); sb.append(", CANDIDATE_ID="); sb.append(CANDIDATE_ID); sb.append(", POSITION_ID="); sb.append(POSITION_ID); sb.append(", NAME="); sb.append(NAME); sb.append(", EMAIL="); sb.append(EMAIL); sb.append(", MOBILE_NO="); sb.append(MOBILE_NO); sb.append(", CURRENT_LOCATION="); sb.append(CURRENT_LOCATION); sb.append(", EXPERIENCE="); sb.append(EXPERIENCE); sb.append(", DATE="); sb.append(DATE); sb.append(", STATUS="); sb.append(STATUS); sb.append("}"); return sb.toString(); } @Override public CandidateRegistration toEntityModel() { CandidateRegistrationImpl candidateRegistrationImpl = new CandidateRegistrationImpl(); if (uuid == null) { candidateRegistrationImpl.setUuid(""); } else { candidateRegistrationImpl.setUuid(uuid); } candidateRegistrationImpl.setCANDIDATE_ID(CANDIDATE_ID); candidateRegistrationImpl.setPOSITION_ID(POSITION_ID); if (NAME == null) { candidateRegistrationImpl.setNAME(""); } else { candidateRegistrationImpl.setNAME(NAME); } if (EMAIL == null) { candidateRegistrationImpl.setEMAIL(""); } else { candidateRegistrationImpl.setEMAIL(EMAIL); } candidateRegistrationImpl.setMOBILE_NO(MOBILE_NO); if (CURRENT_LOCATION == null) { candidateRegistrationImpl.setCURRENT_LOCATION(""); } else { candidateRegistrationImpl.setCURRENT_LOCATION(CURRENT_LOCATION); } if (EXPERIENCE == null) { candidateRegistrationImpl.setEXPERIENCE(""); } else { candidateRegistrationImpl.setEXPERIENCE(EXPERIENCE); } if (DATE == Long.MIN_VALUE) { candidateRegistrationImpl.setDATE(null); } else { candidateRegistrationImpl.setDATE(new Date(DATE)); } candidateRegistrationImpl.setSTATUS(STATUS); candidateRegistrationImpl.resetOriginalValues(); return candidateRegistrationImpl; } @Override public void readExternal(ObjectInput objectInput) throws IOException { uuid = objectInput.readUTF(); CANDIDATE_ID = objectInput.readLong(); POSITION_ID = objectInput.readLong(); NAME = objectInput.readUTF(); EMAIL = objectInput.readUTF(); MOBILE_NO = objectInput.readLong(); CURRENT_LOCATION = objectInput.readUTF(); EXPERIENCE = objectInput.readUTF(); DATE = objectInput.readLong(); STATUS = objectInput.readInt(); } @Override public void writeExternal(ObjectOutput objectOutput) throws IOException { if (uuid == null) { objectOutput.writeUTF(""); } else { objectOutput.writeUTF(uuid); } objectOutput.writeLong(CANDIDATE_ID); objectOutput.writeLong(POSITION_ID); if (NAME == null) { objectOutput.writeUTF(""); } else { objectOutput.writeUTF(NAME); } if (EMAIL == null) { objectOutput.writeUTF(""); } else { objectOutput.writeUTF(EMAIL); } objectOutput.writeLong(MOBILE_NO); if (CURRENT_LOCATION == null) { objectOutput.writeUTF(""); } else { objectOutput.writeUTF(CURRENT_LOCATION); } if (EXPERIENCE == null) { objectOutput.writeUTF(""); } else { objectOutput.writeUTF(EXPERIENCE); } objectOutput.writeLong(DATE); objectOutput.writeInt(STATUS); } public String uuid; public long CANDIDATE_ID; public long POSITION_ID; public String NAME; public String EMAIL; public long MOBILE_NO; public String CURRENT_LOCATION; public String EXPERIENCE; public long DATE; public int STATUS; }
[ "rohit@prakat.in" ]
rohit@prakat.in
2c52f5572d0a4bb2cee40fd68cce740a1b0d3c9e
9474744c160c9c68197807d9dce53ea6a27c7fdf
/src/main/java/com/mobian/concurrent/CompletionService.java
640e6ab5d9d4c91d65e8f8054293d4178e3c9269
[]
no_license
xuwenming/ethealth
d250a104c5149516bacafb1731b9dc3455aeac4d
ff7238c2ed280927f8ec4f40d0a97673e54d45f4
refs/heads/master
2022-12-21T22:49:56.544654
2021-01-08T03:00:40
2021-01-08T03:00:40
109,663,512
0
0
null
2022-12-16T02:00:34
2017-11-06T07:47:41
Java
UTF-8
Java
false
false
207
java
package com.mobian.concurrent; import java.util.concurrent.Future; /** * Created by john on 16/8/7. */ public interface CompletionService<V> { Future<V> submit(Task<?, V> task); void sync(); }
[ "252429711@qq.com" ]
252429711@qq.com
e3738723f556613a6c680c079f6f7accadfe27eb
0e6a786186c7ee50191af2971dbc9fe23d717a20
/app/src/main/java/com/kingja/cardpackage/adapter/PersonManagerLvAdapter.java
8fdb06de21e9484aefd61f9504865610d4891796
[]
no_license
KingJA/RentManager
9cfefae120bfa3cbe1657da4a322b30a3ec110cd
abbce1227506eb88f7d2b390f11a16c70f640034
refs/heads/master
2021-01-12T17:18:29.409161
2018-07-17T05:23:15
2018-07-17T05:23:15
71,545,487
0
2
null
null
null
null
UTF-8
Java
false
false
2,083
java
package com.kingja.cardpackage.adapter; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.kingja.cardpackage.entiy.ChuZuWu_MenPaiAuthorizationList; import com.kingja.cardpackage.ui.DrawHelperLayout; import com.tdr.wisdome.R; import java.util.List; /** * Description:TODO * Create Time:2016/8/5 14:32 * Author:KingJA * Email:kingjavip@gmail.com */ public class PersonManagerLvAdapter extends BaseLvAdapter<ChuZuWu_MenPaiAuthorizationList.ContentBean.PERSONNELINFOLISTBean> { public PersonManagerLvAdapter(Context context, List<ChuZuWu_MenPaiAuthorizationList.ContentBean.PERSONNELINFOLISTBean> list) { super(context, list); } @Override public View simpleGetView(final int position, View convertView, ViewGroup parent) { ViewHolder viewHolder = null; if (convertView == null) { convertView = View .inflate(context, R.layout.item_person_manager, null); viewHolder = new ViewHolder(convertView); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } viewHolder.tvname.setText(list.get(position).getNAME()); viewHolder.tvcardId.setText("身份证号: "+list.get(position).getNAME()); viewHolder.tvphone.setText("手机号: "+list.get(position).getNAME()); return convertView; } public class ViewHolder { public final TextView tvname; public final TextView tvcardId; public final TextView tvphone; public final ImageView iv_delete; public final View root; public ViewHolder(View root) { tvname = (TextView) root.findViewById(R.id.tv_name); tvcardId = (TextView) root.findViewById(R.id.tv_cardId); tvphone = (TextView) root.findViewById(R.id.tv_phone); iv_delete = (ImageView) root.findViewById(R.id.iv_delete); this.root = root; } } }
[ "kingjavip@gmail.com" ]
kingjavip@gmail.com
c769210e0f6d15acde5c527777fc54c9817dfbaa
02291c835f667bfa55cc6908f62e3d19ca5ea5f5
/bigdata/MapReduce/AdvanceHadoop/src/main/java/com/edge/fileMerge/sequenceFile/WholeFileRecordReader.java
993f7111b5848c1b1e3c97fe50d3f4d0de567592
[]
no_license
hadoopedge/edge
b447881badcebf444869bff21c6208f9bbe51f58
9451c34abc61bddb804705b64922c070940ddc3c
refs/heads/master
2020-03-27T07:27:37.144649
2018-08-26T15:32:14
2018-08-26T15:32:14
146,192,336
0
0
null
null
null
null
UTF-8
Java
false
false
2,058
java
package com.edge.fileMerge.sequenceFile; //cc WholeFileRecordReader The RecordReader used by WholeFileInputFormat for reading a whole file as a record import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.mapreduce.InputSplit; import org.apache.hadoop.mapreduce.RecordReader; import org.apache.hadoop.mapreduce.TaskAttemptContext; import org.apache.hadoop.mapreduce.lib.input.FileSplit; //vv WholeFileRecordReader class WholeFileRecordReader extends RecordReader<NullWritable, BytesWritable> { private FileSplit fileSplit; private Configuration conf; private BytesWritable value = new BytesWritable(); private boolean processed = false; @Override public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { this.fileSplit = (FileSplit) split; this.conf = context.getConfiguration(); } @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (!processed) { byte[] contents = new byte[(int) fileSplit.getLength()]; Path file = fileSplit.getPath(); FileSystem fs = file.getFileSystem(conf); FSDataInputStream in = null; try { in = fs.open(file); IOUtils.readFully(in, contents, 0, contents.length); value.set(contents, 0, contents.length); } finally { IOUtils.closeStream(in); } processed = true; return true; } return false; } @Override public NullWritable getCurrentKey() throws IOException, InterruptedException { return NullWritable.get(); } @Override public BytesWritable getCurrentValue() throws IOException, InterruptedException { return value; } @Override public float getProgress() throws IOException { return processed ? 1.0f : 0.0f; } @Override public void close() throws IOException { } }
[ "koushikpaul1@gmail.com" ]
koushikpaul1@gmail.com
a0451a3c07020f8708c0c65d71f26983695c9f8c
542f352614185ea134355b61a8ee11d5e7d713af
/zfgj-security-spring-boot/src/main/java/com/dlfc/zfgj/security/exception/GenerateTokenException.java
e60bc70f659bc9ae2dc86abcfd44233cac24fa8e
[]
no_license
iversonwuwei/zfgj-spring-boot-1.0.0
1798d3af99bd8a658e206f12627deef04d016ec9
2a28568290edd17ac557b878e095e824d8b5d1ed
refs/heads/master
2021-01-25T09:31:51.563362
2017-06-09T10:08:33
2017-06-09T10:10:08
93,845,536
0
0
null
null
null
null
UTF-8
Java
false
false
1,000
java
/** * @Copyright: (c) 2017 DLFC. All rights reserved. * * @name: GenerateTokenException.java * @description: * * @version: 1.0 * @date : Apr 18, 2017 * @author: dean * * @Modification History:<br> * Date Author Version Discription * Apr 18, 2017 dean 1.0 <修改原因描述> */ package com.dlfc.zfgj.security.exception; import com.housecenter.dlfc.framework.exception.model.ApplicationException; /** * @name: GenerateTokenException * @description: * * @version 1.0 * @author dean * */ public class GenerateTokenException extends ApplicationException { private static final long serialVersionUID = 5510160378374641505L; private static final String ERROR_MESSAGE = "Token生成失败"; public GenerateTokenException() { this(null); } public GenerateTokenException(Throwable cause) { super(ERROR_MESSAGE, cause); setErrorCode(CaErrorCode.GENERATE_TOKEN_FAILURE.getErrorCode()); } }
[ "wuwei@housecenter.cn" ]
wuwei@housecenter.cn
42eacd425c5a680db1d45cb6f1ccfa1926bf3bb0
d85420b556c249325e2d9b67f658f05e3c43d6fa
/src/main/java/com/cxy/favourite/domain/view/CommentView.java
1cbc0e1766bd9bea18be3bda6f9a16247658e591
[]
no_license
currynice/favourite
de264236dfb2b6c8544512d9dd2fcaf8ade77324
d1664061833e0eaee5b9bd82b006c5eba320955e
refs/heads/master
2020-05-01T10:07:13.855049
2019-04-15T07:49:03
2019-04-15T07:49:03
177,414,461
2
0
null
null
null
null
UTF-8
Java
false
false
226
java
package com.cxy.favourite.domain.view; /** 评论 */ public interface CommentView { Long getUserId(); String getUserName(); String getProfilePicture(); String getContent(); Long getCreateTime(); Long getReplyUserId(); }
[ "694975984@qq.com" ]
694975984@qq.com
413b10eebe015d07346dd5a3bf78e0915103cac2
9284056ad504e81646f207a94f9c30e59398111e
/cf-app/cf-service/src/main/java/cn/com/jansh/core/security/web/authentication/MyWebAuthenticationDetails.java
981a27b50ed224db74ff04747fdc6f3b8893eb52
[]
no_license
ice24for/learnCode
9e3fd6fe5d5c19799b5010e690dc28fa676b9fd5
46baa3c97253127852b3b044f48c4c95b24c0c61
refs/heads/master
2023-07-24T10:03:13.820723
2019-09-30T02:09:02
2019-09-30T02:09:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,995
java
/** * MyWebAuthenticationDetails.java * 2016年1月20日 上午11:23:00 * * 版权所有(C) 2016 北京坚石诚信科技有限公司 */ package cn.com.jansh.core.security.web.authentication; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.security.web.authentication.WebAuthenticationDetails; import cn.com.jansh.core.web.util.AppUtil; /** * @author nie * */ public class MyWebAuthenticationDetails{ private final String remoteAddress; private final String sessionId; // ~ Constructors // =================================================================================================== /** * Records the remote address and will also set the session Id if a session * already exists (it won't create one). * * @param request * that the authentication request was received from */ public MyWebAuthenticationDetails(HttpServletRequest request) { // this.remoteAddress = request.getRemoteAddr(); this.remoteAddress = AppUtil.getRemoteIpAddr(request); HttpSession session = request.getSession(false); this.sessionId = (session != null) ? session.getId() : null; } // ~ Methods // ======================================================================================================== public boolean equals(Object obj) { if (obj instanceof WebAuthenticationDetails) { WebAuthenticationDetails rhs = (WebAuthenticationDetails) obj; if ((remoteAddress == null) && (rhs.getRemoteAddress() != null)) { return false; } if ((remoteAddress != null) && (rhs.getRemoteAddress() == null)) { return false; } if (remoteAddress != null) { if (!remoteAddress.equals(rhs.getRemoteAddress())) { return false; } } if ((sessionId == null) && (rhs.getSessionId() != null)) { return false; } if ((sessionId != null) && (rhs.getSessionId() == null)) { return false; } if (sessionId != null) { if (!sessionId.equals(rhs.getSessionId())) { return false; } } return true; } return false; } /** * Indicates the TCP/IP address the authentication request was received * from. * * @return the address */ public String getRemoteAddress() { return remoteAddress; } /** * Indicates the <code>HttpSession</code> id the authentication request was * received from. * * @return the session ID */ public String getSessionId() { return sessionId; } public int hashCode() { int code = 7654; if (this.remoteAddress != null) { code = code * (this.remoteAddress.hashCode() % 7); } if (this.sessionId != null) { code = code * (this.sessionId.hashCode() % 7); } return code; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append(super.toString()).append(": "); sb.append("RemoteIpAddress: ").append(this.getRemoteAddress()).append("; "); sb.append("SessionId: ").append(this.getSessionId()); return sb.toString(); } }
[ "guolonglong80@163.com" ]
guolonglong80@163.com
580560e73996776eaafc15deda2784a43dec03c6
71cfe0d2d0e78318d5e07b2bcbdf7d085400879d
/plugins/net.bioclipse.reaction/src/net/bioclipse/reaction/editparts/EditPartWithListener.java
86ebc6504b434eb85cd8a95b2ad6e06bdfec705c
[]
no_license
bioclipse/bioclipse.medea
31988c594ecf7c386c436fe3046c7f5507d730ea
579dba6440d7b50365b3a726d7136e7de198687f
refs/heads/master
2020-04-11T04:23:55.435589
2011-09-17T11:47:24
2011-09-17T11:47:24
833,150
0
0
null
null
null
null
UTF-8
Java
false
false
1,352
java
/*******************************************************************************  * Copyright (c) 2007-2009  Miguel Rojas <miguelrojasch@users.sf.net>, * Stefan Kuhn <shk3@users.sf.net>  *  * 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  * www.eclipse.org—epl-v10.html <http://www.eclipse.org/legal/epl-v10.html>  *  * Contact: http://www.bioclipse.net/  ******************************************************************************/ package net.bioclipse.reaction.editparts; import java.beans.PropertyChangeListener; import net.bioclipse.reaction.model.AbstractModel; import org.eclipse.gef.editparts.AbstractGraphicalEditPart; /** * * @author Miguel Rojas */ abstract public class EditPartWithListener extends AbstractGraphicalEditPart implements PropertyChangeListener{ /* * (non-Javadoc) * @see org.eclipse.gef.EditPart#activate() */ public void activate(){ super.activate(); ((AbstractModel)getModel()).addPropertyChangeListener(this); } /* * (non-Javadoc) * @see org.eclipse.gef.EditPart#deactivate() */ public void deactivate(){ super.deactivate(); ((AbstractModel)getModel()).removePropertyChangeListener(this); } }
[ "egon.willighagen@gmail.com" ]
egon.willighagen@gmail.com
eb94db371587d516234a7eb3b6a394433ac3c6da
3671baae89ddfe8e8cdb23a72fedeeedfd2b12f8
/app/src/main/java/de/android/drawer/MenuItemCallback.java
fc620344f27d25a90ce49e7684816f9f9bd3af8f
[]
no_license
AIRAT1/TestWallpapersNew
4f86d1553c72dbc3b10f752678d57698be572f56
a70e0f6dac3ebe6294d98fbe7cfc4a2769e2c83c
refs/heads/master
2021-09-08T12:45:22.429294
2018-03-09T19:26:39
2018-03-09T19:26:39
113,476,709
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package de.android.drawer; import android.view.MenuItem; import java.util.List; public interface MenuItemCallback { void menuItemClicked(List<NavItem> action, MenuItem item, boolean requiresPurchase); }
[ "ayrat1@mail.ru" ]
ayrat1@mail.ru
01bec7855d90ed5ca0fd39ae974aea62fb803c5c
0218e5fec5e26eb2284a07f4e09e1759f7de0736
/AdapterService_xg/src/main/java/com/tecsun/sisp/adapter/modules/sbjf/service/impl/GradeServiceImpl.java
c875be126984cfe6a39d140147196f63f2dd09ee
[]
no_license
KqSMea8/Mestudy
7dd7d2bda4ea49745f2da10b18e029b086be4518
f504bdd71ee3a6341d946ca1a03a9d83b5820970
refs/heads/master
2020-04-09T06:34:03.624202
2018-12-03T01:43:38
2018-12-03T01:43:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
749
java
package com.tecsun.sisp.adapter.modules.sbjf.service.impl; import com.tecsun.sisp.adapter.modules.common.service.BaseService; import com.tecsun.sisp.adapter.modules.sbjf.entity.GradeEntity; import org.springframework.stereotype.Service; import java.util.List; /** * Created by linzetian on 2017/6/6. */ @Service("GradeServiceImpl") public class GradeServiceImpl extends BaseService { private static String NAMESPACE = "com.tecsun.sisp.adapter.modules.sbjf.service.impl.GradeServiceImpl."; /** * 获取缴费档次 */ public List<GradeEntity> list4other(String insureCode) throws Exception{ List<GradeEntity> res = this.getSqlSessionTemplate().selectList(NAMESPACE+"list",insureCode); return res; } }
[ "zengyunhuago@163.com" ]
zengyunhuago@163.com
7d5e30ead445ff62ba53e966322548cecb00261c
07b3c22b8a6f38f4d9a2a23820ecf87a924af806
/src/main/java/io/jenkins/plugins/analysis/core/views/LocalizedSeverity.java
4129574e8cd718880220082ed75c41bd60a471dd
[ "MIT" ]
permissive
JeremyMarshall/warnings-plugin
6badd97c887873d90bbf5811edaf897e0d1c0a59
4f893f50953a1489dc7bcb59ced3bdc12150eacf
refs/heads/master
2020-04-01T17:24:28.466915
2018-10-29T10:01:48
2018-10-29T10:01:48
153,427,739
0
0
MIT
2018-10-17T09:05:46
2018-10-17T09:05:45
null
UTF-8
Java
false
false
1,945
java
package io.jenkins.plugins.analysis.core.views; import edu.hm.hafner.analysis.Severity; /** * Provides localized messages for {@link Severity}. * * @author Ullrich Hafner */ public final class LocalizedSeverity { /** * Returns a localized description of the specified severity. * * @param severity * the severity to get the text for * * @return localized description of the specified severity */ public static String getLocalizedString(final Severity severity) { if (severity == Severity.ERROR) { return Messages.Severity_Short_Error(); } if (severity == Severity.WARNING_HIGH) { return Messages.Severity_Short_High(); } if (severity == Severity.WARNING_NORMAL) { return Messages.Severity_Short_Normal(); } if (severity == Severity.WARNING_LOW) { return Messages.Severity_Short_Low(); } return severity.getName(); // No i18n support for custom severities } /** * Returns a long localized description of the specified severity. * * @param severity * the severity to get the text for * * @return long localized description of the specified severity */ public static String getLongLocalizedString(final Severity severity) { if (severity == Severity.ERROR) { return Messages.Severity_Long_Error(); } if (severity == Severity.WARNING_HIGH) { return Messages.Severity_Long_High(); } if (severity == Severity.WARNING_NORMAL) { return Messages.Severity_Long_Normal(); } if (severity == Severity.WARNING_LOW) { return Messages.Severity_Long_Low(); } return severity.getName(); // No i18n support for custom severities } private LocalizedSeverity() { // prevents instantiation } }
[ "ullrich.hafner@gmail.com" ]
ullrich.hafner@gmail.com
31677c02335772002fce0dbe5d1b3f80f4593eb2
bac9f0a2368e373a1b45932d2a38577ca68de1a8
/src/main/java/com/gtafe/model/User.java
302a1341dd30b9d7be9bd3c4e86c10924ff4c0da
[]
no_license
li5220008/spring-mvc
f42ad047459b523c8328a3c6489f7b3764b20d73
ec2bd12bb9b657bed8fd1b4cafa197037dcb2303
refs/heads/master
2020-05-21T00:56:16.704658
2015-03-26T09:59:45
2015-03-26T09:59:45
18,002,025
1
0
null
null
null
null
UTF-8
Java
false
false
1,895
java
package com.gtafe.model; import java.util.Date; import java.util.List; public class User { private int id; private String username; private String password; private String nickname; private int userAge; private String userAddress; private Date birthday; private String email; List<Object> obj; public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getUserAge() { return userAge; } public void setUserAge(int userAge) { this.userAge = userAge; } public String getUserAddress() { return userAddress; } public void setUserAddress(String userAddress) { this.userAddress = userAddress; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } @Override public String toString() { return "User{" + "id=" + id + ", username='" + username + '\'' + ", password='" + password + '\'' + ", nickname='" + nickname + '\'' + ", userAge=" + userAge + ", userAddress='" + userAddress + '\'' + ", birthday=" + birthday + ", email='" + email + '\'' + '}'; } }
[ "li5220008@163.com" ]
li5220008@163.com
7c8ad6e250c83b002d0c232bb5eb2369ab13ef63
17c6abf6fdee8d97788b26a5836271e5cae44416
/src/main/java/com/illo/blm/config/ElasticsearchConfiguration.java
70ed67ebd924b16fe8371329f016a3105f2129b2
[]
no_license
mossrasmuss/blm
3f9ec311d8a806867817fcfbc19aba91485ebeea
36b5ccf2660d2ef3f97608b397045b486ee21e94
refs/heads/main
2023-01-23T02:11:47.633605
2020-11-22T12:51:59
2020-11-22T12:51:59
315,036,692
0
0
null
2020-11-22T17:07:40
2020-11-22T12:51:39
Java
UTF-8
Java
false
false
3,655
java
package com.illo.blm.config; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.github.vanroy.springdata.jest.JestElasticsearchTemplate; import com.github.vanroy.springdata.jest.mapper.DefaultJestResultsMapper; import io.searchbox.client.JestClient; import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.data.elasticsearch.core.ElasticsearchOperations; import org.springframework.data.elasticsearch.core.EntityMapper; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext; import org.springframework.data.mapping.MappingException; @Configuration @EnableConfigurationProperties(ElasticsearchProperties.class) public class ElasticsearchConfiguration { private ObjectMapper mapper; public ElasticsearchConfiguration(ObjectMapper mapper) { this.mapper = mapper; } @Bean public EntityMapper getEntityMapper() { return new CustomEntityMapper(mapper); } @Bean @Primary public ElasticsearchOperations elasticsearchTemplate( JestClient jestClient, ElasticsearchConverter elasticsearchConverter, SimpleElasticsearchMappingContext mappingContext, EntityMapper entityMapper ) { return new JestElasticsearchTemplate( jestClient, elasticsearchConverter, new DefaultJestResultsMapper(mappingContext, entityMapper) ); } public class CustomEntityMapper implements EntityMapper { private ObjectMapper objectMapper; public CustomEntityMapper(ObjectMapper objectMapper) { this.objectMapper = objectMapper; objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); objectMapper.configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, true); objectMapper.configure(SerializationFeature.INDENT_OUTPUT, false); objectMapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, true); } @Override public String mapToString(Object object) throws IOException { return objectMapper.writeValueAsString(object); } @Override public <T> T mapToObject(String source, Class<T> clazz) throws IOException { return objectMapper.readValue(source, clazz); } @Override public Map<String, Object> mapObject(Object source) { try { return objectMapper.readValue(mapToString(source), HashMap.class); } catch (IOException e) { throw new MappingException(e.getMessage(), e); } } @Override public <T> T readObject(Map<String, Object> source, Class<T> targetType) { try { return mapToObject(mapToString(source), targetType); } catch (IOException e) { throw new MappingException(e.getMessage(), e); } } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
85286787fc5a2b492d0842a8cfe0645bd952d40b
a15d4565864d8cecf88f4a9a92139c9c41578c8f
/modules/remoting/org.jowidgets.cap.remoting.client/src/main/java/org/jowidgets/cap/remoting/client/InvocationCallback.java
bc9b35cf046cca696c698ce4640d68b8398ae6e2
[]
no_license
jo-source/jo-client-platform
f4800d121df6b982639390f3507da237fc5426c1
2f346b26fa956c6d6612fef2d0ef3eedbb390d7a
refs/heads/master
2021-01-23T10:03:16.067646
2019-04-29T11:43:04
2019-04-29T11:43:04
39,776,103
2
3
null
2016-08-24T13:53:07
2015-07-27T13:33:59
Java
UTF-8
Java
false
false
3,588
java
/* * Copyright (c) 2011, grossmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the jo-widgets.org nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL jo-widgets.org BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ package org.jowidgets.cap.remoting.client; import java.io.InputStream; import java.util.ArrayList; import org.jowidgets.cap.common.api.execution.IExecutionCallback; import org.jowidgets.cap.common.api.execution.IExecutionCallbackListener; import org.jowidgets.cap.common.api.execution.IResultCallback; import org.jowidgets.invocation.service.common.api.ICancelListener; import org.jowidgets.invocation.service.common.api.IInvocationCallback; import org.jowidgets.util.io.IoUtils; final class InvocationCallback<RESULT_TYPE> implements IInvocationCallback<RESULT_TYPE> { private final IResultCallback<RESULT_TYPE> resultCallback; private final IExecutionCallback executionCallback; private final ArrayList<InputStream> inputStreams; InvocationCallback( final IResultCallback<RESULT_TYPE> resultCallback, final IExecutionCallback executionCallback, final ArrayList<InputStream> inputStreams) { this.resultCallback = resultCallback; this.executionCallback = executionCallback; this.inputStreams = inputStreams; } @Override public void addCancelListener(final ICancelListener cancelListener) { if (executionCallback != null) { executionCallback.addExecutionCallbackListener(new IExecutionCallbackListener() { @Override public void canceled() { cancelListener.canceled(); } }); } } @Override public void finished(final RESULT_TYPE result) { for (final InputStream inputStream : inputStreams) { IoUtils.tryCloseSilent(inputStream); } if (resultCallback != null) { resultCallback.finished(result); } if (executionCallback != null) { executionCallback.finshed(); } } @Override public void exeption(final Throwable exception) { for (final InputStream inputStream : inputStreams) { IoUtils.tryCloseSilent(inputStream); } if (resultCallback != null) { resultCallback.exception(exception); } if (executionCallback != null) { executionCallback.finshed(); } } }
[ "herr.grossmann@gmx.de" ]
herr.grossmann@gmx.de
ef1bae09bf2a6eed21e50ad5f66d6813230c0fb9
e8b253d2560f4d70ec8cf2ba45da7dfaca48dd98
/src/org/refactoringminer/rm2/model/SDEntity.java
7c179c7a361788528abb1c525ed0a8bca2f17af6
[]
no_license
lingmengfeng/RefactoringMiner
96357e93965afb67bdb70a54ddf7394ee1ed3ffe
1d56695679fbd4888a83d3179981f3b44fcc43f3
refs/heads/master
2021-05-07T04:31:59.479760
2017-11-16T17:37:34
2017-11-16T17:37:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,449
java
package org.refactoringminer.rm2.model; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; public abstract class SDEntity implements Comparable<SDEntity> { private int id; protected final SDModel.Snapshot snapshot; protected final String fullName; protected final EntityKey key; protected final SDContainerEntity container; protected final List<SDEntity> children; private MembersRepresentation members = null; public SDEntity(SDModel.Snapshot snapshot, int id, String fullName, EntityKey key, SDContainerEntity container) { this.snapshot = snapshot; this.id = id; this.fullName = fullName; this.key = key; this.container = container; this.children = new ArrayList<SDEntity>(); if (container != null) { this.container.children.add(this); } } public int getId() { return id; } int setId(int id) { return this.id = id; } public String fullName() { return fullName; } public EntityKey key() { return key; } public EntityKey key(SDEntity parent) { return new EntityKey(parent.key() + getNameSeparator() + simpleName()); } // public String fullName(SDEntity parent) { // return parent.fullName() + getNameSeparator() + simpleName(); // } protected abstract String getNameSeparator(); public abstract String simpleName(); public SDContainerEntity container() { return container; } public abstract boolean isTestCode(); @Override public int hashCode() { // return fullName.hashCode(); return id; } @Override public boolean equals(Object obj) { if (obj instanceof SDEntity) { SDEntity e = (SDEntity) obj; return id == e.id; //return e.fullName.equals(fullName); } return false; } @Override public String toString() { if (fullName.lastIndexOf('/') != -1) { return fullName.substring(fullName.lastIndexOf('/') + 1); } return fullName; } public Iterable<SDEntity> children() { return children; } @Override public int compareTo(SDEntity o) { return fullName.compareTo(o.fullName); } public SourceRepresentation sourceCode() { throw new UnsupportedOperationException(); } public long simpleNameHash() { long h = 0; String simpleName = this.simpleName(); for (int i = 0; i < simpleName.length(); i++) { h = 31 * h + simpleName.charAt(i); } return h; } public MembersRepresentation membersRepresentation() { if (this.members == null) { Map<Long, String> debug = new HashMap<Long, String>(); long[] hashes = new long[this.children.size()]; for (int i = 0; i < hashes.length; i++) { hashes[i] = this.children.get(i).simpleNameHash(); debug.put(hashes[i], this.children.get(i).simpleName()); } Arrays.sort(hashes); this.members = new MembersRepresentation(hashes, debug); } return this.members; } public void addReferencedBy(SDMethod method) { throw new UnsupportedOperationException(); } public void addReferencedBy(SDType type) { throw new UnsupportedOperationException(); } public void addReference(SDEntity entity) { throw new UnsupportedOperationException(); } public boolean isAnonymous() { return false; } }
[ "danilofes@gmail.com" ]
danilofes@gmail.com
3f3651c522a626b62c62a6b0f9b9e880380d5eb6
abb5d27161312d5471283f5b14de5a59b29dbc0d
/myframework/src/main/java/com/gy/myframework/Service/player/audio/service/AudioPlayService.java
09b77d0a7a4927cc31a8b360a22143c0c9633194
[]
no_license
ganyao114/RemoteOfficeShow
71f9568516d19a59e2e4a3dc0f06a24b98cd5552
e8e8c94a9d4717fee5a371b83f0082f079117dc9
refs/heads/master
2021-01-01T05:27:09.417092
2016-05-18T13:39:28
2016-05-18T13:39:28
59,119,005
0
0
null
null
null
null
UTF-8
Java
false
false
1,392
java
package com.gy.myframework.Service.player.audio.service; import android.app.Service; import android.content.Intent; import android.os.Binder; import android.os.IBinder; import android.support.annotation.Nullable; import com.gy.myframework.Service.player.audio.entity.AuPalyMode; import com.gy.myframework.Service.player.audio.entity.AudioInfoTmp; import java.io.File; /** * Created by gy on 2016/1/15. */ public class AudioPlayService extends Service implements IAuPlayerService { public IBinder mybinder; @Override public void onCreate() { super.onCreate(); mybinder = new MyBinder(); } @Override public void play(File src, AuPalyMode mode) throws Exception { } @Override public void pause() { } @Override public void resume() { } @Override public void stop() { } @Override public void switchTo(long ms) { } @Override public void switchTo(float persent) { } @Override public AudioInfoTmp getPlayInfo() { return null; } @Nullable @Override public IBinder onBind(Intent intent) { return mybinder; } public class MyBinder extends Binder{ public IAuPlayerService getService(){ return AudioPlayService.this; } } }
[ "939543405@qq.com" ]
939543405@qq.com
9b56c2f75fb2e1bdfd7aa69ca648d6fbde3d3b6d
61008c5aff00dc2b9b5d59c06d7e829b0b429090
/src/main/java/com/bytatech/ayoos/client/patient_dms/model/SitePaging2.java
c633f0e0ec7e7388d6f2ace27bdf94d45a6f2692
[]
no_license
tayduivn/PATIENT-MICROSERVICE
85f6830a9d44087a96b27920393020865ab578d4
462ddc45881a0733940d2031d0045af14bf5239d
refs/heads/master
2022-11-13T17:50:59.065477
2019-10-31T07:58:27
2019-10-31T07:58:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,868
java
package com.bytatech.ayoos.client.patient_dms.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; import javax.validation.constraints.*; /** * SitePaging */ @Validated @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-05-10T09:58:46.053+05:30[Asia/Kolkata]") public class SitePaging2 { @JsonProperty("list") private Object list = null; /* public SitePaging list(Object list) { this.list = list; return this; } */ /** * Get list * @return list **/ @ApiModelProperty(required = true, value = "") @NotNull public Object getList() { return list; } public void setList(Object list) { this.list = list; } /*@Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SitePaging sitePaging = (SitePaging) o; return Objects.equals(this.list, sitePaging.list); } */ @Override public int hashCode() { return Objects.hash(list); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SitePaging {\n"); sb.append(" list: ").append(toIndentedString(list)).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 "); } }
[ "abdul.rafeek@lxisoft.com" ]
abdul.rafeek@lxisoft.com
fc91c277201745a962b4ea01e51a385a0634e8a7
5dd54d9de6968be56dc8e3fe44d023ea9c31e8d8
/src/main/java/com/ifelze/lms/security/AjaxAuthenticationSuccessHandler.java
da70c1a2bb64d5dca6ee46b6cf21c207cf6cd3a7
[]
no_license
Ifelze/ilms2
b7100b812b3367399883e0149d4401a2c803522b
261e59782ccbbe9290e18999e02e45d2d9fe1e2f
refs/heads/master
2021-07-13T02:02:51.371625
2017-01-11T08:11:01
2017-01-11T08:11:01
74,081,647
0
1
null
2020-09-18T15:50:09
2016-11-18T01:04:20
CSS
UTF-8
Java
false
false
839
java
package com.ifelze.lms.security; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; import org.springframework.stereotype.Component; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * Spring Security success handler, specialized for Ajax requests. */ @Component public class AjaxAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { response.setStatus(HttpServletResponse.SC_OK); } }
[ "naga@ifelze.com" ]
naga@ifelze.com
a9da40ef36d973d09d016539ecd8a4b0cfd696f0
9cd474ff195074d2fa31cc6062e86ebd98e83329
/com.spark.psi.order.browser/src/com/spark/psi/order/browser/distribute/DistributeInfoWindow.java
cbd37fd684bc71990d82a1199b94b9ccaae4b0ab
[]
no_license
jideas/spark-whxc-psi
543c24abe53b3243876f4a90198fd2a18276562a
cb3160395c61421685a110628da1d82a761d483f
refs/heads/master
2021-01-10T09:07:46.430871
2013-05-11T13:46:55
2013-05-11T13:46:55
47,181,021
0
0
null
null
null
null
GB18030
Java
false
false
4,564
java
package com.spark.psi.order.browser.distribute; import com.jiuqi.dna.core.Context; import com.jiuqi.dna.core.type.GUID; import com.jiuqi.dna.ui.common.constants.JWT; import com.jiuqi.dna.ui.wt.graphics.Color; import com.jiuqi.dna.ui.wt.graphics.Point; import com.jiuqi.dna.ui.wt.layouts.GridData; import com.jiuqi.dna.ui.wt.layouts.GridLayout; import com.jiuqi.dna.ui.wt.widgets.Composite; import com.jiuqi.dna.ui.wt.widgets.Control; import com.jiuqi.dna.ui.wt.widgets.Label; import com.spark.common.components.table.SContentProvider; import com.spark.common.components.table.SLabelProvider; import com.spark.common.components.table.SNumberLabelProvider; import com.spark.common.components.table.STable; import com.spark.common.components.table.STableColumn; import com.spark.common.components.table.STableStatus; import com.spark.common.components.table.STableStyle; import com.spark.portal.browser.SMenuWindow; public class DistributeInfoWindow extends SMenuWindow { public DistributeInfoWindow(Control owner) { super(null, owner, Style.InfoWindow, Direction.Down, ActiveMode.Program); Composite contentArea = this.getContentArea(); GridLayout gl = new GridLayout(); gl.marginTop = gl.marginBottom = 5; gl.marginLeft = gl.marginRight = 5; contentArea.setLayout(gl); } public void refresh(String goodsItemInfo, String unAllocateCount, Item[] items, Point location) { // contentArea.clear(); contentArea.layout(); // Label label = new Label(contentArea); label.setText(goodsItemInfo); label = new Label(contentArea); label.setText("未分配数量:"+unAllocateCount); // TableProvider tableProvider = new TableProvider(items); STableColumn[] columns = new STableColumn[3]; columns[0] = new STableColumn("Name", 240, JWT.LEFT, "仓库名称"); columns[1] = new STableColumn("AvailableCount", 120, JWT.RIGHT, "可用数量"); columns[2] = new STableColumn("DistributeCount", 120, JWT.RIGHT, "已分配数量"); STableStyle tableStyle = new STableStyle(); tableStyle.setPageAble(false); // int n = items.length > 5 ? 5 : items.length; int tableHeight = tableStyle.getHeaderHeight() + tableStyle.getRowHeight() * n; // GridData gd = new GridData(); gd.widthHint = 480; gd.heightHint = tableHeight - 1; // if (items.length <= 5) { tableStyle.setNoScroll(true); gd.heightHint = tableHeight - 1; } else { gd.widthHint = 500; } // STable table = new STable(contentArea, columns, tableStyle); table.setContentProvider(tableProvider); table.setLabelProvider(tableProvider); table.render(); // table.setLayoutData(gd); // showMenu(location.x, location.y, 10, 25); } private static class TableProvider implements SContentProvider, SLabelProvider, SNumberLabelProvider { private Item[] items; public TableProvider(Item[] items) { this.items = items; } public Object[] getElements(Context context, STableStatus tablestatus) { return items; } public String getElementId(Object element) { Item item = (Item) element; return item.storeId.toString(); } public String getText(Object element, int columnIndex) { Item item = (Item) element; switch (columnIndex) { case 0: return item.storeName; case 1: return item.availableCount; case 2: return item.distributeCount; } return ""; } public int getDecimal(Object element, int columnIndex) { Item item = (Item) element; if (columnIndex > 0) { return item.decimal; } return -1; } // /////////// public boolean isSelected(Object element) { return false; } public boolean isSelectable(Object element) { return true; } public Color getBackground(Object element, int columnIndex) { return null; } public String getToolTipText(Object element, int columnIndex) { return null; } public Color getForeground(Object element, int columnIndex) { return null; } } public static class Item { private GUID storeId; private String storeName; private String availableCount; private String distributeCount; private int decimal; public Item(GUID storeId, String storeName, String availableCount, String distributeCount, int decimal) { super(); this.storeId = storeId; this.storeName = storeName; this.availableCount = availableCount; this.distributeCount = distributeCount; this.decimal = decimal; } } }
[ "weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454" ]
weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454
644bb3a0a97634b26cf5a4f99f45459e57aed1f5
cd5d72dd200c69f04b60d5d2844e52e4269b9d23
/src/main/java/com/itcalf/renhe/eventbusbean/FinishActivityEvent.java
0dc639a0b26e8bf74d81f32a1af5e109ca2ee88c
[]
no_license
TAEYANG9527/myHlProject
39a34f9f8936a5fb198b99ebb5ad72dae0aaaef6
926fd23afb581466a696b57619caaa7cb0928d44
refs/heads/master
2020-12-25T10:37:47.554659
2016-07-20T02:43:00
2016-07-20T02:43:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
163
java
package com.itcalf.renhe.eventbusbean; /** * Created by wangning on 2016/5/13. */ public class FinishActivityEvent { public FinishActivityEvent() { } }
[ "280832809@qq.com" ]
280832809@qq.com
9f3ad8d3ba65d7702218b1ff4a507e35c6c3abc4
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/dao/DaoStmtExec.java
2bd632995d23baffc1bce6a24535d62d3ddcdfa4
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
295
java
package br.com.mind5.dao; import java.sql.SQLException; import java.util.List; import br.com.mind5.info.InfoRecord; public interface DaoStmtExec<T extends InfoRecord> { public void executeStmt() throws SQLException; public List<T> getResultset(); public void close(); }
[ "mmaciel@mind5.com" ]
mmaciel@mind5.com
471a90892662ca257faf902ed2643bbf0268a270
19d3210f0aeba87976e9f73a7778463a8ed57a96
/app/src/main/java/com/mualab/org/user/activity/tag_module/adapters/ServiceAdapter.java
90c384805483afe67bba62d38884387b3688de56
[]
no_license
anilmindiii/Koobi
9b3434b5e986ab1b5a6a79c991231d7b54a07c76
d3270c4acbbd96f4a6e6c0afacec6a0e7f49099a
refs/heads/master
2020-05-02T18:34:39.913262
2019-08-12T05:34:24
2019-08-12T05:34:24
170,526,841
0
0
null
null
null
null
UTF-8
Java
false
false
4,139
java
package com.mualab.org.user.activity.tag_module.adapters; import android.os.SystemClock; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.mualab.org.user.R; import com.mualab.org.user.activity.tag_module.callback.ServiceClickListener; import com.mualab.org.user.activity.tag_module.models.ServiceTagBean; import java.util.List; public class ServiceAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private final int FEED_TYPE = 1; private final int VIEW_TYPE_LOADING = 2; private boolean showLoader; private long mLastClickTime = 0; private List<ServiceTagBean> serviceTagList; private ServiceClickListener listener; public ServiceAdapter(List<ServiceTagBean> serviceTagList) { this.serviceTagList = serviceTagList; } public void setListener(ServiceClickListener listener) { this.listener = listener; } public void showHideLoading(boolean bool) { showLoader = bool; } public void clear() { final int size = serviceTagList.size(); serviceTagList.clear(); notifyItemRangeRemoved(0, size); } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view; switch (viewType) { case FEED_TYPE: return new Holder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_service_tag_list, parent, false)); /* case VIEW_TYPE_LOADING: view = LayoutInflater.from(parent.getContext()).inflate(R.layout.load_more_view, parent, false); return new FooterLoadingViewHolder(view);*/ } return null; } @Override public int getItemViewType(int position) { ServiceTagBean feed = serviceTagList.get(position); return feed == null ? VIEW_TYPE_LOADING : FEED_TYPE; } @Override public int getItemCount() { return serviceTagList.size(); } public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder, int position) { /*if (holder instanceof FooterLoadingViewHolder) { FooterLoadingViewHolder loaderViewHolder = (FooterLoadingViewHolder) holder; if (showLoader) { loaderViewHolder.progressBar.setVisibility(View.VISIBLE); } else { loaderViewHolder.progressBar.setVisibility(View.GONE); } return; }*/ final ServiceTagBean searchTag = serviceTagList.get(position); final Holder h = ((Holder) holder); h.tvName.setText(searchTag.title); h.tvServiceAmt.setText(h.tvServiceAmt.getContext().getString(R.string.pond_symbol) .concat(searchTag.inCallPrice.equals("0.0") || searchTag.inCallPrice.isEmpty() ? searchTag.outCallPrice : searchTag.inCallPrice)); h.tvServiceTime.setText(searchTag.completionTime); } private class Holder extends RecyclerView.ViewHolder implements View.OnClickListener { private TextView tvName, tvServiceTime, tvServiceAmt; private Holder(View itemView) { super(itemView); tvName = itemView.findViewById(R.id.tvName); tvServiceAmt = itemView.findViewById(R.id.tvServiceAmt); tvServiceTime = itemView.findViewById(R.id.tvServiceTime); itemView.setOnClickListener(this); } @Override public void onClick(View v) { if (SystemClock.elapsedRealtime() - mLastClickTime < 700) { return; } mLastClickTime = SystemClock.elapsedRealtime(); int pos = getAdapterPosition(); if (serviceTagList.size() > pos) { ServiceTagBean searchTag = serviceTagList.get(getAdapterPosition()); if (listener != null) listener.onServiceClicked(searchTag, getAdapterPosition()); } } } }
[ "neha.mindiii@gmail.com" ]
neha.mindiii@gmail.com
3990bdb4e1d2d1c4f864bc46c99d7629009a4bb0
f37e1ca927e235dc751841b8f36e0873b1b37810
/tat-core-data/src/main/java/com/retirement/tat/core/data/entity/TipEntity.java
91129e269e06b8d017ba6726f8477581c9535e7b
[]
no_license
saintkarl/tat
90906c744d443407e04c22015ecf4887223ddefd
ced44fa56d3ba72552f493af5f085170d9422c14
refs/heads/master
2021-01-11T00:44:57.683820
2016-11-09T13:50:18
2016-11-09T13:50:18
70,495,122
0
0
null
null
null
null
UTF-8
Java
false
false
4,893
java
package com.retirement.tat.core.data.entity; import javax.persistence.*; import java.sql.Timestamp; /** * Created by khanhcq on 16-Oct-16. */ @Entity @Table(name = "tip") public class TipEntity { private Long tipId; private String title; private String description; private String thumbnail; private String content; private String tags; private String source; private TipCategoryEntity tipCategory; private UsersEntity createdBy; private Timestamp createdDate; private Timestamp modifiedDate; @Id @Column(name = "tipid") @GeneratedValue(strategy = GenerationType.IDENTITY) public Long getTipId() { return tipId; } public void setTipId(Long tipId) { this.tipId = tipId; } @Basic @Column(name = "title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Basic @Column(name = "description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Basic @Column(name = "thumbnail") public String getThumbnail() { return thumbnail; } public void setThumbnail(String thumbnail) { this.thumbnail = thumbnail; } @Basic @Column(name = "content") public String getContent() { return content; } public void setContent(String content) { this.content = content; } @Basic @Column(name = "tags") public String getTags() { return tags; } public void setTags(String tags) { this.tags = tags; } @Basic @Column(name = "source") public String getSource() { return source; } public void setSource(String source) { this.source = source; } @ManyToOne @JoinColumn(name = "createdby", referencedColumnName = "userid", nullable = false) public UsersEntity getCreatedBy() { return createdBy; } public void setCreatedBy(UsersEntity createdBy) { this.createdBy = createdBy; } @ManyToOne @JoinColumn(name = "categoryid", referencedColumnName = "tipcategoryid", nullable = false) public TipCategoryEntity getTipCategory() { return tipCategory; } public void setTipCategory(TipCategoryEntity tipCategory) { this.tipCategory = tipCategory; } @Basic @Column(name = "createddate") public Timestamp getCreatedDate() { return createdDate; } public void setCreatedDate(Timestamp createdDate) { this.createdDate = createdDate; } @Basic @Column(name = "modifieddate") public Timestamp getModifiedDate() { return modifiedDate; } public void setModifiedDate(Timestamp modifiedDate) { this.modifiedDate = modifiedDate; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TipEntity tipEntity = (TipEntity) o; if (tipId != tipEntity.tipId) return false; if (title != null ? !title.equals(tipEntity.title) : tipEntity.title != null) return false; if (description != null ? !description.equals(tipEntity.description) : tipEntity.description != null) return false; if (thumbnail != null ? !thumbnail.equals(tipEntity.thumbnail) : tipEntity.thumbnail != null) return false; if (content != null ? !content.equals(tipEntity.content) : tipEntity.content != null) return false; if (tags != null ? !tags.equals(tipEntity.tags) : tipEntity.tags != null) return false; if (source != null ? !source.equals(tipEntity.source) : tipEntity.source != null) return false; if (createdDate != null ? !createdDate.equals(tipEntity.createdDate) : tipEntity.createdDate != null) return false; if (modifiedDate != null ? !modifiedDate.equals(tipEntity.modifiedDate) : tipEntity.modifiedDate != null) return false; return true; } @Override public int hashCode() { int result = (int) (tipId ^ (tipId >>> 32)); result = 31 * result + (title != null ? title.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (thumbnail != null ? thumbnail.hashCode() : 0); result = 31 * result + (content != null ? content.hashCode() : 0); result = 31 * result + (tags != null ? tags.hashCode() : 0); result = 31 * result + (source != null ? source.hashCode() : 0); result = 31 * result + (createdDate != null ? createdDate.hashCode() : 0); result = 31 * result + (modifiedDate != null ? modifiedDate.hashCode() : 0); return result; } }
[ "khanh.chu@hoanghoacgroup.com" ]
khanh.chu@hoanghoacgroup.com
a898a6480bd972f72bf74d4ed9383c9856935e7e
429d69a746b8082180a7591b34826b29e4a7f6f9
/LauraLopezMensaje/src/vistaGUI/Interfaz.java
dcaebf42a5654a6d8d584b3c0d073811cffc4adb
[]
no_license
uebprogramacion1/Parcial2
441a8b6cb9f1b5e879d080a5f8b76fc005411e48
6decfb4071cebf9d10a08cd45d7c615f4f4ff211
refs/heads/master
2020-08-03T18:35:23.511527
2019-09-30T12:04:12
2019-09-30T12:04:12
150,153,211
0
1
null
null
null
null
UTF-8
Java
false
false
201
java
package vistaGUI; import javax.swing.JOptionPane; public class Interfaz{ public void escribirDato(String cofreMagico) { JOptionPane.showMessageDialog(null, cofreMagico); } }
[ "rcamargol@unbosque.edu.co" ]
rcamargol@unbosque.edu.co
39ac81f9e11c10ce269e831a89b64872c72fcdad
7c88e6cd7c2604a9bfebd197a9f192bdddfbcb7c
/Java/src/main/java/DesignPattern/Factory/package-info.java
497dd38816936d7ba4545aec21999fd0c6d05bc0
[]
no_license
fcy-nienan/Image
1bca0a42085d681f73f41420a242e2c4b542f0e7
168bc4b5a50d5887693ac4ac44bbee3447e84105
refs/heads/develop
2022-12-24T04:33:53.026049
2022-07-27T16:31:10
2022-07-27T16:31:10
154,528,986
0
0
null
2022-12-16T01:43:43
2018-10-24T15:56:29
Java
UTF-8
Java
false
false
377
java
/* * 工厂模式 * 普通工厂 通过switch生成对象 * 静态工厂 通过静态方法生成对象 * 抽象工厂 通过多个类生成对象 * * 可以看出三种分别是 代码级别的分离 方法级别的分离 类级别的分离 * 最后一种是工厂的工厂 也是代码级别的分离工厂对象 * */ package DesignPattern.Factory;
[ "807715333@qq.com" ]
807715333@qq.com
e1abd5c7142e89848cccf013d89dd20eadd8e2c0
705c8229db46162f1809fee66e6014a36d3ca1c4
/src/main/java/com/hawksoft/platform/entity/Video.java
a6cfda3eba8e27ce0f24eb3c8865d0e930b352d2
[]
no_license
RoastEgg/intelligence_water
df4ff03d0baf37285e6651ee5a916c5c2b73e80f
6d663c97a9b72d4374b80e62a18d3f478f311df6
refs/heads/master
2021-04-12T08:32:45.099921
2019-03-12T06:29:07
2019-03-12T06:29:07
126,186,888
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package com.hawksoft.platform.entity; public class Video { private int id;//主键,自增 private int sthId;//站点ID private String type;//视频类型 private String url;//视频URL public int getId() { return id; } public void setId(int id) { this.id = id; } public int getSthId() { return sthId; } public void setSthId(int sthId) { this.sthId = sthId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "hzluhailong@163.com" ]
hzluhailong@163.com
67bc00d3a82cffede969d10276498a38219374ca
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.userserver2-UserServer2/sources/retrofit/android/AndroidLog.java
245495559ac26fd748aead04059651ffb55669ab
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
651
java
package retrofit.android; import retrofit.RestAdapter; public class AndroidLog implements RestAdapter.Log { public static final int LOG_CHUNK_SIZE = 4000; public final String tag; public AndroidLog(String str) { this.tag = str; } public String getTag() { return this.tag; } @Override // retrofit.RestAdapter.Log public final void log(String str) { int length = str.length(); int i = 0; while (i < length) { int i2 = i + 4000; str.substring(i, Math.min(length, i2)); i = i2; } } public void logChunk(String str) { } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
d29816746855c40ff5e8a44f61969b6671ea1e29
62eb3c0b32011d43e3bd201d9007e18a75d92506
/src/main/java/com/cloudhopper/smpp/impl/DefaultSmppSessionHandler.java
c7de67fbcea32dfdd7239eb0456f20d13ea55262
[ "Apache-2.0" ]
permissive
bbanko/cloudhopper-smpp
0443bf29509dd350de34df245420219c45bfe0bb
5f5c1a92e8c42f588c9f379a8f2defb32f0021a1
refs/heads/master
2021-01-18T05:27:58.516132
2012-02-14T13:24:33
2012-02-14T13:24:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,595
java
/** * Copyright (C) 2011 Twitter, Inc. * * 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.cloudhopper.smpp.impl; import com.cloudhopper.smpp.PduAsyncResponse; import com.cloudhopper.smpp.SmppSessionHandler; import com.cloudhopper.smpp.pdu.PduRequest; import com.cloudhopper.smpp.pdu.PduResponse; import com.cloudhopper.smpp.type.RecoverablePduException; import com.cloudhopper.smpp.type.UnrecoverablePduException; import java.nio.channels.ClosedChannelException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Default implementation that provides empty implementations of all required * methods. Users are free to subclass this class to only override the methods * they require to specialize. * * @author joelauer (twitter: @jjlauer or <a href="http://twitter.com/jjlauer" target=window>http://twitter.com/jjlauer</a>) */ public class DefaultSmppSessionHandler implements SmppSessionHandler { private final Logger logger; public DefaultSmppSessionHandler() { this(LoggerFactory.getLogger(DefaultSmppSessionHandler.class)); } public DefaultSmppSessionHandler(Logger logger) { this.logger = logger; } @Override public String lookupResultMessage(int commandStatus) { return null; } @Override public String lookupTlvTagName(short tag) { return null; } @Override public void fireChannelUnexpectedlyClosed() { logger.info("Default handling is to discard an unexpected channel closed"); } @Override public PduResponse firePduRequestReceived(PduRequest pduRequest) { logger.warn("Default handling is to discard unexpected request PDU: {}", pduRequest); return null; } @Override public void fireExpectedPduResponseReceived(PduAsyncResponse pduAsyncResponse) { logger.warn("Default handling is to discard expected response PDU: {}", pduAsyncResponse); } @Override public void fireUnexpectedPduResponseReceived(PduResponse pduResponse) { logger.warn("Default handling is to discard unexpected response PDU: {}", pduResponse); } @Override public void fireUnrecoverablePduException(UnrecoverablePduException e) { logger.warn("Default handling is to discard a unrecoverable exception:", e); } @Override public void fireRecoverablePduException(RecoverablePduException e) { logger.warn("Default handling is to discard a recoverable exception:", e); } @Override public void fireUnknownThrowable(Throwable t) { if (t instanceof ClosedChannelException) { logger.warn("Unknown throwable received, but it was a ClosedChannelException, calling fireChannelUnexpectedlyClosed instead"); fireChannelUnexpectedlyClosed(); } else { logger.warn("Default handling is to discard an unknown throwable:", t); } } @Override public void firePduRequestExpired(PduRequest pduRequest) { logger.warn("Default handling is to discard expired request PDU: {}", pduRequest); } }
[ "joe@lauer.bz" ]
joe@lauer.bz
d878234e691404221be3a983e1f109f2338638b0
ba576cf48df6193c62c13424931b2050b42aef25
/ex04_01/src/ex04_01/Example01.java
e813eaa77c69f954ae4ee26e53ec294249a91018
[]
no_license
jeon9825/grade2_java2
7d8e50c20a9b57253b55d1bf8919c9a031bf1879
094f2fa158175d8ecaa295774667288f990c5c6b
refs/heads/master
2021-06-07T03:31:50.382005
2020-10-02T07:31:51
2020-10-02T07:31:51
148,075,837
0
0
null
null
null
null
UHC
Java
false
false
1,684
java
package ex04_01; //collection 실습문제 import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.Stack; public class Example01 { static void printCollection(String s, Collection<String> c) { String[] a = c.toArray(new String[0]); Arrays.sort(a); System.out.printf("%s: %s\n", s, Arrays.toString(a)); } public static void main(String[] args) { Collection<String> c1 = new Stack<String>(); Collection<String> c2 = new LinkedList<String>(); Collection<String> c3 = new ArrayList<String>(); for (int i = 0; i < 20; i += 2) { String s = String.format("%02d", i); c1.add(s); } printCollection("c1 (2의 배수)", c1); for (int i = 0; i < 20; i += 3) { String s = String.format("%02d", i); c2.add(s); } printCollection("c2 (3의 배수)", c2); // 교집합 c3.clear(); // c3.addAll(c1); // c3.retainAll(c2); for (String s : c1) { if (c2.contains(s)) { c3.add(s); } } printCollection("c1, c2 교집합", c3); // c1-c2 c3.clear(); // c3.addAll(c1); // c3.removeAll(c2); for (String s : c1) { if (!(c2.contains(s))) { c3.add(s); } } printCollection("c1, c2 차집합", c3); // c2-c1 c3.clear(); // c3.addAll(c2); // c3.removeAll(c1); for (String s : c2) { if (!(c1.contains(s))) { c3.add(s); } } printCollection("c2, c1 차집합", c3); // 합집합 c3.clear(); // c3.addAll(c1); // c3.removeAll(c2); // c3.addAll(c2); for (String s1 : c1) { c3.add(s1); } for (String s2 : c2) { if (!(c3.contains(s2))) { c3.add(s2); } } printCollection("c1, c2 합집합", c3); } }
[ "jeon9825@naver.com" ]
jeon9825@naver.com
4b002416ad7cafcb1811e48eeb30507c81381f06
0fa0f18d3718fcaa09e943ccd8a842587165a1ec
/src/Shopping/SwagLabs.java
3dbcdfd75b3b4f5b417216984a54643ef58899b9
[]
no_license
Sridhar2593/TestNGExample
bbb94e6e4fd54e9b7eed2051e95a973b810b33ba
51c0b17c6a90642e21d61dc03c73485bfa12184f
refs/heads/master
2023-06-01T14:22:09.617039
2021-06-26T06:59:35
2021-06-26T06:59:35
378,583,695
0
0
null
null
null
null
UTF-8
Java
false
false
2,971
java
package Shopping; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeTest; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; import com.relevantcodes.extentreports.ExtentReports; import com.relevantcodes.extentreports.ExtentTest; import com.relevantcodes.extentreports.LogStatus; import test.LoginTest; import test.ShoppingTest; public class SwagLabs { WebDriver driver; ExtentReports report; ExtentTest test; //SoftAssert soft = new SoftAssert(); //============== WebElements =================== @FindBy(xpath="//input[@id='user-name']") WebElement UserName; @FindBy(xpath="//input[@id='password']") WebElement Password; @FindBy(xpath= "//input[@id='login-button']") WebElement Login; @FindBy(xpath= "//button[@id='add-to-cart-sauce-labs-backpack']") WebElement addCart; @FindBy(xpath= "//a[@class='shopping_cart_link']") WebElement ShoppingCart; @FindBy(xpath= "//div[@class='inventory_item_name']") WebElement CartCheck; //============== Constructor =================== public SwagLabs() { driver = ShoppingTest.driver; report = ShoppingTest.report; test = ShoppingTest.test; PageFactory.initElements(driver, this); } public void LoginTest(String uname, String pass) { test = report.startTest("Login Test Case"); UserName.sendKeys(uname); test.log(LogStatus.PASS, "Successfully enter the UserName"); Password.sendKeys(pass); test.log(LogStatus.PASS, "Successfully enter the Password"); Login.click(); test.log(LogStatus.PASS, "Successfully clicked on the Login Link"); } @Test(dependsOnMethods="LoginTest") public void AddtoCart() { WebDriverWait wait = new WebDriverWait(driver,30); //--- Explicit Wait wait.until(ExpectedConditions.elementToBeClickable(addCart)); addCart.click(); test.log(LogStatus.PASS, "Successfully Added item to Cart"); ShoppingCart.click(); test.log(LogStatus.PASS, "Successfully clicked on the Shopping cart Link"); String ItemCartCheck = CartCheck.getText(); String ExpectedItem = "Sauce Labs Backpack"; Assert.assertTrue(CartCheck.isDisplayed()); try { Assert.assertEquals(ItemCartCheck, ExpectedItem); test.log(LogStatus.PASS, "Expected and Actual value matches"); }catch(Throwable e) { test.log(LogStatus.FAIL, "Expected and Actual value does not match"); } } }
[ "you@example.com" ]
you@example.com
f61108ad877d7c9539bf4a2b3945bb0a13032488
eff9d1e6ce4032c7a2618cf8b40922401f3d1ce0
/ls-bigdata-learn/ls-hadoop/src/main/java/com/ls/hadoop/wordcount/WordCount.java
3fa75b4431b386634ad8c240fda985a538912e8e
[]
no_license
lishuai2016/all
67d8ff5db911ca5c38b249172d3dcbf4234d49d7
aa7d6774611c21e126e628268a6abd020138974f
refs/heads/master
2022-12-09T11:03:08.571479
2019-08-18T16:38:41
2019-08-18T16:38:44
200,311,974
5
4
null
2022-11-16T07:57:51
2019-08-03T00:08:21
Java
UTF-8
Java
false
false
4,060
java
package com.ls.hadoop.wordcount; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.input.NLineInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import java.io.IOException; import java.util.StringTokenizer; public class WordCount { /** map * 输入为key:value key 一行的起始偏移量,这里为Object类型的key ,一行的文本内容Text作为value,这里为Text类型的value * 输出也是为key:value key为每个切分的单词,value为1,单词的计数 */ public static class TokenizerMapper extends Mapper<Object, Text, Text, IntWritable> { private final static IntWritable one = new IntWritable(1); private Text word = new Text(); public void map(Object key, Text value, Context context) throws IOException, InterruptedException { //StringTokenizer是字符串分隔解析类型,分隔符是“空格”、“制表符(‘\t’)”、“换行符(‘\n’)”、“回车符(‘\r’)” //这里输入数据为空格分割数据 StringTokenizer itr = new StringTokenizer(value.toString()); while (itr.hasMoreTokens()) { word.set(itr.nextToken()); context.write(word, one); //每个切分的单词计数为1 } } } /** * reduce方法提供给reduce task进程来调用 * * reduce task会将shuffle阶段分发过来的大量kv数据对进行聚合,聚合的机制是相同key的kv对聚合为一组 * 然后reduce task对每一组聚合kv调用一次我们自定义的reduce方法 * 比如:<hello,1><hello,1><hello,1><tom,1><tom,1><tom,1> * hello组会调用一次reduce方法进行处理,tom组也会调用一次reduce方法进行处理 * 调用时传递的参数: * key:一组kv中的key * values:一组kv中所有value的迭代器 */ public static class IntSumReducer extends Reducer<Text, IntWritable, Text, IntWritable> { private IntWritable result = new IntWritable(); public void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException { int sum = 0; //通过value这个迭代器,遍历这一组kv中所有的value,进行累加 for (IntWritable val : values) { sum += val.get(); } result.set(sum); context.write(key, result);//输出这个单词的统计结果 } } public static void main(String[] args) throws Exception { if (args == null || args.length < 3) { args[0] = "wordcount"; args[1] = "/input/word.txt"; args[2] = "/output/wordcountpara1"; } Configuration conf = new Configuration(); Job job = Job.getInstance(conf, args[0]); //重要:指定本job所在的jar包 job.setJarByClass(WordCount.class); //设置wordCountJob所用的mapper逻辑类为哪个类 job.setMapperClass(TokenizerMapper.class); job.setCombinerClass(IntSumReducer.class); //设置wordCountJob所用的reducer逻辑类为哪个类 job.setReducerClass(IntSumReducer.class); //设置map阶段输出的kv数据类型(可以不设置) job.setMapOutputKeyClass(Text.class); job.setMapOutputValueClass(IntWritable.class); //设置最终输出的kv数据类型 job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); job.setInputFormatClass(NLineInputFormat.class); // 输入文件路径 FileInputFormat.addInputPath(job, new Path(args[1])); // 输出文件路径 FileOutputFormat.setOutputPath(job, new Path(args[2])); //提交job给hadoop集群 System.exit(job.waitForCompletion(true) ? 0 : 1); } }
[ "1830473670@qq.com" ]
1830473670@qq.com
5f388f566cc2062161a7f386cb1608586e4e93f2
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/response/KoubeiMarketingAdvertisingModifyResponse.java
e46ec9b6d16b48615bc19bee1421f26bcbbb561a
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
693
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.advertising.modify response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiMarketingAdvertisingModifyResponse extends AlipayResponse { private static final long serialVersionUID = 3396545914858748193L; /** * 正常操作返回当前操作的广告id。如果操作失败,返回的广告id为空 */ @ApiField("ad_id") private String adId; public void setAdId(String adId) { this.adId = adId; } public String getAdId( ) { return this.adId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
7d4a6cd12ebc86f9f75e34c6740f87186c34eb72
cdbd53ceb24f1643b5957fa99d78b8f4efef455a
/vertx-pin/zero-atom/src/main/java/io/vertx/tp/error/_417DataRowNullException.java
1e71af7d427d9a326ae4e80f1606616da0489a34
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
chundcm/vertx-zero
f3dcb692ae6b9cc4ced52386cab01e5896e69d80
d2a2d096426c30d90be13b162403d66c8e72cc9a
refs/heads/master
2023-04-27T18:41:47.489584
2023-04-23T01:53:40
2023-04-23T01:53:40
244,054,093
0
0
Apache-2.0
2020-02-29T23:00:59
2020-02-29T23:00:58
null
UTF-8
Java
false
false
521
java
package io.vertx.tp.error; import io.vertx.core.http.HttpStatusCode; import io.vertx.up.exception.WebException; public class _417DataRowNullException extends WebException { public _417DataRowNullException(final Class<?> clazz, final String identifier) { super(clazz, identifier); } @Override public int getCode() { return -80533; } @Override public HttpStatusCode getStatus() { return HttpStatusCode.EXPECTATION_FAILED; } }
[ "silentbalanceyh@126.com" ]
silentbalanceyh@126.com
a62ee7188a971c46256b2beb354523030da562fc
f65d8efd8488c3f26ec272067534453916bb433b
/jdk8-study/src/main/java/org/woodwhales/stream/code05ObjectMethodReference/MethodRerObject.java
e05bf897719a945eb9e4b0c95ee225d98a0e9f2c
[ "WTFPL" ]
permissive
woodwhales/woodwhales-study
3c63d08e7aff503484905ea857ba389d5ee972d6
d8b95c559d3223b54211418bce78b9d9d41f9b08
refs/heads/master
2023-03-04T16:04:59.516245
2022-08-21T07:16:20
2022-08-21T07:16:20
184,915,908
2
3
WTFPL
2023-03-01T03:42:52
2019-05-04T16:00:32
Java
UTF-8
Java
false
false
274
java
package org.woodwhales.stream.code05ObjectMethodReference; public class MethodRerObject { //定义一个成员方法,传递字符串,把字符串按照大写输出 public void printUpperCaseString(String str){ System.out.println(str.toUpperCase()); } }
[ "woodwhales@163.com" ]
woodwhales@163.com
f7c5707d7343005c9f6a1c6e6e990b1e8e39945c
a85d2dccd5eab048b22b2d66a0c9b8a3fba4d6c2
/rebellion_h5_realm/java/l2r/gameserver/network/serverpackets/ExShowLines.java
0d2e39d715903b019665020ddfbc1fc32a9228f9
[]
no_license
netvirus/reb_h5_storm
96d29bf16c9068f4d65311f3d93c8794737d4f4e
861f7845e1851eb3c22d2a48135ee88f3dd36f5c
refs/heads/master
2023-04-11T18:23:59.957180
2021-04-18T02:53:10
2021-04-18T02:53:10
252,070,605
0
0
null
2021-04-18T02:53:11
2020-04-01T04:19:39
HTML
UTF-8
Java
false
false
197
java
package l2r.gameserver.network.serverpackets; public class ExShowLines extends L2GameServerPacket { @Override protected void writeImpl() { writeEx(0xA5); // TODO hdcc cx[ddd] } }
[ "l2agedev@gmail.com" ]
l2agedev@gmail.com
3459baa8759a0da02f450f2748345db84f4793ed
06bb1087544f7252f6a83534c5427975f1a6cfc7
/modules/cesecore-common/src/org/cesecore/keys/token/CryptoTokenClassNotFoundException.java
24d60761c1383ca78b1fa727166a50ca7ec21edc
[]
no_license
mvilche/ejbca-ce
65f2b54922eeb47aa7a132166ca5dfa862cee55b
a89c66218abed47c7b310c3999127409180969dd
refs/heads/master
2021-03-08T08:51:18.636030
2020-03-12T18:53:18
2020-03-12T18:53:18
246,335,702
1
0
null
null
null
null
UTF-8
Java
false
false
1,649
java
/************************************************************************* * * * EJBCA Community: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.cesecore.keys.token; /** * Thrown when trying to instantiate an unknown crypto token class. * * @version $Id: CryptoTokenClassNotFoundException.java 20648 2015-02-10 14:19:39Z aveen4711 $ * */ public class CryptoTokenClassNotFoundException extends RuntimeException { private static final long serialVersionUID = -7935523503522491237L; public CryptoTokenClassNotFoundException() { super(); } public CryptoTokenClassNotFoundException(String message, Throwable cause) { super(message, cause); } public CryptoTokenClassNotFoundException(String message) { super(message); } public CryptoTokenClassNotFoundException(Throwable cause) { super(cause); } }
[ "mfvilche@gmail.com" ]
mfvilche@gmail.com
f01844da0899fa050b7625c266e85b6cbedebaab
080a1c6d01462367a247356b8aeae9ee96968cec
/src/service/SubjectServiceImpl.java
9c7febf590672ecac0e191161b0adfc269b15506
[]
no_license
kosoto/GMS-Model-2.1
b0d3085c3ffb5d1945bdc6f358e54f8778bdde77
0be7538f140cd7c2cb4b6673f1b31544037fa89d
refs/heads/master
2020-03-23T10:35:52.596321
2018-08-17T16:59:18
2018-08-17T16:59:18
141,451,548
0
0
null
null
null
null
UTF-8
Java
false
false
907
java
package service; import java.util.List; import domain.SubjectBean; public class SubjectServiceImpl implements SubjectService{ private static SubjectService instance = new SubjectServiceImpl(); public static SubjectService getInstance() {return instance;} private SubjectServiceImpl() {} @Override public void createSubject(SubjectBean Subject) { // TODO Auto-generated method stub } @Override public List<SubjectBean> list() { // TODO Auto-generated method stub return null; } @Override public List<SubjectBean> readSome(String word) { return null; } @Override public SubjectBean readOne(String word) { // TODO Auto-generated method stub return null; } @Override public void updateSubject(SubjectBean Subject) { // TODO Auto-generated method stub } @Override public void deledteSubject(SubjectBean Subject) { // TODO Auto-generated method stub } }
[ "kstad@naver.com" ]
kstad@naver.com
893aadb00c8ad5fdf172173102845099366a5599
94fff910b6ed266f736bd5ca9ccd773f84e327f7
/doctormanager/src/java/cn/yunji/doctormanager/service/impl/MyAdviceImpl.java
e3ebdc17be0fd09f977e4243c3798e06cb554b9e
[]
no_license
1emanresu/doctorManager
a11b6414cad1f2295ab38810b50218957ac09bb0
3046a98be2a90d95581f275027cecc7af0b8c34b
refs/heads/master
2020-03-28T17:31:24.040211
2018-09-15T02:20:56
2018-09-15T02:20:56
148,797,869
0
0
null
null
null
null
UTF-8
Java
false
false
724
java
package cn.yunji.doctormanager.service.impl; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import cn.yunji.doctormanager.dao.MyAdviceMapper; import cn.yunji.doctormanager.entity.MyAdvice; import cn.yunji.doctormanager.service.MyAdviceService; @Service("myAdvice") public class MyAdviceImpl implements MyAdviceService { @Resource private MyAdviceMapper MyAdviceDao; @Override public int insert(MyAdvice record) { return MyAdviceDao.insert(record); } /**根据医生id查询所有我的医嘱 */ @Override public List<MyAdvice> selectByDoctorId(Integer doctorid) { return MyAdviceDao.selectByDoctorId(doctorid); } }
[ "13549349203@163.com" ]
13549349203@163.com
b36592c1665d46f553ee9dfc54ef0f7121cd1783
4c2e83907706317c147433e4560a49d431badf1b
/app/src/main/java/bolts/MeasurementEvent.java
326e106e6e0e68ef145bd4e6838a723e1edf1722
[ "Unlicense" ]
permissive
renyuanceshi/KingKingRE
92c80328556853029eb5b7bbf3a48a19182cf056
b15295bec2cee47867b786dbe0841c1a4edaff5e
refs/heads/master
2020-12-13T14:41:26.365794
2020-01-17T04:27:21
2020-01-17T04:27:21
234,442,774
0
0
null
null
null
null
UTF-8
Java
false
false
7,626
java
package bolts; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.util.Log; import com.facebook.internal.NativeProtocol; import java.lang.reflect.Method; import java.util.Collection; import java.util.Map; import org.json.JSONArray; import org.json.JSONObject; public class MeasurementEvent { public static final String APP_LINK_NAVIGATE_IN_EVENT_NAME = "al_nav_in"; public static final String APP_LINK_NAVIGATE_OUT_EVENT_NAME = "al_nav_out"; public static final String MEASUREMENT_EVENT_ARGS_KEY = "event_args"; public static final String MEASUREMENT_EVENT_NAME_KEY = "event_name"; public static final String MEASUREMENT_EVENT_NOTIFICATION_NAME = "com.parse.bolts.measurement_event"; private Context appContext; private Bundle args; private String name; private MeasurementEvent(Context context, String str, Bundle bundle) { this.appContext = context.getApplicationContext(); this.name = str; this.args = bundle; } private static Bundle getApplinkLogData(Context context, String str, Bundle bundle, Intent intent) { Bundle bundle2 = new Bundle(); ComponentName resolveActivity = intent.resolveActivity(context.getPackageManager()); if (resolveActivity != null) { bundle2.putString("class", resolveActivity.getShortClassName()); } if (APP_LINK_NAVIGATE_OUT_EVENT_NAME.equals(str)) { if (resolveActivity != null) { bundle2.putString("package", resolveActivity.getPackageName()); } if (intent.getData() != null) { bundle2.putString("outputURL", intent.getData().toString()); } if (intent.getScheme() != null) { bundle2.putString("outputURLScheme", intent.getScheme()); } } else if (APP_LINK_NAVIGATE_IN_EVENT_NAME.equals(str)) { if (intent.getData() != null) { bundle2.putString("inputURL", intent.getData().toString()); } if (intent.getScheme() != null) { bundle2.putString("inputURLScheme", intent.getScheme()); } } for (String str2 : bundle.keySet()) { Object obj = bundle.get(str2); if (obj instanceof Bundle) { for (String str3 : ((Bundle) obj).keySet()) { String objectToJSONString = objectToJSONString(((Bundle) obj).get(str3)); if (str2.equals("referer_app_link")) { if (str3.equalsIgnoreCase("url")) { bundle2.putString("refererURL", objectToJSONString); } else if (str3.equalsIgnoreCase(NativeProtocol.BRIDGE_ARG_APP_NAME_STRING)) { bundle2.putString("refererAppName", objectToJSONString); } else if (str3.equalsIgnoreCase("package")) { bundle2.putString("sourceApplication", objectToJSONString); } } bundle2.putString(str2 + "/" + str3, objectToJSONString); } } else { String objectToJSONString2 = objectToJSONString(obj); if (str2.equals("target_url")) { Uri parse = Uri.parse(objectToJSONString2); bundle2.putString("targetURL", parse.toString()); bundle2.putString("targetURLHost", parse.getHost()); } else { bundle2.putString(str2, objectToJSONString2); } } } return bundle2; } private static String objectToJSONString(Object obj) { if (obj == null) { return null; } if ((obj instanceof JSONArray) || (obj instanceof JSONObject)) { return obj.toString(); } try { return obj instanceof Collection ? new JSONArray((Collection) obj).toString() : obj instanceof Map ? new JSONObject((Map) obj).toString() : obj.toString(); } catch (Exception e) { return null; } } private void sendBroadcast() { if (this.name == null) { Log.d(getClass().getName(), "Event name is required"); } try { Class<?> cls = Class.forName("android.support.v4.content.LocalBroadcastManager"); Method method = cls.getMethod("getInstance", new Class[]{Context.class}); Method method2 = cls.getMethod("sendBroadcast", new Class[]{Intent.class}); Object invoke = method.invoke((Object) null, new Object[]{this.appContext}); Intent intent = new Intent(MEASUREMENT_EVENT_NOTIFICATION_NAME); intent.putExtra(MEASUREMENT_EVENT_NAME_KEY, this.name); intent.putExtra(MEASUREMENT_EVENT_ARGS_KEY, this.args); method2.invoke(invoke, new Object[]{intent}); } catch (Exception e) { Log.d(getClass().getName(), "LocalBroadcastManager in android support library is required to raise bolts event."); } } /* JADX WARNING: Removed duplicated region for block: B:6:0x0014 */ /* Code decompiled incorrectly, please refer to instructions dump. */ static void sendBroadcastEvent(android.content.Context r5, java.lang.String r6, android.content.Intent r7, java.util.Map<java.lang.String, java.lang.String> r8) { /* android.os.Bundle r1 = new android.os.Bundle r1.<init>() if (r7 == 0) goto L_0x0071 android.os.Bundle r0 = bolts.AppLinks.getAppLinkData(r7) if (r0 == 0) goto L_0x0033 android.os.Bundle r0 = getApplinkLogData(r5, r6, r0, r7) r2 = r0 L_0x0012: if (r8 == 0) goto L_0x0068 java.util.Set r0 = r8.keySet() java.util.Iterator r3 = r0.iterator() L_0x001c: boolean r0 = r3.hasNext() if (r0 == 0) goto L_0x0068 java.lang.Object r0 = r3.next() r1 = r0 java.lang.String r1 = (java.lang.String) r1 java.lang.Object r0 = r8.get(r1) java.lang.String r0 = (java.lang.String) r0 r2.putString(r1, r0) goto L_0x001c L_0x0033: android.net.Uri r0 = r7.getData() if (r0 == 0) goto L_0x0042 java.lang.String r2 = "intentData" java.lang.String r0 = r0.toString() r1.putString(r2, r0) L_0x0042: android.os.Bundle r2 = r7.getExtras() if (r2 == 0) goto L_0x0071 java.util.Set r0 = r2.keySet() java.util.Iterator r3 = r0.iterator() L_0x0050: boolean r0 = r3.hasNext() if (r0 == 0) goto L_0x0071 java.lang.Object r0 = r3.next() java.lang.String r0 = (java.lang.String) r0 java.lang.Object r4 = r2.get(r0) java.lang.String r4 = objectToJSONString(r4) r1.putString(r0, r4) goto L_0x0050 L_0x0068: bolts.MeasurementEvent r0 = new bolts.MeasurementEvent r0.<init>(r5, r6, r2) r0.sendBroadcast() return L_0x0071: r2 = r1 goto L_0x0012 */ throw new UnsupportedOperationException("Method not decompiled: bolts.MeasurementEvent.sendBroadcastEvent(android.content.Context, java.lang.String, android.content.Intent, java.util.Map):void"); } }
[ "lewis@spectratech.com" ]
lewis@spectratech.com
97e7448f243e692e6a534a4b9ca4d1443631284d
e0fd595a98ca7a23ecf90f4c08801bf7e0361bf2
/results_without_immortals/netbeans/antcraziness/CallbackSystemActionTest/CallbackSystemActionTest_5.java
b06edba857e5783407a41be02d81b014e74ae71d
[]
no_license
amchristi/AdFL
690699a1c3d0d0e84e412b79826aa1b51b572979
40c879e7fe5f87afbf4abc29e442a6e37b1e6541
refs/heads/master
2021-12-15T11:43:07.539575
2019-07-18T05:56:21
2019-07-18T05:56:21
176,834,877
0
0
null
null
null
null
UTF-8
Java
false
false
6,296
java
package org.openide.awt; import java.awt.event.ActionEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.lang.ref.Reference; import java.lang.ref.WeakReference; import java.util.Arrays; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ActionMap; import javax.swing.text.DefaultEditorKit; import org.netbeans.junit.NbTestCase; import org.openide.util.ContextAwareAction; import org.openide.util.Lookup; import org.openide.util.Utilities; import org.openide.util.lookup.AbstractLookup; import org.openide.util.lookup.InstanceContent; import org.openide.util.lookup.Lookups; /** * Copied from org.openide.util.actions and modified to work on * new Actions Support. */ public class CallbackSystemActionTest extends NbTestCase { private Logger LOG; public CallbackSystemActionTest(String name) { super(name); } private static final class CntListener extends Object implements PropertyChangeListener { private int cnt; public void propertyChange(PropertyChangeEvent evt) { cnt++; } public void assertCnt(String msg, int count) { assertEquals(msg, count, this.cnt); this.cnt = 0; } } @Override protected void setUp() throws Exception { LOG = Logger.getLogger("TEST-" + getName()); LOG.info("setUp"); } @Override protected void tearDown() throws Exception { LOG.info("tearDown"); super.tearDown(); LOG.info("tearDown super finished"); } @Override protected Level logLevel() { return Level.FINE; } @Override protected int timeOut() { return 5000; } @Override protected boolean runInEQ() { return true; } private void doSurviveFocusChangeInTheNewWay(boolean doGC) throws Exception { class MyAction extends AbstractAction { public int cntEnabled; public int cntPerformed; @Override public boolean isEnabled() { cntEnabled++; return true; } public void actionPerformed(ActionEvent ev) { cntPerformed++; } } class Disabled extends AbstractAction { @Override public boolean isEnabled() { return false; } @Override public void actionPerformed(ActionEvent e) { throw new UnsupportedOperationException("Not supported yet."); } } MyAction myAction = new MyAction(); ActionMap other = new ActionMap(); ActionMap tc = new ActionMap(); ActionMap disabled = new ActionMap(); disabled.put("somekey", new Disabled()); InstanceContent ic = new InstanceContent(); AbstractLookup al = new AbstractLookup(ic); ContextAwareAction a = CallbackActionTest.callback("somekey", null, al, true); tc.put("somekey", myAction); ic.add(other); assertFalse("Disabled on other component", a.isEnabled()); ic.remove(other); ic.add(tc); assertTrue("MyAction is enabled", a.isEnabled()); assertEquals("isEnabled called once", 1, myAction.cntEnabled); if (doGC) { WeakReference<?> ref = new WeakReference<Object>(a); a = null; assertGC("Action can disappear", ref); a = CallbackActionTest.callback("somekey", null, al, true); } ic.remove(tc); ic.add(other); assertTrue("Remains enabled", a.isEnabled()); ic.remove(other); ic.add(disabled); assertFalse("Becomes disabled", a.isEnabled()); WeakReference<?> ref = new WeakReference<Object>(a); WeakReference<?> ref2 = new WeakReference<Object>(myAction); WeakReference<?> ref3 = new WeakReference<Object>(tc); a = null; myAction = null; tc = null; assertGC("We are able to clear global action", ref); assertGC("Even our action", ref2); assertGC("Even our component", ref3); } public void testLookupOfStateInActionMap() throws Exception { class MyAction extends AbstractAction { int actionPerformed; public void actionPerformed(ActionEvent ev) { actionPerformed++; } } MyAction action = new MyAction(); ActionMap map = new ActionMap(); InstanceContent ic = new InstanceContent(); AbstractLookup al = new AbstractLookup(ic); ContextAwareAction system = CallbackActionTest.callback("systemKey", null, al, false); map.put("systemKey", action); Action clone; clone = system.createContextAwareInstance(Lookup.EMPTY); assertTrue("Action should not be enabled if no callback provided", !clone.isEnabled()); // action.setEnabled(false); Lookup context = Lookups.singleton(map); clone = system.createContextAwareInstance(context); Action clone2 = system.createContextAwareInstance(context); CntListener listener = new CntListener(); clone.addPropertyChangeListener(listener); CntListener listener2 = new CntListener(); clone2.addPropertyChangeListener(listener2); assertTrue("Not enabled now", !clone.isEnabled()); action.setEnabled(true); assertTrue("Clone is enabled because the action in ActionMap is", clone.isEnabled()); listener.assertCnt("One change expected", 1); listener2.assertCnt("One change expected", 1); clone.actionPerformed(new ActionEvent(this, 0, "")); assertEquals("MyAction.actionPerformed invoked", 1, action.actionPerformed); action.setEnabled(false); assertTrue("Clone is disabled because the action in ActionMap is", !clone.isEnabled()); listener.assertCnt("Another change expected", 1); listener2.assertCnt("One change expected", 1); clone.actionPerformed(new ActionEvent(this, 0, "")); assertEquals("MyAction.actionPerformed invoked again", 2, action.actionPerformed); } }
[ "amchristi@bitbucket.org" ]
amchristi@bitbucket.org
3e48805b1067915d7ba07e8ad7bf5ed3c1490565
70cd154df87e43870f17750708a682ffbd683e3e
/BAI1/src/DayofMonth.java
5c5a49343768774d13e239b12274756d245d5bc0
[]
no_license
ketban0702/codegym_module2
d1f8b00add6712ce644f82c8367ef32eedd9e8ff
063d3db1074cfa784161bfc89b1ed31a82c3aa08
refs/heads/master
2020-05-30T21:09:51.409470
2019-07-03T08:41:58
2019-07-03T08:41:58
189,963,752
0
0
null
null
null
null
UTF-8
Java
false
false
1,194
java
import java.util.Scanner; public class DayofMonth { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Nhap year: "); int year = scanner.nextInt(); System.out.println("Nhap month: "); int month = scanner.nextInt(); switch (month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: System.out.println("Thang " + month + " Co 31 ngay"); break; case 4: case 6: case 9: case 11: System.out.println("Thang "+ month + " Co 30 ngay"); break; case 2: { if (((year % 400) == 0) || ((year % 4) == 0) && ((year % 100) != 0)) System.out.println("Thang "+ month +"/"+ year +" Co 29 ngay"); else System.out.println("Thang "+ month +"/"+ year +" Co 28 ngay"); } break; default: System.out.println(" Chi co 12 thang thoi. Moi ban nhap lai"); } } }
[ "you@example.com" ]
you@example.com
444548d609792e45425bf6775074991acb9e97e9
1d489a68c4f7fada86dff1693ce4a373e8739f7c
/codingForOffer/src/main/java/com/li/Question07.java
798dd635096b72971526a6fe0d6e2d2725ad6176
[]
no_license
1367356/GradleTestUseSubModule
730b9fe2f76c90697ef62cc9e001b4c8e0b35801
287bdd2df30788d95b925450a4475dda61ceaf69
refs/heads/master
2021-04-26T23:05:31.885623
2018-10-01T08:38:37
2018-10-01T08:38:37
123,929,145
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
package com.li; import java.util.LinkedList; //用两个栈模仿一个队列 public class Question07 { class Stack{ //栈 LinkedList stack = new LinkedList(); public void push(Object o) { stack.add(o); } public Object pop() { Object o=stack.removeLast(); return o; } } class Queue { //队列 Stack stack1; Stack stack2; public void push(Object o) { stack1.push(o); } public Object deleteHead() throws Exception { if(stack2==null){ while (stack1 != null) { Object data = stack1.pop(); stack2.push(data); } } if (stack2 == null) { throw new Exception("queue is empty"); } Object head = stack2.pop(); return head; } } }
[ "1185978642@qq.com" ]
1185978642@qq.com
30fa5bcc7c222780723d43ee44d952d684b0a1e6
c864c88fb91d6c064f07d690cb861dbae6871e8f
/support/cas-server-support-inwebo-mfa/src/test/java/org/apereo/cas/support/inwebo/authentication/InweboAuthenticationDeviceMetadataPopulatorTests.java
fd106d6c7f5531d782c6e2f2ec4fc1d6d13f9754
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
dfish3r/cas
48105b5343c5bcda471655a6402f1082766ca687
59250ab963c578827faa43fe9706647465ead741
refs/heads/master
2023-08-13T07:10:37.621496
2023-07-12T13:29:21
2023-07-12T13:29:21
219,347,438
0
0
Apache-2.0
2023-07-27T00:41:28
2019-11-03T18:36:56
Java
UTF-8
Java
false
false
1,380
java
package org.apereo.cas.support.inwebo.authentication; import org.apereo.cas.authentication.CoreAuthenticationTestUtils; import org.apereo.cas.authentication.DefaultAuthenticationTransactionFactory; import lombok.val; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; /** * This is {@link InweboAuthenticationDeviceMetadataPopulatorTests}. * * @author Misagh Moayyed * @since 6.4.0 */ @Tag("MFAProvider") class InweboAuthenticationDeviceMetadataPopulatorTests { private final InweboAuthenticationDeviceMetadataPopulator populator = new InweboAuthenticationDeviceMetadataPopulator(); @Test void verifyPopulator() { val credentials = new InweboCredential(); credentials.setDeviceName("MyDeviceName"); val builder = CoreAuthenticationTestUtils.getAuthenticationBuilder(); assertTrue(this.populator.supports(credentials)); assertNotNull(populator.toString()); this.populator.populateAttributes(builder, new DefaultAuthenticationTransactionFactory().newTransaction(credentials)); val auth = builder.build(); assertEquals( credentials.getDeviceName(), auth.getAttributes() .get(InweboAuthenticationDeviceMetadataPopulator.ATTRIBUTE_NAME_INWEBO_AUTHENTICATION_DEVICE).get(0)); } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
f84b2d6e16423e6f4aa2ae500fc98e527dc38233
d8beafce69f16034bb1d933105f6b035df90a991
/HW16/src/main/java/ru/photorex/hw16/to/mapper/CommentMapper.java
c5fcb52f86c5ef3f325da9b481b0949c4b3e10d6
[]
no_license
VertoBrat/2019-08-otus-spring-Merechko
ba5905dfec938a749f96620da54b64132722de87
7e8f87ce85979a37062cf85fd102af9417ce2995
refs/heads/master
2023-01-13T09:35:44.427118
2020-04-17T08:46:07
2020-04-17T08:46:07
204,907,903
0
1
null
2023-01-07T11:47:00
2019-08-28T10:39:38
Java
UTF-8
Java
false
false
650
java
package ru.photorex.hw16.to.mapper; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Mappings; import ru.photorex.hw16.model.Comment; import ru.photorex.hw16.to.CommentTo; @Mapper(componentModel = "spring", uses = {UserMapper.class}) public interface CommentMapper extends BaseMapper<Comment, CommentTo> { @Mappings( { @Mapping(source = "comment.book.id", target = "bookId"), @Mapping(source = "dateTime", dateFormat = "dd-MM-yyyy HH:mm", target = "dateTime")} ) CommentTo toTo(Comment comment); @Mapping(target = "user", ignore = true) Comment toEntity(CommentTo to); }
[ "mfocus@mail.ru" ]
mfocus@mail.ru
617637e226f5a0c91a4b7847ab5cd9f3669be2ba
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/135/831/CWE369_Divide_by_Zero__float_listen_tcp_divide_54b.java
65755984b45cbea9e0c7b928103707ce8236b39a
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
1,305
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE369_Divide_by_Zero__float_listen_tcp_divide_54b.java Label Definition File: CWE369_Divide_by_Zero__float.label.xml Template File: sources-sinks-54b.tmpl.java */ /* * @description * CWE: 369 Divide by zero * BadSource: listen_tcp Read data using a listening tcp connection * GoodSource: A hardcoded non-zero number (two) * Sinks: divide * GoodSink: Check for zero before dividing * BadSink : Dividing by a value that may be zero * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ public class CWE369_Divide_by_Zero__float_listen_tcp_divide_54b { public void badSink(float data ) throws Throwable { (new CWE369_Divide_by_Zero__float_listen_tcp_divide_54c()).badSink(data ); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(float data ) throws Throwable { (new CWE369_Divide_by_Zero__float_listen_tcp_divide_54c()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(float data ) throws Throwable { (new CWE369_Divide_by_Zero__float_listen_tcp_divide_54c()).goodB2GSink(data ); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
84c52166d8602755ec30f75a609d6de62ec9a12c
38f2672ba3dbc9a931e70a88b156ffe2ba017841
/app/src/main/java/is/hello/sense/api/model/DevicesInfo.java
72c78634b39ba103a0186eff1fdcd70a6dcf814c
[]
no_license
Jorge-eng/suripu-android
662e47e56f67869fa7214b67ca8253af90202783
753252c9e55b192985972d0c5e8e92b22edb5fca
refs/heads/master
2021-04-30T16:00:50.032484
2017-04-22T00:38:20
2017-04-22T00:38:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package is.hello.sense.api.model; import com.google.gson.annotations.SerializedName; public class DevicesInfo extends ApiResponse { @SerializedName("sense_id") private String senseId; @SerializedName("paired_accounts") private int numberPairedAccounts; public String getSenseId() { return senseId; } public int getNumberPairedAccounts() { return numberPairedAccounts; } @Override public String toString() { return "DevicesInfo{" + "senseId='" + senseId + '\'' + ", numberPairedAccounts=" + numberPairedAccounts + '}'; } }
[ "km@sayhello.com" ]
km@sayhello.com
d0e51d0e9d91c67cad056c47e498e0475ccdbc5d
c25be104d0c4d28f780037efc58b1706e20db376
/consumer-contract/src/main/java/com/tinhvan/hd/service/impl/HDMiddleServiceImpl.java
072d1b891e6525bf7bb2646d0997182cc82954c0
[]
no_license
nthanhdo2610/hd
9a22eca5303b409e3e93dad9c6f5d3a4ab5942ca
efdcd782e01e75976504880bf385b88d7a507267
refs/heads/master
2023-09-03T23:24:36.790002
2020-02-26T14:07:53
2020-02-26T14:07:53
229,775,829
0
0
null
null
null
null
UTF-8
Java
false
false
1,211
java
package com.tinhvan.hd.service.impl; import com.tinhvan.hd.dto.HDContractResponse; import com.tinhvan.hd.exception.InternalServerErrorException; import com.tinhvan.hd.service.HDMiddleService; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; import java.net.URI; import java.net.URISyntaxException; public class HDMiddleServiceImpl implements HDMiddleService { @Value("${hd.url.request.middle}") private String baseUrl; @Override public HDContractResponse sendPostRequest(HttpHeaders header, String body) { HDContractResponse contractResponse = null; try { RestTemplate restTemplate = new RestTemplate(); URI uri = new URI(baseUrl); HttpEntity<String> request = new HttpEntity<>(body, header); ResponseEntity<String> result = restTemplate.postForEntity(uri, request, String.class); }catch (URISyntaxException ex){ throw new InternalServerErrorException(); } return contractResponse; } }
[ "nthanhdo11110030@gmail.com" ]
nthanhdo11110030@gmail.com
108063f5340ffa998601f450eb211c64d75bc072
a28b39a068beea007aed70ed2ab82e8de2771953
/spring-geode-samples/caching/http-session/src/main/java/example/app/caching/session/http/controller/CounterController.java
2873c5ba45668f6758fb3bec6fb5d7ae3ebd2e6a
[ "Apache-2.0" ]
permissive
Buzzardo/spring-boot-data-geode
d249a4a506e1796954082f52a26c7b7d631992db
dbfceddb83ec2f351fcf4ad5f45acd5422e2fd17
refs/heads/main
2023-06-12T17:56:41.156949
2021-06-15T18:24:31
2021-06-15T18:26:04
377,285,302
0
0
Apache-2.0
2021-06-15T20:25:12
2021-06-15T20:25:12
null
UTF-8
Java
false
false
2,721
java
/* * Copyright 2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing * permissions and limitations under the License. */ package example.app.caching.session.http.controller; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; /** * Spring Web MVC {@link Controller} used to count the number of HTTP requests per HTTP Session * and the number of HTTP Sessions. * * @author John Blum * @see javax.servlet.http.HttpSession * @see org.springframework.stereotype.Controller * @see org.springframework.web.bind.annotation.GetMapping * @see org.springframework.web.bind.annotation.ResponseBody * @see org.springframework.web.servlet.ModelAndView * @since 1.1.0 */ //tag::class[] @Controller public class CounterController { public static final String INDEX_TEMPLATE_VIEW_NAME = "index"; private final Set<String> sessionIds = Collections.synchronizedSet(new HashSet<>()); @GetMapping("/") @ResponseBody public String home() { return format("HTTP Session Caching Example"); } @GetMapping("/ping") @ResponseBody public String ping() { return format("PONG"); } @GetMapping("/session") public ModelAndView sessionRequestCounts(HttpSession session) { this.sessionIds.add(session.getId()); Map<String, Object> model = new HashMap<>(); model.put("sessionType", session.getClass().getName()); model.put("sessionCount", this.sessionIds.size()); model.put("requestCount", getRequestCount(session)); return new ModelAndView(INDEX_TEMPLATE_VIEW_NAME, model); } private Object getRequestCount(HttpSession session) { Integer requestCount = (Integer) session.getAttribute("requestCount"); requestCount = requestCount != null ? requestCount : 0; requestCount++; session.setAttribute("requestCount", requestCount); return requestCount; } private String format(String value) { return String.format("<h1>%s</h1>", value); } } //end::class[]
[ "jblum@pivotal.io" ]
jblum@pivotal.io
46e6b69ae604f937df071a30279282d8c1f177ef
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_a7dbbe20be5ac9d40ae896bd9e9092dff8136ce7/OhtuController/18_a7dbbe20be5ac9d40ae896bd9e9092dff8136ce7_OhtuController_t.java
1de416f2b04d4b4c4f46df8169bed942fc9e8650
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,521
java
package ohtu.controller; import java.util.List; import javax.validation.Valid; import ohtu.domain.Article; import ohtu.domain.Book; import ohtu.domain.Inproceedings; import ohtu.domain.Reference; import ohtu.service.BibtexService; import ohtu.service.ReferenceService; import ohtu.service.UserService; import ohtu.validator.ReferenceValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.FieldError; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class OhtuController { @Autowired ReferenceValidator validator; @Autowired BibtexService bibtex; @Autowired UserService users; @Autowired ReferenceService references; @RequestMapping(value = "login", method = RequestMethod.GET) public String login() { return "login"; //Palauttaa WEB-INF/jsp/login.jsp:n } // @RequestMapping(value = "*") public String redir() { return "redirect:/list"; } @RequestMapping(value = "bibtex") public String pureBibtex(Model model) { model.addAttribute("bibtexs", bibtex.generate(references.listAll())); return "purebibtex"; } @RequestMapping(value = "listIds/{id}") public String listSelected(Model model, @PathVariable(value = "id") Long... id) { model.addAttribute("references", references.findByIds(id)); return "listAll"; } @RequestMapping(value = "addArticle", method = RequestMethod.POST) public String createArticle(@ModelAttribute("article") @Valid Article article, BindingResult bindingresult, Model model) { return add("article", article, bindingresult, model); } @RequestMapping(value = "addBook", method = RequestMethod.POST) public String createBook(@ModelAttribute("book") @Valid Book book, BindingResult bindingresult, Model model) { return add("book", book, bindingresult, model); } @RequestMapping(value = "addInproc", method = RequestMethod.POST) public String createInproc(@ModelAttribute("inproc") @Valid Inproceedings inproc, BindingResult bindingresult, Model model) { return add("inproc", inproc, bindingresult, model); } @RequestMapping(value = "listBibtex") public String createBibtex(Model model) { model.addAttribute("bibtexs", bibtex.generate(references.listAll())); return "bibtex"; } @RequestMapping(value = "addRef", method = RequestMethod.GET) public String addRef(Model model) { addAll(model); return "addRef"; } @RequestMapping(value = "list", method = RequestMethod.GET) public String list(Model model) { model.addAttribute("references", references.listAll()); return "listAll"; } @RequestMapping(value = "downloadIds/{id}") public ResponseEntity<byte[]> downloadAttachmentByIds(@PathVariable("id") Long... ids) { String content = bibtex.generateString(references.findByIds(ids)); return fileDownload(content); } @RequestMapping(value = "downloadBibtex", method = RequestMethod.GET) public ResponseEntity<byte[]> downloadAttachment() { String content = bibtex.generateString(references.listAll()); return fileDownload(content); } @RequestMapping(value = "listAll", method = RequestMethod.GET, produces = "application/json") @ResponseBody public List<Reference> listAll() { return references.listAll(); } private void addAll(Model model) { addOne(model, "book", new Book()); addOne(model, "article", new Article()); addOne(model, "inproc", new Inproceedings()); } private void addOne(Model model, String key, Reference reference) { if (!model.containsAttribute(key)) { model.addAttribute(key, reference); } } private String add(String name, Reference reference, BindingResult result, Model model) { if (references.containsRefId(reference.getRefId())) { result.addError(new FieldError(name, "refId", "ID must Be Unique!")); } if (result.hasErrors()) { model.addAttribute(name, reference); addAll(model); return "addRef"; } references.add(reference); return "redirect:list"; } private ResponseEntity<byte[]> fileDownload(String content) { byte[] bytes = content.getBytes(); HttpHeaders headers = new HttpHeaders(); headers.setContentLength(bytes.length); headers.set("Content-Disposition", "attachment; filename=\"list" + System.currentTimeMillis() + ".BIB\""); headers.setContentType(MediaType.parseMediaType("text/plain")); return new ResponseEntity<byte[]>(bytes, headers, HttpStatus.OK); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b7476d92f4cf68b6ea60a2d743d4ccc9cc00fc0a
d383d855e48ee2f5da65791f4052533eca339369
/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCloseStatement.java
35594d1637f8e440238b69044107623ee9105010
[ "Apache-2.0" ]
permissive
liuxing7954/druid-source
0e2dc0b1a2f498045b8689d6431764f4f4525070
fc27b5ac4695dc42e1daa62db012adda7c217d36
refs/heads/master
2022-12-21T14:53:26.923986
2020-02-29T07:15:15
2020-02-29T07:15:15
243,908,145
1
1
NOASSERTION
2022-12-16T09:54:44
2020-02-29T05:07:04
Java
UTF-8
Java
false
false
1,724
java
/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * 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.alibaba.druid.sql.ast.statement; import java.util.Collections; import java.util.List; import com.alibaba.druid.sql.ast.SQLName; import com.alibaba.druid.sql.ast.SQLObject; import com.alibaba.druid.sql.ast.SQLStatementImpl; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.visitor.SQLASTVisitor; /** * * MySql cursor close statement * @author zz [455910092@qq.com] */ public class SQLCloseStatement extends SQLStatementImpl{ //cursor name private SQLName cursorName; public SQLName getCursorName() { return cursorName; } public void setCursorName(String cursorName) { setCursorName(new SQLIdentifierExpr(cursorName)); } public void setCursorName(SQLName cursorName) { if (cursorName != null) { cursorName.setParent(this); } this.cursorName = cursorName; } @Override protected void accept0(SQLASTVisitor visitor) { if (visitor.visit(this)) { acceptChild(visitor, cursorName); } visitor.endVisit(this); } @Override public List<SQLObject> getChildren() { return Collections.<SQLObject>emptyList(); } }
[ "jixiaoyi@apexsoft.com.cn" ]
jixiaoyi@apexsoft.com.cn
72c83990bfb990fe1b7ef5d525b127f322c0b0aa
ac72641cacd2d68bd2f48edfc511f483951dd9d6
/opscloud-domain/src/main/java/com/baiyi/opscloud/domain/generator/opscloud/OcEnv.java
802eca93c086954a4caf7696b6e330f478f2d260
[]
no_license
fx247562340/opscloud-demo
6afe8220ce6187ac4cc10602db9e14374cb14251
b608455cfa5270c8c021fbb2981cb8c456957ccb
refs/heads/main
2023-05-25T03:33:22.686217
2021-06-08T03:17:32
2021-06-08T03:17:32
373,446,042
1
1
null
null
null
null
UTF-8
Java
false
false
2,191
java
package com.baiyi.opscloud.domain.generator.opscloud; import javax.persistence.*; import java.util.Date; @Table(name = "oc_env") public class OcEnv { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(name = "env_name") private String envName; @Column(name = "env_type") private Integer envType; private String color; private String comment; @Column(name = "create_time", insertable = false, updatable = false) private Date createTime; @Column(name = "update_time", insertable = false, updatable = false) private Date updateTime; /** * @return id */ public Integer getId() { return id; } /** * @param id */ public void setId(Integer id) { this.id = id; } /** * @return env_name */ public String getEnvName() { return envName; } /** * @param envName */ public void setEnvName(String envName) { this.envName = envName; } /** * @return env_type */ public Integer getEnvType() { return envType; } /** * @param envType */ public void setEnvType(Integer envType) { this.envType = envType; } /** * @return color */ public String getColor() { return color; } /** * @param color */ public void setColor(String color) { this.color = color; } /** * @return comment */ public String getComment() { return comment; } /** * @param comment */ public void setComment(String comment) { this.comment = comment; } /** * @return create_time */ public Date getCreateTime() { return createTime; } /** * @param createTime */ public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * @return update_time */ public Date getUpdateTime() { return updateTime; } /** * @param updateTime */ public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } }
[ "fanxin01@longfor.com" ]
fanxin01@longfor.com
72d665f9482548473628172406b9a5f0fa3f47ec
462c6815dadc83b1bd406fba29ab0c905cf4bc05
/src/bee/generated/server/GetStorageConfiguration.java
0372d103a383068bd7db6cc77ea8617ab552eee6
[]
no_license
francoisperron/learning-soap-onvif
ab89b38d770547c0b9ad17a45865c7b8adea5d09
6a0ed9167ad8c2369993da21a5d115a309f42e16
refs/heads/master
2020-05-14T23:53:35.084374
2019-04-18T02:33:17
2019-04-18T02:33:17
182,002,749
1
0
null
null
null
null
UTF-8
Java
false
false
1,595
java
package bee.generated.server; 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="Token" type="{http://www.onvif.org/ver10/schema}ReferenceToken"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "token" }) @XmlRootElement(name = "GetStorageConfiguration", namespace = "http://www.onvif.org/ver10/device/wsdl") public class GetStorageConfiguration { @XmlElement(name = "Token", namespace = "http://www.onvif.org/ver10/device/wsdl", required = true) protected String token; /** * Gets the value of the token property. * * @return * possible object is * {@link String } * */ public String getToken() { return token; } /** * Sets the value of the token property. * * @param value * allowed object is * {@link String } * */ public void setToken(String value) { this.token = value; } }
[ "fperron@gmail.com" ]
fperron@gmail.com
308142fd03143c371dd3e9f55ab0ae24518f7eaa
b69c4cad7e8b5c045a0faf8b3520535e9cc4077b
/Ex11_ProgressBar/app/src/main/java/com/example/ex11_progressbar/MainActivity3.java
6a0537c21328052bb4c65fd5d11f7a52c94eb995
[]
no_license
jeystory/ict_android
3dcd00893bc57924f1d5e593a4d74b025abaa4fb
6f7d248984947bb984367aa6fce5e69d24fe351a
refs/heads/master
2022-06-07T03:26:16.742224
2020-04-22T02:13:55
2020-04-22T02:13:55
257,766,142
0
0
null
null
null
null
UTF-8
Java
false
false
2,708
java
package com.example.ex11_progressbar; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.os.Handler; import android.os.SystemClock; import android.view.View; import android.widget.Button; import android.widget.ProgressBar; import android.widget.TextView; public class MainActivity3 extends AppCompatActivity { TextView textView1, textView2; ProgressBar progressBar1, progressBar2; Button button1; // 스레드에서 뷰을 수정, 변경할 때 사용 Handler handler = new Handler(); int i, j; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main3); textView1 = findViewById(R.id.textView1); textView2 = findViewById(R.id.textView2); progressBar1 = findViewById(R.id.progressBar1); progressBar2 = findViewById(R.id.progressBar2); button1 = findViewById(R.id.button1); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // 스레드 처리시 주의 사항 : 뷰를 직접 수정할 수 없다. // 핸들러를 이용해서 수정해야 한다. new Thread(new Runnable() { @Override public void run() { for (i=0; i<= progressBar1.getMax(); i++){ handler.post(new Runnable() { @Override public void run() { progressBar1.setProgress(i); textView1.setText(progressBar1.getProgress()+ "%"); } }); SystemClock.sleep((int)(Math.random()*500)); } } }).start(); new Thread(new Runnable() { @Override public void run() { for (j=0; j<= progressBar2.getMax(); j++){ handler.post(new Runnable() { @Override public void run() { progressBar2.setProgress(j); textView2.setText(progressBar2.getProgress()+ "%"); } }); SystemClock.sleep((int)(Math.random()*500)); } } }).start(); } }); } }
[ "59073350+jeystory@users.noreply.github.com" ]
59073350+jeystory@users.noreply.github.com
008047078e5355497d2bb2556160804a21c15ae0
f6b90fae50ea0cd37c457994efadbd5560a5d663
/android/nut-dex2jar.src/com/soundcloud/android/crop/d.java
2db1c736dd2e55628317cc4b24b382661f694e0b
[]
no_license
dykdykdyk/decompileTools
5925ae91f588fefa7c703925e4629c782174cd68
4de5c1a23f931008fa82b85046f733c1439f06cf
refs/heads/master
2020-01-27T09:56:48.099821
2016-09-14T02:47:11
2016-09-14T02:47:11
66,894,502
1
0
null
null
null
null
UTF-8
Java
false
false
474
java
package com.soundcloud.android.crop; import android.view.View; import android.view.View.OnClickListener; final class d implements View.OnClickListener { d(CropImageActivity paramCropImageActivity) { } public final void onClick(View paramView) { CropImageActivity.a(this.a); } } /* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar * Qualified Name: com.soundcloud.android.crop.d * JD-Core Version: 0.6.2 */
[ "819468107@qq.com" ]
819468107@qq.com
082320f2edac0acdeafbead0685133a5a7e10f38
f4d09c0998873e7b0f7c2a2138f70f72e1cca0fe
/app/docksidestage/dbflute/exentity/MemberAddress.java
6da8cea6c9ab20f12a9cb0a526088637eebb7d92
[ "Apache-2.0" ]
permissive
dbflute-example/dbflute-example-on-play2java
aec77bff569418a8e51dc52ad02eec68b218d03a
85f39e9cbc0d7b9dcd620f5f373909df93edf607
refs/heads/master
2022-06-15T07:09:42.916040
2022-05-14T06:33:18
2022-05-14T06:33:18
27,213,603
2
0
null
2015-09-08T06:23:03
2014-11-27T07:16:37
Java
UTF-8
Java
false
false
1,077
java
/* * Copyright 2014-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package docksidestage.dbflute.exentity; import docksidestage.dbflute.bsentity.BsMemberAddress; /** * The entity of MEMBER_ADDRESS. * <p> * You can implement your original methods here. * This class remains when re-generating. * </p> * @author DBFlute(AutoGenerator) */ public class MemberAddress extends BsMemberAddress { /** The serial version UID for object serialization. (Default) */ private static final long serialVersionUID = 1L; }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
59ef80220952da707c806ed80fc9d21d2f24d2fb
d1a3766f13e8c271fbb20bfb2b11cf2ee9a0f1df
/course_video_tutorials/algaworks/curso_desenvolvimento_web_com_jsf2/financeiro-jsf/src/main/java/br/com/jkavdev/algaworks/jsf/model/Pessoa.java
fdd65b935fc3cdda3a9aa144d03f652dcf906e00
[]
no_license
jkavdev/jkavdev_rpo
0f12a07c7698e9e1208c3c2f544c6630dbb97a0c
be1aa040515bfb549c5c3a8c090f97474e500922
refs/heads/master
2020-04-06T07:05:03.026803
2016-09-15T15:07:42
2016-09-15T15:07:42
63,954,979
0
0
null
null
null
null
UTF-8
Java
false
false
1,349
java
package br.com.jkavdev.algaworks.jsf.model; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "pessoas") public class Pessoa implements Serializable { private static final long serialVersionUID = 1L; private Integer codigo; private String nome; public Pessoa() { } public Pessoa(Integer codigo, String nome) { this.codigo = codigo; this.nome = nome; } @Id @GeneratedValue public Integer getCodigo() { return codigo; } public void setCodigo(Integer codigo) { this.codigo = codigo; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((codigo == null) ? 0 : codigo.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Pessoa other = (Pessoa) obj; if (codigo == null) { if (other.codigo != null) return false; } else if (!codigo.equals(other.codigo)) return false; return true; } }
[ "jhonatankolen@b532a151-d5e8-4e7d-bcad-1a85d0c4e1cd" ]
jhonatankolen@b532a151-d5e8-4e7d-bcad-1a85d0c4e1cd
fd51c0ac16c3fcae5411f354351a84119361ec0b
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
/spring-aop-perf-tests/src/main/java/coas/perf/ComplexCondition150/Advice32.java
0db8f6761537dda6a14b0d2b71585113c7a169f0
[]
no_license
pmaslankowski/java-contracts
28b1a3878f68fdd759d88b341c8831716533d682
46518bb9a83050956e631faa55fcdf426589830f
refs/heads/master
2021-03-07T13:15:28.120769
2020-09-07T20:06:31
2020-09-07T20:06:31
246,267,189
0
0
null
null
null
null
UTF-8
Java
false
false
1,642
java
package coas.perf.ComplexCondition150; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.stereotype.Component; import coas.perf.ComplexCondition150.Subject150; @Aspect @Component("Advice_150_32_cc") public class Advice32 { @Around("execution(* coas.perf.ComplexCondition150.Subject150.*(..)) and (execution(* *.junk0(..)) or execution(* *.junk1(..)) or execution(* *.junk2(..)) or execution(* *.junk3(..)) or execution(* *.junk4(..)) or execution(* *.junk5(..)) or execution(* *.junk6(..)) or execution(* *.junk7(..)) or execution(* *.junk8(..)) or execution(* *.junk9(..)) or execution(* *.junk10(..)) or execution(* *.junk11(..)) or execution(* *.junk12(..)) or execution(* *.junk13(..)) or execution(* *.junk14(..)) or execution(* *.junk15(..)) or execution(* *.junk16(..)) or execution(* *.junk17(..)) or execution(* *.junk18(..)) or execution(* *.junk19(..)) or execution(* *.junk20(..)) or execution(* *.junk21(..)) or execution(* *.junk22(..)) or execution(* *.junk23(..)) or execution(* *.junk24(..)) or execution(* *.junk25(..)) or execution(* *.junk26(..)) or execution(* *.junk27(..)) or execution(* *.junk28(..)) or execution(* *.junk29(..)) or execution(* *.target(..)))") public Object onTarget(ProceedingJoinPoint joinPoint) throws Throwable { int res = (int) joinPoint.proceed(); for (int i=0; i < 1000; i++) { if (res % 2 == 0) { res /= 2; } else { res = 2 * res + 1; } } return res; } }
[ "pmaslankowski@gmail.com" ]
pmaslankowski@gmail.com
c0910b7272d5899b4e654c82519ba2aac956fc17
410df2b595462cec0dc095dcb2262c49ef6ddc3e
/app/src/main/java/org/chromium/chrome/browser/infobar/AutofillSaveCardInfoBarJni.java
695c2d6d051956575d165743c346250bcd0e14d4
[]
no_license
ipxbro/JokerChromium
e32d6e15b61aeb986687befe5d2ea6a50391391f
89931e2e5e356f58c33a3e160c53d347e3779fc4
refs/heads/master
2023-04-24T12:58:28.647237
2021-04-30T05:47:31
2021-04-30T05:47:31
567,083,021
0
0
null
2022-11-17T02:58:50
2022-11-17T02:58:47
null
UTF-8
Java
false
false
1,975
java
package org.chromium.chrome.browser.infobar; import java.lang.Override; import java.lang.String; import javax.annotation.Generated; import org.chromium.base.JniStaticTestMocker; import org.chromium.base.NativeLibraryLoadedStatus; import org.chromium.base.annotations.CheckDiscard; import org.chromium.base.natives.GEN_JNI; @Generated("org.chromium.jni_generator.JniProcessor") @CheckDiscard("crbug.com/993421") final class AutofillSaveCardInfoBarJni implements AutofillSaveCardInfoBar.Natives { private static AutofillSaveCardInfoBar.Natives testInstance; public static final JniStaticTestMocker<AutofillSaveCardInfoBar.Natives> TEST_HOOKS = new org.chromium.base.JniStaticTestMocker<org.chromium.chrome.browser.infobar.AutofillSaveCardInfoBar.Natives>() { @java.lang.Override public void setInstanceForTesting( org.chromium.chrome.browser.infobar.AutofillSaveCardInfoBar.Natives instance) { if (!org.chromium.base.natives.GEN_JNI.TESTING_ENABLED) { throw new RuntimeException("Tried to set a JNI mock when mocks aren't enabled!"); } testInstance = instance; } }; @Override public void onLegalMessageLinkClicked(long nativeAutofillSaveCardInfoBar, AutofillSaveCardInfoBar caller, String url) { GEN_JNI.org_chromium_chrome_browser_infobar_AutofillSaveCardInfoBar_onLegalMessageLinkClicked(nativeAutofillSaveCardInfoBar, caller, url); } public static AutofillSaveCardInfoBar.Natives get() { if (GEN_JNI.TESTING_ENABLED) { if (testInstance != null) { return testInstance; } if (GEN_JNI.REQUIRE_MOCK) { throw new UnsupportedOperationException("No mock found for the native implementation for org.chromium.chrome.browser.infobar.AutofillSaveCardInfoBar.Natives. The current configuration requires all native implementations to have a mock instance."); } } NativeLibraryLoadedStatus.checkLoaded(false); return new AutofillSaveCardInfoBarJni(); } }
[ "joker@cerbook.com" ]
joker@cerbook.com
520a5b4eb80df88149f0efbdac4808162eb3c8b7
b97a2385059daed51b13b097721bebb438313ecd
/app/src/main/java/com/storyshu/storyshu/bean/BaseResponseBean.java
ce2376ad2aad264cd8e54b264062293604959238
[]
no_license
Luomingbear/StoryShu
4e181379ed1956a713dbaa315020380d10c5ea9e
0dd5cb47290b87e3c22caabdaaa9c115855538c9
refs/heads/master
2021-01-11T10:06:07.888777
2017-12-06T06:45:25
2017-12-06T06:45:25
77,517,737
0
0
null
null
null
null
UTF-8
Java
false
false
694
java
package com.storyshu.storyshu.bean; import com.storyshu.storyshu.utils.net.CodeUtil; /** * 基本的返回数据 * Created by bear on 2017/5/11. */ public class BaseResponseBean { private int code = CodeUtil.Succeed; private String message = ""; public BaseResponseBean() { } public BaseResponseBean(int code, String message) { this.code = code; this.message = message; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "luomingbear@163.com" ]
luomingbear@163.com
6a683a4a8aea3fe5af85223b2c041f96e2942dd1
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/android/support/v7/view/menu/v.java
0c99f3b85b6d604b2e43246d84a1001a3cb30658
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
1,638
java
package android.support.v7.view.menu; import android.content.Context; import android.graphics.drawable.Drawable; import android.support.v4.internal.view.SupportSubMenu; import android.view.MenuItem; import android.view.SubMenu; import android.view.View; class v extends r implements SubMenu { v(Context paramContext, SupportSubMenu paramSupportSubMenu) { super(paramContext, paramSupportSubMenu); } public SupportSubMenu b() { return (SupportSubMenu)this.b; } public void clearHeader() { b().clearHeader(); } public MenuItem getItem() { return a(b().getItem()); } public SubMenu setHeaderIcon(int paramInt) { b().setHeaderIcon(paramInt); return this; } public SubMenu setHeaderIcon(Drawable paramDrawable) { b().setHeaderIcon(paramDrawable); return this; } public SubMenu setHeaderTitle(int paramInt) { b().setHeaderTitle(paramInt); return this; } public SubMenu setHeaderTitle(CharSequence paramCharSequence) { b().setHeaderTitle(paramCharSequence); return this; } public SubMenu setHeaderView(View paramView) { b().setHeaderView(paramView); return this; } public SubMenu setIcon(int paramInt) { b().setIcon(paramInt); return this; } public SubMenu setIcon(Drawable paramDrawable) { b().setIcon(paramDrawable); return this; } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_dex2jar.jar * Qualified Name: android.support.v7.view.menu.v * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
221c6ede81d4f10ba0d620b7e86240ae02f3aae1
b52feb20530d8ab6b069bc46c958f0297c2df9f7
/utils/CATIA/HYBRIDSHAPETYPELIB/HybridShapeExtrapol.java
1f58f6e6c8e2515e5e04e8d0218893912c579a41
[]
no_license
pawelsadlo2/CatiaV5Com4j
e9a1c8c62163117c70c8166c462247bf87ca3df5
e985324b4d79e8b5a37662beeb6b914948b86758
refs/heads/master
2020-05-05T00:35:01.191353
2019-08-05T15:01:08
2019-08-05T15:01:08
179,579,412
0
0
null
null
null
null
UTF-8
Java
false
false
6,510
java
import com4j.*; @IID("{8C89B23A-36A7-0000-0280-020E60000000}") public interface HybridShapeExtrapol extends HybridShape { // Methods: /** * <p> * Getter method for the COM property "ElemToExtrapol" * </p> * @return Returns a value of type Reference */ @DISPID(1611005952) //= 0x60060000. The runtime will prefer the VTID if present @VTID(25) Reference elemToExtrapol(); /** * <p> * Setter method for the COM property "ElemToExtrapol" * </p> * @param oElemToExtrapol Mandatory Reference parameter. */ @DISPID(1611005952) //= 0x60060000. The runtime will prefer the VTID if present @VTID(26) void elemToExtrapol( Reference oElemToExtrapol); /** * <p> * Getter method for the COM property "Boundary" * </p> * @return Returns a value of type Reference */ @DISPID(1611005954) //= 0x60060002. The runtime will prefer the VTID if present @VTID(27) Reference boundary(); /** * <p> * Setter method for the COM property "Boundary" * </p> * @param oBoundary Mandatory Reference parameter. */ @DISPID(1611005954) //= 0x60060002. The runtime will prefer the VTID if present @VTID(28) void boundary( Reference oBoundary); /** * <p> * Getter method for the COM property "ElemUntil" * </p> * @return Returns a value of type Reference */ @DISPID(1611005956) //= 0x60060004. The runtime will prefer the VTID if present @VTID(29) Reference elemUntil(); /** * <p> * Setter method for the COM property "ElemUntil" * </p> * @param oElemUntil Mandatory Reference parameter. */ @DISPID(1611005956) //= 0x60060004. The runtime will prefer the VTID if present @VTID(30) void elemUntil( Reference oElemUntil); /** * <p> * Getter method for the COM property "Length" * </p> * @return Returns a value of type Length */ @DISPID(1611005958) //= 0x60060006. The runtime will prefer the VTID if present @VTID(31) Length length(); /** * <p> * Getter method for the COM property "LimitType" * </p> * @return Returns a value of type int */ @DISPID(1611005959) //= 0x60060007. The runtime will prefer the VTID if present @VTID(32) int limitType(); /** * <p> * Setter method for the COM property "LimitType" * </p> * @param oLim Mandatory int parameter. */ @DISPID(1611005959) //= 0x60060007. The runtime will prefer the VTID if present @VTID(33) void limitType( int oLim); /** * <p> * Getter method for the COM property "ContinuityType" * </p> * @return Returns a value of type int */ @DISPID(1611005961) //= 0x60060009. The runtime will prefer the VTID if present @VTID(34) int continuityType(); /** * <p> * Setter method for the COM property "ContinuityType" * </p> * @param oLim Mandatory int parameter. */ @DISPID(1611005961) //= 0x60060009. The runtime will prefer the VTID if present @VTID(35) void continuityType( int oLim); /** * <p> * Getter method for the COM property "BorderType" * </p> * @return Returns a value of type int */ @DISPID(1611005963) //= 0x6006000b. The runtime will prefer the VTID if present @VTID(36) int borderType(); /** * <p> * Setter method for the COM property "BorderType" * </p> * @param oBorder Mandatory int parameter. */ @DISPID(1611005963) //= 0x6006000b. The runtime will prefer the VTID if present @VTID(37) void borderType( int oBorder); /** * @return Returns a value of type boolean */ @DISPID(1611005965) //= 0x6006000d. The runtime will prefer the VTID if present @VTID(38) boolean isAssemble(); /** * @param iAssemble Mandatory boolean parameter. */ @DISPID(1611005966) //= 0x6006000e. The runtime will prefer the VTID if present @VTID(39) void setAssemble( boolean iAssemble); /** * <p> * Getter method for the COM property "Support" * </p> * @return Returns a value of type Reference */ @DISPID(1611005967) //= 0x6006000f. The runtime will prefer the VTID if present @VTID(40) Reference support(); /** * <p> * Setter method for the COM property "Support" * </p> * @param oSupport Mandatory Reference parameter. */ @DISPID(1611005967) //= 0x6006000f. The runtime will prefer the VTID if present @VTID(41) void support( Reference oSupport); /** * <p> * Getter method for the COM property "PropagationMode" * </p> * @return Returns a value of type int */ @DISPID(1611005969) //= 0x60060011. The runtime will prefer the VTID if present @VTID(42) int propagationMode(); /** * <p> * Setter method for the COM property "PropagationMode" * </p> * @param oPropagationMode Mandatory int parameter. */ @DISPID(1611005969) //= 0x60060011. The runtime will prefer the VTID if present @VTID(43) void propagationMode( int oPropagationMode); /** * @param iPos Mandatory int parameter. * @return Returns a value of type Reference */ @DISPID(1611005971) //= 0x60060013. The runtime will prefer the VTID if present @VTID(44) Reference getInternalEdgesElement( int iPos); /** */ @DISPID(1611005972) //= 0x60060014. The runtime will prefer the VTID if present @VTID(45) void removeAllInternalEdgesElement(); /** * <p> * Getter method for the COM property "ExtendEdgesMode" * </p> * @return Returns a value of type boolean */ @DISPID(1611005973) //= 0x60060015. The runtime will prefer the VTID if present @VTID(46) boolean extendEdgesMode(); /** * <p> * Setter method for the COM property "ExtendEdgesMode" * </p> * @param oExtendMode Mandatory boolean parameter. */ @DISPID(1611005973) //= 0x60060015. The runtime will prefer the VTID if present @VTID(47) void extendEdgesMode( boolean oExtendMode); /** * <p> * Getter method for the COM property "ConstantLengthMode" * </p> * @return Returns a value of type boolean */ @DISPID(1611005975) //= 0x60060017. The runtime will prefer the VTID if present @VTID(48) boolean constantLengthMode(); /** * <p> * Setter method for the COM property "ConstantLengthMode" * </p> * @param oConstantLengthMode Mandatory boolean parameter. */ @DISPID(1611005975) //= 0x60060017. The runtime will prefer the VTID if present @VTID(49) void constantLengthMode( boolean oConstantLengthMode); // Properties: }
[ "pawelsadlo2@gmail.com" ]
pawelsadlo2@gmail.com
4b49b1ec76e01bafd56c3fe289dbe1865f01dc7e
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project97/src/test/java/org/gradle/test/performance97_1/Test97_6.java
2eb7142af173a1a3ecd884b2438237b99a5d1020
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
286
java
package org.gradle.test.performance97_1; import static org.junit.Assert.*; public class Test97_6 { private final Production97_6 production = new Production97_6("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
4c235818f5e2dea7de05c9119e8c4c162f3384ec
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE191_Integer_Underflow/s02/CWE191_Integer_Underflow__int_getParameter_Servlet_sub_16.java
46cfc4e6336c3e81450bae3d30e61368de0ee0e0
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
4,578
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__int_getParameter_Servlet_sub_16.java Label Definition File: CWE191_Integer_Underflow__int.label.xml Template File: sources-sinks-16.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: getParameter_Servlet Read data from a querystring using getParameter() * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: sub * GoodSink: Ensure there will not be an underflow before subtracting 1 from data * BadSink : Subtract 1 from data, which can cause an Underflow * Flow Variant: 16 Control flow: while(true) * * */ package testcases.CWE191_Integer_Underflow.s02; import testcasesupport.*; import javax.servlet.http.*; import java.util.logging.Level; public class CWE191_Integer_Underflow__int_getParameter_Servlet_sub_16 extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; while (true) { data = Integer.MIN_VALUE; /* Initialize data */ /* POTENTIAL FLAW: Read data from a querystring using getParameter() */ { String stringNumber = request.getParameter("name"); try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading data from parameter 'name'", exceptNumberFormat); } } break; } while (true) { /* POTENTIAL FLAW: if data == Integer.MIN_VALUE, this will overflow */ int result = (int)(data - 1); IO.writeLine("result: " + result); break; } } /* goodG2B() - use goodsource and badsink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; while (true) { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; break; } while (true) { /* POTENTIAL FLAW: if data == Integer.MIN_VALUE, this will overflow */ int result = (int)(data - 1); IO.writeLine("result: " + result); break; } } /* goodB2G() - use badsource and goodsink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; while (true) { data = Integer.MIN_VALUE; /* Initialize data */ /* POTENTIAL FLAW: Read data from a querystring using getParameter() */ { String stringNumber = request.getParameter("name"); try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading data from parameter 'name'", exceptNumberFormat); } } break; } while (true) { /* FIX: Add a check to prevent an overflow from occurring */ if (data > Integer.MIN_VALUE) { int result = (int)(data - 1); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too small to perform subtraction."); } break; } } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* 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); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
f28eeacb1c8432ce38b2564eddae3c8c83f70014
35e46a270d1de548763c161c0dac554282a33d9d
/CSIS-DevR3/csis.domain/src/main/java/bo/gob/sin/sre/fac/domain/IRegistrarHuellaSistemaDomain.java
eeab50ede162ac3868a2f952b5ee0971f8574997
[]
no_license
cruz-victor/ServiciosSOAPyRESTJavaSpringBoot
e817e16c8518b3135a26d7ad7f6b0deb8066fe42
f04a2b40b118d2d34269c4f954537025b67b3784
refs/heads/master
2023-01-07T11:09:30.758600
2020-11-15T14:01:08
2020-11-15T14:01:08
312,744,182
1
0
null
null
null
null
UTF-8
Java
false
false
2,614
java
package bo.gob.sin.sre.fac.domain; import java.util.List; import bo.gob.sin.sre.fac.model.SreArchivos; import bo.gob.sin.sre.fac.model.SreComponentesArchivos; import bo.gob.sin.sre.fac.model.SreComponentesCertificados; public interface IRegistrarHuellaSistemaDomain { /** * Registrar Componente Certificado * * @author: Ivan Salas * @Fecha: 16/04/2018 * @modificadoPor: Carmen Rosa Silva * @FechaModificacion: 08/08/2018 * @param pSolicitud, objeto de tipo solicitud * @return Devuelve objeto SreComponentesCertificados */ public SreComponentesCertificados registrarComponenteCertificado(Integer pTipoComponenteId,Long pComponenteArchivoId, Long pUsuarioId,Long pSistemaId, Long pSolicitudCertificacionId); /** * Registrar Archivos * * @author: Ivan Salas * @Fecha: 16/04/2018 * @modificadoPor: Carmen Rosa Silva * @FechaModificacion: 08/08/2018 * @param pSolicitud, objeto de tipo solicitud * @return Devuelve objeto SreArchivos */ public SreArchivos registrarArchivos(byte[] pArchivo); /** * Registrar Componente Archivo * * @author: Ivan Salas * @Fecha: 16/04/2018 * @modificadoPor: Carmen Rosa Silva * @FechaModificacion: 08/08/2018 * @param pSolicitud, objeto de tipo solicitud * @return Devuelve true y false */ SreComponentesArchivos registrarComponentesArchivos(Long pUsuarioId,Long pArchivoId, String pMd5, String pSha2,String pCrc ,String pRuta,String pNombre ,String pMime); /** * Registrar Componente Archivo * * @author: Wilson Limachi * @Fecha: 20/09/2019 * @param pSolicitud, objeto de tipo solicitud * @return Devuelve entidad o null */ SreComponentesArchivos registrarComponentesArchivos(Long pUsuarioId,Long pArchivoId, String pMd5, String pSha2,String pCrc ,String pRuta,String pNombre ,String pMime, String pExtension); /** * Registrar Componente Certificado * * @author: Peter Flores * @Fecha: 15/11/2018 * @param pSolicitud, objeto de tipo solicitud * @return Devuelve un valor booleano que representa el estado de los registros que se desarrollo. */ public boolean registrarComponentesCertificados(List<Integer> pTipoComponenteId, Long pComponenteArchivoId, Long pUsuarioId,Long pSistemaId, Long pSolicitudCertificacionId); /** * Listado de los componentes de archivos de sistema. * * @author: Peter Flores * @Fecha: 20/11/2018 * @param pSistemaId, Código único de la entidad sistema. * @return Devuelve un listado de Dto de tipo Componentes archivos. */ public List<SreComponentesArchivos> obtieneComponentesArchivos(Long pSistemaId); }
[ "cruz.gomez.victor@gmail.com" ]
cruz.gomez.victor@gmail.com
3d03252c586346649ab05feb2cced99af65af8ce
797f6776fe6d2db66d4c0435354d5c888dfce074
/src/me/chyxion/xls/css/support/WidthApplier.java
150b50f7f4a0ee7fd3f041a21247fd5bbc0fdd33
[]
no_license
missingu924/chengben
f8014447dddb09e488297f21917816d9486162ba
28293b9d2babf559877927874c2044d2210cef16
refs/heads/master
2021-01-21T13:41:12.658047
2016-05-27T09:25:12
2016-05-27T09:25:12
49,367,526
0
1
null
null
null
null
UTF-8
Java
false
false
1,245
java
package me.chyxion.xls.css.support; import java.util.Map; import java.util.HashMap; import me.chyxion.xls.css.CssUtils; import me.chyxion.xls.css.CssApplier; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFCellStyle; /** * @version 0.0.1 * @since 0.0.1 * @author Shaun Chyxion <br> * chyxion@163.com <br> * Oct 24, 2014 5:14:22 PM */ public class WidthApplier implements CssApplier { /** * {@inheritDoc} */ public Map<String, String> parse(Map<String, String> style) { Map<String, String> mapRtn = new HashMap<String, String>(); String width = style.get(WIDTH); if (CssUtils.isNum(width)) { mapRtn.put(WIDTH, width); } return mapRtn; } /** * {@inheritDoc} */ public void apply(HSSFCell cell, HSSFCellStyle cellStyle, Map<String, String> style) { int width = Math.round(CssUtils.getInt(style.get(WIDTH)) * 2048 / 8.43F); HSSFSheet sheet = cell.getSheet(); int colIndex = cell.getColumnIndex(); if (width > sheet.getColumnWidth(colIndex)) { if (width > 255 * 256) { width = 255 * 256; } sheet.setColumnWidth(colIndex, width); } } }
[ "missingu924@163.com" ]
missingu924@163.com
20f96fe7a589cfda907d6f87d3dbbe721bbe8c8f
4d3fcef8c170d57e4663201afd9db5edbc58f836
/swg/crafting/resources/types/SWGVegetables.java
f701a1a78e3cd01b2be833a863c7a7b8fc6c6fc2
[]
no_license
Sobuno/SWGAide
1b28217fb2ed5978d451235c50aba641f651124f
8c48b7220da39efb25db579fa7deb91b3e8e9c9a
refs/heads/master
2021-07-08T12:13:43.802268
2020-10-02T19:57:06
2020-10-02T19:57:06
28,395,683
9
7
null
2020-10-02T19:57:07
2014-12-23T11:58:36
Java
UTF-8
Java
false
false
1,518
java
package swg.crafting.resources.types; import swg.crafting.resources.SWGResourceClass; import swg.crafting.resources.types.SWGSeeds; import swg.crafting.Stat; /* * Represents a resource class of type "Vegetables" * * <b>WARNING:</b> * This class is generated by SWGResourceClassGenerator. * Do not manually modify this class as your changes are * erased when the classes are re-generated. * * @author Steven M. Doyle <shadow@triwizard.net> * @author <a href="mailto:simongronlund@gmail.com">Simon Gronlund</a> * aka Chimaera.Zimoon */ @SuppressWarnings("all") public class SWGVegetables extends SWGSeeds { private static final long serialVersionUID = 1976762L; private static final int[] minStats = {0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0}; private static final int[] maxStats = {0, 0, 1000, 0, 1000, 0, 0, 1000, 1000, 0, 0}; private static final SWGVegetables INSTANCE = new SWGVegetables(); SWGVegetables() { super(); } public static SWGVegetables getInstance() { return INSTANCE; } public int expectedStats() { return 4; } public int sortIndex() { return 431; } public int rcID() { return 249; } public String rcName() { return "Vegetables";} public String rcToken() { return "veg";} public boolean has(Stat s) { return minStats[s.i] > 0; } public int max(Stat s) { return maxStats[s.i]; } public int min(Stat s) { return minStats[s.i]; } private Object readResolve() { return INSTANCE; // preserve singleton property } }
[ "jesper@sobuno.dk" ]
jesper@sobuno.dk
e0934a1ebabd33cc72863bbcd1244ae18f9554b7
322d24927f444ef46d0b52c7f98709c1a73df916
/src/main/java/com/lzw/bridge/ImplementorA.java
9e5e8430fcd06ab0c96a7c0081c57ea5fcf558ed
[]
no_license
longzhiwuing/GOFDemos
1ab1e907b941635228869ec4b9485dc8fe515a8c
4b5d2f3f02931abf78ebd6fd2214687fa7ac1bc9
refs/heads/master
2021-01-13T12:16:41.012045
2017-02-12T07:39:03
2017-02-12T07:39:03
78,318,168
2
0
null
null
null
null
UTF-8
Java
false
false
270
java
package com.lzw.bridge; /** * Created with IntelliJ IDEA. * User: chenzhongyong@cecdat.com * Date: 2017/2/10 * Time: 13:59 */ public class ImplementorA extends AbstractImplementor{ public void operate() { System.out.println("ImplementorA..."); } }
[ "czy3332842@gmail.com" ]
czy3332842@gmail.com
258ce28ce271e21a800779f6bda5d922634dbd86
b3e8c286f69ff584622a597ae892b39475028fd6
/PocCajaV26_source/sources/android/support/p000v4/app/NotificationCompatBase.java
f84aec3e3ef2b1b13ab97dc1fac8cc54397a3b3a
[]
no_license
EXPONENCIAL-IO/Accessphere
292e3ecf389a216cb656d5d3c22981061b7a2f45
1c07e06d85ed85972d14d848818dc24079a0ca2f
refs/heads/master
2022-11-24T22:12:37.776368
2020-07-26T02:30:17
2020-07-26T02:30:17
282,062,061
0
0
null
null
null
null
UTF-8
Java
false
false
2,156
java
package android.support.p000v4.app; import android.app.PendingIntent; import android.os.Bundle; import android.support.p000v4.app.RemoteInputCompatBase.RemoteInput; /* renamed from: android.support.v4.app.NotificationCompatBase */ public class NotificationCompatBase { /* renamed from: android.support.v4.app.NotificationCompatBase$Action */ public static abstract class Action { /* renamed from: android.support.v4.app.NotificationCompatBase$Action$Factory */ public interface Factory { Action build(int i, CharSequence charSequence, PendingIntent pendingIntent, Bundle bundle, RemoteInput[] remoteInputArr); Action[] newArray(int i); } public abstract PendingIntent getActionIntent(); public abstract Bundle getExtras(); public abstract int getIcon(); public abstract RemoteInput[] getRemoteInputs(); public abstract CharSequence getTitle(); } /* renamed from: android.support.v4.app.NotificationCompatBase$UnreadConversation */ public static abstract class UnreadConversation { /* renamed from: android.support.v4.app.NotificationCompatBase$UnreadConversation$Factory */ public interface Factory { UnreadConversation build(String[] strArr, RemoteInput remoteInput, PendingIntent pendingIntent, PendingIntent pendingIntent2, String[] strArr2, long j); } /* access modifiers changed from: 0000 */ public abstract long getLatestTimestamp(); /* access modifiers changed from: 0000 */ public abstract String[] getMessages(); /* access modifiers changed from: 0000 */ public abstract String getParticipant(); /* access modifiers changed from: 0000 */ public abstract String[] getParticipants(); /* access modifiers changed from: 0000 */ public abstract PendingIntent getReadPendingIntent(); /* access modifiers changed from: 0000 */ public abstract RemoteInput getRemoteInput(); /* access modifiers changed from: 0000 */ public abstract PendingIntent getReplyPendingIntent(); } }
[ "68705557+edomosin-exponencial@users.noreply.github.com" ]
68705557+edomosin-exponencial@users.noreply.github.com
3d8e2734635542d6442f9f967d842086442a93dc
6581111e1fecc4d6f6e3e52d549b2dfa10966b92
/jcabi-aspects/src/main/java/com/jcabi/aspects/Loggable.java
23be6545d1382c16861d1d3b687653b8bb2f8f73
[ "BSD-2-Clause" ]
permissive
kolemik/jcabi
a0ba91afe1265e256160e246a7e4d9ae4c1f37b7
fe1258e789b8e7f63add490b6dfd265f3c5e0866
refs/heads/master
2020-12-01T03:03:42.682464
2013-04-01T10:05:17
2013-04-01T10:05:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,444
java
/** * Copyright (c) 2012-2013, JCabi.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. 3) Neither the name of the jcabi.com nor * the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.jcabi.aspects; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.concurrent.TimeUnit; /** * Makes a method loggable via {@link com.jcabi.log.Logger}. * * <p>For example, this {@code load()} method produces a log line * on every call: * * <pre> &#64;Loggable * String load(String resource) throws IOException { * return "something"; * }</pre> * * <p>You can configure the level of logging: * * <pre> &#64;Loggable(Loggable.DEBUG) * void save(String resource) throws IOException { * // do something * }</pre> * * <p>Since version 0.7.6, you can specify a maximum execution time limit for * a method. If such a limit is reached a logging message will be issued with * a {@code WARN} priority. It is a very convenient mechanism for profiling * applications in production. Default value of a limit is 1 second. * * <pre> &#64;Loggable(limit = 2) * void save(String resource) throws IOException { * // do something, potentially slow * }</pre> * * <p>Since version 0.7.14 you can change the time unit for the "limit" * parameter. Default unit of measurement is a second: * * <pre> &#64;Loggable(limit = 200, unit = TimeUnit.MILLISECONDS) * void save(String resource) throws IOException { * // do something, potentially slow * }</pre> * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id$ * @since 0.7.2 * @see com.jcabi.log.Logger * @see <a href="http://www.jcabi.com/jcabi-aspects">http://www.jcabi.com/jcabi-aspects/</a> */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE }) @SuppressWarnings("PMD.VariableNamingConventions") public @interface Loggable { /** * TRACE level of logging. */ int TRACE = 0; /** * INFO level of logging. */ int INFO = 1; /** * DEBUG level of logging. */ int DEBUG = 2; /** * WARN level of logging. */ int WARN = 3; /** * ERROR level of logging. */ int ERROR = 4; /** * Level of logging. */ int value() default Loggable.INFO; /** * Maximum amount allowed for this method (a warning will be * issued if it takes longer). * @since 0.7.6 */ int limit() default 1; /** * Time unit for the limit. * @since 0.7.14 */ TimeUnit unit() default TimeUnit.SECONDS; /** * Shall we trim long texts in order to make log lines more readable? * @since 0.7.13 */ boolean trim() default true; /** * Method entry moment should be reported as well (by default only * an exit moment is reported). * @since 0.7.16 */ boolean prepend() default false; }
[ "yegor@tpc2.com" ]
yegor@tpc2.com
9e72abaf278d69ca027e2324d7b91474f74053cd
35e46a270d1de548763c161c0dac554282a33d9d
/CSIS-DevR3/csis.domain/src/main/java/bo/gob/sin/sre/fac/domain/ISistemasContribuyentesABMDomain.java
c5766aa0f956454a29bb9cd9802bfb0d47e582ab
[]
no_license
cruz-victor/ServiciosSOAPyRESTJavaSpringBoot
e817e16c8518b3135a26d7ad7f6b0deb8066fe42
f04a2b40b118d2d34269c4f954537025b67b3784
refs/heads/master
2023-01-07T11:09:30.758600
2020-11-15T14:01:08
2020-11-15T14:01:08
312,744,182
1
0
null
null
null
null
UTF-8
Java
false
false
759
java
package bo.gob.sin.sre.fac.domain; import bo.gob.sin.sre.fac.model.SreSistemasContribuyentes; public interface ISistemasContribuyentesABMDomain { /** * Cambiar estado en Sistemas Contribuyentes, parametrizado * * @author: Ivan Salas * @Fecha: 22/09/2018 * @modificadoPor: Carmen Rosa Silva * @FechaModificacion: 15/11/2018 * @param pSistemaId, id de la tabla sistema * @param pContribuyenteId, numero de persona id * @param pUsuario, número de identificacion del usuario * @param pEstadoId, nuevo estado de sistema * @return Devuelve objeto SreSolicitudCertificacion. */ public SreSistemasContribuyentes cambiarEstadoSistemaContribuyente(Long pSistemaId, Long pContribuyenteId, Long pUsuario,int pEstado, int pModalidad); }
[ "cruz.gomez.victor@gmail.com" ]
cruz.gomez.victor@gmail.com
38ef131cfa2dc30c1d3a8f5ffc0b4a8efd7a1dc1
d6c041879c662f4882892648fd02e0673a57261c
/com/planet_ink/coffee_mud/Abilities/Thief/Thief_Lore.java
cf3d54cada1ef31ebc30a897cb311a50be9987c9
[ "Apache-2.0" ]
permissive
linuxshout/CoffeeMud
15a2c09c1635f8b19b0d4e82c9ef8cd59e1233f6
a418aa8685046b08c6d970083e778efb76fd3716
refs/heads/master
2020-04-14T04:17:39.858690
2018-12-29T20:50:15
2018-12-29T20:50:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,120
java
package com.planet_ink.coffee_mud.Abilities.Thief; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2002-2018 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Thief_Lore extends ThiefSkill { @Override public String ID() { return "Thief_Lore"; } private final static String localizedName = CMLib.lang().L("Lore"); @Override public String name() { return localizedName; } @Override protected int canAffectCode() { return 0; } @Override protected int canTargetCode() { return Ability.CAN_ITEMS; } @Override public int abstractQuality() { return Ability.QUALITY_INDIFFERENT; } private static final String[] triggerStrings =I(new String[] {"LORE"}); @Override public String[] triggerStrings() { return triggerStrings; } @Override public boolean disregardsArmorCheck(final MOB mob) { return true; } @Override public int classificationCode() { return Ability.ACODE_THIEF_SKILL|Ability.DOMAIN_ARCANELORE; } @Override public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel) { if((givenTarget instanceof Item)&&(auto)&&(asLevel==-1)) { if(commands.size()==1) { if(commands.get(0).equals("MSG")) { int levelDiff=givenTarget.phyStats().level()-(mob.phyStats().level()+abilityCode()+(2*getXLEVELLevel(mob))); if(levelDiff<0) levelDiff=0; levelDiff*=5; final boolean success=proficiencyCheck(mob,-levelDiff,auto); commands.clear(); if(success && ((Item)givenTarget).secretIdentity().length()>0) commands.add(((Item)givenTarget).secretIdentity()); else commands.add(L("You discover no ancient lore about @x1.",givenTarget.name())); return true; } } } final Item target=getTarget(mob,mob.location(),givenTarget,commands,Wearable.FILTER_ANY); if(target==null) return false; if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; int levelDiff=target.phyStats().level()-(mob.phyStats().level()+abilityCode()+(2*getXLEVELLevel(mob))); if(levelDiff<0) levelDiff=0; levelDiff*=5; final boolean success=proficiencyCheck(mob,-levelDiff,auto); if(success) { final CMMsg msg=CMClass.getMsg(mob,target,this,CMMsg.MSG_DELICATE_HANDS_ACT,auto?"":L("<S-NAME> stud(ys) <T-NAMESELF> and consider(s) for a moment.")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); final String identity=target.secretIdentity(); mob.tell(identity); } } else beneficialVisualFizzle(mob,target,L("<S-NAME> stud(ys) <T-NAMESELF>, but can't remember a thing.")); return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
70dbb718b05a62b6f7bd7995b27f43406df69ef2
b40ff3afc5595aa1e807f312ec15e298ffc13bf2
/Java OOP Advanced/Exam 2/src/main/java/bg/softuni/models/EmergencyCenter/FireServiceCenter.java
4eb32bbde1c4767f47c6d906605817680f919f2a
[]
no_license
ViktorGorchev/Java-Fundamentals
26815f2fe35346c6f7b2a0073b16ee514f87382b
c2e318cc472a999750a72adce4feeb6b9f2e8c80
refs/heads/master
2020-12-24T09:38:21.871947
2016-11-09T10:56:59
2016-11-09T10:56:59
73,275,795
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package bg.softuni.models.EmergencyCenter; public class FireServiceCenter extends BaseEmergencyCenter{ private static final String MANAGES_EMERGENCY_TYPE_PROPERTY = "PropertyEmergency"; public FireServiceCenter(String name, Integer amountOfMaximumEmergencies) { super(name, amountOfMaximumEmergencies, MANAGES_EMERGENCY_TYPE_PROPERTY); } }
[ "viktor_g_g@yahoo.com" ]
viktor_g_g@yahoo.com
e1a770ca5a30060eee421d8c59a3b053e03439e6
3af6963d156fc1bf7409771d9b7ed30b5a207dc1
/runtime/src/main/java/apple/photos/PHAuthorizationStatus.java
cbad11d32f72bb9d7b5a030657c4f4d59b8c75aa
[ "Apache-2.0" ]
permissive
yava555/j2objc
1761d7ffb861b5469cf7049b51f7b73c6d3652e4
dba753944b8306b9a5b54728a40ca30bd17bdf63
refs/heads/master
2020-12-30T23:23:50.723961
2015-09-03T06:57:20
2015-09-03T06:57:20
48,475,187
0
0
null
2015-12-23T07:08:22
2015-12-23T07:08:22
null
UTF-8
Java
false
false
1,009
java
package apple.photos; import java.io.*; import java.nio.*; import java.util.*; import com.google.j2objc.annotations.*; import com.google.j2objc.runtime.*; import com.google.j2objc.runtime.block.*; import apple.audiotoolbox.*; import apple.corefoundation.*; import apple.coregraphics.*; import apple.coreservices.*; import apple.foundation.*; import apple.corelocation.*; import apple.uikit.*; import apple.avfoundation.*; /** * @since Available in iOS 8.0 and later. */ @Library("Photos/Photos.h") @Mapping("PHAuthorizationStatus") public final class PHAuthorizationStatus extends ObjCEnum { @GlobalConstant("PHAuthorizationStatusNotDetermined") public static final long NotDetermined = 0L; @GlobalConstant("PHAuthorizationStatusRestricted") public static final long Restricted = 1L; @GlobalConstant("PHAuthorizationStatusDenied") public static final long Denied = 2L; @GlobalConstant("PHAuthorizationStatusAuthorized") public static final long Authorized = 3L; }
[ "pchen@sellegit.com" ]
pchen@sellegit.com
fbce9fc1940fdef2262ceb151d5e51b17ac58ce1
e51de484e96efdf743a742de1e91bce67f555f99
/Android/triviacrack_src/src/com/etermax/preguntados/ui/profile/ProfileBlockedUsersActivity_.java
589a61b09b396ebe307e206b0274e2aaffd550f5
[]
no_license
adumbgreen/TriviaCrap
b21e220e875f417c9939f192f763b1dcbb716c69
beed6340ec5a1611caeff86918f107ed6807d751
refs/heads/master
2021-03-27T19:24:22.401241
2015-07-12T01:28:39
2015-07-12T01:28:39
28,071,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,517
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.etermax.preguntados.ui.profile; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import com.etermax.tools.f.d; import org.a.a.b.a; import org.a.a.b.c; // Referenced classes of package com.etermax.preguntados.ui.profile: // ProfileBlockedUsersActivity public final class ProfileBlockedUsersActivity_ extends ProfileBlockedUsersActivity implements a { private final c b = new c(); public ProfileBlockedUsersActivity_() { } private void a(Bundle bundle) { a = d.c(this); } public void onCreate(Bundle bundle) { c c1 = c.a(b); a(bundle); super.onCreate(bundle); c.a(c1); } public boolean onKeyDown(int i, KeyEvent keyevent) { if (org.a.a.c.a() < 5 && i == 4 && keyevent.getRepeatCount() == 0) { onBackPressed(); } return super.onKeyDown(i, keyevent); } public void setContentView(int i) { super.setContentView(i); b.a(this); } public void setContentView(View view) { super.setContentView(view); b.a(this); } public void setContentView(View view, android.view.ViewGroup.LayoutParams layoutparams) { super.setContentView(view, layoutparams); b.a(this); } }
[ "klayderpus@chimble.net" ]
klayderpus@chimble.net
5bbb78cbaa505975d4db0bcb78d5d75789b3817b
dfa6a7e03863e5f114b928618a83f1091b78df8b
/tests2s3h3/src/main/java/hjg/ssh/dao/UserDao.java
561dcb13f7c130dd53322929c3e27c4d19b64221
[]
no_license
zhaofeng555/integrationframework
3d09fc5b032a8fac70451261b69614d3f7e89664
af8b831d81bc3f3638e082ca66d8ae340f9c9e54
refs/heads/master
2021-01-01T19:42:15.333058
2017-07-19T07:34:19
2017-07-19T07:34:19
20,209,695
0
1
null
null
null
null
UTF-8
Java
false
false
176
java
package hjg.ssh.dao; import hjg.ssh.entity.User; import java.util.List; public interface UserDao { public List<User> list(); public User save(User user); }
[ "443842006@qq.com" ]
443842006@qq.com
5cbca73d24a6c530ac121053aebdb0d0231d18ff
19809d0be46f6582a7802a773afc792868304942
/java9SrcStudy/src/java.corba/com/sun/corba/se/spi/activation/InvalidORBidHolder.java
8b69f1738ca809aadf8cb3256ec9eba5ee922b16
[]
no_license
jxxiangwen/JavaStudy
fa5194630a0c46d498d1a49acba8449fa4d447e9
fbf2accf3e9ec24b633ef26d2f3328e6b021d054
refs/heads/master
2022-12-21T20:46:04.447682
2019-09-02T09:35:27
2019-09-02T09:35:27
48,320,572
0
0
null
null
null
null
UTF-8
Java
false
false
1,096
java
package com.sun.corba.se.spi.activation; /** * com/sun/corba/se/spi/activation/InvalidORBidHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /scratch/HUDSON/workspace/9-2-build-linux-amd64-phase2/jdk9/6725/corba/src/java.corba/share/classes/com/sun/corba/se/spi/activation/activation.idl * Thursday, August 3, 2017 3:57:51 AM UTC */ public final class InvalidORBidHolder implements org.omg.CORBA.portable.Streamable { public com.sun.corba.se.spi.activation.InvalidORBid value = null; public InvalidORBidHolder () { } public InvalidORBidHolder (com.sun.corba.se.spi.activation.InvalidORBid initialValue) { value = initialValue; } public void _read (org.omg.CORBA.portable.InputStream i) { value = com.sun.corba.se.spi.activation.InvalidORBidHelper.read (i); } public void _write (org.omg.CORBA.portable.OutputStream o) { com.sun.corba.se.spi.activation.InvalidORBidHelper.write (o, value); } public org.omg.CORBA.TypeCode _type () { return com.sun.corba.se.spi.activation.InvalidORBidHelper.type (); } }
[ "xiangwen.zou@ymm56.com" ]
xiangwen.zou@ymm56.com
77f4fd240e727c3569b5c9db6d9272d49234f141
8b25be1e1a6cb3052cc4ba63c8390fc26b08953c
/src/main/java/com/tmt/toomanythoughts/layers/persistence/daos/impl/IdiotDaoImpl.java
054ff69be683d16ea05e85bf426647e502b28e21
[]
no_license
SergDerbst/TooManyThoughts
2c26eed37938db5d6ae148a739832010cbbecd60
b1c737379d0c6b2d3b13c62921c77e5117e440a8
refs/heads/master
2021-01-22T10:02:51.867054
2015-06-28T18:19:55
2015-06-28T18:19:55
37,363,658
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
package com.tmt.toomanythoughts.layers.persistence.daos.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.tmt.toomanythoughts.layers.persistence.BaseCrudDaoService; import com.tmt.toomanythoughts.layers.persistence.daos.IdiotDao; import com.tmt.toomanythoughts.layers.persistence.entities.Idiot; import com.tmt.toomanythoughts.layers.persistence.repositories.IdiotRepository; @Service @Transactional public class IdiotDaoImpl extends BaseCrudDaoService<IdiotRepository, Idiot> implements IdiotDao { @Autowired IdiotRepository repository; @Override public IdiotRepository getRepository() { return this.repository; } @Override public Idiot findByIq(final Integer iq) { return this.repository.findByIq(iq); } }
[ "sergio.weigel@gmail.com" ]
sergio.weigel@gmail.com
f9a9924188492e7deaa7e9e50fd7fc20ad1cb47c
0c924da07ca254aab652b67532d8b7e57dc1cf52
/modules/flowable-content-engine/src/main/java/org/flowable/content/engine/impl/db/DbSchemaDrop.java
640a9e819751561bc521764fd086adff7eb702bf
[ "Apache-2.0" ]
permissive
qiudaoke/flowable-engine
60c9e11346af7b0dcd35f06a18f66806903a4f88
1a755206b4ced583a77f5c247c7906652b201718
refs/heads/master
2022-12-22T16:27:19.408600
2022-02-22T16:03:08
2022-02-22T16:03:08
148,082,646
2
0
Apache-2.0
2018-09-18T08:01:34
2018-09-10T01:31:14
Java
UTF-8
Java
false
false
2,961
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 org.flowable.content.engine.impl.db; import javax.sql.DataSource; import org.apache.commons.lang3.StringUtils; import org.flowable.content.engine.ContentEngine; import org.flowable.content.engine.ContentEngineConfiguration; import org.flowable.content.engine.ContentEngines; import liquibase.Liquibase; import liquibase.database.Database; import liquibase.database.DatabaseConnection; import liquibase.database.DatabaseFactory; import liquibase.database.jvm.JdbcConnection; import liquibase.resource.ClassLoaderResourceAccessor; /** * @author Tijs Rademakers */ public class DbSchemaDrop { public static void main(String[] args) { try { ContentEngine contentEngine = ContentEngines.getDefaultContentEngine(); DataSource dataSource = contentEngine.getContentEngineConfiguration().getDataSource(); DatabaseConnection connection = new JdbcConnection(dataSource.getConnection()); Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection); database.setDatabaseChangeLogTableName(ContentEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogTableName()); database.setDatabaseChangeLogLockTableName(ContentEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogLockTableName()); if (StringUtils.isNotEmpty(contentEngine.getContentEngineConfiguration().getDatabaseSchema())) { database.setDefaultSchemaName(contentEngine.getContentEngineConfiguration().getDatabaseSchema()); database.setLiquibaseSchemaName(contentEngine.getContentEngineConfiguration().getDatabaseSchema()); } if (StringUtils.isNotEmpty(contentEngine.getContentEngineConfiguration().getDatabaseCatalog())) { database.setDefaultCatalogName(contentEngine.getContentEngineConfiguration().getDatabaseCatalog()); database.setLiquibaseCatalogName(contentEngine.getContentEngineConfiguration().getDatabaseCatalog()); } Liquibase liquibase = new Liquibase("org/flowable/content/db/liquibase/flowable-content-db-changelog.xml", new ClassLoaderResourceAccessor(), database); liquibase.dropAll(); liquibase.getDatabase().close(); } catch (Exception e) { e.printStackTrace(); } } }
[ "tijs.rademakers@gmail.com" ]
tijs.rademakers@gmail.com
efc7a081ff86e09d6c2c36d3cd4d9cd93f1bee7d
7033053710cf2fd800e11ad609e9abbb57f1f17e
/cardayProject/carrental-service/src/main/java/com/cmdt/carrental/platform/service/model/request/driver/DriverListByUnallocatedDep.java
f9996ca30c1924c26d5460e447a160fc5918eaf2
[]
no_license
chocoai/cardayforfjga
731080f72c367c7d3b8e7844a1c3cd034cc11ee6
91d7c8314f44024825747e12a60324ffc3d43afb
refs/heads/master
2020-04-29T02:14:07.834535
2018-04-02T09:51:07
2018-04-02T09:51:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,147
java
package com.cmdt.carrental.platform.service.model.request.driver; import javax.validation.constraints.Digits; import javax.validation.constraints.NotNull; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @JsonInclude(Include.NON_NULL) public class DriverListByUnallocatedDep { private static final long serialVersionUID = 1L; @NotNull(message="userId不能为空") private Long userId; private String realname; private String phone; private String email; private String username; @NotNull(message="currentPage不能为空") @Digits(message="currentPage格式错误,最小1,最大:"+ Integer.MAX_VALUE, fraction = 1, integer = Integer.MAX_VALUE) private int currentPage; @NotNull(message="numPerPage不能为空") @Digits(message="numPerPage格式错误,最小1,最大:"+ Integer.MAX_VALUE, fraction = 1, integer = Integer.MAX_VALUE) private int numPerPage; private boolean selfDept; private boolean childDept; public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public String getRealname() { return realname; } public void setRealname(String realname) { this.realname = realname; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public int getCurrentPage() { return currentPage; } public void setCurrentPage(int currentPage) { this.currentPage = currentPage; } public int getNumPerPage() { return numPerPage; } public void setNumPerPage(int numPerPage) { this.numPerPage = numPerPage; } public boolean getSelfDept() { return selfDept; } public void setSelfDept(boolean selfDept) { this.selfDept = selfDept; } public boolean getChildDept() { return childDept; } public void setChildDept(boolean childDept) { this.childDept = childDept; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
[ "xiaoxing.zhou@cm-dt.com" ]
xiaoxing.zhou@cm-dt.com
6ff1e9d675603895bab43200e355a9a90854495a
2d678fff672d582fcd0c25a1f10a0c11c2cd0207
/JavaOOPAdvanced/ExerciseObjectsAndCommunication/src/eventImplementation/NameChangeListener.java
f3bb1ad357368c00c8c49182971d1bc85ed70f5b
[]
no_license
totopopov/SoftUniJavaOOP
32aea6928ba8a1eef51ad5e8a40a724d4c844a78
0b2eeb06fa1c9b547e0ef42bb74b6bbb16d05d7e
refs/heads/master
2021-01-18T17:53:27.274139
2017-08-16T17:06:21
2017-08-16T17:06:21
100,505,616
0
0
null
null
null
null
UTF-8
Java
false
false
190
java
package eventImplementation; /** * Created by Todor Popov using Lenovo on 12.4.2017 г. at 19:16. */ public interface NameChangeListener { void handleChangedName(NameChange event); }
[ "totopopov@gmail.com" ]
totopopov@gmail.com
d1d9d760976203b78e21c2c204624990c6427ea4
514355bb8a1bb1e4cc9091a2e2d63326bafe0ba4
/user-service/src/main/java/com/jx/user/service/impl/AddressServiceImpl.java
6ac1c7f703c819dbe7570a1242568ee3dcd80c52
[]
no_license
XIAOguojia/jx
1b002914bba082684250b88abb6f5a9ec10a2843
6b8b9dfbb70dc01cf9a4e201a36297fea3528295
refs/heads/master
2020-04-14T15:42:26.875893
2019-05-13T10:36:55
2019-05-13T10:36:55
163,935,299
0
0
null
null
null
null
UTF-8
Java
false
false
3,763
java
package com.jx.user.service.impl; import java.util.List; import com.jx.pojo.TbAddressExample; import com.jx.user.service.AddressService; import org.springframework.beans.factory.annotation.Autowired; import com.alibaba.dubbo.config.annotation.Service; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.jx.mapper.TbAddressMapper; import com.jx.pojo.TbAddress; import entity.PageResult; /** * 服务实现层 * @author Administrator * */ @Service public class AddressServiceImpl implements AddressService { @Autowired private TbAddressMapper addressMapper; /** * 查询全部 */ @Override public List<TbAddress> findAll() { return addressMapper.selectByExample(null); } /** * 按分页查询 */ @Override public PageResult findPage(int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); Page<TbAddress> page= (Page<TbAddress>) addressMapper.selectByExample(null); return new PageResult(page.getTotal(), page.getResult()); } /** * 增加 */ @Override public void add(TbAddress address) { addressMapper.insert(address); } /** * 修改 */ @Override public void update(TbAddress address){ addressMapper.updateByPrimaryKey(address); } /** * 根据ID获取实体 * @param id * @return */ @Override public TbAddress findOne(Long id){ return addressMapper.selectByPrimaryKey(id); } /** * 批量删除 */ @Override public void delete(Long[] ids) { for(Long id:ids){ addressMapper.deleteByPrimaryKey(id); } } @Override public PageResult findPage(TbAddress address, int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); TbAddressExample example=new TbAddressExample(); TbAddressExample.Criteria criteria = example.createCriteria(); if(address!=null){ if(address.getUserId()!=null && address.getUserId().length()>0){ criteria.andUserIdLike("%"+address.getUserId()+"%"); } if(address.getProvinceId()!=null && address.getProvinceId().length()>0){ criteria.andProvinceIdLike("%"+address.getProvinceId()+"%"); } if(address.getCityId()!=null && address.getCityId().length()>0){ criteria.andCityIdLike("%"+address.getCityId()+"%"); } if(address.getTownId()!=null && address.getTownId().length()>0){ criteria.andTownIdLike("%"+address.getTownId()+"%"); } if(address.getMobile()!=null && address.getMobile().length()>0){ criteria.andMobileLike("%"+address.getMobile()+"%"); } if(address.getAddress()!=null && address.getAddress().length()>0){ criteria.andAddressLike("%"+address.getAddress()+"%"); } if(address.getContact()!=null && address.getContact().length()>0){ criteria.andContactLike("%"+address.getContact()+"%"); } if(address.getIsDefault()!=null && address.getIsDefault().length()>0){ criteria.andIsDefaultLike("%"+address.getIsDefault()+"%"); } if(address.getNotes()!=null && address.getNotes().length()>0){ criteria.andNotesLike("%"+address.getNotes()+"%"); } if(address.getAlias()!=null && address.getAlias().length()>0){ criteria.andAliasLike("%"+address.getAlias()+"%"); } } Page<TbAddress> page= (Page<TbAddress>)addressMapper.selectByExample(example); return new PageResult(page.getTotal(), page.getResult()); } /** * 根据用户查询地址 * @param userId 当前登录的用户 * @return */ @Override public List<TbAddress> findListByUserId(String userId) { TbAddressExample example = new TbAddressExample(); TbAddressExample.Criteria criteria = example.createCriteria(); criteria.andUserIdEqualTo(userId); List<TbAddress> addresses = addressMapper.selectByExample(example); return addresses; } }
[ "gjnerevmoresf@gmail.com" ]
gjnerevmoresf@gmail.com
3c31182b455e0f93f6834fe0fc339068c21f3586
bcf43040042f45299edfb7cc70c8223f431d0bdb
/das-console-manager/src/test/java/com/ppdai/platform/das/console/controller/GroupDatabaseControllerTest2.java
84239d08fb105eeef9f20df10c0c5bc8847342d5
[ "Apache-2.0" ]
permissive
mailfly/das
1f44dde0c3e5cf52c2c22e0dcf34f0f4a90102e6
294e459e4a450af90b7051abc48fdb20231cebe5
refs/heads/master
2020-08-27T16:32:44.530469
2019-10-24T09:43:21
2019-10-24T09:43:21
217,433,959
1
0
Apache-2.0
2019-10-25T02:25:02
2019-10-25T02:25:00
null
UTF-8
Java
false
false
5,841
java
package com.ppdai.platform.das.console.controller; import com.alibaba.fastjson.JSONObject; import com.ppdai.platform.das.console.common.interceptor.CommStatusInterceptor; import com.ppdai.platform.das.console.common.interceptor.permissions.UserLoginInterceptor; import com.ppdai.platform.das.console.constant.Message; import com.ppdai.platform.das.console.dao.*; import com.ppdai.platform.das.console.dto.entry.das.DasGroup; import com.ppdai.platform.das.console.dto.model.Paging; import com.ppdai.platform.das.console.service.GroupService; import com.ppdai.platform.das.console.service.PermissionService; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultHandlers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; @RunWith(SpringRunner.class) @WebMvcTest(GroupController.class) public class GroupDatabaseControllerTest2 { @Autowired private WebApplicationContext webApplicationContext; @MockBean private UserLoginInterceptor userLoginInterceptor; @MockBean private CommStatusInterceptor commStatusInterceptor; @MockBean private GroupService groupService; @MockBean private GroupDao groupDao; @MockBean private Message message; @MockBean private ProjectDao projectDao; @MockBean private DataBaseDao dataBaseDao; @MockBean private LoginUserDao loginUserDao; @MockBean private DatabaseSetDao databaseSetDao; @MockBean private UserGroupDao userGroupDao; @MockBean private PermissionService permissionService; private MockMvc mockMvc; private String requestJson; @Before public void setupMockMvc() { mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build(); //初始化MockMvc对象 requestJson = JSONObject.toJSONString(DasGroup.builder().id(1L).group_name("name").build()); } @Test public void tree() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/group/tree") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void getMemberGroups() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/group/member/tree") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void getUserGroups() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/group/userGroups") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void getAllGroup() throws Exception { Paging<DasGroup> paging = new Paging<>(); paging.setData(new DasGroup()); String requestJson = JSONObject.toJSONString(paging); mockMvc.perform(MockMvcRequestBuilders.post("/group/list") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(requestJson) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void add() throws Exception { mockMvc.perform(MockMvcRequestBuilders.post("/group/add") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(requestJson) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void update() throws Exception { mockMvc.perform(MockMvcRequestBuilders.put("/group/update") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(requestJson) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void delete() throws Exception { mockMvc.perform(MockMvcRequestBuilders.delete("/group/delete") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(requestJson) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } @Test public void sync() throws Exception { mockMvc.perform(MockMvcRequestBuilders.post("/group/sync") .contentType(MediaType.APPLICATION_JSON_UTF8) .param("id", "1") .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); } }
[ "wangliang@ppdai.com" ]
wangliang@ppdai.com
ce01fab38aacd86e55e0d7c9de4f9c7a63ed7dfb
54d2953f37bf1094f77e5978b45f14d25942eee8
/bundles/opaeum-papyrus-uim/org.opaeum.uimodeler.perspective.diagram/src/org/opaeum/uimodeler/perspective/diagram/preferences/DiagramConnectionsPreferencePage.java
6fb04fceae10774198bf40989e47df35657b833a
[]
no_license
opaeum/opaeum
7d30c2fc8f762856f577c2be35678da9890663f7
a517c2446577d6a961c1fcdcc9d6e4b7a165f33d
refs/heads/master
2022-07-14T00:35:23.180202
2016-01-01T15:23:11
2016-01-01T15:23:11
987,891
2
2
null
2022-06-29T19:45:00
2010-10-14T19:11:53
Java
UTF-8
Java
false
false
522
java
package org.opaeum.uimodeler.perspective.diagram.preferences; import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage; import org.opaeum.uimodeler.perspective.diagram.part.PerspectiveConfigurationDiagramEditorPlugin; /** * @generated */ public class DiagramConnectionsPreferencePage extends ConnectionsPreferencePage{ /** * @generated */ public DiagramConnectionsPreferencePage(){ setPreferenceStore(PerspectiveConfigurationDiagramEditorPlugin.getInstance().getPreferenceStore()); } }
[ "ampieb@gmail.com" ]
ampieb@gmail.com
e58a406b9ffcb9f9306b581d526ffd0bc7faba74
8a1e12175f49bc0fc6b051bfce2f60d615d23233
/ZWBS-Android/app/src/main/java/com/ruitukeji/zwbs/mine/mywallet/paymentpasswordmanagement/modifypaymentpassword/ModifyPaymentPassword1Activity.java
2f2529a96da4a3fdd69aa5f8fa40ac5f623ce67a
[ "Apache-2.0" ]
permissive
921668753/wztx-driver-andriod
351aa6e1fafa6769938835c165d022398f593a4a
e23b5ebc64f3c05e6f0c2a98bf2e8798b0ce9c63
refs/heads/master
2021-09-10T15:24:24.339253
2018-03-28T12:15:54
2018-03-28T12:15:54
112,326,174
0
0
null
null
null
null
UTF-8
Java
false
false
4,574
java
package com.ruitukeji.zwbs.mine.mywallet.paymentpasswordmanagement.modifypaymentpassword; import android.annotation.SuppressLint; import android.os.CountDownTimer; import android.view.View; import android.widget.TextView; import com.kymjs.common.PreferenceHelper; import com.kymjs.common.StringUtils; import com.ruitukeji.zwbs.R; import com.ruitukeji.zwbs.common.BaseActivity; import com.ruitukeji.zwbs.common.BindView; import com.ruitukeji.zwbs.constant.StringConstants; import com.ruitukeji.zwbs.utils.ActivityTitleUtils; import com.ruitukeji.zwbs.utils.myview.VerifyCodeView; /** * 修改支付密码 * Created by Administrator on 2017/12/13. */ public class ModifyPaymentPassword1Activity extends BaseActivity implements ModifyPaymentPasswordContract.View { /** * 倒计时内部类 */ private TimeCount time; /** * 手机号 */ @BindView(id = R.id.tv_phone) private TextView tv_phone; /** * 验证码 */ @BindView(id = R.id.verify_code_view) private VerifyCodeView verifyCodeView; /** * 倒计时 */ @BindView(id = R.id.tv_timing, click = true) private TextView tv_timing; String phone; /** * 验证码类型 reg=注册 restpwd=找回密码 login=登陆 bind=绑定手机号. */ private String type = "resetpaypwd"; @Override public void setRootView() { setContentView(R.layout.activity_modifypaymentpassword1); } @Override public void initData() { super.initData(); mPresenter = new ModifyPaymentPasswordPresenter(this); time = new TimeCount(60000, 1000);// 构造CountDownTimer对象 phone = PreferenceHelper.readString(aty, StringConstants.FILENAME, "phone", ""); if (StringUtils.isEmpty(phone)) { finish(); return; } ((ModifyPaymentPasswordContract.Presenter) mPresenter).postCode(phone, type); } @SuppressLint("SetTextI18n") @Override public void initWidget() { super.initWidget(); ActivityTitleUtils.initToolbar(aty, getString(R.string.modifyPaymentPassword), true, R.id.titlebar); verifyCodeView.setInputCompleteListener(new VerifyCodeView.InputCompleteListener() { @Override public void inputComplete() { showLoadingDialog(getString(R.string.submissionLoad)); ((ModifyPaymentPasswordContract.Presenter) mPresenter).postVerificationCode(phone, verifyCodeView.getEditContent()); } @Override public void invalidContent() { } }); tv_phone.setText(phone.substring(0, 3) + "****" + phone.substring(phone.length() - 4)); } @Override public void widgetClick(View v) { super.widgetClick(v); switch (v.getId()) { case R.id.tv_timing: showLoadingDialog(getString(R.string.sendingLoad)); ((ModifyPaymentPasswordContract.Presenter) mPresenter).postCode(phone, type); break; } } /* 定义一个倒计时的内部类 */ class TimeCount extends CountDownTimer { public TimeCount(long millisInFuture, long countDownInterval) { super(millisInFuture, countDownInterval);// 参数依次为总时长,和计时的时间间隔 } @Override public void onFinish() {// 计时完毕时触发 tv_timing.setText(getString(R.string.revalidation)); tv_timing.setClickable(true); } @SuppressLint("SetTextI18n") @Override public void onTick(long millisUntilFinished) {// 计时过程显示 tv_timing.setClickable(false); tv_timing.setText(millisUntilFinished / 1000 + getString(R.string.toResend1)); } } @Override public void setPresenter(ModifyPaymentPasswordContract.Presenter presenter) { mPresenter = presenter; } @Override public void getSuccess(String success, int flag) { if (flag == 0) { time.start(); } else if (flag == 1) { time.cancel(); time = null; showActivity(aty, ModifyPaymentPassword2Activity.class); } dismissLoadingDialog(); } @Override public void errorMsg(String msg, int flag) { dismissLoadingDialog(); if (flag == 0) { tv_timing.setText(getString(R.string.revalidation)); tv_timing.setClickable(true); return; } toLigon1(msg); } }
[ "921668753@qq.com" ]
921668753@qq.com
366e303df64f86269523e056a9cd654fcbea6e9d
3d3bdebd0f47d5005f58be9e6bd6e726a520b7fe
/src/main/java/com/isac/ssl/SecurityConfig.java
ac0c82b00d65cf0189ef5131f62403f225b6fc06
[]
no_license
VanderleiKs/HTTPS-using-Self-Signed-Certificate-in-Spring-Boot
ee3d4aaf4b6b6705895b9db220339e1266d53ec8
ea3616b7c37d4d51da8c7fe1ad0b38c244f29265
refs/heads/master
2023-06-21T22:48:16.088920
2021-03-21T23:52:38
2021-03-21T23:52:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
package com.isac.ssl; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/**") .permitAll(); } }
[ "isaccanedo@gmail.com" ]
isaccanedo@gmail.com
bdc0703ccf07814730eae374f6c00a8745c7f9ef
42de90de47edff1b3d89d85d65e05b1adfe15689
/FeatureTests/OBOPS/webaqua/src/main/java/de/aqua/web/utils/CaptureScreenshotUtil.java
b2c9c277ddf980202906ba9eca8472daec5ca362
[]
no_license
ahalester/IRM_CI_F2F_2018
f9549b519a75d589a352a87c4c509c2eb03d5a12
61921c2ce9f8e08abf1477eaa87c259c2255d1a2
refs/heads/master
2021-07-21T09:50:31.159107
2019-11-21T18:22:25
2019-11-21T18:22:25
223,235,940
0
0
null
2020-10-13T17:39:11
2019-11-21T18:14:49
Java
UTF-8
Java
false
false
1,810
java
package de.aqua.web.utils; import cucumber.api.Scenario; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.FileOutputStream; import de.aqua.web.delegates.WebDriverExtended; /** * Created by bdumitru on 7/12/2017. */ @SuppressWarnings("unused") public class CaptureScreenshotUtil { public static Logger LOG = LoggerFactory.getLogger(CaptureScreenshotUtil.class); public static void captureScreenshot(WebDriverExtended driver, String childClassName, Scenario scenario) { try { // Make sure that the directory is there // new File("target/surefire-reports/").mkdirs(); new File("target/surefire-reports/"); String fileName = "target/surefire-reports/screenshot-" + childClassName + "_" + System.currentTimeMillis() + ".png"; FileOutputStream out = new FileOutputStream(fileName); final byte[] screenshot = driver.getScreenshot(); out.write(screenshot); scenario.embed(screenshot, fileName); //stick it in the report out.close(); } catch (Exception e) { LOG.info("Could not take the screenshot"); } // try { // // Make sure that the directory is there // new File("target/surefire-reports/").mkdirs(); // FileOutputStream out = new FileOutputStream( // "target/surefire-reports/screenshot-" + childClassName + "_" + System.currentTimeMillis() + ".png"); // out.write(driver.getScreenshot()); // out.close(); // } catch (Exception e) { // LOG.info("Could not take the screenshot"); // } } }
[ "ahale@anhydrite.cv.nrao.edu" ]
ahale@anhydrite.cv.nrao.edu
f36ec72e55e30238691f2cd5ffa0536abb91e204
982390f1f83cb0d1c0544434b376cac25fb0966a
/kernel/base/src/test/java/com/twosigma/beakerx/chart/categoryplot/plotitem/CategoryStemsTest.java
c4684827875cf47d39c758724b0d5b0e701af17c
[ "Apache-2.0", "EPL-1.0", "MPL-2.0", "LicenseRef-scancode-proprietary-license", "BSD-3-Clause", "MIT" ]
permissive
splicemachine/beakerx
a72365614eef98c94e37fdf7ba43e17447962b42
afce8900a08d6cbea540608f0c9c88af7b3f7bc0
refs/heads/master
2021-07-13T21:13:45.196374
2020-01-30T21:38:34
2020-01-30T21:38:34
236,809,369
1
0
Apache-2.0
2021-02-18T06:51:54
2020-01-28T18:34:30
Java
UTF-8
Java
false
false
1,923
java
/* * Copyright 2014 TWO SIGMA OPEN SOURCE, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.twosigma.beakerx.chart.categoryplot.plotitem; import com.twosigma.beakerx.chart.xychart.plotitem.StrokeType; import org.assertj.core.api.Assertions; import org.junit.Before; import org.junit.Test; import java.util.Arrays; public class CategoryStemsTest { CategoryStems categoryStems; @Before public void setUp() throws Exception { categoryStems = new CategoryStems(); } @Test public void createCategoryStemsByEmptyConstructor_hasWidthGreaterThanZero() { //then Assertions.assertThat(categoryStems.getWidth()).isGreaterThan(0); } @Test public void setBaseIntegerListParam_hasBasesListIsNotEmpty() { //when categoryStems.setBase(Arrays.asList(new Integer(1), new Integer(2))); //then Assertions.assertThat(categoryStems.getBases()).isNotEmpty(); } @Test public void setStyleWithStrokeTypeListParam_hasStylesListIsNotEmpty() { //when categoryStems.setStyle(Arrays.asList(StrokeType.values())); //then Assertions.assertThat(categoryStems.getStyles()).isNotEmpty(); } @Test public void setValueWithIntegerArrayParam_hasValueIsNotEmpty() { //when categoryStems.setValue(new Integer[] {new Integer(1), new Integer(2)}); //then Assertions.assertThat(categoryStems.getValue()).isNotEmpty(); } }
[ "spot@draves.org" ]
spot@draves.org
993b8991bc57d49b0da13550baa8ea309d25cae0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_59bb022391ad3633a408c29f64c6d99393123015/Neo4jGraphPersistenceTest/19_59bb022391ad3633a408c29f64c6d99393123015_Neo4jGraphPersistenceTest_s.java
6f355908d681169d1378009bdb4b96cf4c1489f2
[]
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
6,918
java
package org.springframework.persistence.test.graph; import junit.framework.Assert; import org.junit.After; import org.junit.Ignore; import org.junit.Test; import org.junit.Ignore; import org.junit.runner.RunWith; import org.neo4j.graphdb.DynamicRelationshipType; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.NotInTransactionException; import org.neo4j.graphdb.Transaction; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.dao.InvalidDataAccessResourceUsageException; import org.springframework.persistence.graph.Direction; import org.springframework.persistence.graph.neo4j.NodeBacked; import org.springframework.persistence.support.EntityInstantiator; import org.springframework.persistence.test.Person; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration public class Neo4jGraphPersistenceTest { protected final Log log = LogFactory.getLog(getClass()); @Autowired private EntityInstantiator<NodeBacked,Node> nodeInstantiator; @Autowired protected GraphDatabaseService graphDatabaseService; private static Long insertedId = 0L; @Test public void testStuffWasAutowired() { Assert.assertNotNull( graphDatabaseService ); Assert.assertNotNull( nodeInstantiator ); } @Test @Transactional @Rollback(false) public void testUserConstructor() { Person p = new Person("Rod", 39); Assert.assertEquals(p.getName(), p.getUnderlyingNode().getProperty("Person.name")); Assert.assertEquals(p.getAge(), p.getUnderlyingNode().getProperty("Person.age")); insertedId = p.getId(); } @Test @Transactional public void testSetProperties() { Person p = new Person("Foo", 2); p.setName("Michael"); p.setAge(35); Assert.assertEquals("Michael", p.getUnderlyingNode().getProperty("Person.name")); Assert.assertEquals(35, p.getUnderlyingNode().getProperty("Person.age")); } @Test @Transactional public void testCreateRelationshipWithoutAnnotationOnSet() { Person p = new Person("Michael", 35); Person spouse = new Person("Tina",36); p.setSpouse(spouse); Node spouseNode=p.getUnderlyingNode().getSingleRelationship(DynamicRelationshipType.withName("Person.spouse"), org.neo4j.graphdb.Direction.OUTGOING).getEndNode(); Assert.assertEquals(spouse.getUnderlyingNode(), spouseNode); Assert.assertEquals(spouse, p.getSpouse()); } @Test @Transactional public void testCreateRelationshipWithAnnotationOnSet() { Person p = new Person("Michael", 35); Person mother = new Person("Gabi",60); p.setMother(mother); Node motherNode = p.getUnderlyingNode().getSingleRelationship(DynamicRelationshipType.withName("mother"), org.neo4j.graphdb.Direction.OUTGOING).getEndNode(); Assert.assertEquals(mother.getUnderlyingNode(), motherNode); Assert.assertEquals(mother, p.getMother()); } @Test @Transactional public void testDeleteRelationship() { Person p = new Person("Michael", 35); Person spouse = new Person("Tina", 36); p.setSpouse(spouse); p.setSpouse(null); Assert.assertNull(p.getUnderlyingNode().getSingleRelationship(DynamicRelationshipType.withName("Person.spouse"), org.neo4j.graphdb.Direction.OUTGOING)); Assert.assertNull(p.getSpouse()); } @Test @Transactional public void testDeletePreviousRelationshipOnNewRelationship() { Person p = new Person("Michael", 35); Person spouse = new Person("Tina", 36); Person friend = new Person("Helga", 34); p.setSpouse(spouse); p.setSpouse(friend); Assert.assertEquals(friend.getUnderlyingNode(), p.getUnderlyingNode().getSingleRelationship(DynamicRelationshipType.withName("Person.spouse"), org.neo4j.graphdb.Direction.OUTGOING).getEndNode()); Assert.assertEquals(friend, p.getSpouse()); } @Test @Transactional public void testCreateIncomingRelationshipWithAnnotationOnSet() { Person p = new Person("David", 25); Person boss = new Person("Emil", 32); p.setBoss(boss); Assert.assertEquals(boss.getUnderlyingNode(), p.getUnderlyingNode().getSingleRelationship(DynamicRelationshipType.withName("boss"), org.neo4j.graphdb.Direction.INCOMING).getStartNode()); Assert.assertEquals(boss, p.getBoss()); } @Test(expected = InvalidDataAccessResourceUsageException.class) public void testCreateOutsideTransaction() { Person p = new Person("Michael", 35); } @Test(expected = InvalidDataAccessResourceUsageException.class) public void testSetPropertyOutsideTransaction() { Transaction tx = graphDatabaseService.beginTx(); Person p = null; try { p = new Person("Michael", 35); tx.success(); } finally { tx.finish(); } p.setAge(25); } @Test(expected = InvalidDataAccessResourceUsageException.class) public void testCreateRelationshipOutsideTransaction() { Transaction tx = graphDatabaseService.beginTx(); Person p = null; Person spouse = null; try { p = new Person("Michael", 35); spouse = new Person("Tina", 36); tx.success(); } finally { tx.finish(); } p.setSpouse(spouse); } @Test public void testGetPropertyOutsideTransaction() { Transaction tx = graphDatabaseService.beginTx(); Person p = null; try { p = new Person("Michael", 35); tx.success(); } finally { tx.finish(); } Assert.assertEquals("Wrong age.", 35, p.getAge()); } @Test(expected = InvalidDataAccessApiUsageException.class) @Transactional public void testCircularRelationship() { Person p = new Person("Michael", 35); p.setSpouse(p); } @Test @Transactional public void testInstantiatedFinder() { Node n = findPersonTestNode(); Person found = nodeInstantiator.createEntityFromState(n, Person.class); Assert.assertEquals("Rod", found.getUnderlyingNode().getProperty("Person.name")); Assert.assertEquals(39, found.getUnderlyingNode().getProperty("Person.age")); } @Test public void printNeo4jData() { StringBuilder ret = new StringBuilder(); for (Node n : graphDatabaseService.getAllNodes()) { ret.append("ID: " + n.getId() + " ["); int x = 0; for (String prop : n.getPropertyKeys()) { if (x++ > 0) { ret.append(", "); } ret.append(prop + "=" + n.getProperty(prop)); } ret.append("] "); } System.out.println("*** NEO4J DATA: " + ret); } private Node findPersonTestNode() { return graphDatabaseService.getNodeById(insertedId); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
309156191b83dc69d2c2aa8803c3865cf3c47900
e0a129369069f0f2b707286b4949693ef710cc15
/structurizr-core/src/com/structurizr/encryption/EncryptedWorkspace.java
cd8af05415f4c09ecd9716b17c6acc44cdf20417
[ "Apache-2.0" ]
permissive
ganesh-shinde123/java
06f7cf6c367dcb6cf41ca5cc1e65b0d8f0714c3f
128622ab647c07fa996ff6651af8f1c96e68c37e
refs/heads/master
2021-01-12T15:25:59.670030
2016-10-21T17:21:43
2016-10-21T17:21:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,799
java
package com.structurizr.encryption; import com.fasterxml.jackson.annotation.JsonIgnore; import com.structurizr.AbstractWorkspace; import com.structurizr.Workspace; import com.structurizr.io.json.JsonReader; import com.structurizr.io.json.JsonWriter; import java.io.StringReader; import java.io.StringWriter; public class EncryptedWorkspace extends AbstractWorkspace { private Workspace workspace; private String ciphertext; private String plaintext; private EncryptionStrategy encryptionStrategy; public EncryptedWorkspace() { } public EncryptedWorkspace(Workspace workspace, EncryptionStrategy encryptionStrategy) throws Exception { JsonWriter jsonWriter = new JsonWriter(false); StringWriter stringWriter = new StringWriter(); jsonWriter.write(workspace, stringWriter); init(workspace, stringWriter.toString(), encryptionStrategy); } public EncryptedWorkspace(Workspace workspace, String plaintext, EncryptionStrategy encryptionStrategy) throws Exception { init(workspace, plaintext, encryptionStrategy); } private void init(Workspace workspace, String plaintext, EncryptionStrategy encryptionStrategy) throws Exception { this.workspace = workspace; setId(workspace.getId()); setName(workspace.getName()); setDescription(workspace.getDescription()); setThumbnail(workspace.getThumbnail()); setSource(workspace.getSource()); setApi(workspace.getApi()); this.plaintext = plaintext; this.ciphertext = encryptionStrategy.encrypt(plaintext); this.encryptionStrategy = encryptionStrategy; } @JsonIgnore public Workspace getWorkspace() throws Exception { if (this.workspace != null) { return this.workspace; } else if (this.ciphertext != null) { this.plaintext = encryptionStrategy.decrypt(ciphertext); JsonReader jsonReader = new JsonReader(); StringReader stringReader = new StringReader(plaintext); return jsonReader.read(stringReader); } else { return null; } } public String getCiphertext() { return ciphertext; } public void setCiphertext(String ciphertext) { this.ciphertext = ciphertext; } @JsonIgnore public String getPlaintext() throws Exception { if (this.plaintext != null) { return this.plaintext; } else { return encryptionStrategy.decrypt(ciphertext); } } public EncryptionStrategy getEncryptionStrategy() { return encryptionStrategy; } public void setEncryptionStrategy(EncryptionStrategy encryptionStrategy) { this.encryptionStrategy = encryptionStrategy; } }
[ "simon.brown@codingthearchitecture.com" ]
simon.brown@codingthearchitecture.com
f2273b15c248209532986d4806b298907a14d24a
2e743d39b9928e352f1a8c7ecc33bf7c9f7481fb
/AE-Game/data/scripts/system/handlers/quest/gerha/_Q13765.java
086d52e30fd037f660c830dd0d1fdc413a73a828
[]
no_license
webdes27/AionTypeZero
40461b3b99ae7ca229735889277e62eed4c5db7e
ff234a0a515c1155f18e61e5b5ba2afad7dfd8c9
refs/heads/master
2021-05-30T12:14:08.672390
2016-01-29T13:54:32
2016-01-29T13:54:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,416
java
package quest.gerha; import org.typezero.gameserver.model.DialogAction; import org.typezero.gameserver.model.gameobjects.player.Player; import org.typezero.gameserver.questEngine.handlers.QuestHandler; import org.typezero.gameserver.questEngine.model.QuestEnv; import org.typezero.gameserver.questEngine.model.QuestState; import org.typezero.gameserver.questEngine.model.QuestStatus; /** * @author Romanz * */ public class _Q13765 extends QuestHandler { private final static int questId = 13765; public _Q13765() { super(questId); } @Override public void register() { qe.registerQuestNpc(805272).addOnQuestStart(questId); qe.registerQuestNpc(805273).addOnQuestStart(questId); qe.registerQuestNpc(805274).addOnQuestStart(questId); qe.registerQuestNpc(805272).addOnTalkEvent(questId); qe.registerQuestNpc(805273).addOnTalkEvent(questId); qe.registerQuestNpc(805274).addOnTalkEvent(questId); qe.registerQuestNpc(235357).addOnKillEvent(questId); } @Override public boolean onDialogEvent(QuestEnv env) { Player player = env.getPlayer(); int targetId = env.getTargetId(); QuestState qs = player.getQuestStateList().getQuestState(questId); if(targetId == 805272 || targetId == 805273 || targetId == 805274) { if(qs == null || qs.getStatus() == QuestStatus.NONE || qs.canRepeat()) { if(env.getDialogId() == DialogAction.QUEST_SELECT.id()) return sendQuestDialog(env, 4762); else return sendQuestStartDialog(env); } else if(qs != null && qs.getStatus() == QuestStatus.REWARD) { if(env.getDialogId() == DialogAction.USE_OBJECT.id()) return sendQuestDialog(env, 10002); else if(env.getDialogId() == DialogAction.SELECT_QUEST_REWARD.id()) return sendQuestDialog(env, 5); else return sendQuestEndDialog(env); } } return false; } @Override public boolean onKillEvent(QuestEnv env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); if(qs == null || qs.getStatus() != QuestStatus.START) return false; int targetId = env.getTargetId(); switch(targetId){ case 235357: if (qs.getQuestVarById(1) != 4){ qs.setQuestVarById(1, qs.getQuestVarById(1) + 1); updateQuestStatus(env); } else { qs.setQuestVarById(1, 5); qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); } } return false; } }
[ "game.fanpage@gmail.com" ]
game.fanpage@gmail.com
624907a788ee020c1d17e0960d6aabff6a56db44
b327a374de29f80d9b2b3841db73f3a6a30e5f0d
/out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files/dot/junit/opcodes/div_int_lit16/Main_testVFE4.java
f9b137c127ab1e197631265ddfc1a3ec1bbdf11e
[]
no_license
nikoltu/aosp
6409c386ed6d94c15d985dd5be2c522fefea6267
f99d40c9d13bda30231fb1ac03258b6b6267c496
refs/heads/master
2021-01-22T09:26:24.152070
2011-09-27T15:10:30
2011-09-27T15:10:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
527
java
//autogenerated by util.build.BuildDalvikSuite, do not change package dot.junit.opcodes.div_int_lit16; import dot.junit.opcodes.div_int_lit16.d.*; import dot.junit.*; public class Main_testVFE4 extends DxAbstractMain { public static void main(String[] args) throws Exception { try { Class.forName("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_18"); fail("expected a verification exception"); } catch (Throwable t) { DxUtil.checkVerifyException(t); } } }
[ "fred.faust@gmail.com" ]
fred.faust@gmail.com
9b8ae5401e390ee7fc366cd1212ba55436ef0865
ff2683777d02413e973ee6af2d71ac1a1cac92d3
/src/main/java/com/alipay/api/response/ZhimaMerchantActivityModifyResponse.java
21afbc1dd9f90c3ce33666ee6604fa7011c4f99e
[ "Apache-2.0" ]
permissive
weizai118/alipay-sdk-java-all
c30407fec93e0b2e780b4870b3a71e9d7c55ed86
ec977bf06276e8b16c4b41e4c970caeaf21e100b
refs/heads/master
2020-05-31T21:01:16.495008
2019-05-28T13:14:39
2019-05-28T13:14:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: zhima.merchant.activity.modify response. * * @author auto create * @since 1.0, 2019-03-14 21:05:01 */ public class ZhimaMerchantActivityModifyResponse extends AlipayResponse { private static final long serialVersionUID = 1812294168814573364L; /** * 芝麻活动号 */ @ApiField("activity_no") private String activityNo; public void setActivityNo(String activityNo) { this.activityNo = activityNo; } public String getActivityNo( ) { return this.activityNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ef1d994ced301eee021d94e2bcb2505b3a2c217f
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/RxJava/2016/12/Predicate.java
d25409ffed24e86cc4392bf6a1633e631687e79d
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
988
java
/** * Copyright 2016 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See * the License for the specific language governing permissions and limitations under the License. */ package io.reactivex.functions; /** * A functional interface (callback) that returns true or false for the given input value. * @param <T> the first value */ public interface Predicate<T> { /** * Test the given input value and return a boolean. * @param t the value * @return the boolean result * @throws Exception on error */ boolean test(T t) throws Exception; }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
44bcdddb2bb09ff9faddacb36af876436712edda
cef5fecdb778ce7ede20659f75d36ba092612bfd
/app/src/main/java/com/dengzi/dzarouter/util/ExtraUtil.java
a6716c0e06c5a9838b20489aba1312ffc8fa3360
[]
no_license
xiaodengzi0812/DzARouter
c87c649ee22c22aff29a9236e59fc8fade88e49b
e7dfbac83db40f82817e33908923bb142a49a3c9
refs/heads/master
2021-05-11T19:04:45.679178
2018-01-30T14:32:16
2018-01-30T14:32:16
117,852,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,070
java
package com.dengzi.dzarouter.util; import android.util.Log; import java.util.ArrayList; import java.util.List; /** * @author Djk * @Title: * @Time: 2018/1/18. * @Version:1.0.0 */ public class ExtraUtil { /** * 一个int中可以配置31个1或者0,而每一个0或者1都可以表示一项配置, * 这时候只需要从这31个位置中随便挑选出一个表示是否需要登录就可以了, * 只要将标志位置为1,就可以在刚才声明的拦截器中获取到这个标志位 * * @param extra * @return */ public static List<Integer> getExtra(int extra) { List<Integer> extraList = new ArrayList<>(32); for (int i = 0; i < 32; i++) { if ((extra & 1) == 1) { extraList.add(i); } extra = extra >> 1; } Log.e("dengzi", "extraList = " + extraList.toString()); return extraList; } public static Integer getExtra(int extra, int index) { extra = extra >> index; return extra & 1; } }
[ "dengjiankai@wanda.cn" ]
dengjiankai@wanda.cn
b7f0cd7d8ee935d6bd549ffedaae078c474033f0
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/snapchat/kit/sdk/core/metrics/C11798f.java
56e5bc0e4cd9a2fe6b05ee7627077de5cab69c0c
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
899
java
package com.snapchat.kit.sdk.core.metrics; import com.snapchat.kit.sdk.core.networking.ClientFactory; import dagger.internal.C12021c; import dagger.internal.Factory; import javax.inject.Provider; /* renamed from: com.snapchat.kit.sdk.core.metrics.f */ public final class C11798f implements Factory<MetricsClient> { /* renamed from: a */ private final Provider<ClientFactory> f30561a; public C11798f(Provider<ClientFactory> provider) { this.f30561a = provider; } /* renamed from: a */ public MetricsClient get() { MetricsClient a = C11796d.m30968a((ClientFactory) this.f30561a.get()); C12021c.m31671a(a, "Cannot return null from a non-@Nullable @Provides method"); return a; } /* renamed from: a */ public static Factory<MetricsClient> m30974a(Provider<ClientFactory> provider) { return new C11798f(provider); } }
[ "developer@appzoc.com" ]
developer@appzoc.com
036b22091fe7b6fdae6b67f68149aa76f25869f6
37fc6588a4287932675faa6c6fa80b5230a0710d
/yeju-provider/yeju-all-provider/src/main/java/pers/lbf/yeju/provider/oos/dao/ResourceMd5Dao.java
5e9091c9a50209cd38baefa171787b6777d0daca
[ "Apache-2.0" ]
permissive
bingfenglai/yeju
80abf56300ddfe6c0aca510540a4a64d654e8149
56902cd26ed79eb2a79b200219b36ba4ddbf8128
refs/heads/main
2023-06-10T11:46:43.566400
2021-06-21T09:54:26
2021-06-21T09:54:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,334
java
/* * Copyright 2020 赖柄沣 bingfengdev@aliyun.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package pers.lbf.yeju.provider.oos.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Select; import pers.lbf.yeju.common.domain.entity.ResourceMd5; /** * TODO * * @author 赖柄沣 bingfengdev@aliyun.com * @version 1.0 * @date 2021/2/1 16:34 */ public interface ResourceMd5Dao extends BaseMapper<ResourceMd5> { /** * 查询md5是否存在 * @param resourceMd5 md5值 * @return 1 存在 0 不存在 */ @Select("select t.resource from table_system_resource_md5 t " + " where t.md5=#{resourceMd5}" + " and t.resource_type = 1" + " limit 1") String selectResourceUrlByMd5(String resourceMd5); }
[ "bingfengdev@aliyun.com" ]
bingfengdev@aliyun.com
6e89759b4286ca00f96bf3aaee3afbbadfbe370c
cc2cac74f66acdef6dd3f600af514dc6adb2bf44
/library/src/androidTest/java/com/james602152002/floatinglabelspinner/HintAdapterTest.java
be4217a3b8c4315edd497262ce7f0fb3b3ee8244
[ "Apache-2.0" ]
permissive
MaTriXy/FloatingLabelSpinner
0ac7e2ed0c28cdd0b6a999e2ee3fd0f3bd7382d9
080d774ea68ab6b4d27a9710e5fbc968dc8d045c
refs/heads/master
2020-04-01T17:42:54.728335
2018-08-30T06:52:49
2018-08-30T06:52:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,263
java
package com.james602152002.floatinglabelspinner; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnitRunner; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import com.james602152002.floatinglabelspinner.adapter.HintAdapter; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; /** * Created by shiki60215 on 18-1-9. */ public class HintAdapterTest extends AndroidJUnitRunner { HintAdapter adapter; FloatingLabelSpinner spinner; @Before public void setUp() throws Exception { BaseAdapter baseAdapter = new BaseAdapter() { @Override public int getCount() { return 0; } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { return null; } }; spinner = new FloatingLabelSpinner(InstrumentationRegistry.getInstrumentation().getTargetContext()); spinner.setAdapter(baseAdapter); spinner.setHint("hint"); adapter = (HintAdapter) spinner.getAdapter(); } @Test public void testGetCount() { Assert.assertEquals(1, adapter.getCount()); } @Test public void testAdapter() { adapter.getCount(); adapter.getItem(0); adapter.getItemViewType(0); adapter.getItemId(0); Assert.assertNotNull(adapter.getView(0, null, null)); Assert.assertNotNull(adapter.getDropDownView(0, null, null)); } @Test public void testDropDownHintView() { spinner.setDropDownHintView(new View(InstrumentationRegistry.getInstrumentation().getTargetContext())); Assert.assertNotNull(adapter.getDropDownView(0, spinner.getDropDownHintView(), null)); adapter.setHint(null); View dropDownHintView = adapter.getDropDownView(0, spinner.getDropDownHintView(), null); Assert.assertNull(dropDownHintView); spinner.getDropDownHintView().setTag(-1); dropDownHintView = adapter.getDropDownView(0, spinner.getDropDownHintView(), null); Assert.assertNull(dropDownHintView); spinner.getDropDownHintView().setTag(0); dropDownHintView = adapter.getDropDownView(0, spinner.getDropDownHintView(), null); Assert.assertNull(dropDownHintView); } @Test public void testDropDownView() { adapter.setHint(null); View dropDownView = adapter.getDropDownView(1, null, null); Assert.assertNull(dropDownView); dropDownView = adapter.getDropDownView(1, new View(InstrumentationRegistry.getInstrumentation().getTargetContext()), null); Assert.assertNull(dropDownView); } @Test public void testItemWithoutHint() { adapter.setHint(null); adapter.getItem(0); adapter.getItem(1); } @After public void tearDown() throws Exception { adapter = null; spinner = null; } }
[ "=" ]
=
71f12e85c9afc19c1db6d3ac77b6430d7881ba08
1da5db46041259ba4333f12716737ea8b1a54c3e
/sanshaoxingqiu/takephoto_library/src/main/java/org/devio/takephoto/uitl/TUriParse.java
cbc23075054252889295d2876cce2b5c7957d82b
[]
no_license
coderzhang213/sancell-android
50f678f7c8ca23a0db78e80fffe644bfb754215d
3b491fb3b0f8b7ecdeeb69429d998feb220e79f0
refs/heads/master
2022-12-19T14:49:18.836881
2020-09-11T06:10:18
2020-09-11T06:10:18
294,608,759
0
0
null
null
null
null
UTF-8
Java
false
false
6,319
java
package org.devio.takephoto.uitl; import android.app.Activity; import android.content.ContentResolver; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Environment; import android.provider.MediaStore; import androidx.core.content.FileProvider; import android.text.TextUtils; import android.util.Log; import org.devio.takephoto.model.TException; import org.devio.takephoto.model.TExceptionType; import java.io.File; import java.io.FileNotFoundException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /** * Uri解析工具类 * Author: JPH * Date: 2015/8/26 0026 16:23 */ public class TUriParse { private static final String TAG = IntentUtils.class.getName(); /** * 将scheme为file的uri转成FileProvider 提供的content uri * * @param context * @param uri * @return */ public static Uri convertFileUriToFileProviderUri(Context context, Uri uri) { if (uri == null) { return null; } if (ContentResolver.SCHEME_FILE.equals(uri.getScheme())) { return getUriForFile(context, new File(uri.getPath())); } return uri; } /** * 获取一个临时的Uri, 文件名随机生成 * * @param context * @return */ public static Uri getTempUri(Context context) { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date()); File file = new File(Environment.getExternalStorageDirectory(), "/images/" + timeStamp + ".jpg"); if (!file.getParentFile().exists()) { file.getParentFile().mkdirs(); } return getUriForFile(context, file); } /** * 获取一个临时的Uri, 通过传入字符串路径 * * @param context * @param path * @return */ public static Uri getTempUri(Context context, String path) { File file = new File(path); return getTempUri(context, file); } /** * 获取一个临时的Uri, 通过传入File对象 * * @param context * @return */ public static Uri getTempUri(Context context, File file) { if (!file.getParentFile().exists()) { file.getParentFile().mkdirs(); } return getUriForFile(context, file); } /** * 创建一个用于拍照图片输出路径的Uri (FileProvider) * * @param context * @return */ public static Uri getUriForFile(Context context, File file) { return FileProvider.getUriForFile(context, TConstant.getFileProviderName(context), file); } /** * 将TakePhoto 提供的Uri 解析出文件绝对路径 * * @param uri * @return */ public static String parseOwnUri(Context context, Uri uri) { if (uri == null) { return null; } String path; if (TextUtils.equals(uri.getAuthority(), TConstant.getFileProviderName(context))) { path = new File(uri.getPath().replace("camera_photos/", "")).getAbsolutePath(); } else { path = uri.getPath(); } return path; } /** * 通过URI获取文件的路径 * * @param uri * @param activity * @return Author JPH * Date 2016/6/6 0006 20:01 */ public static String getFilePathWithUri(Uri uri, Activity activity) throws TException { if (uri == null) { Log.w(TAG, "uri is null,activity may have been recovered?"); throw new TException(TExceptionType.TYPE_URI_NULL); } File picture = getFileWithUri(uri, activity); String picturePath = picture == null ? null : picture.getPath(); if (TextUtils.isEmpty(picturePath)) { throw new TException(TExceptionType.TYPE_URI_PARSE_FAIL); } if (!TImageFiles.checkMimeType(activity, TImageFiles.getMimeType(activity, uri))) { throw new TException(TExceptionType.TYPE_NOT_IMAGE); } return picturePath; } /** * 通过URI获取文件 * * @param uri * @param activity * @return Author JPH * Date 2016/10/25 */ public static File getFileWithUri(Uri uri, Activity activity) { String picturePath = null; String scheme = uri.getScheme(); if (ContentResolver.SCHEME_CONTENT.equals(scheme)) { String[] filePathColumn = {MediaStore.Images.Media.DATA}; Cursor cursor = activity.getContentResolver().query(uri, filePathColumn, null, null, null);//从系统表中查询指定Uri对应的照片 cursor.moveToFirst(); int columnIndex = cursor.getColumnIndex(filePathColumn[0]); if (columnIndex >= 0) { picturePath = cursor.getString(columnIndex); //获取照片路径 } else if (TextUtils.equals(uri.getAuthority(), TConstant.getFileProviderName(activity))) { picturePath = parseOwnUri(activity, uri); } cursor.close(); } else if (ContentResolver.SCHEME_FILE.equals(scheme)) { picturePath = uri.getPath(); } return TextUtils.isEmpty(picturePath) ? null : new File(picturePath); } /** * 通过从文件中得到的URI获取文件的路径 * * @param uri * @param activity * @return Author JPH * Date 2016/6/6 0006 20:01 */ public static String getFilePathWithDocumentsUri(Uri uri, Activity activity) throws TException { if (uri == null) { Log.e(TAG, "uri is null,activity may have been recovered?"); return null; } if (ContentResolver.SCHEME_CONTENT.equals(uri.getScheme()) && uri.getPath().contains("document")) { File tempFile = TImageFiles.getTempFile(activity, uri); try { TImageFiles.inputStreamToFile(activity.getContentResolver().openInputStream(uri), tempFile); return tempFile.getPath(); } catch (FileNotFoundException e) { e.printStackTrace(); throw new TException(TExceptionType.TYPE_NO_FIND); } } else { return getFilePathWithUri(uri, activity); } } }
[ "2430119608@qq.com" ]
2430119608@qq.com
0a55caca2d5d81a4901b5e0c601bfc797b83f069
848f075aa0823fbead1fd33acb51010af4e4db9a
/invoice/src/main/java/com/tradedoubler/customerinvoice/AxdEnumBarcodeType.java
6ab3224672107449872015d78a0727100e04e0f0
[]
no_license
Rambrant/Billing
0b636094694a6a3bbc2f4ff0de3cd47ee3f2b1eb
0e574dd48bcc98ecfac10b72e41d8eebdcccd141
refs/heads/master
2021-01-22T19:21:40.993460
2014-04-11T05:01:31
2014-04-11T05:01:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,416
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.12.28 at 01:35:45 PM CET // package com.tradedoubler.customerinvoice; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for AxdEnum_BarcodeType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="AxdEnum_BarcodeType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="NoBarcode"/> * &lt;enumeration value="EAN128"/> * &lt;enumeration value="Code39"/> * &lt;enumeration value="Interleaved2of5"/> * &lt;enumeration value="Code128"/> * &lt;enumeration value="UPCA"/> * &lt;enumeration value="UPCE"/> * &lt;enumeration value="EAN13"/> * &lt;enumeration value="EAN8"/> * &lt;enumeration value="PDF417"/> * &lt;enumeration value="Maxicode"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "AxdEnum_BarcodeType") @XmlEnum public enum AxdEnumBarcodeType { @XmlEnumValue("NoBarcode") NO_BARCODE("NoBarcode"), @XmlEnumValue("EAN128") EAN_128("EAN128"), @XmlEnumValue("Code39") CODE_39("Code39"), @XmlEnumValue("Interleaved2of5") INTERLEAVED_2_OF_5("Interleaved2of5"), @XmlEnumValue("Code128") CODE_128("Code128"), UPCA("UPCA"), UPCE("UPCE"), @XmlEnumValue("EAN13") EAN_13("EAN13"), @XmlEnumValue("EAN8") EAN_8("EAN8"), @XmlEnumValue("PDF417") PDF_417("PDF417"), @XmlEnumValue("Maxicode") MAXICODE("Maxicode"); private final String value; AxdEnumBarcodeType(String v) { value = v; } public String value() { return value; } public static AxdEnumBarcodeType fromValue(String v) { for (AxdEnumBarcodeType c: AxdEnumBarcodeType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "thomas@rambrant.com" ]
thomas@rambrant.com
8cbae5430ccf327007386a0c94760b7caaf0e1fc
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project87/src/main/java/org/gradle/test/performance87_5/Production87_408.java
36f8e748fcbd35a3f9835b33bd7bb835f8fc8c81
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance87_5; public class Production87_408 extends org.gradle.test.performance16_5.Production16_408 { private final String property; public Production87_408() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com