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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41ddcda70c62d5fe3a38ccf50fadee6a93a5b057
|
9cceacc9d8af179803cfcb9dea0dd37c86129e77
|
/trunk/core/src/main/java/ru/factus/bo/Relation.java
|
c6e044e8ac6bf4cdad97d4858637cb5492c0a47f
|
[] |
no_license
|
BGCX067/factus-svn-to-git
|
0bc0e4d6807a5515dd711036f523f8fab36846f2
|
c8d14d4f48e8b24d84d6370a49d49ded5a5e3bff
|
refs/heads/master
| 2021-01-13T00:56:26.559267
| 2015-12-28T14:41:22
| 2015-12-28T14:41:22
| 48,849,932
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 598
|
java
|
package ru.factus.bo;
import ru.factus.AbstractEntity;
import javax.persistence.*;
/**
* @author <a href="mailto:ziman200@gmail.com">freeman</a>
* created 13.05.2008 15:00:30
*/
@Entity
@Table(name = "RELATION")
public class Relation extends AbstractEntity{
@Id
@GeneratedValue
private Long id;
@Basic
private String name;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"you@example.com"
] |
you@example.com
|
a4e518e3bc0b04fb0d960f94beeb77e61dd5bdee
|
6832918e1b21bafdc9c9037cdfbcfe5838abddc4
|
/jdk_8_maven/cs/rest/original/proxyprint/src/main/java/io/github/proxyprint/kitchen/controllers/consumer/PrintingSchemaController.java
|
c0d9fecaa891d2d76cfb8befa16e04047bcd6662
|
[
"Apache-2.0",
"GPL-1.0-or-later",
"LGPL-2.0-or-later"
] |
permissive
|
EMResearch/EMB
|
200c5693fb169d5f5462d9ebaf5b61c46d6f9ac9
|
092c92f7b44d6265f240bcf6b1c21b8a5cba0c7f
|
refs/heads/master
| 2023-09-04T01:46:13.465229
| 2023-04-12T12:09:44
| 2023-04-12T12:09:44
| 94,008,854
| 25
| 14
|
Apache-2.0
| 2023-09-13T11:23:37
| 2017-06-11T14:13:22
|
Java
|
UTF-8
|
Java
| false
| false
| 6,378
|
java
|
package io.github.proxyprint.kitchen.controllers.consumer;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import io.github.proxyprint.kitchen.models.consumer.Consumer;
import io.github.proxyprint.kitchen.models.consumer.PrintingSchema;
import io.github.proxyprint.kitchen.models.repositories.ConsumerDAO;
import io.github.proxyprint.kitchen.models.repositories.PrintingSchemaDAO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Set;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
/**
* Created by daniel on 28-04-2016.
*/
@RestController
@Transactional
public class PrintingSchemaController {
@Autowired
private ConsumerDAO consumers;
@Autowired
private PrintingSchemaDAO printingSchemas;
@Autowired
private Gson GSON;
/**
* Get all the consumer's PrintingSchemas.
* @param id, the id of the consumer.
* @return set of the printing schemas belonging to the consumer matched by the id.
*/
@ApiOperation(value = "Returns a set of the printing schemas.", notes = "This method allows consumers to get his PrintingSchemas.")
@Secured({"ROLE_USER"})
@RequestMapping(value = "/consumer/{consumerID}/printingschemas", method = RequestMethod.GET)
public String getConsumerPrintingSchemas(@PathVariable(value = "consumerID") long id) {
Set<PrintingSchema> consumerSchemas = consumers.findOne(id).getPrintingSchemas();
JsonObject response = new JsonObject();
if(consumerSchemas!=null) {
response.addProperty("success", true);
response.add("pschemas",GSON.toJsonTree(consumerSchemas));
return GSON.toJson(response);
} else {
response.addProperty("success", false);
return GSON.toJson(response);
}
}
/**
* Add a new PrintingSchema to user's printing schemas collection.
* Test
* curl --data "name=MyFancySchema&bindingSpecs=SPIRAL&coverSpecs=CRISTAL_ACETATE&paperSpecs=COLOR,A4,SIMPLEX" -u joao:1234 localhost:8080/consumer/1001/printingschemas
* @param id, the id of the consumer.
* @param ps, the PrintingSchema created by the consumer.
* @return HttpStatus.OK if everything went well.
*/
@ApiOperation(value = "Returns success/insuccess.", notes = "This method allows consumers to add a new printing schema to his printing schemas collection.")
@Secured({"ROLE_USER"})
@RequestMapping(value = "/consumer/{consumerID}/printingschemas", method = RequestMethod.POST)
public String addNewConsumerPrintingSchema(@PathVariable(value = "consumerID") long id, @RequestBody PrintingSchema ps) {
JsonObject obj = new JsonObject();
Consumer c = consumers.findOne(id);
PrintingSchema addedPS = printingSchemas.save(ps);
boolean res = c.addPrintingSchema(addedPS);
if(res) {
consumers.save(c);
obj.addProperty("success", true);
obj.addProperty("id", addedPS.getId());
return GSON.toJson(obj);
} else {
obj.addProperty("success", false);
return GSON.toJson(obj);
}
}
/**
* Delete a PrintingSchema.
* Test
* curl -u joao:1234 -X DELETE localhost:8080/consumer/1001/printingschemas/{printingSchemaID}
* @param cid, the id of the consumer.
* @param psid, the id of the printing schema to delete.
* @return HttpStatus.OK if everything went well.
*/
@ApiOperation(value = "Returns success/insuccess.", notes = "This method allows consumers to delete a printing schema from his printing schemas collection.")
@Secured({"ROLE_USER"})
@RequestMapping(value = "/consumer/{consumerID}/printingschemas/{printingSchemaID}", method = RequestMethod.DELETE)
public String deleteConsumerPrintingSchema(@PathVariable(value = "consumerID") long cid, @PathVariable(value = "printingSchemaID") long psid) {
JsonObject obj = new JsonObject();
PrintingSchema ps = printingSchemas.findOne(psid);
if(!ps.isDeleted()) {
ps.delete();
printingSchemas.save(ps);
obj.addProperty("success", true);
} else {
obj.addProperty("false", true);
}
return GSON.toJson(obj);
}
/**
* Edit an existing PrintingSchema.
* Test
* curl -X PUT --data "name=MyFancyEditedSchema&bindingSpecs=STAPLING&paperSpecs=COLOR,A4,SIMPLEX" -u joao:1234 localhost:8080/consumer/1001/printingschemas/{printingSchemaID}
* @param cid, the id of the consumer.
* @param psid, the PrintingSchema id.
* @return HttpStatus.OK if everything went well.
*/
@ApiOperation(value = "Returns success/insuccess.", notes = "This method allows consumers to edit a printing schema from his printing schemas collection.")
@Secured({"ROLE_USER"})
@RequestMapping(value = "/consumer/{consumerID}/printingschemas/{printingSchemaID}", method = RequestMethod.PUT)
public ResponseEntity<String> editConsumerPrintingSchema(@PathVariable(value = "consumerID") long cid, @PathVariable(value = "printingSchemaID") long psid, @RequestBody PrintingSchema pschema) {
PrintingSchema ps = printingSchemas.findOne(psid);
ps.setBindingSpecs(pschema.getBindingSpecs());
ps.setCoverSpecs(pschema.getCoverSpecs());
ps.setName(pschema.getName());
ps.setPaperSpecs(pschema.getPaperSpecs());
JsonObject obj = new JsonObject();
PrintingSchema res = printingSchemas.save(ps);
if(res!=null) {
obj.addProperty("success", true);
return new ResponseEntity<>(GSON.toJson(obj), HttpStatus.OK);
} else {
obj.addProperty("success", false);
return new ResponseEntity<>(GSON.toJson(obj), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
}
|
[
"arcuri82@gmail.com"
] |
arcuri82@gmail.com
|
49993b088dfcc01391d39cfecc490f82b6a43543
|
133f0936e0e3b9e4753ce0d679fa293969543eee
|
/emgui_beSa/JAVA 3/vidu/Advanced_JAVA_1/src/session08/URL_methods.java
|
63db6a7c0797fd06e4897571500b5f0bea6f05d5
|
[] |
no_license
|
trandai201/StudyJS
|
95ab6ea28b3e07608ba64d1041faf35559e24ef9
|
a22952e1c0acf696be9f260432c69ed213074ec7
|
refs/heads/main
| 2023-07-10T21:07:52.236664
| 2021-08-15T06:35:35
| 2021-08-15T06:35:35
| 390,725,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 949
|
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 session08;
import java.net.MalformedURLException;
import java.net.URL;
/**
*
* @author nguyenducthao
*/
public class URL_methods {
public static void main(String[] args) throws MalformedURLException {
URL myUrl=new URL("https://www.google.com.vn/webhp?sourceid=chrome-instant&rlz=1C1CHZL_viVN732VN732&ion=1&espv=2&ie=UTF-8#q=aptech&*");
System.out.println("myUrl: "+myUrl);
System.out.println("Host: "+myUrl.getHost());
System.out.println("File: "+myUrl.getFile());
System.out.println("Path: "+myUrl.getPath());
System.out.println("Query: "+myUrl.getQuery());
System.out.println("Default port: "+myUrl.getDefaultPort());
System.out.println("Protocol: "+myUrl.getProtocol());
}
}
|
[
"="
] |
=
|
fdafe14dc5ab429fafa7ef54440edf5696c2a738
|
9c6755241eafce525184949f8c5dd11d2e6cefd1
|
/src/leetcode/algorithms/ConvertBST.java
|
f974adc9b104db2d5f5c81c07b9c881de043f1ce
|
[] |
no_license
|
Baltan/leetcode
|
782491c3281ad04efbe01dd0dcba2d9a71637a31
|
0951d7371ab93800e04429fa48ce99c51284d4c4
|
refs/heads/master
| 2023-08-17T00:47:41.880502
| 2023-08-16T16:04:32
| 2023-08-16T16:04:32
| 172,838,932
| 13
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 930
|
java
|
package leetcode.algorithms;
import leetcode.entity.TreeNode;
import leetcode.util.BinaryTreeUtils;
/**
* Description: 538. Convert BST to Greater Tree
*
* @author Baltan
* @date 2019-02-25 10:02
*/
public class ConvertBST {
private static int sum = 0;
public static void main(String[] args) {
TreeNode root1 = BinaryTreeUtils.arrayToBinaryTree(new Integer[]{5, 2, 13}, 0);
System.out.println(convertBST(root1));
}
/**
* 参考:
* <a href="https://leetcode-cn.com/problems/convert-bst-to-greater-tree/solution/ba-er-cha-sou-suo-shu-zhuan-huan-wei-lei-jia-sh-14/"></a>
*
* @param root
* @return
*/
public static TreeNode convertBST(TreeNode root) {
if (root == null) {
return null;
}
convertBST(root.right);
sum += root.val;
root.val = sum;
convertBST(root.left);
return root;
}
}
|
[
"617640006@qq.com"
] |
617640006@qq.com
|
dc5adefce27a7c6df82e17b6f8c29855801988e5
|
9a52fe3bcdd090a396e59c68c63130f32c54a7a8
|
/sources/com/iab/omid/library/inmobi/publisher/C2102a.java
|
eedcc8d0a7784bb45f0bbeea4bae2348b5e4f05b
|
[] |
no_license
|
mzkh/LudoKing
|
19d7c76a298ee5bd1454736063bc392e103a8203
|
ee0d0e75ed9fa8894ed9877576d8e5589813b1ba
|
refs/heads/master
| 2022-04-25T06:08:41.916017
| 2020-04-14T17:00:45
| 2020-04-14T17:00:45
| 255,670,636
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 502
|
java
|
package com.iab.omid.library.inmobi.publisher;
import android.annotation.SuppressLint;
import android.webkit.WebView;
/* renamed from: com.iab.omid.library.inmobi.publisher.a */
public class C2102a extends AdSessionStatePublisher {
@SuppressLint({"SetJavaScriptEnabled"})
public C2102a(WebView webView) {
if (webView != null && !webView.getSettings().getJavaScriptEnabled()) {
webView.getSettings().setJavaScriptEnabled(true);
}
mo27596a(webView);
}
}
|
[
"mdkhnmm@amazon.com"
] |
mdkhnmm@amazon.com
|
58b1d033218b378064b009cb2d65abd4b8c4e3b5
|
6603800930bd02c7fd06952797b5171e7591394c
|
/src/test/java/com/example/demo/TimeOutDemo.java
|
f30f6ef256214401ff74801139b62a309bda31ec
|
[] |
no_license
|
umanking/spring-junit5-example
|
1864583a8e947f712cd14dd877b4121972c86d4b
|
7ebc2d4dc922a351723866528685690905c19fb0
|
refs/heads/master
| 2022-12-01T18:55:54.279316
| 2020-08-21T09:01:58
| 2020-08-21T09:01:58
| 286,653,632
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 406
|
java
|
package com.example.demo;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import java.util.concurrent.TimeUnit;
/**
* @author Geonguk Han
* @since 2020-08-20
*/
public class TimeOutDemo {
@Test
@Timeout(value = 100, unit = TimeUnit.MILLISECONDS)
void failsIfExecutionTimeExceeds100Milliseconds() throws InterruptedException {
Thread.sleep(200);
}
}
|
[
"umanking@gmail.com"
] |
umanking@gmail.com
|
b989d97eaf784ae4f9734317cae5d4dd3b77151c
|
75950d61f2e7517f3fe4c32f0109b203d41466bf
|
/modules/tags/sca-1.1-assembly-conformance/kernel/api/fabric3-spi/src/main/java/org/fabric3/spi/host/Port.java
|
0827d3ca82247a7939f8d79f1d1b0284e7033868
|
[] |
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,499
|
java
|
/*
* Fabric3
* Copyright (c) 2009-2011 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.spi.host;
/**
* A reserved port on a runtime. After reserving a port, clients must release the port lock prior to binding a socket to the port using {@link
* #releaseLock()}.
*
* @version $Rev$ $Date$
*/
public interface Port {
/**
* Returns the port name.
*
* @return the port name
*/
String getName();
/**
* Returns the port number.
*
* @return the port number
*/
int getNumber();
/**
* Releases the port lock so that a socket may be bound to the port. This method may be called any number of times.
*/
void releaseLock();
}
|
[
"jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf"
] |
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
|
e644a08fd2435ebac496ccd5927ac45c3c0ba0c7
|
ed3bccd412e16b54d0fec06454408bc13c420e0d
|
/HTOAWork/src/com/ht/mapper/finance/FinanceFeedbackdetailMapper.java
|
5292bf3c51d26bfc49a90af634c28e53e48359f8
|
[] |
no_license
|
Hholz/HTOAWork
|
387978548874d1660c559b30b97b9570956b47dd
|
bacafc4e291e4e9f68bfded90bf3698c704c874c
|
refs/heads/master
| 2021-01-12T05:23:07.621967
| 2017-01-03T12:44:51
| 2017-01-03T12:44:51
| 77,915,150
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 679
|
java
|
package com.ht.mapper.finance;
import java.util.List;
import com.ht.popj.finance.FinanceFeedbackdetail;
public interface FinanceFeedbackdetailMapper {
int deleteByPrimaryKey(Integer id);
int insert(FinanceFeedbackdetail record);
int insertSelective(FinanceFeedbackdetail record);
FinanceFeedbackdetail selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(FinanceFeedbackdetail record);
int updateByPrimaryKey(FinanceFeedbackdetail record);
List<FinanceFeedbackdetail> selectAll();
List<FinanceFeedbackdetail> selectDynamic(FinanceFeedbackdetail record);
int countScoreByfeedbackId(int id);
}
|
[
"h_holz@qq.com"
] |
h_holz@qq.com
|
b1ad6d5124a58573a0a1e5547ab7ec21c9dbcfd2
|
54f2a3f9839611e58eecfd63199c340258a0e841
|
/android/app/src/main/java/com/demo_3984/MainApplication.java
|
ee80e26557a2fa3473fbfca951cd576efd9e7888
|
[] |
no_license
|
crowdbotics-apps/demo-3984
|
430a60beac313a0fc0554f79c2809119219d30db
|
668d975862e93803c39b040eb07a54f17849f9d6
|
refs/heads/master
| 2022-12-13T08:12:42.289947
| 2019-05-29T17:44:37
| 2019-05-29T17:44:37
| 189,272,106
| 0
| 0
| null | 2022-12-09T04:24:34
| 2019-05-29T17:44:22
|
Python
|
UTF-8
|
Java
| false
| false
| 1,045
|
java
|
package com.demo_3984;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
|
[
"team@crowdbotics.com"
] |
team@crowdbotics.com
|
5b982a095874198970cff89a83cc2730fa3438e6
|
2221cc76af6d26b9dcc49c0722a4a577601692e3
|
/Egbert/AlgorithmTesting/src/Facebook/ValidIPAddress.java
|
f46a9d5d5ee8ecd40dc8bec6fdf009b3398b3fe2
|
[] |
no_license
|
hanrick2000/A-Record-of-My-Problem-Solving-Journey
|
f8cca769ce08f0b1cd9ab36abcb4f7c8b91ba591
|
1b9326adcf61eacf0649bc4724b11d8259a79621
|
refs/heads/master
| 2022-02-24T03:09:54.644809
| 2019-09-24T18:32:53
| 2019-09-24T18:32:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,774
|
java
|
package Facebook;
/**
* @leetcode https://leetcode.com/problems/validate-ip-address/
* @Time N
* @Space N
*/
public class ValidIPAddress {
public String validIPAddress(String ip) {
if (isValidIpv4(ip)) {
return "IPv4";
} else if (isValidIpv6(ip)) {
return "IPv6";
} else {
return "Neither";
}
}
private boolean isValidIpv4(String ip) {
if (ip.length() < 7) {
return false;
} else if (ip.startsWith(".") || ip.charAt(ip.length() - 1) == '.') {
return false;
}
String[] array = ip.split("\\.");
if (array.length != 4) {
return false;
}
for (String str : array) {
if (!isValidIpv4Token(str)) {
return false;
}
}
return true;
}
private boolean isValidIpv4Token(String token) {
if (token.startsWith("0") && token.length() > 1) {
return false;
}
try {
int digit = Integer.parseInt(token);
if (digit < 0 || digit > 255) {
return false;
} else if (digit == 0 && token.length() > 1) {
return false;
}
} catch(NumberFormatException nfe) {
return false;
}
return true;
}
private boolean isValidIpv6(String ip) {
if (ip.length() < 15) {
return false;
} else if (ip.startsWith(":") || ip.charAt(ip.length() - 1) == ':') {
return false;
}
String[] array = ip.split(":");
if (array.length != 8) {
return false;
}
for (String token : array) {
if (!isValidIpv6Token(token)) {
return false;
}
}
return true;
}
private boolean isValidIpv6Token(String token) {
if (token.length() == 0 || token.length() > 4) {
return false;
}
for (int i = 0; i < token.length(); i++) {
char ch = token.charAt(i);
boolean isDigit = (ch >= '0' && ch <= '9');
boolean isLowerCase = (ch >= 'a' && ch <= 'f');
boolean isUpperCase = (ch >= 'A' && ch <= 'F');
if (!(isDigit || isLowerCase || isUpperCase)) {
return false;
}
}
return true;
}
public static void main(String[] args) {
String input = "2001:db8:85a3:0::8a2E:0370:7334";
String[] array = input.split(":");
// System.out.println(array.length);
// System.out.println(':' >= 'a' && ':' <= 'f');
for (String str : array) {
System.out.println(str + " " + str.length());
}
}
}
|
[
"egbert1121@gmail.com"
] |
egbert1121@gmail.com
|
13d9f3fc4a7975a070b462c39b57791055b4241f
|
779b5b6cf3a09851b27bcc59d1696581b7fa03d1
|
/acepricot-sync/src/com/acepricot/finance/sync/Test.java
|
6df3e1fedc0825a2f7e62e5041922f0e05015fe9
|
[] |
no_license
|
futre153/bb
|
b9709e920f48bb35346b5460b4fd8132f3fdc664
|
8256c3cb2ef0df844a12747172005a5e1d5f14c1
|
refs/heads/master
| 2020-04-05T23:11:32.651132
| 2016-09-23T12:25:43
| 2016-09-23T12:25:43
| 21,938,990
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 760
|
java
|
package com.acepricot.finance.sync;
import java.io.IOException;
import java.util.InvalidPropertiesFormatException;
import javax.naming.NamingException;
public class Test {
@SuppressWarnings({ })
public static void main(String[] args) throws InvalidPropertiesFormatException, IOException, NamingException {
/*JSONMessage msg = new JSONMessage();
Gson gson = new Gson();
msg.setHeader("heartbeat");
double date = new Date().getTime();
msg.setBody(new Object[]{date, Calendar.getInstance()});
String json = gson.toJson(msg);
System.out.println(json);
JSONMessage msg2 = gson.fromJson(json, JSONMessage.class);
Object[] obj = msg2.getBody();
double l = (double) obj[0];
Map c = (Map) obj[1];
*/
}
}
|
[
"futre@szm.sk"
] |
futre@szm.sk
|
86c5e6a0d60055640fd9ba22f1f3b51f40f38cea
|
975e8cce8a7b49176166cc50c3891912e083d612
|
/org.encog/src/org/encog/neural/data/PropertyData.java
|
4cbec909398732f0c6f69ef70b9e61d1625d88ed
|
[] |
no_license
|
EmmanuelSotelo/ProjectDow
|
4dd28ba2e42bc8e37f4d177ab2ba6b2ade763d11
|
89019ca243df120ea10720161bd2bc2468d8768a
|
refs/heads/master
| 2021-01-04T14:07:06.975335
| 2013-05-12T06:00:56
| 2013-05-12T06:00:56
| 10,009,882
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,562
|
java
|
/*
* Encog Artificial Intelligence Framework v2.x
* Java Version
* http://www.heatonresearch.com/encog/
* http://code.google.com/p/encog-java/
*
* Copyright 2008-2009, Heaton Research Inc., and individual contributors.
* See the copyright.txt in the distribution for a full listing of
* individual contributors.
*
* This 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 software 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 software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.encog.neural.data;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.encog.EncogError;
import org.encog.persist.EncogPersistedObject;
import org.encog.persist.Persistor;
import org.encog.persist.persistors.PropertyDataPersistor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* An Encog data object that can be used to hold property data. This is a
* collection of name-value pairs that can be saved in an Encog persisted file.
*
* @author jheaton
*
*/
public class PropertyData implements EncogPersistedObject {
/**
* The serial id.
*/
private static final long serialVersionUID = -7940416732740995199L;
/**
* The name.
*/
private String name;
/**
* The description.
*/
private String description;
/**
* The property data.
*/
private final Map<String, String> data = new HashMap<String, String>();
/**
* The logging object.
*/
@SuppressWarnings("unused")
private final Logger logger = LoggerFactory.getLogger(this.getClass());
/**
* Clone this object.
*
* @return A clonned version of this object.
*/
@Override
public Object clone() {
final PropertyData result = new PropertyData();
result.setName(getName());
result.setDescription(getDescription());
for (final String key : this.data.keySet()) {
result.set(key, get(key));
}
return result;
}
/**
* @return A persistor for the property data.
*/
public Persistor createPersistor() {
return new PropertyDataPersistor();
}
/**
* Get the specified property.
*
* @param name
* The property name.
* @return The property value.
*/
public String get(final String name) {
return this.data.get(name);
}
/**
* Get all of the property data as a map.
*
* @return The property data.
*/
public Map<String, String> getData() {
return this.data;
}
/**
* Get a property as a date.
*
* @param field
* The name of the field.
* @return The date value.
*/
public Date getDate(final String field) {
try {
final String str = get(field);
final DateFormat formatter = new SimpleDateFormat("MM/dd/yy");
final Date date = formatter.parse(str);
return date;
} catch (final ParseException e) {
throw new EncogError(e);
}
}
/**
* @return The description of this object.
*/
public String getDescription() {
return this.description;
}
/**
* Get a property as a double.
*
* @param field
* The name of the field.
* @return The double value.
*/
public double getDouble(final String field) {
final String str = get(field);
try {
return Double.parseDouble(str);
} catch (final NumberFormatException e) {
throw new EncogError(e);
}
}
/**
* Get a property as an integer.
*
* @param field
* The name of the field.
* @return The integer value.
*/
public int getInteger(final String field) {
final String str = get(field);
try {
return Integer.parseInt(str);
} catch (final NumberFormatException e) {
throw new EncogError(e);
}
}
/**
* @return The name of this object.
*/
public String getName() {
return this.name;
}
/**
* Determine of the specified property is defined.
*
* @param key
* The property to check.
* @return True if this property is defined.
*/
public boolean isDefined(final String key) {
return this.data.containsKey(key);
}
/**
* Remove the specified property.
*
* @param key
* The property to remove.
*/
public void remove(final String key) {
this.data.remove(key);
}
/**
* Set the specified property.
*
* @param name
* The name of the property.
* @param value
* The value to set the property to.
*/
public void set(final String name, final String value) {
this.data.put(name, value);
}
/**
* Set the description for this object.
*
* @param description
* The description of this property.
*/
public void setDescription(final String description) {
this.description = description;
}
/**
* Set the name of this property.
*
* @param name
* The name of this property.
*/
public void setName(final String name) {
this.name = name;
}
/**
* @return The number of properties defined.
*/
public int size() {
return this.data.size();
}
}
|
[
"e"
] |
e
|
f9a54009d5b9fb70f9467599d91d58c7de34b125
|
3f50982ca12e467b6a48ab2735bd889b5a2eb530
|
/dianyu-web/src/main/java/com/haier/openplatform/ueditor/PathFormat.java
|
066c6137799260e1346291abf31c70a0116ea2d0
|
[] |
no_license
|
527088995/dianyu
|
3c1229ca3bddc70ea20cfa733f5d25ee023a3131
|
ff9de3c731b65ba5ef230c3e3137f24042bbe822
|
refs/heads/master
| 2021-01-20T16:48:13.932544
| 2019-01-31T08:19:58
| 2019-01-31T08:19:58
| 90,849,027
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,648
|
java
|
package com.haier.openplatform.ueditor;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 文件路径格式化,使用UEditor的路径规则
* @author L.cm
*/
public class PathFormat {
private static final String TIME = "time";
private static final String FULL_YEAR = "yyyy";
private static final String YEAR = "yy";
private static final String MONTH = "mm";
private static final String DAY = "dd";
private static final String HOUR = "hh";
private static final String MINUTE = "ii";
private static final String SECOND = "ss";
private static final String RAND = "rand";
/**
* 解析路径
* @param input 路径表达式
* @return 路径
*/
public static String parse(String input) {
return PathFormat.parse(input, null);
}
/**
* 解析路径
* @param input 路径表达式
* @param filename 原文件名
* @return 路径
*/
public static String parse(String input, String filename) {
Pattern pattern = Pattern.compile("\\{([^\\}]+)\\}", Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(input);
Date currentDate = new Date();
StringBuffer sb = new StringBuffer();
String matchStr = null;
while (matcher.find()) {
matchStr = matcher.group(1);
if (null != filename && matchStr.indexOf("filename") != -1) {
filename = filename.replace("$", "\\$").replaceAll("[\\/:*?\"<>|]", "");
matcher.appendReplacement(sb, filename);
} else {
matcher.appendReplacement(sb, PathFormat.getString(matchStr, currentDate));
}
}
matcher.appendTail(sb);
return sb.toString();
}
private static String getString(String pattern, Date currentDate) {
pattern = pattern.toLowerCase();
// time 处理
if (pattern.indexOf(PathFormat.TIME) != -1) {
return PathFormat.getTimestamp();
} else if (pattern.indexOf(PathFormat.FULL_YEAR) != -1) {
return PathFormat.format(currentDate, "yyyy");
} else if (pattern.indexOf(PathFormat.YEAR) != -1) {
return PathFormat.format(currentDate, "yy");
} else if (pattern.indexOf(PathFormat.MONTH) != -1) {
return PathFormat.format(currentDate, "MM");
} else if (pattern.indexOf(PathFormat.DAY) != -1) {
return PathFormat.format(currentDate, "dd");
} else if (pattern.indexOf(PathFormat.HOUR) != -1) {
return PathFormat.format(currentDate, "HH");
} else if (pattern.indexOf(PathFormat.MINUTE) != -1) {
return PathFormat.format(currentDate, "mm");
} else if (pattern.indexOf(PathFormat.SECOND) != -1) {
return PathFormat.format(currentDate, "ss");
} else if (pattern.indexOf(PathFormat.RAND) != -1) {
return PathFormat.getRandom(pattern);
}
return pattern;
}
private static String getTimestamp() {
return String.valueOf(System.currentTimeMillis());
}
/**
* 格式化路径, 把windows路径替换成标准路径
*
* @param input
* 待格式化的路径
* @return 格式化后的路径
*/
public static String format(String input) {
return input.replace("\\", "/");
}
/**
* 日期格式化
* @param date 时间
* @param pattern 表达式
* @return 格式化后的时间
*/
private static String format(Date date, String pattern) {
SimpleDateFormat format = new SimpleDateFormat(pattern);
return format.format(date);
}
private static String getRandom(String pattern) {
int length = 0;
pattern = pattern.split(":")[1].trim();
length = Integer.parseInt(pattern);
return (Math.random() + "").replace(".", "").substring(0, length);
}
}
|
[
"527088995@qq.com"
] |
527088995@qq.com
|
7fcb6963168698990d437394432ed7b7b76e8e43
|
027cd7112ef70fbcdb2670a009654f360bb7e06e
|
/org/eclipse/swt/widgets/Monitor.java
|
8efbd002c254ad07046c94ff89c23a5c214250e4
|
[] |
no_license
|
code4ghana/courseScheduler
|
1c968ebc249a75661bdc22075408fc60e6d0df19
|
9885df3638c6b287841f8a7b751cfe1523a68fb2
|
refs/heads/master
| 2016-08-03T14:06:38.715664
| 2014-08-03T03:37:36
| 2014-08-03T03:37:36
| 22,566,289
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 973
|
java
|
package org.eclipse.swt.widgets;
import org.eclipse.swt.graphics.Rectangle;
public final class Monitor
{
int handle;
int x;
int y;
int width;
int height;
int clientX;
int clientY;
int clientWidth;
int clientHeight;
public boolean equals(Object paramObject)
{
if (paramObject == this)
return true;
if (!(paramObject instanceof Monitor))
return false;
Monitor localMonitor = (Monitor)paramObject;
return this.handle == localMonitor.handle;
}
public Rectangle getBounds()
{
return new Rectangle(this.x, this.y, this.width, this.height);
}
public Rectangle getClientArea()
{
return new Rectangle(this.clientX, this.clientY, this.clientWidth, this.clientHeight);
}
public int hashCode()
{
return this.handle;
}
}
/* Location: /Users/jeff.kusi/Downloads/AutomatedScheduler - Fakhry & Kusi.jar
* Qualified Name: org.eclipse.swt.widgets.Monitor
* JD-Core Version: 0.6.2
*/
|
[
"jeff.kusi@willowtreeapps.com"
] |
jeff.kusi@willowtreeapps.com
|
0457a73e884cf08ec79012bc6073f144b6b0120f
|
260ffca605956d7cb9490a8c33e2fe856e5c97bf
|
/src/com/google/android/gms/auth/api/proxy/ProxyGrpcRequest.java
|
720e88695af71ec2fa0f246e59bac219e3b0238f
|
[] |
no_license
|
yazid2016/com.incorporateapps.fakegps.fre
|
cf7f1802fcc6608ff9a1b82b73a17675d8068beb
|
44856c804cea36982fcc61d039a46761a8103787
|
refs/heads/master
| 2021-06-02T23:32:09.654199
| 2016-07-21T03:28:48
| 2016-07-21T03:28:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,123
|
java
|
package com.google.android.gms.auth.api.proxy;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
public class ProxyGrpcRequest
implements SafeParcelable
{
public static final Parcelable.Creator CREATOR = new zza();
public final byte[] body;
public final String hostname;
public final String method;
public final int port;
public final long timeoutMillis;
final int versionCode;
ProxyGrpcRequest(int paramInt1, String paramString1, int paramInt2, long paramLong, byte[] paramArrayOfByte, String paramString2)
{
versionCode = paramInt1;
hostname = paramString1;
port = paramInt2;
timeoutMillis = paramLong;
body = paramArrayOfByte;
method = paramString2;
}
public int describeContents()
{
return 0;
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
zza.zza(this, paramParcel, paramInt);
}
}
/* Location:
* Qualified Name: com.google.android.gms.auth.api.proxy.ProxyGrpcRequest
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
b6819fe748b1b4a5baf171923ca33499c4e0c338
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-58b-10-11-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/fitting/CurveFitter_ESTest.java
|
da32033309f9d2ab59aabbe9e2e3fa855e333ebf
|
[] |
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
| 573
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Apr 04 08:14:03 UTC 2020
*/
package org.apache.commons.math.optimization.fitting;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class CurveFitter_ESTest extends CurveFitter_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
08f4b26494e7a09e1df0296b4d7981e8c98e8bb1
|
b28d60148840faf555babda5ed44ed0f1b164b2c
|
/java/misshare_cloud-multi-tenant/common-repo/src/main/java/com/qhieco/webmapper/DiscountPackageMapper.java
|
d1b0b8af34f3bd30773747a0710af873fb80101d
|
[] |
no_license
|
soon14/Easy_Spring_Backend
|
e2ec16afb1986ea19df70821d96edcb922d7978e
|
49bceae4b0c3294945dc4ad7ff53cae586127e50
|
refs/heads/master
| 2020-07-26T16:12:01.337615
| 2019-04-09T08:15:37
| 2019-04-09T08:15:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,694
|
java
|
package com.qhieco.webmapper;
import com.qhieco.request.web.DiscountPackageRequest;
import com.qhieco.response.data.web.DiscountFormatSumData;
import com.qhieco.response.data.web.DiscountPackageData;
import com.qhieco.response.data.web.DiscountPackageStaticData;
import com.qhieco.response.data.web.DiscountRuleTimeData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author 徐文敏
* @version 2.0.1 创建时间: 2018/7/11 10:50
* <p>
* 类说明:
* ${说明}
*/
@Mapper
public interface DiscountPackageMapper {
/**
* 分页查询套餐信息
*
* @param request
* @return
*/
List<DiscountPackageData> pageDiscountPackage(DiscountPackageRequest request);
/**
* 查询套餐信息总记录数
*
* @param request
* @return
*/
Integer pageDiscountPackageTotalCount(DiscountPackageRequest request);
/**
* 分页查询套餐统计信息
* @param request
* @return
*/
List<DiscountPackageData> pagePackageStatic(DiscountPackageRequest request);
/**
* 查询套餐统计总记录数
* @param request
* @return
*/
Integer pagePackageStaticTotalCount(DiscountPackageRequest request);
/**
* 获取套餐详细
* @param request
* @return
*/
DiscountPackageData findPackageDetailed(DiscountPackageRequest request);
/**
* 根据套餐获取时段详细列表
* @param request
* @return
*/
List<DiscountRuleTimeData> findRuleTimeList(DiscountPackageRequest request);
/**
* 根据套餐获取规格列表
* @param request
* @return
*/
List<DiscountFormatSumData> findFormatSumList(DiscountPackageRequest request);
/**
* 新增套餐详细
* @param request
* @return
*/
int insertDiscountPackageData(DiscountPackageRequest request);
/**
* 修改套餐详细
* @param request
* @return
*/
int updateDiscountPackageData(DiscountPackageRequest request);
/**
* 修改套餐展示状态
* @param request
* @return
*/
int updateParklotState(DiscountPackageRequest request);
/**
* 修改时间段状态为禁用
* @param request
* @return
*/
int updateRuleTimeState(DiscountPackageRequest request);
/**
* 根据套餐新增时段
* @param request
* @return
*/
int insertRuleTimeData(DiscountPackageRequest request);
/**
* 导出套餐列表
* @param request
* @return
*/
List<DiscountPackageData> excelPackage(DiscountPackageRequest request);
/**
* 根据小区获取绑定套餐
* @return
*/
DiscountPackageData findParklotPackageByParkId(Integer parklotId);
/**
* 删除小区套餐关联关系
* @return
*/
int delParklotByPackage(@Param("parklotId") Integer parklotId, @Param("packageId") Integer packageId);
/**
* 保存小区套餐关联关系
* @return
*/
int saveParklotByPackage(@Param("parklotId") Integer parklotId, @Param("packageId") Integer packageId, @Param("packageState") Integer packageState);
/**
* 导出套餐统计列表
* @param request
* @return
*/
List<DiscountPackageStaticData> excelStaticPackage(DiscountPackageRequest request);
/**
* 保存套餐关联规格关系
* @param daytime,sumNumber,packageId
*/
void insertFormatSumData(@Param("daytime") String daytime, @Param("sumNumber") String sumNumber, @Param("packageId") Integer packageId);
void delFormatSumData(Integer packageId);
}
|
[
"k2160789@163.com"
] |
k2160789@163.com
|
3fa3b35f85a5ba5e5d11e2eadc600c36956ad14b
|
14076d999bb51bafb73222c22b190d2edb1b1f86
|
/merchant-credit/debit-dao/src/main/java/com/shengpay/debit/dal/dataobject/DbThreadBatchPO.java
|
c0746f752bed742f8ded5a006f8477b8e87f03de
|
[] |
no_license
|
kevinkerry/merchant-credit
|
d3a9b397ddcd79d28925fa42121264da46eb91d4
|
14d3ad60795dcf251bd3066de14f0a731f89b73f
|
refs/heads/master
| 2021-04-03T09:09:43.601015
| 2017-07-28T06:07:14
| 2017-07-28T06:07:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,916
|
java
|
package com.shengpay.debit.dal.dataobject;
import java.io.Serializable;
import java.util.Date;
public class DbThreadBatchPO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* DECIMAL(18) 必填<br>
*
*/
private Long id;
/**
* VARCHAR(32)<br>
* 批处理编号
*/
private String batchCode;
/**
* VARCHAR(32)<br>
* 批次号
*/
private String serilizeCode;
/**
* TIMESTAMP(11,6)<br>
* 开始时间
*/
private Date startTime;
/**
* TIMESTAMP(11,6)<br>
* 结束时间
*/
private Date endTime;
/**
* DECIMAL(5)<br>
* 重试次数
*/
private Integer retryCount;
/**
* DECIMAL(18)<br>
* 影响数量
*/
private Long recordCount;
/**
* DECIMAL(5)<br>
* 执行结果
*/
private Integer executeResult;
/**
* VARCHAR(200)<br>
* 备注
*/
private String memo;
/**
* TIMESTAMP(11,6) 必填<br>
* 创建时间
*/
private Date createTime;
/**
* TIMESTAMP(11,6) 必填<br>
* 修改时间
*/
private Date updateTime;
/**
* DECIMAL(5)<br>
* 线程运行状态
*/
private Integer runningStatus;
/**
* DECIMAL(18) 必填<br>
*/
public Long getId() {
return id;
}
/**
* DECIMAL(18) 必填<br>
*/
public void setId(Long id) {
this.id = id;
}
/**
* VARCHAR(32)<br>
* 获得 批处理编号
*/
public String getBatchCode() {
return batchCode;
}
/**
* VARCHAR(32)<br>
* 设置 批处理编号
*/
public void setBatchCode(String batchCode) {
this.batchCode = batchCode == null ? null : batchCode.trim();
}
/**
* VARCHAR(32)<br>
* 获得 批次号
*/
public String getSerilizeCode() {
return serilizeCode;
}
/**
* VARCHAR(32)<br>
* 设置 批次号
*/
public void setSerilizeCode(String serilizeCode) {
this.serilizeCode = serilizeCode == null ? null : serilizeCode.trim();
}
/**
* TIMESTAMP(11,6)<br>
* 获得 开始时间
*/
public Date getStartTime() {
return startTime;
}
/**
* TIMESTAMP(11,6)<br>
* 设置 开始时间
*/
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
/**
* TIMESTAMP(11,6)<br>
* 获得 结束时间
*/
public Date getEndTime() {
return endTime;
}
/**
* TIMESTAMP(11,6)<br>
* 设置 结束时间
*/
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
/**
* DECIMAL(5)<br>
* 获得 重试次数
*/
public Integer getRetryCount() {
return retryCount;
}
/**
* DECIMAL(5)<br>
* 设置 重试次数
*/
public void setRetryCount(Integer retryCount) {
this.retryCount = retryCount;
}
/**
* DECIMAL(18)<br>
* 获得 影响数量
*/
public Long getRecordCount() {
return recordCount;
}
/**
* DECIMAL(18)<br>
* 设置 影响数量
*/
public void setRecordCount(Long recordCount) {
this.recordCount = recordCount;
}
/**
* DECIMAL(5)<br>
* 获得 执行结果
*/
public Integer getExecuteResult() {
return executeResult;
}
/**
* DECIMAL(5)<br>
* 设置 执行结果
*/
public void setExecuteResult(Integer executeResult) {
this.executeResult = executeResult;
}
/**
* VARCHAR(200)<br>
* 获得 备注
*/
public String getMemo() {
return memo;
}
/**
* VARCHAR(200)<br>
* 设置 备注
*/
public void setMemo(String memo) {
this.memo = memo == null ? null : memo.trim();
}
/**
* TIMESTAMP(11,6) 必填<br>
* 获得 创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* TIMESTAMP(11,6) 必填<br>
* 设置 创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* TIMESTAMP(11,6) 必填<br>
* 获得 修改时间
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* TIMESTAMP(11,6) 必填<br>
* 设置 修改时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* DECIMAL(5)<br>
* 获得 线程运行状态
*/
public Integer getRunningStatus() {
return runningStatus;
}
/**
* DECIMAL(5)<br>
* 设置 线程运行状态
*/
public void setRunningStatus(Integer runningStatus) {
this.runningStatus = runningStatus;
}
}
|
[
"bishuai@shengpay.com"
] |
bishuai@shengpay.com
|
7b6be555d4e83bbf343ac708217646beb80bc650
|
aba003fb0ca1a178de2badcd3b6df77b773dc0dc
|
/app/src/main/java/com/wongxd/shopunit/bean/China.java
|
e2b131eeb9d26d0c3bfb1bd89c8e848691d93ecb
|
[] |
no_license
|
NamedJack/ShopUnit
|
a10f5eda7a8cd0decfaaba2b5e603898fad8bb80
|
90e4ed56d7e3287c0c6884fe4634f330190e1f48
|
refs/heads/master
| 2021-08-23T15:04:04.022482
| 2017-12-05T09:59:11
| 2017-12-05T09:59:14
| 113,165,007
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 405
|
java
|
package com.wongxd.shopunit.bean;
import java.util.ArrayList;
public class China {
public ArrayList<Province> citylist;
public class Province {
public ArrayList<Area> c ;
public String p;
public class Area{
public ArrayList<Street> a;
public String n;
public class Street{
public String s;
}
}
}
}
|
[
"1033675097@qq.com"
] |
1033675097@qq.com
|
a341bc630c4ac14d2066971d9a66bc7edbad9c92
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/mockito--mockito/eec5f6f09de4c6363b36131dfc0400d1a101e39f/before/MockitoJUnitRunnerTest.java
|
32fe44184f24b163e53774f88da2ffe780413df8
|
[] |
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
| 2,858
|
java
|
package org.mockitousage.junitrunner;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockitousage.IMethods;
import org.mockitoutil.TestBase;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/**
* Created by sfaber on 4/22/16.
*/
public class MockitoJUnitRunnerTest extends TestBase {
@Test public void succeeds_when_all_stubs_were_used() {
JUnitCore runner = new JUnitCore();
//when
Result result = runner.run(
StubbingInConstructorUsed.class,
StubbingInBeforeUsed.class,
StubbingInTestUsed.class
);
//then
assertThat(result).isSuccessful();
}
@Test public void fails_when_stubs_were_not_used() {
JUnitCore runner = new JUnitCore();
Class<?>[] tests = {StubbingInConstructorUnused.class,
StubbingInBeforeUnused.class,
StubbingInTestUnused.class};
//when
Result result = runner.run(tests);
System.out.println(result.getFailures());
//then
assertEquals(tests.length, result.getFailureCount());
}
@RunWith(MockitoJUnitRunner.class)
public static class StubbingInConstructorUsed extends StubbingInConstructorUnused {
@Test public void test() {
assertEquals("1", mock.simpleMethod(1));
}
}
@RunWith(MockitoJUnitRunner.class)
public static class StubbingInConstructorUnused {
IMethods mock = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock();
@Test public void dummy() {}
}
@RunWith(MockitoJUnitRunner.class)
public static class StubbingInBeforeUsed extends StubbingInBeforeUnused {
@Test public void test() {
assertEquals("1", mock.simpleMethod(1));
}
}
@RunWith(MockitoJUnitRunner.class)
public static class StubbingInBeforeUnused {
@Mock IMethods mock;
@Before public void before() {
when(mock.simpleMethod(1)).thenReturn("1");
}
@Test public void dummy() {}
}
@RunWith(MockitoJUnitRunner.class)
public static class StubbingInTestUsed {
@Test public void test() {
IMethods mock = mock(IMethods.class);
when(mock.simpleMethod(1)).thenReturn("1");
assertEquals("1", mock.simpleMethod(1));
}
}
@RunWith(MockitoJUnitRunner.class)
public static class StubbingInTestUnused {
@Test public void test() {
IMethods mock = mock(IMethods.class);
when(mock.simpleMethod(1)).thenReturn("1");
mock.simpleMethod(2); //different arg
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
c190f57167dbecbcca5c05e3f2c46507a057a9cf
|
12a1902c34da37be2da6163547dd4bb096e7f399
|
/src/drug_side_effect_utils/Relation.java
|
6e0933205f3ea62bacadc143b7ca9690eddc9e20
|
[] |
no_license
|
foxlf823/drug_side_effect
|
b21f3bbe9652673f91714d7b395262d5308847e8
|
3600d99834fd405cff6b0bb2dc52a11373b853fc
|
refs/heads/master
| 2021-01-10T11:41:02.303600
| 2016-09-04T06:24:05
| 2016-09-04T06:24:05
| 44,713,320
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,178
|
java
|
package drug_side_effect_utils;
import java.io.Serializable;
public class Relation implements Serializable{
private static final long serialVersionUID = 1205844430364130631L;
public String id;
public String type;
public String mesh1;
public String type1;
public String mesh2;
public String type2;
public Relation(String id, String type, String mesh1, String mesh2) {
super();
this.id = id;
this.type = type;
this.mesh1 = mesh1;
this.mesh2 = mesh2;
}
public Relation() {
id = "-1";
type = "";
mesh1 = "-1";
type1 = "";
mesh2 = "-1";
type2 = "";
}
@Override
public boolean equals(Object obj) {
if(obj == null || !(obj instanceof Relation))
return false;
Relation o = (Relation)obj;
if(o.type.equals(this.type)) {
if(o.mesh1.equals(this.mesh1) && o.mesh2.equals(this.mesh2))
return true;
else if(o.mesh1.equals(this.mesh2) && o.mesh2.equals(this.mesh1))
return true;
else
return false;
} else
return false;
}
@Override
public int hashCode() {
return type.hashCode()+mesh1.hashCode()+mesh2.hashCode();
}
@Override
public String toString() {
return mesh1+" "+mesh2+" "+type;
}
}
|
[
"foxlf823@qq.com"
] |
foxlf823@qq.com
|
4e9af20948018c416abee3827c0a053436d9ff1b
|
a2fcac776b8fe2f1e358fd96c65189c12762707c
|
/molgenis-core/src/main/java/org/molgenis/framework/server/services/MolgenisDataTableService.java
|
1d8077901f699441f85d4404adc9b1e61648fc36
|
[] |
no_license
|
joerivandervelde/molgenis-legacy
|
b7895454d44adcf555eb21b00cd455b886d22998
|
51ac5e84c2364e781cde9417c4350ec287951f1a
|
refs/heads/master
| 2020-12-25T09:00:49.940877
| 2015-10-13T06:48:52
| 2015-10-13T06:48:52
| 4,674,333
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,827
|
java
|
package org.molgenis.framework.server.services;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.ParseException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.molgenis.framework.db.Database;
import org.molgenis.framework.db.DatabaseException;
import org.molgenis.framework.db.Query;
import org.molgenis.framework.server.MolgenisContext;
import org.molgenis.framework.server.MolgenisRequest;
import org.molgenis.framework.server.MolgenisResponse;
import org.molgenis.framework.server.MolgenisService;
import org.molgenis.util.Entity;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
/** Service to serve entities for datatable */
public class MolgenisDataTableService implements MolgenisService
{
Logger logger = Logger.getLogger(MolgenisDataTableService.class);
// private MolgenisContext mc;
public MolgenisDataTableService(MolgenisContext mc)
{
// this.mc = mc;
}
/**
* Handle use of the XREF API.
*
*
* @param request
* @param response
*/
@Override
public void handleRequest(MolgenisRequest req, MolgenisResponse res) throws ParseException, DatabaseException,
IOException
{
HttpServletResponse response = res.getResponse();
try
{
response.setHeader("Cache-Control", "max-age=0"); // allow no client
response.setContentType("application/json");
if (req.isNull("entity"))
{
throw new Exception("required parameter 'entity' is missing");
}
// get parameters
Class<? extends Entity> entityClass = req.getDatabase().getClassForName(req.getString("entity"));
// iDisplayLenght = limit
int iDisplayLength = 10;
if (!req.isNull("iDisplayLength"))
{
iDisplayLength = req.getInt("iDisplayLength");
}
// iDisplayStart = offset
int iDisplayStart = 0;
if (!req.isNull("iDisplayStart"))
{
iDisplayStart = req.getInt("iDisplayStart");
}
// create a query on entity
Database db = req.getDatabase();
Query<?> q = db.query(entityClass);
// sorting
// iSortCol_0 = sort column number
// resolve using mDataProp_1='name'
String sortField = req.getString("mDataProp_" + req.getString("iSortCol_0"));
boolean asc = "asc".equals(req.getString("sSortDir_0")) ? true : false;
if (asc) q.sortASC(sortField);
else q.sortDESC(sortField);
// iTotalRecords is unfiltered count!
int count = q.count();
// sSearch = filtering string
if (!"".equals(req.getString("sSearch")))
{
q.search(req.getString("sSearch"));
}
// filtered count
int filteredCount = q.count();
// iTotalDisplayRecords is filtered count
// TODO implement filters
q.offset(iDisplayStart);
q.limit(iDisplayLength);
List<? extends Entity> result = q.find();
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("sEcho", req.getString("sEcho"));
jsonObject.addProperty("iTotalRecords", count);
jsonObject.addProperty("iTotalDisplayRecords", filteredCount);
JsonArray jsonArray = new JsonArray();
for (Entity e : result)
{
JsonObject jsonValues = new JsonObject();
for (String field : e.getFields())
{
if (e.get(field) != null) jsonValues.addProperty(field, e.get(field).toString());
else jsonValues.addProperty(field, "");
}
jsonArray.add(jsonValues);
}
jsonObject.add("aaData", jsonArray);
String json = jsonObject.toString();
logger.debug(json);
// write out
PrintWriter out = response.getWriter();
System.out.println("json\n" + json);
out.print(json);
out.close();
}
catch (Exception e)
{
PrintWriter out = response.getWriter();
response.getWriter().print("{exception: '" + e.getMessage() + "'}");
out.close();
e.printStackTrace();
throw new DatabaseException(e);
}
}
}
|
[
"d.hendriksen@umcg.nl"
] |
d.hendriksen@umcg.nl
|
27fdfeeab78a03bfcb9bb35269cce02ce77cd104
|
163fcbe4cfd35a43f2ac65032c410b0d8804ddd6
|
/app/src/main/java/com/weixinlite/android/util/Gettime.java
|
8d3c32f99f5b581991178fb3bf530a15deb995c3
|
[
"Apache-2.0"
] |
permissive
|
chriswangdev/Weixinlite
|
6ca88738c18929bf6678b4b641ad2841243131c9
|
081b22007c7b7d96ff66686a8a8c45a8e57f47ba
|
refs/heads/master
| 2021-06-14T00:52:02.746280
| 2017-04-10T03:25:31
| 2017-04-10T03:25:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,103
|
java
|
package com.weixinlite.android.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by a on 2017/3/30 0030.
*/
public class Gettime {
private static SimpleDateFormat simpleDateFormat;
private static Date curDate;
public static String getNowTime () {
simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
curDate = new Date(System.currentTimeMillis());
return simpleDateFormat.format(curDate);
}
public static long getDiffer(String timeaffter, String timebefore) {
return (getLongTime(timeaffter) - getLongTime(timebefore));
}
public static long getLongTime(String time) {
long timelong = 0;
if (simpleDateFormat == null) {
simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
}
try {
Date date = simpleDateFormat.parse(time);
timelong = date.getTime();
} catch (ParseException e) {
e.printStackTrace();
}
return timelong;
}
}
|
[
"tony@gmail.com"
] |
tony@gmail.com
|
9c016e405154f620e511ce186684f8bd5f1bca0d
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/malware/app98/source/nl/siegmann/epublib/domain/Identifier.java
|
96c1ac1ecc58e897b66f9b5f31df8065a54c3280
|
[
"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
| 2,635
|
java
|
package nl.siegmann.epublib.domain;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import nl.siegmann.epublib.util.StringUtil;
public class Identifier
implements Serializable
{
private static final long serialVersionUID = 955949951416391810L;
private boolean bookId = false;
private String scheme;
private String value;
public Identifier()
{
this("UUID", UUID.randomUUID().toString());
}
public Identifier(String paramString1, String paramString2)
{
this.scheme = paramString1;
this.value = paramString2;
}
public static Identifier getBookIdIdentifier(List<Identifier> paramList)
{
Object localObject2;
if ((paramList == null) || (paramList.isEmpty())) {
localObject2 = null;
}
Object localObject1;
do
{
return localObject2;
localObject2 = null;
Iterator localIterator = paramList.iterator();
do
{
localObject1 = localObject2;
if (!localIterator.hasNext()) {
break;
}
localObject1 = (Identifier)localIterator.next();
} while (!((Identifier)localObject1).isBookId());
localObject2 = localObject1;
} while (localObject1 != null);
return (Identifier)paramList.get(0);
}
public boolean equals(Object paramObject)
{
if (!(paramObject instanceof Identifier)) {
return false;
}
if ((StringUtil.equals(this.scheme, ((Identifier)paramObject).scheme)) && (StringUtil.equals(this.value, ((Identifier)paramObject).value))) {}
for (boolean bool = true;; bool = false) {
return bool;
}
}
public String getScheme()
{
return this.scheme;
}
public String getValue()
{
return this.value;
}
public int hashCode()
{
return StringUtil.defaultIfNull(this.scheme).hashCode() ^ StringUtil.defaultIfNull(this.value).hashCode();
}
public boolean isBookId()
{
return this.bookId;
}
public void setBookId(boolean paramBoolean)
{
this.bookId = paramBoolean;
}
public void setScheme(String paramString)
{
this.scheme = paramString;
}
public void setValue(String paramString)
{
this.value = paramString;
}
public String toString()
{
if (StringUtil.isBlank(this.scheme)) {
return "" + this.value;
}
return "" + this.scheme + ":" + this.value;
}
public static abstract interface Scheme
{
public static final String ISBN = "ISBN";
public static final String URI = "URI";
public static final String URL = "URL";
public static final String UUID = "UUID";
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
383f39a75d4e636edc3f56b3feb7c2da97eb154e
|
6d56930293293ba858ae0fff73c4b4bb813abfaa
|
/app/src/main/java/com/bw/dianshangdemo25/bean/LearyBean.java
|
a1dce4c0560e117ec1d79eee82558d42043d3076
|
[] |
no_license
|
nierunzhang01/DianshangDemo25
|
5cfc2fe87d6f2846f0ec308632c3d492880dc470
|
9e85ec5785c79d3ce1c1d7b1e63801bac187cc05
|
refs/heads/master
| 2021-04-16T05:53:03.229269
| 2020-03-23T04:04:43
| 2020-03-23T04:04:43
| 249,332,191
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 349
|
java
|
package com.bw.dianshangdemo25.bean;
/**
* <p>文件描述:<p>
* <p>作者:聂润璋<p>
* <p>创建时间:2020.3.22<p>
* <p>更改时间:2020.3.22<p>
*/
public class LearyBean {
public String name;
public String info;
public String avatar;
public String url;
public String content;
public String publishedAt;
}
|
[
"you@example.com"
] |
you@example.com
|
edaf1e67a0a46c313e9ffe0e2414e927203027f9
|
d0a87b74643e8ab0d7393185a815dfd378733bae
|
/carrental-ejb/src/main/java/ch/xxx/carrental/ui/model/Member.java
|
e83a17549b47eb19a45e6d980c738b7a725198b9
|
[
"Apache-2.0"
] |
permissive
|
Angular2Guy/Angular2AndJavaEE
|
bbb9aeb488a700d922472b4b1c30edc13c2df7a9
|
de1f208cfef36649688da83f00216f1f1109f3ed
|
refs/heads/master
| 2023-08-16T10:14:41.388159
| 2023-08-10T18:10:25
| 2023-08-10T18:10:25
| 74,204,252
| 110
| 45
|
Apache-2.0
| 2023-08-10T18:10:28
| 2016-11-19T11:25:06
|
Java
|
UTF-8
|
Java
| false
| false
| 2,326
|
java
|
/**
* Copyright 2016 Sven Loesekann
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 ch.xxx.carrental.ui.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
@Entity
@XmlRootElement
@Table(name = "Registrant", uniqueConstraints = @UniqueConstraint(columnNames = "email"))
public class Member implements Serializable {
/** Default value included to remove warning. Remove or modify at will. **/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
private Long id;
@NotNull
@Size(min = 1, max = 25)
@Pattern(regexp = "[^0-9]*", message = "Must not contain numbers")
private String name;
@NotNull
private String email;
@NotNull
@Size(min = 10, max = 12)
@Digits(fraction = 0, integer = 12)
@Column(name = "phone_number")
private String phoneNumber;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
}
|
[
"you@example.com"
] |
you@example.com
|
77582c8187a9d7902b0e7718c608a6cd4c6755d4
|
c7978ad2df29b1d7bed1e23cd4494aee75782486
|
/src/main/java/me/wonwoo/web/PersonController.java
|
f2743f2521a46de0c458c8a4689276682e2962e0
|
[] |
no_license
|
wonwoo/spring-reactor
|
edfe3567d04b206fbad78938a5934b07e655c105
|
8014b649eae124381ecf7845f179a82bc7912460
|
refs/heads/master
| 2021-01-22T04:27:56.667861
| 2017-09-03T13:50:18
| 2017-09-03T13:50:18
| 102,267,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 759
|
java
|
package me.wonwoo.web;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* Created by wonwoolee on 2017. 9. 3..
*/
@RestController
public class PersonController {
private final PersonGenerator personGenerator;
public PersonController(PersonGenerator personGenerator) {
this.personGenerator = personGenerator;
}
@GetMapping("/{name}")
Mono<Person> getPerson(@PathVariable String name) {
return personGenerator.findByName(name);
}
@GetMapping("/")
Flux<Person> getPersons() {
return personGenerator.findAll();
}
}
|
[
"aoruqjfu@gmail.com"
] |
aoruqjfu@gmail.com
|
9b608a3a0079f8fd7b4eb9ad745beda5df04da38
|
7c474f6bb31da170d054ab660f38aaaed1007627
|
/server/reporting/reporting-webapp/src/main/java/com/github/rmannibucau/sirona/reporting/web/plugin/thread/ThreadPlugin.java
|
f767fe2309b83994bffbe2a06b073ea27b11db18
|
[
"Apache-2.0",
"CC-BY-3.0",
"LicenseRef-scancode-proprietary-license",
"MIT",
"BSD-3-Clause"
] |
permissive
|
olamy/sirona
|
b1a36fa7dc9561bb50fd1e1516422fe087587f88
|
c8c0fbab3c99cba5dfc32cb805faf79b462d6524
|
refs/heads/master
| 2021-12-03T09:09:48.379272
| 2019-01-06T15:51:14
| 2019-01-06T15:51:14
| 80,877,112
| 0
| 0
|
Apache-2.0
| 2021-08-20T09:45:52
| 2017-02-03T23:06:54
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,310
|
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 com.github.rmannibucau.sirona.reporting.web.plugin.thread;
import com.github.rmannibucau.sirona.reporting.web.plugin.api.Local;
import com.github.rmannibucau.sirona.reporting.web.plugin.api.Plugin;
@Local
public class ThreadPlugin implements Plugin {
@Override
public String name() {
return "Threads";
}
@Override
public Class<?> endpoints() {
return ThreadEndpoints.class;
}
@Override
public String mapping() {
return "/threads";
}
}
|
[
"rmannibucau@apache.org"
] |
rmannibucau@apache.org
|
d73c62eab71f53c063c517c68d2e7057b6cf8c95
|
1f800156e0d3d6cf1e257a32df33ef856fa88b7f
|
/entdiy-module/entdiy-module-common/src/main/java/com/entdiy/auth/service/DepartmentService.java
|
612f913abc32ef084f50b7848ad813b09fd3b99f
|
[
"Apache-2.0"
] |
permissive
|
xautlx/s2jh4net
|
2b7fb7caa6a8363a081bfebf5c2ad9c420ffb736
|
5605de57f27413a333e665c84a55212d5c22c8c4
|
refs/heads/master
| 2021-08-28T17:38:38.833161
| 2021-08-13T07:16:00
| 2021-08-13T07:16:00
| 31,649,341
| 193
| 188
|
NOASSERTION
| 2021-08-13T06:46:40
| 2015-03-04T09:41:33
|
Java
|
UTF-8
|
Java
| false
| false
| 1,337
|
java
|
/**
* Copyright © 2015 - 2017 EntDIY JavaEE Development Framework
*
* Site: https://www.entdiy.com, E-Mail: xautlx@hotmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.entdiy.auth.service;
import com.entdiy.auth.dao.DepartmentDao;
import com.entdiy.auth.entity.Department;
import com.entdiy.core.service.BaseNestedSetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class DepartmentService extends BaseNestedSetService<Department, Long> {
@Autowired
private DepartmentDao departmentDao;
@Transactional(readOnly = true)
public Department findByCode(String code) {
return departmentDao.findByCode(code);
}
}
|
[
"xautlx@hotmail.com"
] |
xautlx@hotmail.com
|
6ac7185cb3ad23cab66f8583a88cb8aada666292
|
7956e8fbb29f563f4f6bbc5c13474022349dedd3
|
/src/test/java/com/zhazhapan/util/RandomUtilsTest.java
|
2e72bce010aac8f1d60ac517654d3ade9e04197f
|
[
"MIT"
] |
permissive
|
YRREALLYCUTE/util
|
051b8e615c7a066935d0ff8a17b3e463e6cd201a
|
1fc9f0ead1108f4d7208ba7c000df4244f708418
|
refs/heads/master
| 2021-10-09T04:43:05.289577
| 2018-12-20T12:55:12
| 2018-12-20T12:55:12
| 256,656,087
| 1
| 0
| null | 2020-04-18T02:48:29
| 2020-04-18T02:48:28
| null |
UTF-8
|
Java
| false
| false
| 1,473
|
java
|
package com.zhazhapan.util;
import com.zhazhapan.modules.constant.ValueConsts;
import org.junit.Test;
public class RandomUtilsTest {
@Test
public void getRandomInteger() {
System.out.println(RandomUtils.getRandomInteger(ValueConsts.NINE_INT));
}
@Test
public void getRandomUid() throws InterruptedException {
for (int i = 0; i < 100; i++) {
System.out.println(RandomUtils.getRandomUid());
Thread.sleep(1000);
}
}
@Test
public void getRandomEmail() {
}
@Test
public void getRandomString() {
}
@Test
public void getRandomStringWithoutSymbol() {
}
@Test
public void getRandomStringOnlyLetter() {
}
@Test
public void getRandomStringOnlyLowerCase() {
}
@Test
public void getRandomStringOnlyUpperCase() {
}
@Test
public void getRandomTextIgnoreRange() {
}
@Test
public void getRandomText() {
}
@Test
public void getRandomDouble() {
}
@Test
public void getRandomDouble1() {
}
@Test
public void getRandomDouble2() {
}
@Test
public void getRandomIntegerIgnoreRange() {
}
@Test
public void getRandomColor() {
}
@Test
public void getRandomColor1() {
}
@Test
public void getRandomNumber() {
for (int i = 0; i < 100; i++) {
assert Checker.isNumber(RandomUtils.getRandomNumber(11));
}
}
}
|
[
"tao@zhazhapan.com"
] |
tao@zhazhapan.com
|
0190098494efb11df61ee44ee9664f7eb8843789
|
9786e79a538b69e7809f3fa19eee415440d71c44
|
/src/main/java/com/rent/dao/PrhRmoooMapper.java
|
55d03afdd0ff16915299ca639a76f88d725f6f7f
|
[] |
no_license
|
stevenbluesky/rent
|
326095de1ea35783c229276b64024a30cf72d6cd
|
a12d7c49f163ae8296cb78a53bd7fd3f8278d3d7
|
refs/heads/master
| 2020-04-30T14:04:45.093732
| 2019-03-26T01:18:12
| 2019-03-26T01:18:12
| 176,878,556
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,570
|
java
|
package com.rent.dao;
import com.rent.common.persistence.annotation.MyBatisDao;
import com.rent.entity.PrhRmooo;
@MyBatisDao
public interface PrhRmoooMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PRH_RMOOO
*
* @mbggenerated Mon Apr 24 14:56:49 CST 2017
*/
int deleteByPrimaryKey(String no);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PRH_RMOOO
*
* @mbggenerated Mon Apr 24 14:56:49 CST 2017
*/
int insert(PrhRmooo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PRH_RMOOO
*
* @mbggenerated Mon Apr 24 14:56:49 CST 2017
*/
int insertSelective(PrhRmooo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PRH_RMOOO
*
* @mbggenerated Mon Apr 24 14:56:49 CST 2017
*/
PrhRmooo selectByPrimaryKey(String no);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PRH_RMOOO
*
* @mbggenerated Mon Apr 24 14:56:49 CST 2017
*/
int updateByPrimaryKeySelective(PrhRmooo record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PRH_RMOOO
*
* @mbggenerated Mon Apr 24 14:56:49 CST 2017
*/
int updateByPrimaryKey(PrhRmooo record);
}
|
[
"stevenbluesky@163.com"
] |
stevenbluesky@163.com
|
d246f422d002e705c40b1a347516f1bbee9aae91
|
61602d4b976db2084059453edeafe63865f96ec5
|
/com/tencent/mm/opensdk/modelbiz/CreateChatroom.java
|
e764de3ed7481478679a57f1624b4cb73db2ca32
|
[] |
no_license
|
ZoranLi/thunder
|
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
|
0778679ef03ba1103b1d9d9a626c8449b19be14b
|
refs/heads/master
| 2020-03-20T23:29:27.131636
| 2018-06-19T06:43:26
| 2018-06-19T06:43:26
| 137,848,886
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,771
|
java
|
package com.tencent.mm.opensdk.modelbiz;
import android.os.Bundle;
import com.tencent.mm.opensdk.a.d;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
public class CreateChatroom {
public static class Req extends BaseReq {
public String chatroomName;
public String chatroomNickName;
public String extMsg;
public String groupId = "";
public boolean checkArgs() {
return !d.h(this.groupId);
}
public int getType() {
return 14;
}
public void toBundle(Bundle bundle) {
super.toBundle(bundle);
bundle.putString("_wxapi_create_chatroom_group_id", this.groupId);
bundle.putString("_wxapi_create_chatroom_chatroom_name", this.chatroomName);
bundle.putString("_wxapi_create_chatroom_chatroom_nickname", this.chatroomNickName);
bundle.putString("_wxapi_create_chatroom_ext_msg", this.extMsg);
bundle.putString("_wxapi_basereq_openid", this.openId);
}
}
public static class Resp extends BaseResp {
public String extMsg;
public Resp(Bundle bundle) {
fromBundle(bundle);
}
public boolean checkArgs() {
return true;
}
public void fromBundle(Bundle bundle) {
super.fromBundle(bundle);
this.extMsg = bundle.getString("_wxapi_create_chatroom_ext_msg");
}
public int getType() {
return 14;
}
public void toBundle(Bundle bundle) {
super.toBundle(bundle);
bundle.putString("_wxapi_create_chatroom_ext_msg", this.extMsg);
}
}
private CreateChatroom() {
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
7be7fa63d67975b4a82569f7f25fffb8d2ef5bcd
|
8d210db735191c5a14cf2db57b0b02877daf8784
|
/src/ch15/LimitsOfInference.java
|
2b9093ab5e1e149ecf7db99f68a6cd8684969f12
|
[] |
no_license
|
1326670425/TIJ
|
0cc127642ca13b26729fae267512d9df3f03f53f
|
a8f58dde62d2fd8955d130f81feed5de3d7833b1
|
refs/heads/master
| 2020-04-13T23:23:49.016618
| 2019-08-08T09:57:42
| 2019-08-08T09:57:42
| 163,505,084
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 704
|
java
|
/**
* @Title LimitsOfInference.java
* @Package ch15
* @Description TODO
* @author 吴扬颉
* @date 2019年3月25日
* @version 1.0
*/
package ch15;
import java.util.*;
import ch14.pets.*;
/**
* @ClassName LimitsOfInference
* @Description Thinking in Java:类型推断只对赋值操作有效,其他时候不起作用,比如不能用于参数传递,编译错误
* <p>Java 8下可以编译通过
* @author 吴扬颉
* @date 2019年3月25日
*
*/
public class LimitsOfInference {
static void f(Map<Person, List<? extends Pet>> petPeople) { System.out.println(petPeople.getClass().getName()); }
public static void main(String[] args) {
f(New.map());
}
}
|
[
"1326670425@qq.com"
] |
1326670425@qq.com
|
fdc94f70de7b5c980700cb44cc8da35a55834cf5
|
e9a65e2d24c2702de571a67e3d9333b1047c81f7
|
/app/src/main/java/tv/fengmang/xeniadialog/utils/RecorderHelper.java
|
585d297180b4c0ae8f3cf79e083697d1f3b731cf
|
[] |
no_license
|
kisdy502/XeniaDialog
|
9834514f2716bdfb94b6cf478f486fcf7d6a3603
|
1d73d0ff3a643d7b277f758df6a01683c1b78fd5
|
refs/heads/master
| 2022-12-05T03:52:27.087791
| 2020-08-25T07:59:31
| 2020-08-25T07:59:31
| 290,757,844
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,651
|
java
|
package tv.fengmang.xeniadialog.utils;
import android.media.MediaRecorder;
import android.os.Environment;
import android.os.Handler;
import android.text.format.DateFormat;
import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.util.Calendar;
import java.util.Locale;
public class RecorderHelper {
public static void record(MediaRecorder mMediaRecorder) {
String fileName = DateFormat.format("yyyyMMdd_HHmmss", Calendar.getInstance(Locale.CHINA)) + ".m4a";
Log.d("RecorderHelper", "fileName:" + fileName);
File destDir = new File(Environment.getExternalStorageDirectory() + "/test/");
if (!destDir.exists()) {
destDir.mkdirs();
}
String filePath = Environment.getExternalStorageDirectory() + "/test/" + fileName;
Log.d("RecorderHelper", "filePath:" + filePath);
try {
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
// mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.REMOTE_SUBMIX); //会报错
mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
mMediaRecorder.setOutputFile(filePath);
mMediaRecorder.prepare();
} catch (IOException e) {
e.printStackTrace();
}
mMediaRecorder.start();
}
public static void stopRecord(MediaRecorder mMediaRecorder) {
if (mMediaRecorder != null) {
mMediaRecorder.stop();
mMediaRecorder.release();
mMediaRecorder = null;
}
}
}
|
[
"bwply2009@163.com"
] |
bwply2009@163.com
|
aa83ef24dcf5d8ef31146e34f7e97816ab8494f1
|
68ee068f2a8f44f6c469a70d8ba47eb667591e8a
|
/datasets/styler/milo/repair-attempt/batch_3/124/CubeItemNode.java
|
eb160cfaf6773d5e3f01f116ec91f71876e0758d
|
[] |
no_license
|
aqhvhghtbtb/styler
|
261032390ef39224ab1fdfd51a70ba556e5f81d4
|
e2881daa6bbc7763ad4a9ba704c4d834316ed9c1
|
refs/heads/master
| 2021-03-07T16:50:11.364844
| 2020-02-28T10:00:47
| 2020-02-28T10:00:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,973
|
java
|
/*
* Copyright (c) 2017 Kevin Herron
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.html.
*/
package org.eclipse.milo.opcua.sdk.server.model.nodes.variables;
import java.util.Optional;
import org.eclipse.milo.opcua.sdk.server.api.ServerNodeMap;
import org.eclipse.milo.opcua.sdk.server.api.nodes.VariableNode;
import org.eclipse.milo.opcua.sdk.server.model.types.variables.CubeItemType;
import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue;
import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.eclipse.milo.opcua.stack.core.types.structured.AxisInformation;
public class CubeItemNode extends ArrayItemNode implements CubeItemType {
public CubeItemNode(ServerNodeMap nodeMap, NodeId nodeId, QualifiedName browseName,
LocalizedText displayName, LocalizedText description, UInteger writeMask,
UInteger userWriteMask) {
super(nodeMap, nodeId, browseName, displayName, description, writeMask, userWriteMask);
}
public CubeItemNode(ServerNodeMap nodeMap, NodeId nodeId, QualifiedName browseName,
LocalizedText displayName, LocalizedText description, UInteger writeMask,
UInteger userWriteMask, DataValue value, NodeId dataType, Integer valueRank,
UInteger[] arrayDimensions, UByte accessLevel, UByte userAccessLevel,
double minimumSamplingInterval, boolean historizing) {super(nodeMap ,nodeId ,browseName ,displayName ,description ,writeMask ,userWriteMask ,value,
dataType
, valueRank ,arrayDimensions, accessLevel,userAccessLevel ,minimumSamplingInterval ,historizing ); }
public PropertyNode getXAxisDefinitionNode() {
Optional<VariableNode> propertyNode = getPropertyNode(CubeItemType.X_AXIS_DEFINITION);
return (PropertyNode) propertyNode.orElse(null);
}
public AxisInformation getXAxisDefinition() {
Optional<AxisInformation> propertyValue = getProperty(CubeItemType.X_AXIS_DEFINITION);
return propertyValue.orElse(null);
}
public void setXAxisDefinition(AxisInformation value) {
setProperty(CubeItemType.X_AXIS_DEFINITION, value);
}
public PropertyNode getYAxisDefinitionNode() {
Optional<VariableNode> propertyNode = getPropertyNode(CubeItemType.Y_AXIS_DEFINITION);
return (PropertyNode) propertyNode.orElse(null);
}
public AxisInformation getYAxisDefinition() {
Optional<AxisInformation> propertyValue = getProperty(CubeItemType.Y_AXIS_DEFINITION);
return propertyValue.orElse(null);
}
public void setYAxisDefinition(AxisInformation value) {
setProperty(CubeItemType.Y_AXIS_DEFINITION, value);
}
public PropertyNode getZAxisDefinitionNode() {
Optional<VariableNode> propertyNode = getPropertyNode(CubeItemType.Z_AXIS_DEFINITION);
return (PropertyNode) propertyNode.orElse(null);
}
public AxisInformation getZAxisDefinition() {
Optional<AxisInformation> propertyValue = getProperty(CubeItemType.Z_AXIS_DEFINITION);
return propertyValue.orElse(null);
}
public void setZAxisDefinition(AxisInformation value) {
setProperty(CubeItemType.Z_AXIS_DEFINITION, value);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
3503b58b397896d20af0bf124a8013cb161919b2
|
6a83218c92fbb26b9199b15454ce3dbca508a608
|
/common/src/main/java/dev/ftb/mods/ftbteams/client/gui/InviteScreen.java
|
1105ea5859ae917488f2e8ba44bd2912e7076789
|
[] |
no_license
|
FTBTeam/FTB-Teams
|
17b037a6c983021169b7173942a65d8295eb563b
|
24f2e4551101477cda8268f6c1b715b168707cb1
|
refs/heads/main
| 2023-09-01T14:00:24.769673
| 2023-07-03T15:40:55
| 2023-07-03T15:40:55
| 219,998,659
| 10
| 23
| null | 2023-07-03T15:40:56
| 2019-11-06T13:05:33
|
Java
|
UTF-8
|
Java
| false
| false
| 1,161
|
java
|
package dev.ftb.mods.ftbteams.client.gui;
import dev.ftb.mods.ftblibrary.icon.Icons;
import dev.ftb.mods.ftbteams.api.FTBTeamsAPI;
import dev.ftb.mods.ftbteams.api.client.KnownClientPlayer;
import dev.ftb.mods.ftbteams.net.PlayerGUIOperationMessage;
import net.minecraft.network.chat.Component;
public class InviteScreen extends BaseInvitationScreen {
public InviteScreen() {
super(Component.translatable("ftbteams.gui.invite"));
}
@Override
protected boolean shouldIncludePlayer(KnownClientPlayer player) {
// any player who is online and not in a team
return player.isOnlineAndNotInParty() && !player.equals(FTBTeamsAPI.api().getClientManager().self());
}
@Override
protected ExecuteButton makeExecuteButton() {
return new ExecuteButton(Component.translatable("ftbteams.gui.send_invite"), Icons.ADD, () -> {
new PlayerGUIOperationMessage(PlayerGUIOperationMessage.Operation.INVITE, invites).sendToServer();
closeGui();
}) {
@Override
public boolean isEnabled() {
return !invites.isEmpty();
}
};
}
}
|
[
"des.herriott@gmail.com"
] |
des.herriott@gmail.com
|
4dfd79e5582da09c6f64e01ae8587ebee92c8d93
|
824790e3aeacd3b83dd4e5a624aa102c47fc769b
|
/src/main/java/de/mkristian/ixtlan/gwt/caches/BrowserOrMemoryStore.java
|
1824df3ea0cb6351e38b8f092abb1452195e4744
|
[] |
no_license
|
mkristian/ixtlan-gwt
|
79557dfc6085901b903f10baa6d7113e828d7c6c
|
7d3b3ce8df23c9547bfc11b80e6895141b119370
|
refs/heads/master
| 2020-07-26T15:01:15.622176
| 2014-01-12T21:08:54
| 2014-01-12T21:08:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,506
|
java
|
package de.mkristian.ixtlan.gwt.caches;
import java.util.List;
import org.fusesource.restygwt.client.JsonEncoderDecoder;
import com.google.gwt.storage.client.Storage;
import de.mkristian.ixtlan.gwt.models.Identifiable;
public class BrowserOrMemoryStore<T extends Identifiable> implements Store<T> {
private final Store<T> store;
private boolean storeCollections;
public BrowserOrMemoryStore(JsonEncoderDecoder<T> coder, String key){
this( coder, key, true );
}
public BrowserOrMemoryStore(JsonEncoderDecoder<T> coder, String key, boolean storeCollections ){
this.storeCollections = storeCollections;
if ( Storage.isLocalStorageSupported() ){
store = new BrowserStore<T>(coder, key);
}
else {
store = new MemoryStore<T>();
}
}
public void update(T model, String json) {
store.update(model, json);
}
public void replaceAll(List<T> models, String json) {
if ( storeCollections ) {
store.replaceAll(models, json);
}
}
public T get(int id) {
return store.get(id);
}
public List<T> getAll() {
if (storeCollections) {
return store.getAll();
}
else {
return null;
}
}
public void remove(T model) {
store.remove(model);
}
public void removeAll() {
store.removeAll();
}
public void purgeAll() {
store.purgeAll();
}
}
|
[
"m.kristian@web.de"
] |
m.kristian@web.de
|
8bb928585bf3e0e46b01593957b6f9a14314f169
|
61e13884681f351814eb1646c18d502cdf1435b6
|
/hops-transaction/src/main/java/com/yuecheng/hops/rebate/entity/assist/RebateRecordAssist.java
|
9bcfdea64a49eccc70481a155296ee62287f64cc
|
[] |
no_license
|
jy02718805/HOPS
|
d8b2b89db79b2c9d4e4560571c6ad29ffc25049c
|
e7e834221ea4aec1620ce9716dae2eac4e875430
|
refs/heads/master
| 2021-01-10T09:35:27.930434
| 2016-01-20T08:18:07
| 2016-01-20T08:18:07
| 49,999,762
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,265
|
java
|
/*
* 文件名:RebateRecordAssist.java
* 版权:Copyright by www.365haoyou.com
* 描述:返佣元数据辅助类
* 修改人:Jinger
* 修改时间:2014年10月23日
* 跟踪单号:
* 修改单号:
* 修改内容:
*/
package com.yuecheng.hops.rebate.entity.assist;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import com.yuecheng.hops.rebate.entity.RebateRecord;
/**
* 返佣元数据辅助类
* 〈一句话功能简述〉
* 〈功能详细描述〉
* @author Jinger
* @version 2014年10月23日
* @see RebateRuleAssist
* @since
*/
public class RebateRecordAssist implements Serializable
{
/**
* 意义,目的和功能,以及被用到的地方<br>
*/
private static final long serialVersionUID = 4543360605369550096L;
private RebateRecord rebateRecord;
private List<RebateProductAssist> rebateProducts; //返佣产品列表
private String productNames; //产品名称简写
private String productNamesAlt; //产品全名称
private Date beginTime; //清算开始时间
private Date endTime; //清算结束时间
private String merchantName; //发生商户名称
private String rebateMerchantName; //返佣商户名称
public RebateRecord getRebateRecord()
{
return rebateRecord;
}
public void setRebateRecord(RebateRecord rebateRecord)
{
this.rebateRecord = rebateRecord;
}
public List<RebateProductAssist> getRebateProducts()
{
return rebateProducts;
}
public void setRebateProducts(List<RebateProductAssist> rebateProducts)
{
this.rebateProducts = rebateProducts;
}
public String getProductNames()
{
return productNames;
}
public void setProductNames(String productNames)
{
this.productNames = productNames;
}
public String getProductNamesAlt()
{
return productNamesAlt;
}
public void setProductNamesAlt(String productNamesAlt)
{
this.productNamesAlt = productNamesAlt;
}
public Date getBeginTime()
{
return beginTime;
}
public void setBeginTime(Date beginTime)
{
this.beginTime = beginTime;
}
public Date getEndTime()
{
return endTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public String getMerchantName()
{
return merchantName;
}
public void setMerchantName(String merchantName)
{
this.merchantName = merchantName;
}
public String getRebateMerchantName()
{
return rebateMerchantName;
}
public void setRebateMerchantName(String rebateMerchantName)
{
this.rebateMerchantName = rebateMerchantName;
}
@Override
public String toString()
{
return "RebateRecordAssist [rebateRecord=" + rebateRecord + ", rebateProducts="
+ rebateProducts + ", productNames=" + productNames + ", productNamesAlt="
+ productNamesAlt + ", beginTime=" + beginTime + ", endTime=" + endTime
+ ", merchantName=" + merchantName + ", rebateMerchantName=" + rebateMerchantName
+ "]";
}
}
|
[
"jy02718858@163.com"
] |
jy02718858@163.com
|
473d48ac8f98aa7dfc8d7118c137bbd976f94715
|
aee55521c12241d953007176f403aca2e842c056
|
/src/org/omg/PortableServer/ServantRetentionPolicyValue.java
|
a263e1fb21bc3de946e7a05214796d0740d9ab95
|
[] |
no_license
|
XiaZhouxx/jdk1.8
|
572988fe007bbdd5aa528945a63005c3cb152ffe
|
5703d895b91571d41ccdab138aefb9b8774f9401
|
refs/heads/master
| 2023-08-30T18:53:23.919988
| 2021-11-01T07:40:49
| 2021-11-01T07:40:49
| 420,957,590
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,766
|
java
|
package org.omg.PortableServer;
/**
* org/omg/PortableServer/ServantRetentionPolicyValue.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/jenkins/workspace/8-2-build-windows-amd64-cygwin/jdk8u301/1513/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Wednesday, June 9, 2021 6:48:04 AM PDT
*/
/**
* ServantRetentionPolicyValue can have the following
* values. RETAIN - to indicate that the POA will retain
* active servants in its Active Object Map.
* NON_RETAIN - to indicate Servants are not retained by
* the POA. If no ServantRetentionPolicy is specified at
* POA creation, the default is RETAIN.
*/
public class ServantRetentionPolicyValue implements org.omg.CORBA.portable.IDLEntity
{
private int __value;
private static int __size = 2;
private static org.omg.PortableServer.ServantRetentionPolicyValue[] __array = new org.omg.PortableServer.ServantRetentionPolicyValue [__size];
public static final int _RETAIN = 0;
public static final org.omg.PortableServer.ServantRetentionPolicyValue RETAIN = new org.omg.PortableServer.ServantRetentionPolicyValue(_RETAIN);
public static final int _NON_RETAIN = 1;
public static final org.omg.PortableServer.ServantRetentionPolicyValue NON_RETAIN = new org.omg.PortableServer.ServantRetentionPolicyValue(_NON_RETAIN);
public int value ()
{
return __value;
}
public static org.omg.PortableServer.ServantRetentionPolicyValue from_int (int value)
{
if (value >= 0 && value < __size)
return __array[value];
else
throw new org.omg.CORBA.BAD_PARAM ();
}
protected ServantRetentionPolicyValue (int value)
{
__value = value;
__array[__value] = this;
}
} // class ServantRetentionPolicyValue
|
[
"xiazhou@dgg.net"
] |
xiazhou@dgg.net
|
0690dfa04b1bb14a165abde935cc79105230fa47
|
da59fb56dddd27b1ca4bd95ef7498fb811b1fe6e
|
/src/main/java/concurrency/Interrupting2.java
|
bffcccd3c99c88bf49fbc188401a1bbd5302427e
|
[] |
no_license
|
kenshin579/books-thinking-in-java-4
|
7c36b8c2b4a4c589cc808ec4aa16ea5f49f49306
|
a6eaa45f69248008a74ddf07426b21e1c259e7f2
|
refs/heads/master
| 2020-04-11T12:38:28.671366
| 2018-12-15T07:21:46
| 2018-12-15T07:21:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,452
|
java
|
package concurrency;
// Interrupting a task blocked with a ReentrantLock.
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import static net.mindview.util.Print.print;
class BlockedMutex {
private Lock lock = new ReentrantLock();
public BlockedMutex() {
// Acquire it right away, to demonstrate interruption
// of a task blocked on a ReentrantLock:
lock.lock();
}
public void f() {
try {
// This will never be available to a second task
lock.lockInterruptibly(); // Special call
print("lock acquired in f()");
} catch (InterruptedException e) {
print("Interrupted from lock acquisition in f()");
}
}
}
class Blocked2 implements Runnable {
BlockedMutex blocked = new BlockedMutex();
public void run() {
print("Waiting for f() in BlockedMutex");
blocked.f();
print("Broken out of blocked call");
}
}
public class Interrupting2 {
public static void main(String[] args) throws Exception {
Thread t = new Thread(new Blocked2());
t.start();
TimeUnit.SECONDS.sleep(1);
System.out.println("Issuing t.interrupt()");
t.interrupt();
}
} /* Output:
Waiting for f() in BlockedMutex
Issuing t.interrupt()
Interrupted from lock acquisition in f()
Broken out of blocked call
*///:~
|
[
"frankyoh@tmon.co.kr"
] |
frankyoh@tmon.co.kr
|
1785027d4a7d32826b14e1a63641f02a9455e2ac
|
2869fc39e2e63d994d5dd8876476e473cb8d3986
|
/Super_passport/src/java/com/lvmama/train/service/response/StationQueryResponse.java
|
f27f8119a26b24973c18039aade3e4f1d8d8dcc0
|
[] |
no_license
|
kavt/feiniu_pet
|
bec739de7c4e2ee896de50962dbd5fb6f1e28fe9
|
82963e2e87611442d9b338d96e0343f67262f437
|
refs/heads/master
| 2020-12-25T17:45:16.166052
| 2016-06-13T10:02:42
| 2016-06-13T10:02:42
| 61,026,061
| 0
| 0
| null | 2016-06-13T10:02:01
| 2016-06-13T10:02:01
| null |
UTF-8
|
Java
| false
| false
| 560
|
java
|
package com.lvmama.train.service.response;
import java.util.List;
import com.lvmama.comm.utils.JsonUtil;
import com.lvmama.comm.vo.train.product.StationInfo;
import com.lvmama.comm.vo.train.product.StationRspVo;
public class StationQueryResponse extends AbstractTrainResponse{
@SuppressWarnings("unchecked")
@Override
public void parse(String response) throws RuntimeException {
List<StationInfo> stationInfos = JsonUtil.getList4Json(response, StationInfo.class, null);
this.getRsp().setVo(new StationRspVo(stationInfos));
}
}
|
[
"feiniu7903@163.com"
] |
feiniu7903@163.com
|
c4e47d68669c557e9aa700ae6f60a41171abd09c
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-13377-8-13-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/user/impl/LDAP/XWikiLDAPAuthServiceImpl_ESTest.java
|
cc9c59bd7b4287afc90bf344294dde83dcd6321d
|
[
"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
| 583
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Mar 30 20:00:49 UTC 2020
*/
package com.xpn.xwiki.user.impl.LDAP;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class XWikiLDAPAuthServiceImpl_ESTest extends XWikiLDAPAuthServiceImpl_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
60e1f45b5a55c69a86714623efa31590ab5abfe0
|
8d5b63d57577690ef0d3c0df5150628e709799c7
|
/src/cn/tarena/tick/TickToMysql.java
|
e6ee33adb2faeccc4b66d740bb507158c356600f
|
[] |
no_license
|
Justdwiwt/WebLog
|
9f2ff31250af60350c0e8e8edc9a35817d2c2923
|
e32b430f98bfd731127b8402a29a7bb61865ec80
|
refs/heads/master
| 2020-04-11T12:17:59.403943
| 2018-12-14T11:29:29
| 2018-12-14T11:29:29
| 161,775,827
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,286
|
java
|
package cn.tarena.tick;
import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichBolt;
import backtype.storm.tuple.Tuple;
import cn.tarena.dao.MysqlDao;
import cn.tarena.pojo.Tongji2;
import java.sql.Date;
import java.util.Map;
public class TickToMysql extends BaseRichBolt {
@Override
public void execute(Tuple input) {
try {
Date time = new Date(input.getLongByField("endtime"));
double br = input.getDoubleByField("br");
double avgdeep = input.getDoubleByField("avgdeep");
double avgtime = input.getDoubleByField("avgtime");
Tongji2 t = new Tongji2();
t.setTime(time);
t.setBr(br);
t.setAvgdeep(avgdeep);
t.setAvgtime(avgtime);
MysqlDao.tickToMysql(t);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void prepare(Map arg0, TopologyContext arg1, OutputCollector arg2) {
// TODO Auto-generated method stub
}
@Override
public void declareOutputFields(OutputFieldsDeclarer arg0) {
// TODO Auto-generated method stub
}
}
|
[
"len_master@hotmail.com"
] |
len_master@hotmail.com
|
ee6a81aa61d70b67b7a8dadce351ebbff7f61a7a
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/NLPCCd/Camel/1624_1.java
|
d7bce389193e4fe3f3db1e3d3e7e3ca5864afb95
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
//,temp,sample_5879.java,2,12,temp,sample_15.java,2,13
//,3
public class xxx {
protected void onExchange(Exchange exchange) throws Exception {
String path = getResourceUri();
ObjectHelper.notNull(path, "resourceUri");
String newResourceUri = exchange.getIn().getHeader(MvelConstants.MVEL_RESOURCE_URI, String.class);
if (newResourceUri != null) {
exchange.getIn().removeHeader(MvelConstants.MVEL_RESOURCE_URI);
log.info("set to creating new endpoint to handle exchange");
}
}
};
|
[
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] |
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
|
6ee9747551aed3b3c2eabd48addd499a01a5f9a5
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/79/org/apache/commons/math/linear/ArrayRealVector_projection_1089.java
|
3058baa50446d64a0b3ee0dbeea8b4c28732b796
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,700
|
java
|
org apach common math linear
link real vector realvector arrai
version revis date
arrai real vector arrayrealvector real vector realvector serializ
inherit doc inheritdoc
real vector realvector project real vector realvector
map multipli mapmultipli dot product dotproduct dot product dotproduct
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
f05684efcc99a4bd03344e274c15c648d5c92422
|
ea061388a30ab0fdfa79440b3baceb838c13599e
|
/desenvolvimento/backend/src/main/java/com/ramon/catchup/domain/Perfil.java
|
3dcceb19f77994e4b2b8fb1c45cf0846c607bb07
|
[] |
no_license
|
ramoncgusmao/catchup
|
dba577ade63609e955a661da2c120ed16e98b157
|
54bbd83236047d6bf1c519a752ed9c39cad20f24
|
refs/heads/master
| 2020-12-02T18:32:17.040628
| 2020-01-09T02:52:58
| 2020-01-09T02:52:58
| 231,079,941
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 611
|
java
|
package com.ramon.catchup.domain;
public enum Perfil {
ADMIN(1, "ROLE_ADMIN"),
COLABORADOR(2, "ROLE_COLABORADOR");
private int cod;
private String descricao;
private Perfil(int cod, String descricao) {
this.cod = cod;
this.descricao = descricao;
}
public int getCod() {
return cod;
}
public String getDescricao() {
return descricao;
}
public static Perfil toEnum(Integer cod) {
if(cod == null) {
return null;
}
for(Perfil x : Perfil.values()) {
if(cod.equals(x.getCod())) {
return x;
}
}
throw new IllegalArgumentException("id invalido: " + cod);
}
}
|
[
"ramoncgusmao@gmail.com"
] |
ramoncgusmao@gmail.com
|
508f0258b90dbf2506a8e8f8035d72b9a6cd417e
|
4f4c13e5a7c1949ca90624d950971b021a90fa41
|
/src/main/java/com/medium/M152_MaximumProductSubarray.java
|
d270c861897d5f2687c690cd5f7370bb5d6031a9
|
[] |
no_license
|
iCodeSuperman/LeetCode
|
a135d3c05d613cfe2ce4b4565ece6cb8265761ac
|
e01adfe33951ecfca198f1c67305e3fc0cb060c1
|
refs/heads/master
| 2023-06-24T18:25:01.171856
| 2021-07-22T14:47:26
| 2021-07-22T14:47:26
| 305,009,862
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,220
|
java
|
package com.medium;
import org.junit.Test;
public class M152_MaximumProductSubarray {
@Test
public void t(){
int[] arr = {1, -2};
System.out.println(this.maxProduct(arr));
}
public int maxProduct(int[] nums){
int len = nums.length;
if(len == 1){
return nums[0];
}
int[] dp_max = new int[len];
int[] dp_min = new int[len];
dp_max[0] = nums[0];
dp_min[0] = nums[0];
int res = nums[0];
for (int i = 1; i < len; i++) {
int n = nums[i];
dp_max[i] = Math.max(n, Math.max(dp_max[i - 1] * n, dp_min[i - 1] * n));
dp_min[i] = Math.min(n, Math.min(dp_max[i - 1] * n, dp_min[i - 1] * n));
System.out.println("max="+dp_max[i]+"; min="+dp_min[i]);
res = Math.max(res, dp_max[i]);
}
return res;
}
public int maxProduct2(int[] nums) {
int res = Integer.MIN_VALUE;
for (int i = 0; i < nums.length; i++) {
int temp = 1;;
for (int j = i; j < nums.length; j++) {
temp *= nums[j];
res = Math.max(temp, res);
}
}
return res;
}
}
|
[
"xujunkangchn@gmail.com"
] |
xujunkangchn@gmail.com
|
45b5e42c584b464f6e2a40541b5ceee53ce594ea
|
f0d095f13751bd3e3320f104c33c989f9fb9b376
|
/src/main/java/org/elasticsearch/action/admin/indices/gateway/snapshot/TransportGatewaySnapshotAction.java
|
389e20e845254d61bdd92a95c756fb66c07e4f4e
|
[
"Apache-2.0"
] |
permissive
|
wilsolutions/elasticsearch
|
1bec2261a1ed15be7663859ad06f3af4e7bc79f7
|
bb63d38a659dcb5711f4ab4d1db22bd0f4c2bc52
|
refs/heads/master
| 2021-01-17T05:31:58.278350
| 2011-12-28T20:20:09
| 2011-12-28T20:20:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,467
|
java
|
/*
* Licensed to ElasticSearch and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. ElasticSearch 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.elasticsearch.action.admin.indices.gateway.snapshot;
import com.google.common.collect.Lists;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.TransportActions;
import org.elasticsearch.action.support.DefaultShardOperationFailedException;
import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException;
import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction;
import org.elasticsearch.cluster.ClusterService;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.routing.GroupShardsIterator;
import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.gateway.IndexShardGatewayService;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
/**
*
*/
public class TransportGatewaySnapshotAction extends TransportBroadcastOperationAction<GatewaySnapshotRequest, GatewaySnapshotResponse, ShardGatewaySnapshotRequest, ShardGatewaySnapshotResponse> {
private final IndicesService indicesService;
@Inject
public TransportGatewaySnapshotAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
TransportService transportService, IndicesService indicesService) {
super(settings, threadPool, clusterService, transportService);
this.indicesService = indicesService;
}
@Override
protected String executor() {
return ThreadPool.Names.MANAGEMENT;
}
@Override
protected String transportAction() {
return TransportActions.Admin.Indices.Gateway.SNAPSHOT;
}
@Override
protected String transportShardAction() {
return "indices/gateway/snapshot/shard";
}
@Override
protected GatewaySnapshotRequest newRequest() {
return new GatewaySnapshotRequest();
}
@Override
protected boolean ignoreNonActiveExceptions() {
return true;
}
@Override
protected GatewaySnapshotResponse newResponse(GatewaySnapshotRequest request, AtomicReferenceArray shardsResponses, ClusterState clusterState) {
int successfulShards = 0;
int failedShards = 0;
List<ShardOperationFailedException> shardFailures = null;
for (int i = 0; i < shardsResponses.length(); i++) {
Object shardResponse = shardsResponses.get(i);
if (shardResponse == null) {
// non active shard, ignore
} else if (shardResponse instanceof BroadcastShardOperationFailedException) {
failedShards++;
if (shardFailures == null) {
shardFailures = Lists.newArrayList();
}
shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
} else {
successfulShards++;
}
}
return new GatewaySnapshotResponse(shardsResponses.length(), successfulShards, failedShards, shardFailures);
}
@Override
protected ShardGatewaySnapshotRequest newShardRequest() {
return new ShardGatewaySnapshotRequest();
}
@Override
protected ShardGatewaySnapshotRequest newShardRequest(ShardRouting shard, GatewaySnapshotRequest request) {
return new ShardGatewaySnapshotRequest(shard.index(), shard.id());
}
@Override
protected ShardGatewaySnapshotResponse newShardResponse() {
return new ShardGatewaySnapshotResponse();
}
@Override
protected ShardGatewaySnapshotResponse shardOperation(ShardGatewaySnapshotRequest request) throws ElasticSearchException {
IndexShardGatewayService shardGatewayService = indicesService.indexServiceSafe(request.index())
.shardInjectorSafe(request.shardId()).getInstance(IndexShardGatewayService.class);
shardGatewayService.snapshot("api");
return new ShardGatewaySnapshotResponse(request.index(), request.shardId());
}
/**
* The snapshot request works against all primary shards.
*/
@Override
protected GroupShardsIterator shards(GatewaySnapshotRequest request, String[] concreteIndices, ClusterState clusterState) {
return clusterState.routingTable().activePrimaryShardsGrouped(concreteIndices, true);
}
}
|
[
"kimchy@gmail.com"
] |
kimchy@gmail.com
|
e4ea12fb0df88f8ba3346529584b7ec71ee4d9d2
|
098aff8e23c5c5a49e94b22163819480588ebd6d
|
/src/main/java/net/haesleinhuepf/clij2/AbstractCLIJ2Plugin.java
|
7ed27eb661984a281deaa1a8dd5cada329aab377
|
[
"BSD-3-Clause"
] |
permissive
|
clij/clij2
|
d274f272656ba1c9182cf97a2b9296ebcd62b95c
|
154150e60596e76f2b0773ef84691bebf5809f24
|
refs/heads/master
| 2023-04-10T13:38:27.230429
| 2022-08-06T15:55:46
| 2022-08-06T15:55:46
| 190,929,227
| 39
| 11
|
NOASSERTION
| 2023-03-02T19:15:26
| 2019-06-08T19:54:46
|
Java
|
UTF-8
|
Java
| false
| false
| 872
|
java
|
package net.haesleinhuepf.clij2;
import net.haesleinhuepf.clij.CLIJ;
import net.haesleinhuepf.clij.macro.AbstractCLIJPlugin;
public abstract class AbstractCLIJ2Plugin extends AbstractCLIJPlugin {
private CLIJ2 clij2;
@Override
public void setClij(CLIJ clij) {
if (clij2 == null || clij2.getCLIJ() != clij) {
if (clij == CLIJ.getInstance()) {
clij2 = CLIJ2.getInstance();
} else {
System.out.println("Warning AbstractCLIJ2Plugin.setCLIJ is deprecated. Use setCLIJ2 instead.");
clij2 = new CLIJ2(clij);
}
}
super.setClij(clij);
}
public void setCLIJ2(CLIJ2 clij2) {
this.clij2 = clij2;
}
public CLIJ2 getCLIJ2() {
if (clij2 == null) {
clij2 = CLIJ2.getInstance();
}
return clij2;
}
}
|
[
"rhaase@mpi-cbg.de"
] |
rhaase@mpi-cbg.de
|
2f92959c785debf6cce9a93c139d539fe0d6b018
|
1d64bf4b7cec44c8a12e4086ad2918e8df6dcc76
|
/SpringRelatedJars/spring-framework-2.0.5/dist/org/springframework/dao/InvalidDataAccessApiUsageException.java
|
f388cdf7016ee7f47569c2864f328a9141a7c5d9
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
XerO00/AllJarFiles
|
03472690fad55b5c2fcae530ac7de6294c54521e
|
d546337cfa29f4d33c3d3c5a4479a35063771612
|
refs/heads/master
| 2020-05-07T15:51:39.184855
| 2019-04-10T20:08:57
| 2019-04-10T20:08:57
| 180,655,268
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,516
|
java
|
/*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.dao;
/**
* Exception thrown on incorrect usage of the API, such as failing to
* "compile" a query object that needed compilation before execution.
*
* <p>This represents a problem in our Java data access framework,
* not the underlying data access infrastructure.
*
* @author Rod Johnson
*/
public class InvalidDataAccessApiUsageException extends DataAccessException {
/**
* Constructor for InvalidDataAccessApiUsageException.
* @param msg the detail message
*/
public InvalidDataAccessApiUsageException(String msg) {
super(msg);
}
/**
* Constructor for InvalidDataAccessApiUsageException.
* @param msg the detail message
* @param cause the root cause from the data access API in use
*/
public InvalidDataAccessApiUsageException(String msg, Throwable cause) {
super(msg, cause);
}
}
|
[
"prasannadandhalkar1@gmail.com"
] |
prasannadandhalkar1@gmail.com
|
c2c701e4bb03db9150c6528d26c6e96c79525e22
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/AtCoder/arc084/A/2416422.java
|
f6b1a78e340e02ead02a344b09e3b6515a24e325
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,034
|
java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Main {
final int _intMax = Integer.MAX_VALUE; // =2147483647>10^9
final int _intMin = Integer.MIN_VALUE;
final long _longMax = Long.MAX_VALUE; // =9223372036854775807L>10^18
final long _longMin = Long.MIN_VALUE;
void solve() {
List<Integer> la = new ArrayList<>();
List<Integer> lb = new ArrayList<>();
List<Integer> lc = new ArrayList<>();
int n = readNum();
int[] ia = readNums();
for (int i = 0; i < ia.length; i++) {
la.add(ia[i]);
}
Collections.sort(la);
int[] ib = readNums();
for (int i = 0; i < ib.length; i++) {
lb.add(ib[i]);
}
Collections.sort(lb);
int[] ic = readNums();
for (int i = 0; i < ic.length; i++) {
lc.add(ic[i]);
}
Collections.sort(lc);
long ans = 0;
int pre = -1;
long precnt = -1;
for (int i = 0; i < lb.size(); i++) {
int v = lb.get(i);
if (pre >= 0 && pre == v) {
ans += precnt;
} else {
long cnta = smallSearch(la, v);
long cntc = bigSearch(lc, v);
ans += cnta * cntc;
pre = v;
precnt = cnta * cntc;
}
}
pln(ans);
}
int smallSearch(List<Integer> list, int v) {
int l = 0;
int r = list.size() - 1;
while (l <= r) {
int m = (l + r) / 2;
int vv = list.get(m);
if (v <= vv)
r = m - 1;
else
l = m + 1;
}
if (l >= list.size())
l = list.size() - 1;
while (l >= 0 && list.get(l) >= v)
l--;
return l + 1;
}
int bigSearch(List<Integer> list, int v) {
int l = 0;
int r = list.size() - 1;
while (l <= r) {
int m = (l + r) / 2;
int vv = list.get(m);
if (vv <= v - 1)
l = m + 1;
else
r = m - 1;
}
if (r < 0)
r = 0;
while (r < list.size() && list.get(r) <= v)
r++;
return list.size() - r;
}
void solve3() {
List<Integer> la = new ArrayList<>();
List<Integer> lb = new ArrayList<>();
List<Integer> lc = new ArrayList<>();
int n = readNum();
int[] ia = readNums();
for (int i = 0; i < ia.length; i++) {
la.add(ia[i]);
}
Collections.sort(la);
int[] ib = readNums();
for (int i = 0; i < ib.length; i++) {
if (la.get(0) < ib[i])
lb.add(ib[i]);
}
Collections.sort(lb);
int[] ic = readNums();
for (int i = 0; i < ic.length; i++) {
if (lb.get(0) < ic[i])
lc.add(ic[i]);
}
Collections.sort(lc);
for (int i = lb.size() - 1; i >= 0; i--) {
if (lc.get(lc.size() - 1) <= lb.get(i))
lb.remove(i);
else
break;
}
for (int i = la.size() - 1; i >= 0; i--) {
if (lb.get(lb.size() - 1) <= la.get(i))
la.remove(i);
else
break;
}
long ans = 0;
for (int i = 0; i < la.size(); i++) {
int p = la.get(i);
for (int j = 0; j < lb.size(); j++) {
int q = lb.get(j);
if (p < q) {
for (int k = 0; k < lc.size(); k++) {
int r = lc.get(k);
if (q < r) {
ans += lc.size() - k;
break;
}
}
}
}
}
pln(ans);
}
void solve2() {
List<Integer> la = new ArrayList<>();
List<Integer> lb = new ArrayList<>();
List<Integer> lc = new ArrayList<>();
int n = readNum();
int[] ia = readNums();
for (int i = 0; i < ia.length; i++) {
la.add(ia[i]);
}
Collections.sort(la);
int[] ib = readNums();
for (int i = 0; i < ib.length; i++) {
lb.add(ib[i]);
}
Collections.sort(lb);
int[] ic = readNums();
for (int i = 0; i < ic.length; i++) {
lc.add(ic[i]);
}
Collections.sort(lc);
long ans = 0;
for (int i = 0; i < la.size(); i++) {
int p = la.get(i);
for (int j = 0; j < lb.size(); j++) {
int q = lb.get(j);
if (p < q) {
for (int k = 0; k < lc.size(); k++) {
int r = lc.get(k);
if (q < r) {
ans += lc.size() - k;
break;
}
}
}
}
}
pln(ans);
}
void solve1() {
List<Integer> la = new ArrayList<>();
List<Integer> lb = new ArrayList<>();
List<Integer> lc = new ArrayList<>();
int n = readNum();
int[] ia = readNums();
for (int i = 0; i < ia.length; i++) {
la.add(ia[i]);
}
Collections.sort(la);
int[] ib = readNums();
for (int i = 0; i < ib.length; i++) {
lb.add(ib[i]);
}
Collections.sort(lb);
int[] ic = readNums();
for (int i = 0; i < ic.length; i++) {
lc.add(ic[i]);
}
Collections.sort(lc);
long ans = 0;
for (int i = 0; i < la.size(); i++) {
int p = la.get(i);
for (int j = 0; j < lb.size(); j++) {
int q = lb.get(j);
if (p < q) {
for (int k = 0; k < lc.size(); k++) {
int r = lc.get(k);
if (q < r) {
ans++;
}
}
}
}
}
pln(ans);
}
// -----------------------------------------------------
// 2018/04/25 r1
// -----------------------------------------------------
int abs(int a) {
return (a >= 0) ? a : -a;
}
long abs(long a) {
return (a >= 0) ? a : -a;
}
int max(int a, int b) {
return (a > b) ? a : b;
}
long max(long a, long b) {
return (a > b) ? a : b;
}
int min(int a, int b) {
return (a < b) ? a : b;
}
long min(long a, long b) {
return (a < b) ? a : b;
}
int pint(String s) {
return Integer.parseInt(s);
}
long plong(String s) {
return Long.parseLong(s);
}
String readLine() {
try {
return _in.readLine();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
int readNum() {
String line = readLine();
return pint(line);
}
long readLong() {
String line = readLine();
return plong(line);
}
String[] readFlds() {
String line = readLine();
return line.split(" ");
}
int[] readNums() {
String[] flds = readFlds();
int[] nums = new int[flds.length];
for (int i = 0; i < flds.length; i++)
nums[i] = pint(flds[i]);
return nums;
}
long[] readLongs() {
String[] flds = readFlds();
long[] nums = new long[flds.length];
for (int i = 0; i < flds.length; i++)
nums[i] = plong(flds[i]);
return nums;
}
void p(char c) {
_out.print(c);
}
void pln(char c) {
_out.println(c);
}
void p(double d) {
_out.print(d);
}
void pln(double d) {
_out.println(d);
}
void p(long l) {
_out.print(l);
}
void pln(long l) {
_out.println(l);
}
void p(String s) {
_out.print(s);
}
void pln(String s) {
_out.println(s);
}
static BufferedReader _in;
static PrintWriter _out;
static boolean _bElapsed = false;
public static void main(String[] args) {
long start = System.currentTimeMillis();
_in = new BufferedReader(new InputStreamReader(System.in));
_out = new PrintWriter(System.out);
new Main().solve();
_out.flush();
long end = System.currentTimeMillis();
if (_bElapsed)
System.err.println((end - start) + "ms");
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
0d584bb105837693c1228c5f0fc5ddbf9fa4fe15
|
39ecf3e4c1d8db9ba1880df8b3b6d55499d45faf
|
/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/virtualMachine/SubTabVirtualMachineErrataView.java
|
984f352837801d54f022400ba99e9e23cd1879da
|
[
"Apache-2.0"
] |
permissive
|
chenkaibin/ovirt-engine
|
78ea632bf65522307b5c7c4f1b036a73d464be5b
|
bb4ffa83e2117f1fb910770757aedb5816670625
|
refs/heads/master
| 2020-03-09T09:10:28.771762
| 2018-03-27T15:10:32
| 2018-04-08T18:43:34
| 128,706,434
| 1
| 0
|
Apache-2.0
| 2018-04-09T02:58:49
| 2018-04-09T02:58:49
| null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
package org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine;
import org.ovirt.engine.core.common.businessentities.VM;
import org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider;
import org.ovirt.engine.ui.uicommonweb.models.VmErrataCountModel;
import org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel;
import org.ovirt.engine.ui.webadmin.section.main.presenter.tab.virtualMachine.SubTabVirtualMachineErrataPresenter;
import org.ovirt.engine.ui.webadmin.section.main.view.tab.AbstractSubTabErrataCountView;
import com.google.inject.Inject;
/**
* View for the sub tab that shows errata counts for a VM selected in the main tab.
*/
public class SubTabVirtualMachineErrataView extends AbstractSubTabErrataCountView<VM, VmListModel<Void>, VmErrataCountModel>
implements SubTabVirtualMachineErrataPresenter.ViewDef {
@Inject
public SubTabVirtualMachineErrataView(
DetailTabModelProvider<VmListModel<Void>, VmErrataCountModel> modelProvider) {
super(modelProvider);
}
}
|
[
"gerrit2@gerrit.ovirt.org"
] |
gerrit2@gerrit.ovirt.org
|
8d5a0eb662a29d51889a4d82818a30782b835b4e
|
67cbc9c5125df76324d78624e2281cb1fefc8a12
|
/application/src/main/java/org/mifos/accounts/fees/business/FeeLevelEntity.java
|
57fd279ffc8ced2c2ddd77207dfd381d13485574
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
mifos/1.5.x
|
86e785c062cb14be4597b33d15c38670c176120e
|
5734370912c47973de3889db21debb3ff7f0f6db
|
refs/heads/master
| 2023-08-28T09:48:46.266018
| 2010-07-12T04:43:46
| 2010-07-12T04:43:46
| 2,946,757
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,220
|
java
|
/*
* Copyright (c) 2005-2010 Grameen Foundation USA
* 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.
*
* See also http://www.apache.org/licenses/LICENSE-2.0.html for an
* explanation of the license and how it is applied.
*/
package org.mifos.accounts.fees.business;
import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.mifos.accounts.fees.util.helpers.FeeLevel;
@Entity
@Table(name = "FEELEVEL")
public class FeeLevelEntity implements Serializable {
private Short feeLevelId;
private Short levelId;
private FeeBO fee;
public FeeLevelEntity(FeeBO fee, FeeLevel feeLevel) {
this.fee = fee;
levelId = feeLevel.getValue();
}
protected FeeLevelEntity() {
fee = null;
}
@Id
@GeneratedValue
@Column(name = "FEELEVEL_ID", nullable = false)
protected Short getFeeLevelId() {
return feeLevelId;
}
@Column(name = "LEVEL_ID")
public Short getLevelId() {
return levelId;
}
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "FEE_ID")
public FeeBO getFee() {
return fee;
}
protected void setFeeLevelId(Short feeLevelId) {
this.feeLevelId = feeLevelId;
}
protected void setLevelId(Short levelId) {
this.levelId = levelId;
}
protected void setFee(FeeBO fee) {
this.fee = fee;
}
}
|
[
"meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4"
] |
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
|
f259738098fe3ba9a59a223396008bb3f2c013f3
|
17dbbbdc6bd3fe56a466d97f674b735720da60a5
|
/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiCoordinator.java
|
6e6e44d39a151be96211630f44eeb63bb6a6857d
|
[
"BSD-3-Clause"
] |
permissive
|
aileolin1981/chromium
|
3df50a9833967cf68e9809017deb9f0c79722687
|
876a076ba4c2fac9d01814e21e6b5bcb7ec78ad3
|
refs/heads/master
| 2022-12-21T09:32:02.120314
| 2019-03-21T02:41:19
| 2019-03-21T02:41:19
| 173,888,576
| 0
| 1
| null | 2019-03-05T06:31:00
| 2019-03-05T06:31:00
| null |
UTF-8
|
Java
| false
| false
| 4,179
|
java
|
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.tasks.tab_management;
import android.content.Context;
import android.view.ViewGroup;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.ThemeColorProvider;
import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
import org.chromium.chrome.browser.lifecycle.Destroyable;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.toolbar.bottom.BottomControlsCoordinator;
import org.chromium.ui.modelutil.PropertyModel;
import java.util.List;
/**
* A coordinator for TabGroupUi component. Manages the communication with
* {@link TabListCoordinator}, {@link TabGridSheetCoordinator}, and
* {@link TabStripToolbarCoordinator}, as well as the life-cycle of shared component objects.
*/
public class TabGroupUiCoordinator
implements Destroyable, TabGroupUiMediator.ResetHandler, TabGroupUi {
public final static String COMPONENT_NAME = "TabStrip";
private final Context mContext;
private final PropertyModel mTabStripToolbarModel;
private final ThemeColorProvider mThemeColorProvider;
private TabGridSheetCoordinator mTabGridSheetCoordinator;
private TabListCoordinator mTabStripCoordinator;
private TabGroupUiMediator mMediator;
private TabStripToolbarCoordinator mTabStripToolbarCoordinator;
/**
* Creates a new {@link TabGroupUiCoordinator}
*/
public TabGroupUiCoordinator(ViewGroup parentView, ThemeColorProvider themeColorProvider) {
mContext = parentView.getContext();
mThemeColorProvider = themeColorProvider;
mTabStripToolbarModel = new PropertyModel(TabStripToolbarViewProperties.ALL_KEYS);
mTabStripToolbarCoordinator =
new TabStripToolbarCoordinator(mContext, parentView, mTabStripToolbarModel);
}
/**
* Handle any initialization that occurs once native has been loaded.
*/
@Override
public void initializeWithNative(ChromeActivity activity,
BottomControlsCoordinator.BottomControlsVisibilityController visibilityController) {
assert activity instanceof ChromeTabbedActivity;
TabModelSelector tabModelSelector = activity.getTabModelSelector();
TabContentManager tabContentManager = activity.getTabContentManager();
mTabStripCoordinator = new TabListCoordinator(TabListCoordinator.TabListMode.STRIP,
mContext, tabModelSelector, tabContentManager,
mTabStripToolbarCoordinator.getTabListContainerView(), true, COMPONENT_NAME);
mTabGridSheetCoordinator =
new TabGridSheetCoordinator(mContext, activity.getBottomSheetController(),
tabModelSelector, tabContentManager, activity, mThemeColorProvider);
mMediator = new TabGroupUiMediator(visibilityController, this, mTabStripToolbarModel,
tabModelSelector, activity,
((ChromeTabbedActivity) activity).getOverviewModeBehavior(), mThemeColorProvider);
}
/**
* Handles a reset event originated from {@link TabGroupUiMediator}
* when the bottom sheet is collapsed.
*
* @param tabs List of Tabs to reset.
*/
@Override
public void resetStripWithListOfTabs(List<Tab> tabs) {
mTabStripCoordinator.resetWithListOfTabs(tabs);
}
/**
* Handles a reset event originated from {@link TabGroupUiMediator}
* when the bottom sheet is expanded.
*
* @param tabs List of Tabs to reset.
*/
@Override
public void resetSheetWithListOfTabs(List<Tab> tabs) {
mTabGridSheetCoordinator.resetWithListOfTabs(tabs);
}
/**
* Destroy any members that needs clean up.
*/
@Override
public void destroy() {
mTabStripCoordinator.destroy();
mTabGridSheetCoordinator.destroy();
mMediator.destroy();
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
b42f831c5350b411bca78d64c526219950b0c6c8
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/comparison_androart/ro.btrl.pay/source/o/GZ.java
|
b81c57dd4e337b8acf0266c03b0388e7c40bddd3
|
[
"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
| 1,777
|
java
|
package o;
import android.databinding.ViewDataBinding;
import android.databinding.ViewDataBinding.If;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
public class GZ
extends ViewDataBinding
{
private static final SparseIntArray ˎ = null;
private static final ViewDataBinding.If ॱ = null;
private String ʼ;
public final TextView ˊ;
private final FrameLayout ॱॱ;
private long ᐝ = -1L;
public GZ(ˉ paramˉ, View paramView)
{
super(paramˉ, paramView, 0);
paramˉ = ॱ(paramˉ, paramView, 2, ॱ, ˎ);
this.ॱॱ = ((FrameLayout)paramˉ[0]);
this.ॱॱ.setTag(null);
this.ˊ = ((TextView)paramˉ[1]);
this.ˊ.setTag(null);
ˋ(paramView);
ˏॱ();
}
public void ˎ(String paramString)
{
this.ʼ = paramString;
try
{
this.ᐝ |= 1L;
}
finally
{
paramString = finally;
throw paramString;
}
ˊ(120);
super.ʽ();
}
public void ˏ()
{
long l;
try
{
l = this.ᐝ;
this.ᐝ = 0L;
}
finally
{
localObject = finally;
throw localObject;
}
String str = this.ʼ;
if ((0x3 & l) != 0L) {
ʹ.ˊ(this.ˊ, str);
}
}
public boolean ˏ(int paramInt1, Object paramObject, int paramInt2)
{
return false;
}
public void ˏॱ()
{
try
{
this.ᐝ = 2L;
}
finally
{
localObject = finally;
throw localObject;
}
ʽ();
}
public boolean ॱ()
{
try
{
long l = this.ᐝ;
if (l != 0L) {
return true;
}
}
finally
{
localObject = finally;
throw localObject;
}
return false;
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
27affe03c3e07537bd5a67b000c644680ca8db3b
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project9/src/main/java/org/gradle/test/performance9_1/Production9_54.java
|
cf3e76efae1f233bda776c5c0e031d683cfc4dee
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 297
|
java
|
package org.gradle.test.performance9_1;
public class Production9_54 extends org.gradle.test.performance7_1.Production7_54 {
private final String property;
public Production9_54() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
5dc0e8d4889890ade7891e5839f9e47cd9ebea06
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_dc7edb217183f25cc9d71e1c9d13fd4c82a4159b/LoECraftPack/35_dc7edb217183f25cc9d71e1c9d13fd4c82a4159b_LoECraftPack_t.java
|
8db311ac0d8112ff0d32e52a1383d8d86e0379c7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,107
|
java
|
package loecraftpack;
import java.util.Iterator;
import java.util.List;
import loecraftpack.blocks.ColoredBedBlock;
import loecraftpack.blocks.ProtectionMonolithBlock;
import loecraftpack.blocks.te.ColoredBedTileEntity;
import loecraftpack.blocks.te.ProtectionMonolithTileEntity;
import loecraftpack.enums.Dye;
import loecraftpack.items.Bits;
import loecraftpack.items.ColoredBedItem;
import loecraftpack.logic.handlers.EventHandler;
import loecraftpack.logic.handlers.GuiHandler;
import loecraftpack.packethandling.ClientPacketHandler;
import loecraftpack.packethandling.ServerPacketHandler;
import loecraftpack.proxies.CommonProxy;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = "loecraftpack", name = "LoECraft Pack", version = "1.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"loecraftpack" }, packetHandler = ClientPacketHandler.class),
serverPacketHandlerSpec = @SidedPacketHandler(channels = {"loecraftpack" }, packetHandler = ServerPacketHandler.class))
public class LoECraftPack
{
/***************************/
/**Variable Initialization**/
/***************************/
//Create a singleton
@Instance
public static LoECraftPack instance = new LoECraftPack();
//Instantiate bed item variables
//Register proxies
@SidedProxy(clientSide = "loecraftpack.proxies.ClientProxy", serverSide = "loecraftpack.proxies.CommonProxy")
public static CommonProxy proxy;
//Create our own creative tab
public static CreativeTabs LoECraftTab = new CreativeTabs("LoECraftTab")
{
//Set the icon - TODO: ADD NEW ITEM WITH CUSTOM ICON FOR USE HERE
public ItemStack getIconItemStack()
{
return new ItemStack(Item.writableBook, 1, 0);
}
};
//Declare immutable items and blocks - TODO: INITIALIZE THESE IN PREINIT BASED ON CONFIG IDS
public static final Bits bits = new Bits(667);
public static final ColoredBedItem bedItems = new ColoredBedItem(670);
public static final ProtectionMonolithBlock monolith = new ProtectionMonolithBlock(666);
public static final ColoredBedBlock bedBlock = new ColoredBedBlock(670);
/****************************/
/**Forge Pre-Initialization**/
/****************************/
@PreInit
public void preInit(FMLPreInitializationEvent event)
{
/***************/
/**Load Config**/
/***************/
//TODO: LOAD CONFIG HERE
/************************/
/**Initialize Variables**/
/************************/
}
/************************/
/**Forge Initialization**/
/************************/
@Init
public void load(FMLInitializationEvent e)
{
/****************************/
/**Register everything else**/
/****************************/
//Creative tab
LanguageRegistry.instance().addStringLocalization("itemGroup.LoECraftTab", "LoECraft");
//Items
for(int i = 0; i < Bits.names.length; i++ )
LanguageRegistry.instance().addStringLocalization("item.itemBits." + Bits.iconNames[i] + ".name", Bits.names[i]);
//Blocks
GameRegistry.registerBlock(monolith, "ProtectionMonolithBlock");
LanguageRegistry.addName(monolith, "Protection Monolith");
//Bed items and blocks
GameRegistry.registerBlock(bedBlock, "ColoredBed");
for(int i = 0; i < ColoredBedBlock.bedTypes; i++)
LanguageRegistry.instance().addStringLocalization("item.coloredBed." + Dye.values()[i] + ".name", "Bed : " + Dye.values()[i]);
//Tile Entities
GameRegistry.registerTileEntity(ProtectionMonolithTileEntity.class, "ProtectionMonolithTileEntity");
GameRegistry.registerTileEntity(ColoredBedTileEntity.class, "ColoredBedTileEntity");
//Handlers
NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler());
MinecraftForge.EVENT_BUS.register(new EventHandler());
/******************/
/**Do Proxy Stuff**/
/******************/
//Schtuff
proxy.doProxyStuff();
/******************/
/**Update Recipes**/
/******************/
//get CraftingManager
CraftingManager cmi = CraftingManager.getInstance();
//locate and remove old bed recipe
List recipes = cmi.getRecipeList();
Iterator r = recipes.iterator();
while (r.hasNext())
{
IRecipe ir = (IRecipe)r.next();
//if the recipe outputs a bed, remove it
if(ir.getRecipeOutput() != null && ir.getRecipeOutput().itemID == Item.bed.itemID )
{
r.remove();
break; //there really should only be one vanilla bed to remove, so stop once we find it
}
}
//add the new bed recipes to replace the old one we just removed
for (int i = 0; i < 16; i++)
{
cmi.addRecipe(new ItemStack(bedItems, 1, i), "###", "XXX", '#', new ItemStack(Block.cloth, 1, i), 'X', Block.planks);
}
}
/*****************************/
/**Forge Post-Initialization**/
/*****************************/
@PostInit
public void postLoad(FMLPostInitializationEvent e)
{
//TODO: POST-LOAD STUFF
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
933a020377543fbfcd774283bf2f3e5bbe07f016
|
eaae18539fef63104faf926e88f4e39721cc313b
|
/src/Romanenko/PR13.1/src/EdgeWeightedGraph.java
|
78b6da850094842f2c1baea655ca46e641ea415b
|
[] |
no_license
|
anneteka/OKAlabs
|
e83977d9f58f93ce3c985584e45330b7d7d06b2b
|
44c1215cf90117ea15e8db0035adcab895a0a970
|
refs/heads/master
| 2020-04-09T15:10:40.869208
| 2018-12-20T22:05:53
| 2018-12-20T22:05:53
| 160,418,193
| 2
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,988
|
java
|
import java.util.Stack;
import ua.princeton.lib.In;
import ua.princeton.lib.StdRandom;
public class EdgeWeightedGraph {
private static final String NEWLINE = System.getProperty("line.separator");
private final int V;
private int E;
private Bag<Edge>[] adj;
public EdgeWeightedGraph(int V) {
if (V < 0)
throw new IllegalArgumentException(
"Number of vertices must be nonnegative");
this.V = V;
this.E = 0;
adj = (Bag<Edge>[]) new Bag[V];
for (int v = 0; v < V; v++) {
adj[v] = new Bag<Edge>();
}
}
public EdgeWeightedGraph(int V, int E) {
this(V);
if (E < 0)
throw new IllegalArgumentException(
"Number of edges must be nonnegative");
for (int i = 0; i < E; i++) {
int v = StdRandom.uniform(V);
int w = StdRandom.uniform(V);
double weight = Math.round(100 * StdRandom.uniform()) / 100.0;
Edge e = new Edge(v, w, weight);
addEdge(e);
}
}
public EdgeWeightedGraph(In in) {
this(in.readInt());
int E = in.readInt();
if (E < 0)
throw new IllegalArgumentException(
"Number of edges must be nonnegative");
for (int i = 0; i < E; i++) {
int v = in.readInt() - 1;
int w = in.readInt() - 1;
double weight = in.readDouble();
Edge e = new Edge(v, w, weight);
addEdge(e);
}
}
public EdgeWeightedGraph(int Ed, Point[] m) {
this(Ed);
for (int i = 0; i < m.length; i++) {
for (int j = i + 1; j < m.length; j++) {
Edge e = new Edge(i, j, Point.lengthEdge(m[i], m[j]));
addEdge(e);
}
}
}
public EdgeWeightedGraph(EdgeWeightedGraph G) {
this(G.V());
this.E = G.E();
for (int v = 0; v < G.V(); v++) {
// reverse so that adjacency list is in same order as original
Stack<Edge> reverse = new Stack<Edge>();
for (Edge e : G.adj[v]) {
reverse.push(e);
}
for (Edge e : reverse) {
adj[v].add(e);
}
}
}
public int V() {
return V;
}
public int E() {
return E;
}
private void validateVertex(int v) {
if (v < 0 || v >= V)
throw new IndexOutOfBoundsException("vertex " + v
+ " is not between 0 and " + (V - 1));
}
public void addEdge(Edge e) {
int v = e.either();
int w = e.other(v);
validateVertex(v);
validateVertex(w);
adj[v].add(e);
adj[w].add(e);
E++;
}
public Iterable<Edge> adj(int v) {
validateVertex(v);
return adj[v];
}
public int degree(int v) {
validateVertex(v);
return adj[v].size();
}
public Iterable<Edge> edges() {
Bag<Edge> list = new Bag<Edge>();
for (int v = 0; v < V; v++) {
int selfLoops = 0;
for (Edge e : adj(v)) {
if (e.other(v) > v) {
list.add(e);
}
else if (e.other(v) == v) {
if (selfLoops % 2 == 0)
list.add(e);
selfLoops++;
}
}
}
return list;
}
public String toString() {
StringBuilder s = new StringBuilder();
s.append(V + " " + E + NEWLINE);
for (int v = 0; v < V; v++) {
s.append(v + ": ");
for (Edge e : adj[v]) {
s.append(e + " ");
}
s.append(NEWLINE);
}
return s.toString();
}
}
|
[
"a.karlysheva@ukma.edu.ua"
] |
a.karlysheva@ukma.edu.ua
|
e96e82ed64f30c84572e18c0650b8b1133cc903c
|
5a088135a99a386e473f94f971c571864373865c
|
/04.MSH/02.Engineering/03.Code/01.server/trunk/elh/trunk/src/main/java/com/lenovohit/elh/base/model/Patient.java
|
f3c07c4b0201a1846dcf9e319ab31c5d057c2ad7
|
[] |
no_license
|
jacky-cyber/work
|
a7bebd2cc910da1e9e227181def880a78cc1de07
|
e58558221b2a8f410b087fa2ce88017cea12efa4
|
refs/heads/master
| 2022-02-25T09:48:53.940782
| 2018-05-01T10:04:53
| 2018-05-01T10:04:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,000
|
java
|
package com.lenovohit.elh.base.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.lenovohit.core.model.BaseIdModel;
/**
* 就诊人
* @author Administrator
*
*/
@Entity
@Table(name="ELH_PATIENT")
public class Patient extends BaseIdModel {
private static final long serialVersionUID = -6270132686252825491L;
private String idHlht;//院方数据ID 暂态
private String personId; //人员
private String userType; //用户类型
private String name ; //姓名
private String photo ; //头像
private String idno ; //身份证号码
private String mobile ; //手机
private String email ; //邮箱
private String gender ; //性别
private String address ; //地址
private String status ; //状态
private String birthday; //出生日期
private double height ; //身高
private double weight ; //体重
@Transient
public String getIdHlht() {
return idHlht;
}
public void setIdHlht(String idHlht) {
this.idHlht = idHlht;
}
@Column(name = "PERSON_ID")
public String getPersonId() {
return personId;
}
public void setPersonId(String personId) {
this.personId = personId;
}
@Column(name = "USER_TYPE")
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
@Column(name = "NAME")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "PHOTO")
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
@Column(name = "IDNO")
public String getIdno() {
return idno;
}
public void setIdno(String idno) {
this.idno = idno;
}
@Column(name = "MOBILE")
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
@Column(name = "EMAIL")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Column(name = "GENDER")
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
@Column(name = "ADDRESS")
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Column(name = "STATUS")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Column(name = "BIRTHDAY")
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
@Column(name = "HEIGHT")
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
@Column(name = "WEIGHT")
public double getWeight() {
return weight;
}
public void setWeight(double weight) {
this.weight = weight;
}
}
|
[
"liuximing2016@qq.com"
] |
liuximing2016@qq.com
|
45d9c78ef5a3f1ea0539080900c4585883a2c1a4
|
d50d92bb76a37b63d57f1d2d495ef2fe16e836f6
|
/ai/evo/heredity/Asexual.java
|
e264a5fb444fb95d579e2fe0ef9ef6bd11ff76fa
|
[] |
no_license
|
alexoooo/reinforcementlearning
|
bcc7aaa64a6f44ae74b791287c16872cacdd82b7
|
7dc91901af925cfd9e14997f4b6b3a2cad0c9553
|
refs/heads/master
| 2020-04-17T06:46:35.290966
| 2019-01-18T03:58:28
| 2019-01-18T03:58:28
| 166,339,500
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 217
|
java
|
package ao.ai.evo.heredity;
import ao.ai.evo.primordial_soup.PrimordialSoup;
/**
*
*/
public interface Asexual<T>
{
public T microMutate(PrimordialSoup soup);
public T macroMutate(PrimordialSoup soup);
}
|
[
"ostrovsky.alex@gmail.com"
] |
ostrovsky.alex@gmail.com
|
eb5c0df19b7d67f68d94c2854a4c5b44cf7b737d
|
d98de110431e5124ec7cc70d15906dac05cfa61a
|
/public/source/photon/plugins/org.marketcetera.photon.marketdata/src/main/java/org/marketcetera/photon/marketdata/IFeedStatusChangedListener.java
|
e2f5b0a9d59ff1433ff6a9d8b1fce2e45cc74cc0
|
[] |
no_license
|
dhliu3/marketcetera
|
367f6df815b09f366eb308481f4f53f928de4c49
|
4a81e931a044ba19d8f35bdadd4ab081edd02f5f
|
refs/heads/master
| 2020-04-06T04:39:55.389513
| 2012-01-30T06:49:25
| 2012-01-30T06:49:25
| 29,947,427
| 0
| 1
| null | 2015-01-28T02:54:39
| 2015-01-28T02:54:39
| null |
UTF-8
|
Java
| false
| false
| 1,450
|
java
|
package org.marketcetera.photon.marketdata;
import java.util.EventListener;
import org.marketcetera.marketdata.FeedStatus;
import org.marketcetera.util.misc.ClassVersion;
/**
* Interface that feed status listeners must implement.
*
* @author <a href="mailto:will@marketcetera.com">Will Horn</a>
* @version $Id: IFeedStatusChangedListener.java 10620 2009-06-22 07:27:44Z tlerios $
* @since 1.0.0
*/
@ClassVersion("$Id: IFeedStatusChangedListener.java 10620 2009-06-22 07:27:44Z tlerios $")
public interface IFeedStatusChangedListener extends EventListener {
/**
* Callback for handling feed status changes.
*
* @param event
* event describing feed status change
*/
void feedStatusChanged(IFeedStatusEvent event);
/**
* Event object interface for feed status changes.
*/
@ClassVersion("$Id: IFeedStatusChangedListener.java 10620 2009-06-22 07:27:44Z tlerios $")
public interface IFeedStatusEvent {
/**
* The object on which the event initially occurred.
*
* @return the object on which the event initially occurred
*/
public Object getSource();
/**
* Returns the old status, before the change that triggered this event.
*
* @return the old status
*/
FeedStatus getOldStatus();
/**
* Returns the new status, that is the feed's current status.
*
* @return the new status
*/
FeedStatus getNewStatus();
}
}
|
[
"stevenshack@stevenshack.com"
] |
stevenshack@stevenshack.com
|
7a33438425edbe9b7a5171854b6389f57e41ddce
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project68/src/main/java/org/gradle/test/performance68_2/Production68_129.java
|
5f806d023e0fc3b36ed5ac48c658e387c3d674da
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance68_2;
public class Production68_129 extends org.gradle.test.performance15_2.Production15_129 {
private final String property;
public Production68_129() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
35fa49f5e2d02b318d8f5ee5d6019abb8101efa2
|
2ee773cbdc216c9165029632eb36fedd8de36ca5
|
/app/src/main/java/org/firstinspires/ftc/robotcore/internal/android/dex/Annotation.java
|
99a0e16df1aded45244a3a1271ae4dc1558df458
|
[] |
no_license
|
Killian-Townsend/Custom-FTC-Driver-Station-2021
|
6bee582afdb032ad2921b394280a2321f0f815ec
|
16e8999d7593ef2c4189902bf2d376db8a3a6b41
|
refs/heads/master
| 2023-03-28T04:48:30.704409
| 2021-03-19T01:09:18
| 2021-03-19T01:09:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,903
|
java
|
package org.firstinspires.ftc.robotcore.internal.android.dex;
public final class Annotation implements Comparable<Annotation> {
private final Dex dex;
private final EncodedValue encodedAnnotation;
private final byte visibility;
public Annotation(Dex paramDex, byte paramByte, EncodedValue paramEncodedValue) {
this.dex = paramDex;
this.visibility = paramByte;
this.encodedAnnotation = paramEncodedValue;
}
public int compareTo(Annotation paramAnnotation) {
return this.encodedAnnotation.compareTo(paramAnnotation.encodedAnnotation);
}
public EncodedValueReader getReader() {
return new EncodedValueReader(this.encodedAnnotation, 29);
}
public int getTypeIndex() {
EncodedValueReader encodedValueReader = getReader();
encodedValueReader.readAnnotation();
return encodedValueReader.getAnnotationType();
}
public byte getVisibility() {
return this.visibility;
}
public String toString() {
if (this.dex == null) {
StringBuilder stringBuilder1 = new StringBuilder();
stringBuilder1.append(this.visibility);
stringBuilder1.append(" ");
stringBuilder1.append(getTypeIndex());
return stringBuilder1.toString();
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(this.visibility);
stringBuilder.append(" ");
stringBuilder.append(this.dex.typeNames().get(getTypeIndex()));
return stringBuilder.toString();
}
public void writeTo(Dex.Section paramSection) {
paramSection.writeByte(this.visibility);
this.encodedAnnotation.writeTo(paramSection);
}
}
/* Location: C:\Users\Student\Desktop\APK Decompiling\com.qualcomm.ftcdriverstation_38_apps.evozi.com\classes-dex2jar.jar!\org\firstinspires\ftc\robotcore\internal\android\dex\Annotation.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"admin@thatsfuckingstupid.org"
] |
admin@thatsfuckingstupid.org
|
7da1993d7d9b8ffbe21cd48113d5e6c0606c480a
|
7278e7e153bb09ed4454a35d7c2b40d797d3385b
|
/NxLjngMeter/src/main/java/com/zfg/org/myexample/pay/weipay/WechatNotSupportException.java
|
5f5ecd87c9a08d55fb83b15ca6dadf5416fd11fe
|
[] |
no_license
|
CapRobin/LjngProject
|
f530dce3f917222b7c669ff273fd6e7f9c41f859
|
a63ce5d483ed41be57ac714910b394ba40682a5a
|
refs/heads/master
| 2020-03-11T17:07:25.914849
| 2018-05-08T11:20:17
| 2018-05-08T11:20:17
| 130,138,154
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 353
|
java
|
package com.zfg.org.myexample.pay.weipay;
/**
* Created by Administrator on 2016-10-19.
*/
public class WechatNotSupportException extends Exception {
private static final long serialVersionUID = 2313964703740528072L;
public WechatNotSupportException(){
super("Current wechat APP version too low, not support wechat pay.");
}
}
|
[
"CapRobin@yeah.net"
] |
CapRobin@yeah.net
|
3b4481fbd76e4560f2be596c7e9f2724436ec281
|
ae23e0ccead7faf6f6f7a96a0ff3c120346e2036
|
/library/src/main/java/com/hippo/tuxiang/GLThreadManager.java
|
e6a8ff19f9e23f9b3ab60405451672fa01c5d4dc
|
[
"Apache-2.0"
] |
permissive
|
seven332/TuXiang
|
c31b11d26b70b56ea0a341a014281d02f3838f32
|
a8594f13f37abda1833ab9f23b5be580acf71ad4
|
refs/heads/master
| 2020-12-24T06:53:16.650032
| 2019-01-31T14:55:19
| 2019-01-31T14:55:19
| 57,882,607
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,241
|
java
|
/*
* Copyright (C) 2008 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.hippo.tuxiang;
import android.util.Log;
// android-9.0.0_r30
final class GLThreadManager {
private static final String TAG = "GLThreadManager";
public synchronized void threadExiting(GLThread thread) {
if (GLStuff.LOG_THREADS) {
Log.i("GLThread", "exiting tid=" + thread.getId());
}
thread.mExited = true;
notifyAll();
}
/*
* Releases the EGL context. Requires that we are already in the
* sGLThreadManager monitor when this is called.
*/
public void releaseEglContextLocked(GLThread thread) {
notifyAll();
}
}
|
[
"seven332@163.com"
] |
seven332@163.com
|
5effb855444b696e956dae9eb9f35b3f5a73c359
|
376641f400747cc5019a6c529519d5c85cdd9eca
|
/src/lec21/collection/set/MainClass.java
|
758da0cab918d482074184a7121e1e0c78b3047c
|
[] |
no_license
|
kchhipa4u/JavaInitialConcepts
|
ed18c82d638537f2600d963ba7b5f457ebe2a3e8
|
244cc1749a184ac6e38917b62d78f161cce7db3f
|
refs/heads/master
| 2021-01-21T16:45:42.509964
| 2017-12-28T02:04:55
| 2017-12-28T02:04:55
| 91,905,397
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,252
|
java
|
package lec21.collection.set;
import java.util.Iterator;
import java.util.LinkedHashSet;
public class MainClass
{
public static void main(String[] args)
{
//Creating LinkedHashSet
LinkedHashSet<Customer> set = new LinkedHashSet<Customer>();
set.add(new Customer("Kanhaiya", 1));
set.add(new Customer("Anil", 2));
set.add(new Customer("Madhu", 3));
set.add(new Customer("Anil", 2));
//Adding elements to LinkedHashSet
/* set.add(new Customer("Jack", 021));
set.add(new Customer("Peter", 105));
set.add(new Customer("Ramesh", 415));
set.add(new Customer("Julian", 814));
set.add(new Customer("Avinash", 105)); //Duplicate Element
set.add(new Customer("Sapna", 879));
set.add(new Customer("John", 546));
set.add(new Customer("Moni", 254));
set.add(new Customer("Ravi", 105)); */ //Duplicate Element
//Getting Iterator object
Iterator<Customer> it = set.iterator();
while (it.hasNext())
{
Customer customer = (Customer) it.next();
System.out.println(customer);
}
}
}
|
[
"kchhipa4u@gmail.com"
] |
kchhipa4u@gmail.com
|
eafbe5b068314b358eb1e062fcd2e7e2b70bfd9a
|
ea516849f3551408b2168cb7ee7f9143c1bdc13e
|
/src/com/cynovo/sirius/core/order/OrderContentToOnsale.java
|
4fa46a018e25644824745d4a723d9daadca0c496
|
[] |
no_license
|
joysun2006/CloudPos_part10_20141212
|
3767594ae7d9123be2452b67b6d974204ae1aafb
|
31eceebc1d54f08fc38666387d0d1e2ab4a00ab8
|
refs/heads/master
| 2018-05-30T00:09:09.363701
| 2014-12-12T11:45:15
| 2014-12-12T11:45:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 702
|
java
|
package com.cynovo.sirius.core.order;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class OrderContentToOnsale {
@SerializedName("cid")
@Expose
private int orderContentID;
@Expose
private int onsaleID;
@Expose
private String value;
public int getOrderContentID() {
return orderContentID;
}
public void setOrderContentID(int orderContentID) {
this.orderContentID = orderContentID;
}
public int getOnsaleID() {
return onsaleID;
}
public void setOnsaleID(int onsaleID) {
this.onsaleID = onsaleID;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
|
[
"no_1hailong@yeah.net"
] |
no_1hailong@yeah.net
|
f7f4400da9748186d3486c014e3ba356b7b63916
|
db97ce70bd53e5c258ecda4c34a5ec641e12d488
|
/src/main/java/com/alipay/api/domain/SpecialPriceDTO.java
|
abded1377ae6d672fee9ab966ae6dc6948d05750
|
[
"Apache-2.0"
] |
permissive
|
smitzhang/alipay-sdk-java-all
|
dccc7493c03b3c937f93e7e2be750619f9bed068
|
a835a9c91e800e7c9350d479e84f9a74b211f0c4
|
refs/heads/master
| 2022-11-23T20:32:27.041116
| 2020-08-03T13:03:02
| 2020-08-03T13:03:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,064
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 特价营销
*
* @author auto create
* @since 1.0, 2020-05-06 16:54:48
*/
public class SpecialPriceDTO extends AlipayObject {
private static final long serialVersionUID = 5378149779527117681L;
/**
* 最少份数,如果有阶梯规则,多个值用英文逗号分割,例如:3,5
*/
@ApiField("min_nums")
private String minNums;
/**
* 营销活动skuid
*/
@ApiListField("promotion_sku_id")
@ApiField("string")
private List<String> promotionSkuId;
/**
* 活动价,必须是数字格式,且最多两位小数点。
如果有阶梯规则,多个值用英文逗号分割,例如:10,5
*/
@ApiField("special_price")
private String specialPrice;
/**
* 是否仅特价商品(Y/N)
*/
@ApiField("special_price_only")
private String specialPriceOnly;
/**
* 特价skuId
*/
@ApiListField("special_price_sku_id")
@ApiField("string")
private List<String> specialPriceSkuId;
public String getMinNums() {
return this.minNums;
}
public void setMinNums(String minNums) {
this.minNums = minNums;
}
public List<String> getPromotionSkuId() {
return this.promotionSkuId;
}
public void setPromotionSkuId(List<String> promotionSkuId) {
this.promotionSkuId = promotionSkuId;
}
public String getSpecialPrice() {
return this.specialPrice;
}
public void setSpecialPrice(String specialPrice) {
this.specialPrice = specialPrice;
}
public String getSpecialPriceOnly() {
return this.specialPriceOnly;
}
public void setSpecialPriceOnly(String specialPriceOnly) {
this.specialPriceOnly = specialPriceOnly;
}
public List<String> getSpecialPriceSkuId() {
return this.specialPriceSkuId;
}
public void setSpecialPriceSkuId(List<String> specialPriceSkuId) {
this.specialPriceSkuId = specialPriceSkuId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
3b6e20a5eedf98b3c54a8a2112c6314cfcdf2fa8
|
ae148d4b0d77f9a0f8364954057966950606d745
|
/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java
|
1e52b245991bdadca83abd69b0b4bb3067340cd8
|
[
"Apache-2.0"
] |
permissive
|
varunjha089/spring-boot
|
b259ab6b1373fdf40d58dca2f61a1356de64a9b9
|
c4adb76df214d7e1bb6960ccaa569d4322a499f7
|
refs/heads/master
| 2022-11-11T17:07:21.607677
| 2017-10-16T14:48:49
| 2017-10-16T14:48:49
| 107,150,191
| 1
| 0
|
Apache-2.0
| 2020-07-05T12:04:47
| 2017-10-16T15:56:48
|
Java
|
UTF-8
|
Java
| false
| false
| 4,385
|
java
|
/*
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.devtools.restart.server;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.http.server.ServletServerHttpResponse;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
/**
* Tests for {@link HttpRestartServer}.
*
* @author Phillip Webb
*/
public class HttpRestartServerTests {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Mock
private RestartServer delegate;
private HttpRestartServer server;
@Captor
private ArgumentCaptor<ClassLoaderFiles> filesCaptor;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
this.server = new HttpRestartServer(this.delegate);
}
@Test
public void sourceFolderUrlFilterMustNotBeNull() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("SourceFolderUrlFilter must not be null");
new HttpRestartServer((SourceFolderUrlFilter) null);
}
@Test
public void restartServerMustNotBeNull() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("RestartServer must not be null");
new HttpRestartServer((RestartServer) null);
}
@Test
public void sendClassLoaderFiles() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
ClassLoaderFiles files = new ClassLoaderFiles();
files.addFile("name", new ClassLoaderFile(Kind.ADDED, new byte[0]));
byte[] bytes = serialize(files);
request.setContent(bytes);
this.server.handle(new ServletServerHttpRequest(request),
new ServletServerHttpResponse(response));
verify(this.delegate).updateAndRestart(this.filesCaptor.capture());
assertThat(this.filesCaptor.getValue().getFile("name")).isNotNull();
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
public void sendNoContent() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
this.server.handle(new ServletServerHttpRequest(request),
new ServletServerHttpResponse(response));
verifyZeroInteractions(this.delegate);
assertThat(response.getStatus()).isEqualTo(500);
}
@Test
public void sendBadData() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
request.setContent(new byte[] { 0, 0, 0 });
this.server.handle(new ServletServerHttpRequest(request),
new ServletServerHttpResponse(response));
verifyZeroInteractions(this.delegate);
assertThat(response.getStatus()).isEqualTo(500);
}
private byte[] serialize(Object object) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(object);
oos.close();
return bos.toByteArray();
}
}
|
[
"pwebb@pivotal.io"
] |
pwebb@pivotal.io
|
7f8e150e699eaa3db29023590535fd5a1144f8e5
|
bdd99fcebf6031214f94139e39370eef71773c23
|
/repository/src/main/java/org/cradle/repository/BasicRowMapper.java
|
322c875669ddc5db54278eaf04c93d5951b437b8
|
[
"Apache-2.0"
] |
permissive
|
mcraken/platform
|
7b8b3c1e10c673cc189e54282b45982469979c73
|
f98161d8aeeb81528fcbd6b0224aefa3573c2c52
|
refs/heads/master
| 2016-09-05T14:34:15.309179
| 2015-05-27T06:59:19
| 2015-05-27T06:59:19
| 29,773,123
| 24
| 10
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,310
|
java
|
/**
* Copyright mcplissken.
*
* 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.cradle.repository;
/**
* @author Sherief Shawky
* @email mcrakens@gmail.com
* @date Jan 26, 2015
*/
public abstract class BasicRowMapper<T> {
private ModelRepository repository;
private String modelName;
private String target;
/**
* @param target the target to set
*/
public void setTarget(String target) {
this.target = target;
}
public void setRepository(ModelRepository repository) {
this.repository = repository;
}
public void setModelName(String modelName) {
this.modelName = modelName;
}
public void init() throws UnknowRepositoryTargetException{
repository.registerMapper(target, modelName, this);
}
public abstract T map(RowAdapter row);
}
|
[
"mcrakens@gmail.com"
] |
mcrakens@gmail.com
|
f4be05c89d3a9c6034d43c80c8ff3b04db134ce6
|
e0da2644f734f7cd6ec40efd766ae2c56a586194
|
/DaMing/app/src/main/java/com/example/daming_text/tuzhiwenjian.java
|
6b523bbcdcb2bbce06e750764bb7d2b9bf417824
|
[] |
no_license
|
aa992131860aa/androidgit
|
192e473d8871fa33ba76604631a9105d77bdf953
|
32cd0f705cf1330e1f7e1af4852b8cb1ff231740
|
refs/heads/master
| 2020-06-15T23:15:08.965453
| 2016-12-01T08:19:55
| 2016-12-01T08:19:55
| 75,259,467
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,730
|
java
|
package com.example.daming_text;
import java.io.File;
import com.daming.entity.Chanpjswj;
import com.daming.entity.Chanpjyjl;
import com.daming.entity.TongZi;
import com.daming.util.RequestDataUtil;
import com.lidroid.xutils.HttpUtils;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;
import com.squareup.picasso.Picasso;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.Toast;
public class tuzhiwenjian extends Activity {
private String mIp;
private String mUserName;
private String mUserPwd;
private String scrq;
private String cpdm;
private String test;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.tuzhiwenjian);
ViewUtils.inject(this);
init();
new ChanpjswjTask().execute();
}
private void init() {
// TODO Auto-generated method stub
mIp = getIntent().getStringExtra("ip");
mUserName = getIntent().getStringExtra("username");
mUserPwd = getIntent().getStringExtra("userpwd");
scrq = getIntent().getStringExtra("scrq");
cpdm = getIntent().getStringExtra("cpdm1");
}
/**
* 异步加载历史信息
*
* @author Administrator
*
*/
private class ChanpjswjTask extends AsyncTask<Void, Void, Chanpjswj> {
@Override
protected Chanpjswj doInBackground(Void... arg0) {
return loadChanpjswj();
}
@Override
protected void onPostExecute(Chanpjswj result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
if(result!=null&&result.getSrc_tzwj()!=null&&!result.getSrc_tzwj().equals("")){
String src = result.getSrc_tzwj();
int lastOf = src.lastIndexOf("/");
String srcPdf = src.substring(lastOf, src.length());
final String targe = TongZiActivity.getDiskCacheDir(tuzhiwenjian.this)+srcPdf;
new HttpUtils().download(result.getSrc_tzwj(), targe, new RequestCallBack<File>() {
@Override
public void onSuccess(ResponseInfo<File> arg0) {
// TODO Auto-generated method stub
//showDocument(Uri.fromFile(new File(targe)));
Uri path = Uri.fromFile(new File(targe));
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//startActivity(intent);
startActivityForResult(intent, 100);
}
@Override
public void onFailure(HttpException arg0, String arg1) {
}
});
}else{
Toast.makeText(tuzhiwenjian.this, "没有文件", 0).show();
finish();
}
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
finish();
}
/**
* 加载培训内容数据
*
* @return
*/
private Chanpjswj loadChanpjswj() {
String param = "<?xml version=\"1.0\" encoding=\"GB2312\" standalone=\"no\"?><root> <data> <param> <cpdm>"
+ cpdm
+ "</cpdm></param></data></root>";
String method_name = "GetChanpjswj";
String data = RequestDataUtil.callCommonMethod(mUserName, mUserPwd,
param, method_name, mIp);
if (!data.equals("")) {
// Log.e("chanx", data);
data = RequestDataUtil.splieRequestXml(data);
return RequestDataUtil.parseChanpjswj(data);
} else {
return null;
}
}
}
|
[
"992131860@qq.com"
] |
992131860@qq.com
|
774ddf0d023ea74e1e92e3b8a0fb03f5bef1af2e
|
c26304a54824faa7c1b34bb7882ee7a335a8e7fb
|
/flink-filesystems/flink-azure-fs-hadoop/src/main/java/org/apache/flink/fs/azurefs/EnvironmentVariableKeyProvider.java
|
9c981d376d39aef400f1d54aa9c0f35447d95a4e
|
[
"BSD-3-Clause",
"OFL-1.1",
"ISC",
"MIT",
"Apache-2.0"
] |
permissive
|
apache/flink
|
905e0709de6389fc9212a7c48a82669706c70b4a
|
fbef3c22757a2352145599487beb84e02aaeb389
|
refs/heads/master
| 2023-09-04T08:11:07.253750
| 2023-09-04T01:33:25
| 2023-09-04T01:33:25
| 20,587,599
| 23,573
| 14,781
|
Apache-2.0
| 2023-09-14T21:49:04
| 2014-06-07T07:00:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,892
|
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.flink.fs.azurefs;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.azure.KeyProvider;
import org.apache.hadoop.fs.azure.KeyProviderException;
/**
* An implementation of {@link org.apache.hadoop.fs.azure.KeyProvider}, which reads the Azure
* storage key from an environment variable named "AZURE_STORAGE_KEY".
*/
public class EnvironmentVariableKeyProvider implements KeyProvider {
public static final String AZURE_STORAGE_KEY_ENV_VARIABLE = "AZURE_STORAGE_KEY";
@Override
public String getStorageAccountKey(final String s, final Configuration configuration)
throws KeyProviderException {
String azureStorageKey = System.getenv(AZURE_STORAGE_KEY_ENV_VARIABLE);
if (azureStorageKey != null) {
return azureStorageKey;
} else {
throw new KeyProviderException(
"Unable to retrieve Azure storage key from environment. \""
+ AZURE_STORAGE_KEY_ENV_VARIABLE
+ "\" not set.");
}
}
}
|
[
"sewen@apache.org"
] |
sewen@apache.org
|
fbc4ebbcaf52c7f9de2a84d9e84c16726dc15fd9
|
1637b0f1477b09540434eefed6091ef6a490e42e
|
/src/main/java/org/tomitribe/jkta/repos/Project.java
|
abb2b9a19061d677deba75e5b3821251d400b95f
|
[] |
no_license
|
tomitribe/jkta
|
6c9a24464609835c922fa1c3bce3023ed9903886
|
29d3c47526ad018683109df4c38dab662394e48c
|
refs/heads/master
| 2022-07-23T18:11:59.659910
| 2021-04-06T02:45:11
| 2021-04-06T02:45:11
| 189,473,135
| 1
| 3
| null | 2022-07-15T21:08:39
| 2019-05-30T19:49:06
|
Java
|
UTF-8
|
Java
| false
| false
| 4,361
|
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.tomitribe.jkta.repos;
import org.tomitribe.util.Join;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
public class Project implements Comparable<Project>{
private final File dir;
private final List<Source> sources;
public Project(final File dir, final List<Source> sources) {
this.dir = dir;
this.sources = sources;
}
@Override
public int compareTo(final Project o) {
return this.dir.getName().compareTo(o.dir.getName());
}
public File getDir() {
return dir;
}
public List<Source> getSources() {
return sources;
}
public List<String> getClasses() {
return sources.stream()
.map(Source::getClassName)
.distinct()
.sorted()
.collect(Collectors.toList());
}
public List<String> getPackages() {
return sources.stream()
.map(Source::getPackageName)
.distinct()
.sorted()
.collect(Collectors.toList());
}
public List<String> getShortPackages() {
final List<String> list = new ArrayList<String>(getPackages());
final List<String> strings = new ArrayList<>(list);
for (final String string : strings) {
final Iterator<String> iterator = list.iterator();
while (iterator.hasNext()) {
final String value = iterator.next();
if (value.equals(string)) continue;
if (value.startsWith(string)) iterator.remove();
}
}
Collections.sort(list);
return list;
}
public List<String> getNonstandardImports() {
return sources.stream()
.map(Source::getImports)
.flatMap(Collection::stream)
.sorted()
.collect(Collectors.toList());
}
public String getStatus() {
if (getClassesCount() == 0) return "other";
if (getNonstandardImportsCount() == 0) return "api";
return "api-impl";
}
public static Project parse(final File dir) {
final List<Source> sources = Javax.getJavaxFiles(dir)
.stream()
.filter(Paths::isMain)
.filter(file -> !file.getName().equals("module-info.java"))
.filter(file -> !file.getName().equals("package-info.java"))
.map(Source::parse)
.filter(Source::isJavax)
.collect(Collectors.toList());
return new Project(dir, sources);
}
@Override
public String toString() {
return "Project{" +
"name=" + getName() +
", javax=[" + getPackageList() + "]" +
", classes=" + getClassesCount() +
", packages=" + getPackagesCount() +
(getNonstandardImportsCount() > 0 ? ", nonportable=" + getNonstandardImportsCount() : "") +
'}';
}
public String getName() {
return dir.getName();
}
public String getPackageList() {
return Join.join(", ", getShortPackages());
}
public int getNonstandardImportsCount() {
return getNonstandardImports().size();
}
public int getPackagesCount() {
return getPackages().size();
}
public int getClassesCount() {
return getClasses().size();
}
}
|
[
"david.blevins@gmail.com"
] |
david.blevins@gmail.com
|
68b32c39bdf6f9c74d0b8a80a211926ca315d12e
|
a75a9b7f09aacf7f6f9d869e0ff936560c5c4787
|
/app/src/main/java/org/nearbyshops/shopkeeperappnew/ModelEventBus/NotificationEvent.java
|
fb992b3c3c358a78e3778fdc16b465deb19edd78
|
[
"Apache-2.0"
] |
permissive
|
WambuaSimon/Nearby-Shops-Shop-Owner-Android-app
|
e95041c9e2fcb5255e456e6f3c32811f8748ef67
|
f366ed43aa4af05e8f225da7e22605a621b18bfa
|
refs/heads/master
| 2020-06-22T00:20:42.960629
| 2019-07-06T11:00:56
| 2019-07-06T11:00:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 433
|
java
|
package org.nearbyshops.shopkeeperappnew.ModelEventBus;
public class NotificationEvent {
private int notificationType;
public NotificationEvent(int notificationType) {
this.notificationType = notificationType;
}
public int getNotificationType() {
return notificationType;
}
public void setNotificationType(int notificationType) {
this.notificationType = notificationType;
}
}
|
[
"sumeet.0587@gmail.com"
] |
sumeet.0587@gmail.com
|
a5144b35ee47bd653f8d4cac044c34d7de9b15dc
|
91cc93f18148ed3c19892054eb3a1a6fd1210842
|
/com/etsy/android/lib/models/shopedit/ShopEditDelegate.java
|
de2c4909718b7fe819a38ab66b25f1842ac57101
|
[] |
no_license
|
zickieloox/EtsyAndroidApp
|
9a2729995fb3510d020b203de5cff5df8e73bcfe
|
5d9df4e7e639a6aebc10fe0dbde3b6169d074a84
|
refs/heads/master
| 2021-12-10T02:57:10.888170
| 2016-07-11T11:57:53
| 2016-07-11T11:57:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,887
|
java
|
package com.etsy.android.lib.models.shopedit;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import com.etsy.android.lib.models.EditStructuredPoliciesShopContext;
import com.etsy.android.lib.models.ShopAbout.Link;
import com.etsy.android.lib.models.ShopAboutImage;
import com.etsy.android.lib.models.ShopAboutMember;
import com.etsy.android.lib.models.ShopAboutVideo;
import com.etsy.android.lib.models.apiv3.FAQ;
import com.etsy.android.lib.models.apiv3.Image;
import com.etsy.android.lib.models.apiv3.SellerDetails;
import com.etsy.android.lib.models.apiv3.StructuredShopPolicies;
import com.etsy.android.lib.models.shopedit.switchrow.ShopEditVacationSwitchRow;
import java.util.List;
public interface ShopEditDelegate {
void addAboutImage();
void addFaq();
void addLink(@NonNull List<Link> list);
void addShopMember();
void editAboutImage(@NonNull ShopAboutImage shopAboutImage);
void editBasicShopField(@NonNull String str, @StringRes int i, @NonNull String str2, @NonNull String str3);
void editCoverPhoto(@Nullable Image image, int i);
void editFaq(@Nullable FAQ faq);
void editLink(@NonNull Link link, @NonNull List<Link> list);
void editSellerDetails(@Nullable SellerDetails sellerDetails);
void editShopIcon(@Nullable Image image);
void editShopMember(@NonNull ShopAboutMember shopAboutMember);
void editShopVideo(@Nullable ShopAboutVideo shopAboutVideo, @NonNull ShopVideoShareData shopVideoShareData);
void editStructuredPolicies(@Nullable StructuredShopPolicies structuredShopPolicies, @NonNull EditStructuredPoliciesShopContext editStructuredPoliciesShopContext);
void goToShopRearrange();
void reloadContent();
void toggleVacationSwitch(@NonNull ShopEditVacationSwitchRow shopEditVacationSwitchRow);
}
|
[
"pink2mobydick@gmail.com"
] |
pink2mobydick@gmail.com
|
f22bb515c00c074e92f23d2f82b54b6f0dc23b7b
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/jaxrs-resteasy-eap/generated/src/gen/java/org/openapitools/model/ComDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties.java
|
0d6c463fe25816bdf1d4917affa81d6b1587436d
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 3,091
|
java
|
package org.openapitools.model;
import java.util.Objects;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ConfigNodePropertyArray;
import org.openapitools.model.ConfigNodePropertyInteger;
import javax.validation.constraints.*;
import io.swagger.annotations.*;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen", date = "2019-08-05T01:00:05.540Z[GMT]")
public class ComDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties {
private ConfigNodePropertyArray allowedPaths = null;
private ConfigNodePropertyInteger cqAnalyticsSaintExporterPagesize = null;
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("allowed.paths")
public ConfigNodePropertyArray getAllowedPaths() {
return allowedPaths;
}
public void setAllowedPaths(ConfigNodePropertyArray allowedPaths) {
this.allowedPaths = allowedPaths;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("cq.analytics.saint.exporter.pagesize")
public ConfigNodePropertyInteger getCqAnalyticsSaintExporterPagesize() {
return cqAnalyticsSaintExporterPagesize;
}
public void setCqAnalyticsSaintExporterPagesize(ConfigNodePropertyInteger cqAnalyticsSaintExporterPagesize) {
this.cqAnalyticsSaintExporterPagesize = cqAnalyticsSaintExporterPagesize;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties comDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties = (ComDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties) o;
return Objects.equals(allowedPaths, comDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties.allowedPaths) &&
Objects.equals(cqAnalyticsSaintExporterPagesize, comDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties.cqAnalyticsSaintExporterPagesize);
}
@Override
public int hashCode() {
return Objects.hash(allowedPaths, cqAnalyticsSaintExporterPagesize);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComDayCqAnalyticsSitecatalystImplExporterClassificationsExporteProperties {\n");
sb.append(" allowedPaths: ").append(toIndentedString(allowedPaths)).append("\n");
sb.append(" cqAnalyticsSaintExporterPagesize: ").append(toIndentedString(cqAnalyticsSaintExporterPagesize)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
e58e8a444c30c56feef9f81ef35be73c04729998
|
b1e260050369c55f844b3f1559f504d002612869
|
/src/main/java/com/dell/isg/smi/virtualidentity/model/VirtualIdentityResponse.java
|
86e896a056df20152b21ecb9703228b829e758ef
|
[
"Apache-2.0"
] |
permissive
|
RackHD/smi-lib-virtualidentity
|
ed26cf7a1c8f83ec9260c2c26fc2c7b4b7060000
|
5f96bc1fa6b8c27a0032ef53577e78b0e503397b
|
refs/heads/master
| 2021-01-20T10:06:20.015894
| 2018-07-16T07:41:30
| 2018-07-16T07:41:30
| 90,324,413
| 1
| 5
| null | 2018-07-16T07:37:49
| 2017-05-05T01:24:56
|
Java
|
WINDOWS-1252
|
Java
| false
| false
| 3,379
|
java
|
/**
* Copyright © 2017 DELL Inc. or its subsidiaries. All Rights Reserved.
*/
package com.dell.isg.smi.virtualidentity.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
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;
/**
* The Class VirtualIdentityResponse.
*/
@ApiModel
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "id", "value", "state", "type", "usageId", "poolId" })
@XmlRootElement(name = "VirtualIdentityResponse")
public class VirtualIdentityResponse {
@ApiModelProperty(position = 1)
protected long id;
@ApiModelProperty(position = 2)
@XmlElement(required = true)
protected String value;
@ApiModelProperty(position = 3)
@XmlElement(required = true)
protected String state;
@ApiModelProperty(position = 4)
@XmlElement(required = true)
protected String type;
@ApiModelProperty(position = 5)
protected String usageId;
@ApiModelProperty(position = 6)
protected long poolId;
/**
* Gets the value of the id property.
*
* @return the id
*/
public long getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value the new id
*/
public void setId(long value) {
this.id = value;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value allowed object is {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the state property.
*
* @return possible object is {@link String }
*
*/
public String getState() {
return state;
}
/**
* Sets the value of the state property.
*
* @param value allowed object is {@link String }
*
*/
public void setState(String value) {
this.state = value;
}
/**
* Gets the value of the type property.
*
* @return possible object is {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value allowed object is {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* Gets the value of the usageId property.
*
* @return the usage id
*/
public String getUsageId() {
return usageId;
}
/**
* Sets the value of the usageId property.
*
* @param value the new usage id
*/
public void setUsageId(String value) {
this.usageId = value;
}
/**
* Gets the value of the poolId property.
*
* @return the pool id
*/
public long getPoolId() {
return poolId;
}
/**
* Sets the value of the poolId property.
*
* @param value the new pool id
*/
public void setPoolId(long value) {
this.poolId = value;
}
}
|
[
"Michael_Hepfer@dell.com"
] |
Michael_Hepfer@dell.com
|
2d67e58f50c3597572431428aada425b5dcc4902
|
2bb6379e9b363861618d562ceb5a277d56197514
|
/jbpm/quickstarts/src/main/java/org/jbpm/quickstarts/looping/LoopingStart.java
|
6691d3e16efa4220128e03a05e01f6134177e9e4
|
[] |
no_license
|
talipkorkmaz/drools-examples
|
79e4a50f002b193a4925b874e443cd9fecb861d3
|
8a04f7d671f4d9765159dc996dc00d03b1bb59ca
|
refs/heads/master
| 2020-04-13T06:25:56.224454
| 2018-12-24T09:17:19
| 2018-12-24T09:17:19
| 163,020,438
| 1
| 0
| null | 2018-12-24T20:03:06
| 2018-12-24T20:03:06
| null |
UTF-8
|
Java
| false
| false
| 438
|
java
|
package org.jbpm.quickstarts.looping;
import org.drools.runtime.StatefulKnowledgeSession;
import org.jbpm.quickstarts.QuickStartBase;
public class LoopingStart extends QuickStartBase{
public void test() {
StatefulKnowledgeSession ksession = createKnowledgeSession("quickstarts/looping.bpmn");
ksession.startProcess("org.jbpm.quickstarts.looping");
}
public static void main(String[] args) {
new LoopingStart().test();
}
}
|
[
"songzhiqi_1214@yahoo.com.cn"
] |
songzhiqi_1214@yahoo.com.cn
|
9fd9f6e518c991d703d99a61b4f5c9d3e863e51d
|
671daf60cdb46250214da19132bb7f21dbc29612
|
/android/src/org/jetbrains/android/dom/converters/NonExpansibleResourceReferenceConverter.java
|
4e363b31d0f3a88691c0ac43799488dbe8e84002
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/android
|
3732f6fe3ae742182c2684a13ea8a1e6a996c9a1
|
9aa80ad909cf4b993389510e2c1efb09b8cdb5a0
|
refs/heads/master
| 2023-09-01T14:11:56.555718
| 2023-08-31T16:50:03
| 2023-08-31T16:53:27
| 60,701,247
| 947
| 255
|
Apache-2.0
| 2023-09-05T12:44:24
| 2016-06-08T13:46:48
|
Kotlin
|
UTF-8
|
Java
| false
| false
| 432
|
java
|
package org.jetbrains.android.dom.converters;
/**
* Useful in cases which the expanded completion suggestion list would be too long.
* In those cases, don't list all the possible resource values, but the types of resources instead.
*/
public class NonExpansibleResourceReferenceConverter extends ResourceReferenceConverter {
public NonExpansibleResourceReferenceConverter() {
setExpandedCompletionSuggestion(false);
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
eb30e6df957b8429efd764c75a328149b4d4a9ad
|
c5765db45df294be9791e2fbcca65ffe2844bf22
|
/src/main/java/com/qd/modules/ws/utils/SmsBaseUtils.java
|
0bf46faf77d8d4451faebfd82ef7ae107bf2871f
|
[
"Apache-2.0"
] |
permissive
|
guohaolei/harry
|
f7993f09a4c65982e69125769e46a85bc7473f45
|
54fca65e0c500d7705bcffcbb21f5830b9d23eda
|
refs/heads/master
| 2020-12-02T19:44:01.861952
| 2017-06-15T09:41:06
| 2017-06-15T09:41:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,737
|
java
|
package com.qd.modules.ws.utils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
public class SmsBaseUtils {
public static String post(String path, String params) throws Exception {
HttpURLConnection httpConn = null;
BufferedReader in = null;
PrintWriter out = null;
try {
URL url = new URL(path);
httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("POST");
httpConn.setDoInput(true);
httpConn.setDoOutput(true);
// 发送post请求参数
out = new PrintWriter(httpConn.getOutputStream());
out.println(params);
out.flush();
// 读取响应
if (httpConn.getResponseCode() == HttpURLConnection.HTTP_OK) {
StringBuffer content = new StringBuffer();
String tempStr = "";
in = new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
while ((tempStr = in.readLine()) != null) {
content.append(tempStr);
}
return content.toString();
} else {
throw new Exception("请求出现了问题!");
}
} catch (IOException e) {
e.printStackTrace();
} finally {
in.close();
out.close();
httpConn.disconnect();
}
return null;
}
public static String sendSMS(String id,String pwd,String to,String content,String url){
try {
String param="id="+id+"&pwd="+pwd+"&to="+to+"&content="+URLEncoder.encode(content, "gb2312")+ "&time=";
String resMessage = SmsBaseUtils.post(url,param);
return resMessage;
} catch (Exception e) {
return e.getMessage().substring(0,500);
}
}
}
|
[
"183865800@qq.com"
] |
183865800@qq.com
|
e7f366f7ba72c274b9826e1a379356f2590cd3d6
|
7c83b3cf100af54fc1aa9b82b9367f9a58696372
|
/src/main/java/org/lanternpowered/server/data/io/UserIO.java
|
506013453f7291f66ba48be39d82102ee24f3e2f
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
GustaveHooghmoed/LanternServer
|
c971eb284fdc18554f4aceefef47f40f116e4f14
|
61b3d181e87d571bcea01fbab8093a0a718578f8
|
refs/heads/master
| 2021-05-14T14:29:46.643758
| 2017-09-21T13:15:46
| 2017-12-30T14:10:59
| 115,972,253
| 1
| 0
| null | 2018-01-02T03:48:32
| 2018-01-02T03:48:32
| null |
UTF-8
|
Java
| false
| false
| 5,911
|
java
|
/*
* This file is part of LanternServer, licensed under the MIT License (MIT).
*
* Copyright (c) LanternPowered <https://www.lanternpowered.org>
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.lanternpowered.server.data.io;
import org.lanternpowered.server.data.DataQueries;
import org.lanternpowered.server.data.io.store.ObjectStore;
import org.lanternpowered.server.data.io.store.ObjectStoreRegistry;
import org.lanternpowered.server.data.persistence.nbt.NbtStreamUtils;
import org.lanternpowered.server.entity.living.player.AbstractUser;
import org.spongepowered.api.data.DataContainer;
import org.spongepowered.api.data.DataQuery;
import org.spongepowered.api.data.DataView;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Optional;
import java.util.UUID;
public final class UserIO {
private final static Path SPONGE_PLAYER_DATA_FOLDER = Paths.get("data", "sponge");
private final static Path PLAYER_DATA_FOLDER = Paths.get("playerdata");
private final static Path STATISTICS_FOLDER = Paths.get("stats");
private final static DataQuery NAME = DataQuery.of("Name");
public static boolean exists(Path dataFolder, UUID uniqueId) {
final String fileName = uniqueId.toString() + ".dat";
final Path dataFile = dataFolder.resolve(PLAYER_DATA_FOLDER).resolve(fileName);
return Files.exists(dataFile);
}
public static Optional<String> loadName(Path dataFolder, UUID uniqueId) throws IOException {
final Path path = dataFolder.resolve(SPONGE_PLAYER_DATA_FOLDER).resolve(uniqueId.toString() + ".dat");
if (Files.exists(path)) {
return NbtStreamUtils.read(Files.newInputStream(path), true).getString(NAME);
}
return Optional.empty();
}
public static void load(Path dataFolder, AbstractUser player) throws IOException {
final String fileName = player.getUniqueId().toString() + ".dat";
// Search for the player data and load it
Path dataFile = dataFolder.resolve(PLAYER_DATA_FOLDER).resolve(fileName);
if (Files.exists(dataFile)) {
final DataContainer dataContainer = NbtStreamUtils.read(Files.newInputStream(dataFile), true);
// Load sponge data if present and attach it to the main data
dataFile = dataFolder.resolve(SPONGE_PLAYER_DATA_FOLDER).resolve(fileName);
if (Files.exists(dataFile)) {
final DataContainer spongeDataContainer = NbtStreamUtils.read(Files.newInputStream(dataFile), true);
dataContainer.set(DataQueries.EXTENDED_SPONGE_DATA, spongeDataContainer);
}
final ObjectStore<AbstractUser> objectStore = ObjectStoreRegistry.get().get(AbstractUser.class).get();
objectStore.deserialize(player, dataContainer);
}
final Path statisticsFile = dataFolder.resolve(STATISTICS_FOLDER).resolve(player.getUniqueId().toString() + ".json");
if (Files.exists(statisticsFile)) {
player.getStatisticMap().load(statisticsFile);
}
}
public static void save(Path dataFolder, AbstractUser player) throws IOException {
final String fileName = player.getUniqueId().toString() + ".dat";
final DataContainer dataContainer = DataContainer.createNew(DataView.SafetyMode.NO_DATA_CLONED);
final ObjectStore<AbstractUser> objectStore = ObjectStoreRegistry.get().get(AbstractUser.class).get();
objectStore.serialize(player, dataContainer);
final Optional<DataView> optSpongeData = dataContainer.getView(DataQueries.EXTENDED_SPONGE_DATA);
dataContainer.remove(DataQueries.EXTENDED_SPONGE_DATA);
Path dataFolder0 = dataFolder.resolve(PLAYER_DATA_FOLDER);
if (!Files.exists(dataFolder0)) {
Files.createDirectories(dataFolder0);
}
Path dataFile = dataFolder0.resolve(fileName);
NbtStreamUtils.write(dataContainer, Files.newOutputStream(dataFile), true);
dataFolder0 = dataFolder.resolve(SPONGE_PLAYER_DATA_FOLDER);
if (!Files.exists(dataFolder0)) {
Files.createDirectories(dataFolder0);
}
dataFile = dataFolder0.resolve(fileName);
if (optSpongeData.isPresent()) {
final DataView spongeData = optSpongeData.get();
spongeData.set(NAME, player.getName());
NbtStreamUtils.write(spongeData, Files.newOutputStream(dataFile), true);
} else {
Files.deleteIfExists(dataFile);
}
final Path statisticsFile = dataFolder.resolve(STATISTICS_FOLDER).resolve(player.getUniqueId().toString() + ".json");
player.getStatisticMap().save(statisticsFile);
}
private UserIO() {
}
}
|
[
"seppevolkaerts@hotmail.com"
] |
seppevolkaerts@hotmail.com
|
1a4dea3b0da0269e46c465dcbf329055b3ff9a5d
|
502dcdd6b5ac9c4c8318db4e522ba9440cc914dc
|
/src/com/tlys/dic/model/DicSinodepartment.java
|
27abe73b7372acc34ea8910d2057fad9dea4458a
|
[
"Apache-2.0"
] |
permissive
|
icedreamer/test
|
f3948a2274ea01a86b3e1317f16187b5221f2188
|
e492b219fc7cff27c6ce631d07619f1ac3637e87
|
refs/heads/master
| 2021-01-10T10:18:33.574898
| 2019-08-16T09:26:14
| 2019-08-16T09:26:14
| 51,994,723
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,309
|
java
|
package com.tlys.dic.model;
// default package
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
/**
* DicSinodepartment entity.
*
* @author MyEclipse Persistence Tools
*/
@Entity
@Table(name = "TB_ZBC_DIC_SINODEPARTMENT" )
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
public class DicSinodepartment implements java.io.Serializable {
// Fields
private String sinodepaid;
private String fullname;
private String shortname;
private String address;
private String dutyperson;
private String telephones;
private String fax;
private String contactperson;
private String issalecorp;
private String isreceiver;
private String issender;
private String parentid;
private String isactive;
private String description;
private Date createdtime;
private String issalecorpDIC;
private String isreceiverDIC;
private String issenderDIC;
private String parentidDIC;
private String isactiveDIC;
/** default constructor */
public DicSinodepartment() {
}
/** minimal constructor */
public DicSinodepartment(String sinodepaid, String fullname,
String shortname, String issalecorp, String isreceiver,
String issender, String parentid, String isactive) {
this.sinodepaid = sinodepaid;
this.fullname = fullname;
this.shortname = shortname;
this.issalecorp = issalecorp;
this.isreceiver = isreceiver;
this.issender = issender;
this.parentid = parentid;
this.isactive = isactive;
}
/** full constructor */
public DicSinodepartment(String sinodepaid, String fullname,
String shortname, String address, String dutyperson,
String telephones, String fax, String contactperson,
String issalecorp, String isreceiver, String issender,
String parentid, String isactive, String description,
Date createdtime) {
this.sinodepaid = sinodepaid;
this.fullname = fullname;
this.shortname = shortname;
this.address = address;
this.dutyperson = dutyperson;
this.telephones = telephones;
this.fax = fax;
this.contactperson = contactperson;
this.issalecorp = issalecorp;
this.isreceiver = isreceiver;
this.issender = issender;
this.parentid = parentid;
this.isactive = isactive;
this.description = description;
this.createdtime = createdtime;
}
// Property accessors
@Id
@Column(name = "SINODEPAID", unique = true, nullable = false, length = 6)
public String getSinodepaid() {
return this.sinodepaid;
}
public void setSinodepaid(String sinodepaid) {
this.sinodepaid = sinodepaid;
}
@Column(name = "FULLNAME", nullable = false, length = 100)
public String getFullname() {
return this.fullname;
}
public void setFullname(String fullname) {
this.fullname = fullname;
}
@Column(name = "SHORTNAME", nullable = false, length = 30)
public String getShortname() {
return this.shortname;
}
public void setShortname(String shortname) {
this.shortname = shortname;
}
@Column(name = "ADDRESS", length = 200)
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
@Column(name = "DUTYPERSON", length = 40)
public String getDutyperson() {
return this.dutyperson;
}
public void setDutyperson(String dutyperson) {
this.dutyperson = dutyperson;
}
@Column(name = "TELEPHONES", length = 60)
public String getTelephones() {
return this.telephones;
}
public void setTelephones(String telephones) {
this.telephones = telephones;
}
@Column(name = "FAX", length = 60)
public String getFax() {
return this.fax;
}
public void setFax(String fax) {
this.fax = fax;
}
@Column(name = "CONTACTPERSON", length = 40)
public String getContactperson() {
return this.contactperson;
}
public void setContactperson(String contactperson) {
this.contactperson = contactperson;
}
@Column(name = "ISSALECORP", nullable = false, length = 1)
public String getIssalecorp() {
return this.issalecorp;
}
public void setIssalecorp(String issalecorp) {
this.issalecorp = issalecorp;
}
@Column(name = "ISRECEIVER", nullable = false, length = 1)
public String getIsreceiver() {
return this.isreceiver;
}
public void setIsreceiver(String isreceiver) {
this.isreceiver = isreceiver;
}
@Column(name = "ISSENDER", nullable = false, length = 1)
public String getIssender() {
return this.issender;
}
public void setIssender(String issender) {
this.issender = issender;
}
@Column(name = "PARENTID", nullable = false, length = 8)
public String getParentid() {
return this.parentid;
}
public void setParentid(String parentid) {
this.parentid = parentid;
}
@Column(name = "ISACTIVE", nullable = false, length = 1)
public String getIsactive() {
return this.isactive;
}
public void setIsactive(String isactive) {
this.isactive = isactive;
}
@Column(name = "DESCRIPTION", length = 120)
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
@Temporal(TemporalType.DATE)
@Column(name = "CREATEDTIME", length = 7)
public Date getCreatedtime() {
return this.createdtime;
}
public void setCreatedtime(Date createdtime) {
this.createdtime = createdtime;
}
@Transient
public String getIssalecorpDIC() {
return issalecorpDIC;
}
public void setIssalecorpDIC(String issalecorpDIC) {
this.issalecorpDIC = issalecorpDIC;
}
@Transient
public String getIsreceiverDIC() {
return isreceiverDIC;
}
public void setIsreceiverDIC(String isreceiverDIC) {
this.isreceiverDIC = isreceiverDIC;
}
@Transient
public String getIssenderDIC() {
return issenderDIC;
}
public void setIssenderDIC(String issenderDIC) {
this.issenderDIC = issenderDIC;
}
@Transient
public String getParentidDIC() {
return parentidDIC;
}
public void setParentidDIC(String parentidDIC) {
this.parentidDIC = parentidDIC;
}
@Transient
public String getIsactiveDIC() {
return isactiveDIC;
}
public void setIsactiveDIC(String isactiveDIC) {
this.isactiveDIC = isactiveDIC;
}
@Override
public String toString() {
return shortname;
}
}
|
[
"liang.zhang@pcitc.com"
] |
liang.zhang@pcitc.com
|
e42d0a7cb7fb520cb6bdc32c46574f48184e5268
|
08f4c7ff8222b06b99c660aa8b090c842da8ecc7
|
/src/test/java/com/perunlabs/jsolid/ConvexPolygonApiTest.java
|
02b1437529e19ebe5fa0716c11be652f5ce62e13
|
[
"Apache-2.0"
] |
permissive
|
philipparndt/jsolid
|
2ddbf09785afb973be44637890e54444f055c3e0
|
8a36643d489c693c0f7033d3b331ec1988b3893c
|
refs/heads/master
| 2023-04-09T21:21:00.120328
| 2020-07-11T09:26:00
| 2020-07-11T09:26:08
| 278,824,317
| 0
| 0
|
Apache-2.0
| 2023-04-04T00:27:20
| 2020-07-11T08:52:53
|
Java
|
UTF-8
|
Java
| false
| false
| 958
|
java
|
package com.perunlabs.jsolid;
import static com.perunlabs.jsolid.JSolid.convexPolygon;
import static com.perunlabs.jsolid.JSolid.v;
import static org.testory.Testory.thenThrown;
import static org.testory.Testory.when;
import org.junit.Test;
public class ConvexPolygonApiTest {
@Test
public void zero_vertexes_throws_exception() throws Exception {
when(() -> convexPolygon());
thenThrown(IllegalArgumentException.class);
}
@Test
public void one_vertex_throws_exception() throws Exception {
when(() -> convexPolygon(v(1, 1)));
thenThrown(IllegalArgumentException.class);
}
@Test
public void two_vertexes_throws_exception() throws Exception {
when(() -> convexPolygon(v(1, 1), v(2, 2)));
thenThrown(IllegalArgumentException.class);
}
@Test
public void null_argument_causes_exception() throws Exception {
when(() -> convexPolygon(v(1, 1), v(2, 2), null));
thenThrown(NullPointerException.class);
}
}
|
[
"marcin.mikosik@gmail.com"
] |
marcin.mikosik@gmail.com
|
5dd36a2d549e8469673ae5197e72f809709204ee
|
0f4ac67c5e008e01f2ad5f2f60db8f47f0e79d85
|
/src/main/java/net/rehttp/tk/TkStatus.java
|
8953f1454e954b60fcf68e92a9a53009416156e3
|
[
"MIT"
] |
permissive
|
niqmk/rehttp
|
cb4aba786bf9f74e9cc221a10766258e0e91e30c
|
707b9c22f1d2f979c7fa9abdfa8012e69eedce25
|
refs/heads/master
| 2021-06-22T20:35:06.230293
| 2017-09-05T20:31:08
| 2017-09-05T21:08:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,487
|
java
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2017 Yegor Bugayenko
*
* 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 non-infringement. In no event shall the authors or copyright
* holders be liable for any claim, damages or other liability, whether
* in an action of contract, tort or otherwise, arising from, out of or
* in connection with the software or the use or other dealings in the
* software.
*/
package net.rehttp.tk;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import net.rehttp.base.Base;
import org.takes.Request;
import org.takes.Response;
import org.takes.Take;
import org.takes.rq.RqHref;
import org.takes.rs.RsText;
import org.takes.rs.RsWithStatus;
/**
* Status for the URL.
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 1.0
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
final class TkStatus implements Take {
/**
* Base.
*/
private final Base base;
/**
* Ctor.
* @param bse Base
*/
TkStatus(final Base bse) {
this.base = bse;
}
@Override
public Response act(final Request req) throws IOException {
final URL url = new URL(new RqHref.Smart(req).single("u"));
final int errors = this.base.status(url).failures(
Long.MAX_VALUE
).size();
final Response response;
if (errors == 0) {
response = new RsText("No errors.");
} else {
response = new RsWithStatus(
new RsText(String.format("%d errors.", errors)),
HttpURLConnection.HTTP_INTERNAL_ERROR
);
}
return response;
}
}
|
[
"yegor256@gmail.com"
] |
yegor256@gmail.com
|
63ef91857043c89f298d15cc6742da59cd97e237
|
7016cec54fb7140fd93ed805514b74201f721ccd
|
/src/java/com/echothree/control/user/invoice/common/form/CreateInvoiceLineUseTypeDescriptionForm.java
|
a5c21fec716a6060c89dd9e2e28321e86a16fe71
|
[
"MIT",
"Apache-1.1",
"Apache-2.0"
] |
permissive
|
echothreellc/echothree
|
62fa6e88ef6449406d3035de7642ed92ffb2831b
|
bfe6152b1a40075ec65af0880dda135350a50eaf
|
refs/heads/master
| 2023-09-01T08:58:01.429249
| 2023-08-21T11:44:08
| 2023-08-21T11:44:08
| 154,900,256
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,166
|
java
|
// --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// --------------------------------------------------------------------------------
package com.echothree.control.user.invoice.common.form;
import com.echothree.control.user.invoice.common.spec.InvoiceLineUseTypeSpec;
import com.echothree.control.user.party.common.spec.LanguageSpec;
public interface CreateInvoiceLineUseTypeDescriptionForm
extends InvoiceLineUseTypeSpec, LanguageSpec {
String getDescription();
void setDescription(String description);
}
|
[
"rich@echothree.com"
] |
rich@echothree.com
|
4524cfbb6f85633eebad46aeefb7fcb8aea98ebc
|
4a2ab13526ce9e4f774cdad20cab21b10e190f16
|
/app/src/main/java/com/warmtel/music/lyric/LyricView.java
|
63244c579a257b302039c992b8d104b74257ecb9
|
[] |
no_license
|
woaihzq306/Android-Music-warmtel
|
5020ce85e1291bd8be2ec8bfb8372f4862382728
|
683be0a170e5fbdfb5896c8a7514ddb40e0896cd
|
refs/heads/master
| 2020-08-31T10:06:46.718317
| 2016-02-18T07:29:50
| 2016-02-18T07:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,245
|
java
|
package com.warmtel.music.lyric;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;
import java.io.File;
import java.util.List;
public class LyricView extends TextView {
private Paint mPaint;
private float mX;
private static Lyric mLyric;
private Paint mPathPaint;
public String test = "test";
public int index = 0;
private List<Sentence> list;
public float mTouchHistoryY;
private int mY;
private long currentDunringTime; // 当前行歌词持续的时间,用该时间来sleep
private float middleY;// y轴中间
private static final int DY = 50; // 每一行的间隔
public LyricView(Context context) {
super(context);
init();
}
public LyricView(Context context, AttributeSet attr) {
super(context, attr);
init();
}
public LyricView(Context context, AttributeSet attr, int i) {
super(context, attr, i);
init();
}
private void init() {
setFocusable(true);
PlayListItem pli = new PlayListItem("星月神话","/mnt/sdcard/Music/jinsha.mp3", 0L, true);
mLyric = new Lyric(new File("/mnt/sdcard/Music/jinsha.lrc"), pli);
list = mLyric.list;
// 非高亮部分
mPaint = new Paint();
mPaint.setAntiAlias(true);
mPaint.setTextSize(22);
mPaint.setColor(Color.WHITE);
mPaint.setTypeface(Typeface.SERIF);
// 高亮部分 当前歌词
mPathPaint = new Paint();
mPathPaint.setAntiAlias(true);
mPathPaint.setColor(Color.RED);
mPathPaint.setTextSize(22);
mPathPaint.setTypeface(Typeface.SANS_SERIF);
}
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawColor(0xEFeffff);
Paint p = mPaint;
Paint p2 = mPathPaint;
p.setTextAlign(Paint.Align.CENTER);
if (index == -1)
return;
p2.setTextAlign(Paint.Align.CENTER);
// 先画当前行,之后再画他的前面和后面,这样就保持当前行在中间的位置
canvas.drawText(list.get(index).getContent(), mX, middleY, p2);
float tempY = middleY;
// 画出本句之前的句子
for (int i = index - 1; i >= 0; i--) {
// Sentence sen = list.get(i);
// 向上推移
tempY = tempY - DY;
if (tempY < 0) {
break;
}
canvas.drawText(list.get(i).getContent(), mX, tempY, p);
// canvas.translate(0, DY);
}
tempY = middleY;
// 画出本句之后的句子
for (int i = index + 1; i < list.size(); i++) {
// 往下推移
tempY = tempY + DY;
if (tempY > mY) {
break;
}
canvas.drawText(list.get(i).getContent(), mX, tempY, p);
// canvas.translate(0, DY);
}
}
protected void onSizeChanged(int w, int h, int ow, int oh) {
super.onSizeChanged(w, h, ow, oh);
mX = w * 0.5f; // remember the center of the screen
mY = h;
middleY = h * 0.5f;
}
//
/**
* @param time
* 当前歌词的时间轴
*
* @return currentDunringTime 歌词只需的时间
*/
public long updateIndex(long time) {
// 歌词序号
index = mLyric.getNowSentenceIndex(time);
if (index == -1)
return -1;
Sentence sen = list.get(index);
// 返回歌词持续的时间,在这段时间内sleep
return currentDunringTime = sen.getDuring();
}
}
|
[
"2915858910@qq.com"
] |
2915858910@qq.com
|
88337f56783a61ec95da516fd215c02d2a3a22f9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_3fdf5148b8b9da3189efe58141d13169b4c60c34/ChatService/22_3fdf5148b8b9da3189efe58141d13169b4c60c34_ChatService_s.java
|
6a02167ddb764f94986da76b407cf96f5723dcb6
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,314
|
java
|
/*
* Copyright (c) 2012. Ansvia Inc.
* Author: Robin Syihab.
*/
package com.ansvia.mindchat;
import android.app.IntentService;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;
/**
* Main chat service.
*/
public class ChatService extends IntentService {
private static final String TAG = "ChatService";
//private static final String GETHUB_HOST = "www.gethub.us";
//private static final int GETHUB_PORT = 6060;
private static final String GETHUB_HOST = "10.0.2.2";
private static final int GETHUB_PORT = 6060;
// @TODO(*): jangan di hard-coded.
private static final String CHANNEL = "www.gethub.us";
private LogoutEventReceiver logoutEventReceiver;
public ChatService(String name) {
super(name);
}
public ChatService(){
super(TAG);
}
private class LogoutEventReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
GethubClient gethub = GethubClient.getInstance();
gethub.logout();
}
}
@Override
protected void onHandleIntent(Intent intent) {
Log.d(TAG, "in onHandleIntent()");
this.logoutEventReceiver = new LogoutEventReceiver();
registerReceiver(this.logoutEventReceiver, new IntentFilter("logout"));
GethubClient gethub = GethubClient.getInstance();
// set your gethub server address here.
gethub.connect(GETHUB_HOST, GETHUB_PORT);
try {
String sessid = gethub.authorize(intent.getStringExtra("userName"), intent.getStringExtra("password"));
if(sessid == null){
Log.i(TAG, "Cannot authorize user");
showError("Cannot authorize user, check your connection.");
return;
}
if(!gethub.join(CHANNEL, sessid)){
Log.i(TAG, "Cannot join to channel");
showError("Cannot join to channel " + CHANNEL);
return;
}
Intent chatRoomInitial = new Intent("chatroom.init");
chatRoomInitial.putExtra("sessid", sessid);
chatRoomInitial.putExtra("userName", intent.getStringExtra("userName"));
chatRoomInitial.putExtra("channel", CHANNEL);
sendBroadcast(chatRoomInitial);
//DataReceiver dataRec = new DataReceiver(gethub, sessid, intent.getStringExtra("userName"));
PacketHandler handler = new PacketHandler(this, gethub, sessid, intent.getStringExtra("userName"));
gethub.bind(CHANNEL, sessid, handler);
}catch (Exception e){
showError(e.getMessage());
}
}
private void showError(String msg){
Intent errorIntent = new Intent("error");
errorIntent.putExtra("data", msg);
sendBroadcast(errorIntent);
}
@Override
public void onDestroy() {
super.onDestroy();
unregisterReceiver(logoutEventReceiver);
GethubClient gethub = GethubClient.getInstance();
gethub.close();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
20eab92b84bd4ef87ac0802782ba2405ab55aab0
|
4e314148918577a0daa3be856bb66ce168351383
|
/trainticket-model/src/main/java/com/mangocity/vo/OrderBasisVo.java
|
b483e73d34f280d8748f290455b4f5a2cb3436d4
|
[] |
no_license
|
jerrik123/hcp01
|
c3ee50b401d0815433eb9187c16ed866127c5754
|
c59fa76350061449c45fa89860eafe24a071a987
|
refs/heads/master
| 2021-06-06T16:49:28.180827
| 2016-07-21T00:52:55
| 2016-07-21T00:52:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,831
|
java
|
package com.mangocity.vo;
import java.io.Serializable;
import com.mangocity.model.Order;
/**
* 订单基本信息
*
* @author hongxiaodong
*
*/
public class OrderBasisVo extends Order implements Serializable {
/**
*
*/
private static final long serialVersionUID = 2997676210540094235L;
private String payModel;// 支付方式
private String paymetStatus;// 支付状态
private String ccrq;// 乘车日期
private String ccsj;//
private String origStationName;
private String destStationName;
private Long orderItemId;
public OrderBasisVo() {
super();
}
public String getPayModel() {
return payModel;
}
public void setPayModel(String payModel) {
this.payModel = payModel;
}
public String getPaymetStatus() {
return paymetStatus;
}
public void setPaymetStatus(String paymetStatus) {
this.paymetStatus = paymetStatus;
}
public String getCcrq() {
return ccrq;
}
public void setCcrq(String ccrq) {
this.ccrq = ccrq;
}
public String getCcsj() {
return ccsj;
}
public void setCcsj(String ccsj) {
this.ccsj = ccsj;
}
public String getOrigStationName() {
return origStationName;
}
public void setOrigStationName(String origStationName) {
this.origStationName = origStationName;
}
public String getDestStationName() {
return destStationName;
}
public void setDestStationName(String destStationName) {
this.destStationName = destStationName;
}
public Long getOrderItemId() {
return orderItemId;
}
public void setOrderItemId(Long orderItemId) {
this.orderItemId = orderItemId;
}
@Override
public String toString() {
return "OrderBasisVo [payModel=" + payModel + ", paymetStatus=" + paymetStatus + ", ccrq=" + ccrq + ", ccsj="
+ ccsj + ", origStationName=" + origStationName + ", destStationName=" + destStationName + "]";
}
}
|
[
"yangjie_software@163.com"
] |
yangjie_software@163.com
|
e89ab454105912ba28f3323670ba5f69a5ffbfb7
|
9687d6e6fc7a1a59f5a769d0bf1696484d5cd879
|
/car-service-api/order/order-web/src/main/java/com/car/order/web/model/instance/OrderCaseDetail.java
|
0c3b4219541814a92361e7cd5b2550de2540d2e2
|
[] |
no_license
|
willpyshan13/CarStore2.0
|
15fa662d5a8ca4a76c9e9d205dd1640d42e30e53
|
e8b85b7b3145bcc10cdccdf4779300846bce6026
|
refs/heads/main
| 2023-08-14T14:03:35.196407
| 2021-09-14T06:08:56
| 2021-09-14T06:08:56
| 385,832,432
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 972
|
java
|
package com.car.order.web.model.instance;
import com.car.common.datasource.model.BaseModelInfo;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* @author zhouz
* @date 2020/12/31
*/
@Data
@Table(name = "order_case_detail")
public class OrderCaseDetail extends BaseModelInfo {
/**
* 订单uuid
*/
@Column(name = "order_uuid")
private String orderUuid;
/**
* 案例uuid
*/
@Column(name = "case_uuid")
private String caseUuid;
/**
* 案例名称
*/
@Column(name = "case_name")
private String caseName;
/**
* 案例数量
*/
@Column(name = "case_num")
private Integer caseNum;
/**
* 案例资源地址
*/
@Column(name = "case_img_url")
private String caseImgUrl;
/**
* 案例价格
*/
@Column(name = "materials_expenses")
private BigDecimal materialsExpenses;
}
|
[
"545512533@qq.com"
] |
545512533@qq.com
|
88cfe051ae62d3107e69500feb1fe605d6d42207
|
beb5d09e8065bd2e127535baf75f3a60a68a95a0
|
/fish-game/src/main/java/com/toyo/fish/game/FishZoneApp.java
|
ee55e17321e5641d78aa02018bbca52f5f139d9e
|
[] |
no_license
|
autumnsparrow/fish-game
|
94c145cb3a98c61a8ed470d7e5026dfdae48e7f2
|
3178a63c455d39c51d35b33147f5b8071a94b0dd
|
refs/heads/master
| 2021-04-06T20:17:52.280900
| 2018-03-14T14:55:50
| 2018-03-14T14:55:50
| 125,228,209
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,221
|
java
|
package com.toyo.fish.game;
import com.sky.game.context.SpringContext;
import com.sky.game.context.service.ServerStarupService;
import com.sky.game.context.util.G;
import com.sky.game.context.util.GameUtil;
import com.toyo.fish.game.logic.handler.GlobalUserManager;
import com.toyo.remote.service.user.ILoginService;
/**
* Hello world!
*
*/
public class FishZoneApp
{
//
public static void main( String[] args )
{
//System.out.println( "Hello World!" );
GameUtil.initTokenSerail();
boolean flag=FishApp.DEBUG;
if(flag){
System.out.println("##########DEBUG MODE##############");
SpringContext.init(new String[]{
"classpath:/META-INF/spring/debug//applicationContext-fish-protocol-service-zone.xml",
"classpath:/META-INF/spring/debug/applicationContext-fish-zone.xml"
});
}else{
System.out.println("##########RELEASE MODE##############");
SpringContext.init(new String[]{
"classpath:/META-INF/spring/release/applicationContext-fish-protocol-service-zone.xml",
"classpath:/META-INF/spring/release/applicationContext-fish-zone.xml"
});
}
}
}
|
[
"ruiqiuzhang@gmail.com"
] |
ruiqiuzhang@gmail.com
|
3c6d5a1264a19540fca911390e17b185893b3cbd
|
edeb76ba44692dff2f180119703c239f4585d066
|
/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/layers/operations/XMLItem.java
|
9a43b8838082b4c65c70ce9d7fda4ac0887f5947
|
[] |
no_license
|
CafeGIS/gvSIG2_0
|
f3e52bdbb98090fd44549bd8d6c75b645d36f624
|
81376f304645d040ee34e98d57b4f745e0293d05
|
refs/heads/master
| 2020-04-04T19:33:47.082008
| 2012-09-13T03:55:33
| 2012-09-13T03:55:33
| 5,685,448
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 307
|
java
|
package org.gvsig.fmap.mapcontext.layers.operations;
import org.gvsig.fmap.mapcontext.layers.FLayer;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
public interface XMLItem {
public void parse(ContentHandler handler) throws SAXException;
public FLayer getLayer();
}
|
[
"tranquangtruonghinh@gmail.com"
] |
tranquangtruonghinh@gmail.com
|
3db3170edc4327e8ff7517e8dd42cfc51c2c2684
|
518eadde6db89bca44770cdb8f09fa56873220c2
|
/OOPAdvanced/Exercises/Reflection/src/pr02PrivateClassFiddling/com/BlackBoxInt.java
|
e93fc30e474d1184b6b2f047a6f07627e9e89655
|
[] |
no_license
|
vonrepiks/Java-Fundamentals-May-2018
|
7d000b709c0eaf03334cbc90f702b770b6e4c321
|
8beb9ac54aac5669841954b2240cee2bc27787a4
|
refs/heads/master
| 2020-03-17T10:17:35.674518
| 2018-08-08T07:07:11
| 2018-08-08T07:07:11
| 133,507,163
| 4
| 13
| null | 2018-11-02T19:44:59
| 2018-05-15T11:36:37
|
Java
|
UTF-8
|
Java
| false
| false
| 719
|
java
|
package pr02PrivateClassFiddling.com;
public class BlackBoxInt {
private static final int DEFAULT_VALUE = 0;
private int innerValue;
private BlackBoxInt(int innerValue) {
this.innerValue = innerValue;
}
private BlackBoxInt() {
this.innerValue = DEFAULT_VALUE;
}
private void add(int addend) {
this.innerValue += addend;
}
private void subtract(int subtrahend) {
this.innerValue -= subtrahend;
}
private void multiply(int multiplier) {
this.innerValue *= multiplier;
}
private void divide(int divider) {
this.innerValue /= divider;
}
private void leftShift(int shifter) {
this.innerValue <<= shifter;
}
private void rightShift(int shifter) {
this.innerValue >>= shifter;
}
}
|
[
"ico_skipernov@abv.bg"
] |
ico_skipernov@abv.bg
|
481cfc49e6952bd5850d447709094ed862f149d3
|
573a66e4f4753cc0f145de8d60340b4dd6206607
|
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/357876/2014.07.18/cgeo-market_20140718/cgeo-market_20140718/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java
|
cc2de9f2c922a370ab5d62aeb218ba399a447817
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
mkaouer/Code-Smells-Detection-in-JavaScript
|
3919ec0d445637a7f7c5f570c724082d42248e1b
|
7130351703e19347884f95ce6d6ab1fb4f5cfbff
|
refs/heads/master
| 2023-03-09T18:04:26.971934
| 2022-03-23T22:04:28
| 2022-03-23T22:04:28
| 73,915,037
| 8
| 3
| null | 2023-02-28T23:00:07
| 2016-11-16T11:47:44
| null |
UTF-8
|
Java
| false
| false
| 4,125
|
java
|
package cgeo.geocaching.settings;
import cgeo.geocaching.R;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.ui.dialog.Dialogs;
import cgeo.geocaching.utils.Log;
import ch.boye.httpclientandroidlib.HttpResponse;
import org.apache.commons.lang3.StringUtils;
import rx.Observable;
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
import rx.functions.Func0;
import rx.schedulers.Schedulers;
import android.app.ProgressDialog;
import android.content.Context;
import android.preference.Preference;
import android.util.AttributeSet;
public class RegisterSend2CgeoPreference extends AbstractClickablePreference {
public RegisterSend2CgeoPreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
public RegisterSend2CgeoPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected OnPreferenceClickListener getOnPreferenceClickListener(final SettingsActivity activity) {
return new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
// satisfy static code analysis
if (activity == null) {
return true;
}
final String deviceName = Settings.getWebDeviceName();
final String deviceCode = Settings.getWebDeviceCode();
if (StringUtils.isBlank(deviceName)) {
ActivityMixin.showToast(activity, R.string.err_missing_device_name);
return false;
}
final ProgressDialog progressDialog = ProgressDialog.show(activity,
activity.getString(R.string.init_sendToCgeo),
activity.getString(R.string.init_sendToCgeo_registering), true);
progressDialog.setCancelable(false);
AndroidObservable.bindActivity(activity, Observable.defer(new Func0<Observable<Integer>>() {
@Override
public Observable<Integer> call() {
final String nam = StringUtils.defaultString(deviceName);
final String cod = StringUtils.defaultString(deviceCode);
final Parameters params = new Parameters("name", nam, "code", cod);
HttpResponse response = Network.getRequest("http://send2.cgeo.org/auth.html", params);
if (response != null && response.getStatusLine().getStatusCode() == 200) {
//response was OK
final String[] strings = StringUtils.split(Network.getResponseData(response), ',');
Settings.setWebNameCode(nam, strings[0]);
try {
return Observable.from(Integer.parseInt(strings[1].trim()));
} catch (final Exception e) {
Log.e("RegisterSend2CgeoPreference", e);
}
}
return Observable.empty();
}
}).firstOrDefault(0)).subscribe(new Action1<Integer>() {
@Override
public void call(final Integer pin) {
progressDialog.dismiss();
if (pin > 0) {
Dialogs.message(activity, R.string.init_sendToCgeo,
activity.getString(R.string.init_sendToCgeo_register_ok)
.replace("####", String.valueOf(pin)));
} else {
Dialogs.message(activity, R.string.init_sendToCgeo, R.string.init_sendToCgeo_register_fail);
}
}
}, Schedulers.io());
return true;
}
};
}
}
|
[
"mmkaouer@umich.edu"
] |
mmkaouer@umich.edu
|
c39dc1343c8774e404b3c1693a3e937742b137ce
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/soter/p663a/p1108f/C30958e.java
|
f6104b0caa0ba7088075b4dff5425dfca52a82a2
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 603
|
java
|
package com.tencent.soter.p663a.p1108f;
/* renamed from: com.tencent.soter.a.f.e */
public interface C30958e extends C44468a<C16168a, C30959b> {
/* renamed from: com.tencent.soter.a.f.e$a */
public static class C16168a {
public String AvZ;
public String Awa;
public C16168a(String str, String str2) {
this.Awa = str;
this.AvZ = str2;
}
}
/* renamed from: com.tencent.soter.a.f.e$b */
public static class C30959b {
public boolean Awb;
public C30959b(boolean z) {
this.Awb = z;
}
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
b00b6eae9dfa4aebaa92c64d36a7cbff83363b5c
|
3b9cf2936abe0bb4d5507853a79d98f2d91af870
|
/vividus/src/test/java/org/vividus/bdd/steps/FileStepsTests.java
|
8559a8477c6f2546b0bc8fb4d99dac43b0b50b6e
|
[
"Apache-2.0"
] |
permissive
|
ALegchilov/vividus
|
ef8a4906efb0c2ff68fd624fde4d2e6d743bae9b
|
55bce7d2a7bcf5c43f17d34eb2c190dd6142f552
|
refs/heads/master
| 2020-09-08T16:50:21.014816
| 2019-11-12T10:40:45
| 2019-11-15T10:10:52
| 221,188,634
| 0
| 0
|
Apache-2.0
| 2019-11-12T10:15:40
| 2019-11-12T10:15:39
| null |
UTF-8
|
Java
| false
| false
| 2,146
|
java
|
/*
* Copyright 2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.vividus.bdd.steps;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.util.Set;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.vividus.bdd.context.IBddVariableContext;
import org.vividus.bdd.variable.VariableScope;
@ExtendWith(MockitoExtension.class)
class FileStepsTests
{
@Mock
private IBddVariableContext bddVariableContext;
@InjectMocks
private FileSteps fileSteps;
@Test
void testSaveResponseBodyToFile() throws IOException
{
String content = "content";
String pathVariable = "path";
Set<VariableScope> scopes = Set.of(VariableScope.SCENARIO);
fileSteps.saveResponseBodyToFile("test.txt", content, scopes, pathVariable);
verify(bddVariableContext).putVariable(eq(scopes), eq(pathVariable), argThat(path ->
{
try
{
return FileUtils.readFileToString(new File((String) path), StandardCharsets.UTF_8).equals(content);
}
catch (IOException e)
{
throw new UncheckedIOException(e);
}
}));
}
}
|
[
"valfirst@yandex.ru"
] |
valfirst@yandex.ru
|
2421ec50da69ffe68beb1d553494005d9f8392f4
|
bc70a4652a047a7afd15333747fc2aebfc90d2c4
|
/platform/dolphin-platform-remoting-server/src/main/java/com/canoo/platform/remoting/server/RemotingContext.java
|
aeeb4f833d944dffc9d1c540fedcbe2d75c9efa4
|
[
"Apache-2.0"
] |
permissive
|
potapczuk/dolphin-platform
|
91bc4f564f5accf61ea7b462701473622f63db5f
|
95c13dbd72b8c9c54caf8e9dd06a4933baeba490
|
refs/heads/master
| 2021-07-18T07:16:08.341221
| 2017-10-23T12:26:31
| 2017-10-23T12:26:31
| 108,169,860
| 1
| 0
| null | 2017-10-24T18:53:03
| 2017-10-24T18:53:03
| null |
UTF-8
|
Java
| false
| false
| 2,123
|
java
|
/*
* Copyright 2015-2017 Canoo Engineering AG.
*
* 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.canoo.platform.remoting.server;
import com.canoo.platform.remoting.BeanManager;
import com.canoo.platform.remoting.server.binding.PropertyBinder;
import com.canoo.platform.server.client.ClientSession;
import com.canoo.platform.remoting.server.event.DolphinEventBus;
/**
* Facade to get access to all instances of a Dolphin Platform remoting context. Each {@link ClientSession} that uses the remoting layer of Dolphin Platform will contain exactly one remoting context.
*
* This is a util interface that normally is not needed for application developers since all needed parts of the context can be injected directly in Dolphin Platform controller classes or other managed beans.
*
* @author Hendrik Ebbers
*/
public interface RemotingContext {
/**
* Return the id of the context.
* @return the id
*/
String getId();
/**
* Return the executor for the context
* @return the executor
*/
ClientSessionExecutor createSessionExecutor();
/**
* Return the binder for the context
* @return the binder
*/
PropertyBinder getBinder();
/**
* Returns the bean manager for the context
* @return the bean manager
*/
BeanManager getBeanManager();
/**
* Returns the event bus for the context
* @return the event bus
*/
DolphinEventBus getEventBus();
/**
* Returns the client session for the context
* @return the client session
*/
ClientSession getClientSession();
}
|
[
"hendrik.ebbers@web.de"
] |
hendrik.ebbers@web.de
|
7fe5a7b604c5f7d5a01fb521215580002978a528
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project90/src/main/java/org/gradle/test/performance90_3/Production90_241.java
|
6cefadfb2b057a35432fc3c9dd02b5f5a4a5a6c5
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance90_3;
public class Production90_241 extends org.gradle.test.performance16_3.Production16_241 {
private final String property;
public Production90_241() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
13f6acba57ce434f03ce71198d785f55de4848c6
|
3cb1a86006f9201e1835cb6bab34e5567d4ae95d
|
/src/main/java/com/bsb/practice/security/jwt/JWTConfigurer.java
|
d3d2ab2899ad8d21307708d873e2815a9b34e194
|
[] |
no_license
|
zliang3110/jhipsterApp
|
3943e1c67bb88d0c2afad9a4e64cce3b033ab252
|
4f0e74d4d0d54e4b1e0c31c1f2c65c10b9dd84df
|
refs/heads/master
| 2021-05-15T19:28:40.814817
| 2017-10-20T16:41:21
| 2017-10-20T16:41:21
| 107,702,511
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 928
|
java
|
package com.bsb.practice.security.jwt;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.DefaultSecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
public class JWTConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> {
public static final String AUTHORIZATION_HEADER = "Authorization";
private TokenProvider tokenProvider;
public JWTConfigurer(TokenProvider tokenProvider) {
this.tokenProvider = tokenProvider;
}
@Override
public void configure(HttpSecurity http) throws Exception {
JWTFilter customFilter = new JWTFilter(tokenProvider);
http.addFilterBefore(customFilter, UsernamePasswordAuthenticationFilter.class);
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
0373d3bae244452a13b4b70bdf7964e0bc087d42
|
958b13739d7da564749737cb848200da5bd476eb
|
/src/main/java/com/alipay/api/response/AlipayMarketingCampaignDrawcampCreateResponse.java
|
0dc4a76e9451ebca03c61df75ceb022f0707a158
|
[
"Apache-2.0"
] |
permissive
|
anywhere/alipay-sdk-java-all
|
0a181c934ca84654d6d2f25f199bf4215c167bd2
|
649e6ff0633ebfca93a071ff575bacad4311cdd4
|
refs/heads/master
| 2023-02-13T02:09:28.859092
| 2021-01-14T03:17:27
| 2021-01-14T03:17:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 646
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.marketing.campaign.drawcamp.create response.
*
* @author auto create
* @since 1.0, 2020-08-20 13:50:25
*/
public class AlipayMarketingCampaignDrawcampCreateResponse extends AlipayResponse {
private static final long serialVersionUID = 6397734399916467353L;
/**
* 抽奖活动id
*/
@ApiField("camp_id")
private String campId;
public void setCampId(String campId) {
this.campId = campId;
}
public String getCampId( ) {
return this.campId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d0be31fb3d3b1b0bbc12d5f2fc2e9462a8a7ff1d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_91200d06234179467d4cbc0bee9c7210be70a112/Task/5_91200d06234179467d4cbc0bee9c7210be70a112_Task_s.java
|
d0450ca4c64f5fc067d55d9b9300ab0a0c13994f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,249
|
java
|
package com.soofw.trk;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Task implements Comparable<Task> {
final static Pattern re_tag = Pattern.compile("(^|\\s)([\\@\\#\\+]([\\w\\/]+))");
final static Pattern re_at = Pattern.compile("(^|\\s)(\\@([\\w\\/]+))");
final static Pattern re_hash = Pattern.compile("(^|\\s)(\\#([\\w\\/]+))");
final static Pattern re_plus = Pattern.compile("(^|\\s)(\\+([\\w\\/]+))");
final static Pattern re_priority = Pattern.compile("(^|\\s)(\\!(\\d))");
final static Pattern re_date = Pattern.compile("((\\d{1,2})/(\\d{1,2})(/(\\d{2}))*([@ ](\\d{1,2})(:(\\d{1,2}))*(am|pm)*)*)");
String source = null;
String pretty = null;
String sortVal = null;
int priority = 0;
Calendar calendar = null;
ArrayList<String> tags = new ArrayList<String>();
public Task(String source) {
this.source = source.trim();
this.pretty = this.source;
this.pretty = this.pretty.replaceAll(re_date.pattern(), "");
this.sortVal = this.pretty = this.pretty.replaceAll(re_priority.pattern(), "");
this.pretty = this.pretty.replaceAll(re_tag.pattern(), "");
this.pretty = this.pretty.replaceAll("\\s+", " ");
this.pretty = this.pretty.trim();
// find the priority
Matcher m = re_priority.matcher(this.source);
if(m.find()) {
this.priority = Integer.parseInt(m.group(2).substring(1));
if(this.priority == 0) { // !0 is actually -1 priority
this.priority = -1;
}
this.tags.add(m.group(2));
}
// find the date
this.calendar = Task.matcherToCalendar(re_date.matcher(this.source));
this.addTags(re_date.matcher(this.source), 0);
this.addTags(re_tag.matcher(this.source), 2);
}
@Override
public String toString() {
return this.pretty;
}
@Override
public int compareTo(Task other) {
if(this.priority != other.priority) {
return other.priority - this.priority;
}
if(this.calendar != null && other.calendar == null) {
return -1;
} else if(this.calendar == null && other.calendar != null) {
return 1;
} else if(this.calendar != null && other.calendar != null) {
if(!this.calendar.equals(other.calendar)) {
return this.calendar.compareTo(other.calendar);
}
}
return this.sortVal.compareTo(other.sortVal);
}
private void addTags(Matcher m, int group) {
while(m.find()) {
this.tags.add(m.group(group));
}
}
public String[] getTags() {
String[] temp = new String[this.tags.size()];
this.tags.toArray(temp);
return temp;
}
public boolean contains(String search) {
String[] words = search.toLowerCase().split(" ");
for(int i = 0; i < words.length; i++) {
if(!this.source.toLowerCase().contains(words[i])) {
return false;
}
}
return true;
}
public boolean matches(String tag) {
tag = tag.toLowerCase();
char type = tag.charAt(0);
String content = tag.substring(1);
String regex = null;
switch(type) {
case '!':
regex = "(^|.*\\s)(\\!" + content + ")(\\s.*|$)";
break;
case '+':
case '#':
case '@':
regex = "(^|.+\\s)(\\" + type + "([\\w\\/]*)(" + content + "))(\\s.+|\\/.+|$)";
break;
default:
return this.contains(tag);
}
return Pattern.matches(regex, this.source.toLowerCase());
}
public static Calendar matcherToCalendar(Matcher m) {
if(m.find()) {
Calendar temp = Calendar.getInstance();
temp.set(Calendar.MONTH, Integer.parseInt(m.group(2)) - 1);
temp.set(Calendar.DATE, Integer.parseInt(m.group(3)));
if(m.group(5) != null) {
temp.set(Calendar.YEAR, Integer.parseInt(m.group(5)) + 2000);
}
if(m.group(7) != null) {
temp.set(Calendar.HOUR, Integer.parseInt(m.group(7)));
} else {
temp.set(Calendar.HOUR, 11);
}
if(m.group(9) != null) {
temp.set(Calendar.MINUTE, Integer.parseInt(m.group(9)));
} else {
temp.set(Calendar.MINUTE, 59);
}
if(m.group(10) != null) {
temp.set(Calendar.AM_PM, m.group(10).toLowerCase().equals("pm") ? Calendar.PM : Calendar.AM);
} else {
temp.set(Calendar.AM_PM, Calendar.PM);
}
return temp;
}
return null;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.