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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1e711e6c3db57a41b1ab71a9189ed7e6941fc795 | 85e8dd9329d18b80147d87ad11fbc50105e732cf | /src/main/java/com/google/devtools/build/lib/skylarkbuildapi/go/GoConfigurationApi.java | cf49378e7d9d84755156b4a6b1770416b20d55c6 | [
"Apache-2.0"
] | permissive | bobhu2010/bazel | 3ae15df0bfd1ba700ade263a7cb52f86eaa3ad22 | 2c8639f15d898e1559074185a493300dcd06f8cb | refs/heads/master | 2022-11-07T23:09:29.497252 | 2020-06-30T01:48:51 | 2020-06-30T01:50:24 | 276,035,590 | 1 | 0 | Apache-2.0 | 2020-06-30T08:00:44 | 2020-06-30T08:00:44 | null | UTF-8 | Java | false | false | 1,096 | java | // Copyright 2019 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.skylarkbuildapi.go;
import com.google.devtools.build.lib.syntax.StarlarkValue;
import net.starlark.java.annot.StarlarkBuiltin;
import net.starlark.java.annot.StarlarkDocumentationCategory;
/** A configuration fragment for Go. */
@StarlarkBuiltin(
name = "go",
doc = "A configuration fragment for Go.",
category = StarlarkDocumentationCategory.CONFIGURATION_FRAGMENT)
public interface GoConfigurationApi extends StarlarkValue {}
| [
"copybara-worker@google.com"
] | copybara-worker@google.com |
3a887678a35d267f61d0a9e714fb6e629eafd239 | 4456470d889f6784834a896b54f6134c41a39bba | /libsvm_sentiment_nlp/src/nlp/main/Start.java | 7bcd237c3032d864b659e94dd591eae6ac74a0b9 | [] | no_license | df8305909/libsvm_weibo_sentiment_train | 01cee1aae489555ce2e8b7c0b9ca4574c304fc31 | 845f69e667201ded752c12cf17ab560fe6b738c5 | refs/heads/master | 2021-09-05T14:04:32.120091 | 2018-01-28T14:58:07 | 2018-01-28T14:58:07 | 116,654,434 | 6 | 3 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package nlp.main;
import svm.SvmDemo;
import nlp.util.Step1;
import nlp.util.Step2;
import nlp.util.Step3;
import nlp.util.Step4;
import nlp.util.Step5;
import nlp.util.Step6;
public class Start {
public static boolean start(){
try {
Step1.step1();
Step2.step2();
Step3.step3();
Step4.step4();
Step5.step5();
Step6.step6();
SvmDemo.svm_start();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return false;
}
public static void main(String[] args) {
start();
}
}
| [
"lenovo@Lenovo-PC"
] | lenovo@Lenovo-PC |
21414d1a3a7044573e3535bb27f9970c0865e4ab | ba29022f2d758ae2eeb2c7a26dab06e5cc4b5309 | /swagger-codegen/src/main/java/io/swagger/client/model/RetrieveEntityResponse.java | a998dbae65cec39ffab895e09eb7c24771310441 | [] | no_license | ChristianHoesel/ngsiv2-sdk-java-auto | 232392206e648ab126f2d56b21255c918a2be8f5 | 4cdb4db5f599f4f7c82fa08c52e6f3c3f50c0f41 | refs/heads/master | 2022-07-05T12:05:11.170890 | 2020-05-19T16:29:35 | 2020-05-19T16:29:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,699 | java | /*
* FIWARE-NGSI v2 Specification
* TODO: Add a description
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* RetrieveEntityResponse
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-04-15T18:29:04.271+03:00")
public class RetrieveEntityResponse {
@SerializedName("type")
private String type = null;
@SerializedName("id")
private String id = null;
@SerializedName("temperature")
private Object temperature = null;
@SerializedName("humidity")
private Object humidity = null;
@SerializedName("location")
private Object location = null;
public RetrieveEntityResponse type(String type) {
this.type = type;
return this;
}
/**
*
* @return type
**/
@ApiModelProperty(example = "Room", required = true, value = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public RetrieveEntityResponse id(String id) {
this.id = id;
return this;
}
/**
*
* @return id
**/
@ApiModelProperty(example = "Bcn_Welt", required = true, value = "")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public RetrieveEntityResponse temperature(Object temperature) {
this.temperature = temperature;
return this;
}
/**
*
* @return temperature
**/
@ApiModelProperty(example = "{\"value\":21.7,\"type\":\"Number\"}", required = true, value = "")
public Object getTemperature() {
return temperature;
}
public void setTemperature(Object temperature) {
this.temperature = temperature;
}
public RetrieveEntityResponse humidity(Object humidity) {
this.humidity = humidity;
return this;
}
/**
*
* @return humidity
**/
@ApiModelProperty(example = "{\"value\":60,\"type\":\"Number\"}", required = true, value = "")
public Object getHumidity() {
return humidity;
}
public void setHumidity(Object humidity) {
this.humidity = humidity;
}
public RetrieveEntityResponse location(Object location) {
this.location = location;
return this;
}
/**
*
* @return location
**/
@ApiModelProperty(example = "{\"value\":\"41.3763726, 2.1864475\",\"type\":\"geo:point\",\"metadata\":{\"crs\":{\"value\":\"WGS84\",\"type\":\"Text\"}}}", required = true, value = "")
public Object getLocation() {
return location;
}
public void setLocation(Object location) {
this.location = location;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RetrieveEntityResponse retrieveEntityResponse = (RetrieveEntityResponse) o;
return Objects.equals(this.type, retrieveEntityResponse.type) &&
Objects.equals(this.id, retrieveEntityResponse.id) &&
Objects.equals(this.temperature, retrieveEntityResponse.temperature) &&
Objects.equals(this.humidity, retrieveEntityResponse.humidity) &&
Objects.equals(this.location, retrieveEntityResponse.location);
}
@Override
public int hashCode() {
return Objects.hash(type, id, temperature, humidity, location);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RetrieveEntityResponse {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n");
sb.append(" humidity: ").append(toIndentedString(humidity)).append("\n");
sb.append(" location: ").append(toIndentedString(location)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"thanospan@users.noreply.github.com"
] | thanospan@users.noreply.github.com |
91f93bfe18c47829f862d878f9ad91d0592525af | e82c1473b49df5114f0332c14781d677f88f363f | /MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/cpls/CPL2010U00LayPrintNameHandler.java | f25e5cd480dba0d9da6651ec882fbf2a6cac1583 | [] | no_license | zhiji6/mih | fa1d2279388976c901dc90762bc0b5c30a2325fc | 2714d15853162a492db7ea8b953d5b863c3a8000 | refs/heads/master | 2023-08-16T18:35:19.836018 | 2017-12-28T09:33:19 | 2017-12-28T09:33:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,074 | java | package nta.med.service.ihis.handler.cpls;
import javax.annotation.Resource;
import nta.med.data.dao.medi.adm.Adm3300Repository;
import nta.med.core.infrastructure.socket.handler.ScreenHandler;
import nta.med.service.ihis.proto.CplsServiceProto;
import nta.med.service.ihis.proto.CplsServiceProto.CPL2010U00LayPrintNameRequest;
import nta.med.service.ihis.proto.CplsServiceProto.CPL2010U00LayPrintNameResponse;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.vertx.java.core.Vertx;
@Service
@Scope("prototype")
public class CPL2010U00LayPrintNameHandler extends ScreenHandler <CplsServiceProto.CPL2010U00LayPrintNameRequest, CplsServiceProto.CPL2010U00LayPrintNameResponse> {
@Resource
private Adm3300Repository adm3300Repository;
@Override
@Transactional(readOnly = true)
public CPL2010U00LayPrintNameResponse handle(Vertx vertx, String clientId,
String sessionId, long contextId,
CPL2010U00LayPrintNameRequest request) throws Exception {
CplsServiceProto.CPL2010U00LayPrintNameResponse.Builder response = CplsServiceProto.CPL2010U00LayPrintNameResponse.newBuilder();
String result = adm3300Repository.getLayPrintName(getHospitalCode(vertx, sessionId), request.getIpAddress());
if(!StringUtils.isEmpty(result)){
response.setPrintName(result);
}
return response.build();
}
} | [
"duc_nt@nittsusystem-vn.com"
] | duc_nt@nittsusystem-vn.com |
dff0069b65280624c22b20f77b76ede2366dcf7b | 142ac758bd116e55f38478560d27a200d767543c | /src/demo/java/com/vygovskiy/controls/demo/model/Car.java | d5fa2ffe0be03ec508896162e15360ddc167cbca | [] | no_license | leonidv/lvswing | 6ebbe12d1060eab98bc02f8f2c31fd5673433164 | d8cb33bf3d9cd799e0e5750e3d953ffc9b6b8d41 | refs/heads/master | 2016-08-09T23:45:36.685667 | 2016-01-15T23:35:07 | 2016-01-15T23:35:07 | 49,749,888 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,200 | java | package com.vygovskiy.controls.demo.model;
import java.util.ArrayList;
import java.util.List;
public class Car {
public static List<Car> getCars() {
List<Car> cars = new ArrayList<Car>();
cars.add(new Car("Ford", "Focus", 2005));
cars.add(new Car("Ford", "Mustang", 1979));
cars.add(new Car("BMW", "Admiral", 1939));
cars.add(new Car("Nissan", "Teana", 2008));
return cars;
}
final private String producer;
final private String model;
final private int year;
public Car(String producer, String model, int year) {
super();
this.producer = producer;
this.model = model;
this.year = year;
}
/**
* @return the producer
*/
public String getProducer() {
return producer;
}
/**
* @return the model
*/
public String getModel() {
return model;
}
/**
* @return the year
*/
public int getYear() {
return year;
}
@Override
public String toString() {
return String.format("producer = %s, model = %s, year = %s", producer,
model, year);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((model == null) ? 0 : model.hashCode());
result = prime * result
+ ((producer == null) ? 0 : producer.hashCode());
result = prime * result + year;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Car other = (Car) obj;
if (model == null) {
if (other.model != null)
return false;
} else if (!model.equals(other.model))
return false;
if (producer == null) {
if (other.producer != null)
return false;
} else if (!producer.equals(other.producer))
return false;
if (year != other.year)
return false;
return true;
}
}
| [
"devnull@localhost"
] | devnull@localhost |
39e7b1adabe4fd097e5587a321169e2c97634d8a | 1f0f66587ad258041f79fcd8b772781fd476ee59 | /src/com/xyy/erp/platform/system/task/Task.java | 1f672622963b1b0166fba4af210c6ebcd20afe0a | [] | no_license | zwk1028/wms | c2d52144162f76eabc8b3335c74a79472df53cb4 | bf618a5922a9f05cc9d93c80fa68df90d6ec16a1 | refs/heads/master | 2021-01-24T10:39:48.794213 | 2018-02-27T02:29:32 | 2018-02-27T02:29:32 | 123,058,369 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,800 | java | package com.xyy.erp.platform.system.task;
import com.jfinal.plugin.activerecord.Record;
import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
public class Task {
public static enum TaskType {
ORDER, // 电商订单任务
SALE, // 销售订单任务
OUT,// 从普罗格中间表拉取销售出库单
REBACK,//销售退回任务
IN,//从普罗格中间表拉取销售入库单
DS//电商订单扫描拦截任务
}
private String taskId;
private Record record;
private String error;
private TaskType type;
private long time;
private boolean runFlag=false;
private boolean completed=false;
public boolean isCompleted() {
return completed;
}
public void setCompleted(boolean completed) {
this.completed = completed;
}
public boolean isRunFlag() {
return runFlag;
}
public void setRunFlag(boolean runFlag) {
this.runFlag = runFlag;
}
public Task() {
super();
this.time = System.currentTimeMillis();
}
public Task(String taskId, Record record, TaskType type) {
super();
this.taskId = taskId;
this.record = record;
this.type = type;
this.time = System.currentTimeMillis();
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public Record getRecord() {
return record;
}
public void setRecord(Record record) {
this.record = record;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public TaskType getType() {
return type;
}
public void setType(TaskType type) {
this.type = type;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
}
| [
"zhang.wk@DESKTOP-POTNI92"
] | zhang.wk@DESKTOP-POTNI92 |
9e568f9cc7741a3062d1d6973ad4acaf49ad8ec4 | 8c1b4972965b3ce0a922481a41c39238ffd274e5 | /soapclient/src/main/java/com/soap/soapclient/domain/exceptions/PersonNotFoundException.java | 32c728638f6c8fca808367bd4ec113dce21a027c | [] | no_license | nislamovs/SpringWS_MongoDB_CRUD_App | 200910e40ae56f2782357d62153ef492e8d7f80a | 27c843464f3eae648736c69e46f2d73b07cbf84b | refs/heads/master | 2023-06-29T10:29:38.136934 | 2021-08-03T23:05:30 | 2021-08-03T23:05:30 | 321,535,008 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.soap.soapclient.domain.exceptions;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class PersonNotFoundException extends RuntimeException {
public PersonNotFoundException(String msg) {
super(msg);
}
public PersonNotFoundException(String msg, Throwable t) {
super(msg, t);
}
} | [
"nizamiislamovs@gmail.com"
] | nizamiislamovs@gmail.com |
61f7fdfa2868cc57cbeb504fab9ea6fcd7a7c319 | bb7f8a1b64fdeb1d374022c0d24e975178cbf4c7 | /app/src/main/java/com/yuejian/meet/adapters/NearbyLocationAdapter.java | 7a78b6d40c587ab19ba752ec63e97ea6afd001bc | [] | no_license | er-rousy/meet-andoid | 09c746c8c1b0e8ea82745616866efea333f9e76b | bd4e5b36be2c67360240ba7852ad9299b2759cd9 | refs/heads/master | 2022-03-30T04:09:32.832225 | 2020-01-08T01:24:17 | 2020-01-08T01:24:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,358 | java | package com.yuejian.meet.adapters;
import android.content.Context;
import android.widget.AbsListView;
import android.widget.ImageView;
import com.amap.api.services.core.PoiItem;
import com.amap.api.services.nearby.NearbyInfo;
import com.bumptech.glide.Glide;
import com.yuejian.meet.R;
import com.yuejian.meet.adapters.base.AdapterHolder;
import com.yuejian.meet.adapters.base.FKAdapter;
import com.yuejian.meet.bean.MembersEntity;
import java.util.List;
/**
* Created by zh03 on 2017/6/13.
* 附近位置adpter
*/
public class NearbyLocationAdapter extends FKAdapter<PoiItem> {
private AdapterHolder mHelper;
private Context context;
public NearbyLocationAdapter(AbsListView view, List<PoiItem> mDatas, int itemLayoutId) {
super(view, mDatas, itemLayoutId);
this.context=view.getContext();
}
public void convert(AdapterHolder helper, PoiItem item, boolean isScrolling, int position) {
convert(helper, getItem(position), isScrolling);
initNearByData(helper, item, position);
}
private void initNearByData(AdapterHolder helper, PoiItem item, final int position){
this.mHelper=helper;
mHelper.setText(R.id.txt_at_location,item.getTitle());
mHelper.setText(R.id.txt_info_location,item.getProvinceName()+item.getCityName()+item.getAdName()+item.getSnippet());
}
}
| [
"http://192.168.0.254:3000/Fred/meet-andoid.git"
] | http://192.168.0.254:3000/Fred/meet-andoid.git |
dae8a95b12ba6ed53b41db1ff98e7376965357a1 | 78faa42e3abc9e9ef28e51e90c16469fa97ad99d | /zhaohg-search/zhaohg-lucene/src/main/java/com/zhaohg/IndexFiles.java | f611710958557fb4f2cbb9f2a334788889b5843b | [] | no_license | lifan149/dev | 38d932b0305fa9ec4d771c07f282cd8ea600862f | 5c2e19ecc1fec77c3acfb1693a9fa28c59e33aff | refs/heads/master | 2020-05-30T04:56:41.304909 | 2019-05-31T07:32:04 | 2019-05-31T07:32:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,125 | java | package com.zhaohg;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.StringField;
import org.apache.lucene.document.TextField;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
public class IndexFiles {
public static void main(String[] args) {
String indexPath = "D:/lucene_test/index"; // 建立索引文件的目录
String docsPath = "D:/lucene_test/docs"; // 读取文本文件的目录
Path docDir = Paths.get(docsPath);
IndexWriter writer = null;
try {
// 存储索引数据的目录
Directory dir = FSDirectory.open(Paths.get(indexPath));
// 创建分析器
Analyzer analyzer = new StandardAnalyzer();
IndexWriterConfig iwc = new IndexWriterConfig(analyzer);
iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE);
writer = new IndexWriter(dir, iwc);
indexDocs(writer, docDir);
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
private static void indexDocs(final IndexWriter writer, Path path) throws IOException {
if (Files.isDirectory(path)) {
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
try {
indexDoc(writer, file);
} catch (IOException ignore) {
// 不索引那些不能读取的文件,忽略该异常
}
return FileVisitResult.CONTINUE;
}
});
} else {
indexDoc(writer, path);
}
}
private static void indexDoc(IndexWriter writer, Path file) throws IOException {
try (InputStream stream = Files.newInputStream(file)) {
// 创建一个新的空文档
Document doc = new Document();
// 添加字段
Field pathField = new StringField("path", file.toString(), Field.Store.YES);
doc.add(pathField);
Field contentsField = new TextField("contents",
new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8)));
doc.add(contentsField);
System.out.println("adding " + file);
// 写文档
writer.addDocument(doc);
}
}
} | [
"zhaohg@chinaoly.com"
] | zhaohg@chinaoly.com |
6806c674966271784146a9ff776c7d73da06b199 | e89277ec3c1b5980eed8c19939a65f2b80f2b60d | /src/org/sablecc/objectmacro/codegeneration/java/macro/MClassNone.java | d0f5ac09dcf00c22023433cd45e4ef1fb7535974 | [
"Apache-2.0"
] | permissive | SableCC/sablecc | b844c4e918fd09096075f1ec49f55b76e6c5b51f | 378fc74a2e8213567149a6c676d79d7630e87640 | refs/heads/master | 2023-03-11T03:44:14.785650 | 2018-09-13T01:10:02 | 2018-09-13T01:10:02 | 328,567 | 107 | 18 | Apache-2.0 | 2018-09-13T01:11:52 | 2009-10-06T14:42:08 | Java | UTF-8 | Java | false | false | 7,555 | java | /* This file was generated by SableCC's ObjectMacro. */
package org.sablecc.objectmacro.codegeneration.java.macro;
import java.util.*;
public class MClassNone
extends Macro {
private DSeparator PackageDeclarationSeparator;
private DBeforeFirst PackageDeclarationBeforeFirst;
private DAfterLast PackageDeclarationAfterLast;
private DNone PackageDeclarationNone;
final List<Macro> list_PackageDeclaration;
final Context PackageDeclarationContext = new Context();
final MacroValue PackageDeclarationValue;
MClassNone(
Macros macros) {
setMacros(macros);
this.list_PackageDeclaration = new LinkedList<>();
this.PackageDeclarationValue = new MacroValue(
this.list_PackageDeclaration, this.PackageDeclarationContext);
}
MClassNone(
List<Macro> pPackageDeclaration,
Macros macros) {
setMacros(macros);
this.list_PackageDeclaration = new LinkedList<>();
this.PackageDeclarationValue = new MacroValue(
this.list_PackageDeclaration, this.PackageDeclarationContext);
if (pPackageDeclaration != null) {
addAllPackageDeclaration(pPackageDeclaration);
}
}
public void addAllPackageDeclaration(
List<Macro> macros) {
if (macros == null) {
throw ObjectMacroException.parameterNull("PackageDeclaration");
}
if (this.cacheBuilder != null) {
throw ObjectMacroException
.cannotModify(this.getClass().getSimpleName());
}
int i = 0;
for (Macro macro : macros) {
if (macro == null) {
throw ObjectMacroException.macroNull(i, "PackageDeclaration");
}
if (getMacros() != macro.getMacros()) {
throw ObjectMacroException.diffMacros();
}
verifyTypePackageDeclaration(macro);
this.list_PackageDeclaration.add(macro);
this.children.add(macro);
Macro.cycleDetector.detectCycle(this, macro);
i++;
}
}
void verifyTypePackageDeclaration(
Macro macro) {
macro.apply(new InternalsInitializer("PackageDeclaration") {
@Override
void setPackageDeclaration(
MPackageDeclaration mPackageDeclaration) {
}
});
}
public void addPackageDeclaration(
MPackageDeclaration macro) {
if (macro == null) {
throw ObjectMacroException.parameterNull("PackageDeclaration");
}
if (this.cacheBuilder != null) {
throw ObjectMacroException
.cannotModify(this.getClass().getSimpleName());
}
if (getMacros() != macro.getMacros()) {
throw ObjectMacroException.diffMacros();
}
this.list_PackageDeclaration.add(macro);
this.children.add(macro);
Macro.cycleDetector.detectCycle(this, macro);
}
private String buildPackageDeclaration() {
StringBuilder sb = new StringBuilder();
Context local_context = this.PackageDeclarationContext;
List<Macro> macros = this.list_PackageDeclaration;
int i = 0;
int nb_macros = macros.size();
String expansion = null;
if (this.PackageDeclarationBeforeFirst == null) {
initPackageDeclarationDirectives();
}
for (Macro macro : macros) {
expansion = macro.build(local_context);
expansion = this.PackageDeclarationBeforeFirst.apply(i, expansion,
nb_macros);
sb.append(expansion);
i++;
}
return sb.toString();
}
MacroValue getPackageDeclaration() {
return this.PackageDeclarationValue;
}
private void initPackageDeclarationInternals(
Context context) {
for (Macro macro : this.list_PackageDeclaration) {
macro.apply(new InternalsInitializer("PackageDeclaration") {
@Override
void setPackageDeclaration(
MPackageDeclaration mPackageDeclaration) {
}
});
}
}
private void initPackageDeclarationDirectives() {
StringBuilder sb1 = new StringBuilder();
sb1.append(LINE_SEPARATOR);
this.PackageDeclarationBeforeFirst = new DBeforeFirst(sb1.toString());
this.PackageDeclarationValue
.setBeforeFirst(this.PackageDeclarationBeforeFirst);
}
@Override
void apply(
InternalsInitializer internalsInitializer) {
internalsInitializer.setClassNone(this);
}
public String build() {
CacheBuilder cache_builder = this.cacheBuilder;
if (cache_builder == null) {
cache_builder = new CacheBuilder();
}
else if (cache_builder.getExpansion() == null) {
throw new InternalException("Cycle detection detected lately");
}
else {
return cache_builder.getExpansion();
}
this.cacheBuilder = cache_builder;
List<String> indentations = new LinkedList<>();
initPackageDeclarationInternals(null);
initPackageDeclarationDirectives();
StringBuilder sb0 = new StringBuilder();
MHeader m1 = getMacros().newHeader();
sb0.append(m1.build(null));
sb0.append(LINE_SEPARATOR);
sb0.append(buildPackageDeclaration());
sb0.append(LINE_SEPARATOR);
sb0.append(LINE_SEPARATOR);
sb0.append("class DNone");
sb0.append(LINE_SEPARATOR);
sb0.append(" extends Directive");
sb0.append("{");
sb0.append(LINE_SEPARATOR);
sb0.append(LINE_SEPARATOR);
sb0.append(" DNone(String value) ");
sb0.append("{");
sb0.append(LINE_SEPARATOR);
sb0.append(LINE_SEPARATOR);
sb0.append(" super(value);");
sb0.append(LINE_SEPARATOR);
sb0.append(" }");
sb0.append(LINE_SEPARATOR);
sb0.append(LINE_SEPARATOR);
sb0.append(" @Override");
sb0.append(LINE_SEPARATOR);
sb0.append(" String apply(");
sb0.append(LINE_SEPARATOR);
sb0.append(" Integer index,");
sb0.append(LINE_SEPARATOR);
sb0.append(" String macro,");
sb0.append(LINE_SEPARATOR);
sb0.append(" Integer list_size) ");
sb0.append("{");
sb0.append(LINE_SEPARATOR);
sb0.append(LINE_SEPARATOR);
sb0.append(" if(list_size == 0)");
sb0.append("{");
sb0.append(LINE_SEPARATOR);
sb0.append(" return this.value;");
sb0.append(LINE_SEPARATOR);
sb0.append(" }");
sb0.append(LINE_SEPARATOR);
sb0.append(LINE_SEPARATOR);
sb0.append(" return macro;");
sb0.append(LINE_SEPARATOR);
sb0.append(" }");
sb0.append(LINE_SEPARATOR);
sb0.append("}");
sb0.append(LINE_SEPARATOR);
cache_builder.setExpansion(sb0.toString());
return sb0.toString();
}
@Override
String build(
Context context) {
return build();
}
private void setMacros(
Macros macros) {
if (macros == null) {
throw new InternalException("macros cannot be null");
}
this.macros = macros;
}
}
| [
"egagnon@j-meg.com"
] | egagnon@j-meg.com |
5f99f2ddd6058ec25eb87c6b5ee2d36e0c9b1469 | 50bdf129a5f8e4365ef81c99fb8a998b19103d84 | /src/main/java/com/algaworks/financeiro/model/Lancamento.java | fde3ab89c3f63dd8555e27a2c956fb615211b1d0 | [] | no_license | douglasjava/financeiro | d620eee6264efe0b9ff69efb86a43228db28b203 | 7105283125a3c6444dbd6f8393e84cf899d25923 | refs/heads/master | 2020-04-29T08:54:11.466107 | 2019-03-16T17:43:39 | 2019-03-16T17:43:39 | 176,003,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,961 | java | package com.algaworks.financeiro.model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotEmpty;
import com.algaworks.financeiro.validation.DecimalPositivo;
@Entity
@Table(name = "lancamento")
public class Lancamento implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@ManyToOne(optional = false)
@JoinColumn(name = "pessoa_id")
private Pessoa pessoa;
@NotEmpty
@Column(length = 80, nullable = false)
private String descricao;
@DecimalPositivo
@Column(precision = 10, scale = 2, nullable = false)
private BigDecimal valor;
@NotNull
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private TipoLancamento tipo;
@NotNull
@Temporal(TemporalType.DATE)
@Column(name = "data_vencimento", nullable = false)
private Date dataVencimento;
@NotNull
@Temporal(TemporalType.DATE)
@Column(name = "data_pagamento", nullable = true)
private Date dataPagamento;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Pessoa getPessoa() {
return pessoa;
}
public void setPessoa(Pessoa pessoa) {
this.pessoa = pessoa;
}
public String getDescricao() {
return descricao;
}
public void setDescricao(String descricao) {
this.descricao = descricao;
}
public BigDecimal getValor() {
return valor;
}
public void setValor(BigDecimal valor) {
this.valor = valor;
}
public TipoLancamento getTipo() {
return tipo;
}
public void setTipo(TipoLancamento tipo) {
this.tipo = tipo;
}
public Date getDataVencimento() {
return dataVencimento;
}
public void setDataVencimento(Date dataVencimento) {
this.dataVencimento = dataVencimento;
}
public Date getDataPagamento() {
return dataPagamento;
}
public void setDataPagamento(Date dataPagamento) {
this.dataPagamento = dataPagamento;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Lancamento other = (Lancamento) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
| [
"douglasmarquesdias@hotmail.com"
] | douglasmarquesdias@hotmail.com |
daca6adccfe0b2212dbc22a8962ff36279187f9e | 1d38ce849f26c93b0f7b6faf3ed2a7169c1d52b3 | /src/main/java/com/chinacreator/xtbg/core/process/workflowphone/eneity/ResponseConstant.java | 3db297292e62dd677b27a0a228809f92e1567d88 | [] | no_license | zhaoy1992/xtbg-whtjy-new | 074f45e589be11d890ce301636f7585542680591 | 6d5cc068efd597ce8d20944dd7c88ff5aa525e40 | refs/heads/master | 2020-05-20T04:36:46.145223 | 2019-05-07T10:01:52 | 2019-05-07T10:01:52 | 185,377,218 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 940 | java | package com.chinacreator.xtbg.core.process.workflowphone.eneity;
/**
*
*<p>Title:ResponseConstant.java</p>
*<p>Description:</p>
*<p>Copyright:Copyright (c) 2010</p>
*<p>Company:湖南科创</p>
*@author shuqi.liu
*@version 1.0
*2013-7-23
*/
public class ResponseConstant {
public final static String RESULT_CODE_01 = "01";
public final static String RESULT_MESSAGE_01 = "调用接口未成功";
public final static String RESULT_CODE_02 = "02";
public final static String RESULT_MESSAGE_02 = "初始化出错";
public final static String RESULT_CODE_03 = "03";
public final static String RESULT_MESSAGE_03 = "流程中间环节的处理报错";
public final static String RESULT_CODE_10 = "10";
public final static String RESULT_MESSAGE_10 = "调用接口成功";
public final static String RESULT_CODE_11 = "11";
public final static String RESULT_MESSAGE_11 = "操作业务数据失败";
}
| [
"creator@creator"
] | creator@creator |
ff3b38f9d13930e4923a9883a1882765440ba4ae | 191fed5c90fa70fd668dac1b34f18514a294ee27 | /src/main/java/com/xianjinxia/cashman/request/PayCenterCallbackReq.java | 17a71cfdef79fd212c0f9c892e1b7af7afb6a963 | [
"Apache-2.0"
] | permissive | happyjianguo/largeloan-app | 01790b303831c1655dd24c7d60ee1f6ced0fbda7 | 05d495cbf23000f73d07dbaff6caf6c9bb267ae7 | refs/heads/master | 2020-07-03T02:31:02.021638 | 2018-05-28T03:31:05 | 2018-05-28T03:31:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,830 | java | package com.xianjinxia.cashman.request;
import java.util.Date;
public class PayCenterCallbackReq {
private Integer orderDetailId; // 详情id Y
private String orderNo; // 支付中心订单号 varchar Y
private Long payAmount; // 金额(分) Long Y
private String payType; // 支付类型 int Y
private String payName; // 支付类型名称 varchar Y
private String code; // 交易结果 varchar Y
private String msg; // 交易结果描述 varchar Y
private Date orderTime; // 交易时间 date Y
private Integer outordersId; // 订单表id N
private String exextData;
private String requestSource;// 来源ID
private String thirdOrderNo;//第三方订单号
public Integer getOrderDetailId() {
return orderDetailId;
}
public void setOrderDetailId(Integer orderDetailId) {
this.orderDetailId = orderDetailId;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public Long getPayAmount() {
return payAmount;
}
public void setPayAmount(Long payAmount) {
this.payAmount = payAmount;
}
public String getPayType() {
return payType;
}
public void setPayType(String payType) {
this.payType = payType;
}
public String getPayName() {
return payName;
}
public void setPayName(String payName) {
this.payName = payName;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Date getOrderTime() {
return orderTime;
}
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
public Integer getOutordersId() {
return outordersId;
}
public void setOutordersId(Integer outordersId) {
this.outordersId = outordersId;
}
public String getExextData() {
return exextData;
}
public void setExextData(String exextData) {
this.exextData = exextData;
}
public String getRequestSource() {
return requestSource;
}
public void setRequestSource(String requestSource) {
this.requestSource = requestSource;
}
public String getThirdOrderNo() {
return thirdOrderNo;
}
public void setThirdOrderNo(String thirdOrderNo) {
this.thirdOrderNo = thirdOrderNo;
}
@Override
public String toString() {
return "PayCenterCallbackReq{" +
"orderDetailId=" + orderDetailId +
", orderNo='" + orderNo + '\'' +
", payAmount=" + payAmount +
", payType='" + payType + '\'' +
", payName='" + payName + '\'' +
", code='" + code + '\'' +
", msg='" + msg + '\'' +
", orderTime=" + orderTime +
", outordersId=" + outordersId +
", exextData='" + exextData + '\'' +
", requestSource='" + requestSource + '\'' +
", thirdOrderNo='" + thirdOrderNo + '\'' +
'}';
}
}
| [
"wjj@xianjinxia.com"
] | wjj@xianjinxia.com |
1a2131957581143eb7f60f18eec389f98047058e | 221d9e5b8663b71fbfbbac329fd16920a8761865 | /src/main/java/com/couchbase/client/protocol/views/SpatialViewFetcherOperationImpl.java | 74f607d15430ec6e4316eec87346246e66a6da30 | [] | no_license | daschl/couchbase-java-client | 12f2efbf2258e9b9b73175f83f1f9f20b5e667c9 | bad240d99f492346332130ebd1dba92b00a246c9 | refs/heads/master | 2021-01-17T21:58:59.648119 | 2012-12-28T11:59:05 | 2013-01-02T18:13:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,759 | java | /**
* Copyright (C) 2009-2012 Couchbase, Inc.
*
* 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 DEALING
* IN THE SOFTWARE.
*/
package com.couchbase.client.protocol.views;
import java.net.HttpURLConnection;
import java.text.ParseException;
import java.util.Iterator;
import net.spy.memcached.ops.OperationErrorType;
import net.spy.memcached.ops.OperationException;
import net.spy.memcached.ops.OperationStatus;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
/**
* A SpatialViewOperationImpl.
*/
public class SpatialViewFetcherOperationImpl extends HttpOperationImpl
implements SpatialViewFetcherOperation {
private final String bucketName;
private final String designDocName;
private final String viewName;
public SpatialViewFetcherOperationImpl(HttpRequest r, String bucketName,
String designDocName, String viewName, ViewFetcherCallback viewCallback) {
super(r, viewCallback);
this.bucketName = bucketName;
this.designDocName = designDocName;
this.viewName = viewName;
}
@Override
public void handleResponse(HttpResponse response) {
String json = getEntityString(response);
try {
SpatialView view = parseDesignDocumentForView(bucketName, designDocName,
viewName, json);
int errorcode = response.getStatusLine().getStatusCode();
if (errorcode == HttpURLConnection.HTTP_OK) {
((SpatialViewFetcherOperation.ViewFetcherCallback) callback)
.gotData(view);
callback.receivedStatus(new OperationStatus(true, "OK"));
} else {
callback.receivedStatus(new OperationStatus(false,
Integer.toString(errorcode)));
}
} catch (ParseException e) {
exception = new OperationException(OperationErrorType.GENERAL,
"Error parsing JSON");
}
callback.complete();
}
private SpatialView parseDesignDocumentForView(String dn, String ddn,
String viewname, String json) throws ParseException {
SpatialView view = null;
if (json != null) {
try {
JSONObject base = new JSONObject(json);
if (base.has("error")) {
return null;
}
if (base.has("spatial")) {
JSONObject views = base.getJSONObject("spatial");
Iterator<?> itr = views.keys();
while (itr.hasNext()) {
String curView = (String) itr.next();
if (curView.equals(viewname)) {
view = new SpatialView(dn, ddn, viewname);
break;
}
}
}
} catch (JSONException e) {
throw new ParseException("Cannot read json: " + json, 0);
}
}
return view;
}
}
| [
"michael.nitschinger@couchbase.com"
] | michael.nitschinger@couchbase.com |
89118b6af4e3ec567ea30b3e211b568617ed7f1a | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14227-2-11-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/plugin/activitystream/impl/ActivityStreamConfiguration_ESTest_scaffolding.java | 007fc7aa85a15f5fa14bf76bd990072121124575 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Jan 19 14:34:56 UTC 2020
*/
package com.xpn.xwiki.plugin.activitystream.impl;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class ActivityStreamConfiguration_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
f203a9c7ef825551bbf179e78918ee9b0a6b909c | b23ff271915ef9e4e9f2f611a8ece0f218d46d50 | /java7/src/main/java/com/mtsmda/javaQuestions/ObjectList/ObjectList.java | 8b2c12da78aa6a9d85aeeffbee0238855ab66433 | [] | no_license | akbars95/urgently_repeat | f3d00b5a1df1b83bea6c506a7f20de36c3c2356a | 62d112527537e8ccff5ba2276e2b747d8ea2c5e6 | refs/heads/master | 2021-01-10T14:22:54.973200 | 2016-01-29T15:27:15 | 2016-01-29T15:28:17 | 45,659,633 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,662 | java | package com.mtsmda.javaQuestions.ObjectList;
import java.util.ArrayList;
import java.util.List;
/**
* Created by MTSMDA on 19.12.2015.
*/
public class ObjectList {
public static void main(String[] args) {
List<DatabaseServer> databaseServers = new ArrayList<>();
DatabaseServer databaseServer = new DatabaseServer("SQLServer", "2008");
databaseServers.add(databaseServer);
databaseServer = new DatabaseServer("MySQL", "5.31");
databaseServers.add(databaseServer);
databaseServer = new DatabaseServer("SQLite", "2.1.3");
databaseServers.add(databaseServer);
databaseServer = new DatabaseServer("Oracle", "10g");
databaseServers.add(databaseServer);
databaseServer = new DatabaseServer("PostgreSQL", "1.5");
databaseServers.add(databaseServer);
for(DatabaseServer databaseServerCurrent : databaseServers){
System.out.println(databaseServerCurrent);
}
}
}
class DatabaseServer {
private String name;
private String version;
public DatabaseServer(String name, String version) {
this.name = name;
this.version = version;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
@Override
public String toString() {
return "DatabaseServer{" +
"name='" + name + '\'' +
", version='" + version + '\'' +
'}';
}
} | [
"mynzat.dmitrii@gmail.com"
] | mynzat.dmitrii@gmail.com |
ecc296448a0e886c1398dbb419a7f1df94bc0b6d | 02702a36a2a576c7afa394841ae31ec627b7ef23 | /modules/fixflow-core/src/main/java/com/founder/fix/fixflow/core/impl/flowgraphics/svg/to/SvgDataInputTo.java | 86a45df1a4cd489e52a51181ab41269f3b102481 | [
"Apache-2.0"
] | permissive | nkchenhao/fixflow | 965ad6488d8d1beba3111f2d6c4ea6fd8c47237f | e2d4045899baa7782dd9ce986a9c4594f0aeac26 | refs/heads/master | 2021-01-15T20:34:19.626689 | 2014-08-07T07:39:19 | 2014-08-07T07:39:19 | 41,476,251 | 1 | 0 | null | 2015-08-27T08:56:27 | 2015-08-27T08:56:26 | null | UTF-8 | Java | false | false | 985 | java | /**
* Copyright 1996-2013 Founder International Co.,Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @author kenshin
*/
package com.founder.fix.fixflow.core.impl.flowgraphics.svg.to;
import com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgDataInputComponent;
public class SvgDataInputTo extends SvgShapeBaseTo {
public String getComponentClass() {
return SvgDataInputComponent.class.getCanonicalName();
}
}
| [
"kenshin.net@gmail.com"
] | kenshin.net@gmail.com |
386f03bf6a11d0fb9192afe73ce4a45d4916674f | 08a7acf1d20dffed5ac14206e03612ede9e4cadd | /bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/employeeworkexperience/EmployeeWorkExperienceMapper.java | 352d78e5da1588e1a4240031d19477626519fb7a | [] | no_license | wiwqy/retailscm-biz-suite | fb630c8dee3e309f9e60a159f8ac6d0d54b24b11 | 59014c81395f60195fcff14e3d367fbdd8ad2458 | refs/heads/master | 2020-09-06T15:07:25.419253 | 2019-11-02T00:16:00 | 2019-11-02T00:16:00 | 220,460,562 | 1 | 0 | null | 2019-11-08T12:16:09 | 2019-11-08T12:16:08 | null | UTF-8 | Java | false | false | 4,280 | java |
package com.doublechaintech.retailscm.employeeworkexperience;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.math.BigDecimal;
import com.doublechaintech.retailscm.BaseRowMapper;
import com.doublechaintech.retailscm.employee.Employee;
public class EmployeeWorkExperienceMapper extends BaseRowMapper<EmployeeWorkExperience>{
protected EmployeeWorkExperience internalMapRow(ResultSet rs, int rowNumber) throws SQLException{
EmployeeWorkExperience employeeWorkExperience = getEmployeeWorkExperience();
setId(employeeWorkExperience, rs, rowNumber);
setEmployee(employeeWorkExperience, rs, rowNumber);
setStart(employeeWorkExperience, rs, rowNumber);
setEnd(employeeWorkExperience, rs, rowNumber);
setCompany(employeeWorkExperience, rs, rowNumber);
setDescription(employeeWorkExperience, rs, rowNumber);
setVersion(employeeWorkExperience, rs, rowNumber);
return employeeWorkExperience;
}
protected EmployeeWorkExperience getEmployeeWorkExperience(){
return new EmployeeWorkExperience();
}
protected void setId(EmployeeWorkExperience employeeWorkExperience, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
String id = rs.getString(EmployeeWorkExperienceTable.COLUMN_ID);
if(id == null){
//do nothing when nothing found in database
return;
}
employeeWorkExperience.setId(id);
}
protected void setEmployee(EmployeeWorkExperience employeeWorkExperience, ResultSet rs, int rowNumber) throws SQLException{
String employeeId = rs.getString(EmployeeWorkExperienceTable.COLUMN_EMPLOYEE);
if( employeeId == null){
return;
}
if( employeeId.isEmpty()){
return;
}
Employee employee = employeeWorkExperience.getEmployee();
if( employee != null ){
//if the root object 'employeeWorkExperience' already have the property, just set the id for it;
employee.setId(employeeId);
return;
}
employeeWorkExperience.setEmployee(createEmptyEmployee(employeeId));
}
protected void setStart(EmployeeWorkExperience employeeWorkExperience, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
Date start = rs.getDate(EmployeeWorkExperienceTable.COLUMN_START);
if(start == null){
//do nothing when nothing found in database
return;
}
employeeWorkExperience.setStart(start);
}
protected void setEnd(EmployeeWorkExperience employeeWorkExperience, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
Date end = rs.getDate(EmployeeWorkExperienceTable.COLUMN_END);
if(end == null){
//do nothing when nothing found in database
return;
}
employeeWorkExperience.setEnd(end);
}
protected void setCompany(EmployeeWorkExperience employeeWorkExperience, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
String company = rs.getString(EmployeeWorkExperienceTable.COLUMN_COMPANY);
if(company == null){
//do nothing when nothing found in database
return;
}
employeeWorkExperience.setCompany(company);
}
protected void setDescription(EmployeeWorkExperience employeeWorkExperience, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
String description = rs.getString(EmployeeWorkExperienceTable.COLUMN_DESCRIPTION);
if(description == null){
//do nothing when nothing found in database
return;
}
employeeWorkExperience.setDescription(description);
}
protected void setVersion(EmployeeWorkExperience employeeWorkExperience, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
Integer version = rs.getInt(EmployeeWorkExperienceTable.COLUMN_VERSION);
if(version == null){
//do nothing when nothing found in database
return;
}
employeeWorkExperience.setVersion(version);
}
protected Employee createEmptyEmployee(String employeeId){
Employee employee = new Employee();
employee.setId(employeeId);
employee.setVersion(Integer.MAX_VALUE);
return employee;
}
}
| [
"philip_chang@163.com"
] | philip_chang@163.com |
757d8fc690f22e5b2b42105738de79dc98ea0136 | 538f7f57148d9e5e0f8ac53343de331a90e08430 | /src/main/java/liquibase/ext/vacuum/VacuumStatement.java | 4b454573c0f0c8235f8d8f126434b4b959f92abd | [
"Apache-2.0"
] | permissive | liquibase/liquibase-postgresql | eb754d9e57b2f0c7e9d5ed6558cbe9b54cf8d930 | edae1ba8f13fdbc0b076ffcb7bd3a1115df1bdaa | refs/heads/main | 2023-09-04T11:21:22.285654 | 2023-08-28T06:59:28 | 2023-08-28T06:59:28 | 2,021,337 | 29 | 18 | null | 2023-08-28T06:59:29 | 2011-07-09T05:43:59 | Java | UTF-8 | Java | false | false | 754 | java | package liquibase.ext.vacuum;
import liquibase.statement.AbstractSqlStatement;
public class VacuumStatement extends AbstractSqlStatement {
private String tableName;
private String schemaName;
private String catalogName;
public VacuumStatement(String catalogName, String schemaName, String tableName) {
this.catalogName = catalogName;
this.tableName = tableName;
this.schemaName = schemaName;
}
public String getTableName() {
return tableName;
}
public String getCatalogName() {
return catalogName;
}
public void setCatalogName(String catalogName) {
this.catalogName = catalogName;
}
public String getSchemaName() {
return schemaName;
}
}
| [
"nathan@voxland.net"
] | nathan@voxland.net |
6c690d947b00c345b65ebce1b0de197d9e09aea7 | 48a88aea6e9774279c8563f1be665a540e02a894 | /src/edu/stanford/nlp/ling/tokensregex/types/Tags.java | 367f1a7388e71809e425c148378efe81eb9ad6c8 | [] | no_license | josepvalls/parserservices | 0994aa0fc56919985474aaebb9fa64581928b5b4 | 903363685e5cea4bd50d9161d60500800e42b167 | refs/heads/master | 2021-01-17T08:36:23.455855 | 2016-01-19T19:49:54 | 2016-01-19T19:49:54 | 60,540,533 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,318 | java | package edu.stanford.nlp.ling.tokensregex.types;
import edu.stanford.nlp.ling.CoreAnnotation;
import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
/**
* Tags that can be added to values or annotations
*/
public class Tags implements Serializable {
public static class TagsAnnotation implements CoreAnnotation<Tags> {
public Class<Tags> getType() {
return Tags.class;
}
}
Map<String, Value> tags;
public Tags(String... tags) {
if (tags != null) {
this.tags = new HashMap<String,Value>();
for (String tag:tags) {
this.tags.put(tag, null);
}
}
}
public Collection<String> getTags() {
return tags.keySet();
}
public boolean hasTag(String tag) {
return (tags != null)? tags.containsKey(tag): false;
}
public void addTag(String tag) {
addTag(tag, null);
}
public void addTag(String tag, Value v) {
if (tags == null) { tags = new HashMap<String, Value>(1); }
tags.put(tag, v);
}
public void removeTag(String tag) {
if (tags != null) { tags.remove(tag); }
}
public Value getTag(String tag) {
return (tags != null)? tags.get(tag): null;
}
private static final long serialVersionUID = 2;
}
| [
"josepvalls@Valls.local"
] | josepvalls@Valls.local |
1a4061afb8992d638515d169af454f3b2e5aa180 | cc60667ba6d4248efb1e2e37357d600fc1082f3c | /src/main/java/com/mahout/hsqldbtest/listener/QuartzInitializerListener.java | 49ca9cc2e40ee99d51c3d43c82c2e4cc07459c67 | [] | no_license | mmahmoodictbd/local-song-catalog | 242f8207b779befa4d7104e0b93b399e0ebcfd55 | 39382679c07dd0a4f95b311f247dd5f325c14c87 | refs/heads/master | 2022-07-09T14:52:08.334744 | 2019-01-21T21:50:04 | 2019-01-21T21:50:04 | 166,885,402 | 2 | 0 | null | 2022-07-01T21:23:49 | 2019-01-21T21:47:52 | JavaScript | UTF-8 | Java | false | false | 3,400 | java | package com.mahout.hsqldbtest.listener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SimpleScheduleBuilder;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import org.quartz.impl.StdSchedulerFactory;
import com.mahout.hsqldbtest.job.RestoreOrphanedSongJob;
import com.mahout.hsqldbtest.job.SongExistCheckJob;
import com.mahout.hsqldbtest.job.SongUpdateMD5Job;
@WebListener
public class QuartzInitializerListener implements ServletContextListener {
private Scheduler scheduler;
private Map<JobDetail, List<Trigger>> jobDetailMap = new HashMap<JobDetail, List<Trigger>>();
public void contextInitialized(ServletContextEvent arg0) {
System.out.println("QuartzInitializerListener - Initializing Application successfully");
registerSongExistCheckJob();
registerUpdateMD5Job();
registerRestoreOrphanedSongJob();
try {
scheduler = StdSchedulerFactory.getDefaultScheduler();
scheduler.start();
scheduler.scheduleJobs(jobDetailMap, true);
} catch (Exception e) {
e.printStackTrace();
}
}
public void contextDestroyed(ServletContextEvent arg0) {
try {
scheduler.shutdown();
} catch (SchedulerException e) {
e.printStackTrace();
}
System.out.println("QuartzInitializerListener - Stopping Application successfully");
}
private void registerSongExistCheckJob() {
JobDetail songExistCheckJob = JobBuilder.newJob(SongExistCheckJob.class).withIdentity("SongExistCheckJob")
.build();
Trigger songExistCheckJobTrigger = TriggerBuilder.newTrigger().withIdentity("SongExistCheckJobTrigger")
.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(1).repeatForever()).build();
List<Trigger> songExistCheckJobTriggerList = new ArrayList<Trigger>();
songExistCheckJobTriggerList.add(songExistCheckJobTrigger);
jobDetailMap.put(songExistCheckJob, songExistCheckJobTriggerList);
}
private void registerUpdateMD5Job() {
JobDetail updateMD5Job = JobBuilder.newJob(SongUpdateMD5Job.class).withIdentity("UpdateMD5Job").build();
Trigger updateMD5JobTrigger = TriggerBuilder.newTrigger().withIdentity("UpdateMD5JobTrigger")
.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(1).repeatForever()).build();
List<Trigger> updateMD5JobTriggerList = new ArrayList<Trigger>();
updateMD5JobTriggerList.add(updateMD5JobTrigger);
jobDetailMap.put(updateMD5Job, updateMD5JobTriggerList);
}
private void registerRestoreOrphanedSongJob() {
JobDetail restoreOrphanedSongJob = JobBuilder.newJob(RestoreOrphanedSongJob.class)
.withIdentity("RestoreOrphanedSongJob").build();
Trigger restoreOrphanedSongJobTrigger = TriggerBuilder.newTrigger()
.withIdentity("RestoreOrphanedSongJobTrigger")
.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(10).repeatForever()).build();
List<Trigger> restoreOrphanedSongJobTriggerList = new ArrayList<Trigger>();
restoreOrphanedSongJobTriggerList.add(restoreOrphanedSongJobTrigger);
jobDetailMap.put(restoreOrphanedSongJob, restoreOrphanedSongJobTriggerList);
}
}
| [
"mmahmood.ict.bd@gmail.com"
] | mmahmood.ict.bd@gmail.com |
2b2bc6cdb1c3f4beda531b41fdb9ea40467601c7 | 8cd17c6e7169fc4a63eaa715209150cdd2cf71bc | /1091/Seminar14/src/ro/ase/csie/cts/g1091/seminar14/state/GameCharacter.java | cdd92910f5f43f935b3d38c31f87c2010f83812a | [
"MIT"
] | permissive | Software-Quality-and-Testing/cts-2020 | ce6e0f2856fdad84642315e13b77475444ffeedf | 87e2b2d403bd13adfb92805668a03f9cb078aac0 | refs/heads/master | 2022-12-24T22:04:49.177163 | 2020-05-27T11:19:32 | 2020-05-27T11:19:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,114 | java | package ro.ase.csie.cts.g1091.seminar14.state;
import javax.management.ListenerNotFoundException;
public class GameCharacter {
String name;
int lifePoints;
CharacterActions currentState = null;
public GameCharacter(String name, int lifePoints) {
super();
this.name = name;
this.lifePoints = lifePoints;
this.currentState = new StateNormal();
}
public void setCurrentState(CharacterActions currentState) {
this.currentState = currentState;
}
public void move() {
System.out.println(this.name);
this.currentState.relocate();
}
public void attack(String enemy, int points) {
this.currentState.strike(enemy, points, this);
}
public void heal(int points) {
this.lifePoints += points;
if(this.lifePoints > 500)
this.currentState = new StateWounded();
}
public void isHit(int points) {
this.lifePoints -= points;
if(lifePoints <= 500)
this.currentState = new StateWounded();
if(lifePoints < 100)
this.currentState = new StateCritical();
}
public void fullHeal() {
this.lifePoints = 1000;
this.currentState = new StateNormal();
}
}
| [
"catalin.boja@hotmail.com"
] | catalin.boja@hotmail.com |
f24ce18823cd1b0396cd3ccf27a9198f3daf69c0 | 8f3dcdb61b3d5d810b750ca8b7d451df3ec7260d | /app/src/main/java/com/android/dx/dex/code/Dop.java | 0c7546ca23d48ae071adcdc3e187c6f2578b6c88 | [] | no_license | Doublemine/TerminalIDE | 7453e47b9e0c5506b048d19e3fd776b1abc9efa7 | ae40d0855c93785b3c129143d835652b6a90cbcf | refs/heads/master | 2020-04-09T19:17:37.771138 | 2015-08-25T13:07:47 | 2015-08-25T13:07:47 | 41,362,667 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,823 | java | /*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.dx.dex.code;
/**
* Representation of an opcode.
*/
public final class Dop {
/**
* DalvOps.MIN_VALUE..DalvOps.MAX_VALUE; the opcode value itself
*/
private final int opcode;
/**
* DalvOps.MIN_VALUE..DalvOps.MAX_VALUE; the opcode family
*/
private final int family;
/**
* {@code non-null;} the instruction format
*/
private final InsnFormat format;
/**
* whether this opcode uses a result register
*/
private final boolean hasResult;
/**
* {@code non-null;} the name
*/
private final String name;
/**
* Constructs an instance.
*
* @param opcode {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode
* value itself
* @param family {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode family
* @param format {@code non-null;} the instruction format
* @param hasResult whether the opcode has a result register; if so it
* is always the first register
* @param name {@code non-null;} the name
*/
public Dop(int opcode, int family, InsnFormat format,
boolean hasResult, String name) {
if ((opcode < DalvOps.MIN_VALUE) || (opcode > DalvOps.MAX_VALUE)) {
throw new IllegalArgumentException("bogus opcode");
}
if ((family < DalvOps.MIN_VALUE) || (family > DalvOps.MAX_VALUE)) {
throw new IllegalArgumentException("bogus family");
}
if (format == null) {
throw new NullPointerException("format == null");
}
if (name == null) {
throw new NullPointerException("name == null");
}
this.opcode = opcode;
this.family = family;
this.format = format;
this.hasResult = hasResult;
this.name = name;
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return name;
}
/**
* Gets the opcode value.
*
* @return {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode value
*/
public int getOpcode() {
return opcode;
}
/**
* Gets the opcode family. The opcode family is the unmarked (no
* "/...") opcode that has equivalent semantics to this one.
*
* @return {@code DalvOps.MIN_VALUE..DalvOps.MAX_VALUE;} the opcode family
*/
public int getFamily() {
return family;
}
/**
* Gets the instruction format.
*
* @return {@code non-null;} the instruction format
*/
public InsnFormat getFormat() {
return format;
}
/**
* Returns whether this opcode uses a result register.
*
* @return {@code true} iff this opcode uses a result register
*/
public boolean hasResult() {
return hasResult;
}
/**
* Gets the opcode name.
*
* @return {@code non-null;} the opcode name
*/
public String getName() {
return name;
}
/**
* Gets the opcode for the opposite test of this instance. This is only
* valid for opcodes which are in fact tests.
*
* @return {@code non-null;} the opposite test
*/
public Dop getOppositeTest() {
switch (opcode) {
case DalvOps.IF_EQ:
return Dops.IF_NE;
case DalvOps.IF_NE:
return Dops.IF_EQ;
case DalvOps.IF_LT:
return Dops.IF_GE;
case DalvOps.IF_GE:
return Dops.IF_LT;
case DalvOps.IF_GT:
return Dops.IF_LE;
case DalvOps.IF_LE:
return Dops.IF_GT;
case DalvOps.IF_EQZ:
return Dops.IF_NEZ;
case DalvOps.IF_NEZ:
return Dops.IF_EQZ;
case DalvOps.IF_LTZ:
return Dops.IF_GEZ;
case DalvOps.IF_GEZ:
return Dops.IF_LTZ;
case DalvOps.IF_GTZ:
return Dops.IF_LEZ;
case DalvOps.IF_LEZ:
return Dops.IF_GTZ;
}
throw new IllegalArgumentException("bogus opcode: " + this);
}
}
| [
"wanghaokoko1994@gmail.com"
] | wanghaokoko1994@gmail.com |
c590e1874836321c1fa53d6fc33c41d83047e61d | c3c3a794f85e9b107bdc4086ef9bd40977c60821 | /trunk/facepond/core/src/main/java/com/soa/facepond/IUserDao.java | df559157021a22b32a892ba9d13e5b9663fd7e6a | [] | no_license | BGCX067/facepond-svn-to-git | 25a5ad33e2caf309dc7c4e15369ef40c836d8328 | 7afaa6bca59832e98675ace7f0b71537028279bc | refs/heads/master | 2016-09-01T08:55:21.013623 | 2015-12-28T14:37:01 | 2015-12-28T14:37:01 | 48,836,051 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package com.soa.facepond;
import java.util.Map;
import com.soa.facepond.model.User;
public interface IUserDao {
public boolean isNewUser(String authId) throws Exception;
public void addUser(User user) throws Exception;
public void updateUser(User user) throws Exception;
public Map<String, String> loadCityDivisions() throws Exception;
public User getUserById(long id) throws Exception;
public User getUserByAuthId(String authId) throws Exception;
public void removeDealsByUser(long userId) throws Exception;
}
| [
"you@example.com"
] | you@example.com |
56ba5942676edbb1c706104c7c026a974d1e9560 | d0536669bb37019e766766461032003ad045665b | /jdk1.4.2_src/java/awt/dnd/DragSourceListener.java | a9be3a854a28e8661c59e056e83e33ff952e6d8f | [] | no_license | eagle518/jdk-source-code | c0d60f0762bce0221c7eeb1654aa1a53a3877313 | 91b771140de051fb843af246ab826dd6ff688fe3 | refs/heads/master | 2021-01-18T19:51:07.988541 | 2010-09-09T06:36:02 | 2010-09-09T06:36:02 | 38,047,470 | 11 | 23 | null | null | null | null | UTF-8 | Java | false | false | 3,391 | java | /*
* @(#)DragSourceListener.java 1.18 03/01/23
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.awt.dnd;
import java.util.EventListener;
/**
* The <code>DragSourceListener</code> defines the
* event interface for originators of
* Drag and Drop operations to track the state of the user's gesture, and to
* provide appropriate "drag over"
* feedback to the user throughout the
* Drag and Drop operation.
*
* @version 1.18, 01/23/03
* @since 1.2
*/
public interface DragSourceListener extends EventListener {
/**
* Called as the cursor's hotspot enters a platform-dependent drop site.
* This method is invoked when all the following conditions are true:
* <UL>
* <LI>The cursor's hotspot enters the operable part of a platform-
* dependent drop site.
* <LI>The drop site is active.
* <LI>The drop site accepts the drag.
* </UL>
*
* @param dsde the <code>DragSourceDragEvent</code>
*/
void dragEnter(DragSourceDragEvent dsde);
/**
* Called as the cursor's hotspot moves over a platform-dependent drop site.
* This method is invoked when all the following conditions are true:
* <UL>
* <LI>The cursor's hotspot has moved, but still intersects the
* operable part of the drop site associated with the previous
* dragEnter() invocation.
* <LI>The drop site is still active.
* <LI>The drop site accepts the drag.
* </UL>
*
* @param dsde the <code>DragSourceDragEvent</code>
*/
void dragOver(DragSourceDragEvent dsde);
/**
* Called when the user has modified the drop gesture.
* This method is invoked when the state of the input
* device(s) that the user is interacting with changes.
* Such devices are typically the mouse buttons or keyboard
* modifiers that the user is interacting with.
*
* @param dsde the <code>DragSourceDragEvent</code>
*/
void dropActionChanged(DragSourceDragEvent dsde);
/**
* Called as the cursor's hotspot exits a platform-dependent drop site.
* This method is invoked when any of the following conditions are true:
* <UL>
* <LI>The cursor's hotspot no longer intersects the operable part
* of the drop site associated with the previous dragEnter() invocation.
* </UL>
* OR
* <UL>
* <LI>The drop site associated with the previous dragEnter() invocation
* is no longer active.
* </UL>
* OR
* <UL>
* <LI> The current drop site has rejected the drag.
* </UL>
*
* @param dse the <code>DragSourceEvent</code>
*/
void dragExit(DragSourceEvent dse);
/**
* This method is invoked to signify that the Drag and Drop
* operation is complete. The getDropSuccess() method of
* the <code>DragSourceDropEvent</code> can be used to
* determine the termination state. The getDropAction() method
* returns the operation that the drop site selected
* to apply to the Drop operation. Once this method is complete, the
* current <code>DragSourceContext</code> and
* associated resources become invalid.
*
* @param dsde the <code>DragSourceDropEvent</code>
*/
void dragDropEnd(DragSourceDropEvent dsde);
}
| [
"kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd"
] | kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd |
edd425a41b4eddc9f47bc66b9eb5028aa360d0ba | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_17_0/Lte/Lte3GNeighbourAnrAddUpdate.java | 489749747f66672933122ff630c0710fa96a10ff | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 1,758 | java |
package Netspan.NBI_17_0.Lte;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Node3gNeighbour" type="{http://Airspan.Netspan.WebServices}Node3gNeighbourAnrWs" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"node3GNeighbour"
})
@XmlRootElement(name = "Lte3gNeighbourAnrAddUpdate")
public class Lte3GNeighbourAnrAddUpdate {
@XmlElement(name = "Node3gNeighbour")
protected Node3GNeighbourAnrWs node3GNeighbour;
/**
* Gets the value of the node3GNeighbour property.
*
* @return
* possible object is
* {@link Node3GNeighbourAnrWs }
*
*/
public Node3GNeighbourAnrWs getNode3GNeighbour() {
return node3GNeighbour;
}
/**
* Sets the value of the node3GNeighbour property.
*
* @param value
* allowed object is
* {@link Node3GNeighbourAnrWs }
*
*/
public void setNode3GNeighbour(Node3GNeighbourAnrWs value) {
this.node3GNeighbour = value;
}
}
| [
"dshalom@airspan.com"
] | dshalom@airspan.com |
7638b96f817fd16c3dfc4442f69b7dc2e84bee95 | e578e1dd6f58db78a2c23c3e64ff0265b2fcfb8e | /hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSetQuotaWithSnapshot.java | c5ac26ed95a324d57a92969bbffabf36c2374574 | [
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"EPL-1.0",
"Classpath-exception-2.0",
"CC-BY-3.0",
"CC-BY-2.5",
"GPL-2.0-only",
"CC-PDDC",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-3-Clause",
"GCC-exception-3.1",
"CDDL-1.0",
"MIT",
"CDDL-1.1",
"BSD-2-Clause-Views",
"MPL-2.0",
"AGPL-3.0-only",
"LicenseRef-scancode-proprietary-license",
"MPL-2.0-no-copyleft-exception",
"LicenseRef-scancode-protobuf",
"BSD-2-Clause",
"LicenseRef-scancode-jdom",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | MSDS-ABLE/toposch | ca7c585f61738a262639bc07e27915b30b08221f | 181977dae6953f8bca026cadd4722979e9ec0d43 | refs/heads/master | 2023-09-01T09:25:27.817000 | 2020-05-31T04:03:08 | 2020-05-31T04:03:08 | 267,599,209 | 5 | 0 | Apache-2.0 | 2023-08-15T17:41:32 | 2020-05-28T13:35:50 | Java | UTF-8 | Java | false | false | 6,379 | 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.hdfs.server.namenode.snapshot;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DFSConfigKeys;
import org.apache.hadoop.hdfs.DFSTestUtil;
import org.apache.hadoop.hdfs.DFSUtil;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.protocol.HdfsConstants;
import org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus;
import org.apache.hadoop.hdfs.server.namenode.FSDirectory;
import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
import org.apache.hadoop.hdfs.server.namenode.INode;
import org.apache.hadoop.hdfs.server.namenode.INodeDirectory;
import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.DirectoryDiff;
import org.apache.hadoop.hdfs.util.Diff.ListType;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
public class TestSetQuotaWithSnapshot {
protected static final long seed = 0;
protected static final short REPLICATION = 3;
protected static final long BLOCKSIZE = 1024;
protected Configuration conf;
protected MiniDFSCluster cluster;
protected FSNamesystem fsn;
protected FSDirectory fsdir;
protected DistributedFileSystem hdfs;
@Rule
public ExpectedException exception = ExpectedException.none();
@Before
public void setUp() throws Exception {
conf = new Configuration();
conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCKSIZE);
cluster = new MiniDFSCluster.Builder(conf).numDataNodes(REPLICATION)
.format(true).build();
cluster.waitActive();
fsn = cluster.getNamesystem();
fsdir = fsn.getFSDirectory();
hdfs = cluster.getFileSystem();
}
@After
public void tearDown() throws Exception {
if (cluster != null) {
cluster.shutdown();
cluster = null;
}
}
@Test (timeout=60000)
public void testSetQuota() throws Exception {
final Path dir = new Path("/TestSnapshot");
hdfs.mkdirs(dir);
// allow snapshot on dir and create snapshot s1
SnapshotTestHelper.createSnapshot(hdfs, dir, "s1");
Path sub = new Path(dir, "sub");
hdfs.mkdirs(sub);
Path fileInSub = new Path(sub, "file");
DFSTestUtil.createFile(hdfs, fileInSub, BLOCKSIZE, REPLICATION, seed);
INodeDirectory subNode = INodeDirectory.valueOf(
fsdir.getINode(sub.toString()), sub);
// subNode should be a INodeDirectory, but not an INodeDirectoryWithSnapshot
assertFalse(subNode.isWithSnapshot());
hdfs.setQuota(sub, Long.MAX_VALUE - 1, Long.MAX_VALUE - 1);
subNode = INodeDirectory.valueOf(fsdir.getINode(sub.toString()), sub);
assertTrue(subNode.isQuotaSet());
assertFalse(subNode.isWithSnapshot());
}
/**
* Test clear quota of a snapshottable dir or a dir with snapshot.
*/
@Test
public void testClearQuota() throws Exception {
final Path dir = new Path("/TestSnapshot");
hdfs.mkdirs(dir);
hdfs.allowSnapshot(dir);
hdfs.setQuota(dir, HdfsConstants.QUOTA_DONT_SET,
HdfsConstants.QUOTA_DONT_SET);
INodeDirectory dirNode = fsdir.getINode4Write(dir.toString()).asDirectory();
assertTrue(dirNode.isSnapshottable());
assertEquals(0, dirNode.getDiffs().asList().size());
hdfs.setQuota(dir, HdfsConstants.QUOTA_DONT_SET - 1,
HdfsConstants.QUOTA_DONT_SET - 1);
dirNode = fsdir.getINode4Write(dir.toString()).asDirectory();
assertTrue(dirNode.isSnapshottable());
assertEquals(0, dirNode.getDiffs().asList().size());
hdfs.setQuota(dir, HdfsConstants.QUOTA_RESET, HdfsConstants.QUOTA_RESET);
dirNode = fsdir.getINode4Write(dir.toString()).asDirectory();
assertTrue(dirNode.isSnapshottable());
assertEquals(0, dirNode.getDiffs().asList().size());
// allow snapshot on dir and create snapshot s1
SnapshotTestHelper.createSnapshot(hdfs, dir, "s1");
// clear quota of dir
hdfs.setQuota(dir, HdfsConstants.QUOTA_RESET, HdfsConstants.QUOTA_RESET);
// dir should still be a snapshottable directory
dirNode = fsdir.getINode4Write(dir.toString()).asDirectory();
assertTrue(dirNode.isSnapshottable());
assertEquals(1, dirNode.getDiffs().asList().size());
SnapshottableDirectoryStatus[] status = hdfs.getSnapshottableDirListing();
assertEquals(1, status.length);
assertEquals(dir, status[0].getFullPath());
final Path subDir = new Path(dir, "sub");
hdfs.mkdirs(subDir);
hdfs.createSnapshot(dir, "s2");
final Path file = new Path(subDir, "file");
DFSTestUtil.createFile(hdfs, file, BLOCKSIZE, REPLICATION, seed);
hdfs.setQuota(dir, HdfsConstants.QUOTA_RESET, HdfsConstants.QUOTA_RESET);
INode subNode = fsdir.getINode4Write(subDir.toString());
assertTrue(subNode.asDirectory().isWithSnapshot());
List<DirectoryDiff> diffList = subNode.asDirectory().getDiffs().asList();
assertEquals(1, diffList.size());
Snapshot s2 = dirNode.getSnapshot(DFSUtil.string2Bytes("s2"));
assertEquals(s2.getId(), diffList.get(0).getSnapshotId());
List<INode> createdList = diffList.get(0).getChildrenDiff().getList(ListType.CREATED);
assertEquals(1, createdList.size());
assertSame(fsdir.getINode4Write(file.toString()), createdList.get(0));
}
}
| [
"zhujy@super01.ivic.org.cn"
] | zhujy@super01.ivic.org.cn |
4e049d33f03edc4dbd50807c8f1fb9b4638e463b | d3e30ae0daa642bf226f814a7c608fcae4da4e14 | /Java File I:O (NIO.2)/Path_Methods.java | db9a04417ea84b838433999a4942e254c8a4e97d | [] | no_license | akudrin/Java11CertificationCode | 58947e01644561233ffd765455b0780070a903be | 148a463804a40f5ef8dae3bf5b369eb972a5b26a | refs/heads/master | 2022-11-05T20:33:50.871580 | 2020-06-22T10:23:16 | 2020-06-22T10:23:16 | 265,873,750 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | import java.nio.file.Path;
public class Path_Methods {
public static void main(String[] args) {
String HOME = System.getProperty("user.home");
System.out.println(HOME);
Path path = Path.of("a/b/c");
Path root = path.getRoot();
Path parent = path.getParent();
Path file = path.getFileName();
Path subpath = path.subpath(0, 2)
System.out.println(root + " " + parent + " " + file + " " + subpath);
}
} | [
"andreikudrin@gmail.com"
] | andreikudrin@gmail.com |
ada0aefe2da5cf41687fc9cdbda1c929284bddc9 | bee215430984551c198fb12eb477fe2f448decaa | /jig-core/src/main/java/org/dddjava/jig/domain/model/businessrules/BusinessRuleRelations.java | bc2451a092a2b8d0b2dea6256901d700d93517e1 | [
"Apache-2.0"
] | permissive | yoshiyoshifujii/jig | 8cb5ff24114e58b6b27a99755215f7e69304f7ec | 5de40534753fe996f044d6ad72bef277ccc9b0f0 | refs/heads/master | 2020-09-09T04:24:09.785456 | 2019-12-02T11:52:24 | 2019-12-02T11:52:24 | 221,346,813 | 0 | 0 | Apache-2.0 | 2019-11-13T01:31:31 | 2019-11-13T01:31:31 | null | UTF-8 | Java | false | false | 378 | java | package org.dddjava.jig.domain.model.businessrules;
import java.util.List;
/**
* ビジネスルールの関連一覧
*/
public class BusinessRuleRelations {
List<BusinessRuleRelation> list;
public BusinessRuleRelations(List<BusinessRuleRelation> list) {
this.list = list;
}
public List<BusinessRuleRelation> list() {
return list;
}
}
| [
"irof@hogedriven.net"
] | irof@hogedriven.net |
9e30a7448606b2d822538a3968175e40b5edb605 | e09b548dd204038924bba2a94fc05fc959f5a696 | /sources/androidx/core/os/LocaleListInterface.java | fb5dd73b604b0753c4392bd4b969d75854c5107b | [
"Unlicense"
] | permissive | Li-amK/School-Chemie-App | 9472ac787be3658d0dc3a32a2787b98c34711c18 | 0b747e08e46d43e44849d6c59fd254f9466a4003 | refs/heads/main | 2022-07-29T13:51:33.064078 | 2022-02-06T18:21:34 | 2022-02-06T18:21:34 | 456,215,965 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 709 | java | package androidx.core.os;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import java.util.Locale;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
/* loaded from: classes.dex */
interface LocaleListInterface {
boolean equals(Object obj);
Locale get(int i);
@Nullable
Locale getFirstMatch(String[] strArr);
Object getLocaleList();
int hashCode();
@IntRange(from = -1)
int indexOf(Locale locale);
boolean isEmpty();
void setLocaleList(@NonNull Locale... localeArr);
@IntRange(from = 0)
int size();
String toLanguageTags();
String toString();
}
| [
"liam@kauper.de"
] | liam@kauper.de |
83f6b5e34e23cd2e7a4553c1fe420dec11017400 | 021df2a7e5e70ee2b3024a6bf5bbc0e6c1f4459c | /modules/core/src/main/java/io/jmix/core/metamodel/datatype/impl/OffsetDateTimeDatatype.java | 0925da8cf50c96c3faaac8514f2fb5b15d3a79e4 | [
"Apache-2.0"
] | permissive | gorbunkov/jmix | e03aa309b7f477b1561fd4ccf154d77488679919 | 4f518abc572c3b9cc05fce2cae38f62d89bc61d3 | refs/heads/master | 2022-11-06T00:32:07.798670 | 2020-06-09T08:34:44 | 2020-06-09T08:34:44 | 270,597,039 | 0 | 0 | null | 2020-06-09T07:36:33 | 2020-06-08T08:52:42 | null | UTF-8 | Java | false | false | 2,454 | java | /*
* Copyright 2019 Haulmont.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.jmix.core.metamodel.datatype.impl;
import io.jmix.core.metamodel.annotation.DatatypeDef;
import io.jmix.core.metamodel.annotation.DateTimeFormat;
import io.jmix.core.metamodel.datatype.FormatStrings;
import io.jmix.core.metamodel.datatype.TimeZoneAwareDatatype;
import javax.annotation.Nullable;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.time.temporal.TemporalQuery;
import java.util.Locale;
import java.util.TimeZone;
@DatatypeDef(id = "offsetDateTime", javaClass = OffsetDateTime.class, defaultForClass = true, value = "jmix_OffsetDateTimeDatatype")
@DateTimeFormat("yyyy-MM-dd HH:mm:ss.SSS Z")
public class OffsetDateTimeDatatype extends AbstractTemporalDatatype<OffsetDateTime>
implements TimeZoneAwareDatatype {
@Override
public String format(@Nullable Object value, Locale locale, @Nullable TimeZone timeZone) {
if (timeZone == null || value == null) {
return format(value, locale);
}
OffsetDateTime offsetDateTime = (OffsetDateTime) value;
LocalDateTime localDateTime = offsetDateTime.atZoneSameInstant(timeZone.toZoneId()).toLocalDateTime();
return format(localDateTime, locale);
}
@Override
protected DateTimeFormatter getDateTimeFormatter() {
return DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT).withZone(ZoneId.systemDefault());
}
@Override
protected DateTimeFormatter getDateTimeFormatter(FormatStrings formatStrings, Locale locale) {
return DateTimeFormatter.ofPattern(formatStrings.getDateTimeFormat(), locale).withZone(ZoneId.systemDefault());
}
@Override
protected TemporalQuery<OffsetDateTime> newInstance() {
return OffsetDateTime::from;
}
} | [
"krivopustov@haulmont.com"
] | krivopustov@haulmont.com |
0c879a4cfd9900ed7c974c8a72425f235869a16d | 9630c7c54e36bf6f1e5f6921f0890f9725f972b9 | /src/main/java/com/jxf/rc/service/RcCaDataService.java | 578802cfbea9bcabeee492a00a851bad23ef2ebe | [] | no_license | happyjianguo/wyjt | df1539f6227ff38b7b7990fb0c56d20105d9c0b1 | a5de0f17db2e5e7baf25ea72159e100c656920ea | refs/heads/master | 2022-11-18T01:16:29.783973 | 2020-07-14T10:32:42 | 2020-07-14T10:32:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,169 | java | package com.jxf.rc.service;
import java.util.ArrayList;
import java.util.Map;
import com.jxf.mem.entity.Member;
import com.jxf.rc.entity.RcCaData;
import com.jxf.svc.sys.crud.service.CrudService;
import com.jxf.web.model.wyjt.app.member.CaAuthResponseResult.UserBriefLegalize;
import com.jxf.web.model.wyjt.app.member.CreditReportResponseResult.CreditTable;
/**
* 信用报告数据表Service
* @author lmy
* @version 2018-12-17
*/
public interface RcCaDataService extends CrudService<RcCaData>{
/**
* 统计认证数量
* @param merber
* @return
*/
int getRenZhengNum(Member merber);
/**
* 获取根据的认证项信息(我的认证界面使用)
* @param data
* @return
*/
UserBriefLegalize getRenZhengData(RcCaData data,int type);
/**
* 根据手机号和认证类型获取信用档案
* @param
* @return
*/
RcCaData getByPhoneNoAndType(String phoneNo,RcCaData.Type type);
/**
* 详细档案数据源
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesShuJuYuan(Map<String,Object> userMap);
/**
* 详细档案风险排查
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesFengXian(Map<String, Object> userMap,Map<String, Object> mapYY,String mapXX, Member Buser );
/**
* 详细档案借贷信息
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesJieDai(Member Buser);
/**
* 详细档案逾期
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYuQi(Member Buser);
/**
* 详细档案芝麻分数
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesZhiMa(Map<String, Object> userMap);
/**
* 详细档案紧急联系人
* @param userMap
* @return 查看人的id, userId
* 被查看人的id serachId
* @throws WebDataException
*/
CreditTable getCreditarchivesJinJiV2(Map<String, Object> map3,Map<String, Object> map4,Member member, Member friend);
/**
* 详细档案手机号分析
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesMobileNum(Map<String, Object> userMap,Member Buser);
/**
* 详细档案消费能力
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYover(Map<String, Object> userMap);
/**
* 详细档案淘宝消费
* @param userMap
* @return
* @throws WebDataException
*/
public CreditTable getCreditarchivesTBover(Map<String, Object> userMap);
/**
* 详细档案淘宝绑定支付宝
* @param userMap
* @return
* @throws WebDataException
*/
public CreditTable getCreditarchivesTBPayover(Map<String, Object> userMap);
/**
* 详细档案居住地址
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesaddress(Map<String, Object> userMap,Member Buser);
/**
* 详细档案社保
* @param userMap
* type 来源 0:详细档案 1不详细档案
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesSheBao(Map<String, Object> userMap,Member Buser,int type);
/**
* 详细档案公积金
* @param userMap
* type 来源 0:详细档案 1不详细档案
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesGongJing(Map<String, Object> userMap,Member Buser,int type);
/**
* 详细档案学信网
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesXX(String userMap);
/**
* 详细档案网银
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesWYJieJi(Map<String, Object> userMap,Member loadById);
/**
* 详细档案网银信用卡
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesWYXinYong(Map<String, Object> userMap,Member loadById);
/**
* 获得新运营商的综合评分
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgZHF(Map<String, Object> userMap);
/**
* 获得新运营商的联系人风险
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgLxFx(Map<String, Object> userMap);
/**
* 获得新运营商的催收风险
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgCsFx(Map<String, Object> userMap);
/**
* 获得新运营商的风险联系人
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgFXlr(Map<String, Object> userMap);
/**
* 获得新运营商的金融风险
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgJrLr(Map<String, Object> userMap);
/**
* 获得新运营商的通话统计
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgThTj(Map<String, Object> userMap);
/**
* 获得新运营商运营商消费情况
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgHFXF(Map<String, Object> userMap,Map<String, Object> userMapold);
/**
* 获得新运营商运营静默时间
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgJMTJ(Map<String, Object> userMap);
/**
* 获得新运营商运各个时间段
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgSJTJ(Map<String, Object> userMap);
/**
* 获得新运营商通话详情2.0
* @param userMap
* @return
* @throws WebDataException
*/
CreditTable getCreditarchivesYYBgTHXQ(Map<String, Object> userMap,Member Buser);
/**
* 获得接待数据分析数据
* @param userId
* @param type // 0:全部;1:一周;2:一个月;3:6个月;4:6个月前;
* @return
* @throws WebDataException
*/
ArrayList<String> getloaninforCreditRecord(Member user,int type);
/**
* 获得逾期记录数据
* @param userId
* @param type // 0:全部;1:一周;2:一个月;3:6个月;4:6个月前;
* @return
* @throws WebDataException
*/
ArrayList<String> getoverloaninforCreditRecord(Member user,int type);
/**
* 紧急联系人
* @param userId
* @param nameF
* @param moblieF
* @param nameM
* @param moblieM
* @param nameL
* @param moblieL
* @return
*/
void createEmergencyContact(Member member, String nameF, String moblieF, String nameM, String moblieM,String nameL,String moblieL);
public String getZmToken(String name, String phoneNo, String idNo,String sequenceNo);
/**
* 获取天机h5 地址
* @param member
* @param type
* @return
*/
String getTJAddr(Member member, int type);
/**
* 获取公信宝token
* @param member
* @param type
* @return
*/
String getGxbToken(Member member, int type);
}
| [
"gbojob@126.com"
] | gbojob@126.com |
f75c88a4e6b7bbb69367cc4e81de46ae0349f822 | 5166d6cbc6455b4eb8c31d00e6a86524ac50636a | /disruptor/src/main/java/com/disruptor/test/LongEventFactory.java | a8eaaa07310a2170efa0e8a723a3122003011e0b | [] | no_license | 786991884/study-test | 2697e973ccb59dc10ab78936c8b85ae471007a2a | a49b581af44944199a30434348ddd0369ccc159d | refs/heads/master | 2022-12-25T09:39:00.006713 | 2017-05-03T06:10:02 | 2017-05-03T06:10:02 | 75,362,184 | 3 | 2 | null | 2022-12-16T06:11:40 | 2016-12-02T04:58:38 | Java | UTF-8 | Java | false | false | 393 | java | package com.disruptor.test;
import com.lmax.disruptor.EventFactory;
/**
* 为了允许Disruptor为我们预分配这些事件,我们需要一个将执行构建的事件工厂
*
* @author Lenovo
* @date 2016-10-19
* @modify
* @copyright
*/
public class LongEventFactory implements EventFactory<LongEvent> {
public LongEvent newInstance() {
return new LongEvent();
}
} | [
"786991884@qq.com"
] | 786991884@qq.com |
fe87d7f2e6d3585ee8bc25d934b1040c6ab37253 | 8933c7f19c7c46b9a03fc5f3d8c1bf85ce775413 | /ejbca_ce_6_3_1_1/src/java/org/ejbca/core/ejb/ProfilingStats.java | 9e8140f132a818772f95ee5cba0ab76763fe9897 | [] | no_license | erikfournier/ejbca-pki | 61a006c1c3bc59df68b1f80c1dc2d6dbcd4a228c | 9974d77f6ec39bc9e60eaa3d8a3bbe08d723a06a | refs/heads/master | 2021-12-25T01:48:15.229843 | 2017-12-23T01:29:04 | 2017-12-23T01:29:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,226 | java | /*************************************************************************
* *
* EJBCA Community: The OpenSource Certificate Authority *
* *
* This software is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or any later version. *
* *
* See terms of license at gnu.org. *
* *
*************************************************************************/
package org.ejbca.core.ejb;
import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* @see org.ejbca.core.ejb.ProfileAndTraceInterceptor
*
* Limitations:
* - Maximum allowed sum of duration is 292471 years.. :)
* - Retrieval of stats is not a perfect point in time snapshot
*
* @version $Id: ProfilingStats.java 19901 2014-09-30 14:29:38Z anatom $
*/
public enum ProfilingStats {
INSTANCE;
private final ConcurrentHashMap<String,Entry<Long,Long>> sums = new ConcurrentHashMap<String,Entry<Long,Long>>();
/*package*/ void add(final String key, final long invocationDuration) {
Entry<Long, Long> expectedValue = null;
Entry<Long,Long> currentEntry = null;
// Since there are likely many parallel invocations to different methods but rarely to the same
// we use a ConcurrentHashMap to allow concurrent modifications.
// The drawback is that we another thread might have updated the map while we were doing preparations
// and in this case we have to retry.
do {
currentEntry = sums.get(key);
final Entry<Long,Long> newEntry;
if (currentEntry == null) {
// Populate with a first entry for this key. We expect that the old value should be null
newEntry = new SimpleImmutableEntry<Long,Long>(Long.valueOf(invocationDuration), Long.valueOf(1L));
expectedValue = sums.putIfAbsent(key, newEntry);
} else {
newEntry = new SimpleImmutableEntry<Long,Long>(Long.valueOf(currentEntry.getKey().longValue()+invocationDuration),
Long.valueOf(currentEntry.getValue().longValue()+1L));
expectedValue = sums.replace(key, newEntry);
}
} while (expectedValue!=null && !expectedValue.equals(currentEntry));
}
/**
* Get a shallow copy of the current invocation statistics as a Maps with full method names as keys.
* The key of the Entry is the sum of durations (µs) and the value is the number of invocations.
* Since the copy operation is non-locking, this will not be a perfect point in time snapshot.
*/
private Map<String,Entry<Long,Long>> getBestEffortShallowCopyOfStats() {
return new HashMap<String,Entry<Long,Long>>(sums);
}
/**
* Get a shallow copy of the current invocation statistics as a list if caller friendly objects.
* Since the copy operation is non-locking, this will not be a perfect point in time snapshot.
*/
public List<ProfilingStat> getEjbInvocationStats() {
final Map<String,Entry<Long,Long>> sums = getBestEffortShallowCopyOfStats();
final Set<String> keys = sums.keySet();
final List<ProfilingStat> ret = new ArrayList<ProfilingStat>(keys.size());
for (final String key : keys) {
final Entry<Long, Long> durationAndInvocations = sums.get(key);
final ProfilingStat profilingStat = new ProfilingStat(key, durationAndInvocations.getKey(), durationAndInvocations.getValue());
ret.add(profilingStat);
}
return ret;
}
}
| [
"arunkumarpatange@arunkumars-MacBook-Pro.local"
] | arunkumarpatange@arunkumars-MacBook-Pro.local |
06a4c93f536e67939ac1986312db9e8429b77901 | 28c122a31ac24ad4bd2dc25faa44a36722050b54 | /jts/java/src/com/vividsolutions/jtstest/testbuilder/InfoPanel.java | b256093f804d90fb73f7a10812d509fc3e09235e | [] | no_license | oschrenk/jts | d2c50831cb4d46d96202bdb0142cae74815018fc | 0ba3b949be2a79239f5872555546e9322e501e38 | refs/heads/master | 2016-09-05T09:10:31.331179 | 2011-02-18T03:40:19 | 2011-02-18T03:40:19 | 1,387,011 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,571 | java | /*
* The JTS Topology Suite is a collection of Java classes that
* implement the fundamental operations required to validate a given
* geo-spatial data set to a known topological specification.
*
* Copyright (C) 2001 Vivid Solutions
*
* 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
*
* For more information, contact:
*
* Vivid Solutions
* Suite #1A
* 2328 Government Street
* Victoria BC V8T 5G5
* Canada
*
* (250)385-6040
* www.vividsolutions.com
*/
package com.vividsolutions.jtstest.testbuilder;
import com.vividsolutions.jtstest.testbuilder.model.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.Polygon;
import com.vividsolutions.jtstest.testbuilder.geom.*;
/**
* @version 1.7
*/
public class InfoPanel
extends JPanel
{
TestBuilderModel tbModel = null;
JScrollPane jScrollPane1 = new JScrollPane();
JTextArea txtInfo = new JTextArea();
BorderLayout tabPanelLayout = new BorderLayout();
public InfoPanel() {
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
void jbInit() throws Exception {
this.setLayout(tabPanelLayout);
txtInfo.setWrapStyleWord(true);
txtInfo.setLineWrap(true);
txtInfo.setBackground(SystemColor.control);
this.add(jScrollPane1, BorderLayout.CENTER);
jScrollPane1.setBorder(BorderFactory.createLoweredBevelBorder());
jScrollPane1.getViewport().add(txtInfo, null);
}
public void setModel(TestBuilderModel tbModel)
{
this.tbModel = tbModel;
}
public void setInfo(String s)
{
txtInfo.setText(s);
}
}
| [
"dr_jts@3b1963ad-ff86-43ac-bf88-fa91f6ade54d"
] | dr_jts@3b1963ad-ff86-43ac-bf88-fa91f6ade54d |
05752f303610b2b7e2293bbc250fc1a5e7f44285 | 6de5c6743c1b4f9be6bf28986b5872f370a71b88 | /src/main/java/com/enums/UrlImgPersonagem.java | 3f709f9bcba06e15ced82e1fa03010bec719eb4d | [] | no_license | KleitonRufino/projeto-gamificacao-scrumgame | 8be94a87a60c356bc1e0dfdbb1cf7a7e2169cc0a | 8991a1952daf6969012f9ce4b38c6ed174930503 | refs/heads/master | 2016-08-12T19:17:00.496381 | 2016-02-01T04:05:55 | 2016-02-01T04:05:55 | 47,306,686 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 734 | java | package com.enums;
public enum UrlImgPersonagem {
PERSON1("Person 1", "capitaoamerica.png"), PERSON2("Person 2", "homemdeferro.png"), PERSON3("Person 3",
"batman.png");
UrlImgPersonagem(String nome, String url) {
this.nome = nome;
this.url = url;
}
private String url;
private String nome;
public String getNome() {
return this.nome;
}
public String getUrl() {
return this.url;
}
public static UrlImgPersonagem identificarUrlPersonagem(String nome) {
if (nome.equals(UrlImgPersonagem.PERSON1.nome))
return UrlImgPersonagem.PERSON1;
else if (nome.equals(UrlImgPersonagem.PERSON2.nome))
return UrlImgPersonagem.PERSON2;
else
return UrlImgPersonagem.PERSON3;
}
}
| [
"="
] | = |
030f74c485fe36a90f2ac460590172e7d38f4fcb | cf683df95e13842f9a10ce1b49baee2d6bc76450 | /NHBCommonPredicate/src/main/java/com/nhb/common/predicate/numeric/Between.java | 1c361cbeb2aaddf9c387456f8fcc692ff4795a81 | [] | no_license | bachden/nhb-common | 8b5a8d322a72be62af140b4021ce53a904b351c2 | 9a4a00c7695afbd6be708c47fb8ea33b83940878 | refs/heads/master | 2022-07-13T04:51:57.924580 | 2020-07-06T10:17:06 | 2020-07-06T10:17:06 | 71,860,965 | 5 | 4 | null | 2022-06-21T00:22:54 | 2016-10-25T04:57:19 | Java | UTF-8 | Java | false | false | 727 | java | package com.nhb.common.predicate.numeric;
import com.nhb.common.predicate.value.NumberValue;
public class Between extends TwoWayNumbericComparisionPredicate {
private static final long serialVersionUID = -4975458195604574385L;
public Between(NumberValue value, NumberValue lowerBound, NumberValue upperBound) {
super(value, lowerBound, upperBound);
}
@Override
public Boolean get() {
return getComparator().compare(this.getValue().get(), this.getLowerBound().get()) > 0
&& getComparator().compare(this.getValue().get(), this.getUpperBound().get()) < 0;
}
@Override
public String toString() {
return this.getValue() + " between " + this.getLowerBound().toString() + " and " + this.getUpperBound();
}
}
| [
"hoangbach.bk@gmail.com"
] | hoangbach.bk@gmail.com |
63d6240f8f17e94aedb54a570d55008c5d4655c4 | c686b5093f64f4131a90d98b66bd57cfb5089bf5 | /javabasic/src/main/java/javabasic/reflection/ReflectionTest.java | 089c9dc32556ad5885c2a05f576633c0a145caf5 | [] | no_license | wenchaomeng/java_test | 4540c00c868ec89088ddb91e070294b4630ceb19 | c93a227e63f46e89f3b0d5ebc7f9e406ca30cc95 | refs/heads/master | 2020-03-26T21:48:38.022192 | 2018-11-30T02:29:43 | 2018-11-30T02:29:43 | 115,491,576 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,887 | java | package javabasic.reflection;
import javabasic.AbstractTest;
import javabasic.idgenerator.CreateIDCardNo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.concurrent.TimeUnit;
/**
* @author wenchao.meng
* <p>
* Apr 13, 2018
*/
public class ReflectionTest extends AbstractTest {
private static int stackTraceLevel = 8;
private static Class clazz;
public static void main(String[] argc) throws InvocationTargetException, ClassNotFoundException, InstantiationException, IllegalAccessException, IOException {
ReflectionTest reflectionTest = new ReflectionTest();
reflectionTest.beforeAbstractTest();
System.out.println("Read any key to continue");
reflectionTest.startRandom();
System.in.read();
reflectionTest.testReflection();
}
private void startRandom() {
scheduled.scheduleAtFixedRate(new Task(), 0, 5, TimeUnit.SECONDS);
}
// @Test
public void testReflection() throws IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException {
Constructor<?> constructor = Person.class.getConstructors()[0];
for (int i = 0; i < 20; i++) {
Person person = (Person) constructor.newInstance("wyn", i);
logger.info("{}", person);
sleep(1000);
}
// logger.info("{}", Class.forName("sun.reflect.GeneratedConstructorAccessor9"));
sleep(1000000);
}
public class Task implements Runnable {
private int age = 1;
private Logger logger = LoggerFactory.getLogger(getClass());
@Override
public void run() {
logger.info("{}, {}", getClass(), getClass().getCanonicalName());
logger.info("[run]{}", new Person("hello", age++, false).getName());
complex();
try (Socket s = new Socket("127.0.0.1", 8080)){
} catch (UnknownHostException e) {
} catch (IOException e) {
logger.info("exception" + e.getMessage());
}
}
}
private void complex() {
new CreateIDCardNo().getRandomID();
}
public static class Person implements Serializable {
private String name;
private int age;
private static Logger logger = LoggerFactory.getLogger(Person.class);
public Person(String name, int age) {
this(name, age, true);
}
public Person(String name, int age, boolean printStack) {
this.name = name;
this.age = age;
if (!printStack) {
return;
}
logger.info("");
int i = 0;
for (StackTraceElement stackTraceElement : Thread.currentThread().getStackTrace()) {
logger.info("{}, {}, {}", age, stackTraceElement.getClassName(), stackTraceElement.getMethodName());
i++;
if (stackTraceElement.getClass().getSimpleName().equals("GeneratedConstructorAccessor9")) {
clazz = stackTraceElement.getClass();
}
if (i >= stackTraceLevel) {
break;
}
}
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return String.format("%s, %d", name, age);
}
}
}
| [
"oytmfc@gmail.com"
] | oytmfc@gmail.com |
f36d66e132804fdbd0740c9f1e96033007d09247 | 83e1289292d08a767556bd03e271b870241c0512 | /test/oracle/constraints/Example02.java | fbc1d4c2179f41ccde40939a94ce4bd1e1d03fb8 | [] | no_license | s3ymd/oracle_jdbc | ff7e13e593e33701e7b977f7983854cd680b2723 | bdd96a7441c8797444008a8bcc20b4935a023f5d | refs/heads/master | 2021-01-10T20:57:21.548734 | 2015-07-31T07:05:27 | 2015-07-31T07:05:27 | 39,991,670 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | package oracle.constraints;
import static org.junit.Assert.fail;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import oracle.DatabaseExample;
// NOT NULL制約
public class Example02 extends DatabaseExample {
@Before
public void setUp() {
sql("CREATE TABLE items (\n"
+ " id\tINT, \n"
+ " name\tVARCHAR2(100) NOT NULL\n"
+ ")");
}
@Test
public void test() {
sql("INSERT INTO items VALUES (1, 'apple')");
try {
sql("INSERT INTO items VALUES (2, NULL)");
fail();
} catch (Exception e) {}
}
@After
public void tearDown() {
sql("DROP TABLE items");
}
}
| [
"test"
] | test |
4aa172b5843b585d523b91f2130a8559527876d6 | b8eefe8afe321a7144d32076403c4b02223f0f08 | /account/rest/src/main/java/in/clouthink/daas/sbb/account/rest/dto/ChangeMyPasswordRequest.java | e2a940cd38e2e24032cedf1b84c1cfa5755a1a54 | [
"Apache-2.0"
] | permissive | melthaw/spring-backend-boilerplate | b20906ca6beec753fb3e741098533a970753e661 | fff32bbc4cd895a5ae77d86ac78dffafe9894773 | refs/heads/master | 2022-01-13T18:32:05.606148 | 2022-01-11T09:20:04 | 2022-01-11T09:20:04 | 98,194,011 | 181 | 36 | Apache-2.0 | 2022-01-11T09:20:06 | 2017-07-24T13:31:40 | Java | UTF-8 | Java | false | false | 642 | java | package in.clouthink.daas.sbb.account.rest.dto;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
/**
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel("修改当前用户密码")
public class ChangeMyPasswordRequest {
private String oldPassword;
private String newPassword;
public String getOldPassword() {
return oldPassword;
}
public void setOldPassword(String oldPassword) {
this.oldPassword = oldPassword;
}
public String getNewPassword() {
return newPassword;
}
public void setNewPassword(String newPassword) {
this.newPassword = newPassword;
}
}
| [
"melthaw@gmail.com"
] | melthaw@gmail.com |
827a9c57e336332e7d31ae8b203c0c38ce0e20aa | 2ad3c30b2c36a3a4d7b7eb2d8e371f83049a6a8a | /javabt/javabt/Basic1/src/chuoivamang/mang3.java | c2a5b8827fd9f369cdf3f8efb2ff9d0f442aed9e | [] | no_license | khoale22/LearnFullJava | 85774d94df57afd2a4ee957410bf6222d1112f78 | f6010e451a95f8c5e4f8c5cbc9ffd4a5a2c901a3 | refs/heads/master | 2022-12-21T20:27:02.215968 | 2020-07-07T14:09:04 | 2020-07-07T14:09:04 | 248,209,077 | 0 | 0 | null | 2022-12-16T03:16:17 | 2020-03-18T11:08:39 | Rich Text Format | UTF-8 | Java | false | false | 1,231 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package chuoivamang;
import java.util.Scanner;
/**
*
* @author Khoale123
*/
public class mang3 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n;
do {
System.out.print("Nhap vao so nguyen n");
n = scanner.nextInt();
} while (n <= 0);
int a[] = new int[n];
int ch[] = new int[n];
int le[] = new int[n];
for (int i = 0; i < n ; i++) {
System.out.println("Nhap vao a[ " + i + " ");
a[i] = scanner.nextInt();
}
int c = 0;
int d = 0;
for (int i = 0; i < n ; i++) {
if(a[i]%2==0){
ch[c] = a[i];
c++;
}else{
le[c] = a[i];
d++;
}
}
System.out.println( "cac phan tu chan");
for (int i = 0; i < c ; i++) {
System.out.print(ch[i] + " ");
}
}
}
| [
"tran.than@heb.com"
] | tran.than@heb.com |
3e967851a3049ea8d452be2b84bb339398939757 | 75950d61f2e7517f3fe4c32f0109b203d41466bf | /modules/tags/fabric3-modules-parent-pom-1.2/kernel/impl/fabric3-introspection-java/src/main/java/org/fabric3/introspection/java/annotation/DestroyProcessor.java | 2132308548759ac76c1ccd554de32d8c2eb1b8f8 | [] | no_license | codehaus/fabric3 | 3677d558dca066fb58845db5b0ad73d951acf880 | 491ff9ddaff6cb47cbb4452e4ddbf715314cd340 | refs/heads/master | 2023-07-20T00:34:33.992727 | 2012-10-31T16:32:19 | 2012-10-31T16:32:19 | 36,338,853 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,740 | java | /*
* Fabric3
* Copyright (c) 2009 Metaform Systems
*
* Fabric3 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, with the
* following exception:
*
* Linking this software statically or dynamically with other
* modules is making a combined work based on this software.
* Thus, the terms and conditions of the GNU General Public
* License cover the whole combination.
*
* As a special exception, the copyright holders of this software
* give you permission to link this software with independent
* modules to produce an executable, regardless of the license
* terms of these independent modules, and to copy and distribute
* the resulting executable under terms of your choice, provided
* that you also meet, for each linked independent module, the
* terms and conditions of the license of that module. An
* independent module is a module which is not derived from or
* based on this software. If you modify this software, you may
* extend this exception to your version of the software, but
* you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version.
*
* Fabric3 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 Fabric3.
* If not, see <http://www.gnu.org/licenses/>.
*
* ----------------------------------------------------
*
* Portions originally based on Apache Tuscany 2007
* licensed under the Apache 2.0 license.
*
*/
package org.fabric3.introspection.java.annotation;
import java.lang.reflect.Method;
import org.osoa.sca.annotations.Destroy;
import org.fabric3.model.type.component.Implementation;
import org.fabric3.model.type.java.InjectingComponentType;
import org.fabric3.model.type.java.Signature;
import org.fabric3.spi.introspection.IntrospectionContext;
import org.fabric3.spi.introspection.java.annotation.AbstractAnnotationProcessor;
/**
* @version $Rev$ $Date$
*/
public class DestroyProcessor<I extends Implementation<? extends InjectingComponentType>> extends AbstractAnnotationProcessor<Destroy, I> {
public DestroyProcessor() {
super(Destroy.class);
}
public void visitMethod(Destroy annotation, Method method, I implementation, IntrospectionContext context) {
implementation.getComponentType().setDestroyMethod(new Signature(method));
}
} | [
"jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf"
] | jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf |
682ec1331ea82d3de3575c5451f8d9c223edce89 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_44645.java | f498923801253e7e242415810f4eb8dff8b03d77 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 168 | java | public static CurrencyPair adaptSymbol(String symbol){
String[] currencies=symbol.toUpperCase().split("_");
return new CurrencyPair(currencies[0],currencies[1]);
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
be892c016f514b6dd9ddf0e67e99bfb2bad6d57a | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/XWIKI-13544-10-14-Single_Objective_GGA-WeightedSum/org/xwiki/display/internal/ConfiguredDocumentDisplayer_ESTest_scaffolding.java | 95a2ba58a867672cd41bd0da29112e178e40e25f | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 458 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Jan 18 02:02:12 UTC 2020
*/
package org.xwiki.display.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class ConfiguredDocumentDisplayer_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
1e1df30649cff03b5ca671e1f3db196bd5f32ccd | 4e1c4ff181c3673e7c1abc230a01e0b38b8c2ad4 | /common/src/java/org/jppf/classloader/DelegationModel.java | a8e6b5ea7829de2e59504e0a35452bf8ea288202 | [
"Apache-2.0"
] | permissive | trinhpham/JPPF | b864cfb00cf97cdd9618a44993ff18ec15861a43 | bb8ae8a59edc6bdf28b83961874199746c3ff1d4 | refs/heads/master | 2020-03-24T16:48:59.623812 | 2018-07-30T06:19:33 | 2018-07-30T06:19:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 956 | java | /*
* JPPF.
* Copyright (C) 2005-2017 JPPF Team.
* http://www.jppf.org
*
* 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.jppf.classloader;
/**
* Enumeration of available delegation models for the JPPF class loaders.
* @author Laurent Cohen
*/
public enum DelegationModel
{
/**
* Standard delegation model to parent first.
*/
PARENT_FIRST,
/**
* Delegation model to local URL classpath first.
*/
URL_FIRST
}
| [
"lolocohen@e7e8ced0-bd8d-47ad-80f2-b228e06c1907"
] | lolocohen@e7e8ced0-bd8d-47ad-80f2-b228e06c1907 |
8873c1aef1c0101d08f49a02f697607939ae2f59 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/26/26_ead0594d81ef0391eaceb858d887cc42329ab5b6/AwtBitmap/26_ead0594d81ef0391eaceb858d887cc42329ab5b6_AwtBitmap_t.java | ea9fb12b8ffbae8c4ce0a92560230315df212859 | [] | 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,230 | java | package org.oscim.awt;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.nio.IntBuffer;
import javax.imageio.ImageIO;
import org.oscim.backend.canvas.Bitmap;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.utils.BufferUtils;
public class AwtBitmap implements Bitmap {
BufferedImage bitmap;
int width;
int height;
public AwtBitmap(int width, int height, int format) {
bitmap = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
this.width = width;
this.height = height;
if (!this.bitmap.isAlphaPremultiplied())
this.bitmap.coerceData(true);
}
AwtBitmap(InputStream inputStream) throws IOException {
this.bitmap = ImageIO.read(inputStream);
this.width = this.bitmap.getWidth();
this.height = this.bitmap.getHeight();
if (!this.bitmap.isAlphaPremultiplied())
this.bitmap.coerceData(true);
}
@Override
public int getWidth() {
return width;
}
@Override
public int getHeight() {
return height;
}
@Override
public int[] getPixels() {
return null;
}
@Override
public void eraseColor(int transparent) {
}
private static IntBuffer tmpBuffer = BufferUtils.newIntBuffer(512 * 256);
private static int[] tmpPixel = new int[512 * 256];
@Override
public int uploadToTexture(boolean replace) {
int[] pixels;
IntBuffer buffer;
if (width * height < 512 * 256) {
pixels = tmpPixel;
buffer = tmpBuffer;
buffer.clear();
} else {
pixels = new int[width * height];
buffer = BufferUtils.newIntBuffer(width * height);
}
bitmap.getRGB(0, 0, width, height, pixels, 0, width);
for (int i = 0, n = width * height; i < n; i++){
int c = pixels[i];
// flip blue with red - silly Java
pixels[i] = (c & 0xff00ff00) | (c & 0x00ff0000) >>> 16 | (c & 0x000000ff) << 16;
}
buffer.put(pixels, 0, width * height);
buffer.flip();
Gdx.gl20.glTexImage2D(GL20.GL_TEXTURE_2D, 0, GL20.GL_RGBA, width,
height, 0, GL20.GL_RGBA, GL20.GL_UNSIGNED_BYTE, buffer);
return 0;
}
@Override
public void recycle() {
// TODO Auto-generated method stub
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
64d3ba2cffaa482a76dceadd080d1c89cbb3526d | fdf0ae1822e66fe01b2ef791e04f7ca0b9a01303 | /src/main/java/ms/html/IHTMLEventObj4.java | 9e55918a562f86931148cd977bb4f2792d82ff44 | [] | no_license | wangguofeng1923/java-ie-webdriver | 7da41509aa858fcd046630f6833d50b7c6cde756 | d0f3cb8acf9be10220c4b85c526486aeb67b9b4f | refs/heads/master | 2021-12-04T18:19:08.251841 | 2013-02-10T16:26:54 | 2013-02-10T16:26:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 402 | java | package ms.html ;
import com4j.*;
@IID("{3050F814-98B5-11CF-BB82-00AA00BDCE0B}")
public interface IHTMLEventObj4 extends Com4jObject {
// Methods:
/**
* <p>
* Getter method for the COM property "wheelDelta"
* </p>
* @return Returns a value of type int
*/
@DISPID(1051) //= 0x41b. The runtime will prefer the VTID if present
@VTID(7)
int wheelDelta();
// Properties:
}
| [
"schneidh@gmail.com"
] | schneidh@gmail.com |
b7f7c4d07badac6e1cd92bd4f0d27edf37b0e15e | eb4a1bcaf22941f99eafa08422bf29a216fa8d0f | /src/main/java/plugins/haesleinhuepf/implementations/generated/CLIJ2_StandardDeviationOfAllPixelsBlock.java | a1d82cbd6509dea967ed026ef7201f616bb0c0c4 | [
"BSD-3-Clause"
] | permissive | clij/clicy | 77d071d2d57413ea180889e2b4489fe0d95bf20c | 5f423ee2c70b1567cfeec00f936a525ef678f377 | refs/heads/master | 2022-07-15T06:51:20.071221 | 2021-10-23T15:30:59 | 2021-10-23T15:30:59 | 202,433,879 | 2 | 4 | BSD-3-Clause | 2022-06-29T18:09:55 | 2019-08-14T22:19:40 | Java | UTF-8 | Java | false | false | 677 | java | package plugins.haesleinhuepf.implementations.generated;
import plugins.haesleinhuepf.AbstractCLIJ2Block;
import net.haesleinhuepf.clij2.plugins.StandardDeviationOfAllPixels;
// this is generated code. See src/test/java/net/haesleinhuepf/clicy/codegenerator for details
public class CLIJ2_StandardDeviationOfAllPixelsBlock extends AbstractCLIJ2Block {
/**
* Determines the standard deviation of all pixels in an image.
*
* The value will be stored in a new row of ImageJs
* Results table in the column 'Standard_deviation'.
*/
public CLIJ2_StandardDeviationOfAllPixelsBlock() {
super(new StandardDeviationOfAllPixels());
}
}
| [
"rhaase@mpi-cbg.de"
] | rhaase@mpi-cbg.de |
b9863a8d4ac34651cbeae438fd6bc4c66b7bc989 | 9e5fe16cfcf11fb7d0309531a87d7f1198bf5e3e | /nutz-integration-autoloadcache/src/main/java/org/nutz/integration/autoloadcache/DelCacheAopInterceptor.java | d1f51368cae9e71b2579895b857db47291b4117c | [
"Apache-2.0"
] | permissive | Mathbee/nutzmore | 46d07ea0ee3441aa062e398fe1faacd602c14ea2 | 668a83b9bf70370cd3987b3630bb7bd873e3993a | refs/heads/master | 2021-01-12T01:39:44.641658 | 2017-01-06T09:54:57 | 2017-01-06T09:54:57 | 78,414,221 | 2 | 0 | null | 2017-01-09T09:32:44 | 2017-01-09T09:32:43 | null | UTF-8 | Java | false | false | 1,328 | java | package org.nutz.integration.autoloadcache;
import java.lang.reflect.Method;
import org.nutz.aop.InterceptorChain;
import org.nutz.aop.MethodInterceptor;
import com.jarvis.cache.AbstractCacheManager;
import com.jarvis.cache.annotation.CacheDelete;
import com.jarvis.cache.aop.DeleteCacheAopProxyChain;
public class DelCacheAopInterceptor implements MethodInterceptor {
private AbstractCacheManager cacheManager;
private CacheDelete cache;
private boolean haveCache;
public DelCacheAopInterceptor(AbstractCacheManager cacheManager, CacheDelete cache, Method method) {
this.cacheManager = cacheManager;
this.cache = cache;
if (method.isAnnotationPresent(CacheDelete.class)) {
this.haveCache = true;
}
}
public void filter(final InterceptorChain chain) throws Throwable {
try {
if (haveCache) {
chain.doChain();
cacheManager.deleteCache(new DeleteCacheAopProxyChain() {
@Override
public Class<?> getTargetClass() {
return chain.getCallingMethod().getDeclaringClass();
}
@Override
public Method getMethod() {
return chain.getCallingMethod();
}
@Override
public Object[] getArgs() {
return chain.getArgs();
}
}, cache, chain.getReturn());
} else {
chain.doChain();
}
} catch (Throwable e) {
throw e;
}
}
}
| [
"koukou890@qq.com"
] | koukou890@qq.com |
4fc11e6827990802b40795f81322411c206b95c6 | aa6d13899986c242d0d7c0cd13cde63ebfa575c0 | /agent-bridge/src/main/java/com/newrelic/agent/bridge/TracedMethod.java | 92fdb35f5b7d4e43ddd3542ca197a534cbcdb359 | [
"Apache-2.0"
] | permissive | tkawachi/newrelic-java-agent | 0a45c9097d017a3bf8ce16ef4973329c5ef84e7d | a9e42780feadcd3c0b3f555d2bef4b0b13d95598 | refs/heads/main | 2022-12-20T03:29:12.441874 | 2020-10-09T15:08:00 | 2020-10-09T15:08:00 | 302,938,487 | 0 | 0 | Apache-2.0 | 2020-10-10T16:02:19 | 2020-10-10T16:02:19 | null | UTF-8 | Java | false | false | 4,834 | java | /*
*
* * Copyright 2020 New Relic Corporation. All rights reserved.
* * SPDX-License-Identifier: Apache-2.0
*
*/
package com.newrelic.agent.bridge;
import com.newrelic.api.agent.ExternalParameters;
import com.newrelic.api.agent.InboundHeaders;
import com.newrelic.api.agent.OutboundHeaders;
/**
* The internal bridge version of TracedMethod.
*/
public interface TracedMethod extends com.newrelic.api.agent.TracedMethod {
/**
* Returns the parent of this traced method, or null if this is the root tracer.
*
* @return the parent TracedMethod of the current traced method.
*/
TracedMethod getParentTracedMethod();
void setRollupMetricNames(String... metricNames);
/**
* Sets the traced method metric name, transaction segment name, and transaction segment URI.
*/
void setMetricNameFormatInfo(String metricName, String transactionSegmentName, String transactionSegmentUri);
/**
* Add a rollup metric name that reports the exclusive time for <b>both</b> total and exclusive times.
*
* The reason for this is that external and database charts on APM show stacked graphs based on total duration of
* our rollup metrics, when the intent seems to be to show stacked graphs of exclusive durations. Previous tracer
* implementations like AbstractExternalComponentTracer called ResponseTimeStats.recordResponseTime(
* getExclusiveDuration(), TimeUnit.NANOSECONDS), presumably to "enable" this "feature". So this method only exists
* in the bridge API to replicate the old behavior.
*
* More investigation is necessary. Use with care.
*
* @param metricNameParts The segments of the metric name. These values will be concatenated together separated by a
* `/` char.
*/
void addExclusiveRollupMetricName(String ... metricNameParts);
/**
* Names the current transaction using this traced method. This is called by code injected as a result of xml
* instrumentation. This probably shouldn't be invoked directly.
*
* @param namePriority The priority to be given to the naming call.
*/
void nameTransaction(TransactionNamePriority namePriority);
/**
* Returns true if this tracer produces a metric.
*
* @return
*/
boolean isMetricProducer();
/**
* Set the prefix for the metric name.
*/
void setCustomMetricPrefix(String prefix);
/**
* Tell the tracer to track child async jobs which are submitted under its method call.
* This only applies to the scala instrumentation at the moment.
*/
public void setTrackChildThreads(boolean shouldTrack);
public boolean trackChildThreads();
/**
* Do not use. Use
* {@link com.newrelic.api.agent.TracedMethod#addOutboundRequestHeaders(OutboundHeaders)} instead.
*
* To be called when performing an outbound external request using HTTP or JMS. This method must be called before
* any headers are written to the output stream. This method is generally used in conjunction with reportAsExternal.
*
* @param outboundHeaders The headers that will be written to the output stream for the external request. This also
* determines if the external call is HTTP or JMS.
* @since 3.26.0
*/
@Deprecated
void addOutboundRequestHeaders(OutboundHeaders outboundHeaders);
/**
* Do not use. There is no direct replacement. Use the public cross application tracing API if possible or use the
* bridge method {@link com.newrelic.agent.bridge.Transaction#provideHeaders(InboundHeaders)} if necessary.
*
* @param inboundResponseHeaders do not use.
* @since 3.26.0
*/
@Deprecated
void readInboundResponseHeaders(InboundHeaders inboundResponseHeaders);
/**
* @Deprecated Do not use. Use
* {@link com.newrelic.api.agent.TracedMethod#reportAsExternal(ExternalParameters)} instead.
*
* Used to report this traced method as an HTTP external call, datastore external call, or general external call.
* Use {@link com.newrelic.api.agent.ExternalParametersFactory} to create the input externalParameters. If you are performing an external
* HTTP call, be sure to call addOutboundRequestHeaders prior to the request being sent.
*
* @param externalParameters The appropriate input parameters depending on the type external. Use the
* {@link com.newrelic.api.agent.ExternalParametersFactory} to create input parameters. For example,
* {@link com.newrelic.api.agent.ExternalParametersFactory}'s createForDatastore to report this TracedMethod as a datastore.
* @since 3.26.0
*/
@Deprecated
void reportAsExternal(com.newrelic.agent.bridge.external.ExternalParameters externalParameters);
}
| [
"49817386+jeffalder@users.noreply.github.com"
] | 49817386+jeffalder@users.noreply.github.com |
5838acbea401255cb930b9b031066aec8b83f477 | ca334a214685e49fd15c6f2f75d04133cd5454d0 | /demo-eureka/src/main/java/com/etc/eureka/config/WebSecurityConfig.java | 5e3f23b879623d5eb8b893dda79cf20bb9a10d63 | [] | no_license | MichardChen/demo | 79a5dcd64a66cd06e547c7a94ce34d9cdffa2cb4 | e0431759f8b98e511c34b77b0db505e9af277a55 | refs/heads/master | 2022-12-21T20:08:42.104755 | 2019-12-11T00:56:12 | 2019-12-11T00:56:12 | 194,224,503 | 0 | 0 | null | 2022-12-10T05:39:42 | 2019-06-28T07:01:54 | Java | UTF-8 | Java | false | false | 1,076 | java | package com.etc.eureka.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
/**
* 开启认证了,但是没有禁用CSRF
*
* 新版本的spring-cloud2.0中: Spring Security默认开启了CSRF攻击防御
* CSRF会将微服务的注册也给过滤了,虽然不会影响注册中心,但是其他客户端是注册不了的
* 解决方案:
* 关闭csrf攻击
* @author ChenDang
* @date 2019/11/5 0005
*/
@Configuration
public class WebSecurityConfig{
@EnableWebSecurity
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().authenticated().and().httpBasic().and().csrf().disable();
}
}
}
| [
"765205059@qq.com"
] | 765205059@qq.com |
c4e2218c875002cfe8c880b68a3af10f1406bf48 | b9ee6f646cedd5a802357c76ab9296a14d4e4871 | /src/main/java/lk/rupavahini/PPUManagement/util/controller/MimeTypeFileHandelController.java | c10060a6b498b2d3d11414556183cd64d514d282 | [] | no_license | LalithK90/Rupawahini_PPUManagement | 5a5c449d27a745d9a6094b24d236df5f7c3af9ae | 45ec6a747cc78f2f4e432c55c0e8fd68ac2b97eb | refs/heads/master | 2021-05-17T16:51:22.983978 | 2020-12-27T03:39:14 | 2020-12-27T03:39:14 | 250,881,383 | 0 | 2 | null | 2021-03-26T08:43:10 | 2020-03-28T19:55:30 | HTML | UTF-8 | Java | false | false | 2,433 | java | package lk.rupavahini.PPUManagement.util.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import javax.servlet.ServletContext;
@Controller
public class MimeTypeFileHandelController {
private static Logger logger = LoggerFactory.getLogger(MimeTypeFileHandelController.class);
private final ServletContext context;
@Autowired
public MimeTypeFileHandelController(ServletContext context) {
this.context = context;
}
/*
@GetMapping(value = "/getFile/{id}", produces = MediaType.APPLICATION_PDF_VALUE)
public void fileDownload(@PathVariable("id") int id, HttpServletResponse response, HttpServletRequest request) {
String fullPath = request.getServletContext().getRealPath("/resources/report/" + id + ".pdf");
File file = new File(fullPath);
final int BUFFER_SIZE = 4096;
if (file.exists()) {
try {
FileInputStream inputStream = new FileInputStream(file);
String mimeType = context.getMimeType(fullPath);
response.setContentType(mimeType);
response.setHeader("content-disposition: inline;", "filename=" + id + ".pdf");
OutputStream outputStream = response.getOutputStream();
byte[] buffer = new byte[BUFFER_SIZE];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
outputStream.close();
inputStream.close();
response.setStatus(200);
//response.sendRedirect("/home");
file.delete();
} catch (Exception e) {
logger.error("file handler ++" + e.toString());
}
}
}
@GetMapping("/imageDisplay")
public void showImage(@RequestParam("id") int imageId,HttpServletRequest request, HttpServletResponse response)
throws IOException {
// Item item = itemService.get(itemId); --> contained class object
response.setContentType("image/jpeg, image/jpg, image/png, image/gif");
// response.getOutputStream().write(item.getItemImage()); need to get image where store it
response.getOutputStream().close();
}*/
}
| [
"asakahatapitiya@gmail.com"
] | asakahatapitiya@gmail.com |
6f9a899f5eee543fc894c1618a1ac99f7b9ffc6f | a0b3e77790630ac4de591c9105e2b1d4e3bd9c8f | /jrap-core/src/main/java/com/jingrui/jrap/function/dto/Function.java | 7b1220d9ba1213460d38d0bdb40347597a6107d8 | [] | no_license | IvanStephenYuan/JRAP_Lease | 799c0b1a88fecb0b7d4b9ab73f8da9b47ce19fdb | 4b4b08d4c23e9181718374eb77676095d3a298dc | refs/heads/master | 2022-12-23T07:54:57.213203 | 2019-06-11T07:43:48 | 2019-06-11T07:43:48 | 174,286,707 | 3 | 5 | null | 2022-12-16T09:43:59 | 2019-03-07T06:39:02 | JavaScript | UTF-8 | Java | false | false | 6,567 | java | package com.jingrui.jrap.function.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.jingrui.jrap.core.BaseConstants;
import com.jingrui.jrap.core.annotation.Children;
import com.jingrui.jrap.core.annotation.MultiLanguage;
import com.jingrui.jrap.core.annotation.MultiLanguageField;
import com.jingrui.jrap.mybatis.annotation.Condition;
import com.jingrui.jrap.mybatis.common.query.*;
import com.jingrui.jrap.mybatis.common.query.JoinColumn;
import com.jingrui.jrap.mybatis.common.query.JoinTable;
import com.jingrui.jrap.system.dto.BaseDTO;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import javax.persistence.criteria.JoinType;
import java.util.List;
/**
* 功能DTO.
*
* @author njq.niu@jingrui.com
*/
@MultiLanguage
@Table(name = "sys_function_b")
public class Function extends BaseDTO {
public static final String FIELD_FUNCTION_ID = "functionId";
public static final String FIELD_FUNCTION_CODE = "functionCode";
public static final String FIELD_FUNCTION_DESCRIPTION = "functionDescription";
public static final String FIELD_FUNCTION_ICON = "functionIcon";
public static final String FIELD_FUNCTION_SEQUENCE = "functionSequence";
public static final String FIELD_FUNCTION_NAME = "functionName";
public static final String FIELD_LANG = "lang";
public static final String FIELD_MODULE_CODE = "moduleCode";
public static final String FIELD_PARENT_FUNCTION_ID = "parentFunctionId";
public static final String FIELD_PARENT_FUNCTION_NAME = "parentFunctionName";
public static final String FIELD_RESOURCE_NAME = "resourceName";
public static final String FIELD_RESOURCE_ID = "resourceId";
public static final String FIELD_RESOURCES = "resources";
public static final String FIELD_TYPE = "type";
@Id
@Column
@Where
@GeneratedValue(generator = GENERATOR_TYPE)
private Long functionId;
@Column
@OrderBy("ASC")
@Where
@NotEmpty
@Length(max = 30)
private String functionCode;
@Column
@MultiLanguageField
@JsonInclude(JsonInclude.Include.NON_NULL)
@Length(max = 240)
private String functionDescription;
@Column
@Condition(exclude = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Length(max = 100)
private String functionIcon;
@Column
@Condition(exclude = true)
@OrderBy
private Long functionSequence;
@Column
@MultiLanguageField
@Where(comparison = Comparison.LIKE)
@Length(max = 150)
private String functionName;
@JsonInclude(JsonInclude.Include.NON_NULL)
@Transient
@Length(max = 10)
private String lang;
@Column
@JsonInclude(JsonInclude.Include.NON_NULL)
@Where
@Length(max = 30)
@OrderBy
private String moduleCode;
@Column
@JsonInclude(JsonInclude.Include.NON_NULL)
@Where
private Long parentFunctionId;
@Transient
@JoinCache(joinKey = FIELD_PARENT_FUNCTION_ID, joinColumn = FIELD_FUNCTION_NAME, cacheName = BaseConstants.CACHE_FUNCTION)
@Length(max = 150)
private String parentFunctionName;
@Transient
@JoinColumn(joinName = "resourceJoin", field = Resource.FIELD_NAME)
@Length(max = 40)
private String resourceName;
@Transient
private String resourceUrl;
@Column
@JsonInclude(JsonInclude.Include.NON_NULL)
@JoinTable(name = "resourceJoin", joinMultiLanguageTable = true, target = Resource.class, type = JoinType.LEFT, on = {@JoinOn(joinField = Resource.FIELD_RESOURCE_ID), @JoinOn(joinField = BaseDTO.FIELD_LANG, joinExpression = BaseConstants.PLACEHOLDER_LOCALE)})
@Where
private Long resourceId;
@Children
@Transient
private List<Resource> resources;
@Column
private String type = "PAGE";
public String getFunctionCode() {
return functionCode;
}
public String getFunctionDescription() {
return functionDescription;
}
public String getFunctionIcon() {
return functionIcon;
}
public Long getFunctionId() {
return functionId;
}
public String getFunctionName() {
return functionName;
}
public String getLang() {
return lang;
}
public String getModuleCode() {
return moduleCode;
}
public Long getParentFunctionId() {
return parentFunctionId;
}
public Long getResourceId() {
return resourceId;
}
public List<Resource> getResources() {
return resources;
}
public String getType() {
return type;
}
public void setFunctionCode(String functionCode) {
this.functionCode = StringUtils.trim(functionCode);
}
public void setFunctionDescription(String functionDescription) {
this.functionDescription = functionDescription;
}
public void setFunctionIcon(String functionIcon) {
this.functionIcon = functionIcon;
}
public void setFunctionId(Long functionId) {
this.functionId = functionId;
}
public void setFunctionName(String functionName) {
this.functionName = functionName;
}
public void setLang(String sourceLang) {
this.lang = sourceLang;
}
public void setModuleCode(String moduleCode) {
this.moduleCode = StringUtils.trim(moduleCode);
}
public void setParentFunctionId(Long parentFunctionId) {
this.parentFunctionId = parentFunctionId;
}
public void setResourceId(Long resourceId) {
this.resourceId = resourceId;
}
public void setResources(List<Resource> resources) {
this.resources = resources;
}
public void setType(String type) {
this.type = type;
}
public Long getFunctionSequence() {
return functionSequence;
}
public void setFunctionSequence(Long functionSequence) {
this.functionSequence = functionSequence;
}
public String getParentFunctionName() {
return parentFunctionName;
}
public void setParentFunctionName(String parentFunctionName) {
this.parentFunctionName = parentFunctionName;
}
public String getResourceName() {
return resourceName;
}
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
public String getResourceUrl() {
return resourceUrl;
}
public void setResourceUrl(String resourceUrl) {
this.resourceUrl = resourceUrl;
}
} | [
"Ivan.Stphen.Y@gmail.com"
] | Ivan.Stphen.Y@gmail.com |
3f745cbe99f6b04b4a9caedd74df010df39f6fd0 | 3c6f4bb030a42d19ce8c25a931138641fb6fd495 | /finance-qdz/finance-qdz-api/src/main/java/com/hongkun/finance/qdz/facade/QdzConsoleFacade.java | 361a8e478de6d3bcde5eb03cd888ecea917f381d | [] | no_license | happyjianguo/finance-hkjf | 93195df26ebb81a8b951a191e25ab6267b73aaca | 0389a6eac966ee2e4887b6db4f99183242ba2d4e | refs/heads/master | 2020-07-28T13:42:40.924633 | 2019-08-03T00:22:19 | 2019-08-03T00:22:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,184 | java | package com.hongkun.finance.qdz.facade;
import com.hongkun.finance.qdz.vo.QdzInterestInfoVo;
import com.hongkun.finance.qdz.vo.QdzTransferRecordVo;
import com.yirun.framework.core.model.ResponseEntity;
import com.yirun.framework.core.utils.pager.Pager;
import java.util.Date;
public interface QdzConsoleFacade {
/**
* @Description : 钱袋子利息对账查询
* @Method_Name : qdzInterestBalance;
* @param startTime开始时间
* @param endTime结束时间
* @param pager
* @return
* @return : ResponseEntity<?>;
* @Creation Date : 2017年7月18日 下午4:31:53;
* @Author : yanbinghuang@hongkun.com.cn 黄艳兵;
*/
ResponseEntity<?> qdzInterestBalance(Date startTime, Date endTime, Pager pager);
/**
* @Description : 根据日期和用户类型查询某一天的利息明细
* @Method_Name : qdzInterestDetail;
* @param userFlag:0-平台;1-第三方账户
* @param day:格式yyyy-MM-dd
* @param pager
* @return
* @return : ResponseEntity<?>;
* @Creation Date : 2017年7月19日 上午11:02:01;
* @Author : yanbinghuang@hongkun.com.cn 黄艳兵;
*/
ResponseEntity<?> qdzInterestDetail(Integer userFlag, Date day, Pager pager);
/**
* @Description : 当前债权查询处理
* @Method_Name : findCurrentCreditor;
* @return
* @return : ResponseEntity<?>;
* @Creation Date : 2017年7月19日 下午1:59:27;
* @Author : yanbinghuang@hongkun.com.cn 黄艳兵;
*/
ResponseEntity<?> findCurrentCreditor();
/**
* @Description : 根据标的名称,查询当前对账债权信息
* @Method_Name : searchCreditorBalanceInfo;
* @param bidName
* 标的名称
* @return
* @return : ResponseEntity<?>;
* @Creation Date : 2017年7月19日 下午5:06:01;
* @Author : yanbinghuang@hongkun.com.cn 黄艳兵;
*/
ResponseEntity<?> findCreditorBalanceInfo(String bidName,Pager pager);
/**
* @Description :查询钱袋子账单流水
* @Method_Name : findQdzBillWater;
* @param qdzTransferRecordVo
* @return
* @return : ResponseEntity<?>;
* @Creation Date : 2017年7月20日 上午9:31:28;
* @Author : yanbinghuang@hongkun.com.cn 黄艳兵;
*/
ResponseEntity<?> findQdzBillWater(QdzTransferRecordVo qdzTransferRecordVo, Pager pager);
/**
* @Description : 查询活期产品信息
* @Method_Name : findHqProductInfo;
* @param bidName
* 标的名称
* @return
* @return : ResponseEntity<?>;
* @Creation Date : 2017年7月20日 上午11:33:25;
* @Author : yanbinghuang@hongkun.com.cn 黄艳兵;
*/
ResponseEntity<?> findHqProductInfo(String bidName, Pager pager);
/**
*
* @Description : 债券通知
* @Method_Name : creditorNotice
* @return
* @return : ResponseEntity<?>
* @Creation Date : 2017年7月20日 下午1:50:32
* @Author : caoxinbang@hongkun.com.cn 曹新帮
*/
ResponseEntity<?> creditorNotice();
/**
* @Description : 每日生成利息记录查询
* @Method_Name : findQdzInterestInfo
* @Date : 2017/9/25 17:19
* @Author : ruilima@hongkun.com.cn 马瑞丽
* @param qdzInterestInfoVo
* @param pager
* @return
*/
ResponseEntity<?> findQdzInterestInfo(QdzInterestInfoVo qdzInterestInfoVo, Pager pager);
}
| [
"zc.ding@foxmail.com"
] | zc.ding@foxmail.com |
c3e9f7983f3338b005ac803d1324cdb9c4f022c8 | 4901cda2ff40bea3a4dbe9c9a32ea7b43e5d5393 | /java01/src/step04/Exam044_0.java | 3861faa335d0640c005e7187852f945ab192a221 | [] | no_license | Liamkimjihwan/java01 | 287adc817ba7c7c4e711c392cb78e965d967742c | 3e0c75e63b81acbb94c9e91a63251a252c18af77 | refs/heads/master | 2021-06-07T16:22:28.061338 | 2016-11-04T11:38:44 | 2016-11-04T11:38:44 | 72,842,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 201 | java |
package step04;
public class Exam044_0 {
public static void main(String[] args) {
int a = 10;
a = a + 5;
System.out.println(a);
int b = 10;
b += 5;
System.out.println(b);
}
}
/*
*/
| [
"wwwwwwlghskdlekd@naver.com"
] | wwwwwwlghskdlekd@naver.com |
5692d003cc6495814a00a43ebde054d14ad1a9fb | 15f0514701a78e12750f68ba09d68095172493ee | /Java/58.java | 62631d2870b7d5b38a4cb0d138b59dfa9a5a0ef1 | [
"MIT"
] | permissive | strengthen/LeetCode | 5e38c8c9d3e8f27109b9124ae17ef8a4139a1518 | 3ffa6dcbeb787a6128641402081a4ff70093bb61 | refs/heads/master | 2022-12-04T21:35:17.872212 | 2022-11-30T06:23:24 | 2022-11-30T06:23:24 | 155,958,163 | 936 | 365 | MIT | 2021-11-15T04:02:45 | 2018-11-03T06:47:38 | null | UTF-8 | Java | false | false | 2,265 | java | __________________________________________________________________________________________________
sample 0 ms submission
class Solution {
public int lengthOfLastWord(String s) {
s = s.trim();
char[] c = s.toCharArray();
int cursor = c.length-1;
int length = 0;
while (cursor > -1) {
if (c[cursor] == ' ') return length;
length++;
cursor--;
}
return length;
}
}
__________________________________________________________________________________________________
sample 34224 kb submission
class Solution {
public int lengthOfLastWord(String s) {
int lw_index;
if (s.indexOf(' ') != -1) {
//When there are multiple words
lw_index = s.lastIndexOf(' ') + 1;
} else if (s.length() > 0) {
//When there is just one word
lw_index = 0;
} else {
//When it is blank
return 0;
}
String last_word = s.substring(lw_index);
if (last_word.length() < 1 && s.length() < 1) {
//When the string is blank
return 0;
} else if (last_word.length() < 1 && s.length() > 1) {
//When there are words, but with pure spaces at the end
System.out.println(lw_index);
lw_index = s.lastIndexOf(' ', lw_index - 1);
System.out.println(lw_index);
while (s.lastIndexOf(' ', lw_index - 1) == lw_index - 1) {
lw_index = s.lastIndexOf(' ', lw_index - 1);
System.out.println(lw_index);
}
int lw_end = lw_index;
lw_index = s.lastIndexOf(' ', lw_index - 1) + 1;
System.out.println(lw_index);
if (lw_index == -1) lw_index = 0;
if (lw_end == -1) return 0;
last_word = s.substring(lw_index, lw_end);
System.out.println(last_word);
}
System.out.println(last_word);
return last_word.length();
}
}
__________________________________________________________________________________________________
| [
"strengthen@users.noreply.github.com"
] | strengthen@users.noreply.github.com |
270bc9f97e4ca25b76d7dd39eab30d303703d1ac | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a168/A168329Test.java | b8179ae6011e650a13423b5aed364ab76c562fcf | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a168;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A168329Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
a728a14ec5a2ccc41bc4824b9a78fc7f58917e07 | 27f5457d47aaf3491f0d64032247adc08efba867 | /vertx-gaia/vertx-up/src/test/java/io/vertx/up/unity/UxArrayTc.java | 4be4bdf90bb657acad8e538699a75b791f320911 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | silentbalanceyh/vertx-zero | e73d22f4213263933683e4ebe87982ba68803878 | 1ede4c3596f491d5251eefaaaedc56947ef784cd | refs/heads/master | 2023-06-11T23:10:29.241769 | 2023-06-08T16:15:33 | 2023-06-08T16:15:33 | 108,104,586 | 348 | 71 | Apache-2.0 | 2020-04-10T02:15:18 | 2017-10-24T09:21:56 | HTML | UTF-8 | Java | false | false | 1,137 | java | package io.vertx.up.unity;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.quiz.ZeroBase;
import io.vertx.up.atom.typed.UArray;
import org.junit.Assert;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
public class UxArrayTc extends ZeroBase {
@Test
public void testArray() {
final JsonArray source = this.ioJArray("source.json");
final JsonArray target = this.ioJArray("target.json");
final JsonArray result =
UArray.create(source).zip(target, "key", "roomId").to();
for (int idx = 0; idx < result.size(); idx++) {
final JsonObject item = result.getJsonObject(idx);
Assert.assertNotNull(item);
}
}
@Test
public void testPojo() {
final List<UserJson> user = new ArrayList<>();
final UserJson json = new UserJson();
json.setAge(13);
json.setEmail("lang.yu@hpe.com");
json.setName("Lang.Yu");
user.add(json);
Ux.futureA(user).onComplete(item -> {
System.out.println(item.result());
});
}
}
| [
"silentbalanceyh@126.com"
] | silentbalanceyh@126.com |
7de4e194fc900cbc7e56b9470d164d528c525bc1 | 3982cc0a73455f8ce32dba330581b4a809988a17 | /plugins/hg4idea/src/org/zmlx/hg4idea/repo/HgRepositoryFiles.java | 16cc5e2fb5a37ab8b6f98a33368d9bbb9a0ccafb | [
"Apache-2.0"
] | permissive | lshain-android-source/tools-idea | 56d754089ebadd689b7d0e6400ef3be4255f6bc6 | b37108d841684bcc2af45a2539b75dd62c4e283c | refs/heads/master | 2016-09-05T22:31:43.471772 | 2014-07-09T07:58:59 | 2014-07-09T07:58:59 | 16,572,470 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,495 | java | /*
* Copyright 2000-2013 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 org.zmlx.hg4idea.repo;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.Collection;
/**
* Stores paths to Hg service files (from .hg/ directory) that are used by IDEA, and provides methods to check if a file
* matches once of them.
*
* @author Nadya Zabrodina
*/
public class HgRepositoryFiles {
public static final String BRANCHHEADS = "cache/branchheads"; // can be branchheads or branchheads-served after approx 2.5,
// so check for starting branchheads
public static final String BRANCHEADSDIR = "cache";
public static final String MERGE = "merge";
public static final String BRANCH = "branch";
public static final String BOOKMARKS = "bookmarks";
public static final String CURRENT_BOOKMARK = "bookmarks.current";
public static final String CONFIG_HGRC = "hgrc";
@NotNull private final String myBranchHeadsPath;
@NotNull private final String myBranchHeadsDirPath;
@NotNull private final String myMergePath;
@NotNull private final String myBranchPath;
@NotNull private final String myBookmarksPath;
@NotNull private final String myCurrentBookmarkPath;
@NotNull private final String myConfigHgrcPath;
@NotNull
public static HgRepositoryFiles getInstance(@NotNull VirtualFile hgDir) {
return new HgRepositoryFiles(hgDir);
}
private HgRepositoryFiles(@NotNull VirtualFile hgDir) {
myBranchHeadsPath = hgDir.getPath() + slash(BRANCHHEADS);
myBranchHeadsDirPath = hgDir.getPath() + slash(BRANCHEADSDIR);
myBranchPath = hgDir.getPath() + slash(BRANCH);
myMergePath = hgDir.getPath() + slash(MERGE);
myBookmarksPath = hgDir.getPath() + slash(BOOKMARKS);
myCurrentBookmarkPath = hgDir.getPath() + slash(CURRENT_BOOKMARK);
myConfigHgrcPath = hgDir.getPath() + slash(CONFIG_HGRC);
}
@NotNull
private static String slash(@NotNull String s) {
return "/" + s;
}
/**
* Returns subdirectories of .hg which we are interested in - they should be watched by VFS.
*/
@NotNull
static Collection<String> getSubDirRelativePaths() {
return Arrays.asList(slash(BRANCHHEADS), slash(MERGE));
}
@NotNull
public String getBranchHeadsDirPath() {
return myBranchHeadsDirPath;
}
public boolean isbranchHeadsFile(String filePath) {
return filePath.startsWith(myBranchHeadsPath);
}
public boolean isBranchFile(String filePath) {
return filePath.equals(myBranchPath);
}
public boolean isMergeFile(String filePath) {
return filePath.startsWith(myMergePath);
}
public boolean isBookmarksFile(String filePath) {
return filePath.equals(myBookmarksPath);
}
public boolean isCurrentBookmarksFile(String filePath) {
return filePath.equals(myCurrentBookmarkPath);
}
public boolean isConfigHgrcFile(String filePath) {
return filePath.equals(myConfigHgrcPath);
}
}
| [
"lshain.gyh@gmail.com"
] | lshain.gyh@gmail.com |
b0ce70cddb3261d64b3bdd14ee6e2aa44ab3c4e5 | 9a857d1407cf27764f402399adb9fc81c3511b6c | /src/20141123/game-dao/src/main/java/com/lodogame/game/dao/impl/redis/SystemHeroSkillDaoRedisImpl.java | 102fd84ebe94d8e11e2cdeb50378f500a94c478c | [] | no_license | zihanbobo/smsg-server | fcfec6fc6b55441d7ab64bb8b769d072752592c0 | abfebf8b1fff83332090b922e390b892483da6ed | refs/heads/master | 2021-06-01T00:01:43.208825 | 2016-05-10T10:10:01 | 2016-05-10T10:10:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 716 | java | package com.lodogame.game.dao.impl.redis;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import com.lodogame.game.dao.SystemHeroSkillDao;
import com.lodogame.game.utils.JedisUtils;
import com.lodogame.game.utils.RedisKey;
import com.lodogame.game.utils.json.Json;
import com.lodogame.model.SystemHeroSkill;
public class SystemHeroSkillDaoRedisImpl implements SystemHeroSkillDao {
@Override
public List<SystemHeroSkill> getHeroSkillList(int heroId) {
String key = RedisKey.getHeroSkillCacheKey();
String json = JedisUtils.getFieldFromObject(key, String.valueOf(heroId));
if (StringUtils.isNotEmpty(json)) {
return Json.toList(json, SystemHeroSkill.class);
}
return null;
}
}
| [
"dogdog7788@qq.com"
] | dogdog7788@qq.com |
1958a0e489d8c6cde45511a1ed0ca20233ab76bc | c9891d4bc339615bcb92d571809d1cab3d5906a3 | /app/src/main/java/com/example/zhou/job4/ui/fragment/MainFragment.java | 25c605886193e684c3d3ae2d4ddae892180ff294 | [] | no_license | zhengjinzhou/Job4 | 2e195244e843bd0f74e98cd0a8acd63ea25d65bc | 5659fc3abe8b995da6113a6ab32504410acf3361 | refs/heads/master | 2021-08-28T13:41:57.123562 | 2017-12-12T10:16:38 | 2017-12-12T10:16:38 | 113,882,483 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,508 | java | package com.example.zhou.job4.ui.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.example.zhou.job4.App;
import com.example.zhou.job4.R;
import com.example.zhou.job4.model.Lottery;
import com.example.zhou.job4.ui.activities.LotteryDetailActivity;
import com.example.zhou.job4.ui.fragment.adapter.MainFragmentAdapter;
import com.example.zhou.job4.ui.fragment.base.BaseFailFragment;
import com.example.zhou.job4.ui.fragment.listener.OnItemClickListener;
import com.example.zhou.job4.ui.fragment.presenter.MainPresenter;
import com.example.zhou.job4.ui.fragment.presenter.MainPresenterImpl;
import com.example.zhou.job4.ui.fragment.view.DividerDecoration;
import com.example.zhou.job4.ui.fragment.view.MainView;
import com.example.zhou.job4.utils.LotteryUtils;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
public class MainFragment extends BaseFailFragment<MainPresenter> implements MainView, OnItemClickListener {
@BindView(R.id.recyclerView)
RecyclerView recyclerView;
MainFragmentAdapter adapter;
List<Lottery.IEntity> data;
public static MainFragment getInstance() {
return new MainFragment();
}
@Override
protected void initView() {
super.initView();
if (data == null) data = new ArrayList<>();
adapter = new MainFragmentAdapter(data, getActivity());
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setHasFixedSize(true);
recyclerView.addItemDecoration(new DividerDecoration(getActivity(), DividerDecoration.VERTICAL_LIST));
recyclerView.setAdapter(adapter);
adapter.setOnItemClickListener(this);
}
@Override
protected void onDataRefresh() {
presenter.refresh();
}
@Override
protected MainPresenter getPresenter() {
return new MainPresenterImpl();
}
@Override
public int getLayoutResId() {
return R.layout.fragment_main;
}
@Override
public String getTitle() {
return App.getAppContext().getString(R.string.last_lottery);
}
@Override
public void showDialog() {
}
@Override
public void update(List list) {
super.update(null);
data.clear();
data.addAll(list);
adapter.notifyDataSetChanged();
}
@Override
public void onItemClick(View view, long position) {
Lottery.IEntity entity = data.get((int) position);
startDetailActivity(entity);
}
@Override
public void onFooterClick(View v, int layoutPosition) {
}
private void startDetailActivity(Lottery.IEntity entity) {
Intent intent = new Intent(getActivity(), LotteryDetailActivity.class);
Bundle b = new Bundle();
//MLog.i("===+" + entity.getIssue() + ";" + LotteryUtils.getId(entity));
b.putString("issue", entity.getIssue());
b.putString("lotId", LotteryUtils.getId(entity));
intent.putExtras(b);
getActivity().startActivity(intent);
getActivity().overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
}
@Override
public void showProgress() {
}
@Override
public void dismissProgress() {
}
}
| [
"1457594845@qq.com"
] | 1457594845@qq.com |
09f095a4cec87c2356775c337779089f10010c35 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--kotlin/33a59ff5fed00b165176c5b0978075a387e6a0fa/after/NamespaceDescriptorImpl.java | 2b30fea1b10a987830761de8b11c53971f69d941 | [] | 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,883 | java | /*
* Copyright 2010-2012 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 org.jetbrains.jet.lang.descriptors;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.resolve.name.FqName;
import org.jetbrains.jet.lang.resolve.name.Name;
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
import java.util.List;
/**
* @author abreslav
*/
public class NamespaceDescriptorImpl extends AbstractNamespaceDescriptorImpl implements WithDeferredResolve {
private WritableScope memberScope;
public NamespaceDescriptorImpl(@NotNull NamespaceDescriptorParent containingDeclaration,
@NotNull List<AnnotationDescriptor> annotations,
@NotNull Name name) {
super(containingDeclaration, annotations, name);
}
public void initialize(@NotNull WritableScope memberScope) {
if (this.memberScope != null) {
throw new IllegalStateException("Namespace member scope reinitialize");
}
this.memberScope = memberScope;
}
@Override
@NotNull
public WritableScope getMemberScope() {
return memberScope;
}
@Override
public void addNamespace(@NotNull NamespaceDescriptor namespaceDescriptor) {
getMemberScope().addNamespace(namespaceDescriptor);
}
@NotNull
@Override
public FqName getQualifiedName() {
return DescriptorUtils.getFQName(this).toSafe();
}
private NamespaceLikeBuilder builder = null;
public NamespaceLikeBuilder getBuilder() {
if (builder == null) {
builder = new NamespaceLikeBuilder() {
@Override
public void addClassifierDescriptor(@NotNull MutableClassDescriptorLite classDescriptor) {
getMemberScope().addClassifierDescriptor(classDescriptor);
}
@Override
public void addObjectDescriptor(@NotNull MutableClassDescriptorLite objectDescriptor) {
getMemberScope().addObjectDescriptor(objectDescriptor);
}
@Override
public void addFunctionDescriptor(@NotNull SimpleFunctionDescriptor functionDescriptor) {
getMemberScope().addFunctionDescriptor(functionDescriptor);
}
@Override
public void addPropertyDescriptor(@NotNull PropertyDescriptor propertyDescriptor) {
getMemberScope().addPropertyDescriptor(propertyDescriptor);
}
@NotNull
@Override
public DeclarationDescriptor getOwnerForChildren() {
return NamespaceDescriptorImpl.this;
}
@Override
public ClassObjectStatus setClassObjectDescriptor(@NotNull MutableClassDescriptorLite classObjectDescriptor) {
throw new IllegalStateException("Must be guaranteed not to happen by the parser");
}
};
}
return builder;
}
@Override
public void forceResolve() {
}
@Override
public boolean isAlreadyResolved() {
return false;
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
e984c65a47c21d6095d6e845dead632306045c62 | f140d489a1d5bb0e5221b7ef72b1b8d1441c7834 | /thrift/compiler/test/fixtures/complex-struct/gen-swift/test/fixtures/complex_struct/MyDataItem.java | d90df88c770e884368799530a48a922ae6f8c8c1 | [
"Apache-2.0"
] | permissive | terrorizer1980/fbthrift | aa9ebacfb97de312fc05a903d75dfe36fb48a6a3 | 9fe9e1ed327e9480e5aeb63d84cb5e00adf97b21 | refs/heads/master | 2023-04-10T19:11:13.606785 | 2020-08-16T05:10:56 | 2020-08-17T03:22:12 | 288,077,464 | 0 | 0 | Apache-2.0 | 2023-04-04T00:05:10 | 2020-08-17T03:46:11 | null | UTF-8 | Java | false | false | 3,050 | java | /**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package test.fixtures.complex_struct;
import com.facebook.swift.codec.*;
import com.facebook.swift.codec.ThriftField.Requiredness;
import com.facebook.swift.codec.ThriftField.Recursiveness;
import com.google.common.collect.*;
import java.util.*;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.server.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
import org.apache.thrift.meta_data.FieldMetaData;
import org.apache.thrift.meta_data.FieldValueMetaData;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.MoreObjects.ToStringHelper;
@SwiftGenerated
@ThriftStruct(value="MyDataItem", builder=MyDataItem.Builder.class)
public final class MyDataItem {
private BitSet __isset_bit_vector = new BitSet();
@ThriftConstructor
public MyDataItem(
) {
}
public static class Builder {
private final BitSet __optional_isset = new BitSet();
public Builder() { }
public Builder(MyDataItem other) {
}
@ThriftConstructor
public MyDataItem build() {
MyDataItem result = new MyDataItem (
);
result.__isset_bit_vector.or(__optional_isset);
return result;
}
}
public static final Map<String, Integer> NAMES_TO_IDS = new HashMap();
public static final Map<Integer, Object> FIELD_METADATA = new HashMap<>();
private static final TStruct STRUCT_DESC = new TStruct("MyDataItem");
static {
}
@Override
public String toString() {
ToStringHelper helper = toStringHelper(this);
return helper.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MyDataItem other = (MyDataItem)o;
return
true;
}
@Override
public int hashCode() {
return Arrays.deepHashCode(new Object[] {
});
}
public static MyDataItem read0(TProtocol oprot) throws TException {
TField __field;
oprot.readStructBegin(MyDataItem.NAMES_TO_IDS, MyDataItem.FIELD_METADATA);
MyDataItem.Builder builder = new MyDataItem.Builder();
while (true) {
__field = oprot.readFieldBegin();
if (__field.type == TType.STOP) { break; }
switch (__field.id) {
default:
TProtocolUtil.skip(oprot, __field.type);
break;
}
oprot.readFieldEnd();
}
oprot.readStructEnd();
return builder.build();
}
public void write0(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
856f0940b26d66bd3b482bc97d3a0849f60bc0b9 | c08d38751e98409382c9879a3ad58389673a4292 | /java/spring-kafka/spring-kaka-producer/src/main/java/com/bmarques/springkakaproducer/merchant/domain/MerchantService.java | 12ab970e538e98a37d7ad7aae32bf8c7e45f4f51 | [] | no_license | tiagobmarques/spring | 5ca857286af8fc1d3a6232bfec4f2f2e0695f24d | b5b2ad203e7b8813c87941d89de17a79fb7355d4 | refs/heads/master | 2022-12-04T12:48:11.250983 | 2022-11-12T21:19:03 | 2022-11-12T21:19:03 | 251,614,196 | 0 | 1 | null | 2021-07-26T19:58:42 | 2020-03-31T13:41:41 | Java | UTF-8 | Java | false | false | 984 | java | package com.bmarques.springkakaproducer.merchant.domain;
import com.bmarques.springkakaproducer.merchant.config.EventProperties;
import com.bmarques.springkakaproducer.merchant.config.KafkaPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.UUID;
@Service
public class MerchantService {
@Autowired
private MerchantRepository repository;
@Autowired
private KafkaPublisher kafkaPublisher;
public List<MerchantEntity> findAll() {
return repository.findAll();
}
public MerchantEntity save(MerchantEntity entity) {
entity.setId(UUID.randomUUID());
publishMerchantInKafka(entity);
return repository.save(entity);
}
private void publishMerchantInKafka(MerchantEntity entity) {
this.kafkaPublisher.sendMessage(entity.toString(), entity.getId().toString(), EventProperties.MERCHANT_TOPIC);
}
} | [
"tiagobm564@gmail.com"
] | tiagobm564@gmail.com |
bb1a7d8c87c90ff15799fa02949c58cef9f7c28a | 5c0e9aa1c3a03a0c172c4ed93929ed3a6ed9c3de | /src/main/java/com/oldguy/example/modules/test/dao/entities/Entity6Process.java | 02b4d470a8857bb7026fd321c1dcd461cdeeb4f0 | [] | no_license | oldguys/ActivitiDemo | 71a66f95c1f4dbf7ef60b7f5eccab98829759a14 | 2329f41422ebd6717ab5d059356e74b53098257d | refs/heads/master | 2022-06-02T12:21:09.287362 | 2019-05-24T03:15:14 | 2019-05-24T03:15:14 | 167,945,634 | 38 | 35 | null | 2022-05-20T20:54:35 | 2019-01-28T10:45:41 | JavaScript | UTF-8 | Java | false | false | 273 | java | package com.oldguy.example.modules.test.dao.entities;
import com.oldguy.example.modules.common.dao.entities.WorkFlowEntity;
import javax.persistence.Entity;
/**
* @author huangrenhao
* @date 2019/1/18
*/
@Entity
public class Entity6Process extends WorkFlowEntity {
}
| [
"916812040@qq.com"
] | 916812040@qq.com |
d053b263b6f20f699979574096a0abbb54e8fd25 | 97fd02f71b45aa235f917e79dd68b61c62b56c1c | /src/main/java/com/tencentcloudapi/tke/v20180525/models/OIDCConfigAuthenticationOptions.java | 3a10b9fa2eed2e6ba217b66479d0478e6d024c7c | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-java | 7df922f7c5826732e35edeab3320035e0cdfba05 | 09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec | refs/heads/master | 2023-09-04T10:51:57.854153 | 2023-09-01T03:21:09 | 2023-09-01T03:21:09 | 129,837,505 | 537 | 317 | Apache-2.0 | 2023-09-13T02:42:03 | 2018-04-17T02:58:16 | Java | UTF-8 | Java | false | false | 5,376 | java | /*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.tke.v20180525.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class OIDCConfigAuthenticationOptions extends AbstractModel{
/**
* 创建身份提供商
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("AutoCreateOIDCConfig")
@Expose
private Boolean AutoCreateOIDCConfig;
/**
* 创建身份提供商的ClientId
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("AutoCreateClientId")
@Expose
private String [] AutoCreateClientId;
/**
* 创建PodIdentityWebhook组件
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("AutoInstallPodIdentityWebhookAddon")
@Expose
private Boolean AutoInstallPodIdentityWebhookAddon;
/**
* Get 创建身份提供商
注意:此字段可能返回 null,表示取不到有效值。
* @return AutoCreateOIDCConfig 创建身份提供商
注意:此字段可能返回 null,表示取不到有效值。
*/
public Boolean getAutoCreateOIDCConfig() {
return this.AutoCreateOIDCConfig;
}
/**
* Set 创建身份提供商
注意:此字段可能返回 null,表示取不到有效值。
* @param AutoCreateOIDCConfig 创建身份提供商
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setAutoCreateOIDCConfig(Boolean AutoCreateOIDCConfig) {
this.AutoCreateOIDCConfig = AutoCreateOIDCConfig;
}
/**
* Get 创建身份提供商的ClientId
注意:此字段可能返回 null,表示取不到有效值。
* @return AutoCreateClientId 创建身份提供商的ClientId
注意:此字段可能返回 null,表示取不到有效值。
*/
public String [] getAutoCreateClientId() {
return this.AutoCreateClientId;
}
/**
* Set 创建身份提供商的ClientId
注意:此字段可能返回 null,表示取不到有效值。
* @param AutoCreateClientId 创建身份提供商的ClientId
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setAutoCreateClientId(String [] AutoCreateClientId) {
this.AutoCreateClientId = AutoCreateClientId;
}
/**
* Get 创建PodIdentityWebhook组件
注意:此字段可能返回 null,表示取不到有效值。
* @return AutoInstallPodIdentityWebhookAddon 创建PodIdentityWebhook组件
注意:此字段可能返回 null,表示取不到有效值。
*/
public Boolean getAutoInstallPodIdentityWebhookAddon() {
return this.AutoInstallPodIdentityWebhookAddon;
}
/**
* Set 创建PodIdentityWebhook组件
注意:此字段可能返回 null,表示取不到有效值。
* @param AutoInstallPodIdentityWebhookAddon 创建PodIdentityWebhook组件
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setAutoInstallPodIdentityWebhookAddon(Boolean AutoInstallPodIdentityWebhookAddon) {
this.AutoInstallPodIdentityWebhookAddon = AutoInstallPodIdentityWebhookAddon;
}
public OIDCConfigAuthenticationOptions() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public OIDCConfigAuthenticationOptions(OIDCConfigAuthenticationOptions source) {
if (source.AutoCreateOIDCConfig != null) {
this.AutoCreateOIDCConfig = new Boolean(source.AutoCreateOIDCConfig);
}
if (source.AutoCreateClientId != null) {
this.AutoCreateClientId = new String[source.AutoCreateClientId.length];
for (int i = 0; i < source.AutoCreateClientId.length; i++) {
this.AutoCreateClientId[i] = new String(source.AutoCreateClientId[i]);
}
}
if (source.AutoInstallPodIdentityWebhookAddon != null) {
this.AutoInstallPodIdentityWebhookAddon = new Boolean(source.AutoInstallPodIdentityWebhookAddon);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "AutoCreateOIDCConfig", this.AutoCreateOIDCConfig);
this.setParamArraySimple(map, prefix + "AutoCreateClientId.", this.AutoCreateClientId);
this.setParamSimple(map, prefix + "AutoInstallPodIdentityWebhookAddon", this.AutoInstallPodIdentityWebhookAddon);
}
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
7f7afd70a3db676839ac8c81cef44d106f137c2f | 80eca4b661b827203a01c4e4e405745f10a2fa27 | /项目产物/demo/client/src/main/java/presentation/hallsalesmanui/driver/AddDriverDialog.java | 05cda388a01b006f950c5b280a3d3f4ce4942e7f | [] | no_license | morethanbest/SE | 02c2327d2bebb8179335085f135c96552861523a | e026bc39a7f5d98a1828e9d6ff57112cfa12bb62 | refs/heads/master | 2021-01-10T06:09:42.013115 | 2016-01-05T02:24:07 | 2016-01-05T02:24:07 | 44,174,490 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,196 | java | package presentation.hallsalesmanui.driver;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import presentation.mycomp.MyTextField;
import presentation.mycomp.mycombobox.MyComboBox;
import presentation.tip.NumberField;
import presentation.tip.TipDialog;
public class AddDriverDialog extends JDialog {
private final JPanel contentPanel = new JPanel();
private MyTextField nameField;
private MyTextField codeField;
private NumberField phoneField;
private MyTextField identityField;
private MyComboBox<String> SexSelect;
private MyComboBox<String> ByearSelect;
private MyComboBox<String> BmouthSelect;
private MyComboBox<String> BdaySelect;
private MyComboBox<String> DyearSelect;
private MyComboBox<String> DmouthSelect;
private MyComboBox<String> DdaySelect;
private boolean isagain=false;
/**
* Create the dialog.
*/
public AddDriverDialog(final DriverPanel parent) {
setBounds(100, 100, 549, 351);
setBackground(SystemColor.inactiveCaptionBorder);
getContentPane().setLayout(new BorderLayout());
contentPanel.setLayout(new FlowLayout());
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
getContentPane().add(contentPanel, BorderLayout.CENTER);
contentPanel.setLayout(null);
JLabel JLName = new JLabel("姓名:");
JLName.setBounds(25, 36, 40, 20);
contentPanel.add(JLName);
nameField = new MyTextField();
nameField.setBounds(90, 36, 155, 20);
contentPanel.add(nameField);
nameField.setColumns(10);
JLabel JLSex = new JLabel("性别:");
JLSex.setBounds(260, 36, 40, 20);
contentPanel.add(JLSex);
SexSelect = new MyComboBox<String>();
SexSelect.setBounds(330, 36, 155, 20);
SexSelect.addItem("男");
SexSelect.addItem("女");
contentPanel.add(SexSelect);
JLabel JLCode = new JLabel("编号:");
JLCode.setBounds(25, 96, 40, 20);
contentPanel.add(JLCode);
codeField = new MyTextField();
codeField.setBounds(90, 96, 155, 20);
codeField.setEditable(false);
contentPanel.add(codeField);
codeField.setColumns(10);
JLabel JLPhone = new JLabel("手机号:");
JLPhone.setBounds(260, 96, 60, 20);
contentPanel.add(JLPhone);
phoneField = new NumberField(20);
phoneField.setBounds(330, 96, 155, 20);
contentPanel.add(phoneField);
phoneField.setColumns(10);
JLabel JLBirth = new JLabel("出生日期:");
JLBirth.setBounds(25, 156, 70, 20);
contentPanel.add(JLBirth);
ByearSelect = new MyComboBox<String>();
ByearSelect.setBounds(90, 156, 60, 20);
contentPanel.add(ByearSelect);
addyearItem(ByearSelect);
ItemListener Blistener= new ItemListener(){ //用于判断这个月的天数
@Override
public void itemStateChanged(ItemEvent e) {
addDayItem(BdaySelect,BmouthSelect,ByearSelect);
}
};
BmouthSelect = new MyComboBox<String>();
BmouthSelect.setBounds(157, 156, 40, 20);
contentPanel.add(BmouthSelect);
addmonthItem(BmouthSelect);
BdaySelect = new MyComboBox<String>();
BdaySelect.setBounds(205, 156, 40, 20);
contentPanel.add(BdaySelect);
addDayItem(BdaySelect,BmouthSelect,ByearSelect);
ByearSelect.addItemListener(Blistener);
BmouthSelect.addItemListener(Blistener);
JLabel JLDriver = new JLabel("行驶期限:");
JLDriver.setBounds(260, 156, 70, 20);
contentPanel.add(JLDriver);
DyearSelect = new MyComboBox<String>();
DyearSelect.setBounds(330, 156, 65, 20);
contentPanel.add(DyearSelect);
addyearItem(DyearSelect);
ItemListener Dlistener= new ItemListener(){ //用于判断这个月的天数
@Override
public void itemStateChanged(ItemEvent e) {
addDayItem(DdaySelect,DmouthSelect,DyearSelect);
}
};
DmouthSelect = new MyComboBox<String>();
DmouthSelect.setBounds(401, 156, 40, 20);
contentPanel.add(DmouthSelect);
addmonthItem(DmouthSelect);
DdaySelect = new MyComboBox<String>();
DdaySelect.setBounds(445, 156, 40, 20);
contentPanel.add(DdaySelect);
addDayItem(DdaySelect,DmouthSelect,DyearSelect);
DyearSelect.addItemListener(Dlistener);
DmouthSelect.addItemListener(Dlistener);
JLabel JLidentity = new JLabel("身份证号:");
JLidentity.setBounds(25, 216, 70, 20);
contentPanel.add(JLidentity);
identityField = new MyTextField();
identityField.setBounds(90, 216, 155, 20);
contentPanel.add(identityField);
identityField.setColumns(10);
{
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
getContentPane().add(buttonPane, BorderLayout.SOUTH);
{
JButton okButton = new JButton("OK");
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if(isagain==false){
String drivername=nameField.getText();
long birthtime=Long.parseLong((String)ByearSelect.getSelectedItem()+BmouthSelect.getSelectedItem()+BdaySelect.getSelectedItem());
String identifiercode=identityField.getText();
String cellphone=phoneField.getText();
String drivergender=(String)SexSelect.getSelectedItem();
long timelimit=Long.parseLong((String)DyearSelect.getSelectedItem()+DmouthSelect.getSelectedItem()+DdaySelect.getSelectedItem());
if(drivername.equals("")){
TipDialog Dialog=new TipDialog("请输入姓名!");
Dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
Dialog.setVisible(true);
}
else if(identifiercode.equals("")){
TipDialog failDialog=new TipDialog("请输入身份证号!");
failDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
failDialog.setVisible(true);
}
else if(phoneField.getText().equals("")){
TipDialog failDialog=new TipDialog("请输入手机号!");
failDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
failDialog.setVisible(true);
}
else {
String drivercode=parent.getcode();
codeField.setText(drivercode);
parent.addDriver(drivername, drivercode, birthtime, identifiercode, cellphone, drivergender, timelimit);
isagain=true;
}
}
else{
dispose();
}
}
});
okButton.setActionCommand("OK");
buttonPane.add(okButton);
getRootPane().setDefaultButton(okButton);
}
}
}
private void addyearItem(JComboBox<String> yearselect){
for(int i=1950;i<2100;i++){
yearselect.addItem(Integer.toString(i));
}
}
private void addmonthItem(JComboBox<String> monthselect){
for(int i=1;i<=9;i++){
monthselect.addItem("0"+Integer.toString(i));
}
for(int i=10;i<=12;i++){
monthselect.addItem(Integer.toString(i));
}
}
private void addDayItem(JComboBox<String> dayselect,JComboBox<String> monthselect,JComboBox<String> yearselect){
dayselect.removeAllItems();
//得到这个月的天数
int days=getDays(Integer.parseInt((String)yearselect.getSelectedItem()),Integer.parseInt((String)monthselect.getSelectedItem()));
for(int i=1;i<=9;i++){
dayselect.addItem("0"+Integer.toString(i));
}
for(int i=10;i<=days;i++){
dayselect.addItem(Integer.toString(i));
}
}
public boolean isleap(Integer year){
if(year%400==0){
return true;
}else if(year%100==0){
return false;
}else if(year%4==0){
return true;
}else{
return false;
}
}
public int getDays(Integer year,Integer month){ //得到这个月的天数
int day[]={31,28,31,30,31,30,31,31,30,31,30,31};
if(month==2&&isleap(year)){
return 29;
}
return day[month-1];
}
}
| [
"song402621342@126.com"
] | song402621342@126.com |
f4215f89a8bc569196b771976394cb1f051ea656 | b73873cc99bfb60351b8dcc868d8bf91956bc94f | /consumer/src/main/java/yitgogo/consumer/order/model/ModelPayment.java | 592cb86cc577be661aa058b2ca362b66035657e6 | [] | no_license | KungFuBrother/yitgogo_consumer | 6a18101ffb0201400fcc2cfdc941006f8ff9361d | 4eec5090b3377992b188035dc379bb41596da23a | refs/heads/master | 2016-08-12T19:00:32.113188 | 2016-01-18T09:17:22 | 2016-01-18T09:17:22 | 47,446,309 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,076 | java | package yitgogo.consumer.order.model;
import org.json.JSONException;
import org.json.JSONObject;
/**
* 支付方式
*
* @author Tiger
*
*/
public class ModelPayment {
public final static int TYPE_RECEIVED = 1;
public final static int TYPE_ONLINE = 2;
public final static int TYPE_CASH = 3;
public final static String NAME_RECEIVED = "货到付款";
public final static String NAME_ONLINE = "在线支付";
public final static String NAME_CASH = "现金支付";
int type = TYPE_ONLINE;
String name = NAME_ONLINE;
public ModelPayment() {
}
public ModelPayment(JSONObject object) {
if (object != null) {
type = object.optInt("type");
name = object.optString("name");
}
}
public ModelPayment(int type, String name) {
this.type = type;
this.name = name;
}
public int getType() {
return type;
}
public String getName() {
return name;
}
public JSONObject toJsonObject() throws JSONException {
JSONObject jsonObject = new JSONObject();
jsonObject.put("type", type);
jsonObject.put("name", name);
return jsonObject;
}
}
| [
"1076192306@qq.com"
] | 1076192306@qq.com |
995d03c32461bd2beabf28036ec7ffc30ccfe4f6 | 078ff7c4fea9f7e7bcf94621f99ad6286d3b85aa | /SmartClassUFPA/app/src/main/java/engcomp/smartclassufpa/Drop.java | 3f108546b033adb6e543e4489b78170177c708db | [] | no_license | LeonFerreirax/Aplicativo | 6ac4d2d6a60b4f43f3c5f06bb71a0f97258d6de3 | 7e7e7771e7aed6b82d47850951181f61ec1d1c80 | refs/heads/master | 2021-01-11T17:19:24.465768 | 2017-02-22T00:24:09 | 2017-02-22T00:24:09 | 79,745,328 | 0 | 0 | null | 2017-01-22T20:59:44 | 2017-01-22T20:59:43 | null | UTF-8 | Java | false | false | 7,685 | java | package engcomp.smartclassufpa;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
import com.dropbox.core.DbxException;
import com.dropbox.core.DbxRequestConfig;
import com.dropbox.core.v2.DbxClientV2;
import com.dropbox.core.v2.users.FullAccount;
import java.io.File;
public class Drop extends Activity {
private static final int IMAGE_REQUEST_CODE = 101;
private String ACCESS_TOKEN;
private DbxClientV2 client;
private String cont;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_drop);
/*Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);*/
Intent intent = getIntent();
Bundle bundle = intent.getExtras();
cont = bundle.getString("txt");
if (!tokenExists()) {
//No token
//Back to LoginActivity
Intent in = new Intent(Drop.this, Login.class);
startActivity(in);
}
ACCESS_TOKEN = retrieveAccessToken();
getUserAccount();
DbxRequestConfig config = new DbxRequestConfig("dropbox/java-tutorial", "en_US");
client = new DbxClientV2(config, "enen8qV7yEAAAAAAAAAAImOU6gVvC79Qmnr7dxiotHzjddgIbME576kPvp4t1prU");
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
FullAccount account = null;
try {
account = client.users().getCurrentAccount();
} catch (DbxException e) {
e.printStackTrace();
}
System.out.println(account.getName().getDisplayName());
} catch (Exception e) {
e.printStackTrace();
}
}
});
thread.start();
upload();
/*FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
upload();
}
});*/
}
public void upando(View view){
upload();
}
protected void getUserAccount() {
if (ACCESS_TOKEN == null)return;
new UserAccountTask(DropboxClient.getClient(ACCESS_TOKEN), new UserAccountTask.TaskDelegate() {
@Override
public void onAccountReceived(FullAccount account) {
//Print account's info
Log.d("User", account.getEmail());
Log.d("User", account.getName().getDisplayName());
Log.d("User", account.getAccountType().name());
updateUI(account);
}
@Override
public void onError(Exception error) {
Log.d("User", "Error receiving account details.");
}
}).execute();
}
private void updateUI(FullAccount account) {
/* ImageView profile = (ImageView) findViewById(R.id.imageView);
TextView name = (TextView) findViewById(R.id.name_textView);
TextView email = (TextView) findViewById(R.id.email_textView);
name.setText(account.getName().getDisplayName());
email.setText(account.getEmail());
Picasso.with(this)
.load(account.getProfilePhotoUrl())
.resize(200, 200)
.into(profile);*/
}
private void upload() {
if (ACCESS_TOKEN == null)return;
//Select image to upload
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
startActivityForResult(Intent.createChooser(intent,
"Upload to Dropbox"), IMAGE_REQUEST_CODE);
}
/*private void getJson(final String url) {
new Thread(new Runnable() {
@Override
public void run() {
String ip;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(url)
.build();
Response response = null;
try {
response = client.newCall(request).execute();
} catch (IOException e) {
e.printStackTrace();
}
if (response.code() != 200) {
} else {
try {
String body = response.body().string();
Toast.makeText(Drop.this, body, Toast.LENGTH_SHORT).show();
} catch (IOException e) {
e.printStackTrace();
}
runOnUiThread(new Runnable() {
@Override
public void run() {
}
});
}
}
}).start();
}*/
public void drop(View view) /*throws DbxException*/ {
/*Thread thread = new Thread(new Runnable() {
@Override
public void run() {
}
});
thread.start();*/
startActivity(new Intent(this, gallery.class));
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode != RESULT_OK || data == null) return;
// Check which request we're responding to
if (requestCode == IMAGE_REQUEST_CODE) {
// Make sure the request was successful
if (resultCode == RESULT_OK) {
//Image URI received
File file = new File(URI_to_Path.getPath(getApplication(), data.getData()));
if (file != null) {
Toast.makeText(Drop.this, "cont= "+cont, Toast.LENGTH_SHORT).show();
//Initialize UploadTask
new UploadTask(DropboxClient.getClient(ACCESS_TOKEN), file, getApplicationContext(), cont).execute();
}
}
}
startActivity(new Intent(this, gallery.class));
}
private boolean tokenExists() {
SharedPreferences prefs = getSharedPreferences("com.example.valdio.dropboxintegration", Context.MODE_PRIVATE);
String accessToken = prefs.getString("access-token", null);
return accessToken != null;
}
private String retrieveAccessToken() {
//check if ACCESS_TOKEN is stored on previous app launches
SharedPreferences prefs = getSharedPreferences("com.example.valdio.dropboxintegration", Context.MODE_PRIVATE);
String accessToken = prefs.getString("access-token", null);
if (accessToken == null) {
Log.d("AccessToken Status", "No token found");
return null;
} else {
//accessToken already exists
Log.d("AccessToken Status", "Token exists");
return accessToken;
}
}
public void onBackPressed(){
startActivity(new Intent(this, gallery.class));
}
}
| [
"root@localhost.localdomain"
] | root@localhost.localdomain |
c532b22491405091adbf973fe7779f1f3d1cc7aa | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/18/18_3defee92d1a72d867f31ef2c643658cafe74423d/SWTeraSampler/18_3defee92d1a72d867f31ef2c643658cafe74423d_SWTeraSampler_s.java | 7afaa42a30fdd90cd9e80b26c21bfc4704c3d338 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,729 | java |
import uk.co.mrry.mercator.task.Task;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class SWTeraSampler implements Task {
public void invoke(InputStream[] inputs, OutputStream[] outputs, String[] args) {
int nBucketers = Integer.parseInt(args[0]);
int nPartitions = Integer.parseInt(args[1]);
int nRecordsExpected = Integer.parseInt(args[2]);
int recordsBetweenBoundaries = nRecordsExpected / nPartitions;
DataInputStream[] dis = new DataInputStream[nBucketers];
for(int i = 0; i < nBucketers; i++) {
dis[i] = new DataInputStream(new BufferedInputStream(inputs[i]));
}
DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(outputs[0]));
TextPairIterator iter = null;
try {
iter = Merger.merge(dis);
}
catch(IOException e) {
System.err.println("Exception during merge: " + e);
System.exit(2);
}
try {
int i = 1;
int boundariesEmitted = 0;
while((boundariesEmitted < (nPartitions - 1)) && iter.next()) {
Text key;
if((i % recordsBetweenBoundaries) == 0) {
key = iter.getKey();
key.write(dos);
boundariesEmitted++;
}
i++;
}
dos.close();
if(boundariesEmitted != (nPartitions - 1)) {
System.err.printf("Emitted %d boundaries (expected %d), probably due to short input (got %d records, expected %d)\n",
boundariesEmitted, nPartitions - 1, i, nRecordsExpected);
System.exit(2);
}
}
catch(IOException e) {
System.err.println("Exception during iteration / writing: " + e);
System.exit(2);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
fbede748fb86105768d0f405401bdac08a31b4bc | 2eef96bf14768a2731583a20dbdd73df95dd4df4 | /src/to/joe/j2mc/admintoolkit/command/AdminChatCommand.java | f1bd228c44d137624ffe31ebbee6bc0fa975d831 | [] | no_license | Eviltechie/j2mc-admintoolkit | a7b3b624a903cb97426e3de8b3d3e9f1831ffe7e | 7090e3d8164dc1f92f37b6dd9167339a82022544 | refs/heads/master | 2021-01-18T19:27:36.167515 | 2012-09-30T17:02:51 | 2012-09-30T17:02:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 956 | java | package to.joe.j2mc.admintoolkit.command;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import to.joe.j2mc.admintoolkit.J2MC_AdminToolkit;
import to.joe.j2mc.core.J2MC_Core;
import to.joe.j2mc.core.J2MC_Manager;
import to.joe.j2mc.core.command.MasterCommand;
public class AdminChatCommand extends MasterCommand {
public AdminChatCommand(J2MC_AdminToolkit AdminToolKit) {
super(AdminToolKit);
}
@Override
public void exec(CommandSender sender, String commandName, String[] args, Player player, boolean isPlayer) {
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "Usage: /a message");
return;
}
String message = J2MC_Core.combineSplit(0, args, " ");
message = "<" + ChatColor.LIGHT_PURPLE + sender.getName() + ChatColor.WHITE + "> " + message;
J2MC_Manager.getCore().adminAndLog(message);
}
}
| [
"matt@phozop.net"
] | matt@phozop.net |
428ddee7f58dec8696f6c3528453c53f25084bf3 | 4e93bf76ea47854b9c27af21c65c4281aa919a24 | /JAVA/tij/code1/c16/trash/Aluminum.java | b831510fd085572791da2f0d5049419bfa91f901 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | CodingWorker/enhancingProgram | fc4120b23007db4a36bb0cf102187cda63bf6153 | 0fc30474470597b377d9d652973520f4825b58f7 | refs/heads/master | 2021-01-12T05:11:16.285221 | 2017-12-25T14:24:13 | 2017-12-25T14:24:13 | 77,871,573 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 310 | java | //: Aluminum.java
// The Aluminum class with prototyping
package c16.trash;
public class Aluminum extends Trash {
private static double val = 1.67f;
public Aluminum(double wt) { super(wt); }
public double value() { return val; }
public static void value(double newVal) {
val = newVal;
}
} ///:~ | [
"dy10010@sina.cn"
] | dy10010@sina.cn |
b24201480d44d85c9bf21a04ff4a7e30c5e2637a | bb45ca5f028b841ca0a08ffef60cedc40090f2c1 | /app/src/main/java/com/MCWorld/video/recorder/c.java | 18e46c811151f0778d3690517e021fc06833f44a | [] | no_license | tik5213/myWorldBox | 0d248bcc13e23de5a58efd5c10abca4596f4e442 | b0bde3017211cc10584b93e81cf8d3f929bc0a45 | refs/heads/master | 2020-04-12T19:52:17.559775 | 2017-08-14T05:49:03 | 2017-08-14T05:49:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 155 | java | package com.MCWorld.video.recorder;
/* compiled from: PlayCallback */
public interface c {
void Nn();
void No();
void j(long j, long j2);
}
| [
"18631616220@163.com"
] | 18631616220@163.com |
a65438ea2c6216db60465f291a79ee1307603a7e | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /core3/impl/branches/no-spring/command-executor-impl/src/main/java/org/cytoscape/command/internal/CommandExecutorTaskFactory.java | 8fc436536b349b9a0cbb525fa3697938975b5779 | [] | no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,838 | java |
/*
Copyright (c) 2006, 2010, The Cytoscape Consortium (www.cytoscape.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
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. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. 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.cytoscape.command.internal;
import org.cytoscape.work.TaskFactory;
import org.cytoscape.work.TaskIterator;
public class CommandExecutorTaskFactory implements TaskFactory {
private final CommandExecutorImpl cei;
public CommandExecutorTaskFactory(CommandExecutorImpl cei) {
this.cei = cei;
}
public TaskIterator getTaskIterator() {
return new TaskIterator(new CommandExecutorTask(cei));
}
}
| [
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] | mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
c0d6dccf493bee5f1e2febb1a49b2407ac650fb7 | d0ccbff285888a66360a4826ffd6e65942e60869 | /src/main/java/org/jaudiotagger/tag/id3/ID3Compression.java | 8207009bdf42fb5d11bd81a6613a9291f336778e | [
"Apache-2.0"
] | permissive | kategray/openaudible | bbbf8b581758231767f8ea375c98f1a7fe7f18eb | 3776ed5071d5b5a5aef49fb77a91139f8599e128 | refs/heads/master | 2020-03-21T19:34:16.395388 | 2018-06-28T01:13:42 | 2018-06-28T01:13:42 | 138,957,191 | 0 | 1 | Apache-2.0 | 2018-06-28T02:40:35 | 2018-06-28T02:40:35 | null | UTF-8 | Java | false | false | 2,414 | java | package org.jaudiotagger.tag.id3;
import org.jaudiotagger.logging.ErrorMessage;
import org.jaudiotagger.tag.InvalidFrameException;
import java.nio.ByteBuffer;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
/**
* compresses frame data
* <p/>
* Is currently required for V23Frames and V24Frames
* <p/>
*/
//TODO also need to support compress framedata
public class ID3Compression {
//Logger
public static Logger logger = Logger.getLogger("org.jaudiotagger.tag.id3");
/**
* Decompress realFrameSize bytes to decompressedFrameSize bytes and return as ByteBuffer
*
* @param byteBuffer
* @param decompressedFrameSize
* @param realFrameSize
* @return
* @throws org.jaudiotagger.tag.InvalidFrameException
*/
protected static ByteBuffer uncompress(String identifier, String filename, ByteBuffer byteBuffer, int decompressedFrameSize, int realFrameSize) throws InvalidFrameException {
logger.config(filename + ":About to decompress " + realFrameSize + " bytes, expect result to be:" + decompressedFrameSize + " bytes");
// Decompress the bytes into this buffer, size initialized from header field
byte[] result = new byte[decompressedFrameSize];
byte[] input = new byte[realFrameSize];
//Store position ( just after frame header and any extra bits)
//Read frame data into array, and then put buffer back to where it was
int position = byteBuffer.position();
byteBuffer.get(input, 0, realFrameSize);
byteBuffer.position(position);
Inflater decompresser = new Inflater();
decompresser.setInput(input);
try {
int inflatedTo = decompresser.inflate(result);
logger.config(filename + ":Decompressed to " + inflatedTo + " bytes");
} catch (DataFormatException dfe) {
logger.log(Level.CONFIG, "Unable to decompress this frame:" + identifier, dfe);
//Update position of main buffer, so no attempt is made to reread these bytes
byteBuffer.position(byteBuffer.position() + realFrameSize);
throw new InvalidFrameException(ErrorMessage.ID3_UNABLE_TO_DECOMPRESS_FRAME.getMsg(identifier, filename, dfe.getMessage()));
}
decompresser.end();
return ByteBuffer.wrap(result);
}
} | [
"racer@torguard.tg"
] | racer@torguard.tg |
6dfa8ca0e060cd3c957fecac43ce77da26d6fca7 | 7229b0e3f8d63e323079ff8c8eb32a96104241ad | /demo-boot-quarkus/src/main/java/br/com/canaryinvest/CustomerRest.java | cae35b4585729a37aeec8f8113d181dabbb42505 | [] | no_license | diegolirio/demos-spring-boot | 68676316975041041dba1f10c1c1203f67c2c241 | 27838bad8f254ad205556f095d1a5a66de6bc3c2 | refs/heads/master | 2023-07-20T00:27:37.700277 | 2023-07-17T15:30:46 | 2023-07-17T15:30:46 | 129,958,346 | 1 | 3 | null | 2021-05-14T02:07:17 | 2018-04-17T20:02:29 | Java | UTF-8 | Java | false | false | 297 | java | package br.com.canaryinvest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/customers")
public class CustomerRest {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return "hello";
}
} | [
"diegolirio.dl@gmail.com"
] | diegolirio.dl@gmail.com |
abe31f9e4adf4a8e617c54da1e75aefc3b223a24 | f5d5b368c1ae220b59cfb26bc26526b494c54d0e | /unlocksafe/src/com/atomix/kurowiz/supports/PointHistoryInfo.java | e8e5c30a6255e74cff66f1d8e8413f3332c9a9de | [] | no_license | kishordgupta/2012_bkup | 3778c26082697b1cf223e27822d8efe90b35fc76 | 53ef4014fb3e11158c3f9242cb1f829e02e3ef69 | refs/heads/master | 2021-01-10T08:25:57.122415 | 2020-10-16T12:06:52 | 2020-10-16T12:06:52 | 47,512,520 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 625 | java | package com.atomix.kurowiz.supports;
public class PointHistoryInfo {
private String pointTypeName = "";
private String point = "";
private String registeredDate = "";
public String getPointTypeName()
{
return pointTypeName;
}
public void setPointTypeName(String pointTypeName)
{
this.pointTypeName = pointTypeName;
}
public String getPoint()
{
return point;
}
public void setPoint(String point)
{
this.point = point;
}
public String getRegisteredDate()
{
return registeredDate;
}
public void setRegisteredDate(String registeredDate)
{
this.registeredDate = registeredDate;
}
}
| [
"kdgupta87@gmail.com"
] | kdgupta87@gmail.com |
fbba892ff9377fcc75693e32bea332540ed2ca83 | 447520f40e82a060368a0802a391697bc00be96f | /apks/playstore_apps/com_spotify_music/source/bnp.java | 2366fcc0eee2ea01bd952f8472c26d1ee1756344 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 3,712 | java | import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import com.facebook.FacebookException;
import com.facebook.internal.bh;
import com.facebook.internal.bl;
import com.facebook.share.model.ShareMedia;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Set;
class bnp
{
boolean a = false;
private bnp() {}
private static void a(box paramBox)
{
if (paramBox == null) {
throw new FacebookException("Cannot share a null ShareVideo");
}
paramBox = paramBox.b;
if (paramBox == null) {
throw new FacebookException("ShareVideo does not have a LocalUrl specified");
}
if ((!bh.c(paramBox)) && (!bh.d(paramBox))) {
throw new FacebookException("ShareVideo must reference a video that is on the device");
}
}
public void a(bof paramBof)
{
paramBof = paramBof.a;
if ((paramBof != null) && (!paramBof.isEmpty()))
{
if (paramBof.size() > 6) {
throw new FacebookException(String.format(Locale.ROOT, "Cannot add more than %d media.", new Object[] { Integer.valueOf(6) }));
}
paramBof = paramBof.iterator();
while (paramBof.hasNext())
{
ShareMedia localShareMedia = (ShareMedia)paramBof.next();
if ((localShareMedia instanceof bot)) {
a((bot)localShareMedia);
} else if ((localShareMedia instanceof box)) {
a((box)localShareMedia);
} else {
throw new FacebookException(String.format(Locale.ROOT, "Invalid media type: %s", new Object[] { localShareMedia.getClass().getSimpleName() }));
}
}
return;
}
throw new FacebookException("Must specify at least one medium in ShareMediaContent.");
}
public final void a(bor paramBor, boolean paramBoolean)
{
Iterator localIterator = paramBor.a.keySet().iterator();
while (localIterator.hasNext())
{
Object localObject1 = (String)localIterator.next();
Object localObject2;
if (paramBoolean)
{
localObject2 = ((String)localObject1).split(":");
if (localObject2.length < 2) {
throw new FacebookException("Open Graph keys must be namespaced: %s", new Object[] { localObject1 });
}
int j = localObject2.length;
int i = 0;
while (i < j)
{
if (localObject2[i].isEmpty()) {
throw new FacebookException("Invalid key found in Open Graph dictionary: %s", new Object[] { localObject1 });
}
i += 1;
}
}
localObject1 = paramBor.a((String)localObject1);
if ((localObject1 instanceof List))
{
localObject1 = ((List)localObject1).iterator();
while (((Iterator)localObject1).hasNext())
{
localObject2 = ((Iterator)localObject1).next();
if (localObject2 == null) {
throw new FacebookException("Cannot put null objects in Lists in ShareOpenGraphObjects and ShareOpenGraphActions");
}
bno.a(localObject2, this);
}
}
else
{
bno.a(localObject1, this);
}
}
}
public void a(bot paramBot)
{
bno.a(paramBot);
Bitmap localBitmap = paramBot.b;
Uri localUri = paramBot.c;
if ((localBitmap == null) && (bh.b(localUri)) && (!this.a)) {
throw new FacebookException("Cannot set the ImageUrl of a SharePhoto to the Uri of an image on the web when sharing SharePhotoContent");
}
if ((paramBot.b != null) || (!bh.b(paramBot.c))) {
bl.d(bbz.g());
}
}
public void a(boz paramBoz)
{
a(paramBoz.d);
paramBoz = paramBoz.c;
if (paramBoz != null) {
a(paramBoz);
}
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
1468d3e8bab89407c1724e44b249d54d32308538 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a000/A000536Test.java | 0ccb97cc334e56a745f3f25787dec37a340bfa65 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 255 | java | package irvine.oeis.a000;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A000536Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 6;
}
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
4b4178cf85627c9234a2ebdfe6da7266f6b16fa5 | aaef3516558bfdbad0f64917c1e1c2dfe840bc8c | /Stick Bike/Stick Bike/Stick Bike/src/com/rhymes/helpers/XMLReader.java | f541d6eb981d1a8eacd97589c6730ae47daaa107 | [] | no_license | RDeepakkrishna/games | f3366490c78ab26b33def390f7230ab01ded0682 | 9c854718ec7504b861c2e2f15b377a9d14c77e82 | refs/heads/master | 2021-01-11T03:17:59.104294 | 2015-06-25T11:44:10 | 2015-06-25T11:44:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,033 | java | package com.rhymes.helpers;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.Array;
import com.rhymes.game.entity.elements.path.traversal.Path;
import com.rhymes.ge.core.data.GlobalVars;
import com.rhymes.ge.core.renderer.Point;
public class XMLReader {
// private static final XLevel Xlevel = null;
public static Array<Path> ropes = new Array<Path>();
static Path path;
public static Point RopeNodeS = new Point();
public static Array<Joint> joints = new Array<Joint>();
static Joint joint;
public static Array<Elements> elements = new Array<Elements>();
static Elements element;
public static Array<Transporter> transporters = new Array<Transporter>();
static Transporter transporter;
public static void main(String filePath) {
ropes.clear();
try {
// Helper.printKeyVal("File path", AssetConstants.FILE_LEVEL_INFO);
Helper.printKeyVal("File path", filePath);
FileHandle fh = Gdx.files.internal(filePath);
if (fh == null)
Helper.println("fh null");
if (fh.exists())
Helper.println("\n\n\nfile exists");
else
Helper.println("\n\n\nfile does not exists");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory
.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fh.read());
doc.getDocumentElement().normalize();
NodeList nList = doc.getElementsByTagName("Rope");
for (int temp = 0; temp < nList.getLength(); temp++) {
Node nNode = nList.item(temp);
Element eElement = (Element) nNode;
String RopeType = eElement.getAttribute("Type");
path = new Path();
NodeList RopeNode = doc.getElementsByTagName("RopeNode");
for (int i = 0; i < RopeNode.getLength(); i++) {
RopeNodeS = new Point();
Node SingleNode = RopeNode.item(i);
Element eElem = (Element) SingleNode.getParentNode();
String attr = eElem.getAttribute("Number");
String Num = temp + "";
if (attr.compareTo(Num) == 0) {
Element eElemSin = (Element) SingleNode;
String attribX = eElemSin.getAttribute("x");
String attribY = eElemSin.getAttribute("y");
float a = (Float.valueOf(attribX)).floatValue() *2f;
float b = Gdx.graphics.getHeight()
- (Float.valueOf(attribY)).floatValue()-250f ;
// RopeNodeS.setX(a);
// RopeNodeS.setY(b);
RopeNodeS.setX(a * 1f );
RopeNodeS.setY(b * 1.5f );
// RopeNodeS.setX(a * 2.0f);
// RopeNodeS.setY(b * 2.0f);
path.addLast(RopeNodeS);
//
}
}
path.pathType=RopeType;
ropes.add(path);
}
} catch (Exception e)
{
e.printStackTrace();
// ropes.add(new BPath(2));
// XMLReader.ropes.get(0).getNodes().get(0).getLocation().
}
}
}
/*package com.rhymes.helpers;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.Array;
import com.rhymes.game.entity.elements.path.traversal.Path;
import com.rhymes.game.stage.menus.GameMenuInfo;
import com.rhymes.game.stage.menus.stick.LevelInfo;
import com.rhymes.ge.core.data.GlobalVars;
import com.rhymes.ge.core.renderer.Point;
public class XMLReader {
// private static final XLevel Xlevel = null;
public static Array<Path> ropes = new Array<Path>();
static Path path;
public static Point RopeNodeS = new Point();
public static Array<Joint> joints = new Array<Joint>();
static Joint joint;
public static Array<Elements> elements = new Array<Elements>();
static Elements element;
public static Array<Transporter> transporters = new Array<Transporter>();
static Transporter transporter;
public static void main(String filePath) {
ropes.clear();
try {
// Helper.printKeyVal("File path", AssetConstants.FILE_LEVEL_INFO);
Helper.printKeyVal("File path", filePath);
FileHandle fh = Gdx.files.internal(filePath);
if (fh == null)
Helper.println("fh null");
if (fh.exists())
Helper.println("\n\n\nfile exists");
else
Helper.println("\n\n\nfile does not exists");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory
.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fh.read());
doc.getDocumentElement().normalize();
NodeList nList = doc.getElementsByTagName("Rope");
for (int temp = 0; temp < nList.getLength(); temp++) {
Node nNode = nList.item(temp);
Element eElement = (Element) nNode;
// String Ropecolor = eElement.getAttribute("Color");
path = new Path();
NodeList RopeNode = doc.getElementsByTagName("RopeNode");
for (int i = 0; i < RopeNode.getLength(); i++) {
RopeNodeS = new Point();
Node SingleNode = RopeNode.item(i);
Element eElem = (Element) SingleNode.getParentNode();
String attr = eElem.getAttribute("Number");
String Num = temp + "";
if (attr.compareTo(Num) == 0) {
Element eElemSin = (Element) SingleNode;
String attribX = eElemSin.getAttribute("x");
String attribY = eElemSin.getAttribute("y");
float a = (Float.valueOf(attribX)).floatValue();
float b = Gdx.graphics.getHeight()
- (Float.valueOf(attribY)).floatValue() ;
RopeNodeS.setX(a * 1.6f );
RopeNodeS.setY(b * 1.5f );
// RopeNodeS.setX(a * 2f);
// RopeNodeS.setY(b * 1.0f);
path.addLast(RopeNodeS);
//
}
}
ropes.add(path);
}
} catch (Exception e)
{
e.printStackTrace();
// ropes.add(new BPath(2));
// XMLReader.ropes.get(0).getNodes().get(0).getLocation().
}
}
}
*/ | [
"kdgupta87@gmail.com"
] | kdgupta87@gmail.com |
f204c18b856c169a7441bd0d285598ac6c0fc953 | 5b49d3351c852cc7b4a8823d79f7200c9e0fdb38 | /JavaRushTasks/1.JavaSyntax/src/com/javarush/task/task03/task0325/Solution.java | 210a0379d41ab303778317addc655d8b18298050 | [] | no_license | serggrp/jLearn | 4fecacf46b4d17f58d97df588db6580fc7a4806e | f6f16b64f55830e23641ac57e32f3b8ff8f6231a | refs/heads/master | 2021-07-06T01:45:25.973044 | 2020-10-19T07:55:51 | 2020-10-19T07:55:51 | 182,089,568 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | package com.javarush.task.task03.task0325;
import java.io.*;
/*
Финансовые ожидания
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(reader.readLine());
System.out.printf("Я буду зарабатывать $%d в час", n);
}
}
| [
"sergie92@yandex.ru"
] | sergie92@yandex.ru |
60801abf6b82e7d1791a162f327412473833ea10 | da24acc7ebde5d1f3b2c6087e8b81f9b0ce18dcf | /app/src/main/java/com/sumit/masaisignup/SignIn.java | 92873e5ab7801fa893d462600b9fae223af1240d | [] | no_license | sumit2607/MasaiSignup | b136eba679cc7e6cbf2bc2f3d2734a63beb05a1b | 30a2287085cbbaf7e724c0462a58d74a0544aa27 | refs/heads/master | 2023-06-12T09:41:15.278183 | 2021-07-05T08:32:34 | 2021-07-05T08:32:34 | 383,069,863 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,158 | java | package com.sumit.masaisignup;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class SignIn extends AppCompatActivity {
private EditText editTextTextPersonName;
//private EditText mEtEmail;
private EditText editTextTextPersonName3;
private Button button;
private String emailValidation = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_in);
initViews();
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
boolean isUserNameValid = isUserNameValid();
boolean isPasswordValid = isPasswordValid();
// boolean isEmailValid = isEmailValid();
if (isUserNameValid && isPasswordValid) {
Intent intent = new Intent(SignIn.this, Home.class);
intent.putExtra("username",editTextTextPersonName.getText().toString());
startActivity(intent);
}
}
});
}
private void initViews() {
editTextTextPersonName = findViewById(R.id.editTextTextPersonName);
//mEtEmail = findViewById(R.id.mEtEmail);
editTextTextPersonName3 = findViewById(R.id.editTextTextPersonName3);
button = findViewById(R.id.button);
}
private boolean isUserNameValid() {
if (editTextTextPersonName.getText().toString().matches(emailValidation)) {
return true;
} else {
editTextTextPersonName.setError("Invalid email");
return false;
}
}
private boolean isPasswordValid() {
if (editTextTextPersonName3.getText().toString().length() >= 6) {
return true;
} else {
editTextTextPersonName3.setError("Password length is less than 6 characters");
return false;
}
}
}
| [
"40994984+sumit2607@users.noreply.github.com"
] | 40994984+sumit2607@users.noreply.github.com |
3d8183d680ca6ad3ea582d225aef2a74d18447fb | 42a60bc77f408032be056b4271942ada33e5a57d | /core/src/main/java/hivemall/ftvec/trans/QuantitativeFeaturesUDF.java | 14ea83f08ef21c2afb20e8034db209f78c8dea76 | [
"Apache-2.0"
] | permissive | keylorsdu/hivemall | 97c8e860afeffdfd4586de65c252eb51e08d34f2 | 2667f8b9ff5654dfbd41b474ec4c54960c6d4061 | refs/heads/master | 2021-01-12T18:24:25.135932 | 2016-09-27T06:11:38 | 2016-09-27T06:11:38 | 69,419,096 | 0 | 1 | null | 2016-09-28T02:48:53 | 2016-09-28T02:48:53 | null | UTF-8 | Java | false | false | 4,677 | java | /*
* Hivemall: Hive scalable Machine Learning Library
*
* Copyright (C) 2015 Makoto YUI
* Copyright (C) 2013-2015 National Institute of Advanced Industrial Science and Technology (AIST)
*
* 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 hivemall.ftvec.trans;
import hivemall.utils.hadoop.HiveUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Nonnull;
import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.udf.UDFType;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory;
import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
import org.apache.hadoop.io.Text;
@Description(name = "quantitative_features",
value = "_FUNC_(array<string> featureNames, ...) - Returns a feature vector array<string>")
@UDFType(deterministic = true, stateful = false)
public final class QuantitativeFeaturesUDF extends GenericUDF {
private String[] featureNames;
private PrimitiveObjectInspector[] inputOIs;
private List<Text> result;
@Override
public ObjectInspector initialize(@Nonnull final ObjectInspector[] argOIs)
throws UDFArgumentException {
final int numArgOIs = argOIs.length;
if (numArgOIs < 2) {
throw new UDFArgumentException("argOIs.length must be greater that or equals to 2: "
+ numArgOIs);
}
this.featureNames = HiveUtils.getConstStringArray(argOIs[0]);
if (featureNames == null) {
throw new UDFArgumentException("#featureNames should not be null");
}
int numFeatureNames = featureNames.length;
if (numFeatureNames < 1) {
throw new UDFArgumentException("#featureNames must be greater than or equals to 1: "
+ numFeatureNames);
}
int numFeatures = numArgOIs - 1;
if (numFeatureNames != numFeatures) {
throw new UDFArgumentException("#featureNames '" + numFeatureNames
+ "' != #arguments '" + numFeatures + "'");
}
this.inputOIs = new PrimitiveObjectInspector[numFeatures];
for (int i = 0; i < numFeatures; i++) {
ObjectInspector oi = argOIs[i + 1];
inputOIs[i] = HiveUtils.asDoubleCompatibleOI(oi);
}
this.result = new ArrayList<Text>(numFeatures);
return ObjectInspectorFactory.getStandardListObjectInspector(PrimitiveObjectInspectorFactory.writableStringObjectInspector);
}
@Override
public List<Text> evaluate(@Nonnull final DeferredObject[] arguments) throws HiveException {
result.clear();
final int size = arguments.length - 1;
for (int i = 0; i < size; i++) {
Object argument = arguments[i + 1].get();
if (argument == null) {
continue;
}
PrimitiveObjectInspector oi = inputOIs[i];
if (oi.getPrimitiveCategory() == PrimitiveCategory.STRING) {
String s = argument.toString();
if (s.isEmpty()) {
continue;
}
}
final double v = PrimitiveObjectInspectorUtils.getDouble(argument, oi);
if (v != 0.d) {
String featureName = featureNames[i];
Text f = new Text(featureName + ':' + v);
result.add(f);
}
}
return result;
}
@Override
public String getDisplayString(String[] children) {
return "quantitative_features(" + Arrays.toString(children) + ")";
}
}
| [
"yuin405@gmail.com"
] | yuin405@gmail.com |
d9b832edd1dd9e4abfa15d9571b9234fccd72457 | 395ec784027c63711a60e4bacaa4ef57dc5457c9 | /lailem/src/main/java/com/lailem/app/tpl/VoterTpl.java | 6d8b3ee98930cd50ef37beb007434587e8d550f7 | [] | no_license | StormFeng/LaiPrivateLe | 4e21f02284deb8bb70f28673db304c600bb811d8 | dadcb91658c1bcad5483dee27320b6a84cd721d5 | refs/heads/master | 2020-06-11T05:06:28.326139 | 2016-12-09T07:51:12 | 2016-12-09T07:51:12 | 76,000,775 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,145 | java | package com.lailem.app.tpl;
import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.lailem.app.R;
import com.lailem.app.api.ApiClient;
import com.lailem.app.jsonbean.dynamic.VoterListBean.Voter;
import com.lailem.app.utils.Func;
import butterknife.Bind;
import jp.wasabeef.glide.transformations.CropCircleTransformation;
public class VoterTpl extends BaseTpl<Voter> {
@Bind(R.id.avatar)
ImageView avatar_iv;
@Bind(R.id.name)
TextView name_tv;
public VoterTpl(Context context) {
super(context);
}
@Override
protected int getLayoutId() {
return R.layout.item_voter_or_zan;
}
@Override
public void setBean(Voter bean, int position) {
if (Func.checkImageTag(bean.getHeadSPicName(), avatar_iv)) {
Glide.with(_activity).load(ApiClient.getFileUrl(bean.getHeadSPicName())).placeholder(R.drawable.default_avatar).error(R.drawable.default_avatar).bitmapTransform(new CropCircleTransformation(_activity)).into(avatar_iv);
}
name_tv.setText(bean.getRemark());
}
}
| [
"1170017470@qq.com"
] | 1170017470@qq.com |
601e0a9ba8681f9474718e720c2887dc5c30355f | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdas_ReducedClassCount/applicationModule/src/test/java/applicationModulepackageJava5/Foo543Test.java | 783f70fc359828deef250a2d69e3a52bf3345a46 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 741 | java | package applicationModulepackageJava5;
import org.junit.Test;
public class Foo543Test {
@Test
public void testFoo0() {
new Foo543().foo0();
}
@Test
public void testFoo1() {
new Foo543().foo1();
}
@Test
public void testFoo2() {
new Foo543().foo2();
}
@Test
public void testFoo3() {
new Foo543().foo3();
}
@Test
public void testFoo4() {
new Foo543().foo4();
}
@Test
public void testFoo5() {
new Foo543().foo5();
}
@Test
public void testFoo6() {
new Foo543().foo6();
}
@Test
public void testFoo7() {
new Foo543().foo7();
}
@Test
public void testFoo8() {
new Foo543().foo8();
}
@Test
public void testFoo9() {
new Foo543().foo9();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
6f8586efb67af73b8a2008e7afadeaae8bfc3e7c | 8b9392276d84d87bf2c7a962817652f66d8e29aa | /wasync/src/main/java/org/atmosphere/wasync/Encoder.java | cb76ac73b9e2adf538eb1ff493d2ed588a041878 | [
"Apache-2.0"
] | permissive | ryeo/wasync | 217f72b0c11d058ad2b2a694806c22669df15adf | a6fb3eb2a56e0ad7738a7c3be6b6a2f97cb6c03a | refs/heads/master | 2021-01-18T03:14:23.414449 | 2013-10-18T15:35:49 | 2013-10-18T15:35:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,323 | java | /*
* Copyright 2013 Jeanfrancois Arcand
*
* 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.atmosphere.wasync;
/**
* Encode the request's body (or transform) of type U into an object of type T. Encoder can be chained, e.g the result of
* one Encoder can be passed to the next Encoder.
*
* @param <U> Any object.
* @param <T> An instance of {@link String}, {@link java.io.InputStream} and {@link java.io.Reader}
*
* @author Jeanfrancois Arcand
*/
public interface Encoder<U, T> {
/**
* Encode the object of type U into an object of type T.
* @param s a request's body that has already been encoded or not
* @return an encoded object. The list of supported encoded object are {@link String}, {@link java.io.InputStream} and {@link java.io.Reader}
*/
T encode(U s);
}
| [
"jfarcand@apache.org"
] | jfarcand@apache.org |
b6fea705f03443ad99b2b794c312c91260f7ff77 | e8d17fe9fcba653d74ac538b793d8f9ae2fa6185 | /crm-customer/src/test/java/com/deppon/crm/module/customer/server/testutils/LuoDian.java | 393e6cea9bf70df2f0742584c3ce157df11c02ad | [] | no_license | xfu00013/crm-1 | 06ef85141dac69569e9fc2ef0ab7010cffbcbd53 | d809a722a3d8d06f643f3d96e02932539ce2212f | refs/heads/master | 2021-01-21T18:46:46.212043 | 2014-06-05T06:27:07 | 2014-06-05T06:27:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,821 | java | package com.deppon.crm.module.customer.server.testutils;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import com.deppon.crm.module.customer.shared.domain.ApproveData;
import com.deppon.crm.module.customer.shared.domain.Member;
public class LuoDian {
public static <T> T luo(Class<T> clazz,List<ApproveData> datas) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, NoSuchMethodException{
T obj = clazz.newInstance();
for (ApproveData approveData : datas) {
String fieldName = approveData.getFieldName();
String value = approveData.getOldValue();
String methodName = getMethodName(fieldName);
Method[] methods = clazz.getMethods();
for (Method method : methods) {
if(method.getName().equals(methodName)){
method.invoke(obj,value);
}
}
}
return obj;
}
public static String getMethodName(String fieldName){
StringBuffer sb = new StringBuffer();
sb.append("set");
String rex = fieldName.substring(0,1);
String other = fieldName.substring(1,fieldName.length());
sb.append(StringUtils.upperCase(rex));
sb.append(other);
return sb.toString();
}
public static void main(String[] args) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException {
ApproveData date =new ApproveData();
date.setFieldName("id");
date.setOldValue("123");
date.setNewValue("456");
List<ApproveData> list = new ArrayList<ApproveData>();
list.add(date);
Member member = LuoDian.luo(Member.class,list);
System.out.println(member.getId());
}
}
| [
"605372707@qq.com"
] | 605372707@qq.com |
fda1bc43a6702c89a1cfae19d45708b8ac84cae7 | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/game/model/g$2.java | 219d8dcbb17b7c309faece577680a5819f753dad | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 637 | java | package com.tencent.mm.plugin.game.model;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.game.a.c;
import com.tencent.mm.protocal.c.alt;
import com.tencent.mm.sdk.platformtools.x;
class g$2 implements g$a {
final /* synthetic */ String fFV;
final /* synthetic */ alt jLH;
g$2(String str, alt alt) {
this.fFV = str;
this.jLH = alt;
}
public final void onComplete() {
x.i("MicroMsg.GameCommOpertionProcessor", "menu icon download complete! save menu data. appid:%s", new Object[]{this.fFV});
((c) g.l(c.class)).aSk().a("pb_game_hv_menu_" + this.fFV, this.jLH);
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
b42e123cd19b87e4af77b318d6e8d21c47049785 | 43ea6b8fd54f76e49f6e8ed8ec443336cf7db8ac | /uva/UVa10020_Minimalcoverage.java | 7ea2226a3705b5f2868614d481c7dbfb942db6a5 | [] | no_license | mirzainayat92/competitive-programming | 68f6c0a5a10cf8d8f14040a385e22e53d03beb70 | 2d737fb6f69256f62ea5454888f5687f1814ea7b | refs/heads/master | 2020-12-22T20:45:48.789657 | 2018-03-15T03:52:48 | 2018-03-15T03:52:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,868 | java | package uva;
/* USER: 46724 (sfmunera) */
/* PROBLEM: 961 (10020 - Minimal coverage) */
/* SUBMISSION: 10155527 */
/* SUBMISSION TIME: 2012-05-25 16:21:24 */
/* LANGUAGE: 2 */
import java.util.*;
import java.io.*;
public class UVa10020_Minimalcoverage {
static class Segment implements Comparable<Segment> {
int L, R;
public Segment(int L, int R) {
this.L = L;
this.R = R;
}
public int compareTo(Segment s) {
if (this.L != s.L)
return this.L - s.L;
return s.R - this.R;
}
public String toString() {
return this.L + " " + this.R;
}
}
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(in.readLine());
boolean first = true;
while (T-- > 0) {
in.readLine();
int M = Integer.parseInt(in.readLine());
PriorityQueue<Segment> Q = new PriorityQueue<Segment>();
while (true) {
String[] parts = in.readLine().split("[ ]+");
int L = Integer.parseInt(parts[0]);
int R = Integer.parseInt(parts[1]);
if (L == 0 && R == 0)
break;
Q.offer(new Segment(Math.min(L, R), Math.max(L, R)));
}
if (first)
first = false;
else
System.out.println();
int left = 0;
List<Segment> res = new ArrayList<Segment>();
while (left < M) {
Segment sel = null;
while (!Q.isEmpty() && Q.peek().L <= left) {
Segment cur = Q.poll();
if (sel == null || cur.R > sel.R)
sel = cur;
}
if (sel == null)
break;
left = sel.R;
res.add(sel);
}
if (left < M)
res.clear();
System.out.println(res.size());
for (Segment s : res)
System.out.println(s);
}
in.close();
System.exit(0);
}
}
| [
"sfmunera@gmail.com"
] | sfmunera@gmail.com |
ab36af120359255968b3b46bd56976330c1d0f23 | e19ca77b8725551e5c806dfbae02b8f44b4a6c6f | /core/src/main/java/spritz/PeekOperator.java | bae33a77726e239e57c2dbb56e2449b478395313 | [
"Apache-2.0"
] | permissive | spritz/spritz | a0ffcac27cfe50dff0f468d6165eaf599bc5ddbd | 49ba61517b5c023e521c6775e4a16f8da5034371 | refs/heads/master | 2022-05-15T17:24:32.597278 | 2022-04-29T05:05:55 | 2022-04-29T05:05:55 | 149,194,146 | 4 | 0 | Apache-2.0 | 2019-04-24T06:37:35 | 2018-09-17T22:08:56 | Java | UTF-8 | Java | false | false | 4,537 | java | package spritz;
import java.util.function.Consumer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
final class PeekOperator<T>
extends AbstractStream<T, T>
{
@Nullable
private final Consumer<Subscription> _onSubscription;
@Nullable
private final Consumer<Subscription> _afterSubscription;
@Nullable
private final Consumer<? super T> _onItem;
@Nullable
private final Consumer<? super T> _afterItem;
@Nullable
private final Consumer<Throwable> _onError;
@Nullable
private final Consumer<Throwable> _afterError;
@Nullable
private final Runnable _onComplete;
@Nullable
private final Runnable _afterComplete;
@Nullable
private final Runnable _onCancel;
@Nullable
private final Runnable _afterCancel;
PeekOperator( @Nullable final String name,
@Nonnull final Stream<T> upstream,
@Nullable final Consumer<Subscription> onSubscription,
@Nullable final Consumer<Subscription> afterSubscription,
@Nullable final Consumer<? super T> onItem,
@Nullable final Consumer<? super T> afterItem,
@Nullable final Consumer<Throwable> onError,
@Nullable final Consumer<Throwable> afterError,
@Nullable final Runnable onComplete,
@Nullable final Runnable afterComplete,
@Nullable final Runnable onCancel,
@Nullable final Runnable afterCancel )
{
super( Spritz.areNamesEnabled() ? generateName( name, "peek" ) : null, upstream );
_onSubscription = onSubscription;
_afterSubscription = afterSubscription;
_onItem = onItem;
_afterItem = afterItem;
_onError = onError;
_afterError = afterError;
_onComplete = onComplete;
_afterComplete = afterComplete;
_onCancel = onCancel;
_afterCancel = afterCancel;
}
@Nonnull
@Override
Subscription doSubscribe( @Nonnull final Subscriber<? super T> subscriber )
{
final WorkerSubscription<T> subscription = new WorkerSubscription<>( this, subscriber );
getUpstream().subscribe( subscription );
return subscription;
}
private static final class WorkerSubscription<T>
extends PassThroughSubscription<T, PeekOperator<T>>
implements Subscriber<T>
{
WorkerSubscription( @Nonnull final PeekOperator<T> stream, @Nonnull final Subscriber<? super T> subscriber )
{
super( stream, subscriber );
}
@Override
public void onSubscribe( @Nonnull final Subscription subscription )
{
setUpstream( subscription );
final Consumer<Subscription> onSubscription = getStream()._onSubscription;
if ( null != onSubscription )
{
onSubscription.accept( subscription );
}
getSubscriber().onSubscribe( this );
final Consumer<Subscription> afterSubscription = getStream()._afterSubscription;
if ( null != afterSubscription )
{
afterSubscription.accept( subscription );
}
}
@Override
public void onItem( @Nonnull final T item )
{
final Consumer<? super T> onItem = getStream()._onItem;
if ( null != onItem )
{
onItem.accept( item );
}
super.onItem( item );
final Consumer<? super T> afterNext = getStream()._afterItem;
if ( null != afterNext )
{
afterNext.accept( item );
}
}
@Override
public void onError( @Nonnull final Throwable error )
{
markAsDone();
final Consumer<Throwable> onError = getStream()._onError;
if ( null != onError )
{
onError.accept( error );
}
super.onError( error );
final Consumer<Throwable> afterError = getStream()._afterError;
if ( null != afterError )
{
afterError.accept( error );
}
}
@Override
public void onComplete()
{
markAsDone();
final Runnable onComplete = getStream()._onComplete;
if ( null != onComplete )
{
onComplete.run();
}
super.onComplete();
final Runnable afterComplete = getStream()._afterComplete;
if ( null != afterComplete )
{
afterComplete.run();
}
}
@Override
final void doCancel()
{
final Runnable onCancel = getStream()._onCancel;
if ( null != onCancel )
{
onCancel.run();
}
super.doCancel();
final Runnable afterCancel = getStream()._afterCancel;
if ( null != afterCancel )
{
afterCancel.run();
}
}
}
}
| [
"peter@realityforge.org"
] | peter@realityforge.org |
d86059b363450c758a14c7efde7045aba1f77b62 | 59ac3266bed205dd29e1c148af789aeb1e93f861 | /src/librarysystem/UI/Actions.java | 2584feaf6b8d381fe3a2709cac239b392e4a3866 | [] | no_license | pjayswal/LibrarySystem | 2dadef5e079130598a354b24b48b0600829d66b1 | 44768c10b8a08a66a41a894a01a59938d50b79a1 | refs/heads/master | 2016-09-06T19:48:08.522843 | 2014-07-21T05:38:57 | 2014-07-21T05:38:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,403 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package librarysystem.UI;
/**
*
* @author Pjayswal
*/
public class Actions extends javax.swing.JPanel {
/**
* Creates new form Actions
*/
public Actions() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}
| [
"you@example.com"
] | you@example.com |
55077004f974745dfc60c9bc7161742ff2c5a159 | a25c4e35ad54fb98b6dda61bf4b7b7b51ad431a9 | /src/main/java/com/dongguo/prototype/deepclone/DeepCloneableTarget.java | d0bd5350133314e2554239a1db7f7766f3c8d54c | [] | no_license | dongguo4812/DesignPattern | 078906852278aafbc5a6cac52bea93ab77c613ed | 6d4d6168eedf7847d36f8d2766ff6cf8a2fcd45e | refs/heads/master | 2023-07-07T12:48:09.435073 | 2021-08-23T01:51:21 | 2021-08-23T01:51:21 | 398,534,526 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 932 | java | package com.dongguo.prototype.deepclone;
import java.io.Serializable;
/**
* @author Dongguo
* @date 2021/8/22 0022-11:53
* @description:
*/
public class DeepCloneableTarget implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
private String cloneName;
private String cloneClass;
//构造器
public DeepCloneableTarget(String cloneName, String cloneClass) {
this.cloneName = cloneName;
this.cloneClass = cloneClass;
}
//因为该类的属性,都是String , 因此我们这里使用默认的clone 完成即可
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
@Override
public String toString() {
return "DeepCloneableTarget{" +
"cloneName='" + cloneName + '\'' +
", cloneClass='" + cloneClass + '\'' +
'}';
}
} | [
"291320608@qq.com"
] | 291320608@qq.com |
4a260f79cf4cd5989e53d74e5290d50fa059bde5 | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /v2/tools/src/java/com/sun/enterprise/tools/common/util/ExtractUtils.java | 9fbdbd2edd3726caa009691dc4cc6d37bb56e224 | [] | no_license | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,145 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath" exception
* as provided by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
*
* Contributor(s):
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
* Microsystems, Inc. All Rights Reserved.
*/
// PENDING copied from ejbmodule data object
package com.sun.enterprise.tools.common.util;
import org.netbeans.modules.jarpackager.api.ArchiveEntry;
import com.sun.forte4j.j2ee.lib.dd.ejb2.gen.EjbJar;
import com.sun.forte4j.j2ee.lib.dataobject.J2eeDataObject;
public class ExtractUtils {
/**
* convert an icon urls into an icon references.
*
* @param url a string representing the url of an icon.
* @return The name of the ArchiveEntry in a form appropriate for
* putting in a deployment descriptor.
*/
static String urlToReference(String url) {
if ((url == null) ||
(url.equals("null")) || // NOI18N
(url.length() == 0) ) {
return null;
}
// Make an ArchiveEntry.
// This is a little bit inefficient as we throw this away
// and it will be made again later.
ArchiveEntry archiveEntry = J2eeDataObject.urlToArchiveEntry(url);
return archiveEntry.getName();
}
/**
* Copy the UserInfo .
* Also convert icon urls into icon references.
*
* @param from copy from here
* @param to copy to here
*/
static public void copyUserInfo(EjbJar from, EjbJar to) {
String url;
String reference;
url = from.getLargeIcon();
reference = urlToReference(url);
to.setLargeIcon(reference);
url = from.getSmallIcon();
reference = urlToReference(url);
to.setSmallIcon(reference);
// System.out.println("Copying " + from.getDescription()); //NOI18N
to.setDescription(from.getDescription());
to.setDisplayName(from.getDisplayName());
}
}
| [
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
4230018f5d7e0aa47c4bbca3f68f36611b1e9c76 | b096a44dbd16877f85d02930de6a0ccbeb280ecb | /src/main/java/sample/rmi/CountApplet.java | 713111a85171e70e6ff8809c895d8ea00757eaae | [] | no_license | qiuzj/UnderstandJVM | f7ff80b6f09aa193a6010f3f8003950d78382197 | 7bbae693ade4ace584b92f8fade7b0a42f3c4522 | refs/heads/master | 2020-03-23T01:22:43.695378 | 2019-02-03T08:25:10 | 2019-02-03T08:25:10 | 140,913,774 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,105 | java | package sample.rmi;
import java.applet.Applet;
import java.awt.Button;
import java.awt.Color;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javassist.tools.rmi.ObjectImporter;
import javassist.tools.rmi.ObjectNotFoundException;
import javassist.tools.web.Viewer;
public class CountApplet extends Applet implements ActionListener {
private Font font;
private ObjectImporter importer;
private Counter counter;
private AlertDialog dialog;
private String message;
private String paramButton;
private String paramName;
@Override
public void init() {
paramButton = getParameter("button");
paramName = getParameter("name");
importer = new ObjectImporter(this); // here
commonInit();
}
/*
* call this method instead of init() if this program is not run as an
* applet.
*/
public void applicationInit() {
paramButton = "OK";
paramName = "counter";
Viewer cl = (Viewer) getClass().getClassLoader(); // here
importer = new ObjectImporter(cl.getServer(), cl.getPort()); // here
commonInit();
}
private void commonInit() {
font = new Font("SansSerif", Font.ITALIC, 40);
Button b = new Button(paramButton);
b.addActionListener(this);
add(b);
dialog = new AlertDialog();
message = "???";
}
public void destroy() {
dialog.dispose();
}
public void start() {
try {
counter = (Counter) importer.lookupObject(paramName); // here
message = Integer.toString(counter.get());
} catch (ObjectNotFoundException e) {
dialog.show(e.toString());
}
}
public void actionPerformed(ActionEvent e) {
counter.increase();
message = Integer.toString(counter.get());
repaint();
}
public void paint(Graphics g) {
g.setFont(font);
g.drawRect(50, 50, 100, 100);
g.setColor(Color.blue);
g.drawString(message, 60, 120);
}
public static void main(String[] args) {
Frame f = new Frame("CountApplet");
CountApplet ca = new CountApplet();
f.add(ca);
f.setSize(300, 300);
ca.applicationInit();
ca.start();
f.setVisible(true);
}
}
| [
"zhanjia21@163.com"
] | zhanjia21@163.com |
50fbf85faf10f0f8990c017d04ffe24318274c4f | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-481-67-20-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/internal/template/DefaultTemplateManager_ESTest_scaffolding.java | 33485fe8db4be9c19b395d43ae254ac3cae04f2c | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 458 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Apr 06 13:59:56 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
2067b3cffaa54a0a65de62ad98c89e324a496b9f | 31d7459c9a67c8fd894f3dfe99c838ce2c2457a6 | /app/src/main/java/com/zhongsou/souyue/countUtils/ZSSdkUtil.java | 809ceb688155e8fac663cdbe39be6d5e4ccbcc13 | [] | no_license | chzh1377/SouyueFive | 1691d86d2ea0598cecce1537d7d954350e92d320 | deaa50cd557e1186e4856b4a2c0923bd66561328 | refs/heads/master | 2016-09-12T16:21:14.040083 | 2016-05-26T14:10:29 | 2016-05-26T14:10:29 | 59,755,405 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,302 | java | package com.zhongsou.souyue.countUtils;
import android.content.Context;
import com.zhongsou.souyue.R;
import com.zhongsou.souyue.net.volley.BaseUrlRequest;
import com.zhongsou.souyue.platform.CommonStringsApi;
import com.zs.zssdk.ZSclickAgent;
import java.util.HashMap;
/**
* @author YanBin yanbin@zhongsou.com
* @version V
* @Copyright (c) 2015 zhongsou
* @Description zssdk Statistic
* @date 2015/11/23
*/
public class ZSSdkUtil {
//订阅来源定义
//精选订阅推荐
public static final String RECOMMEND_SUBSCRIBE="recommend.subscribe";
//详情页顶部订阅
public static final String NEWSDETAIL_SUBSCRIBE_TOP="newsdetail.subscribe.top";
//详情页正文底部订阅(这个h5还没有添加)
public static final String NEWSDETAIL_SUBSCRIBE_BUTTOM="newsdetail.subscribe.buttom";
//SRP页面头部
public static final String SRP_SUBSCRIBE_TITLE="srp.subscribe.title";
//订阅菜下拉
public static final String SRP_SUBSCRIBE_MENU="srp.subscribe.menu";
//热门订阅
public static final String TOPIC_SUBSCRIBE_MENU="topic.subscribe.menu";
//订阅大全
public static final String ALLLIST_SUBSCRIBE_EXTERNAL="alllist.subscribe.external";
//其他订阅推荐
public static final String OTHER_SUBSCRIBE_MENU="other.subscribe.menu";
//有关兴趣圈订阅
//圈吧订阅
public static final String CIRCLEBAR_SUBSCRIBE_GROUP="circlebar.subscribe.group";
//圈首页订阅
public static final String CIRCLEINDEX_SUBSCRIBE_GROUP="circleindex.subscribe.group";
//私密圈
public static final String INVITE_SUBSCRIBE_GROUP="invite.subscribe.group";
//圈管理
public static final String MANAGE_SUBSCRIBE_GROUP="manage.subscribe.group";
/**
* zssdk的初始化 根据搜悦服务器环境设置不同的发送策略
*
* @param context 上下文
*/
public static void initZSSDK(Context context) {
initByEnvironment(); //设置发送策略
//ZSSDK init
ZSclickAgent.init(context, null, null);
}
/**
* 根据搜悦环境进行不同的发送策略的设置
*/
public static void initByEnvironment() {
//zssdk上传服务器(正式): http://mlcp.zhongsou.com
//zssdk上传服务器(测试): http://61.135.210.99:80
int env = Integer.parseInt(CommonStringsApi.getStringResourceValue(R.string.souyue_interface_env));
switch (env) {
case BaseUrlRequest.SOUYUE_DEVLOPER:
case BaseUrlRequest.SOUYUE_TEST:
//ZSSDK 设置发送策略,2-延时; 3-实时
ZSclickAgent.setLogWithReportPolicy(3, 0); //第二个参数为延时时间,以秒为单位
// ZSclickAgent.setToTestServer();// 调用此方法表示统计日志发送到日志的测试服务器
break;
case BaseUrlRequest.SOUYUE_PRE_ONLINE:
ZSclickAgent.setLogWithReportPolicy(2, 60); //第二个参数为延时时间,以秒为单位
break;
case BaseUrlRequest.SOUYUE_ONLINE:
ZSclickAgent.setLogWithReportPolicy(2, 10 * 60); //第二个参数为延时时间,以秒为单位
break;
default:
ZSclickAgent.setLogWithReportPolicy(2, 10 * 60); //第二个参数为延时时间,以秒为单位
break;
}
}
/**
* 统计事件
*
* @param context 上下文
* @param eventId 事件ID
* @param map 上传数据 键值对
*/
public static void onEvent(Context context, String eventId, HashMap map){
ZSclickAgent.onEvent(context, eventId, map);
}
/**
*
* @param context 上下文
* @param name 当前页面名称
* @param preference 前一个页面
*/
public static void onPageStart(Context context, String name, String preference){
ZSclickAgent.onPageStart(context, name, preference);
}
/**
*
* @param context 上下文
* @param name 当前页面名称
* @param preference 前一个页面
*/
public static void onPageEnd(Context context, String name, String preference){
ZSclickAgent.onPageEnd(context, name, preference);
}
}
| [
"zhch1377@163.com"
] | zhch1377@163.com |
9d59cc450d6f83d702889d0e020b408ccf550870 | 248616ff827c9cb823f185ed342c55f7e5564779 | /parking-common/src/main/java/com/protops/gateway/dao/log/SensorDeviceLogDao.java | 78535d2c1c235619e33fc1953c1b7f9ff51af785 | [] | no_license | Jinx009/jingan_1.0 | 8591358363c6c40c9a47cb56e70650498a2bee7b | 3374d47be289bdb2c6992c54f747c482d9e32c66 | refs/heads/master | 2022-12-21T04:54:06.793968 | 2019-12-25T05:30:50 | 2019-12-25T05:30:50 | 148,450,816 | 1 | 0 | null | 2022-12-16T02:40:16 | 2018-09-12T08:54:08 | Java | UTF-8 | Java | false | false | 1,950 | java | package com.protops.gateway.dao.log;
import com.protops.gateway.domain.log.SensorDeviceLog;
import com.protops.gateway.util.HibernateBaseDao;
import com.protops.gateway.util.StringUtils;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by jinx on 3/24/17.
*/
@Repository
@Transactional
public class SensorDeviceLogDao extends HibernateBaseDao<SensorDeviceLog,Integer>{
public List<SensorDeviceLog> getNearMax(String mac,String dateStr){
String hql = "SELECT mac AS mac,id,create_time AS createTime,battery_voltage AS batteryVoltage FROM tbl_sensor_devicelog WHERE mac = '"+mac+"' AND create_time>='"+dateStr+"' order by battery_voltage desc ";
return findBySql(hql, SensorDeviceLog.class);
}
public Map<String,Object> findByMacAndDate(String mac){
String hql = "SELECT mac AS mac,id,create_time AS createTime,vol FROM tbl_sensor_devicelog WHERE mac = '"+mac+"' and dif is not null order by id desc limit 20";
List<SensorDeviceLog> list = findBySql(hql, SensorDeviceLog.class);
Map<String,Object> map = new HashMap<String, Object>();
map.put("a",0.00);
map.put("b",null);
double num = 0.00;
int size = 0;
if(list!=null&&!list.isEmpty()){
for(SensorDeviceLog sensorDeviceLog:list){
if(StringUtils.isNotBlank(sensorDeviceLog.getVol())){
double b = Double.valueOf(sensorDeviceLog.getVol());
if(b!=0){
size++;
num = num+b;
}
}
}
SensorDeviceLog sensorDeviceLog2 = list.get(0);
map.put("a",String.valueOf(num/size));
map.put("b",sensorDeviceLog2.getCreateTime());
}
return map;
}
}
| [
"jinxlovejinx@vip.qq.com"
] | jinxlovejinx@vip.qq.com |
8fb202ad11397869fab8490ff7319e1032d1c17e | 874bff21c1b965affe3913ac5d9f9f20b3b5238c | /web/src/com/desktop/model/BaseExtendEntity.java | 4e54ed52cea06be4e9283ce116487f1bdd142c02 | [] | no_license | dengyanshu/web | f00aa331fee9e6d3b64eb0957672e41f2b423bc7 | ce81e06f845266fda24b57ea6fa97f99533dbff0 | refs/heads/master | 2020-03-19T04:57:17.972909 | 2018-06-09T04:51:34 | 2018-06-09T04:51:34 | 135,885,163 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,219 | java | package com.desktop.model;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import com.desktop.annotation.FieldInfo;
/**
* 业务基本实体
* @author 陈永化
*
*/
@MappedSuperclass
public class BaseExtendEntity extends BaseEntity {
@FieldInfo(name="备用字段1")
private String ext01;
@FieldInfo(name="备用字段2")
private String ext02;
@FieldInfo(name="备用字段3")
private String ext03;
@FieldInfo(name="备用字段4")
private String ext04;
@FieldInfo(name="备用字段5")
private String ext05;
@Column(length=1000)
public String getExt01() {
return ext01;
}
public void setExt01(String ext01) {
this.ext01 = ext01;
}
@Column(length=1000)
public String getExt02() {
return ext02;
}
public void setExt02(String ext02) {
this.ext02 = ext02;
}
@Column(length=1000)
public String getExt03() {
return ext03;
}
public void setExt03(String ext03) {
this.ext03 = ext03;
}
@Column(length=1000)
public String getExt04() {
return ext04;
}
public void setExt04(String ext04) {
this.ext04 = ext04;
}
@Column(length=1000)
public String getExt05() {
return ext05;
}
public void setExt05(String ext05) {
this.ext05 = ext05;
}
}
| [
"344630476@qq.com"
] | 344630476@qq.com |
3f964e6fe4c3c18ca52a957fa4a7ece0532a49fe | ecb7e109a62f6a2a130e3320ed1fb580ba4fc2de | /reference-code/esr/esale-customers/src/main/java/jp/co/softbrain/esales/customers/service/dto/activities/GetActivitiesSubType3DTO.java | 75cb98a89cb097b5c435ac788b1290ff2c53d558 | [] | no_license | nisheeth84/prjs_sample | df732bc1eb58bc4fd4da6e76e6d59a2e81f53204 | 3fb10823ca4c0eb3cd92bcd2d5d4abc8d59436d9 | refs/heads/master | 2022-12-25T22:44:14.767803 | 2020-10-07T14:55:52 | 2020-10-07T14:55:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 871 | java | package jp.co.softbrain.esales.customers.service.dto.activities;
/**
* A DTO for the response of API getActivities - object businessCard.
*
* @author TinhBV
*/
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode
public class GetActivitiesSubType3DTO implements Serializable {
/**
*
*/
private static final long serialVersionUID = -8725123467874126563L;
private String customerName;
private Long businessCardId;
private String firstName;
private String lastName;
private String firstNameKana;
private String lastNameKana;
private String position;
private String departmentName;
private String businessCardImagePath;
private String businessCardImageName;
} | [
"phamkhachoabk@gmail.com"
] | phamkhachoabk@gmail.com |
88b35a913b8cc90ded31ff26a7ca63b19201ca35 | 4a6ee06d02d528a20569d2f13d7881861a473d22 | /standard/src/main/java/org/codeswarm/timerfactory/StandardTimerFactory.java | bf1d0685228f341263692291879a828fe3bbf27b | [
"Apache-2.0"
] | permissive | chris-martin/timer-factory | f6142a3a74bec37c60213ccd084dbddbddeb38ec | f9ab9f352345193129eecc195e9cf66b4ab2017f | refs/heads/master | 2020-07-20T14:37:11.351051 | 2011-08-04T07:15:11 | 2011-08-04T07:15:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 198 | java | package org.codeswarm.timerfactory;
public class StandardTimerFactory implements TimerFactory {
@Override
public Timer createTimer(TimerTask task) {
return new StandardTimer(task);
}
}
| [
"ch.martin@gmail.com"
] | ch.martin@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.