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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cc5d4f700c7ce6b25f931af6ea613f4b7aaa3ed6 | 15af68ff32e36fce93286f45cc88c4d34ca62ad9 | /framework-tutorial-netty/src/main/java/com/geekerstar/netty/manual/$03/ChatServer.java | 3f97927f595d13adbeb8a100b8adb17c17f32b01 | [] | no_license | goldtoad6/framework-tutorial | d0c44d98b9fe57f46f79dff9344c71e8cdc8fa72 | 060de3bdabc8793ed0fdf3792d8f26d0a331a29c | refs/heads/master | 2022-08-31T13:23:32.936808 | 2022-02-23T14:22:47 | 2022-02-23T14:22:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,469 | java | package com.geekerstar.netty.manual.$03;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom;
public class ChatServer {
public static void main(String[] args) throws IOException {
Selector selector = Selector.open();
ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
serverSocketChannel.bind(new InetSocketAddress(8080));
serverSocketChannel.configureBlocking(false);
// 将accept事件绑定到selector上
serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
while (true) {
// 阻塞在select上
selector.select();
Set<SelectionKey> selectionKeys = selector.selectedKeys();
// 遍历selectKeys
Iterator<SelectionKey> iterator = selectionKeys.iterator();
while (iterator.hasNext()) {
SelectionKey selectionKey = iterator.next();
// 如果是accept事件
if (selectionKey.isAcceptable()) {
ServerSocketChannel ssc = (ServerSocketChannel) selectionKey.channel();
SocketChannel socketChannel = ssc.accept();
System.out.println("accept new conn: " + socketChannel.getRemoteAddress());
socketChannel.configureBlocking(false);
socketChannel.register(selector, SelectionKey.OP_READ);
// 加入群聊
ChatHolder.join(socketChannel);
} else if (selectionKey.isReadable()) {
// 如果是读取事件
SocketChannel socketChannel = (SocketChannel) selectionKey.channel();
ByteBuffer buffer = ByteBuffer.allocate(1024);
// 将数据读入到buffer中
int length = socketChannel.read(buffer);
if (length > 0) {
buffer.flip();
byte[] bytes = new byte[buffer.remaining()];
// 将数据读入到byte数组中
buffer.get(bytes);
// 换行符会跟着消息一起传过来
String content = new String(bytes, "UTF-8").replace("\r\n", "");
if (content.equalsIgnoreCase("quit")) {
// 退出群聊
ChatHolder.quit(socketChannel);
selectionKey.cancel();
socketChannel.close();
} else {
// 扩散
ChatHolder.propagate(socketChannel, content);
}
}
}
iterator.remove();
}
}
}
private static class ChatHolder {
private static final Map<SocketChannel, String> USER_MAP = new ConcurrentHashMap<>();
/**
* 加入群聊
*
* @param socketChannel
*/
public static void join(SocketChannel socketChannel) {
// 有人加入就给他分配一个id
String userId = "用户" + ThreadLocalRandom.current().nextInt(Integer.MAX_VALUE);
send(socketChannel, "您的id为:" + userId + "\n\r");
for (SocketChannel channel : USER_MAP.keySet()) {
send(channel, userId + " 加入了群聊" + "\n\r");
}
// 将当前用户加入到map中
USER_MAP.put(socketChannel, userId);
}
/**
* 退出群聊
*
* @param socketChannel
*/
public static void quit(SocketChannel socketChannel) {
String userId = USER_MAP.get(socketChannel);
send(socketChannel, "您退出了群聊" + "\n\r");
USER_MAP.remove(socketChannel);
for (SocketChannel channel : USER_MAP.keySet()) {
if (channel != socketChannel) {
send(channel, userId + " 退出了群聊" + "\n\r");
}
}
}
/**
* 扩散说话的内容
*
* @param socketChannel
* @param content
*/
public static void propagate(SocketChannel socketChannel, String content) {
String userId = USER_MAP.get(socketChannel);
for (SocketChannel channel : USER_MAP.keySet()) {
if (channel != socketChannel) {
send(channel, userId + ": " + content + "\n\r");
}
}
}
/**
* 发送消息
*
* @param socketChannel
* @param msg
*/
private static void send(SocketChannel socketChannel, String msg) {
try {
ByteBuffer writeBuffer = ByteBuffer.allocate(1024);
writeBuffer.put(msg.getBytes());
writeBuffer.flip();
socketChannel.write(writeBuffer);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
| [
"247507792@qq.com"
] | 247507792@qq.com |
7c23bb2b50390007e68b1381cb31a63fdecd0890 | bbfc291c1408fdd2fc70d8172fddcc9c072a980d | /gherkin/java/src/main/java/gherkin/events/SourceEvent.java | 2f4029e42f4cfc4751ec8a0ac27b0bce46eaedac | [
"MIT"
] | permissive | i-b-businge-bluefruit/cucumber | 0f3975e5653e2c180f533947ee2634576aa2f22c | 3bbd7f7e1c543955e4d08c9bda319a27a59fe44c | refs/heads/master | 2021-04-26T22:58:02.972336 | 2018-03-05T08:14:39 | 2018-03-05T08:14:39 | 123,905,311 | 1 | 0 | MIT | 2018-03-05T10:44:34 | 2018-03-05T10:44:33 | null | UTF-8 | Java | false | false | 489 | java | package gherkin.events;
public class SourceEvent implements CucumberEvent {
private final String type = "source";
public final String uri;
public final String data;
private final Media media = new Media();
public SourceEvent(String uri, String data) {
this.uri = uri;
this.data = data;
}
public static class Media {
private final String encoding = "utf-8";
private final String type = "text/x.cucumber.gherkin+plain";
}
}
| [
"aslak.hellesoy@gmail.com"
] | aslak.hellesoy@gmail.com |
f7f95a3535e2827391fb7aff0b625676ff56523d | ba333491a13967e09ee2c2e48a64b8aa05a08d2c | /Libs/coder-compiler/src/main/java/com/na/coder_compiler/part/UsecasePart.java | 0fce72bdde9f53513fc3f0fd7c2e1e620dc0c333 | [] | no_license | yqyzxd/AppFramework | 33fddbad3bbade131325d8ec9fce07233b00f1f6 | 5d588f985e4ffe2afe888d5d7ebdf87b269fdaaa | refs/heads/master | 2021-01-24T10:27:52.976864 | 2019-09-19T07:54:27 | 2019-09-19T07:54:27 | 123,052,999 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,371 | java | package com.na.coder_compiler.part;
import com.na.coder_compiler.Utils;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeSpec;
import com.wind.coder.annotations.Usecase;
import java.io.IOException;
import javax.annotation.processing.Filer;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import retrofit2.Retrofit;
import static com.na.coder_compiler.Utils.getApiClassName;
import static com.na.coder_compiler.Utils.getInjectClassName;
import static com.na.coder_compiler.Utils.getRequestClassName;
import static com.na.coder_compiler.Utils.getResponseClassName;
/**
* Created by wind on 2018/6/3.
*/
public class UsecasePart {
private static final String USECASE_SUFFIX="Usecase";
private static final String PACKAGE_SUFFIX=".usecase";
private static final ClassName SUPERCLASS_TYPENAME=
ClassName.get("com.wind.base.usecase","RetrofitUsecase");
private static final ClassName PAGEUSECASE_TYPENAME=
ClassName.get("com.wind.base.usecase","PageUsecase");
private static final ClassName RX_OBSERVABLE_TYPENAME=
ClassName.get("rx","Observable");
private boolean page;//
private String annotatedClassSimpleName;
private ApiPart apiPart;
private String packageName;
private String parentPackageName;
private String prefix;
private ClassName requestClassName;
private ClassName responseClassName;
private RepositoryPart repositoryPart;
public UsecasePart(TypeElement annotatedElement,Usecase usecase){
annotatedClassSimpleName=annotatedElement.getSimpleName().toString();
// Usecase usecase=annotatedElement.getAnnotation(Usecase.class);
packageName=usecase.packageName();
parentPackageName= Utils.getPackageElement(annotatedElement).getQualifiedName().toString();
if ("".equals(packageName)|| null==packageName){
packageName= parentPackageName+PACKAGE_SUFFIX;
}
}
public void brewJava(Filer filer) throws IOException {
if (page){
brewPageUsecase(filer);
}else {
brewRetrofitUsecase(filer);
}
}
/*
public class ListUsecase extends PageUsecase<ListRequest,ListResponse> {
@Inject
public ListUsecase(PageRepository<ListRequest,ListResponse> pageRepository) {
super(pageRepository);
}
}
*/
private void brewPageUsecase(Filer filer) throws IOException{
ClassName repositoryClassName= Utils.getRepositoryClassName(repositoryPart.getPackageName(),prefix);
ClassName injectClassName=getInjectClassName();
MethodSpec.Builder constructor=MethodSpec.constructorBuilder()
.addModifiers(Modifier.PUBLIC)
.addAnnotation(injectClassName)
.addParameter(repositoryClassName,"pageRepository")
.addStatement("super(pageRepository)");
String className=prefix+ USECASE_SUFFIX;
ParameterizedTypeName parameterizedTypeName=ParameterizedTypeName.get(PAGEUSECASE_TYPENAME,
requestClassName,responseClassName);
TypeSpec typeSpec=TypeSpec.classBuilder(className)
.superclass(parameterizedTypeName)
.addModifiers(Modifier.PUBLIC)
.addMethod(constructor.build())
.build();
JavaFile.builder(packageName,typeSpec).build().writeTo(filer);
}
private void brewRetrofitUsecase(Filer filer) throws IOException{
ParameterizedTypeName returnTypeName=ParameterizedTypeName.get(RX_OBSERVABLE_TYPENAME,
responseClassName);
MethodSpec.Builder method=MethodSpec.methodBuilder("buildUsecaseObservable")
.addParameter(requestClassName,"request")
.addModifiers(Modifier.PUBLIC)
.returns(returnTypeName);
ClassName apiClassName=getApiClassName(apiPart.getPackageName(),prefix);
method.addStatement("$T api = mRetrofit.create("+apiClassName+".class)",apiClassName);
String apiMethodName=apiPart.getMethod().getName();
ClassName mapTransformerClassName=ClassName.get("com.wind.base.utils","MapTransformer");
method.addStatement("return api."+apiMethodName+"($T.transformObject2Map(request)"+")",mapTransformerClassName);
ClassName retrofitClassName=ClassName.get(Retrofit.class);
ClassName injectClassName=getInjectClassName();
MethodSpec.Builder constructor=MethodSpec.constructorBuilder()
.addModifiers(Modifier.PUBLIC)
.addAnnotation(injectClassName)
.addParameter(retrofitClassName,"retrofit")
.addStatement(" super(retrofit)");
String className=prefix+ USECASE_SUFFIX;
ParameterizedTypeName parameterizedTypeName=ParameterizedTypeName.get(SUPERCLASS_TYPENAME,
requestClassName,responseClassName);
TypeSpec typeSpec=TypeSpec.classBuilder(className)
.superclass(parameterizedTypeName)
.addModifiers(Modifier.PUBLIC)
.addMethod(method.build())
.addMethod(constructor.build())
.build();
JavaFile.builder(packageName,typeSpec).build().writeTo(filer);
}
public void setAssociatedApi(ApiPart api){
this.apiPart=api;
}
public String getPackageName() {
return packageName;
}
public void setAssociatedRepository(RepositoryPart repositoryPart){
this.repositoryPart=repositoryPart;
}
public void setParam(String prefix, String requestCanonicalName, String responseCanonicalName,boolean page) {
this.prefix=prefix;
this.page=page;
if (Utils.isEmpty(requestCanonicalName)){
requestClassName=getRequestClassName(parentPackageName,prefix);
}else {
requestClassName=ClassName.bestGuess(requestCanonicalName);
}
if (Utils.isEmpty(responseCanonicalName)){
responseClassName=getResponseClassName(parentPackageName,prefix);
}else {
responseClassName=ClassName.bestGuess(responseCanonicalName);
}
}
}
| [
"shihaowind@163.com"
] | shihaowind@163.com |
4647b9ea479422c3de2e1f8cf5cee0813eda70c4 | c7cfe234c04cc296a38133acc9ad8fbf579adf3a | /src/main/java/org/jabref/logic/xmp/DocumentInformationExtractor.java | 04017fc8e1f9c061a4ebf21cc956bcb6ce883bbf | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | cassianomaia/JabRef-ES2 | 4c02891cf1fa671e82ff64dcaed3eac01c4fcbf6 | 2fb2a62ff5bb57407fc407b1380e717e4ce1ad5e | refs/heads/master | 2020-03-18T06:38:24.854070 | 2018-07-10T13:47:58 | 2018-07-10T13:47:58 | 134,407,216 | 2 | 3 | MIT | 2018-07-10T13:47:59 | 2018-05-22T11:46:21 | Java | UTF-8 | Java | false | false | 2,971 | java | package org.jabref.logic.xmp;
import java.util.Map;
import java.util.Optional;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.FieldName;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
public class DocumentInformationExtractor {
private final PDDocumentInformation documentInformation;
private final BibEntry bibEntry;
public DocumentInformationExtractor(PDDocumentInformation documentInformation) {
this.documentInformation = documentInformation;
this.bibEntry = new BibEntry();
}
private void extractAuthor() {
String s = documentInformation.getAuthor();
if (s != null) {
bibEntry.setField(FieldName.AUTHOR, s);
}
}
private void extractTitle() {
String s = documentInformation.getTitle();
if (s != null) {
bibEntry.setField(FieldName.TITLE, s);
}
}
private void extractKeywords() {
String s = documentInformation.getKeywords();
if (s != null) {
bibEntry.setField(FieldName.KEYWORDS, s);
}
}
private void extractSubject() {
String s = documentInformation.getSubject();
if (s != null) {
bibEntry.setField(FieldName.ABSTRACT, s);
}
}
private void extractOtherFields() {
COSDictionary dict = documentInformation.getCOSObject();
for (Map.Entry<COSName, COSBase> o : dict.entrySet()) {
String key = o.getKey().getName();
if (key.startsWith("bibtex/")) {
String value = dict.getString(key);
key = key.substring("bibtex/".length());
if (BibEntry.TYPE_HEADER.equals(key)) {
bibEntry.setType(value);
} else {
bibEntry.setField(key, value);
}
}
}
}
/**
* Function for retrieving a BibEntry from the
* PDDocumentInformation in a PDF file.
*
* To understand how to get hold of a PDDocumentInformation have a look in
* the test cases for XMPUtilTest.
*
* The BibEntry is build by mapping individual fields in the document
* information (like author, title, keywords) to fields in a bibtex entry.
*
* @param di The document information from which to build a BibEntry.
* @return The bibtex entry found in the document information.
*/
public Optional<BibEntry> extractBibtexEntry() {
bibEntry.setType(BibEntry.DEFAULT_TYPE);
this.extractAuthor();
this.extractTitle();
this.extractKeywords();
this.extractSubject();
this.extractOtherFields();
if (bibEntry.getFieldNames().isEmpty()) {
return Optional.empty();
} else {
return Optional.of(bibEntry);
}
}
}
| [
"cassmala@gmail.com"
] | cassmala@gmail.com |
bc4f35ed366ef2f302f408700d694800748f03d2 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project54/src/test/java/org/gradle/test/performance54_2/Test54_137.java | 8c350196cd6e32a8417a9fbf493ad8212bac70ea | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 292 | java | package org.gradle.test.performance54_2;
import static org.junit.Assert.*;
public class Test54_137 {
private final Production54_137 production = new Production54_137("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
8ee5d54db9585c9602a3114c57102914b2bdff43 | 535e5d97d44fd42fca2a6fc68b3b566046ffa6c2 | /com/bigroad/shared/eobr/genx/C0991q.java | 09087bb220148b38cc53b5368885520bf07ca08c | [] | no_license | eric-lanita/BigRoadTruckingLogbookApp_v21.0.12_source_from_JADX | 47566c288bc89777184b73ef0eb199b61de39f82 | fb84301d90ec083ce06c68a3828cf99d8855c007 | refs/heads/master | 2021-09-01T07:02:52.500068 | 2017-12-25T15:06:05 | 2017-12-25T15:06:05 | 115,346,008 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,417 | java | package com.bigroad.shared.eobr.genx;
import com.bigroad.shared.C1144s;
import com.bigroad.shared.C1180y;
import com.bigroad.shared.eobr.turbo.logs.C1024d;
import com.bigroad.shared.eobr.turbo.logs.EobrEventLogData;
import com.bigroad.ttb.protocol.TTProtocol.Event;
import com.facebook.share.internal.ShareConstants;
import com.google.android.gms.tagmanager.DataLayer;
import com.google.common.base.Ascii;
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
import java.io.IOException;
import java.util.Arrays;
public class C0991q extends C0981n {
private final byte[] f3109a;
public C0991q(byte b, byte[] bArr) {
this.f3109a = new byte[(bArr.length + 2)];
this.f3109a[0] = b;
this.f3109a[1] = (byte) -5;
System.arraycopy(bArr, 0, this.f3109a, 2, bArr.length);
}
protected GenxDataType mo758b() {
return GenxDataType.STORE_DATA;
}
protected byte[] mo759c() {
return this.f3109a;
}
public boolean m5085d() {
return this.f3109a != null && this.f3109a.length > 0 && this.f3109a[0] == (byte) 10;
}
public boolean m5086e() {
return this.f3109a != null && this.f3109a.length > 0 && this.f3109a[0] == Ascii.VT;
}
public C1024d m5087f() {
if (m5085d()) {
return new C1024d(Arrays.copyOfRange(this.f3109a, 2, this.f3109a.length));
}
return null;
}
public Event m5088h() {
if (m5086e()) {
return EobrEventLogData.m5242b(Arrays.copyOfRange(this.f3109a, 2, this.f3109a.length));
}
return null;
}
public String toString() {
ToStringHelper toStringHelper = MoreObjects.toStringHelper(C0991q.class);
if (m5086e()) {
toStringHelper.add(ShareConstants.MEDIA_TYPE, (Object) "EobrEvent");
Object obj = "INVALID";
try {
obj = C1144s.m5763c(m5088h());
} catch (IOException e) {
}
toStringHelper.add(DataLayer.EVENT_KEY, obj);
} else if (m5085d()) {
toStringHelper.add(ShareConstants.MEDIA_TYPE, (Object) "ExternalEvent").add(DataLayer.EVENT_KEY, m5087f().toString());
} else {
toStringHelper.add(ShareConstants.WEB_DIALOG_PARAM_DATA, "{" + C1180y.m5993b(this.f3109a) + "}");
}
return toStringHelper.toString();
}
}
| [
"eric.lanita@gmail.com"
] | eric.lanita@gmail.com |
9eee43eaff453f84e666bea49a2f66387280eee4 | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Spring/Spring2962.java | 27e5d5f4ee40dd3ccc7da1d8c8f05b193b6cde5e | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 470 | java | @Test
public void combineWithExpressionLanguage() {
ApplicationContext applicationContext =
new ClassPathXmlApplicationContext("simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml",
getClass());
ITestBean foo = applicationContext.getBean("foo", ITestBean.class);
ITestBean bar = applicationContext.getBean("bar", ITestBean.class);
assertEquals("Invalid name", "Baz", foo.getName());
assertEquals("Invalid name", "Baz", bar.getName());
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
0193d1c50198d1df9820b80a587a28f56267c202 | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/ukanth_afwall/aFWall/src/main/java/dev/ukanth/ufirewall/preferences/ShareContract.java | 4bf32ceac90b2f24d1c5e34a453491da41521b23 | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 737 | java | // isComment
package dev.ukanth.ufirewall.preferences;
/**
* isComment
*/
public class isClassOrIsInterface {
public static final String isVariable = "isStringConstant";
public static final String isVariable = "isStringConstant";
public static final String isVariable = "isStringConstant";
public static final int isVariable = isIntegerConstant;
public static final int isVariable = isIntegerConstant;
public static final int isVariable = isIntegerConstant;
public static final int isVariable = isIntegerConstant;
public static final int isVariable = isIntegerConstant;
public static final int isVariable = isIntegerConstant;
public static final int isVariable = isIntegerConstant;
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
c4197fcb0de193c457e8b28f8b981fe49354c799 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/30/30_99b3ad7d781ab08c67d7e1883aea5451c1ccee6f/ChromeNativeTestActivity/30_99b3ad7d781ab08c67d7e1883aea5451c1ccee6f_ChromeNativeTestActivity_s.java | f709960ceac9b2f99337b8325072f0c2bff1cde7 | [] | 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 | 2,478 | java | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.native_test;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
// Android's NativeActivity is mostly useful for pure-native code.
// Our tests need to go up to our own java classes, which is not possible using
// the native activity class loader.
// We start a background thread in here to run the tests and avoid an ANR.
// TODO(bulach): watch out for tests that implicitly assume they run on the main
// thread.
public class ChromeNativeTestActivity extends Activity {
private final String TAG = "ChromeNativeTestActivity";
// Name of our shlib as obtained from a string resource.
private String mLibrary;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mLibrary = getResources().getString(R.string.native_library);
if ((mLibrary == null) || mLibrary.startsWith("replace")) {
nativeTestFailed();
return;
}
try {
loadLibrary();
new Thread() {
@Override
public void run() {
Log.d(TAG, ">>nativeRunTests");
nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext());
// TODO(jrg): make sure a crash in native code
// triggers nativeTestFailed().
Log.d(TAG, "<<nativeRunTests");
}
}.start();
} catch (UnsatisfiedLinkError e) {
Log.e(TAG, "Unable to load lib" + mLibrary + ".so: " + e);
nativeTestFailed();
throw e;
}
}
// Signal a failure of the native test loader to python scripts
// which run tests. For example, we look for
// RUNNER_FAILED build/android/test_package.py.
private void nativeTestFailed() {
Log.e(TAG, "[ RUNNER_FAILED ] could not load native library");
}
private void loadLibrary() throws UnsatisfiedLinkError {
Log.i(TAG, "loading: " + mLibrary);
System.loadLibrary(mLibrary);
Log.i(TAG, "loaded: " + mLibrary);
}
private native void nativeRunTests(String filesDir, Context appContext);
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
41459156ae9e89a574ef08b381de39c19a1498f2 | 4a844631e87313ff3cdc40700074b2fbafc2ae2b | /pipelineGEditor.diagram/src/pipeline/diagram/sheet/PipelinePropertySection.java | e0c74f42d427240f7e1f4f97b28416f490453615 | [
"Apache-2.0"
] | permissive | QualiMaster/QM-IConf | e3eb2eeae813cdd1c80eeecf40bd338e9ffeb987 | fff392b3b9138235dda205657b980189f678ebef | refs/heads/master | 2022-10-27T09:40:56.333091 | 2022-10-13T08:09:30 | 2022-10-13T08:09:30 | 47,550,997 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 504 | java | package pipeline.diagram.sheet;
import org.eclipse.gmf.tooling.runtime.sheet.DefaultPropertySection;
import org.eclipse.ui.views.properties.IPropertySourceProvider;
/**
* @generated
*/
public class PipelinePropertySection extends DefaultPropertySection implements
IPropertySourceProvider {
/**
* Modify/unwrap selection.
* @generated
*/
@Override
protected Object transformSelection(Object selected) {
selected = /*super.*/transformSelectionToDomain(selected);
return selected;
}
}
| [
"elscha@sse.uni-hildesheim.de"
] | elscha@sse.uni-hildesheim.de |
eb677d46da51dbbe99c4f0f7496b8f695e71df9c | 1dfa87318ec70f2167894470b703506a85af3117 | /x-micro-service/x-spring-cloud-gateway-service/src/main/java/com/company/spring/cloud/gateway/service/controller/RouteController.java | 0dcbe74b69087ebeabcd85f6f89067e19b864ab0 | [] | no_license | huangjian888/jeeweb-mybatis-springboot | 2d6e9d2f420a89bf6f7f2aca2b1ab31dce6e0095 | 22926faf93f960e02da4a1cad36ed7d8f980b399 | refs/heads/v3.0-master | 2023-07-20T11:42:30.526563 | 2019-08-20T07:34:56 | 2019-08-20T07:34:56 | 145,819,401 | 356 | 138 | null | 2023-07-17T20:03:38 | 2018-08-23T07:45:54 | Java | UTF-8 | Java | false | false | 2,635 | java | package com.company.spring.cloud.gateway.service.controller;
import com.company.spring.cloud.gateway.service.model.GatewayPredicateDefinition;
import com.company.spring.cloud.gateway.service.model.GatewayRouteDefinition;
import com.company.spring.cloud.gateway.service.route.DynamicRouteServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition;
import org.springframework.cloud.gateway.route.RouteDefinition;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.util.UriComponentsBuilder;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
/**
* 动态路由设置CRUD,需要进行鉴权操作才能访问以下接口
*/
/*
@RestController
@RequestMapping("/route")
public class RouteController {
@Autowired
private DynamicRouteServiceImpl dynamicRouteService;
@PostMapping("/add")
public String add(@RequestBody GatewayRouteDefinition gatewayRouteDefinition) {
try {
RouteDefinition definition = assembleRouteDefinition(gatewayRouteDefinition);
return this.dynamicRouteService.add(definition);
} catch (Exception e) {
e.printStackTrace();
}
return "succss";
}
@GetMapping("/delete/{id}")
public String delete(@PathVariable String id) {
return this.dynamicRouteService.delete(id);
}
@PostMapping("/update")
public String update(@RequestBody GatewayRouteDefinition gatewayRouteDefinition) {
RouteDefinition definition = assembleRouteDefinition(gatewayRouteDefinition);
return this.dynamicRouteService.update(definition);
}
private RouteDefinition assembleRouteDefinition(GatewayRouteDefinition gatewayRouteDefinition) {
RouteDefinition definition = new RouteDefinition();
List<PredicateDefinition> pdList=new ArrayList<>();
definition.setId(gatewayRouteDefinition.getId());
List<GatewayPredicateDefinition> gatewayPredicateDefinitionList=gatewayRouteDefinition.getPredicates();
for (GatewayPredicateDefinition gpDefinition: gatewayPredicateDefinitionList) {
PredicateDefinition predicate = new PredicateDefinition();
predicate.setArgs(gpDefinition.getArgs());
predicate.setName(gpDefinition.getName());
pdList.add(predicate);
}
definition.setPredicates(pdList);
URI uri = UriComponentsBuilder.fromHttpUrl(gatewayRouteDefinition.getUri()).build().toUri();
definition.setUri(uri);
return definition;
}
}
*/
| [
"465265897@qq.com"
] | 465265897@qq.com |
1f18aa82fa8db60638d8c012b5d2fe4d70b4ca11 | b3a3a6f2fc0faf21ae31c92f33eb10c73626231b | /sveditor/plugins/net.sf.sveditor.ui/src/net/sf/sveditor/ui/svcp/SVTreeContentProvider.java | 277e6d006778c69bdf2d3c431ff81c908dbfdc34 | [] | no_license | kammoh/sveditor | 04f7a8cbe61d28717d939687a89de752bd0a14b7 | afc1c6bb74c246fe1fa89300b3d99bc9e8096b04 | refs/heads/master | 2021-01-15T09:38:27.622631 | 2015-04-11T18:04:35 | 2015-04-11T18:04:35 | 34,563,943 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,281 | java | /****************************************************************************
* Copyright (c) 2008-2014 Matthew Ballance 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:
* Matthew Ballance - initial implementation
****************************************************************************/
package net.sf.sveditor.ui.svcp;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.sf.sveditor.core.db.ISVDBChildItem;
import net.sf.sveditor.core.db.ISVDBChildParent;
import net.sf.sveditor.core.db.ISVDBItemBase;
import net.sf.sveditor.core.db.SVDBItemType;
import net.sf.sveditor.ui.argfile.editor.outline.SVArgFileOutlineContent;
import net.sf.sveditor.ui.editor.outline.SVOutlineContent;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
public class SVTreeContentProvider implements ITreeContentProvider {
public static final Set<SVDBItemType> fDoNotRecurseScopes;
public static final Set<SVDBItemType> fExpandInLineItems;
public static final Set<SVDBItemType> fIgnoreItems;
private ISVDBChildParent fRoot;
static {
fDoNotRecurseScopes = new HashSet<SVDBItemType>();
fDoNotRecurseScopes.add(SVDBItemType.Function);
fDoNotRecurseScopes.add(SVDBItemType.Task);
fDoNotRecurseScopes.add(SVDBItemType.Coverpoint);
fDoNotRecurseScopes.add(SVDBItemType.CoverpointCross);
fDoNotRecurseScopes.add(SVDBItemType.Constraint);
fDoNotRecurseScopes.add(SVDBItemType.ConfigDecl);
fDoNotRecurseScopes.add(SVDBItemType.AlwaysStmt);
fExpandInLineItems = new HashSet<SVDBItemType>();
fExpandInLineItems.add(SVDBItemType.VarDeclStmt);
fExpandInLineItems.add(SVDBItemType.ParamPortDecl);
fExpandInLineItems.add(SVDBItemType.ModIfcInst);
fExpandInLineItems.add(SVDBItemType.ImportStmt);
fExpandInLineItems.add(SVDBItemType.ExportStmt);
fExpandInLineItems.add(SVDBItemType.DefParamStmt);
fIgnoreItems = new HashSet<SVDBItemType>();
fIgnoreItems.add(SVDBItemType.NullStmt);
}
public Object[] getChildren(Object elem) {
int file_id = -1;
if (fRoot != null && fRoot.getLocation() != null) {
file_id = fRoot.getLocation().getFileId();
}
if (elem instanceof ISVDBItemBase) {
List<ISVDBItemBase> c = new ArrayList<ISVDBItemBase>();
ISVDBItemBase it = (ISVDBItemBase)elem;
if (it instanceof ISVDBChildParent &&
!fDoNotRecurseScopes.contains(it.getType())) {
for (ISVDBChildItem ci : ((ISVDBChildParent)it).getChildren()) {
if (file_id != -1 && ci.getLocation() != null) {
if (file_id != ci.getLocation().getFileId()) {
continue;
}
}
if (fExpandInLineItems.contains(ci.getType())) {
for (ISVDBChildItem ci_p : ((ISVDBChildParent)ci).getChildren()) {
c.add(ci_p);
}
} else if (!fIgnoreItems.contains(ci.getType())) {
c.add(ci);
}
}
} else {
// System.out.println("elem instanceof " + (elem instanceof ISVDBChildParent));
}
return c.toArray();
} else {
}
return new Object[0];
}
public Object getParent(Object element) {
if (element instanceof ISVDBChildItem) {
return ((ISVDBChildItem)element).getParent();
} else {
return null;
}
}
public boolean hasChildren(Object element) {
if (element instanceof ISVDBChildParent) {
ISVDBChildParent p = (ISVDBChildParent)element;
if (!fDoNotRecurseScopes.contains(p.getType())) {
return p.getChildren().iterator().hasNext();
}
}
return false;
}
public Object[] getElements(Object element) {
return getChildren(element);
}
public void dispose() {
// TODO Auto-generated method stub
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (newInput instanceof SVOutlineContent) {
fRoot = ((SVOutlineContent)newInput).getFile();
} else if (newInput instanceof SVArgFileOutlineContent) {
fRoot = ((SVArgFileOutlineContent)newInput).getFile();
} else if (newInput instanceof ISVDBChildParent) {
fRoot = (ISVDBChildParent)newInput;
}
}
}
| [
"matt.ballance@gmail.com"
] | matt.ballance@gmail.com |
3b909a88b08912f859d5a8ad3fd28ae879d22170 | af34e0837218a5616cb661365488253228064b97 | /evtp-app-blockchain/src/main/java/com/hhdl/evtp/util/DateUtil.java | d60030262f388a18ef191074bbad49ea8ff7be4c | [
"Apache-2.0"
] | permissive | wuhuaqiang/evtp-app | 6ed5f306bd70afd18f2baca212bdc172d07683b3 | ce9cda14e99872ec51712cd9f9584165953f09a0 | refs/heads/master | 2022-09-21T03:35:27.203497 | 2020-05-13T09:04:10 | 2020-05-13T09:04:10 | 215,243,534 | 0 | 0 | Apache-2.0 | 2022-09-01T23:14:15 | 2019-10-15T08:12:21 | CSS | UTF-8 | Java | false | false | 830 | java | package com.hhdl.evtp.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateUtil {
private static Long YEAR2000 = 946656000000L;
public static Date getFirtDate() {
return new Date(YEAR2000);
}
public static Date parseDateStr(String dateStr) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
try {
return sdf2.parse(dateStr);
} catch (ParseException e) {
// TODO Auto-generated catch block
try {
return sdf1.parse(dateStr);
} catch (ParseException e1) {
// TODO Auto-generated catch block
return null;
}
}
}
}
| [
"609676374@qq.com"
] | 609676374@qq.com |
65a2df44aa167056ab4cf93f68672f7e4cb936e4 | c426f7b90138151ffeb50a0d2c0d631abeb466b6 | /inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/project/RecommenderProjectSettingsPanelFactory.java | a377ae2e0fe2c08c74f5a8bb44b86de830de4e8b | [
"Apache-2.0"
] | permissive | inception-project/inception | 7a06b8cd1f8e6a7eb44ee69e842590cf2989df5f | ec95327e195ca461dd90c2761237f92a879a1e61 | refs/heads/main | 2023-09-02T07:52:53.578849 | 2023-09-02T07:44:11 | 2023-09-02T07:44:11 | 127,004,420 | 511 | 141 | Apache-2.0 | 2023-09-13T19:09:49 | 2018-03-27T15:04:00 | Java | UTF-8 | Java | false | false | 2,073 | java | /*
* Copyright 2018
* Ubiquitous Knowledge Processing (UKP) Lab and FG Language Technology
* Technische Universität Darmstadt
*
* Licensed to the Technische Universität Darmstadt under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The Technische Universität Darmstadt
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.
*
* 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.tudarmstadt.ukp.inception.recommendation.project;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.springframework.core.annotation.Order;
import de.tudarmstadt.ukp.clarin.webanno.model.Project;
import de.tudarmstadt.ukp.clarin.webanno.ui.core.settings.ProjectSettingsPanelFactory;
import de.tudarmstadt.ukp.inception.recommendation.config.RecommenderServiceAutoConfiguration;
/**
* <p>
* This class is exposed as a Spring Component via
* {@link RecommenderServiceAutoConfiguration#recommenderProjectSettingsPanelFactory}.
* </p>
*/
@Order(RecommenderProjectSettingsPanelFactory.ORDER)
public class RecommenderProjectSettingsPanelFactory
implements ProjectSettingsPanelFactory
{
public static final int ORDER = 360;
@Override
public String getPath()
{
return "/recommenders";
}
@Override
public String getLabel()
{
return "Recommenders";
}
@Override
public Panel createSettingsPanel(String aID, final IModel<Project> aProjectModel)
{
return new ProjectRecommendersPanel(aID, aProjectModel);
}
}
| [
"richard.eckart@gmail.com"
] | richard.eckart@gmail.com |
ad34e96a11ba320e283df1f3aa6bb5a57568e262 | 19a1453da936f82fa4d7833644deb4831a8ed527 | /src/main/java/com/madara/hackln/controller/AppController.java | 93713c0f88164e94694fdfe5bc6bac483f8667d8 | [] | no_license | hsmdayananda/hackln-app2 | 69e8bc94ef449d086350bf196e381bb07f08b327 | ed6a8ebea8c0cc4cd17da1a2401b292690780d09 | refs/heads/master | 2020-03-24T17:20:03.682313 | 2018-07-30T10:06:38 | 2018-07-30T10:06:38 | 142,856,339 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 677 | java | package com.madara.hackln.controller;
import com.madara.hackln.dto.Request;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
@RestController
public class AppController {
@RequestMapping(value = "/app2", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.OK)
public String app1(@RequestBody Request request) {
String default_ = "other";
if (request.getGender().equals("M")){
return "Mr".concat(request.getName());
}
if (request.getGender().equals("F")){
return "Ms".concat(request.getName());
}
else
return default_;
}
}
| [
"you@example.com"
] | you@example.com |
fcdb5ca43dd384c78a6cd41db80d385c8496a69c | 3953a0fdfc7da2b47b81c48df0a398850f17da4a | /src/main/java/br/inf/portalfiscal/xsd/nfe/leiauteNFe/package-info.java | cf24a2a1acf67b38c60198b444b61e14aee73796 | [] | no_license | tlmacedo/xsd_Nfe_Cte | 83d34088ad063e04906c6c910ac4d501d560d65d | 6b3eea5027cf2927323c4247c7c3c7a3349c8be0 | refs/heads/main | 2023-01-27T14:58:48.453452 | 2020-12-02T22:53:14 | 2020-12-02T22:53:14 | 318,008,134 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | //
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementaxe7xe3o de Referxeancia (JAXB) de Bind XML, v2.3.1-b171012.0423
// Consulte <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Todas as modificaxe7xf5es neste arquivo serxe3o perdidas apxf3s a recompilaxe7xe3o do esquema de origem.
// Gerado em: 2020.12.02 xe0s 10:03:03 AM AMT
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.portalfiscal.inf.br/nfe", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package br.inf.portalfiscal.xsd.nfe.leiauteNFe;
| [
"tl.macedo@hotmail.com"
] | tl.macedo@hotmail.com |
a3e7cd2dff67e1ea0b69e7d7f929984c840ec48e | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/dbeaver/2015/4/DBVEntityConstraintColumn.java | 921976fc35e247b5dc3f982eba3bb78c4c22a1bb | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 1,960 | java | /*
* Copyright (C) 2010-2015 Serge Rieder
* serge@jkiss.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.virtual;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.model.struct.DBSEntityAttribute;
import org.jkiss.dbeaver.model.struct.DBSEntityAttributeRef;
import org.jkiss.dbeaver.runtime.VoidProgressMonitor;
/**
* Constraint column
*/
public class DBVEntityConstraintColumn implements DBSEntityAttributeRef {
private final DBVEntityConstraint constraint;
private final String attributeName;
public DBVEntityConstraintColumn(DBVEntityConstraint constraint, String attributeName)
{
this.constraint = constraint;
this.attributeName = attributeName;
}
@NotNull
@Override
public DBSEntityAttribute getAttribute()
{
// Here we use void monitor.
// In real life entity columns SHOULD be already read so it doesn't matter
// But I'm afraid that in some very special cases it does. Thant's too bad.
return constraint.getParentObject().getAttribute(VoidProgressMonitor.INSTANCE, attributeName);
}
public String getAttributeName()
{
return attributeName;
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
a63e45d98a239da0ea629cac788a953eaca518b3 | 4c03af53e4bf38961923b167bcc3fd5fb4d4a789 | /lwb/metalang/sdf3/sdf3/src/test/java/mb/sdf3/adapter/SpecToParenthesizerTest.java | 520c1f55024d2f8cd46946cda03a55ae94bae7df | [
"Apache-2.0"
] | permissive | metaborg/spoofax-pie | a367b679bd21d7f89841f4ef3e984e5c1653d5af | 98f49ef75fcd4d957a65c9220e4dc4c01d354b01 | refs/heads/develop | 2023-07-27T06:08:28.446264 | 2023-07-16T14:46:02 | 2023-07-16T14:46:02 | 102,472,170 | 10 | 16 | Apache-2.0 | 2023-02-06T17:30:58 | 2017-09-05T11:19:03 | Java | UTF-8 | Java | false | false | 1,771 | java | package mb.sdf3.adapter;
import mb.common.result.Result;
import mb.common.util.ExceptionPrinter;
import mb.pie.api.MixedSession;
import mb.resource.fs.FSResource;
import mb.sdf3.task.spec.Sdf3ParseTableToParenthesizer;
import mb.sdf3.task.spec.Sdf3SpecToParseTable;
import org.junit.jupiter.api.Test;
import org.spoofax.interpreter.terms.IStrategoTerm;
import static org.junit.jupiter.api.Assertions.*;
import static org.spoofax.terms.util.TermUtils.*;
class SpecToParenthesizerTest extends TestBase {
@Test void testTask() throws Exception {
final FSResource resource = textFile("src/start.sdf3", "module start context-free syntax A = <A>");
final Sdf3ParseTableToParenthesizer taskDef = component.getSdf3ParseTableToParenthesizer();
try(final MixedSession session = newSession()) {
final Sdf3SpecToParseTable.Input parseTableInput = new Sdf3SpecToParseTable.Input(
specConfig(rootDirectory.getPath(), directory("src").getPath(), resource.getPath()),
false
);
final Sdf3ParseTableToParenthesizer.Args parenthesizerArgs = new Sdf3ParseTableToParenthesizer.Args(
component.getSdf3SpecToParseTable().createSupplier(parseTableInput),
"start"
);
final Result<IStrategoTerm, ?> result = session.require(taskDef.createTask(parenthesizerArgs));
assertTrue(result.isOk(), () -> new ExceptionPrinter().printExceptionToString(result.getErr()));
final IStrategoTerm output = result.unwrap();
log.info("{}", output);
assertNotNull(output);
assertTrue(isAppl(output, "Module"));
assertTrue(isStringAt(output, 0, "pp/start-parenthesize"));
}
}
}
| [
"gabrielkonat@gmail.com"
] | gabrielkonat@gmail.com |
b3fb0505cef6cb73483fd4bd949e4e27a63049b4 | b6ea417b48402d85b6fe90299c51411b778c07cc | /spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractNameValueExpression.java | fbd01a7f34ae473ecb34eab1969510f615acd716 | [
"Apache-2.0"
] | permissive | DevHui/spring-framework | 065f24e96eaaed38495b9d87bc322db82b6a046c | 4a2f291e26c6f78c3875dea13432be21bb1c0ed6 | refs/heads/master | 2020-12-04T21:08:18.445815 | 2020-01-15T03:54:42 | 2020-01-15T03:54:42 | 231,526,595 | 1 | 0 | Apache-2.0 | 2020-01-03T06:28:30 | 2020-01-03T06:28:29 | null | UTF-8 | Java | false | false | 3,694 | java | /*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.mvc.condition;
import org.springframework.lang.Nullable;
import org.springframework.util.ObjectUtils;
import javax.servlet.http.HttpServletRequest;
/**
* Supports "name=value" style expressions as described in:
* {@link org.springframework.web.bind.annotation.RequestMapping#params()} and
* {@link org.springframework.web.bind.annotation.RequestMapping#headers()}.
*
* @param <T> the value type
* @author Rossen Stoyanchev
* @author Arjen Poutsma
* @since 3.1
*/
abstract class AbstractNameValueExpression<T> implements NameValueExpression<T> {
protected final String name;
@Nullable
protected final T value;
protected final boolean isNegated;
AbstractNameValueExpression(String expression) {
int separator = expression.indexOf('=');
if (separator == -1) {
this.isNegated = expression.startsWith("!");
this.name = (this.isNegated ? expression.substring(1) : expression);
this.value = null;
} else {
this.isNegated = (separator > 0) && (expression.charAt(separator - 1) == '!');
this.name = (this.isNegated ? expression.substring(0, separator - 1) : expression.substring(0, separator));
this.value = parseValue(expression.substring(separator + 1));
}
}
@Override
public String getName() {
return this.name;
}
@Override
@Nullable
public T getValue() {
return this.value;
}
@Override
public boolean isNegated() {
return this.isNegated;
}
public final boolean match(HttpServletRequest request) {
boolean isMatch;
if (this.value != null) {
isMatch = matchValue(request);
} else {
isMatch = matchName(request);
}
return (this.isNegated ? !isMatch : isMatch);
}
protected abstract boolean isCaseSensitiveName();
protected abstract T parseValue(String valueExpression);
protected abstract boolean matchName(HttpServletRequest request);
protected abstract boolean matchValue(HttpServletRequest request);
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (other == null || getClass() != other.getClass()) {
return false;
}
AbstractNameValueExpression<?> that = (AbstractNameValueExpression<?>) other;
return ((isCaseSensitiveName() ? this.name.equals(that.name) : this.name.equalsIgnoreCase(that.name)) &&
ObjectUtils.nullSafeEquals(this.value, that.value) && this.isNegated == that.isNegated);
}
@Override
public int hashCode() {
int result = (isCaseSensitiveName() ? this.name.hashCode() : this.name.toLowerCase().hashCode());
result = 31 * result + (this.value != null ? this.value.hashCode() : 0);
result = 31 * result + (this.isNegated ? 1 : 0);
return result;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
if (this.value != null) {
builder.append(this.name);
if (this.isNegated) {
builder.append('!');
}
builder.append('=');
builder.append(this.value);
} else {
if (this.isNegated) {
builder.append('!');
}
builder.append(this.name);
}
return builder.toString();
}
}
| [
"pengshaohui@markor.com.cn"
] | pengshaohui@markor.com.cn |
50247f1975c22e087c9ad31fdf4e9ddcb502fd3d | 30620f7010d11255f00df9b4f0c4e9bdda2fa11d | /Module 2/Chapter 11/Windows/xamformsinsights/droid/obj/debug/android/src/md5b60ffeb829f638581ab2bb9b1a7f4f3f/ButtonRenderer_ButtonClickListener.java | 1a9e5b04af87d1e1f95712795090fcd8c14f9754 | [
"MIT"
] | permissive | PacktPublishing/Xamarin-Cross-Platform-Mobile-Application-Development | 957db5a284c9b590d34d932909724e9eb10ca7a6 | dc83c18f4d4d1720b62f3077b4f53d5a90143304 | refs/heads/master | 2023-02-11T16:07:55.095797 | 2023-01-30T10:24:05 | 2023-01-30T10:24:05 | 66,077,875 | 7 | 17 | MIT | 2022-06-22T17:23:02 | 2016-08-19T11:32:15 | Java | UTF-8 | Java | false | false | 1,500 | java | package md5b60ffeb829f638581ab2bb9b1a7f4f3f;
public class ButtonRenderer_ButtonClickListener
extends java.lang.Object
implements
mono.android.IGCUserPeer,
android.view.View.OnClickListener
{
static final String __md_methods;
static {
__md_methods =
"n_onClick:(Landroid/view/View;)V:GetOnClick_Landroid_view_View_Handler:Android.Views.View/IOnClickListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\n" +
"";
mono.android.Runtime.register ("Xamarin.Forms.Platform.Android.ButtonRenderer+ButtonClickListener, Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null", ButtonRenderer_ButtonClickListener.class, __md_methods);
}
public ButtonRenderer_ButtonClickListener () throws java.lang.Throwable
{
super ();
if (getClass () == ButtonRenderer_ButtonClickListener.class)
mono.android.TypeManager.Activate ("Xamarin.Forms.Platform.Android.ButtonRenderer+ButtonClickListener, Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null", "", this, new java.lang.Object[] { });
}
public void onClick (android.view.View p0)
{
n_onClick (p0);
}
private native void n_onClick (android.view.View p0);
java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
}
| [
"vishalm@packtpub.com"
] | vishalm@packtpub.com |
6b0485cbf0a38149201b5174a7d0e29cb96b3db7 | 9c60d6b83ee512ec93b1a1a438d715836f96d17b | /chrome/android/java/src/org/chromium/chrome/browser/autofill/keyboard_accessory/sheet_tabs/PasswordAccessorySheetCoordinator.java | d7ae5636149a0924f4883b7b5f143487c9db5eb2 | [
"BSD-3-Clause"
] | permissive | HYJ199688/chromium | 5a09491b640e068a22bf85123d421e1e427d9c00 | 70eb35d5df0548b621b7bbc3d380ef1a6a6f6db8 | refs/heads/master | 2022-11-12T22:24:52.184870 | 2019-03-29T09:43:44 | 2019-03-29T09:43:44 | 178,378,850 | 1 | 0 | null | 2019-03-29T09:51:48 | 2019-03-29T09:51:48 | null | UTF-8 | Java | false | false | 5,979 | java | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.autofill.keyboard_accessory.sheet_tabs;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.support.v7.content.res.AppCompatResources;
import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.autofill.keyboard_accessory.AccessoryTabType;
import org.chromium.chrome.browser.autofill.keyboard_accessory.data.KeyboardAccessoryData.AccessorySheetData;
import org.chromium.chrome.browser.autofill.keyboard_accessory.data.Provider;
import org.chromium.chrome.browser.autofill.keyboard_accessory.sheet_tabs.AccessorySheetTabModel.AccessorySheetDataPiece;
import org.chromium.ui.modelutil.ListModel;
import org.chromium.ui.modelutil.RecyclerViewAdapter;
import org.chromium.ui.modelutil.SimpleRecyclerViewMcp;
/**
* This component is a tab that can be added to the ManualFillingCoordinator which shows it
* as bottom sheet below the keyboard accessory.
*/
public class PasswordAccessorySheetCoordinator extends AccessorySheetTabCoordinator {
private final AccessorySheetTabModel mModel = new AccessorySheetTabModel();
private final PasswordAccessorySheetMediator mMediator;
/**
* Provides the icon used in this sheet. Simplifies mocking in controller tests.
*/
@VisibleForTesting
public static class IconProvider {
private final static IconProvider sInstance = new IconProvider();
private Drawable mIcon;
private IconProvider() {}
public static IconProvider getInstance() {
return sInstance;
}
/**
* Loads and remembers the icon used for this class. Used to mock icons in unit tests.
* @param context The context containing the icon resources.
* @return The icon as {@link Drawable}.
*/
public Drawable getIcon(Context context) {
if (mIcon != null) return mIcon;
mIcon = AppCompatResources.getDrawable(context, R.drawable.ic_vpn_key_grey);
return mIcon;
}
@VisibleForTesting
public void setIconForTesting(Drawable icon) {
mIcon = icon;
}
}
/**
* Creates the passwords tab.
* @param context The {@link Context} containing resources like icons and layouts for this tab.
* @param scrollListener An optional listener that will be bound to the inflated recycler view.
*/
public PasswordAccessorySheetCoordinator(
Context context, @Nullable RecyclerView.OnScrollListener scrollListener) {
super(context.getString(R.string.prefs_saved_passwords_title),
IconProvider.getInstance().getIcon(context),
context.getString(R.string.password_accessory_sheet_toggle),
context.getString(R.string.password_accessory_sheet_opened),
R.layout.password_accessory_sheet, AccessoryTabType.PASSWORDS, scrollListener);
mMediator = new PasswordAccessorySheetMediator(mModel);
}
@Override
public void onTabCreated(ViewGroup view) {
super.onTabCreated(view);
if (ChromeFeatureList.isEnabled(ChromeFeatureList.AUTOFILL_KEYBOARD_ACCESSORY)) {
PasswordAccessorySheetModernViewBinder.initializeView((RecyclerView) view, mModel);
} else {
PasswordAccessorySheetViewBinder.initializeView((RecyclerView) view, mModel);
}
}
@Override
public void onTabShown() {
mMediator.onTabShown();
}
/**
* Registers the provider pushing a complete new instance of {@link AccessorySheetData} that
* should be displayed as sheet for this tab.
* @param accessorySheetDataProvider A {@link Provider<AccessorySheetData>}.
*/
public void registerDataProvider(Provider<AccessorySheetData> accessorySheetDataProvider) {
accessorySheetDataProvider.addObserver(mMediator);
}
/**
* Creates an adapter to an {@link PasswordAccessorySheetViewBinder} that is wired
* up to a model change processor listening to the {@link AccessorySheetTabModel}.
* @param model the {@link AccessorySheetTabModel} the adapter gets its data from.
* @return Returns a fully initialized and wired adapter to a PasswordAccessorySheetViewBinder.
*/
static RecyclerViewAdapter<AccessorySheetTabViewBinder.ElementViewHolder, Void> createAdapter(
AccessorySheetTabModel model) {
return new RecyclerViewAdapter<>(
new SimpleRecyclerViewMcp<>(model, AccessorySheetDataPiece::getType,
AccessorySheetTabViewBinder.ElementViewHolder::bind),
PasswordAccessorySheetViewBinder::create);
}
/**
* Creates an adapter to an {@link PasswordAccessorySheetModernViewBinder} that is wired up to
* the model change processor which listens to the {@link AccessorySheetTabModel}.
* @param model the {@link AccessorySheetTabModel} the adapter gets its data from.
* @return Returns an {@link PasswordAccessorySheetModernViewBinder} wired to a MCP.
*/
static RecyclerViewAdapter<AccessorySheetTabViewBinder.ElementViewHolder, Void>
createModernAdapter(ListModel<AccessorySheetDataPiece> model) {
return new RecyclerViewAdapter<>(
new SimpleRecyclerViewMcp<>(model, AccessorySheetDataPiece::getType,
AccessorySheetTabViewBinder.ElementViewHolder::bind),
PasswordAccessorySheetModernViewBinder::create);
}
@VisibleForTesting
public AccessorySheetTabModel getSheetDataPiecesForTesting() {
return mModel;
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
c645887392d98f59007d768c75e9bb345d5fb50f | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/neo4j/2018/4/DelegatingIndexUpdater.java | a129583fbee30241d182b0725c0468e34cfe2c58 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 1,437 | java | /*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.api.index.updater;
import java.io.IOException;
import org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException;
import org.neo4j.kernel.api.index.IndexEntryUpdate;
import org.neo4j.kernel.api.index.IndexUpdater;
public abstract class DelegatingIndexUpdater implements IndexUpdater
{
protected final IndexUpdater delegate;
public DelegatingIndexUpdater( IndexUpdater delegate )
{
this.delegate = delegate;
}
@Override
public void process( IndexEntryUpdate<?> update ) throws IOException, IndexEntryConflictException
{
delegate.process( update );
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
1b744c7081fdb0182745eac165d093a167674397 | 230333f5b2c0c5dc869614e6e0c48b159dd3ae9a | /11000/Problem_11057/Main.java | 956de9a897672abffd5ba43093d329a13eb7f221 | [
"MIT"
] | permissive | DevrisOfStar/acmicpc | e954b20d230c44e2c1f4da777b787ddcbf06d360 | d4005790214a3afe541014f4201e664e69c70b71 | refs/heads/master | 2023-08-08T01:07:19.717355 | 2023-08-07T16:34:11 | 2023-08-07T16:34:11 | 199,366,273 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 615 | java | package Problem_11057;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[][] arr = new int[1001][10];
int N = sc.nextInt();
for(int i = 0; i<10; i++) {
arr[1][i] = 1;
}
for(int i = 2; i<= N; i++) {
for(int j = 0; j< 10; j++) {
for(int k = 0; k< 10; k++) {
if(j <= k) {
arr[i][j] += arr[i-1][k];
arr[i][j] %= 10007;
}
}
}
}
int sum = 0;
for(int i = 0 ; i<10; i++) {
sum += arr[N][i];
sum %= 10007;
}
System.out.println(sum);
}
}
| [
"yh1483@naver.com"
] | yh1483@naver.com |
dd9053c5640a33502f0eb78fdb1927846b3cec40 | 61928fc99ec5fd73d083cf381617a28f78d832c3 | /skysail.server.app.prototyper/test/io/skysail/server/app/designer/fields/resources/test/AbstractFieldResourceTest.java | 696f3fff96681afa6c3c345c29dad910dd4e3a30 | [
"Apache-2.0"
] | permissive | evandor/skysail | 399af3c02449930f9082ffb52bd6fd720e3afc04 | ca26e9b98e802111aa63a5edf719a331c0f6d062 | refs/heads/master | 2021-01-23T14:56:04.522658 | 2017-05-30T09:22:16 | 2017-05-30T09:22:16 | 54,588,839 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,248 | java | //package io.skysail.server.app.designer.fields.resources.test;
//
//import static org.hamcrest.CoreMatchers.is;
//import static org.junit.Assert.assertThat;
//
//import java.io.IOException;
//
//import org.restlet.data.Status;
//
//import io.skysail.api.responses.SkysailResponse;
//import io.skysail.server.app.designer.application.DbApplication;
//import io.skysail.server.app.designer.fields.*;
//import io.skysail.server.app.designer.test.AbstractDesignerResourceTest;
//import io.skysail.server.app.designer.test.utils.YamlTestFileReader;
//import io.skysail.server.restlet.resources.SkysailServerResource;
//
//public abstract class AbstractFieldResourceTest extends AbstractDesignerResourceTest {
//
// protected DbApplication createApplication() {
// DbApplication anApplication = DbApplication.builder().name("Application_" + randomString())
// .packageName("pgkName").path("../").projectName("projectName").build();
// SkysailResponse<DbApplication> post = postApplicationResource.post(anApplication, JSON_VARIANT);
// assertThat(post.getResponse().getStatus(), is(Status.SUCCESS_CREATED));
// getAttributes().clear();
//
// return post.getEntity();
// }
//
// protected void assertListResult(SkysailServerResource<?> resource, SkysailResponse<DbEntityTextField> result,
// DbEntityField entity, Status status) {
// DbEntityField dbEntity = result.getEntity();
// assertThat(responses.get(resource.getClass().getName()).getStatus(), is(status));
// assertThat(dbEntity, is(entity));
// }
//
// protected DbApplication prepareApplication(String testFileName, String name) throws IOException, Exception {
// DbApplication appFromFile = YamlTestFileReader.read("fieldtests", testFileName);
// appFromFile.setName(name);
// SkysailResponse<DbApplication> response = postApplicationResource.post(appFromFile, JSON_VARIANT);
// assertThat(response.getResponse().getStatus(),is(Status.SUCCESS_CREATED));
// setAttributes("id", response.getEntity().getId().replace("#", ""));
// setUpResource(applicationResource, application.getContext());
// return applicationResource.getEntity();
// }
//
//}
| [
"evandor@gmail.com"
] | evandor@gmail.com |
5daa6e2330210649510acf720125164ff920917f | c096a03908fdc45f29574578b87662e20c1f12d4 | /com/src/main/java/lip/com/google/android/gms/drive/metadata/internal/j.java | 719035f4e335d0ff3ee631155e0fdf8d4a698f9b | [] | no_license | aboaldrdaaa2/Myappt | 3762d0572b3f0fb2fbb3eb8f04cb64c6506c2401 | 38f88b7924c987ee9762894a7a5b4f8feb92bfff | refs/heads/master | 2020-03-30T23:55:13.551721 | 2018-10-05T13:41:24 | 2018-10-05T13:41:24 | 151,718,350 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 619 | java | package lip.com.google.android.gms.drive.metadata.internal;
import android.os.Bundle;
import android.os.Parcelable;
import com.google.android.gms.drive.metadata.a;
import java.util.Collection;
public abstract class j<T extends Parcelable> extends a<T> {
public j(String str, Collection<String> collection, Collection<String> collection2, int i) {
super(str, collection, collection2, i);
}
protected void a(Bundle bundle, T t) {
bundle.putParcelable(getName(), t);
}
/* renamed from: l */
protected T f(Bundle bundle) {
return bundle.getParcelable(getName());
}
}
| [
"aboaldrdaaa2@gmail.com"
] | aboaldrdaaa2@gmail.com |
a7401e31bfd9158988c2e4278d21333832d8f413 | f045bd8718eecdd3209290f3c94477c9a869f9af | /sources/com/baidu/location/f/l.java | 5a01160622a9bf1d665a467b7a702746a14f727f | [] | no_license | KswCarProject/Launcher3-PX6 | ba6c44c150649ba2f8ea40eb49fde1c2dc6bee5e | 56eab00443667f38622a94975f69011e56d6dc27 | refs/heads/master | 2022-06-18T02:41:27.553573 | 2020-05-13T02:05:40 | 2020-05-13T02:05:40 | 259,748,185 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 640 | java | package com.baidu.location.f;
import android.net.wifi.WifiInfo;
public abstract class l {
public synchronized void b() {
}
public synchronized void c() {
}
public boolean d() {
return false;
}
public boolean e() {
return false;
}
public boolean f() {
return false;
}
public boolean g() {
return false;
}
public WifiInfo h() {
return null;
}
public i i() {
return null;
}
public i j() {
return null;
}
public i k() {
return null;
}
public String l() {
return null;
}
}
| [
"nicholas@prjkt.io"
] | nicholas@prjkt.io |
ddfd4d2a0583f4e9ddf0c4ea24d549791f5d1562 | a7bb712f72f50433cb50597ad2ae603e5ee530d9 | /TileEntities/PowerGen/TileEntitySteamLine.java | 12701d17012691067e68403410f889e33800902b | [] | no_license | ReikaKalseki/ReactorCraft | cb845d4e1ad8e3a6ce11b30e9bbc4a11fc32bf1b | d788f1bcd33c66758d687faaf692c2668595021b | refs/heads/master | 2023-07-26T06:50:57.928091 | 2023-07-24T05:27:05 | 2023-07-24T05:27:05 | 12,451,413 | 41 | 42 | null | 2021-12-26T14:22:38 | 2013-08-29T04:19:52 | Java | UTF-8 | Java | false | false | 7,607 | java | /*******************************************************************************
* @author Reika Kalseki
*
* Copyright 2017
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
******************************************************************************/
package Reika.ReactorCraft.TileEntities.PowerGen;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import Reika.ChromatiCraft.API.Interfaces.WorldRift;
import Reika.DragonAPI.Instantiable.Data.Proportionality;
import Reika.DragonAPI.Libraries.ReikaNBTHelper;
import Reika.DragonAPI.Libraries.ReikaNBTHelper.NBTIO;
import Reika.ReactorCraft.ReactorCraft;
import Reika.ReactorCraft.Auxiliary.SteamTile;
import Reika.ReactorCraft.Base.TileEntityLine;
import Reika.ReactorCraft.Registry.ReactorOptions;
import Reika.ReactorCraft.Registry.ReactorTiles;
import Reika.ReactorCraft.Registry.ReactorType;
import Reika.ReactorCraft.Registry.WorkingFluid;
import Reika.ReactorCraft.TileEntities.TileEntitySteamDiffuser;
import Reika.ReactorCraft.TileEntities.Fission.TileEntityReactorBoiler;
import Reika.RotaryCraft.API.Interfaces.PressureTile;
import Reika.RotaryCraft.Auxiliary.Interfaces.PumpablePipe;
import Reika.RotaryCraft.Registry.MachineRegistry;
import Reika.RotaryCraft.TileEntities.Auxiliary.TileEntityPipePump;
public class TileEntitySteamLine extends TileEntityLine implements PumpablePipe, SteamTile, PressureTile {
private int steam;
private WorkingFluid fluid = WorkingFluid.EMPTY;
private Proportionality<ReactorType> source = new Proportionality();
@Override
public ReactorTiles getTile() {
return ReactorTiles.STEAMLINE;
}
@Override
public void updateEntity(World world, int x, int y, int z, int meta) {
super.updateEntity(world, x, y, z, meta);
this.drawFromBoiler(world, x, y, z);
this.getPipeSteam(world, x, y, z);
if (steam <= 0) {
fluid = WorkingFluid.EMPTY;
source.clear();
}
else if (this.getPressure() > this.getMaxPressure()) {
this.delete();
world.createExplosion(null, x+0.5, y+0.5, z+0.5, 2, true);
}
}
@Override
protected boolean canConnectToMachine(Block id, int meta, ForgeDirection dir, TileEntity te) {
if (id == ReactorTiles.BOILER.getBlock() && meta == ReactorTiles.BOILER.getBlockMetadata() && dir == ForgeDirection.DOWN)
return true;
if (id == ReactorTiles.GRATE.getBlock() && meta == ReactorTiles.GRATE.getBlockMetadata())
return true;
if (id == ReactorTiles.BIGTURBINE.getBlock() && meta == ReactorTiles.BIGTURBINE.getBlockMetadata())
return true;
if (id == ReactorTiles.DIFFUSER.getBlock() && meta == ReactorTiles.DIFFUSER.getBlockMetadata()) {
return ((TileEntitySteamDiffuser)this.getAdjacentTileEntity(dir)).getFacing().getOpposite() == dir;
}
if (id == MachineRegistry.PIPEPUMP.getBlock() && meta == MachineRegistry.PIPEPUMP.getBlockMetadata()) {
return ((TileEntityPipePump)this.getAdjacentTileEntity(dir)).canConnectToPipeOnSide(dir);
}
return false;
}
private void drawFromBoiler(World world, int x, int y, int z) {
ReactorTiles r = ReactorTiles.getTE(world, x, y-1, z);
if (r == ReactorTiles.BOILER) {
TileEntityReactorBoiler te = (TileEntityReactorBoiler)world.getTileEntity(x, y-1, z);
if (te.getTileEntityAge() > 5 && this.canTakeInWorkingFluid(te.getWorkingFluid())) {
fluid = te.getWorkingFluid();
int s = te.removeSteam();
steam += s;
for (ReactorType rt : te.getReactorTypeSet()) {
double f = te.getReactorTypeFraction(rt);
if (rt == null || rt == ReactorType.NONE)
rt = te.getReactorType();
if (rt == null || rt == ReactorType.NONE)
rt = te.getDefaultReactorType();
source.addValue(rt, s*f);
}
}
}
}
private boolean canTakeInWorkingFluid(WorkingFluid f) {
if (f == WorkingFluid.EMPTY)
return false;
if (fluid == WorkingFluid.EMPTY)
return true;
if (fluid == f)
return true;
return false;
}
private void getPipeSteam(World world, int x, int y, int z) {
for (int i = 0; i < 6; i++) {
TileEntity te = this.getAdjacentTileEntity(dirs[i]);
if (te instanceof TileEntitySteamLine) {
TileEntitySteamLine tile = (TileEntitySteamLine)te;
if (this.canTakeInWorkingFluid(tile.fluid))
this.readPipe(tile);
}
else if (te instanceof WorldRift && !world.isRemote) {
WorldRift wr = (WorldRift)te;
TileEntity tile = wr.getTileEntityFrom(dirs[i]);
if (tile instanceof TileEntitySteamLine) {
TileEntitySteamLine ts = (TileEntitySteamLine)tile;
if (this.canTakeInWorkingFluid(ts.fluid))
this.readPipe(ts);
}
}
}
}
private void readPipe(TileEntitySteamLine te) {
int dS = te.steam-steam;
if (dS > 0) {
//ReikaJavaLibrary.pConsole(steam+":"+te.steam);
int amt = dS/2+1;
float frac = amt/(float)te.steam;
steam += amt;
te.steam -= amt;
fluid = te.fluid;
this.addSources(te, frac);
}
}
@Override
public int getSteam() {
return steam;
}
public void removeSteam(int amt) {
steam -= amt;
}
@Override
protected void readSyncTag(NBTTagCompound NBT) {
super.readSyncTag(NBT);
steam = NBT.getInteger("energy");
fluid = WorkingFluid.getFromNBT(NBT);
}
@Override
protected void writeSyncTag(NBTTagCompound NBT) {
super.writeSyncTag(NBT);
NBT.setInteger("energy", steam);
fluid.saveToNBT(NBT);
}
@Override
public void readFromNBT(NBTTagCompound NBT) {
super.readFromNBT(NBT);
source.readFromNBT(NBT.getCompoundTag("sources"), (NBTIO<ReactorType>)ReikaNBTHelper.getEnumConverter(ReactorType.class));
if (source.removeValue(null) > 0) {
ReactorCraft.logger.logError(this+" loaded null-containing steam type map from NBT: "+NBT);
}
}
@Override
public void writeToNBT(NBTTagCompound NBT) {
super.writeToNBT(NBT);
NBTTagCompound tag = new NBTTagCompound();
source.writeToNBT(tag, (NBTIO<ReactorType>)ReikaNBTHelper.getEnumConverter(ReactorType.class));
NBT.setTag("sources", tag);
}
public WorkingFluid getWorkingFluid() {
return fluid;
}
@Override
public boolean canTransferTo(PumpablePipe p, ForgeDirection dir) {
if (p instanceof TileEntitySteamLine) {
WorkingFluid f = ((TileEntitySteamLine)p).fluid;
return f != WorkingFluid.EMPTY ? f == fluid : true;
}
return false;
}
@Override
public int getFluidLevel() {
return this.getSteam();
}
@Override
public void transferFrom(PumpablePipe from, int amt) {
float frac = (float)amt/((TileEntitySteamLine)from).steam;
((TileEntitySteamLine)from).steam -= amt;
fluid = ((TileEntitySteamLine)from).fluid;
steam += amt;
this.addSources((TileEntitySteamLine)from, frac);
}
private void addSources(TileEntitySteamLine from, float frac) {
for (ReactorType r : new ArrayList<ReactorType>(from.source.getElements())) {
if (r == null)
continue;
double val = from.source.getValue(r)*frac;
if (Double.isNaN(val) || Double.isInfinite(val))
continue;
source.addValue(r, val);
from.source.addValue(r, -val);
}
}
public Proportionality<ReactorType> getSourceReactorType() {
return source.copy();
}
@Override
public IIcon getTexture() {
return Blocks.wool.getIcon(0, this.isInWorld() ? 15 : 7);
}
@Override
public int getPressure() {
return steam;
}
@Override
public int getMaxPressure() {
return ReactorOptions.STEAMLINECAP.getValue();
}
}
| [
"reikasminecraft@gmail.com"
] | reikasminecraft@gmail.com |
71792999a3381151ddc33f8e2ebf6705b6e70631 | ad64a14fac1f0d740ccf74a59aba8d2b4e85298c | /linkwee-framework/src/main/java/com/linkwee/core/orm/dialect/OraclePageHepler.java | 9d5549a835e0023614ce315a921ebb4f8f87a9ae | [] | no_license | zhangjiayin/supermarket | f7715aa3fdd2bf202a29c8683bc9322b06429b63 | 6c37c7041b5e1e32152e80564e7ea4aff7128097 | refs/heads/master | 2020-06-10T16:57:09.556486 | 2018-10-30T07:03:15 | 2018-10-30T07:03:15 | 193,682,975 | 0 | 1 | null | 2019-06-25T10:03:03 | 2019-06-25T10:03:03 | null | UTF-8 | Java | false | false | 1,762 | java | package com.linkwee.core.orm.dialect;
/**
* @author Mignet
* @since 2014年7月2日 上午10:30:14
**/
public class OraclePageHepler {
/**
* 得到分页的SQL
*
* @param offset
* 偏移量
* @param limit
* 位置
* @return 分页SQL
*/
public static String getLimitString(String sql, int offset, int limit) {
sql = sql.trim();
boolean isForUpdate = false;
if (sql.toLowerCase().endsWith(" for update")) {
sql = sql.substring(0, sql.length() - 11);
isForUpdate = true;
}
StringBuffer pagingSelect = new StringBuffer(sql.length() + 100);
pagingSelect.append("select * from ( select row_.*, rownum rownum_ from ( ");
pagingSelect.append(sql);
pagingSelect.append(" ) row_ ) where rownum_ > " + offset + " and rownum_ <= " + (offset + limit));
if (isForUpdate) {
pagingSelect.append(" for update");
}
return pagingSelect.toString();
}
/**
* 得到查询总数的sql
*/
public static String getCountString(String querySelect) {
querySelect = getLineSql(querySelect);
String sql =new StringBuilder("select count(1) count from (").append(querySelect).append(" ) t").toString();
return sql;
}
/**
* 将SQL语句变成一条语句,并且每个单词的间隔都是1个空格
*
* @param sql
* SQL语句
* @return 如果sql是NULL返回空,否则返回转化后的SQL
*/
private static String getLineSql(String sql) {
return sql.replaceAll("[\r\n]", " ").replaceAll("\\s{2,}", " ");
}
}
| [
"liqimoon@qq.com"
] | liqimoon@qq.com |
18187bc5aab8356381fd0d8a2016096a0091db93 | bad5559f8f2f2ee7c91e2cc5662f793139be4b7c | /app/src/play/java/rikka/akashitoolkit/service/MyGcmListenerService.java | 3910c6be71e2088f321b8179032ffd4f2fbbb1cb | [] | no_license | wbsdty331/Akashi-Toolkit | c400a4c2c0056081bc2d0b0671467b23fc1e0487 | 740096c8a5f01c239efc4116f69c16eb77e6c3ea | refs/heads/master | 2020-12-26T03:01:29.650650 | 2016-10-14T12:42:27 | 2016-10-14T12:42:27 | 59,452,268 | 0 | 0 | null | 2016-05-23T04:35:44 | 2016-05-23T04:35:43 | null | UTF-8 | Java | false | false | 1,988 | java | package rikka.akashitoolkit.service;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.gcm.GcmListenerService;
import rikka.akashitoolkit.support.PushHandler;
/**
* Created by Rikka on 2016/5/3.
*/
public class MyGcmListenerService extends GcmListenerService {
private static final String TAG = "MyGcmListenerService";
/**
* Called when message is received.
*
* @param from SenderID of the sender.
* @param data Data bundle containing message data as key/value pairs.
* For Set of keys use data.keySet().
*/
// [START receive_message]
@Override
public void onMessageReceived(String from, Bundle data) {
String message = data.getString("message");
Log.d(TAG, "From: " + from);
Log.d(TAG, "Message: " + message);
if (from.startsWith("/topics/")) {
// message received from some topic.
} else {
// normal downstream message.
}
// [START_EXCLUDE]
/**
* Production applications would usually process the message here.
* Eg: - Syncing with server.
* - Store message in local database.
* - Update UI.
*/
/**
* In some cases it may be useful to show a notification indicating to the user
* that a message was received.
*/
sendNotification(data);
// [END_EXCLUDE]
}
// [END receive_message]
private void sendNotification(Bundle data) {
int id;
try {
id = Integer.parseInt(data.getString("id"));
} catch (Exception e) {
id = 0;
}
PushHandler.sendNotification(getApplicationContext(),
id,
data.getString("title"),
data.getString("message"),
data.getString("activity"),
data.getString("extra"),
data.getString("extra2"));
}
}
| [
"rikka@xing.moe"
] | rikka@xing.moe |
62210c17e60f15f5a5d7f95762284287754c3cb7 | 4655fc29ce277f84d5cf7a028e3ae5e13ed8f60b | /spring-boot-dockerize/src/main/java/com/mimaraslan/controller/HomeController.java | d44416186170ec93bcc4954e0f3f6237611fa4fc | [
"MIT"
] | permissive | khaledrihane-cyber/spring-boot | 188c3764be53ae87971e1492bd21db536dff3f15 | 3eecaa800c7141d76dcc54d99ecd32e6c24601e9 | refs/heads/master | 2022-09-20T13:14:27.670695 | 2020-05-24T17:15:30 | 2020-05-24T17:15:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 443 | java | package com.mimaraslan.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/v1")
public class HomeController {
// http://localhost:8085/api/v1/message
@GetMapping("/message")
public String getMessage() {
return "Welcome to Spring Boot with Docker";
}
} | [
"mimaraslan@gmail.com"
] | mimaraslan@gmail.com |
89ae1a6460395b10947d14e53073b8433dc5f9c2 | 2dbc902760e62ab021382f6e03e8e39a8aab03ba | /JardenProviders/src/jarden/engspa/DetailUserFragment.java | ad69448e7a0dfe6f6a666d640f3eb958bfecc23d | [] | no_license | jdenny/Jarden | aca00e60baff7498eee18feeccc960b1f695a8b6 | 6e70e1a15f6c7cf278d0dd7ac55a1f9d0cc7caf1 | refs/heads/master | 2021-01-10T09:02:12.853707 | 2016-02-22T09:52:09 | 2016-02-22T09:52:09 | 46,224,165 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,290 | java | package jarden.engspa;
import jarden.provider.engspa.EngSpaContract;
import jarden.provider.engspa.EngSpaContract.QuestionStyle;
import com.jardenconsulting.providerdemoapp.BuildConfig;
import com.jardenconsulting.providerdemoapp.MainActivity;
import com.jardenconsulting.providerdemoapp.R;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
public class DetailUserFragment extends Fragment implements OnClickListener {
private EditText nameEdit;
private EditText levelEdit;
private Spinner questionStyleSpinner;
private Uri userUri;
private MainActivity mainActivity;
private ContentResolver contentResolver;
private View view; // Main Layout View
private Button updateButton;
private Button deleteButton;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (BuildConfig.DEBUG) Log.d(MainActivity.TAG, "DetailUserFragment.onCreateView()");
if (savedInstanceState != null) {
String uriStr = savedInstanceState.getString(EngSpaContract.CONTENT_URI_USER_STR);
Uri uri = Uri.parse(uriStr);
String idStr = uri.getLastPathSegment();
if (idStr != null && !idStr.equals(EngSpaContract.USER_TABLE)) {
userUri = uri;
}
}
view = inflater.inflate(R.layout.user_edit_layout, container, false);
Context context = view.getContext();
nameEdit = (EditText) view.findViewById(R.id.name);
levelEdit = (EditText) view.findViewById(R.id.level);
questionStyleSpinner = (Spinner) view.findViewById(R.id.questionStyleSpinner);
ArrayAdapter<String> questionStyleAdapter = new ArrayAdapter<String>(context,
android.R.layout.simple_spinner_item,
EngSpaContract.questionStyleNames);
questionStyleSpinner.setAdapter(questionStyleAdapter);
Button newButton = (Button) view.findViewById(R.id.newButton);
newButton.setOnClickListener(this);
updateButton = (Button) view.findViewById(R.id.updateButton);
updateButton.setOnClickListener(this);
deleteButton = (Button) view.findViewById(R.id.deleteButton);
deleteButton.setOnClickListener(this);
return view;
}
@Override
public void onResume() {
super.onResume();
if (BuildConfig.DEBUG) {
Log.d(MainActivity.TAG, "DetailUserFragment.onResume(" +
this.userUri + ")");
}
/*
* This code is put here because of the following sequence of events
* triggered when user selects a word from MasterFragment:
* masterFragment passes selected word back to mainActivity
* mainActivity calls detailUserFragment.setWordUri()
* android calls detailUserFragment.onCreateView() and restores UI fields
* to values set when detailUserFragment was previously shown; these are old!
* android calls detailUserFragment.onResume(), which sets UI fields to correct values
*/
if (this.userUri == null) {
this.updateButton.setEnabled(false);
this.deleteButton.setEnabled(false);
} else {
showUser();
}
}
@Override
public void onClick(View view) {
int viewId = view.getId();
String message;
if (viewId == R.id.newButton) {
Uri uri = contentResolver.insert(EngSpaContract.CONTENT_URI_USER, getContentValues());
message = "row inserted: " + uri.getPath();
} else if (viewId == R.id.updateButton) {
int rows = contentResolver.update(userUri, getContentValues(), null, null);
message = rows + " row updated";
} else if (viewId == R.id.deleteButton) {
int rows = contentResolver.delete(userUri, null, null);
message = rows + " row deleted";
} else {
message = "onClick(), unrecognised viewId: " + viewId;
}
this.mainActivity.setStatus(message);
}
public void setUserUri(MainActivity mainActivity, Uri userUri) {
if (BuildConfig.DEBUG) {
Log.d(MainActivity.TAG, "DetailUserFragment.setUserUri(" +
userUri + ")");
}
this.mainActivity = mainActivity;
this.contentResolver = mainActivity.getContentResolver();
this.userUri = userUri;
}
private void showUser() {
String selection = null;
String[] selectionArgs = null;
String sortOrder = null;
Cursor cursor = this.contentResolver.query(
this.userUri, EngSpaContract.PROJECTION_ALL_USER_FIELDS, selection,
selectionArgs, sortOrder);
if (cursor.moveToFirst()) {
String name = cursor.getString(1);
String level = cursor.getString(2);
String questionStyleStr = cursor.getString(3);
this.nameEdit.setText(name);
this.levelEdit.setText(level);
QuestionStyle questionStyle = QuestionStyle.valueOf(questionStyleStr);
this.questionStyleSpinner.setSelection(questionStyle.ordinal());
if (BuildConfig.DEBUG) {
Log.d(MainActivity.TAG,
"DetailUserFragment.showUser(); name=" + name +
", level=" + level + ", questionStyle=" +
questionStyle);
}
mainActivity.setStatus("");
} else {
mainActivity.setStatus("no matching word found!");
}
}
private ContentValues getContentValues() {
String name = nameEdit.getText().toString();
Integer level = Integer.valueOf(levelEdit.getText().toString());
Integer questionStyle = questionStyleSpinner.getSelectedItemPosition();
ContentValues values = new ContentValues();
values.put(EngSpaContract.NAME, name);
values.put(EngSpaContract.LEVEL, level);
values.put(EngSpaContract.QUESTION_STYLE, questionStyle);
return values;
}
@Override
public void onSaveInstanceState(Bundle outState) {
if(BuildConfig.DEBUG) {
Log.d(MainActivity.TAG, "PhoneBookActivity.onSaveInstanceState(" +
(outState==null?"null":"not null") +")");
}
super.onSaveInstanceState(outState);
outState.putString(EngSpaContract.CONTENT_URI_STR, this.userUri.toString());
}
}
| [
"john.denny@gmail.com"
] | john.denny@gmail.com |
c2eb61abab6178f8dac94c2745af81766ec672f9 | 6252c165657baa6aa605337ebc38dd44b3f694e2 | /org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/TemperatureController3818.java | 52283e1d689d5d5b2514918236f5b37f21a40b8a | [] | no_license | soha500/EglSync | 00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638 | 55101bc781349bb14fefc178bf3486e2b778aed6 | refs/heads/master | 2021-06-23T02:55:13.464889 | 2020-12-11T19:10:01 | 2020-12-11T19:10:01 | 139,832,721 | 0 | 1 | null | 2019-05-31T11:34:02 | 2018-07-05T10:20:00 | Java | UTF-8 | Java | false | false | 367 | java | package syncregions;
public class TemperatureController3818 {
public execute(int temperature3818, int targetTemperature3818) {
//sync _bfpnFUbFEeqXnfGWlV3818, behaviour
1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0;
//endSync
}
}
| [
"sultanalmutairi@172.20.10.2"
] | sultanalmutairi@172.20.10.2 |
5a25e5a057e6c9b2eb2e0e0dfe501e994c999a4a | 8cf110b0c782f51c524b9028cf9bfbe6a77583f8 | /src/main/java/org/cyberpwn/react/util/Failure.java | 358c3866e37120364fc2498c547a607f1eb8f9cf | [] | no_license | cyberpwnn/ReactPlugin | 10ec8472a765bff892d67cf2adddf897eee38c73 | 39372922cb843c1ca4bb74a9d4403b3d116baac1 | refs/heads/master | 2021-09-08T03:15:28.304728 | 2018-03-06T13:39:06 | 2018-03-06T13:39:06 | 60,807,090 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 886 | java | package org.cyberpwn.react.util;
public class Failure
{
private final Long time;
private final GList<StackTraceElement> stackTrace;
private final String message;
private final String type;
public Failure(Long time, GList<StackTraceElement> stackTrace, String message, String type)
{
this.time = time;
this.stackTrace = stackTrace;
this.message = message;
this.type = type;
}
public Long getTime()
{
return time;
}
public GList<StackTraceElement> getStackTrace()
{
return stackTrace;
}
public GList<String> getStackTraceStrings()
{
GList<String> sts = new GList<String>();
for(StackTraceElement e : getStackTrace())
{
sts.add("at " + e.getClassName() + "." + e.getMethodName() + "(" + e.getLineNumber() + ")");
}
return sts;
}
public String getMessage()
{
return message;
}
public String getType()
{
return type;
}
}
| [
"danielmillst@gmail.com"
] | danielmillst@gmail.com |
81acd32172c4f183ea63fcf63973c49cd2e2dc87 | 4fee5ed68d91b599fc564d4d8ad6f574d4b9462a | /demo/src/de.sormuras.bach.demo/test/java/de/sormuras/bach/demo/DemoMainTests.java | a28c3177b0e27ae06138bbea0e8366ebc366cb51 | [
"Apache-2.0"
] | permissive | ghatwala/bach | 7c5a43d19e63f6c359f3f3247e123f148f7fff62 | be4757ab7da3b3b6168f5532aacc90913428c3e8 | refs/heads/master | 2020-07-01T02:20:41.293366 | 2019-08-06T20:10:14 | 2019-08-06T20:10:14 | 200,834,818 | 0 | 0 | Apache-2.0 | 2019-08-06T11:06:07 | 2019-08-06T11:06:07 | null | UTF-8 | Java | false | false | 300 | java | package de.sormuras.bach.demo;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.Test;
class DemoMainTests {
@Test
void mainMethodExists() throws ReflectiveOperationException {
assertNotNull(DemoMain.class.getMethod("main", String[].class));
}
}
| [
"sormuras@gmail.com"
] | sormuras@gmail.com |
83a6a72f64269bca6de480f083635df863ce5058 | 3088caf087baa17c1f37c0a3dcfc3fb9ee4c3a22 | /iot/src/main/java/com/example/iot/DirectionActivity.java | c2da60cf2f3fc9eb8e9e951cb7d5308db7e43aba | [] | no_license | wangyue033/advanceapp | 71e3b9e939838e18a3c6c6fcd6866e9af3df414b | 8695950461f3bccd41b8f945aff30659b49ef28d | refs/heads/main | 2023-09-05T07:36:26.669577 | 2021-11-07T05:52:30 | 2021-11-07T05:52:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,017 | java | package com.example.iot;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.example.iot.widget.CompassView;
import java.util.List;
public class DirectionActivity extends AppCompatActivity implements SensorEventListener {
private TextView tv_direction; // 声明一个文本视图对象
private CompassView cv_sourth; // 声明一个罗盘视图对象
private SensorManager mSensorMgr;// 声明一个传感管理器对象
private float[] mAcceValues; // 加速度变更值的数组
private float[] mMagnValues; // 磁场强度变更值的数组
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_direction);
tv_direction = findViewById(R.id.tv_direction);
cv_sourth = findViewById(R.id.cv_sourth);
// 从系统服务中获取传感管理器对象
mSensorMgr = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
}
@Override
protected void onPause() {
super.onPause();
mSensorMgr.unregisterListener(this); // 注销当前活动的传感监听器
}
@Override
protected void onResume() {
super.onResume();
int suitable = 0;
// 获取当前设备支持的传感器列表
List<Sensor> sensorList = mSensorMgr.getSensorList(Sensor.TYPE_ALL);
for (Sensor sensor : sensorList) {
if (sensor.getType() == Sensor.TYPE_ACCELEROMETER) { // 找到加速度传感器
suitable += 1; // 找到加速度传感器
} else if (sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) { // 找到磁场传感器
suitable += 10; // 找到磁场传感器
}
}
if (suitable / 10 > 0 && suitable % 10 > 0) {
// 给加速度传感器注册传感监听器
mSensorMgr.registerListener(this,
mSensorMgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
SensorManager.SENSOR_DELAY_NORMAL);
// 给磁场传感器注册传感监听器
mSensorMgr.registerListener(this,
mSensorMgr.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD),
SensorManager.SENSOR_DELAY_NORMAL);
} else {
cv_sourth.setVisibility(View.GONE);
tv_direction.setText("当前设备不支持指南针,请检查是否存在加速度和磁场传感器");
}
}
@Override
public void onSensorChanged(SensorEvent event) {
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { // 加速度变更事件
mAcceValues = event.values; // 加速度变更事件
} else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) { // 磁场强度变更事件
mMagnValues = event.values; // 磁场强度变更事件
}
if (mAcceValues != null && mMagnValues != null) {
calculateOrientation(); // 加速度和磁场强度两个都有了,才能计算磁极的方向
}
}
//当传感器精度改变时回调该方法,一般无需处理
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {}
// 计算指南针的方向
private void calculateOrientation() {
float[] values = new float[3];
float[] R = new float[9];
SensorManager.getRotationMatrix(R, null, mAcceValues, mMagnValues);
SensorManager.getOrientation(R, values);
values[0] = (float) Math.toDegrees(values[0]); // 计算手机上部与正北方向的夹角
cv_sourth.setDirection((int) values[0]); // 设置罗盘视图中的指南针方向
if (values[0] >= -10 && values[0] < 10) {
tv_direction.setText("手机上部方向是正北");
} else if (values[0] >= 10 && values[0] < 80) {
tv_direction.setText("手机上部方向是东北");
} else if (values[0] >= 80 && values[0] <= 100) {
tv_direction.setText("手机上部方向是正东");
} else if (values[0] >= 100 && values[0] < 170) {
tv_direction.setText("手机上部方向是东南");
} else if ((values[0] >= 170 && values[0] <= 180)
|| (values[0]) >= -180 && values[0] < -170) {
tv_direction.setText("手机上部方向是正南");
} else if (values[0] >= -170 && values[0] < -100) {
tv_direction.setText("手机上部方向是西南");
} else if (values[0] >= -100 && values[0] < -80) {
tv_direction.setText("手机上部方向是正西");
} else if (values[0] >= -80 && values[0] < -10) {
tv_direction.setText("手机上部方向是西北");
}
}
}
| [
"aqi00@163.com"
] | aqi00@163.com |
93a93693b50695f1877073573795b6d4935c8739 | 795f6c626e5d7a07c01bb66386f710795180a02e | /n_mastercp/src/com/fss/SMSUtility/MposFunctionServiceLocator.java | 4fda1cf6e7a377ea0ea8f5fccb85a9241c9b6451 | [] | no_license | hungdt138/mastercp | 6d426c56f6cfd5d95dfcdba1b98dad2b163ebb30 | 7cdff6f328156e9a5c450d1cfb9829ce0f60ef71 | refs/heads/master | 2021-01-22T08:23:20.726286 | 2014-07-17T12:23:33 | 2014-07-17T12:23:33 | 21,679,708 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,416 | java | /**
* MposFunctionServiceLocator.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.fss.SMSUtility;
public class MposFunctionServiceLocator extends org.apache.axis.client.Service implements com.fss.SMSUtility.MposFunctionService {
public MposFunctionServiceLocator() {
}
public MposFunctionServiceLocator(org.apache.axis.EngineConfiguration config) {
super(config);
}
public MposFunctionServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
super(wsdlLoc, sName);
}
// Use to get a proxy class for MposFunction
private java.lang.String MposFunction_address = "http://10.8.13.61:7865/eload/services/MposFunction";
public java.lang.String getMposFunctionAddress() {
return MposFunction_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String MposFunctionWSDDServiceName = "MposFunction";
public java.lang.String getMposFunctionWSDDServiceName() {
return MposFunctionWSDDServiceName;
}
public void setMposFunctionWSDDServiceName(java.lang.String name) {
MposFunctionWSDDServiceName = name;
}
public com.fss.SMSUtility.MposFunction getMposFunction() throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(MposFunction_address);
}
catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getMposFunction(endpoint);
}
public com.fss.SMSUtility.MposFunction getMposFunction(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
com.fss.SMSUtility.MposFunctionSoapBindingStub _stub = new com.fss.SMSUtility.MposFunctionSoapBindingStub(portAddress, this);
_stub.setPortName(getMposFunctionWSDDServiceName());
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}
public void setMposFunctionEndpointAddress(java.lang.String address) {
MposFunction_address = address;
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
try {
if (com.fss.SMSUtility.MposFunction.class.isAssignableFrom(serviceEndpointInterface)) {
com.fss.SMSUtility.MposFunctionSoapBindingStub _stub = new com.fss.SMSUtility.MposFunctionSoapBindingStub(new java.net.URL(MposFunction_address), this);
_stub.setPortName(getMposFunctionWSDDServiceName());
return _stub;
}
}
catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
java.lang.String inputPortName = portName.getLocalPart();
if ("MposFunction".equals(inputPortName)) {
return getMposFunction();
}
else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
((org.apache.axis.client.Stub) _stub).setPortName(portName);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName("http://SMSUtility.fss.com", "MposFunctionService");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new javax.xml.namespace.QName("http://SMSUtility.fss.com", "MposFunction"));
}
return ports.iterator();
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("MposFunction".equals(portName)) {
setMposFunctionEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
setEndpointAddress(portName.getLocalPart(), address);
}
}
| [
"hungd138@outlook.com"
] | hungd138@outlook.com |
9af0959f3f8f0f2c8761b91881de50286ed25ade | 8494c17b608e144370ee5848756b7c6ae38e8046 | /gulimall-product/src/main/java/com/atguigu/gulimall/product/controller/AttrGroupController.java | 30b4d5394ab6767b457fc62c3d8e535f48125b15 | [
"Apache-2.0"
] | permissive | cchaoqun/SideProject1_GuliMall | b235ee01df30bc207c747cf281108006482a778a | aef4c26b7ed4b6d17f7dcadd62e725f5ee68b13e | refs/heads/main | 2023-06-11T02:23:28.729831 | 2021-07-07T11:56:13 | 2021-07-07T11:56:13 | 375,354,919 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,243 | java | package com.atguigu.gulimall.product.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.atguigu.gulimall.product.entity.AttrEntity;
import com.atguigu.gulimall.product.service.AttrAttrgroupRelationService;
import com.atguigu.gulimall.product.service.AttrService;
import com.atguigu.gulimall.product.service.CategoryService;
import com.atguigu.gulimall.product.vo.AttrGroupRelationVo;
import com.atguigu.gulimall.product.vo.AttrGroupWithAttrVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.atguigu.gulimall.product.entity.AttrGroupEntity;
import com.atguigu.gulimall.product.service.AttrGroupService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.common.utils.R;
/**
* 属性分组
*
* @author chengchaoqun
* @email chengchaoqun@gmail.com
* @date 2021-06-10 16:04:24
*/
@RestController
@RequestMapping("product/attrgroup")
public class AttrGroupController {
@Autowired
private AttrGroupService attrGroupService;
@Autowired
private CategoryService categoryService;
@Autowired
private AttrService attrService;
@Autowired
private AttrAttrgroupRelationService relationService;
/** 10、获取属性分组的关联的所有属性 /product/attrgroup/{attrgroupId}/attr/relation
* P80
* 根据分组id查询关联的所有基本属性
* @param attrgroupId
* @return
*/
@GetMapping("/{attrgroupId}/attr/relation")
public R attrRelation(@PathVariable("attrgroupId") Long attrgroupId){
List<AttrEntity> entitties = attrService.getRelationAttr(attrgroupId);
return R.ok().put("data", entitties);
}
/** /product/attrgroup/attr/relation/delete
* P80 根据传递过来的 attrIds atttGroupId 数组 删除属性分组关联的基本属性
* @param vos
* @return
*/
@PostMapping("/attr/relation/delete")
public R deleteRelation(@RequestBody AttrGroupRelationVo[]vos){
attrService.deleteRelation(vos);
return R.ok();
}
/** P81
* /product/attrgroup/{attrgroupId}/noattr/relation
* 查询当前分组没有关联的属性
* @param attrgroupId
* @param params
* @return
*/
@GetMapping("/{attrgroupId}/noattr/relation")
public R attrNoRelation(@PathVariable("attrgroupId") Long attrgroupId,
@RequestParam Map<String, Object> params){
PageUtils page = attrService.getNoRelationAttr(params, attrgroupId);
return R.ok().put("page", page);
}
// /product/attrgroup/attr/relation
/** P82
* /product/attrgroup/attr/relation
* 将新增的属性与属性分组的数组保存到数据库
* @param vos
* @return
*/
@PostMapping("/attr/relation")
public R addRelation(@RequestBody List<AttrGroupRelationVo> vos){
// 属性与属性分组service可以批量保存传递过来新增的属性与属性分组的关联关系数组
relationService.saveBatch(vos);
return R.ok();
}
// /product/attrgroup/{catelogId}/withattr
@GetMapping("/{catelogId}/withattr")
public R getAttrGroupWithAttrs(@PathVariable("catelogId")Long catelogId){
//1. 查出当前分类下的所有属性分组
//2. 查出每个属性分组的所有属性
List<AttrGroupWithAttrVo> vos = attrGroupService.getAttrGroupWithAttrsByCatelogId(catelogId);
return R.ok().put("data", vos);
}
/**
* 列表
*/
@RequestMapping("/list/{catelogId}")
//@RequiresPermissions("product:attrgroup:list")
public R list(@RequestParam Map<String, Object> params, @PathVariable("catelogId") Long catelogId){
// PageUtils page = attrGroupService.queryPage(params);
PageUtils page = attrGroupService.queryPage(params, catelogId);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{attrGroupId}")
//@RequiresPermissions("product:attrgroup:info")
public R info(@PathVariable("attrGroupId") Long attrGroupId){
AttrGroupEntity attrGroup = attrGroupService.getById(attrGroupId);
Long catelogId = attrGroup.getCatelogId();
Long[] path = categoryService.findCatelogPath(catelogId);
attrGroup.setCatelogPath(path);
return R.ok().put("attrGroup", attrGroup);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("product:attrgroup:save")
public R save(@RequestBody AttrGroupEntity attrGroup){
attrGroupService.save(attrGroup);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("product:attrgroup:update")
public R update(@RequestBody AttrGroupEntity attrGroup){
attrGroupService.updateById(attrGroup);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("product:attrgroup:delete")
public R delete(@RequestBody Long[] attrGroupIds){
attrGroupService.removeByIds(Arrays.asList(attrGroupIds));
return R.ok();
}
}
| [
"chengchaoqun@hotmail.com"
] | chengchaoqun@hotmail.com |
913294d0c1f835f1be2a21ff4be61ad167442f10 | e0d52bbf5d1b657afb07795bf456e8e680302980 | /App/TwoAdw/src/twoadw/wicket/website/invoicestatus/EntityDisplayTablePage.java | 6550cfd9e647639330e82a29416047eabdd13362 | [] | no_license | youp911/modelibra | acc391da16ab6b14616cd7bda094506a05414b0f | 00387bd9f1f82df3b7d844650e5a57d2060a2ec7 | refs/heads/master | 2021-01-25T09:59:19.388394 | 2011-11-24T21:46:26 | 2011-11-24T21:46:26 | 42,008,889 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,837 | java | /*
* Modelibra
*
* 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 twoadw.wicket.website.invoicestatus;
import org.modelibra.wicket.view.View;
import org.modelibra.wicket.view.ViewModel;
import twoadw.website.invoicestatus.InvoiceStatuss;
/**
* Entity display table page.
*
* @author TeamFcp
* @version 2009-03-16
*/
public class EntityDisplayTablePage extends
org.modelibra.wicket.concept.EntityDisplayTablePage {
private static final long serialVersionUID = 1234728303062L;
/**
* Constructs an entity display table page.
*
* @param viewModel
* view model
* @param view
* view
*/
public EntityDisplayTablePage(final ViewModel viewModel, final View view) {
super(getNewViewModel(viewModel), view);
}
/**
* Gets a new view model.
*
* @param viewModel
* view model
* @return new view model
*/
private static ViewModel getNewViewModel(final ViewModel viewModel) {
ViewModel newViewModel = new ViewModel();
newViewModel.copyPropertiesFrom(viewModel);
InvoiceStatuss invoiceStatuss = (InvoiceStatuss) viewModel.getEntities();
// invoiceStatuss = invoiceStatuss.getInvoiceStatussOrderedBy????(true);
newViewModel.setEntities(invoiceStatuss);
return newViewModel;
}
}
| [
"dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d"
] | dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d |
8d17e5d498f1b06b470c097cd9006f39c88fde3f | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/test/java/org/gradle/test/performancenull_434/Testnull_43351.java | 397131be5b028c1d1a24715b0d11d5388d8d52b7 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 308 | java | package org.gradle.test.performancenull_434;
import static org.junit.Assert.*;
public class Testnull_43351 {
private final Productionnull_43351 production = new Productionnull_43351("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
38b67c1b77a6fe8e776f9048e4631de82f1273d7 | d8b8c2d4a4f4d139eeb24dbc7469117f199ee478 | /src/main/java/basics/interviews/company/google/ValidParentheses.java | 948f8590b950d0bfe63bc096aeede3242db6c3a4 | [
"MIT"
] | permissive | prembhaarti/Basics | c56ccb21ebba71cb9e2c64f7735f372f9e0ed90d | 10cd725a568be9784d9f39ad1c30e8cbab751d75 | refs/heads/master | 2021-01-19T22:49:29.764809 | 2019-07-21T14:23:59 | 2019-07-21T14:23:59 | 88,859,080 | 0 | 0 | null | 2019-11-02T19:12:01 | 2017-04-20T11:41:29 | Java | UTF-8 | Java | false | false | 1,156 | java | package basics.interviews.company.google;// Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
// The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not.
import java.util.Stack;
public class ValidParentheses {
public boolean isValid(String s) {
if(s.length() % 2 == 1) {
return false;
}
Stack<Character> stack = new Stack<Character>();
for(int i = 0; i < s.length(); i++) {
if(s.charAt(i) == '(' || s.charAt(i) == '[' || s.charAt(i) == '{') {
stack.push(s.charAt(i));
} else if(s.charAt(i) == ')' && !stack.isEmpty() && stack.peek() == ')') {
stack.pop();
} else if(s.charAt(i) == ']' && !stack.isEmpty() && stack.peek() == ']') {
stack.pop();
} else if(s.charAt(i) == '}' && !stack.isEmpty() && stack.peek() == '}') {
stack.pop();
} else {
return false;
}
}
return stack.isEmpty();
}
}
| [
"prem.b@flipkart.com"
] | prem.b@flipkart.com |
45ba955bc12a7f073f962e51efdf38304d5d1cfe | 0fbeae2d4344881f84253097ed2d726095870c69 | /platform/foundation/src/main/java/org/alfresco/mobile/android/platform/network/NetworkSingleton.java | 3cbbb8db2655bb480adb9a49d7a585c65d667bfc | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | matutet/alfresco-android-app | b7c570cc88a33f484c02316bb976152c8b9f52c7 | 89edcac77f2800290fed21bb9ff2123323bb5208 | refs/heads/master | 2021-02-16T14:27:53.956226 | 2015-06-24T10:57:07 | 2015-06-24T10:57:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,020 | java | /*******************************************************************************
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco Mobile for Android.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package org.alfresco.mobile.android.platform.network;
import java.net.URL;
import com.squareup.okhttp.ConnectionPool;
import com.squareup.okhttp.OkHttpClient;
/**
* @since 1.4
* @author Jean Marie Pascal
*/
public final class NetworkSingleton
{
private static final String TAG = NetworkSingleton.class.getName();
private static NetworkSingleton mInstance;
private static final Object LOCK = new Object();
private OkHttpClient httpClient;
// ///////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
// ///////////////////////////////////////////////////////////////////////////
public static NetworkSingleton getInstance()
{
synchronized (LOCK)
{
if (mInstance == null)
{
mInstance = new NetworkSingleton();
}
return mInstance;
}
}
private NetworkSingleton()
{
httpClient = new OkHttpClient();
httpClient.setConnectionPool(new ConnectionPool(1, 100));
URL.setURLStreamHandlerFactory(httpClient);
}
public OkHttpClient getHttpClient()
{
return httpClient;
}
}
| [
"jeanmarie.pascal@alfresco.com"
] | jeanmarie.pascal@alfresco.com |
146894aacfb4c97fdfef86d148a738815471cd63 | 6d027571996bd925c152446dba353aa0b55898e2 | /springboot/springboot-first/src/main/java/cn/puhy/springbootfirst/BeanConditional.java | 6320267bf81a48687e75e6c465e788b042d102dc | [] | no_license | phycn/puhy | d9d38ecc5d77c3508a9d254a13702cc0e27d34c5 | 7ad1af2e4ee2491b918569c0403f17e70cea19e7 | refs/heads/master | 2022-12-25T02:37:21.625786 | 2020-04-16T10:45:47 | 2020-04-16T10:45:47 | 120,993,643 | 2 | 1 | null | 2022-12-16T08:50:18 | 2018-02-10T07:11:35 | Java | UTF-8 | Java | false | false | 328 | java | package cn.puhy.springbootfirst;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.stereotype.Component;
/**
* Bean1对象存在才进行加载
*
* @author puhongyu
* 2018/5/24 21:09
*/
@Component
@ConditionalOnBean(name = {"bean1"})
public class BeanConditional {
}
| [
"phy253399933@qq.com"
] | phy253399933@qq.com |
a2ec11abd81745c54e2d09ecf3bf2752bc8c83de | dc25b23f8132469fd95cee14189672cebc06aa56 | /vendor/mediatek/proprietary/frameworks/base/tests/widget/src/com/mediatek/common/widget/tests/ActionBarOrientationChangedActivity.java | fffcfe69e4a30eea8c40c8725303cc26f4e3a1d1 | [
"Apache-2.0"
] | permissive | nofearnohappy/alps_mm | b407d3ab2ea9fa0a36d09333a2af480b42cfe65c | 9907611f8c2298fe4a45767df91276ec3118dd27 | refs/heads/master | 2020-04-23T08:46:58.421689 | 2019-03-28T21:19:33 | 2019-03-28T21:19:33 | 171,048,255 | 1 | 5 | null | 2020-03-08T03:49:37 | 2019-02-16T20:25:00 | Java | UTF-8 | Java | false | false | 2,808 | java | package com.mediatek.common.widget.tests;
import android.os.Bundle;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Instrumentation;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;
@TargetApi(11)
@SuppressLint("NewApi")
public class ActionBarOrientationChangedActivity extends Activity {
private Menu mMenu;
private TextView mTextView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.normal_main);
mTextView = (TextView) findViewById(R.id.text);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setDisplayShowHomeEnabled(true);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.normal_main, menu);
mMenu = menu;
return true;
}
public Menu getMenu() {
return mMenu;
}
public void setOrientation(int requestedOrientation) {
//ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
this.setRequestedOrientation(requestedOrientation);
}
public void clickOnMenuItem(int menuItemId, Instrumentation instruments) {
final Integer itemId = menuItemId;
instruments.runOnMainSync(new Runnable() {
public void run() {
if (mMenu != null) {
mMenu.performIdentifierAction(itemId, 0);
}
}
});
instruments.waitForIdleSync();
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
// TODO Auto-generated method stub
mMenu = menu;
return super.onPrepareOptionsMenu(menu);
}
@Override
public void onOptionsMenuClosed(Menu menu) {
// TODO Auto-generated method stub
super.onOptionsMenuClosed(menu);
mMenu = null;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// TODO Auto-generated method stub
if (item.getItemId() == android.R.id.home) {
mTextView.setText(item.getTitle());
Toast.makeText(this, "Selected Item: " + item.getTitle(), Toast.LENGTH_SHORT).show();
return super.onOptionsItemSelected(item);
} else {
mTextView.setText(item.getTitle());
Toast.makeText(this, "Selected Item: " + item.getTitle(), Toast.LENGTH_SHORT).show();
return true;
}
}
public void onSort(MenuItem item) {
mTextView.setText(item.getTitle());
Toast.makeText(this, "Selected Item: " + item.getTitle(), Toast.LENGTH_SHORT).show();
}
}
| [
"fetpoh@mail.ru"
] | fetpoh@mail.ru |
04fa919db4c59f8dfbd7f3a745da8439736a73e2 | 602760131ca91a224773fc99d16a4d5aec509dcb | /general-util/src/main/java/util/StopWatchUtil.java | bf318f00618d1ee3d2495a738f883d0303d61926 | [] | no_license | caojing-github/springBoot | ff2a6aebfdf952e41564ac22456d30cc6727d88c | bfbcfcd7caf9701952f240c3321da6265dcd478d | refs/heads/master | 2021-08-10T12:18:25.904443 | 2021-07-15T06:36:11 | 2021-07-15T06:36:11 | 209,979,431 | 0 | 0 | null | 2019-09-21T12:14:25 | 2019-09-21T12:14:25 | null | UTF-8 | Java | false | false | 1,196 | java | package util;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.StopWatch;
import java.util.Optional;
/**
* 统计代码执行时长
*
* @author CaoJing
* @date 2019/12/06 11:04
*/
@Slf4j
public class StopWatchUtil {
/**
* 计时器
*/
private static final ThreadLocal<StopWatch> THREAD_LOCAL = ThreadLocal.withInitial(StopWatch::new);
private StopWatchUtil() {
}
/**
* 开始计时
*/
public static void start(String taskName) {
THREAD_LOCAL.get().start(taskName);
}
/**
* 结束计时
*/
public static void stop() {
THREAD_LOCAL.get().stop();
}
/**
* 人类可读性打印计时统计
*/
public static void prettyPrint() {
log.info(THREAD_LOCAL.get().prettyPrint());
}
/**
* 总统计计时
*/
public static void getTotalTimeMillis(String... prefix) {
StopWatch sw = THREAD_LOCAL.get();
log.info(Optional.ofNullable(prefix).map(x -> x[0]).orElse(sw.getLastTaskName()) + sw.getTotalTimeMillis());
}
/**
* 清除计时器
*/
public static void clear() {
THREAD_LOCAL.remove();
}
}
| [
"caojing0229@foxmail.com"
] | caojing0229@foxmail.com |
baa4f93cc56173f9b6e02355998db7ca0ff3c4d0 | f5398748ea435d203248eb208850a1d36939e3a8 | /Plugins/VarModel/Model/src/net/ssehub/easy/varModel/cstEvaluation/IterLet.java | 4bc03ee1b1ceec9d969af4dea5bd434e6d1c5762 | [
"Apache-2.0"
] | permissive | SSEHUB/EASyProducer | 20b5a01019485428b642bf3c702665a257e75d1b | eebe4da8f957361aa7ebd4eee6fff500a63ba6cd | refs/heads/master | 2023-06-25T22:40:15.997438 | 2023-06-22T08:54:00 | 2023-06-22T08:54:00 | 16,176,406 | 12 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,208 | java | package net.ssehub.easy.varModel.cstEvaluation;
import net.ssehub.easy.varModel.cst.ConstraintSyntaxTree;
import net.ssehub.easy.varModel.cst.Let;
import net.ssehub.easy.varModel.model.DecisionVariableDeclaration;
/**
* Implements a specific expression for defining local variables with variable initialization
* expressions in iterator expressions. Therefore, this expression may override the
* initialization expression of the "in" variable.
*
* @author Holger Eichelberger
*/
class IterLet extends Let {
private ConstraintSyntaxTree init;
/**
* Creates an iterator let-expression.
*
* @param var the variable to be defined
* @param init the initialization expression (may be <b>null</b>, then the default expression of
* <code>var</code> takes precedence)
* @param inExpr the expression <code>var</code> is used in
*/
public IterLet(DecisionVariableDeclaration var, ConstraintSyntaxTree init, ConstraintSyntaxTree inExpr) {
super(var, inExpr);
this.init = init;
}
@Override
public ConstraintSyntaxTree getInitExpression() {
return null != init ? init : getVariable().getDefaultValue();
}
}
| [
"elscha@sse.uni-hildesheim.de"
] | elscha@sse.uni-hildesheim.de |
6639526a684dcac68442c01e815e5fbebe7c1acd | f43d5de70d14179639192e091c923ccd27112faa | /src/com/codeHeap/collections/abstractCollections/countingInteger/CountingMapData.java | 444b8918cb03344577a73c05621cb97b2785b458 | [] | no_license | basumatarau/trainingJavaCore | 2c80d02d539fc6e2e599f6e9240e8f6543ef1bdf | 1efc944b77b1ac7aea44bee89b84daa843670630 | refs/heads/master | 2020-04-04T23:13:47.929352 | 2019-01-09T09:51:35 | 2019-01-09T09:51:35 | 156,351,368 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,515 | java | package com.codeHeap.collections.abstractCollections.countingInteger;
import java.util.*;
public class CountingMapData extends AbstractMap<Integer, String> {
private int size;
private static String[] chars = "QWERTYUIOPASDFGHJKLZXCVBNM".split("");
public CountingMapData(int size){
this.size = size;
}
private static class Entry implements Map.Entry<Integer, String>{
Entry(int index){
this.index = index;
}
private int index;
@Override
public Integer getKey() {
return index;
}
@Override
public String getValue() {
return chars[index%chars.length]+(index/chars.length);
}
@Override
public String setValue(String s) {
throw new UnsupportedOperationException();
}
@Override
public int hashCode() {
return this.getKey().hashCode();
}
@Override
public boolean equals(Object o) {
return (o instanceof Entry) && this.getKey().equals(((Entry)o).getKey());
}
}
private static class EntrySet extends AbstractSet<Map.Entry<Integer, String>>{
private int size;
EntrySet(int size){
this.size = size;
}
@Override
public Iterator<Map.Entry<Integer, String>> iterator() {
return new Iterator<Map.Entry<Integer, String>>() {
private Entry entry = new Entry(-1);
@Override
public boolean hasNext() {
return entry.index<size;
}
@Override
public Map.Entry<Integer, String> next() {
entry.index=entry.index+1;
return entry;
}
};
}
@Override
public int size() {
return size;
}
}
@Override
public Set<Map.Entry<Integer, String>> entrySet() {
return new EntrySet(chars.length);
}
public static Map<Integer, String> select(final int size){
return new CountingMapData(0){
@Override
public Set<Map.Entry<Integer, String>> entrySet() {
return new CountingMapData.EntrySet(size);
}
};
}
public static void main(String[] args) {
CountingMapData cmd = new CountingMapData(5);
System.out.println(cmd);
System.out.println(CountingMapData.select(5));
}
}
| [
"basumatarau@gmail.com"
] | basumatarau@gmail.com |
2142a1bb4477f6da327f194d5e2ee4d6fa378b83 | b81a04911345130ee444b9f4cf8ed0d575debd0d | /persist/src/main/java/com/iuni/data/persist/mapper/activity/ActivityChannelMapper.java | 928f000490fe82eaf6f582a2c6d934a1b05aad3e | [] | no_license | hedgehog-zowie/DA | 7b505deaca858867650736e8a18bef0fbf492a83 | 2150618b378963eb15a5d359a0e7a4e3ca07ff83 | refs/heads/master | 2021-01-20T09:01:24.392395 | 2016-04-06T23:16:34 | 2016-04-06T23:16:34 | 37,307,131 | 4 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,027 | java | package com.iuni.data.persist.mapper.activity;
import com.iuni.data.persist.model.activity.ActivityChannelTableDto;
import com.iuni.data.persist.model.activity.ActivityChannelQueryDto;
import com.iuni.data.persist.model.activity.ActivityChannelChartDto;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author Nicholas
* Email: nicholas.chen@iuni.com
*/
public interface ActivityChannelMapper {
List<ActivityChannelTableDto> selectActivityChannel(ActivityChannelQueryDto queryDto);
List<ActivityChannelChartDto> selectOrderByActivityChannel(ActivityChannelQueryDto queryDto);
List<ActivityChannelChartDto> selectPaidOrderByActivityChannel(ActivityChannelQueryDto queryDto);
List<ActivityChannelChartDto> selectPVByActivityChannel(ActivityChannelQueryDto queryDto);
List<ActivityChannelChartDto> selectUVByActivityChannel(ActivityChannelQueryDto queryDto);
List<ActivityChannelChartDto> selectVVByActivityChannel(ActivityChannelQueryDto queryDto);
}
| [
"hedgehog.zowie@gmail.com"
] | hedgehog.zowie@gmail.com |
f05f734213965ae0e6b5834edc99fc2bc2850c14 | 92c2acdc360826412a9fa2560b4ee3e1cfb8ba95 | /src/org/ctp/enchantmentsolution/listeners/chestloot/ChestLoot.java | 4930bd56b04d92d576693b05d21b079ff3fae64a | [] | no_license | crashtheparty/EnchantmentSolutionLegacy | 2618b20aa866077bc1fc0b895a88d78ed21ab2e7 | 9c2e63b6f15c0c185d976ba19c51f2c4f068ed73 | refs/heads/master | 2020-04-10T07:43:03.532770 | 2019-05-21T04:19:12 | 2019-05-21T04:19:12 | 160,886,909 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,066 | java | package org.ctp.enchantmentsolution.listeners.chestloot;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.ctp.enchantmentsolution.nms.ChestPopulateNMS;
public class ChestLoot {
private Block startingBlock;
private List<Block> lootToCheck = new ArrayList<Block>();
private List<Block> checkedBlocks = new ArrayList<Block>();
private boolean checkBlocks = false;
protected ChestLoot(Block b) {
startingBlock = b;
}
protected void checkBlocks() {
checkBlocks(startingBlock);
checkBlocks = true;
}
@SuppressWarnings("deprecation")
private void checkBlocks(Block block) {
if(checkedBlocks.contains(block)) return;
checkedBlocks.add(block);
if(block.getType() == Material.HOPPER) {
Block[] possibleChest = new Block[3];
switch(block.getData()) {
case 0:
case 8:
possibleChest[0] = block.getRelative(BlockFace.DOWN);
break;
case 2:
case 10:
possibleChest[0] = block.getRelative(BlockFace.NORTH);
break;
case 3:
case 11:
possibleChest[0] = block.getRelative(BlockFace.SOUTH);
break;
case 4:
case 12:
possibleChest[0] = block.getRelative(BlockFace.EAST);
break;
case 5:
case 13:
possibleChest[0] = block.getRelative(BlockFace.WEST);
break;
default:
possibleChest[0] = block.getRelative(BlockFace.DOWN);
}
possibleChest[1] = block.getRelative(BlockFace.DOWN);
possibleChest[2] = block.getRelative(BlockFace.UP);
for(int i = 0; i < possibleChest.length; i++) {
checkBlocks(possibleChest[i]);
}
}
if(block.getType() == Material.CHEST) {
checkChest(block);
}
}
private void checkChest(Block block) {
if(ChestPopulateNMS.isLootChest(block)) {
lootToCheck.add(block);
}
}
protected List<Block> getLootToCheck() throws ChestLootException{
if(checkBlocks == false) {
throw new ChestLootException("Property has yet to be defined.", new Throwable("Property has yet to be defined."));
}
return lootToCheck;
}
}
| [
"laytfire2@gmail.com"
] | laytfire2@gmail.com |
723a96b7c21824579571c43c3fe22e313e6a33f4 | 8da77614b236926df90a819bda1a65e0aa5e0e74 | /educrm-api/src/main/java/com/wuxue/api/mapper/StudentWorksPortfolioMapper.java | f43f9c4cf4770855e2d5ec0359e2f1f7275df3e6 | [
"Apache-2.0"
] | permissive | azzdinemj/edu-crmclub | 01eb423561f7458525030e5705413188ddf91a52 | 442eb2474d14eb3e333cbad07eb6adbcf64116cc | refs/heads/master | 2020-04-20T23:48:33.277687 | 2018-09-30T14:00:45 | 2018-09-30T14:00:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 533 | java | package com.wuxue.api.mapper;
import com.wuxue.api.interfaces.*;
import com.wuxue.model.ClassinfoActivityDetails;
import com.wuxue.model.StudentWorksPortfolio;
import java.util.List;
public interface StudentWorksPortfolioMapper extends IInsertMapper<StudentWorksPortfolio>,ICountMapper<StudentWorksPortfolio,Integer>,
IUpdateMapper<StudentWorksPortfolio>,IDeleteByPrimaryKeyMapper<String>,
ISelectByPrimaryKeyMapper<String,StudentWorksPortfolio>,ISelectMapper<StudentWorksPortfolio,List<StudentWorksPortfolio>> {
} | [
"frankdevhub@163.com"
] | frankdevhub@163.com |
d1d999d01dc1fbae98d4252aa1d1d485af876c42 | a39222979ed147d8d233dc8be619a216a8b52e8e | /JxvaFramework/src/com/jxva/graph/strategy/GraphStrategy.java | 4e7b7a9d204fe261feaac7717d3bd970b95d20df | [] | no_license | jxva/jxvaframework | ae532cbaa027540f907b00ea745b8236c17ba555 | d56b3a5eafe78dedb55a8feca215de562bac045c | refs/heads/master | 2020-06-05T01:23:57.433577 | 2012-04-17T08:20:39 | 2012-04-17T08:20:39 | 1,904,195 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,312 | java | /*
* Copyright @ 2006-2010 by The Jxva Framework Foundation
*
* 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.jxva.graph.strategy;
import java.awt.image.BufferedImage;
import com.jxva.graph.GraphException;
/**
* 图形文件处理策略,不同的策略对应不同的图片质量及处理速度与执行性能
* @author The Jxva Framework Foundation
* @since 1.0
* @version 2008-11-28 11:02:26 by Jxva
*/
public interface GraphStrategy {
/**
* 图形缩放方法,由子类以不同策略实现
* @param srcBi 源图形文件
* @param width 目标图形宽度
* @param height 目标图形高度
* @return 目标图形文件
* @throws GraphException
*/
public BufferedImage resize(BufferedImage srcBi, double width,double height)throws GraphException;
}
| [
"jxva@msn.com"
] | jxva@msn.com |
fecd526f60e2e7adc2c5ef6023d11d05f5a7b9df | 3370a0d2a9e3c73340b895de3566f6e32aa3ca4a | /alwin-middleware-grapescode/alwin-db/src/test/java/com/codersteam/alwin/db/dao/write/IssueInvoiceDaoTestIT.java | 221fb37838721694788b800fdef92f82e99a4072 | [] | no_license | Wilczek01/alwin-projects | 8af8e14601bd826b2ec7b3a4ce31a7d0f522b803 | 17cebb64f445206320fed40c3281c99949c47ca3 | refs/heads/master | 2023-01-11T16:37:59.535951 | 2020-03-24T09:01:01 | 2020-03-24T09:01:01 | 249,659,398 | 0 | 0 | null | 2023-01-07T16:18:14 | 2020-03-24T09:02:28 | Java | UTF-8 | Java | false | false | 2,543 | java | package com.codersteam.alwin.db.dao.write;
import com.codersteam.alwin.db.dao.IssueInvoiceDao;
import com.codersteam.alwin.jpa.issue.IssueInvoice;
import org.jboss.arquillian.persistence.UsingDataSet;
import org.junit.Test;
import javax.ejb.EJB;
import java.util.Optional;
import static com.codersteam.alwin.testdata.InvoiceTestData.CURRENT_BALANCE_INVOICE_2;
import static com.codersteam.alwin.testdata.InvoiceTestData.CURRENT_BALANCE_INVOICE_3;
import static com.codersteam.alwin.testdata.IssueInvoiceTestData.INVOICE_ID_2;
import static com.codersteam.alwin.testdata.IssueInvoiceTestData.ISSUE_21_INVOICE_2_ID;
import static com.codersteam.alwin.testdata.IssueInvoiceTestData.ISSUE_21_INVOICE_3_ID;
import static com.codersteam.alwin.testdata.IssueInvoiceTestData.ISSUE_ID_21;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@SuppressWarnings("UnnecessaryLocalVariable")
@UsingDataSet({"test-permission.json", "test-data.json", "test-issue.json", "test-issue-invoice.json", "test-activity.json"})
public class IssueInvoiceDaoTestIT extends WriteTestBase {
@EJB
private IssueInvoiceDao issueInvoiceDao;
@Test
public void shouldUpdateIssueInvoicesFinalBalanceValueZeroForSpecificIssue() {
//given
final long issueId = ISSUE_ID_21;
// when
issueInvoiceDao.updateIssueInvoicesFinalBalance(issueId);
// then
final Optional<IssueInvoice> issue21Invoice2 = issueInvoiceDao.get(ISSUE_21_INVOICE_2_ID);
assertTrue(issue21Invoice2.isPresent());
assertEquals(issue21Invoice2.get().getFinalBalance(), CURRENT_BALANCE_INVOICE_2);
}
@Test
public void shouldUpdateIssueInvoicesFinalBalanceForSpecificIssue() {
//given
final long issueId = ISSUE_ID_21;
// when
issueInvoiceDao.updateIssueInvoicesFinalBalance(issueId);
// then
final Optional<IssueInvoice> issue21Invoice3 = issueInvoiceDao.get(ISSUE_21_INVOICE_3_ID);
assertTrue(issue21Invoice3.isPresent());
assertEquals(issue21Invoice3.get().getFinalBalance(), CURRENT_BALANCE_INVOICE_3);
}
@Test
public void shouldUpdateIssueInvoicesExclusion() {
// when
issueInvoiceDao.updateIssueInvoicesExclusion(ISSUE_ID_21, INVOICE_ID_2, true);
// then
final Optional<IssueInvoice> issue1Invoice1 = issueInvoiceDao.get(ISSUE_21_INVOICE_2_ID);
assertTrue(issue1Invoice1.isPresent());
assertEquals(issue1Invoice1.get().isExcluded(), true);
}
} | [
"grogus@ad.aliorleasing.pl"
] | grogus@ad.aliorleasing.pl |
3efa6fd4ea751a158774b6de5b6dd19487d9d718 | 23458bdfb7393433203985569e68bc1935a022d6 | /NDCConnectivity/src/generated-sources/java/org/iata/oo/schema/AirShoppingRQ/Offer.java | c570b21fac7f427e61cf8fc8c1fd064d11b363e3 | [
"MIT"
] | permissive | joelmorales/NDC | 7c6baa333c0285b724e6356bd7ae808f1f74e7ec | ebddd30369ec74e078a2c9996da0402f9ac448a1 | refs/heads/master | 2021-06-30T02:49:12.522375 | 2019-06-13T14:55:05 | 2019-06-13T14:55:05 | 171,594,242 | 1 | 0 | null | 2020-10-13T12:03:33 | 2019-02-20T03:29:16 | Java | UTF-8 | Java | false | false | 3,685 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.02.28 at 01:52:55 PM CST
//
package org.iata.oo.schema.AirShoppingRQ;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <choice maxOccurs="unbounded">
* <element ref="{http://www.iata.org/IATA/EDIST/2017.1}DisclosureMetadatas"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.1}OfferMetadatas"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.1}OfferInstructionMetadatas"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.1}OfferPenaltyMetadatas"/>
* <element ref="{http://www.iata.org/IATA/EDIST/2017.1}OfferTermsMetadatas"/>
* </choice>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"disclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas"
})
@XmlRootElement(name = "Offer")
public class Offer {
@XmlElements({
@XmlElement(name = "DisclosureMetadatas", type = DisclosureMetadatas.class),
@XmlElement(name = "OfferMetadatas", type = OfferMetadatas.class),
@XmlElement(name = "OfferInstructionMetadatas", type = OfferInstructionMetadatas.class),
@XmlElement(name = "OfferPenaltyMetadatas", type = OfferPenaltyMetadatas.class),
@XmlElement(name = "OfferTermsMetadatas", type = OfferTermsMetadatas.class)
})
protected List<Object> disclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas;
/**
* Gets the value of the disclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the disclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getDisclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DisclosureMetadatas }
* {@link OfferMetadatas }
* {@link OfferInstructionMetadatas }
* {@link OfferPenaltyMetadatas }
* {@link OfferTermsMetadatas }
*
*
*/
public List<Object> getDisclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas() {
if (disclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas == null) {
disclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas = new ArrayList<Object>();
}
return this.disclosureMetadatasOrOfferMetadatasOrOfferInstructionMetadatas;
}
}
| [
"joel.moralesmorales@hotmail.com"
] | joel.moralesmorales@hotmail.com |
c12e11449ff0fe8a02f16fc670858fb57c3d7407 | 66ed9b17af6fe3b763527f97e35efda6a9371ae5 | /src/main/java/hiberspring/service/BranchService.java | 66350894540f2735c1f9ba00fd6ce356cec7d052 | [] | no_license | KrisBiserovKrumov/SpringData | 2270bbb0277fd5201f8e25ff241b7d5b911af544 | a00ce40ddf74e97c57f841ed55a44a8691e2d209 | refs/heads/master | 2023-08-31T21:51:21.240703 | 2021-10-21T13:55:55 | 2021-10-21T13:55:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 396 | java | package hiberspring.service;
import hiberspring.domain.entities.Branch;
import java.io.FileNotFoundException;
import java.io.IOException;
public interface BranchService {
Boolean branchesAreImported();
String readBranchesJsonFile() throws IOException;
String importBranches(String branchesFileContent) throws FileNotFoundException;
Branch getBranchByName(String name);
}
| [
"79319583+KrisBiserovKrumov@users.noreply.github.com"
] | 79319583+KrisBiserovKrumov@users.noreply.github.com |
a22ffefd19be22852389aaf24dcfe2e691e5b065 | a255175e2213f7c4081064b531920fd30c539220 | /spring-boot-redis/src/test/java/com/example/redis/SpringBootRedisApplicationTests.java | 58e1c99fef59dc4034df4a9942dd4aec4df4579d | [] | no_license | wlsgussla123/Spring-boot | fe4ca88bef87578240811cab5e486c9cf2d49b9f | 85e7578d15d0ab730973bfad3468f7a3f420a90e | refs/heads/master | 2020-03-26T03:23:02.021633 | 2018-08-12T09:00:32 | 2018-08-12T09:00:59 | 143,307,603 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 343 | java | package com.example.redis;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringBootRedisApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"wlsgussla123@gmail.com"
] | wlsgussla123@gmail.com |
ea9724c0b6065716b8de6c06a039ac3ec64b4f15 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/kotlinx/coroutines/p700a/C24581r.java | 9545a6983944fd092b16ca2a2db9444845309773 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,038 | java | package kotlinx.coroutines.p700a;
import p000a.C0220l;
@C0220l(dWo = {1, 1, 13}, dWp = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0005\b`\u0018\u00002\u00020\u0001R\u001e\u0010\u0002\u001a\b\u0012\u0002\b\u0003\u0018\u00010\u0003X¦\u000e¢\u0006\f\u001a\u0004\b\u0004\u0010\u0005\"\u0004\b\u0006\u0010\u0007R\u0018\u0010\b\u001a\u00020\tX¦\u000e¢\u0006\f\u001a\u0004\b\n\u0010\u000b\"\u0004\b\f\u0010\r¨\u0006\u000e"}, dWq = {"Lkotlinx/coroutines/internal/ThreadSafeHeapNode;", "", "heap", "Lkotlinx/coroutines/internal/ThreadSafeHeap;", "getHeap", "()Lkotlinx/coroutines/internal/ThreadSafeHeap;", "setHeap", "(Lkotlinx/coroutines/internal/ThreadSafeHeap;)V", "index", "", "getIndex", "()I", "setIndex", "(I)V", "kotlinx-coroutines-core"})
/* renamed from: kotlinx.coroutines.a.r */
public interface C24581r {
/* renamed from: a */
void mo30321a(C31185q<?> c31185q);
C31185q<?> elp();
int getIndex();
void setIndex(int i);
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
80d627148e507897428dc1c72d996a2cccc4c5eb | 129f58086770fc74c171e9c1edfd63b4257210f3 | /src/testcases/CWE80_XSS/CWE80_XSS__Servlet_listen_tcp_68b.java | 0555586fd81c0a06730e321074f228b66d4e2d72 | [] | no_license | glopezGitHub/Android23 | 1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba | 6215d0684c4fbdc7217ccfbedfccfca69824cc5e | refs/heads/master | 2023-03-07T15:14:59.447795 | 2023-02-06T13:59:49 | 2023-02-06T13:59:49 | 6,856,387 | 0 | 3 | null | 2023-02-06T18:38:17 | 2012-11-25T22:04:23 | Java | UTF-8 | Java | false | false | 1,545 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE80_XSS__Servlet_listen_tcp_68b.java
Label Definition File: CWE80_XSS__Servlet.label.xml
Template File: sources-sink-68b.tmpl.java
*/
/*
* @description
* CWE: 80 Cross Site Scripting (XSS)
* BadSource: listen_tcp Read data using a listening tcp connection
* GoodSource: A hardcoded string
* BadSink: Display of data in web page without any encoding or validation
* Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package
*
* */
package testcases.CWE80_XSS;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE80_XSS__Servlet_listen_tcp_68b
{
public void bad_sink(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = CWE80_XSS__Servlet_listen_tcp_68a.data;
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page without any encoding or validation */
response.getWriter().println("<br>bad(): data = " + data);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = CWE80_XSS__Servlet_listen_tcp_68a.data;
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page without any encoding or validation */
response.getWriter().println("<br>bad(): data = " + data);
}
}
}
| [
"guillermo.pando@gmail.com"
] | guillermo.pando@gmail.com |
17f295ade19060818955147c4789a14e374420da | 811ccaf8dd68fd798a30cd32bbfdd7739ccf0c42 | /extensions/hibernate-search-elasticsearch/deployment/src/main/java/io/quarkus/hibernate/search/elasticsearch/HibernateSearchClasses.java | 982dbacd721cad1d4e4ff96a94c7280268a76397 | [
"Apache-2.0"
] | permissive | kthoms/quarkus | 28c9f8687933a68dd3b0b2df803d056759253f07 | 6df9a2cc92bec083090bede4b7d582403ea4da8e | refs/heads/master | 2023-08-25T21:59:22.920391 | 2019-10-08T15:09:39 | 2019-10-08T15:09:39 | 213,686,212 | 1 | 0 | Apache-2.0 | 2021-07-28T04:37:34 | 2019-10-08T15:46:03 | null | UTF-8 | Java | false | false | 6,336 | java | package io.quarkus.hibernate.search.elasticsearch;
import java.util.Arrays;
import java.util.List;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.AbstractCompositeAnalysisDefinition;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.AnalysisDefinition;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.AnalysisDefinitionJsonAdapterFactory;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.AnalyzerDefinition;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.AnalyzerDefinitionJsonAdapterFactory;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.CharFilterDefinition;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.NormalizerDefinition;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.NormalizerDefinitionJsonAdapterFactory;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.TokenFilterDefinition;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.esnative.TokenizerDefinition;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.AbstractTypeMapping;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.AbstractTypeMappingJsonAdapterFactory;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.DynamicType;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.ElasticsearchFormatJsonAdapter;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.ElasticsearchRoutingTypeJsonAdapter;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.PropertyMapping;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.PropertyMappingJsonAdapterFactory;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.RootTypeMapping;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.RootTypeMappingJsonAdapterFactory;
import org.hibernate.search.backend.elasticsearch.document.model.impl.esnative.RoutingType;
import org.hibernate.search.backend.elasticsearch.index.settings.impl.esnative.Analysis;
import org.hibernate.search.backend.elasticsearch.index.settings.impl.esnative.IndexSettings;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.declaration.MarkerBinding;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.declaration.PropertyBinding;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.declaration.RoutingKeyBinding;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.declaration.TypeBinding;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.AssociationInverseSide;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.DocumentId;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexedEmbedded;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.KeywordField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.ScaledNumberField;
import org.jboss.jandex.DotName;
class HibernateSearchClasses {
static final DotName INDEXED = DotName.createSimple(Indexed.class.getName());
static final List<DotName> FIELD_ANNOTATIONS = Arrays.asList(
DotName.createSimple(DocumentId.class.getName()),
DotName.createSimple(GenericField.class.getName()),
DotName.createSimple(FullTextField.class.getName()),
DotName.createSimple(KeywordField.class.getName()),
DotName.createSimple(ScaledNumberField.class.getName()),
DotName.createSimple(IndexedEmbedded.class.getName()),
DotName.createSimple(AssociationInverseSide.class.getName()));
static final List<DotName> BINDING_DECLARATION_ANNOTATIONS_ON_PROPERTIES = Arrays.asList(
DotName.createSimple(PropertyBinding.class.getName()),
DotName.createSimple(MarkerBinding.class.getName()));
static final List<DotName> BINDING_DECLARATION_ANNOTATIONS_ON_TYPES = Arrays.asList(
DotName.createSimple(TypeBinding.class.getName()),
DotName.createSimple(RoutingKeyBinding.class.getName()));
static final List<DotName> SCHEMA_MAPPING_CLASSES = Arrays.asList(
DotName.createSimple(AbstractTypeMapping.class.getName()),
DotName.createSimple(AbstractTypeMappingJsonAdapterFactory.class.getName()),
DotName.createSimple(DynamicType.class.getName()),
DotName.createSimple(ElasticsearchFormatJsonAdapter.class.getName()),
DotName.createSimple(ElasticsearchRoutingTypeJsonAdapter.class.getName()),
DotName.createSimple(PropertyMapping.class.getName()),
DotName.createSimple(PropertyMappingJsonAdapterFactory.class.getName()),
DotName.createSimple(RootTypeMapping.class.getName()),
DotName.createSimple(RootTypeMappingJsonAdapterFactory.class.getName()),
DotName.createSimple(RoutingType.class.getName()),
DotName.createSimple(IndexSettings.class.getName()),
DotName.createSimple(Analysis.class.getName()),
DotName.createSimple(AnalysisDefinition.class.getName()),
DotName.createSimple(AbstractCompositeAnalysisDefinition.class.getName()),
DotName.createSimple(AnalyzerDefinition.class.getName()),
DotName.createSimple(AnalyzerDefinitionJsonAdapterFactory.class.getName()),
DotName.createSimple(NormalizerDefinition.class.getName()),
DotName.createSimple(NormalizerDefinitionJsonAdapterFactory.class.getName()),
DotName.createSimple(TokenizerDefinition.class.getName()),
DotName.createSimple(TokenFilterDefinition.class.getName()),
DotName.createSimple(CharFilterDefinition.class.getName()),
DotName.createSimple(AnalysisDefinitionJsonAdapterFactory.class.getName()));
}
| [
"guillaume.smet@gmail.com"
] | guillaume.smet@gmail.com |
2fad0568f1f88e686d8e81f523cce690a02c29c9 | 9a9fcafa9bbc28c9f1930e01c46af8f023955aea | /JavaEE就业班面向对象IO阶段/day05/code/day05/src/cn/itcast02/exception/ExceptionDemo2.java | c0962a1e26280f95fd239fd2d944a8b1099f531f | [] | no_license | zhengbingyanbj/JavaSE | 84cd450ef5525050809c78a8b6660b9495c072db | 671ac02dcafe81d425c3c191c313b6040e8ae557 | refs/heads/master | 2021-09-01T18:20:49.082475 | 2017-12-28T07:13:30 | 2017-12-28T07:13:30 | 115,139,599 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 618 | java | package cn.itcast02.exception;
import java.io.FileReader;
/*
* 异常产生的过程解析
*
*/
public class ExceptionDemo2 {
public static void main(String[] args) {
//创建数组对象
int[] arr = {23,12,22};
int index = 3;
int element = getElement(arr, index);
System.out.println(element);
System.out.println("over");
}
/*
* 根据索引 找到指定数组中的元素
*/
public static int getElement(int[] arr,int index){
int element = arr[index];
return element;
}
}
| [
"zhengbingyanbj@163.com"
] | zhengbingyanbj@163.com |
68725d5fe74fc50e714fc06bfe29ffe100149d20 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/10/10_220eb8007209e446fcfbbbbafc27216fd8da931b/Constants/10_220eb8007209e446fcfbbbbafc27216fd8da931b_Constants_s.java | 72d727d36f1259336c7ce7836454427923ef0af3 | [] | 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 | 452 | java | <<<<<<< HEAD
package de.jurion.tools;
public class Constants {
public static final String BASE_URL = "http://www.jurion.de";
}
=======
package de.jurion.tools;
public class Constants {
public static final String BASE_URL = "http://staging.jurion.de";
public static final String TESTDATA_FILES_PATH = "src/test/java/de/jurion/testdata/";
public static final char CSV_SEPARATOR = ',';
}
>>>>>>> 8bcedc37aa34fbd4f34af967dfcf2f353b9cc36b
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
5d8a9d1646e5349ed0ded7757c180fd10332ddb4 | 0929442a0a9ab1ae221e88a34e1cb332506ca485 | /grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/metric/MetricConstants.java | 397acf7cfb2053dcd13790a7382b79047f3b0039 | [
"MIT"
] | permissive | wushengju/grpc-spring-boot-starter | 04ef37ac8b400940bfd36ba49dde6ffa43dc7446 | e3ffb212a8e2bf97d13cbd61d54ca8e819aec8fb | refs/heads/master | 2023-07-26T00:28:04.814447 | 2021-09-02T22:19:01 | 2021-09-02T22:19:01 | 394,824,643 | 0 | 0 | MIT | 2021-08-11T01:24:34 | 2021-08-11T01:24:33 | null | UTF-8 | Java | false | false | 3,029 | java | /*
* Copyright (c) 2016-2021 Michael Zhang <yidongnan@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.devh.boot.grpc.common.metric;
/**
* Utility class that contains constants that are used multiple times by different classes.
*
* @author Daniel Theuke (daniel.theuke@heuboe.de)
*/
public final class MetricConstants {
/**
* The total number of requests received
*/
public static final String METRIC_NAME_SERVER_REQUESTS_RECEIVED = "grpc.server.requests.received";
/**
* The total number of responses sent
*/
public static final String METRIC_NAME_SERVER_RESPONSES_SENT = "grpc.server.responses.sent";
/**
* The total time taken for the server to complete the call.
*/
public static final String METRIC_NAME_SERVER_PROCESSING_DURATION = "grpc.server.processing.duration";
/**
* The total number of requests sent
*/
public static final String METRIC_NAME_CLIENT_REQUESTS_SENT = "grpc.client.requests.sent";
/**
* The total number of responses received
*/
public static final String METRIC_NAME_CLIENT_RESPONSES_RECEIVED = "grpc.client.responses.received";
/**
* The total time taken for the client to complete the call, including network delay
*/
public static final String METRIC_NAME_CLIENT_PROCESSING_DURATION = "grpc.client.processing.duration";
/**
* The metrics tag key that belongs to the called service name.
*/
public static final String TAG_SERVICE_NAME = "service";
/**
* The metrics tag key that belongs to the called method name.
*/
public static final String TAG_METHOD_NAME = "method";
/**
* The metrics tag key that belongs to the type of the called method.
*/
public static final String TAG_METHOD_TYPE = "methodType";
/**
* The metrics tag key that belongs to the result status code.
*/
public static final String TAG_STATUS_CODE = "statusCode";
private MetricConstants() {}
}
| [
"ST-DDT@gmx.de"
] | ST-DDT@gmx.de |
72d13ae631a033a9db623fe8e1c60da436ff980c | ee461488c62d86f729eda976b421ac75a964114c | /tags/HtmlUnit-2.7/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput.java | ba15b7dad9b0755fa1540e7aa9b1cb2af87e7954 | [
"Apache-2.0"
] | permissive | svn2github/htmlunit | 2c56f7abbd412e6d9e0efd0934fcd1277090af74 | 6fc1a7d70c08fb50fef1800673671fd9cada4899 | refs/heads/master | 2023-09-03T10:35:41.987099 | 2015-07-26T13:12:45 | 2015-07-26T13:12:45 | 37,107,064 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,701 | java | /*
* Copyright (c) 2002-2010 Gargoyle Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gargoylesoftware.htmlunit.html;
import java.io.IOException;
import java.util.Map;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.ScriptResult;
import com.gargoylesoftware.htmlunit.SgmlPage;
import com.gargoylesoftware.htmlunit.javascript.host.Event;
/**
* Wrapper for the HTML element "input".
*
* @version $Revision$
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @author David K. Taylor
* @author <a href="mailto:cse@dynabean.de">Christian Sell</a>
* @author Marc Guillemot
* @author Mike Bresnahan
* @author Daniel Gredler
* @author Bruce Faulkner
* @author Ahmed Ashour
*/
public class HtmlRadioButtonInput extends HtmlInput {
private static final long serialVersionUID = 425993174633373218L;
private boolean defaultCheckedState_;
/**
* Creates an instance.
* If no value is specified, it is set to "on" as browsers do (eg IE6 and Mozilla 1.7)
* even if spec says that it is not allowed
* (<a href="http://www.w3.org/TR/REC-html40/interact/forms.html#adef-value-INPUT">W3C</a>).
* @param namespaceURI the URI that identifies an XML namespace
* @param qualifiedName the qualified name of the element type to instantiate
* @param page the page that contains this element
* @param attributes the initial attributes
*/
HtmlRadioButtonInput(final String namespaceURI, final String qualifiedName, final SgmlPage page,
final Map<String, DomAttr> attributes) {
super(namespaceURI, qualifiedName, page, attributes);
// default value for both IE6 and Mozilla 1.7 even if spec says it is unspecified
if (getAttribute("value") == ATTRIBUTE_NOT_DEFINED) {
setAttribute("value", "on");
}
defaultCheckedState_ = hasAttribute("checked");
}
/**
* {@inheritDoc}
* @see SubmittableElement#reset()
*/
@Override
public void reset() {
if (defaultCheckedState_) {
setAttribute("checked", "checked");
}
else {
removeAttribute("checked");
}
}
/**
* Sets the "checked" attribute.
*
* @param isChecked true if this element is to be selected
* @return the page that occupies this window after setting checked status
* It may be the same window or it may be a freshly loaded one.
*/
@Override
public Page setChecked(final boolean isChecked) {
final HtmlForm form = getEnclosingForm();
final boolean changed = isChecked() != isChecked;
if (isChecked) {
if (form != null) {
form.setCheckedRadioButton(this);
}
else {
((HtmlPage) getPage()).setCheckedRadioButton(this);
}
}
else {
removeAttribute("checked");
}
Page page = getPage();
if (changed) {
final ScriptResult scriptResult = fireEvent(Event.TYPE_CHANGE);
if (scriptResult != null) {
page = scriptResult.getNewPage();
}
}
return page;
}
/**
* A radio button does not have a textual representation,
* but we invent one for it because it is useful for testing.
* @return "checked" or "unchecked" according to the radio state
*/
// we need to preserve this method as it is there since many versions with the above documentation.
@Override
public String asText() {
if (isChecked()) {
return "checked";
}
return "unchecked";
}
/**
* Override of default clickAction that makes this radio button the selected
* one when it is clicked.
*
* @throws IOException if an IO error occurred
*/
@Override
protected void doClickAction() throws IOException {
setChecked(true);
}
/**
* {@inheritDoc}
* Also sets the value to the new default value.
* @see SubmittableElement#setDefaultValue(String)
*/
@Override
public void setDefaultValue(final String defaultValue) {
super.setDefaultValue(defaultValue);
setValueAttribute(defaultValue);
}
/**
* {@inheritDoc}
* @see SubmittableElement#setDefaultChecked(boolean)
*/
@Override
public void setDefaultChecked(final boolean defaultChecked) {
defaultCheckedState_ = defaultChecked;
if (getPage().getWebClient().getBrowserVersion().isFirefox()) {
setChecked(defaultChecked);
}
}
/**
* {@inheritDoc}
* @see SubmittableElement#isDefaultChecked()
*/
@Override
public boolean isDefaultChecked() {
return defaultCheckedState_;
}
/**
* {@inheritDoc}
*/
@Override
protected boolean isStateUpdateFirst() {
return true;
}
/**
* {@inheritDoc}
*/
@Override
protected void onAddedToPage() {
if (getPage().getWebClient().getBrowserVersion().isIE()) {
setChecked(isDefaultChecked());
}
}
}
| [
"mguillem@5f5364db-9458-4db8-a492-e30667be6df6"
] | mguillem@5f5364db-9458-4db8-a492-e30667be6df6 |
61dcbd0bf93735f31eae2a0b81ae658857ff45a6 | 8edbfef9a2fcbf8ea4014dfff577b4298ba957f1 | /app/src/main/java/com/jenking/xiaoyunhui/activity/SignInActivity.java | 4c8ae41b3673a53e58f0a1c5589bb40244f37ca6 | [] | no_license | jenkins-chou/xiaoyunhuiAndroid | c8f8dbec0d79811cf4e308ea7832d9e42dbc919a | 0304c958315b4220b5874dacfdc1b06011f1aef9 | refs/heads/master | 2020-04-18T01:51:19.435744 | 2019-02-26T09:09:45 | 2019-02-26T09:09:45 | 167,137,190 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,961 | java | package com.jenking.xiaoyunhui.activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.VideoView;
import com.jenking.xiaoyunhui.MainActivity;
import com.jenking.xiaoyunhui.R;
import com.jenking.xiaoyunhui.tools.AccountTool;
import butterknife.BindView;
public class SignInActivity extends BaseActivity {
private VideoView videoView;
private LinearLayout button_login;
private LinearLayout button_register;
@BindView(R.id.root_view)
RelativeLayout root_view;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_in);
checkLogin();
}
//检查是否已经登录
private void checkLogin(){
if (AccountTool.isLogin(context)){
Intent intent = new Intent(context,MainActivity.class);
startActivity(intent);
finish();
}else {
root_view.setVisibility(View.VISIBLE);
initVideoBg();//播放视频桌面
initView();
}
}
//初始化视频桌面
private void initVideoBg(){
videoView = findViewById(R.id.videoView);
final String videoPath = Uri.parse("android.resource://" + getPackageName() + "/"+R.raw.sign_in_video).toString();
videoView.setVideoPath(videoPath);
videoView.start();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setVolume(0f, 0f);
mp.start();
mp.setLooping(true);
}
});
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
videoView.setVideoPath(videoPath);
videoView.start();
}
});
}
public void initView(){
button_login = findViewById(R.id.button_login);
button_login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(),LoginActivity.class);
startActivity(intent);
finish();
}
});
button_register = findViewById(R.id.button_register);
button_register.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(),RegisterActivity.class);
startActivity(intent);
finish();
}
});
}
}
| [
"13413607283@163.com"
] | 13413607283@163.com |
7f803806d3eaf3b6b39cb4918d9184c9fef249c1 | 7c890da84f919085a37f68608f724cb339e6a426 | /zeusLamp/src/scripts/prod/TC_SearchFunctionalitySecurity_HTTPS.java | c038595814ef08d8dc94137a7a0dcc453e011713 | [] | no_license | AnandSelenium/ZeusRepo | 8da6921068f4ce4450c8f34706da0c52fdeb0bab | 0a9bb33bdac31945b1b1a80e6475a390d1dc5d08 | refs/heads/master | 2020-03-23T21:38:11.536096 | 2018-07-24T07:26:48 | 2018-07-24T07:26:48 | 142,121,241 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,196 | java | package scripts.prod;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Parameters;
import classes.aem.AEMHomePage;
import classes.vmware.VMwareSearchPage;
import com.arsin.ArsinSeleniumAPI;
public class TC_SearchFunctionalitySecurity_HTTPS
{
ArsinSeleniumAPI oASelFW = null;
@Parameters({ "prjName", "testEnvironment","instanceName","sauceUser","moduleName","testSetName"})
@BeforeClass
public void oneTimeSetUp(String prjName,String testEnvironment,String instanceName,String sauceUser,String moduleName,String testSetName) throws InterruptedException
{
String[] environment=new ArsinSeleniumAPI().getEnvironment(testEnvironment,this.getClass().getName());
String os=environment[0];String browser=environment[1];String testCasename=this.getClass().getSimpleName();
oASelFW = new ArsinSeleniumAPI(prjName,testCasename,browser,os,instanceName,sauceUser,moduleName,testSetName);
oASelFW.startSelenium(oASelFW.getURL("VMware_Search_Prod_Security_S",oASelFW.instanceName));
}
@Test
public void LAMPTest() throws Exception
{
try{
oASelFW.driver.manage().timeouts().pageLoadTimeout(400, TimeUnit.SECONDS);
VMwareSearchPage vmwsearch = new VMwareSearchPage(oASelFW);
//Verifying Search Home Page
vmwsearch.verifyVMwareSecurityPage();
//Searching with valid search item and validating search results
vmwsearch.SearchSecurityComponent("vCenter");
//Searching word to get suggestions and selecting from suggestions
// vmwsearch.specificSearchSuggestions("vmware","vmware vsphere");
//verifying results per page functionality
vmwsearch.verifyResultsPerPage();
//Verifying Category & Type sub section in Filter By section
vmwsearch.selectCategoryTypeAndFilter("vCenter","Blogs","Web");
}
catch (Exception e)
{
e.printStackTrace();
}
}
@AfterClass
public void oneTearDown() throws IOException
{
oASelFW.stopSelenium();
}
} | [
"seleniumauto175@gmail.com"
] | seleniumauto175@gmail.com |
d88210162296aea75d444ee53e636363c8d271a6 | 777d41c7dc3c04b17dfcb2c72c1328ea33d74c98 | /app/src/main/java/com/wmlive/hhvideo/heihei/beans/record/ThumbNailInfo.java | db5e7c5b97b841779c932828f9bd7c85438e4d48 | [] | no_license | foryoung2018/videoedit | 00fc132c688be6565efb373cae4564874f61d52a | 7a316996ce1be0f08dbf4c4383da2c091447c183 | refs/heads/master | 2020-04-08T04:56:42.930063 | 2018-11-25T14:27:43 | 2018-11-25T14:27:43 | 159,038,966 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 672 | java | package com.wmlive.hhvideo.heihei.beans.record;
import android.graphics.Bitmap;
import android.graphics.Rect;
/**
* 视频分割前,取单个ThumbNail(拆分视频的单个缩略图)
*
* @author JIAN
*/
public class ThumbNailInfo extends SplitThumbItemInfo {
public ThumbNailInfo(int Time, Rect src, Rect dst, boolean isleft,
boolean isright) {
super(Time, src, dst, isleft, isright);
}
public Bitmap bmp;
/**
* 释放bmp
*/
public void recycle() {
if (null != bmp) {
if (!bmp.isRecycled()) {
bmp.recycle();
}
}
bmp = null;
}
}
| [
"1184394624@qq.com"
] | 1184394624@qq.com |
1ce1d4aff88712147519193d4aad98b59d43bcc8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/19/19_854c915d6eac2a91139aaadc7d34b7f5f3ddc7c6/QKedrAlbumWindow/19_854c915d6eac2a91139aaadc7d34b7f5f3ddc7c6_QKedrAlbumWindow_s.java | 58c794df75b41d064fddf5502321fa9dea94bad5 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,384 | java | package org.treblefrei.kedr.gui.qt;
import com.trolltech.qt.QVariant;
import com.trolltech.qt.core.QModelIndex;
import com.trolltech.qt.core.Qt;
import com.trolltech.qt.gui.QAbstractButton;
import com.trolltech.qt.gui.QAbstractTableModel;
import com.trolltech.qt.gui.QTableView;
import com.trolltech.qt.gui.QWidget;
import org.treblefrei.kedr.core.Updatable;
import org.treblefrei.kedr.model.Album;
import org.treblefrei.kedr.model.Track;
public class QKedrAlbumWindow extends QWidget implements Updatable {
private class QTrackListModel extends QAbstractTableModel {
private Album album;
public void setAlbum(Album album) {
this.album = album;
}
@Override
public Object data(QModelIndex index, int role) {
if (index == null || album == null)
return null;
if (index.row() > album.getTracks().size() || index.row() < 0)
return null;
if (role == Qt.ItemDataRole.DisplayRole) {
Track track = album.getTracks().get(index.row());
switch(index.column()) {
case 0:
return track.getArtist();
case 1:
return track.getTitle();
}
}
return null;
}
@Override
public Object headerData(int section, Qt.Orientation orientation, int role) {
System.err.println("QTrackListModel.headerData orientation="+orientation);
if (role != Qt.ItemDataRole.DisplayRole)
return null;
if (orientation == Qt.Orientation.Horizontal) {
switch(section) {
case 0:
return tr("Artist");
case 1:
return tr("Title");
default:
return null;
}
}
return null;
}
@Override
public int columnCount(QModelIndex qModelIndex) {
return 2;
}
@Override
public int rowCount(QModelIndex qModelIndex) {
if (album == null)
return 0;
return album.getTracks().size();
}
}
private QAbstractButton queryButton;
private QTableView trackList;
private QTrackListModel trackListModel;
private QKedrMainWindow qKedrMainWindow;
private QAbstractButton qAbstractButton;
private Album selectedAlbum;
public QKedrAlbumWindow() {
trackList = new QTableView(this);
trackListModel = new QTrackListModel();
trackList.setModel(trackListModel);
trackList.horizontalHeader().show();
}
public void setAlbum(Album album) {
System.err.println("QKedrAlbumWindow.setAlbum("+album+")");
if (album != null)
album.removeUpdatable(this);
selectedAlbum = album;
trackListModel.setAlbum(album);
trackList.update();
album.addUpdatable(this);
}
private void fetchAlbumInfo() {
}
//private void update
/**
* @see org.treblefrei.kedr.core.Updatable#perfomed()
*/
public boolean perfomed() {
return false;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a28691ad98852eb34f7ae517f9694dc4dd6a8feb | 3e176296759f1f211f7a8bcfbba165abb1a4d3f1 | /gosu-xml/src/main/java/gw/internal/schema/gw/xsd/w3c/xmlschema/anonymous/types/simple/NarrowMaxMin_MaxOccurs.java | 69513ac56508d974fda48c0e87ae0654cd899323 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | gosu-lang/old-gosu-repo | 6335ac90cd0c635fdec6360e3e208ba12ac0a39e | 48c598458abd412aa9f2d21b8088120e8aa9de00 | refs/heads/master | 2020-05-18T03:39:34.631550 | 2014-04-21T17:36:38 | 2014-04-21T17:36:38 | 1,303,622 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,675 | java | package gw.internal.schema.gw.xsd.w3c.xmlschema.anonymous.types.simple;
/***************************************************************************/
/* THIS IS AUTOGENERATED CODE - DO NOT MODIFY OR YOUR CHANGES WILL BE LOST */
/* THIS CODE CAN BE REGENERATED USING 'xsd-codegen' */
/***************************************************************************/
public class NarrowMaxMin_MaxOccurs extends gw.internal.schema.gw.xsd.w3c.xmlschema.types.simple.AllNNI implements gw.internal.xml.IXmlGeneratedClass {
public static final gw.util.concurrent.LockingLazyVar<gw.lang.reflect.IType> TYPE = new gw.util.concurrent.LockingLazyVar<gw.lang.reflect.IType>( gw.lang.reflect.TypeSystem.getGlobalLock() ) {
@Override
protected gw.lang.reflect.IType init() {
return gw.lang.reflect.TypeSystem.getByFullName( "gw.xsd.w3c.xmlschema.anonymous.types.simple.NarrowMaxMin_MaxOccurs" );
}
};
private static final gw.util.concurrent.LockingLazyVar<java.lang.Object> SCHEMAINFO = new gw.util.concurrent.LockingLazyVar<java.lang.Object>( gw.lang.reflect.TypeSystem.getGlobalLock() ) {
@Override
protected java.lang.Object init() {
gw.lang.reflect.IType type = TYPE.get();
return getSchemaInfoByType( type );
}
};
public NarrowMaxMin_MaxOccurs() {
super( TYPE.get(), SCHEMAINFO.get() );
}
protected NarrowMaxMin_MaxOccurs( gw.lang.reflect.IType type, java.lang.Object schemaInfo ) {
super( type, schemaInfo );
}
public NarrowMaxMin_MaxOccurs( gw.internal.schema.gw.xsd.w3c.xmlschema.enums.NarrowMaxMin_MaxOccurs value ) {
this();
TYPE.get().getTypeInfo().getProperty( "$Value" ).getAccessor().setValue( this, value );
}
@Deprecated
public java.lang.String getValue() {
return super.getValue();
}
@Deprecated
public void setValue( java.lang.String param ) {
super.setValue( param );
}
public gw.internal.schema.gw.xsd.w3c.xmlschema.enums.NarrowMaxMin_MaxOccurs getValue$$gw_xsd_w3c_xmlschema_anonymous_types_simple_NarrowMaxMin_MaxOccurs() {
return (gw.internal.schema.gw.xsd.w3c.xmlschema.enums.NarrowMaxMin_MaxOccurs) TYPE.get().getTypeInfo().getProperty( "$Value" ).getAccessor().getValue( this );
}
public void setValue$$gw_xsd_w3c_xmlschema_anonymous_types_simple_NarrowMaxMin_MaxOccurs( gw.internal.schema.gw.xsd.w3c.xmlschema.enums.NarrowMaxMin_MaxOccurs param ) {
TYPE.get().getTypeInfo().getProperty( "$Value" ).getAccessor().setValue( this, param );
}
@SuppressWarnings( {"UnusedDeclaration"} )
private static final long FINGERPRINT = -3788403261967307401L;
}
| [
"lboasso@guidewire.com"
] | lboasso@guidewire.com |
145170d544cec914b9cb7201ab4366e0bca081d9 | 2097d290e6d3d8f1236eda58a230a114d36089ad | /core/src/main/java/com/tll/util/CryptoUtil.java | 09b39ca6c4974771a927bcd6fbfd2edf5d2f78be | [] | no_license | jopaki/tll | b31434a7b7b0c5b6592e52e1844f9cc80bae8ede | 9a37b43b3c1be6e32173d19f9b9a94e8f24a50f5 | refs/heads/master | 2021-01-20T11:13:32.672419 | 2012-09-04T05:31:45 | 2012-09-04T05:39:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,086 | java | package com.tll.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import java.security.Key;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.spec.KeySpec;
import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* CryptoUtil - Utility class for cryptologic-related methods.
* @author jpk
*/
@SuppressWarnings("restriction")
public abstract class CryptoUtil {
private static final String CIPHER_TRANSFORMATION = "DES";
private static final String ENCODING = "UTF8";
private static final byte[] encKey = new byte[] {
69,
47,
-28,
28,
-16,
-53,
-81,
39 };
private static Key key;
private static Key getKey() throws GeneralSecurityException {
if(key == null) {
final KeySpec keySpec = new DESKeySpec(encKey);
final SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(CIPHER_TRANSFORMATION);
key = keyFactory.generateSecret(keySpec);
}
return key;
}
/**
* Encrypts an Object that is serializable.
* @param s The serializable to encrypt
* @return byte array
* @throws GeneralSecurityException
*/
public static byte[] encryptSerializable(Serializable s) throws GeneralSecurityException {
if(s == null) return null;
byte[] data = null;
// serialize
try {
final ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
final ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(s);
oos.close();
data = baos.toByteArray();
}
catch(final IOException ioe) {
throw new GeneralSecurityException("Error attempting to serialize object: " + ioe.getMessage());
}
// encrypt
final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION);
cipher.init(Cipher.ENCRYPT_MODE, getKey());
return cipher.doFinal(data);
}
/**
* Decrypts an Object that is {@link Serializable}.
* @param edata The encrypted data
* @return decrypted serializable instance
* @throws GeneralSecurityException
* @throws ClassNotFoundException
*/
public static Serializable decryptSerializable(byte[] edata) throws GeneralSecurityException, ClassNotFoundException {
if(edata == null) return null;
byte[] data = null;
// decrypt
final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION);
cipher.init(Cipher.DECRYPT_MODE, getKey());
data = cipher.doFinal(edata);
// deserialize
try {
final ByteArrayInputStream bais = new ByteArrayInputStream(data);
final ObjectInputStream ois = new ObjectInputStream(bais);
final Object obj = ois.readObject();
if(!(obj instanceof Serializable)) {
throw new IllegalArgumentException("Encrypted data not Serializable");
}
return (Serializable) obj;
}
catch(final IOException ioe) {
throw new GeneralSecurityException("Error attempting to de-serialize object: " + ioe.getMessage());
}
}
/**
* Encrypts a String.
* @param str The String to encrypt
* @return encrypted string
* @throws IllegalArgumentException
* @throws IllegalStateException
*/
public static String encrypt(String str) {
try {
final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION);
cipher.init(Cipher.ENCRYPT_MODE, getKey());
return new BASE64Encoder().encode(cipher.doFinal(str.getBytes(ENCODING)));
}
catch(final GeneralSecurityException gse) {
throw new IllegalArgumentException("Encryption failed due to an unexpected security error: " + gse.getMessage(),
gse);
}
catch(final UnsupportedEncodingException uee) {
throw new IllegalStateException("Encryption failed due to an unsupported encoding: " + ENCODING, uee);
}
}
/**
* Decrypts a String.
* @param str The String to decrypt
* @return decrypted string
* @throws IllegalArgumentException When either an I/O or a security related
* error occurrs.
* @throws IllegalStateException When there is an encoding related error.
*/
public static String decrypt(String str) {
try {
final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION);
cipher.init(Cipher.DECRYPT_MODE, getKey());
// Decode base64 to get bytes
final byte[] dec = new BASE64Decoder().decodeBuffer(str);
// Decrypt
final byte[] utf8 = cipher.doFinal(dec);
// Decode using utf-8
return new String(utf8, ENCODING);
}
catch(final GeneralSecurityException gse) {
throw new IllegalArgumentException("Decryption failed due to an unexpected security error: " + gse.getMessage(),
gse);
}
catch(final UnsupportedEncodingException uee) {
throw new IllegalStateException("Decryption failed due to an unsupported encoding: " + ENCODING, uee);
}
catch(final IOException ioe) {
throw new IllegalArgumentException("Decryption failed: " + ioe.getMessage(), ioe);
}
}
/**
* Digests a string with the specified digest type. This method converts the
* digest result to a String.
* @param str string to digest
* @param digestType the java string representation of the digest type
* @return the digested string
* @throws IllegalArgumentException When an digest related error occurrs.
*/
public static String digest(String str, String digestType) {
MessageDigest md;
try {
md = MessageDigest.getInstance(digestType);
}
catch(final NoSuchAlgorithmException nsae) {
throw new IllegalArgumentException(StringUtil.replaceVariables("Could not get digest with algorithm: %1",
digestType), nsae);
}
final byte[] digest = md.digest(str.getBytes());
final StringBuffer hexString = new StringBuffer();
for(final byte element : digest) {
String plainText = Integer.toHexString(0xFF & element);
if(plainText.length() < 2) {
plainText = "0" + plainText;
}
hexString.append(plainText);
}
return hexString.toString();
}
}
| [
"jopaki@gmail.com"
] | jopaki@gmail.com |
b6974a9e5b2e9e5431baa0bd800e5c3306872e1b | 930c207e245c320b108e9699bbbb036260a36d6a | /BRICK-Jackson-JsonLd/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/IFCU_Zone_Temperature_Sensor.java | f3fd7667e61f913841822ab4211a5dadb4baa621 | [] | no_license | InnovationSE/BRICK-Generated-By-OLGA | 24d278f543471e1ce622f5f45d9e305790181fff | 7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2 | refs/heads/master | 2021-07-01T14:13:11.302860 | 2017-09-21T12:44:17 | 2017-09-21T12:44:17 | 104,251,784 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,024 | java | /**
* This file is automatically generated by OLGA
* @author OLGA
* @version 1.0
*/
package brickschema.org.schema._1_0_2.Brick;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldId;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldProperty;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldType;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldLink;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldPropertyType;
import brick.jsonld.util.RefId;
import brickschema.org.schema._1_0_2.Brick.IZone_Temperature_Sensor;
public interface IFCU_Zone_Temperature_Sensor extends IZone_Temperature_Sensor {
/**
* @return RefId
*/
@JsonIgnore
public RefId getRefId();
}
| [
"Andre.Ponnouradjane@non.schneider-electric.com"
] | Andre.Ponnouradjane@non.schneider-electric.com |
07ec8cf8c9156b32d7f108087ae6b9f1f3d1cedf | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/e571902816505be906445d71c3bbb40140255ee0/before/InlineOptionsDialog.java | aa082434efa9345a8045f825921d55e05fd6fbd6 | [] | 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,969 | java | /*
* Copyright 2000-2009 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.refactoring.inline;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiElement;
import com.intellij.refactoring.ui.RefactoringDialog;
import com.intellij.refactoring.util.RadioUpDownListener;
import com.intellij.ui.IdeBorderFactory;
import javax.swing.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
public abstract class InlineOptionsDialog extends RefactoringDialog implements InlineOptions {
protected JRadioButton myRbInlineAll;
protected JRadioButton myRbInlineThisOnly;
protected boolean myInvokedOnReference;
protected final PsiElement myElement;
private final JLabel myNameLabel = new JLabel();
protected JPanel myOptionsPanel;
protected InlineOptionsDialog(Project project, boolean canBeParent, PsiElement element) {
super(project, canBeParent);
myElement = element;
}
protected JComponent createNorthPanel() {
myNameLabel.setText(getNameLabelText());
return myNameLabel;
}
public boolean isInlineThisOnly() {
return myRbInlineThisOnly.isSelected();
}
protected JComponent createCenterPanel() {
myOptionsPanel = new JPanel();
myOptionsPanel.setBorder(IdeBorderFactory.createTitledBorder(getBorderTitle()));
myOptionsPanel.setLayout(new BoxLayout(myOptionsPanel, BoxLayout.Y_AXIS));
myRbInlineAll = new JRadioButton();
myRbInlineAll.setText(getInlineAllText());
myRbInlineAll.setSelected(true);
myRbInlineThisOnly = new JRadioButton();
myRbInlineThisOnly.setText(getInlineThisText());
myOptionsPanel.add(myRbInlineAll);
myOptionsPanel.add(myRbInlineThisOnly);
ButtonGroup bg = new ButtonGroup();
bg.add(myRbInlineAll);
bg.add(myRbInlineThisOnly);
new RadioUpDownListener(myRbInlineAll, myRbInlineThisOnly);
myRbInlineThisOnly.setEnabled(myInvokedOnReference);
final boolean writable = myElement.isWritable();
myRbInlineAll.setEnabled(writable);
if(myInvokedOnReference) {
if (canInlineThisOnly()) {
myRbInlineAll.setSelected(false);
myRbInlineAll.setEnabled(false);
myRbInlineThisOnly.setSelected(true);
} else {
if (writable) {
final boolean inlineThis = isInlineThis();
myRbInlineThisOnly.setSelected(inlineThis);
myRbInlineAll.setSelected(!inlineThis);
}
else {
myRbInlineAll.setSelected(false);
myRbInlineThisOnly.setSelected(true);
}
}
}
else {
myRbInlineAll.setSelected(true);
myRbInlineThisOnly.setSelected(false);
}
getPreviewAction().setEnabled(myRbInlineAll.isSelected());
myRbInlineAll.addItemListener(
new ItemListener() {
public void itemStateChanged(ItemEvent e) {
boolean enabled = myRbInlineAll.isSelected();
getPreviewAction().setEnabled(enabled);
}
}
);
return myOptionsPanel;
}
protected abstract String getNameLabelText();
protected abstract String getBorderTitle();
protected abstract String getInlineAllText();
protected abstract String getInlineThisText();
protected abstract boolean isInlineThis();
protected boolean canInlineThisOnly() {
return false;
}
@Override
public JComponent getPreferredFocusedComponent() {
return myRbInlineThisOnly.isSelected() ? myRbInlineThisOnly : myRbInlineAll;
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
c62a5bbaa344ebf0d10904390a4e7a6321386236 | abac6688a45404be74426fc2381efd0750c703be | /Lib_AndroidAsync/test/src/com/koushikdutta/async/test/HttpServerTests.java | 7139cafcee7b29d19efaa659f228c2a4f2cee569 | [] | no_license | luozhimin0918/JNZBS | b77994cfb0aa7a5f51aca1b37a0d84d091397b9a | e784ee8208f3e883ba49bd8b10cb8f4c0cd7cd64 | refs/heads/master | 2021-01-20T09:49:17.874508 | 2017-09-13T02:25:34 | 2017-09-13T02:25:34 | 101,609,910 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,872 | java | package com.koushikdutta.async.test;
import com.koushikdutta.async.AsyncServer;
import com.koushikdutta.async.callback.CompletedCallback;
import com.koushikdutta.async.http.AsyncHttpClient;
import com.koushikdutta.async.http.AsyncHttpPost;
import com.koushikdutta.async.http.body.JSONObjectBody;
import com.koushikdutta.async.http.body.MultipartFormDataBody;
import com.koushikdutta.async.http.body.StringBody;
import com.koushikdutta.async.http.body.UrlEncodedFormBody;
import com.koushikdutta.async.http.server.AsyncHttpServer;
import com.koushikdutta.async.http.server.AsyncHttpServerRequest;
import com.koushikdutta.async.http.server.AsyncHttpServerResponse;
import com.koushikdutta.async.http.server.HttpServerRequestCallback;
import com.koushikdutta.async.util.StreamUtility;
import junit.framework.TestCase;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;
public class HttpServerTests extends TestCase {
AsyncHttpServer httpServer;
@Override
protected void setUp() throws Exception {
super.setUp();
httpServer = new AsyncHttpServer();
httpServer.setErrorCallback(new CompletedCallback() {
@Override
public void onCompleted(Exception ex) {
fail();
}
});
httpServer.listen(AsyncServer.getDefault(), 5000);
httpServer.get("/hello", new HttpServerRequestCallback() {
@Override
public void onRequest(AsyncHttpServerRequest request, AsyncHttpServerResponse response) {
assertNotNull(request.getHeaders().get("Host"));
response.send("hello");
}
});
httpServer.post("/echo", new HttpServerRequestCallback() {
@Override
public void onRequest(AsyncHttpServerRequest request, final AsyncHttpServerResponse response) {
try {
assertNotNull(request.getHeaders().get("Host"));
JSONObject json = new JSONObject();
if (request.getBody() instanceof UrlEncodedFormBody) {
UrlEncodedFormBody body = (UrlEncodedFormBody)request.getBody();
for (NameValuePair pair: body.get()) {
json.put(pair.getName(), pair.getValue());
}
}
else if (request.getBody() instanceof JSONObjectBody) {
json = ((JSONObjectBody)request.getBody()).get();
}
else if (request.getBody() instanceof StringBody) {
json.put("foo", ((StringBody)request.getBody()).get());
}
else if (request.getBody() instanceof MultipartFormDataBody) {
MultipartFormDataBody body = (MultipartFormDataBody)request.getBody();
for (NameValuePair pair: body.get()) {
json.put(pair.getName(), pair.getValue());
}
}
response.send(json);
}
catch (Exception e) {
}
}
});
}
public void testJSONObject() throws Exception {
JSONObject json = new JSONObject();
json.put("foo", "bar");
JSONObjectBody body = new JSONObjectBody(json);
AsyncHttpPost post = new AsyncHttpPost("http://localhost:5000/echo");
post.setBody(body);
json = AsyncHttpClient.getDefaultInstance().executeJSONObject(post, null).get();
assertEquals(json.getString("foo"), "bar");
}
public void testString() throws Exception {
StringBody body = new StringBody("bar");
AsyncHttpPost post = new AsyncHttpPost("http://localhost:5000/echo");
post.setBody(body);
JSONObject json = AsyncHttpClient.getDefaultInstance().executeJSONObject(post, null).get();
assertEquals(json.getString("foo"), "bar");
}
public void testUrlEncodedFormBody() throws Exception {
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("foo", "bar"));
HttpPost post = new HttpPost("http://localhost:5000/echo");
post.setEntity(new UrlEncodedFormEntity(params));
HttpResponse response = new DefaultHttpClient().execute(post);
String contents = StreamUtility.readToEnd(response.getEntity().getContent());
JSONObject json = new JSONObject(contents);
assertEquals(json.getString("foo"), "bar");
}
public void testServerHello() throws Exception {
URL url = new URL("http://localhost:5000/hello");
URLConnection conn = url.openConnection();
InputStream is = conn.getInputStream();
String contents = StreamUtility.readToEnd(is);
is.close();
assertEquals(contents, "hello");
}
public void testServerHelloAgain() throws Exception {
URL url = new URL("http://localhost:5000/hello");
URLConnection conn = url.openConnection();
InputStream is = conn.getInputStream();
String contents = StreamUtility.readToEnd(is);
is.close();
assertEquals(contents, "hello");
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
httpServer.stop();
AsyncServer.getDefault().stop();
}
}
| [
"54543534@domain.com"
] | 54543534@domain.com |
429b889ab4690ce41f8657faa7c09740b70430e2 | 0d86a98cd6a6477d84152026ffc6e33e23399713 | /kata/beta/count-the-likes/main/Kata.java | f45320e0725c5ba22f8cd13a77820924a1476ca7 | [
"MIT"
] | permissive | ParanoidUser/codewars-handbook | 0ce82c23d9586d356b53070d13b11a6b15f2d6f7 | 692bb717aa0033e67995859f80bc7d034978e5b9 | refs/heads/main | 2023-07-28T02:42:21.165107 | 2023-07-27T12:33:47 | 2023-07-27T12:33:47 | 174,944,458 | 224 | 65 | MIT | 2023-09-14T11:26:10 | 2019-03-11T07:07:34 | Java | UTF-8 | Java | false | false | 194 | java | import static java.util.stream.Stream.of;
interface Kata {
static boolean evalLikes(String[] words) {
return .05 * words.length < of(words).filter("like"::equalsIgnoreCase).count();
}
} | [
"5120290+ParanoidUser@users.noreply.github.com"
] | 5120290+ParanoidUser@users.noreply.github.com |
b3c8892234f3e986303c722ae12637df30a440e7 | 4ad17f7216a2838f6cfecf77e216a8a882ad7093 | /clbs/src/main/java/com/zw/platform/domain/vas/carbonmgt/FuelType.java | ed1255f7d3d9537f6c20ccbf6a495d49aaa0e067 | [
"MIT"
] | permissive | djingwu/hybrid-development | b3c5eed36331fe1f404042b1e1900a3c6a6948e5 | 784c5227a73d1e6609b701a42ef4cdfd6400d2b7 | refs/heads/main | 2023-08-06T22:34:07.359495 | 2021-09-29T02:10:11 | 2021-09-29T02:10:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 806 | java | package com.zw.platform.domain.vas.carbonmgt;
import com.zw.platform.util.excel.annotation.ExcelField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* 燃料类型实体
* @author tangshunyu
*
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class FuelType implements Serializable {
private static final long serialVersionUID = 1L;
private String id;
@ExcelField(title="燃油类型")
private String fuelType; //燃料类型
//0:柴油 1:汽油 2:天然气
private String fuelCategory; // 燃料类别
private String describes; //燃料类型描述
private Integer flag;
private Date createDataTime;
private String createDataUsername;
private Date updateDataTime;
private String updateDataUsername;
}
| [
"wuxuetao@zwlbs.com"
] | wuxuetao@zwlbs.com |
2c3023f13800616e1b38557d5caf058ced4117e7 | ef98dcfab6ff2c19cd1aae537e26594a08a24ffa | /app/src/main/java/com/d/music/online/fragment/DetailFragment.java | c568d7edf79a8dbcf2a7202159c2531a45416553 | [
"Apache-2.0"
] | permissive | wljie2008/DMusic | c704c030cb6706f04f9dc19ebe7f2e8b001b8a68 | 5ac8ca67889472de3062207b2429d9398431e628 | refs/heads/master | 2020-04-24T03:37:19.088099 | 2019-02-15T03:44:24 | 2019-02-15T06:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,907 | java | package com.d.music.online.fragment;
import android.app.AlertDialog;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.d.lib.common.component.loader.AbsFragment;
import com.d.lib.common.component.mvp.MvpView;
import com.d.lib.common.component.repeatclick.ClickFast;
import com.d.lib.common.utils.ViewHelper;
import com.d.lib.common.view.TitleLayout;
import com.d.lib.common.view.dialog.AlertDialogFactory;
import com.d.lib.xrv.adapter.CommonAdapter;
import com.d.music.R;
import com.d.music.component.media.controler.MediaControler;
import com.d.music.data.database.greendao.bean.MusicModel;
import com.d.music.online.activity.DetailActivity;
import com.d.music.online.adapter.DetailAdapter;
import com.d.music.online.model.BillSongsRespModel;
import com.d.music.online.model.RadioSongsRespModel;
import com.d.music.online.presenter.MusicPresenter;
import com.d.music.online.view.IMusicView;
import com.d.music.transfer.manager.TransferManager;
import com.d.music.view.SongHeaderView;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
/**
* DetailFragment
* Created by D on 2018/8/12.
*/
public class DetailFragment extends AbsFragment<MusicModel, MusicPresenter> implements IMusicView {
@BindView(R.id.tl_title)
TitleLayout tlTitle;
@BindView(R.id.iv_cover)
ImageView ivCover;
private int type;
private String channel, title, cover;
private SongHeaderView header;
@OnClick({R.id.iv_title_left})
public void onClickListener(View v) {
if (ClickFast.isFastDoubleClick()) {
return;
}
switch (v.getId()) {
case R.id.iv_title_left:
getActivity().finish();
break;
}
}
@Override
public MusicPresenter getPresenter() {
return new MusicPresenter(getActivity().getApplicationContext());
}
@Override
protected MvpView getMvpView() {
return this;
}
@Override
protected int getLayoutRes() {
return R.layout.module_online_fragment_detail;
}
@Override
protected CommonAdapter<MusicModel> getAdapter() {
return new DetailAdapter(mContext, new ArrayList<MusicModel>(), R.layout.module_online_adapter_music);
}
@Override
protected void init() {
Bundle bundle = getArguments();
if (bundle != null) {
type = bundle.getInt(DetailActivity.ARG_TYPE, DetailActivity.TYPE_BILL);
channel = bundle.getString(DetailActivity.ARG_CHANNEL);
title = bundle.getString(DetailActivity.ARG_TITLE);
cover = bundle.getString(DetailActivity.ARG_COVER);
}
tlTitle.setText(R.id.tv_title_title, !TextUtils.isEmpty(title) ? title
: getResources().getString(R.string.module_common_music));
super.init();
}
@Override
protected void initList() {
initHead();
xrvList.setCanRefresh(false);
if (type == DetailActivity.TYPE_RADIO) {
xrvList.setCanLoadMore(false);
}
xrvList.addHeaderView(header);
super.initList();
}
private void initHead() {
header = new SongHeaderView(mContext);
header.setBackgroundColor(ContextCompat.getColor(mContext, R.color.lib_pub_color_bg_sub));
header.setVisibility(R.id.flyt_header_song_download, View.VISIBLE);
header.setVisibility(R.id.flyt_header_song_handler, View.GONE);
header.setVisibility(View.GONE);
header.setOnHeaderListener(new SongHeaderView.OnHeaderListener() {
@Override
public void onPlayAll() {
MediaControler.getIns(mContext).init(commonLoader.getDatas(), 0, true);
}
@Override
public void onHandle() {
}
});
ViewHelper.setOnClick(header, R.id.flyt_header_song_download, new View.OnClickListener() {
@Override
public void onClick(View v) {
final List<MusicModel> datas = commonLoader.getDatas();
AlertDialogFactory.createFactory(mContext)
.getAlertDialog(mContext.getResources().getString(R.string.module_common_tips),
mContext.getResources().getString(R.string.module_common_traffic_prompt),
mContext.getResources().getString(R.string.lib_pub_ok),
mContext.getResources().getString(R.string.lib_pub_cancel),
new AlertDialogFactory.OnClickListener() {
@Override
public void onClick(AlertDialog dlg, View v) {
TransferManager.getIns().optSong().add(datas);
}
}, null);
}
});
}
@Override
protected void onLoad(int page) {
if (type == DetailActivity.TYPE_ARTIST) {
mPresenter.getArtistSongs(channel, page);
} else if (type == DetailActivity.TYPE_BILL) {
mPresenter.getBillSongs(channel, page);
} else if (type == DetailActivity.TYPE_RADIO) {
mPresenter.getRadioSongs(channel, page);
}
}
@Override
public void setInfo(BillSongsRespModel info) {
if (!TextUtils.isEmpty(cover)) {
setCover(cover);
return;
}
if (info == null || info.billboard == null || info.billboard.pic_s260 == null) {
return;
}
setCover(info.billboard.pic_s260);
}
@Override
public void setInfo(RadioSongsRespModel info) {
if (!TextUtils.isEmpty(cover)) {
setCover(cover);
return;
}
if (info == null || info.result == null || info.result.songlist == null
|| info.result.songlist.size() <= 0
|| info.result.songlist.get(0) == null) {
return;
}
setCover(info.result.songlist.get(0).thumb);
}
@Override
public void setData(List<MusicModel> datas) {
if (type == DetailActivity.TYPE_ARTIST) {
setCover(cover);
}
super.setData(datas);
notifyDataCountChanged(commonLoader.getDatas().size());
}
private void setCover(String url) {
Glide.with(mContext)
.load(url)
.apply(new RequestOptions().dontAnimate())
.into(ivCover);
}
private void notifyDataCountChanged(int count) {
header.setSongCount(count);
header.setVisibility(count <= 0 ? View.GONE : View.VISIBLE);
}
}
| [
"s90789@outlook.com"
] | s90789@outlook.com |
037e95843da55aff8ee0800ba39be99c8a98b249 | 93153e615bf3088eca761f2a8244aa323f69d213 | /hehenian-web/src/main/java/com/sp2p/system/interceptor/AppInterceptor.java | 89dfe39ba5dea4e2749afa870d162a74cffbbb81 | [] | no_license | shaimeizi/dk | 518d7b3c21af3ec3a5ebc8bfad8aa6eae002048c | 42bed19000495352e37344af9c71bf3f7e0b663f | refs/heads/master | 2021-01-18T16:55:30.027826 | 2015-07-24T05:09:14 | 2015-07-24T05:09:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,541 | java | package com.sp2p.system.interceptor;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.renren.api.client.utils.Md5Utils;
import com.shove.security.Encrypt;
import com.shove.security.License;
import com.shove.web.util.JSONUtils;
public class AppInterceptor implements Interceptor {
private final static String APP_KEY = "wDwdKd27d0Qj1w%$Ea536yiuPE96O!3L";
public void destroy() {
}
public void init() {
}
public String intercept(ActionInvocation invocation) throws Exception {
HttpServletRequest request = ServletActionContext.getRequest();
String auth = (String) request.getParameter("auth");
System.out.println("auth===========>" + auth);
String info = (String)request.getParameter("info");
System.out.println("info===========>" + info);
Map<String, String> jsonMap = new HashMap<String, String>();
if (StringUtils.isBlank(auth)) {
jsonMap.put("error", "-2");
jsonMap.put("msg", "验证签名不正确");
JSONUtils.printObject(jsonMap);
return null;
}
Map<String, String> map = (Map<String, String>) JSONObject.toBean(
JSONObject.fromObject(auth), HashMap.class);
String crc = map.get("crc");
System.out.println("crc==>"+crc);
if (StringUtils.isBlank(crc)) {
jsonMap.put("error", "-2");
jsonMap.put("msg", "验证签名不正确");
JSONUtils.printObject(jsonMap);
return null;
}
if(StringUtils.isBlank(map.get("time_stamp"))){
jsonMap.put("error", "-2");
jsonMap.put("msg", "时间戳不能为空");
JSONUtils.printObject(jsonMap);
return null;
}
SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
long curTime = new Date().getTime();
long client = sDateFormat.parse(map.get("time_stamp")).getTime();
if (curTime - client >= 1 * 60 * 1000) {
jsonMap.put("error", "-2");
jsonMap.put("msg", "请求超时");
JSONUtils.printObject(jsonMap);
return null;
}
if(StringUtils.isBlank(map.get("imei"))){
jsonMap.put("error", "-2");
jsonMap.put("msg", "imei不能为空");
JSONUtils.printObject(jsonMap);
return null;
}
if(StringUtils.isBlank(map.get("uid"))){
jsonMap.put("error", "-2");
jsonMap.put("msg", "uid不能为空");
JSONUtils.printObject(jsonMap);
return null;
}
if(StringUtils.isBlank(map.get("uid"))){
jsonMap.put("error", "-2");
jsonMap.put("msg", "uid不能为空");
JSONUtils.printObject(jsonMap);
return null;
}
StringBuilder keys = new StringBuilder();
keys.append(map.get("time_stamp"));
keys.append(map.get("imei"));
keys.append(map.get("uid"));
keys.append(Encrypt.MD5(map.get("uid")+"").substring(9, 20));
keys.append(info);
keys.append(APP_KEY);
System.out.println("keys==>"+keys.toString());
String md5Crc = Md5Utils.md5(keys.toString());
System.out.println("MD5CRC==>"+md5Crc);
if(!crc.equals(md5Crc)){
jsonMap.put("error", "-2");
jsonMap.put("msg", "验证签名不正确");
JSONUtils.printObject(jsonMap);
return null;
}
//// License.update(request, IConstants.LICENSE);
// if (!License.getAndoridAllow(request)&&!License.getiOSAllow(request)) {
// jsonMap.put("error", "1");
// jsonMap.put("msg", "");
// JSONUtils.printObject(jsonMap);
// return null;
// }
return invocation.invoke();
}
}
| [
"zhangyunhmf@harry.hyn.com"
] | zhangyunhmf@harry.hyn.com |
b3f0b03a40ae573b468273c82ecefc948ac18f57 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/76/org/apache/commons/math/random/RandomDataImpl_shuffle_719.java | 810dd603fe1c3cc780a44085c9d3fa1c50032f5e | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 2,814 | java |
org apach common math random
implement link random data randomdata link random gener randomgener
instanc gener secur data link java secur secur random securerandom
instanc provid data code secur xxx nextsecurexxx code method
code random gener randomgener code provid constructor
gener base link java util random plug
implement implement code random gener randomgener code directli
extend link abstract random gener abstractrandomgener
support reseed underli pseudo random number gener prng
code secur provid securityprovid code code algorithm code
code secur random securerandom code instanc reset
detail prn prng link java util random
link java secur secur random securerandom
strong usag note strong
instanc variabl maintain code random gener randomgener code
code secur random securerandom code instanc data gener
gener random sequenc valu string
strong strong code random data impl randomdataimpl code instanc repeatedli
secur method slower
cryptograph secur random sequenc requir secur random
sequenc sequenc pseudo random valu addit
dispers subsequ valu
subsequ length addit properti
knowledg valu gener point sequenc make
easier predict subsequ valu
code random data impl randomdataimpl code creat underli random
number gener strong strong intial
explicitli seed secur gener seed
current time millisecond hold secur
gener provid code random gener randomgener code constructor
gener reseed constructor reseed
code seed rese code code seed secur reseedsecur code method deleg
method underli code random gener randomgener code
code secur random securerandom code instanc code seed rese code
fulli reset initi state secur random number gener
reseed specif result subsequ
random sequenc seed secur reseedsecur strong strong
reiniti secur random number gener secur sequenc start
call rese secur reseedsecur ident
implement
version revis date
random data impl randomdataimpl random data randomdata serializ
cycl permut shuffl randomli order element
list
param list
list shuffl
param end
element past shuffl begin
shuffl list end
target
list length end
target
target int nextint
temp list target
list target list
list temp
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
3c7aff29bb94c5ab60f8f4fd482e26af9e33ae91 | e1fde0c2bb2c76b95dc89b0e8949ace93c9875ca | /org.summer.view.widget/src/org/summer/view/widget/utils/HashObjectMap.java | e84df8ca4de90ae73cf3422b703e4a82d50f6909 | [] | no_license | OhmPopy/jswpf | 09d4fc505b51f915b261e9ad51effca4b06300b9 | c4e983c4746ce1261dd6b5ab619b677c44d75176 | refs/heads/master | 2020-04-29T09:56:02.735280 | 2014-04-21T22:54:37 | 2014-04-21T22:54:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,369 | java | package org.summer.view.widget.utils;
import org.summer.view.widget.DependencyProperty;
public class HashObjectMap extends FrugalMapBase
{
public FrugalMapStoreState InsertEntry(int key, Object value)
{
// Debug.Assert(INVALIDKEY != key);
if (null != _entries)
{
// This is done because forward branches
// default prediction is not to be taken
// making this a CPU win because insert
// is a common operation.
}
else
{
_entries = new Hashtable(MINSIZE);
}
_entries[key] = ((value != NullValue) && (value != null)) ? value : NullValue;
return FrugalMapStoreState.Success;
}
public void RemoveEntry(int key)
{
_entries.Remove(key);
}
public Object Search(int key)
{
Object value = _entries[key];
return ((value != NullValue) && (value != null)) ? value : DependencyProperty.UnsetValue;
}
public void Sort()
{
// Always sorted.
}
public void GetKeyValuePair(int index, /*out*/ int key, /*out*/ Object value)
{
if (index < _entries.Count)
{
IDictionaryEnumerator myEnumerator = _entries.GetEnumerator();
// Move to first valid value
myEnumerator.MoveNext();
for (int i = 0; i < index; ++i)
{
myEnumerator.MoveNext();
}
key = (int)myEnumerator.Key;
if ((myEnumerator.Value != NullValue) && (myEnumerator.Value != null))
{
value = myEnumerator.Value;
}
else
{
value = DependencyProperty.UnsetValue;
}
}
else
{
value = DependencyProperty.UnsetValue;
key = INVALIDKEY;
throw new ArgumentOutOfRangeException("index");
}
}
public void Iterate(ArrayList list, FrugalMapIterationCallback callback)
{
IDictionaryEnumerator myEnumerator = _entries.GetEnumerator();
while (myEnumerator.MoveNext())
{
int key = (int)myEnumerator.Key;
Object value;
if ((myEnumerator.Value != NullValue) && (myEnumerator.Value != null))
{
value = myEnumerator.Value;
}
else
{
value = DependencyProperty.UnsetValue;
}
callback(list, key, value);
}
}
public void Promote(FrugalMapBase newMap)
{
// Should never get here
throw new InvalidOperationException(SR.Get(SRID.FrugalMap_CannotPromoteBeyondHashtable));
}
// Size of this data store
public int Count
{
get
{
return _entries.Count;
}
}
// 163 is chosen because it is the first prime larger than 128, the MAXSIZE of SortedObjectMap
final int MINSIZE = 163;
// Hashtable will return null from its indexer if the key is not
// found OR if the value is null. To distinguish between these
// two cases we insert NullValue instead of null.
private static Object NullValue = new Object();
Hashtable _entries;
}
| [
"1141196380@qq.com"
] | 1141196380@qq.com |
5f4cb3d8abe1fac8f1a663b9aa4a8615175d6d6d | 155da3d398a82b72dd513681e3cd3bc8440bc3a4 | /src/main/scala/net/machinemuse/numina/geometry/Colour.java | d8b73c72c8356014e80800a5114ac6e28b536ab5 | [
"BSD-2-Clause"
] | permissive | gnif/Numina | 54f971a13f0cec6f360918f8c153b6de028e11fd | bb7a39b5e85d57ce1fa686400767546e442a457c | refs/heads/experimental | 2020-06-16T22:54:02.959945 | 2016-11-14T13:26:51 | 2016-11-14T13:26:51 | 75,060,516 | 0 | 0 | null | 2016-11-29T08:37:17 | 2016-11-29T08:37:15 | Scala | UTF-8 | Java | false | false | 4,210 | java | package net.machinemuse.numina.geometry;
import org.lwjgl.opengl.GL11;
import java.awt.*;
/**
* A class representing an RGBA colour and various helper functions. Mainly to
* improve readability elsewhere.
*
* @author MachineMuse
*/
public class Colour {
public static final Colour LIGHTBLUE = new Colour(0.5, 0.5, 1.0, 1.0);
public static final Colour DARKBLUE = new Colour(0.0, 0.0, 0.5, 1.0);
public static final Colour ORANGE = new Colour(0.9, 0.6, 0.2, 1.0);
public static final Colour YELLOW = new Colour(0.0, 0.0, 0.5, 1.0);
public static final Colour WHITE = new Colour(1.0, 1.0, 1.0, 1.0);
public static final Colour BLACK = new Colour(0.0, 0.0, 0.0, 1.0);
public static final Colour DARKGREY = new Colour(0.4, 0.4, 0.4, 1.0);
public static final Colour RED = new Colour(1.0, 0.2, 0.2, 1.0);
public static final Colour DARKGREEN = new Colour(0.0, 0.8, 0.2, 1.0);
public static final Colour GREEN = new Colour(0.0, 1.0, 0.0, 1.0);
/**
* The RGBA values are stored as floats from 0.0F (nothing) to 1.0F (full
* saturation/opacity)
*/
public double r, g, b, a;
/**
* Constructor. Just sets the RGBA values to the parameters.
*/
public Colour(double r, double g, double b, double a) {
this.r = r;
this.g = g;
this.b = b;
this.a = a;
}
/**
* Secondary constructor. Sets RGB accordingly and sets alpha to 1.0F (full
* opacity)
*/
public Colour(float r, float g, float b) {
this(r, g, b, 1.0F);
}
/**
* Takes colours in the integer format that Minecraft uses, and converts.
*/
public Colour(int c) {
this.a = (c >> 24 & 255) / 255.0F;
this.r = (c >> 16 & 255) / 255.0F;
this.g = (c >> 8 & 255) / 255.0F;
this.b = (c & 255) / 255.0F;
}
/**
* Returns this colour as an int in Minecraft's format (I think)
*
* @return int value of this colour
*/
public int getInt() {
int val = 0;
val = val | ((int) (a * 255) << 24);
val = val | ((int) (r * 255) << 16);
val = val | ((int) (g * 255) << 8);
val = val | ((int) (b * 255));
return val;
}
public static int getInt(double r, double g, double b, double a) {
int val = 0;
val = val | ((int) (a * 255) << 24);
val = val | ((int) (r * 255) << 16);
val = val | ((int) (g * 255) << 8);
val = val | ((int) (b * 255));
return val;
}
/**
* Returns a colour with RGB set to the same value ie. a shade of grey.
*/
public static Colour getGreyscale(float value, float alpha) {
return new Colour(value, value, value, alpha);
}
/**
* Returns a colour at interval interval along a linear gradient from this
* to target
*/
public Colour interpolate(Colour target, double d) {
double complement = 1 - d;
return new Colour(this.r * complement + target.r * d, this.g * complement + target.g * d, this.b * complement + target.b * d, this.a
* complement + target.a * d);
}
public void doGL() {
GL11.glColor4d(r, g, b, a);
}
public static void doGLByInt(int c) {
double a = (c >> 24 & 255) / 255.0F;
double r = (c >> 16 & 255) / 255.0F;
double g = (c >> 8 & 255) / 255.0F;
double b = (c & 255) / 255.0F;
GL11.glColor4d(r, g, b, a);
}
public Colour withAlpha(double newalpha) {
return new Colour(this.r, this.g, this.b, newalpha);
}
public double[] asArray() {
return new double[]{r, g, b, a};
}
public String hexColour() {
return hexDigits(r) + hexDigits(g) + hexDigits(b) + (a < 1 ? hexDigits(a) : "");
}
public String hexDigits(double x) {
int y = (int) (x * 255);
String hexDigits = "0123456789ABCDEF";
return hexDigits.charAt(y / 16) + "" + hexDigits.charAt(y % 16);
}
public Color awtColor() {
return new Color((float) r, (float) g, (float) b, (float) a);
}
public boolean equals(Colour o) {
return r == o.r && g == o.g && b == o.b && a == o.a;
}
} | [
"lehjr1@gmail.com"
] | lehjr1@gmail.com |
ee36c44e4f5703b38e8a8f45aa3f6874d336e384 | ca3bc4c8c68c15c961098c4efb2e593a800fe365 | /TableToMyibatisUtf-8/file/com/neusoft/crm/api/cpc1/prod/dto/ProductDTO.java | 6c85bc9f28905b183bd6c81acfce8786436736bf | [] | no_license | fansq-j/fansq-summary | 211b01f4602ceed077b38bb6d2b788fcd4f2c308 | 00e838843e6885135eeff1eb1ac95d0553fc36ea | refs/heads/master | 2022-12-17T01:18:34.323774 | 2020-01-14T06:57:24 | 2020-01-14T06:57:24 | 214,321,994 | 0 | 0 | null | 2022-11-17T16:20:29 | 2019-10-11T02:02:23 | Java | UTF-8 | Java | false | false | 191 | java | package com.neusoft.crm.api.cpc1.prod.dto;
import com.neusoft.crm.api.cpc1.prod.data.ProductDO;
/**
* PRODUCT表对应的实体DTO信息
*/
public class ProductDTO extends ProductDO{
}
| [
"13552796829@163.com"
] | 13552796829@163.com |
e2903c15a9cb049f8dafe849b7c90d4dfb771926 | 7ef841751c77207651aebf81273fcc972396c836 | /dstream/src/main/java/com/loki/dstream/stubs/SampleClass7603.java | 412ddde85f060927e87385fcace657af465c1d58 | [] | no_license | SergiiGrechukha/ModuleApp | e28e4dd39505924f0d36b4a0c3acd76a67ed4118 | 00e22d51c8f7100e171217bcc61f440f94ab9c52 | refs/heads/master | 2022-05-07T13:27:37.704233 | 2019-11-22T07:11:19 | 2019-11-22T07:11:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package com.loki.dstream.stubs;
public class SampleClass7603 {
private SampleClass7604 sampleClass;
public SampleClass7603(){
sampleClass = new SampleClass7604();
}
public String getClassName() {
return sampleClass.getClassName();
}
} | [
"sergey.grechukha@gmail.com"
] | sergey.grechukha@gmail.com |
79ba515bf7dab07d5cdcc50bbcafa255ce028035 | 6e5dd34c136b668f5854f4beb4ac5abda7a165f8 | /src/main/java/com/jaenyeong/chapter_12/Quiz.java | 3c694e2b178dc41457656919ce2aead0cc126ea9 | [] | no_license | jaenyeong/Study_Modern-java | 93e78c199d5b96879727105331140034052717c2 | 28e281a51fec07dda1447e9ec844dc30de687ada | refs/heads/master | 2023-06-16T14:23:57.363877 | 2021-07-11T13:07:06 | 2021-07-11T13:07:06 | 250,226,396 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,423 | java | package com.jaenyeong.chapter_12;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.temporal.*;
public class Quiz {
public static void main(String[] args) {
localDate();
}
public static void localDate() {
LocalDate date = LocalDate.of(2014, 3, 18);
System.out.println(date);
date = date.with(ChronoField.MONTH_OF_YEAR, 9);
System.out.println(date);
date = date.plusYears(2).minusDays(10);
System.out.println(date);
date.withYear(2011);
System.out.println(date);
}
public static void lambdaTemporalAdjuster() {
LocalDate date = LocalDate.now();
date = date.with(temporal -> {
// 현재 날짜 읽기
DayOfWeek dow = DayOfWeek.of(temporal.get(ChronoField.DAY_OF_WEEK));
// 일반적으로 하루 추가
int dayToAdd = 1;
if (dow == DayOfWeek.FRIDAY) { // 오늘이 금요일이면 3일 추가
dayToAdd = 3;
} else if (dow == DayOfWeek.SATURDAY) { // 오늘이 토요일이면 2일 추가
dayToAdd = 2;
}
// 적정한 날 수만큼 추가된 날짜를 반환
return temporal.plus(dayToAdd, ChronoUnit.DAYS);
});
}
public static void exampleTemporalAdJusters() {
LocalDate date = LocalDate.now();
TemporalAdjuster nextWorkingDay = TemporalAdjusters.ofDateAdjuster(
temporal -> {
// 현재 날짜 읽기
DayOfWeek dow = DayOfWeek.of(temporal.get(ChronoField.DAY_OF_WEEK));
// 일반적으로 하루 추가
int dayToAdd = 1;
if (dow == DayOfWeek.FRIDAY) { // 오늘이 금요일이면 3일 추가
dayToAdd = 3;
} else if (dow == DayOfWeek.SATURDAY) { // 오늘이 토요일이면 2일 추가
dayToAdd = 2;
}
// 적정한 날 수만큼 추가된 날짜를 반환
return temporal.plus(dayToAdd, ChronoUnit.DAYS);
}
);
date.with(nextWorkingDay);
}
public static class NextWorkingDay implements TemporalAdjuster {
@Override
public Temporal adjustInto(Temporal temporal) {
// 현재 날짜 읽기
DayOfWeek dow = DayOfWeek.of(temporal.get(ChronoField.DAY_OF_WEEK));
// 일반적으로 하루 추가
int dayToAdd = 1;
if (dow == DayOfWeek.FRIDAY) { // 오늘이 금요일이면 3일 추가
dayToAdd = 3;
} else if (dow == DayOfWeek.SATURDAY) { // 오늘이 토요일이면 2일 추가
dayToAdd = 2;
}
// 적정한 날 수만큼 추가된 날짜를 반환
return temporal.plus(dayToAdd, ChronoUnit.DAYS);
}
}
}
| [
"jaenyeong.dev@gmail.com"
] | jaenyeong.dev@gmail.com |
a84ca039be216bf912fabebbee84f28fcc4f2ce5 | db6c28c3c450ce5b769f7dad9f359138bda7b9e5 | /第6章面向对象(下)/chapter06_09_枚举类/GenderTest07.java | 25dbc04780e398069ec74c9910316b169df5e9b4 | [
"Apache-2.0"
] | permissive | hyfj44255/crazyJava3 | 21441e92eee54e5902210e3ca42c7788c463209f | 9fdfe2e3c635ae0180de72161c800d55f6cda1d2 | refs/heads/master | 2020-06-17T18:19:37.680664 | 2017-05-15T15:28:11 | 2017-05-15T15:28:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 352 | java | package chapter06_09_枚举类;
public class GenderTest07 {
public static void main(String[] args) {
Gender06 g = Gender06.valueOf("FEMALE");
g.setName("女");
System.out.println(g+"代表: "+g.getName());
//此时设置name值,将会提示参数错误
g.setName("男");
System.out.println(g+"代表: "+g.getName());
}
}
| [
"3792274@qq.com"
] | 3792274@qq.com |
1456f4d55d6e8de91c703696bd55bf95f7275b44 | d0c96978f4197f89dd6debd07e5f949d8078b37a | /src/main/java/org/apache/ibatis/annotations/package-info.java | 7ce1e240cd150ab1bfa89934a5964a12fcf1fe96 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | Shaoxubao/MyBatis-Source-Study | 17fb4dc03e47cace075c4522925c6c3dc784088f | b8afb58bf124f45bfc7d07ba00832d716deec020 | refs/heads/master | 2022-09-21T21:02:44.361213 | 2020-04-03T10:41:43 | 2020-04-03T10:41:43 | 252,654,011 | 1 | 0 | Apache-2.0 | 2022-09-08T01:06:59 | 2020-04-03T06:49:05 | Java | UTF-8 | Java | false | false | 891 | java | /**
* Copyright 2009-2020 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <p>
* Contains all the annotation that are used in mapper interfaces.
* <p>
* Contains all the annotation that are used in mapper interfaces.
*/
/**
* Contains all the annotation that are used in mapper interfaces.
*/
package org.apache.ibatis.annotations;
| [
"shaoxubao-sz@fangdd.com"
] | shaoxubao-sz@fangdd.com |
911f65c84c6b6965ca65c034e39ea976dbb633da | 71505060050f0a9f4e6478e1755280c2bbaccac9 | /PriceWaterHouse/src/test/java/com/suidifu/pricewaterhouse/test/log/LogTest.java | fa9677f46cd693c0211f46cbc804f7be38544434 | [] | no_license | soldiers1989/comsui | 1f73003e7345946ef51af7d73ee3da593f6151ed | 6f5c8a28fb1f58e0afc979a1dd5f2e43cbfa09cc | refs/heads/master | 2020-03-27T19:25:33.560060 | 2018-07-06T06:21:05 | 2018-07-06T06:21:05 | 146,988,141 | 0 | 1 | null | 2018-09-01T10:11:31 | 2018-09-01T10:11:31 | null | UTF-8 | Java | false | false | 687 | java | package com.suidifu.pricewaterhouse.test.log;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import com.suidifu.pricewaterhouse.BaseTestContext;
public class LogTest extends BaseTestContext {
private static Log logger = LogFactory.getLog(LogTest.class);
@Test
public void testLogTest() {
System.out.println("test stout");
logger.debug("test debug");
logger.info("test info");
logger.error("test error...");
try{
int a = 1/0;
}catch(Exception e){
logger.error("calculate error"+ExceptionUtils.getStackTrace(e));
}
}
}
| [
"mwf5310@163.com"
] | mwf5310@163.com |
a5cee9821156160e3a67cea7df1f029545b1b09c | e90d2370a69d1d6d0ce8cd40214591837b9d693f | /bus-health/src/main/java/org/aoju/bus/health/hardware/unix/solaris/SolarisSoundCard.java | e7cb8670c21dbae04cec52843de95ad999ad4bcc | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | zhanglei/bus | 47343534fe657b2b67d530e3a3d65e31299e25df | 97fa980a66bf67bdfc8e544aeb327a91769449e9 | refs/heads/master | 2021-04-08T01:14:18.439578 | 2020-03-13T06:38:42 | 2020-03-13T06:38:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,587 | java | /*********************************************************************************
* *
* The MIT License *
* *
* Copyright (c) 2015-2020 aoju.org and other contributors. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal *
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
* THE SOFTWARE. *
********************************************************************************/
package org.aoju.bus.health.hardware.unix.solaris;
import org.aoju.bus.core.lang.Normal;
import org.aoju.bus.core.lang.Symbol;
import org.aoju.bus.health.Builder;
import org.aoju.bus.health.Command;
import org.aoju.bus.health.hardware.AbstractSoundCard;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Solaris Sound Card.
*
* @author Kimi Liu
* @version 5.6.9
* @since JDK 1.8+
*/
public class SolarisSoundCard extends AbstractSoundCard {
private static final String LSHAL = "lshal";
private static final String DEFAULT_AUDIO_DRIVER = "audio810";
/**
* <p>
* Constructor for SolarisSoundCard.
* </p>
*
* @param kernelVersion a {@link java.lang.String} object.
* @param name a {@link java.lang.String} object.
* @param codec a {@link java.lang.String} object.
*/
public SolarisSoundCard(String kernelVersion, String name, String codec) {
super(kernelVersion, name, codec);
}
/**
* <p>
* getSoundCards.
* </p>
*
* @return a {@link java.util.List} object.
*/
public static List<SolarisSoundCard> getSoundCards() {
Map<String, String> vendorMap = new HashMap<>();
Map<String, String> productMap = new HashMap<>();
List<String> sounds = new ArrayList<>();
String key = Normal.EMPTY;
for (String line : Command.runNative(LSHAL)) {
line = line.trim();
if (line.startsWith("udi =")) {
// we have the key.
key = Builder.getSingleQuoteStringValue(line);
} else if (!key.isEmpty() && !line.isEmpty()) {
if (line.contains("info.solaris.driver =")
&& DEFAULT_AUDIO_DRIVER.equals(Builder.getSingleQuoteStringValue(line))) {
sounds.add(key);
} else if (line.contains("info.product")) {
productMap.put(key, Builder.getStringBetween(line, Symbol.C_SINGLE_QUOTE));
} else if (line.contains("info.vendor")) {
vendorMap.put(key, Builder.getStringBetween(line, Symbol.C_SINGLE_QUOTE));
}
}
}
List<SolarisSoundCard> soundCards = new ArrayList<>();
for (String _key : sounds) {
soundCards.add(new SolarisSoundCard(productMap.get(_key) + Symbol.SPACE + DEFAULT_AUDIO_DRIVER,
vendorMap.get(_key) + Symbol.SPACE + productMap.get(_key), productMap.get(_key)));
}
return soundCards;
}
}
| [
"839536@qq.com"
] | 839536@qq.com |
0f378ecb1d6ae7ac7f85121eaa49841c95d0ff00 | 532960b369d1364e7ed58e6a3650f3f43c6d7dac | /src/main/java/com/openkm/dao/bean/ProfileTab.java | 5e7e5458339987708677d47a40a5846dedeb6008 | [] | no_license | okelah/openkm-code | f0c02062d909b2d5e185b9784b33a9b8753be948 | d9e0687e0c6dab385cac0ce8b975cb92c8867743 | refs/heads/master | 2021-01-13T15:53:59.286016 | 2016-08-18T22:06:25 | 2016-08-18T22:06:25 | 76,772,981 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,340 | java | /**
* OpenKM, Open Document Management System (http://www.openkm.com)
* Copyright (c) 2006-2015 Paco Avila & Josep Llort
*
* No bytes were intentionally harmed during the development of this application.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package com.openkm.dao.bean;
import java.io.Serializable;
public class ProfileTab implements Serializable {
private static final long serialVersionUID = 1L;
private String defaultTab;
private boolean desktopVisible;
private boolean searchVisible;
private boolean dashboardVisible;
private boolean administrationVisible;
private ProfileTabFolder prfFolder = new ProfileTabFolder();
private ProfileTabDocument prfDocument = new ProfileTabDocument();
private ProfileTabMail prfMail = new ProfileTabMail();
public String getDefaultTab() {
return defaultTab;
}
public void setDefaultTab(String defaultTab) {
this.defaultTab = defaultTab;
}
public boolean isDesktopVisible() {
return desktopVisible;
}
public void setDesktopVisible(boolean desktopVisible) {
this.desktopVisible = desktopVisible;
}
public boolean isSearchVisible() {
return searchVisible;
}
public void setSearchVisible(boolean searchVisible) {
this.searchVisible = searchVisible;
}
public boolean isDashboardVisible() {
return dashboardVisible;
}
public void setDashboardVisible(boolean dashboardVisible) {
this.dashboardVisible = dashboardVisible;
}
public boolean isAdministrationVisible() {
return administrationVisible;
}
public void setAdministrationVisible(boolean administrationVisible) {
this.administrationVisible = administrationVisible;
}
public ProfileTabFolder getPrfFolder() {
return prfFolder;
}
public void setPrfFolder(ProfileTabFolder prfFolder) {
this.prfFolder = prfFolder;
}
public ProfileTabDocument getPrfDocument() {
return prfDocument;
}
public void setPrfDocument(ProfileTabDocument prfDocument) {
this.prfDocument = prfDocument;
}
public ProfileTabMail getPrfMail() {
return prfMail;
}
public void setPrfMail(ProfileTabMail prfMail) {
this.prfMail = prfMail;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("desktopVisible="); sb.append(desktopVisible);
sb.append(", searchVisible="); sb.append(searchVisible);
sb.append(", dashboardVisible="); sb.append(dashboardVisible);
sb.append(", administrationVisible="); sb.append(administrationVisible);
sb.append(", prfDocument="); sb.append(prfDocument);
sb.append(", prfFolder="); sb.append(prfFolder);
sb.append(", prfMail="); sb.append(prfMail);
sb.append("}");
return sb.toString();
}
}
| [
"github@sven-joerns.de"
] | github@sven-joerns.de |
ad290d1dce7a9595269c158b74b8618e2acdfd9f | 57e68d99f3be5887b84299b3164fbd2d03aa5ea8 | /systems/whirr/base/src/test/java/brooklyn/extras/whirr/core/WhirrClusterTest.java | 4360bcf727e91a8157a258b64d1709a70c9a229b | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | ganeshgitrepo/incubator-brooklyn | 08d7e41971eaa910ee518c898fb1fb6e60a6ce7e | f28d9cc6b9fd21fe3e05dd04553f16d562bf419c | refs/heads/master | 2021-01-17T08:46:31.582724 | 2014-07-03T09:46:32 | 2014-07-03T09:46:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 993 | java | package brooklyn.extras.whirr.core;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import brooklyn.entity.basic.ApplicationBuilder;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.proxying.EntitySpec;
import brooklyn.test.entity.TestApplication;
public class WhirrClusterTest {
private TestApplication app;
private WhirrCluster entity;
@BeforeMethod(alwaysRun=true)
public void setUp() throws Exception {
app = ApplicationBuilder.newManagedApp(TestApplication.class);
entity = app.createAndManageChild(EntitySpec.create(WhirrCluster.class));
}
@AfterMethod(alwaysRun=true)
public void tearDown() throws Exception {
if (app != null) Entities.destroyAll(app.getManagementContext());
}
@Test
public void testControllerInitialized() {
Assert.assertNotNull(entity.getController());
}
}
| [
"aled.sage@gmail.com"
] | aled.sage@gmail.com |
217e9abf14c5b5330949f40820a39682a8085c89 | 0af2045db4a876fab1a42e3aa9ad3e86c79b2adb | /restaurant/src/main/java/com/xuxiaojin/common/auth/AuthOperationResult.java | 6afdbfbac58eba977fe890a3dc824de0381451d1 | [] | no_license | jiayouxujin/netty-in-action | a7100cab63078acc335613bc136a8b0d41ab8a72 | bb14f7694c3ffb957d285b014ab7bc8353601c3c | refs/heads/master | 2023-04-19T19:32:41.439117 | 2021-05-27T06:04:14 | 2021-05-27T06:04:14 | 370,961,110 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 205 | java | package com.xuxiaojin.common.auth;
import com.xuxiaojin.common.OperationResult;
import lombok.Data;
@Data
public class AuthOperationResult extends OperationResult {
private final boolean passAuth;
}
| [
"1319039722@qq.com"
] | 1319039722@qq.com |
d6d70ac60578116b113506c110415f5fa73211eb | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/xwebutil/a$2.java | 1c7bd10996b6cd2f0c0b75c59f40ad7f1d3e138f | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 627 | java | package com.tencent.mm.xwebutil;
import android.content.Context;
import android.webkit.ValueCallback;
import java.util.HashMap;
final class a$2
implements ValueCallback<Integer>
{
a$2(boolean paramBoolean1, String paramString1, ValueCallback paramValueCallback1, Context paramContext, String paramString2, String paramString3, String paramString4, HashMap paramHashMap, ValueCallback paramValueCallback2, boolean paramBoolean2) {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes7.jar
* Qualified Name: com.tencent.mm.xwebutil.a.2
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
c4f935f28c8a3b6f6426240afff4d774e6ecc30e | 18b20a45faa4cf43242077e9554c0d7d42667fc2 | /HelicoBacterMod/build/tmp/expandedArchives/forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3-sources.jar_db075387fe30fb93ccdc311746149f9d/net/minecraft/world/biome/ModifiedJungleEdgeBiome.java | 0e7718d0930a25d7c80fa5e5cb8f83d92514c185 | [] | no_license | qrhlhplhp/HelicoBacterMod | 2cbe1f0c055fd5fdf97dad484393bf8be32204ae | 0452eb9610cd70f942162d5b23141b6bf524b285 | refs/heads/master | 2022-07-28T16:06:03.183484 | 2021-03-20T11:01:38 | 2021-03-20T11:01:38 | 347,618,857 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,293 | java | package net.minecraft.world.biome;
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public final class ModifiedJungleEdgeBiome extends Biome {
public ModifiedJungleEdgeBiome() {
super((new Biome.Builder()).surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(Biome.RainType.RAIN).category(Biome.Category.JUNGLE).depth(0.2F).scale(0.4F).temperature(0.95F).downfall(0.8F).waterColor(4159204).waterFogColor(329011).parent("jungle_edge"));
this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL));
this.addStructure(Feature.STRONGHOLD, IFeatureConfig.NO_FEATURE_CONFIG);
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
DefaultBiomeFeatures.addLakes(this);
DefaultBiomeFeatures.addMonsterRooms(this);
DefaultBiomeFeatures.addStoneVariants(this);
DefaultBiomeFeatures.addOres(this);
DefaultBiomeFeatures.addSedimentDisks(this);
DefaultBiomeFeatures.func_222290_D(this);
DefaultBiomeFeatures.addExtraDefaultFlowers(this);
DefaultBiomeFeatures.addJungleGrass(this);
DefaultBiomeFeatures.addMushrooms(this);
DefaultBiomeFeatures.addReedsAndPumpkins(this);
DefaultBiomeFeatures.addSprings(this);
DefaultBiomeFeatures.addJunglePlants(this);
DefaultBiomeFeatures.addFreezeTopLayer(this);
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
this.addSpawn(EntityClassification.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
}
}
| [
"rubickraft169@gmail.com"
] | rubickraft169@gmail.com |
2ed473c82749b7cb5b340f6f5c296af0b674f652 | 9d32980f5989cd4c55cea498af5d6a413e08b7a2 | /A1_7_1_1/src/main/java/com/android/framework/protobuf/nano/android/ParcelableMessageNano.java | 641a92a88b01e0af7d6ee8baa9192428bd9b146b | [] | no_license | liuhaosource/OppoFramework | e7cc3bcd16958f809eec624b9921043cde30c831 | ebe39acabf5eae49f5f991c5ce677d62b683f1b6 | refs/heads/master | 2023-06-03T23:06:17.572407 | 2020-11-30T08:40:07 | 2020-11-30T08:40:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,257 | java | package com.android.framework.protobuf.nano.android;
import android.os.Parcelable;
import com.android.framework.protobuf.nano.MessageNano;
/* JADX ERROR: NullPointerException in pass: ExtractFieldInit
java.lang.NullPointerException
at jadx.core.utils.BlockUtils.isAllBlocksEmpty(BlockUtils.java:546)
at jadx.core.dex.visitors.ExtractFieldInit.getConstructorsList(ExtractFieldInit.java:221)
at jadx.core.dex.visitors.ExtractFieldInit.moveCommonFieldsInit(ExtractFieldInit.java:121)
at jadx.core.dex.visitors.ExtractFieldInit.visit(ExtractFieldInit.java:46)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:12)
at jadx.core.ProcessClass.process(ProcessClass.java:32)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
*/
public abstract class ParcelableMessageNano extends MessageNano implements Parcelable {
/* JADX ERROR: Method load error
jadx.core.utils.exceptions.DecodeException: Load method exception: bogus opcode: 0073 in method: com.android.framework.protobuf.nano.android.ParcelableMessageNano.<init>():void, dex:
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:118)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:248)
at jadx.core.ProcessClass.process(ProcessClass.java:29)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1227)
at com.android.dx.io.OpcodeInfo.getName(OpcodeInfo.java:1234)
at jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:581)
at jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:74)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:104)
... 5 more
*/
public ParcelableMessageNano() {
/*
// Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.framework.protobuf.nano.android.ParcelableMessageNano.<init>():void, dex:
*/
throw new UnsupportedOperationException("Method not decompiled: com.android.framework.protobuf.nano.android.ParcelableMessageNano.<init>():void");
}
/* JADX ERROR: Method load error
jadx.core.utils.exceptions.DecodeException: Load method exception: bogus opcode: 00e9 in method: com.android.framework.protobuf.nano.android.ParcelableMessageNano.writeToParcel(android.os.Parcel, int):void, dex:
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:118)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:248)
at jadx.core.ProcessClass.process(ProcessClass.java:29)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1227)
at com.android.dx.io.OpcodeInfo.getName(OpcodeInfo.java:1234)
at jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:581)
at jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:74)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:104)
... 5 more
*/
public void writeToParcel(android.os.Parcel r1, int r2) {
/*
// Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.android.framework.protobuf.nano.android.ParcelableMessageNano.writeToParcel(android.os.Parcel, int):void, dex:
*/
throw new UnsupportedOperationException("Method not decompiled: com.android.framework.protobuf.nano.android.ParcelableMessageNano.writeToParcel(android.os.Parcel, int):void");
}
public int describeContents() {
return 0;
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
419c423ab04edfe814a24c2e4108a56697004051 | 4e36a95f166c293b38e4374e56bf21b16cea8b60 | /src/main/java/com/wandson/food/api/v1/openapi/controller/CozinhaControllerOpenApi.java | e25cd075a29506fe8177fc34fb00674ab5f8e3a2 | [] | no_license | JoseWandson/food-api | d44160a5baef627a6e1c00e638111e7bba377c25 | 1012d83bb5aa14b812130dcf4c55dd3f175be314 | refs/heads/master | 2023-09-05T17:06:58.166704 | 2023-08-22T17:06:13 | 2023-08-22T17:06:13 | 242,260,439 | 0 | 0 | null | 2022-07-16T21:12:20 | 2020-02-22T01:27:48 | Java | UTF-8 | Java | false | false | 2,465 | java | package com.wandson.food.api.v1.openapi.controller;
import org.springframework.data.domain.Pageable;
import org.springframework.hateoas.PagedModel;
import com.wandson.food.api.exceptionhandler.Problem;
import com.wandson.food.api.v1.model.CozinhaModel;
import com.wandson.food.api.v1.model.input.CozinhaInput;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
@Tag(name = "Cozinhas", description = "Gerencia as cozinhas")
public interface CozinhaControllerOpenApi {
@Operation(summary = "Lista as cozinhas com paginação")
PagedModel<CozinhaModel> listar(Pageable pageable);
@Operation(summary = "Busca uma cozinha por ID")
@ApiResponse(responseCode = "200")
@ApiResponse(responseCode = "400", description = "ID da cozinha inválido", content = @Content(schema = @Schema(implementation = Problem.class)))
@ApiResponse(responseCode = "404", description = "Cozinha não encontrada", content = @Content(schema = @Schema(implementation = Problem.class)))
CozinhaModel buscar(@Parameter(description = "ID de uma cozinha", example = "1") Long cozinhaId);
@Operation(summary = "Cadastra uma cozinha")
@ApiResponse(responseCode = "201", description = "Cozinha cadastrada")
CozinhaModel adicionar(@RequestBody(description = "Representação de uma nova cozinha") CozinhaInput cozinhaInput);
@Operation(summary = "Atualiza uma cozinha por ID")
@ApiResponse(responseCode = "200", description = "Cozinha atualizada")
@ApiResponse(responseCode = "404", description = "Cozinha não encontrada", content = @Content(schema = @Schema(implementation = Problem.class)))
CozinhaModel atualizar(@Parameter(description = "ID de uma cozinha", example = "1") Long cozinhaId,
@RequestBody(description = "Representação de uma cozinha com os novos dados") CozinhaInput cozinhaInput);
@Operation(summary = "Exclui uma cozinha por ID")
@ApiResponse(responseCode = "204", description = "Cozinha excluída")
@ApiResponse(responseCode = "404", description = "Cozinha não encontrada", content = @Content(schema = @Schema(implementation = Problem.class)))
void remover(@Parameter(description = "ID de uma cozinha", example = "1") Long cozinhaId);
} | [
"wandsonacop@hotmail.com"
] | wandsonacop@hotmail.com |
4cb040880513539e8cf6579d598f841eb2fbbd4d | 002140e0ea60a9fcfac9fc07f60bb3e9dc49ab67 | /src/main/java/net/ibizsys/psba/dao/BASelectContext.java | 6114c022ef3543a38d6fee24377475a265d65485 | [] | no_license | devibizsys/saibz5_all | ecacc91122920b8133c2cff3c2779c0ee0381211 | 87c44490511253b5b34cd778623f9b6a705cb97c | refs/heads/master | 2021-01-01T16:15:17.146300 | 2017-07-20T07:52:21 | 2017-07-20T07:52:21 | 97,795,014 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,573 | java | package net.ibizsys.psba.dao;
import java.util.Date;
import net.ibizsys.paas.db.SelectCond;
/**
* 大数据查询条件
* @author Administrator
*
*/
public class BASelectContext extends SelectCond implements IBASelectContext {
private String[] colSets = null;
private String strRowKeyPrefix = null;
private int nMaxVersions = -1; //默认
private java.util.Date startTimeStamp = null;
private java.util.Date stopTimeStamp = null;
private String strStartRowKey = null;
private String strStopRowKey = null;
private int nBatchSize = -1;
private java.util.Date timeStamp = null;
@Override
public String[] getColSets() {
return this.colSets;
}
@Override
public String getRowKeyPrefix() {
return this.strRowKeyPrefix;
}
@Override
public int getMaxVersions() {
return this.nMaxVersions;
}
@Override
public Date getStartTimeStamp() {
return this.startTimeStamp;
}
@Override
public Date getStopTimeStamp() {
return this.stopTimeStamp;
}
@Override
public String getStartRowKey() {
return this.strStartRowKey;
}
@Override
public String getStopRowKey() {
return this.strStopRowKey;
}
@Override
public int getBatchSize() {
return nBatchSize;
}
public void setColSets(String[] colSets) {
this.colSets = colSets;
}
public void setRowKeyPrefix(String strRowKeyPrefix) {
this.strRowKeyPrefix = strRowKeyPrefix;
}
public void setMaxVersions(int nMaxVersions) {
this.nMaxVersions = nMaxVersions;
}
public void setStartTimeStamp(java.util.Date startTimeStamp) {
this.startTimeStamp = startTimeStamp;
}
public void setStopTimeStamp(java.util.Date stopTimeStamp) {
this.stopTimeStamp = stopTimeStamp;
}
public void setStartRowKey(String strStartRowKey) {
this.strStartRowKey = strStartRowKey;
}
public void setStopRowKey(String strStopRowKey) {
this.strStopRowKey = strStopRowKey;
}
public void setBatchSize(int nBatchSize) {
this.nBatchSize = nBatchSize;
}
/* (non-Javadoc)
* @see net.ibizsys.psba.dao.IBASelectContext#getTimeStamp()
*/
@Override
public Date getTimeStamp() {
return this.timeStamp;
}
/**
* 设置时间戳
* @param timeStamp
*/
public void setTimeStamp(java.util.Date timeStamp) {
this.timeStamp = timeStamp;
}
@Override
protected void onReset() {
this.colSets = null;
this.strRowKeyPrefix = null;
this.nMaxVersions = -1; //默认
this.startTimeStamp = null;
this.stopTimeStamp = null;
this.strStartRowKey = null;
this.strStopRowKey = null;
this.nBatchSize = -1;
this.timeStamp = null;
super.onReset();
}
}
| [
"dev@ibizsys.net"
] | dev@ibizsys.net |
6e73befa3eb4126089bd7f7145364de8ffc95396 | 045699573f75c253513115887e04f29f1e23e432 | /src/main/java/com/geetion/generic/permission/pojo/PermissionUrl.java | ab1eb722d6c9cb643cf76a7316558760b8eb3ba9 | [] | no_license | zhuobinchan/popoteam_server_v1.0 | 61b46d716d3257f3110ab79ec7da04c7c6d4d8e3 | f4dd97f76e8d5192a54a3eafc06cd79c280155a9 | refs/heads/master | 2021-01-21T23:04:51.632776 | 2017-06-23T05:48:15 | 2017-06-23T05:48:15 | 95,187,326 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,570 | java | package com.geetion.generic.permission.pojo;
import com.geetion.generic.permission.pojo.base.BaseModel;
import javax.persistence.*;
import java.util.Date;
@Table(name = "geetion_permission_url")
public class PermissionUrl extends BaseModel {
@Id
@Column
@GeneratedValue(generator = "JDBC")
private Long id;
@Column
private Long permissionId;
@Column
private String url;
@Column
private Date createTime;
private Permission permission;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPermissionId() {
return permissionId;
}
public void setPermissionId(Long permissionId) {
this.permissionId = permissionId;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Permission getPermission() {
return permission;
}
public void setPermission(Permission permission) {
this.permission = permission;
}
@Override
public String toString() {
return "GeetionPermissionUrl{" +
"id=" + id +
", permissionId=" + permissionId +
", url='" + url + '\'' +
", createTime=" + createTime +
", geetionPermission=" + permission +
'}';
}
} | [
"bin1095256592@qq.com"
] | bin1095256592@qq.com |
a2168a08ed7b5faf7e37511a8ec912ea3a6473c1 | 5598faaaaa6b3d1d8502cbdaca903f9037d99600 | /code_changes/Apache_projects/HADOOP-990/87e449fd239b68339f9008897a74ee155e98f2ba/TestStat.java | ff88f3535b9bc5beae28653137178507897ec05d | [] | no_license | SPEAR-SE/LogInBugReportsEmpirical_Data | 94d1178346b4624ebe90cf515702fac86f8e2672 | ab9603c66899b48b0b86bdf63ae7f7a604212b29 | refs/heads/master | 2022-12-18T02:07:18.084659 | 2020-09-09T16:49:34 | 2020-09-09T16:49:34 | 286,338,252 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,418 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.fs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.StringReader;
import org.apache.hadoop.conf.Configuration;
import org.junit.BeforeClass;
import org.junit.Test;
public class TestStat {
private static Stat stat;
@BeforeClass
public static void setup() throws Exception {
stat = new Stat(new Path("/dummypath"),
4096l, false, FileSystem.get(new Configuration()));
}
private class StatOutput {
final String doesNotExist;
final String directory;
final String file;
final String symlink;
final String stickydir;
StatOutput(String doesNotExist, String directory, String file,
String symlink, String stickydir) {
this.doesNotExist = doesNotExist;
this.directory = directory;
this.file = file;
this.symlink = symlink;
this.stickydir = stickydir;
}
void test() throws Exception {
BufferedReader br;
FileStatus status;
try {
br = new BufferedReader(new StringReader(doesNotExist));
stat.parseExecResult(br);
} catch (FileNotFoundException e) {
// expected
}
br = new BufferedReader(new StringReader(directory));
stat.parseExecResult(br);
status = stat.getFileStatusForTesting();
assertTrue(status.isDirectory());
br = new BufferedReader(new StringReader(file));
stat.parseExecResult(br);
status = stat.getFileStatusForTesting();
assertTrue(status.isFile());
br = new BufferedReader(new StringReader(symlink));
stat.parseExecResult(br);
status = stat.getFileStatusForTesting();
assertTrue(status.isSymlink());
br = new BufferedReader(new StringReader(stickydir));
stat.parseExecResult(br);
status = stat.getFileStatusForTesting();
assertTrue(status.isDirectory());
assertTrue(status.getPermission().getStickyBit());
}
}
@Test(timeout=10000)
public void testStatLinux() throws Exception {
StatOutput linux = new StatOutput(
"stat: cannot stat `watermelon': No such file or directory",
"4096,directory,1373584236,1373586485,755,andrew,root,`.'",
"0,regular empty file,1373584228,1373584228,644,andrew,andrew,`target'",
"6,symbolic link,1373584236,1373584236,777,andrew,andrew,`link' -> `target'",
"4096,directory,1374622334,1375124212,1755,andrew,andrew,`stickydir'");
linux.test();
}
@Test(timeout=10000)
public void testStatFreeBSD() throws Exception {
StatOutput freebsd = new StatOutput(
"stat: symtest/link: stat: No such file or directory",
"512,Directory,1373583695,1373583669,40755,awang,awang,`link' -> `'",
"0,Regular File,1373508937,1373508937,100644,awang,awang,`link' -> `'",
"6,Symbolic Link,1373508941,1373508941,120755,awang,awang,`link' -> `target'",
"512,Directory,1375139537,1375139537,41755,awang,awang,`link' -> `'");
freebsd.test();
}
@Test(timeout=10000)
public void testStatFileNotFound() throws Exception {
try {
stat.getFileStatus();
fail("Expected FileNotFoundException");
} catch (FileNotFoundException e) {
// expected
}
}
@Test(timeout=10000)
public void testStatEnvironment() throws Exception {
assertEquals(stat.getEnvironment("LANG"), "C");
}
}
| [
"archen94@gmail.com"
] | archen94@gmail.com |
f9bd20d162b03b55a4802443cffa5b1bb48f8c00 | 519de3b9fca2d6f905e7f3498884094546432c30 | /kk-4.x/external/smack/src/org/jivesoftware/smack/BOSHPacketReader.java | 14ba365c8d2bf7ee8df1c5ac20709e8d51c03e24 | [] | no_license | hongshui3000/mt5507_android_4.4 | 2324e078190b97afbc7ceca22ec1b87b9367f52a | 880d4424989cf91f690ca187d6f0343df047da4f | refs/heads/master | 2020-03-24T10:34:21.213134 | 2016-02-24T05:57:53 | 2016-02-24T05:57:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,913 | java | /**
* $RCSfile$
* $Revision: #1 $
* $Date: 2014/10/13 $
*
* Copyright 2009 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smack;
import java.io.StringReader;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.sasl.SASLMechanism.Challenge;
import org.jivesoftware.smack.sasl.SASLMechanism.Failure;
import org.jivesoftware.smack.sasl.SASLMechanism.Success;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xmlpull.v1.XmlPullParser;
import com.kenai.jbosh.AbstractBody;
import com.kenai.jbosh.BOSHClientResponseListener;
import com.kenai.jbosh.BOSHMessageEvent;
import com.kenai.jbosh.BodyQName;
import com.kenai.jbosh.ComposableBody;
/**
* Listens for XML traffic from the BOSH connection manager and parses it into
* packet objects.
*
* @author Guenther Niess
*/
public class BOSHPacketReader implements BOSHClientResponseListener {
private BOSHConnection connection;
/**
* Create a packet reader which listen on a BOSHConnection for received
* HTTP responses, parse the packets and notifies the connection.
*
* @param connection the corresponding connection for the received packets.
*/
public BOSHPacketReader(BOSHConnection connection) {
this.connection = connection;
}
/**
* Parse the received packets and notify the corresponding connection.
*
* @param event the BOSH client response which includes the received packet.
*/
public void responseReceived(BOSHMessageEvent event) {
AbstractBody body = event.getBody();
if (body != null) {
try {
if (connection.sessionID == null) {
connection.sessionID = body.getAttribute(BodyQName.create(BOSHConnection.BOSH_URI, "sid"));
}
if (connection.authID == null) {
connection.authID = body.getAttribute(BodyQName.create(BOSHConnection.BOSH_URI, "authid"));
}
final XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES,
true);
parser.setInput(new StringReader(body.toXML()));
int eventType = parser.getEventType();
do {
eventType = parser.next();
if (eventType == XmlPullParser.START_TAG) {
if (parser.getName().equals("body")) {
// ignore the container root element
} else if (parser.getName().equals("message")) {
connection.processPacket(PacketParserUtils.parseMessage(parser));
} else if (parser.getName().equals("iq")) {
connection.processPacket(PacketParserUtils.parseIQ(parser, connection));
} else if (parser.getName().equals("presence")) {
connection.processPacket(PacketParserUtils.parsePresence(parser));
} else if (parser.getName().equals("challenge")) {
// The server is challenging the SASL authentication
// made by the client
final String challengeData = parser.nextText();
connection.getSASLAuthentication()
.challengeReceived(challengeData);
connection.processPacket(new Challenge(
challengeData));
} else if (parser.getName().equals("success")) {
connection.send(ComposableBody.builder()
.setNamespaceDefinition("xmpp", BOSHConnection.XMPP_BOSH_NS)
.setAttribute(
BodyQName.createWithPrefix(BOSHConnection.XMPP_BOSH_NS, "restart", "xmpp"),
"true")
.setAttribute(
BodyQName.create(BOSHConnection.BOSH_URI, "to"),
connection.getServiceName())
.build());
connection.getSASLAuthentication().authenticated();
connection.processPacket(new Success(parser.nextText()));
} else if (parser.getName().equals("features")) {
parseFeatures(parser);
} else if (parser.getName().equals("failure")) {
if ("urn:ietf:params:xml:ns:xmpp-sasl".equals(parser.getNamespace(null))) {
final Failure failure = PacketParserUtils.parseSASLFailure(parser);
connection.getSASLAuthentication().authenticationFailed();
connection.processPacket(failure);
}
} else if (parser.getName().equals("error")) {
throw new XMPPException(PacketParserUtils.parseStreamError(parser));
}
}
} while (eventType != XmlPullParser.END_DOCUMENT);
}
catch (Exception e) {
if (connection.isConnected()) {
connection.notifyConnectionError(e);
}
}
}
}
/**
* Parse and setup the XML stream features.
*
* @param parser the XML parser, positioned at the start of a message packet.
* @throws Exception if an exception occurs while parsing the packet.
*/
private void parseFeatures(XmlPullParser parser) throws Exception {
boolean done = false;
while (!done) {
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG) {
if (parser.getName().equals("mechanisms")) {
// The server is reporting available SASL mechanisms. Store
// this information
// which will be used later while logging (i.e.
// authenticating) into
// the server
connection.getSASLAuthentication().setAvailableSASLMethods(
PacketParserUtils.parseMechanisms(parser));
} else if (parser.getName().equals("bind")) {
// The server requires the client to bind a resource to the
// stream
connection.getSASLAuthentication().bindingRequired();
} else if (parser.getName().equals("session")) {
// The server supports sessions
connection.getSASLAuthentication().sessionsSupported();
} else if (parser.getName().equals("register")) {
connection.getAccountManager().setSupportsAccountCreation(
true);
}
} else if (eventType == XmlPullParser.END_TAG) {
if (parser.getName().equals("features")) {
done = true;
}
}
}
}
}
| [
"342981011@qq.com"
] | 342981011@qq.com |
e83c6eae7fbbcda3b8f6d1c28e7d72a7900c498c | e21d3ae8e47b113a7c27524afd4525cc23130b71 | /IWXXM-JAVA/aero/aixm/SpecialDateTimeSlicePropertyType.java | 9704fa4b0abb57b280dddbf18bd5b9f4bb37ad89 | [] | no_license | blchoy/iwxxm-java | dad020c19a9edb61ab3bc6b04def5579f6cbedca | 7c1b6fb1d0b0e9935a10b8e870b159c86a4ef1bb | refs/heads/master | 2023-05-25T12:14:10.205518 | 2023-05-22T08:40:56 | 2023-05-22T08:40:56 | 97,662,463 | 2 | 1 | null | 2021-11-17T03:40:50 | 2017-07-19T02:09:41 | Java | UTF-8 | Java | false | false | 2,781 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT
// See <a href="https://jaxb.java.net/">https://jaxb.java.net/</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2023.05.22 at 02:50:00 PM HKT
//
package aero.aixm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SpecialDateTimeSlicePropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SpecialDateTimeSlicePropertyType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.aixm.aero/schema/5.1.1}SpecialDateTimeSlice"/>
* </sequence>
* <attGroup ref="{http://www.opengis.net/gml/3.2}OwnershipAttributeGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpecialDateTimeSlicePropertyType", propOrder = {
"specialDateTimeSlice"
})
public class SpecialDateTimeSlicePropertyType {
@XmlElement(name = "SpecialDateTimeSlice", required = true)
protected SpecialDateTimeSliceType specialDateTimeSlice;
@XmlAttribute(name = "owns")
protected Boolean owns;
/**
* Gets the value of the specialDateTimeSlice property.
*
* @return
* possible object is
* {@link SpecialDateTimeSliceType }
*
*/
public SpecialDateTimeSliceType getSpecialDateTimeSlice() {
return specialDateTimeSlice;
}
/**
* Sets the value of the specialDateTimeSlice property.
*
* @param value
* allowed object is
* {@link SpecialDateTimeSliceType }
*
*/
public void setSpecialDateTimeSlice(SpecialDateTimeSliceType value) {
this.specialDateTimeSlice = value;
}
/**
* Gets the value of the owns property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isOwns() {
if (owns == null) {
return false;
} else {
return owns;
}
}
/**
* Sets the value of the owns property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setOwns(Boolean value) {
this.owns = value;
}
}
| [
"blchoy.hko@gmail.com"
] | blchoy.hko@gmail.com |
e0f289a59e1c66bb8b8085b959f87bead1e9878b | f6e26d6cef35ebb3ee845481f4da0a06c80d7432 | /abc004_b/Main.java | b0bc175915a31af5fa6ae2832964b96618c8f72e | [] | no_license | YujiSoftware/AtCoder | 68f7660ae2c235687eb93574ce550584f072eab4 | 0b40fda849dcfe1cb23c885896ed0473aad87a7f | refs/heads/master | 2021-01-23T19:11:15.724752 | 2018-02-24T17:32:53 | 2018-02-24T17:32:53 | 48,444,089 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,380 | java | import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
char[][] c = new char[4][4];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
c[i][j] = sc.next().toCharArray()[0];
}
}
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
System.out.print(c[3 - i][3 - j]);
if (j < 3) {
System.out.print(" ");
}
}
System.out.println();
}
}
private static boolean isDebug = System.getProperty("sun.desktop") != null;
private static void debug(Object... o) {
if (isDebug) {
System.err.println(Arrays.deepToString(o));
}
}
public static class Pair {
private int key;
private int value;
public Pair(int key, int value) {
super();
this.key = key;
this.value = value;
}
public int getKey() {
return key;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
@Override
public String toString() {
return "{" + key + ", " + value + "}";
}
}
public static class Scanner {
private BufferedInputStream inputStream;
public Scanner(InputStream in) {
inputStream = new BufferedInputStream(in);
}
public int nextInt() throws IOException {
int num = 0;
int sign = 1;
int read = skip();
if (read == '-') {
sign = -1;
read = inputStream.read();
}
do {
num = num * 10 + sign * (read - 0x30);
} while ((read = inputStream.read()) > 0x20);
return num;
}
public void fill(int[] a) throws IOException {
for (int i = 0; i < a.length; i++) {
a[i] = nextInt();
}
}
public void fill(int[] a, int[] b) throws IOException {
if (a.length != b.length) {
throw new IllegalArgumentException();
}
for (int i = 0; i < a.length; i++) {
a[i] = nextInt();
b[i] = nextInt();
}
}
public void fill(int[] a, int[] b, int[] c) throws IOException {
if (a.length != b.length || b.length != c.length) {
throw new IllegalArgumentException();
}
for (int i = 0; i < a.length; i++) {
a[i] = nextInt();
b[i] = nextInt();
c[i] = nextInt();
}
}
public long nextLong() throws IOException {
long num = 0;
int read = skip();
do {
num = num * 10 + (read - 0x30);
} while ((read = inputStream.read()) > 0x20);
return num;
}
public void fill(long[] a) throws IOException {
for (int i = 0; i < a.length; i++) {
a[i] = nextLong();
}
}
public void fill(long[] a, long[] b) throws IOException {
if (a.length != b.length) {
throw new IllegalArgumentException();
}
for (int i = 0; i < a.length; i++) {
a[i] = nextLong();
b[i] = nextLong();
}
}
public long[] nextLong(int n) throws IOException {
long[] array = new long[n];
for (int i = 0; i < n; i++) {
array[i] = nextLong();
}
return array;
}
public String next() throws IOException {
StringBuilder builder = new StringBuilder();
int read = skip();
do {
builder.append((char) read);
} while ((read = inputStream.read()) > 0x20);
return builder.toString();
}
private int skip() throws IOException {
int read;
while ((read = inputStream.read()) <= 0x20)
;
return read;
}
}
}
| [
"yuji.software+github@gmail.com"
] | yuji.software+github@gmail.com |
f98b428a7703add9015e6afdcb94f0af9b6e632b | 1630d71d9056506193393d3ca6b7bf5daa769574 | /src/com/android/gallery3d/app/DialogPicker.java | e1341cdcc15e29627c49eded86f617b3e9d253dd | [] | no_license | Denis-chen/gallerygoogle.apk.decode | 1f834635242eca6bf4d3980c12e732e7da80cf7f | ba3774f237dc4a830d558a45b7ee9f71d999a1b5 | refs/heads/master | 2020-04-06T06:50:26.529081 | 2013-09-13T05:12:04 | 2013-09-13T05:12:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,018 | java | package com.android.gallery3d.app;
import android.content.Intent;
import android.os.Bundle;
import com.android.gallery3d.data.DataManager;
import com.android.gallery3d.util.GalleryUtils;
public class DialogPicker extends PickerActivity
{
public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
int i = GalleryUtils.determineTypeBits(this, getIntent());
setTitle(GalleryUtils.getSelectionModePrompt(i));
Bundle localBundle1 = getIntent().getExtras();
if (localBundle1 == null);
for (Bundle localBundle2 = new Bundle(); ; localBundle2 = new Bundle(localBundle1))
{
localBundle2.putBoolean("get-content", true);
localBundle2.putString("media-path", getDataManager().getTopSetPath(i));
getStateManager().startState(AlbumSetPage.class, localBundle2);
return;
}
}
}
/* Location: D:\camera42_patched_v2\dex2jar-0.0.9.15\classes_dex2jar.jar
* Qualified Name: com.android.gallery3d.app.DialogPicker
* JD-Core Version: 0.5.4
*/ | [
"rainius@163.com"
] | rainius@163.com |
cabac777f61748bfc9700d34fdf66b1b663622c6 | f7082b3d5ec81f1e3341adb9d0d94bbdbb4c37dc | /1. Fundamental-Level/Java/BashSoft/src/main/bg/softuni/io/commands/MakeDirectoryCommand.java | 2251e304fb72bbb53d2099ee8e66362de041d7d8 | [] | no_license | krisdx/SoftUni | 0e5f368b83ca55ec25fce92e2aed86f59f8bff70 | 67eef32f60cd527e89dc05087a74a18ef93cf5c9 | refs/heads/master | 2021-01-24T10:32:23.173482 | 2017-03-08T07:26:32 | 2017-03-08T07:26:32 | 54,333,693 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 837 | java | package main.bg.softuni.io.commands;
import main.bg.softuni.annotations.Alias;
import main.bg.softuni.annotations.Inject;
import main.bg.softuni.contracts.Executable;
import main.bg.softuni.contracts.IO.DirectoryManager;
import main.bg.softuni.exceptions.InvalidInputException;
@Alias("mkdir")
public class MakeDirectoryCommand extends Command implements Executable {
@Inject
private DirectoryManager ioManager;
public MakeDirectoryCommand(String input, String[] data) {
super(input, data);
}
@Override
public void execute() throws Exception {
String[] data = this.getData();
if (data.length != 2) {
throw new InvalidInputException(this.getInput());
}
String folderName = data[1];
this.ioManager.createDirectoryInCurrentFolder(folderName);
}
} | [
"krisdx13@gmail.com"
] | krisdx13@gmail.com |
154aa8aadd39ad410c7d7055e6c9fdfba82f4ea3 | 17a0a0934f604119d0e2267bee263b4a6ff80244 | /app/src/main/java/com/twixttechnologies/tjss/model/internal/Data.java | 4446ec0aac3af4630f6e565104e5f475243f5fb4 | [] | no_license | iamRAJASHEKAR/TJSS_fixed | b9473c266fab341917716167e6661b1800f4e28b | e0ae291f8e760c3b549cd8df870a0d98d5db2dae | refs/heads/master | 2020-03-24T20:42:19.219014 | 2018-07-31T09:32:18 | 2018-07-31T09:32:18 | 142,992,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,206 | java | package com.twixttechnologies.tjss.model.internal;
/**
* @author Sony Raj on 10-10-17.
*/
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.HashMap;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"authorization_url",
"access_code",
"reference"
})
public class Data {
@JsonProperty("authorization_url")
public String authorizationUrl;
@JsonProperty("access_code")
public String accessCode;
@JsonProperty("reference")
public String reference;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
} | [
"rajashekar.reddy1995@gmail.com"
] | rajashekar.reddy1995@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.