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
26d0ca95fd35f82ddef3d9a8a43082c08c6f8273
25baed098f88fc0fa22d051ccc8027aa1834a52b
/src/main/java/com/ljh/controller/base/RConstantController.java
ffd0e9c98a9075186ca03c81ee1ae8c45b104866
[]
no_license
woai555/ljh
a5015444082f2f39d58fb3e38260a6d61a89af9f
17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9
refs/heads/master
2022-07-11T06:52:07.620091
2022-01-05T06:51:27
2022-01-05T06:51:27
132,585,637
0
0
null
2022-06-17T03:29:19
2018-05-08T09:25:32
Java
UTF-8
Java
false
false
322
java
package com.ljh.controller.base; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; /** * <p> * 常数表 前端控制器 * </p> * * @author ljh * @since 2020-10-26 */ @Controller @RequestMapping("/rConstant") public class RConstantController { }
[ "37681193+woai555@users.noreply.github.com" ]
37681193+woai555@users.noreply.github.com
04550878d06aba9f2d87223866fd2fdbc1a789a3
db22198e5bc363c4fa12bb38807b051a9b24074b
/SLibNew/fastlib/src/main/java/com/souja/lib/base/DirAdapter.java
962099d180c48e29912e9b2f350bcca925fd8f21
[]
no_license
souja/SLib
7fddda79349c59ddc53c32ceee0af15206e6744f
9d5b710811af44ad13aff6414d3f74c88c952d46
refs/heads/master
2020-05-16T18:27:48.289284
2020-01-17T10:22:08
2020-01-17T10:22:08
183,222,721
1
2
null
null
null
null
UTF-8
Java
false
false
3,149
java
package com.souja.lib.base; import android.content.Context; import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.souja.lib.R; import com.souja.lib.models.MediaBean; import com.souja.lib.models.SelectImgOptions; import com.souja.lib.utils.SPHelper; import com.souja.lib.utils.ScreenUtil; import java.util.ArrayList; /** * Created by Ydz on 2017/3/16 0016. */ public class DirAdapter extends MBaseAdapterB<MediaBean, DirAdapter.DirHolder> { private String flag; private int dirIndex; private DirClickListener mListener; public int getDirIndex() { return dirIndex; } public DirAdapter(Context context, ArrayList<MediaBean> list, String defaultDir, boolean isVideo, DirClickListener listener) { super(context, list); if (!TextUtils.isEmpty(defaultDir)) setDefaultDir(defaultDir); flag = isVideo ? "个视频" : "张图片"; mListener = listener; } public void setDefaultDir(String dir) { for (int i = 0; i < mList.size(); i++) { MediaBean bean = mList.get(i); if (bean.getFolderName().equals(dir)) { dirIndex = i; if (mListener != null) mListener.onClick(bean); break; } } } @Override public int setItemViewRes(int viewType) { return R.layout.item_gallery_dir; } @Override public RecyclerView.ViewHolder onCreateView(ViewGroup parent, int viewType) { return new DirHolder(getItemView(parent, viewType)); } @Override public void onBindView(MediaBean model, DirHolder mHolder, int position) { mHolder.name.setText(mList.get(position).getFolderName() + ""); mHolder.num.setText(mList.get(position).getMediaCount() + flag); if (dirIndex == position) mHolder.chioce.setVisibility(View.VISIBLE); else mHolder.chioce.setVisibility(View.GONE); Glide.with(mContext) .load(mList.get(position).getTopMediaPath()) .into(mHolder.icon); mHolder.itemView.setOnClickListener(v -> { SPHelper.putString(SelectImgOptions.GALLERY_LAST, model.getFolderName()); dirIndex = position; mListener.onClick(model); notifyDataSetChanged(); }); } class DirHolder extends RecyclerView.ViewHolder { ImageView icon, chioce; TextView name, num; public DirHolder(View itemView) { super(itemView); ScreenUtil.initScale(itemView); icon = itemView.findViewById(R.id.dir_icon); chioce = itemView.findViewById(R.id.dir_choice); name = itemView.findViewById(R.id.dir_name); num = itemView.findViewById(R.id.dir_num); } } public interface DirClickListener { void onClick(MediaBean mediaBean); } }
[ "782579195@qq.com" ]
782579195@qq.com
5d1c16368117e3e4564022cfc966d831165c8814
cffcd0985fd8cb215fcfa42dec1884f1cbe29e1e
/src/main/java/com/javamultiplex/newstracker/client/NewsApiClient.java
c14913fc89f2aba5414ed5e3ff2af546d8c6a0c8
[]
no_license
javamultiplex/news-tracker
055f198cfae82a138279510f9a4e58c7363c662d
5aed746d89ea3e333bd7a000158b451e3a4c1e23
refs/heads/master
2020-05-21T16:07:46.482013
2019-05-15T19:15:23
2019-05-15T19:15:23
186,106,990
0
0
null
null
null
null
UTF-8
Java
false
false
1,966
java
package com.javamultiplex.newstracker.client; import com.javamultiplex.newstracker.dto.News; import com.javamultiplex.newstracker.error.handler.RestTemplateResponseErrorHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; @Component public class NewsApiClient { private static final String PAGE_SIZE = "100"; private static String NEWS_API_ENDPOINT_PREFIX = "https://newsapi.org/v2/everything"; private static String NEWS_API_KEY = "588f220b11204dc1b89a43ca2022f84f"; private final RestTemplate restTemplate; @Autowired public NewsApiClient(RestTemplateBuilder restTemplateBuilder) { this.restTemplate = restTemplateBuilder .errorHandler(new RestTemplateResponseErrorHandler()) .build(); } /** * @param keyword * @return */ public News getNewsByKeyword(final String keyword) { String endpoint = NEWS_API_ENDPOINT_PREFIX + "?q=" + keyword + "&langauge=en" + "&pageSize=" + PAGE_SIZE + "&apiKey=" + NEWS_API_KEY; return getResponse(endpoint); } /** * @param keyword * @param fromDate * @param toDate * @return */ public News getNewsByKeywordAndDate(final String keyword, final String fromDate, final String toDate) { String endpoint = NEWS_API_ENDPOINT_PREFIX + "?q=" + keyword + "&from=" + fromDate + "&to=" + toDate + "&langauge=en" + "&pageSize=" + PAGE_SIZE + "&apiKey=" + NEWS_API_KEY; return getResponse(endpoint); } private News getResponse(final String endPoint) { return restTemplate.getForObject(endPoint, News.class); } }
[ "programmingwithrohit@gmail.com" ]
programmingwithrohit@gmail.com
2684a4a62ad3d88fa3199262d586cb24bb197031
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.systemux-SystemUX/sources/com/bumptech/glide/load/data/DataFetcher.java
20eeaa79b2a262045579ffe0829bb0e0ceaf6026
[]
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
592
java
package com.bumptech.glide.load.data; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.bumptech.glide.Priority; import com.bumptech.glide.load.DataSource; public interface DataFetcher<T> { public interface DataCallback<T> { void onDataReady(@Nullable T t); void onLoadFailed(@NonNull Exception exc); } void cancel(); void cleanup(); @NonNull Class<T> getDataClass(); @NonNull DataSource getDataSource(); void loadData(@NonNull Priority priority, @NonNull DataCallback<? super T> dataCallback); }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
097aaa3aa09887904e09ec57620e2d4de2921454
2ebc9528389faf1551574a8d6203cbe338a72221
/zf/src/main/java/com/chinazhoufan/admin/modules/bus/service/op/PayOrderService.java
8221657c1e170a805446216cfb5e5ee7bac2149a
[ "Apache-2.0" ]
permissive
flypig5211/zf-admin
237a7299a5dc65e33701df2aeca50fd4b2107e21
dbf36f42e2d6a2f3162d4856e9daa8152ee1d56e
refs/heads/master
2022-02-27T00:14:12.904808
2017-12-06T10:01:15
2017-12-06T10:01:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,577
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/chinazhoufan/admin">JeeSite</a> All rights reserved. */ package com.chinazhoufan.admin.modules.bus.service.op; import java.util.List; import java.util.Map; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.chinazhoufan.admin.common.persistence.Page; import com.chinazhoufan.admin.common.service.CrudService; import com.chinazhoufan.admin.modules.bus.entity.op.PayOrder; import com.chinazhoufan.admin.modules.bus.dao.op.PayOrderDao; import com.google.common.collect.Maps; /** * 付款单Service * @author 张金俊 * @version 2017-08-21 */ @Service @Transactional(readOnly = true) public class PayOrderService extends CrudService<PayOrderDao, PayOrder> { public PayOrder get(String id) { return super.get(id); } public List<PayOrder> findList(PayOrder payOrder) { return super.findList(payOrder); } public Page<PayOrder> findPage(Page<PayOrder> page, PayOrder payOrder) { return super.findPage(page, payOrder); } @Transactional(readOnly = false) public void save(PayOrder payOrder) { super.save(payOrder); } @Transactional(readOnly = false) public void delete(PayOrder payOrder) { super.delete(payOrder); } public List<PayOrder> findNotRefundListByOrder(String orderId) { Map<String, Object> map = Maps.newHashMap(); map.put("orderId", orderId); map.put("DEL_FLAG_NORMAL", PayOrder.DEL_FLAG_NORMAL); map.put("TRUE_FLAG", PayOrder.TRUE_FLAG); return dao.findNotRefundListByOrder(map); } }
[ "646686483@qq.com" ]
646686483@qq.com
8874a5ab3ba41dfef2a5352ccc5de9b352f6601e
96e96b410a58dba5353b8ce23799bab8bbe032cb
/BusinessEngine/qlack2-be-forms/qlack2-be-forms-web/src/main/java/com/eurodyn/qlack2/be/forms/web/dto/FormVersionContentRDTO.java
6acc62b20e1e557db9236b1d04d7e5c0ca908b54
[]
no_license
eurodyn/Qlack2
4e7773fc3dcbdf62c9691095e09e33c9ac71040b
35f6fcc3195efeb38ec2084ffa34751b994751d8
refs/heads/master
2023-08-29T22:46:59.595863
2023-08-14T11:46:05
2023-08-14T11:46:05
75,811,846
8
47
null
2021-06-04T00:57:49
2016-12-07T07:40:59
Java
UTF-8
Java
false
false
338
java
package com.eurodyn.qlack2.be.forms.web.dto; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.NotEmpty; public class FormVersionContentRDTO { @NotNull @NotEmpty private String file; public String getFile() { return file; } public void setFile(String file) { this.file = file; } }
[ "nassosmichas@me.com" ]
nassosmichas@me.com
104e6829fad5eb8aaba8c5290358c44fe5b1094f
ac8f8f090c58c654eaa79ebda2f6e22b5c85df90
/jraphql-parser-antlr/src/main/java/me/wener/jraphql/parser/antlr/AntlrGraphParser.java
e5bd02989ddb909b27740a458b85b77b8399b1ec
[ "Apache-2.0" ]
permissive
wenerme/jraphql
709b7a47e8865d6110f464bd04822cab696740ca
3fde8d69a466feffaafffd837528b17619e9e000
refs/heads/master
2022-09-20T23:26:00.595687
2020-10-13T07:53:27
2020-10-13T07:53:27
126,199,079
4
0
Apache-2.0
2022-09-16T21:05:31
2018-03-21T15:20:36
Java
UTF-8
Java
false
false
1,607
java
package me.wener.jraphql.parser.antlr; import me.wener.jraphql.lang.Document; import me.wener.jraphql.parse.GraphParser.ParseOption; import me.wener.jraphql.parser.AntlrParseHint; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.DiagnosticErrorListener; /** * @author <a href=http://github.com/wenerme>wener</a> * @since 2018/4/11 */ public class AntlrGraphParser { private final ParseOption parseOption; private final GraphQLLangVisitor visitor; private final GraphQLParser parser; private final CommonTokenStream stream; public AntlrGraphParser(ParseOption parseOption) { this.parseOption = parseOption; GraphQLLexer lexer = new GraphQLLexer(CharStreams.fromString(parseOption.getContent())); stream = new CommonTokenStream(lexer); parser = new GraphQLParser(stream); parser.addErrorListener(new DiagnosticErrorListener(true)); AntlrParseHint hint = AntlrParseHint.of(parseOption.getHints()); parser.setTrimParseTree(hint.getTrimParseTree()); parser.setBuildParseTree(true); visitor = new GraphQLLangVisitor().setSource(parseOption.getSource()).setTokens(stream); } public Document parse() { switch (parseOption.getParseType()) { case DOCUMENT: return visitor.visitDocument(parser.document()); case EXECUTABLE: return visitor.visitExecutableDocument(parser.executableDocument()); case TYPE_SYSTEM: return visitor.visitTypeSystemDocument(parser.typeSystemDocument()); default: throw new AssertionError(); } } }
[ "wenermail@gmail.com" ]
wenermail@gmail.com
e5be5c983efe192f8f404d6e14ed5985ac2b67c0
f94e57ebae4a643e021babd96c0f577f11e08512
/app/src/main/java/com/yuyang/fitsystemwindowstestdrawer/userDefinedWidget/WaterRippleEffect/Circle.java
a4e741e4286a331c8da4ee9f5c28053b6fbcd0db
[]
no_license
yuyang272999712/NewFeaturesTest
e23b8d465f4e972c0b7d96e8b29c7948c95a78e9
49bafbf8c252482ee1061670028ec1033719359c
refs/heads/master
2021-08-02T19:16:10.656631
2021-07-26T07:55:06
2021-07-26T07:55:06
55,760,556
3
3
null
null
null
null
UTF-8
Java
false
false
1,574
java
package com.yuyang.fitsystemwindowstestdrawer.userDefinedWidget.WaterRippleEffect; import android.view.animation.Interpolator; /** * 波纹变化的圆 * * TODO yuyang Interpolator插值器 * 这里用到了插值器,插值器主要使用其 getInterpolation 方法 * 该方法的作用就是根据传入参数(x值)返回其对应的值(y值),不同的插值器x、y的对应关系不同 * 这里的插值器主要是为了实现水波纹的越来越慢的效果 */ public class Circle { private Interpolator mInterpolator; public long mCreateTime; private long mDuration;//持续时间 private float mRadius;//半径 private float mMaxRadius;//最大半径 public Circle(long duration, float radius, float maxRadius, Interpolator interpolator){ this.mDuration = duration; this.mRadius = radius; this.mMaxRadius = maxRadius; this.mInterpolator = interpolator; mCreateTime = System.currentTimeMillis(); } public int getAlpha(){ float parent = (System.currentTimeMillis() - mCreateTime)*1.0f/mDuration; return (int) ((1-mInterpolator.getInterpolation(parent))*255); } public float getCurrentRadius(){ float parent = (System.currentTimeMillis() - mCreateTime)*1.0f/mDuration; return mRadius + mInterpolator.getInterpolation(parent)*(mMaxRadius-mRadius); } public float getStrokeWidthRate() { float parent = (System.currentTimeMillis() - mCreateTime)*1.0f/mDuration; return 1-mInterpolator.getInterpolation(parent); } }
[ "272999712@qq.com" ]
272999712@qq.com
f7f0699b7b25fdae17b92fe4cbd8ce37209ba755
6635387159b685ab34f9c927b878734bd6040e7e
/src/com/google/android/gms/common/api/Api$zza.java
88c0e772bcecf4a608881333988f19066eaf6ae7
[]
no_license
RepoForks/com.snapchat.android
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
6e28a32ad495cf14f87e512dd0be700f5186b4c6
refs/heads/master
2021-05-05T10:36:16.396377
2015-07-16T16:46:26
2015-07-16T16:46:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
789
java
package com.google.android.gms.common.api; import com.google.android.gms.common.internal.zzq; import java.io.FileDescriptor; import java.io.PrintWriter; public abstract interface Api$zza { public abstract void connect(); public abstract void disconnect(); public abstract void dump(String paramString, FileDescriptor paramFileDescriptor, PrintWriter paramPrintWriter, String[] paramArrayOfString); public abstract boolean isConnected(); public abstract void zza(GoogleApiClient.zza paramzza); public abstract void zza(zzq paramzzq); public abstract void zzb(zzq paramzzq); public abstract boolean zzhc(); } /* Location: * Qualified Name: com.google.android.gms.common.api.Api.zza * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
6ebf16fbb4dc135627f927f4b08e4e397fe9b510
89904f6c80aab728d197f879b5a0167f7198ea96
/core/runtime/src/main/java/io/quarkus/runtime/graal/ConstructorReplacement.java
a1c689e895dd94316c3666bccbc96832513e5b50
[ "Apache-2.0" ]
permissive
loicmathieu/quarkus
54b27952bbdbf16772ce52086bed13165a6c0aec
f29b28887af4b50e7484dd1faf252b15f1a9f61a
refs/heads/main
2023-08-30T23:58:38.586507
2022-11-10T15:01:09
2022-11-10T15:01:09
187,598,844
3
1
Apache-2.0
2023-03-02T20:56:56
2019-05-20T08:23:48
Java
UTF-8
Java
false
false
1,472
java
package io.quarkus.runtime.graal; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedType; import java.lang.reflect.Constructor; import java.lang.reflect.Type; import com.oracle.svm.core.annotate.Alias; import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.TargetClass; @TargetClass(Constructor.class) final class ConstructorReplacement { @Alias public Class<?> getDeclaringClass() { return null; } @Alias public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { return null; } @Alias public Annotation[] getDeclaredAnnotations() { return null; } @Substitute public AnnotatedType getAnnotatedReturnType() { return new AnnotatedType() { @Override public Type getType() { return getDeclaringClass(); } @Override public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { return ConstructorReplacement.class.getAnnotation(annotationClass); } @Override public Annotation[] getAnnotations() { return ConstructorReplacement.class.getDeclaredAnnotations(); } @Override public Annotation[] getDeclaredAnnotations() { return ConstructorReplacement.class.getDeclaredAnnotations(); } }; } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
fdf02448d4cdb07af5f906934abef57f8671cb46
45c2caad8a7aa00cd482cef3628343585566d06b
/Magic/src/main/java/com/elmakers/mine/bukkit/protection/UltimateClansManager.java
98c99a28b20e4eb229b6a5f7a370dad2ee27962a
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
elBukkit/MagicPlugin
bb70f5adb13abbb4eb9b1f6d56eb458152a98881
71a48001701d164535da230b75165dc414f7cfc4
refs/heads/master
2023-08-16T13:29:28.980087
2023-08-13T21:15:12
2023-08-13T21:15:12
1,616,402
249
284
MIT
2023-09-12T16:36:37
2011-04-14T21:39:53
Java
UTF-8
Java
false
false
779
java
package com.elmakers.mine.bukkit.protection; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import com.elmakers.mine.bukkit.api.entity.TeamProvider; import com.elmakers.mine.bukkit.magic.MagicController; import me.ulrich.clans.api.ClanAPI; public class UltimateClansManager implements TeamProvider { public UltimateClansManager(MagicController controller) { } @Override public boolean isFriendly(Entity attacker, Entity entity) { if (!(attacker instanceof Player) || !(entity instanceof Player)) return false; Player player1 = (Player)attacker; Player player2 = (Player)entity; // Is this by name or UUID-as-string? return ClanAPI.getInstance().isAlly(player1.getName(), player2.getName()); } }
[ "nathan@elmakers.com" ]
nathan@elmakers.com
8e7bb14c14fb6ef42f5bb3a4d5dc6cadd59581d8
9697cced6661399674af9f85f5607da07d309f91
/src/day39_CustomClass_Statics/ScrumTeam/Tester.java
fcf02de950bdfee346d50a0e0d50549e35adbbc7
[]
no_license
Marat311/java2021
5648fc42f5b256825ff4f4a2ad43fe2744e9ca70
55fd48e28644bc762182a4c9a7f4c55561078047
refs/heads/master
2023-07-17T08:22:39.198191
2021-09-02T19:59:12
2021-09-02T19:59:12
388,632,860
0
0
null
null
null
null
UTF-8
Java
false
false
2,663
java
package day39_CustomClass_Statics.ScrumTeam; public class Tester { public int EmployeeID, salary; public String name, JobTitle; public void setInfo(int employeeID, int salary, String name, String jobTitle) { EmployeeID = employeeID; this.salary = salary; this.name = name; JobTitle = jobTitle; } public void smokeTesting(){ System.out.println(name+ " do smoke testing"); } public void creatingTicket(){ System.out.println(name+ " create ticket"); } public void dailyStandUp(){ System.out.println(name+ " do standUp meeting"); } public String toString() { return "Tester{" + "EmployeeID=" + EmployeeID + ", salary=" + salary + ", name='" + name + '\'' + ", JobTitle='" + JobTitle + '\'' + '}'; } } /* create a class called Tester Attributes: name, employeeID, JobTitle, Salary Actions: setInfo(), smokeTesting(), creatingTicket(), dailyStandUp() toString() create a class called Developer Attributes: name, employeeID, JobTitle, Salary Actions: setInfo(), coding(), unitTesting(), fixingBug(), toString() create a class called ScrumTeam Attributes: String PO, BA, SM; ArrayList<Tester> testersList = new ArrayList<>(); ArrayList<Developer> devopsList = new ArrayList<>(); int daysOfSprint; Actions: setInfo(): sets the names of PO, BA, SM addTester(Tester tester): adds the given tester to the testers ArrayList addTesters(Tester[] testers): adds the given testers to the testers ArrayList addDeveloper(Developer developer): adds the given developer to the developers ArrayList addDevelopers(Developer[] developers): adds the given developers to the developers ArrayList removeTester(long employeeID): removes the given tester from the testers ArrayList removeDeveloper(long employeeID): removes the developer from the developers ArrayList toString(): prints number of tester,& developers, PO name, SM name, BA name create a class called MyScrumTeam: 1. create an array of Testers and add the testers from your group 2. create an array of developers add the developers from your group 3. create an object of ScrumTeam and store the testers & developers above to the scrum team */
[ "marinavelitskaia@gmail.com" ]
marinavelitskaia@gmail.com
4a5806cbbd81da37b5dc150ebeecaaaed0c7254e
f78edc43002d8839aaed27435362cde157bbec2e
/commom/src/main/java/com/commom/widget/recycler/xRecycler/progressindicator/indicator/BallScaleRippleIndicator.java
1c71c53441a877c38f83f0ebdc50ec69763d7833
[]
no_license
LEEHOR/jumi_loan
4e1758aaf2ae79c34e6fd445b0a0b74e2902cb55
b7d0346d97f077b33babbd4fcea1db1ba8633793
refs/heads/master
2020-07-10T23:14:54.056318
2019-08-27T01:09:45
2019-08-27T01:09:45
197,548,063
0
0
null
null
null
null
UTF-8
Java
false
false
1,863
java
package com.commom.widget.recycler.xRecycler.progressindicator.indicator; import android.animation.Animator; import android.animation.ValueAnimator; import android.graphics.Canvas; import android.graphics.Paint; import android.view.animation.LinearInterpolator; import java.util.ArrayList; import java.util.List; /** * Created by Jack on 2015/10/19. */ public class BallScaleRippleIndicator extends BallScaleIndicator { @Override public void draw(Canvas canvas, Paint paint) { paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(3); super.draw(canvas, paint); } @Override public List<Animator> createAnimation() { List<Animator> animators=new ArrayList<>(); ValueAnimator scaleAnim= ValueAnimator.ofFloat(0,1); scaleAnim.setInterpolator(new LinearInterpolator()); scaleAnim.setDuration(1000); scaleAnim.setRepeatCount(-1); scaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { scale = (float) animation.getAnimatedValue(); postInvalidate(); } }); scaleAnim.start(); ValueAnimator alphaAnim= ValueAnimator.ofInt(0, 255); alphaAnim.setInterpolator(new LinearInterpolator()); alphaAnim.setDuration(1000); alphaAnim.setRepeatCount(-1); alphaAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { alpha = (int) animation.getAnimatedValue(); postInvalidate(); } }); alphaAnim.start(); animators.add(scaleAnim); animators.add(alphaAnim); return animators; } }
[ "1622293788@qq.com" ]
1622293788@qq.com
1d8f0e24bba79f31060d0eafd07a589d592882ae
d915e3731c617def360cd2aa959e186436c66505
/copy/sm-shop-model/src/main/java/com/efairway/shop/model/order/OrderEntity.java
35d095de2ee873f31f2d890b386d6432896ade84
[ "Apache-2.0" ]
permissive
saksham-sarkar/efairway-Repository
95e125e64ed31d6c137f49d538c228e77b8a62fe
58d2af25f5a89ab59f36c230836b6a943d57713d
refs/heads/master
2022-07-31T05:04:46.591012
2019-12-19T10:20:02
2019-12-19T10:20:02
228,995,097
0
0
null
2022-07-15T21:08:01
2019-12-19T07:01:28
Java
UTF-8
Java
false
false
3,048
java
package com.efairway.shop.model.order; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.salesmanager.core.model.order.orderstatus.OrderStatus; import com.salesmanager.core.model.order.payment.CreditCard; import com.salesmanager.core.model.payments.PaymentType; import com.efairway.shop.model.order.total.OrderTotal; public class OrderEntity extends Order implements Serializable { /** * */ private static final long serialVersionUID = 1L; private List<OrderTotal> totals; private List<OrderAttribute> attributes = new ArrayList<OrderAttribute>(); private PaymentType paymentType; private String paymentModule; private String shippingModule; private List<OrderStatus> previousOrderStatus; private OrderStatus orderStatus; private CreditCard creditCard; private Date datePurchased; private String currency; private boolean customerAgreed; private boolean confirmedAddress; private String comments; public void setTotals(List<OrderTotal> totals) { this.totals = totals; } public List<OrderTotal> getTotals() { return totals; } public PaymentType getPaymentType() { return paymentType; } public void setPaymentType(PaymentType paymentType) { this.paymentType = paymentType; } public String getPaymentModule() { return paymentModule; } public void setPaymentModule(String paymentModule) { this.paymentModule = paymentModule; } public String getShippingModule() { return shippingModule; } public void setShippingModule(String shippingModule) { this.shippingModule = shippingModule; } public CreditCard getCreditCard() { return creditCard; } public void setCreditCard(CreditCard creditCard) { this.creditCard = creditCard; } public Date getDatePurchased() { return datePurchased; } public void setDatePurchased(Date datePurchased) { this.datePurchased = datePurchased; } public void setPreviousOrderStatus(List<OrderStatus> previousOrderStatus) { this.previousOrderStatus = previousOrderStatus; } public List<OrderStatus> getPreviousOrderStatus() { return previousOrderStatus; } public void setOrderStatus(OrderStatus orderStatus) { this.orderStatus = orderStatus; } public OrderStatus getOrderStatus() { return orderStatus; } public String getCurrency() { return currency; } public void setCurrency(String currency) { this.currency = currency; } public boolean isCustomerAgreed() { return customerAgreed; } public void setCustomerAgreed(boolean customerAgreed) { this.customerAgreed = customerAgreed; } public boolean isConfirmedAddress() { return confirmedAddress; } public void setConfirmedAddress(boolean confirmedAddress) { this.confirmedAddress = confirmedAddress; } public String getComments() { return comments; } public void setComments(String comments) { this.comments = comments; } public List<OrderAttribute> getAttributes() { return attributes; } public void setAttributes(List<OrderAttribute> attributes) { this.attributes = attributes; } }
[ "saksham.sarkar2791@gmail.com" ]
saksham.sarkar2791@gmail.com
2281245b73628a805fd3641cc468efc3c16b209c
07dcf354f1e157e43c95f7223970cdbed2b2e9db
/src/main/java/br/com/rodrigo/pizzaria/modelo/entidades/Ingrediente.java
70976a0a3476e5b2b7e819d93806459ab2d6ca3b
[]
no_license
RodrigoMCarvalho/pizzaria
fb5212ad495ca9fc1d79e655b0f8aef9b5eacafd
9149608b85a88d8bd2db4dddf21f7eb88219ed2f
refs/heads/master
2022-11-30T14:05:27.330483
2020-05-19T23:18:30
2020-05-19T23:18:30
254,226,780
0
0
null
2022-11-24T05:57:13
2020-04-08T23:52:18
Java
WINDOWS-1250
Java
false
false
2,009
java
package br.com.rodrigo.pizzaria.modelo.entidades; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.NotEmpty; import br.com.rodrigo.pizzaria.modelo.enumeracoes.CategoriaDeIngrediente; @Entity public class Ingrediente { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotEmpty(message="Nome obrigatório.") private String nome; @NotNull(message="Categoria obrigatória.") @Enumerated(EnumType.STRING) private CategoriaDeIngrediente categoria; @ManyToOne @JoinColumn(name = "DONO") private Pizzaria dono; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public CategoriaDeIngrediente getCategoria() { return categoria; } public void setCategoria(CategoriaDeIngrediente categoria) { this.categoria = categoria; } public Pizzaria getDono() { return dono; } public void setDono(Pizzaria dono) { this.dono = dono; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((categoria == null) ? 0 : categoria.hashCode()); result = prime * result + ((nome == null) ? 0 : nome.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; Ingrediente other = (Ingrediente) obj; if (categoria != other.categoria) return false; if (nome == null) { if (other.nome != null) return false; } else if (!nome.equals(other.nome)) return false; return true; } }
[ "rodrigo_moreira84@hotmail.com" ]
rodrigo_moreira84@hotmail.com
ba4dd4b72dd1031b9a983645d5d0464f4e1e70f8
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/domain/AlipayOpenMiniMorphoAppOnlineModel.java
817d014d3f386f2faeb44dbf13bf15144b642d8b
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 上线应用 * * @author auto create * @since 1.0, 2019-12-26 15:04:23 */ public class AlipayOpenMiniMorphoAppOnlineModel extends AlipayObject { private static final long serialVersionUID = 8686514126884957719L; /** * 闪蝶应用ID */ @ApiField("id") private String id; /** * 闪蝶身份验证信息 */ @ApiField("identity") private MorphoIdentity identity; public String getId() { return this.id; } public void setId(String id) { this.id = id; } public MorphoIdentity getIdentity() { return this.identity; } public void setIdentity(MorphoIdentity identity) { this.identity = identity; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
c111596a1936c191a84b0b935c9396f523a0a3f5
bacde5bb0effd64aa061a729d73e07642d876368
/vnp/Line98/src/com/vnpgame/undersea/lostgame/activity/LostGameScreen.java
562031ac36fd0138dd61eda2b472a22d47f8193d
[]
no_license
fordream/store-vnp
fe10d74acd1a780fb88f90e4854d15ce44ecb68c
6ca37dd4a69a63ea65d601aad695150e70f8d603
refs/heads/master
2020-12-02T15:05:14.994903
2015-10-23T13:52:51
2015-10-23T13:52:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,506
java
package com.vnpgame.undersea.lostgame.activity; import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; import android.widget.TextView; import com.vnpgame.line98.R; import com.vnpgame.undersea.database.DBAdapter; public class LostGameScreen extends Activity implements OnClickListener { int level = 0; int score = 0; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.lostgame); level = getIntent().getIntExtra("arg0", 0); score = getIntent().getIntExtra("arg1", 0); TextView tVLevel = (TextView) findViewById(R.id.TextView02); tVLevel.setText("Level : " + level); TextView tVScore = (TextView) findViewById(R.id.TextView01); tVScore.setText("Score : " + score); findViewById(R.id.Button01).setOnClickListener(this); findViewById(R.id.button1).setOnClickListener(this); } public void onClick(View v) { if (R.id.button1 == v.getId()) { setResult(RESULT_OK); finish(); } else { String name = ((EditText) findViewById(R.id.EditText1)).getText() .toString(); DBAdapter adapter = new DBAdapter(this); adapter.saveScore(0, name, "" + score, "" + level); setResult(RESULT_OK); finish(); } } public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return true; } return super.onKeyDown(keyCode, event); } }
[ "truongvv@atmarkcafe.org" ]
truongvv@atmarkcafe.org
fb3f2a986cde022dd5c429b37a9b6c139528e1e6
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/android/support/transition/ViewUtilsApi14.java
889cd978d3ed6004b1749fb6c582871490a1f9d7
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
2,670
java
package android.support.transition; import android.graphics.Matrix; import android.support.annotation.RequiresApi; import android.view.View; import android.view.ViewParent; @RequiresApi(14) class ViewUtilsApi14 implements ViewUtilsImpl { ViewUtilsApi14() { } public ViewOverlayImpl mo178a(View view) { return ViewOverlayApi14.m9721c(view); } public WindowIdImpl mo182b(View view) { return new WindowIdApi14(view.getWindowToken()); } public void mo179a(View view, float f) { Float f2 = (Float) view.getTag(C0069R.id.save_non_transition_alpha); if (f2 != null) { view.setAlpha(f2.floatValue() * f); } else { view.setAlpha(f); } } public float mo184c(View view) { Float f = (Float) view.getTag(C0069R.id.save_non_transition_alpha); if (f != null) { return view.getAlpha() / f.floatValue(); } return view.getAlpha(); } public void mo185d(View view) { if (view.getTag(C0069R.id.save_non_transition_alpha) == null) { view.setTag(C0069R.id.save_non_transition_alpha, Float.valueOf(view.getAlpha())); } } public void mo186e(View view) { if (view.getVisibility() == 0) { view.setTag(C0069R.id.save_non_transition_alpha, null); } } public void mo181a(View view, Matrix matrix) { ViewParent parent = view.getParent(); if (parent instanceof View) { View view2 = (View) parent; mo181a(view2, matrix); matrix.preTranslate((float) (-view2.getScrollX()), (float) (-view2.getScrollY())); } matrix.preTranslate((float) view.getLeft(), (float) view.getTop()); view = view.getMatrix(); if (!view.isIdentity()) { matrix.preConcat(view); } } public void mo183b(View view, Matrix matrix) { ViewParent parent = view.getParent(); if (parent instanceof View) { View view2 = (View) parent; mo183b(view2, matrix); matrix.postTranslate((float) view2.getScrollX(), (float) view2.getScrollY()); } matrix.postTranslate((float) view.getLeft(), (float) view.getTop()); view = view.getMatrix(); if (!view.isIdentity()) { Matrix matrix2 = new Matrix(); if (view.invert(matrix2) != null) { matrix.postConcat(matrix2); } } } public void mo180a(View view, int i, int i2, int i3, int i4) { view.setLeft(i); view.setTop(i2); view.setRight(i3); view.setBottom(i4); } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
d0f00cddf40a5d417c54577b475ad341b71ee98b
f695ffad9aacddd7628ec41bb8250890a36734c8
/ecp-coreservice/ecp-coreservice-common/src/main/java/com/everwing/coreservice/common/wy/service/building/PropertyService.java
135f497d003f5525da4a080fef2e764bb95c342f
[]
no_license
zouyuanfa/Everwing-Cloud-Platform
9dea7e324f9447250b1b033509f17f7c8a0921be
f195dfe95f0addde56221d5c1b066290ad7ba62f
refs/heads/master
2020-04-13T18:22:36.731469
2018-12-28T06:18:37
2018-12-28T06:18:37
163,372,146
0
4
null
null
null
null
UTF-8
Java
false
false
2,212
java
package com.everwing.coreservice.common.wy.service.building;/** * Created by wust on 2017/8/4. */ import com.everwing.coreservice.common.BaseDto; import com.everwing.coreservice.common.context.WyBusinessContext; import com.everwing.coreservice.common.MessageMap; import com.everwing.coreservice.common.wy.entity.business.readingtask.TcReadingTask; import com.everwing.coreservice.common.wy.entity.order.TcOrderChangeAssetComplaint; import com.everwing.coreservice.common.wy.entity.property.property.CustomerSearch; import com.everwing.coreservice.common.wy.entity.property.property.ProprietorInfo; import com.everwing.coreservice.common.wy.entity.property.property.TPropertyChangingHistory; import com.everwing.coreservice.common.wy.entity.property.property.TPropertyChangingHistorySearch; import java.util.List; /** * * Function: * Reason: * Date:2017/8/4 * @author wusongti@lii.com.cn */ public interface PropertyService { BaseDto listPageChangingHistory(String companyId, TPropertyChangingHistorySearch tPropertyChangingHistorySearch); MessageMap insertChangingHistory(String companyId, TPropertyChangingHistory tPropertyChangingHistory); List<ProprietorInfo> getProprietorInfoByBuildingCode(String companyId,String buildingCode); /** * 抄表申请 * @param companyId * @param type 0水表,1电表 * @param tcReadingTask * @return */ MessageMap requestReadingMeter(String companyId,String projectId,int type,TcReadingTask tcReadingTask); /** * 资产变更水电表申请 */ BaseDto requestReadingMeterNew(WyBusinessContext ctx, TcOrderChangeAssetComplaint tcOrderChangeAssetComplaint); /** * 根据buildCode和projectId查询最新一条账单数据 */ BaseDto getBillByBuildCode(WyBusinessContext ctx, String buildCode); /** * 手动计费 * @param ctx * @param buildCode * @param buildName * @return */ BaseDto manualBill(WyBusinessContext ctx, String buildCode, String buildName); BaseDto listPageCustomerInEntery(String companyId, CustomerSearch customerSearch); BaseDto checkCollingDatas(WyBusinessContext ctx, String buildingCode, String projectId); }
[ "17711642361@163.com" ]
17711642361@163.com
da008ef2c45994ef02e495f5151d9dbb0026513e
b474398887fd3f2fbebd29ccc580c5fb293e252d
/src/com/sun/org/apache/bcel/internal/generic/LLOAD.java
3b08ec9fe272afcd312b0c07415c625697aaf33d
[ "MIT" ]
permissive
AndyChenIT/JDKSourceCode1.8
65a27e356debdcedc15642849602174c6ea286aa
4aa406b5b52e19ef8a323f9f829ea1852105d18b
refs/heads/master
2023-09-02T15:14:37.857475
2021-11-19T10:13:31
2021-11-19T10:13:31
428,856,994
0
0
MIT
2021-11-17T00:26:30
2021-11-17T00:26:29
null
UTF-8
Java
false
false
3,896
java
/* * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package com.sun.org.apache.bcel.internal.generic; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache BCEL" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Apache BCEL", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ /** * LLOAD - Load long from local variable *<PRE>Stack ... -&GT; ..., result.word1, result.word2</PRE> * * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> */ public class LLOAD extends LoadInstruction { /** * Empty constructor needed for the Class.newInstance() statement in * Instruction.readInstruction(). Not to be used otherwise. */ LLOAD() { super(com.sun.org.apache.bcel.internal.Constants.LLOAD, com.sun.org.apache.bcel.internal.Constants.LLOAD_0); } public LLOAD(int n) { super(com.sun.org.apache.bcel.internal.Constants.LLOAD, com.sun.org.apache.bcel.internal.Constants.LLOAD_0, n); } /** * Call corresponding visitor method(s). The order is: * Call visitor methods of implemented interfaces first, then * call methods according to the class hierarchy in descending order, * i.e., the most specific visitXXX() call comes last. * * @param v Visitor object */ public void accept(Visitor v) { super.accept(v); v.visitLLOAD(this); } }
[ "wupx@glodon.com" ]
wupx@glodon.com
7b75f0af4818cd4ccfa8f1de39b7b2bbb2e24bc9
d3e7a9e24de77e45bd79dacde2e4e192267eab95
/modules/lottery-guilv/src/main/java/com/sky/modules/lottery/service/guilv/Pl5LotteryService.java
624259e7bf81811d2f98e745ca6e096c33c4fce4
[]
no_license
sky8866/lottery
95dc902c95e084bd6320aa39c415d645a16867b0
b315ad1a3c79e2d3fe4b1761bacbe2aeb717a8b8
refs/heads/master
2021-01-20T08:33:25.720748
2017-08-28T02:29:14
2017-08-28T02:29:14
101,560,668
0
0
null
null
null
null
UTF-8
Java
false
false
1,955
java
package com.sky.modules.lottery.service.guilv; import java.io.Serializable; import java.util.List; import com.sky.modules.core.bean.PageView; import com.sky.modules.core.bean.PropertyFilter; import com.sky.modules.core.bean.QueryResult; import com.sky.modules.lottery.entity.guilv.Pl5Lottery; /** * 上报业务接口 * @author sky * @version 1.0 2014-4-14 */ public interface Pl5LotteryService { /** * 保存上报 * @param r */ public void saveReport(Pl5Lottery r); /** * 删除上报 * @param entityids */ public void delReport(Serializable... entityids); public void updateReport(Pl5Lottery r); /** * 根据条件查询上报列表 */ public QueryResult<Pl5Lottery> findList(PageView<Pl5Lottery> pv, List<PropertyFilter> filters); /** * 根据id查询 * @param id * @return */ public Pl5Lottery findReport(Long id); /** * 根据属性查询 */ public Pl5Lottery findReport(Object p,Object v); public Pl5Lottery findLottery5(); /** * 查询与我相关的 * @param pv * @param query * @param depquery * @param myuserid * @param starttime * @param endtime * @return */ public QueryResult<Pl5Lottery> findReports(PageView pv, String query,String depquery,Long myuserid,String starttime,String endtime); public QueryResult<Pl5Lottery> findPageReport(PageView<Pl5Lottery> pv,Long companyId,String userid,String query,String depquery ); /** * 查询与我相关的某人所发 * @param pv * @param companyId * @param userid * @param query * @param depquery * @return */ public QueryResult<Pl5Lottery> findReports(PageView pv, String query,String depquery,Long userid,Long myuserid,String starttime,String endtime); }
[ "286549429@qq.com" ]
286549429@qq.com
cdc2c58a2a8ab3d0c8fce4556f5c9f1353a1236a
3637342fa15a76e676dbfb90e824de331955edb5
/2s/web/src/main/java/com/bcgogo/common/SessionConstants.java
0433e8ba660992c93008d6b1cfdaba11e9a79426
[]
no_license
BAT6188/bo
6147f20832263167101003bea45d33e221d0f534
a1d1885aed8cf9522485fd7e1d961746becb99c9
refs/heads/master
2023-05-31T03:36:26.438083
2016-11-03T04:43:05
2016-11-03T04:43:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
315
java
package com.bcgogo.common; /** * Created by IntelliJ IDEA. * User: Jimuchen * Date: 12-7-13 * Time: 下午4:47 */ public interface SessionConstants { String SHOP_ID = "shopId"; String USER_ID = "userId"; String USER_NAME = "userName"; String DEFAULT_HISTORY_ORDER_TYPE = "defaultHistoryOrderType"; }
[ "ndong211@163.com" ]
ndong211@163.com
69093fe0092254466195b67cf6ac07626d46f4e7
678b1fd8af72d955a7257312586a8d00118bb8e2
/src/main/java/com/example/ConcourseSampleApplication.java
6565ec7777292528cf61879eb94c2c07940d72dd
[]
no_license
rwinch/concourse-gradle-sample
74730402ea8a681b0ec2ca57653c80ca08c95404
50c79887a2a07841450337762e04b9988fcf29c7
refs/heads/master
2021-01-09T20:30:31.085668
2016-07-13T02:57:04
2016-07-13T02:57:04
63,206,101
5
10
null
null
null
null
UTF-8
Java
false
false
321
java
package com.example; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ConcourseSampleApplication { public static void main(String[] args) { SpringApplication.run(ConcourseSampleApplication.class, args); } }
[ "rwinch@gopivotal.com" ]
rwinch@gopivotal.com
2653baff93d47ddad7a89769ca4f2ee1d6fd31b7
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/12097100.java
322457b4eb3647b7afdad16b36b0dd69cb8cd425
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,700
java
class c12097100 { public void getStation(String prefecture, String line) { HttpClient httpclient = null; try { httpclient = new DefaultHttpClient(); List<NameValuePair> qparams = new ArrayList<NameValuePair>(); qparams.add(new BasicNameValuePair("method", "getStations")); qparams.add(new BasicNameValuePair("prefecture", prefecture)); qparams.add(new BasicNameValuePair("line", line)); URI uri = URIUtils.createURI("http", "express.heartrails.com", -1, "/api/xml", URLEncodedUtils.format(qparams, "UTF-8"), null); HttpGet httpget = new HttpGet(uri); HttpResponse response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); InputStream instream = entity.getContent(); BufferedReader reader = new BufferedReader(new InputStreamReader(instream, "UTF-8")); StringBuffer buf = new StringBuffer(); String str; while ((str = reader.readLine()) != null) { buf.append(str); buf.append("\n"); } reader.close(); stationRes = new StationResponse(buf.toString()); } catch (URISyntaxException ex) { ex.printStackTrace(); } catch (ClientProtocolException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } catch (SAXException ex) { ex.printStackTrace(); } catch (ParserConfigurationException ex) { ex.printStackTrace(); } finally { mSearchStation.setEnabled(true); } } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
6f4ac8acaab1b92d37fc95bb3b9b33e69b681ee5
ce52038047763d5932b3a373e947e151e6f3d168
/ASP-emftext/ASP.resource.ASP/src-gen/ASP/resource/ASP/mopp/ASPContextDependentURIFragment.java
bbc8266c7027fb0300c668f16b2a18f84b97c3de
[]
no_license
rominaeramo/JTLframework
f6d506d117ab6c1f8c0dc83a72f8f00eb31c862b
5371071f63d8f951f532eed7225fb37656404cae
refs/heads/master
2021-01-21T13:25:24.999553
2016-05-12T15:32:27
2016-05-12T15:32:27
47,969,148
1
0
null
null
null
null
UTF-8
Java
false
false
4,816
java
/** * <copyright> * </copyright> * * */ package ASP.resource.ASP.mopp; /** * Standard implementation of <code>IContextDependentURIFragment</code>. * * @param <ContainerType> the type of the object that contains the reference which * shall be resolved by this fragment. * @param <ReferenceType> the type of the reference which shall be resolved by * this fragment. */ public abstract class ASPContextDependentURIFragment<ContainerType extends org.eclipse.emf.ecore.EObject, ReferenceType extends org.eclipse.emf.ecore.EObject> implements ASP.resource.ASP.IASPContextDependentURIFragment<ReferenceType> { protected String identifier; protected ContainerType container; protected org.eclipse.emf.ecore.EReference reference; protected int positionInReference; protected org.eclipse.emf.ecore.EObject proxy; protected ASP.resource.ASP.IASPReferenceResolveResult<ReferenceType> result; private boolean resolving; public ASPContextDependentURIFragment(String identifier, ContainerType container, org.eclipse.emf.ecore.EReference reference, int positionInReference, org.eclipse.emf.ecore.EObject proxy) { this.identifier = identifier; this.container = container; this.reference = reference; this.positionInReference = positionInReference; this.proxy = proxy; } public boolean isResolved() { return result != null; } public ASP.resource.ASP.IASPReferenceResolveResult<ReferenceType> resolve() { if (resolving) { return null; } resolving = true; if (result == null || !result.wasResolved()) { result = new ASP.resource.ASP.mopp.ASPReferenceResolveResult<ReferenceType>(false); // set an initial default error message result.setErrorMessage(getStdErrorMessage()); ASP.resource.ASP.IASPReferenceResolver<ContainerType, ReferenceType> resolver = getResolver(); // do the actual resolving resolver.resolve(getIdentifier(), getContainer(), getReference(), getPositionInReference(), false, result); // EMFText allows proxies to resolve to multiple objects. The first one is // returned, the others are added here to the reference. if (result.wasResolvedMultiple()) { handleMultipleResults(); } } resolving = false; return result; } public abstract ASP.resource.ASP.IASPReferenceResolver<ContainerType, ReferenceType> getResolver(); private void handleMultipleResults() { org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> list = null; Object temp = container.eGet(reference); if (temp instanceof org.eclipse.emf.common.util.EList<?>) { list = ASP.resource.ASP.util.ASPCastUtil.cast(temp); } boolean first = true; for (ASP.resource.ASP.IASPReferenceMapping<ReferenceType> mapping : result.getMappings()) { if (first) { first = false; } else if (list != null) { addResultToList(mapping, proxy, list); } else { new ASP.resource.ASP.util.ASPRuntimeUtil().logError(container.eClass().getName() + "." + reference.getName() + " has multiplicity 1 but was resolved to multiple elements", null); } } } private void addResultToList(ASP.resource.ASP.IASPReferenceMapping<ReferenceType> mapping, org.eclipse.emf.ecore.EObject proxy, org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> list) { org.eclipse.emf.ecore.EObject target = null; int proxyPosition = list.indexOf(proxy); if (mapping instanceof ASP.resource.ASP.IASPElementMapping<?>) { target = ((ASP.resource.ASP.IASPElementMapping<ReferenceType>) mapping).getTargetElement(); } else if (mapping instanceof ASP.resource.ASP.IASPURIMapping<?>) { target = org.eclipse.emf.ecore.util.EcoreUtil.copy(proxy); org.eclipse.emf.common.util.URI uri = ((ASP.resource.ASP.IASPURIMapping<ReferenceType>) mapping).getTargetIdentifier(); ((org.eclipse.emf.ecore.InternalEObject) target).eSetProxyURI(uri); } else { assert false; } try { // if target is an another proxy and list is "unique" add() will try to resolve // the new proxy to check for uniqueness. There seems to be no way to avoid that. // Until now this does not cause any problems. if (proxyPosition + 1 == list.size()) { list.add(target); } else { list.add(proxyPosition + 1, target); } } catch (Exception e1) { e1.printStackTrace(); } } private String getStdErrorMessage() { String typeName = this.getReference().getEType().getName(); String msg = typeName + " '" + identifier + "' not declared"; return msg; } public String getIdentifier() { return identifier; } public ContainerType getContainer() { return container; } public org.eclipse.emf.ecore.EReference getReference() { return reference; } public int getPositionInReference() { return positionInReference; } public org.eclipse.emf.ecore.EObject getProxy() { return proxy; } }
[ "r.eramo@gmail.com" ]
r.eramo@gmail.com
d6be6af9d935a5581994346bbe49104b1a005de9
b52feb20530d8ab6b069bc46c958f0297c2df9f7
/src/main/java/CatiaV5TypeLibs/InfTypeLib/SendToService.java
a3dbfc882e95b437e075daa3d3196ac8dd3338dd
[]
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
2,964
java
package CatiaV5TypeLibs.InfTypeLib; import com4j.*; @IID("{963C65AB-5A4A-0000-0280-030EC7000000}") public interface SendToService extends AnyObject { // Methods: /** * @param iPath Mandatory Holder<java.lang.String> parameter. */ @DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present @VTID(22) void setInitialFile( Holder<java.lang.String> iPath); /** * @param oDependant Mandatory java.lang.Object[] parameter. */ @DISPID(1610940417) //= 0x60050001. The runtime will prefer the VTID if present @VTID(23) void getListOfDependantFile( java.lang.Object[] oDependant); /** * @param oWillBeCopied Mandatory java.lang.Object[] parameter. */ @DISPID(1610940418) //= 0x60050002. The runtime will prefer the VTID if present @VTID(24) void getListOfToBeCopiedFiles( java.lang.Object[] oWillBeCopied); /** * @param iPath Mandatory Holder<java.lang.String> parameter. */ @DISPID(1610940419) //= 0x60050003. The runtime will prefer the VTID if present @VTID(25) void addFile( Holder<java.lang.String> iPath); /** * @param iFile Mandatory Holder<java.lang.String> parameter. */ @DISPID(1610940420) //= 0x60050004. The runtime will prefer the VTID if present @VTID(26) void removeFile( Holder<java.lang.String> iFile); /** * @param iKeep Mandatory boolean parameter. */ @DISPID(1610940421) //= 0x60050005. The runtime will prefer the VTID if present @VTID(27) void keepDirectory( boolean iKeep); /** * @param iDirectory Mandatory Holder<java.lang.String> parameter. */ @DISPID(1610940422) //= 0x60050006. The runtime will prefer the VTID if present @VTID(28) void setDirectoryFile( Holder<java.lang.String> iDirectory); /** * @param iFile Mandatory Holder<java.lang.String> parameter. * @param iDirectory Mandatory Holder<java.lang.String> parameter. */ @DISPID(1610940423) //= 0x60050007. The runtime will prefer the VTID if present @VTID(29) void setDirectoryOneFile( Holder<java.lang.String> iFile, Holder<java.lang.String> iDirectory); /** * @param iOldname Mandatory Holder<java.lang.String> parameter. * @param iNewName Mandatory Holder<java.lang.String> parameter. */ @DISPID(1610940424) //= 0x60050008. The runtime will prefer the VTID if present @VTID(30) void setRenameFile( Holder<java.lang.String> iOldname, Holder<java.lang.String> iNewName); /** */ @DISPID(1610940425) //= 0x60050009. The runtime will prefer the VTID if present @VTID(31) void run(); /** * @param oErrorParam Mandatory Holder<java.lang.String> parameter. * @param oErrorCode Mandatory Holder<Integer> parameter. */ @DISPID(1610940426) //= 0x6005000a. The runtime will prefer the VTID if present @VTID(32) void getLastSendToMethodError( Holder<java.lang.String> oErrorParam, Holder<Integer> oErrorCode); // Properties: }
[ "pawelsadlo2@gmail.com" ]
pawelsadlo2@gmail.com
4f4f6dfc1dbfadff8b21401a525eb3d4de09292e
1690b1a472c7ae779832c00b762464c073baed09
/src/org/scapesoft/game/player/dialogues/impl/ShopKeeper.java
a052ac06bcbeebce52f8af1414acecc15d6d1cae
[]
no_license
bradleysixx/insomniapk-server
e5d78ab14786e49b18dccf742a6572da698b8ec6
e5ec12bfca18ed6885c2a99320f12d908a9168f5
refs/heads/master
2022-01-23T20:23:22.177976
2019-04-02T18:42:24
2019-04-02T18:42:24
177,716,541
0
0
null
null
null
null
UTF-8
Java
false
false
1,840
java
package org.scapesoft.game.player.dialogues.impl; import org.scapesoft.Constants; import org.scapesoft.game.npc.NPC; import org.scapesoft.game.player.dialogues.ChatAnimation; import org.scapesoft.game.player.dialogues.Dialogue; import org.scapesoft.utilities.console.gson.GsonHandler; import org.scapesoft.utilities.console.gson.impl.ShopsLoader; import org.scapesoft.utilities.misc.ChatColors; import org.scapesoft.utilities.misc.Utils; /** * @author Lazarus <lazarus.rs.king@gmail.com> * @since Jun 21, 2014 */ public class ShopKeeper extends Dialogue { int npcId; @Override public void start() { npcId = (Integer) parameters[0]; sendNPCDialogue(npcId, ChatAnimation.LISTENING, "Hello, how can I help you?"); } @Override public void run(int interfaceId, int option) { switch(stage) { case -1: sendOptionsDialogue("Select a Option", "View General Store", "Where are the shops?"); stage = 0; break; case 0: switch(option) { case FIRST: ((ShopsLoader) GsonHandler.getJsonLoader(ShopsLoader.class)).openShop(player, "General Store"); end(); break; case SECOND: sendNPCDialogue(npcId, ChatAnimation.NORMAL, Constants.SERVER_NAME + " has no regular rsps-like shops, instead", "you buy items straight from the grand exchange.", "Try it now!"); NPC clerk = Utils.findLocalNPC(player, 2241); if (clerk != null) { player.getHintIconsManager().addHintIcon(clerk, 0, -1, false); player.sendMessage("<col=" + ChatColors.RED + ">Follow the marker on your minimap to the grand exchange!</col>"); player.setCloseInterfacesEvent(new Runnable() { @Override public void run() { player.getHintIconsManager().removeUnsavedHintIcon(); } }); } stage = -2; break; } break; } } @Override public void finish() { } }
[ "37641668+bradleysixx@users.noreply.github.com" ]
37641668+bradleysixx@users.noreply.github.com
7c17d25572f2672bfe3b447b44c858bd12cbe3ad
90f320dbfd62ae3bc1378b03a66f23bdd59f97d5
/src/main/java/paulevs/corelib/ItemView.java
c0f2687deef512521b73cccf94ce1fb4e893c452
[ "MIT" ]
permissive
paulevsGitch/B.1.7.3-CoreLib
584a3cd607fd8825addea4f7cba1c00975ddd5ec
e66e56bf19c3ee5e89d432d8967bb4521cf9f465
refs/heads/master
2023-08-01T04:55:24.815242
2021-09-11T05:27:10
2021-09-11T05:27:10
280,723,626
1
1
MIT
2021-09-11T05:27:11
2020-07-18T19:20:55
Java
UTF-8
Java
false
false
1,408
java
package paulevs.corelib; import net.minecraft.entity.TileEntity; import net.minecraft.level.TileView; import net.minecraft.level.biome.Biome; import net.minecraft.level.gen.BiomeSource; import net.minecraft.level.gen.FixedBiomeSource; import net.minecraft.tile.material.Material; public class ItemView implements TileView { private static final FixedBiomeSource BIOME_SRC = new FixedBiomeSource(Biome.PLAINS, 0.5D, 0.0D); private int tile; private int meta; public void setMeta(int meta) { this.meta = meta; } public void setTile(int tile) { this.meta = tile; } @Override public int getTileId(int x, int y, int z) { return x == 0 && y == 0 && z == 0 ? tile : 0; } @Override public TileEntity getTileEntity(int i, int j, int k) { return null; } @Override public float method_1784(int i, int j, int k, int i1) { return 15; } @Override public float getBrightness(int i, int j, int k) { return 1; } @Override public int getTileMeta(int x, int y, int z) { return meta; } @Override public Material getMaterial(int x, int y, int z) { return Material.AIR; } @Override public boolean isFullOpaque(int i, int j, int k) { return false; } @Override public boolean canSuffocate(int i, int j, int k) { return false; } @Override public BiomeSource getBiomeSource() { return BIOME_SRC; } }
[ "paulevs@yandex.ru" ]
paulevs@yandex.ru
4b7fb7e423d50d8dac92e69758eafccb183865ef
56507de0fd54f8538a661ff70a42c99b553471e3
/app/src/main/java/cn/jcyh/eaglelock/base/recyclerview/UnScrollLinearLayoutManager.java
0afe0b63a9c97959152aa615d46a213d55819c38
[]
no_license
HimanshuDudhat/EagleLock
5916bb7a4b4aa4bf5834b4a40e4f200860cb6d46
8f9670ca6208d5cc722e870a8749f990fd17d870
refs/heads/master
2021-06-13T20:49:13.538230
2018-06-19T10:13:17
2018-06-19T10:13:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,519
java
package cn.jcyh.eaglelock.base.recyclerview; import android.content.Context; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; /** * Created by jogger on 2018/1/10.不能滚动 */ public class UnScrollLinearLayoutManager extends LinearLayoutManager { public UnScrollLinearLayoutManager(Context context) { super(context); } public UnScrollLinearLayoutManager(Context context, int orientation, boolean reverseLayout) { super(context, orientation, reverseLayout); } public UnScrollLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } @Override public boolean supportsPredictiveItemAnimations() { return false; } @Override public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { try { super.onLayoutChildren(recycler, state); } catch (IndexOutOfBoundsException e) { e.printStackTrace(); } } @Override public int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state) { try { return super.scrollVerticallyBy(dy, recycler, state); } catch (Exception e) { e.printStackTrace(); } return 0; } @Override public boolean canScrollVertically() { return false; } }
[ "980328722@qq.com" ]
980328722@qq.com
7e3c1e9969f24fd916c660aa2cb444c7351583d4
77f3f5e1d9c8d6560bb4697b57c28c14404b55aa
/erpwell/erpwell/trunk/SourceCode/Client/com.graly.erp.wip/src/wip/com/graly/erp/wip/seelotinfo/SeeLotInfoEntryPage.java
083114ca9d588b5711000b3609ae0b8a48cf88dc
[ "Apache-2.0" ]
permissive
liulong02/ERPL
b1871a1836c8e25af6a18d184b2f68f1b1bfdc5e
c8db598a3f762b357ae986050066098ce62bed44
refs/heads/master
2020-03-21T22:26:06.459293
2018-06-30T14:55:48
2018-06-30T14:55:48
139,126,269
0
0
null
2018-06-29T13:59:15
2018-06-29T08:57:20
null
UTF-8
Java
false
false
1,698
java
package com.graly.erp.wip.seelotinfo; import org.apache.log4j.Logger; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.editor.FormEditor; import org.eclipse.ui.forms.editor.FormPage; import com.graly.framework.activeentity.model.ADTable; import com.graly.framework.base.entitymanager.editor.EntityEditor; import com.graly.framework.base.entitymanager.editor.EntityEditorInput; import com.graly.framework.base.ui.util.Message; public class SeeLotInfoEntryPage extends FormPage { private static final Logger logger = Logger.getLogger(SeeLotInfoEntryPage.class); private ADTable table; private SeeLotInfoSection searchByLotSection; protected IManagedForm form; public SeeLotInfoEntryPage(FormEditor editor, String id, String name, ADTable table) { super(editor, id, name); } public SeeLotInfoEntryPage(FormEditor editor, String id, String name) { super(editor, id, name); } @Override protected void createFormContent(IManagedForm managedForm) { super.createFormContent(managedForm); this.form = managedForm; Composite body = managedForm.getForm().getBody(); try{ table = ((EntityEditorInput)this.getEditor().getEditorInput()).getTable(); ((EntityEditor)this.getEditor()).setEditorTitle(Message.getString("inv.selectbylot")); } catch (Exception e){ logger.error("Error At SearchByLotEntryPage.createFormContent() Method :" + e); } searchByLotSection = new SeeLotInfoSection(table); searchByLotSection.createContents(form, body); } @Override public void dispose() { searchByLotSection.disposeContent(); } @Override public void setFocus() { searchByLotSection.setFocus(); } }
[ "529409301@qq.com" ]
529409301@qq.com
c696cdc8ae36bb236dcddf0539f2ec2285267f8f
a5721d03524d9094f344bdc12746ca3b5579bc04
/hy-lyjc-industrial-operation-monitoring/src/main/java/net/cdsunrise/hy/lyjc/industrialoperationmonitoring/service/TourismResourceService.java
2c858271abe69e974bfe13003cbc7f60e90f52c9
[]
no_license
yesewenrou/test
2aeaa0ea09842eeed2b0e589895b4f00319bf13b
992a70bed383f5574e4cc0db539dd764d984e5c6
refs/heads/master
2023-02-16T21:02:59.801518
2021-01-20T02:31:17
2021-01-20T02:31:17
327,574,246
0
0
null
null
null
null
UTF-8
Java
false
false
917
java
package net.cdsunrise.hy.lyjc.industrialoperationmonitoring.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import net.cdsunrise.hy.lyjc.industrialoperationmonitoring.entity.TourismResource; import net.cdsunrise.hy.lyjc.industrialoperationmonitoring.vo.PageRequest; import net.cdsunrise.hy.lyjc.industrialoperationmonitoring.vo.ResourceCondition; import net.cdsunrise.hy.lyjc.industrialoperationmonitoring.vo.ResourceVO; /** * @author LHY */ public interface TourismResourceService { /** * 新增 */ Long add(ResourceVO resourceVO); /** * 编辑 */ void update(ResourceVO resourceVO); /** * 删除 */ void delete(Long id); /** * 根据主键查询 */ TourismResource findById(Long id); /** * 搜索条件分页 */ Page<TourismResource> list(PageRequest<ResourceCondition> pageRequest); }
[ "896586757@qq.com" ]
896586757@qq.com
db545691f6c0e8523291877e3afc19df514798ec
3122ac39f1ce0a882b48293a77195476299c2a3b
/clients/android/generated/src/main/java/org/openapitools/client/model/HudsonassignedLabels.java
96686b5f0a15d7d28774599da259c42ca05a6c85
[ "MIT" ]
permissive
miao1007/swaggy-jenkins
4e6fe28470eda2428cbc584dcd365a21caa606ef
af79438c120dd47702b50d51c42548b4db7fd109
refs/heads/master
2020-08-30T16:50:27.474383
2019-04-10T13:47:17
2019-04-10T13:47:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,533
java
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * OpenAPI spec version: 1.1.1 * Contact: blah@cliffano.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import io.swagger.annotations.*; import com.google.gson.annotations.SerializedName; @ApiModel(description = "") public class HudsonassignedLabels { @SerializedName("_class") private String _class = null; /** **/ @ApiModelProperty(value = "") public String getClass() { return _class; } public void setClass(String _class) { this._class = _class; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } HudsonassignedLabels hudsonassignedLabels = (HudsonassignedLabels) o; return (this._class == null ? hudsonassignedLabels._class == null : this._class.equals(hudsonassignedLabels._class)); } @Override public int hashCode() { int result = 17; result = 31 * result + (this._class == null ? 0: this._class.hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HudsonassignedLabels {\n"); sb.append(" _class: ").append(_class).append("\n"); sb.append("}\n"); return sb.toString(); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
a92e7f4e63dd9254c35bf7e191a41e0458799f62
784420293504203e0485674947e252b9a884f9cf
/asciidoctor-editor-plugin/src/test/java/de/jcup/asciidoctoreditor/asciidoc/Sha256StringEncoderTest.java
e1ff6cd01ce173d5caf66966ddddcbbb86aa874a
[ "Apache-2.0" ]
permissive
de-jcup/eclipse-asciidoctor-editor
db5515421613e8ccfec749318fb6366b1f838e76
5dbbb4fdeac0634eec94c1cb6773246457ac2c3f
refs/heads/master
2023-02-16T00:20:39.858165
2023-02-10T21:52:39
2023-02-10T21:52:54
125,332,958
49
18
NOASSERTION
2022-08-21T23:26:15
2018-03-15T08:06:29
Java
UTF-8
Java
false
false
1,206
java
/* * Copyright 2021 Albert Tregnaghi * * 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 de.jcup.asciidoctoreditor.asciidoc; import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; public class Sha256StringEncoderTest { private Sha256StringEncoder toTest; @Before public void before() { toTest = new Sha256StringEncoder(); } @Test public void slash_de_slash_jcup_xyz_encoded_as_expected() { assertEquals("076b86a67a73b20ef213c34fb81ff4d8855081e8dc0ba3abd99d5560bc146afb", toTest.encode("/de/jcup/xyz/")); } @Test public void null_returns_null() { assertEquals(null, toTest.encode(null)); } }
[ "albert.tregnaghi@gmail.com" ]
albert.tregnaghi@gmail.com
32875a44a2dd4bba7081bfcb2aac23083913f395
d6dbd11f0830a114f399f2ba54de105fe60256ae
/src/test/java/mySpring/ObjectFactoryTest.java
f7e395e7be62af898837cc4c520203decb8c7593
[]
no_license
Jeka1978/lviv-mySpring
ef4a9cdfca4ea9e13bb8d9edf5457836d08cb833
7b302ed21de89b975fa6fa55e9c5cc079fba3f13
refs/heads/master
2021-01-22T04:48:58.050815
2017-03-05T21:55:45
2017-03-05T21:55:45
81,583,147
2
9
null
2022-09-06T12:00:56
2017-02-10T16:21:53
Java
UTF-8
Java
false
false
575
java
package mySpring; import org.junit.Assert; import org.junit.Test; import static org.junit.Assert.*; /** * Created by Evegeny on 12/02/2017. */ public class ObjectFactoryTest { @Test public void testThanSingletonIsSingleton() throws Exception { ObjectFactory factory = ObjectFactory.getInstance(); factory.createObject(MySingleton.class); factory.createObject(MySingleton.class); factory.createObject(MySingleton.class); factory.createObject(MySingleton.class); Assert.assertEquals(1,MySingleton.counter); } }
[ "papakita2009" ]
papakita2009
bb6a7e024167b4f328395108da11806a88a157da
02d508dc3db8e286a2d1cc0a5e059659852edba5
/TempParser/src/shops/indesit_ua_com.java
ac90a037c26a267bd98952a8df8c9d35c59a5f90
[]
no_license
cherkavi/html-parsing
af1f1b4e3168d0d1b5b8229b8107d4641636be67
2505ce439477cd5cab2df70f9274eab60be533f8
refs/heads/master
2022-08-15T13:37:28.026696
2019-09-21T15:56:05
2019-09-21T15:56:05
196,726,065
0
0
null
2022-06-21T01:26:40
2019-07-13T13:40:54
Java
WINDOWS-1251
Java
false
false
2,868
java
package shops; import org.w3c.dom.Element; import org.w3c.dom.Node; import shop_list.html.parser.engine.record.Record; import shop_list.html.parser.engine.single_page.TableSinglePage; public class indesit_ua_com extends TableSinglePage{ @Override protected Record getRecordFromRow(Node node) { // if(((Element)this.parser.getNodeFromNodeAlternative(node, "/td[3]/nobr")).getTextContent().indexOf("На складе")>=0){ Record returnValue=null; try{ String name=null; String url=null; String description=null; Float price=null; Float priceUSD=null; Float priceEURO=null; Element nodeName=(Element)this.parser.getNodeFromNode(node, "/td[1]/a"); url=nodeName.getAttribute("href"); // if(url.startsWith("."))url=url.substring(1); name=nodeName.getTextContent().trim(); Element priceElement=(Element)this.parser.getNodeFromNode(node, "/td[2]/nobr"); // System.out.println("Source price String: "+priceElement.getTextContent().trim()); // System.out.println("Replaced price String: "+priceElement.getTextContent().trim().replaceAll("[\\$ ,]", "")); String priceElementText=priceElement.getTextContent().trim().toUpperCase().replaceAll("[А-ЯA-Z $,]", ""); // while(priceElementText.endsWith(".")){priceElementText=priceElementText.substring(0, priceElementText.length()-1);} priceUSD=Float.parseFloat(priceElementText); returnValue=new Record(name,description,url, price, priceUSD, priceEURO); }catch(Exception ex){ returnValue=null; logger.error(this, "#getRecordFromRow Exception:"+ex.getMessage()); } return returnValue; // }else{return null;} } @Override protected String getSectionNameFromRow(Node node) { return this.parser.getTextContentFromNode(node, "/td/a", ""); } @Override protected boolean isRecord(Node node) { // System.out.println(node.getTextContent()); if(this.parser.getChildElementCount(node, "td")==2){ return true; }else{ return false; } } @Override protected boolean isSection(Node node) { if(this.parser.getChildElementCount(node, "td")==1){ return true; }else{ return false; } } @Override protected String getCharset() { return "windows-1251"; } @Override protected String getFullHttpUrlToPrice() { return "http://indesit-ua.com/index.php?show_price=yes"; } @Override public String getShopUrlStartPage() { return "http://indesit-ua.com"; } @Override protected String getXmlPathToMainBlock() { return "/html/body/center/table/tbody/tr/td/table/tbody/tr[3]/td[2]/center/table/tbody"; } @Override public String sectionPostProcessor(String sectionName) { if(sectionName!=null){ return sectionName.replaceAll("\\|", ""); }else{ return sectionName; } } }
[ "technik7job@gmail.com" ]
technik7job@gmail.com
4e203f5becbbba1bf8f9453fb5bbb37c0f480fc9
3a881f3257d7aa7262c61e2874d0e0f51463b917
/src/main/java/sample/entity/OrderStatus.java
d1aae72db24c25a2837da6ed49d92836b8a992d3
[ "Apache-2.0" ]
permissive
domaframework/spring-boot-jpetstore
05486b7a02574419a7dc1ba297c388cee57703f3
b7e87c655933a1974d9710154b76235e381ef8fe
refs/heads/master
2022-12-02T14:58:43.510256
2022-11-25T15:16:52
2022-11-25T19:01:58
20,168,372
16
33
Apache-2.0
2022-11-25T19:01:59
2014-05-25T23:03:45
Java
UTF-8
Java
false
false
1,100
java
package sample.entity; import java.time.LocalDate; import org.seasar.doma.Column; import org.seasar.doma.Entity; import org.seasar.doma.Id; import org.seasar.doma.Metamodel; import org.seasar.doma.Table; @Entity(metamodel = @Metamodel) @Table(name = "ORDERSTATUS") public class OrderStatus { @Id @Column(name = "ORDERID") private Integer orderId; @Id @Column(name = "LINENUM") private Integer lineNumber; @Column(name = "TIMESTAMP") private LocalDate timestamp; @Column(name = "STATUS") private String status; public Integer getOrderId() { return orderId; } public void setOrderId(Integer orderId) { this.orderId = orderId; } public Integer getLineNumber() { return lineNumber; } public void setLineNumber(Integer lineNumber) { this.lineNumber = lineNumber; } public LocalDate getTimestamp() { return timestamp; } public void setTimestamp(LocalDate timestamp) { this.timestamp = timestamp; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
[ "toshihiro.nakamura@gmail.com" ]
toshihiro.nakamura@gmail.com
8a671057ce4a77aaf2a8c36c639cef97a215be15
dd3fb3856f8a14c68ed33a68d2b78055277fb6a6
/baseio-codec/src/main/java/com/generallycloud/nio/codec/line/future/LineBasedReadFutureImpl.java
62019848651bc0f0df2deb5a0d29dcfc664c4079
[]
no_license
javawlb/baseio
4019f9a382a325d9b2fad94e1b1bb78f3227b464
c18a7c422ba911143732fd4dcf1ef03057c44b68
refs/heads/master
2020-08-04T22:37:16.405552
2016-11-11T07:29:07
2016-11-11T07:29:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,530
java
package com.generallycloud.nio.codec.line.future; import java.io.IOException; import java.nio.charset.Charset; import com.generallycloud.nio.buffer.ByteBuf; import com.generallycloud.nio.component.BaseContext; import com.generallycloud.nio.component.BufferedOutputStream; import com.generallycloud.nio.component.SocketSession; import com.generallycloud.nio.protocol.AbstractIOReadFuture; public class LineBasedReadFutureImpl extends AbstractIOReadFuture implements LineBasedReadFuture { private String text; private boolean complete; private int limit; private BufferedOutputStream cache = new BufferedOutputStream(); public LineBasedReadFutureImpl(BaseContext context) { super(context); this.limit = 1024 * 1024; } private void doBodyComplete() { complete = true; } public boolean read(SocketSession session, ByteBuf buffer) throws IOException { if (complete) { return true; } BufferedOutputStream cache = this.cache; for (; buffer.hasRemaining();) { byte b = buffer.getByte(); if (b == LINE_BASE) { doBodyComplete(); return true; } cache.write(b); if (cache.size() > limit) { throw new IOException("max length " + limit); } } return false; } public String getText() { return getText(context.getEncoding()); } public String getText(Charset encoding) { if (text == null) { text = cache.toString(encoding); } return text; } public BufferedOutputStream getOutputStream() { return cache; } public void release() { } }
[ "8738115@qq.com" ]
8738115@qq.com
a09fe7a1d848a0672c93fe14348d58299d7dcfed
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/WhereYouGo-0.9.3-beta/DecompiledCode/Fernflower/src/main/java/android/support/v4/widget/ListPopupWindowCompat.java
d9b196ecc075e2d918a0209a410dcaa61ddc06a3
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,251
java
package android.support.v4.widget; import android.os.Build.VERSION; import android.view.View; import android.view.View.OnTouchListener; public final class ListPopupWindowCompat { static final ListPopupWindowCompat.ListPopupWindowImpl IMPL; static { if (VERSION.SDK_INT >= 19) { IMPL = new ListPopupWindowCompat.KitKatListPopupWindowImpl(); } else { IMPL = new ListPopupWindowCompat.BaseListPopupWindowImpl(); } } private ListPopupWindowCompat() { } public static OnTouchListener createDragToOpenListener(Object var0, View var1) { return IMPL.createDragToOpenListener(var0, var1); } static class BaseListPopupWindowImpl implements ListPopupWindowCompat.ListPopupWindowImpl { public OnTouchListener createDragToOpenListener(Object var1, View var2) { return null; } } static class KitKatListPopupWindowImpl extends ListPopupWindowCompat.BaseListPopupWindowImpl { public OnTouchListener createDragToOpenListener(Object var1, View var2) { return ListPopupWindowCompatKitKat.createDragToOpenListener(var1, var2); } } interface ListPopupWindowImpl { OnTouchListener createDragToOpenListener(Object var1, View var2); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
ec8ddd72f180689d74d10a4c39eafe3618fdb38f
842857cb89ecc4a5f0ef0323e652aa4c90e347a4
/jee/jpa/criteria-api/src/main/java/br/com/mystudies/jpa/criteria/api/Cliente.java
24660a5bacd41325bd1b0fb3308c9f985b81d5c5
[]
no_license
r3wa/my-studies
964fde36f7c35ef7c7974f7a535a22f557344b5c
65197c11e62189158021d00209dcc9c9ae1f482c
refs/heads/master
2020-12-11T07:17:29.496206
2013-07-30T11:51:29
2013-07-30T11:51:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,161
java
package br.com.mystudies.jpa.criteria.api; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; /** * @author rduarte * */ @Entity public class Cliente{ @Id @GeneratedValue() private Long id; private String nome; private Integer idade; private String email; @OneToOne(cascade=CascadeType.ALL) @JoinColumn(name="ENDERECO_ID") private Endereco endereco; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public Integer getIdade() { return idade; } public void setIdade(Integer idade) { this.idade = idade; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Endereco getEndereco() { return endereco; } public void setEndereco(Endereco endereco) { this.endereco = endereco; } }
[ "robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531" ]
robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531
32eeb3ba9857d58cecf8d516008d21fbe343857c
c691cb919c8cb4146966d5c87bcdc42f584918b1
/iam-api-server/src/main/java/it/infn/cnaf/sd/iam/api/common/dto/LabelDTO.java
d5c652143df6b840f993f8ac57d6af83a2a032db
[ "Apache-2.0" ]
permissive
indigo-iam/iam-ng
58bec9de3ccbeb7ee6863ee1621193654e1aeae1
5af2b1ddeddbf63dce0ce62faa70e6ef70975d6b
refs/heads/master
2023-03-30T07:34:25.664835
2020-08-05T13:53:59
2020-08-05T13:53:59
248,718,948
0
5
NOASSERTION
2023-01-07T16:16:24
2020-03-20T09:41:30
Java
UTF-8
Java
false
false
3,697
java
/** * Copyright (c) Istituto Nazionale di Fisica Nucleare (INFN). 2016-2020 * * 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 it.infn.cnaf.sd.iam.api.common.dto; import javax.annotation.Generated; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; public class LabelDTO { // Matches simple domain names public static final String PREFIX_REGEXP = "^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,6}$"; public static final String NAME_REGEXP = "^[a-zA-Z][a-zA-Z0-9-_.]*$"; @Size(max = 256, message = "invalid prefix length") @Pattern(regexp = PREFIX_REGEXP, message = "invalid prefix (does not match with regexp: '" + PREFIX_REGEXP + "')") private String prefix; @NotBlank(message = "name is required") @Size(max = 64, message = "invalid name length") @Pattern(regexp = NAME_REGEXP, message = "invalid name (does not match with regexp: '" + NAME_REGEXP + "')") private String name; @Size(max = 64, message = "invalid value length") private String value; public LabelDTO() {} public LabelDTO(Builder builder) { this.prefix = builder.prefix; this.name = builder.name; this.value = builder.value; } public String getPrefix() { return prefix; } public void setPrefix(String prefix) { this.prefix = prefix; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } @Override @Generated("eclipse") public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((prefix == null) ? 0 : prefix.hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; } @Override @Generated("eclipse") public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LabelDTO other = (LabelDTO) obj; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (prefix == null) { if (other.prefix != null) return false; } else if (!prefix.equals(other.prefix)) return false; if (value == null) { if (other.value != null) return false; } else if (!value.equals(other.value)) return false; return true; } public static class Builder { private String prefix; private String name; private String value; public Builder prefix(String prefix) { this.prefix = prefix; return this; } public Builder name(String name) { this.name = name; return this; } public Builder value(String value) { this.value = value; return this; } public LabelDTO build() { return new LabelDTO(this); } } public static Builder builder() { return new Builder(); } }
[ "andrea.ceccanti@gmail.com" ]
andrea.ceccanti@gmail.com
f42181540443229a7d930590b7f01fbc274724dc
ff448955d56a506b406a386eed4c4da588f8268a
/src/test/java/com/waytous/cloud/gateway/web/rest/WithUnauthenticatedMockUser.java
015afc81d0b849fa67998ab159b0e62fc5128df9
[]
no_license
50centsl/cloud-gateway-application
3b948530810f77a3bfb7ab20182d980cb96cef37
c9f5b3efbbc8c8f9e380a1f3cf12d19af96f1530
refs/heads/main
2023-08-24T23:05:12.223804
2021-10-08T10:03:08
2021-10-08T10:03:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
998
java
package com.waytous.cloud.gateway.web.rest; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.test.context.support.WithSecurityContext; import org.springframework.security.test.context.support.WithSecurityContextFactory; @Target({ ElementType.METHOD, ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) @WithSecurityContext(factory = WithUnauthenticatedMockUser.Factory.class) public @interface WithUnauthenticatedMockUser { class Factory implements WithSecurityContextFactory<WithUnauthenticatedMockUser> { @Override public SecurityContext createSecurityContext(WithUnauthenticatedMockUser annotation) { return SecurityContextHolder.createEmptyContext(); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f77483d68f66e7b7fe48206a1fcd4a199dbc2771
2fe28a033511fdf8d2027c8cc63c3423646150b8
/src/day28_loopsContinued/FindUniquesChars.java
474bcedba05581e87f9f31a96291a572655dd695
[]
no_license
danyalwalker/Java-Programming
4c581a06a1cca45f56e3a6db4535d8fb6798ccac
a89505403eedd5920a7414d1b41c28136003d8a4
refs/heads/master
2023-07-19T16:56:07.188814
2021-09-25T21:27:20
2021-09-25T21:27:20
374,452,988
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package day28_loopsContinued; public class FindUniquesChars { public static void main(String[] args) { String word = "javva"; String unique = ""; for (int i = 0; i < word.length(); i++) { if (!unique.contains(word.charAt(i) + "")){ unique += word.charAt(i); } } System.out.println(unique); } }
[ "danielwalker.ny@gmail.com" ]
danielwalker.ny@gmail.com
769e8586029487ec1320ddce1edcb07b7e964340
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
/subject SPLs and test cases/BerkeleyDB(5)/BerkeleyDB_P3/evosuite-tests4/com/sleepycat/je/tree/SearchResult_ESTest_scaffolding4.java
548ebf079791b5889e157dbc977046a170ae5470
[]
no_license
psjung/SRTST_experiments
6f1ff67121ef43c00c01c9f48ce34f31724676b6
40961cb4b4a1e968d1e0857262df36832efb4910
refs/heads/master
2021-06-20T04:45:54.440905
2019-09-06T04:05:38
2019-09-06T04:05:38
206,693,757
1
0
null
2020-10-13T15:50:41
2019-09-06T02:10:06
Java
UTF-8
Java
false
false
1,446
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 22 16:13:32 KST 2017 */ package com.sleepycat.je.tree; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class SearchResult_ESTest_scaffolding4 { @org.junit.Rule public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(4000); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.sleepycat.je.tree.SearchResult"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } }
[ "psjung@kaist.ac.kr" ]
psjung@kaist.ac.kr
e6777d029fc8ea76129688328166c01a1aa789ac
99a8722d0d16e123b69e345df7aadad409649f6c
/jpa/deferred/src/main/java/example/repo/Customer390Repository.java
ed4453bcc0f0e6b9ed4b7c051bc2a153d3982342
[ "Apache-2.0" ]
permissive
spring-projects/spring-data-examples
9c69a0e9f3e2e73c4533dbbab00deae77b2aacd7
c4d1ca270fcf32a93c2a5e9d7e91a5592b7720ff
refs/heads/main
2023-09-01T14:17:56.622729
2023-08-22T16:51:10
2023-08-24T19:48:04
16,381,571
5,331
3,985
Apache-2.0
2023-08-25T09:02:19
2014-01-30T15:42:43
Java
UTF-8
Java
false
false
280
java
package example.repo; import example.model.Customer390; import java.util.List; import org.springframework.data.repository.CrudRepository; public interface Customer390Repository extends CrudRepository<Customer390, Long> { List<Customer390> findByLastName(String lastName); }
[ "ogierke@pivotal.io" ]
ogierke@pivotal.io
31ac31bb3e3e9a949fda84a5e20d2ab31e5147c1
cb8ccced1c84721994c9008d60f6b2a120365321
/src/main/java/net/zomis/cards/iface/TargetOptions.java
cc8b7106af6ea12ed4b5459904d202e998599e49
[]
no_license
Zomis/ZonesAndCards
ecda38ccbf2ef0cb71ec8079fba4b78b080ada1f
8025a30ed51e1d9fcf49cf4bb7b0d9462a913011
refs/heads/master
2020-06-01T03:24:36.772179
2020-02-08T18:17:34
2020-02-08T18:17:34
20,162,557
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package net.zomis.cards.iface; public class TargetOptions { private final int min; private final int max; private final CardFilter2 filter; public TargetOptions(int min, int max, CardFilter2 filter) { this.min = min; this.max = max; this.filter = filter; } public static TargetOptions singleTarget(CardFilter2 filter) { return new TargetOptions(1, 1, filter); } public int getMin() { return min; } public CardFilter2 getFilter() { return filter; } public int getMax() { return max; } }
[ "zomis2k@hotmail.com" ]
zomis2k@hotmail.com
cbd07359cf4abd2175e8224018f6e3735c18a524
628cf6fc211841dbb3f22e30e8b96562886c3724
/cases/android/generated/ocladapt/src/org/eclipse/ocl/cst/InitValueCS.java
fcfbb6fd1c56e4b242f2983dab77b1e10ae8377f
[]
no_license
DylanYu/smatrt
ef4c54bf187762bc22407ea4d6e2e6c879072949
c85baa4255d2e6792c1ed9b1e7e184860cdac9ad
refs/heads/master
2016-09-06T04:46:19.998706
2013-07-20T10:03:29
2013-07-20T10:03:29
33,805,621
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
/** * <copyright> * * Copyright (c) 2005, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM - Initial API and implementation * * </copyright> * * $Id: InitValueCS.java,v 1.1 2007/10/11 23:04:54 cdamus Exp $ */ package org.eclipse.ocl.cst; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Init Value CS</b></em>'. * <!-- end-user-doc --> * * * @see org.eclipse.ocl.cst.CSTPackage#getInitValueCS() * @model * @generated */ public interface InitValueCS extends InitOrDerValueCS { } // InitValueCS
[ "fafeysong@fb895ce6-3987-11de-a15a-d1801d6fabe8" ]
fafeysong@fb895ce6-3987-11de-a15a-d1801d6fabe8
eba693f6b3147918861f48723cc2e2dd60957b1d
22423db096170d71335bfe027d98c9840d807ea7
/JSPCrudOperation/build/generated/src/org/apache/jsp/adduserform_jsp.java
5fb5a73ec3ff9c7d453fb76fe413bbccc759308f
[]
no_license
ShamimsJava/jsp_servlet
1197f14a9dd4c382a2c61b50863803e825132c0e
6ecb9a195bd3cf3a8a1b2a40fd4054505982e025
refs/heads/master
2021-08-30T13:52:19.383287
2017-12-18T06:56:06
2017-12-18T06:56:06
113,297,946
0
0
null
null
null
null
UTF-8
Java
false
false
2,516
java
package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class adduserform_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List<String> _jspx_dependants; private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; public java.util.List<String> getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\r\n"); out.write("<!DOCTYPE html>\r\n"); out.write("<html>\r\n"); out.write(" <head>\r\n"); out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\r\n"); out.write(" <title>Add User Form</title>\r\n"); out.write(" </head>\r\n"); out.write(" <body>\r\n"); out.write(" "); org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "userform.html", out, false); out.write("\r\n"); out.write(" </body>\r\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "shamimsjava@gmail.com" ]
shamimsjava@gmail.com
5e396e9a5289e04edc8ce163913ca396f42650f9
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE191_Integer_Underflow/s04/CWE191_Integer_Underflow__byte_min_postdec_42.java
d42117adbea94027b694c26c71e51cccd17dd8b8
[]
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
3,181
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__byte_min_postdec_42.java Label Definition File: CWE191_Integer_Underflow.label.xml Template File: sources-sinks-42.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: min Set data to the max value for byte * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: decrement * GoodSink: Ensure there will not be an underflow before decrementing data * BadSink : Decrement data, which can cause an Underflow * Flow Variant: 42 Data flow: data returned from one method to another in the same class * * */ package testcases.CWE191_Integer_Underflow.s04; import testcasesupport.*; public class CWE191_Integer_Underflow__byte_min_postdec_42 extends AbstractTestCase { private byte badSource() throws Throwable { byte data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Byte.MIN_VALUE; return data; } public void bad() throws Throwable { byte data = badSource(); /* POTENTIAL FLAW: if data == Byte.MIN_VALUE, this will overflow */ data--; byte result = (byte)(data); IO.writeLine("result: " + result); } /* goodG2B() - use goodsource and badsink */ private byte goodG2BSource() throws Throwable { byte data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; return data; } private void goodG2B() throws Throwable { byte data = goodG2BSource(); /* POTENTIAL FLAW: if data == Byte.MIN_VALUE, this will overflow */ data--; byte result = (byte)(data); IO.writeLine("result: " + result); } /* goodB2G() - use badsource and goodsink */ private byte goodB2GSource() throws Throwable { byte data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Byte.MIN_VALUE; return data; } private void goodB2G() throws Throwable { byte data = goodB2GSource(); /* FIX: Add a check to prevent an underflow from occurring */ if (data > Byte.MIN_VALUE) { data--; byte result = (byte)(data); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too small to decrement."); } } public void good() throws Throwable { goodG2B(); goodB2G(); } /* 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
fd80d6f1f97576a67632179737e01aa13d71020e
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-iovcc/src/main/java/com/aliyuncs/iovcc/model/v20180501/PublishOsVersionRequest.java
803b8ec66c594b6c97d865ab51168982e667458b
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
2,235
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.iovcc.model.v20180501; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.ProtocolType; import com.aliyuncs.http.MethodType; import com.aliyuncs.iovcc.Endpoint; /** * @author auto create * @version */ public class PublishOsVersionRequest extends RpcAcsRequest<PublishOsVersionResponse> { private Boolean sendMessage; private String versionId; private String projectId; public PublishOsVersionRequest() { super("iovcc", "2018-05-01", "PublishOsVersion", "iovcc"); setProtocol(ProtocolType.HTTPS); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Boolean getSendMessage() { return this.sendMessage; } public void setSendMessage(Boolean sendMessage) { this.sendMessage = sendMessage; if(sendMessage != null){ putQueryParameter("SendMessage", sendMessage.toString()); } } public String getVersionId() { return this.versionId; } public void setVersionId(String versionId) { this.versionId = versionId; if(versionId != null){ putQueryParameter("VersionId", versionId); } } public String getProjectId() { return this.projectId; } public void setProjectId(String projectId) { this.projectId = projectId; if(projectId != null){ putQueryParameter("ProjectId", projectId); } } @Override public Class<PublishOsVersionResponse> getResponseClass() { return PublishOsVersionResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
47ba938f686de2212cdeccc632a8ca0f0279bbcb
7f002fe6b59c465cec3dcecc7c798117dc60611f
/app/src/main/java/com/jingna/videotest/lechange/business/entity/ChannelPTZInfo.java
af527ea8f1b17a669fd9df20b2f17671214346d2
[]
no_license
huweidongls/VideoTest
4463d0b307e62fc737dbf25970a3e714d25b64f1
02838b1b65eb35977107673c2e7b508d1d1b6777
refs/heads/master
2022-04-27T14:36:10.986054
2020-04-20T05:55:31
2020-04-20T05:55:31
257,144,808
1
0
null
null
null
null
UTF-8
Java
false
false
1,600
java
package com.jingna.videotest.lechange.business.entity; /** * 文件描述:package com.android.business.entity; * 功能说明: * 版权申明: * @author ding_qili * @version 2015-6-17下午3:29:12 */ public class ChannelPTZInfo { public enum Operation{ Move,//移动 Locate,//定位 Stop;//立即停止! } public enum Duration{//持续多久 Forever,//永远 Long,//长 Generral,//普通 Short;//短 } public enum Direction{//方向 Left, Right, Up, Down, ZoomIn, ZoomOut; } public ChannelPTZInfo(Operation operation,Direction direction) { this.operation = operation; this.direction = direction; } /** 操作行为;move表示移动,locate表示定位 */ private Operation operation = Operation.Move; /** * 持续时间 */ private Duration duration = Duration.Generral; /** * 方向 */ private Direction direction = Direction.Left; /** * @return the operation */ public Operation getOperation() { return operation; } /** * @param operation the operation to set */ public void setOperation(Operation operation) { this.operation = operation; } /** * @return the duration */ public Duration getDuration() { return duration; } /** * @param duration the duration to set */ public void setDuration(Duration duration) { this.duration = duration; } /** * @return the direction */ public Direction getDirection() { return direction; } /** * @param direction the direction to set */ public void setDirection(Direction direction) { this.direction = direction; } }
[ "466463054@qq.com" ]
466463054@qq.com
ef2c89a42a99851fb9b258d5957392b5e2b1e20d
0717e441c5f4d8803a12d29f10c9e125b9f3126f
/simple-test/src/main/java/org/simpleframework/http/validate/LogEvent.java
34c6cd7aebb514ca1a0d8af0586c03f0a2184954
[ "Apache-2.0" ]
permissive
minborg/simpleframework
f28057afc8e50ef7e96702fb1f24c80acbd8d276
e21e2d0c8d14dec07fdf72c29df057da5ee4c854
refs/heads/master
2020-05-23T10:10:41.808206
2015-05-01T22:11:33
2015-05-01T22:11:33
34,919,099
1
0
null
2015-05-01T19:08:39
2015-05-01T19:08:39
null
UTF-8
Java
false
false
2,883
java
package org.simpleframework.http.validate; public class LogEvent { private final long throughput; private final long totalRequests; private final long connectionCount; private final long responseLatency; private final long maxLatency; private final long minLatency; private final long concurrency; private final long waitingThreads; private final long totalThreads; private final long freeMemory; private final long totalMemory; private final long bytesSent; private final long totalBytes; private final long sample; private final long sampleTime; public LogEvent( long sample, long sampleTime, long throughput, long totalRequests, long connectionCount, long responseLatency, long maxLatency, long minLatency, long concurrency, long waitingThreads, long totalThreads, long freeMemory, long totalMemory, long bytesSent, long totalBytes) { this.sample = sample; this.sampleTime = sampleTime; this.throughput = throughput; this.totalRequests = totalRequests; this.connectionCount = connectionCount; this.responseLatency = responseLatency; this.maxLatency = maxLatency; this.minLatency = minLatency; this.concurrency = concurrency; this.waitingThreads = waitingThreads; this.totalThreads = totalThreads; this.freeMemory = freeMemory; this.totalMemory = totalMemory; this.bytesSent = bytesSent; this.totalBytes = totalBytes; } public long getMaxLatency() { return maxLatency; } public long getMinLatency() { return minLatency; } public long getSample() { return sample; } public long getSampleTime() { return sampleTime; } public long getTotalBytes() { return totalBytes; } public long getTotalRequests() { return totalRequests; } public long getBytesSent() { return bytesSent; } public long getConcurrency() { return concurrency; } public long getConnectionCount() { return connectionCount; } public long getFreeMemory() { return freeMemory; } public long getResponseLatency() { return responseLatency; } public long getThroughput() { return throughput; } public long getTotalMemory() { return totalMemory; } public long getTotalThreads() { return totalThreads; } public long getWaitingThreads() { return waitingThreads; } }
[ "gallagher_niall@yahoo.com" ]
gallagher_niall@yahoo.com
11af33a3e578e50d7570e49bff9dd3afee1b67dc
944d8c9e3f93777f20aed5c2c2ecdc630bd7f291
/app/src/main/java/com/myappforu/wpnews/webengine/VideoView.java
439f5215c90362ab2064cfd5315d88ed4c59d413
[]
no_license
fandofastest/xxxxx
18305f451ba36fcfb40ba46ff6a4c71b4996562a
6d7a50eaa1d98ffc961c494cfa4ff3f098402d8c
refs/heads/master
2023-01-19T05:26:16.370810
2020-11-26T19:41:48
2020-11-26T19:41:48
316,322,699
0
0
null
null
null
null
UTF-8
Java
false
false
2,593
java
package com.myappforu.wpnews.webengine; import android.app.Activity; import android.app.AlertDialog; import android.os.Build; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.ProgressBar; import com.myappforu.wpnews.R; /** * Created by Ashiq on 8/30/16. */ public class VideoView { private AlertDialog dialog; private FrameLayout videoLayout; private ProgressBar progressBar; private static VideoView videoView = null; public static VideoView getInstance() { if (videoView == null) { videoView = new VideoView(); } return videoView; } public void show(final Activity activity) { dismiss(); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.DialogTheme); LayoutInflater layoutInflater = LayoutInflater.from(activity); View promptsView = layoutInflater.inflate(R.layout.layout_video_view, null); alertDialogBuilder.setView(promptsView); alertDialogBuilder.setCancelable(true); videoLayout = (FrameLayout) promptsView.findViewById(R.id.videoView); progressBar = (ProgressBar) promptsView.findViewById(R.id.progressBar); dialog = alertDialogBuilder.create(); dialog.show(); WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); Window window = dialog.getWindow(); lp.copyFrom(window.getAttributes()); lp.width = WindowManager.LayoutParams.MATCH_PARENT; lp.height = WindowManager.LayoutParams.MATCH_PARENT; window.setAttributes(lp); dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); View v = window.getDecorView(); v.setBackgroundResource(android.R.color.black); if (Build.VERSION.SDK_INT < 19) { v.setSystemUiVisibility(View.GONE); } else if (Build.VERSION.SDK_INT >= 19) { int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; v.setSystemUiVisibility(uiOptions); } } public void dismiss() { if (dialog != null && dialog.isShowing()) { dialog.dismiss(); } } public void setVideoLayout(View view) { if (videoLayout != null) { videoLayout.addView(view); } } public ProgressBar getProgressBar() { return progressBar; } }
[ "fandofast@gmail.com" ]
fandofast@gmail.com
e44cefd046774c5d443b719350c3709b6f1074c1
4e7c597e78f01fe1c14fc4cbb67dc4379a8c5939
/mambo-protocol/src/main/java/org/mambo/protocol/types/GameActionMarkedCell.java
707ddb3b5322b65369a674fc10d778e9c311e90a
[]
no_license
Guiedo/Mambo
c24e4836f20a1028e61cb7987ad6371348aaf0fe
8fb946179b6b00798010bda8058430789644229d
refs/heads/master
2021-01-18T11:29:43.048990
2013-05-25T17:33:37
2013-05-25T17:33:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,369
java
// Generated on 05/08/2013 19:38:00 package org.mambo.protocol.types; import java.util.*; import org.mambo.protocol.enums.*; import org.mambo.protocol.*; import org.mambo.core.io.*; public class GameActionMarkedCell extends NetworkType { public static final short TYPE_ID = 85; @Override public short getTypeId() { return TYPE_ID; } public short cellId; public byte zoneSize; public int cellColor; public byte cellsType; public GameActionMarkedCell() { } public GameActionMarkedCell(short cellId, byte zoneSize, int cellColor, byte cellsType) { this.cellId = cellId; this.zoneSize = zoneSize; this.cellColor = cellColor; this.cellsType = cellsType; } @Override public void serialize(Buffer buf) { buf.writeShort(cellId); buf.writeByte(zoneSize); buf.writeInt(cellColor); buf.writeByte(cellsType); } @Override public void deserialize(Buffer buf) { cellId = buf.readShort(); if (cellId < 0 || cellId > 559) throw new RuntimeException("Forbidden value on cellId = " + cellId + ", it doesn't respect the following condition : cellId < 0 || cellId > 559"); zoneSize = buf.readByte(); cellColor = buf.readInt(); cellsType = buf.readByte(); } }
[ "blackrushx@gmail.com" ]
blackrushx@gmail.com
6ed93b618d6795f6a63f5f49aa312e2b5ba9f9ec
63c1958939a9c3bdb2bba6997d69b4b38034e9e9
/CardForm/src/test/java/com/braintreepayments/cardform/view/CvvEditTextTest.java
cc9b4e7bebccda768f0501b9fcdee7e6371baadf
[ "MIT" ]
permissive
dhavalsharma/android-card-form
87de3a9594cb898f77d2cdff10258441d250c67e
b1c6b1bce3a828aa5a46bb210c125eefc040efb3
refs/heads/master
2020-02-26T14:39:41.258413
2016-07-12T16:47:35
2016-07-12T16:47:35
63,123,952
0
0
null
2016-07-12T03:40:25
2016-07-12T03:40:25
null
UTF-8
Java
false
false
1,665
java
package com.braintreepayments.cardform.view; import android.text.Editable; import com.braintreepayments.cardform.R; import com.braintreepayments.cardform.test.TestActivity; import com.braintreepayments.cardform.utils.CardType; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricGradleTestRunner; import static junit.framework.Assert.assertEquals; @RunWith(RobolectricGradleTestRunner.class) public class CvvEditTextTest { private CvvEditText mView; @Before public void setup() { mView = (CvvEditText) Robolectric.setupActivity(TestActivity.class) .findViewById(R.id.bt_card_form_cvv); } @Test public void defaultLimitIs3() { type("123").assertTextIs("123"); type("4").assertTextIs("123"); } @Test public void customLimits() { for (CardType type : CardType.values()) { mView.setCardType(type); if (type == CardType.AMEX) { type("1234").assertTextIs("1234"); type("5").assertTextIs("1234"); } else { type("123").assertTextIs("123"); type("4").assertTextIs("123"); } mView.getText().clear(); } } /* helpers */ private CvvEditTextTest type(String text) { Editable editable = mView.getText(); for (char c : text.toCharArray()) { editable.append(c); } return this; } private void assertTextIs(String expected) { assertEquals(expected, mView.getText().toString()); } }
[ "luke@lukekorth.com" ]
luke@lukekorth.com
ec23be72dc5498c5bd022ee59ccc4e75b04c1e6d
df839119e96d9619487c3cccb18b96a2e914a6e6
/solutions/emfsyncer/src/scenario1_v2/util/Scenario1_v2AdapterFactory.java
6997d3ae14ab9e384790bf9cf3c98179a5b1aad3
[]
no_license
TransformationToolContest/ttc2020-roundtrip
0c032954be368aa1408cd13b65e6104b221e4349
051d018f3806fcb3353ea92b5ec359b58281d909
refs/heads/master
2022-11-16T22:22:16.800215
2020-07-13T18:27:13
2020-07-13T18:27:13
279,291,685
0
1
null
null
null
null
UTF-8
Java
false
false
3,116
java
/** */ package scenario1_v2.util; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; import scenario1_v2.*; /** * <!-- begin-user-doc --> * The <b>Adapter Factory</b> for the model. * It provides an adapter <code>createXXX</code> method for each class of the model. * <!-- end-user-doc --> * @see scenario1_v2.Scenario1_v2Package * @generated */ public class Scenario1_v2AdapterFactory extends AdapterFactoryImpl { /** * The cached model package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static Scenario1_v2Package modelPackage; /** * Creates an instance of the adapter factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Scenario1_v2AdapterFactory() { if (modelPackage == null) { modelPackage = Scenario1_v2Package.eINSTANCE; } } /** * Returns whether this factory is applicable for the type of the object. * <!-- begin-user-doc --> * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. * <!-- end-user-doc --> * @return whether this factory is applicable for the type of the object. * @generated */ @Override public boolean isFactoryForType(Object object) { if (object == modelPackage) { return true; } if (object instanceof EObject) { return ((EObject)object).eClass().getEPackage() == modelPackage; } return false; } /** * The switch that delegates to the <code>createXXX</code> methods. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Scenario1_v2Switch<Adapter> modelSwitch = new Scenario1_v2Switch<Adapter>() { @Override public Adapter casePerson(Person object) { return createPersonAdapter(); } @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } }; /** * Creates an adapter for the <code>target</code>. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param target the object to adapt. * @return the adapter for the <code>target</code>. * @generated */ @Override public Adapter createAdapter(Notifier target) { return modelSwitch.doSwitch((EObject)target); } /** * Creates a new adapter for an object of class '{@link scenario1_v2.Person <em>Person</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see scenario1_v2.Person * @generated */ public Adapter createPersonAdapter() { return null; } /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> * This default implementation returns null. * <!-- end-user-doc --> * @return the new adapter. * @generated */ public Adapter createEObjectAdapter() { return null; } } //Scenario1_v2AdapterFactory
[ "nyoescape@gmail.com" ]
nyoescape@gmail.com
01df48dabc914437ffaf09f425973da2d96d68d6
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
/hybris/bin/modules/web-content-management-system/cmsfacades/src/de/hybris/platform/cmsfacades/navigations/validator/NavigationNodeEntriesValidator.java
70fb4dcafa15bcc0a223a3fe8792dced6dda8ab3
[]
no_license
shaikshakeeb785/hybrisNew
c753ac45c6ae264373e8224842dfc2c40a397eb9
228100b58d788d6f3203333058fd4e358621aba1
refs/heads/master
2023-08-15T06:31:59.469432
2021-09-03T09:02:04
2021-09-03T09:02:04
402,680,399
0
0
null
null
null
null
UTF-8
Java
false
false
4,669
java
/* * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.cmsfacades.navigations.validator; import de.hybris.platform.cmsfacades.constants.CmsfacadesConstants; import de.hybris.platform.cmsfacades.data.NavigationEntryData; import de.hybris.platform.cmsfacades.data.NavigationNodeData; import de.hybris.platform.cmsfacades.navigations.service.NavigationEntryConverterRegistry; import de.hybris.platform.cmsfacades.navigations.service.NavigationEntryItemModelConverter; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.servicelayer.dto.converter.ConversionException; import java.util.Optional; import java.util.function.Predicate; import java.util.stream.IntStream; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Required; import org.springframework.validation.Errors; import org.springframework.validation.Validator; /** * Validates all the entries of a given {@link NavigationNodeData}. * @deprecated since 1811 - no longer needed */ @Deprecated(since = "1811", forRemoval = true) public class NavigationNodeEntriesValidator implements Validator { private static final Logger LOG = LoggerFactory.getLogger(NavigationNodeEntriesValidator.class); private static final String ITEM_SUPER_TYPE = "itemSuperType"; private static final String ITEM_ID = "itemId"; private static final String ENTRIES = "entries"; private NavigationEntryConverterRegistry navigationEntryConverterRegistry; private Predicate<ItemModel> validEntryItemModelPredicate; @Override public boolean supports(final Class<?> clazz) { return NavigationNodeData.class.isAssignableFrom(clazz); } @Override public void validate(final Object obj, final Errors errors) { final NavigationNodeData target = (NavigationNodeData) obj; if (!CollectionUtils.isEmpty(target.getEntries())) { IntStream.range(0, target.getEntries().size()).forEach(idx -> { final NavigationEntryData entryData = target.getEntries().get(idx); if (StringUtils.isEmpty(entryData.getItemId())) { errors.rejectValue(ENTRIES, CmsfacadesConstants.FIELD_REQUIRED_NAVIGATION_NODE_ENTRY, new Object[] { ITEM_ID, idx }, null); } if (StringUtils.isEmpty(entryData.getItemSuperType())) { errors.rejectValue(ENTRIES, CmsfacadesConstants.FIELD_REQUIRED_NAVIGATION_NODE_ENTRY, new Object[] { ITEM_SUPER_TYPE, idx }, null); } if (!StringUtils.isEmpty(entryData.getItemSuperType()) && !StringUtils.isEmpty(entryData.getItemId())) { validateEntryItem(errors, idx, entryData); } }); } } /** * Validates if it is a valid item * * @param errors * the errors object created for this validation * @param idx * the index of the current entry * @param entryData * the entry being validated */ protected void validateEntryItem(final Errors errors, final int idx, final NavigationEntryData entryData) { final Optional<NavigationEntryItemModelConverter> optionalConverter = getNavigationEntryConverterRegistry() .getNavigationEntryItemModelConverter(entryData.getItemSuperType()); if (!optionalConverter.isPresent()) { errors.rejectValue(ENTRIES, CmsfacadesConstants.FIELD_NAVIGATION_NODE_ENTRY_CONVERTER_NOT_FOUND, new Object[] { ITEM_SUPER_TYPE, idx }, null); } else { try { if (!getValidEntryItemModelPredicate().test(optionalConverter.get().getConverter().apply(entryData))) { errors.rejectValue(ENTRIES, CmsfacadesConstants.FIELD_CIRCULAR_DEPENDENCY_ON_NAVIGATION_NODE_ENTRY, new Object[] { ITEM_ID, idx }, null); } } catch (final ConversionException e) { LOG.info(e.getMessage(), e); errors.rejectValue(ENTRIES, CmsfacadesConstants.FIELD_NAVIGATION_NODE_ENTRY_CONVERSION_ERROR, new Object[] { ITEM_ID, idx }, null); } } } protected NavigationEntryConverterRegistry getNavigationEntryConverterRegistry() { return navigationEntryConverterRegistry; } @Required public void setNavigationEntryConverterRegistry(final NavigationEntryConverterRegistry navigationEntryConverterRegistry) { this.navigationEntryConverterRegistry = navigationEntryConverterRegistry; } protected Predicate<ItemModel> getValidEntryItemModelPredicate() { return validEntryItemModelPredicate; } @Required public void setValidEntryItemModelPredicate(final Predicate<ItemModel> validEntryItemModelPredicate) { this.validEntryItemModelPredicate = validEntryItemModelPredicate; } }
[ "sauravkr82711@gmail.com" ]
sauravkr82711@gmail.com
f7e9174adb2110b62f2c1973599e49eebd873880
eaec4795e768f4631df4fae050fd95276cd3e01b
/src/cmps252/HW4_2/UnitTesting/record_2266.java
40df4d7a99ebc56b3723d1c7c839ebc1f03239d3
[ "MIT" ]
permissive
baraabilal/cmps252_hw4.2
debf5ae34ce6a7ff8d3bce21b0345874223093bc
c436f6ae764de35562cf103b049abd7fe8826b2b
refs/heads/main
2023-01-04T13:02:13.126271
2020-11-03T16:32:35
2020-11-03T16:32:35
307,839,669
1
0
MIT
2020-10-27T22:07:57
2020-10-27T22:07:56
null
UTF-8
Java
false
false
2,462
java
package cmps252.HW4_2.UnitTesting; import static org.junit.jupiter.api.Assertions.*; import java.io.FileNotFoundException; import java.util.List; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import cmps252.HW4_2.Customer; import cmps252.HW4_2.FileParser; @Tag("42") class Record_2266 { private static List<Customer> customers; @BeforeAll public static void init() throws FileNotFoundException { customers = FileParser.getCustomers(Configuration.CSV_File); } @Test @DisplayName("Record 2266: FirstName is Mason") void FirstNameOfRecord2266() { assertEquals("Mason", customers.get(2265).getFirstName()); } @Test @DisplayName("Record 2266: LastName is Sieberg") void LastNameOfRecord2266() { assertEquals("Sieberg", customers.get(2265).getLastName()); } @Test @DisplayName("Record 2266: Company is Nancys Specialty Foods") void CompanyOfRecord2266() { assertEquals("Nancys Specialty Foods", customers.get(2265).getCompany()); } @Test @DisplayName("Record 2266: Address is 39791 Paseo Padre Pky #-a") void AddressOfRecord2266() { assertEquals("39791 Paseo Padre Pky #-a", customers.get(2265).getAddress()); } @Test @DisplayName("Record 2266: City is Fremont") void CityOfRecord2266() { assertEquals("Fremont", customers.get(2265).getCity()); } @Test @DisplayName("Record 2266: County is Alameda") void CountyOfRecord2266() { assertEquals("Alameda", customers.get(2265).getCounty()); } @Test @DisplayName("Record 2266: State is CA") void StateOfRecord2266() { assertEquals("CA", customers.get(2265).getState()); } @Test @DisplayName("Record 2266: ZIP is 94538") void ZIPOfRecord2266() { assertEquals("94538", customers.get(2265).getZIP()); } @Test @DisplayName("Record 2266: Phone is 510-770-9284") void PhoneOfRecord2266() { assertEquals("510-770-9284", customers.get(2265).getPhone()); } @Test @DisplayName("Record 2266: Fax is 510-770-6046") void FaxOfRecord2266() { assertEquals("510-770-6046", customers.get(2265).getFax()); } @Test @DisplayName("Record 2266: Email is mason@sieberg.com") void EmailOfRecord2266() { assertEquals("mason@sieberg.com", customers.get(2265).getEmail()); } @Test @DisplayName("Record 2266: Web is http://www.masonsieberg.com") void WebOfRecord2266() { assertEquals("http://www.masonsieberg.com", customers.get(2265).getWeb()); } }
[ "mbdeir@aub.edu.lb" ]
mbdeir@aub.edu.lb
7d849335cb9c7354664d0096eb5daf5306b49245
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/sdk/b/b.java
06cb4d17e568f4d3ffe1b7a46b30392d489c4389
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
482
java
package com.tencent.mm.sdk.b; public abstract class b { public Runnable bJX = null; public boolean sFm; private int sFn = 0; final int chs() { if (this.sFn == 0) { this.sFn = getClass().getName().hashCode(); } return this.sFn; } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes-dex2jar.jar!/com/tencent/mm/sdk/b/b.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
3ea9fcd792797d67f26eb50e779bae1d028a3ee9
1022794c1246343de80bc8a158e646dca281e85c
/modules/collect/src/main/java/com/opengamma/strata/collect/range/package-info.java
ade09802a44e23e4c555d219ece429673dd78852
[ "Apache-2.0" ]
permissive
slusek/Strata
eb1652cca3aa6da5c15eb23e5160447184beb6db
e182dbed3578b4d66e69f7afe5b3d962c219aaac
refs/heads/master
2020-04-05T23:42:47.477211
2015-12-18T17:09:39
2015-12-18T17:09:39
44,492,878
1
0
null
2015-10-18T19:30:00
2015-10-18T19:30:00
null
UTF-8
Java
false
false
290
java
/** * Copyright (C) 2014 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ /** * Range data structures. * <p> * This package contains a class representing a range of dates. */ package com.opengamma.strata.collect.range;
[ "stephen@opengamma.com" ]
stephen@opengamma.com
fd663d1ec0cc02a0ff46ca2be4d3c8adb06fc5da
1c97205a3e80355034d6442bf8035cd122984f8e
/app/src/main/java/com/heqifuhou/imgutils/PicAct.java
84873d23d3559aab6ff667f045fa825b051b0da6
[ "MIT" ]
permissive
suntinghui/PhinfoOA4Android
8a30f8f89824daa7294051e4de1b2575800741fd
fedbb973d7a2490d07d61c8b2c8cdefdc387f8fb
refs/heads/master
2023-04-08T20:11:15.147365
2021-04-21T03:02:16
2021-04-21T03:02:16
323,909,508
0
0
null
null
null
null
UTF-8
Java
false
false
3,491
java
package com.heqifuhou.imgutils; import java.util.List; import com.heqifuhou.actbase.MyActBase; import com.heqifuhou.adapterbase.MyImgAdapterBaseAbs; import com.heqifuhou.imgutils.AlbumHelper.ImageBucket; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.text.Html; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.GridView; import android.widget.ImageView; import android.widget.TextView; import cn.com.phinfo.oaact.R; //选择照片时,所有的照片 public class PicAct extends MyActBase { private List<ImageBucket> dataList; private GridView gridView; private ImageBucketAdapter adapter;// 自定义的适配 public static final String EXTRA_IMAGE_LIST = "imagelist"; public static Bitmap bimap; /** * 初始化数据 */ private void initData() { dataList = AlbumHelper.getInstance().getImagesBucketList(false); bimap=BitmapFactory.decodeResource( getResources(), R.drawable.icon_addpic); } /** * 初始化view视图 */ private void initView() { gridView = (GridView) findViewById(R.id.gridview); adapter = new ImageBucketAdapter(); gridView.setAdapter(adapter); gridView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent = new Intent(PicAct.this, ImageGridAct.class); intent.putExtra(PicAct.EXTRA_IMAGE_LIST,position); startActivity(intent); finish(); } }); } public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.addViewFillInRoot(R.layout.act_image_bucket); AlbumHelper.getInstance().init(getApplicationContext()); initData(); initView(); if(gridView.getCount()<=0){ View v = this.getLayoutInflater(R.layout.empty); TextView txt = (TextView) v.findViewById(R.id.empty); txt.setTextColor(0xff666666); txt.setText("没有图片"); gridView.setEmptyView(v); } gridView.setVisibility(View.VISIBLE); } public class ImageBucketAdapter extends MyImgAdapterBaseAbs<ImageBucket> { public ImageBucketAdapter() { this.addToListBack(dataList); } @Override public View getView(int arg0, View arg1, ViewGroup arg2) { Holder holder; if (arg1 == null) { holder = new Holder(); arg1 = View.inflate(PicAct.this, R.layout.item_image_bucket, null); holder.iv = (ImageView) arg1.findViewById(R.id.image); holder.selected = (ImageView) arg1.findViewById(R.id.isselected); holder.name = (TextView) arg1.findViewById(R.id.name); holder.count = (TextView) arg1.findViewById(R.id.count); arg1.setTag(holder); } else { holder = (Holder) arg1.getTag(); } ImageBucket item = dataList.get(arg0); holder.count.setText(Html.fromHtml(String.format("总数<font color=blue>%s</font>张",String.valueOf(item.imageList.size())+""))); holder.name.setText(item.bucketName); holder.selected.setVisibility(View.GONE); if (item.imageList != null && item.imageList.size() > 0) { this.getAsyncBitMap(holder.iv, item.imageList.get(0).getThumbnailPath()); } else { holder.iv.setImageBitmap(null); } return arg1; } private class Holder { private ImageView iv; private ImageView selected; private TextView name; private TextView count; } } }
[ "tinghuisun@163.com" ]
tinghuisun@163.com
798ee7e0d9347ebbe1b43a91679f1fe296bf6364
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/47aab7fdc15ab26e0f879600dbe16fa565813216/before/CachingCommittedChangesProvider.java
4b647d013cfd628d1c9ea177d90021cf7bd44e72
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,631
java
/* * Copyright 2000-2007 JetBrains s.r.o. * * 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.intellij.openapi.vcs; import com.intellij.openapi.vcs.history.VcsRevisionNumber; import com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings; import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.Nullable; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.Collection; /** * @author yole * @since 7.0 */ public interface CachingCommittedChangesProvider<T extends CommittedChangeList, U extends ChangeBrowserSettings> extends CommittedChangesProvider<T, U> { /** * Returns the current version of the binary data format that is read/written by the caching provider. * If the format version loaded from the cache stream does not match the format version returned by * the provider, the cache stream is discarded and changes are reloaded from server. * * @return binary format version. */ int getFormatVersion(); void writeChangeList(final DataOutput stream, final T list) throws IOException; T readChangeList(final RepositoryLocation location, final DataInput stream) throws IOException; /** * Returns true if the underlying VCS allows to limit the number of loaded changes. If the VCS does not * support that, filtering by date will be used when initializing history cache. * * @return true if number limit is supported, false otherwise. */ boolean isMaxCountSupported(); /** * Returns the list of files under the specified repository root which may contain incoming changes. * This method is an optional optimization: if null is returned, all files are checked through DiffProvider * in a regular way. * * @param location the location where changes are requested. * @return the files which may contain the changes, or null if the call is not supported. */ @Nullable Collection<FilePath> getIncomingFiles(final RepositoryLocation location) throws VcsException; /** * Returns true if the changelist number restriction should be used when refreshing the cache, * or false if the date restriction should be used. * * @return true if restrict by number, false if restrict by date */ boolean refreshCacheByNumber(); /** * Returns the name of the "changelist" concept in the specified VCS (changelist, revision etc.) * * @return the name of the concept, or null if the VCS (like CVS) does not use changelist numbering. */ @Nullable @Nls String getChangelistTitle(); boolean isChangeLocallyAvailable(FilePath filePath, VcsRevisionNumber localRevision, VcsRevisionNumber changeRevision, T changeList); /** * Returns true if a timer-based refresh of committed changes should be followed by refresh of incoming changes, so that, * for example, changes from the wrong branch would be automatically removed from view. * * @return true if auto-refresh includes incoming changes refresh, false otherwise */ boolean refreshIncomingWithCommitted(); }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ec9c667b6ef37f1e2d05f2221413a8c4340b609b
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.jdt.debug/746.java
10c98a870bc63acc850dc88ae64641ca2e974b5b
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,185
java
/******************************************************************************* * Copyright (c) 2000, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.debug.ui.actions; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.debug.core.model.IDebugElement; import org.eclipse.jdt.debug.core.IJavaVariable; /** * Action to open a type associated with a selected variable. */ public abstract class OpenVariableTypeAction extends OpenTypeAction { /* (non-Javadoc) * @see org.eclipse.jdt.internal.debug.ui.actions.OpenTypeAction#getDebugElement(org.eclipse.core.runtime.IAdaptable) */ @Override protected IDebugElement getDebugElement(IAdaptable element) { return element.getAdapter(IJavaVariable.class); } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
f2806a83d2184345b60f7daeb9d84c310897c8ba
d3034d8c27d96144651827a7b1b5e80daf10fd6a
/amap-data-cp-theater/src/main/java/com/amap/data/save/hotelvp/HotelVpApitransfer.java
458aa1807c3ba4e81279afc19c482c09d8d53c2b
[]
no_license
javaxiaomangren/amap-data-cp
5274b724dca9d95f3c3c55c1fc765ebbfdb583c6
d3924a1765eb1e3d635338962c621fbd60e34223
refs/heads/master
2021-01-10T22:12:44.724500
2014-01-07T09:41:22
2014-01-07T09:41:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
539
java
/** * 2013-5-27 */ package com.amap.data.save.hotelvp; import java.util.ArrayList; import java.util.List; import com.amap.data.base.FieldMap; import com.amap.data.save.ctripwireless.fieldMap.PicsMap; import com.amap.data.save.transfer.Apitransfer; public class HotelVpApitransfer extends Apitransfer { @SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected List<FieldMap> specMap() { List l = new ArrayList<FieldMap>(); l.add(new PicsMap(templet));// 深度图片态息映射 return l; } }
[ "yang.hua@YH-E5430.autonavi.com" ]
yang.hua@YH-E5430.autonavi.com
2f937c1b3a0ba7e5e258f8381aa72156f5f8e10c
f910a84171e04f833a415f5d9bcc36920aa8c9aa
/Core-Business-Library/src/main/java/nybsys/tillboxweb/TillBoxWebModels/DefaultAccountTypeModel.java
9458be194d887afdfa4345fcfe1826dc04d0a78b
[]
no_license
rocky-bgta/Java_Mircoservice_Backend_With_Mosquitto
7ecb35ca05c1d44d5f43668ccd6c5f3bcb40e03b
7528f12ed35560fcd4aba40b613ff09c5032bebf
refs/heads/master
2022-11-17T23:50:42.207381
2020-09-18T13:53:00
2020-09-18T13:53:00
138,392,854
0
1
null
2022-11-16T07:30:17
2018-06-23T10:38:52
Java
UTF-8
Java
false
false
2,029
java
package nybsys.tillboxweb.TillBoxWebModels; import nybsys.tillboxweb.BaseModel; import java.util.Objects; public class DefaultAccountTypeModel extends BaseModel{ private Integer accountTypeID; private Integer accountClassificationID; private String typeName; private Integer code; public Integer getAccountTypeID() { return accountTypeID; } public void setAccountTypeID(Integer accountTypeID) { this.accountTypeID = accountTypeID; } public Integer getAccountClassificationID() { return accountClassificationID; } public void setAccountClassificationID(Integer accountClassificationID) { this.accountClassificationID = accountClassificationID; } public String getTypeName() { return typeName; } public void setTypeName(String typeName) { this.typeName = typeName; } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DefaultAccountTypeModel)) return false; DefaultAccountTypeModel that = (DefaultAccountTypeModel) o; return Objects.equals(getAccountTypeID(), that.getAccountTypeID()) && Objects.equals(getAccountClassificationID(), that.getAccountClassificationID()) && Objects.equals(getTypeName(), that.getTypeName()) && Objects.equals(getCode(), that.getCode()); } @Override public int hashCode() { return Objects.hash(getAccountTypeID(), getAccountClassificationID(), getTypeName(), getCode()); } @Override public String toString() { return "AccountTypeModel{" + "accountTypeID=" + accountTypeID + ", accountClassificationID=" + accountClassificationID + ", typeName='" + typeName + '\'' + ", code=" + code + '}'; } }
[ "rocky.bgta@gmail.com" ]
rocky.bgta@gmail.com
f061dc145298f6dee00d0c2fb0384fb7699d7205
ccc641a610f959bda15360adb58a1775e1e0fd63
/src/main/java/me/paulf/wings/util/SimpleStorage.java
4bad54483df6c29cd37b7596c2441df3278172a8
[ "MIT" ]
permissive
mwootendev/Wings
397fe9538580b9e1d39b81d2a51c4286bd2a8023
44ef71b191ca7af6d9ad31134839e5afc1e6739e
refs/heads/master
2023-03-21T09:29:37.573259
2021-03-24T06:33:40
2021-03-24T06:33:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,299
java
package me.paulf.wings.util; import net.minecraft.nbt.INBT; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; import net.minecraftforge.common.capabilities.Capability; import java.util.function.Consumer; import java.util.function.Function; public final class SimpleStorage<T> implements Capability.IStorage<T> { private final Function<T, CompoundNBT> serializer; private final Consumer<CompoundNBT> deserializer; private SimpleStorage(final Function<T, CompoundNBT> serializer, final Consumer<CompoundNBT> deserializer) { this.serializer = serializer; this.deserializer = deserializer; } @Override public INBT writeNBT(final Capability<T> capability, final T instance, final Direction side) { return this.serializer.apply(instance); } @Override public void readNBT(final Capability<T> capability, final T instance, final Direction side, final INBT tag) { this.deserializer.accept(tag instanceof CompoundNBT ? (CompoundNBT) tag : new CompoundNBT()); } public static <T> SimpleStorage<T> ofVoid() { return new SimpleStorage<>(instance -> null, tag -> {}); } public static <T> SimpleStorage<T> of(final Function<T, CompoundNBT> serializer, final Consumer<CompoundNBT> deserializer) { return new SimpleStorage<>(serializer, deserializer); } }
[ "paul.fulham0@gmail.com" ]
paul.fulham0@gmail.com
2b5155fdaf1bc0476e0a5e814c6dfb1dfbb0deb4
ba883df1628d64d5b5d92f39fa19e73d6d3b1244
/viatra/fr.tpt.mem4csd.mtbench.aadl2aadl.trace/src/aadl2/ProcessType.java
bc83894e90ff01040ac076c4b25f058664eb32f4
[]
no_license
INCMOTRANS-Benchmark/IMTBENCH
d10f3f748095dddb952d0c7f163b5a39fdee8128
14728ddb1e3681c43bed87b2adfe464d1208a1bb
refs/heads/master
2022-11-20T00:21:26.974656
2020-07-21T15:06:48
2020-07-21T15:06:48
281,428,289
0
0
null
null
null
null
UTF-8
Java
false
false
4,885
java
/** */ package aadl2; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Process Type</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * <p>From package AADLDetails::Components::Process.</p> * <!-- end-model-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link aadl2.ProcessType#getOwnedDataPort <em>Owned Data Port</em>}</li> * <li>{@link aadl2.ProcessType#getOwnedEventDataPort <em>Owned Event Data Port</em>}</li> * <li>{@link aadl2.ProcessType#getOwnedEventPort <em>Owned Event Port</em>}</li> * <li>{@link aadl2.ProcessType#getOwnedDataAccess <em>Owned Data Access</em>}</li> * <li>{@link aadl2.ProcessType#getOwnedSubprogramAccess <em>Owned Subprogram Access</em>}</li> * <li>{@link aadl2.ProcessType#getOwnedSubprogramGroupAccess <em>Owned Subprogram Group Access</em>}</li> * </ul> * * @see aadl2.Aadl2Package#getProcessType() * @model * @generated */ public interface ProcessType extends ComponentType, ProcessClassifier { /** * Returns the value of the '<em><b>Owned Data Port</b></em>' containment reference list. * The list contents are of type {@link aadl2.DataPort}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * <p>From package AADLDetails::Components::Process.</p> * <!-- end-model-doc --> * @return the value of the '<em>Owned Data Port</em>' containment reference list. * @see aadl2.Aadl2Package#getProcessType_OwnedDataPort() * @model containment="true" ordered="false" * annotation="subsets" * @generated */ EList<DataPort> getOwnedDataPort(); /** * Returns the value of the '<em><b>Owned Event Data Port</b></em>' containment reference list. * The list contents are of type {@link aadl2.EventDataPort}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * <p>From package AADLDetails::Components::Process.</p> * <!-- end-model-doc --> * @return the value of the '<em>Owned Event Data Port</em>' containment reference list. * @see aadl2.Aadl2Package#getProcessType_OwnedEventDataPort() * @model containment="true" ordered="false" * annotation="subsets" * @generated */ EList<EventDataPort> getOwnedEventDataPort(); /** * Returns the value of the '<em><b>Owned Event Port</b></em>' containment reference list. * The list contents are of type {@link aadl2.EventPort}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * <p>From package AADLDetails::Components::Process.</p> * <!-- end-model-doc --> * @return the value of the '<em>Owned Event Port</em>' containment reference list. * @see aadl2.Aadl2Package#getProcessType_OwnedEventPort() * @model containment="true" ordered="false" * annotation="subsets" * @generated */ EList<EventPort> getOwnedEventPort(); /** * Returns the value of the '<em><b>Owned Data Access</b></em>' containment reference list. * The list contents are of type {@link aadl2.DataAccess}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * <p>From package AADLDetails::Components::Process.</p> * <!-- end-model-doc --> * @return the value of the '<em>Owned Data Access</em>' containment reference list. * @see aadl2.Aadl2Package#getProcessType_OwnedDataAccess() * @model containment="true" ordered="false" * annotation="subsets" * @generated */ EList<DataAccess> getOwnedDataAccess(); /** * Returns the value of the '<em><b>Owned Subprogram Access</b></em>' containment reference list. * The list contents are of type {@link aadl2.SubprogramAccess}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * <p>From package AADLDetails::Components::Process.</p> * <!-- end-model-doc --> * @return the value of the '<em>Owned Subprogram Access</em>' containment reference list. * @see aadl2.Aadl2Package#getProcessType_OwnedSubprogramAccess() * @model containment="true" ordered="false" * annotation="subsets" * @generated */ EList<SubprogramAccess> getOwnedSubprogramAccess(); /** * Returns the value of the '<em><b>Owned Subprogram Group Access</b></em>' containment reference list. * The list contents are of type {@link aadl2.SubprogramGroupAccess}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * <p>From package AADLDetails::Components::Process.</p> * <!-- end-model-doc --> * @return the value of the '<em>Owned Subprogram Group Access</em>' containment reference list. * @see aadl2.Aadl2Package#getProcessType_OwnedSubprogramGroupAccess() * @model containment="true" ordered="false" * annotation="subsets" * @generated */ EList<SubprogramGroupAccess> getOwnedSubprogramGroupAccess(); } // ProcessType
[ "mkaouar.hana@gmail.com" ]
mkaouar.hana@gmail.com
15115ef2b1a5f44f79db385b8a7fc2c8c8e794b6
46df620d2f61fcc2154c206683530530559e2199
/java/jdbc/EjemploDAOsout/src/edu/co/sena/ejemplodao/factory/MunicipioDaoFactory.java
d3fcb21c6392344e0a1cc9faa4599ccc9914ff04
[]
no_license
SENA-CLASS/901540-G1-Trimestres4
bc3e56e252ea088e701fcf90d584087eb826a209
5928bb9ef32c3ccc1a35a13573b6bd59687cd92d
refs/heads/master
2022-12-26T16:24:51.257813
2016-04-12T19:30:36
2016-04-12T19:30:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
732
java
/* * This source file was generated by FireStorm/DAO. * * If you purchase a full license for FireStorm/DAO you can customize this header file. * * For more information please visit http://www.codefutures.com/products/firestorm */ package edu.co.sena.ejemplodao.factory; import java.sql.Connection; import edu.co.sena.ejemplodao.dao.*; import edu.co.sena.ejemplodao.jdbc.*; public class MunicipioDaoFactory { /** * Method 'create' * * @return MunicipioDao */ public static MunicipioDao create() { return new MunicipioDaoImpl(); } /** * Method 'create' * * @param conn * @return MunicipioDao */ public static MunicipioDao create(Connection conn) { return new MunicipioDaoImpl( conn ); } }
[ "hemoreno33@misena.edu.co" ]
hemoreno33@misena.edu.co
4b5282de576ddfe1925b24a3bab8fdbf7e8f43e8
d669e67a5cfd22363b20cc7dc1c56fcb230454ec
/src/davi/mutation/mediana/ODL_12/Mediana.java
7b8b57be0d800f8a4579cf2d6eb5e8661e345aad
[ "Apache-2.0" ]
permissive
DaviSRodrigues/TAIGA
f1fe37583bd5009fa0ee192954d0c5ce5d051ee0
7997a8e4a31a177335178571a443b03f1bf3f2e4
refs/heads/master
2022-04-10T16:11:10.871395
2020-03-09T14:34:04
2020-03-09T14:34:04
101,459,116
0
0
null
null
null
null
UTF-8
Java
false
false
2,133
java
// This is a mutant program. // Author : ysma package davi.mutation.mediana.ODL_12; import java.awt.image.WritableRaster; import java.util.Arrays; import davi.genetic.algorithm.Image; public class Mediana { public static void main( java.lang.String[] args ) throws java.lang.Exception { } public static davi.genetic.algorithm.Image aplicaFiltro( davi.genetic.algorithm.Image img ) { try { int p1; int p2; int p3; int p4; int p5; int p6; int p7; int p8; int p9; int mediana; int altura = img.getHeight(); int largura = img.getWidth(); java.awt.image.WritableRaster raster = img.getBufferedImage().getRaster(); for (int i = 1; i <= altura - 2; i++) { for (int j = 1; j <= largura - 2; j++) { p1 = raster.getSample( j, i, 0 ); p2 = raster.getSample( j, 1, 0 ); p3 = raster.getSample( j + 1, i - 1, 0 ); p4 = raster.getSample( j + 1, i, 0 ); p5 = raster.getSample( j + 1, i + 1, 0 ); p6 = raster.getSample( j, i + 1, 0 ); p7 = raster.getSample( j - 1, i + 1, 0 ); p8 = raster.getSample( j - 1, i, 0 ); p9 = raster.getSample( j - 1, i - 1, 0 ); int[] vizinhanca = { p1, p2, p3, p4, p5, p6, p7, p8, p9 }; Arrays.sort( vizinhanca ); mediana = vizinhanca[vizinhanca.length / 2]; raster.setSample( j, i, 0, mediana ); verificaTimeout(); } verificaTimeout(); } } catch ( java.lang.Exception e ) { return null; } return img; } public static void verificaTimeout() throws java.lang.InterruptedException { if (Thread.currentThread().isInterrupted()) { throw new java.lang.InterruptedException(); } } }
[ "davisilvarodrigues@gmail.com" ]
davisilvarodrigues@gmail.com
a426b218e2fed679893fb83fbb37dae31ecd8c5e
72240256fc4c63e1aed5b86c6880228db63017bf
/src/main/java/com/hx/eplate/plugin/pay/tencent/common/report/service/ReportService.java
f10ca538bee1d71b207e6b4d4c37b3afe978b29c
[]
no_license
AndyYHL/springMMControl
64384bdbe40cc1fa9f48206f4b93af897678fcc7
17a13ddc80d4c1c95e9ce601d91d299eecc14204
refs/heads/master
2021-09-08T10:18:39.836419
2018-03-09T04:25:39
2018-03-09T04:25:39
124,476,530
0
0
null
null
null
null
UTF-8
Java
false
false
2,442
java
package com.hx.eplate.plugin.pay.tencent.common.report.service; import com.hx.eplate.plugin.pay.tencent.common.Configure; import com.hx.eplate.plugin.pay.tencent.common.HttpsRequest; import com.hx.eplate.plugin.pay.tencent.common.Util; import com.hx.eplate.plugin.pay.tencent.common.report.protocol.ReportReqData; import java.io.IOException; import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.UnrecoverableKeyException; import java.text.SimpleDateFormat; import java.util.Date; /** * User: rizenguo * Date: 2014/11/12 * Time: 17:07 */ public class ReportService { private ReportReqData reqData ; /** * 请求统计上报API * @param reportReqData 这个数据对象里面包含了API要求提交的各种数据字段 */ public ReportService(ReportReqData reportReqData){ reqData = reportReqData; } public String request() throws UnrecoverableKeyException, KeyManagementException, NoSuchAlgorithmException, KeyStoreException, IOException { String responseString = new HttpsRequest().sendPost(Configure.REPORT_API, reqData); Util.log(" report返回的数据:" + responseString); return responseString; } /** * 请求统计上报API * @param reportReqData 这个数据对象里面包含了API要求提交的各种数据字段 * @return API返回的数据 * @throws Exception */ public static String request(ReportReqData reportReqData) throws Exception { //-------------------------------------------------------------------- //发送HTTPS的Post请求到API地址 //-------------------------------------------------------------------- String responseString = new HttpsRequest().sendPost(Configure.REPORT_API, reportReqData); Util.log("report返回的数据:" + responseString); return responseString; } /** * 获取time:统计发送时间,格式为yyyyMMddHHmmss,如2009年12 月25 日9 点10 分10 秒表示为20091225091010。时区为GMT+8 beijing。 * @return 订单生成时间 */ private static String getTime(){ //订单生成时间自然就是当前服务器系统时间咯 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); return simpleDateFormat.format(new Date()); } }
[ "love90yhl@hotmail.com" ]
love90yhl@hotmail.com
860f92ea9ddec6696ea21b7c10871790d42d830c
59f9102cbcb7a0ca6ffd6840e717e8648ab2f12a
/jdk6/org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java
a96689c678073cff119eacd98aa983affa26857a
[]
no_license
yuanhua1/ruling_java
77a52b2f9401c5392bf1409fc341ab794c555ee5
7f4b47c9f013c5997f138ddc6e4f916cc7763476
refs/heads/master
2020-08-22T22:50:35.762836
2019-06-24T15:39:54
2019-06-24T15:39:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,259
java
package org.omg.DynamicAny.DynAnyPackage; /** * org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/DynamicAny/DynamicAny.idl * Friday, January 20, 2012 10:38:38 AM GMT-08:00 */ abstract public class TypeMismatchHelper { private static String _id = "IDL:omg.org/DynamicAny/DynAny/TypeMismatch:1.0"; public static void insert (org.omg.CORBA.Any a, org.omg.DynamicAny.DynAnyPackage.TypeMismatch that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static org.omg.DynamicAny.DynAnyPackage.TypeMismatch extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.id (), "TypeMismatch", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static org.omg.DynamicAny.DynAnyPackage.TypeMismatch read (org.omg.CORBA.portable.InputStream istream) { org.omg.DynamicAny.DynAnyPackage.TypeMismatch value = new org.omg.DynamicAny.DynAnyPackage.TypeMismatch (); // read and discard the repository ID istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.DynamicAny.DynAnyPackage.TypeMismatch value) { // write the repository ID ostream.write_string (id ()); } }
[ "massimo.paladin@gmail.com" ]
massimo.paladin@gmail.com
cd4fca4e774c130f39d1ba0d1ae34e0774bf3ad5
b69b6701de0b990f95310952e7108066bad33f1f
/.history/lesson2_20210501105157.java
fec83b9a5e2dc732ba8eb7343481c9b796f6d24c
[]
no_license
deepakadishankar/Practice
909551bf369ed286dfde1b6c8e495bc19dc22d7e
5725cdd6cb55ae5ff1e6b4607692ef364a3dc267
refs/heads/master
2023-07-27T07:26:13.783415
2021-09-14T07:51:18
2021-09-14T07:51:18
352,027,381
1
0
null
null
null
null
UTF-8
Java
false
false
152
java
public class lesson2 { public static void name() { } public static int addition(int num1,int num2) { int ans = num } }
[ "tsanthosh@Santhoshs-MacBook-Pro.local" ]
tsanthosh@Santhoshs-MacBook-Pro.local
fad9847852041e99f43b4ae1530a5f031f94bc8c
352f6ae2cc37cf37adf79e48071581e6082715e8
/src/main/java/com/lam/coder/topCoder/MagicSeries.java
b049b10aaeb9509643a2486d1b69ab6889fbea07
[]
no_license
ludoviko/codeRacing
91380a38a096c023648f315eb73fee30bb1d81f8
253d70779c886092e256f752d8b530acc8894aee
refs/heads/master
2021-01-23T21:01:48.362779
2020-05-02T23:38:58
2020-05-02T23:38:58
40,973,712
0
2
null
null
null
null
UTF-8
Java
false
false
1,810
java
package com.lam.coder.topCoder; /** * * @author Ludoviko Azuaje * * Problem Statement * * Class Name: MagicSeries Method Name: lookup Parameters: int Returns: * int * * Define a magic series of numbers to be the series of non-negative * numbers divisible by 2,3, or 5. The magic series starts with 0, 2, 3, * 4, 5, 6, 8, 9, 10, 12 . . . * * Implement a class MagicSeries that contains a method lookup. lookup * takes an index k as a parameter and returns an int that is the kth * term of this magic series of numbers. 0 is the 1st term of the * series, 2 is the second, etc... * * Here is the method signature: public int lookup(int k); * * k is greater than 0 and less than 1000000. * * Examples: If k=1, the method returns 0. If k=2, the method returns 2. * If k=20, the method returns 26. * * Definition * * Class: MagicSeries Method: lookup Parameters: int Returns: int Method * signature: int lookup(int param0) (be sure your method is public) * * This problem statement is the exclusive and proprietary property of * TopCoder, Inc. Any unauthorized use or reproduction of this * information without the prior written consent of TopCoder, Inc. is * strictly prohibited. (c)2010, TopCoder, Inc. All rights reserved. * * This problem was used for: Single Round Match 11 Round 1 - Division * I, Level One Single Round Match 11 Round 1 - Division II, Level One */ public class MagicSeries { public int lookup(int term) { int i = 0; int k = 0; while (k < term) { if (i % 2 == 0 || i % 3 == 0 || i % 5 == 0) { k++; } i++; } return i - 1; } }
[ "ludovikoazuaje@yahoo.com" ]
ludovikoazuaje@yahoo.com
71c631b61ebbb448b1fcde6eaa822e5a130db9b8
68746d4c45185acabe23275fc4764d2c3f3de7d2
/src/main/java/offer/CountOneInBinaryString.java
ec6f8d8205bb2be9c79586f137748cacfe25a856
[ "MIT" ]
permissive
physicsLoveJava/algorithms-practice-record
8326c13a87e0f2a0dafddb3d1fcb0557fcd7461d
d0ad21214b2e008d81ba07717da3dca062a7071b
refs/heads/master
2022-05-18T11:09:55.951442
2022-04-29T02:00:07
2022-04-29T02:00:07
103,037,650
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package offer; public class CountOneInBinaryString { public static int count(int n) { if(n == 0) { return 0; } if(n < 0) { return count(-n); } int x = 0; while(n > 0) { n = n & (n - 1); x++; } return x; } }
[ "lujian282012@163.com" ]
lujian282012@163.com
ca228c94fe8b4301ff17bbca772a95527e9ed6eb
30166b69d006669c1ea2018270ea20530b5a53d5
/src/main/java/de/muspellheim/datenverteiler/betriebsmeldungen/Betriebsmeldungsverwaltung.java
f92da7cb3ad11de31f108c6e7a8ec37516c3346c
[ "MIT" ]
permissive
falkoschumann/datenverteiler-betriebsmeldungen
346fc7ddfd21b08fa6a57573564e6f2b89bb14c1
fed424bff0a4f57502f51a68f965d4c59a6cc6c5
refs/heads/master
2021-01-10T12:07:47.751740
2015-11-23T21:32:00
2015-11-23T21:32:00
46,240,938
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
/* * Copyright (c) 2015 Falko Schumann * Released under the terms of the MIT License. */ package de.muspellheim.datenverteiler.betriebsmeldungen; /** * Schnittstelle zur Betriebsmeldungsverwaltung. * * @author Falko Schumann * @since 1.0 */ public interface Betriebsmeldungsverwaltung { void sende(Betriebsmeldung betriebsmeldung); }
[ "falko.schumann@muspellheim.de" ]
falko.schumann@muspellheim.de
393e92f6a2726661bedb269c10dbddd5ce402a8a
e51368533b953a1b8db078bc8ccf5f6b95050354
/Eclipse_WS/actitime/src/main/java/com/synechron/bdd/training/actitime/App.java
f9121822e8260186e08980e405e41cc1ab10dfd4
[]
no_license
Ab007007/Cucumber_BDD_15_02
decc63f59990da83a3c90e4d047481d25605a2c1
69fb10d02684e03144195249aee02deff0a9dd42
refs/heads/master
2023-03-08T17:54:34.725615
2021-02-17T10:52:49
2021-02-17T10:52:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
198
java
package com.synechron.bdd.training.actitime; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
[ "aru03.info@gmail.com" ]
aru03.info@gmail.com
7d5b2c60b330d62d16e842bb0856b2985c10812d
b16bf07904756e3d79ce706537aa940cb5c2b432
/SpringBoot-17JPA/src/main/java/gjb/jpa/dao/UserRepositoryByCrudRepository.java
3c2ba1241239b6feabd56173c495bd6ff32f1904
[]
no_license
G631233828/SpringBoot
906462ddcfb206e44ee560940b2dcc66bf757989
14f7f729e7c8489e3232ae2ba10a5bf840e75c32
refs/heads/master
2020-05-17T18:28:14.558074
2019-07-16T06:52:43
2019-07-16T06:52:43
140,913,461
0
0
null
null
null
null
GB18030
Java
false
false
326
java
package gjb.jpa.dao; import org.springframework.data.repository.CrudRepository; import gjb.jpa.pojo.User; /** * * @author fliay * 参数T: 当前需要映射的实体 * 参数ID:当前映射实体中的OID类型 * * * */ public interface UserRepositoryByCrudRepository extends CrudRepository<User, Integer> { }
[ "631233828@qq.com" ]
631233828@qq.com
0433c416a2dfe71990e99eddf553f368f1d9bfb6
dc520dbc6c151bd026cb0483058ada2a9acf6f75
/SP20170705Intercptors2/src/com/study/springmvc/servlet/AllActionServlet.java
4f13adbab80900c1034d9e0b10b955b4c11e83d5
[]
no_license
fendou666/frameBySpring
965b253b252cd75bf1e455b16f616c5a2aa1feff
3a9e458cfb6a8bb17d8a7644379c765471c22050
refs/heads/master
2021-01-21T16:10:14.190480
2017-10-11T10:03:54
2017-10-11T10:03:54
95,399,655
0
0
null
null
null
null
GB18030
Java
false
false
2,346
java
package com.study.springmvc.servlet; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.multiaction.MultiActionController; import com.study.springmvc.bean.User; public class AllActionServlet extends MultiActionController { public ModelAndView login(HttpServletRequest req, HttpServletResponse resp) throws Exception { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("forward:gotoLogin.action"); return modelAndView; } public ModelAndView gotoLogin(HttpServletRequest req, HttpServletResponse resp) throws Exception { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("login"); return modelAndView; } public ModelAndView gotoGetUser(HttpServletRequest req, HttpServletResponse resp) throws Exception { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("success"); return modelAndView; } public ModelAndView getUser(HttpServletRequest req, HttpServletResponse resp) throws Exception { ModelAndView modelAndView = new ModelAndView(); modelAndView.addObject("userList", getUserList(req)); // 默认请求转发 // modelAndView.setViewName("WEB-INF/jsp/success.jsp"); System.out.println("req name:" + req.getParameter("name")); System.out.println("req pwd:" + req.getParameter("pwd")); // 请求转发 //modelAndView.setViewName("forward:/WEB-INF/jsp/success.jsp"); // 重定向, 要求网页不能在web-info目录下 //modelAndView.setViewName("redirect:/WEB-INF/jsp/success.jsp"); // 非web-info下的文件可以访问 //modelAndView.setViewName("redirect:/test.jsp"); // =================不可以直接访问资源文件,只能通过请求action然后进行请求不能网页===== // 上面不可访问资源文件,不过通过内部control转发可以实现请求 modelAndView.setViewName("forward:/gotoGetUser.action"); return modelAndView; } private List<User> getUserList(HttpServletRequest req){ List<User> userList = new ArrayList<User>(); userList.add(new User("小明", "1111")); userList.add(new User("小军", "2222")); userList.add(new User("小红", "3333")); return userList; } }
[ "ls_code@126.com" ]
ls_code@126.com
e1289ec063260bc12267686f21a1f3d103104547
e45f290038946dc567da05ae6491e5a5eae4c2bf
/commons/tools/plugins/org.obeonetwork.tools.requirement/src/org/obeonetwork/tools/requirement/core/impl/RequirementLinkImpl.java
871128fc23345623df2a2fc605d503379e3a1e45
[]
no_license
carsonshan/InformationSystem
e54882507d646fe5c706b248a0ebf56498e4722c
192dd9a6ac71a95d96bf39107790c33450397132
refs/heads/master
2020-03-19T07:20:56.817458
2017-09-26T09:51:13
2017-09-26T12:35:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,284
java
/** * */ package org.obeonetwork.tools.requirement.core.impl; import org.eclipse.emf.ecore.EObject; import org.obeonetwork.dsl.requirement.Requirement; import org.obeonetwork.tools.requirement.core.RequirementLink; /** * @author <a href="goulwen.lefur@obeo.fr">Goulwen Le Fur</a> * */ public class RequirementLinkImpl implements RequirementLink { private Requirement requirement; protected EObject source; /** * @param source */ public RequirementLinkImpl(Requirement requirement, EObject source) { this.requirement = requirement; this.source = source; } /** * {@inheritDoc} * @see org.obeonetwork.tools.linker.EObjectLink#getType() */ public String getType() { return RequirementLinkType.REQUIREMENT_LINK_TYPE; } /** * {@inheritDoc} * @see org.obeonetwork.tools.linker.EObjectLink#getSource() */ public EObject getSource() { return source; } /** * {@inheritDoc} * @see org.obeonetwork.tools.linker.EObjectLink#delete() */ public void delete() { // TODO Auto-generated method stub } /** * {@inheritDoc} * @see org.obeonetwork.tools.requirement.core.RequirementLink#getRequirement() */ public Requirement getRequirement() { return requirement; } }
[ "mathieu.cartaud@obeo.fr" ]
mathieu.cartaud@obeo.fr
565733ec496f23cd095e5cb89a18244f7f1b07bd
5d070f3bccd54cddb3259102f2019443298126db
/com/applovin/impl/sdk/ce.java
1c6777d3b571fb59a16f34fe1d47ed4eac0b3773
[]
no_license
ajayscariya/Touch2Kill-files
683e5d002df2d23b084ab5b0786762e14f038ba0
7660e584c5b7f743a1535b75476d1c0ef050dc7e
refs/heads/master
2020-04-10T19:06:11.795665
2016-09-14T17:19:20
2016-09-14T17:19:20
68,216,032
0
0
null
null
null
null
UTF-8
Java
false
false
5,179
java
package com.applovin.impl.sdk; import android.content.SharedPreferences; import android.preference.PreferenceManager; import com.applovin.sdk.AppLovinSdk; import com.applovin.sdk.AppLovinSdkUtils; import java.util.Collection; import java.util.Locale; import java.util.Map; import mf.org.apache.xerces.impl.Constants; import org.json.JSONArray; import org.json.JSONObject; class ce extends bw { ce(AppLovinSdkImpl appLovinSdkImpl) { super("SubmitData", appLovinSdkImpl); } private static JSONArray m4200a(Collection collection) { JSONArray jSONArray = new JSONArray(); for (C0244u c0244u : collection) { JSONObject jSONObject = new JSONObject(); jSONObject.put("package_name", c0244u.f349c); jSONObject.put("created_at_sec", c0244u.f350d / 1000); jSONArray.put(jSONObject); } return jSONArray; } void m4201a(JSONObject jSONObject) { try { JSONObject a = C0240q.m272a(jSONObject); ca settingsManager = this.f.getSettingsManager(); settingsManager.m170a(bx.f260c, a.getString("device_id")); settingsManager.m170a(bx.f262e, a.getString("device_token")); settingsManager.m170a(bx.f261d, a.getString("publisher_id")); settingsManager.m173b(); C0240q.m274a(a, this.f); if (a.has("adserver_parameters")) { settingsManager.m170a(bx.f276s, a.getJSONObject("adserver_parameters").toString()); } } catch (Throwable e) { this.g.m308e(this.e, "Unable to parse API response", e); } } void m4202b(JSONObject jSONObject) { C0241r dataCollector = this.f.getDataCollector(); C0244u b = dataCollector.m281b(); C0245v a = dataCollector.m279a(); JSONObject jSONObject2 = new JSONObject(); jSONObject2.put("model", a.f351a); jSONObject2.put("os", a.f352b); jSONObject2.put("brand", a.f353c); jSONObject2.put("sdk_version", a.f355e); jSONObject2.put("revision", a.f354d); jSONObject2.put("country_code", a.f356f); jSONObject2.put("carrier", a.f357g); jSONObject2.put("wvvc", a.f359i); jSONObject2.put("type", "android"); C0243t c = dataCollector.m282c(); String str = c.f346b; boolean z = c.f345a; if ((!z || ((Boolean) this.f.getSettingsManager().m169a(bx.aT)).booleanValue()) && AppLovinSdkUtils.isValidString(str)) { jSONObject2.put("idfa", str); } jSONObject2.put("dnt", z); Locale locale = a.f358h; if (locale != null) { jSONObject2.put(Constants.LOCALE_PROPERTY, locale.toString()); } jSONObject.put("device_info", jSONObject2); JSONObject jSONObject3 = new JSONObject(); jSONObject3.put("package_name", b.f349c); jSONObject3.put("app_name", b.f347a); jSONObject3.put("app_version", b.f348b); jSONObject3.put("installed_at", b.f350d); jSONObject3.put("applovin_sdk_version", AppLovinSdk.VERSION); jSONObject3.put("ic", this.f.isInitializedInMainActivity()); SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this.h); String string = defaultSharedPreferences.getString("com.applovin.sdk.impl.isFirstRun", null); if (AppLovinSdkUtils.isValidString(string)) { jSONObject3.put("first_install", string); if (string.equalsIgnoreCase(Boolean.toString(true))) { defaultSharedPreferences.edit().putString("com.applovin.sdk.impl.isFirstRun", Boolean.toString(false)).apply(); } } String str2 = (String) this.f.m4161a(bx.f283z); if (str2 != null && str2.length() > 0) { jSONObject3.put("plugin_version", str2); } jSONObject.put("app_info", jSONObject3); if (((Boolean) this.f.m4161a(bx.f237F)).booleanValue()) { Map a2 = ((C1179m) this.f.getTargetingData()).m4305a(); if (!(a2 == null || a2.isEmpty())) { jSONObject.put("targeting", ay.m100a(a2)); } jSONObject.put("stats", this.f.m4163b().m219b()); } } Collection m4203c() { return ((Boolean) this.f.m4161a(bx.aS)).booleanValue() ? this.f.getDataCollector().m283d() : null; } void m4204c(JSONObject jSONObject) { cy cfVar = new cf(this, "Repeat" + this.e, bx.f263f, this.f, jSONObject); cfVar.m4269a(bx.f267j); cfVar.run(); } public void run() { try { this.g.m309i(this.e, "Submitting user data..."); JSONObject jSONObject = new JSONObject(); m4202b(jSONObject); if (((Boolean) this.f.m4161a(bx.aS)).booleanValue()) { Collection c = m4203c(); if (c != null) { jSONObject.put("vx", m4200a(c)); } } m4204c(jSONObject); } catch (Throwable e) { this.g.m308e(this.e, "Unable to build JSON message with collected data", e); } } }
[ "arjunwarrier2000@gmail.com" ]
arjunwarrier2000@gmail.com
d105dd48ac06b116bc9f5686eba3ab6366b2b7c2
49dab7bbffcebe53329e1aee76c230d2396babf2
/server/OS/net/violet/platform/api/actions/APIController.java
f3fb7351c7763bc2a655fb85636eae8531f059a5
[ "MIT" ]
permissive
bxbxbx/nabaztag-source-code
42870b0e91cf794728a20378e706c338ecedb7ba
65197ea668e40fadb35d8ebd0aeb512311f9f547
refs/heads/master
2021-05-29T07:06:19.794006
2015-08-06T16:08:30
2015-08-06T16:08:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,954
java
package net.violet.platform.api.actions; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.violet.platform.api.exceptions.APIErrorMessage; import net.violet.platform.api.exceptions.APIException; import net.violet.platform.api.exceptions.InvalidParameterException; import org.apache.commons.lang.StringUtils; /** * @author christophe - Violet */ public class APIController { // the internal cache of resolved actions instances private static final Map<String, Action> actionMap = new WeakHashMap<String, Action>(); /** * List of objects used as mutex held by threads creating an {@link Action} for an actionKey */ private static final Map<String, Object> RUNNING_THREAD = new HashMap<String, Object>(); private static final Lock LOCK_THREADS = new ReentrantLock(); private static final Pattern ROOT_REGEX = Pattern.compile("^(\\w+)\\.(\\w+)\\.(\\w+)$"); // name of the package (root directory) where all the API actions // implementations reside private static final Map<String, String> PACKAGE_ROOTS = Collections.singletonMap("violet", "net.violet.platform.api.actions."); /** * @param actionKey * @return * @throws InvalidParameterException * @throws APIException */ public static Action getAction(String actionKey) throws InvalidParameterException { // Try to get the action instance from the cache.. Action action = APIController.actionMap.get(actionKey); // It exists we return it. if (action != null) { return action; } // It does not exist we might have to create. // Does anyone else run to create it? Object theMutex = APIController.RUNNING_THREAD.get(actionKey); if (theMutex == null) { // If not we might be the one to do it. Thus we create our mutex. theMutex = new Object(); } while (true) { //ugly but necessary (so far) // We lock on our mutex. synchronized (theMutex) { // Double check that while we were waiting for the lock no one actually did the job for us. action = APIController.actionMap.get(actionKey); if (action != null) { // yay! Nothing to do for us! return action; } // We lock the whole shebang APIController.LOCK_THREADS.lock(); // Check is no one if create its own mutex for my actionKey... if (!APIController.RUNNING_THREAD.containsKey(actionKey)) { // We tell everybody that we are dealing with the creation. APIController.RUNNING_THREAD.put(actionKey, theMutex); // Release the lock so the rest of the scum can use our work. APIController.LOCK_THREADS.unlock(); final Matcher theMatcher = APIController.ROOT_REGEX.matcher(actionKey); if (theMatcher.matches()) { final String theRoot = APIController.PACKAGE_ROOTS.get(theMatcher.group(1)); if (theRoot == null) { //must release running thread especially when an exception appears APIController.removeRunningThread(actionKey); throw new InvalidParameterException(APIErrorMessage.MISSING_PARAMETER, actionKey); } final String className = theRoot + theMatcher.group(2) + "." + StringUtils.capitalize(theMatcher.group(3)); try { final Class actionClass = Class.forName(className); action = (Action) actionClass.newInstance(); // .. and add it to the cache.. APIController.actionMap.put(actionKey, action); } catch (final ClassNotFoundException e) { throw new InvalidParameterException(APIErrorMessage.INVALID_PARAMETER_BECAUSE, "className", className); } catch (final InstantiationException e) { throw new InvalidParameterException(APIErrorMessage.NO_SUCH_METHOD, net.violet.common.StringShop.EMPTY_STRING); } catch (final IllegalAccessException e) { throw new InvalidParameterException(APIErrorMessage.NO_SUCH_METHOD, net.violet.common.StringShop.EMPTY_STRING); } finally { //must release running thread especially when an exception appears APIController.removeRunningThread(actionKey); } } else { //must release running thread especially when an exception appears APIController.removeRunningThread(actionKey); throw new InvalidParameterException(APIErrorMessage.NO_SUCH_METHOD, net.violet.common.StringShop.EMPTY_STRING); } // We leave our deed is done. return action; } // .. if it did I need to get the good stuff and wait for it to be finished. theMutex = APIController.RUNNING_THREAD.get(actionKey); APIController.LOCK_THREADS.unlock(); } } } private static void removeRunningThread(String inActionKey) { // Relock to remove ourselves from the running mutex. APIController.LOCK_THREADS.lock(); APIController.RUNNING_THREAD.remove(inActionKey); APIController.LOCK_THREADS.unlock(); } }
[ "sebastien@yoozio.com" ]
sebastien@yoozio.com
bcf0474932b25ccf3a8e8e917081d826227077f9
26a287fbeb3b523f095fab4749312bc934326a6c
/guoren-market-dao/src/main/java/com/gop/mapper/UserLockPositionOperDetailMapper.java
59de3fa1a4c1e979eb40f6932dadcd10c32e9ddd
[]
no_license
HuangTianJie/Tonney
9f42cbf97a3cd046d7b2fa1c509865cd25266108
bb5e08dd752b1d7434736abaa72c7dddb086300b
refs/heads/master
2020-03-22T15:20:45.300456
2018-12-27T10:02:51
2018-12-27T10:02:51
140,245,519
4
4
null
null
null
null
UTF-8
Java
false
false
870
java
package com.gop.mapper; import com.gop.domain.UserLockPositionOperDetail; import org.apache.ibatis.annotations.Param; import java.util.List; public interface UserLockPositionOperDetailMapper { int insert(UserLockPositionOperDetail record); int insertSelective(UserLockPositionOperDetail record); UserLockPositionOperDetail selectByPrimaryKey(Integer id); int updateByPrimaryKeySelective(UserLockPositionOperDetail record); int updateByPrimaryKey(UserLockPositionOperDetail record); List<UserLockPositionOperDetail> getUserOperationList(@Param("uid") Integer userId, @Param("assetCode") String assetCode, @Param("start") Integer start, @Param("pageSize") Integer pageSize); Integer countUserOperation(@Param("uid") Integer userId); int addUserLockPositionOperDetail(UserLockPositionOperDetail userLockPositionOperDetail); }
[ "tianjie.huang@mbasechain.com" ]
tianjie.huang@mbasechain.com
f1e8b3f4acb935268060854e600e1ecf1c118b24
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-M1/core/src/main/java/org/mule/config/spring/parsers/specific/ThreadingProfileDefinitionParser.java
ae05d3839c94dceb52268964681c6b16247495b1
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
2,736
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.config.spring.parsers.specific; import org.mule.config.MuleProperties; import org.mule.config.ThreadingProfile; import org.mule.config.spring.parsers.AbstractChildDefinitionParser; import org.w3c.dom.Element; /** * This parser is responsible for processing the <code><threading-profile><code> configuration elements. */ public class ThreadingProfileDefinitionParser extends AbstractChildDefinitionParser { public ThreadingProfileDefinitionParser() { addAlias("poolExhaustedAction", "poolExhaustedActionString"); } protected Class getBeanClass(Element element) { return ThreadingProfile.class; } protected String getParentBeanName(Element element) { //The mule:configuration element is a fixed name element so we need to handle the //special case here if("configuration".equals(element.getParentNode().getLocalName())) { return MuleProperties.OBJECT_MULE_CONFIGURATION; } else { return super.getParentBeanName(element); } } public String getPropertyName(Element e) { String name = e.getLocalName(); if ("receiver-threading-profile".equals(name)) { return "receiverThreadingProfile"; } else if ("dispatcher-threading-profile".equals(name)) { return "dispatcherThreadingProfile"; } else if (name.equals("default-threading-profile")) { //If this is one of the default profiles they should just be made available in the contianer // and retrieved via the Registry return "defaultThreadingProfile"; } else if ("default-receiver-threading-profile".equals(name)) { return "defaultReceiverThreadingProfile"; } else if ("default-dispatcher-threading-profile".equals(name)) { return "defaultDispatcherThreadingProfile"; } else if ("default-threading-profile".equals(name)) { //If this is one of the default profiles they should just be made available in the contianer // and retrieved via the Registry return "defaultThreadingProfile"; } else { return "threadingProfile"; } } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
6c7eb01682aab59ebfd4da7b85312e0650e80bc0
2bd58561d4b4511300fa00e9c0ddfe2d5c18bef1
/Service Composition Framework/org.activiti.designer.model.aniketosBPMN/src/org/eclipse/bpmn2/InclusiveGateway.java
c9bedcadd29305312024b4a449cf77de31f87528
[]
no_license
AniketosEU/Secure-Service-Specification-and-Deployment
3166c306ffaa8f4832fddcc54d695b816af039c4
447c9267bd03f09b3fe240b5ba00a058af5569df
refs/heads/master
2021-01-20T06:27:52.464067
2014-06-05T09:34:21
2014-06-05T09:34:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,158
java
/******************************************************************************* * Copyright (c) 2012, Project: FP7-ICT-257930 Aniketos * 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 institution 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 org.eclipse.bpmn2; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Inclusive Gateway</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.eclipse.bpmn2.InclusiveGateway#getDefault <em>Default</em>}</li> * </ul> * </p> * * @see org.eclipse.bpmn2.Bpmn2Package#getInclusiveGateway() * @model extendedMetaData="name='tInclusiveGateway' kind='elementOnly'" * @generated */ public interface InclusiveGateway extends Gateway { /** * Returns the value of the '<em><b>Default</b></em>' reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Default</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Default</em>' reference. * @see #setDefault(SequenceFlow) * @see org.eclipse.bpmn2.Bpmn2Package#getInclusiveGateway_Default() * @model resolveProxies="false" ordered="false" * extendedMetaData="kind='attribute' name='default'" * @generated */ SequenceFlow getDefault(); /** * Sets the value of the '{@link org.eclipse.bpmn2.InclusiveGateway#getDefault <em>Default</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Default</em>' reference. * @see #getDefault() * @generated */ void setDefault(SequenceFlow value); } // InclusiveGateway
[ "francesco.malmignati@guests.selex-es.com" ]
francesco.malmignati@guests.selex-es.com
9871af9360a934c0ade3ef14d9ba5a5a8e0ff53c
74a525c7d924fad7c95bf86104f90fe5a4219e51
/src/day14_classworks/DiscountCalculator.java
836a288462fdb826df342976b02939524e8fb521
[]
no_license
Vladmon30/com.JavaChicago
5a0ea7d486480519a7941c3cb29415b7d9ffbfbd
d7a2628abc46b5c794cb89369561430220947a5c
refs/heads/master
2021-01-03T00:55:12.573745
2020-02-11T19:24:41
2020-02-11T19:24:41
239,845,625
0
0
null
null
null
null
UTF-8
Java
false
false
1,024
java
package day14_classworks; import java.util.Scanner; public class DiscountCalculator { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter Price:"); int price = scan.nextInt(); System.out.println("Enter Quantity:"); int quantity = scan.nextInt(); System.out.println("Total: " + price * quantity); if (quantity >= 100 && quantity <=120) { System.out.println("Discount 10%"); System.out.println("Your discount: $"+ ((price*quantity)*0.1)); System.out.println("Price with discount: $"+ ((price*quantity)-((price*quantity)*0.1))); }else if (quantity > 120 ) { System.out.println("Discount 15%"); System.out.println("Your with discount: $"+ ((price*quantity)*0.15)); System.out.println("Price with discount: $"+ ((price*quantity)-((price*quantity)*0.15))); }else if (quantity < 100 ) { System.out.println("Discount 0%"); System.out.println("Total Price without discount: $"+ (price*quantity)); } } }
[ "vladmonqa35@gmail.com" ]
vladmonqa35@gmail.com
cbc4a5a1c15bedba7aee919bb501f6fb0ee09b3e
5b89acddd55d942b87f217fc03f98de3ed24004e
/innodev-pdp-core/src/test/java/cn/com/innodev/pdp/sms/SMSTest.java
e2a6d0aef0816cdcf28ab0398a2ce939f3d5e73a
[]
no_license
soltex/pdp
5acd4a79c222fa2302f92138d05ac3bb6bb55e48
10d39984c51ad2cb9d85251b43d7d4fc6c32e423
refs/heads/master
2021-01-25T08:55:18.856224
2014-11-24T07:16:30
2014-11-24T07:16:30
26,630,100
1
2
null
null
null
null
UTF-8
Java
false
false
1,640
java
/** * */ package cn.com.innodev.pdp.sms; import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import cn.com.innodev.pdp.framework.sms.SMS; import cn.com.innodev.pdp.framework.sms.SMSCreator; /** * * @author shipeng */ @ContextConfiguration(locations = { "classpath*:/core-application-context.xml", "classpath*:META-INF/*-application-context-module.xml" } ) @RunWith(SpringJUnit4ClassRunner.class) public class SMSTest { @Test public void testSendSMS() { ExecutorService executorService = Executors.newFixedThreadPool(10); for (int i=0;i<30;i++) { executorService.submit(new Callable<Boolean>() { @Override public Boolean call() throws Exception { System.out.println("短信发送"); SMSCreator.getInstance().createSMS("13426173105", "呵呵呵呵呵_" + UUID.randomUUID().toString()).send(true); return null; } }); } try { TimeUnit.SECONDS.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } } @Test public void testSendSingleSMS() { SMS sms = SMSCreator.getInstance().createSMS("13426173105", "你好啊,呵呵呵呵呵"); sms.send(true); try { TimeUnit.SECONDS.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } } }
[ "shipengpipi@126.com" ]
shipengpipi@126.com
4bd35d78548515cfa23d316237a33c3f5984c738
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_bcab549475d99b015ee1300cb0e76eaa1a108d90/GoogleSpreadsheetWorker/3_bcab549475d99b015ee1300cb0e76eaa1a108d90_GoogleSpreadsheetWorker_s.java
8677156a94606f80111ec1deffe5a0553f80b5a2
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,266
java
package com.lavida.service.remote.google; import com.google.gdata.client.spreadsheet.CellQuery; import com.google.gdata.client.spreadsheet.FeedURLFactory; import com.google.gdata.client.spreadsheet.SpreadsheetService; import com.google.gdata.data.Link; import com.google.gdata.data.spreadsheet.*; import com.google.gdata.util.AuthenticationException; import com.google.gdata.util.ServiceException; import com.lavida.service.settings.Settings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.net.URL; import java.util.List; /** * GoogleSpreadsheetWorker * Created: 22:15 15.08.13 * * @author Pavel */ public class GoogleSpreadsheetWorker { private static final Logger logger = LoggerFactory.getLogger(GoogleSpreadsheetWorker.class); private static final String APPLICATION_NAME = "LA VIDA Finance."; private SpreadsheetService spreadsheetService = new SpreadsheetService(APPLICATION_NAME); private URL articleWorksheetUrl; private WorksheetEntry articleWorksheetEntry; private WorksheetEntry discountCardsWorksheetEntry; private URL discountCardsWorksheetUrl; public GoogleSpreadsheetWorker(Settings settings) throws ServiceException, IOException { loginToGmail(spreadsheetService, settings.getRemoteUser(), settings.getRemotePass()); List spreadsheets = getSpreadsheetList(spreadsheetService); SpreadsheetEntry articleSpreadsheet = getSpreadsheetByName(spreadsheets, settings.getSpreadsheetName()); articleWorksheetEntry = articleSpreadsheet.getWorksheets().get(settings.getWorksheetNumber()); articleWorksheetUrl = getWorksheetUrl(articleSpreadsheet, settings.getWorksheetNumber()); SpreadsheetEntry discountCardsSpreadsheet = getSpreadsheetByName(spreadsheets, settings.getDiscountSpreadsheetName()); discountCardsWorksheetEntry = articleSpreadsheet.getWorksheets().get(settings.getDiscountWorksheetNumber()); discountCardsWorksheetUrl = getWorksheetUrl(discountCardsSpreadsheet, settings.getDiscountWorksheetNumber()); } public CellFeed getArticleWholeDocument() throws IOException, ServiceException { return spreadsheetService.getFeed(articleWorksheetUrl, CellFeed.class); } public CellFeed getDiscountCardsWholeDocument() throws IOException, ServiceException { return spreadsheetService.getFeed(discountCardsWorksheetUrl, CellFeed.class); } public CellFeed getArticleCellsInRange(Integer minRow, Integer maxRow, Integer minCol, Integer maxCol) throws IOException, ServiceException { CellQuery query = new CellQuery(articleWorksheetUrl); query.setMinimumRow(minRow); query.setMaximumRow(maxRow); query.setMinimumCol(minCol); query.setMaximumCol(maxCol); return spreadsheetService.query(query, CellFeed.class); } public CellFeed getDiscountCardsCellsInRange(Integer minRow, Integer maxRow, Integer minCol, Integer maxCol) throws IOException, ServiceException { CellQuery query = new CellQuery(discountCardsWorksheetUrl); query.setMinimumRow(minRow); query.setMaximumRow(maxRow); query.setMinimumCol(minCol); query.setMaximumCol(maxCol); return spreadsheetService.query(query, CellFeed.class); } public void saveOrUpdateArticleCells(List<CellEntry> cellEntries) throws IOException, ServiceException { for (CellEntry cellEntry : cellEntries) { spreadsheetService.insert(articleWorksheetUrl, cellEntry); } } public void saveOrUpdateDiscountCardsCells(List<CellEntry> cellEntries) throws IOException, ServiceException { for (CellEntry cellEntry : cellEntries) { spreadsheetService.insert(discountCardsWorksheetUrl, cellEntry); } } // public void deleteCells(List<CellEntry> cellEntries) throws IOException, ServiceException { // for (CellEntry cellEntry :cellEntries) { // Link link = cellEntry.getEditLink(); // URL url = new URL(link.getHref()); // String eTag = link.getEtag(); // spreadsheetService.delete(url, eTag); // } // } public CellFeed getArticleRow(int row) throws IOException, ServiceException { return getArticleCellsInRange(row, row, null, null); } public CellFeed getDiscountCardsRow(int row) throws IOException, ServiceException { return getDiscountCardsCellsInRange(row, row, null, null); } private void loginToGmail(SpreadsheetService spreadsheetService, String username, String password) throws AuthenticationException { spreadsheetService.setUserCredentials(username, password); } private List getSpreadsheetList(SpreadsheetService spreadsheetService) throws IOException, ServiceException { FeedURLFactory factory = FeedURLFactory.getDefault(); SpreadsheetFeed feed = spreadsheetService.getFeed(factory.getSpreadsheetsFeedUrl(), SpreadsheetFeed.class); return feed.getEntries(); } private SpreadsheetEntry getSpreadsheetByName(List spreadsheets, String spreadsheetName) { for (Object spreadsheetObject : spreadsheets) { if (spreadsheetObject instanceof SpreadsheetEntry) { SpreadsheetEntry spreadsheet = (SpreadsheetEntry) spreadsheetObject; String sheetTitle = spreadsheet.getTitle().getPlainText(); if (sheetTitle != null && sheetTitle.trim().equals(spreadsheetName.trim())) { return spreadsheet; } } else { logger.warn("Found spreadsheet which is not SpreadsheetEntry instance: " + spreadsheetObject); } } throw new RuntimeException("No spreadsheet found with name"); // todo change exception } private URL getWorksheetUrl(SpreadsheetEntry spreadsheet, int worksheetNumber) throws IOException, ServiceException { return spreadsheet.getWorksheets().get(worksheetNumber).getCellFeedUrl(); } /** * Adds a row to the worksheet. * @return the number of the added row. * @throws IOException if Connection error occurs when extending worksheet . * @throws ServiceException if Service error occurs when extending worksheet . */ public int addArticleRow() throws IOException, ServiceException { int rowCount = articleWorksheetEntry.getRowCount(); articleWorksheetEntry.setRowCount(++rowCount); articleWorksheetEntry.update(); return rowCount; } /** * Adds a row to the worksheet. * @return the number of the added row. * @throws IOException if Connection error occurs when extending worksheet . * @throws ServiceException if Service error occurs when extending worksheet . */ public int addDiscountCardsRow() throws IOException, ServiceException { int rowCount = discountCardsWorksheetEntry.getRowCount(); discountCardsWorksheetEntry.setRowCount(++rowCount); discountCardsWorksheetEntry.update(); return rowCount; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c4008effaa9689b8fddb6313ccc589fdb16f91a1
e2c9b4f115e343bb7fe67de9cc186ba7bdfd8fe8
/webconsole/src/io/skysail/webconsole/server/handler/ServiceListenerHandler.java
843d2d1af97db5914aeda798076351e856e4777e
[ "Apache-2.0" ]
permissive
evandor/skysail-webconsole
523d9ffe88bfe3af9d08375c519465a2e4464470
0a9a56a7ba665c673ccfb21d06ab7cfd34743515
refs/heads/master
2021-01-16T23:52:23.312977
2018-01-13T10:04:12
2018-01-13T10:04:12
59,468,470
6
2
null
2016-09-28T10:02:28
2016-05-23T09:10:43
JavaScript
UTF-8
Java
false
false
684
java
package io.skysail.webconsole.server.handler; import com.fasterxml.jackson.core.JsonProcessingException; import fi.iki.elonen.NanoHTTPD.IHTTPSession; import io.skysail.webconsole.listener.AgentServiceListener; public class ServiceListenerHandler extends AbstractHttpHandler { private AgentServiceListener serviceListener; public ServiceListenerHandler(AgentServiceListener serviceListener, String basicAuth) { super(basicAuth); this.serviceListener = serviceListener; } @Override String getResponse(IHTTPSession session) throws JsonProcessingException { return mapper.writeValueAsString(serviceListener.getServiceEvents()); } }
[ "evandor@gmail.com" ]
evandor@gmail.com
bdeafeb1035485468bb4a90fda655925a666ad7c
e3fe97bd2a2cbc0a04f475c99384762ff38a4dac
/app/src/main/java/com/hninstrument/State/LockState/State_Unlock.java
914faf9a538f90ec59c879696b95a82e91e915f7
[]
no_license
goalgate/HNInstrument
649754846394f1b4da7c0bdb48f91b14b5b7fbf5
99b658f03040aab97d0d952e28f17bdabec1bc28
refs/heads/master
2021-06-08T07:58:42.097395
2020-08-18T00:57:56
2020-08-18T00:57:56
112,732,488
0
1
null
null
null
null
UTF-8
Java
false
false
794
java
package com.hninstrument.State.LockState; import com.hninstrument.AppInit; import com.hninstrument.Config.HeBeiDanNing_Config; import com.hninstrument.Config.HuBeiWeiHua_Config; import com.hninstrument.Function.Func_Switch.mvp.presenter.SwitchPresenter; /** * Created by zbsz on 2017/9/28. */ public class State_Unlock extends LockState { public boolean alarming; SwitchPresenter sp; public State_Unlock(SwitchPresenter sp) { this.sp = sp; } @Override public void onHandle(Lock lock) { if(!AppInit.getInstrumentConfig().getClass().getName().equals(HeBeiDanNing_Config.class.getName())){ sp.OutD9(false); alarming = false; } } @Override public boolean isAlarming() { return alarming; } }
[ "522508134@qq.com" ]
522508134@qq.com
72fb93e7962d567d74f56a2da51553112199eebd
cc0b13dbf22524e20877fc550892ab11fe040f07
/app/src/main/java/com/iqianbang/fanpai/fragment/youxiangouFragment/YouXianGouUnuseableFragment.java
2c0caebec8d5598e15d4d1cab4f07e10854ce2c6
[]
no_license
martinwen/new_branch_zhaizhuan
9b311aed460f573b4276f473560b36258de0759d
d54ccd23cca7ef371e12886389e7c9c1078485d4
refs/heads/master
2020-04-26T15:59:49.693169
2019-03-04T03:32:06
2019-03-04T03:32:06
173,664,337
0
0
null
null
null
null
UTF-8
Java
false
false
5,684
java
package com.iqianbang.fanpai.fragment.youxiangouFragment; import android.text.TextUtils; import android.view.View; import android.widget.ListView; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.android.volley.VolleyError; import com.handmark.pulltorefresh.library.PullToRefreshBase; import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode; import com.handmark.pulltorefresh.library.PullToRefreshBase.OnRefreshListener; import com.handmark.pulltorefresh.library.PullToRefreshListView; import com.iqianbang.fanpai.R; import com.iqianbang.fanpai.adapter.youxiangou.YouXianGouUnuseableAdapter; import com.iqianbang.fanpai.bean.YouXianGouBean; import com.iqianbang.fanpai.fragment.BaseFragment; import com.iqianbang.fanpai.sign.SignUtil; import com.iqianbang.fanpai.sign.SortRequestData; import com.iqianbang.fanpai.utils.CacheUtils; import com.iqianbang.fanpai.utils.ConstantUtils; import com.iqianbang.fanpai.utils.LogUtils; import com.iqianbang.fanpai.utils.StringUtils; import com.iqianbang.fanpai.utils.ToastUtils; import com.iqianbang.fanpai.view.dialog.CustomProgressDialog; import com.iqianbang.fanpai.volley.HttpBackBaseListener; import com.iqianbang.fanpai.volley.VolleyUtil; import java.util.ArrayList; import java.util.Map; public class YouXianGouUnuseableFragment extends BaseFragment { private PullToRefreshListView refreshListView; private ListView listView; private CustomProgressDialog progressdialog; private ArrayList<YouXianGouBean> list = new ArrayList<YouXianGouBean>(); private YouXianGouUnuseableAdapter adapter; private int pagenum=1; private int pagesize=20; private int pages; private String code; @Override protected View initView() { progressdialog = new CustomProgressDialog(mActivity, "正在获取数据..."); View view = View.inflate(mActivity, R.layout.fragment_hongbao_used, null); refreshListView = (PullToRefreshListView) view.findViewById(R.id.pull_refresh_list); // 1.设置刷新模式,上拉和下拉刷新都有 refreshListView.setMode(Mode.PULL_FROM_END); // 2.设置刷新监听器 refreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() { // 下拉刷新和加载更多都会走这个方法 @Override public void onRefresh(PullToRefreshBase<ListView> refreshView) { // 直接请求 pagenum++; if(pagenum>pages){ refreshListView.setMode(Mode.DISABLED); } getDataFromServer(); } }); // 3.获取refreshableView,其实就是ListView listView = refreshListView.getRefreshableView(); listView.setSelector(android.R.color.transparent); // 5.设置adapter adapter=new YouXianGouUnuseableAdapter(mActivity, list); listView.setAdapter(adapter); return view; } @Override public void initData() { // 访问网络 if (refreshListView.getMode()!= Mode.DISABLED) { //当切换到此页时会走initdata方法,会导致数据重复添加而显示,所以需要清除数据,又因为当下拉后pagenum自增,请求第二页数据,数据为空, //这时不能把之前的list清除掉,所以才这样判断 list.clear(); pagenum = 1; } getDataFromServer(); } private void getDataFromServer() { progressdialog.show(); Map<String, String> map = SortRequestData.getmap(); String token = CacheUtils.getString("token", ""); // 如果没有登录,直接return,不访问网络了 if (TextUtils.isEmpty(token)) { return; } map.put("status", 2+""); map.put("activityCode", code); map.put("pageNum", pagenum+""); map.put("pageSize", pagesize+""); map.put("token", token); String requestData = SortRequestData.sortString(map); String signData = SignUtil.sign(requestData); map.put("sign", signData); VolleyUtil.sendJsonRequestByPost(ConstantUtils.PREFERTICKET_URL, null, map, new HttpBackBaseListener() { @Override public void onSuccess(String string) { LogUtils.i("优先购已失效==="+string); refreshListView.onRefreshComplete(); // TODO Auto-generated method stub progressdialog.dismiss(); JSONObject json = JSON.parseObject(string); String code = json.getString("code"); if ("0".equals(code)) { String datastr = json.getString("data"); if (StringUtils.isBlank(datastr)) { // datastr为空不验签 } else { String sign = json.getString("sign"); boolean isSuccess = SignUtil.verify(sign, datastr); if (isSuccess) {// 验签成功 JSONObject data = JSON.parseObject(datastr); //当前页码 String pageNum = data.getString("pageNum"); //每页条数 String pageSize = data.getString("pageSize"); //总页数 pages = data.getInteger("pages"); // 总条数 int total = data.getInteger("total"); //list JSONArray getList=data.getJSONArray("list"); ArrayList<YouXianGouBean> listadd = (ArrayList<YouXianGouBean>) JSONArray.parseArray(getList.toJSONString(), YouXianGouBean.class); list.addAll(listadd); adapter.notifyDataSetChanged(); } else { ToastUtils.toastshort("加载数据异常!"); } } } else { String msg = json.getString("msg"); ToastUtils.toastshort(msg); } } @Override public void onError(VolleyError error) { // TODO Auto-generated method stub refreshListView.onRefreshComplete(); progressdialog.dismiss(); ToastUtils.toastshort("加载数据失败!"); } }); } public void setCode(String code) { this.code = code; } }
[ "997750993@qq.com" ]
997750993@qq.com
e9894e2bb253aea5564e740644e74f1a13e69ec6
6289b585798fb88527a8a6f70500e74e6e2f3d07
/app/src/main/java/com/spark/coinpaypddd/bind_phone/ChangeLeadActivity.java
db2dd53d535d055b6eec17aa1532b166785ee40e
[]
no_license
writyou/coinpay_pdd_android2
2e6ef7ff6788d14250fefdea614111f8d74aaaeb
25a500c7d12a83984fb6c8a6445645d8c2e89faf
refs/heads/master
2020-09-26T13:22:08.118132
2019-12-06T06:24:30
2019-12-06T06:24:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,866
java
package com.spark.coinpaypddd.bind_phone; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.LinearLayout; import android.widget.Toast; import com.spark.coinpaypddd.R; import com.spark.coinpaypddd.base.BaseActivity; import butterknife.BindView; import butterknife.OnClick; /** * 修改手机号主界面 */ public class ChangeLeadActivity extends BaseActivity { @BindView(R.id.llCanReceive) LinearLayout llCanReceive; @BindView(R.id.llCannotReceive) LinearLayout llCannotReceive; @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == 1 && resultCode == RESULT_OK) { setResult(RESULT_OK, data); finish(); } } @Override protected int getActivityLayoutId() { return R.layout.activity_change_lead; } @Override protected void initView(Bundle saveInstance) { super.initView(saveInstance); ivBack.setVisibility(View.VISIBLE); } @Override protected void initData() { super.initData(); tvTitle.setText(getString(R.string.str_chg_phone)); } @OnClick({R.id.llCanReceive, R.id.llCannotReceive}) @Override protected void setOnClickListener(View v) { super.setOnClickListener(v); switch (v.getId()) { case R.id.llCannotReceive: Toast.makeText(this, getString(R.string.str_unreceive_phone_code), Toast.LENGTH_LONG).show(); break; case R.id.llCanReceive: Bundle bundle = getIntent().getExtras(); bundle.putBoolean("isChg", true); showActivity(BindPhoneActivity.class, bundle, 1); break; } } }
[ "ccs7727@163.com" ]
ccs7727@163.com
9a215b102f02ed2f181d21fd1a2c78ee6991092d
5bb376c84746f552fbc25e30e62decb8ed2952cd
/numerical-recipes-j/core/src/main/java/com/google/code/numericalrecipes/GlobalMembersDftintegrate.java
5ed652b454f9d14d001bc074ce9965bca8f703a2
[]
no_license
githubapitest2/githubapitest
293a10a5f123cf3cdcf58e2891b85c8afe820cd6
a4c927926744a75316768b0be1b0a905f52978db
refs/heads/master
2021-01-18T07:57:13.699195
2009-12-09T13:43:47
2009-12-09T13:43:47
1,302,359
3
0
null
null
null
null
UTF-8
Java
false
false
6,248
java
package com.google.code.numericalrecipes; public class GlobalMembersDftintegrate { public static void dftcor(Doub w, Doub delta, Doub a, Doub b, RefObject<VecDoub_I> endpts, RefObject<Doub> corre, RefObject<Doub> corim, RefObject<Doub> corfac) { Doub a0i = new Doub(); Doub a0r = new Doub(); Doub a1i = new Doub(); Doub a1r = new Doub(); Doub a2i = new Doub(); Doub a2r = new Doub(); Doub a3i = new Doub(); Doub a3r = new Doub(); Doub arg = new Doub(); Doub c = new Doub(); Doub cl = new Doub(); Doub cr = new Doub(); Doub s = new Doub(); Doub sl = new Doub(); Doub sr = new Doub(); Doub t = new Doub(); Doub t2 = new Doub(); Doub t4 = new Doub(); Doub t6 = new Doub(); Doub cth = new Doub(); Doub ctth = new Doub(); Doub spth2 = new Doub(); Doub sth = new Doub(); Doub sth4i = new Doub(); Doub stth = new Doub(); Doub th = new Doub(); Doub th2 = new Doub(); Doub th4 = new Doub(); Doub tmth2 = new Doub(); Doub tth4i = new Doub(); th = w *delta; if (a >= b || th < 0.0e0 || th > 3.1416e0) throw("bad arguments to dftcor"); if (Math.abs(th) < 5.0e-2) { t = th; t2 = t *t; t4 = t2 *t2; t6 = t4 *t2; corfac.argvalue = 1.0-(11.0/720.0)*t4+(23.0/15120.0)*t6; a0r = (-2.0/3.0)+t2/45.0+(103.0/15120.0)*t4-(169.0/226800.0)*t6; a1r = (7.0/24.0)-(7.0/180.0)*t2+(5.0/3456.0)*t4-(7.0/259200.0)*t6; a2r = (-1.0/6.0)+t2/45.0-(5.0/6048.0)*t4+t6/64800.0; a3r = (1.0/24.0)-t2/180.0+(5.0/24192.0)*t4-t6/259200.0; a0i = t*(2.0/45.0+(2.0/105.0)*t2-(8.0/2835.0)*t4+(86.0/467775.0)*t6); a1i = t*(7.0/72.0-t2/168.0+(11.0/72576.0)*t4-(13.0/5987520.0)*t6); a2i = t*(-7.0/90.0+t2/210.0-(11.0/90720.0)*t4+(13.0/7484400.0)*t6); a3i = t*(7.0/360.0-t2/840.0+(11.0/362880.0)*t4-(13.0/29937600.0)*t6); } else { cth = Math.cos(th); sth = Math.sin(th); ctth = cth *cth-sth *sth; stth = 2.0e0 *sth *cth; th2 = th *th; th4 = th2 *th2; tmth2 = 3.0e0-th2; spth2 = 6.0e0+th2; sth4i = 1.0/(6.0e0 *th4); tth4i = 2.0e0 *sth4i; corfac.argvalue = tth4i *spth2*(3.0e0-4.0e0 *cth+ctth); a0r = sth4i*(-42.0e0+5.0e0 *th2+spth2*(8.0e0 *cth-ctth)); a0i = sth4i*(th*(-12.0e0+6.0e0 *th2)+spth2 *stth); a1r = sth4i*(14.0e0 *tmth2-7.0e0 *spth2 *cth); a1i = sth4i*(30.0e0 *th-5.0e0 *spth2 *sth); a2r = tth4i*(-4.0e0 *tmth2+2.0e0 *spth2 *cth); a2i = tth4i*(-12.0e0 *th+2.0e0 *spth2 *sth); a3r = sth4i*(2.0e0 *tmth2-spth2 *cth); a3i = sth4i*(6.0e0 *th-spth2 *sth); } cl = a0r *endpts.argvalue[0]+a1r *endpts.argvalue[1]+a2r *endpts.argvalue[2]+a3r *endpts.argvalue[3]; sl = a0i *endpts.argvalue[0]+a1i *endpts.argvalue[1]+a2i *endpts.argvalue[2]+a3i *endpts.argvalue[3]; cr = a0r *endpts.argvalue[7]+a1r *endpts.argvalue[6]+a2r *endpts.argvalue[5]+a3r *endpts.argvalue[4]; sr = -a0i *endpts.argvalue[7]-a1i *endpts.argvalue[6]-a2i *endpts.argvalue[5]-a3i *endpts.argvalue[4]; arg = w*(b-a); c = Math.cos(arg); s = Math.sin(arg); corre.argvalue = cl+c *cr-s *sr; corim.argvalue = sl+s *cr+c *sr; } //C++ TO JAVA CONVERTER NOTE: This was formerly a static local variable declaration (not allowed in Java): private Int init = 0; //C++ TO JAVA CONVERTER NOTE: This was formerly a static local variable declaration (not allowed in Java): private Doub aold = -1.e30; Doub bold = -1.e30; Doub delta = new Doub(); //C++ TO JAVA CONVERTER NOTE: This was formerly a static local variable declaration (not allowed in Java): private VecDoub data = new VecDoub(NDFT); VecDoub endpts = new VecDoub(8); public static void dftint(Doub func(Doub), Doub a, Doub b, Doub w, RefObject<Doub> cosint, RefObject<Doub> sinint) { //C++ TO JAVA CONVERTER NOTE: This static local variable declaration (not allowed in Java) has been moved just prior to the method: // static Int init=0; } //C++ TO JAVA CONVERTER TODO TASK: There are no simple equivalents to function pointers in Java: // static Doub (*funcold)(const Doub); //C++ TO JAVA CONVERTER NOTE: This static local variable declaration (not allowed in Java) has been moved just prior to the method: // static Doub aold = -1.e30,bold = -1.e30,delta; final Int M = 64; final Int NDFT = 1024; final Int MPOL = 6; final Doub TWOPI = 6.283185307179586476; Int j = new Int(); Int nn = new Int(); Doub c = new Doub(); Doub cdft = new Doub(); Doub corfac = new Doub(); Doub corim = new Doub(); Doub corre = new Doub(); Doub en = new Doub(); Doub s = new Doub(); Doub sdft = new Doub(); //C++ TO JAVA CONVERTER NOTE: This static local variable declaration (not allowed in Java) has been moved just prior to the method: // static VecDoub data(NDFT),endpts(8); VecDoub cpol = new VecDoub(MPOL); VecDoub spol = new VecDoub(MPOL); VecDoub xpol = new VecDoub(MPOL); if (init != 1 || a != aold || b != bold || func != funcold) { init = 1; aold = a; bold = b; funcold=func; delta = (b-a)/M; for (j = 0;j<M+1;j++) data[j]=func(a+j *delta); for (j = M+1;j<NDFT;j++) data[j]=0.0; for (j = 0;j<4;j++) { endpts[j]=data[j]; endpts[j+4]=data[M-3+j]; } realft(data,1); data[1]=0.0; } en = w *delta *NDFT/TWOPI+1.0; nn = MIN(MAX((Int)(en-0.5 *MPOL+1.0),1),NDFT/2-MPOL+1); for (j = 0;j<MPOL;j++,nn++) { cpol[j]=data[2 *nn-2]; spol[j]=data[2 *nn-1]; xpol[j]=nn; } cdft = Poly_interp(xpol,cpol,MPOL).interp(en); sdft = Poly_interp(xpol,spol,MPOL).interp(en); RefObject<VecDoub_I> tempRefObject = new RefObject<VecDoub_I>(endpts); RefObject<Doub> tempRefObject2 = new RefObject<Doub>(corre); RefObject<Doub> tempRefObject3 = new RefObject<Doub>(corim); RefObject<Doub> tempRefObject4 = new RefObject<Doub>(corfac); GlobalMembersDftintegrate.dftcor(w, delta, a, b, tempRefObject, tempRefObject2, tempRefObject3, tempRefObject4); endpts = tempRefObject.argvalue; corre = tempRefObject2.argvalue; corim = tempRefObject3.argvalue; corfac = tempRefObject4.argvalue; cdft *= corfac; sdft *= corfac; cdft += corre; sdft += corim; c = delta *Math.cos(w *a); s = delta *Math.sin(w *a); cosint.argvalue = c *cdft-s *sdft; sinint.argvalue = s *cdft+c *sdft; }
[ "nabeelmukhtar@yahoo.com" ]
nabeelmukhtar@yahoo.com
75fa789d9e3c8fbff3b080580ffcd06e60b6f2d8
293b7c276d768c938868469a1a0a501ff7a3e92e
/Ch_1_3/Ex_1_3_36.java
fc01e45e6d57b55ab2356b7bcd156954dcfb5edd
[]
no_license
gdhucoder/Algorithms4
54ab8d60e51fc28723e7b92b3e33fec1125ecb01
f2a03421b91d1176e3a770227878eb713853aa69
refs/heads/master
2022-06-16T01:31:53.913127
2022-03-14T01:02:45
2022-03-14T01:02:45
154,414,016
392
168
null
2021-12-04T02:50:41
2018-10-24T00:23:32
Java
UTF-8
Java
false
false
2,223
java
package Ch_1_3; import edu.princeton.cs.algs4.StdOut; import edu.princeton.cs.algs4.StdRandom; import java.util.Iterator; /** * Created by HuGuodong on 2019/7/27. */ public class Ex_1_3_36 { public static class _RandomQueue<Item> implements Iterable<Item> { int N; Item[] a; public _RandomQueue() { a = (Item[]) new Object[1]; } private void resize(int cap) { Item[] temp = (Item[]) new Object[cap]; for (int i = 0; i < N; i++) { temp[i] = a[i]; } a = temp; } public void enqueue(Item item) { if (N == a.length) { resize(2 * a.length); } a[N++] = item; } public Item dequeue() { if (isEmpty()) { return null; } if (N > 0 && N == a.length / 4) { resize(a.length / 2); } int r = StdRandom.uniform(N); Item item = a[r]; // delete a[r] = a[N - 1]; a[N - 1] = null; N--; return item; } public Item sample() { return a[StdRandom.uniform(N)]; } public boolean isEmpty() { return N == 0; } public int size() { return N; } public class RandomIterator implements Iterator<Item> { Item[] copy; int num = N; int idx; public RandomIterator() { copy = (Item[]) new Object[num]; for (int i = 0; i < num; i++) { copy[i] = a[i]; } for (int i = 0; i < num; i++) { int r = i + StdRandom.uniform(num - i); // between i~n-1 Item temp = copy[i]; copy[i] = copy[r]; copy[r] = temp; } } @Override public boolean hasNext() { return idx < num; } @Override public Item next() { return copy[idx++]; } } @Override public Iterator<Item> iterator() { return new RandomIterator(); } } public static void main(String[] args) { _RandomQueue<Integer> q = new _RandomQueue<>(); int N = 20; for (int i = 0; i < N; i++) { q.enqueue(i); } for (Integer i : q) { StdOut.printf("%d ", i); } StdOut.println(); // 7 10 0 5 12 4 15 6 18 3 19 17 11 14 16 1 13 2 9 8 } }
[ "guodong_hu@126.com" ]
guodong_hu@126.com
b73b4e55be17a40a5d65ee5d8b314fa4f028c68d
663c475938404a0058212d0df5e4edc7804229b2
/api/src/main/java/com/ford/wechat/entity/security/BasUser.java
5e6d4d60259940998216ab4b54d4cc89b6ed049d
[]
no_license
cnywb/ford-wechat
40373261b65d73c1cf342f79ce8320442fdecb5c
1f97ee21fbaa5c3c20214f3ac573f3ac0ac304e7
refs/heads/master
2020-04-08T02:26:22.047572
2018-11-24T13:20:31
2018-11-24T13:20:31
158,935,809
0
0
null
null
null
null
UTF-8
Java
false
false
2,861
java
package com.ford.wechat.entity.security; import com.ford.wechat.entity.AuditEntity; import javax.persistence.*; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * 管理端用户 * * @author li.yu * @since 1.0 */ @Entity @Table(name = "WE_USER") public class BasUser extends AuditEntity { /** 物理主键 */ @Id @Column(name = "ID", nullable = false) @GeneratedValue(strategy=GenerationType.SEQUENCE,generator = "SEQ_WE_USER_ID") @SequenceGenerator(name = "SEQ_WE_USER_ID",allocationSize=1,sequenceName = "SEQ_WE_USER_ID") protected Long id; /** 后台登录用户名 */ @Column(name = "LOGIN_NAME") private String loginName; /** 后台登录密码 */ @Column(name = "PASSWORD") private String password; /** 姓名 */ @Column(name = "NAME") private String name; /** 联系电话 */ @Column(name = "MOBILE") private String mobile; /** 邮件 */ @Column(name = "EMAIL") private String email; /** 机构代码 */ @Column(name = "ORG_CODE") private String orgCode; /** 机构ID */ @Column(name = "ORG_ID") private Long orgId; /** 机构名称 */ @Column(name = "ORG_NAME") private String orgName; /**密码有效期*/ @Column(name="CREDENTIAL_EXPIRED_DATE") private Date credentialExpiredDate; public String getLoginName() { return loginName; } public void setLoginName(String loginName) { this.loginName = loginName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getOrgCode() { return orgCode; } public void setOrgCode(String orgCode) { this.orgCode = orgCode; } public Long getOrgId() { return orgId; } public void setOrgId(Long orgId) { this.orgId = orgId; } public String getOrgName() { return orgName; } public void setOrgName(String orgName) { this.orgName = orgName; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Date getCredentialExpiredDate() { return credentialExpiredDate; } public void setCredentialExpiredDate(Date credentialExpiredDate) { this.credentialExpiredDate = credentialExpiredDate; } }
[ "cn_ywb@163.com" ]
cn_ywb@163.com
6853954f5dff9b223607ef70686942b6076e2254
92f10c41bad09bee05acbcb952095c31ba41c57b
/app/src/main/java/io/github/alula/ohmygod/MainActivity5046.java
6b7f0c49337f85f4a2d52ca3c5890675c8aef6de
[]
no_license
alula/10000-activities
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
f7e8de658c3684035e566788693726f250170d98
refs/heads/master
2022-07-30T05:54:54.783531
2022-01-29T19:53:04
2022-01-29T19:53:04
453,501,018
16
0
null
null
null
null
UTF-8
Java
false
false
339
java
package io.github.alula.ohmygod; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity5046 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "6276139+alula@users.noreply.github.com" ]
6276139+alula@users.noreply.github.com
5bc0332d3e7fc14c67cdb2884ba27f93fb55c6a5
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/domain-20180208/src/main/java/com/aliyun/domain20180208/models/ChangeAuctionResponse.java
3dc294372cc0a202838f4860733988a8d95144a7
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,350
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.domain20180208.models; import com.aliyun.tea.*; public class ChangeAuctionResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public ChangeAuctionResponseBody body; public static ChangeAuctionResponse build(java.util.Map<String, ?> map) throws Exception { ChangeAuctionResponse self = new ChangeAuctionResponse(); return TeaModel.build(map, self); } public ChangeAuctionResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ChangeAuctionResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public ChangeAuctionResponse setBody(ChangeAuctionResponseBody body) { this.body = body; return this; } public ChangeAuctionResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
8eee49a44e7b4b299ecf3edf3ccbe868f153b86e
4c45ec4d2f8810b9350854d787b6e84d8cbbcdb1
/wndjsbg-1.1/src/main/java/com/ccthanking/business/yhzg/service/ScoreService.java
ce632ce4d3200dee976a8645926531621e0a6783
[]
no_license
tigerisadandan/tianyu
95ed49ed11a23d8e74cafce64c343ee3c2a23af4
20767b0acedbcecc277a86123f22dcc1e6ea020a
refs/heads/master
2021-01-25T10:29:52.496359
2015-09-07T08:51:54
2015-09-07T08:51:54
41,982,285
0
1
null
null
null
null
UTF-8
Java
false
false
3,256
java
/* ================================================================== * 版权: kcit 版权所有 (c) 2013 * 文件: yhzg.service.ScoreService.java * 创建日期: 2015-05-17 上午 09:23:51 * 功能: 接口:分数管理 * 所含类: {包含的类} * 修改记录: * 日期 作者 内容 * ================================================================== * 2015-05-17 上午 09:23:51 龚伟雄 创建文件,实现基本功能 * * ================================================================== */ package com.ccthanking.business.yhzg.service; import com.ccthanking.business.dtgl.yhzg.vo.ScoreVO; import com.ccthanking.framework.service.IBaseService; /** * <p> ScoreService.java </p> * <p> 功能:分数管理 </p> * * <p><a href="ScoreService.java.html"><i>查看源代码</i></a></p> * * @author <a href="mailto:gongwx@kzcpm.com">龚伟雄</a> * @version 0.1 * @since 2015-05-17 * */ public interface ScoreService extends IBaseService<ScoreVO, String> { /** * 根据条件查询记录. * * @param json * @param user * @return * @throws Exception * @since v1.00 */ String queryCondition(String json) throws Exception; /** * 根据条件查询记录. * * @param json * @param user * @return * @throws Exception * @since v1.00 */ String queryCondition1(String json) throws Exception; String queryFenshu(String json,String condition) throws Exception; String queryJiafen(String json,String shenhe) throws Exception; String queryjfxx(String json,String JFSQ_UID) throws Exception; String queryspxx(String json,String JFSQ_UID) throws Exception; String queryjfdx(String json,String JFSQ_UID) throws Exception; String queryjfsj(String json,String JFSQ_UID) throws Exception; String updatestatus(String agree,String JFSTATUS,String JFSQ_UID,String shyj) throws Exception; /** * 新增记录. * * @param json * @param user * @return * @throws Exception * @since v1.00 */ String insert(String json) throws Exception; /** * 修改记录. * * @param json * @param user * @return * @throws Exception * @since v1.00 */ String update(String json) throws Exception; /** * 删除记录. * * @param json * @param user * @return * @throws Exception * @since v1.00 */ String delete(String json) throws Exception; String getDshkCount(String msg) ; String getDshjCount(String msg) ; String queryById(String sUid); String updatePersonSh(String msg); String updateCompanySh(String msg); /** * //查询指定的 类型的 审核通过的 扣分总数 * @param id * @param type * @return */ String getShtgkSum(String id,String type); /** * //查询指定的 类型的 审核通过的 加分总数 * @param id * @param type * @return */ String getShtgjSum(String id,String type); }
[ "943849983@qq.com" ]
943849983@qq.com
c029554e70407e10b482d8fac5526b4ca09a7f65
a80951a4e5b0c340f325c65a77dadb9f92d750b2
/src/test/java/com/projet/sidot/web/rest/UserJWTControllerIT.java
2dbacdb742123515377846c342f7bcbc50815293
[]
no_license
Kadsuke/Oneasidot
80daad9ad8e71e0bb12b41ec7d95beedd452aa60
cd4ed6b4c9595a2a08c344c2df2d827ff61d9c5c
refs/heads/master
2023-01-02T19:15:38.996235
2020-10-26T09:15:18
2020-10-26T09:15:18
307,317,541
0
0
null
null
null
null
UTF-8
Java
false
false
4,147
java
package com.projet.sidot.web.rest; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.projet.sidot.OneasidotApp; import com.projet.sidot.domain.User; import com.projet.sidot.repository.UserRepository; import com.projet.sidot.web.rest.vm.LoginVM; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; /** * Integration tests for the {@link UserJWTController} REST controller. */ @AutoConfigureMockMvc @SpringBootTest(classes = OneasidotApp.class) public class UserJWTControllerIT { @Autowired private UserRepository userRepository; @Autowired private PasswordEncoder passwordEncoder; @Autowired private MockMvc mockMvc; @Test @Transactional public void testAuthorize() throws Exception { User user = new User(); user.setLogin("user-jwt-controller"); user.setEmail("user-jwt-controller@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller"); login.setPassword("test"); mockMvc .perform(post("/api/authenticate").contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(is(emptyString())))); } @Test @Transactional public void testAuthorizeWithRememberMe() throws Exception { User user = new User(); user.setLogin("user-jwt-controller-remember-me"); user.setEmail("user-jwt-controller-remember-me@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller-remember-me"); login.setPassword("test"); login.setRememberMe(true); mockMvc .perform(post("/api/authenticate").contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(is(emptyString())))); } @Test public void testAuthorizeFails() throws Exception { LoginVM login = new LoginVM(); login.setUsername("wrong-user"); login.setPassword("wrong password"); mockMvc .perform(post("/api/authenticate").contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.id_token").doesNotExist()) .andExpect(header().doesNotExist("Authorization")); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f8fa8aac097a2ec3ca183dff4df3b7087e83230e
d3a3f32b6e0bd2eeb3e19fc104ed8f1717ede1f6
/src/io/UsingBuffers.java
fbb49b5993b435cebad64d244a8e97938575bb8e
[]
no_license
Cowerling/ThinkingInJava
2ead12fc1845cc2ae594cb9a0a0985af8846fc72
f8e12948b62772f79a20592170c34db5eff538e5
refs/heads/master
2021-01-10T17:59:14.899381
2016-04-28T15:28:36
2016-04-28T15:28:36
47,770,416
2
0
null
null
null
null
UTF-8
Java
false
false
860
java
package io; import java.nio.*; /** * Created by dell on 2016/1/12. */ public class UsingBuffers { private static void symmetricScramble(CharBuffer buffer) { while (buffer.hasRemaining()) { buffer.mark(); char c1 = buffer.get(), c2 = buffer.get(); buffer.reset(); buffer.put(c2).put(c1); } } public static void main(String[] args) { char[] data = "UsingBuffers".toCharArray(); ByteBuffer byteBuffer = ByteBuffer.allocate(data.length * 2); CharBuffer charBuffer = byteBuffer.asCharBuffer(); charBuffer.put(data); System.out.println(charBuffer.rewind()); symmetricScramble(charBuffer); System.out.println(charBuffer.rewind()); symmetricScramble(charBuffer); System.out.println(charBuffer.rewind()); } }
[ "Cowerling@gmail.com" ]
Cowerling@gmail.com
576403d7fda266c0b3fffa59a62cfe91d0cfbb8a
ec258bb9d40a12bea24cefc206e9f0768e19a518
/microbroker/src/main/java/org/eclipse/moquette/parser/netty/PublishDecoder.java
f8213c83f206a5d29272a735d813088e49c45331
[]
no_license
lukazalves/cddl
cf0794ecda028281cd5d8dbc39ed67393720a77f
671673ff584c2472a04d0e5822830e9df71a3b72
refs/heads/master
2023-06-15T02:45:16.483446
2021-07-06T22:39:37
2021-07-06T22:39:37
264,774,026
0
0
null
2020-11-19T20:15:09
2020-05-17T23:11:06
Java
UTF-8
Java
false
false
3,248
java
/* * Copyright (c) 2012-2014 The original author or authors * ------------------------------------------------------ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accompanies this distribution. * * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v10.html * * The Apache License v2.0 is available at * http://www.opensource.org/licenses/apache2.0.php * * You may elect to redistribute this code under either of these licenses. */ package org.eclipse.moquette.parser.netty; import android.util.Log; import org.eclipse.moquette.proto.messages.AbstractMessage; import org.eclipse.moquette.proto.messages.PublishMessage; import java.util.List; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.handler.codec.CorruptedFrameException; import io.netty.util.AttributeMap; /** * @author andrea */ class PublishDecoder extends DemuxDecoder { @Override void decode(AttributeMap ctx, ByteBuf in, List<Object> out) throws Exception { Log.i("moquette", "decode invoked with buffer " + in); in.resetReaderIndex(); int startPos = in.readerIndex(); //Common decoding part PublishMessage message = new PublishMessage(); if (!decodeCommonHeader(message, in)) { Log.i("moquette", "decode ask for more data after " + in); in.resetReaderIndex(); return; } if (Utils.isMQTT3_1_1(ctx)) { if (message.getQos() == AbstractMessage.QOSType.MOST_ONE && message.isDupFlag()) { //bad protocol, if QoS=0 => DUP = 0 throw new CorruptedFrameException("Received a PUBLISH with QoS=0 & DUP = 1, MQTT 3.1.1 violation"); } if (message.getQos() == AbstractMessage.QOSType.RESERVED) { throw new CorruptedFrameException("Received a PUBLISH with QoS flags setted 10 b11, MQTT 3.1.1 violation"); } } int remainingLength = message.getRemainingLength(); //Topic name String topic = Utils.decodeString(in); if (topic == null) { in.resetReaderIndex(); return; } if (topic.contains("+") || topic.contains("#")) { throw new CorruptedFrameException("Received a PUBLISH with topic containting wild card chars, topic: " + topic); } message.setTopicName(topic); if (message.getQos() == AbstractMessage.QOSType.LEAST_ONE || message.getQos() == AbstractMessage.QOSType.EXACTLY_ONCE) { message.setMessageID(in.readUnsignedShort()); } int stopPos = in.readerIndex(); //read the payload int payloadSize = remainingLength - (stopPos - startPos - 2) + (Utils.numBytesToEncode(remainingLength) - 1); if (in.readableBytes() < payloadSize) { in.resetReaderIndex(); return; } // byte[] b = new byte[payloadSize]; ByteBuf bb = Unpooled.buffer(payloadSize); in.readBytes(bb); message.setPayload(bb.nioBuffer()); out.add(message); } }
[ "=" ]
=
77f6448493b93807d159295bd5a29e454dd9bad9
efb9475381a9723fff13e029ec7e312a721dd52f
/letu_bike_api/src/main/java/org/dao/BannerMapper.java
03ae9f78b2f99f8ea0d2f0753df6c00749dfa277
[]
no_license
hanqiaosheng/letu-web-html
2f76ec8d5a08e3bbfd566a006650ff1ead79247e
0e6dae22b681ea46620fa260bc7a7919b75ba745
refs/heads/master
2021-09-09T19:34:43.132011
2018-03-19T08:50:30
2018-03-19T08:50:30
125,819,631
0
1
null
null
null
null
UTF-8
Java
false
false
940
java
package org.dao; import java.util.List; import org.apache.ibatis.annotations.Param; import org.entity.dto.Banner; import org.entity.dto.BannerExample; public interface BannerMapper { int countByExample(BannerExample example); int deleteByExample(BannerExample example); int deleteByPrimaryKey(Long bannerId); int insert(Banner record); int insertSelective(Banner record); List<Banner> selectByExample(BannerExample example); Banner selectByPrimaryKey(Long bannerId); int updateByExampleSelective(@Param("record") Banner record, @Param("example") BannerExample example); int updateByExample(@Param("record") Banner record, @Param("example") BannerExample example); int updateByPrimaryKeySelective(Banner record); int updateByPrimaryKey(Banner record); //连表 List<Banner> selectUnionByExample(BannerExample example); int countUnionByExample(BannerExample example); }
[ "896965531@qq.com" ]
896965531@qq.com