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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
57490c5c29ca953bd0f7556963763277fac8a61c
|
ede1fd0d934af8aaf82b0a8c081913a8dfe1416e
|
/src/com/class27/Java.java
|
c5b2904885c3200075280f1e4cb76b03e0b31c4b
|
[] |
no_license
|
DannySorto1/eclipse-workSpace
|
9a79f007aa963c8230aa98e7944a732f7345b1a7
|
ebd93aa5d2b3ee19f757582f341a4c5e9bdc9d77
|
refs/heads/master
| 2020-05-03T09:59:25.374759
| 2019-07-30T20:34:56
| 2019-07-30T20:34:56
| 178,568,362
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 296
|
java
|
package com.class27;
public class Java extends ProgrammingLanguage {
@Override
public void writeCode() {
System.out.println("To do Java programming you must use Eclipse");
}
@Override
public void debug() {
System.out.println("To do debug in Java you must use eclipse");
}
}
|
[
"Dannysorto1@gmail.com"
] |
Dannysorto1@gmail.com
|
55f2fa22a1833abdf7cd5bf8a603f9266a904780
|
0a94e4bb6bdf5c54ebba25cecafa72215266843a
|
/2.JavaCore/src/com/javarush/task/task18/task1824/Solution.java
|
283b33cec95ec8eac62820426118164ce38da998
|
[] |
no_license
|
Senat77/JavaRush
|
8d8fb6e59375656a545825585118febd2e1637f4
|
68dc0139da96617ebcad967331dcd24f9875d8ee
|
refs/heads/master
| 2020-05-19T18:50:31.534629
| 2018-09-25T14:00:31
| 2018-09-25T14:00:31
| 185,160,609
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,859
|
java
|
package com.javarush.task.task18.task1824;
/*
Файлы и исключения
Читайте с консоли имена файлов.
Если файла не существует (передано неправильное имя файла), то перехватить исключение FileNotFoundException,
вывести в консоль переданное неправильное имя файла и завершить работу программы.
Закрыть потоки.
Не используйте System.exit();
Требования:
1. Программа должна считывать имена файлов с консоли.
2. Для каждого файла нужно создавать поток для чтения.
3. Если файл не существует, программа должна перехватывать исключение FileNotFoundException.
4. После перехвата исключения, программа должна вывести имя файла в консоль и завершить работу.
5. Потоки для чтения из файла должны быть закрыты.
6. Команду "System.exit();" использовать нельзя.
*/
import java.io.*;
public class Solution
{
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true)
{
FileInputStream fis = null;
String s = br.readLine();
try
{
fis = new FileInputStream(s);
}
catch (FileNotFoundException e)
{
System.out.println(s);
break;
}
fis.close();
}
br.close();
}
}
|
[
"sergii.senatorov@gmail.com"
] |
sergii.senatorov@gmail.com
|
b317d80fafc89e845540cb1a7b2651233f6bf9c3
|
8b0ac54bc895fb222f53c9433c87dae20522e35f
|
/src/main/java/com/bludash/emulator/config/WebConfigurer.java
|
d4abd7bfa7b219f57d315d8db584ba392db89cb4
|
[] |
no_license
|
mrCosmofen/blu-dash-emu
|
6d73d4f847a92ae3b516f0b89994f4b83b0efea6
|
e608aa9901b2e1c7d9b2d65839848d446f4c7d09
|
refs/heads/master
| 2022-11-15T23:24:52.047804
| 2020-04-16T11:53:29
| 2020-04-16T11:53:29
| 256,179,124
| 0
| 0
| null | 2020-07-20T08:46:57
| 2020-04-16T10:13:33
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 6,623
|
java
|
package com.bludash.emulator.config;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import io.github.jhipster.config.h2.H2ConfigurationHelper;
import io.github.jhipster.web.filter.CachingHttpHeadersFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.server.*;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import org.springframework.http.MediaType;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import javax.servlet.*;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.util.*;
import static java.net.URLDecoder.decode;
/**
* Configuration of web application with Servlet 3.0 APIs.
*/
@Configuration
public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> {
private final Logger log = LoggerFactory.getLogger(WebConfigurer.class);
private final Environment env;
private final JHipsterProperties jHipsterProperties;
public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) {
this.env = env;
this.jHipsterProperties = jHipsterProperties;
}
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
if (env.getActiveProfiles().length != 0) {
log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles());
}
EnumSet<DispatcherType> disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC);
if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_PRODUCTION))) {
initCachingHttpHeadersFilter(servletContext, disps);
}
if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) {
initH2Console(servletContext);
}
log.info("Web application fully configured");
}
/**
* Customize the Servlet engine: Mime types, the document root, the cache.
*/
@Override
public void customize(WebServerFactory server) {
setMimeMappings(server);
// When running in an IDE or with ./gradlew bootRun, set location of the static web assets.
setLocationForStaticAssets(server);
}
private void setMimeMappings(WebServerFactory server) {
if (server instanceof ConfigurableServletWebServerFactory) {
MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
// IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase());
// CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64
mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase());
ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server;
servletWebServer.setMimeMappings(mappings);
}
}
private void setLocationForStaticAssets(WebServerFactory server) {
if (server instanceof ConfigurableServletWebServerFactory) {
ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server;
File root;
String prefixPath = resolvePathPrefix();
root = new File(prefixPath + "build/resources/main/static/");
if (root.exists() && root.isDirectory()) {
servletWebServer.setDocumentRoot(root);
}
}
}
/**
* Resolve path prefix to static resources.
*/
private String resolvePathPrefix() {
String fullExecutablePath;
try {
fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
/* try without decoding if this ever happens */
fullExecutablePath = this.getClass().getResource("").getPath();
}
String rootPath = Paths.get(".").toUri().normalize().getPath();
String extractedPath = fullExecutablePath.replace(rootPath, "");
int extractionEndIndex = extractedPath.indexOf("build/");
if (extractionEndIndex <= 0) {
return "";
}
return extractedPath.substring(0, extractionEndIndex);
}
/**
* Initializes the caching HTTP Headers Filter.
*/
private void initCachingHttpHeadersFilter(ServletContext servletContext,
EnumSet<DispatcherType> disps) {
log.debug("Registering Caching HTTP Headers Filter");
FilterRegistration.Dynamic cachingHttpHeadersFilter =
servletContext.addFilter("cachingHttpHeadersFilter",
new CachingHttpHeadersFilter(jHipsterProperties));
cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/i18n/*");
cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/content/*");
cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/app/*");
cachingHttpHeadersFilter.setAsyncSupported(true);
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = jHipsterProperties.getCors();
if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) {
log.debug("Registering CORS filter");
source.registerCorsConfiguration("/api/**", config);
source.registerCorsConfiguration("/management/**", config);
source.registerCorsConfiguration("/v2/api-docs", config);
}
return new CorsFilter(source);
}
/**
* Initializes H2 console.
*/
private void initH2Console(ServletContext servletContext) {
log.debug("Initialize H2 console");
H2ConfigurationHelper.initH2Console(servletContext);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
ac166c32aee00e803d576ed1940a297ecab386fb
|
a1c9e069d3cb754e39ecb66d03ef1c77eb097078
|
/app/src/main/java/com/kw/top/bean/SBFriendsBean.java
|
22e777e92adb6ad7efa30fc70afe87a1e7eea7ab
|
[] |
no_license
|
huang2177/TopNew
|
1dac76016bda9164069ec99ab10667814319c66e
|
9a9182b6c992d6f9d9718da2c4b3e4986396f723
|
refs/heads/master
| 2020-03-29T11:48:57.314314
| 2018-10-11T06:49:15
| 2018-10-11T06:49:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,283
|
java
|
package com.kw.top.bean;
import java.util.List;
/**
* author : zy
* date : 2018/8/18
* des :
*/
public class SBFriendsBean {
private List<FriendBean> A;
private List<FriendBean> B;
private List<FriendBean> C;
private List<FriendBean> D;
private List<FriendBean> E;
private List<FriendBean> F;
private List<FriendBean> G;
private List<FriendBean> H;
private List<FriendBean> I;
private List<FriendBean> J;
private List<FriendBean> K;
private List<FriendBean> L;
private List<FriendBean> M;
private List<FriendBean> N;
private List<FriendBean> O;
private List<FriendBean> P;
private List<FriendBean> Q;
private List<FriendBean> R;
private List<FriendBean> S;
private List<FriendBean> T;
private List<FriendBean> U;
private List<FriendBean> V;
private List<FriendBean> W;
private List<FriendBean> X;
private List<FriendBean> Y;
private List<FriendBean> Z;
public List<FriendBean> getA() {
return A;
}
public void setA(List<FriendBean> a) {
A = a;
}
public List<FriendBean> getB() {
return B;
}
public void setB(List<FriendBean> b) {
B = b;
}
public List<FriendBean> getC() {
return C;
}
public void setC(List<FriendBean> c) {
C = c;
}
public List<FriendBean> getD() {
return D;
}
public void setD(List<FriendBean> d) {
D = d;
}
public List<FriendBean> getE() {
return E;
}
public void setE(List<FriendBean> e) {
E = e;
}
public List<FriendBean> getF() {
return F;
}
public void setF(List<FriendBean> f) {
F = f;
}
public List<FriendBean> getG() {
return G;
}
public void setG(List<FriendBean> g) {
G = g;
}
public List<FriendBean> getH() {
return H;
}
public void setH(List<FriendBean> h) {
H = h;
}
public List<FriendBean> getI() {
return I;
}
public void setI(List<FriendBean> i) {
I = i;
}
public List<FriendBean> getJ() {
return J;
}
public void setJ(List<FriendBean> j) {
J = j;
}
public List<FriendBean> getK() {
return K;
}
public void setK(List<FriendBean> k) {
K = k;
}
public List<FriendBean> getL() {
return L;
}
public void setL(List<FriendBean> l) {
L = l;
}
public List<FriendBean> getM() {
return M;
}
public void setM(List<FriendBean> m) {
M = m;
}
public List<FriendBean> getN() {
return N;
}
public void setN(List<FriendBean> n) {
N = n;
}
public List<FriendBean> getO() {
return O;
}
public void setO(List<FriendBean> o) {
O = o;
}
public List<FriendBean> getP() {
return P;
}
public void setP(List<FriendBean> p) {
P = p;
}
public List<FriendBean> getQ() {
return Q;
}
public void setQ(List<FriendBean> q) {
Q = q;
}
public List<FriendBean> getR() {
return R;
}
public void setR(List<FriendBean> r) {
R = r;
}
public List<FriendBean> getS() {
return S;
}
public void setS(List<FriendBean> s) {
S = s;
}
public List<FriendBean> getT() {
return T;
}
public void setT(List<FriendBean> t) {
T = t;
}
public List<FriendBean> getU() {
return U;
}
public void setU(List<FriendBean> u) {
U = u;
}
public List<FriendBean> getV() {
return V;
}
public void setV(List<FriendBean> v) {
V = v;
}
public List<FriendBean> getW() {
return W;
}
public void setW(List<FriendBean> w) {
W = w;
}
public List<FriendBean> getX() {
return X;
}
public void setX(List<FriendBean> x) {
X = x;
}
public List<FriendBean> getY() {
return Y;
}
public void setY(List<FriendBean> y) {
Y = y;
}
public List<FriendBean> getZ() {
return Z;
}
public void setZ(List<FriendBean> z) {
Z = z;
}
}
|
[
"15378412400@163.com"
] |
15378412400@163.com
|
1824b02f3079b4676ae34588666e23f4b569bdaa
|
2fb68165619abb9085a3510f3084567b84e19a18
|
/day15_Response/src/web/servlet/ResponseDemo4.java
|
2b41b6cf7d80fc99db8f8f9fe1fcff88ea52b02c
|
[] |
no_license
|
GithubRobot01/itheima02
|
1395a9b3d1f6e407e9a5a3b0f77b5343c649b483
|
e0b9cf4e4784938fb216202822468ced26f981c6
|
refs/heads/master
| 2022-12-23T09:51:17.469243
| 2019-09-16T10:23:57
| 2019-09-16T10:23:57
| 202,896,754
| 1
| 0
| null | 2022-12-16T02:24:43
| 2019-08-17T15:18:25
|
TSQL
|
UTF-8
|
Java
| false
| false
| 938
|
java
|
package web.servlet;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
@WebServlet("/ResponseDemo4")
public class ResponseDemo4 extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=utf-8");
//获取字节输出流
ServletOutputStream sos = response.getOutputStream();
//输出数据
sos.write("你好".getBytes("utf-8"));
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.doPost(request,response);
}
}
|
[
"1440035864@qq.com"
] |
1440035864@qq.com
|
0bed6dfbcfea2a36e6bb0873e8f047287732399a
|
c70309e89829b2ab3646fc7a94d299039c5720e7
|
/dubbo-service-customer/service/src/main/java/com/resto/service/customer/service/impl/NewCustomerAddressServiceImpl.java
|
049ca7f5364fef312571e564e0119021a6bae098
|
[] |
no_license
|
Catfeeds/tongyong
|
d014c93cc0e327ae8e4643e7b414db83b91aacf5
|
3f85464f1e9cfaa12b23efa4ddade7ee08ab0804
|
refs/heads/master
| 2020-08-27T22:51:00.904615
| 2019-10-22T06:44:41
| 2019-10-22T06:44:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,676
|
java
|
package com.resto.service.customer.service.impl;
import com.resto.api.customer.entity.CustomerAddress;
import com.resto.api.customer.service.NewCustomerAddressService;
import com.resto.service.customer.service.impl.service.CustomerAddressService;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* Created by disvenk.dai on 2018-10-31 14:48
*/
@RestController
public class NewCustomerAddressServiceImpl implements NewCustomerAddressService {
@Resource
CustomerAddressService customerAddressService;
@Override
public CustomerAddress dbSave(String brandId, CustomerAddress customerAddress) {
customerAddressService.dbSave(customerAddress);
return customerAddress;
}
@Override
public int dbInsertList(String brandId, List<CustomerAddress> list) {
return customerAddressService.dbInsertList(list);
}
@Override
public int dbDelete(String brandId, CustomerAddress customerAddress) {
return customerAddressService.dbDelete(customerAddress);
}
@Override
public int dbDeleteByPrimaryKey(String brandId, Object var) {
return customerAddressService.dbDeleteByPrimaryKey(var.toString());
}
@Override
public int dbDeleteByIds(String brandId, String var) {
return customerAddressService.dbDeleteByIds(var);
}
@Override
public int dbUpdate(String brandId, CustomerAddress customerAddress) {
return customerAddressService.dbUpdate(customerAddress);
}
@Override
public List<CustomerAddress> dbSelect(String brandId, CustomerAddress t) {
return customerAddressService.dbSelect(t);
}
@Override
public List<CustomerAddress> dbSelectPage(String brandId, CustomerAddress t, Integer pageNum, Integer pageSize) {
return customerAddressService.dbSelectPage(t,pageNum ,pageSize );
}
@Override
public CustomerAddress dbSelectByPrimaryKey(String brandId, Object key) {
return customerAddressService.dbSelectByPrimaryKey(key);
}
@Override
public CustomerAddress dbSelectOne(String brandId, CustomerAddress record) {
return customerAddressService.dbSelectOne(record);
}
@Override
public int dbSelectCount(String brandId, CustomerAddress record) {
return customerAddressService.dbSelectCount(record);
}
@Override
public List<CustomerAddress> dbSelectByIds(String brandId, String ids) {
return customerAddressService.dbSelectByIds(ids);
}
@Override
public int deleteByPrimaryKey(String brandId, String id) {
return customerAddressService.deleteByPrimaryKey(id);
}
@Override
public int insert(String brandId, CustomerAddress record) {
return customerAddressService.insert(record);
}
@Override
public int insertSelective(String brandId, CustomerAddress record) {
return customerAddressService.insertSelective(record);
}
@Override
public CustomerAddress selectByPrimaryKey(String brandId, String id) {
return customerAddressService.selectByPrimaryKey(id);
}
@Override
public int updateByPrimaryKeySelective(String brandId, CustomerAddress record) {
return customerAddressService.updateByPrimaryKeySelective(record);
}
@Override
public int updateByPrimaryKey(String brandId, CustomerAddress record) {
return customerAddressService.updateByPrimaryKey(record);
}
@Override
public List<CustomerAddress> selectOneList(String brandId, String customer_id) {
return customerAddressService.selectOneList(customer_id);
}
}
|
[
"disvenk@163.com"
] |
disvenk@163.com
|
5f92ca0034b6a60fb32eac6dee5873af2d2d7151
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes11.dex_source_from_JADX/com/facebook/location/foreground/ForegroundLocationController$4.java
|
cc4bac7b4932bf7b34d12b4c26f1dac9fb52a931
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,108
|
java
|
package com.facebook.location.foreground;
import android.os.Bundle;
import com.facebook.fbservice.service.OperationResult;
import com.facebook.location.ImmutableLocation;
import com.facebook.tools.dextr.runtime.detour.BlueServiceOperationFactoryDetour;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.concurrent.Callable;
/* compiled from: Unknown error occurred */
public class ForegroundLocationController$4 implements Callable<ListenableFuture<OperationResult>> {
final /* synthetic */ ImmutableLocation f10432a;
final /* synthetic */ ForegroundLocationController f10433b;
public ForegroundLocationController$4(ForegroundLocationController foregroundLocationController, ImmutableLocation immutableLocation) {
this.f10433b = foregroundLocationController;
this.f10432a = immutableLocation;
}
public Object call() {
Bundle bundle = new Bundle();
bundle.putParcelable("location", this.f10432a);
return BlueServiceOperationFactoryDetour.a(this.f10433b.l, "update_foreground_location", bundle, -401694402).a();
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
a6520b638e51abc9b8f09c055544dbe0178cfedd
|
f4d67892b0663091759130e14abc38eacb3a8a7d
|
/org.celllife.mobilisr.service.core/src/main/java/org/celllife/mobilisr/service/wasp/ChannelHandler.java
|
2236415ddfaeccb90e1bfeff0243df2b53a7f74a
|
[] |
no_license
|
cell-life/communicate
|
6ab6f86a62866213fc2a5057f83d6c3e0cf3db9a
|
454de8d9823fb8d5170987ab72a732b7353fe9ec
|
refs/heads/master
| 2021-05-02T02:07:32.558672
| 2018-02-09T19:19:28
| 2018-02-09T19:19:28
| 120,880,101
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 528
|
java
|
package org.celllife.mobilisr.service.wasp;
import org.celllife.mobilisr.constants.ChannelType;
import org.celllife.pconfig.model.Pconfig;
public interface ChannelHandler {
public boolean supportsChannelType(ChannelType type);
/**
* Must contain a non-null resource name
* @return
*/
Pconfig getConfigDescriptor();
/**
* @param config
* @throws IllegalArgumentException if configuration fails
*/
void configure(Pconfig config);
public void start();
public void stop();
}
|
[
"dagmar.timler@gmail.com"
] |
dagmar.timler@gmail.com
|
46d4640f8e03144d438486678be5208a05838da7
|
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
|
/com/tencent/smtt/sdk/CacheManager.java
|
bbbc96c37adbdda60b6fd9a9e1843c121df2ee43
|
[] |
no_license
|
killbus/jd_decompile
|
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
|
50c521ce6a2c71c37696e5c131ec2e03661417cc
|
refs/heads/master
| 2022-01-13T03:27:02.492579
| 2018-05-14T11:21:30
| 2018-05-14T11:21:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,273
|
java
|
package com.tencent.smtt.sdk;
import com.tencent.smtt.utils.v;
import java.io.File;
import java.io.InputStream;
import java.util.Map;
public final class CacheManager {
@Deprecated
public static boolean cacheDisabled() {
bo b = bo.b();
if (b != null && b.c()) {
return ((Boolean) b.d().c()).booleanValue();
}
Object a = v.a("android.webkit.CacheManager", "cacheDisabled");
return a == null ? false : ((Boolean) a).booleanValue();
}
public static InputStream getCacheFile(String str, boolean z) {
bo b = bo.b();
return (b == null || !b.c()) ? null : b.d().a(str, z);
}
public static Object getCacheFile(String str, Map<String, String> map) {
bo b = bo.b();
if (b != null && b.c()) {
return b.d().g();
}
try {
return v.a(Class.forName("android.webkit.CacheManager"), "getCacheFile", new Class[]{String.class, Map.class}, str, map);
} catch (Exception e) {
return null;
}
}
@Deprecated
public static File getCacheFileBaseDir() {
bo b = bo.b();
return (b == null || !b.c()) ? (File) v.a("android.webkit.CacheManager", "getCacheFileBaseDir") : (File) b.d().g();
}
}
|
[
"13511577582@163.com"
] |
13511577582@163.com
|
6ddd578fdadd78d742d4777aa9164dad0d3769f2
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/LANG-45b-1-12-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang/WordUtils_ESTest_scaffolding.java
|
6940bc0eb4004d5a4b2b49094cadd6515cdcaa0e
|
[] |
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
| 1,954
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 07:26:00 UTC 2020
*/
package org.apache.commons.lang;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class WordUtils_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang.WordUtils";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(WordUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang.StringUtils",
"org.apache.commons.lang.WordUtils"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
c428bedc96772915f5a43f77c714b08ff1f45b61
|
c49d17bc0ea18308455dfa19e0f9560d87d0954f
|
/thor-rpc/src/main/java/com/mob/thor/rpc/remoting/api/exchange/Exchanger.java
|
773264f1f05c2df8adbb6e8fbeeb0a65e162f8ae
|
[
"Apache-2.0"
] |
permissive
|
MOBX/Thor
|
4b6ed58ba167bde1a8e4148de4a05268314e86d4
|
68b650d7ee05efe67dc1fca8dd0194a47d683f72
|
refs/heads/master
| 2020-12-31T02:49:31.603273
| 2016-01-30T12:49:39
| 2016-01-30T12:49:39
| 48,224,631
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,177
|
java
|
package com.mob.thor.rpc.remoting.api.exchange;
import com.mob.thor.rpc.common.Constants;
import com.mob.thor.rpc.common.URL;
import com.mob.thor.rpc.common.extension.Adaptive;
import com.mob.thor.rpc.common.extension.SPI;
import com.mob.thor.rpc.remoting.api.RemotingException;
import com.mob.thor.rpc.remoting.api.exchange.support.header.HeaderExchanger;
/**
* Exchanger. (SPI, Singleton, ThreadSafe) <a href="http://en.wikipedia.org/wiki/Message_Exchange_Pattern">Message
* Exchange Pattern</a> <a href="http://en.wikipedia.org/wiki/Request-response">Request-Response</a>
*
* @author zxc
*/
@SPI(HeaderExchanger.NAME)
public interface Exchanger {
/**
* bind.
*
* @param url
* @param handler
* @return message server
*/
@Adaptive({ Constants.EXCHANGER_KEY })
ExchangeServer bind(URL url, ExchangeHandler handler) throws RemotingException;
/**
* connect.
*
* @param url
* @param handler
* @return message channel
*/
@Adaptive({ Constants.EXCHANGER_KEY })
ExchangeClient connect(URL url, ExchangeHandler handler) throws RemotingException;
}
|
[
"zhangxiongcai337@gmail.com"
] |
zhangxiongcai337@gmail.com
|
0662f8ed18d367985000ca9d7cc9061db39d3b79
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.5.1/sources/com/jumio/sdk/SDKExpiredException.java
|
bb95cc2eb10e21a1eb23a7de338f516d37b93ce1
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 386
|
java
|
package com.jumio.sdk;
public class SDKExpiredException extends Exception {
private static final long serialVersionUID = -7869139596313029534L;
public SDKExpiredException(String str) {
super(str);
}
public SDKExpiredException(Throwable th) {
super(th);
}
public SDKExpiredException(String str, Throwable th) {
super(str, th);
}
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
2666bd17d8f3bea842de36f4847cbaeee4ff5418
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/fc-open-20210406/src/main/java/com/aliyun/fc_open20210406/models/UpdateCustomDomainResponseBody.java
|
704db1ebccbe1849329593f9300e65f8cd98efbd
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 4,247
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.fc_open20210406.models;
import com.aliyun.tea.*;
public class UpdateCustomDomainResponseBody extends TeaModel {
/**
* <p>The ID of your Alibaba Cloud account.</p>
*/
@NameInMap("accountId")
public String accountId;
/**
* <p>The version of the API.</p>
*/
@NameInMap("apiVersion")
public String apiVersion;
/**
* <p>The configurations of the HTTPS certificate.</p>
*/
@NameInMap("certConfig")
public CertConfig certConfig;
/**
* <p>The time when the custom domain name was created.</p>
*/
@NameInMap("createdTime")
public String createdTime;
/**
* <p>The domain name.</p>
*/
@NameInMap("domainName")
public String domainName;
/**
* <p>The time when the domain name was last modified.</p>
*/
@NameInMap("lastModifiedTime")
public String lastModifiedTime;
/**
* <p>The protocol type that is supported by the custom domain name.</p>
* <br>
* <p>* **HTTP**: Only HTTP is supported.</p>
* <p>* **HTTPS**: Only HTTPS is supported.</p>
* <p>* **HTTP,HTTPS**: HTTP and HTTPS are supported.</p>
*/
@NameInMap("protocol")
public String protocol;
/**
* <p>The route table that maps the paths to functions when the functions are invoked by using the custom domain name.</p>
*/
@NameInMap("routeConfig")
public RouteConfig routeConfig;
/**
* <p>The Transport Layer Security (TLS) configuration.</p>
*/
@NameInMap("tlsConfig")
public TLSConfig tlsConfig;
/**
* <p>The Web Application Firewall (WAF) configuration.</p>
*/
@NameInMap("wafConfig")
public WAFConfig wafConfig;
public static UpdateCustomDomainResponseBody build(java.util.Map<String, ?> map) throws Exception {
UpdateCustomDomainResponseBody self = new UpdateCustomDomainResponseBody();
return TeaModel.build(map, self);
}
public UpdateCustomDomainResponseBody setAccountId(String accountId) {
this.accountId = accountId;
return this;
}
public String getAccountId() {
return this.accountId;
}
public UpdateCustomDomainResponseBody setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
return this;
}
public String getApiVersion() {
return this.apiVersion;
}
public UpdateCustomDomainResponseBody setCertConfig(CertConfig certConfig) {
this.certConfig = certConfig;
return this;
}
public CertConfig getCertConfig() {
return this.certConfig;
}
public UpdateCustomDomainResponseBody setCreatedTime(String createdTime) {
this.createdTime = createdTime;
return this;
}
public String getCreatedTime() {
return this.createdTime;
}
public UpdateCustomDomainResponseBody setDomainName(String domainName) {
this.domainName = domainName;
return this;
}
public String getDomainName() {
return this.domainName;
}
public UpdateCustomDomainResponseBody setLastModifiedTime(String lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
return this;
}
public String getLastModifiedTime() {
return this.lastModifiedTime;
}
public UpdateCustomDomainResponseBody setProtocol(String protocol) {
this.protocol = protocol;
return this;
}
public String getProtocol() {
return this.protocol;
}
public UpdateCustomDomainResponseBody setRouteConfig(RouteConfig routeConfig) {
this.routeConfig = routeConfig;
return this;
}
public RouteConfig getRouteConfig() {
return this.routeConfig;
}
public UpdateCustomDomainResponseBody setTlsConfig(TLSConfig tlsConfig) {
this.tlsConfig = tlsConfig;
return this;
}
public TLSConfig getTlsConfig() {
return this.tlsConfig;
}
public UpdateCustomDomainResponseBody setWafConfig(WAFConfig wafConfig) {
this.wafConfig = wafConfig;
return this;
}
public WAFConfig getWafConfig() {
return this.wafConfig;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
62733cb38542be6365515839d3e4063d80f54925
|
48d7cc03286a512e4772162c12d7cfaca166134d
|
/src/test/java/com/totient/dataintegration/repository/timezone/DateTimeWrapperRepository.java
|
aae4586ab0d4941e8252efca6c4f9474a5872103
|
[] |
no_license
|
thomb123/dataintegration1
|
1c13c7aeedb77187d18243a87b3d433ce870a292
|
2972114bcd49b88d6f952819608b67598a1fb527
|
refs/heads/main
| 2023-02-01T03:39:48.161524
| 2020-12-08T16:39:23
| 2020-12-08T16:39:23
| 319,699,113
| 0
| 0
| null | 2020-12-16T14:44:14
| 2020-12-08T16:39:11
|
Java
|
UTF-8
|
Java
| false
| false
| 352
|
java
|
package com.totient.dataintegration.repository.timezone;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Spring Data JPA repository for the {@link DateTimeWrapper} entity.
*/
@Repository
public interface DateTimeWrapperRepository extends JpaRepository<DateTimeWrapper, Long> {}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
937b91e42c33428934685c94269e69b7e2aecc8b
|
5eb4663e8fdb473a809337f06036153d87cc3549
|
/MyJava/src/tw/org/iii/Jason031907.java
|
557f51b976c99099cb1989cc298cbb561488b847
|
[] |
no_license
|
qoo85714/newjava
|
42ed9a60c98aaaca60ee91788791785db3335a18
|
83521146f146bf40b361c99040a33ab9a4d9c79f
|
refs/heads/master
| 2020-05-22T15:20:19.871616
| 2017-04-15T08:10:17
| 2017-04-15T08:10:17
| 84,698,574
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 447
|
java
|
package tw.org.iii;
public class Jason031907 {
public static void main(String[] args) {
String s1 = "Brad";
String s2 = s1;
System.out.println(s1 == s2);
s1= "Hello";
System.out.println(s1 == s2);
System.out.println("--------------");
String s3 = "Brad";
System.out.println(s3.concat("1234567"));
System.out.println(s3);
System.out.println(s3.replace('a', 'A'));
System.out.println(s3);
}
}
|
[
"Mac@Mac-PC"
] |
Mac@Mac-PC
|
c6268db4c4d370ea0777373ae50481b77ecb7771
|
7389c2d3ffd9caf3b33f2e2e36b26442925c5e71
|
/wzm_sdk/src/main/java/top/wzmyyj/wzm_sdk/activity/SinglePanelActivity.java
|
fb72d4b03020d1a8672db87ee55b75ddba128748
|
[] |
no_license
|
tracyly/GoOut
|
8c75fd030f213721b18b19e6174b2cffbe9be2af
|
d224c5bdeebe189f066ced0c0f5715cef3258e68
|
refs/heads/master
| 2020-07-29T20:48:15.672488
| 2018-05-13T16:19:32
| 2018-05-13T16:19:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,517
|
java
|
package top.wzmyyj.wzm_sdk.activity;
import android.support.annotation.NonNull;
import android.support.v7.widget.Toolbar;
import android.widget.ImageView;
import android.widget.LinearLayout;
import java.util.List;
import top.wzmyyj.wzm_sdk.R;
import top.wzmyyj.wzm_sdk.panel.InitPanel;
/**
* Created by wzm on 2018/4/28 0028.
*/
public abstract class SinglePanelActivity extends PanelActivity {
private LinearLayout layout;
private Toolbar mToolbar;
private ImageView img_1;
private ImageView img_2;
protected InitPanel mPanel;
@NonNull
protected abstract InitPanel getPanel();
@Override
protected List<InitPanel> getPanelList(List<InitPanel> mPanelList) {
mPanel = getPanel();
mPanelList.add(mPanel);
return mPanelList;
}
public void setTitle(String s) {
if (mToolbar == null) return;
this.mToolbar.setTitle(s);
}
@Override
protected void initView() {
super.initView();
setContentView(R.layout.af_single_panel);
layout = findViewById(R.id.ll_1);
mToolbar = findViewById(R.id.toolbar);
img_1 = findViewById(R.id.img_1);
img_2 = findViewById(R.id.img_2);
mToolbar.setTitle(mPanel.getTitle());
setView(mToolbar, img_1, img_2);
}
protected abstract void setView(Toolbar toolbar, ImageView img_1, ImageView img_2);
@Override
protected void initData() {
super.initData();
layout.addView(mPanel.getView());
}
}
|
[
"2209011667@qq.com"
] |
2209011667@qq.com
|
0ab51dabd2141eea71616c78ed03fc4d9a87c578
|
47a755ab816b2055d116b047b4aeda15bd1f7351
|
/build-logic/src/main/java/com/sun/apache/bcel/internal/generic/IF_ICMPLT.java
|
5265ffecce7672a13f93d984f720ea4b8a63dbb9
|
[] |
no_license
|
MikeAndrson/kotlinc-android
|
4548581c7972b13b45dff4ccdd11747581349ded
|
ebc9b1d78bbd97083e860a1e8887b25469a13ecf
|
refs/heads/master
| 2023-08-20T05:17:30.605126
| 2021-10-04T16:06:46
| 2021-10-04T16:06:46
| 413,486,864
| 25
| 12
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,888
|
java
|
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
package com.sun.apache.bcel.internal.generic;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache BCEL" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache BCEL", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
import com.sun.apache.bcel.internal.Constants;
/**
* IF_ICMPLT - Branch if int comparison succeeds
*
* <PRE>Stack: ..., value1, value2 -> ...</PRE>
*
* @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
*/
public class IF_ICMPLT extends IfInstruction {
/**
* Empty constructor needed for the Class.newInstance() statement in
* Instruction.readInstruction(). Not to be used otherwise.
*/
IF_ICMPLT() {}
public IF_ICMPLT(InstructionHandle target) {
super(Constants.IF_ICMPLT, target);
}
/**
* @return negation of instruction
*/
public IfInstruction negate() {
return new IF_ICMPGE(target);
}
/**
* Call corresponding visitor method(s). The order is:
* Call visitor methods of implemented interfaces first, then
* call methods according to the class hierarchy in descending order,
* i.e., the most specific visitXXX() call comes last.
*
* @param v Visitor object
*/
public void accept(Visitor v) {
v.visitStackConsumer(this);
v.visitBranchInstruction(this);
v.visitIfInstruction(this);
v.visitIF_ICMPLT(this);
}
}
|
[
"heystudiosofficial@gmail.com"
] |
heystudiosofficial@gmail.com
|
22e98834954960e8a1a68a1489cb3daafb921366
|
a1958af400ace181194751bd028a16814d9496a9
|
/code/easycms/src/com/easycms/cms/service/WeixinTokenCache.java
|
e8b92894a0a8348a5053edc845296862bf962c2c
|
[] |
no_license
|
gziscas/easyPara
|
a1a700c808649875f1d8e3ed21baea932030a430
|
46cab44b7ab517e9272e0bb47016910d7651dc0a
|
refs/heads/master
| 2021-01-19T00:21:53.335255
| 2017-04-23T14:43:14
| 2017-04-23T14:43:14
| 87,160,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 172
|
java
|
package com.easycms.cms.service;
/**
* 微信Token缓存接口
*/
public interface WeixinTokenCache {
/**
* 获取token
* @return
*/
public String getToken();
}
|
[
"liuya1985liuya@163.com"
] |
liuya1985liuya@163.com
|
c19a0afe4c81af4efb8af3fdf18cf6955949b00c
|
9d1870a895c63f540937f04a6285dd25ada5e52a
|
/chromecast-app-reverse-engineering/src/from-jd-gui/azc.java
|
d4a3baced068e80bb2b5b717651ce06eb53451d8
|
[] |
no_license
|
Churritosjesus/Chromecast-Reverse-Engineering
|
572aa97eb1fd65380ca0549b4166393505328ed4
|
29fae511060a820f2500a4e6e038dfdb591f4402
|
refs/heads/master
| 2023-06-04T10:27:15.869608
| 2015-10-27T10:43:11
| 2015-10-27T10:43:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 347
|
java
|
final class azc
implements bag
{
azc(ayz paramayz) {}
public final void a(String paramString1, String paramString2)
{
ayz.a(this.a, paramString1, paramString2);
}
}
/* Location: C:\DEV\android\dex2jar-2.1-SNAPSHOT\classes-dex2jar.jar!\azc.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"v.richomme@gmail.com"
] |
v.richomme@gmail.com
|
3eba95e353d90d04af6e74559b8f36f1acfc5e56
|
17c30fed606a8b1c8f07f3befbef6ccc78288299
|
/P9_8_0_0/src/main/java/huawei/android/app/IEasyWakeUpManager.java
|
bbe8bf3f33068c5b025c9f52c35fc437fbc05420
|
[] |
no_license
|
EggUncle/HwFrameWorkSource
|
4e67f1b832a2f68f5eaae065c90215777b8633a7
|
162e751d0952ca13548f700aad987852b969a4ad
|
refs/heads/master
| 2020-04-06T14:29:22.781911
| 2018-11-09T05:05:03
| 2018-11-09T05:05:03
| 157,543,151
| 1
| 0
| null | 2018-11-14T12:08:01
| 2018-11-14T12:08:01
| null |
UTF-8
|
Java
| false
| false
| 2,875
|
java
|
package huawei.android.app;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public interface IEasyWakeUpManager extends IInterface {
public static abstract class Stub extends Binder implements IEasyWakeUpManager {
private static final String DESCRIPTOR = "huawei.android.app.IEasyWakeUpManager";
static final int TRANSACTION_setEasyWakeUpFlag = 1;
private static class Proxy implements IEasyWakeUpManager {
private IBinder mRemote;
Proxy(IBinder remote) {
this.mRemote = remote;
}
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
public boolean setEasyWakeUpFlag(int flag) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeInt(flag);
this.mRemote.transact(1, _data, _reply, 0);
_reply.readException();
boolean _result = _reply.readInt() != 0;
_reply.recycle();
_data.recycle();
return _result;
} catch (Throwable th) {
_reply.recycle();
_data.recycle();
}
}
}
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IEasyWakeUpManager asInterface(IBinder obj) {
if (obj == null) {
return null;
}
IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (iin == null || !(iin instanceof IEasyWakeUpManager)) {
return new Proxy(obj);
}
return (IEasyWakeUpManager) iin;
}
public IBinder asBinder() {
return this;
}
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
switch (code) {
case 1:
data.enforceInterface(DESCRIPTOR);
boolean _result = setEasyWakeUpFlag(data.readInt());
reply.writeNoException();
reply.writeInt(_result ? 1 : 0);
return true;
case 1598968902:
reply.writeString(DESCRIPTOR);
return true;
default:
return super.onTransact(code, data, reply, flags);
}
}
}
boolean setEasyWakeUpFlag(int i) throws RemoteException;
}
|
[
"lygforbs0@mail.com"
] |
lygforbs0@mail.com
|
7765d8a526ec0267494837fb628f8950db0e5d5b
|
4bdf74d8dbb210d29db0fdf1ae97aad08929612c
|
/data_test/81013/Account.java
|
fc3024dc092044ffdbaef24b2dc1fa81ded0255e
|
[] |
no_license
|
huyenhuyen1204/APR_data
|
cba03642f68ce543690a75bcefaf2e0682df5e7e
|
cb9b78b9e973202e9945d90e81d1bfaef0f9255c
|
refs/heads/master
| 2023-05-13T21:52:20.294382
| 2021-06-02T17:52:30
| 2021-06-02T17:52:30
| 373,250,240
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,154
|
java
|
import java.util.ArrayList;
public class Account {
private double balance;
private ArrayList<Transaction> transitionList;
public Account(double balance) {
this.balance = balance;
this.transitionList = new ArrayList<>();
}
public Account() {
this.balance = 0;
this.transitionList = new ArrayList<>();
}
private void deposit(double amount) {
if (amount <= 0) {
System.out.println("So tien ban nap vao khong hop le!");
return;
}
this.balance += amount;
}
private void withdraw(double amount) {
if (amount <= 0) {
System.out.println("So tien ban rut ra khong hop le!");
return;
} else if (amount > this.balance) {
System.out.println("So tien ban rut vuot qua so du!");
return;
}
this.balance -= amount;
}
/**
* Comment.
*/
public void addTransaction(double amount, String operation) {
if (operation.equals(Transaction.DEPOSIT)) {
this.deposit(amount);
Transaction tran = new Transaction(operation, amount, this.balance);
this.transitionList.add(tran);
} else if (operation.equals(Transaction.WITHDRAW)) {
this.withdraw(amount);
Transaction tran = new Transaction(operation, amount, this.balance);
this.transitionList.add(tran);
} else {
System.out.println("Yeu cau khong hop le!");
}
}
/**
* Comment.
*/
public void printTransaction() {
for (int i = 0; i < this.transitionList.size(); i++) {
Transaction t = this.transitionList.get(i);
String mess = "Giao dich " + (i + 1);
if (t.getOperation().equals(Transaction.DEPOSIT)) {
mess += ": Nap tien ";
} else {
mess += ": Rut tien ";
}
mess += "$" + String.format("%.2f", t.getAmount())
+ ". So du luc nay: $" + String.format("%.2f", t.getBalance()) + ".";
System.out.println(mess);
}
}
}
|
[
"nguyenhuyen98pm@gmail.com"
] |
nguyenhuyen98pm@gmail.com
|
8a3f3b19cab8572a1de58014e2188d9af8d91838
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_ffd12c47d1b2d55b09ef9665ccf5085ff0effa16/TestRender/35_ffd12c47d1b2d55b09ef9665ccf5085ff0effa16_TestRender_t.java
|
049c7e4b75c5da2d73020a9f8bce141873cdbe0d
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,124
|
java
|
package org.encog.parse.expression;
import junit.framework.Assert;
import junit.framework.TestCase;
import org.encog.ml.prg.EncogProgram;
import org.encog.parse.expression.common.RenderCommonExpression;
public class TestRender extends TestCase {
public void testRenderBasic() {
EncogProgram expression = new EncogProgram("((a+25)^3/25)-((a*3)^4/250)");
RenderCommonExpression render = new RenderCommonExpression();
String result = render.render(expression);
Assert.assertEquals("((((a+25)^3)/25)-(((a*3)^4)/250))", result);
}
public void testRenderFunction() {
EncogProgram expression = new EncogProgram("(sin(x)+cos(x))/2");
RenderCommonExpression render = new RenderCommonExpression();
String result = render.render(expression);
Assert.assertEquals("((sin(x)+cos(x))/2)", result);
}
public void testKnownConst() {
EncogProgram expression = new EncogProgram("x*2*PI");
RenderCommonExpression render = new RenderCommonExpression();
String result = render.render(expression);
Assert.assertEquals("(x*2*PI)", result);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
61af8e96b1d5e0c2f9b8905cfa8be2d72c39dc92
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/Health_com.huawei.health/javafiles/com/autonavi/amap/mapcore/interfaces/INavigateArrow.java
|
ff1b8c8cbb9361253d769b371d3ef0cb9c1327c7
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 932
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.autonavi.amap.mapcore.interfaces;
import android.os.RemoteException;
import java.util.List;
// Referenced classes of package com.autonavi.amap.mapcore.interfaces:
// IOverlay
public interface INavigateArrow
extends IOverlay
{
public abstract List getPoints()
throws RemoteException;
public abstract int getSideColor()
throws RemoteException;
public abstract int getTopColor()
throws RemoteException;
public abstract float getWidth()
throws RemoteException;
public abstract void setPoints(List list)
throws RemoteException;
public abstract void setSideColor(int i)
throws RemoteException;
public abstract void setTopColor(int i)
throws RemoteException;
public abstract void setWidth(float f)
throws RemoteException;
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
fc493789409144caf0758c648c0f93ee481e7a80
|
3edff40b14fde698b57a0c9258e468819710afe6
|
/src/main/java/mena/gov/bf/service/dto/TypeEntrepotDTO.java
|
a1466777a1df4aea086ff201f0bd46c532fcd63e
|
[] |
no_license
|
romaricada/microserviceged
|
f1a427b48247573e16f5aa045e5be4f4da855dd7
|
93bede10c94a25f14a0ad5004239f688d253caf6
|
refs/heads/main
| 2023-06-23T23:09:20.516093
| 2021-07-17T12:07:04
| 2021-07-17T12:07:04
| 385,258,127
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,724
|
java
|
package mena.gov.bf.service.dto;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;
/**
* A DTO for the {@link mena.gov.bf.domain.TypeEntrepot} entity.
*/
public class TypeEntrepotDTO implements Serializable {
private Long id;
@NotNull
private String libelle;
@NotNull
private Boolean deleted;
@NotNull
private Long ordre;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getLibelle() {
return libelle;
}
public void setLibelle(String libelle) {
this.libelle = libelle;
}
public Boolean isDeleted() {
return deleted;
}
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
public Long getOrdre() {
return ordre;
}
public void setOrdre(Long ordre) {
this.ordre = ordre;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TypeEntrepotDTO typeEntrepotDTO = (TypeEntrepotDTO) o;
if (typeEntrepotDTO.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), typeEntrepotDTO.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "TypeEntrepotDTO{" +
"id=" + id +
", libelle='" + libelle + '\'' +
", deleted=" + deleted +
", ordre=" + ordre +
'}';
}
}
|
[
"adaromaric0123@gmail.com"
] |
adaromaric0123@gmail.com
|
0758cec8249d6fd0fff9f035dae5f00250e7234a
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody.java
|
49a91589c730fa24d6592982e450033a52b25f65
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,527
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sofa20190815.models;
import com.aliyun.tea.*;
public class SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody extends TeaModel {
@NameInMap("RequestId")
public String requestId;
@NameInMap("ResultCode")
public String resultCode;
@NameInMap("ResultMessage")
public String resultMessage;
@NameInMap("Message")
public String message;
@NameInMap("ResponseStatusCode")
public Long responseStatusCode;
@NameInMap("Success")
public Boolean success;
@NameInMap("Data")
public java.util.List<SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData> data;
public static SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody build(java.util.Map<String, ?> map) throws Exception {
SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody self = new SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody();
return TeaModel.build(map, self);
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody setResultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
public String getResultCode() {
return this.resultCode;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody setResultMessage(String resultMessage) {
this.resultMessage = resultMessage;
return this;
}
public String getResultMessage() {
return this.resultMessage;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody setMessage(String message) {
this.message = message;
return this;
}
public String getMessage() {
return this.message;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody setResponseStatusCode(Long responseStatusCode) {
this.responseStatusCode = responseStatusCode;
return this;
}
public Long getResponseStatusCode() {
return this.responseStatusCode;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody setSuccess(Boolean success) {
this.success = success;
return this;
}
public Boolean getSuccess() {
return this.success;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBody setData(java.util.List<SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData> data) {
this.data = data;
return this;
}
public java.util.List<SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData> getData() {
return this.data;
}
public static class SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData extends TeaModel {
@NameInMap("Action")
public String action;
@NameInMap("Description")
public String description;
@NameInMap("DevStage")
public String devStage;
@NameInMap("Env")
public String env;
@NameInMap("ExtraInfo")
public String extraInfo;
@NameInMap("Id")
public Long id;
@NameInMap("Key")
public String key;
@NameInMap("Status")
public String status;
@NameInMap("SubType")
public String subType;
@NameInMap("TagType")
public String tagType;
@NameInMap("Type")
public String type;
@NameInMap("Value")
public String value;
@NameInMap("VersionId")
public Long versionId;
public static SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData build(java.util.Map<String, ?> map) throws Exception {
SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData self = new SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData();
return TeaModel.build(map, self);
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setAction(String action) {
this.action = action;
return this;
}
public String getAction() {
return this.action;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setDescription(String description) {
this.description = description;
return this;
}
public String getDescription() {
return this.description;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setDevStage(String devStage) {
this.devStage = devStage;
return this;
}
public String getDevStage() {
return this.devStage;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setEnv(String env) {
this.env = env;
return this;
}
public String getEnv() {
return this.env;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setExtraInfo(String extraInfo) {
this.extraInfo = extraInfo;
return this;
}
public String getExtraInfo() {
return this.extraInfo;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setId(Long id) {
this.id = id;
return this;
}
public Long getId() {
return this.id;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setKey(String key) {
this.key = key;
return this;
}
public String getKey() {
return this.key;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setStatus(String status) {
this.status = status;
return this;
}
public String getStatus() {
return this.status;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setSubType(String subType) {
this.subType = subType;
return this;
}
public String getSubType() {
return this.subType;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setTagType(String tagType) {
this.tagType = tagType;
return this;
}
public String getTagType() {
return this.tagType;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setType(String type) {
this.type = type;
return this;
}
public String getType() {
return this.type;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setValue(String value) {
this.value = value;
return this;
}
public String getValue() {
return this.value;
}
public SyncLinkefabricFabricMsgcloudconfigthroughdevstageResponseBodyData setVersionId(Long versionId) {
this.versionId = versionId;
return this;
}
public Long getVersionId() {
return this.versionId;
}
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
97cd9508490bdd78ad2f0afe6253697d07528a14
|
22c06ce39649e70f5eee3b77a2f355f064a51c74
|
/server-spi-private/src/main/java/org/keycloak/models/utils/SessionTimeoutHelper.java
|
b52d185822ed70a242b5fb7b9dddf21baeda39e5
|
[
"Apache-2.0"
] |
permissive
|
keycloak/keycloak
|
fa71d8b0712c388faeb89ade03ea5f1073ffb837
|
a317f78e65c1ee63eb166c61767f34f72be0a891
|
refs/heads/main
| 2023-09-01T20:04:48.392597
| 2023-09-01T17:12:35
| 2023-09-01T17:12:35
| 11,125,589
| 17,920
| 7,045
|
Apache-2.0
| 2023-09-14T19:48:31
| 2013-07-02T13:38:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,420
|
java
|
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* 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.keycloak.models.utils;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class SessionTimeoutHelper {
/**
* Interval specifies maximum time, for which the "userSession.lastSessionRefresh" may contain stale value.
*
* For example, if there are 2 datacenters and sessionRefresh will happen on DC1, then the message about the updated lastSessionRefresh may
* be sent to the DC2 later (EG. Some periodic thread will send the updated lastSessionRefresh times in batches with 60 seconds delay).
*/
public static final int PERIODIC_TASK_INTERVAL_SECONDS = 60;
/**
* The maximum time difference, which will be still tolerated when checking userSession idle timeout.
*
* For example, if there are 2 datacenters and sessionRefresh happened on DC1, then we still want to tolerate some timeout on DC2 due the
* fact that lastSessionRefresh of current userSession may be updated later from DC1.
*
* See {@link #PERIODIC_TASK_INTERVAL_SECONDS}
*/
public static final int IDLE_TIMEOUT_WINDOW_SECONDS = 120;
/**
* The maximum time difference, which will be still tolerated when checking userSession idle timeout with periodic cleaner threads.
*
* Just the sessions, with the timeout bigger than this value are considered really time-outed and can be garbage-collected (Considering the cross-dc
* environment and the fact that some session updates on different DC can be postponed and seen on current DC with some delay).
*
* See {@link #PERIODIC_TASK_INTERVAL_SECONDS} and {@link #IDLE_TIMEOUT_WINDOW_SECONDS}
*/
public static final int PERIODIC_CLEANER_IDLE_TIMEOUT_WINDOW_SECONDS = 180;
}
|
[
"hmlnarik@users.noreply.github.com"
] |
hmlnarik@users.noreply.github.com
|
f9c80dc4e391e38f06a3e039a3060221029c0d63
|
c5066eb3e915628af0c1fc7e5f0bf14657f45da7
|
/CBP/android/sub_app/fermat-cbp-android-sub-app-crypto-broker-community-bitdubai/src/main/java/com/bitdubai/sub_app/crypto_broker_community/common/UtilsFuncs.java
|
38c2b963d3932c36e4ee734aecf0b13c62c8482c
|
[
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] |
permissive
|
GaboHub/fermat
|
5ca615431a92a2dc0a1e9666d8b2bbf24d25fe34
|
48da572938c5785038648bd86193a967848d0c2e
|
refs/heads/master
| 2021-01-23T16:40:37.917619
| 2016-01-20T22:49:18
| 2016-01-20T22:49:18
| 53,030,027
| 0
| 1
| null | 2016-08-24T02:50:00
| 2016-03-03T07:25:27
|
Java
|
UTF-8
|
Java
| false
| false
| 1,231
|
java
|
package com.bitdubai.sub_app.crypto_broker_community.common;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Rect;
/**
* Created by Leon Acosta - (laion.cj91@gmail.com) on 18/12/2015.
*
* @author lnacosta
* @version 1.0.0
*/
public class UtilsFuncs {
public static Bitmap getRoundedShape(Bitmap scaleBitmapImage) {
int targetWidth = 50;
int targetHeight = 50;
Bitmap targetBitmap = Bitmap.createBitmap(targetWidth,
targetHeight,Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(targetBitmap);
Path path = new Path();
path.addCircle(((float) targetWidth - 1) / 2,
((float) targetHeight - 1) / 2,
(Math.min(((float) targetWidth),
((float) targetHeight)) / 2),
Path.Direction.CCW);
canvas.clipPath(path);
Bitmap sourceBitmap = scaleBitmapImage;
canvas.drawBitmap(sourceBitmap,
new Rect(0, 0, sourceBitmap.getWidth(),
sourceBitmap.getHeight()),
new Rect(0, 0, targetWidth, targetHeight), null);
return targetBitmap;
}
}
|
[
"laion.cj91@gmail.com"
] |
laion.cj91@gmail.com
|
7c4301761431042b7af638d1ff3c8469d1997f3d
|
5bb87c396cf4b6f2c13ec5ddb900b1695fb7ad8c
|
/src/main/java/org/codelibs/fess/exec/ThumbnailGenerator.java
|
d69e92cdb0a1c43252a112490b1a66793c769474
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
EyadA/fess
|
1e2b15187e31974167967699c01a73fb33bcb061
|
2ba4ee85b5f620c564bddfe2bf55cae626ecc756
|
refs/heads/master
| 2020-03-22T08:04:19.962414
| 2018-07-04T16:21:40
| 2018-07-04T16:21:40
| 139,742,611
| 0
| 0
|
Apache-2.0
| 2018-07-04T16:02:29
| 2018-07-04T16:02:28
| null |
UTF-8
|
Java
| false
| false
| 8,127
|
java
|
/*
* Copyright 2012-2018 CodeLibs Project and the Others.
*
* 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.codelibs.fess.exec;
import java.io.File;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.util.concurrent.ForkJoinPool;
import javax.annotation.Resource;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.core.misc.DynamicProperties;
import org.codelibs.core.timer.TimeoutManager;
import org.codelibs.core.timer.TimeoutTask;
import org.codelibs.fess.Constants;
import org.codelibs.fess.crawler.client.EsClient;
import org.codelibs.fess.es.client.FessEsClient;
import org.codelibs.fess.exception.ContainerNotAvailableException;
import org.codelibs.fess.timer.SystemMonitorTarget;
import org.codelibs.fess.util.ComponentUtil;
import org.elasticsearch.monitor.jvm.JvmInfo;
import org.elasticsearch.monitor.os.OsProbe;
import org.elasticsearch.monitor.process.ProcessProbe;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.Option;
import org.lastaflute.di.core.external.GenericExternalContext;
import org.lastaflute.di.core.external.GenericExternalContextComponentDefRegister;
import org.lastaflute.di.core.factory.SingletonLaContainerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ThumbnailGenerator {
private static final Logger logger = LoggerFactory.getLogger(ThumbnailGenerator.class);
@Resource
public FessEsClient fessEsClient;
protected static class Options {
@Option(name = "-s", aliases = "--sessionId", metaVar = "sessionId", usage = "Session ID")
protected String sessionId;
@Option(name = "-n", aliases = "--name", metaVar = "name", usage = "Name")
protected String name;
@Option(name = "-p", aliases = "--properties", metaVar = "properties", usage = "Properties File")
protected String propertiesPath;
@Option(name = "-t", aliases = "--numOfThreads", metaVar = "numOfThreads", usage = "The number of threads")
protected int numOfThreads = 1;
@Option(name = "-c", aliases = "--cleanup", usage = "Clean-Up mode")
protected boolean cleanup;
protected Options() {
// nothing
}
@Override
public String toString() {
return "Options [sessionId=" + sessionId + ", name=" + name + ", propertiesPath=" + propertiesPath + ", numOfThreads="
+ numOfThreads + "]";
}
}
static void initializeProbes() {
// Force probes to be loaded
ProcessProbe.getInstance();
OsProbe.getInstance();
JvmInfo.jvmInfo();
}
public static void main(final String[] args) {
final Options options = new Options();
final CmdLineParser parser = new CmdLineParser(options);
try {
parser.parseArgument(args);
} catch (final CmdLineException e) {
System.err.println(e.getMessage());
System.err.println("java " + ThumbnailGenerator.class.getCanonicalName() + " [options...] arguments...");
parser.printUsage(System.err);
return;
}
if (logger.isDebugEnabled()) {
try {
ManagementFactory.getRuntimeMXBean().getInputArguments().stream().forEach(s -> logger.debug("Parameter: " + s));
System.getProperties().entrySet().stream().forEach(e -> logger.debug("Property: " + e.getKey() + "=" + e.getValue()));
System.getenv().entrySet().forEach(e -> logger.debug("Env: " + e.getKey() + "=" + e.getValue()));
logger.debug("Option: " + options);
} catch (final Exception e) {
// ignore
}
}
final String transportAddresses = System.getProperty(Constants.FESS_ES_TRANSPORT_ADDRESSES);
if (StringUtil.isNotBlank(transportAddresses)) {
System.setProperty(EsClient.TRANSPORT_ADDRESSES, transportAddresses);
}
final String clusterName = System.getProperty(Constants.FESS_ES_CLUSTER_NAME);
if (StringUtil.isNotBlank(clusterName)) {
System.setProperty(EsClient.CLUSTER_NAME, clusterName);
}
TimeoutTask systemMonitorTask = null;
int exitCode;
try {
SingletonLaContainerFactory.setConfigPath("app.xml");
SingletonLaContainerFactory.setExternalContext(new GenericExternalContext());
SingletonLaContainerFactory.setExternalContextComponentDefRegister(new GenericExternalContextComponentDefRegister());
SingletonLaContainerFactory.init();
final Thread shutdownCallback = new Thread("ShutdownHook") {
@Override
public void run() {
if (logger.isDebugEnabled()) {
logger.debug("Destroying LaContainer..");
}
destroyContainer();
}
};
Runtime.getRuntime().addShutdownHook(shutdownCallback);
systemMonitorTask =
TimeoutManager.getInstance().addTimeoutTarget(new SystemMonitorTarget(),
ComponentUtil.getFessConfig().getSuggestSystemMonitorIntervalAsInteger(), true);
final int totalCount = process(options);
if (totalCount != 0) {
logger.info("Created " + totalCount + " thumbnail files.");
} else {
logger.info("No new thumbnails found.");
}
exitCode = 0;
} catch (final ContainerNotAvailableException e) {
if (logger.isDebugEnabled()) {
logger.debug("ThumbnailGenerator is stopped.", e);
} else if (logger.isInfoEnabled()) {
logger.info("ThumbnailGenerator is stopped.");
}
exitCode = Constants.EXIT_FAIL;
} catch (final Throwable t) {
logger.error("ThumbnailGenerator does not work correctly.", t);
exitCode = Constants.EXIT_FAIL;
} finally {
if (systemMonitorTask != null) {
systemMonitorTask.cancel();
}
destroyContainer();
}
System.exit(exitCode);
}
private static void destroyContainer() {
synchronized (SingletonLaContainerFactory.class) {
SingletonLaContainerFactory.destroy();
}
}
private static int process(final Options options) {
final DynamicProperties systemProperties = ComponentUtil.getSystemProperties();
if (StringUtil.isNotBlank(options.propertiesPath)) {
systemProperties.reload(options.propertiesPath);
} else {
try {
final File propFile = File.createTempFile("thumbnail_", ".properties");
if (propFile.delete() && logger.isDebugEnabled()) {
logger.debug("Deleted a temp file: " + propFile.getAbsolutePath());
}
systemProperties.reload(propFile.getAbsolutePath());
propFile.deleteOnExit();
} catch (final IOException e) {
logger.warn("Failed to create system properties file.", e);
}
}
int totalCount = 0;
int count = 1;
final ForkJoinPool pool = new ForkJoinPool(options.numOfThreads);
while (count != 0) {
count = ComponentUtil.getThumbnailManager().generate(pool, options.cleanup);
totalCount += count;
}
return totalCount;
}
}
|
[
"shinsuke@apache.org"
] |
shinsuke@apache.org
|
59c1a6c7201f433be36be23e0035f598ad152385
|
ae3853f02045a893bf67e3ceda7937a9ebee161b
|
/src/main/java/com/sougata/leave/entity/LocationMaster_.java
|
b0bbb21f539d2e7521286abbf272b6c2d120aae6
|
[] |
no_license
|
Sougata1233/Leave
|
3da82f47d151e1fa85ac094c503d7fe89c9b574d
|
eaff93c4f1d8d1716169c8b0956aa03ea5bf3747
|
refs/heads/master
| 2020-04-05T20:09:17.854254
| 2018-11-12T06:37:25
| 2018-11-12T06:37:25
| 157,166,586
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,135
|
java
|
package com.sougata.leave.entity;
import java.sql.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
@StaticMetamodel(LocationMaster.class)
public abstract class LocationMaster_ {
public static volatile SingularAttribute<LocationMaster, Date> modifiedOn;
public static volatile SingularAttribute<LocationMaster, String> locationCountry;
public static volatile SingularAttribute<LocationMaster, String> createdBy;
public static volatile SingularAttribute<LocationMaster, String> modifiedBy;
public static volatile SingularAttribute<LocationMaster, Long> id;
public static volatile SingularAttribute<LocationMaster, Long> locationPin;
public static volatile SingularAttribute<LocationMaster, String> locationArea;
public static volatile SingularAttribute<LocationMaster, String> locationState;
public static volatile SingularAttribute<LocationMaster, Date> createdOn;
public static volatile SingularAttribute<LocationMaster, String> locationCity;
}
|
[
"sougata.roy9203@gmail.com"
] |
sougata.roy9203@gmail.com
|
3141c6472fbc4a5e301e427d5cd81eb21f2620d3
|
44a0d425008ec14c26f38aac19242495bd515be2
|
/xbean-blueprint/src/test/java/org/apache/xbean/blueprint/context/SaladUsingBlueprintTest.java
|
0b977585cae107d91460e264ee9c5162237f9f5b
|
[
"Apache-2.0"
] |
permissive
|
apache/geronimo-xbean
|
9dd506071c66204d727fe277bea4a6f53364a683
|
d8e6909a98c214b431f81e73b11445dd8d7b42d2
|
refs/heads/trunk
| 2023-08-11T09:21:09.158872
| 2023-05-16T15:40:44
| 2023-05-16T15:40:44
| 240,466
| 23
| 38
|
Apache-2.0
| 2023-07-25T17:22:02
| 2009-07-01T08:09:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,522
|
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.xbean.blueprint.context;
import org.apache.xbean.blueprint.example.SaladService;
import org.apache.aries.blueprint.reflect.BeanMetadataImpl;
/**
* @author Dain Sundstrom
* @version $Id$
* @since 1.0
*/
public class SaladUsingBlueprintTest extends BlueprintTestSupport {
public void testSalad() throws Exception {
BeanMetadataImpl salad = (BeanMetadataImpl) reg.getComponentDefinition("saladService");
checkArgumentValue(0, "Cesar", salad, false);
checkArgumentValue(1, "Small", salad, false);
checkArgumentValue(2, "true", salad, false);
}
protected String getPlan() {
return "org/apache/xbean/blueprint/context/salad-normal.xml";
}
}
|
[
"djencks@apache.org"
] |
djencks@apache.org
|
15cd999489034c29a2101e2d23142d1dc881c67c
|
c2eb4958e8f2f012402c93540c844797e3543605
|
/k6309q3cd/packages/apps/PrizeCamera/feature/setting/volumekeys/src/com/mediatek/camera/feature/setting/volumekeys/Volumekeys.java
|
415a49059192302de65921a7941b53c63668f9cf
|
[] |
no_license
|
npnet/SomeSampleTest
|
44afe199ad44f099349294608de1c3d3647d7840
|
e5152f48b0d48725bf9abbfb0dfd2b0a3eae3870
|
refs/heads/master
| 2023-03-18T06:22:07.346392
| 2020-04-07T04:26:28
| 2020-04-07T04:26:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,361
|
java
|
package com.mediatek.camera.feature.setting.volumekeys;
import com.mediatek.camera.common.debug.LogHelper;
import com.mediatek.camera.common.debug.LogUtil;
import com.mediatek.camera.common.setting.SettingBase;
import java.util.List;
public class Volumekeys extends SettingBase {
private static final LogUtil.Tag TAG = new LogUtil.Tag(Volumekeys.class.getSimpleName());
private static final String KEY_VOLUMEKEYS= "key_volumekeys";
private VolumekeysSettingView mSettingView;
private ISettingChangeRequester mSettingChangeRequester;
@Override
public void unInit() {
}
@Override
public void postRestrictionAfterInitialized() {
}
@Override
public SettingType getSettingType() {
return SettingType.PHOTO_AND_VIDEO;
}
@Override
public String getKey() {
return KEY_VOLUMEKEYS;
}
@Override
public IParametersConfigure getParametersConfigure() {
if (mSettingChangeRequester == null) {
VolumekeysParametersConfig config = new VolumekeysParametersConfig(this, mSettingDeviceRequester);
mSettingChangeRequester = config;
}
return (VolumekeysParametersConfig)mSettingChangeRequester;
}
@Override
public ICaptureRequestConfigure getCaptureRequestConfigure() {
if (mSettingChangeRequester == null) {
VolumekeysCaptureRequestConfig config = new VolumekeysCaptureRequestConfig(this, mSettingDevice2Requester);
mSettingChangeRequester = config;
}
return (VolumekeysCaptureRequestConfig)mSettingChangeRequester;
}
@Override
public void addViewEntry() {
super.addViewEntry();
if (mSettingView == null) {
mSettingView = new VolumekeysSettingView(getKey());
}
mSettingView.setOnDataChangeListener(new VolumekeysSettingView.OnDataChangeListener() {
@Override
public void onDataChange(String value) {
LogHelper.d(TAG, "[onClick], value:" + value);
setValue(value);
mDataStore.setValue(getKey(), value, getStoreScope(), false);
mHandler.post(new Runnable() {
@Override
public void run() {
mSettingChangeRequester.sendSettingChangeRequest();
}
});
}
});
mAppUi.addSettingView(mSettingView);
mSettingView.setValue(getValue());
}
@Override
public void removeViewEntry() {
mAppUi.removeSettingView(mSettingView);
}
public void initializeValue(List<String> platformSupportedValues, String defaultValue) {
LogHelper.d(TAG, "[initializeValue], platformSupportedValues:" + platformSupportedValues
+ ", defaultValue:" + defaultValue);
if (platformSupportedValues != null) {
setSupportedPlatformValues(platformSupportedValues);
setSupportedEntryValues(platformSupportedValues);
setEntryValues(platformSupportedValues);
String value = mDataStore.getValue(getKey(), defaultValue, getStoreScope());
setValue(value);
}
}
@Override
public void refreshViewEntry() {
if (mSettingView != null) {
mSettingView.setValue(getValue());
}
}
}
|
[
"liyuchong2537631@163.com"
] |
liyuchong2537631@163.com
|
cc049cc95c9196bdaabb26e1397ddcb3bc306500
|
e4d7fa36e07cdbcb5fcb601c33dd01fbb548c244
|
/android/app/src/main/java/abi8_0_0/host/exp/exponent/modules/api/ConstantsModule.java
|
abb923452aba30ce7c103f424c691a0c046c3c55
|
[
"CC-BY-4.0",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
decebal/exponent
|
b99ef0c11c23cb363178a1a22372c28c9a3ba446
|
fefd95ee052c458b75a3c1a2e5c818ba99070752
|
refs/heads/master
| 2023-04-08T11:35:38.995397
| 2016-09-08T21:47:25
| 2016-09-08T21:47:45
| 67,743,155
| 0
| 0
|
NOASSERTION
| 2023-04-04T00:36:21
| 2016-09-08T21:57:11
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,903
|
java
|
// Copyright 2015-present 650 Industries. All rights reserved.
package abi8_0_0.host.exp.exponent.modules.api;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import android.support.annotation.Nullable;
import android.util.DisplayMetrics;
import java.util.Map;
import java.util.UUID;
import com.facebook.device.yearclass.YearClass;
import abi8_0_0.com.facebook.react.bridge.ReactApplicationContext;
import abi8_0_0.com.facebook.react.bridge.ReactContextBaseJavaModule;
import abi8_0_0.com.facebook.react.common.MapBuilder;
import org.json.JSONObject;
import javax.inject.Inject;
import host.exp.exponent.ExponentApplication;
import host.exp.exponent.ExponentManifest;
import host.exp.exponent.kernel.Kernel;
import host.exp.exponent.storage.ExponentSharedPreferences;
public class ConstantsModule extends ReactContextBaseJavaModule {
@Inject
ExponentSharedPreferences mExponentSharedPreferences;
private int mStatusBarHeight = 0;
private final Map<String, Object> mExperienceProperties;
private String mSessionId = UUID.randomUUID().toString();
private JSONObject mManifest;
private static int convertPixelsToDp(float px, Context context) {
Resources resources = context.getResources();
DisplayMetrics metrics = resources.getDisplayMetrics();
float dp = px / (metrics.densityDpi / 160f);
return (int) dp;
}
public ConstantsModule(
ReactApplicationContext reactContext,
ExponentApplication application,
Map<String, Object> experienceProperties,
JSONObject manifest) {
super(reactContext);
application.getAppComponent().inject(this);
mManifest = manifest;
if (!manifest.has(ExponentManifest.MANIFEST_STATUS_BAR_COLOR)) {
int resourceId = application.getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
int statusBarHeightPixels = application.getResources().getDimensionPixelSize(resourceId);
// Convert from pixels to dip
mStatusBarHeight = convertPixelsToDp(statusBarHeightPixels, application);
}
} else {
mStatusBarHeight = 0;
}
mExperienceProperties = experienceProperties;
}
@Override
public String getName() {
return "ExponentConstants";
}
@Nullable
@Override
public Map<String, Object> getConstants() {
Map<String, Object> constants = MapBuilder.<String, Object>of(
"sessionId", mSessionId,
"exponentVersion", Kernel.getVersionName(),
"statusBarHeight", mStatusBarHeight,
"deviceYearClass", YearClass.get(getReactApplicationContext()),
"deviceId", mExponentSharedPreferences.getOrCreateUUID(),
"deviceName", Build.MODEL,
"manifest", mManifest.toString()
);
if (mExperienceProperties != null) {
constants.putAll(mExperienceProperties);
}
return constants;
}
}
|
[
"aurora@exp.host"
] |
aurora@exp.host
|
484221160f609aaa1d73fab86b5c6683f741efa7
|
c913b42264701d0be3e4002ad81adb3c432cdd85
|
/ontrack-backend/src/main/java/net/ontrack/backend/dao/PromotionLevelDao.java
|
c29200a3148eb187fa9884d59d2ca24b833b687c
|
[
"MIT"
] |
permissive
|
joansmith1/ontrack
|
aa8fd5c6ee2ae878a79c9f6bc7a06ffd18c0087c
|
ef31174d0310a35cbb011a950e1a7d81552cf216
|
refs/heads/master
| 2021-01-10T09:52:35.844888
| 2014-09-09T16:47:46
| 2014-09-09T16:47:46
| 52,032,050
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 870
|
java
|
package net.ontrack.backend.dao;
import net.ontrack.backend.dao.model.TPromotionLevel;
import net.ontrack.core.model.Ack;
import java.util.List;
public interface PromotionLevelDao {
List<TPromotionLevel> findByBranch(int branch);
TPromotionLevel getById(int id);
int createPromotionLevel(int branch, String name, String description);
Ack updatePromotionLevel(int promotionLevelId, String name, String description);
List<TPromotionLevel> findByBuild(int build);
Ack upPromotionLevel(int promotionLevelId);
Ack downPromotionLevel(int promotionLevelId);
Ack updateImage(int promotionLevelId, byte[] image);
byte[] getImage(int id);
Ack deletePromotionLevel(int promotionLevelId);
void setAutoPromote(int promotionLevelId, boolean flag);
TPromotionLevel getByBranchAndName(int branch, String promotionLevel);
}
|
[
"damien.coraboeuf@gmail.com"
] |
damien.coraboeuf@gmail.com
|
935c0f769b806ada6d08ded50bd58c264403a318
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/11/296.java
|
276da2570fed838e1c4395f6feb86a0905b193ff
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,699
|
java
|
package <missing>;
public class GlobalMembers
{
public static void Main(String[] args)
{
int year;
int month;
int day;
int x;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
year = Integer.parseInt(tempVar);
}
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
month = Integer.parseInt(tempVar2);
}
String tempVar3 = ConsoleInput.scanfRead();
if (tempVar3 != null)
{
day = Integer.parseInt(tempVar3);
}
switch (month)
{
case 1:
x = day;
break;
case 2:
x = 31 + day;
break;
case 3:
x = 31 + 28 + day;
break;
case 4:
x = 31 + 28 + 31 + day;
break;
case 5:
x = 31 + 28 + 31 + 30 + day;
break;
case 6:
x = 31 + 28 + 31 + 30 + 31 + day;
break;
case 7:
x = 31 + 28 + 31 + 30 + 31 + 30 + day;
break;
case 8:
x = 31 + 28 + 31 + 30 + 31 + 30 + 31 + day;
break;
case 9:
x = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + day;
break;
case 10:
x = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + day;
break;
case 11:
x = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + day;
break;
case 12:
x = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + day;
break;
}
if (year % 4 == 0)
{
if (year % 100 == 0)
{
if (year % 400 == 0)
{
if (month >= 3)
{
System.out.printf("%d",x + 1);
}
else
{
System.out.printf("%d",x);
}
}
else
{
System.out.printf("%d",x);
}
}
else
{
if (month >= 3)
{
System.out.printf("%d",x + 1);
}
else
{
System.out.printf("%d",x);
}
}
}
else
{
System.out.printf("%d",x);
}
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
db741021e4dfd0afe4059473433a9bf758f74e80
|
f0590b98a4ccd97cb0e8e2afdef19a07c71e5bdd
|
/Interfaces/src/InterfaceExamples3/Cat.java
|
2ee8ca8798b74b634ddfe4f3cfa2f7cfc4d4192c
|
[] |
no_license
|
jsb5589/base
|
89ca6134ce858d9195061e6c019ce3be227f8406
|
dc7411681c2a2d5c8cbd36dc8c0b8c73406fa375
|
refs/heads/master
| 2023-07-13T12:55:13.935475
| 2021-08-22T12:51:30
| 2021-08-22T12:51:30
| 397,511,510
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 133
|
java
|
package InterfaceExamples3;
public class Cat implements Soundable {
@Override
public String sound() {
return "¾ß¿Ë";
}
}
|
[
"jsb5589@naver.com"
] |
jsb5589@naver.com
|
1fc2254ba80089666368d63c7305a9b7d8aff355
|
4dcb56032dded81baf5bc29cd48264d9804c8182
|
/src/cn/guangtong/model/ResponseModel.java
|
abaae9ed2b4094387e2aa1b5bce952145acdc08b
|
[] |
no_license
|
jammyluo/CAS_Guangtong
|
78ce690dd9bcd590627c8154b99c53135e3688bb
|
4ce259791bcd4c0ff7cbcb0c2ad1d955d31f8420
|
refs/heads/master
| 2020-03-29T08:45:36.778321
| 2017-08-18T10:14:05
| 2017-08-18T10:14:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 895
|
java
|
package cn.guangtong.model;
import java.util.List;
public class ResponseModel<T> {
private String msg = "失败";
private boolean success = false;
private List<T> obj = null;
private T t;
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public List<T> getObj() {
return obj;
}
public void setObj(List<T> obj) {
this.obj = obj;
}
public T getT() {
return t;
}
public void setT(T t) {
this.t = t;
}
public void init() {
this.msg = "失败";
this.success = false;
this.obj = null;
this.t = null;
}
@Override
public String toString() {
return "ResponseModel [msg=" + msg + ", success=" + success + ", obj=" + obj + "]";
}
}
|
[
"2398300521@qq.com"
] |
2398300521@qq.com
|
c7586c07f542317e96045794fcc13e11c920b706
|
02a35198bb883c8f58e8bdd4e72093af8b826a60
|
/src/main/java/com/asp/company/dao/EmployeeDao.java
|
1475bfaa92205f8764ff2bf33f3beafa68f05af7
|
[] |
no_license
|
presly808/CompanyTestTask
|
c3e06b709ca152a802fab5972683eb128775a3a8
|
041dd7b34411146320176d6be44411c485517263
|
refs/heads/master
| 2020-12-24T06:13:56.234503
| 2016-11-08T08:07:12
| 2016-11-08T08:07:12
| 73,163,840
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 941
|
java
|
package com.asp.company.dao;
import com.asp.company.db.AppDB;
import com.asp.company.model.Employee;
import com.asp.company.utils.generator.DataGenerationUtils;
import com.asp.company.utils.service_locator.ServiceLocator;
import java.util.Collection;
/**
* Created by serhii on 10/31/16.
*/
public class EmployeeDao implements GeneralDao<Employee,Integer> {
private AppDB appDB = ServiceLocator.getBean(AppDB.class);
@Override
public Employee getById(Integer id) {
return appDB.employeeMap.get(id);
}
@Override
public Employee create(Employee el) {
int id = DataGenerationUtils.generateId();
el.setId(id);
appDB.employeeMap.put(id,el);
return el;
}
@Override
public Employee delete(Integer id) {
return appDB.employeeMap.remove(id);
}
@Override
public Collection<Employee> getAll() {
return appDB.employeeMap.values();
}
}
|
[
"presly808@gmail.com"
] |
presly808@gmail.com
|
eb8bb31e0b20852b6227363b84504a12191fa04d
|
d84366f1868b74d986a9216e1750640f1acb0365
|
/app/src/main/java/imposo/com/application/newfeed/ImageListAdapter.java
|
7512d1a3c2be860ac0bdf26dff2ec67683e3f453
|
[] |
no_license
|
AdityaKiet/Discussion-App
|
e9e561bfae1fa6290ccd3d474e7f37cf99cf0011
|
fbd941e42bd155d6c650e3e3c417d48c63f4df9e
|
refs/heads/master
| 2020-12-26T03:10:47.232523
| 2015-11-05T14:28:31
| 2015-11-05T14:28:31
| 44,900,234
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,881
|
java
|
package imposo.com.application.newfeed;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import imposo.com.application.R;
/**
* Created by adityaagrawal on 01/11/15.
*/
public class ImageListAdapter extends BaseAdapter {
private Context context;
public ImageListAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return AddNewFeed.imageNames.size();
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
@SuppressLint("InflateParams")
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView;
rowView = mInflater.inflate(R.layout.single_row_images, null);
TextView txtOption = ((TextView) rowView.findViewById(R.id.txtOption));
txtOption.setText(AddNewFeed.imageNames.get(position));
((ImageButton)rowView.findViewById(R.id.btnDeleteOption)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AddNewFeed.imageNames.remove(position);
AddNewFeed.bitmaps.remove(position);
notifyDataSetChanged();
}
});
ImageView imageView = ((ImageView)rowView.findViewById(R.id.imgSelectedImage));
imageView.setImageBitmap(AddNewFeed.bitmaps.get(position));
return rowView;
}
}
|
[
"adityasmart786@gmail.com"
] |
adityasmart786@gmail.com
|
e2c0f586dad6a17ff302018a3f4c63b8e56ea133
|
14956dbed8ae4fba1d65b9829d9405fcf43ac698
|
/Cyber Security/Capture the Flag Competitions/2020/Cyberthon 2020/Finals/Operating Systems/(UNDONE) Meow/source_from_JADX/sources/androidx/core/view/animation/PathInterpolatorApi14.java
|
5d46d7cc775707ae9f110075ef1d022c2b9f3204
|
[] |
no_license
|
Hackin7/Programming-Crappy-Solutions
|
ae8bbddad92a48cf70976cec91bf66234c9b4d39
|
ffa3b3c26a6a06446cc49c8ac4f35b6d30b1ee0f
|
refs/heads/master
| 2023-03-21T01:21:00.764957
| 2022-12-28T14:22:33
| 2022-12-28T14:22:33
| 201,292,128
| 12
| 7
| null | 2023-03-05T16:05:34
| 2019-08-08T16:00:21
|
Roff
|
UTF-8
|
Java
| false
| false
| 2,269
|
java
|
package androidx.core.view.animation;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.view.animation.Interpolator;
class PathInterpolatorApi14 implements Interpolator {
private static final float PRECISION = 0.002f;
/* renamed from: mX */
private final float[] f28mX;
/* renamed from: mY */
private final float[] f29mY;
PathInterpolatorApi14(Path path) {
PathMeasure pathMeasure = new PathMeasure(path, false);
float length = pathMeasure.getLength();
int i = ((int) (length / PRECISION)) + 1;
this.f28mX = new float[i];
this.f29mY = new float[i];
float[] fArr = new float[2];
for (int i2 = 0; i2 < i; i2++) {
pathMeasure.getPosTan((((float) i2) * length) / ((float) (i - 1)), fArr, null);
this.f28mX[i2] = fArr[0];
this.f29mY[i2] = fArr[1];
}
}
PathInterpolatorApi14(float f, float f2) {
this(createQuad(f, f2));
}
PathInterpolatorApi14(float f, float f2, float f3, float f4) {
this(createCubic(f, f2, f3, f4));
}
public float getInterpolation(float f) {
if (f <= 0.0f) {
return 0.0f;
}
if (f >= 1.0f) {
return 1.0f;
}
int i = 0;
int length = this.f28mX.length - 1;
while (length - i > 1) {
int i2 = (i + length) / 2;
if (f < this.f28mX[i2]) {
length = i2;
} else {
i = i2;
}
}
float[] fArr = this.f28mX;
float f2 = fArr[length] - fArr[i];
if (f2 == 0.0f) {
return this.f29mY[i];
}
float f3 = (f - fArr[i]) / f2;
float[] fArr2 = this.f29mY;
float f4 = fArr2[i];
return f4 + (f3 * (fArr2[length] - f4));
}
private static Path createQuad(float f, float f2) {
Path path = new Path();
path.moveTo(0.0f, 0.0f);
path.quadTo(f, f2, 1.0f, 1.0f);
return path;
}
private static Path createCubic(float f, float f2, float f3, float f4) {
Path path = new Path();
path.moveTo(0.0f, 0.0f);
path.cubicTo(f, f2, f3, f4, 1.0f, 1.0f);
return path;
}
}
|
[
"zunmun@gmail.com"
] |
zunmun@gmail.com
|
126b5e634e9f00f5414b4dcd64880b778ace1ecf
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/DrJava/rev4989-5019/left-trunk-5019/src/edu/rice/cs/util/StreamRedirectException.java
|
47e49ab27bf66d9922967ef653733593378042cc
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 225
|
java
|
package edu.rice.cs.util;
public class StreamRedirectException extends RuntimeException {
public StreamRedirectException(String s) { super(s); }
public StreamRedirectException(String s, Throwable t) { super(s,t); }
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
a0d5c4afa885be41fb3e23c3a14b945cb14d980b
|
71cb2dd0404505e891d8d7882163fbc4e30f8d34
|
/cqliving-online/src/main/java/com/cqliving/cloud/online/order/service/OrderShopCartService.java
|
e817aff2a94f45a6ba5b2d6b4cd03ca307b695af
|
[] |
no_license
|
cenbow/fuxiaofengfugib
|
eab19ee68051753b338c3380aa499e2a96aa6ee2
|
543b909f7ce394c8f482484a7d35fa2871fecd62
|
refs/heads/master
| 2020-12-02T21:16:17.346107
| 2017-02-13T01:26:13
| 2017-02-13T01:26:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,653
|
java
|
package com.cqliving.cloud.online.order.service;
import java.util.List;
import java.util.Map;
import com.cqliving.cloud.online.order.domain.OrderShopCart;
import com.cqliving.framework.common.dao.support.PageInfo;
import com.cqliving.tool.common.Response;
/**
* 购物车 Service
* Date: 2016-11-21 21:35:52
* @author Code Generator
*/
public interface OrderShopCartService {
/** @author Code Generator *****start*****/
public Response<PageInfo<OrderShopCart>> queryForPage(PageInfo<OrderShopCart> pageInfo, Map<String, Object> map,Map<String, Boolean> orderMap);
public Response<OrderShopCart> get(Long id);
public Response<Void> delete(Long... id);
public Response<Void> save(OrderShopCart domain);
/** @author Code Generator *****end*****/
/**
* <p>Description: 加入购物车</p>
* @author Tangtao on 2016年11月29日
* @param appId
* @param sessionId
* @param token
* @param goodsId
* @param quantity
* @return
*/
Response<Boolean> add(Long appId, String sessionId, String token, Long goodsId, Integer quantity);
/**
* <p>Description: 移出购物车</p>
* @author Tangtao on 2016年11月29日
* @param appId
* @param sessionId
* @param token
* @param idList
* @return
*/
Response<Boolean> remove(Long appId, String sessionId, String token, List<Long> idList);
/**
* <p>Description: 修改购物车</p>
* @author Tangtao on 2016年11月29日
* @param appId
* @param sessionId
* @param token
* @param id
* @param goodsId
* @param quantity
* @return
*/
Response<Integer> modify(Long appId, String sessionId, String token, Long id, Long goodsId, Integer quantity);
}
|
[
"fuxiaofeng1107@163.com"
] |
fuxiaofeng1107@163.com
|
d505944ca6d9b4b697c6e38b093656b1689535ef
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_6e3c93fa17e3a6ede800a54ec7a564ce37ad4f21/CommandDeleteRifts/22_6e3c93fa17e3a6ede800a54ec7a564ce37ad4f21_CommandDeleteRifts_t.java
|
fb642d9d1143d326fad8e3a1db82c817739e1f77
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,311
|
java
|
package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import StevenDimDoors.mod_pocketDim.DimData;
import StevenDimDoors.mod_pocketDim.LinkData;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
public class CommandDeleteRifts extends DDCommandBase
{
private static CommandDeleteRifts instance = null;
private CommandDeleteRifts()
{
super("dd-???", "FIXME");
}
public static CommandDeleteRifts instance()
{
if (instance == null)
instance = new CommandDeleteRifts();
return instance;
}
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
int linksRemoved=0;
int targetDim;
boolean shouldGo= true;
if(command.length==0)
{
targetDim= sender.worldObj.provider.dimensionId;
}
else if(command.length==1)
{
targetDim = parseInt(sender, command[0]);
if(!dimHelper.dimList.containsKey(targetDim))
{
sender.sendChatToPlayer("Error- dim "+targetDim+" not registered");
shouldGo=false;
}
}
else
{
targetDim=0;
shouldGo=false;
sender.sendChatToPlayer("Error-Invalid argument, delete_links <targetDimID> or blank for current dim");
}
if(shouldGo)
{
if(dimHelper.dimList.containsKey(targetDim))
{
DimData dim = dimHelper.dimList.get(targetDim);
ArrayList<LinkData> linksInDim = dim.printAllLinkData();
for(LinkData link : linksInDim)
{
World targetWorld = dimHelper.getWorld(targetDim);
if(targetWorld==null)
{
dimHelper.initDimension(targetDim);
}
else if(targetWorld.provider==null)
{
dimHelper.initDimension(targetDim);
}
targetWorld = dimHelper.getWorld(targetDim);
if (targetWorld.getBlockId(link.locXCoord, link.locYCoord, link.locZCoord) == mod_pocketDim.blockRift.blockID)
{
dim.removeLinkAtCoords(link);
targetWorld.setBlock(link.locXCoord, link.locYCoord, link.locZCoord, 0);
linksRemoved++;
}
}
sender.sendChatToPlayer("Removed "+linksRemoved+" rifts.");
}
}
return DDCommandResult.SUCCESS; //TEMPORARY HACK
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
48f33f57c22eba32430bfdea5228f9286fa70945
|
a33aac97878b2cb15677be26e308cbc46e2862d2
|
/data/libgdx/btTranslationalLimitMotor2_setStopERP.java
|
9399d1e6a7ea1b4b23703e4c68e58dcb3ffd5ce2
|
[] |
no_license
|
GabeOchieng/ggnn.tensorflow
|
f5d7d0bca52258336fc12c9de6ae38223f28f786
|
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
|
refs/heads/master
| 2022-05-30T11:17:42.278048
| 2020-05-02T11:33:31
| 2020-05-02T11:33:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 149
|
java
|
public void setStopERP(btVector3 value) {
DynamicsJNI.btTranslationalLimitMotor2_stopERP_set(swigCPtr, this, btVector3.getCPtr(value), value);
}
|
[
"bdqnghi@gmail.com"
] |
bdqnghi@gmail.com
|
02eb46f3214ef4b0f5932d0b5becc30800c889ce
|
eb2556a43cc0a8d1c525fb21bb00d5a6158da4ad
|
/basex-core/src/main/java/org/basex/query/func/xquery/XQueryUpdate.java
|
a21882aa329306453fc3fab036c6242f45a044e0
|
[
"BSD-3-Clause"
] |
permissive
|
SirOlrac/basex
|
ee22c8336f2430ae38e962399f1cdc89c9a657d3
|
b97a3bbf961178d0c3dc8c65d389c8299fc5d517
|
refs/heads/master
| 2020-06-13T20:08:21.217244
| 2016-12-02T21:48:49
| 2016-12-02T21:48:49
| 75,557,973
| 1
| 0
| null | 2016-12-04T19:08:45
| 2016-12-04T19:08:45
| null |
UTF-8
|
Java
| false
| false
| 410
|
java
|
package org.basex.query.func.xquery;
import org.basex.query.*;
import org.basex.query.util.list.*;
/**
* Function implementation.
*
* @author BaseX Team 2005-16, BSD License
* @author Christian Gruen
*/
public final class XQueryUpdate extends XQueryEval {
@Override
protected ItemList eval(final QueryContext qc) throws QueryException {
return eval(qc, toToken(exprs[0], qc), null, true);
}
}
|
[
"christian.gruen@gmail.com"
] |
christian.gruen@gmail.com
|
f428029e375bd2495f6a09916fff6593afb8fc90
|
30b2eba9a7b563509fff637e10b8879c10657a76
|
/service/box-service/src/main/java/com/boxamazing/service/dbs/model/Dbs.java
|
0108dd6bcb6e321054f48e1d05eaf91e2f49b14d
|
[] |
no_license
|
hecj/box
|
73f60c11c293cac4a66b9b0b33ba79ff5aadfc2d
|
e59cc1cceb238b1a6d5b35ae8a98b68b7da5918f
|
refs/heads/master
| 2020-09-24T06:11:08.248173
| 2016-08-25T05:55:48
| 2016-08-25T05:55:48
| 66,528,932
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 878
|
java
|
package com.boxamazing.service.dbs.model;
import com.boxamazing.service.common.ArrayUtil;
import com.boxamazing.service.common.StringUtil;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;
/**
* 数据源管理
*/
@SuppressWarnings("serial")
public class Dbs extends Model<Dbs> {
public static final Dbs dao = new Dbs();
/**
* 基本分页方法
*/
public Page<Dbs> _page(int pn, int ps) {
return dao.paginate(pn, ps, "select *", "from dbs order by id desc");
}
/**
* 根据id删除多个对象
*
* @param ids
* @return
*/
public int deleteByIds(String... ids) {
String[] ay = ArrayUtil.getPrePareArray(ids.length);
String str = StringUtil.join(ay, ",");
return Db.update("delete from dbs where id in (" + str + ")", ids);
}
}
|
[
"275070023@qq.com"
] |
275070023@qq.com
|
fc9271268f9b45bab1905673db878358295f6146
|
b97bc0706448623a59a7f11d07e4a151173b7378
|
/src/main/java/radian/tcmis/server7/client/aerocz/servlets/AeroczCatalog.java
|
21c060a8b92292f49433310d3af93439f4f90e7f
|
[] |
no_license
|
zafrul-ust/tcmISDev
|
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
|
71418732e5465bb52a0079c7e7e7cec423a1d3ed
|
refs/heads/master
| 2022-12-21T15:46:19.801950
| 2020-02-07T21:22:50
| 2020-02-07T21:22:50
| 241,601,201
| 0
| 0
| null | 2022-12-13T19:29:34
| 2020-02-19T11:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 1,005
|
java
|
package radian.tcmis.server7.client.aerocz.servlets;
import radian.tcmis.server7.share.helpers.*;
import radian.tcmis.server7.share.servlets.*;
import radian.tcmis.server7.client.aerocz.dbObjs.*;
import radian.tcmis.server7.client.aerocz.helpers.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class AeroczCatalog extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
AeroczTcmISDBModel db = null;
try {
db = new AeroczTcmISDBModel("Aerocz",(String)request.getHeader("logon-version"));
Catalog obj = new Catalog((ServerResourceBundle) new AeroczServerResourceBundle(),db);
obj.doPost(request,response);
} catch (Exception e){
e.printStackTrace();
} finally {
db.close();
}
}
}
|
[
"julio.rivero@wescoair.com"
] |
julio.rivero@wescoair.com
|
f2105a3da74281fcb92955a6324513476a2f1aff
|
ac82c09fd704b2288cef8342bde6d66f200eeb0d
|
/projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/calculator/blackswaption/PresentValueBlackSwaptionCalculator.java
|
a21180c527a018389c392ae243da57bcdd4df529
|
[
"Apache-2.0"
] |
permissive
|
cobaltblueocean/OG-Platform
|
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
|
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
|
refs/heads/master
| 2021-08-26T00:44:27.315546
| 2018-02-23T20:12:08
| 2018-02-23T20:12:08
| 241,467,299
| 0
| 2
|
Apache-2.0
| 2021-08-02T17:20:41
| 2020-02-18T21:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,362
|
java
|
/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.provider.calculator.blackswaption;
import com.opengamma.analytics.financial.interestrate.InstrumentDerivativeVisitorAdapter;
import com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionCashFixedIbor;
import com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionPhysicalFixedIbor;
import com.opengamma.analytics.financial.interestrate.swaption.provider.SwaptionCashFixedIborBlackMethod;
import com.opengamma.analytics.financial.interestrate.swaption.provider.SwaptionPhysicalFixedIborBlackMethod;
import com.opengamma.analytics.financial.provider.description.interestrate.BlackSwaptionFlatProviderInterface;
import com.opengamma.util.money.MultipleCurrencyAmount;
/**
* Calculator of the present value as a multiple currency amount.
*/
public final class PresentValueBlackSwaptionCalculator extends InstrumentDerivativeVisitorAdapter<BlackSwaptionFlatProviderInterface, MultipleCurrencyAmount> {
/**
* The unique instance of the calculator.
*/
private static final PresentValueBlackSwaptionCalculator INSTANCE = new PresentValueBlackSwaptionCalculator();
/**
* Gets the calculator instance.
* @return The calculator.
*/
public static PresentValueBlackSwaptionCalculator getInstance() {
return INSTANCE;
}
/**
* Constructor.
*/
private PresentValueBlackSwaptionCalculator() {
}
/** Pricing method for physically-settled swaptions */
private static final SwaptionPhysicalFixedIborBlackMethod METHOD_SWT_PHYS = SwaptionPhysicalFixedIborBlackMethod.getInstance();
/** Pricing method for cash-settled swaptions */
private static final SwaptionCashFixedIborBlackMethod METHOD_SWT_CASH = SwaptionCashFixedIborBlackMethod.getInstance();
@Override
public MultipleCurrencyAmount visitSwaptionPhysicalFixedIbor(final SwaptionPhysicalFixedIbor swaption, final BlackSwaptionFlatProviderInterface black) {
return METHOD_SWT_PHYS.presentValue(swaption, black);
}
@Override
public MultipleCurrencyAmount visitSwaptionCashFixedIbor(final SwaptionCashFixedIbor swaption, final BlackSwaptionFlatProviderInterface black) {
return METHOD_SWT_CASH.presentValue(swaption, black);
}
}
|
[
"cobaltblue.ocean@gmail.com"
] |
cobaltblue.ocean@gmail.com
|
18f0e1f82c319a0c89efcb5d4203432d8ca1e58f
|
4a792164bb48551ca85fff85848ef10ec1cdd24f
|
/src/test/java/Chapter5/SingletonTest.java
|
b236d1aa5b5a9e0883691db2ae39571b7d814ac5
|
[] |
no_license
|
JakoetTH/Chapter5
|
aa0cc8daf3965f4ee5596a05b0cb393f20eed1ca
|
f4dd6198f9c2d0e9f14d849a2d61936cf683fedc
|
refs/heads/master
| 2016-09-01T18:13:54.629559
| 2015-03-13T21:22:36
| 2015-03-13T21:22:36
| 32,147,745
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 779
|
java
|
package Chapter5;
import Chapter5.Config.SpringConfig;
import Chapter5.Impl.Singleton.Singleton;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
public class SingletonTest {
private ApplicationContext ctx;
private Singleton singleton;
@Before
public void setUp()
{
ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
singleton = (Singleton)ctx.getBean("SingletonBean");
}
@Test
public void testSingleton()
{
Assert.assertEquals("Hello",singleton.sayHello());
}
@After
public void tearDown()
{
}
}
|
[
"thawhirwow@gmail.com"
] |
thawhirwow@gmail.com
|
e2f18b47c85c582bc43fb5e62028034a1c9a8fd1
|
125c28aac7c3882070de0e5a636fb37134930002
|
/core/src/main/java/org/yes/cart/shoppingcart/impl/ShoppingCartCommandConfigurationDefaultAddressVisitorImpl.java
|
0cebbf55afd903c724675fac4a27e0072504ac31
|
[
"Apache-2.0"
] |
permissive
|
hacklock/yes-cart
|
870480e4241cc0ee7611690cbe57901407c6dc59
|
cf2ef25f5e2db0bdcdc396415b3b23d97373185b
|
refs/heads/master
| 2020-12-01T01:05:35.891105
| 2019-12-24T18:19:25
| 2019-12-24T18:19:25
| 230,528,192
| 1
| 0
|
Apache-2.0
| 2019-12-27T22:42:23
| 2019-12-27T22:42:22
| null |
UTF-8
|
Java
| false
| false
| 4,235
|
java
|
/*
* Copyright 2009 Denys Pavlov, Igor Azarnyi
*
* 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.yes.cart.shoppingcart.impl;
import org.yes.cart.domain.entity.Address;
import org.yes.cart.domain.entity.Customer;
import org.yes.cart.domain.entity.Shop;
import org.yes.cart.service.domain.ShopService;
import org.yes.cart.shoppingcart.CustomerResolver;
import org.yes.cart.shoppingcart.MutableOrderInfo;
import org.yes.cart.shoppingcart.MutableShoppingCart;
import org.yes.cart.shoppingcart.MutableShoppingContext;
/**
* User: denispavlov
* Date: 03/02/2017
* Time: 11:15
*/
public class ShoppingCartCommandConfigurationDefaultAddressVisitorImpl extends ShoppingCartCommandConfigurationCustomerTypeVisitorImpl {
public ShoppingCartCommandConfigurationDefaultAddressVisitorImpl(final CustomerResolver customerResolver,
final ShopService shopService) {
super(customerResolver, shopService);
}
@Override
public void visit(final MutableShoppingCart cart, final Object... args) {
final Customer customer = determineCustomer(cart);
final Shop shop = determineShop(cart);
if (customer == null || shop == null) {
return;
}
final Shop customerShop = determineCustomerShop(cart);
final Address delivery = getCustomerDefaultAddress(customerShop, customer, Address.ADDR_TYPE_SHIPPING);
final Address billing = getCustomerDefaultAddress(customerShop, customer, Address.ADDR_TYPE_BILLING);
Address pricingAddress = null;
final MutableOrderInfo info = cart.getOrderInfo();
final MutableShoppingContext ctx = cart.getShoppingContext();
final String customerType = ensureCustomerType(cart);
final boolean forceSeparateAddresses = customerShop.isSfShowSameBillingAddressDisabledTypes(customerType);
info.setSeparateBillingAddressEnabled(forceSeparateAddresses);
if (forceSeparateAddresses) {
info.setSeparateBillingAddress(true);
}
if (!info.isDeliveryAddressNotRequired() && delivery != null &&
shop.getSupportedShippingCountriesAsList().contains(delivery.getCountryCode())) {
info.setDeliveryAddressId(delivery.getAddressId());
pricingAddress = delivery;
}
if (!info.isBillingAddressNotRequired() && (delivery != null || billing != null)) {
if (billing != null &&
shop.getSupportedBillingCountriesAsList().contains(billing.getCountryCode())) {
info.setBillingAddressId(billing.getAddressId());
pricingAddress = billing;
} else if (delivery != null &&
shop.getSupportedBillingCountriesAsList().contains(delivery.getCountryCode())) {
info.setBillingAddressId(delivery.getAddressId());
}
}
if (pricingAddress != null) {
ctx.setCountryCode(pricingAddress.getCountryCode());
ctx.setStateCode(pricingAddress.getStateCode());
} else {
ctx.setCountryCode(null);
ctx.setStateCode(null);
}
}
/**
* Get default customer address for this shop.
*
* @param customerShop shop
* @param customer customer
* @param addrType type of address
*
* @return address to use
*/
protected Address getCustomerDefaultAddress(final Shop customerShop, final Customer customer, final String addrType) {
if (customer == null || customerShop == null) {
return null;
}
return customer.getDefaultAddress(addrType);
}
}
|
[
"denis.v.pavlov@gmail.com"
] |
denis.v.pavlov@gmail.com
|
c8348b0a352e69639b8b3d4a564d55a20b49b60d
|
40426d7fc13d36c7be0ff4c29bfc432d799d98af
|
/extra/old/pat/gui/Controller.java
|
067dc5ea56232e8aac7a3660675d513fb24e425e
|
[] |
no_license
|
linstar4067/khepera-1
|
72c033f679552709195857ec1cef963131b7ea2f
|
1fc8e8c61ee3e3179fd2b4494200686ee79728a9
|
refs/heads/master
| 2021-01-13T13:38:51.433853
| 2016-10-22T11:39:26
| 2016-10-22T11:39:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,036
|
java
|
package old.pat.gui;
import java.util.ArrayList;
import old.pat.etc.Coord;
import old.pat.etc.AbstractController.RobotState;
public class Controller {
private RobotFrame robotFrame;
private ArrayList<StatusView> statusViews;
private StatusModel statusModel;
public Controller() {
statusViews = new ArrayList<StatusView>();
statusModel = new StatusModel();
robotFrame = new RobotFrame(this);
}
public void drawRobotTail(Coord normalized, RobotState state) {
robotFrame.drawRobotTail(normalized, state);
}
public void direction(double directionInRadians) {
robotFrame.direction(directionInRadians);
}
public void drawSomething(Coord normalized) {
robotFrame.drawSomething(normalized);
}
// MVC happens here
public void setStatus(String s, int i) {
statusModel.setStatus(s, i);
for (StatusView view : statusViews) {
view.setStatus(statusModel.getStatus(i), i);
}
}
public void addStatusView(StatusView statusView) {
statusViews.add(statusView);
}
}
|
[
"mail@habitats.no"
] |
mail@habitats.no
|
8fded9fc2d4eed483351b068848917006174be72
|
c46277fde6be27512220f17c159b3d759e8cf6b6
|
/src/main/java/com/lexicalscope/dafny/dafnyserverui/ServerOutputParser.java
|
aa7fde0e84bb223695b3fa9bcfc7d409133a03a4
|
[] |
no_license
|
lexicalscope/dafnyserverui
|
b14e10fa3de0780a35b17ff1b1194a1ede65791d
|
6f52665e75234eba13b91e7fd560c7259688fb65
|
refs/heads/master
| 2021-01-10T08:40:42.740647
| 2015-12-11T00:13:35
| 2015-12-11T00:13:35
| 47,519,364
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,068
|
java
|
package com.lexicalscope.dafny.dafnyserverui;
import static java.lang.Integer.parseInt;
import java.util.ArrayList;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ServerOutputParser implements ServerOutputListener {
private final List<ServerEventListener> listeners = new ArrayList<>();
private final String filename;
public ServerOutputParser(final String filename) {
this.filename = filename;
}
@Override public void outputLine(final String line) {
if(line.startsWith(filename)) {
fire(parseLogLine(line));
} else if (line.startsWith(">>>")) {
fire(parseTimeLine(line.substring(">>> ".length())));
} else if (line.startsWith("Verifying ")) {
fire(parseVerifyingLine(line.substring("Verifying ".length())));
} else if (line.startsWith("Retrieving cached verification result for implementation ")) {
fire(parseCachedLine(line.substring("Retrieving cached verification result for implementation ".length())));
} else if (line.startsWith(" [") && line.endsWith(" verified")) {
fire(parseVerifiedLine(line.substring(" ".length(), line.length() - " verified".length())));
} else if (line.startsWith(" [") && line.endsWith(" error")) {
fire(parseFailedLine(line.substring(" ".length(), line.length() - " error".length())));
} else if (line.equals("Verification completed successfully!")) {
fire(l -> l.verficationCompleted());
} else if (line.equals("[SUCCESS] [[DAFNY-SERVER: EOM]]")) {
fire(l -> l.eom());
} else if (line.equals("")) {
fire(l -> l.blankLine());
} else {
fire(l -> l.unrecognised(line));
}
}
private Consumer<ServerEventListener> parseVerifiedLine(final String line) {
return parseVerifiedLine(line, (l, proofObligations) -> l.verifed(proofObligations));
}
private Consumer<ServerEventListener> parseFailedLine(final String line) {
return parseVerifiedLine(line, (l, proofObligations) -> l.failed(proofObligations));
}
private final Pattern verifiedLinePattern = Pattern.compile("\\[(\\d+) proof obligations?\\]");
private Consumer<ServerEventListener> parseVerifiedLine(final String line, final BiConsumer<ServerEventListener, Integer> listener) {
final Matcher matcher = verifiedLinePattern.matcher(line);
if(matcher.matches()) {
final int proofObligations = parseInt(matcher.group(1));
return l -> listener.accept(l, proofObligations);
}
return l -> {};
}
private Consumer<ServerEventListener> parseCachedLine(final String line) {
return parseProcedureIdentity(line, (l,id) -> l.cached(id.verificationType, id.module, id.procedure));
}
private Consumer<ServerEventListener> parseVerifyingLine(final String line) {
return parseProcedureIdentity(line, (l,id) -> l.verifying(id.verificationType, id.module, id.procedure));
}
private final class ProcedureId {VerificationType verificationType; String module; String procedure;}
private final Pattern verifyingLinePattern = Pattern.compile("(.+?)\\$\\$_module.__([^\\.]+).(.+?) ?\\.{3}");
private Consumer<ServerEventListener> parseProcedureIdentity(final String line, final BiConsumer<ServerEventListener, ProcedureId> listener) {
final Matcher matcher = verifyingLinePattern.matcher(line);
if(matcher.matches()) {
final ProcedureId procedureId = new ProcedureId();
final String verificationTypeString = matcher.group(1);
procedureId.module = matcher.group(2);
procedureId.procedure = matcher.group(3);
switch(verificationTypeString) {
case "CheckWellformed": procedureId.verificationType = VerificationType.CheckWellformed; break;
case "Impl": procedureId.verificationType = VerificationType.Impl; break;
default: procedureId.verificationType = VerificationType.Unknown; break;
}
return l -> listener.accept(l, procedureId);
}
return l -> {};
}
/*
* bookend = sw1tch(bookendString,
* d3fault(TimingBookend.Unknown)
* kase("Starting", TimingBookend.Starting),
* kase("Finished", TimingBookend.Finished));
*/
private final Pattern timeLinePattern = Pattern.compile("(\\w+) (.*?) \\[(\\d+)\\.(\\d{7})? s\\]");
private Consumer<ServerEventListener> parseTimeLine(final String line) {
final Matcher matcher = timeLinePattern.matcher(line);
if(matcher.matches()) {
final String bookendString = matcher.group(1);
final String eventString = matcher.group(2);
final long seconds = Long.parseLong(matcher.group(3));
final long hunderedNanoseconds = matcher.group(4) == null ? 0L : Long.parseLong(matcher.group(4));
final TimingBookend bookend;
switch(bookendString) {
case "Starting": bookend = TimingBookend.Starting; break;
case "Finished": bookend = TimingBookend.Finished; break;
default: bookend = TimingBookend.Unknown; break;
}
final TimingEvent event;
switch(eventString) {
case "resolution": event = TimingEvent.Resolution; break;
case "typechecking": event = TimingEvent.Typechecking; break;
case "abstract interpretation": event = TimingEvent.AbstractInterpretation; break;
case "implementation verification": event = TimingEvent.ImplementationVerification; break;
case "live variable analysis": event = TimingEvent.LiveVariableAnalysis; break;
default: event = TimingEvent.Unknown; break;
}
return l -> l.time(bookend, event, (seconds*1000*1000*10) + hunderedNanoseconds);
}
return l -> {};
}
private final Pattern logLinePattern = Pattern.compile("\\((\\d+),(\\d+)\\): ([^:]+): (.*)");
private Consumer<ServerEventListener> parseLogLine(final String line) {
final Matcher matcher = logLinePattern.matcher(line.substring(filename.length()));
if(matcher.matches()) {
final String lineNumber = matcher.group(1);
final String columnNumber = matcher.group(2);
final String level = matcher.group(3);
final String message = matcher.group(4);
return l -> l.log(filename, parseInt(lineNumber), parseInt(columnNumber), level, message);
}
return l -> {};
}
private void fire(final Consumer<ServerEventListener> event) {
listeners.forEach(event);
}
public void add(final ServerEventListener preprocessedServerOutputListener) {
listeners.add(preprocessedServerOutputListener);
}
}
|
[
"lexicalscope@gmail.com"
] |
lexicalscope@gmail.com
|
e3a122565b9b2f44c6c13aac78199d3c45f4d6ce
|
e8cd24201cbfadef0f267151ea5b8a90cc505766
|
/group12/282742732/learning_1/src/com/coding/basic/IteratorLinkedList.java
|
29209fd9093452566f75867b9f490db239c6bdbc
|
[] |
no_license
|
XMT-CN/coding2017-s1
|
30dd4ee886dd0a021498108353c20360148a6065
|
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
|
refs/heads/master
| 2021-01-21T21:38:42.199253
| 2017-06-25T07:44:21
| 2017-06-25T07:44:21
| 94,863,023
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 446
|
java
|
package com.coding.basic;
import com.coding.basic.LinkedList.Node;
public class IteratorLinkedList implements Iterator{
Node node ;
public IteratorLinkedList(Node node){
this.node = node;
}
@Override
public boolean hasNext() {
if (node == null) {
return false;
}
return true;
}
@Override
public Object next() {
Object obj = this.node.data;
node = node.next;
return obj;
}
}
|
[
"542194147@qq.com"
] |
542194147@qq.com
|
ac6bd46a44d939d355cbced66477daf6f0890234
|
616e54ed1ab3e93ad86f588b9680ab5be4e2628b
|
/src/main/java/irille/wx/wa/WaActItem.java
|
71d62590f2a88e4e093c89f09e1db5d604c0d043
|
[] |
no_license
|
yingjianhua/srdz
|
e23a278e910ecd5db05d68a1861b210400bda453
|
ad491710c4bc48b5d0000561d5971ffd61c9ccdc
|
refs/heads/master
| 2020-04-16T02:08:15.813060
| 2017-01-09T13:14:02
| 2017-01-09T13:14:02
| 61,923,381
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,244
|
java
|
package irille.wx.wa;
import irille.pub.Log;
import irille.pub.bean.BeanInt;
import irille.pub.inf.IExtName;
import irille.pub.tb.Fld;
import irille.pub.tb.IEnumFld;
import irille.pub.tb.Tb;
import irille.pub.tb.Tb.Index;
import irille.wx.wa.WaActDo.T;
import irille.wx.wx.WxAccount;
public class WaActItem extends BeanInt<WaActItem> implements IExtName{
private static final Log LOG = new Log(WaActItem.class);
public static final Tb TB = new Tb(WaActItem.class, "奖项设置").setAutoIncrement().addActIUDL();
public enum T implements IEnumFld {// @formatter:off
PKEY(TB.crtIntPkey()),//主键
NAME(SYS.NAME__100,"奖项名称"),//奖项名称
ACCOUNT(WxAccount.fldOutKey()),//公众账号
ROW_VERSION(SYS.ROW_VERSION),
//>>>以下是自动产生的源代码行--内嵌字段定义--请保留此行用于识别>>>
//<<<以上是自动产生的源代码行--内嵌字段定义--请保留此行用于识别<<<
;
//>>>以下是自动产生的源代码行--自动建立的索引定义--请保留此行用于识别>>>
//<<<以上是自动产生的源代码行--自动建立的索引定义--请保留此行用于识别<<<
// 索引
public static final Index IDX_NAME_ACCOUNT = TB.addIndex("nameAccount", true,T.NAME,T.ACCOUNT);
private Fld _fld;
private T(Class clazz, String name, boolean... isnull) {
_fld = TB.addOutKey(clazz, this, name, isnull);
}
private T(IEnumFld fld, boolean... isnull) {
this(fld, null, isnull);
}
private T(IEnumFld fld, String name, boolean... null1) {
_fld = TB.add(fld, this, name, null1);
}
private T(IEnumFld fld, String name, int strLen) {
_fld = TB.add(fld, this, name, strLen);
}
private T(Fld fld) {
_fld = TB.add(fld,this);
}
public Fld getFld() {
return _fld;
}
}
static { // 在此可以加一些对FLD进行特殊设定的代码
T.PKEY.getFld().getTb().lockAllFlds();// 加锁所有字段,不可以修改
}
//@formatter:on
public static Fld fldOutKey() {
return fldOutKey(TB.getCodeNoPackage(), TB.getShortName());
}
public static Fld fldOutKey(String code, String name) {
return Tb.crtOutKey(TB, code, name);
}
@Override
public String getExtName() {
return getName();
}
//>>>以下是自动产生的源代码行--源代码--请保留此行用于识别>>>
//实例变量定义-----------------------------------------
private Integer _pkey; // 编号 INT
private String _name; // 奖项名称 STR(100)
private Integer _account; // 公众帐号 <表主键:WxAccount> INT
private Short _rowVersion; // 版本 SHORT
@Override
public WaActItem init(){
super.init();
_name=null; // 奖项名称 STR(100)
_account=null; // 公众帐号 <表主键:WxAccount> INT
_rowVersion=0; // 版本 SHORT
return this;
}
//方法----------------------------------------------
public static WaActItem loadUniqueNameAccount(boolean lockFlag,String name,Integer account) {
return (WaActItem)loadUnique(T.IDX_NAME_ACCOUNT,lockFlag,name,account);
}
public static WaActItem chkUniqueNameAccount(boolean lockFlag,String name,Integer account) {
return (WaActItem)chkUnique(T.IDX_NAME_ACCOUNT,lockFlag,name,account);
}
public Integer getPkey(){
return _pkey;
}
public void setPkey(Integer pkey){
_pkey=pkey;
}
public String getName(){
return _name;
}
public void setName(String name){
_name=name;
}
public Integer getAccount(){
return _account;
}
public void setAccount(Integer account){
_account=account;
}
public WxAccount gtAccount(){
if(getAccount()==null)
return null;
return (WxAccount)get(WxAccount.class,getAccount());
}
public void stAccount(WxAccount account){
if(account==null)
setAccount(null);
else
setAccount(account.getPkey());
}
public Short getRowVersion(){
return _rowVersion;
}
public void setRowVersion(Short rowVersion){
_rowVersion=rowVersion;
}
//<<<以上是自动产生的源代码行--源代码--请保留此行用于识别<<<
}
|
[
"a86291151@163.com"
] |
a86291151@163.com
|
881779af8208fd1d1467025fe87744f576794d70
|
385340c9e6ecd942b01d20e335307c1462ecb1b5
|
/TeraGame/src/main/java/com/angelis/tera/game/network/packet/server/SM_USER_SETTINGS_LOAD.java
|
8f6b0a8020cbc71c0951b42809ff1de126373f4c
|
[] |
no_license
|
simon96523/jenova-project
|
2beefdff505458df523da94a6fa51b823d6f0186
|
07169c83790188eb82ad34352a34fb5cb8e7fdf6
|
refs/heads/master
| 2021-01-15T23:20:55.970410
| 2014-07-16T13:31:08
| 2014-07-16T13:31:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 637
|
java
|
package com.angelis.tera.game.network.packet.server;
import java.nio.ByteBuffer;
import com.angelis.tera.game.models.player.Player;
import com.angelis.tera.game.network.connection.TeraGameConnection;
import com.angelis.tera.game.network.packet.TeraServerPacket;
public class SM_USER_SETTINGS_LOAD extends TeraServerPacket {
private final Player player;
public SM_USER_SETTINGS_LOAD(final Player player) {
this.player = player;
}
@Override
protected void writeImpl(final TeraGameConnection connection, final ByteBuffer byteBuffer) {
writeB(byteBuffer, this.player.getUserSettings());
}
}
|
[
"mm.chyla@gmail.com"
] |
mm.chyla@gmail.com
|
1017df40c97f60579803a135ecc1465803f488a7
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/domain/AlipayUserBenefitEditModel.java
|
e44564fa93a682446af3556a7e3c78c2985f5362
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,339
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 蚂蚁会员合作权益编辑接口
*
* @author auto create
* @since 1.0, 2020-08-17 21:21:10
*/
public class AlipayUserBenefitEditModel extends AlipayObject {
private static final long serialVersionUID = 3771291749683599551L;
/**
* 权益专区码,在创建权益前应该先向蚂蚁会员平台申请一个合适的专区码。 专区必须存在。
*/
@ApiField("benefit_area_code")
private String benefitAreaCode;
/**
* 权益图标地址
*/
@ApiField("benefit_icon_url")
private String benefitIconUrl;
/**
* 权益的ID
*/
@ApiField("benefit_id")
private String benefitId;
/**
* 权益的名称
*/
@ApiField("benefit_name")
private String benefitName;
/**
* 是否将权益的名称用作专区的副标题, 若为true,则会使用该权益的名称自动覆盖所属专区的副标题(暂未实现)
*/
@ApiField("benefit_name_as_area_subtitle")
private String benefitNameAsAreaSubtitle;
/**
* 权益详情页面地址
*/
@ApiField("benefit_page_url")
private String benefitPageUrl;
/**
* 权益兑换消耗的积分数(修改时必填,防止默认不传的时候被修改成0)
*/
@ApiField("benefit_point")
private Long benefitPoint;
/**
* 权益使用场景索引ID,接入时需要咨询@田豫如何取值
*/
@ApiField("benefit_rec_biz_id")
private String benefitRecBizId;
/**
* 支付宝商家券 ALIPAY_MERCHANT_COUPON
口碑商家券 KOUBEI_MERCHANT_COUPON
花呗分期免息券 HUABEI_FENQI_FREE_INTEREST_COUP
淘系通用券 TAOBAO_COMMON_COUPON
淘系商家券 TAOBAO_MERCHANT_COUPON
国际线上商家券 INTER_ONLINE_MERCHANT_COUPON
国际线下商家券 INTER_OFFLINE_MERCHANT_COUPON
通用商户权益 COMMON_MERCHANT_GOODS
其它 OTHERS, 接入是需要咨询@田豫如何选值
*/
@ApiField("benefit_rec_type")
private String benefitRecType;
/**
* 权益的副标题,用于补充描述权益
*/
@ApiField("benefit_subtitle")
private String benefitSubtitle;
/**
* 支付宝的营销活动id,若不走支付宝活动,则不需要填
*/
@ApiField("camp_id")
private String campId;
/**
* primary,golden,platinum,diamond分别对应大众、黄金、铂金、钻石会员等级。eligible_grade属性用于限制能够兑换当前权益的用户等级,用户必须不低于配置的等级才能进行兑换。如果没有等级要求,则不要填写该字段。
*/
@ApiField("eligible_grade")
private String eligibleGrade;
/**
* 权益展示结束时间,填如自January 1, 1970, 00:00:00 GMT到目标时间的毫秒数,参考(new Date()).getTime()
*/
@ApiField("end_time")
private String endTime;
/**
* 兑换规则以及不满足该规则后给用户的提示文案,规则id和文案用:分隔;可配置多个,多个之间用,分隔。(分隔符皆是英文半角字符)规则id联系蚂蚁会员pd或运营提供
*/
@ApiField("exchange_rule_ids")
private String exchangeRuleIds;
/**
* 该权益对应每个等级会员的兑换折扣。等级和折扣用:分隔,多组折扣规则用:分隔。折扣0~1。分隔符皆为英文半角字符
*/
@ApiField("grade_discount")
private String gradeDiscount;
/**
* 权益展示起始时间,填如自January 1, 1970, 00:00:00 GMT到目标时间的毫秒数,参考(new Date()).getTime()
*/
@ApiField("start_time")
private String startTime;
public String getBenefitAreaCode() {
return this.benefitAreaCode;
}
public void setBenefitAreaCode(String benefitAreaCode) {
this.benefitAreaCode = benefitAreaCode;
}
public String getBenefitIconUrl() {
return this.benefitIconUrl;
}
public void setBenefitIconUrl(String benefitIconUrl) {
this.benefitIconUrl = benefitIconUrl;
}
public String getBenefitId() {
return this.benefitId;
}
public void setBenefitId(String benefitId) {
this.benefitId = benefitId;
}
public String getBenefitName() {
return this.benefitName;
}
public void setBenefitName(String benefitName) {
this.benefitName = benefitName;
}
public String getBenefitNameAsAreaSubtitle() {
return this.benefitNameAsAreaSubtitle;
}
public void setBenefitNameAsAreaSubtitle(String benefitNameAsAreaSubtitle) {
this.benefitNameAsAreaSubtitle = benefitNameAsAreaSubtitle;
}
public String getBenefitPageUrl() {
return this.benefitPageUrl;
}
public void setBenefitPageUrl(String benefitPageUrl) {
this.benefitPageUrl = benefitPageUrl;
}
public Long getBenefitPoint() {
return this.benefitPoint;
}
public void setBenefitPoint(Long benefitPoint) {
this.benefitPoint = benefitPoint;
}
public String getBenefitRecBizId() {
return this.benefitRecBizId;
}
public void setBenefitRecBizId(String benefitRecBizId) {
this.benefitRecBizId = benefitRecBizId;
}
public String getBenefitRecType() {
return this.benefitRecType;
}
public void setBenefitRecType(String benefitRecType) {
this.benefitRecType = benefitRecType;
}
public String getBenefitSubtitle() {
return this.benefitSubtitle;
}
public void setBenefitSubtitle(String benefitSubtitle) {
this.benefitSubtitle = benefitSubtitle;
}
public String getCampId() {
return this.campId;
}
public void setCampId(String campId) {
this.campId = campId;
}
public String getEligibleGrade() {
return this.eligibleGrade;
}
public void setEligibleGrade(String eligibleGrade) {
this.eligibleGrade = eligibleGrade;
}
public String getEndTime() {
return this.endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getExchangeRuleIds() {
return this.exchangeRuleIds;
}
public void setExchangeRuleIds(String exchangeRuleIds) {
this.exchangeRuleIds = exchangeRuleIds;
}
public String getGradeDiscount() {
return this.gradeDiscount;
}
public void setGradeDiscount(String gradeDiscount) {
this.gradeDiscount = gradeDiscount;
}
public String getStartTime() {
return this.startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
7c550ba2001b3081fc619e95db21a218b59e9d5a
|
9e500c509848f3253370a79ff7825dd08453ecd8
|
/src/main/java/daggerok/messaging/rabbit/MessagingRabbitApplication.java
|
dd96ede842377b8b2d4edaca261d0cf2fdc2f5e2
|
[] |
no_license
|
dalalsunil1986/rabbit-boot
|
ea5a9670b7d83f3680e130542342566858cf556f
|
2c9318400e0e32198bf8c1f9b1c49b8f275e6790
|
refs/heads/master
| 2020-06-16T12:14:59.692775
| 2018-10-06T01:35:59
| 2018-10-06T01:35:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 562
|
java
|
package daggerok.messaging.rabbit;
import daggerok.messaging.rabbit.config.MessagingRabbitApplicationConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
@SpringBootApplication
@Import(MessagingRabbitApplicationConfig.class)
public class MessagingRabbitApplication {
public static void main(String[] args) {
SpringApplication.run(MessagingRabbitApplication.class, args)
.registerShutdownHook();
}
}
|
[
"hendisantika@gmail.com"
] |
hendisantika@gmail.com
|
6dba585ad82d0d9261b77b2ada7f0a5643b7d436
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_b7bfdbe6e62daad1e633007ef3db8a694db1f694/PAErieCountyAParserTest/11_b7bfdbe6e62daad1e633007ef3db8a694db1f694_PAErieCountyAParserTest_t.java
|
776237d42bcc86bcf809984faa860bc92f1dae5b
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,837
|
java
|
package net.anei.cadpage.parsers.PA;
import net.anei.cadpage.parsers.BaseParserTest;
import net.anei.cadpage.parsers.PA.PAErieCountyAParserTest;
import org.junit.Test;
public class PAErieCountyAParserTest extends BaseParserTest {
public PAErieCountyAParserTest() {
setParser(new PAErieCountyAParser(), "ERIE COUNTY", "PA");
}
@Test
public void testParser() {
doTest("T1",
"ERIE911:69D6 >STRUC FIRE-SINGLE RESIDENTIAL 8165 PLATZ RD XS: MARKET RD FAIRVIEW TWP LIST JOHN C Map:2034 Grids:, Cad: 2011-0000044804",
"SRC:ERIE911",
"CALL:STRUC FIRE-SINGLE RESIDENTIAL",
"ADDR:8165 PLATZ RD",
"X:MARKET RD",
"NAME:LIST JOHN C",
"CITY:FAIRVIEW TWP",
"MAP:2034",
"ID:2011-0000044804");
doTest("T2",
"ERIE911:55B2P >ELEC HAZ/PWR REPT DISCONNECTED 7656 MAPLE DR XS: CHESTNUT ST FAIRVIEW TWP MUSANTE, JANET Map:2202 Grids:, Cad: 2011-0000045114",
"SRC:ERIE911",
"CALL:ELEC HAZ/PWR REPT DISCONNECTED",
"ADDR:7656 MAPLE DR",
"X:CHESTNUT ST",
"NAME:MUSANTE, JANET",
"CITY:FAIRVIEW TWP",
"MAP:2202",
"ID:2011-0000045114");
doTest("T3",
"ERIE911:29B4 >MVA - UNKNOWN STATUS 17 I 90 EB XS: I 90 EB RAMP EXIT 16 FAIRVIEW TWP LORD, ISAAC Map:1888 Grids:, Cad: 2011-0000043981",
"SRC:ERIE911",
"CALL:MVA - UNKNOWN STATUS",
"ADDR:17 I 90 EB",
"X:I 90 EB RAMP EXIT 16",
"NAME:LORD, ISAAC",
"CITY:FAIRVIEW TWP",
"MAP:1888",
"ID:2011-0000043981");
doTest("T4",
"ERIE911:29B4 >MVA - UNKNOWN STATUS W LAKE RD&WHITEHALL PL XS: LORD RD FAIRVIEW TWP WOOD, RODNEY Cad: 2011-0000042496",
"SRC:ERIE911",
"CALL:MVA - UNKNOWN STATUS",
"ADDR:W LAKE RD & WHITEHALL PL",
"X:LORD RD",
"CITY:FAIRVIEW TWP",
"NAME:WOOD, RODNEY",
"ID:2011-0000042496");
doTest("T5",
"ERIE911:69D6 >STRUC FIRE-SINGLE RESIDENTIAL 6683 OTTEN CT FAIRVIEW TESTI JULIE Cad: 2011-00000399770",
"SRC:ERIE911",
"CALL:STRUC FIRE-SINGLE RESIDENTIAL",
"ADDR:6683 OTTEN CT",
"CITY:FAIRVIEW",
"NAME:TESTI JULIE",
"ID:2011-00000399770");
doTest("T6",
"ERIE911:52C3G >FIRE/GENERAL ALARM-COMM STRUC 7301 KLIER DR XS: UNFAIRVIEW FAIRVIEW TWP DAN Map:2302 Grids:, Cad: 2011-0000040143",
"SRC:ERIE911",
"CALL:FIRE/GENERAL ALARM-COMM STRUC",
"ADDR:7301 KLIER DR",
"X:UNFAIRVIEW",
"NAME:DAN",
"MAP:2302",
"CITY:FAIRVIEW TWP",
"ID:2011-0000040143");
doTest("T7",
"ERIE911:10D4 >CHEST PAIN 5757 W RIDGE RD XS: MILLFAIR RD FAIRVIEW TWP NICOLE Map:1988 Grids:, Cad: 2011-0000047247",
"SRC:ERIE911",
"CALL:CHEST PAIN",
"ADDR:5757 W RIDGE RD",
"X:MILLFAIR RD",
"NAME:NICOLE",
"MAP:1988",
"CITY:FAIRVIEW TWP",
"ID:2011-0000047247");
doTest("T8",
"ERIE911:17D3 >FALLS 7648 WELCANA DR XS: LYNANN LN FAIRVIEW TWP SANDELL, CECELIA Map:2213 Grids:, Cad: 2011-0000047240",
"SRC:ERIE911",
"CALL:FALLS",
"ADDR:7648 WELCANA DR",
"X:LYNANN LN",
"NAME:SANDELL, CECELIA",
"MAP:2213",
"CITY:FAIRVIEW TWP",
"ID:2011-0000047240");
doTest("T9",
"ERIE911:26A1 >SICK PERSON 8300 W RIDGE RD XS: DOBLER RD FAIRVIEW TWP WIECZOREK, BOB Map:2185 Grids:, Cad: 2011-0000046184",
"SRC:ERIE911",
"CALL:SICK PERSON",
"ADDR:8300 W RIDGE RD",
"X:DOBLER RD",
"NAME:WIECZOREK, BOB",
"MAP:2185",
"CITY:FAIRVIEW TWP",
"ID:2011-0000046184");
doTest("T10",
"ERIE911:13A1 >DIABETIC PROBLEMS 8475 MIDDLE RD XS: BLAIR RD FAIRVIEW TWP SEAN Map:2174 Grids:, Cad: 2011-0000046843",
"SRC:ERIE911",
"CALL:DIABETIC PROBLEMS",
"ADDR:8475 MIDDLE RD",
"X:BLAIR RD",
"NAME:SEAN",
"MAP:2174",
"CITY:FAIRVIEW TWP",
"ID:2011-0000046843");
doTest("T11",
"ERIE911:52B1H >RES (SINGLE) HEAT DETECTOR 1530 TAYLOR RIDGE CT FAIRVIEW TWP ADT/DIONNA Map:2540 Grids:, Cad: 2011-0000046825",
"SRC:ERIE911",
"CALL:RES (SINGLE) HEAT DETECTOR",
"ADDR:1530 TAYLOR RIDGE CT",
"NAME:ADT / DIONNA",
"MAP:2540",
"CITY:FAIRVIEW TWP",
"ID:2011-0000046825");
doTest("T12",
"ERIE911:6C1 >BREATHING PROBLEMS 817 POTOMAC AVE XS: W LAKE RD MILLCREEK TWP WATTS, BETTY Map:9214 Grids:, Cad: 2011-0000076275",
"SRC:ERIE911",
"CALL:BREATHING PROBLEMS",
"ADDR:817 POTOMAC AVE",
"X:W LAKE RD",
"NAME:WATTS, BETTY",
"MAP:9214",
"CITY:MILLCREEK TWP",
"ID:2011-0000076275");
doTest("T13",
"ERIE911:HASKINS RD IS NOW OPEN",
"SRC:ERIE911",
"CALL:GENERAL ALERT",
"PLACE:HASKINS RD IS NOW OPEN");
doTest("T14",
"ERIE911:ACTIVE SHOOTER INCIDENTS - MANDATORY TRAINING - SEPT 6,7 OR 8TH. EIGHT HOUR COURSE. REQUIRED TO ATTEND ONE OF THE DAYS.",
"SRC:ERIE911",
"CALL:GENERAL ALERT",
"PLACE:ACTIVE SHOOTER INCIDENTS - MANDATORY TRAINING - SEPT 6,7 OR 8TH. EIGHT HOUR COURSE. REQUIRED TO ATTEND ONE OF THE DAYS.");
doTest("T15",
"ERIE911:SAMPSON RD NOW OPEN......",
"SRC:ERIE911",
"CALL:GENERAL ALERT",
"PLACE:SAMPSON RD NOW OPEN......");
doTest("T16",
"ERIE911:32B1 >UNKNOWN PROBLEM 10793 ETTER RD XS: LAKE PLEASANT RD GREENE TWP DUSILA,CANDY Map:277 Grids:, Cad: 2011-0000090035",
"SRC:ERIE911",
"CALL:UNKNOWN PROBLEM",
"ADDR:10793 ETTER RD",
"X:LAKE PLEASANT RD",
"CITY:GREENE TWP",
"NAME:DUSILA,CANDY",
"MAP:277",
"ID:2011-0000090035");
doTest("T17",
"ERIE911:29D2N2>MVA -EJECTION- HIGH MECHANISM PLUM RD VENANGO TWP ADAM Map:489 Grids:, Cad: 2011-0000096580",
"SRC:ERIE911",
"CALL:MVA -EJECTION- HIGH MECHANISM",
"ADDR:PLUM RD",
"CITY:VENANGO TWP",
"NAME:ADAM",
"MAP:489",
"ID:2011-0000096580");
doTest("T18",
"FRM:messaging@iamresponding.com\nSUBJ:West Ridge Fire\nMSG:21B1 >HEMORRHAGE / LACERATIONS 4242 ASBURY RD XS: THOROUGHBRED LOOP MILLCREEK TWP\n",
"SRC:West Ridge Fire",
"CALL:HEMORRHAGE/LACERATIONS",
"ADDR:4242 ASBURY RD",
"CITY:MILLCREEK TWP",
"X:THOROUGHBRED LOOP");
doTest("T19",
"FRM:messaging@iamresponding.com\nSUBJ:West Ridge Fire\nMSG:9E1 >CARDIAC/RESP ARREST / DEATH 4411 FOREST GLEN DR XS: W 38TH ST MILLCREEK TWP\n",
"SRC:West Ridge Fire",
"CALL:CARDIAC/RESP ARREST/DEATH",
"ADDR:4411 FOREST GLEN DR",
"CITY:MILLCREEK TWP",
"X:W 38TH ST");
doTest("T20",
"FRM:messaging@iamresponding.com\nSUBJ:West Ridge Fire\nMSG:28C10G>STROKE (CVA) BREATH NORM > 35 3643 MEADOW DR XS: CAUGHEY RD MILLCREEK TWP\n",
"SRC:West Ridge Fire",
"CALL:STROKE (CVA) BREATH NORM >",
"ADDR:35 3643 MEADOW DR",
"CITY:MILLCREEK TWP",
"X:CAUGHEY RD");
}
public static void main(String[] args) {
new PAErieCountyAParserTest().generateTests("T21", "SRC CALL ADDR CITY X NAME MAP PLACE ID");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
edff04b5bc4415fbe06ee6912e73da7fc06798aa
|
5aa90ca89c993c99d628c4a4d404dbe9aee2234a
|
/app/src/main/java/com/example/android/educationapp/ui/base/DBAdapter.java
|
7a03a4e04fab26aafba63cfbbb4c040817f3ac11
|
[] |
no_license
|
rsv355/E-APP
|
9c33526ccb6ada49046b1be1b6111670702df866
|
916b62ad235be324ddd885cd2fce8a6966441feb
|
refs/heads/master
| 2020-06-02T20:46:24.155981
| 2015-04-03T14:04:31
| 2015-04-03T14:04:31
| 29,910,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,992
|
java
|
package com.example.android.educationapp.ui.base;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
/**
* Created by Android on 08-12-2014.
*/
public class DBAdapter {
public static final String KEY_ROWID = "_id";
/* public static final String KEY_NAME = "playername";
public static final String KEY_SCORE = "score";*/
private static final String TAG = "DBAdapter";
private static final String DATABASE_NAME = "EAPP";
private static final String DATABASE_TABLE = "Result";
private static final int DATABASE_VERSION = 1;
private static final String DATABASE_CREATE =
"create table Result (_id integer primary key autoincrement, "
+ "Test_id text not null," +
"Test_date text not null," +
"Result text," +
"Total_ques text not null," +
"Correct_ques text," +
"Wrong_ques text," +
"Answered text," +
"UnAnswered text );";
private final Context context;
private DatabaseHelper DBHelper;
private SQLiteDatabase db;
public DBAdapter(Context ctx)
{
this.context = ctx;
DBHelper = new DatabaseHelper(context);
}
private static class DatabaseHelper extends SQLiteOpenHelper
{
DatabaseHelper(Context context)
{
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db)
{
try {
db.execSQL(DATABASE_CREATE);
} catch (SQLException e) {
e.printStackTrace();
}
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
+ newVersion + ", which will destroy all old data");
db.execSQL("DROP TABLE IF EXISTS Result");
onCreate(db);
}
}
//---opens the database---
public DBAdapter open() throws SQLException
{
db = DBHelper.getWritableDatabase();
return this;
}
//---closes the database---
public void close()
{
DBHelper.close();
}
/*
+ "Test_id text not null," +
"Test_date text not null," +
"Result text," +
"Total_ques text not null," +
"Correct_ques text," +
"Wrong_ques text," +
"Answered text," +
"UnAnswered text );
*/
//---insert a contact into the database---
public long insertRecord(String Test_id,String Test_date, String Result,String Total_ques
,String Correct_ques,String Wrong_ques,String Answered,String UnAnswered)
{
ContentValues initialValues = new ContentValues();
initialValues.put("Test_id", Test_id);//1
initialValues.put("Test_date", Test_date);//2
initialValues.put("Result", Result);//3
initialValues.put("Total_ques", Total_ques);//4
initialValues.put("Correct_ques", Correct_ques);//5
initialValues.put("Wrong_ques", Wrong_ques);//6
initialValues.put("Answered", Answered);//7
initialValues.put("UnAnswered", UnAnswered);//8
Log.e("insert in eapp ","ok");
return db.insert(DATABASE_TABLE, null, initialValues);
}
//---deletes a particular contact---
public void deleteRecord( )
{
Log.e("record ddelted ","ok");
db.execSQL("delete from "+ DATABASE_TABLE);
// return db.delete(DATABASE_TABLE,null );
}
//---retrieves all the contacts---
/*public Cursor getAllContacts()
{
return db.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_NAME,KEY_SCORE},
null, null, null, null, null);
}
*/
//---retrieves a particular contact---
public Cursor getRecord(String rowId) throws SQLException
{
String selectQuery = "SELECT * FROM Result WHERE UPPER(WORD) ="+"\""+rowId.toString().trim().toUpperCase()+"\"";
Cursor cursor = db.rawQuery(selectQuery, null);
/*Cursor mCursor =db.query(true, DATABASE_TABLE, new String[] {
KEY_NAME, KEY_SCORE}, KEY_NAME + "=" + rowId, null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}*/
return cursor;
}
public Cursor getCategory(String CatgId) throws SQLException
{
String selectQuery = "SELECT * FROM Result WHERE CATG_ID ="+"\""+CatgId.toString().trim()+"\"";
Cursor cursor = db.rawQuery(selectQuery, null);
return cursor;
}
public Cursor getAllResult() throws SQLException
{
String selectQuery = "SELECT * FROM Result";
Cursor cursor = db.rawQuery(selectQuery, null);
return cursor;
}
public Cursor getHistoryWord(String WORD) throws SQLException
{
String selectQuery = "SELECT * FROM D_Word_History WHERE WORD ="+"\""+WORD.toString().trim()+"\"";
Cursor cursor = db.rawQuery(selectQuery, null);
return cursor;
}
public Cursor getAllHistoryWord() throws SQLException
{
String selectQuery = "SELECT * FROM D_Word_History";
Cursor cursor = db.rawQuery(selectQuery, null);
return cursor;
}
/*
//---updates a contact---
public boolean updateContact(long rowId, String name, int email)
{
ContentValues args = new ContentValues();
args.put(KEY_NAME, name);
args.put(KEY_SCORE, email);
return db.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0;
}*/
}
|
[
"softeng.krishna@gmail.com"
] |
softeng.krishna@gmail.com
|
da7b1447ef1f8b4dcbdd665dd0b712b3af7190df
|
6ae307399ef9cf162620acc59ca0c76ab6c06d2a
|
/forge/mcp/temp/src/minecraft/net/minecraft/client/renderer/entity/RenderSlime.java
|
c8eb75dead29560293a12c92fbf0fcb80f6d9fdd
|
[
"BSD-3-Clause"
] |
permissive
|
SuperStarGamesNetwork/IronManMod
|
b153ee5024066bf1ea74d7e2fc88848044801b30
|
6ae7ae4bb570e95a28048b991dec9e126da3d5e3
|
refs/heads/master
| 2021-01-16T18:29:24.771631
| 2014-08-08T14:08:52
| 2014-08-08T14:08:52
| 15,351,078
| 1
| 0
| null | 2013-12-21T04:20:44
| 2013-12-21T00:00:10
|
Java
|
UTF-8
|
Java
| false
| false
| 2,534
|
java
|
package net.minecraft.client.renderer.entity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class RenderSlime extends RenderLiving {
private static final ResourceLocation field_110897_a = new ResourceLocation("textures/entity/slime/slime.png");
private ModelBase field_77092_a;
public RenderSlime(ModelBase p_i1267_1_, ModelBase p_i1267_2_, float p_i1267_3_) {
super(p_i1267_1_, p_i1267_3_);
this.field_77092_a = p_i1267_2_;
}
protected int func_77090_a(EntitySlime p_77090_1_, int p_77090_2_, float p_77090_3_) {
if(p_77090_1_.func_82150_aj()) {
return 0;
} else if(p_77090_2_ == 0) {
this.func_77042_a(this.field_77092_a);
GL11.glEnable(2977);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
return 1;
} else {
if(p_77090_2_ == 1) {
GL11.glDisable(3042);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
return -1;
}
}
protected void func_77091_a(EntitySlime p_77091_1_, float p_77091_2_) {
float var3 = (float)p_77091_1_.func_70809_q();
float var4 = (p_77091_1_.field_70812_c + (p_77091_1_.field_70811_b - p_77091_1_.field_70812_c) * p_77091_2_) / (var3 * 0.5F + 1.0F);
float var5 = 1.0F / (var4 + 1.0F);
GL11.glScalef(var5 * var3, 1.0F / var5 * var3, var5 * var3);
}
protected ResourceLocation func_110896_a(EntitySlime p_110896_1_) {
return field_110897_a;
}
// $FF: synthetic method
// $FF: bridge method
protected void func_77041_b(EntityLivingBase p_77041_1_, float p_77041_2_) {
this.func_77091_a((EntitySlime)p_77041_1_, p_77041_2_);
}
// $FF: synthetic method
// $FF: bridge method
protected int func_77032_a(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_) {
return this.func_77090_a((EntitySlime)p_77032_1_, p_77032_2_, p_77032_3_);
}
// $FF: synthetic method
// $FF: bridge method
protected ResourceLocation func_110775_a(Entity p_110775_1_) {
return this.func_110896_a((EntitySlime)p_110775_1_);
}
}
|
[
"Perry@Perrys-Mac-Pro.local"
] |
Perry@Perrys-Mac-Pro.local
|
953a2198a6185b3a1a66f820082ef07004847479
|
e682fa3667adce9277ecdedb40d4d01a785b3912
|
/internal/fischer/mangf/A234575.java
|
7d1840de17ce0845e0f9ba41490e9ef8dca3aa9a
|
[
"Apache-2.0"
] |
permissive
|
gfis/joeis-lite
|
859158cb8fc3608febf39ba71ab5e72360b32cb4
|
7185a0b62d54735dc3d43d8fb5be677734f99101
|
refs/heads/master
| 2023-08-31T00:23:51.216295
| 2023-08-29T21:11:31
| 2023-08-29T21:11:31
| 179,938,034
| 4
| 1
|
Apache-2.0
| 2022-06-25T22:47:19
| 2019-04-07T08:35:01
|
Roff
|
UTF-8
|
Java
| false
| false
| 364
|
java
|
package irvine.oeis.a234;
import irvine.math.z.Z;
import irvine.oeis.triangle.Triangle;
/**
* A234575 Triangle T(n,k) read by rows: T(n,k) = floor(n/k) + n mod k, with 1<=k<=n.
* @author Georg Fischer
*/
public class A234575 extends Triangle {
@Override
public Z compute(int n, int k) {
++n;
++k;
return Z.valueOf(n / k + n % k);
}
}
|
[
"dr.Georg.Fischer@gmail.com"
] |
dr.Georg.Fischer@gmail.com
|
0681af154b068d31c2c64f798830296e130ae897
|
ee45dca913fb2d033fdfb774f74b80bf87b896dd
|
/src/code/Packet00Login.java
|
c178751653b261cc116c57e2e71abf53e3f10bad
|
[] |
no_license
|
liquid-os/Brawler
|
70ebbdbd6a7cbefbdbd426878c52f4b0eaeea648
|
7c2c448d4d86decee5cb1b08e46ea1b63d0d6c0f
|
refs/heads/master
| 2020-03-22T10:48:49.389027
| 2018-07-06T03:28:03
| 2018-07-06T03:28:03
| 139,928,548
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 505
|
java
|
package code;
import java.net.InetAddress;
import java.net.UnknownHostException;
public class Packet00Login extends Packet{
public String username;
int x, y, classid = 0;
public Packet00Login(byte[] data) {
super(00);
username = read(data)[1];
classid = Integer.parseInt(read(data)[2]);
}
public Packet00Login(String user, int heroID) {
super(00);
this.username = user;
this.classid = heroID;
}
public byte[] getData() {
return ("00#"+username+"#"+classid).getBytes();
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
8bc402004038ef45a93460a47088d39ffef555e0
|
6cee5645c21bbb9b98fa96e3f73ffc4097440047
|
/chapter15-war/cardatabase/src/test/java/com/packt/cardatabase/CardatabaseApplicationTests.java
|
a73d96bf9308b16516c61901d1b2b3f1b22319ec
|
[] |
no_license
|
osakanaya/Hands-On-Full-Stack-Development-with-Spring-Boot-2.0-and-React
|
54ab4290e35f81c748d57171e408975e23c96f3b
|
28580197f2eaf24b169630fbe4b745f22eb91797
|
refs/heads/main
| 2023-01-29T19:14:31.314383
| 2020-12-09T04:17:45
| 2020-12-09T04:17:45
| 319,838,382
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 476
|
java
|
package com.packt.cardatabase;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import com.packt.cardatabase.web.CarController;
import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest
class CardatabaseApplicationTests {
@Autowired
private CarController controller;
@Test
void contextLoads() {
assertThat(controller).isNotNull();
}
}
|
[
"sashida@primagest.co.jp"
] |
sashida@primagest.co.jp
|
966e03689db97d60d6c17c2f6ab913052672e533
|
317a56a9246001ec9fcd96c7fe50d219bc3ee992
|
/module_algorithm/src/main/java/leetcode/editor/cn/round3/P102BinaryTreeLevelOrderTraversal.java
|
f2fd14164ae2ecf2540749ac5f0a2e07d1bbdaf1
|
[] |
no_license
|
xushanning/JianShu
|
4195732c7869218b96526ab3de2a1075195e3746
|
e8c5c70ba1dbab5630fc3a14250b2286c8a85808
|
refs/heads/master
| 2022-05-12T04:49:55.522081
| 2021-03-07T15:29:57
| 2021-03-07T15:29:57
| 186,778,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,905
|
java
|
//给你一个二叉树,请你返回其按 层序遍历 得到的节点值。 (即逐层地,从左到右访问所有节点)。
//
//
//
// 示例:
//二叉树:[3,9,20,null,null,15,7],
//
// 3
// / \
// 9 20
// / \
// 15 7
//
//
// 返回其层次遍历结果:
//
// [
// [3],
// [9,20],
// [15,7]
//]
//
// Related Topics 树 广度优先搜索
package leetcode.editor.cn.round3;
import java.util.ArrayList;
import java.util.List;
import leetcode.editor.cn.TreeNode;
//Java:二叉树的层序遍历
public class P102BinaryTreeLevelOrderTraversal {
public static void main(String[] args) {
Solution solution = new P102BinaryTreeLevelOrderTraversal().new Solution();
// TO TEST
}
//leetcode submit region begin(Prohibit modification and deletion)
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
class Solution {
//https://leetcode-cn.com/problems/binary-tree-level-order-traversal/solution/die-dai-di-gui-duo-tu-yan-shi-102er-cha-shu-de-cen/
private List<List<Integer>> res = new ArrayList<>();
public List<List<Integer>> levelOrder(TreeNode root) {
if (root == null) {
return res;
}
dfs(1, root);
return res;
}
private void dfs(int index, TreeNode root) {
if (res.size() < index) {
res.add(new ArrayList<>());
}
res.get(index - 1).add(root.val);
if (root.left != null) {
dfs(index + 1, root.left);
}
if (root.right != null) {
dfs(index + 1, root.right);
}
}
}
//leetcode submit region end(Prohibit modification and deletion)
}
|
[
"474003561@qq.com"
] |
474003561@qq.com
|
b49a6e4f7f1a6e8723b7fccbeb6ff7bd0e54ba62
|
c51dbe7b9150644774028ccc50494f6053f24b07
|
/src/test/java/com/dio/everis/dioecommerce/controllers/CategoryControllerTest.java
|
1f0f7e524acf15d8a7c181c9388cb33586ad606d
|
[] |
no_license
|
eskokado/dio-ecommerce
|
f7596c4b2a6c45a22f7e7ba3d903a098c064b94e
|
83d8123b406db77227af7761472163ccdb7d506b
|
refs/heads/master
| 2023-07-02T00:24:59.367670
| 2021-07-27T17:19:22
| 2021-07-27T17:19:22
| 390,035,491
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,553
|
java
|
package com.dio.everis.dioecommerce.controllers;
import com.dio.everis.dioecommerce.builders.CategoryDTOBuilder;
import com.dio.everis.dioecommerce.controllers.exceptions.ResourceExceptionHandler;
import com.dio.everis.dioecommerce.dto.CategoryDTO;
import com.dio.everis.dioecommerce.services.CategoryService;
import com.dio.everis.dioecommerce.services.exceptions.ObjectNotFoundException;
import org.junit.jupiter.api.BeforeEach;
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.springframework.data.web.PageableHandlerMethodArgumentResolver;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
import java.util.Collections;
import static com.dio.everis.dioecommerce.utils.JsonConvertionUtils.asJsonString;
import static org.hamcrest.Matchers.is;
import static org.mockito.Mockito.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@ExtendWith(MockitoExtension.class)
public class CategoryControllerTest {
private static final String CATEGORY_API_URL_PATH = "/api/v1/categories";
private static final Long VALID_CATEGORY_ID = 1L;
private static final Long INVALID_CATEGORY_ID = 2L;
private MockMvc mockMvc;
@Mock
private CategoryService categoryService;
@InjectMocks
private CategoryController categoryController;
@BeforeEach
void setUp() {
mockMvc = MockMvcBuilders.standaloneSetup(categoryController)
.setCustomArgumentResolvers(new PageableHandlerMethodArgumentResolver())
.setControllerAdvice(new ResourceExceptionHandler())
.setViewResolvers((s, locale) -> new MappingJackson2JsonView())
.build();
}
@Test
void whenPOSTIsCalledThenACategoryIsCreated() throws Exception {
// given
CategoryDTO categoryDTO = CategoryDTOBuilder.builder().build().toCategoryDTO();
// when
when(categoryService.insert(categoryDTO)).thenReturn(categoryDTO);
// then
mockMvc.perform(post(CATEGORY_API_URL_PATH)
.contentType(MediaType.APPLICATION_JSON)
.content(asJsonString(categoryDTO)))
.andExpect(status().isCreated())
.andExpect(jsonPath("$.name").value(categoryDTO.getName()));
}
@Test
void whenPOSTIsCalledWithoutRequiredFieldThenAnErrorIsReturned() throws Exception {
// given
CategoryDTO categoryDTO = CategoryDTOBuilder.builder().build().toCategoryDTO();
categoryDTO.setName(null);
// then
mockMvc.perform(post(CATEGORY_API_URL_PATH)
.contentType(MediaType.APPLICATION_JSON)
.content(asJsonString(categoryDTO)))
.andExpect(status().isBadRequest());
}
@Test
void whenGETIsCalledWithValidIdThenOkStatusIsReturned() throws Exception {
// given
CategoryDTO categoryDTO = CategoryDTOBuilder.builder().build().toCategoryDTO();
// when
when(categoryService.find(VALID_CATEGORY_ID)).thenReturn(categoryDTO);
// then
mockMvc.perform(MockMvcRequestBuilders.get(CATEGORY_API_URL_PATH + "/" + VALID_CATEGORY_ID)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.name").value(categoryDTO.getName()));
}
@Test
void whenGETIsCalledWithoutRegisteredIdThenNotFoundStatusIsReturned() throws Exception {
// when
when(categoryService.find(INVALID_CATEGORY_ID)).thenThrow(ObjectNotFoundException.class);
// then
mockMvc.perform(MockMvcRequestBuilders.get(CATEGORY_API_URL_PATH + "/" + INVALID_CATEGORY_ID)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNotFound());
}
@Test
void whenGETListWithCategoryIsCalledThenOkStatusIsReturned() throws Exception {
// given
CategoryDTO categoryDTO = CategoryDTOBuilder.builder().build().toCategoryDTO();
// when
when(categoryService.findAll()).thenReturn(Collections.singletonList(categoryDTO));
// then
mockMvc.perform(MockMvcRequestBuilders.get(CATEGORY_API_URL_PATH)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$[0].name").value(categoryDTO.getName()));
}
@Test
void thenDELETEIsCalledWithValidIdThenNoContentStatusIsReturned() throws Exception {
// when
doNothing().when(categoryService).delete(VALID_CATEGORY_ID);
// then
mockMvc.perform(MockMvcRequestBuilders.delete(CATEGORY_API_URL_PATH + "/" + VALID_CATEGORY_ID)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNoContent());
}
@Test
void thenDELETEIsCalledWithInvalidIdThenNotFoundStatusIsReturned() throws Exception {
// when
doThrow(ObjectNotFoundException.class).when(categoryService).delete(INVALID_CATEGORY_ID);
// then
mockMvc.perform(MockMvcRequestBuilders.delete(CATEGORY_API_URL_PATH + "/" + INVALID_CATEGORY_ID)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNotFound());
}
@Test
void thenPUTIsCalledThenACategoryIsOkStatusReturned() throws Exception {
// given
CategoryDTO categoryDTO = CategoryDTOBuilder.builder().build().toCategoryDTO();
categoryDTO.setName("Modified Name");
// when
when(categoryService.update(categoryDTO)).thenReturn(categoryDTO);
// then
mockMvc.perform(MockMvcRequestBuilders.put(CATEGORY_API_URL_PATH)
.contentType(MediaType.APPLICATION_JSON)
.content(asJsonString(categoryDTO)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.name", is("Modified Name")));
}
@Test
void thenPUTIsCalledWithInvalidIdIsNotFoundStatusReturned() throws Exception {
// given
CategoryDTO categoryDTO = CategoryDTOBuilder.builder().build().toCategoryDTO();
// when
when(categoryService.update(categoryDTO)).thenThrow(ObjectNotFoundException.class);
// then
mockMvc.perform(MockMvcRequestBuilders.put(CATEGORY_API_URL_PATH)
.contentType(MediaType.APPLICATION_JSON)
.content(asJsonString(categoryDTO)))
.andExpect(status().isNotFound());
}
@Test
void thenPUTisCalledWithoutRequiredFieldThenAnErrorIsReturned() throws Exception {
// given
CategoryDTO categoryDTO = CategoryDTOBuilder.builder().build().toCategoryDTO();
categoryDTO.setName(null);
// then
mockMvc.perform(MockMvcRequestBuilders.put(CATEGORY_API_URL_PATH)
.contentType(MediaType.APPLICATION_JSON)
.content(asJsonString(categoryDTO)))
.andExpect(status().isBadRequest());
}
}
|
[
"eskokado@gmail.com"
] |
eskokado@gmail.com
|
35e82083bfe217867481880c31bad348a147ab30
|
3389348b101e48c482476ffb8c172712981286a8
|
/src/CL7/MethodReference/Printable.java
|
f272e47ec73e55c775735890e37c4a3d84890b57
|
[] |
no_license
|
7IsEnough/workspace4Java
|
2b78c0d11acc181f85642b5131959e0b9bd88843
|
154871364907aadb7f70ccd9d606e9c1b2b0b021
|
refs/heads/master
| 2023-03-09T20:17:28.867838
| 2021-02-20T11:44:48
| 2021-02-20T11:44:48
| 340,636,805
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
package CL7.MethodReference;
/**
* @author Promise
* @create 2019-08-22-20:27
* 定义一个打印的函数式接口
*/
@FunctionalInterface
public interface Printable {
//打印字符串的抽象方法
public abstract void print(String s);
}
|
[
"976949689@qq.com"
] |
976949689@qq.com
|
4ec8dd860d5f241d23cd738b0b963981578f4ae7
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/ftu161g_ftu161g.java
|
d466008f8cbaf69caf9aac1ba4efcf4b36b98ed4
|
[
"MIT"
] |
permissive
|
karim/adila
|
8b0b6ba56d83f3f29f6354a2964377e6197761c4
|
00f262f6d5352b9d535ae54a2023e4a807449faa
|
refs/heads/master
| 2021-01-18T22:52:51.508129
| 2016-11-13T13:08:04
| 2016-11-13T13:08:04
| 45,054,909
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 213
|
java
|
// This file is automatically generated.
package adila.db;
/*
* Plusone Fun +
*
* DEVICE: FTU161G
* MODEL: FTU161G
*/
final class ftu161g_ftu161g {
public static final String DATA = "Plusone|Fun +|";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
418749f22438fa700469153c91b4d748a621da43
|
eff9a71fdec8f23f241602d0009d1217eb991b39
|
/src/main/java/com/vinculomedico/sinergis/api/client/AuthorizedFeignClient.java
|
70823e4f4af9456d93173eba820fbf2a258ae332
|
[] |
no_license
|
gpalli/jhipstermicroservice
|
fd7f19dddcf3ea213ab2465b0b175ab7ff78da22
|
d28681a90844d90ec1ceeea4ecba8f47a6089aa3
|
refs/heads/master
| 2021-01-15T17:15:26.985917
| 2017-08-08T22:50:10
| 2017-08-08T22:50:10
| 99,742,705
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,670
|
java
|
package com.vinculomedico.sinergis.api.client;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClientsConfiguration;
import org.springframework.core.annotation.AliasFor;
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@FeignClient
public @interface AuthorizedFeignClient {
@AliasFor(annotation = FeignClient.class, attribute = "name")
String name() default "";
/**
* A custom <code>@Configuration</code> for the feign client.
*
* Can contain override <code>@Bean</code> definition for the pieces that
* make up the client, for instance {@link feign.codec.Decoder},
* {@link feign.codec.Encoder}, {@link feign.Contract}.
*
* @see FeignClientsConfiguration for the defaults
*/
@AliasFor(annotation = FeignClient.class, attribute = "configuration")
Class<?>[] configuration() default OAuth2InterceptedFeignConfiguration.class;
/**
* An absolute URL or resolvable hostname (the protocol is optional).
*/
String url() default "";
/**
* Whether 404s should be decoded instead of throwing FeignExceptions.
*/
boolean decode404() default false;
/**
* Fallback class for the specified Feign client interface. The fallback class must
* implement the interface annotated by this annotation and be a valid Spring bean.
*/
Class<?> fallback() default void.class;
/**
* Path prefix to be used by all method-level mappings. Can be used with or without
* <code>@RibbonClient</code>.
*/
String path() default "";
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
4318333a6e024bba09c27553676317645aed89b1
|
549500dfd76b2b228866dc01b7cdf54e1ae9f2f0
|
/server/src/main/java/io/crate/planner/node/ddl/CreateRepositoryPlan.java
|
91b487ea5fd593158be65aaad66aef7e272b7000
|
[
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"LGPL-2.0-or-later",
"MIT",
"Python-2.0",
"ZPL-2.1",
"Apache-2.0"
] |
permissive
|
engrmostafijur/crate
|
599c2d14c455f5c158364a202887ca71c889c55e
|
fe8bd52d6bc4e7a989f775f9cd0f89fe43c6b38a
|
refs/heads/master
| 2022-08-09T19:18:04.976058
| 2020-05-13T08:45:46
| 2020-05-13T17:07:10
| 263,730,738
| 1
| 0
|
Apache-2.0
| 2020-05-13T20:00:04
| 2020-05-13T20:00:03
| null |
UTF-8
|
Java
| false
| false
| 4,361
|
java
|
/*
* Licensed to Crate under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership. Crate 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.
*
* However, if you have executed another commercial license agreement
* with Crate these terms will supersede the license and you may use the
* software solely pursuant to the terms of the relevant commercial
* agreement.
*/
package io.crate.planner.node.ddl;
import com.google.common.annotations.VisibleForTesting;
import io.crate.analyze.AnalyzedCreateRepository;
import io.crate.analyze.SymbolEvaluator;
import io.crate.analyze.repositories.RepositoryParamValidator;
import io.crate.data.Row;
import io.crate.data.Row1;
import io.crate.data.RowConsumer;
import io.crate.execution.support.OneRowActionListener;
import io.crate.expression.symbol.Symbol;
import io.crate.metadata.CoordinatorTxnCtx;
import io.crate.metadata.Functions;
import io.crate.planner.DependencyCarrier;
import io.crate.planner.Plan;
import io.crate.planner.PlannerContext;
import io.crate.planner.operators.SubQueryResults;
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest;
import java.util.function.Function;
import static io.crate.analyze.GenericPropertiesConverter.genericPropertiesToSettings;
public class CreateRepositoryPlan implements Plan {
private final AnalyzedCreateRepository createRepository;
public CreateRepositoryPlan(AnalyzedCreateRepository createRepository) {
this.createRepository = createRepository;
}
@Override
public StatementType type() {
return StatementType.DDL;
}
@Override
public void executeOrFail(DependencyCarrier dependencies,
PlannerContext plannerContext,
RowConsumer consumer,
Row parameters,
SubQueryResults subQueryResults) {
PutRepositoryRequest request = createRequest(
createRepository,
plannerContext.transactionContext(),
plannerContext.functions(),
parameters,
subQueryResults,
dependencies.repositoryParamValidator());
dependencies.repositoryService()
.execute(request)
.whenComplete(new OneRowActionListener<>(consumer, rCount -> new Row1(rCount == null ? -1 : rCount)));
}
@VisibleForTesting
public static PutRepositoryRequest createRequest(AnalyzedCreateRepository createRepository,
CoordinatorTxnCtx txnCtx,
Functions functions,
Row parameters,
SubQueryResults subQueryResults,
RepositoryParamValidator repositoryParamValidator) {
Function<? super Symbol, Object> eval = x -> SymbolEvaluator.evaluate(
txnCtx,
functions,
x,
parameters,
subQueryResults
);
var genericProperties = createRepository.properties().map(eval);
var settings = genericPropertiesToSettings(
genericProperties,
// supported settings for the repository type
repositoryParamValidator.settingsForType(createRepository.type()).all());
repositoryParamValidator.validate(
createRepository.type(), createRepository.properties(), settings);
PutRepositoryRequest request = new PutRepositoryRequest(createRepository.name());
request.type(createRepository.type());
request.settings(settings);
return request;
}
}
|
[
"37929162+mergify[bot]@users.noreply.github.com"
] |
37929162+mergify[bot]@users.noreply.github.com
|
33cb0df5ce42ed008cac14fea9ab133fdd3aca33
|
f7160c0f0526cc5afc0fe4e6f06d384394059aa1
|
/fsa/fs-expector/src/test/java/com/fs/expector/gridservice/impl/test/cases/ResourceHandlerTest.java
|
9eb4ff426308847071ef31edc76aa9bae85aba01
|
[] |
no_license
|
o1711/somecode
|
e2461c4fb51b3d75421c4827c43be52885df3a56
|
a084f71786e886bac8f217255f54f5740fa786de
|
refs/heads/master
| 2021-09-14T14:51:58.704495
| 2018-05-15T07:51:05
| 2018-05-15T07:51:05
| 112,574,683
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,910
|
java
|
/**
* All right is from Author of the file,to be explained in comming days.
* Nov 3, 2012
*/
package com.fs.expector.gridservice.impl.test.cases;
import com.fs.commons.api.client.BClientFactoryI.ProtocolI;
import com.fs.commons.api.message.MessageI;
import com.fs.commons.api.message.support.MessageSupport;
import com.fs.commons.api.value.ErrorInfo;
import com.fs.commons.api.value.ErrorInfos;
import com.fs.expector.gridservice.api.Constants;
import com.fs.expector.gridservice.api.mock.MockExpectorClient;
import com.fs.expector.gridservice.impl.test.cases.support.TestBase;
/**
* @author wu
*
*/
public class ResourceHandlerTest extends TestBase {
/**
* @param p
*/
public ResourceHandlerTest(ProtocolI p) {
super(p);
// TODO Auto-generated constructor stub
}
private MockExpectorClient client1;
private MockExpectorClient client2;
public void testExpAndConnect() {
this.client1 = this.newClient("user1@domain1.com", "user1");
{
MessageI req = new MessageSupport("resource/get");
req.setHeader("url", "classpath:///com/fs/resource/test-resource.html");
MessageI res = this.client1.syncSendMessage(req);
ErrorInfos eis = res.getErrorInfos();
assertTrue("error expected", eis.hasError());
assertEquals(1, eis.getErrorInfoList().size());
ErrorInfo ei = eis.getErrorInfoList().get(0);
assertEquals(Constants.P_ERROR_NOTALLOW.toString(), ei.getCode());
}
{
MessageI req = new MessageSupport("resource/get");
req.setHeader("url", "classpath:///user/open/resource/test-resource.html");
MessageI res = this.client1.syncSendMessage(req);
ErrorInfos eis = res.getErrorInfos();
assertFalse("error:" + eis, eis.hasError());
String rst = (String) res.getPayload("resource");
assertEquals("<div>hello,this is a test</div>", rst);
System.out.println(rst);
}
}
}
|
[
"wkz808@163.com"
] |
wkz808@163.com
|
5eef7fdb6e7443e210e8908de86072e1e604f2ff
|
44caf8cc25a76f287c8de2555b9255bc9a72ce6b
|
/second-sem/spring-core/src/main/java/spring/primary/Employee.java
|
85531f905ff405e4ee77ff7fe42a4e7b477669e2
|
[] |
no_license
|
Morok1/fullstack2020
|
f0be8504de9fc314bd12fd849c6ba8b324c81a7f
|
a7dab44cce96e938cb46870f51f5cfab6e50098d
|
refs/heads/master
| 2023-01-21T20:33:45.864433
| 2020-11-14T22:33:43
| 2020-11-14T22:33:43
| 312,565,135
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 334
|
java
|
package spring.primary;
/**
* Created by Gebruiker on 7/17/2018.
*/
public class Employee {
private String name;
public Employee(String name) {
this.name = name;
}
@Override
public String toString() {
return "Employee{" +
"name='" + name + '\'' +
'}';
}
}
|
[
"zhenyasmagin@yandex.ru"
] |
zhenyasmagin@yandex.ru
|
0ddfe04e8c0314aafd112498ba6d0eac013d749a
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project85/src/test/java/org/gradle/test/performance85_5/Test85_421.java
|
efcb8f986b7fbc66bec79039217c0715855caab5
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance85_5;
import static org.junit.Assert.*;
public class Test85_421 {
private final Production85_421 production = new Production85_421("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
2f0cb16431354b7d4451103fdc6285b660762fb7
|
3e92ef9d63410c28ca859a44b77b786bc7d5870c
|
/plugins/jreleaser-maven-plugin/src/main/java/org/jreleaser/maven/plugin/Artifact.java
|
f956a9a63cbe610208f2fa86f43232759f6ff3d2
|
[
"Apache-2.0"
] |
permissive
|
seakayone/jreleaser
|
f945c1d52e82ca999373c6902ef4da543f49fbcc
|
d06061c50b7872f121db106c79d771d8a8929d9b
|
refs/heads/main
| 2023-06-12T01:36:37.210819
| 2021-07-01T21:36:20
| 2021-07-01T21:36:20
| 382,614,241
| 0
| 0
|
Apache-2.0
| 2021-07-03T12:48:28
| 2021-07-03T12:48:28
| null |
UTF-8
|
Java
| false
| false
| 1,736
|
java
|
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2020-2021 The JReleaser 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.jreleaser.maven.plugin;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author Andres Almiray
* @since 0.1.0
*/
public class Artifact implements ExtraProperties {
private final Map<String, Object> extraProperties = new LinkedHashMap<>();
private String path;
private String platform;
void setAll(Artifact artifact) {
this.path = artifact.path;
this.platform = artifact.platform;
setExtraProperties(artifact.extraProperties);
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform;
}
@Override
public Map<String, Object> getExtraProperties() {
return extraProperties;
}
@Override
public void setExtraProperties(Map<String, Object> extraProperties) {
this.extraProperties.clear();
this.extraProperties.putAll(extraProperties);
}
}
|
[
"aalmiray@gmail.com"
] |
aalmiray@gmail.com
|
b2c77fb9c4ed20539d2ff32c6b7de3124ae675c7
|
1fd0842613e96ef5a8abfd30af914bf16c701cf8
|
/ch.eugster.colibri.client.ui/src/ch/eugster/colibri/client/ui/actions/EnterAction.java
|
99255431c10979857561865daf2726fd3489cc72
|
[] |
no_license
|
ceugster/colibrits2
|
db840ab2a72468feb09ad5869951c839349c6046
|
1417ac922694c27ba28f03910a36f31ce917f141
|
refs/heads/master
| 2022-04-27T05:35:17.628839
| 2017-01-20T08:21:54
| 2017-01-20T08:21:54
| 259,859,302
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,710
|
java
|
/*
* Created on 26.03.2009
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package ch.eugster.colibri.client.ui.actions;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.util.GregorianCalendar;
import java.util.Locale;
import ch.eugster.colibri.client.ui.events.StateChangeEvent;
import ch.eugster.colibri.client.ui.panels.user.PaymentWrapper;
import ch.eugster.colibri.client.ui.panels.user.UserPanel;
import ch.eugster.colibri.client.ui.panels.user.pos.numeric.ValueDisplay;
import ch.eugster.colibri.persistence.model.Profile;
public class EnterAction extends UserPanelProfileAction
{
private static final long serialVersionUID = 0l;
public static final String DEFAULT_TEXT = "Zahlungen";
public static final String ACTION_COMMAND = "enter.action";
public EnterAction(final UserPanel userPanel, final Profile profile)
{
super(EnterAction.DEFAULT_TEXT, EnterAction.ACTION_COMMAND, userPanel, profile);
this.userPanel.getPositionWrapper().addPropertyChangeListener(this);
}
@Override
public void actionPerformed(final ActionEvent event)
{
if (event.getActionCommand().equals(EnterAction.ACTION_COMMAND))
{
performEnterAction(event);
}
}
private void performEnterAction(final ActionEvent event)
{
final UserPanel.State state = userPanel.getCurrentState();
if (state.equals(UserPanel.State.POSITION_INPUT))
{
if (userPanel.getPositionWrapper().isPositionComplete())
{
userPanel.getPositionListPanel().getModel().actionPerformed(event);
}
else
{
if (userPanel.getValueDisplay().getText().isEmpty())
{
userPanel.fireStateChange(new StateChangeEvent(userPanel.getCurrentState(), UserPanel.State.PAYMENT_INPUT));
}
else
{
if (testForBarcode())
{
updateBarcode();
}
else if (testForQuantity())
{
updateQuantity();
}
else if (testForPrice())
{
updatePrice();
}
}
}
}
else if (state.equals(UserPanel.State.PAYMENT_INPUT))
{
final PaymentWrapper wrapper = userPanel.getPaymentWrapper();
final ValueDisplay display = userPanel.getValueDisplay();
if (wrapper.isPaymentComplete())
{
// this.fireActionPerformed(event);
}
else if (display.getText().equals(""))
{
userPanel.fireStateChange(new StateChangeEvent(state, UserPanel.State.POSITION_INPUT));
}
}
}
private boolean testForPrice()
{
if (userPanel.getPositionWrapper().doesPositionNeedPrice())
{
final double maxRange = Math.abs(userPanel.getMainTabbedPane().getSetting().getMaxPriceRange());
final double price = Math.abs(userPanel.getValueDisplay().testAmount());
if ((maxRange == 0) || ((price > 0) && (price <= maxRange)))
{
firePropertyChange("label", null, "Preis");
return true;
}
}
return false;
}
private boolean testForQuantity()
{
if (userPanel.getPositionWrapper().doesPositionNeedQuantity())
{
final int maxRange = Math.abs(userPanel.getMainTabbedPane().getSetting().getMaxQuantityRange());
final int quantity = Math.abs(userPanel.getValueDisplay().testQuantity());
if ((maxRange == 0) || ((quantity > 0) && (quantity <= maxRange)))
{
firePropertyChange("label", null, "Menge");
return true;
}
}
return false;
}
private boolean testForBarcode()
{
return userPanel.getValueDisplay().testBarcode() != null;
}
private void updatePrice()
{
if (userPanel.getPositionWrapper().doesPositionNeedPrice())
{
final double maxRange = Math.abs(userPanel.getMainTabbedPane().getSetting().getMaxPriceRange());
final double price = Math.abs(userPanel.getValueDisplay().testAmount());
if ((maxRange == 0) || ((price > 0) && (price <= maxRange)))
{
userPanel.getPositionDetailPanel().getPriceButton().doClick();
}
}
}
private void updateQuantity()
{
if (userPanel.getPositionWrapper().doesPositionNeedQuantity())
{
final int maxRange = Math.abs(userPanel.getMainTabbedPane().getSetting().getMaxQuantityRange());
final int quantity = Math.abs(userPanel.getValueDisplay().testQuantity());
if ((maxRange == 0) || ((quantity > 0) && (quantity <= maxRange)))
{
userPanel.getPositionDetailPanel().getQuantityButton().doClick();
}
}
}
private void updateBarcode()
{
userPanel.getPositionWrapper().keyPressed(new KeyEvent(this.userPanel, KeyEvent.VK_ENTER, GregorianCalendar.getInstance(Locale.getDefault()).getTimeInMillis(), 0, KeyEvent.VK_ENTER, (char)0xd));
}
}
|
[
"christian.eugster@gmx.net"
] |
christian.eugster@gmx.net
|
7abb5ec4298d9b7049c07b68683d1e66eb899227
|
84e75a15bcd0eec085814a94e965270cf1ced8ca
|
/discovery-plugin-register-center/discovery-plugin-register-center-starter-zookeeper/src/main/java/com/nepxion/discovery/plugin/registercenter/zookeeper/decorator/ZookeeperServerListDecorator.java
|
051bdb0ed350f1383886ebadf7afd49ce86c2085
|
[
"Apache-2.0"
] |
permissive
|
gilbertguan2385/Discovery
|
685c5b1cf669b8476249e65c305ab3a28d5b78a4
|
de2de61b42c2f4c0ad029fcc22490c42a1c88328
|
refs/heads/master
| 2023-03-09T00:41:57.556990
| 2023-02-03T12:51:35
| 2023-02-03T12:51:35
| 165,604,607
| 0
| 0
|
Apache-2.0
| 2019-01-14T06:07:15
| 2019-01-14T06:07:15
| null |
UTF-8
|
Java
| false
| false
| 1,795
|
java
|
package com.nepxion.discovery.plugin.registercenter.zookeeper.decorator;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
import java.util.List;
import org.apache.curator.x.discovery.ServiceDiscovery;
import org.springframework.cloud.zookeeper.discovery.ZookeeperInstance;
import org.springframework.cloud.zookeeper.discovery.ZookeeperServer;
import org.springframework.cloud.zookeeper.discovery.ZookeeperServerList;
import com.nepxion.discovery.plugin.framework.listener.loadbalance.LoadBalanceListenerExecutor;
public class ZookeeperServerListDecorator extends ZookeeperServerList {
private LoadBalanceListenerExecutor loadBalanceListenerExecutor;
private String serviceId;
public ZookeeperServerListDecorator(ServiceDiscovery<ZookeeperInstance> serviceDiscovery) {
super(serviceDiscovery);
}
@Override
public List<ZookeeperServer> getInitialListOfServers() {
List<ZookeeperServer> servers = super.getInitialListOfServers();
filter(servers);
return servers;
}
@Override
public List<ZookeeperServer> getUpdatedListOfServers() {
List<ZookeeperServer> servers = super.getUpdatedListOfServers();
filter(servers);
return servers;
}
private void filter(List<ZookeeperServer> servers) {
loadBalanceListenerExecutor.onGetServers(serviceId, servers);
}
public void setLoadBalanceListenerExecutor(LoadBalanceListenerExecutor loadBalanceListenerExecutor) {
this.loadBalanceListenerExecutor = loadBalanceListenerExecutor;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
}
|
[
"1394997@qq.com"
] |
1394997@qq.com
|
d926767cfd10e76308e5ed3106df36754548e996
|
419f3eaed329f1ebb0b87597f1f70f492c44dc80
|
/src/TheDepartmentOfRedundancyDepartment.java
|
657ffa5ea5f81e6c4a18fc68312c07d4e8df62c4
|
[] |
no_license
|
thisAAY/UVA
|
2329f4d30faa0f4e03e365585fde3d6f8a590c28
|
85de4dc27ae2e3bf6863619badbbd8fd7f8cf4c3
|
refs/heads/master
| 2020-03-08T17:01:13.168218
| 2015-03-07T16:30:33
| 2015-03-07T16:30:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,287
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.*;
import java.util.*;
/**
*
* @author Alejandro E. Garces
*/
public class TheDepartmentOfRedundancyDepartment {
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String line = "";
ArrayList<Integer> numbers = new ArrayList<Integer>();
HashMap<Integer, Integer> freq = new HashMap<Integer, Integer>();
StringTokenizer st;
StringBuilder output = new StringBuilder();
while( (line = in.readLine()) != null)
{
st = new StringTokenizer(line);
while(st.hasMoreTokens())
{
int x = Integer.parseInt(st.nextToken());
int fre = 1;
if(!freq.containsKey(x))
numbers.add(x);
else fre += freq.get(x);
freq.put(x, fre);
}
}
for(int x:numbers)
output.append(x).append(" ").append(freq.get(x)).append("\n");
System.out.print(output);
in.close();
System.exit(0);
}
}
|
[
"allegea@gmail.com"
] |
allegea@gmail.com
|
299975bd40a555616a2c54b8c2cad2ad65de371b
|
178ef1239b7b188501395c4d3db3f0266b740289
|
/android/filterpacks/imageproc/RedEyeFilter.java
|
cf248a8dab9a8e0d21fa2c0e14b8daebbfc3c7e8
|
[] |
no_license
|
kailashrs/5z_framework
|
b295e53d20de0b6d2e020ee5685eceeae8c0a7df
|
1b7f76b1f06cfb6fb95d4dd41082a003d7005e5d
|
refs/heads/master
| 2020-04-26T12:31:27.296125
| 2019-03-03T08:58:23
| 2019-03-03T08:58:23
| 173,552,503
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,209
|
java
|
package android.filterpacks.imageproc;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Paint;
public class RedEyeFilter
extends Filter
{
private static final float DEFAULT_RED_INTENSITY = 1.3F;
private static final float MIN_RADIUS = 10.0F;
private static final float RADIUS_RATIO = 0.06F;
private final Canvas mCanvas = new Canvas();
@GenerateFieldPort(name="centers")
private float[] mCenters;
private int mHeight = 0;
private final Paint mPaint = new Paint();
private Program mProgram;
private float mRadius;
private Bitmap mRedEyeBitmap;
private Frame mRedEyeFrame;
private final String mRedEyeShader = "precision mediump float;\nuniform sampler2D tex_sampler_0;\nuniform sampler2D tex_sampler_1;\nuniform float intensity;\nvarying vec2 v_texcoord;\nvoid main() {\n vec4 color = texture2D(tex_sampler_0, v_texcoord);\n vec4 mask = texture2D(tex_sampler_1, v_texcoord);\n if (mask.a > 0.0) {\n float green_blue = color.g + color.b;\n float red_intensity = color.r / green_blue;\n if (red_intensity > intensity) {\n color.r = 0.5 * green_blue;\n }\n }\n gl_FragColor = color;\n}\n";
private int mTarget = 0;
@GenerateFieldPort(hasDefault=true, name="tile_size")
private int mTileSize = 640;
private int mWidth = 0;
public RedEyeFilter(String paramString)
{
super(paramString);
}
private void createRedEyeFrame(FilterContext paramFilterContext)
{
int i = mWidth / 2;
int j = mHeight / 2;
Bitmap localBitmap = Bitmap.createBitmap(i, j, Bitmap.Config.ARGB_8888);
mCanvas.setBitmap(localBitmap);
mPaint.setColor(-1);
mRadius = Math.max(10.0F, 0.06F * Math.min(i, j));
for (int k = 0; k < mCenters.length; k += 2) {
mCanvas.drawCircle(mCenters[k] * i, mCenters[(k + 1)] * j, mRadius, mPaint);
}
MutableFrameFormat localMutableFrameFormat = ImageFormat.create(i, j, 3, 3);
mRedEyeFrame = paramFilterContext.getFrameManager().newFrame(localMutableFrameFormat);
mRedEyeFrame.setBitmap(localBitmap);
localBitmap.recycle();
}
private void updateProgramParams()
{
if (mCenters.length % 2 != 1) {
return;
}
throw new RuntimeException("The size of center array must be even.");
}
public void fieldPortValueUpdated(String paramString, FilterContext paramFilterContext)
{
if (mProgram != null) {
updateProgramParams();
}
}
public FrameFormat getOutputFormat(String paramString, FrameFormat paramFrameFormat)
{
return paramFrameFormat;
}
public void initProgram(FilterContext paramFilterContext, int paramInt)
{
if (paramInt == 3)
{
paramFilterContext = new ShaderProgram(paramFilterContext, "precision mediump float;\nuniform sampler2D tex_sampler_0;\nuniform sampler2D tex_sampler_1;\nuniform float intensity;\nvarying vec2 v_texcoord;\nvoid main() {\n vec4 color = texture2D(tex_sampler_0, v_texcoord);\n vec4 mask = texture2D(tex_sampler_1, v_texcoord);\n if (mask.a > 0.0) {\n float green_blue = color.g + color.b;\n float red_intensity = color.r / green_blue;\n if (red_intensity > intensity) {\n color.r = 0.5 * green_blue;\n }\n }\n gl_FragColor = color;\n}\n");
paramFilterContext.setMaximumTileSize(mTileSize);
mProgram = paramFilterContext;
mProgram.setHostValue("intensity", Float.valueOf(1.3F));
mTarget = paramInt;
return;
}
paramFilterContext = new StringBuilder();
paramFilterContext.append("Filter RedEye does not support frames of target ");
paramFilterContext.append(paramInt);
paramFilterContext.append("!");
throw new RuntimeException(paramFilterContext.toString());
}
public void process(FilterContext paramFilterContext)
{
Frame localFrame1 = pullInput("image");
FrameFormat localFrameFormat = localFrame1.getFormat();
Frame localFrame2 = paramFilterContext.getFrameManager().newFrame(localFrameFormat);
if ((mProgram == null) || (localFrameFormat.getTarget() != mTarget)) {
initProgram(paramFilterContext, localFrameFormat.getTarget());
}
if ((localFrameFormat.getWidth() != mWidth) || (localFrameFormat.getHeight() != mHeight))
{
mWidth = localFrameFormat.getWidth();
mHeight = localFrameFormat.getHeight();
}
createRedEyeFrame(paramFilterContext);
paramFilterContext = mRedEyeFrame;
mProgram.process(new Frame[] { localFrame1, paramFilterContext }, localFrame2);
pushOutput("image", localFrame2);
localFrame2.release();
mRedEyeFrame.release();
mRedEyeFrame = null;
}
public void setupPorts()
{
addMaskedInputPort("image", ImageFormat.create(3));
addOutputBasedOnInput("image", "image");
}
}
|
[
"kailash.sudhakar@gmail.com"
] |
kailash.sudhakar@gmail.com
|
d2c2dbce78362232ebbaf5328ccf70c487c79572
|
e6f5db223205e9af6af0fc84a87b83a60d9879a2
|
/app/src/main/java/com/zimi/zimixing/widget/CustomViewPager4Height.java
|
0cd33ceb63f87ac89ac157ffd7284602eeae406d
|
[] |
no_license
|
tanpangzi/purple_http_whole
|
b980e18cb56bb8d52d2da331d2a24770c0821a5f
|
c7b4234a9b649437eee1b73a8375747854f2d646
|
refs/heads/master
| 2020-03-21T17:05:37.379846
| 2018-06-27T01:48:23
| 2018-06-27T01:48:23
| 138,812,811
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,690
|
java
|
package com.zimi.zimixing.widget;
import android.annotation.SuppressLint;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
/**
* ViewPager wrapContent解决方案 (自定义控制左右滑动事件)
*
* <br> Author: 叶青
* <br> Version: 1.0.0
* <br> Date: 2016年12月11日
* <br> Copyright: Copyright © 2016 xTeam Technology. All rights reserved.
*/
public class CustomViewPager4Height extends ViewPager {
public CustomViewPager4Height(Context context) {
super(context);
}
public CustomViewPager4Height(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int height = 0;
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
int h = child.getMeasuredHeight();
if (h > height)
height = h;
}
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
/** false不滑动 */
private boolean enabled = true;
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouchEvent(MotionEvent event) {
if (this.enabled) {
return super.onTouchEvent(event);
}
return false;
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
if (this.enabled) {
return super.onInterceptTouchEvent(event);
}
return false;
}
public void setPagingEnabled(boolean enabled) {
this.enabled = enabled;
}
}
|
[
"hbtanjun2012@126.com"
] |
hbtanjun2012@126.com
|
126ce6d1a4c239c1d0875eeb78b141cc36f72fb5
|
47208b10a7d5d56e60d26f58e3fe6182549c3564
|
/app/src/main/java/com/fanchen/imovie/activity/BindPhoneActivity.java
|
27e234ca5b1c694a573cb4aae9df8928c7f48436
|
[] |
no_license
|
wanwenxin/Bangumi
|
add4016f286e4bafca4174b8e711a1df43eba5ba
|
b8ee2b3ba0ce8ecf7a4ebc580694b2f3499bc5b9
|
refs/heads/master
| 2021-05-07T14:11:13.187015
| 2017-11-06T03:34:33
| 2017-11-06T03:34:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,073
|
java
|
package com.fanchen.imovie.activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.fanchen.imovie.R;
import com.fanchen.imovie.base.BaseToolbarActivity;
import com.fanchen.imovie.entity.bmob.User;
import com.fanchen.imovie.util.DialogUtil;
import com.fanchen.imovie.util.KeyBoardUtils;
import com.fanchen.imovie.util.SmsUtil;
import com.fanchen.imovie.view.VerificationButton;
import butterknife.InjectView;
import cn.smssdk.SMSSDK;
/**
* Created by fanchen on 2017/10/31.
*/
public class BindPhoneActivity extends BaseToolbarActivity implements View.OnClickListener, TextWatcher {
@InjectView(R.id.tv_cannotverification)
protected TextView mCannotTextView;
@InjectView(R.id.et_phonenumber)
EditText mPhoneEditText;
@InjectView(R.id.find_password_delete)
ImageView mDeleteImageView;
@InjectView(R.id.et_verification)
EditText mVerificationEditText;
@InjectView(R.id.btn_sendmessage)
VerificationButton mSendButton;
@InjectView(R.id.btn_bind)
Button mBindButton;
/**
* @param context
*/
public static void startActivity(Context context) {
Intent intent = new Intent(context, BindPhoneActivity.class);
context.startActivity(intent);
}
@Override
protected String getActivityTitle() {
return getString(R.string.bindphone);
}
@Override
protected int getLayout() {
return R.layout.activity_bindphone;
}
@Override
protected void setListener() {
super.setListener();
mDeleteImageView.setOnClickListener(this);
mBindButton.setOnClickListener(this);
mCannotTextView.setOnClickListener(this);
mSendButton.setOnClickListener(this);
mPhoneEditText.addTextChangedListener(this);
mVerificationEditText.addTextChangedListener(this);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SmsUtil.register();
registerReceiver(msgReceiver, new IntentFilter("android.provider.Telephony.SMS_RECEIVED"));
}
@Override
protected void onDestroy() {
super.onDestroy();
SmsUtil.unRegister();
unregisterReceiver(msgReceiver);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.find_password_delete:
mPhoneEditText.setText(null);
break;
case R.id.btn_sendmessage:
KeyBoardUtils.closeKeyboard(this, mPhoneEditText);
KeyBoardUtils.closeKeyboard(this, mVerificationEditText);
String phone = getEditTextString(mPhoneEditText);
if (!TextUtils.isEmpty(phone) && phone.length() == 11 && phone.startsWith("1")) {
//获取验证码
SmsUtil.getVerificationCode(phone, msmListener);
} else {
mSendButton.setStopDown(true);
showSnackbar(getString(R.string.error_phone));
}
break;
case R.id.tv_cannotverification:
DialogUtil.showBottomCancleDialog(this);
break;
case R.id.btn_bind:
KeyBoardUtils.closeKeyboard(this, mPhoneEditText);
KeyBoardUtils.closeKeyboard(this, mVerificationEditText);
String phoneNamber = getEditTextString(mPhoneEditText);
String verification = getEditTextString(mVerificationEditText);
if (TextUtils.isEmpty(phoneNamber) || TextUtils.isEmpty(verification)) {
showSnackbar(getString(R.string.error_null));
return;
}
SmsUtil.submitVerificationCode(phoneNamber, verification);
break;
}
}
@Override
public void afterTextChanged(Editable s) {
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (!TextUtils.isEmpty(getEditTextString(mPhoneEditText)) && !TextUtils.isEmpty(getEditTextString(mVerificationEditText))) {
mBindButton.setEnabled(true);
mBindButton.setClickable(true);
} else {
mBindButton.setEnabled(false);
mBindButton.setClickable(false);
}
if (!TextUtils.isEmpty(getEditTextString(mPhoneEditText))) {
mDeleteImageView.setVisibility(View.VISIBLE);
} else {
mDeleteImageView.setVisibility(View.GONE);
}
}
/**
* 短信广播,自动填充验证码
*
* @author fanchen
*/
private BroadcastReceiver msgReceiver = new BroadcastReceiver() {
public final static String SMS_ACTION = "android.provider.Telephony.SMS_RECEIVED";
@Override
public void onReceive(Context context, Intent intent) {
if (intent == null || intent.getExtras() == null) return;
// 短信广播
if (intent.getAction().equals(SMS_ACTION)) {
// 获取拦截到的短信数据
String extractCode = SmsUtil.extractCode(intent);
mVerificationEditText.setText(extractCode);
}
}
};
private SmsUtil.OnMsmListener msmListener = new SmsUtil.OnMsmListener() {
@Override
public void onSuccess(int event) {
if (event == SMSSDK.EVENT_SUBMIT_VERIFICATION_CODE) {
// 验证成功回调
String phone = getEditTextString(mPhoneEditText);
User loginUser = getLoginUser();
loginUser.setPhone(phone);
loginUser.update(updateListener);
} else {
showSnackbar(getString(R.string.get_code_success));
}
}
@Override
public void onFinal(Throwable e) {
showSnackbar(e.toString());
}
};
private User.OnUpdateListener updateListener = new User.OnUpdateListener() {
@Override
public void onStart() {
DialogUtil.showProgressDialog(BindPhoneActivity.this,getString(R.string.loading));
}
@Override
public void onFinish() {
DialogUtil.closeProgressDialog();
}
@Override
public void onSuccess() {
mPhoneEditText.setText("");
mVerificationEditText.setText("");
showSnackbar(getString(R.string.bind_success));
}
@Override
public void onFailure(int i, String s) {
showSnackbar(s);
}
};
}
|
[
"happy1993_chen@sina.cn"
] |
happy1993_chen@sina.cn
|
543549fb918035982add431c3e2918bee9f4e705
|
42277e19adfb620aadc391868050af44bf8b060f
|
/app/src/main/java/com/ljcs/cxwl/ui/activity/other/contract/FamilyRegisterStatusContract.java
|
d68f22eeaa047fb63ef2308421d9627ebd850948
|
[] |
no_license
|
18670819116/goufang
|
4da367cfba931ed2942e075e74707577bb3e1422
|
080b0776b6846924a47b3cfe39be5c4dd564f6ec
|
refs/heads/master
| 2020-03-24T18:05:33.172926
| 2018-07-30T11:13:59
| 2018-07-30T11:13:59
| 142,882,425
| 1
| 1
| null | 2018-07-30T13:53:34
| 2018-07-30T13:53:34
| null |
UTF-8
|
Java
| false
| false
| 1,022
|
java
|
package com.ljcs.cxwl.ui.activity.other.contract;
import com.ljcs.cxwl.entity.AllInfo;
import com.ljcs.cxwl.entity.ScanBean;
import com.ljcs.cxwl.ui.activity.base.BasePresenter;
import com.ljcs.cxwl.ui.activity.base.BaseView;
import java.util.Map;
/**
* @author xlei
* @Package The contract for FamilyRegisterStatusActivity
* @Description: $description
* @date 2018/07/05 10:00:42
*/
public interface FamilyRegisterStatusContract {
interface View extends BaseView<FamilyRegisterStatusContractPresenter> {
/**
*
*/
void showProgressDialog();
/**
*
*/
void closeProgressDialog();
void allInfoSuccess(AllInfo baseEntity);
void intiViews();
void isScanSuccess(ScanBean baseEntity);
}
interface FamilyRegisterStatusContractPresenter extends BasePresenter {
// /**
// *
// */
// void getBusinessInfo(Map map);
void allInfo(Map map);
void isScan();
}
}
|
[
"3401794305@qq.com"
] |
3401794305@qq.com
|
372236abc2a9036e7eeb319a7c7bac3c5c417f4c
|
9cecda2b74ce148425eed8b6fc47ab835c25cde1
|
/src/main/java/com/volmit/react/api/ChunkIssue.java
|
4e6823dacdc84cd92a9df68376a3aa4cba8a775f
|
[
"LicenseRef-scancode-unknown-license-reference",
"WTFPL"
] |
permissive
|
yeojhenrie/React
|
7d787c02852655199fc76d1a9538aad7245cd970
|
4fcfc5b5b54f34316654931655f07d8aa29f978b
|
refs/heads/master
| 2022-12-14T20:57:35.142811
| 2020-09-02T12:44:25
| 2020-09-02T12:44:25
| 292,278,426
| 0
| 0
|
WTFPL
| 2020-09-02T12:36:07
| 2020-09-02T12:36:06
| null |
UTF-8
|
Java
| false
| false
| 787
|
java
|
package com.volmit.react.api;
import com.volmit.react.util.F;
public enum ChunkIssue
{
ENTITY,
HOPPER,
TNT,
REDSTONE,
FLUID,
PHYSICS;
public String toName()
{
return F.capitalize(name().toLowerCase());
}
public double getMS()
{
switch(this)
{
case ENTITY:
return SampledType.ENTITY_TIME.get().getValue();
case FLUID:
return SampledType.FLUID_TIME.get().getValue() / 1000000.0;
case HOPPER:
return SampledType.HOPPER_TIME.get().getValue() / 1000000.0;
case PHYSICS:
return SampledType.PHYSICS_TIME.get().getValue() / 1000000.0;
case REDSTONE:
return SampledType.REDSTONE_TIME.get().getValue() / 1000000.0;
case TNT:
return SampledType.EXPLOSION_TIME.get().getValue() / 1000000.0;
default:
break;
}
return 0;
}
}
|
[
"danielmillst@gmail.com"
] |
danielmillst@gmail.com
|
bd9844d18c5dddc1cc5e0d91a447e4aca9d3d254
|
6e3fd7897d7c58138063a82ce345f9754ea583b3
|
/letsgo-core/src/main/java/com/umessage/letsgo/core/errorhandler/utils/AjaxUtils.java
|
b86e0aa58a84d1bbcff63db5e5e3a9ff16b4ba4f
|
[] |
no_license
|
shuchongqj/letsgo
|
a4c717fb7b1cee0c43602bc5babd1b87525524f2
|
6921be8c3e4fc156542937b5e009eedcb7fc4456
|
refs/heads/master
| 2020-06-04T20:05:54.031443
| 2017-03-22T05:44:35
| 2017-03-22T05:44:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 873
|
java
|
package com.umessage.letsgo.core.errorhandler.utils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.request.WebRequest;
public class AjaxUtils {
public static boolean isAjaxRequest(WebRequest request) {
boolean isAjax = false;
if (request.getHeader("X-Requested-With") != null
&& request.getHeader("X-Requested-With").indexOf("XMLHttpRequest") > -1) {
isAjax = true;
}
return isAjax;
}
public static boolean isAjaxRequest(HttpServletRequest request) {
boolean isAjax = false;
if (request.getHeader("X-Requested-With") != null
&& request.getHeader("X-Requested-With").indexOf("XMLHttpRequest") > -1) {
isAjax = true;
}
return isAjax;
}
public static boolean isAjaxUploadRequest(WebRequest webRequest) {
return webRequest.getParameter("ajaxUpload") != null;
}
private AjaxUtils() {}
}
|
[
"y_gaofei@163.com"
] |
y_gaofei@163.com
|
19a87b2215f3dc687192376af02f2e4e63cf71f3
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/sns/ui/widget/ad/ScrollableLayout$a.java
|
247d2bb291bcdc50d3ea542e6708cf5778a199ab
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 306
|
java
|
package com.tencent.mm.plugin.sns.ui.widget.ad;
public abstract interface ScrollableLayout$a {}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mm.plugin.sns.ui.widget.ad.ScrollableLayout.a
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
1d8b5ca03c7cef2abca6bb20381db15361b58164
|
d80382858e64053d169e2a2bf58130352dd5fe47
|
/03eureka-server/src/main/java/com/cloud/web/controller/HelloController.java
|
d568db3574088805ee6042920bee579f61922630
|
[] |
no_license
|
JeeLearner/spring-cloud
|
68f4f8cc53629915729f90658456b1727187ff9d
|
fee2d193d29fda4c5eb1d13500377c4bdd5f1029
|
refs/heads/master
| 2021-09-03T12:29:39.971739
| 2018-01-09T04:05:37
| 2018-01-09T04:05:37
| 116,462,314
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 320
|
java
|
package com.cloud.web.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@RequestMapping(value = "/hello")
public String hello(){
return "hello Spring Cloud";
}
}
|
[
"15501112566@163.com"
] |
15501112566@163.com
|
5c90f216dbb88064a7fdac9e2840fdbca91baf2a
|
6b5ea9893aefcc09db5a0e693519bd016b32144d
|
/app/src/main/java/com/doctoror/fuckoffmusicplayer/library/recentalbums/RecentAlbumsFragment.java
|
aace5b7cf0e8c8ed60d654f02d7d961145ccd25e
|
[
"Apache-2.0"
] |
permissive
|
likedune/PainlessMusicPlayer
|
ee7608ba5030d348e3f5381f3090978adfddd960
|
4809186b3224e8c1b44ba469e6d52af255592a2a
|
refs/heads/master
| 2021-01-22T19:09:06.850940
| 2017-02-13T08:21:15
| 2017-02-13T08:21:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,547
|
java
|
/*
* Copyright (C) 2017 Yaroslav Mytkalyk
*
* 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.doctoror.fuckoffmusicplayer.library.recentalbums;
import com.doctoror.fuckoffmusicplayer.db.albums.AlbumsProvider;
import com.doctoror.fuckoffmusicplayer.di.DaggerHolder;
import com.doctoror.fuckoffmusicplayer.library.albums.conditional.ConditionalAlbumListFragment;
import android.database.Cursor;
import android.os.Bundle;
import android.support.annotation.Nullable;
import javax.inject.Inject;
import rx.Observable;
/**
* Shows recently played albums
*/
public final class RecentAlbumsFragment extends ConditionalAlbumListFragment {
@Inject
AlbumsProvider mAlbumsProvider;
@Override
public void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DaggerHolder.getInstance(getActivity()).mainComponent().inject(this);
}
@Override
protected Observable<Cursor> load() {
return mAlbumsProvider.loadRecentlyPlayedAlbums();
}
}
|
[
"docd1990@gmail.com"
] |
docd1990@gmail.com
|
aa5d7a78730120704efbcd3683330c26c58ec9ca
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/elastic--elasticsearch/a95d4f4ee7e7ada4b1ddec96b8deef140f96c1a7/before/IngestDisabledIT.java
|
aacb7aa5a7641bef5199019a02455f728aff2e80
|
[] |
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
| 1,512
|
java
|
/*
* Licensed to Elasticsearch 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.smoketest;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
public class IngestDisabledIT extends ESRestTestCase {
public IngestDisabledIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
return ESRestTestCase.createParameters(0, 1);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
ed4cbdd91a38f38fc4937a32546e2b230a4e2574
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Framework/System.Workflow.Runtime,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35/system/workflow/runtime/hosting/SqlPersistenceWorkflowInstanceDescription.java
|
7c1c97733f5da8366ac40008efb387f612c6f7a6
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,430
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* 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.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package system.workflow.runtime.hosting;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.data.sqltypes.SqlDateTime;
import system.Guid;
import system.workflow.runtime.WorkflowStatus;
/**
* The base .NET class managing System.Workflow.Runtime.Hosting.SqlPersistenceWorkflowInstanceDescription, System.Workflow.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Extends {@link NetObject}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Workflow.Runtime.Hosting.SqlPersistenceWorkflowInstanceDescription" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Workflow.Runtime.Hosting.SqlPersistenceWorkflowInstanceDescription</a>
*/
public class SqlPersistenceWorkflowInstanceDescription extends NetObject {
/**
* Fully assembly qualified name: System.Workflow.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
*/
public static final String assemblyFullName = "System.Workflow.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
/**
* Assembly name: System.Workflow.Runtime
*/
public static final String assemblyShortName = "System.Workflow.Runtime";
/**
* Qualified class name: System.Workflow.Runtime.Hosting.SqlPersistenceWorkflowInstanceDescription
*/
public static final String className = "System.Workflow.Runtime.Hosting.SqlPersistenceWorkflowInstanceDescription";
static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName);
/**
* The type managed from JCOBridge. See {@link JCType}
*/
public static JCType classType = createType();
static JCEnum enumInstance = null;
JCObject classInstance = null;
static JCType createType() {
try {
return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
} catch (JCException e) {
return null;
}
}
void addReference(String ref) throws Throwable {
try {
bridge.AddReference(ref);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SqlPersistenceWorkflowInstanceDescription(Object instance) throws Throwable {
super(instance);
if (instance instanceof JCObject) {
classInstance = (JCObject) instance;
} else
throw new Exception("Cannot manage object, it is not a JCObject");
}
public String getJCOAssemblyName() {
return assemblyFullName;
}
public String getJCOClassName() {
return className;
}
public String getJCOObjectName() {
return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
}
public Object getJCOInstance() {
return classInstance;
}
public void setJCOInstance(JCObject instance) {
classInstance = instance;
super.setJCOInstance(classInstance);
}
public JCType getJCOType() {
return classType;
}
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link SqlPersistenceWorkflowInstanceDescription}, a cast assert is made to check if types are compatible.
*/
public static SqlPersistenceWorkflowInstanceDescription cast(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new SqlPersistenceWorkflowInstanceDescription(from.getJCOInstance());
}
// Constructors section
public SqlPersistenceWorkflowInstanceDescription() throws Throwable {
}
// Methods section
// Properties section
public boolean getIsBlocked() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (boolean)classInstance.Get("IsBlocked");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SqlDateTime getNextTimerExpiration() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("NextTimerExpiration");
return new SqlDateTime(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Guid getWorkflowInstanceId() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("WorkflowInstanceId");
return new Guid(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String getSuspendOrTerminateDescription() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Get("SuspendOrTerminateDescription");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public WorkflowStatus getStatus() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("Status");
return new WorkflowStatus(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Instance Events section
}
|
[
"mario.mastrodicasa@masesgroup.com"
] |
mario.mastrodicasa@masesgroup.com
|
2f2db37b22b14d8084ff0b25713d83042c43b68b
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/29_apbsmem-jahuwaldt.plot.SimplePlotXY-0.5-1/jahuwaldt/plot/SimplePlotXY_ESTest.java
|
e262c9c13036483c1f3d3158b28d13c7d478a6b3
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 644
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Oct 29 08:24:07 GMT 2019
*/
package jahuwaldt.plot;
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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class SimplePlotXY_ESTest extends SimplePlotXY_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
1f39410587028ad8193f6acc237bf5a8374685b1
|
b7876be15a5d5b4747fcfcdd508bba3763487270
|
/other/Android-VideoTube/app/build/generated/source/buildConfig/debug/com/echessa/videotube/BuildConfig.java
|
1ff534d0c01451181d29a08f225703c0ebf27b3a
|
[] |
no_license
|
RinatB2017/Android_github
|
4f16fc9e7593bc305943f3fa09ef468272548817
|
cf3b6caed24eab2138ccfa0fd62d531d0ce56b89
|
refs/heads/master
| 2021-06-05T23:06:42.640271
| 2021-05-01T12:04:44
| 2021-05-01T12:04:44
| 146,088,476
| 0
| 0
| null | 2020-11-18T07:10:40
| 2018-08-25T11:06:06
|
Java
|
UTF-8
|
Java
| false
| false
| 449
|
java
|
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.echessa.videotube;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.echessa.videotube";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
|
[
"tux4096@gmail.com"
] |
tux4096@gmail.com
|
4803476170409693d10315c52297f84493c15741
|
2454b33c2f9035395fc4322aa8b7144bc90fccc3
|
/src/br/inf/portalfiscal/cte300a/retinutcte/ReferenceType.java
|
2cf372559996d5f8dd2c77a9f74462be9d3392ec
|
[] |
no_license
|
roneison85/cte-lib-3.00a
|
2173b6c907f85b18289c0a6937a9f965c4509e6d
|
7506efa8b3536c80a08a425819557f997bf26e1a
|
refs/heads/master
| 2020-06-14T06:32:59.697191
| 2019-07-02T20:59:18
| 2019-07-02T20:59:18
| 194,932,067
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 7,597
|
java
|
//
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
// Gerado em: 2019.07.02 às 05:27:41 PM BRT
//
package br.inf.portalfiscal.cte300a.retinutcte;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Classe Java de ReferenceType complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType name="ReferenceType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Transforms" type="{http://www.w3.org/2000/09/xmldsig#}TransformsType"/>
* <element name="DigestMethod">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" fixed="http://www.w3.org/2000/09/xmldsig#sha1" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* <element name="DigestValue" type="{http://www.w3.org/2000/09/xmldsig#}DigestValueType"/>
* </sequence>
* <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* <attribute name="URI" use="required">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyURI">
* <minLength value="2"/>
* </restriction>
* </simpleType>
* </attribute>
* <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ReferenceType", propOrder = {
"transforms",
"digestMethod",
"digestValue"
})
public class ReferenceType {
@XmlElement(name = "Transforms", required = true)
protected TransformsType transforms;
@XmlElement(name = "DigestMethod", required = true)
protected ReferenceType.DigestMethod digestMethod;
@XmlElement(name = "DigestValue", required = true)
protected byte[] digestValue;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
@XmlAttribute(name = "URI", required = true)
protected String uri;
@XmlAttribute(name = "Type")
@XmlSchemaType(name = "anyURI")
protected String type;
/**
* Obtém o valor da propriedade transforms.
*
* @return
* possible object is
* {@link TransformsType }
*
*/
public TransformsType getTransforms() {
return transforms;
}
/**
* Define o valor da propriedade transforms.
*
* @param value
* allowed object is
* {@link TransformsType }
*
*/
public void setTransforms(TransformsType value) {
this.transforms = value;
}
/**
* Obtém o valor da propriedade digestMethod.
*
* @return
* possible object is
* {@link ReferenceType.DigestMethod }
*
*/
public ReferenceType.DigestMethod getDigestMethod() {
return digestMethod;
}
/**
* Define o valor da propriedade digestMethod.
*
* @param value
* allowed object is
* {@link ReferenceType.DigestMethod }
*
*/
public void setDigestMethod(ReferenceType.DigestMethod value) {
this.digestMethod = value;
}
/**
* Obtém o valor da propriedade digestValue.
*
* @return
* possible object is
* byte[]
*/
public byte[] getDigestValue() {
return digestValue;
}
/**
* Define o valor da propriedade digestValue.
*
* @param value
* allowed object is
* byte[]
*/
public void setDigestValue(byte[] value) {
this.digestValue = value;
}
/**
* Obtém o valor da propriedade id.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Define o valor da propriedade id.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Obtém o valor da propriedade uri.
*
* @return
* possible object is
* {@link String }
*
*/
public String getURI() {
return uri;
}
/**
* Define o valor da propriedade uri.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setURI(String value) {
this.uri = value;
}
/**
* Obtém o valor da propriedade type.
*
* @return
* possible object is
* {@link String }
*
*/
public String getType() {
return type;
}
/**
* Define o valor da propriedade type.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* <p>Classe Java de anonymous complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" fixed="http://www.w3.org/2000/09/xmldsig#sha1" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
public static class DigestMethod {
@XmlAttribute(name = "Algorithm", required = true)
@XmlSchemaType(name = "anyURI")
protected String algorithm;
/**
* Obtém o valor da propriedade algorithm.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAlgorithm() {
if (algorithm == null) {
return "http://www.w3.org/2000/09/xmldsig#sha1";
} else {
return algorithm;
}
}
/**
* Define o valor da propriedade algorithm.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAlgorithm(String value) {
this.algorithm = value;
}
}
}
|
[
"roneison.machado@gmail.com"
] |
roneison.machado@gmail.com
|
488a26d7a1303bfec99707df177f0e1bfda58be5
|
ddfb3a710952bf5260dfecaaea7d515526f92ebb
|
/build/tmp/expandedArchives/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-sources.jar_c582e790131b6dd3325b282fce9d2d3d/net/minecraft/block/WitherSkeletonWallSkullBlock.java
|
5c1f5c9196e6d13ff75c06c64239d1fd96d32069
|
[
"Apache-2.0"
] |
permissive
|
TheDarkRob/Sgeorsge
|
88e7e39571127ff3b14125620a6594beba509bd9
|
307a675cd3af5905504e34717e4f853b2943ba7b
|
refs/heads/master
| 2022-11-25T06:26:50.730098
| 2020-08-03T15:42:23
| 2020-08-03T15:42:23
| 284,748,579
| 0
| 0
|
Apache-2.0
| 2020-08-03T16:19:36
| 2020-08-03T16:19:35
| null |
UTF-8
|
Java
| false
| false
| 748
|
java
|
package net.minecraft.block;
import javax.annotation.Nullable;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class WitherSkeletonWallSkullBlock extends WallSkullBlock {
protected WitherSkeletonWallSkullBlock(Block.Properties properties) {
super(SkullBlock.Types.WITHER_SKELETON, properties);
}
/**
* Called by ItemBlocks after a block is set in the world, to allow post-place logic
*/
public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) {
Blocks.WITHER_SKELETON_SKULL.onBlockPlacedBy(worldIn, pos, state, placer, stack);
}
}
|
[
"iodiceandrea251@gmail.com"
] |
iodiceandrea251@gmail.com
|
e5d31743487b5fe9975f216e9a3e1a4a994af02b
|
2610e3bccddf5a695cf58adc28f56e1858b94c3c
|
/microservice-loverent-order-server-v1/src/main/java/org/gz/order/server/service/RentInvoiceService.java
|
9448fd7d0e7ee3c3fc18081560acc29682399bc8
|
[] |
no_license
|
song121382/aizuji
|
812958c3020e37c052d913cfdd3807b1a55b2115
|
5ec44cf60945d6ff017434d5f321c0bcf3f111f1
|
refs/heads/master
| 2020-04-08T07:34:00.885177
| 2018-07-17T08:37:26
| 2018-07-17T08:37:26
| 159,143,253
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 472
|
java
|
package org.gz.order.server.service;
import java.util.List;
import org.gz.order.common.entity.RentInvoice;
public interface RentInvoiceService {
/**
* 按条件查询发票
* @param dto
* @return
*/
public List<RentInvoice> queryList(RentInvoice dto);
/**
* 通过订单编号更新发票信息
*
* @param rentInvoice
* @return
* @throws createBy:临时工 createDate:2018年3月29日
*/
int update(RentInvoice rentInvoice);
}
|
[
"daiqw713@outlook.com"
] |
daiqw713@outlook.com
|
075c73c685dd0c3a281eda0c83c2e4a0c898eb6e
|
24f511358483c94b0282fd15b0b16d439e33e270
|
/jrds-munin/src/main/java/jrds/probe/munin/Munin.java
|
6d077f58766b1705222da1bc7511660e8ca4d9c2
|
[] |
no_license
|
allwaysoft/jrds
|
2f4cb8145cf0d4d46f4f36308e9f1a8a5ae4ab72
|
5cbce610d3ac8728fc423d94e9d53dd511fb9a13
|
refs/heads/master
| 2023-01-29T07:16:00.281424
| 2020-12-12T21:41:27
| 2020-12-12T21:41:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,609
|
java
|
package jrds.probe.munin;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
import org.slf4j.event.Level;
import jrds.ProbeConnected;
import jrds.factories.ProbeMeta;
/**
* @author Fabrice Bacchella
*
*/
@ProbeMeta(discoverAgent = MuninDiscoverAgent.class)
public class Munin extends ProbeConnected<String, Number, MuninConnection> {
private static final Pattern COMMENT = Pattern.compile("#.*");
private static final Pattern VALUESUFFIX = Pattern.compile(".value");
public Munin() {
super(MuninConnection.class.getName());
}
@Override
public Map<String, Number> getNewSampleValuesConnected(MuninConnection cnx) {
MuninConnection.SocketChannels muninSocket = cnx.getConnection();
Map<String, Number> retValue = new HashMap<String, Number>();
String fetchList = getPd().getSpecific("fetch");
if (fetchList == null) {
log(Level.ERROR, "no fetch list defined");
return Collections.emptyMap();
}
try {
for(String currentFetch: fetchList.split(",")) {
muninSocket.out.println("fetch " + jrds.Util.parseTemplate(currentFetch.trim(), this));
String lastLine;
boolean dotFound = false;
while(! dotFound && ( lastLine = muninSocket.in.readLine()) != null ) {
lastLine = COMMENT.matcher(lastLine).replaceFirst("");
if (".".equals(lastLine)) {
dotFound = true;
} else {
String[] kvp = lastLine.split(" ");
if (kvp.length == 2) {
String name = kvp[0];
Number value = jrds.Util.parseStringNumber(kvp[1], Double.NaN);
if (name != null && value != null) {
String valueName = VALUESUFFIX.matcher(name).replaceFirst("");
retValue.put(valueName, value);
}
}
}
}
if (! dotFound) {
log(Level.WARN, "Munin connection finished early");
}
}
}
catch (IOException e) {
log(Level.ERROR, e, "Munin communication error: %s", e);
return Collections.emptyMap();
}
return retValue;
}
@Override
public String getSourceType() {
return "Munin";
}
}
|
[
"fbacchella@spamcop.net"
] |
fbacchella@spamcop.net
|
ea09ab28a7e8ce3759dd7ad4267bffdb492fabdf
|
d8beafce69f16034bb1d933105f6b035df90a991
|
/HW10/server/src/main/java/ru/photorex/server/events/BookCascadeDeleteListener.java
|
53fdbc053c5e035dea27008add6de18fdeb5a4a1
|
[] |
no_license
|
VertoBrat/2019-08-otus-spring-Merechko
|
ba5905dfec938a749f96620da54b64132722de87
|
7e8f87ce85979a37062cf85fd102af9417ce2995
|
refs/heads/master
| 2023-01-13T09:35:44.427118
| 2020-04-17T08:46:07
| 2020-04-17T08:46:07
| 204,907,903
| 0
| 1
| null | 2023-01-07T11:47:00
| 2019-08-28T10:39:38
|
Java
|
UTF-8
|
Java
| false
| false
| 837
|
java
|
package ru.photorex.server.events;
import lombok.RequiredArgsConstructor;
import lombok.val;
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
import org.springframework.data.mongodb.core.mapping.event.BeforeDeleteEvent;
import org.springframework.stereotype.Component;
import ru.photorex.server.model.Book;
import ru.photorex.server.repository.CommentRepository;
@Component
@RequiredArgsConstructor
public class BookCascadeDeleteListener extends AbstractMongoEventListener<Book> {
private final CommentRepository commentRepository;
@Override
public void onBeforeDelete(BeforeDeleteEvent<Book> event) {
super.onBeforeDelete(event);
val source = event.getSource();
String id = source.get("_id").toString();
commentRepository.removeByBookId(id);
}
}
|
[
"mfocus@mail.ru"
] |
mfocus@mail.ru
|
3025f9b24d78191c54987fb9d3f36e5ff66945c3
|
e9890e50ca11011bbb712fb1a84f8ddf63d23d44
|
/src/test/java/de/lernen/jhipster/config/WebConfigurerTestController.java
|
1d5526058b6b9e4907a8c3af514b395104a8d21c
|
[] |
no_license
|
TorstenVogt/jhipster-sample-application
|
5ec1aa8452dccce29ef833de2bcb099962032e3e
|
411a23971f65a1eee8af987d60f186273513f46c
|
refs/heads/master
| 2020-04-25T21:49:12.742215
| 2019-02-28T10:29:59
| 2019-02-28T10:29:59
| 173,091,710
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package de.lernen.jhipster.config;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class WebConfigurerTestController {
@GetMapping("/api/test-cors")
public void testCorsOnApiPath() {
}
@GetMapping("/test/test-cors")
public void testCorsOnOtherPath() {
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
390cbcb469de43eac87a5f1079fa755277e494b4
|
96021d2326fdd54a2a1390fc3bfdfad5ab5377f0
|
/rabbitmq/rabbit-parent/rabbit-task/src/main/java/com/fengxuechao/rabbit/task/enums/ElasticJobTypeEnum.java
|
4d49110ea8c8bd992d9061bef97f5b165ba6e2dd
|
[] |
no_license
|
littlefxc/foodie
|
41104fe0bc4e42df424d47aa9cf6678b50693579
|
30a5eea5b8c862cc8d4ab3007d14f79ad8a6bda1
|
refs/heads/master
| 2023-08-09T11:44:53.964605
| 2022-04-06T08:29:05
| 2022-04-06T08:29:05
| 235,483,621
| 3
| 1
| null | 2023-07-23T03:27:20
| 2020-01-22T02:26:58
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 569
|
java
|
package com.fengxuechao.rabbit.task.enums;
public enum ElasticJobTypeEnum {
SIMPLE("SimpleJob", "简单类型job"),
DATAFLOW("DataflowJob", "流式类型job"),
SCRIPT("ScriptJob", "脚本类型job");
private String type;
private String desc;
private ElasticJobTypeEnum(String type, String desc) {
this.type = type;
this.desc = desc;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
|
[
"12741723+littlefxc@users.noreply.github.com"
] |
12741723+littlefxc@users.noreply.github.com
|
032b6357474fd5a70b6237258bd8e95d2acfa902
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Cli-34/org.apache.commons.cli.OptionBuilder/BBC-F0-opt-50/tests/19/org/apache/commons/cli/OptionBuilder_ESTest_scaffolding.java
|
938ca66c9b6307a171729ef660371d09dd201576
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 3,373
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Oct 21 03:13:28 GMT 2021
*/
package org.apache.commons.cli;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class OptionBuilder_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.cli.OptionBuilder";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(OptionBuilder_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.cli.OptionBuilder",
"org.apache.commons.cli.OptionValidator",
"org.apache.commons.cli.Option"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(OptionBuilder_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.cli.OptionBuilder",
"org.apache.commons.cli.Option",
"org.apache.commons.cli.OptionValidator"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
afdbd7a49a0e2cd712db679f041ddf2e10b657a5
|
6e966225b3b05b07dc6208abc2cf27c4041db38a
|
/src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSItemBanner.java
|
9c0213cd521491e79d1fbea2077c16ba419a1b50
|
[
"Apache-2.0"
] |
permissive
|
Vilsol/NMSWrapper
|
a73a2c88fe43384139fefe4ce2b0586ac6421539
|
4736cca94f5a668e219a78ef9ae4746137358e6e
|
refs/heads/master
| 2021-01-10T14:34:41.673024
| 2016-04-11T13:02:21
| 2016-04-11T13:02:22
| 51,975,408
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,506
|
java
|
package me.vilsol.nmswrapper.wraps.unparsed;
import me.vilsol.nmswrapper.*;
import me.vilsol.nmswrapper.reflections.*;
import me.vilsol.nmswrapper.wraps.*;
@ReflectiveClass(name = "ItemBanner")
public class NMSItemBanner extends NMSItemBlock {
public NMSItemBanner(Object nmsObject){
super(nmsObject);
}
/**
* TODO Find correct name
* @see net.minecraft.server.v1_9_R1.ItemBanner#a(net.minecraft.server.v1_9_R1.ItemStack)
*/
@ReflectiveMethod(name = "a", types = {NMSItemStack.class})
public String a(NMSItemStack itemStack){
return (String) NMSWrapper.getInstance().exec(nmsObject, itemStack);
}
/**
* @see net.minecraft.server.v1_9_R1.ItemBanner#interactWith(net.minecraft.server.v1_9_R1.ItemStack, net.minecraft.server.v1_9_R1.EntityHuman, net.minecraft.server.v1_9_R1.World, net.minecraft.server.v1_9_R1.BlockPosition, net.minecraft.server.v1_9_R1.EnumDirection, float, float, float)
*/
@ReflectiveMethod(name = "interactWith", types = {NMSItemStack.class, NMSEntityHuman.class, NMSWorld.class, NMSBlockPosition.class, NMSEnumDirection.class, float.class, float.class, float.class})
public boolean interactWith(NMSItemStack itemStack, NMSEntityHuman entityHuman, NMSWorld world, NMSBlockPosition blockPosition, NMSEnumDirection enumDirection, float f, float f1, float f2){
return (boolean) NMSWrapper.getInstance().exec(nmsObject, itemStack, entityHuman, world, blockPosition, enumDirection, f, f1, f2);
}
}
|
[
"vilsol2000@gmail.com"
] |
vilsol2000@gmail.com
|
2bd404fbca318748ad335aed985ec38574f125f2
|
83abf148a03bd22750831b68d6fa6f985abba5cc
|
/netty-helloworld/src/main/java/com/sanshengshui/netty/client/Client.java
|
36347dc23ce85474f0ccb50c52f5f8ecefd2e708
|
[
"Apache-2.0"
] |
permissive
|
Jiapeng0902/netty-learning-example
|
f8d29fec41794efb6ee8f8e80fcc8f89bb83f75f
|
374f8e13f16dc76d66cf0413d3f4618b9e37742c
|
refs/heads/master
| 2020-07-27T20:46:26.780147
| 2019-09-18T04:07:25
| 2019-09-18T04:07:25
| 209,211,364
| 2
| 0
|
Apache-2.0
| 2019-09-18T03:42:42
| 2019-09-18T03:42:41
| null |
UTF-8
|
Java
| false
| false
| 1,710
|
java
|
package com.sanshengshui.netty.client;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public final class Client {
public static void main(String[] args) throws Exception {
EventLoopGroup group = new NioEventLoopGroup();
try {
Bootstrap b = new Bootstrap();
b.group(group)
.channel(NioSocketChannel.class)
.handler(new ClientInitializer());
Channel ch = b.connect("127.0.0.1",8888).sync().channel();
ChannelFuture lastWriteFuture = null;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
for (;;) {
String line = in.readLine();
if (line == null) {
break;
}
// Sends the received line to the server.
lastWriteFuture = ch.writeAndFlush(line + "\r\n");
// If user typed the 'bye' command, wait until the server closes
// the connection.
if ("bye".equals(line.toLowerCase())) {
ch.closeFuture().sync();
break;
}
}
// Wait until all messages are flushed before closing the channel.
if (lastWriteFuture != null) {
lastWriteFuture.sync();
}
} finally {
group.shutdownGracefully();
}
}
}
|
[
"lovewsic@gmail.com"
] |
lovewsic@gmail.com
|
338799bf767b75ed88e65d65cd31acfceb76e1aa
|
8727b1cbb8ca63d30340e8482277307267635d81
|
/PolarServer/src/com/game/marriage/message/ReqCockRedenvelopeToGameMessage.java
|
4d1d42e2f7239bfc39211a19682cd95ff2275078
|
[] |
no_license
|
taohyson/Polar
|
50026903ded017586eac21a7905b0f1c6b160032
|
b0617f973fd3866bed62da14f63309eee56f6007
|
refs/heads/master
| 2021-05-08T12:22:18.884688
| 2015-12-11T01:44:18
| 2015-12-11T01:44:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,230
|
java
|
package com.game.marriage.message;
import com.game.message.Message;
import org.apache.mina.core.buffer.IoBuffer;
/**
* @author Commuication Auto Maker
*
* @version 1.0.0
*
* 送上红包消息
*/
public class ReqCockRedenvelopeToGameMessage extends Message{
//结婚id
private long marriageid;
/**
* 写入字节缓存
*/
public boolean write(IoBuffer buf){
//结婚id
writeLong(buf, this.marriageid);
return true;
}
/**
* 读取字节缓存
*/
public boolean read(IoBuffer buf){
//结婚id
this.marriageid = readLong(buf);
return true;
}
/**
* get 结婚id
* @return
*/
public long getMarriageid(){
return marriageid;
}
/**
* set 结婚id
*/
public void setMarriageid(long marriageid){
this.marriageid = marriageid;
}
@Override
public int getId() {
return 163215;
}
@Override
public String getQueue() {
return null;
}
@Override
public String getServer() {
return null;
}
@Override
public String toString(){
StringBuffer buf = new StringBuffer("[");
//结婚id
buf.append("marriageid:" + marriageid +",");
if(buf.charAt(buf.length()-1)==',') buf.deleteCharAt(buf.length()-1);
buf.append("]");
return buf.toString();
}
}
|
[
"zhuyuanbiao@ZHUYUANBIAO.rd.com"
] |
zhuyuanbiao@ZHUYUANBIAO.rd.com
|
b3a02793321da038860b7814afe30a56cec28953
|
13ac75e91402706e2e45777ce963635f823d629f
|
/src/common/xap/lui/core/common/WdpWebAppContainer.java
|
a63b887c07fad9ffbcbe08b049811631a6de30a0
|
[] |
no_license
|
gufanyi/wdp
|
86085600062e6d42adcacaf46968854c8632ead1
|
9f69f798b799ab258ed57febad10495a65574c9a
|
refs/heads/master
| 2021-01-10T10:59:49.283794
| 2015-12-17T15:33:23
| 2015-12-17T15:33:23
| 47,962,667
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 819
|
java
|
package xap.lui.core.common;
import java.util.concurrent.ConcurrentHashMap;
public class WdpWebAppContainer {
public static WdpWebAppContainer instance = null;
public static String DefaultPortlAppName = "/portal";
public static String DefaultWFWAppName = "/wfw";
public static String DefaultWebContainerName = "webapps";
public ConcurrentHashMap<String, String> ctxs = new ConcurrentHashMap<String, String>();
private WdpWebAppContainer() {}
public static WdpWebAppContainer getInstace() {
if (instance == null) {
synchronized (WdpWebAppContainer.class) {
if (instance == null) {
instance = new WdpWebAppContainer();
}
}
}
return instance;
}
public void addWebApp(String ctx, String path) {
ctxs.put(ctx, path);
}
public String getWebApp(String key) {
return ctxs.get(key);
}
}
|
[
"303240304@qq.com"
] |
303240304@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.