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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
99a6c69c2b0bf1dc467f7d4d2ffe6d614e80e0be
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14462-17-2-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest.java
|
4514f6468f5da69783e8459c1aa7b47166d6f0a9
|
[] |
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
| 542
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Apr 09 06:04:38 UTC 2020
*/
package org.xwiki.job;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
b5baddc9896b0c044a87f9166b4d579cfba131be
|
4312a71c36d8a233de2741f51a2a9d28443cd95b
|
/RawExperiments/Lang/Lang39/3/AstorMain-lang_39/src/default/org/apache/commons/lang3/mutable/MutableObject.java
|
c2965db7f5073d7360d66e03aca2bad1db3962b0
|
[] |
no_license
|
SajjadZaidi/AutoRepair
|
5c7aa7a689747c143cafd267db64f1e365de4d98
|
e21eb9384197bae4d9b23af93df73b6e46bb749a
|
refs/heads/master
| 2021-05-07T00:07:06.345617
| 2017-12-02T18:48:14
| 2017-12-02T18:48:14
| 112,858,432
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,038
|
java
|
package org.apache.commons.lang3.mutable;
public class MutableObject<T> implements java.io.Serializable , org.apache.commons.lang3.mutable.Mutable<T> {
private static final long serialVersionUID = 86241875189L;
private T value;
public MutableObject() {
super();
}
public MutableObject(T value) {
super();
org.apache.commons.lang3.mutable.MutableObject.this.value = value;
}
public T getValue() {
return org.apache.commons.lang3.mutable.MutableObject.this.value;
}
public void setValue(T value) {
org.apache.commons.lang3.mutable.MutableObject.this.value = value;
}
public boolean equals(org.apache.commons.lang3.mutable.MutableObject<T> obj) {
if (obj == null) {
return false;
}
T other = obj.value;
return ((value) == other) || (((value) != null) && (value.equals(other)));
}
@java.lang.Override
public int hashCode() {
return (value) == null ? 0 : value.hashCode();
}
@java.lang.Override
public java.lang.String toString() {
return (value) == null ? "null" : value.toString();
}
}
|
[
"sajjad.syed@ucalgary.ca"
] |
sajjad.syed@ucalgary.ca
|
17a756057c8555b73a8bb1a4976e64e8db19e49a
|
a78b493dbdc0b0d49f5b85bf6f8d2120b3020909
|
/src/examples/openmp/SectionsBarrierDriver.java
|
7cbc3d68468cf984fc972f31b2df00cb5c0bf171
|
[] |
no_license
|
pdewan/GIPC
|
6998839307eedf37dda0451bfe331c45c0bfc1b5
|
46c18824b7a5cf73bf12122023a714194a464415
|
refs/heads/master
| 2022-04-26T20:32:09.075467
| 2022-04-03T19:48:39
| 2022-04-03T19:48:39
| 16,309,078
| 3
| 6
| null | 2017-05-10T23:29:18
| 2014-01-28T10:45:03
|
Java
|
UTF-8
|
Java
| false
| false
| 677
|
java
|
package examples.openmp;
import java.util.Arrays;
public class SectionsBarrierDriver {
public static void main (String[] args) {
float[] aFloats = {(float) 4.8, (float) 5.2, (float) 4.5, (float) 4.75, (float) 4.7};
SumToTextRound.trace("Single Threaded Case");
SumToTextRound.trace(aFloats);
SumToTextRound.sectionRoundSumAndToText(aFloats);
SumToTextRound.trace("Multi Threaded Case");
float[] aFloatsParallel = {(float) 4.8, (float) 5.2, (float) 4.5, (float) 4.75, (float) 4.7};
SumToTextRound.trace(aFloatsParallel);
ParallelSumToTextRound.sectionRoundSumAndToText(aFloatsParallel);
SumToTextRound.trace(aFloatsParallel);
}
}
|
[
"dewan@cs.unc.edu"
] |
dewan@cs.unc.edu
|
0582c1fbc7cbecf0bcd5a0dafebcd53e320e938b
|
7a2c91813117a8d949571521510895ee53daad49
|
/src/main/java/com/alipay/api/domain/CardFrontTextDTO.java
|
c494ca9efb5e39a86089e85d188f4699cf79162d
|
[
"Apache-2.0"
] |
permissive
|
dut3062796s/alipay-sdk-java-all
|
eb5afb5b570fb0deb40d8c960b85a01d13506568
|
559180f4c370f7fcfef67a1c559768d11475c745
|
refs/heads/master
| 2020-07-03T21:00:06.124387
| 2019-06-23T01:13:43
| 2019-06-23T01:13:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 819
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 卡面文案信息模型,展示在卡面上,形如:
学校 武汉理工大学
*
* @author auto create
* @since 1.0, 2019-03-06 21:51:57
*/
public class CardFrontTextDTO extends AlipayObject {
private static final long serialVersionUID = 3149225512384928123L;
/**
* 文案标签
*/
@ApiField("label")
private String label;
/**
* 展示文案
*/
@ApiField("value")
private String value;
public String getLabel() {
return this.label;
}
public void setLabel(String label) {
this.label = label;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
7f3d21b170fc6cdac045521254122a1a613ea76a
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13546-4-29-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/model/reference/WikiReference_ESTest.java
|
1e5072073cfefe2c028dcc8f8185d67a1fe6c541
|
[] |
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
| 895
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 17:41:41 UTC 2020
*/
package org.xwiki.model.reference;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.xwiki.model.reference.WikiReference;
import org.xwiki.wiki.descriptor.WikiDescriptor;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class WikiReference_ESTest extends WikiReference_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
WikiReference wikiReference0 = new WikiReference("U$tF-L[O?~YY");
WikiDescriptor wikiDescriptor0 = new WikiDescriptor("", "");
// Undeclared exception!
wikiDescriptor0.getReference();
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
39bb538ed2fd45d5ed125f6ec91fb975eef869c1
|
d7d7b0c25a923a699ffa579e1bab546435443302
|
/NGServer/Parameter/src/main/java/nari/parameter/bean/SelfDefField.java
|
dbd834cea24d2a51a0473a20fb6264c635b681c3
|
[] |
no_license
|
github188/test-3
|
9cd2417319161a014df8b54aa68579843ade8885
|
92c8b20ba19185fca1e0293fe7208102b338a9ca
|
refs/heads/master
| 2020-03-15T09:36:37.329325
| 2017-12-18T02:40:21
| 2017-12-18T02:40:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 672
|
java
|
package nari.parameter.bean;
public class SelfDefField {
private String selfFieldName = "";
private String selfFieldValue = "";
private String selfFieldAlias = "";
public String getSelfFieldName() {
return selfFieldName;
}
public void setSelfFieldName(String selfFieldName) {
this.selfFieldName = selfFieldName;
}
public String getSelfFieldValue() {
return selfFieldValue;
}
public void setSelfFieldValue(String selfFieldValue) {
this.selfFieldValue = selfFieldValue;
}
public String getSelfFieldAlias() {
return selfFieldAlias;
}
public void setSelfFieldAlias(String selfFieldAlias) {
this.selfFieldAlias = selfFieldAlias;
}
}
|
[
"645236219@qq.com"
] |
645236219@qq.com
|
ca2171a695b7493942dfd9e17afc8c4d490b13cd
|
cd9aa471d6ddabe0d5daca19ee0173e8ddc5747f
|
/mavenproject1/src/main/java/service/UserService.java
|
49b0e4252a90c6f7286ebde7eea63bd620cf8212
|
[] |
no_license
|
pablolfbs/javaNetBeans
|
60200ccbb85ca9324f431ffd56332198e98eba05
|
23e9cc49fd8ec91827405c6ec1f8179c233258cc
|
refs/heads/master
| 2020-03-19T10:40:19.874524
| 2018-07-01T19:46:15
| 2018-07-01T19:46:15
| 110,921,647
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,699
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package service;
import DAO.UserDAO;
import domain.User;
import java.util.ArrayList;
import java.util.List;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
*
* @author pablo
*/
public class UserService {
private UserDAO db = new UserDAO();
public List<User> getCurrentUser() {
try {
List<User> users= new ArrayList<>();
// Get session object from Session
FacesContext context = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
HttpSession httpSession = request.getSession(false);
User user = (User) httpSession.getAttribute("user");
//--------------------------------
if (user != null){
users.add(user);
return users;
}
return null;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public User getSessionUser() {
try {
// Get session object from Session
FacesContext context = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
HttpSession httpSession = request.getSession(false);
User user = (User) httpSession.getAttribute("user");
//--------------------------------
if (user != null){
return user;
}
return null;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public User isUsuarioReadyToLogin(String login, String pass) {
try {
login = login.toLowerCase().trim();
List<User> query = db.getUserAutentication(login);
if (query.size() == 1) {
if ( query.get(0).getPassword().equals(pass)){
//if ( query.get(0).getPass().equals(convertStringToMd5(pass))){
User userFound = (User) query.get(0);
//Set user object in session
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("user", userFound);
//--------------------------
//<h:outputText value="#{sessionScope.key}" />
return userFound;
}
}
return null;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
|
[
"pablo.fariabritto@gmail.com"
] |
pablo.fariabritto@gmail.com
|
b451d5db346a288e63b03cd9b6dd269c02441dee
|
f7e0a04d1e31d225cd4992ca926d0ce23d293087
|
/spring-webflux/src/test/java/org/springframework/web/reactive/handler/CorsUrlHandlerMappingTests.java
|
b3881b3e7ef22dba0011cf99a33e955d31c95195
|
[] |
no_license
|
designer-framework/Spring-Framework
|
adfea060850613e7f2b751b74359ec2c74826fb5
|
93039bf6e702d814dd0591bdb1acd70da5b31909
|
refs/heads/master
| 2023-04-27T07:05:00.875434
| 2021-05-18T13:07:31
| 2021-05-18T13:07:31
| 360,019,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,795
|
java
|
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.reactive.handler;
import java.util.Collections;
import org.junit.Before;
import org.junit.Test;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest;
import org.springframework.mock.web.test.server.MockServerWebExchange;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.reactive.CorsConfigurationSource;
import org.springframework.web.server.ServerWebExchange;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
/**
* Unit tests for CORS support at {@link AbstractUrlHandlerMapping} level.
*
* @author Sebastien Deleuze
* @author Rossen Stoyanchev
*/
public class CorsUrlHandlerMappingTests {
private AbstractUrlHandlerMapping handlerMapping;
private Object welcomeController = new Object();
private CorsAwareHandler corsController = new CorsAwareHandler();
@Before
public void setup() {
this.handlerMapping = new AbstractUrlHandlerMapping() {};
this.handlerMapping.registerHandler("/welcome.html", this.welcomeController);
this.handlerMapping.registerHandler("/cors.html", this.corsController);
}
@Test
public void actualRequestWithoutCorsConfigurationProvider() throws Exception {
String origin = "https://domain2.com";
ServerWebExchange exchange = createExchange(HttpMethod.GET, "/welcome.html", origin);
Object actual = this.handlerMapping.getHandler(exchange).block();
assertNotNull(actual);
assertSame(this.welcomeController, actual);
}
@Test
public void preflightRequestWithoutCorsConfigurationProvider() throws Exception {
String origin = "https://domain2.com";
ServerWebExchange exchange = createExchange(HttpMethod.OPTIONS, "/welcome.html", origin);
Object actual = this.handlerMapping.getHandler(exchange).block();
assertNotNull(actual);
assertNotSame(this.welcomeController, actual);
assertNull(exchange.getResponse().getHeaders().getFirst(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
public void actualRequestWithCorsAwareHandler() throws Exception {
String origin = "https://domain2.com";
ServerWebExchange exchange = createExchange(HttpMethod.GET, "/cors.html", origin);
Object actual = this.handlerMapping.getHandler(exchange).block();
assertNotNull(actual);
assertSame(this.corsController, actual);
assertEquals("*", exchange.getResponse().getHeaders().getFirst(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
public void preFlightWithCorsAwareHandler() throws Exception {
String origin = "https://domain2.com";
ServerWebExchange exchange = createExchange(HttpMethod.OPTIONS, "/cors.html", origin);
Object actual = this.handlerMapping.getHandler(exchange).block();
assertNotNull(actual);
assertNotSame(this.corsController, actual);
assertEquals("*", exchange.getResponse().getHeaders().getFirst(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
public void actualRequestWithGlobalCorsConfig() throws Exception {
CorsConfiguration mappedConfig = new CorsConfiguration();
mappedConfig.addAllowedOrigin("*");
this.handlerMapping.setCorsConfigurations(Collections.singletonMap("/welcome.html", mappedConfig));
String origin = "https://domain2.com";
ServerWebExchange exchange = createExchange(HttpMethod.GET, "/welcome.html", origin);
Object actual = this.handlerMapping.getHandler(exchange).block();
assertNotNull(actual);
assertSame(this.welcomeController, actual);
assertEquals("*", exchange.getResponse().getHeaders().getFirst(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
public void preFlightRequestWithGlobalCorsConfig() throws Exception {
CorsConfiguration mappedConfig = new CorsConfiguration();
mappedConfig.addAllowedOrigin("*");
this.handlerMapping.setCorsConfigurations(Collections.singletonMap("/welcome.html", mappedConfig));
String origin = "https://domain2.com";
ServerWebExchange exchange = createExchange(HttpMethod.OPTIONS, "/welcome.html", origin);
Object actual = this.handlerMapping.getHandler(exchange).block();
assertNotNull(actual);
assertNotSame(this.welcomeController, actual);
assertEquals("*", exchange.getResponse().getHeaders().getFirst(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
private ServerWebExchange createExchange(HttpMethod method, String path, String origin) {
return MockServerWebExchange.from(MockServerHttpRequest
.method(method, "http://localhost" + path)
.header("Origin", origin)
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"));
}
private class CorsAwareHandler implements CorsConfigurationSource {
@Override
public CorsConfiguration getCorsConfiguration(ServerWebExchange exchange) {
CorsConfiguration config = new CorsConfiguration();
config.addAllowedOrigin("*");
return config;
}
}
}
|
[
"742743697@qq.com"
] |
742743697@qq.com
|
07867247a81bfd6c8ed70671c1339680d11af62c
|
912d8231077f38173545e2971a7aaaafd5f597e4
|
/src/Main.java
|
7faeac37236be22ab82da4e11dc25bb931dd8122
|
[] |
no_license
|
NguyenVanDat2010/Mo2_w5_ProxyPatternDownloader
|
68b757a21cb8bf1956594e02e872389dee3932e3
|
da279676ccd6f838bef5469f52f735284e9e43a0
|
refs/heads/master
| 2022-09-13T23:49:26.849240
| 2020-05-28T17:46:32
| 2020-05-28T17:46:32
| 267,657,163
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 410
|
java
|
import downloader.Client;
import downloader.FileDownloaderProxy;
public class Main {
public static void main(String[] args) {
Client client = new Client();
String address = "https://lh3.googleusercontent.com/C2_4Z4prTpMPqX1G9krkLnXi3uvlVY-3LxjIlx_N8-xfk_GoXSNgOvoHlQhn6SANShYOLhKXyB4HFtU9M2FFh6H0STHhBMosWUXvcHNv3wfKiNS7yFBzxOUgO5eDB5oOAF27cjin";
client.download(address);
}
}
|
[
"datdhvinh@gmail.com"
] |
datdhvinh@gmail.com
|
95b58610fbeaf2c9afa38b0e825cd061ed745012
|
73458087c9a504dedc5acd84ecd63db5dfcd5ca1
|
/src/com/estrongs/android/util/an.java
|
fd9db7f2b78756e695067d39dae937c5b5d092c5
|
[] |
no_license
|
jtap60/com.estr
|
99ff2a6dd07b02b41a9cc3c1d28bb6545e68fb27
|
8b70bf2da8b24c7cef5973744e6054ef972fc745
|
refs/heads/master
| 2020-04-14T02:12:20.424436
| 2018-12-30T10:56:45
| 2018-12-30T10:56:45
| 163,578,360
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,676
|
java
|
package com.estrongs.android.util;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build.VERSION;
import com.estrongs.android.l.b;
import com.estrongs.android.pop.FexApplication;
import com.estrongs.android.pop.ac;
import com.estrongs.android.pop.z;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Enumeration;
public class an
{
public static String a()
{
Object localObject = FexApplication.a();
if (b())
{
localObject = ((WifiManager)((Context)localObject).getSystemService("wifi")).getConnectionInfo();
if ((localObject == null) || (((WifiInfo)localObject).getIpAddress() == 0)) {
return e();
}
int i = ((WifiInfo)localObject).getIpAddress();
return (i & 0xFF) + "." + (i >> 8 & 0xFF) + "." + (i >> 16 & 0xFF) + "." + (i >> 24 & 0xFF);
}
return e();
}
@TargetApi(19)
public static void a(InetAddress paramInetAddress, boolean paramBoolean)
{
Object localObject = FexApplication.a();
if (!z.ah) {}
for (;;)
{
return;
try
{
if (ac.a() >= 19)
{
localObject = (WifiManager)((Context)localObject).getSystemService("wifi");
if (localObject != null)
{
ao.a(localObject).a("setTdlsEnabled", new Class[] { InetAddress.class, Boolean.TYPE }, new Object[] { paramInetAddress, Boolean.valueOf(paramBoolean) });
return;
}
}
}
catch (Exception paramInetAddress)
{
paramInetAddress.printStackTrace();
}
}
}
public static boolean b()
{
NetworkInfo localNetworkInfo = ((ConnectivityManager)FexApplication.a().getSystemService("connectivity")).getActiveNetworkInfo();
if ((localNetworkInfo != null) && ((localNetworkInfo.getType() == 1) || (localNetworkInfo.getType() == 9))) {
return true;
}
return b.b();
}
public static String c()
{
Object localObject = FexApplication.a();
if (b())
{
localObject = ((WifiManager)((Context)localObject).getSystemService("wifi")).getConnectionInfo();
if (localObject != null)
{
if (((WifiInfo)localObject).getBSSID() != null) {
return ((WifiInfo)localObject).getBSSID();
}
if (((WifiInfo)localObject).getMacAddress() != null) {
return ((WifiInfo)localObject).getMacAddress();
}
}
return "com.estrongs.bssid.key";
}
return null;
}
public static boolean d()
{
NetworkInfo localNetworkInfo = ((ConnectivityManager)FexApplication.a().getSystemService("connectivity")).getActiveNetworkInfo();
return (localNetworkInfo != null) && (localNetworkInfo.isConnected());
}
@SuppressLint({"NewApi"})
private static String e()
{
int i = Build.VERSION.SDK_INT;
try
{
Object localObject3;
do
{
localObject1 = NetworkInterface.getNetworkInterfaces();
Object localObject2;
while (!((Enumeration)localObject2).hasMoreElements())
{
do
{
if (!((Enumeration)localObject1).hasMoreElements()) {
break;
}
localObject2 = (NetworkInterface)((Enumeration)localObject1).nextElement();
localObject3 = ((NetworkInterface)localObject2).getName().toUpperCase();
} while ((((String)localObject3).equalsIgnoreCase("lo")) || (((String)localObject3).startsWith("RMNET")) || (((String)localObject3).startsWith("PPP")) || ((i >= 9) && ((((NetworkInterface)localObject2).getHardwareAddress() == null) || (!((NetworkInterface)localObject2).isUp()))));
localObject2 = ((NetworkInterface)localObject2).getInetAddresses();
}
localObject3 = (InetAddress)((Enumeration)localObject2).nextElement();
} while ((((InetAddress)localObject3).isLoopbackAddress()) || (!(localObject3 instanceof Inet4Address)));
Object localObject1 = ((InetAddress)localObject3).getAddress();
localObject1 = (localObject1[0] & 0xFF) + "." + (localObject1[1] & 0xFF) + "." + (localObject1[2] & 0xFF) + "." + (localObject1[3] & 0xFF);
return (String)localObject1;
}
catch (Exception localException)
{
l.e("WifiPreference IpAddress", localException.toString());
}
return null;
}
}
/* Location:
* Qualified Name: com.estrongs.android.util.an
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
127da1ce071b4cd05c8431b3e545202b73eb2923
|
24710830b3b51e99ceee40fe8e0771981d729b68
|
/implements/default/src/main/java/top/cardone/workflow/service/impl/WfTaskHandleServiceImpl.java
|
7bbc96b8ab582ae2df00c5c02106eca39d54ab8e
|
[] |
no_license
|
yht-fand/cardone-workflow
|
f857395ae46496517810fdf691cd894ed6b8c6b2
|
bd80a9be76955dbc758bc605afb791d8d2fe6059
|
refs/heads/master
| 2020-04-10T19:06:59.901675
| 2019-01-02T02:54:04
| 2019-01-02T02:54:04
| 9,350,898
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package top.cardone.workflow.service.impl;
import org.springframework.transaction.annotation.Transactional;
import top.cardone.data.service.impl.PageServiceImpl;
import top.cardone.workflow.dao.WfTaskHandleDao;
import java.util.Map;
/**
* 工作流任务处理服务
*
* @author yao hai tao
*/
@Transactional(readOnly = true)
public class WfTaskHandleServiceImpl extends PageServiceImpl<WfTaskHandleDao> implements top.cardone.workflow.service.WfTaskHandleService {
@Override
public Map<String, Object> findOneByWfTaskHandleId(Map<String, Object> findOne) {
return this.dao.findOneBySqlFileName("page.find", findOne);
}
}
|
[
"addday@gmail.com"
] |
addday@gmail.com
|
7f4c9448824be2903444261eb24458bcb5aa48c2
|
e0f7dd50cb154414cbf2542f39c1027a15d717dd
|
/src/main/java/com/cn/sk/springcloudstream/kafka/consumer/KafkaConsumerExtentionBean.java
|
3c9134ce3250b0850d832053f7b9e6223319b17c
|
[] |
no_license
|
dwyanewede/spring-cloud-stream-demo
|
c2a8fe79810044c4ada3e782c7935ed06a208af1
|
507e528f4f601c300f2bf5a99eef3a232bf9ecd9
|
refs/heads/master
| 2020-04-02T08:32:27.193122
| 2018-10-23T03:26:32
| 2018-10-23T03:26:32
| 154,248,816
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,206
|
java
|
package com.cn.sk.springcloudstream.kafka.consumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessagingException;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
/**
* @ProjectName: spring-cloud-stream-kafka
* @Package: com.sk.cn.springcloudstreamkafkademo.stream.consumer
* @ClassName: MessageConsumerBean
* @Description: java类作用描述
* @Author: 尚先生
* @CreateDate: 2018/10/22 12:59
* @UpdateDate: 2018/10/22 12:59
* @Version: 1.0
*/
@Component
@EnableBinding({Sink.class})
public class KafkaConsumerExtentionBean {
@Autowired
private Sink sink;
@Autowired
@Qualifier(Sink.INPUT)
private SubscribableChannel subscribableChannel;
/**
* 通过实现异步回调的方式获取消息
*/
@PostConstruct
public void init(){
subscribableChannel.subscribe(new MessageHandler() {
@Override
public void handleMessage(Message<?> message) throws MessagingException {
Object payload = message.getPayload();
System.out.println("@PostConstruct注解,subscribableChannel对象,收到的结果 :" + payload);
}
});
}
@ServiceActivator(inputChannel = Sink.INPUT)
public void serviceActivator(Object onmessage){
System.out.println("@serviceActivator,serviceActivator方法,收到的结果 :" + onmessage);
}
@StreamListener(Sink.INPUT)
public void streamListener(Object onmessage){
System.out.println("@StreamListener,streamListener方法,收到的结果 :" + onmessage);
}
}
|
[
"shang_sk@163.com"
] |
shang_sk@163.com
|
af1f9f65fb47ba50f28267617a697086dc3fca29
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Csv-13/org.apache.commons.csv.CSVFormat/BBC-F0-opt-30/tests/16/org/apache/commons/csv/CSVFormat_ESTest_scaffolding.java
|
a160e2f3e897be16f742914c4b5602ddcb1806f2
|
[
"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
| 4,661
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 20 19:10:50 GMT 2021
*/
package org.apache.commons.csv;
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;
import static org.evosuite.shaded.org.mockito.Mockito.*;
@EvoSuiteClassExclude
public class CSVFormat_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.csv.CSVFormat";
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();
try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {}
}
@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(CSVFormat_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.csv.Token",
"org.apache.commons.csv.Constants",
"org.apache.commons.csv.CSVRecord",
"org.apache.commons.csv.Assertions",
"org.apache.commons.csv.CSVParser$2",
"org.apache.commons.csv.QuoteMode",
"org.apache.commons.csv.CSVFormat",
"org.apache.commons.csv.Lexer",
"org.apache.commons.csv.CSVParser",
"org.apache.commons.csv.CSVFormat$Predefined",
"org.apache.commons.csv.Token$Type",
"org.apache.commons.csv.CSVPrinter$1",
"org.apache.commons.csv.CSVPrinter",
"org.apache.commons.csv.ExtendedBufferedReader"
);
}
private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException {
mock(Class.forName("java.sql.ResultSet", false, CSVFormat_ESTest_scaffolding.class.getClassLoader()));
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CSVFormat_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.csv.Constants",
"org.apache.commons.csv.QuoteMode",
"org.apache.commons.csv.CSVFormat",
"org.apache.commons.csv.CSVFormat$Predefined",
"org.apache.commons.csv.CSVPrinter",
"org.apache.commons.csv.Assertions",
"org.apache.commons.csv.CSVPrinter$1",
"org.apache.commons.csv.CSVParser",
"org.apache.commons.csv.Token",
"org.apache.commons.csv.Token$Type",
"org.apache.commons.csv.Lexer",
"org.apache.commons.csv.ExtendedBufferedReader",
"org.apache.commons.csv.CSVParser$2",
"org.apache.commons.csv.CSVRecord"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
8e75269d74d42287570118e8f919c762f054098f
|
66dd1a21955c6396b74af29019ab0305441e3aea
|
/under/usbserial/BuildInfo.java
|
115614e923a7eca953c71bda01ed1f3fdc964cde
|
[] |
no_license
|
lcmonteiro/space-android
|
d39b276e0d7ebb8f0766e05b6107020cff11738c
|
3c54b238858be5a90a24a9753906073942f141fd
|
refs/heads/master
| 2020-05-19T14:28:07.741150
| 2019-02-16T23:17:31
| 2019-02-16T23:17:31
| 185,060,997
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 485
|
java
|
package space.under.usbserial;
/**
* Static container of information about this library.
*/
public final class BuildInfo {
/**
* The current version of this library. Values are of the form
* "major.minor.micro[-suffix]". A suffix of "-pre" indicates a pre-release
* of the version preceeding it.
*/
public static final String VERSION = "0.2.0-pre";
private BuildInfo() {
throw new IllegalStateException("Non-instantiable class.");
}
}
|
[
"you@example.com"
] |
you@example.com
|
e0c2e3c5caaa8b088c78dabd9708b471081ffc81
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE89_SQL_Injection/s02/CWE89_SQL_Injection__Environment_prepareStatement_74a.java
|
ce5c2eb779127c1dd2d82b075a0b90a4e530a904
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,104
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__Environment_prepareStatement_74a.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-74a.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded string
* Sinks: prepareStatement
* GoodSink: Use prepared statement and execute (properly)
* BadSink : data concatenated into SQL statement used in prepareStatement() call, which could result in SQL Injection
* Flow Variant: 74 Data flow: data passed in a HashMap from one method to another in different source files in the same package
*
* */
package testcases.CWE89_SQL_Injection.s02;
import testcasesupport.*;
import java.util.HashMap;
import javax.servlet.http.*;
public class CWE89_SQL_Injection__Environment_prepareStatement_74a extends AbstractTestCase
{
public void bad() throws Throwable
{
String data;
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
data = System.getenv("ADD");
HashMap<Integer,String> dataHashMap = new HashMap<Integer,String>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE89_SQL_Injection__Environment_prepareStatement_74b()).badSink(dataHashMap );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use GoodSource and BadSink */
private void goodG2B() throws Throwable
{
String data;
/* FIX: Use a hardcoded string */
data = "foo";
HashMap<Integer,String> dataHashMap = new HashMap<Integer,String>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE89_SQL_Injection__Environment_prepareStatement_74b()).goodG2BSink(dataHashMap );
}
/* goodB2G() - use BadSource and GoodSink */
private void goodB2G() throws Throwable
{
String data;
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
data = System.getenv("ADD");
HashMap<Integer,String> dataHashMap = new HashMap<Integer,String>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE89_SQL_Injection__Environment_prepareStatement_74b()).goodB2GSink(dataHashMap );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
f27943b1c5b27958012b13d326c1c634d4651bd5
|
796b2a20eaa6c3ae23041b02b646170550f87e3c
|
/app/src/main/java/com/vn/ntsc/repository/model/conversation/ConversationItem.java
|
8d7b34751e263f6a8ddce0ec7a61ee9e9aed7b7f
|
[] |
no_license
|
vinhnb90/NationalTrafficSocialAndroid
|
f3bca20789d340b7bdbb9781d734949c31184457
|
b14029f8977c81b0966309d669693cedfac65aba
|
refs/heads/master
| 2020-03-19T20:44:55.945975
| 2018-06-11T11:09:13
| 2018-06-11T11:09:13
| 136,914,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,535
|
java
|
package com.vn.ntsc.repository.model.conversation;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;
import com.vn.ntsc.core.model.BaseBean;
/**
* Created by ThoNH on 25/08/2017.
*/
public class ConversationItem extends BaseBean {
@SerializedName("frd_id")
public String friendId;
@SerializedName("frd_name")
public String name;
@SerializedName("is_online")
public boolean isOnline;
@SerializedName("last_msg")
public String lastMessage;
@SerializedName("is_own")
public boolean isOwn;
@SerializedName("sent_time")
public String sentTime;
@SerializedName("unread_num")
public int unreadNum;
@SerializedName("long")
public double longtitude;
@SerializedName("lat")
public double lattitude;
@SerializedName("dist")
public double distance;
@SerializedName("ava_id")
public String avaId;
@SerializedName("thumbnail_url")
public String thumbnailUrl;
@SerializedName("gender")
public int gender;
@SerializedName("msg_type")
public String messageType;
@SerializedName("is_anonymous")
public boolean anonymous;
@SerializedName("voice_call_waiting")
public boolean isVoiceCallWaiting;
@SerializedName("video_call_waiting")
public boolean isVideoCallWaiting;
public ConversationItem() {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.friendId);
dest.writeString(this.name);
dest.writeByte(this.isOnline ? (byte) 1 : (byte) 0);
dest.writeString(this.lastMessage);
dest.writeByte(this.isOwn ? (byte) 1 : (byte) 0);
dest.writeString(this.sentTime);
dest.writeInt(this.unreadNum);
dest.writeDouble(this.longtitude);
dest.writeDouble(this.lattitude);
dest.writeDouble(this.distance);
dest.writeString(this.avaId);
dest.writeString(this.thumbnailUrl);
dest.writeInt(this.gender);
dest.writeString(this.messageType);
dest.writeByte(this.anonymous ? (byte) 1 : (byte) 0);
dest.writeByte(this.isVoiceCallWaiting ? (byte) 1 : (byte) 0);
dest.writeByte(this.isVideoCallWaiting ? (byte) 1 : (byte) 0);
}
protected ConversationItem(Parcel in) {
this.friendId = in.readString();
this.name = in.readString();
this.isOnline = in.readByte() != 0;
this.lastMessage = in.readString();
this.isOwn = in.readByte() != 0;
this.sentTime = in.readString();
this.unreadNum = in.readInt();
this.longtitude = in.readDouble();
this.lattitude = in.readDouble();
this.distance = in.readDouble();
this.avaId = in.readString();
this.thumbnailUrl = in.readString();
this.gender = in.readInt();
this.messageType = in.readString();
this.anonymous = in.readByte() != 0;
this.isVoiceCallWaiting = in.readByte() != 0;
this.isVideoCallWaiting = in.readByte() != 0;
}
public static final Parcelable.Creator<ConversationItem> CREATOR = new Parcelable.Creator<ConversationItem>() {
@Override
public ConversationItem createFromParcel(Parcel source) {
return new ConversationItem(source);
}
@Override
public ConversationItem[] newArray(int size) {
return new ConversationItem[size];
}
};
}
|
[
"nbvinh.it@gmail.com"
] |
nbvinh.it@gmail.com
|
01837e3cd55e8718280462526dc89fad037cc320
|
f15889af407de46a94fd05f6226c66182c6085d0
|
/ma/src/main/java/com/oreon/proj/web/action/questionnaire/restful/AnsweredQuestionResourceQuery.java
|
ffabfca8d8025ea5c11f0ff76f1a8fadb5b7a8ff
|
[] |
no_license
|
oreon/sfcode-full
|
231149f07c5b0b9b77982d26096fc88116759e5b
|
bea6dba23b7824de871d2b45d2a51036b88d4720
|
refs/heads/master
| 2021-01-10T06:03:27.674236
| 2015-04-27T10:23:10
| 2015-04-27T10:23:10
| 55,370,912
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 860
|
java
|
package com.oreon.proj.web.action.questionnaire.restful;
import javax.ws.rs.FormParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.framework.EntityHome;
import org.jboss.seam.framework.Home;
import org.jboss.seam.resteasy.ResourceHome;
import org.jboss.seam.resteasy.ResourceQuery;
import java.util.Date;
import java.util.List;
import com.oreon.proj.questionnaire.AnsweredQuestion;
//@Name("answeredQuestionResourceQuery")
//@Path("answeredQuestion")
public class AnsweredQuestionResourceQuery
extends
ResourceQuery<AnsweredQuestion> {
}
|
[
"singhj@38423737-2f20-0410-893e-9c0ab9ae497d"
] |
singhj@38423737-2f20-0410-893e-9c0ab9ae497d
|
99dcb6972f431c3c96334b3dc70ddd3b437270c5
|
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
|
/app/src/main/wechat6.5.3/com/tencent/mm/plugin/wear/model/f/b.java
|
44df9eaf7119668d9e25ea9cc334c32c7ff67051
|
[] |
no_license
|
newtonker/wechat6.5.3
|
8af53a870a752bb9e3c92ec92a63c1252cb81c10
|
637a69732afa3a936afc9f4679994b79a9222680
|
refs/heads/master
| 2020-04-16T03:32:32.230996
| 2017-06-15T09:54:10
| 2017-06-15T09:54:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,033
|
java
|
package com.tencent.mm.plugin.wear.model.f;
import com.tencent.mm.model.aw;
import com.tencent.mm.model.m;
import com.tencent.mm.plugin.wear.model.h;
import com.tencent.mm.sdk.platformtools.aa;
import com.tencent.mm.storage.at;
public abstract class b extends c {
protected final String b(String str, at atVar) {
if (m.dE(str)) {
String c = c(str, atVar);
return String.format(aa.getContext().getString(2131234089), new Object[]{h.DM(c), Character.valueOf(''), h.H(atVar).hQP});
}
return String.format(aa.getContext().getString(2131234090), new Object[]{h.H(atVar).hQP});
}
protected static String c(String str, at atVar) {
if (!m.dE(str)) {
return str;
}
int fK = aw.fK(atVar.field_content);
if (fK == -1) {
return str;
}
String trim = atVar.field_content.substring(0, fK).trim();
if (trim == null || trim.length() <= 0) {
return str;
}
return trim;
}
}
|
[
"zhangxhbeta@gmail.com"
] |
zhangxhbeta@gmail.com
|
0e596ff97fe9d1e8ed040f6f37235eafa165b242
|
ee103f4f3ccec1bdccafe50c9af856cbbaf7f107
|
/src/test/java/com/hrms/pages/AddMembershipsPage.java
|
600fc84326b47d70cfbe41f16ad4f725edc87f03
|
[] |
no_license
|
Bayramgul/HrmsRedTeam
|
1b23e67f8343280c49b4b64ef4afb2381fd1f2ca
|
1442f62fff46b4bb57295278a31343d88e09b745
|
refs/heads/master
| 2023-04-11T02:35:47.326702
| 2020-07-21T06:33:34
| 2020-07-21T06:33:34
| 272,125,122
| 0
| 0
| null | 2021-04-26T20:22:56
| 2020-06-14T03:19:58
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,150
|
java
|
package com.hrms.pages;
import java.util.List;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import com.hrms.utils.CommonMethods;
public class AddMembershipsPage extends CommonMethods {
@FindBy(id = "membership_membership")
public WebElement membershipDD;
@FindBy(id = "membership_subscriptionPaidBy")
public WebElement subscriptionPaidDD;
@FindBy(id = "membership_subscriptionAmount")
public WebElement scriptionAmount;
@FindBy(id = "membership_currency")
public WebElement currencyDD;
@FindBy(id = "membership_subscriptionCommenceDate")
public WebElement subscCommenceDateTextbox;
@FindBy(id = "membership_subscriptionRenewalDate")
public WebElement RenewalDateTextbox;
@FindBy(id = "btnAdd")
public WebElement btnAdd;
@FindBy(id = "btnSaveMembership")
public WebElement btnSaveMembership;
@FindBy(xpath = "//table[@class='table hover']/tbody/tr[1]/td[2]")
public List<WebElement> membershipTable;
public AddMembershipsPage() {
PageFactory.initElements(driver, this);
}
}
|
[
"atageldiyevab@gmail.com"
] |
atageldiyevab@gmail.com
|
95b1dbffb3dd641de3ff6a0d967337b59d2e4b69
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a053/A053376Test.java
|
8d40b6e912aa651b357ed3c7bd3f1b72062e1807
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a053;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A053376Test extends AbstractSequenceTest {
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
adf388b06ca5056376a79f441ddd8eb340f9fdc3
|
bb2e9ea7f9a1f90d2aab061f5e3dae5373765bca
|
/src/main/java/ar/com/kfgodel/function/doubles/arrays/boxed/DoubleToArrayOfBoxedLongFunction.java
|
8e02dabdd2f80637e08508b3516bde2e87ed1f6c
|
[
"Apache-2.0"
] |
permissive
|
kfgodel/extended-functions
|
85f9bb056f7e67aa5297b28930a169773ee8b5fb
|
990b31353a4f9adab2d70ed0b3464706c65fa75c
|
refs/heads/master
| 2021-01-01T20:18:51.712928
| 2019-10-13T02:00:12
| 2019-10-13T02:00:12
| 98,808,487
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package ar.com.kfgodel.function.doubles.arrays.boxed;
import ar.com.kfgodel.function.doubles.arrays.DoubleToArrayOfObjectFunction;
/**
* Date: 29/07/17 - 19:57
*/
public interface DoubleToArrayOfBoxedLongFunction extends DoubleToArrayOfObjectFunction<Long> {
}
|
[
"dario.garcia@10pines.com"
] |
dario.garcia@10pines.com
|
c75753e54d5ca047066aa56032e60fcf4655cf5f
|
00855d1536ae09cca8367d6e31fc2cd288807cc7
|
/chbox/TVhelper/common/src/com/nostra13/universalimageloader/core/ImageLoaderEngine.java
|
92a801853152bc82a3bdd9a8f892912bde6d2c87
|
[] |
no_license
|
kunkun39/CH_BOX
|
456b38748f8ac1c45e558746d3be7c661d7041cd
|
7311a61c33f31d9c125ec21ae0155d9d58f88615
|
refs/heads/master
| 2020-12-19T22:33:38.695449
| 2016-05-27T02:52:50
| 2016-05-27T02:52:50
| 35,022,561
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,825
|
java
|
/*******************************************************************************
* Copyright 2011-2013 Sergey Tarasevich
*
* 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.nostra13.universalimageloader.core;
import android.view.View;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.assist.FlushedInputStream;
import com.nostra13.universalimageloader.core.imageaware.ImageAware;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import java.io.File;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.ReentrantLock;
/**
* {@link com.nostra13.universalimageloader.core.ImageLoader} engine which responsible for {@linkplain com.nostra13.universalimageloader.core.LoadAndDisplayImageTask display task} execution.
*
* @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
* @since 1.7.1
*/
class ImageLoaderEngine {
final ImageLoaderConfiguration configuration;
private Executor taskExecutor;
private Executor taskExecutorForCachedImages;
private Executor taskDistributor;
private final Map<Integer, String> cacheKeysForImageAwares = Collections
.synchronizedMap(new HashMap<Integer, String>());
private final Map<String, ReentrantLock> uriLocks = new WeakHashMap<String, ReentrantLock>();
private final AtomicBoolean paused = new AtomicBoolean(false);
private final AtomicBoolean networkDenied = new AtomicBoolean(false);
private final AtomicBoolean slowNetwork = new AtomicBoolean(false);
private final Object pauseLock = new Object();
ImageLoaderEngine(ImageLoaderConfiguration configuration) {
this.configuration = configuration;
taskExecutor = configuration.taskExecutor;
taskExecutorForCachedImages = configuration.taskExecutorForCachedImages;
taskDistributor = DefaultConfigurationFactory.createTaskDistributor();
}
/** Submits task to execution pool */
void submit(final LoadAndDisplayImageTask task) {
taskDistributor.execute(new Runnable() {
@Override
public void run() {
File image = configuration.diskCache.get(task.getLoadingUri());
boolean isImageCachedOnDisk = image != null && image.exists();
initExecutorsIfNeed();
if (isImageCachedOnDisk) {
taskExecutorForCachedImages.execute(task);
} else {
taskExecutor.execute(task);
}
}
});
}
/** Submits task to execution pool */
void submit(ProcessAndDisplayImageTask task) {
initExecutorsIfNeed();
taskExecutorForCachedImages.execute(task);
}
private void initExecutorsIfNeed() {
if (!configuration.customExecutor && ((ExecutorService) taskExecutor).isShutdown()) {
taskExecutor = createTaskExecutor();
}
if (!configuration.customExecutorForCachedImages && ((ExecutorService) taskExecutorForCachedImages)
.isShutdown()) {
taskExecutorForCachedImages = createTaskExecutor();
}
}
private Executor createTaskExecutor() {
return DefaultConfigurationFactory
.createExecutor(configuration.threadPoolSize, configuration.threadPriority,
configuration.tasksProcessingType);
}
/**
* Returns URI of image which is loading at this moment into passed {@link com.nostra13.universalimageloader.core.imageaware.ImageAware}
*/
String getLoadingUriForView(ImageAware imageAware) {
return cacheKeysForImageAwares.get(imageAware.getId());
}
/**
* Associates <b>memoryCacheKey</b> with <b>imageAware</b>. Then it helps to define image URI is loaded into View at
* exact moment.
*/
void prepareDisplayTaskFor(ImageAware imageAware, String memoryCacheKey) {
cacheKeysForImageAwares.put(imageAware.getId(), memoryCacheKey);
}
/**
* Cancels the task of loading and displaying image for incoming <b>imageAware</b>.
*
* @param imageAware {@link com.nostra13.universalimageloader.core.imageaware.ImageAware} for which display task
* will be cancelled
*/
void cancelDisplayTaskFor(ImageAware imageAware) {
cacheKeysForImageAwares.remove(imageAware.getId());
}
/**
* Denies or allows engine to download images from the network.<br /> <br /> If downloads are denied and if image
* isn't cached then {@link com.nostra13.universalimageloader.core.listener.ImageLoadingListener#onLoadingFailed(String, android.view.View, com.nostra13.universalimageloader.core.assist.FailReason)} callback will be fired
* with {@link com.nostra13.universalimageloader.core.assist.FailReason.FailType#NETWORK_DENIED}
*
* @param denyNetworkDownloads pass <b>true</b> - to deny engine to download images from the network; <b>false</b> -
* to allow engine to download images from network.
*/
void denyNetworkDownloads(boolean denyNetworkDownloads) {
networkDenied.set(denyNetworkDownloads);
}
/**
* Sets option whether ImageLoader will use {@link com.nostra13.universalimageloader.core.assist.FlushedInputStream} for network downloads to handle <a
* href="http://code.google.com/p/android/issues/detail?id=6066">this known problem</a> or not.
*
* @param handleSlowNetwork pass <b>true</b> - to use {@link com.nostra13.universalimageloader.core.assist.FlushedInputStream} for network downloads; <b>false</b>
* - otherwise.
*/
void handleSlowNetwork(boolean handleSlowNetwork) {
slowNetwork.set(handleSlowNetwork);
}
/**
* Pauses engine. All new "load&display" tasks won't be executed until ImageLoader is {@link #resume() resumed}.<br
* /> Already running tasks are not paused.
*/
void pause() {
paused.set(true);
}
/** Resumes engine work. Paused "load&display" tasks will continue its work. */
void resume() {
paused.set(false);
synchronized (pauseLock) {
pauseLock.notifyAll();
}
}
/**
* Stops engine, cancels all running and scheduled display image tasks. Clears internal data.
* <br />
* <b>NOTE:</b> This method doesn't shutdown
* {@linkplain com.nostra13.universalimageloader.core.ImageLoaderConfiguration.Builder#taskExecutor(java.util.concurrent.Executor)
* custom task executors} if you set them.
*/
void stop() {
if (!configuration.customExecutor) {
((ExecutorService) taskExecutor).shutdownNow();
}
if (!configuration.customExecutorForCachedImages) {
((ExecutorService) taskExecutorForCachedImages).shutdownNow();
}
cacheKeysForImageAwares.clear();
uriLocks.clear();
}
void fireCallback(Runnable r) {
taskDistributor.execute(r);
}
ReentrantLock getLockForUri(String uri) {
ReentrantLock lock = uriLocks.get(uri);
if (lock == null) {
lock = new ReentrantLock();
uriLocks.put(uri, lock);
}
return lock;
}
AtomicBoolean getPause() {
return paused;
}
Object getPauseLock() {
return pauseLock;
}
boolean isNetworkDenied() {
return networkDenied.get();
}
boolean isSlowNetwork() {
return slowNetwork.get();
}
}
|
[
"34445282@qq.com"
] |
34445282@qq.com
|
da57eea8aa08911a82646231b2c56e9ee1607926
|
63e24adc15dd2155767a477c5026608273d89323
|
/scm-managers/scm-managers-entity/src/main/java/org/xfs/scm/system/role_resources/entity/RoleResources.java
|
980c559d5e3061a411bdb7f7d6b54b2356c83fe6
|
[] |
no_license
|
shenfengzhusheng/scm
|
17978a395182a3f164357372c5c44242659bc970
|
9b04e91d7c2d4dcac55d326b08606482aba2fea9
|
refs/heads/master
| 2022-12-21T14:31:37.214723
| 2018-11-17T03:24:01
| 2018-11-17T03:24:01
| 82,155,192
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 680
|
java
|
package org.xfs.scm.system.role_resources.entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "tb_role_resources")
public class RoleResources {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Integer rid;
private String rsid;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getRid() {
return rid;
}
public void setRid(Integer rid) {
this.rid = rid;
}
public String getRsid() {
return rsid;
}
public void setRsid(String rsid) {
this.rsid = rsid;
}
}
|
[
"xixingyingzhongdui@gmail.com"
] |
xixingyingzhongdui@gmail.com
|
e714d44691300ad7b88dc14d00eadf7d95231bb9
|
03df9c8385d0e7184f6cabd8b2ecbce2d5d2bb3f
|
/src/main/java/com/ecodation/a013/collections/UUIDClass.java
|
c29bdd767ba7176e922dd81c59c473512fd1fe95
|
[] |
no_license
|
hamitmizrak/EcodationJavaTutorialsExamples
|
1da23d2beefc3bed2052988a89ed39d45824a71a
|
a08034df2d64260f3ac8cb9158f0b8c14917112c
|
refs/heads/main
| 2023-01-14T12:33:06.409835
| 2020-11-22T10:47:39
| 2020-11-22T10:47:39
| 310,821,407
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 212
|
java
|
package com.ecodation.a013.collections;
import java.util.UUID;
public class UUIDClass {
public static void main(String[] args) {
UUID uuid = UUID.randomUUID();
System.out.println(uuid);
}
}
|
[
"hamitmizrak@gmail.com"
] |
hamitmizrak@gmail.com
|
8ef01e889d109ace2fae26eb124464955c9bb8cc
|
0448b9309c0e49ba74fc7e29d76af47632be078d
|
/bitkylin-spring-boot/bitkylin-print-spring-boot-starter/src/main/java/cc/bitky/demo/springbootstarter/bitkylinprint/api/Formatter.java
|
b959e00ce06ffc3c95414009ac688d1f3181a049
|
[
"MIT"
] |
permissive
|
bitkylin/featureLab
|
f0a506309eaf29e80a606670784481c4f31c0524
|
5e02a906534d68eb6b649d1efdf48e07eea27c84
|
refs/heads/master
| 2023-08-04T19:24:04.091882
| 2023-07-23T06:56:53
| 2023-07-23T06:56:53
| 184,685,587
| 23
| 10
|
MIT
| 2023-07-23T06:56:54
| 2019-05-03T02:00:49
|
Java
|
UTF-8
|
Java
| false
| false
| 312
|
java
|
package cc.bitky.demo.springbootstarter.bitkylinprint.api;
/**
* 对象格式化接口
*
* @author bitkylin
*/
public interface Formatter {
/**
* 格式化操作
*
* @param object 待格式化对象
* @return 返回格式化后的内容
*/
String format(Object object);
}
|
[
"bitkylin@163.com"
] |
bitkylin@163.com
|
5a47ea39906023eae35632c3ecbc22fae44fb822
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Spring/Spring5586.java
|
bdc6d2ebd1402ac249d16471cdf6f11cbf813d49
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 737
|
java
|
@Test
public void getPrefix() {
assertThat("Always returns \"xmlns\" for \"http://www.w3.org/2000/xmlns/\"",
context.getPrefix(XMLConstants.XMLNS_ATTRIBUTE_NS_URI), is(XMLConstants.XMLNS_ATTRIBUTE));
assertThat("Always returns \"xml\" for \"http://www.w3.org/XML/1998/namespace\"",
context.getPrefix(XMLConstants.XML_NS_URI), is(XMLConstants.XML_NS_PREFIX));
assertThat("Returns null for an unbound namespace URI", context.getPrefix(unboundNamespaceUri),
is(nullValue()));
context.bindNamespaceUri("prefix1", namespaceUri);
context.bindNamespaceUri("prefix2", namespaceUri);
assertThat("Returns a prefix for a bound namespace URI", context.getPrefix(namespaceUri),
anyOf(is("prefix1"), is("prefix2")));
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
97b6ca459873fe6490023f3b2cae3e06436d1a0d
|
4747748043ad75b14dfee08fbc5d1bb7161798b3
|
/aliyun-java-sdk-ecsops/src/main/java/com/aliyuncs/ecsops/model/v20160401/OpsDeleteEcsApiMetaSettingsRequest.java
|
c9f22aa82dfcc5ceb73a8e4235bf9fe26eecc7e4
|
[
"Apache-2.0"
] |
permissive
|
JeffWoo2019/aliyun-openapi-java-sdk
|
ff203f4c82817d8dadc82bcb1712a0c782adce19
|
a9bd812adf7eee92a091898a1f9bf89c8054efe8
|
refs/heads/master
| 2023-06-17T20:11:09.445703
| 2021-07-14T03:44:02
| 2021-07-14T03:44:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,234
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.ecsops.model.v20160401;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
/**
* @author auto create
* @version
*/
public class OpsDeleteEcsApiMetaSettingsRequest extends RpcAcsRequest<OpsDeleteEcsApiMetaSettingsResponse> {
private String proApiName;
private String productName;
private String apiVersion;
private String auditParamStr;
public OpsDeleteEcsApiMetaSettingsRequest() {
super("Ecsops", "2016-04-01", "OpsDeleteEcsApiMetaSettings", "ecsops");
setMethod(MethodType.POST);
}
public String getProApiName() {
return this.proApiName;
}
public void setProApiName(String proApiName) {
this.proApiName = proApiName;
if(proApiName != null){
putQueryParameter("ProApiName", proApiName);
}
}
public String getProductName() {
return this.productName;
}
public void setProductName(String productName) {
this.productName = productName;
if(productName != null){
putQueryParameter("ProductName", productName);
}
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
if(apiVersion != null){
putQueryParameter("ApiVersion", apiVersion);
}
}
public String getAuditParamStr() {
return this.auditParamStr;
}
public void setAuditParamStr(String auditParamStr) {
this.auditParamStr = auditParamStr;
if(auditParamStr != null){
putQueryParameter("AuditParamStr", auditParamStr);
}
}
@Override
public Class<OpsDeleteEcsApiMetaSettingsResponse> getResponseClass() {
return OpsDeleteEcsApiMetaSettingsResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
e189d8ab0b51ff490dfbea62440566d1449e2335
|
bd009005a3ccfb5e4f2afb96c68acd14595aaab8
|
/app/src/main/java/com/yiw/circledemo/bean/CommentItem.java
|
255fdb8f698982f445921a9f71c4af23bb898504
|
[
"Apache-2.0"
] |
permissive
|
kknet/VideoChat
|
90e61addca8db1aa5afcf6a594008aaece1cf458
|
8f8f69b200886d4b6671bcc0b2eb11a5343fd7fd
|
refs/heads/master
| 2022-12-09T03:13:22.228023
| 2020-09-18T09:23:18
| 2020-09-18T09:23:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 823
|
java
|
package com.yiw.circledemo.bean;
import java.io.Serializable;
/**
*
* @ClassName: CommentItem
* @Description: TODO(这里用一句话描述这个类的作用)
* @author yiw
* @date 2015-12-28 下午3:44:38
*
*/
public class CommentItem implements Serializable {
private String id;
private User user;
private User toReplyUser;
private String content;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public User getToReplyUser() {
return toReplyUser;
}
public void setToReplyUser(User toReplyUser) {
this.toReplyUser = toReplyUser;
}
}
|
[
"366549434@qq.com"
] |
366549434@qq.com
|
89bd94db8f35eeea825105fbe2dd951ca09fdb85
|
e0d6945f77e84d50ea38539bb8e96ad5c576c911
|
/dq-easy-cloud-pay-parent/dq-easy-cloud-pay-wx-service/src/main/java/com/dq/easy/cloud/pay/wx/pojo/query/DqWxOrderQuery.java
|
855726e1d4a183894a64a415d3de31a3bf985226
|
[
"MIT"
] |
permissive
|
next185/dq-easy-cloud
|
4601ef2d347f137be0585aec3875918a7dc7598b
|
3dad79809090f60ff9d13a513c65e32f36098fd6
|
refs/heads/master
| 2020-03-07T16:31:53.436840
| 2018-03-29T03:34:25
| 2018-03-29T03:34:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,676
|
java
|
package com.dq.easy.cloud.pay.wx.pojo.query;
import com.dq.easy.cloud.pay.common.payment.config.dto.DqPayConfigStorageInf;
import com.dq.easy.cloud.pay.common.payment.pojo.query.DqOrderAbstractQuery;
import com.dq.easy.cloud.pay.common.transaction.inf.DqTransactionType;
public class DqWxOrderQuery extends DqOrderAbstractQuery{
@Override
protected void putBillDateTimestampSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putPayIdSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putTradeNoSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putOutTradeNoSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putRefundAmountSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putTotalAmountSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putBillDateSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putBillTypeSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putTradeNoOrBillDateSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putOutTradeNoBillTypeSignData() {
// TODO Auto-generated method stub
}
@Override
protected void putRefundTradeNoSignData() {
// TODO Auto-generated method stub
}
@Override
public void buildSignatureParameters(DqPayConfigStorageInf dqPayConfigStorage,
DqTransactionType dqTransactionType) {
// TODO Auto-generated method stub
}
}
|
[
"466608943@qq.com"
] |
466608943@qq.com
|
e55058e2034030d3ffab9aa86826457c45543652
|
1ec8b12e4ec6f0d746e7a74bc7ea96d08aa04451
|
/src/com/vmware/vim25/HostAuthenticationManagerInfo.java
|
ce26e8cc9a26363e4556beb1000d6ff5e5091119
|
[] |
no_license
|
nickdeng1216/Intercloud
|
b5f76de436a3a112ac177b817199498f77f85160
|
5a325b943c28a95c8511806147667428fc284254
|
refs/heads/master
| 2022-02-23T15:40:16.366847
| 2019-09-29T12:50:20
| 2019-09-29T12:50:20
| 192,634,019
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,129
|
java
|
/*================================================================================
Copyright (c) 2012 Steve Jin. All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of VMware, Inc. nor the names of its contributors may be used
to endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
================================================================================*/
package com.vmware.vim25;
/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/
@SuppressWarnings("all")
public class HostAuthenticationManagerInfo extends DynamicData {
public HostAuthenticationStoreInfo[] authConfig;
public HostAuthenticationStoreInfo[] getAuthConfig() {
return this.authConfig;
}
public void setAuthConfig(HostAuthenticationStoreInfo[] authConfig) {
this.authConfig=authConfig;
}
}
|
[
"nickdeng1216@gmail.com"
] |
nickdeng1216@gmail.com
|
922a39695d3c6e90db32216e10be291f1d62b7bc
|
ff53a970ca4a9474581d84c8ed3fa2bb4c032965
|
/guifx/src/main/java/com/p2p/guifx/controllers/MainPageFXController.java
|
686aa7e2585d5c155ca2103f70d509b00daee798
|
[] |
no_license
|
ashsten1989/P2P-live-video-Streeming-
|
50acd8868ea893868337a288407afa639373c108
|
056d408eedf8bd03a6d370737698c99e375241a0
|
refs/heads/master
| 2020-04-27T02:12:05.537366
| 2019-03-05T19:00:47
| 2019-03-05T19:00:47
| 173,986,827
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,303
|
java
|
package com.p2p.guifx.controllers;
import com.p2p.guifx.SceneController;
import com.p2p.guifx.loader.FXMLLoaderService;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.IOException;
@Component
public class MainPageFXController {
@Autowired
private AvailableFilesController availableFilesController;
@Autowired
private AvailableStreamsController availableStreamsController;
@Autowired
private SceneController sceneController;
@Autowired
private FXMLLoaderService fxmlLoaderService;
private static final Logger LOG = Logger.getLogger(MainPageFXController.class);
@FXML
protected void handleStartStreamButton(ActionEvent event) throws IOException {
sceneController.changeNode(availableFilesController.getParent());
}
@FXML
protected void handleJoinStreamButton(ActionEvent event) throws IOException {
sceneController.changeNode(availableStreamsController.getParent());
}
public Parent getParent() throws IOException {
return fxmlLoaderService.load("mainpage.fxml").load();
}
}
|
[
"you@example.com"
] |
you@example.com
|
fdf6675c667f79e74f0538fc2f9c890839c12168
|
bf4122f5ae3a9f9b9c2cc94ef87cdb9dcadc9dc9
|
/Transfer/SPIDER/20190426_Array/arraySum.java
|
5046dbeb615378293fd5549d543fdcfa5b4a1aa7
|
[] |
no_license
|
haren7474/TY_ELF_JFS_HarendraKumar
|
7ef8b9a0bb6d6bdddb94b88ab2db4e0aef0fbc1d
|
f99ef30b40d0877167c8159e8b7f322af7cc87b9
|
refs/heads/master
| 2023-01-11T01:01:10.458037
| 2020-01-23T18:20:20
| 2020-01-23T18:20:20
| 225,845,989
| 0
| 0
| null | 2023-01-07T22:01:21
| 2019-12-04T11:00:37
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,630
|
java
|
import java.util.Scanner;
class arraySum
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.println("Please enter number of rows");
int row=sc.nextInt();
System.out.println("Please enter number of columns");
int col=sc.nextInt();
int[][] arr1 = new int[row][col];
int[][] arr2 = new int[row][col];
int[][] arr3 = new int[row][col];
//Taking Input Array1
System.out.println("Please enter elements of the array1");
for(int i=0; i<row; i++)
{
for(int j=0; j<col; j++)
{
arr1[i][j]= sc.nextInt();
}
}
//Taking Input Array2
System.out.println("Please enter elements of the array2");
for(int i=0; i<row; i++)
{
for(int j=0; j<col; j++)
{
arr2[i][j]= sc.nextInt();
}
}
//Printing Array1
System.out.println("Elements of the array are");
for(int i=0; i<row; i++)
{
for(int j=0; j<col; j++)
{
System.out.print(arr1[i][j]);
}
System.out.println();
}
//Printing Array2
System.out.println("Elements of the array are");
for(int i=0; i<row; i++)
{
for(int j=0; j<col; j++)
{
System.out.print(arr2[i][j]);
}
System.out.println();
}
//Adding above 2 arrays
for(int i=0; i<row; i++)
{
for(int j=0; j<col; j++)
{
arr3[i][j]= arr1[i][j] + arr2[i][j];
}
}
//Printing Sum of both Arrays;
System.out.println("Sum of above 2 Arrays are");
for(int i=0; i<row; i++)
{
for(int j=0; j<col; j++)
{
System.out.print(arr3[i][j]);
}
System.out.println();
}
//Printing Sum of both Arrays;
System.out.println("Sum without using 3rd Array");
for(int i=0; i<row; i++)
{
for(int j=0; j<col; j++)
{
System.out.print(arr1[i][j] + arr2[i][j]);
}
System.out.println();
}
}
}
|
[
"harendra10104698@gmail.com"
] |
harendra10104698@gmail.com
|
493f815f4a797f8172202d8532e9c2527d93380c
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/classes35-dex2jar/com/google/android/gms/internal/drive/zzdo.java
|
708f74928e98dbe8e8cbf0e1982e65fde2226f77
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 488
|
java
|
//
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.internal.drive;
import com.google.android.gms.drive.events.OpenFileCallback;
import com.google.android.gms.common.api.internal.ListenerHolder$Notifier;
final class zzdo implements ListenerHolder$Notifier<OpenFileCallback>
{
private final /* synthetic */ zzdg zzgn;
zzdo(final zzdk zzdk, final zzdg zzgn) {
this.zzgn = zzgn;
}
public final void onNotifyListenerFailed() {
}
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
3ec3148184ce1eb919931d0d20a397e2c406afd7
|
5f82aae041ab05a5e6c3d9ddd8319506191ab055
|
/Projects/JacksonCore/1/src/test/java/com/fasterxml/jackson/core/misc/TestExceptions.java
|
ef4e7147070e2a429b2648a7111c05b329725275
|
[
"Apache-2.0"
] |
permissive
|
lingming/prapr_data
|
e9ddabdf971451d46f1ef2cdbee15ce342a6f9dc
|
be9ababc95df45fd66574c6af01122ed9df3db5d
|
refs/heads/master
| 2023-08-14T20:36:23.459190
| 2021-10-17T13:49:39
| 2021-10-17T13:49:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 510
|
java
|
package com.fasterxml.jackson.core.misc;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.test.BaseTest;
public class TestExceptions extends BaseTest
{
// For [Issue#10]
public void testOriginalMesssage()
{
JsonProcessingException exc = new JsonParseException("Foobar", JsonLocation.NA);
String msg = exc.getMessage();
String orig = exc.getOriginalMessage();
assertEquals("Foobar", orig);
assertTrue(msg.length() > orig.length());
}
}
|
[
"2890268106@qq.com"
] |
2890268106@qq.com
|
7dc0c263b3170ae32dfe91d79c755d46bd6ba69a
|
a4b9bcf602647bf48a5412ad0f7d274b1bb147a9
|
/chapter20/SuperTypeWildcards.java
|
552d7511a546dac7fa4f62c41f8646b637b67883
|
[] |
no_license
|
huangketsudou/javalearning
|
5680884584771b6c9a9fb1ba5838824cd0ebb550
|
6a5b751e50007702641d14588cb90c0ea0ca0f4c
|
refs/heads/master
| 2022-11-10T14:50:08.716494
| 2020-06-25T09:12:02
| 2020-06-25T09:12:02
| 264,204,472
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 333
|
java
|
package chapter20;
// generics/SuperTypeWildcards.java
import chapter9.interfaceprocessor.Applicator;
import java.util.*;
public class SuperTypeWildcards {
static void writeTo(List<? super Apple> apples) {
apples.add(new Apple());
apples.add(new Jonathan());
// apples.add(new Fruit()); // Error
}
}
|
[
"1941161938@qq.com"
] |
1941161938@qq.com
|
563e7d513902202aaaa89e83eb1f151d0870ba38
|
12f47816dc27ba8dfcc107d6395cedfd11a11a87
|
/core/src/main/java/org/kie/cloud/tests/core/constants/SsoConstants.java
|
186677f1f7a00bf3fee59af032470e7ea17cde16
|
[] |
no_license
|
Sgitario/kie-cloud-integration-tests
|
95656288727838642156367dd038f0cfc4b865ad
|
6026919c8cb9964421d56355fed3059cbb1cceed
|
refs/heads/master
| 2022-12-22T11:30:24.143120
| 2022-06-24T02:49:29
| 2022-06-24T02:49:29
| 235,287,210
| 0
| 0
| null | 2022-12-14T20:49:28
| 2020-01-21T08:10:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,289
|
java
|
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kie.cloud.tests.core.constants;
public final class SsoConstants {
public static final String SSO_URL = "SSO_URL";
public static final String SSO_REALM = "SSO_REALM";
public static final String SSO_USERNAME = "SSO_USERNAME";
public static final String SSO_PASSWORD = "SSO_PASSWORD";
public static final String SSO_BUSINESS_CENTRAL_SSO_CLIENT = "BUSINESS_CENTRAL_SSO_CLIENT";
public static final String SSO_BUSINESS_CENTRAL_SSO_SECRET = "BUSINESS_CENTRAL_SSO_SECRET";
public static final String SSO_KIE_SERVER_SSO_CLIENT = "KIE_SERVER_SSO_CLIENT";
public static final String SSO_KIE_SERVER_SSO_SECRET = "KIE_SERVER_SSO_SECRET";
private SsoConstants() {
}
}
|
[
"josecarvajalhilario@gmail.com"
] |
josecarvajalhilario@gmail.com
|
f0c0e662d35fd4879958ba4e8f0ed39bf08f3552
|
b924c45521b81251cc1acbe4ba3f993951731ee4
|
/jeecg-boot/jeecg-boot-base-common/src/main/java/org/jeecg/common/util/jsonschema/CommonProperty.java
|
3579145fcf4eb193ec1973b4b89fd5501cda9e41
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
xudongyi/jeecg-boot-new
|
336004a7b717f8245d3972028c32354030715078
|
f4c59e6e924c16da67d8ba4a86c09ead1c6d9612
|
refs/heads/master
| 2021-10-06T10:38:21.091681
| 2021-09-26T09:18:58
| 2021-09-26T09:18:58
| 224,561,208
| 1
| 0
|
Apache-2.0
| 2020-05-11T05:10:55
| 2019-11-28T03:17:50
| null |
UTF-8
|
Java
| false
| false
| 3,871
|
java
|
package org.jeecg.common.util.jsonschema;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.system.vo.DictModel;
import com.alibaba.fastjson.JSONObject;
/**
* 验证通用属性
*/
public abstract class CommonProperty implements Serializable{
private static final long serialVersionUID = -426159949502493187L;
protected String key;
/**
* <p>此关键字的值必须是字符串或数组。如果它是一个数组,那么数组的元素必须是字符串,并且必须是唯一的。
* <p>字符串值必须是六种基本类型之一(“null”,“boolean”,“object”,“array”,“number”或“string”),或“integer”,它匹配任何数字,零分数部分。
* <p>当且仅当实例位于为此关键字列出的任何集合中时,实例才会验证。
*
*/
protected String type;
/**
* 对应JsonSchema的enum
* <p>该关键字的值必须是一个数组。这个数组应该至少有一个元素。数组中的元素应该是唯一的。如果实例的值等于此关键字的数组值中的某个元素,则实例将对此关键字成功验证。
* 数组中的元素可以是任何值,包括null
*
* {
* "type": "string",
* "enum": ["1", "2", "3"] 需要的话可以通过这个include转一下
* }
*/
protected List<DictModel> include;
/**
* 对应JsonSchema的const
* <p>此关键字的值可以是任何类型,包括null。
* 如果实例的值等于关键字的值,则实例将针对此关键字成功验证。
*/
protected Object constant;
//三个自定义 属性
protected String view;// 展示类型
protected String title;//数据库字段备注
protected Integer order;//字段显示排序
protected boolean disabled;//是否禁用
protected String defVal; // 字段默认值
public String getDefVal() {
return defVal;
}
public void setDefVal(String defVal) {
this.defVal = defVal;
}
public boolean isDisabled() {
return disabled;
}
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
public String getView() {
return view;
}
public void setView(String view) {
this.view = view;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<DictModel> getInclude() {
return include;
}
public void setInclude(List<DictModel> include) {
this.include = include;
}
public Object getConstant() {
return constant;
}
public void setConstant(Object constant) {
this.constant = constant;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Integer getOrder() {
return order;
}
public void setOrder(Integer order) {
this.order = order;
}
/**
* 返回一个map有两个key
* <P>key ---> Property JSON的key
* <P>prop --> JSON object
* @return
*/
public abstract Map<String,Object> getPropertyJson();
public JSONObject getCommonJson() {
JSONObject json = new JSONObject();
json.put("type", type);
if(include!=null && include.size()>0) {
json.put("enum", include);
}
if(constant!=null) {
json.put("const", constant);
}
if(title!=null) {
json.put("title", title);
}
if(order!=null) {
json.put("order", order);
}
if(view==null) {
json.put("view", "input");
}else {
json.put("view", view);
}
if(disabled) {
String str = "{\"widgetattrs\":{\"disabled\":true}}";
JSONObject ui = JSONObject.parseObject(str);
json.put("ui", ui);
}
if (StringUtils.isNotBlank(defVal)) {
json.put("defVal", defVal);
}
return json;
}
}
|
[
"zhangdaiscott@163.com"
] |
zhangdaiscott@163.com
|
3e7b6f504b980d8c63b18664d7b0b3b63bdadbb7
|
87450e64ebde67082cf4777fd21c73e8f7e4e619
|
/Day07/src/exercise01/Tesst.java
|
341fb48c93f3f58b9506589a010f27bfbf021f4a
|
[] |
no_license
|
GoodPineApple/MulcamJavaWorkspace
|
fbbaf5f30336303830479abb2cf906b09a0bfd88
|
5d358665451e082860d2941a63fe73ae3d54eabb
|
refs/heads/master
| 2021-01-12T08:36:25.504272
| 2017-05-09T15:10:22
| 2017-05-09T15:10:22
| 76,628,272
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 225
|
java
|
package exercise01;
public class Tesst {
public static void main(String[] args) {
NumberBox a = new NumberBox();
a.ivalue = 10;
a.fvalue = (float)1.2345;
System.out.println(a.fvalue +", "+a.ivalue);
}
}
|
[
"taemin3000@naver.com"
] |
taemin3000@naver.com
|
442fe049472c8bddc70be0b73c7ccfc9cbbc5311
|
5edfe5bb8cde144a020dd7436f1bed6cef5e2aa8
|
/src/com/java/leetcode/BackspaceStringCompare.java
|
4576a2af592e7b89fac4ed3e72685f2bf7a36321
|
[] |
no_license
|
yw3388/Data_Structure
|
abb479c97905565bf15c5e6bb538332b014361e0
|
a6e43cde760b08baf0815217a04244df2a1abaf4
|
refs/heads/master
| 2022-02-12T20:13:23.918302
| 2019-08-15T07:36:12
| 2019-08-15T07:36:12
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,363
|
java
|
package com.java.leetcode;
import java.util.Stack;
public class BackspaceStringCompare {
/**
* 退格字符串比较
* Example 1:
Input: S = "ab#c", T = "ad#c"
Output: true
Explanation: Both S and T become "ac".
Example 2:
Input: S = "ab##", T = "c#d#"
Output: true
Explanation: Both S and T become "".
Example 3:
Input: S = "a##c", T = "#a#c"
Output: true
Explanation: Both S and T become "c".
Example 4:
Input: S = "a#c", T = "b"
Output: false
Explanation: S becomes "c" while T becomes "b".
Note:
1 <= S.length <= 200
1 <= T.length <= 200
S and T only contain lowercase letters and '#' characters.
*/
public boolean backspaceCompare(String S, String T) {
//利用stack
Stack<Character> s1=new Stack<>();
Stack<Character> s2=new Stack<>();
for(Character c:S.toCharArray()) {
if(c=='#') {
if(!s1.isEmpty()) {
s1.pop();
}
}else {
s1.push(c);
}
}
for(Character c:T.toCharArray()) {
if(c=='#') {
if(!s2.isEmpty()) {
s2.pop();
}
}else {
s2.push(c);
}
}
return s1==s2;
}
public boolean backspaceCompare2(String S, String T) {
//不能新建空的字符串来保存处理之后的结果,在遍历的过程中同时进行比较
int cnt1=0, cnt2=0;
for(int i=S.length()-1, j=T.length()-1; i>=0 || j>=0; i--,j--) {
while(i>=0 && (S.charAt(i)=='#' || cnt1>0)) {
if(S.charAt(i)=='#') cnt1++;
else cnt1--;
i--;
}
while(j>=0 && (S.charAt(j)=='#' || cnt2>0)) {
if(S.charAt(j)=='#') cnt2++;
else cnt2--;
j--;
}
if(i<0 && j<0) return true;
if(i<0 || j<0) return false;
if(S.charAt(i)!=toString().charAt(j)) return false;
}
return true;
}
public boolean backspaceCompare3(String S, String T) {
int i = S.length() - 1, j = T.length() - 1;
while (true) {
for (int back = 0; i >= 0 && (back > 0 || S.charAt(i) == '#'); --i)
back += S.charAt(i) == '#' ? 1 : -1;
for (int back = 0; j >= 0 && (back > 0 || T.charAt(j) == '#'); --j)
back += T.charAt(j) == '#' ? 1 : -1;
if (i >= 0 && j >= 0 && S.charAt(i) == T.charAt(j)) {
i--; j--;
} else
return i == -1 && j == -1;
}
}
}
|
[
"2283613941@qq.com"
] |
2283613941@qq.com
|
3528d06218e99fa6c944e18c070ac1f4cdaec5d4
|
84f07d9807ef4a93eb4c95ea6b9c5901d81ed098
|
/imageeditor/src/main/java/com/createchance/imageeditor/shaders/LinearBlurTransShader.java
|
52f50b61cb82fc1d51f1421bb7c6693f4521e415
|
[
"Apache-2.0"
] |
permissive
|
LorckyWang/ImageEditor
|
0118413b1840e3c45256a9b747828ea194737428
|
7d2426b66ab9f2c76ea9a626f321b5a53f591091
|
refs/heads/master
| 2021-05-27T11:54:18.743259
| 2019-02-26T08:59:39
| 2019-02-26T08:59:39
| 254,263,188
| 1
| 0
|
Apache-2.0
| 2020-04-09T03:36:16
| 2020-04-09T03:36:15
| null |
UTF-8
|
Java
| false
| false
| 973
|
java
|
package com.createchance.imageeditor.shaders;
import android.opengl.GLES20;
/**
* Linear blur transition shader.
*
* @author createchance
* @date 2019/1/1
*/
public class LinearBlurTransShader extends TransitionMainFragmentShader {
private final String TRANS_SHADER = "LinearBlur.glsl";
private final String U_INTENSITY = "intensity";
private final String U_PASSES = "passes";
public LinearBlurTransShader() {
initShader(new String[]{TRANSITION_FOLDER + BASE_SHADER, TRANSITION_FOLDER + TRANS_SHADER}, GLES20.GL_FRAGMENT_SHADER);
}
@Override
public void initLocation(int programId) {
super.initLocation(programId);
addLocation(U_INTENSITY, true);
addLocation(U_PASSES, true);
loadLocation(programId);
}
public void setUIntensity(float intensity) {
setUniform(U_INTENSITY, intensity);
}
public void setUPasses(int passes) {
setUniform(U_PASSES, passes);
}
}
|
[
"createchance@163.com"
] |
createchance@163.com
|
1129b1d397cd358db72474c11eb80df1e6e13911
|
2d5c6766fb7ebbb6fd9b3f81e015b8c56eda2733
|
/nephele/nephele-server/src/main/java/eu/stratosphere/nephele/plugins/wrapper/AbstractOutputGateWrapper.java
|
d701f23427d2a77e9f07209def16ab6bf39bc59d
|
[] |
no_license
|
bel90/nephele
|
e134197edeb86d5b2bfde138445f2f624f934bae
|
674876a9714a6b48fd7467cadbc48f9eacfd5c84
|
refs/heads/master
| 2021-08-24T00:43:16.161984
| 2017-12-07T09:22:36
| 2017-12-07T09:22:36
| 112,023,086
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,445
|
java
|
/***********************************************************************************************************************
*
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
*
* 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 eu.stratosphere.nephele.plugins.wrapper;
import java.io.IOException;
import eu.stratosphere.nephele.event.task.AbstractTaskEvent;
import eu.stratosphere.nephele.event.task.EventListener;
import eu.stratosphere.nephele.io.ChannelSelector;
import eu.stratosphere.nephele.io.GateID;
import eu.stratosphere.nephele.io.OutputGate;
import eu.stratosphere.nephele.io.channels.ChannelID;
import eu.stratosphere.nephele.io.channels.ChannelType;
import eu.stratosphere.nephele.io.compression.CompressionLevel;
import eu.stratosphere.nephele.jobgraph.JobID;
import eu.stratosphere.nephele.types.Record;
/**
* This class provides an abstract base class for an output gate wrapper. An output gate wrapper can be used by a plugin
* to wrap an output gate and intercept particular method calls. The default implementation of this abstract base class
* simply forwards every method call to the encapsulated output gate.
* <p>
* This class is thread-safe.
*
* @author warneke
* @param <T>
* the type of record transported through this output gate
*/
public abstract class AbstractOutputGateWrapper<T extends Record> implements OutputGate<T> {
/**
* The wrapped output gate.
*/
private final OutputGate<T> wrappedOutputGate;
/**
* Constructs a new abstract output gate wrapper.
*
* @param wrappedOutputGate
* the output gate to be wrapped
*/
public AbstractOutputGateWrapper(final OutputGate<T> wrappedOutputGate) {
if (wrappedOutputGate == null) {
throw new IllegalArgumentException("Argument wrappedOutputGate must not be null");
}
this.wrappedOutputGate = wrappedOutputGate;
}
/**
* Returns the wrapped output gate.
*
* @return the wrapped output gate
*/
protected OutputGate<T> getWrappedOutputGate() {
return this.wrappedOutputGate;
}
/**
* {@inheritDoc}
*/
@Override
public int getIndex() {
return this.wrappedOutputGate.getIndex();
}
/**
* {@inheritDoc}
*/
@Override
public void subscribeToEvent(final EventListener eventListener, final Class<? extends AbstractTaskEvent> eventType) {
this.wrappedOutputGate.subscribeToEvent(eventListener, eventType);
}
/**
* {@inheritDoc}
*/
@Override
public void unsubscribeFromEvent(final EventListener eventListener,
final Class<? extends AbstractTaskEvent> eventType) {
this.wrappedOutputGate.unsubscribeFromEvent(eventListener, eventType);
}
/**
* {@inheritDoc}
*/
@Override
public void publishEvent(final AbstractTaskEvent event) throws IOException, InterruptedException {
this.wrappedOutputGate.publishEvent(event);
}
/**
* {@inheritDoc}
*/
@Override
public void deliverEvent(final AbstractTaskEvent event) {
this.wrappedOutputGate.deliverEvent(event);
}
/**
* {@inheritDoc}
*/
@Override
public JobID getJobID() {
return this.wrappedOutputGate.getJobID();
}
/**
* {@inheritDoc}
*/
@Override
public ChannelType getChannelType() {
return this.wrappedOutputGate.getChannelType();
}
/**
* {@inheritDoc}
*/
@Override
public CompressionLevel getCompressionLevel() {
return this.wrappedOutputGate.getCompressionLevel();
}
/**
* {@inheritDoc}
*/
@Override
public GateID getGateID() {
return this.wrappedOutputGate.getGateID();
}
/**
* {@inheritDoc}
*/
@Override
public void releaseAllChannelResources() {
this.wrappedOutputGate.releaseAllChannelResources();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isClosed() throws IOException, InterruptedException {
return this.wrappedOutputGate.isClosed();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isInputGate() {
return this.wrappedOutputGate.isInputGate();
}
/**
* {@inheritDoc}
*/
@Override
public void writeRecord(final T record) throws IOException, InterruptedException {
this.wrappedOutputGate.writeRecord(record);
}
/**
* {@inheritDoc}
*/
@Override
public void flush() throws IOException, InterruptedException {
this.wrappedOutputGate.flush();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isBroadcast() {
return this.wrappedOutputGate.isBroadcast();
}
/**
* {@inheritDoc}
*/
@Override
public ChannelSelector<T> getChannelSelector() {
return this.wrappedOutputGate.getChannelSelector();
}
/**
* {@inheritDoc}
*/
@Override
public void requestClose() throws IOException, InterruptedException {
this.wrappedOutputGate.requestClose();
}
/**
* {@inheritDoc}
*/
@Override
public void removeAllOutputChannels() {
this.wrappedOutputGate.removeAllOutputChannels();
}
/**
* {@inheritDoc}
*/
@Override
public void createNetworkOutputChannel(final OutputGate<T> outputGate, final ChannelID channelID,
final ChannelID connectedChannelID, final CompressionLevel compressionLevel) {
this.wrappedOutputGate.createNetworkOutputChannel(outputGate, channelID, connectedChannelID, compressionLevel);
}
/**
* {@inheritDoc}
*/
@Override
public void createFileOutputChannel(final OutputGate<T> outputGate, final ChannelID channelID,
final ChannelID connectedChannelID, final CompressionLevel compressionLevel) {
this.wrappedOutputGate.createFileOutputChannel(outputGate, channelID, connectedChannelID, compressionLevel);
}
/**
* {@inheritDoc}
*/
@Override
public void createInMemoryOutputChannel(final OutputGate<T> outputGate, final ChannelID channelID,
final ChannelID connectedChannelID, final CompressionLevel compressionLevel) {
this.wrappedOutputGate.createInMemoryOutputChannel(outputGate, channelID, connectedChannelID, compressionLevel);
}
}
|
[
"belinda.diesslin@campus.tu-berlin.de"
] |
belinda.diesslin@campus.tu-berlin.de
|
6d74d965e09d6fb1411c207a590e746adec4f853
|
4fa7a1c5c8e0c1e44ff64554e221dc61feb8ad57
|
/uippush-client-api/src/main/java/com/sinoif/esb/query/model/dto/IndexStatisticalFigureDTO.java
|
827417121e5deb735b5946b7a369a1f07e4d1e74
|
[] |
no_license
|
yuanyixiong/esb
|
66e7912ab844497cb9a8f23c8439320dae5699bf
|
7dfafe71e530d3e704045303830b2403cfd39078
|
refs/heads/master
| 2022-12-25T00:47:29.128583
| 2020-01-17T08:32:40
| 2020-01-17T08:32:40
| 234,504,607
| 5
| 2
| null | 2022-12-16T04:49:31
| 2020-01-17T08:26:40
|
Java
|
UTF-8
|
Java
| false
| false
| 782
|
java
|
package com.sinoif.esb.query.model.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import java.io.Serializable;
import java.util.Date;
/**
* 首页报表
*/
public class IndexStatisticalFigureDTO implements Serializable {
@JSONField(format = "yyyy-MM-dd")
private Date day;
@JSONField(serializeUsing = ToStringSerializer.class)
private Long number;
public Date getDay() {
return day;
}
public IndexStatisticalFigureDTO setDay(Date day) {
this.day = day;
return this;
}
public Long getNumber() {
return number;
}
public IndexStatisticalFigureDTO setNumber(Long number) {
this.number = number;
return this;
}
}
|
[
"15926499574@163.com"
] |
15926499574@163.com
|
e22fa3ec019468dc66d3575c4fb45363d6726130
|
3441de0b93c9bc4dc40e1a46abd7d36cafe51c2d
|
/paascloud-provider-api/paascloud-provider-opc-api/src/main/java/com/paascloud/provider/model/dto/attachment/OptAttachmentRespDto.java
|
0b1f01065fc5ff3159c6310cf94376e313486aaa
|
[] |
no_license
|
XinxiJiang/passcloud-master
|
23baeb1c4360432585c07e49e7e2366dc2955398
|
212c2d7c2c173a788445c21de4775c4792a11242
|
refs/heads/master
| 2023-04-11T21:31:27.208057
| 2018-12-11T04:42:18
| 2018-12-11T04:44:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 565
|
java
|
package com.paascloud.provider.model.dto.attachment;
import lombok.Data;
import java.io.Serializable;
/**
* The class Opt attachment resp dto.
*
* @author liyuzhang
*/
@Data
public class OptAttachmentRespDto implements Serializable {
private static final long serialVersionUID = 7156713126848745258L;
private Long id;
private String serialNo;
private String refNo;
private String name;
private String path;
private String type;
private String format;
private String description;
/**
* 文件服务器根目录
*/
private String bucketName;
}
|
[
"35205889+mliyz@users.noreply.github.com"
] |
35205889+mliyz@users.noreply.github.com
|
16c4a83a7b4614de0d555e975bae4350ed4ad366
|
ed75342665e66b7ea8d28b9df08aa3d4dcc5cbb3
|
/servlet/src/test/java/io/undertow/servlet/test/async/AsyncErrorServlet.java
|
8918261dc743b36003a0c52bf3dd4bc2f0f5205f
|
[
"Apache-2.0"
] |
permissive
|
zieglerm/undertow
|
70006e6131af21e9d50a4ccdd50004b3f1125414
|
d99b6924466687645f68ab313e7f992aecebdc2d
|
refs/heads/master
| 2020-12-13T18:26:02.325121
| 2014-11-03T22:24:23
| 2014-11-03T22:24:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,022
|
java
|
package io.undertow.servlet.test.async;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author Stuart Douglas
*/
public class AsyncErrorServlet extends HttpServlet {
@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
req.startAsync();
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(100);
resp.sendError(500);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
t.start();
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doGet(req, resp);
}
}
|
[
"stuart.w.douglas@gmail.com"
] |
stuart.w.douglas@gmail.com
|
3c8ca68c6587e0c31999e9baf19788fab270a17a
|
4c89df2ee41d4e485466f668f9d905e8aee793e5
|
/core/src/test/java/com/vladmihalcea/book/hpjp/hibernate/mapping/HibernateImmutableTest.java
|
6c05b05d595bf3e1850cb96bc4a8d15b9b640a72
|
[
"Apache-2.0"
] |
permissive
|
ninjayoto/high-performance-java-persistence
|
19003687ad217e8e49e2861a777ccdfaeeebe5ed
|
3fd8bc33ad4eb0d2e168fe28e5772e13a9bbee0e
|
refs/heads/master
| 2020-03-07T18:20:23.035039
| 2018-03-30T08:31:38
| 2018-03-30T08:31:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,644
|
java
|
package com.vladmihalcea.book.hpjp.hibernate.mapping;
import com.vladmihalcea.book.hpjp.util.AbstractSQLServerIntegrationTest;
import com.vladmihalcea.book.hpjp.util.ReflectionUtils;
import org.hibernate.annotations.Immutable;
import org.junit.Test;
import javax.persistence.*;
import java.util.Date;
import static org.junit.Assert.assertEquals;
/**
* @author Vlad Mihalcea
*/
public class HibernateImmutableTest extends AbstractSQLServerIntegrationTest {
@Override
protected Class<?>[] entities() {
return new Class<?>[]{
Event.class
};
}
@Test
public void test() {
doInJPA(entityManager -> {
Event event = new Event(1L, "Temperature", "25");
entityManager.persist(event);
});
doInJPA(entityManager -> {
Event event = entityManager.find(Event.class, 1L);
assertEquals("25", event.getEventValue());
ReflectionUtils.setFieldValue(event, "eventValue", "10");
assertEquals("10", event.getEventValue());
});
doInJPA(entityManager -> {
Event event = entityManager.find(Event.class, 1L);
assertEquals("25", event.getEventValue());
});
doInJPA(entityManager -> {
entityManager.createQuery(
"update Event " +
"set eventValue = :eventValue " +
"where id = :id")
.setParameter("eventValue", "10")
.setParameter("id", 1L)
.executeUpdate();
});
doInJPA(entityManager -> {
Event event = entityManager.find(Event.class, 1L);
assertEquals("25", event.getEventValue());
});
}
@Entity(name = "Event")
@Immutable
public static class Event {
@Id
private Long id;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_on")
private Date createdOn = new Date();
@Column(name = "event_key")
private String eventKey;
@Column(name = "event_value")
private String eventValue;
public Event(Long id, String eventKey, String eventValue) {
this.id = id;
this.eventKey = eventKey;
this.eventValue = eventValue;
}
private Event() {
}
public Long getId() {
return id;
}
public Date getCreatedOn() {
return createdOn;
}
public String getEventKey() {
return eventKey;
}
public String getEventValue() {
return eventValue;
}
}
}
|
[
"mihalcea.vlad@gmail.com"
] |
mihalcea.vlad@gmail.com
|
0007a43f141f85c3ad6f1297813cd8ce3263dd32
|
620a39fe25cc5fbd0ed09218b62ccbea75863cda
|
/wfj_front/src/rating/sellersRecord/service/imp/SellersRecordService.java
|
17645663d99b8f239d53caf7af1fb4e837d3c3ad
|
[] |
no_license
|
hukeling/wfj
|
f9d2a1dc731292acfc67b1371f0f6933b0af1d17
|
0aed879a73b1349d74948efd74dadd97616d8fb8
|
refs/heads/master
| 2021-01-16T18:34:47.111453
| 2017-08-12T07:48:58
| 2017-08-12T07:48:58
| 100,095,588
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 665
|
java
|
package rating.sellersRecord.service.imp;
import rating.sellersRecord.dao.ISellersRecordDao;
import rating.sellersRecord.pojo.SellersRecord;
import rating.sellersRecord.service.ISellersRecordService;
import util.service.BaseService;
/**
* 卖家等级升迁记录Service接口实现
* @author wsy
*
*/
public class SellersRecordService extends BaseService<SellersRecord> implements ISellersRecordService {
@SuppressWarnings("unused")
private ISellersRecordDao sellersRecordDao;//卖家等级升迁记录Dao
public void setSellersRecordDao(ISellersRecordDao sellersRecordDao) {
this.baseDao = this.sellersRecordDao = sellersRecordDao;
}
}
|
[
"hukelingwork@163.com"
] |
hukelingwork@163.com
|
6291e2be76b7b161f26a82aae3780bb0989eac13
|
0fc9c76bdaff5ab7b3183c7218a488d0363da3ce
|
/src/main/java/de/st_ddt/crazylogin/commands/CommandLogout.java
|
241e922b05091248454f8796723df422e1c73752
|
[
"Apache-2.0"
] |
permissive
|
ST-DDT/CrazyLogin
|
f99e0078e079b8dc51e00cbbe5ce7512c25becca
|
eca41ce0fcbd4c4820f13892d1bdc70edf323707
|
refs/heads/master
| 2020-12-24T19:27:14.493364
| 2018-10-16T19:55:10
| 2018-10-16T19:55:10
| 15,261,921
| 6
| 24
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 940
|
java
|
package de.st_ddt.crazylogin.commands;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import de.st_ddt.crazylogin.CrazyLogin;
import de.st_ddt.crazyplugin.exceptions.CrazyCommandExecutorException;
import de.st_ddt.crazyplugin.exceptions.CrazyException;
import de.st_ddt.crazyutil.source.Permission;
public class CommandLogout extends CommandExecutor
{
public CommandLogout(final CrazyLogin plugin)
{
super(plugin);
}
@Override
public void command(final CommandSender sender, final String[] args) throws CrazyException
{
if (!(sender instanceof Player))
throw new CrazyCommandExecutorException(false);
final Player player = (Player) sender;
owner.playerLogout(player);
}
@Override
@Permission("crazylogin.logout.command")
public boolean hasAccessPermission(final CommandSender sender)
{
return sender.hasPermission("crazylogin.logout.command");
}
}
|
[
"ST-DDT@gmx.de"
] |
ST-DDT@gmx.de
|
d3c447f6545e3bbffde325c2f5ce3a68a4ed692d
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/java/java-analysis-impl/src/com/siyeh/ig/security/NonStaticInnerClassInSecureContextElementMerger.java
|
df9e706e545b513db2ec7171a4cfe76f2c18119f
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 1,033
|
java
|
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.siyeh.ig.security;
import com.intellij.codeInspection.ex.InspectionElementsMergerBase;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import java.util.Map;
/**
* @author Bas Leijdekkers
*/
public class NonStaticInnerClassInSecureContextElementMerger extends InspectionElementsMergerBase {
@Override
public @NotNull String getMergedToolName() {
return "PrivateMemberAccessBetweenOuterAndInnerClass";
}
@Override
public @NonNls String @NotNull [] getSourceToolNames() {
return new String[] {"NonStaticInnerClassInSecureContext", "PrivateMemberAccessBetweenOuterAndInnerClass"};
}
@Override
protected boolean isEnabledByDefault(@NotNull String sourceToolName) {
return false;
}
@Override
protected boolean writeMergedContent(@NotNull Element toolElement) {
return true;
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
ed946dc5d8792776a0790964484f3802bc17624c
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/Ibotta_com.ibotta.android/javafiles/com/firebase/client/core/PersistentConnection$3.java
|
89f04789b518065918a2e954d24c8b5c0a21c5bb
|
[
"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
| 2,830
|
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.firebase.client.core;
import com.firebase.client.FirebaseError;
import java.util.Map;
// Referenced classes of package com.firebase.client.core:
// PersistentConnection
class PersistentConnection$3
implements sponseListener
{
public void onResponse(Map map)
{
Object obj = ((Object) ((String)map.get("s")));
// 0 0:aload_1
// 1 1:ldc1 #29 <String "s">
// 2 3:invokeinterface #35 <Method Object Map.get(Object)>
// 3 8:checkcast #37 <Class String>
// 4 11:astore_2
if(!((String) (obj)).equals("ok"))
//* 5 12:aload_2
//* 6 13:ldc1 #39 <String "ok">
//* 7 15:invokevirtual #43 <Method boolean String.equals(Object)>
//* 8 18:ifne 40
map = ((Map) (FirebaseError.fromStatus(((String) (obj)), (String)map.get("d"))));
// 9 21:aload_2
// 10 22:aload_1
// 11 23:ldc1 #45 <String "d">
// 12 25:invokeinterface #35 <Method Object Map.get(Object)>
// 13 30:checkcast #37 <Class String>
// 14 33:invokestatic #51 <Method FirebaseError FirebaseError.fromStatus(String, String)>
// 15 36:astore_1
else
//* 16 37:goto 42
map = null;
// 17 40:aconst_null
// 18 41:astore_1
obj = ((Object) (val$onComplete));
// 19 42:aload_0
// 20 43:getfield #21 <Field com.firebase.client.Firebase$CompletionListener val$onComplete>
// 21 46:astore_2
if(obj != null)
//* 22 47:aload_2
//* 23 48:ifnull 59
((com.firebase.client.ener) (obj)).onComplete(((FirebaseError) (map)), ((com.firebase.client.Firebase) (null)));
// 24 51:aload_2
// 25 52:aload_1
// 26 53:aconst_null
// 27 54:invokeinterface #57 <Method void com.firebase.client.Firebase$CompletionListener.onComplete(FirebaseError, com.firebase.client.Firebase)>
// 28 59:return
}
final PersistentConnection this$0;
final com.firebase.client.ener val$onComplete;
PersistentConnection$3()
{
this$0 = final_persistentconnection;
// 0 0:aload_0
// 1 1:aload_1
// 2 2:putfield #19 <Field PersistentConnection this$0>
val$onComplete = com.firebase.client.ener.this;
// 3 5:aload_0
// 4 6:aload_2
// 5 7:putfield #21 <Field com.firebase.client.Firebase$CompletionListener val$onComplete>
super();
// 6 10:aload_0
// 7 11:invokespecial #24 <Method void Object()>
// 8 14:return
}
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
46758d283bd892c1a6b32a9a525ac53f789422a5
|
5b8337c39cea735e3817ee6f6e6e4a0115c7487c
|
/sources/com/startapp/android/publish/ads/list3d/C4808d.java
|
ad40d3f8b77f7167ff2703f749ea8e9bbb875d27
|
[] |
no_license
|
karthik990/G_Farm_Application
|
0a096d334b33800e7d8b4b4c850c45b8b005ccb1
|
53d1cc82199f23517af599f5329aa4289067f4aa
|
refs/heads/master
| 2022-12-05T06:48:10.513509
| 2020-08-10T14:46:48
| 2020-08-10T14:46:48
| 286,496,946
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,177
|
java
|
package com.startapp.android.publish.ads.list3d;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.EmbossMaskFilter;
import android.graphics.Paint;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RoundRectShape;
import android.graphics.drawable.shapes.Shape;
import android.text.TextUtils.TruncateAt;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.startapp.android.publish.adsCommon.C4983b;
import com.startapp.android.publish.adsCommon.Utils.C4945h;
import com.startapp.android.publish.common.metaData.MetaDataStyle;
import com.startapp.android.publish.p065a.C4733b;
import com.startapp.common.p092a.C5146c;
/* renamed from: com.startapp.android.publish.ads.list3d.d */
/* compiled from: StartAppSDK */
public class C4808d {
/* renamed from: a */
private RelativeLayout f2653a;
/* renamed from: b */
private ImageView f2654b;
/* renamed from: c */
private TextView f2655c;
/* renamed from: d */
private TextView f2656d;
/* renamed from: e */
private TextView f2657e;
/* renamed from: f */
private C4733b f2658f;
/* renamed from: g */
private MetaDataStyle f2659g = null;
public C4808d(Context context) {
Context context2 = context;
context2.setTheme(16973829);
LayoutParams layoutParams = new LayoutParams(-2, -2);
this.f2653a = new RelativeLayout(context2);
this.f2653a.setBackgroundDrawable(new GradientDrawable(Orientation.TOP_BOTTOM, new int[]{C4983b.m3032a().mo62174n(), C4983b.m3032a().mo62175o()}));
this.f2653a.setLayoutParams(layoutParams);
int a = C4945h.m2891a(context2, 3);
int a2 = C4945h.m2891a(context2, 4);
int a3 = C4945h.m2891a(context2, 5);
int a4 = C4945h.m2891a(context2, 6);
int a5 = C4945h.m2891a(context2, 10);
int a6 = C4945h.m2891a(context2, 84);
this.f2653a.setPadding(a5, a, a5, a);
this.f2653a.setTag(this);
this.f2654b = new ImageView(context2);
this.f2654b.setId(1);
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(a6, a6);
layoutParams2.addRule(15);
this.f2654b.setLayoutParams(layoutParams2);
this.f2654b.setPadding(0, 0, a4, 0);
this.f2655c = new TextView(context2);
this.f2655c.setId(2);
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-1, -2);
layoutParams3.addRule(C5146c.m3740a(17), 1);
layoutParams3.addRule(6, 1);
this.f2655c.setLayoutParams(layoutParams3);
this.f2655c.setPadding(0, 0, 0, a3);
this.f2655c.setTextColor(C4983b.m3032a().mo62177q().intValue());
this.f2655c.setTextSize((float) C4983b.m3032a().mo62176p().intValue());
this.f2655c.setSingleLine(true);
this.f2655c.setEllipsize(TruncateAt.END);
C4945h.m2899a(this.f2655c, C4983b.m3032a().mo62178r());
this.f2656d = new TextView(context2);
this.f2656d.setId(3);
RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(-1, -2);
layoutParams4.addRule(C5146c.m3740a(17), 1);
layoutParams4.addRule(3, 2);
layoutParams4.setMargins(0, 0, 0, a3);
this.f2656d.setLayoutParams(layoutParams4);
this.f2656d.setTextColor(C4983b.m3032a().mo62180t().intValue());
this.f2656d.setTextSize((float) C4983b.m3032a().mo62179s().intValue());
this.f2656d.setSingleLine(true);
this.f2656d.setEllipsize(TruncateAt.END);
C4945h.m2899a(this.f2656d, C4983b.m3032a().mo62181u());
this.f2658f = new C4733b(context2);
RelativeLayout.LayoutParams layoutParams5 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams5.addRule(C5146c.m3740a(17), 1);
layoutParams5.addRule(8, 1);
layoutParams5.setMargins(0, 0, 0, -a3);
this.f2658f.setLayoutParams(layoutParams5);
this.f2658f.setPadding(0, 0, 0, a2);
this.f2658f.setId(5);
this.f2657e = new TextView(context2);
RelativeLayout.LayoutParams layoutParams6 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams6.addRule(C5146c.m3740a(21));
layoutParams6.addRule(8, 1);
this.f2657e.setLayoutParams(layoutParams6);
mo61476a(false);
this.f2657e.setTextColor(-1);
this.f2657e.setTextSize(12.0f);
this.f2657e.setTypeface(null, 1);
this.f2657e.setPadding(a5, a4, a5, a4);
this.f2657e.setId(4);
this.f2657e.setShadowLayer(2.5f, -3.0f, 3.0f, -9013642);
this.f2657e.setBackgroundDrawable(new ShapeDrawable(new RoundRectShape(new float[]{10.0f, 10.0f, 10.0f, 10.0f, 10.0f, 10.0f, 10.0f, 10.0f}, null, null)) {
/* access modifiers changed from: protected */
public void onDraw(Shape shape, Canvas canvas, Paint paint) {
paint.setColor(-11363070);
paint.setMaskFilter(new EmbossMaskFilter(new float[]{1.0f, 1.0f, 1.0f}, 0.4f, 5.0f, 3.0f));
super.onDraw(shape, canvas, paint);
}
});
this.f2653a.addView(this.f2654b);
this.f2653a.addView(this.f2655c);
this.f2653a.addView(this.f2656d);
this.f2653a.addView(this.f2658f);
this.f2653a.addView(this.f2657e);
}
/* renamed from: a */
public RelativeLayout mo61474a() {
return this.f2653a;
}
/* renamed from: b */
public ImageView mo61477b() {
return this.f2654b;
}
/* renamed from: c */
public TextView mo61478c() {
return this.f2655c;
}
/* renamed from: d */
public TextView mo61479d() {
return this.f2656d;
}
/* renamed from: e */
public C4733b mo61480e() {
return this.f2658f;
}
/* renamed from: a */
public void mo61476a(boolean z) {
if (z) {
this.f2657e.setText("Open");
} else {
this.f2657e.setText("Download");
}
}
/* renamed from: a */
public void mo61475a(MetaDataStyle metaDataStyle) {
if (this.f2659g != metaDataStyle) {
this.f2659g = metaDataStyle;
this.f2653a.setBackgroundDrawable(new GradientDrawable(Orientation.TOP_BOTTOM, new int[]{metaDataStyle.getItemGradientTop().intValue(), metaDataStyle.getItemGradientBottom().intValue()}));
this.f2655c.setTextSize((float) metaDataStyle.getItemTitleTextSize().intValue());
this.f2655c.setTextColor(metaDataStyle.getItemTitleTextColor().intValue());
C4945h.m2899a(this.f2655c, metaDataStyle.getItemTitleTextDecoration());
this.f2656d.setTextSize((float) metaDataStyle.getItemDescriptionTextSize().intValue());
this.f2656d.setTextColor(metaDataStyle.getItemDescriptionTextColor().intValue());
C4945h.m2899a(this.f2656d, metaDataStyle.getItemDescriptionTextDecoration());
}
}
}
|
[
"knag88@gmail.com"
] |
knag88@gmail.com
|
ef6894f2feed3f0156be8487cf237865d43341fe
|
124df74bce796598d224c4380c60c8e95756f761
|
/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObsLevel.java
|
2c2fbf59453224cad1e6c279b357b425e2b9c60a
|
[] |
no_license
|
Mapoet/AWIPS-Test
|
19059bbd401573950995c8cc442ddd45588e6c9f
|
43c5a7cc360b3cbec2ae94cb58594fe247253621
|
refs/heads/master
| 2020-04-17T03:35:57.762513
| 2017-02-06T17:17:58
| 2017-02-06T17:17:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,757
|
java
|
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.dataplugin.bufrua;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* Describes one level of data in a vertical sounding. The vertical ordinate may
* be one or both of pressure (in Pascals) or height (in meters). At least one
* vertical datum must be present to describe the point.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20071127 382 jkorman Initial Coding.
* 20080630 1215 jkorman Implemented Serializable.
* </pre>
*
* @author jkorman
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class UAObsLevel implements Serializable, ISerializableObject {
private static final long serialVersionUID = 1L;
// Vertical sounding significance.
// BUFR Code tables Version 13-07/11/2007 - 0 08 001
// Bit No.
// 1 Surface
// 2 Standard level
// 3 Tropopause level
// 4 Maximum wind level
// 5 Significant level, temperature and/or relative humidity
// 6 Significant level, wind
// All 7 Missing value
@XmlAttribute
@DynamicSerializeElement
private Integer vertSig = null;
// Observation pressure in Pascals
@XmlAttribute
@DynamicSerializeElement
private Integer pressure = null;
// Observation geopotential height in meters.
@XmlAttribute
@DynamicSerializeElement
private Integer geoHeight = null;
// Observation dry air temperature in degrees Kelvin.
@XmlAttribute
@DynamicSerializeElement
private Double temp = null;
// Observation dewpoint temperature in degrees Kelvin.
@XmlAttribute
@DynamicSerializeElement
private Double dwpt = null;
// Observation wind direction in angular degrees. Integer
@XmlAttribute
@DynamicSerializeElement
private Integer windDirection = null;
// Observation wind speed in meters per second.
// Decimal(5,2)
@XmlAttribute
@DynamicSerializeElement
private Double windSpeed = null;
// Observation 1 KM below level wind shear in meters per second.
// Decimal(5,2)
@XmlAttribute
@DynamicSerializeElement
private Double loShear = null;
// Observation 1 KM above level wind shear in meters per second.
// Decimal(5,2)
@XmlAttribute
@DynamicSerializeElement
private Double hiShear = null;
/**
* Construct an empty base.
*/
public UAObsLevel() {
}
/**
* Get the level vertical significance (level type).
*
* @return the vertSig
*/
public Integer getVertSig() {
return vertSig;
}
/**
* Set the level vertical significance (level type).
*
* @param vertSig
* the vertSig to set
*/
public void setVertSig(Integer vertSig) {
this.vertSig = vertSig;
}
/**
* Get the level pressure in Pascals.
*
* @return the pressure
*/
public Integer getPressure() {
return pressure;
}
/**
* Set the level pressure in Pascals.
*
* @param pressure
* the pressure to set
*/
public void setPressure(Integer pressure) {
this.pressure = pressure;
}
/**
* Get the level geopotential height in meters.
*
* @return the geoHeight
*/
public Integer getGeoHeight() {
return geoHeight;
}
/**
* Set the level geopotential height in meters.
*
* @param geoHeight
* the geoHeight to set
*/
public void setGeoHeight(Integer geoHeight) {
this.geoHeight = geoHeight;
}
/**
* Get the level dry air temperature in degrees Kelvin.
*
* @return the temp
*/
public Double getTemp() {
return temp;
}
/**
* Set the level dry air temperature in degrees Kelvin.
*
* @param temp
* the temp to set
*/
public void setTemp(Double temp) {
this.temp = temp;
}
/**
* Get the level dewpoint temperature in degrees Kelvin.
*
* @return the dwpt
*/
public Double getDwpt() {
return dwpt;
}
/**
* Set the level dewpoint temperature in degrees Kelvin.
*
* @param dwpt
* the dwpt to set
*/
public void setDwpt(Double dwpt) {
this.dwpt = dwpt;
}
/**
* Get the level wind direction in angular degrees.
*
* @return the windDirection
*/
public Integer getWindDirection() {
return windDirection;
}
/**
* Set the level wind direction in angular degrees.
*
* @param windDirection
* the windDirection to set
*/
public void setWindDirection(Integer windDirection) {
this.windDirection = windDirection;
}
/**
* Get the level wind speed in meters per second.
*
* @return the windSpeed
*/
public Double getWindSpeed() {
return windSpeed;
}
/**
* Set the level wind speed in meters per second.
*
* @param windSpeed
* the windSpeed to set
*/
public void setWindSpeed(Double windSpeed) {
this.windSpeed = windSpeed;
}
/**
* Get the level low level wind shear.
*
* @return the loShear
*/
public Double getLoShear() {
return loShear;
}
/**
* Set the level low level wind shear.
*
* @param loShear
* the loShear to set
*/
public void setLoShear(Double loShear) {
this.loShear = loShear;
}
/**
* Get the level high level wind shear.
*
* @return the hiShear
*/
public Double getHiShear() {
return hiShear;
}
/**
* Set the level high level wind shear.
*
* @param hiShear
* the hiShear to set
*/
public void setHiShear(Double hiShear) {
this.hiShear = hiShear;
}
/**
*
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Type=");
sb.append(vertSig);
sb.append(" Pr=");
sb.append(pressure);
sb.append(" Pa:Ht=");
sb.append(geoHeight);
sb.append(" m:Tp=");
sb.append(temp);
sb.append(" K:Td=");
sb.append(dwpt);
sb.append(" K:Wd=");
sb.append(windDirection);
sb.append(" deg:Ws=");
sb.append(windSpeed);
sb.append(" m/s");
return sb.toString();
}
}
|
[
"joshua.t.love@saic.com"
] |
joshua.t.love@saic.com
|
7b6e053d395d94cee05b041f8344648a5921f530
|
629f4a8c0b605927095608fff027def53fc03c61
|
/src/main/java/com/lisz/container/interview/T07_AtomicInteger.java
|
ed2f5c161174d65191586ebba90e026034df9090
|
[] |
no_license
|
lisz1012/MultiThread
|
7c71895a4d0a30da9f1b7be76461464049741932
|
3c5b29654e0220602ac9d61b657781d939fbfd2b
|
refs/heads/master
| 2021-08-03T01:07:33.967549
| 2021-07-20T07:07:21
| 2021-07-20T07:07:21
| 231,703,791
| 0
| 0
| null | 2020-10-13T18:36:31
| 2020-01-04T03:38:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,016
|
java
|
package com.lisz.container.interview;
import org.junit.jupiter.api.Test;
import java.util.concurrent.atomic.AtomicInteger;
public class T07_AtomicInteger {
private AtomicInteger threadNo = new AtomicInteger(1);
private char aC[] = "ABCDEFG".toCharArray();
private char aI[] = "1234567".toCharArray();
private Thread t1 = null;
private Thread t2 = null;
@Test
public void test() {
t1 = new Thread(()->{
for (char c : aC) {
while (threadNo.get() != 1) {}
System.out.print(c);
threadNo.set(2);
}
});
t2 = new Thread(()->{
for (char c : aI) {
while (threadNo.get() != 2){}
System.out.print(c);
threadNo.set(1);
}
});
t1.start();
t2.start();
try {
t1.join();
t2.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
|
[
"lisz1012@163.com"
] |
lisz1012@163.com
|
5fff6efd32547de07c2d490295d9335701858f5f
|
ee00cea819879bd97b681b0ce0d0569aea5fc5f7
|
/efcs/src/main/java/com/wxzd/efcs/ddd/domain/entities/EfcsErrorEntity.java
|
291aa195bfbcc8b7e615d33c63478d1359aaed6b
|
[] |
no_license
|
developTiger/sy-efcs
|
3eb2c17b3f3a32c842b5201ac484647cdff142ab
|
8952145e05a2ba66fb3838198beff7cf8486dc06
|
refs/heads/master
| 2020-12-03T09:26:19.250381
| 2017-06-28T02:43:13
| 2017-06-28T02:43:13
| 95,620,688
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
package com.wxzd.efcs.ddd.domain.entities;
import com.wxzd.efcs.ddd.domain.enums.EfcsErrorCode;
import com.wxzd.wms.ddd.IEntity;
/**
* 带异常代码和异常描述的领域实体
* @author Leon Regulus on 2017/4/16.
* @version 1.0
* @since 1.0
*/
public class EfcsErrorEntity extends IEntity{
/**
* 异常代码
*/
public EfcsErrorCode error_code;
/**
* 异常信息
*/
public String error_desc;
public EfcsErrorCode getError_code() {
return error_code;
}
public void setError_code(EfcsErrorCode error_code) {
this.error_code = error_code;
}
public String getError_desc() {
return error_desc;
}
public void setError_desc(String error_desc) {
this.error_desc = error_desc;
}
}
|
[
"1366812446@qq.com"
] |
1366812446@qq.com
|
c87899ee2e511885c42ef5cbc80e476dcb5c8e24
|
746f04fbbfc9267b4475c20b4adaaa3ed938e38f
|
/diamond-container/src/main/java/com/galaxy/hsf/container/third/tomcat/SARDeployer.java
|
6551ac3a3883570e6d7172a7f4ff58cc57a1a1b5
|
[] |
no_license
|
xyz-dev/diamond
|
1402ceb95dd59ca6a85f3ce4ab89beef05da24da
|
5635b70341ce89f132d9e516df06f5c4b4d93938
|
refs/heads/master
| 2021-01-18T18:21:22.663824
| 2013-05-27T18:37:29
| 2013-05-27T18:37:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,555
|
java
|
/**
* High-Speed Service Framework (HSF)
*
*/
package com.galaxy.hsf.container.third.tomcat;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Properties;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.Server;
import org.apache.naming.resources.DirContextURLStreamHandlerFactory;
/**
* 描述:基于Tomcat LifecycleListener来实现SAR的部署
* @author sihai
*
*/
public class SARDeployer implements LifecycleListener {
@Override
public void lifecycleEvent(LifecycleEvent event) {
Lifecycle lifecycle = event.getLifecycle();
if (Lifecycle.START_EVENT.equals(event.getType())) {
if (lifecycle instanceof Server) {
try {
setURLStreamHandler();
deploySars();
} catch (Exception e) {
System.err.println("部署SAR时出现问题!");
e.printStackTrace();
}
}
}
}
private void setURLStreamHandler() {
java.net.URLStreamHandlerFactory streamHandlerFactory = new DirContextURLStreamHandlerFactory();
URL.setURLStreamHandlerFactory(streamHandlerFactory);
}
/**
* 扫描部署所有的SAR
*/
private void deploySars() throws Exception {
String searchDir = System.getProperty("catalina.home") + File.separator + "webapps";
File file = new File(searchDir);
File[] sars = file.listFiles(new FileFilter(){
public boolean accept(File pathname) {
if((pathname.isDirectory()) && (pathname.getName().endsWith(".sar"))){
return true;
}
return false;
}
});
if(sars.length>0){
System.out.println("需要部署的SAR数量为:"+sars.length);
}
for (int i = 0; i < sars.length; i++) {
deploySar(sars[i].getCanonicalPath()+File.separator);
}
}
/**
* 部署单个SAR<br/>
* 部署步骤:
* 1、获取path+META-INF/tomcat.properties,读取并得到启动类的类名
* 2、基于path+lib创建ClassLoader,ClassLoader的父classloader设置为当前classloader
* 3、反射调用启动类的start方法完成SAR的启动
*/
private void deploySar(String path) throws Exception{
System.out.println("开始部署SAR,路径为:" + path);
if(!path.endsWith(File.separator)){
path += File.separator;
}
// Step 1
String tomcatFileName = path + "META-INF" + File.separator + "tomcat.properties";
File tomcatFile = new File(tomcatFileName);
if(!tomcatFile.exists()){
throw new FileNotFoundException("不符合SAR Deployer规范,未找到文件:" + tomcatFileName);
}
FileInputStream fin = null;
Properties properties = new Properties();
try {
fin = new FileInputStream(tomcatFile);
properties.load(fin);
} finally {
if(null != fin) {
fin.close();
}
}
fin.close();
String startupClassName = properties.getProperty("classname");
if((startupClassName == null) || ("".equals(startupClassName.trim()))){
throw new IllegalArgumentException("不符合SAR Deployer规范,文件:"+tomcatFileName+"中未配置classname属性");
}
// Step 2
String jarFileInfo = path + "lib";
File jarFileDir = new File(jarFileInfo);
if(!jarFileDir.exists()){
throw new FileNotFoundException("不符合SAR Deployer规范,未找到文件:"+jarFileInfo);
}
File[] jarFiles = jarFileDir.listFiles(new FileFilter(){
public boolean accept(File pathname) {
if((pathname.isFile()) && (pathname.getName().endsWith(".jar"))){
return true;
}
return false;
}
});
URL[] jarURLs = new URL[jarFiles.length];
for (int i = 0; i < jarFiles.length; i++) {
jarURLs[i] = jarFiles[i].toURI().toURL();
}
ClassLoader sarLoader = new SARClassLoader(jarURLs, this.getClass().getClassLoader());
HSFAppClassLoader.setSarClassLoader(sarLoader);
// step 3
Class<?> startupClass = sarLoader.loadClass(startupClassName);
Object startupObject = startupClass.newInstance();
Method method = startupClass.getDeclaredMethod("start", new Class<?>[]{String.class});
method.invoke(startupObject, new Object[]{path});
System.out.println("路径为:" + path + "的SAR部署完毕!");
}
class SARClassLoader extends URLClassLoader {
public SARClassLoader(URL[] urls, ClassLoader parent) {
super(urls, parent);
}
}
}
|
[
"iac-rq@live.cn"
] |
iac-rq@live.cn
|
8c76e9d72258b72f6105fde6f2a3470592f495e1
|
8ecf9fed02240dcf2f95172226727bf5c74ca1e8
|
/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/contentassist/VariableNamesProcessor.java
|
15432bbcce2d83382358b9e1965dc322328ab11c
|
[] |
no_license
|
wulibing/Green-UML-project
|
886b457019b565015093c7600a35e740e3bc2bcd
|
b0e7dab95a5f77dfb603dc499959c4802f66d6ea
|
refs/heads/master
| 2021-01-17T11:39:14.783939
| 2014-10-06T06:38:26
| 2014-10-06T06:38:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,163
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.ui.refactoring.contentassist;
import java.util.ArrayList;
import java.util.Arrays;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.graphics.Image;
import org.eclipse.jface.contentassist.IContentAssistSubjectControl;
import org.eclipse.jface.contentassist.ISubjectControlContentAssistProcessor;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal;
import org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry;
public class VariableNamesProcessor implements IContentAssistProcessor, ISubjectControlContentAssistProcessor {
private String fErrorMessage;
private String[] fTempNameProposals;
private ImageDescriptorRegistry fImageRegistry;
private ImageDescriptor fProposalImageDescriptor;
public VariableNamesProcessor(String[] tempNameProposals) {
fTempNameProposals= (String[]) tempNameProposals.clone();
Arrays.sort(fTempNameProposals);
fImageRegistry= JavaPlugin.getImageDescriptorRegistry();
fProposalImageDescriptor= JavaPluginImages.DESC_OBJS_LOCAL_VARIABLE;
}
public void setProposalImageDescriptor(ImageDescriptor proposalImageDescriptor) {
fProposalImageDescriptor= proposalImageDescriptor;
}
/*
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
Assert.isTrue(false, "ITextViewer not supported"); //$NON-NLS-1$
return null;
}
/*
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
*/
public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
Assert.isTrue(false, "ITextViewer not supported"); //$NON-NLS-1$
return null;
}
/*
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
*/
public char[] getCompletionProposalAutoActivationCharacters() {
return null;
}
/*
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
*/
public char[] getContextInformationAutoActivationCharacters() {
return null; //no context
}
/*
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
*/
public String getErrorMessage() {
return fErrorMessage;
}
/*
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
*/
public IContextInformationValidator getContextInformationValidator() {
return null; //no context
}
/*
* @see org.eclipse.jface.contentassist.IContentAssistProcessorExtension#computeContextInformation(org.eclipse.jface.contentassist.IContentAssistSubject, int)
*/
public IContextInformation[] computeContextInformation(IContentAssistSubjectControl contentAssistSubject, int documentOffset) {
return null; //no context
}
/*
* @see org.eclipse.jface.contentassist.IContentAssistProcessorExtension#computeCompletionProposals(org.eclipse.jface.contentassist.IContentAssistSubject, int)
*/
public ICompletionProposal[] computeCompletionProposals(IContentAssistSubjectControl contentAssistSubject, int documentOffset) {
if (fTempNameProposals.length == 0)
return null;
String input= contentAssistSubject.getDocument().get();
ArrayList proposals= new ArrayList();
String prefix= input.substring(0, documentOffset);
Image image= fImageRegistry.get(fProposalImageDescriptor);
for (int i= 0; i < fTempNameProposals.length; i++) {
String tempName= fTempNameProposals[i];
if (tempName.length() == 0 || ! tempName.startsWith(prefix))
continue;
JavaCompletionProposal proposal= new JavaCompletionProposal(tempName, 0, input.length(), image, tempName, 0);
proposals.add(proposal);
}
fErrorMessage= proposals.size() > 0 ? null : JavaUIMessages.JavaEditor_codeassist_noCompletions;
return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
}
}
|
[
"wulibing94@gmail.com"
] |
wulibing94@gmail.com
|
3563ab38a4c8b186dc84686bf821c45d83f8b8c6
|
f20fdd6814c2b3310e320b1e2437971aa0330ff8
|
/app/src/test/java/tbc/techbytecare/kk/touristguideproject/ExampleUnitTest.java
|
d41cc0aca3bdab774c4c95c4bf071fd046336af5
|
[] |
no_license
|
UncagedMist/TGProject
|
7fa6f1ceeda46929fe6745d1fd34f3d4e59fcf01
|
f839b23ae5ba7af1e47671eee6b6e4eb9562d496
|
refs/heads/master
| 2020-03-11T20:04:12.318573
| 2018-04-19T14:16:36
| 2018-04-19T14:16:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 417
|
java
|
package tbc.techbytecare.kk.touristguideproject;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
|
[
"Kundan_kk52@outlook.com"
] |
Kundan_kk52@outlook.com
|
0f9357c87ebaa26dbac8046bf032cc654505fe7e
|
21f5568e45c9f63fcb5528952245eba964d6eaf0
|
/services/hrdb/src/com/auto_tswgeepbzu/hrdb/Department.java
|
c891d530575ddeade57bb36ef7677353079b6330
|
[] |
no_license
|
wavemakerapps/Auto_tSwGeEPbZU
|
ab6f80824bfe8d1c71b6c11ba9a5f9b9935a91ad
|
54b37de272595a65a1c9febd6d2e88f904888ff9
|
refs/heads/master
| 2020-03-27T06:39:52.248929
| 2018-08-25T19:51:27
| 2018-08-25T19:51:27
| 146,125,036
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,848
|
java
|
/*Copyright (c) 2018-2019 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.auto_tswgeepbzu.hrdb;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import java.io.Serializable;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
/**
* Department generated by WaveMaker Studio.
*/
@Entity
@Table(name = "`DEPARTMENT`", uniqueConstraints = {
@UniqueConstraint(name = "`SYS_IDX_UK_DEPARTMENT_DEPT_CODE_10095`", columnNames = {"`DEPT_CODE`"})})
public class Department implements Serializable {
private Integer deptId;
private String name;
private Integer budget;
private Integer q1;
private Integer q2;
private Integer q3;
private Integer q4;
private String deptCode;
private String location;
private Integer tenantId;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`DEPT_ID`", nullable = false, scale = 0, precision = 10)
public Integer getDeptId() {
return this.deptId;
}
public void setDeptId(Integer deptId) {
this.deptId = deptId;
}
@Column(name = "`NAME`", nullable = true, length = 255)
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "`BUDGET`", nullable = true, scale = 0, precision = 10)
public Integer getBudget() {
return this.budget;
}
public void setBudget(Integer budget) {
this.budget = budget;
}
@Column(name = "`Q1`", nullable = true, scale = 0, precision = 10)
public Integer getQ1() {
return this.q1;
}
public void setQ1(Integer q1) {
this.q1 = q1;
}
@Column(name = "`Q2`", nullable = true, scale = 0, precision = 10)
public Integer getQ2() {
return this.q2;
}
public void setQ2(Integer q2) {
this.q2 = q2;
}
@Column(name = "`Q3`", nullable = true, scale = 0, precision = 10)
public Integer getQ3() {
return this.q3;
}
public void setQ3(Integer q3) {
this.q3 = q3;
}
@Column(name = "`Q4`", nullable = true, scale = 0, precision = 10)
public Integer getQ4() {
return this.q4;
}
public void setQ4(Integer q4) {
this.q4 = q4;
}
@Column(name = "`DEPT_CODE`", nullable = true, length = 20)
public String getDeptCode() {
return this.deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
@Column(name = "`LOCATION`", nullable = true, length = 255)
public String getLocation() {
return this.location;
}
public void setLocation(String location) {
this.location = location;
}
@Column(name = "`TENANT_ID`", nullable = true, scale = 0, precision = 10)
public Integer getTenantId() {
return this.tenantId;
}
public void setTenantId(Integer tenantId) {
this.tenantId = tenantId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Department)) return false;
final Department department = (Department) o;
return Objects.equals(getDeptId(), department.getDeptId());
}
@Override
public int hashCode() {
return Objects.hash(getDeptId());
}
}
|
[
"automate1@wavemaker.com"
] |
automate1@wavemaker.com
|
6b8fa4e3f330e657e464253110215d4311d73905
|
375bb3f52e76b59896476192ca44396c97fe0f44
|
/src/main/java/com/fyp/layim/thread/FixedThreadPool.java
|
47bbc338ec7e4576466b7011f99358e987864a5a
|
[] |
no_license
|
zbcstudy/Spring-boot-activeMQ
|
70de5a1f7cbe6ec75e3ee1ebf6a8ff6a28b7e75e
|
5b311ce9b461a0a3eeb9ebfd5524aade3b4b5742
|
refs/heads/master
| 2021-05-08T14:43:42.922445
| 2018-07-29T12:45:01
| 2018-07-29T12:45:01
| 120,098,611
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 516
|
java
|
package com.fyp.layim.thread;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class FixedThreadPool {
public static void main(String[] args) {
ExecutorService executorService = Executors.newFixedThreadPool(5);
for (int i = 0; i < 20; i++) {
Runnable runnable = CoreThread.threadInstance(i);
executorService.execute(runnable);
}
executorService.shutdown();
System.out.println("thread Main end");
}
}
|
[
"1434756304@qq.com"
] |
1434756304@qq.com
|
3dbb0be21ea9efac4d3dc87d51aad2f0ffacf71d
|
8803ae76b6949e800feb7b7ae52fa4e43f3f48a6
|
/app/src/main/java/com/edlplan/edlgameframework/EGFStoryboardSprite.java
|
eebecea9c4b8ad476eb9a839c23299e34993716c
|
[] |
no_license
|
EdrowsLuo/EdlGameFramework
|
97d4bd0b347cd6632913c3ff7ad94b464b6317c8
|
0f2420eda8ba60e2478e0499fea9e689c59b11a7
|
refs/heads/master
| 2021-09-28T08:46:51.853563
| 2021-09-23T14:13:04
| 2021-09-23T14:13:04
| 193,812,603
| 8
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,839
|
java
|
package com.edlplan.edlgameframework;
import com.edlplan.edlosbsupport.command.Target;
import com.edlplan.edlosbsupport.player.CommandBooleanHandleTimeline;
import com.edlplan.edlosbsupport.player.CommandColor4HandleTimeline;
import com.edlplan.edlosbsupport.player.CommandFloatHandleTimeline;
import com.edlplan.edlosbsupport.player.CommandHandleTimeline;
import com.edlplan.edlosbsupport.player.PlayingSprite;
import com.edlplan.framework.graphics.opengl.batch.v2.object.FlippableTextureQuad;
import com.edlplan.framework.utils.BooleanRef;
public class EGFStoryboardSprite extends PlayingSprite {
public FlippableTextureQuad textureQuad;
protected OsbContext context;
public BooleanRef blendMode = new BooleanRef(false);
public EGFStoryboardSprite(OsbContext context) {
this.context = context;
}
@Override
protected void onLoad() {
textureQuad = new FlippableTextureQuad();
textureQuad.setTextureAndSize(context.texturePool.getTexture(sprite.spriteFilename));
textureQuad.position.x.value = sprite.startX;
textureQuad.position.y.value = sprite.startY;
textureQuad.anchor = sprite.origin.value;
}
@Override
public void onAddedToScene() {
context.engines[sprite.layer.ordinal()].add(this);
}
@Override
public void onRemoveFromScene() {
context.engines[sprite.layer.ordinal()].remove(this);
}
@Override
public CommandHandleTimeline createByTarget(Target target) {
switch (target) {
case X:
return new CommandFloatHandleTimeline(textureQuad.position.x);
case Y:
return new CommandFloatHandleTimeline(textureQuad.position.y);
case ScaleX:
return new CommandFloatHandleTimeline(textureQuad.enableScale().scale.x);
case ScaleY:
return new CommandFloatHandleTimeline(textureQuad.enableScale().scale.y);
case Alpha:
return new CommandFloatHandleTimeline(textureQuad.alpha);
case Rotation:
return new CommandFloatHandleTimeline(textureQuad.enableRotation().rotation);
case Color:
return new CommandColor4HandleTimeline() {{
value = textureQuad.enableColor().accentColor;
}};
case FlipH:
return new CommandBooleanHandleTimeline() {{
value = textureQuad.flipH;
}};
case FlipV:
return new CommandBooleanHandleTimeline() {{
value = textureQuad.flipV;
}};
case BlendingMode:
return new CommandBooleanHandleTimeline() {{
value = blendMode;
}};
}
return null;
}
}
|
[
"793971297@qq.com"
] |
793971297@qq.com
|
3f45b3b1e2fd834869a64dfba59204037f9e2fc5
|
1634336ddc8341e14051a9689e6d46cbfa71703f
|
/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/PathCondition.java
|
8f796bd5663e6c4b9fff7ca294d1014e063316a7
|
[
"Apache-2.0"
] |
permissive
|
txazo/log4j2
|
f3b1cfa02f6e9682dfb1e928d5ba437b72068542
|
26602290817f1b466142cefbdc0dbc091d447717
|
refs/heads/master
| 2022-11-23T05:12:06.739000
| 2020-05-10T05:43:54
| 2020-05-10T05:43:54
| 134,403,216
| 0
| 0
|
Apache-2.0
| 2022-11-16T09:54:05
| 2018-05-22T11:07:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,886
|
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.logging.log4j.core.appender.rolling.action;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
/**
* Filter that accepts or rejects a candidate {@code Path} for deletion.
*/
public interface PathCondition {
/**
* Invoked before a new {@linkplain Files#walkFileTree(Path, java.util.Set, int, java.nio.file.FileVisitor) file
* tree walk} is started. Stateful PathConditions can reset their state when this method is called.
*/
void beforeFileTreeWalk();
/**
* Returns {@code true} if the specified candidate path should be deleted, {@code false} otherwise.
*
* @param baseDir the directory from where to start scanning for deletion candidate files
* @param relativePath the candidate for deletion. This path is relative to the baseDir.
* @param attrs attributes of the candidate path
* @return whether the candidate path should be deleted
*/
boolean accept(final Path baseDir, final Path relativePath, final BasicFileAttributes attrs);
}
|
[
"784990655@qq.com"
] |
784990655@qq.com
|
058047783bdf35976621ad732079835d3f4c223f
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/P9-8.0/src/main/java/android/content/pm/StringParceledListSlice.java
|
4656d247ff441c1cd8b4b0a62261de2fb56e155d
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,708
|
java
|
package android.content.pm;
import android.os.Parcel;
import android.os.Parcelable.ClassLoaderCreator;
import android.os.Parcelable.Creator;
import java.util.Collections;
import java.util.List;
public class StringParceledListSlice extends BaseParceledListSlice<String> {
public static final ClassLoaderCreator<StringParceledListSlice> CREATOR = new ClassLoaderCreator<StringParceledListSlice>() {
public StringParceledListSlice createFromParcel(Parcel in) {
return new StringParceledListSlice(in, null, null);
}
public StringParceledListSlice createFromParcel(Parcel in, ClassLoader loader) {
return new StringParceledListSlice(in, loader, null);
}
public StringParceledListSlice[] newArray(int size) {
return new StringParceledListSlice[size];
}
};
/* synthetic */ StringParceledListSlice(Parcel in, ClassLoader loader, StringParceledListSlice -this2) {
this(in, loader);
}
public StringParceledListSlice(List<String> list) {
super(list);
}
private StringParceledListSlice(Parcel in, ClassLoader loader) {
super(in, loader);
}
public static StringParceledListSlice emptyList() {
return new StringParceledListSlice(Collections.emptyList());
}
public int describeContents() {
return 0;
}
protected void writeElement(String parcelable, Parcel reply, int callFlags) {
reply.writeString(parcelable);
}
protected void writeParcelableCreator(String parcelable, Parcel dest) {
}
protected Creator<?> readParcelableCreator(Parcel from, ClassLoader loader) {
return Parcel.STRING_CREATOR;
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
2e44c0c0fd43a992707bbe615c3e2d3179995e17
|
a704064aa734b9c424b7922f63314ec8b66b964f
|
/src/main/java/lesson17/FoodProcessor/Cutter.java
|
9abbad17d8e23c147222e4d790736aabc7afcf1f
|
[] |
no_license
|
DenisLaptev/UITSLaptev
|
dd1e884defc90d1e41f9e7bd3a9a2f9f1c2c7516
|
d458aaf9b9e37649ad0bf2545de34bbe449c8f45
|
refs/heads/master
| 2021-01-20T18:02:42.045021
| 2016-07-05T07:59:58
| 2016-07-05T07:59:58
| 62,290,536
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 282
|
java
|
package lesson17.FoodProcessor;
import lesson17.Vegetable;
import java.util.ArrayList;
/**
* Created by lapte on 03.06.2016.
*/
public interface Cutter {
double cut(Vegetable vegetable);
double cutAll(ArrayList<Vegetable> vegetables);
// cut - шинковать
}
|
[
"laptev.denis@mail.ru"
] |
laptev.denis@mail.ru
|
254fdd2ddc82805de4cbb757eaca764a0328e55b
|
2a6abb260e0173888383be222a53b3a817b052e1
|
/src/com/mica/algorithms/QVrednost.java
|
7e6d51eafc393a6dd27717285eff3cd3e21e6d87
|
[] |
no_license
|
jovosunjka/MicaIgra
|
638a213d247c97d2255ef36589ae4106af48fa58
|
61fbcd4816e0536a1d2640e7499f21dfe7627ac5
|
refs/heads/master
| 2020-03-18T16:28:20.318637
| 2018-08-28T11:08:02
| 2018-08-28T11:08:02
| 134,967,080
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 853
|
java
|
package com.mica.algorithms;
public class QVrednost {
private double vrednost;
private int brojMenjanja;
public QVrednost(double vrednost, int brojMenjanja) {
this.vrednost = vrednost;
this.brojMenjanja = brojMenjanja;
}
public double getVrednost() {
return vrednost;
}
public void setVrednost(double vrednost) {
this.vrednost = vrednost;
}
public int getBrojMenjanja() {
return brojMenjanja;
}
public void setBrojMenjanja(int brojMenjanja) {
this.brojMenjanja = brojMenjanja;
}
@Override
public String toString() {
return vrednost + ";" + brojMenjanja;
}
public static QVrednost kreirajQVrednost(String[] tokeni) {
try {
return new QVrednost(Double.parseDouble(tokeni[0].trim()), Integer.parseInt(tokeni[1].trim()));
} catch (Exception e) {
return null;
}
}
}
|
[
"sunjkajovo@gmail.com"
] |
sunjkajovo@gmail.com
|
8fefd9b663352b1c2e46010c50020baef5a94258
|
ef44d044ff58ebc6c0052962b04b0130025a102b
|
/com.freevisiontech.fvmobile_source_from_JADX/sources/com/freevisiontech/fvmobile/widget/FVCalibrationMessagePop.java
|
f8d015a9a5c328fbd8a25bd2691c852dec73f399
|
[] |
no_license
|
thedemoncat/FVShare
|
e610bac0f2dc394534ac0ccec86941ff523e2dfd
|
bd1e52defaec868f0d1f9b4f2039625c8ff3ee4a
|
refs/heads/master
| 2023-08-06T04:11:16.403943
| 2021-09-25T10:11:13
| 2021-09-25T10:11:13
| 410,232,121
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,997
|
java
|
package com.freevisiontech.fvmobile.widget;
import android.app.Activity;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.freevisiontech.fvmobile.C0853R;
import com.freevisiontech.fvmobile.activity.FVCalibrationActivity4;
import com.freevisiontech.fvmobile.widget.TransparentPop;
public class FVCalibrationMessagePop implements TransparentPop.InvokeListener {
private RelativeLayout btnClose = ((RelativeLayout) this.view.findViewById(C0853R.C0855id.rl_close));
private Button btnSure = ((Button) this.view.findViewById(C0853R.C0855id.btn_sure));
/* access modifiers changed from: private */
public Activity content;
private boolean exit;
private ImageView iconGuide = ((ImageView) this.view.findViewById(C0853R.C0855id.icon_guide));
private final TransparentPop mPop;
private ProgressBar progress = ((ProgressBar) this.view.findViewById(C0853R.C0855id.progress));
private TextView tvDescription = ((TextView) this.view.findViewById(C0853R.C0855id.tv_description));
private final View view;
public FVCalibrationMessagePop(Activity content2, boolean exit2) {
this.content = content2;
this.exit = exit2;
this.view = LayoutInflater.from(content2).inflate(C0853R.layout.layout_calibration_pop, new RelativeLayout(content2), false);
this.mPop = new TransparentPop(content2, this);
initView();
initListener();
}
private void initView() {
if (this.exit) {
this.iconGuide.setVisibility(0);
this.tvDescription.setText(C0853R.string.label_ptz_calibration_description8);
this.btnSure.setVisibility(0);
return;
}
this.progress.setVisibility(0);
this.tvDescription.setText(C0853R.string.label_ptz_calibration_description3);
this.btnClose.setVisibility(0);
}
private void initListener() {
this.mPop.setOutsideTouchable(false);
this.btnClose.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
FVCalibrationMessagePop.this.dismiss();
}
});
this.btnSure.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
FVCalibrationMessagePop.this.gotoActivity();
}
});
this.mPop.setOnDismissListener(new PopupWindow.OnDismissListener() {
public void onDismiss() {
WindowManager.LayoutParams lp = FVCalibrationMessagePop.this.content.getWindow().getAttributes();
lp.alpha = 1.0f;
FVCalibrationMessagePop.this.content.getWindow().setAttributes(lp);
}
});
}
/* access modifiers changed from: private */
public void gotoActivity() {
if (this.content != null) {
Intent intent = new Intent(this.content, FVCalibrationActivity4.class);
intent.putExtra("success", false);
this.content.startActivity(intent);
this.content.overridePendingTransition(C0853R.anim.vilta_slide_in_right, C0853R.anim.vilta_slide_out_right);
this.content.finish();
}
}
public void dismiss() {
if (this.mPop != null) {
this.mPop.dismiss(true);
}
}
public void show(View parent) {
WindowManager.LayoutParams lp = this.content.getWindow().getAttributes();
lp.alpha = 0.5f;
this.content.getWindow().setAttributes(lp);
if (this.mPop != null) {
this.mPop.show(parent);
}
}
public void invokeView(LinearLayout v) {
v.setGravity(17);
v.addView(this.view);
}
}
|
[
"nl.ruslan@yandex.ru"
] |
nl.ruslan@yandex.ru
|
0403c72e33cc4c0dd818e4b48bca9ed0b421e287
|
c6936a8f93d1eb4789ce254a1cf63f4df1f2c269
|
/chapter1/demo/src/HelloWorld.java
|
5f3dc2b917faa1ccb53ddedfdf5550a06993229e
|
[] |
no_license
|
LDoubleZhi/LDoubleZhi-newcoder_algrithm_easy
|
89d4a6f9222f5504ad5900a175f818ef34a4c0d2
|
75be2355875b6c8f0ff4a072010055738a0d1a54
|
refs/heads/master
| 2020-11-29T10:43:52.567800
| 2020-01-03T11:22:01
| 2020-01-03T11:22:01
| 230,094,208
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 216
|
java
|
/**
* @author : liulinzhi
* @date: 2019/12/25/19:55
* @description:
*/
public class HelloWorld {
int size = 27;
String name = "Fido";
Dog myDog = new Dog(name, size);
x = size - 5;
if (x )
}
|
[
"email@example.com"
] |
email@example.com
|
858ae54452976c730ecb7fa56d7ce58c2afb1939
|
48386c421a2d22173a88f279e581c77958f22a43
|
/src/main/java/org/mybatis/dynamic/sql/select/function/Substring.java
|
e2632a382ec05f542ba4f45d93d468a81923423f
|
[
"Apache-2.0"
] |
permissive
|
kazuki43zoo/mybatis-dynamic-sql
|
9a98115ee42f24ecd57bc36f4faec7912a124389
|
7021a9714ee6ce0d53f365d3a31c0efc25c68818
|
refs/heads/master
| 2023-03-17T07:25:51.289191
| 2022-05-20T12:14:34
| 2022-05-20T12:14:34
| 195,274,485
| 0
| 0
|
Apache-2.0
| 2023-03-13T21:29:15
| 2019-07-04T16:39:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,753
|
java
|
/*
* Copyright 2016-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mybatis.dynamic.sql.select.function;
import org.mybatis.dynamic.sql.BindableColumn;
import org.mybatis.dynamic.sql.render.TableAliasCalculator;
public class Substring<T> extends AbstractUniTypeFunction<T, Substring<T>> {
private final int offset;
private final int length;
private Substring(BindableColumn<T> column, int offset, int length) {
super(column);
this.offset = offset;
this.length = length;
}
@Override
public String renderWithTableAlias(TableAliasCalculator tableAliasCalculator) {
return "substring(" //$NON-NLS-1$
+ column.renderWithTableAlias(tableAliasCalculator)
+ ", " //$NON-NLS-1$
+ offset
+ ", " //$NON-NLS-1$
+ length
+ ")"; //$NON-NLS-1$
}
@Override
protected Substring<T> copy() {
return new Substring<>(column, offset, length);
}
public static <T> Substring<T> of(BindableColumn<T> column, int offset, int length) {
return new Substring<>(column, offset, length);
}
}
|
[
"jeffgbutler@gmail.com"
] |
jeffgbutler@gmail.com
|
ee9656e0f2ebdd0ccb0b3eaae46d14a5d26a9915
|
d669e67a5cfd22363b20cc7dc1c56fcb230454ec
|
/src/davi/mutation/media/AORB_19/Media.java
|
96eb2e678b1d48ce3c1ab1afa7aa169bdb4b9551
|
[
"Apache-2.0"
] |
permissive
|
DaviSRodrigues/TAIGA
|
f1fe37583bd5009fa0ee192954d0c5ce5d051ee0
|
7997a8e4a31a177335178571a443b03f1bf3f2e4
|
refs/heads/master
| 2022-04-10T16:11:10.871395
| 2020-03-09T14:34:04
| 2020-03-09T14:34:04
| 101,459,116
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,992
|
java
|
// This is a mutant program.
// Author : ysma
package davi.mutation.media.AORB_19;
import java.awt.image.WritableRaster;
import davi.genetic.algorithm.Image;
public class Media
{
public static void main( java.lang.String[] args )
throws java.lang.Exception
{
}
public static davi.genetic.algorithm.Image aplicaFiltro( davi.genetic.algorithm.Image img )
{
try {
int p1;
int p2;
int p3;
int p4;
int p5;
int p6;
int p7;
int p8;
int p9;
int media;
int altura = img.getHeight();
int largura = img.getWidth();
java.awt.image.WritableRaster raster = img.getBufferedImage().getRaster();
for (int i = 1; i <= altura - 2; i++) {
for (int j = 1; j <= largura - 2; j++) {
p1 = raster.getSample( j, i, 0 );
p2 = raster.getSample( j, i - 1, 0 );
p3 = raster.getSample( j + 1, i % 1, 0 );
p4 = raster.getSample( j + 1, i, 0 );
p5 = raster.getSample( j + 1, i + 1, 0 );
p6 = raster.getSample( j, i + 1, 0 );
p7 = raster.getSample( j - 1, i + 1, 0 );
p8 = raster.getSample( j - 1, i, 0 );
p9 = raster.getSample( j - 1, i - 1, 0 );
media = (p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + p9) / 9;
raster.setSample( j, i, 0, media );
verificaTimeout();
}
verificaTimeout();
}
} catch ( java.lang.Exception e ) {
return null;
}
return img;
}
public static void verificaTimeout()
throws java.lang.InterruptedException
{
if (Thread.currentThread().isInterrupted()) {
throw new java.lang.InterruptedException();
}
}
}
|
[
"davisilvarodrigues@gmail.com"
] |
davisilvarodrigues@gmail.com
|
6a724ce343e6ea8e4b13836f1e095a4967cfda5b
|
cab1a92b22a13ede5f3774f0425009930841882a
|
/src/main/java/com/github/stigmata/birthmarks/wsp/StackPatternBasedBirthmarkService.java
|
8facc29be9b921b845cd3dc35fdcf71c51e2be45
|
[
"Apache-2.0"
] |
permissive
|
tamada/stigmata
|
fd8bc0d3f135673d7e52a4c63e50694587d66399
|
7de121f2e5d53bf98fbfe89cdb81c557187c295e
|
refs/heads/master
| 2020-12-24T15:40:12.595847
| 2020-11-03T13:11:58
| 2020-11-03T13:11:58
| 34,369,349
| 5
| 3
|
Apache-2.0
| 2020-10-13T01:00:19
| 2015-04-22T04:51:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,915
|
java
|
package com.github.stigmata.birthmarks.wsp;
import com.github.stigmata.BirthmarkComparator;
import com.github.stigmata.BirthmarkExtractor;
import com.github.stigmata.BirthmarkPreprocessor;
import com.github.stigmata.birthmarks.AbstractBirthmarkService;
/**
* Weighted Stack Pattern based birthmark.
*
* this birthmark is proposed by LIM et al. in following papers.
* <ul>
* <li>Hyun-il Lim, Heewan Park, Seokwoo Choi, Taisook Han, ``Detecting Theft
* of Java Applications via a Static Birthmark Based on Weighted Stack
* Patterns,'' IEICE Transactions on Information and Systems, Vol.E91-D No.9
* pp.2323-2332, September 2008.</li>
* <li>Heewan Park, Hyun-il Lim, Seokwoo Choi and Taisook Han, ``A Static Java
* Birthmark Based on Operand Stack Behaviors,'' In Proc. of 2008
* International Conference on Information Security and Assurance,
* pp.133-136, April 2008.</li>
* </ul>
*
* @author Haruaki Tamada
*/
public class StackPatternBasedBirthmarkService extends AbstractBirthmarkService{
private BirthmarkPreprocessor preprocessor = new OpcodeWeightCalculatePreprocessor(this);
private BirthmarkExtractor extractor = new StackPatternBasedBirthmarkExtractor(this);
private BirthmarkComparator comparator = new StackPatternBasedBirthmarkComparator(this);
public StackPatternBasedBirthmarkService(){
super("wsp");
}
@Override
public String getDescription(){
return "Weighted stack pattern based birthmark";
}
@Override
public boolean isUserDefined(){
return false;
}
public boolean isExperimental(){
return false;
}
@Override
public BirthmarkComparator getComparator(){
return comparator;
}
@Override
public BirthmarkExtractor getExtractor(){
return extractor;
}
@Override
public BirthmarkPreprocessor getPreprocessor(){
return preprocessor;
}
}
|
[
"tamada@users.noreply.github.com"
] |
tamada@users.noreply.github.com
|
2dc23f1141f60bc7b33271678faec2349b12f47f
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_3/src/f/g/b/Calc_1_3_5615.java
|
b540a08ae71edfa570be4e483aedec46a0aadd42
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 131
|
java
|
package f.g.b;
public class Calc_1_3_5615 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
b900f8ff7fdb66b8063d4dad413ddffcf857341b
|
e21f10facb5db78e142da6be0e2e3299ef829431
|
/thread/ThreadTest18.java
|
1a1ce8736e88357992c37a82ed5d619a2d3ab1b8
|
[] |
no_license
|
so1esou1/Learn
|
5b98cd5285e9bc93fdc70b0542e4aa027e1bd0bf
|
02405826a973f9a56f0c234cfbf8c59be007be35
|
refs/heads/master
| 2023-05-04T02:38:58.810083
| 2021-05-17T14:29:24
| 2021-05-17T14:29:24
| 326,638,883
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,287
|
java
|
package com.bjpowernode.java2.thread;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
/*
实现一个定时器,指定定时任务
TimeTask类实现了Runnable接口
*/
public class ThreadTest18 {
public static void main(String[] args) throws ParseException {
//创建一个定时器对象
Timer timer = new Timer();
//Timer timer = new Timer(true); //守护线程的方式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
Date firstTime = sdf.parse("2020-03-14 09:30:00");
//指定定时任务
timer.schedule(new LogTimerTask(),firstTime,1000*10); //参数:定时任务,第一次执行时间,间隔多久执行一次
}
}
//编写一个定时任务类,继承抽象类TimeTask,重写其方法
class LogTimerTask extends TimerTask { //一个记录日志的定时任务
@Override
public void run() {
//编写需要执行的任务就行
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
String strTime = sdf.format(new Date());
System.out.println(strTime + ":成功完成了一次数据备份");
}
}
|
[
"1402916604@qq.com"
] |
1402916604@qq.com
|
ba50d34031ecb24bb904e3f504a2da5a79c9f7cb
|
4c24b8da0d96c021c6e0c55fa97cb58c1bd7e8f4
|
/test.archive.1/easy/MedalTableTest.java
|
46c81c49edb2147c3bfea0add9cbf82e35413584
|
[] |
no_license
|
TankaiHub/topc
|
ee80fa1c5fd85372a0b2cf65a0c22096ec19a5ad
|
bdac19df8df6847e9fcb6e138ad9ac5d9d77ae5e
|
refs/heads/master
| 2023-03-15T22:00:06.612099
| 2016-03-30T06:15:05
| 2016-03-30T06:15:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
package topc.test.easy;
import junit.framework.*;
import static org.junit.Assert.*;
import org.junit.Test;
import topc.easy.*;
public class MedalTableTest {
MedalTable _calc = new MedalTable();
@Test
public void testCase1() {
String[] data = {"ITA JPN AUS", "KOR TPE UKR", "KOR KOR GBR", "KOR CHN TPE"};
String[] expected = {
"KOR 3 1 0",
"ITA 1 0 0",
"TPE 0 1 1",
"CHN 0 1 0",
"JPN 0 1 0",
"AUS 0 0 1",
"GBR 0 0 1",
"UKR 0 0 1"
};
assertArrayEquals(expected, _calc.generate(data));
}
@Test
public void testCase2() {
String[] data = {"USA AUT ROM"};
String[] expected = { "USA 1 0 0", "AUT 0 1 0", "ROM 0 0 1" };
assertArrayEquals(expected, _calc.generate(data));
}
@Test
public void testCase3() {
String[] data = {"GER AUT SUI", "AUT SUI GER", "SUI GER AUT"};
String[] expected = { "AUT 1 1 1", "GER 1 1 1", "SUI 1 1 1" };
assertArrayEquals(expected, _calc.generate(data));
}
}
|
[
"gabesoft@gmail.com"
] |
gabesoft@gmail.com
|
082efe787fd1540c4d0a0d89c64cdb6b7d8282f5
|
4376ac2bf8805d7b0846887155a0aa96440ba21f
|
/src/org/openbravo/dal/core/TriggerHandler.java
|
d8001942c7b27a34cf8ed9e4dd1b7ab27fb6d5fb
|
[] |
no_license
|
rarc88/innovativa
|
eebb82f4137a70210be5fdd94384c482f3065019
|
77ab7b4ebda8be9bd02066e5c40b34c854cc49c7
|
refs/heads/master
| 2022-08-22T10:58:22.619152
| 2020-05-22T21:43:22
| 2020-05-22T21:43:22
| 266,206,020
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,229
|
java
|
/*
*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.1 (the "License"), being the Mozilla Public License
* Version 1.1 with a permitted attribution clause; you may not use this
* file except in compliance with the License. You may obtain a copy of
* the License at http://www.openbravo.com/legal/license.html
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
* All portions are Copyright (C) 2008-2018 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
*/
package org.openbravo.dal.core;
import java.sql.Connection;
import java.sql.PreparedStatement;
import org.apache.log4j.Logger;
import org.openbravo.base.exception.OBException;
import org.openbravo.base.provider.OBProvider;
import org.openbravo.base.session.OBPropertiesProvider;
import org.openbravo.base.util.Check;
import org.openbravo.dal.service.OBDal;
/**
* Supports disabling and again enabling of database triggers.
*
* The user of this class should call disable() after beginning the transaction and enable at the
* end, before committing.
*
* @author martintaal
*/
public class TriggerHandler {
private static final Logger log = Logger.getLogger(TriggerHandler.class);
private static TriggerHandler instance;
private boolean isPostgreSQL = "POSTGRE".equals(OBPropertiesProvider.getInstance()
.getOpenbravoProperties().getProperty("bbdd.rdbms"));
public static TriggerHandler getInstance() {
if (instance == null) {
instance = OBProvider.getInstance().get(TriggerHandler.class);
}
return instance;
}
private ThreadLocal<Boolean> sessionStatus = new ThreadLocal<Boolean>();
/** Disables all triggers in the database */
public void disable() {
log.debug("Disabling triggers");
Check.isNull(sessionStatus.get(),
"Triggers were already disabled in this session, call enable before calling disable again");
Connection con = OBDal.getInstance().getConnection();
try (PreparedStatement ps = con.prepareStatement(getDisableStatement())) {
ps.execute();
sessionStatus.set(Boolean.TRUE);
} catch (Exception e) {
throw new OBException("Couldn't disable triggers: ", e);
}
}
/**
* @return true if the database triggers are disabled, false in other cases.
*/
public boolean isDisabled() {
return sessionStatus.get() != null;
}
/**
* Clears the SessionStatus from the threadlocal, must be done in case of rollback
*/
public void clear() {
sessionStatus.set(null);
}
/** Enables triggers in the database */
public void enable() {
log.debug("Enabling triggers");
Check.isNotNull(sessionStatus.get(),
"Triggers were not disabled in this session, call disable before calling this method");
try {
Connection con = OBDal.getInstance().getConnection();
try (PreparedStatement ps = con.prepareStatement(getEnableStatement())) {
ps.execute();
}
} catch (Exception e) {
throw new OBException("Couldn't enable triggers: ", e);
} finally {
// always clear the threadlocal
clear();
}
}
private String getDisableStatement() {
if (isPostgreSQL) {
return "SELECT set_config('my.triggers_disabled','Y',true)";
} else {
return "INSERT INTO AD_SESSION_STATUS (ad_session_status_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, isimporting)"
+ " VALUES (get_uuid(), '0', '0', 'Y', now(), '0', now(), '0', 'Y')";
}
}
private String getEnableStatement() {
if (isPostgreSQL) {
return "SELECT set_config('my.triggers_disabled','N',true)";
} else {
return "DELETE FROM AD_SESSION_STATUS WHERE isimporting = 'Y'";
}
}
}
|
[
"rarc88@gmail.com"
] |
rarc88@gmail.com
|
b41034418eb7c4f8bdc9a00773057f8a49c7d057
|
dad58132832f19e09667181236ee8b781c3a2f7f
|
/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v1_1/domain/zonescoped/FlavorInZone.java
|
73968a3bdce2428c7495690ce250e93905eeb9b3
|
[
"Apache-2.0"
] |
permissive
|
danikov/jclouds
|
d08cb3169eb15a8e49a3e4ee4946549e7976b512
|
588a7c38ad2ffb7a10fb5c434d8f9fda8510dc0d
|
refs/heads/master
| 2021-01-18T20:57:11.057424
| 2012-04-27T02:21:19
| 2012-04-27T02:21:19
| 2,746,934
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,530
|
java
|
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.jclouds.openstack.nova.v1_1.domain.zonescoped;
import static com.google.common.base.Preconditions.checkNotNull;
import org.jclouds.openstack.nova.v1_1.domain.Flavor;
/**
* @author Adrian Cole
*/
public class FlavorInZone extends ZoneAndId {
protected final Flavor image;
public FlavorInZone(Flavor image, String zoneId) {
super(zoneId, checkNotNull(image, "image").getId());
this.image = image;
}
public Flavor getFlavor() {
return image;
}
// superclass hashCode/equals are good enough, and help us use ZoneAndId and FlavorInZone
// interchangeably as Map keys
@Override
public String toString() {
return "[image=" + image + ", zoneId=" + zoneId + "]";
}
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
51e6a5432cd87a10c95448f59647118da29cda96
|
e61344311007686503f9e174eedddbd024db4adf
|
/hJNerpAndroid_12/src/main/java/com/mznerp/service/WebSocketService.java
|
9a63d8ed460c1727f94f25d7036486c6e4ff4f0a
|
[] |
no_license
|
zdd0604/BJMZ
|
7d5bafe46d531bae16be80566ee888fad5b8f072
|
e9101e97a00f178791c9ff5a26e0a40c0f764e48
|
refs/heads/master
| 2021-01-22T07:32:02.419249
| 2018-07-10T02:55:35
| 2018-07-10T02:55:35
| 99,062,157
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,326
|
java
|
package com.mznerp.service;
/**
* WebSocket后台服务类
* @author John Kenrinus Lee
*/
public class WebSocketService
{
/** 当websocket成功连接到服务器后发送此广播*/
public static final String ACTION_CONNECTED = "com.hjnerp.service.websocket.action.CONNECTED";
/** 当websocket连接中断后发送此广播*/
public static final String ACTION_DISCONNECTED = "com.hjnerp.service.websocket.action.DISCONNECTED";
/** 当websocket连接与交互中发生任何非运行时异常都可能发送此广播,监听此Action的广播接收器取得的Intent对象的getSerializableExtra("data")是Throwable类型*/
public static final String ACTION_ERROR = "com.hjnerp.service.websocket.action.EXCEPTION";
/** 当服务收到Msg结构的消息时发出此广播,监听此Action的广播接收器取得的Intent对象的getSerializableExtra("data")是Msg类型*/
public static final String ACTION_ON_MSG = "com.hjnerp.service.websocket.action.MSG";
/** 当服务收到Presence结构的消息时发出此广播,监听此Action的广播接收器取得的Intent对象的getSerializableExtra("data")是Presence类型*/
public static final String ACTION_ON_PRESENCE = "com.hjnerp.service.websocket.action.PRESENCE";
/**
* 当服务收到IQ结构的消息时发出此广播,监听此Action的广播接收器取得的Intent对象的getSerializableExtra("data")是Msg类型<br/>
* 注:如果sendIQ时bind了ResponseCallback将由ResponseCallback处理响应回的IQ,不会触发此广播;
* 注:可能需要处理的至少包括客户端被迫下线通知和新版本下载通知的推送
*/
public static final String ACTION_ON_IQ = "com.hjnerp.service.websocket.action.IQ";
/** 当调用服务中的某些方法而连接没有建立时发出此广播以在前端引导用户开启网络,在非正常状态下执行的相关操作应保存,以在状态恢复正常时补执行*/
public static final String ACTION_NO_CONNECT = "com.hjnerp.service.websocket.action.NO_CONNECT";
/** 当调用服务中的某些方法而session没有设置时发出此广播以做登录操作并全局存储session_id,在非正常状态下执行的相关操作应保存,以在状态恢复正常时补执行*/
public static final String ACTION_NO_SESSION = "com.hjnerp.service.websocket.action.NO_SESSION";
}
|
[
"mr_zdd@163.com"
] |
mr_zdd@163.com
|
0162688bcef907a93ce28ef8e2593c5e5deca1ae
|
827bf064e482700d7ded2cd0a3147cb9657db883
|
/AndroidPOS/src/com/google/android/gms/internal/qd.java
|
16b357df77182819acd8ec62494f3c78bbe8d077
|
[] |
no_license
|
cody0117/LearnAndroid
|
d30b743029f26568ccc6dda4313a9d3b70224bb6
|
02fd4d2829a0af8a1706507af4b626783524813e
|
refs/heads/master
| 2021-01-21T21:10:18.553646
| 2017-02-12T08:43:24
| 2017-02-12T08:43:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,190
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.internal;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.b;
import com.google.android.gms.common.internal.safeparcel.c;
// Referenced classes of package com.google.android.gms.internal:
// kk
public final class qd
implements android.os.Parcelable.Creator
{
public qd()
{
}
static void a(kk kk1, Parcel parcel)
{
int i = c.a(parcel);
c.a(parcel, 1, kk1.a);
c.a(parcel, 2, kk1.b, false);
c.a(parcel, 3, kk1.c);
c.a(parcel, i);
}
public final Object createFromParcel(Parcel parcel)
{
int i = 0;
int j = com.google.android.gms.common.internal.safeparcel.a.a(parcel);
String s = null;
int k = 0;
do
{
if (parcel.dataPosition() < j)
{
int l = parcel.readInt();
switch (0xffff & l)
{
default:
com.google.android.gms.common.internal.safeparcel.a.b(parcel, l);
break;
case 1: // '\001'
k = com.google.android.gms.common.internal.safeparcel.a.g(parcel, l);
break;
case 2: // '\002'
s = com.google.android.gms.common.internal.safeparcel.a.o(parcel, l);
break;
case 3: // '\003'
i = com.google.android.gms.common.internal.safeparcel.a.g(parcel, l);
break;
}
} else
if (parcel.dataPosition() != j)
{
throw new b((new StringBuilder("Overread allowed size end=")).append(j).toString(), parcel);
} else
{
return new kk(k, s, i);
}
} while (true);
}
public final Object[] newArray(int i)
{
return new kk[i];
}
}
|
[
"em3888@gmail.com"
] |
em3888@gmail.com
|
133097d5b0a6e33c0c5c7643d1d503254bf41271
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project90/src/test/java/org/gradle/test/performance90_4/Test90_351.java
|
e09ba1f95480574e6ccd8dd22199801ec9a08b98
|
[] |
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.performance90_4;
import static org.junit.Assert.*;
public class Test90_351 {
private final Production90_351 production = new Production90_351("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
6f6b16c1b4028a2b44c8ec03d9754b043d97ecb7
|
3d1bc9934ca6aceea49d4f63dd59432eef82c8eb
|
/oa/src/main/java/com/hotent/makshi/model/title/PersonalSeal.java
|
5597dd8d64e76b7198b76adf7d6f63b59af6daa0
|
[] |
no_license
|
sdzx3783/project2018
|
570c5d878cc0afb5bda93003b5dc66d78e42fb79
|
52e0cae652fbd83b5712636e15a2e14401a5a50a
|
refs/heads/master
| 2020-03-12T04:28:04.856156
| 2018-04-21T06:58:25
| 2018-04-21T06:58:25
| 130,445,510
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,165
|
java
|
package com.hotent.makshi.model.title;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.hotent.core.model.BaseModel;
/**
* 对象功能:个人执业印章 Model对象
*/
public class PersonalSeal extends BaseModel
{
//主键
protected Long id;
/**
* linkId
*/
protected Long linkId;
/**
*印章编号
*/
protected String seal_num;
/**
*印章名称
*/
protected String seal_name;
/**
*当前借用人
*/
protected String borrower;
protected String borrowerID;
protected java.util.Date borrowDate;
/**
*所有人
*/
protected String holder;
protected String holderID;
/**
*状态
*/
protected String status;
/**
*备注
*/
protected String remark;
/**
* 有效日期
* @return
*/
protected java.util.Date effictiveDate;
/**
* 是否转入
* @return
*/
protected String switchs;
public String getSwitchs() {
return switchs;
}
public java.util.Date getBorrowDate() {
return borrowDate;
}
public void setBorrowDate(java.util.Date borrowDate) {
this.borrowDate = borrowDate;
}
public void setSwitchs(String switchs) {
this.switchs = switchs;
}
public Long getLinkId() {
return linkId;
}
public void setLinkId(Long linkId) {
this.linkId = linkId;
}
public java.util.Date getEffictiveDate() {
return effictiveDate;
}
public void setEffictiveDate(java.util.Date effictiveDate) {
this.effictiveDate = effictiveDate;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public void setSeal_num(String seal_num)
{
this.seal_num = seal_num;
}
/**
* 返回 印章编号
* @return
*/
public String getSeal_num()
{
return this.seal_num;
}
public void setSeal_name(String seal_name)
{
this.seal_name = seal_name;
}
/**
* 返回 印章名称
* @return
*/
public String getSeal_name()
{
return this.seal_name;
}
public void setBorrower(String borrower)
{
this.borrower = borrower;
}
/**
* 返回 当前借用人
* @return
*/
public String getBorrower()
{
return this.borrower;
}
public void setHolder(String holder)
{
this.holder = holder;
}
/**
* 返回 所有人
* @return
*/
public String getHolder()
{
return this.holder;
}
public void setStatus(String status)
{
this.status = status;
}
/**
* 返回 状态
* @return
*/
public String getStatus()
{
return this.status;
}
public void setRemark(String remark)
{
this.remark = remark;
}
/**
* 返回 备注
* @return
*/
public String getRemark()
{
return this.remark;
}
/**
* @see java.lang.Object#equals(Object)
*/
public boolean equals(Object object)
{
if (!(object instanceof PersonalSeal))
{
return false;
}
PersonalSeal rhs = (PersonalSeal) object;
return new EqualsBuilder()
.append(this.id, rhs.id)
.append(this.seal_num, rhs.seal_num)
.append(this.seal_name, rhs.seal_name)
.append(this.borrower, rhs.borrower)
.append(this.holder, rhs.holder)
.append(this.status, rhs.status)
.append(this.remark, rhs.remark)
.isEquals();
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
return new HashCodeBuilder(-82280557, -700257973)
.append(this.id)
.append(this.seal_num)
.append(this.seal_name)
.append(this.borrower)
.append(this.holder)
.append(this.status)
.append(this.remark)
.toHashCode();
}
/**
* @see java.lang.Object#toString()
*/
public String toString()
{
return new ToStringBuilder(this)
.append("id",this.id)
.append("seal_num", this.seal_num)
.append("seal_name", this.seal_name)
.append("borrower", this.borrower)
.append("holder", this.holder)
.append("status", this.status)
.append("remark", this.remark)
.toString();
}
public String getBorrowerID() {
return borrowerID;
}
public void setBorrowerID(String borrowerID) {
this.borrowerID = borrowerID;
}
public String getHolderID() {
return holderID;
}
public void setHolderID(String holderID) {
this.holderID = holderID;
}
}
|
[
"378377084@qq.com"
] |
378377084@qq.com
|
34371c2aa7b1dd042f0f91e97a25fdb88103fe06
|
e1b1ce58fb1277b724022933176f0809169682d9
|
/sources/fr/pcsoft/wdjava/core/p035c/C0661b.java
|
382f1cf1de2730070f36be05117fbc679d7abadb
|
[] |
no_license
|
MR-116/com.masociete.projet_mobile-1_source_from_JADX
|
a5949c814f0f77437f74b7111ea9dca17140f2ea
|
6cd80095cd68cb9392e6e067f26993ab2bf08bb2
|
refs/heads/master
| 2020-04-11T15:00:54.967026
| 2018-12-15T06:33:57
| 2018-12-15T06:33:57
| 161,873,466
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 387
|
java
|
package fr.pcsoft.wdjava.core.p035c;
import fr.pcsoft.wdjava.ui.C0489p;
/* renamed from: fr.pcsoft.wdjava.core.c.b */
class C0661b implements Runnable {
final C0660a this$0;
final C0489p val$obj;
C0661b(C0660a c0660a, C0489p c0489p) {
this.this$0 = c0660a;
this.val$obj = c0489p;
}
public void run() {
this.val$obj.prendreFocus();
}
}
|
[
"Entrepreneursmalaysia1@gmail.com"
] |
Entrepreneursmalaysia1@gmail.com
|
367227d3ad403859b0db68a0ffa42fe872420bd1
|
29f78bfb928fb6f191b08624ac81b54878b80ded
|
/generated_SPs_SCs/conf/sp (copy)/src/main/java/large3/state/State_ServiceName_2_CapabilityName_2_4.java
|
09bd42905d544e315a0308d7ae7f0ed5375f3936
|
[] |
no_license
|
MSPL4SOA/MSPL4SOA-tool
|
8a78e73b4ac7123cf1815796a70f26784866f272
|
9f3419e416c600cba13968390ee89110446d80fb
|
refs/heads/master
| 2020-04-17T17:30:27.410359
| 2018-07-27T14:18:55
| 2018-07-27T14:18:55
| 66,304,158
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 388
|
java
|
package large3.state;
import javax.ejb.Stateless;
import javax.inject.Named;
import org.jboss.annotation.ejb.cache.simple.CacheConfig;
import large3.util.StateBase;
@Stateless
@CacheConfig(maxSize = 100000, idleTimeoutSeconds = 300, removalTimeoutSeconds = 0)
@Named("State_ServiceName_2_CapabilityName_2_4")
public class State_ServiceName_2_CapabilityName_2_4 extends StateBase {
}
|
[
"akram.kamoun@gmail.com"
] |
akram.kamoun@gmail.com
|
eb123cc7a2974b875a9267d04019b68c7623d35f
|
14fec7d48aa2bd28ecbeb87e4e1d8aeb23e20635
|
/src/main/java/com/mht/service/IAppVersionService.java
|
5bd91f979985155d87f8f09f487676ded4ffb27e
|
[] |
no_license
|
haoqiunie/api1
|
352a2d75ee77b98ff09f7e5a43bfc4f6cab98294
|
37bf9c55edda5e9b7a70a85f0851472dd8306280
|
refs/heads/master
| 2022-06-27T18:22:03.203863
| 2019-08-12T03:02:11
| 2019-08-12T03:02:11
| 201,601,048
| 0
| 0
| null | 2022-06-17T02:25:39
| 2019-08-10T08:17:18
|
Java
|
UTF-8
|
Java
| false
| false
| 269
|
java
|
package com.mht.service;
import com.mht.entity.AppVersion;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author jobob
* @since 2019-07-29
*/
public interface IAppVersionService extends IService<AppVersion> {
}
|
[
"1778715299@qq.com"
] |
1778715299@qq.com
|
f39f4339aa0d51e73489736e45e09ee43862a7c3
|
f6899a2cf1c10a724632bbb2ccffb7283c77a5ff
|
/org.checkerframework/checker-qual/2.0.0/framework/src/org/checkerframework/qualframework/util/ExtendedUnionType.java
|
afcca62779ece52c037575b4409900515a6f5aba
|
[
"MIT"
] |
permissive
|
Appdynamics/OSS
|
a8903058e29f4783e34119a4d87639f508a63692
|
1e112f8854a25b3ecf337cad6eccf7c85e732525
|
refs/heads/master
| 2023-07-22T03:34:54.770481
| 2021-10-28T07:01:57
| 2021-10-28T07:01:57
| 19,390,624
| 2
| 13
| null | 2023-07-08T02:26:33
| 2014-05-02T22:42:20
| null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package org.checkerframework.qualframework.util;
import java.util.List;
/** {@link ExtendedTypeMirror} variant for {@link javax.lang.model.type.UnionType}. */
public interface ExtendedUnionType extends ExtendedTypeMirror {
/** Return the alternatives comprising this union type. */
List<? extends ExtendedTypeMirror> getAlternatives();
}
|
[
"gangadhar.chalapaka@appdynamics.com"
] |
gangadhar.chalapaka@appdynamics.com
|
c9aec81d4c57452c23b88ba42d1f0c4275684214
|
3b481b302b02edf57b816acac9e5ff3b7ec602e2
|
/src/com/google/android/gms/internal/qz.java
|
bf53e5336324f90c28918bed6fb2a6ef0b48e8cb
|
[] |
no_license
|
reverseengineeringer/com.twitter.android
|
53338ae009b2b6aa79551a8273875ec3728eda99
|
f834eee04284d773ccfcd05487021200de30bd1e
|
refs/heads/master
| 2021-04-15T04:35:06.232782
| 2016-07-21T03:51:19
| 2016-07-21T03:51:19
| 63,835,046
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,381
|
java
|
package com.google.android.gms.internal;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.DownloadManager.Request;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.net.http.SslError;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.Window;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
@oi
@TargetApi(8)
public class qz
{
public static qz a(int paramInt)
{
if (paramInt >= 19) {
return new ri();
}
if (paramInt >= 18) {
return new rg();
}
if (paramInt >= 17) {
return new rf();
}
if (paramInt >= 16) {
return new rh();
}
if (paramInt >= 14) {
return new re();
}
if (paramInt >= 11) {
return new rc();
}
if (paramInt >= 9) {
return new rb();
}
return new qz();
}
public int a()
{
return 0;
}
public Drawable a(Context paramContext, Bitmap paramBitmap, boolean paramBoolean, float paramFloat)
{
return new BitmapDrawable(paramContext.getResources(), paramBitmap);
}
public ta a(sz paramsz, boolean paramBoolean)
{
return new ta(paramsz, paramBoolean);
}
public String a(Context paramContext)
{
return "";
}
public String a(SslError paramSslError)
{
return "";
}
public Set<String> a(Uri paramUri)
{
if (paramUri.isOpaque()) {
return Collections.emptySet();
}
paramUri = paramUri.getEncodedQuery();
if (paramUri == null) {
return Collections.emptySet();
}
LinkedHashSet localLinkedHashSet = new LinkedHashSet();
int j = 0;
int i;
do
{
int k = paramUri.indexOf('&', j);
i = k;
if (k == -1) {
i = paramUri.length();
}
int m = paramUri.indexOf('=', j);
if (m <= i)
{
k = m;
if (m != -1) {}
}
else
{
k = i;
}
localLinkedHashSet.add(Uri.decode(paramUri.substring(j, k)));
i += 1;
j = i;
} while (i < paramUri.length());
return Collections.unmodifiableSet(localLinkedHashSet);
}
public void a(Activity paramActivity, ViewTreeObserver.OnGlobalLayoutListener paramOnGlobalLayoutListener)
{
paramActivity = paramActivity.getWindow();
if ((paramActivity != null) && (paramActivity.getDecorView() != null) && (paramActivity.getDecorView().getViewTreeObserver() != null)) {
a(paramActivity.getDecorView().getViewTreeObserver(), paramOnGlobalLayoutListener);
}
}
public void a(View paramView, Drawable paramDrawable)
{
paramView.setBackgroundDrawable(paramDrawable);
}
public void a(ViewTreeObserver paramViewTreeObserver, ViewTreeObserver.OnGlobalLayoutListener paramOnGlobalLayoutListener)
{
paramViewTreeObserver.removeGlobalOnLayoutListener(paramOnGlobalLayoutListener);
}
public boolean a(DownloadManager.Request paramRequest)
{
return false;
}
public boolean a(Context paramContext, WebSettings paramWebSettings)
{
return false;
}
public boolean a(View paramView)
{
return (paramView.getWindowToken() != null) || (paramView.getWindowVisibility() != 8);
}
public boolean a(Window paramWindow)
{
return false;
}
public boolean a(sz paramsz)
{
if (paramsz == null) {
return false;
}
paramsz.onPause();
return true;
}
public int b()
{
return 1;
}
public boolean b(View paramView)
{
return false;
}
public boolean b(sz paramsz)
{
if (paramsz == null) {
return false;
}
paramsz.onResume();
return true;
}
public int c()
{
return 5;
}
public WebChromeClient c(sz paramsz)
{
return null;
}
public boolean c(View paramView)
{
return false;
}
public ViewGroup.LayoutParams d()
{
return new ViewGroup.LayoutParams(-2, -2);
}
}
/* Location:
* Qualified Name: com.google.android.gms.internal.qz
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
76a0f1fcec86d6f211aa89155731b67a6eb70744
|
0ab89cc8b0bb0612fdc953a8ceee4ea9fbf8471c
|
/src/main/java/com/easymvc/utils/FileUtil.java
|
3cb4a38e793bc4d0b9dc54a4db16b376b6948973
|
[
"Apache-2.0"
] |
permissive
|
ibmcuijunluke/easymvc
|
3d5282b44890c6a7387d8437f14852c1a88be6da
|
c134bb013ab8eeb7c14a5f4dc8415f52edc8e129
|
refs/heads/master
| 2022-10-31T10:25:17.756430
| 2022-10-16T15:07:50
| 2022-10-16T15:07:50
| 124,497,271
| 2
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,338
|
java
|
package com.easymvc.utils;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class FileUtil {
static final Pattern reUnicode = Pattern.compile("\\\\u([0-9a-zA-Z]{4})");
public static String convertUnicode(String str) {
if(str==null || str==""){
throw new RuntimeException(" Convert Unicode String is null") ;
}
Matcher matcher = reUnicode.matcher(str);
StringBuffer sb = new StringBuffer(str.length());
while (matcher.find()) {
matcher.appendReplacement(sb, Character.toString((char) Integer.parseInt(matcher.group(1), 16)));
}
matcher.appendTail(sb);
return sb.toString();
}
public static String readText2String(File file) {
char[] buffer = new char[1024];
StringBuffer stringBuffer = new StringBuffer();
int count = 0;
try {
FileReader inFile = new FileReader(file);
while (-1 != (count = inFile.read(buffer))) {
stringBuffer = stringBuffer.append(new String(buffer, 0, count));
}
inFile.close();
} catch (IOException ex) {
ex.printStackTrace();
}
return stringBuffer.toString();
}
public static void readByBuffer(String filePathName) throws IOException {
try {
InputStream in = new FileInputStream(filePathName);
InputStreamReader inputStreamReader = new InputStreamReader(in);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String line;
while ((line = bufferedReader.readLine()) != null) {
System.out.println(line);
}
bufferedReader.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
public static String replace(String str, String regex, String replacement) {
if (str == null||str=="") {
throw new RuntimeException("str is null");
}
str.replace(regex, replacement);
return str;
}
public static void writeFile(String filePathAndName, String fileContent) {
File txt = new File(filePathAndName);
if (!txt.exists()) {
try {
txt.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
byte bytes[] = new byte[512];
bytes = fileContent.getBytes();
int b = fileContent.length();
try {
FileOutputStream fos = new FileOutputStream(txt);
fos.write(bytes, 0, b);
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void writeFiles(String filePathAndName, String fileContent) {
try {
File file = new File(filePathAndName);
if (!file.exists()) {
file.createNewFile();
}
OutputStreamWriter write = new OutputStreamWriter(new FileOutputStream(file), "gb2312");
BufferedWriter writer = new BufferedWriter(write);
writer.write(fileContent);
writer.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void writeFile(String path, String content, String encoding) throws IOException {
File file = new File(path);
file.delete();
file.createNewFile();
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), encoding));
writer.write(content);
writer.close();
}
public static void appendMethods(String fileName, String content) {
try {
FileWriter writer = new FileWriter(fileName, true);
writer.write(content);
writer.write(System.getProperty("line.separator", "\n"));
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void fileWriteAppend(String file, String conent){
BufferedWriter out = null;
try {
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true),"UTF-8"));
out.write(conent + "\r\n");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void deleteExistFile(String file){
File files = new File(file);
if (files.exists()) {
files.delete();
}
}
}
|
[
"gogs@fake.local"
] |
gogs@fake.local
|
007b43d62267a20b9a103fd4a018fd7834e0227b
|
af06cf23273fffe967a10e7eb4b45097fe8aae6a
|
/app/src/main/java/com/hzdongcheng/aidldemo/ServiceProviderInstance.java
|
a88293aba0114d7fa16bdee8db02dd45204720ba
|
[] |
no_license
|
QiangzhenZhu/AidlDemo
|
566b9c01f0d94509f63f9c6aa7a158c7364a3cbe
|
ecb1f51eaf0edffd49df1e9899c756f39bd57862
|
refs/heads/master
| 2021-06-03T07:23:50.998606
| 2021-03-20T01:36:36
| 2021-03-20T01:36:36
| 148,747,267
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,089
|
java
|
package com.hzdongcheng.aidldemo;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import com.google.gson.Gson;
import com.hzdongcheng.aidldemo.bean.BoxStatus;
import com.hzdongcheng.drivers.IDriverManager;
import com.hzdongcheng.drivers.bean.Result;
import com.hzdongcheng.drivers.locker.ISlaveController;
import com.hzdongcheng.drivers.peripheral.scanner.IScannerController;
import java.lang.ref.WeakReference;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
/**
* Created by zzq on 2018/9/13
**/
public class ServiceProviderInstance {
private static final String TAG = "ServiceProviderInstance";
private static ServiceProviderInstance instance = new ServiceProviderInstance();
private static IDriverManager driverManager;
private static ISlaveController slaveController;
private static IScannerController scannerController;
private WeakReference<Context> contextWeakReference;
private ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
private ScheduledFuture<?> schedule;
private Intent driverIntent;
/**
* 监听Aidl客户端和服务端的状态
*/
private IBinder.DeathRecipient mDeathRecipient = new IBinder.DeathRecipient() {
@Override
public void binderDied() {
if (driverManager != null&&contextWeakReference!=null){
driverManager.asBinder().unlinkToDeath(mDeathRecipient, 0);
contextWeakReference.get().unbindService(serviceConnection);
}
}
};
private ServiceConnection serviceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
Log.d(TAG, "->东城驱动服务连接成功");
driverManager = IDriverManager.Stub.asInterface(iBinder);
try {
iBinder.linkToDeath(mDeathRecipient,0);
} catch (RemoteException e) {
e.printStackTrace();
}
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
Log.d(TAG,"->东城驱动服务断开连接");
driverManager = null;
scannerController = null;
slaveController = null;
reconnectService();
}
};
private ServiceProviderInstance(){
}
public static ServiceProviderInstance getInstance(){
return instance;
}
/**
* 服务重新连接(延时3秒)
*/
private synchronized void reconnectService() {
if (schedule != null && !schedule.isDone()) {
Log.d(TAG,"--> 驱动服务器已经再重连,将不会执行此次重连请求");
return;
}
schedule = executorService.schedule(new Runnable() {
@Override
public void run() {
Log.d(TAG,"--> 开始重新连接驱动服务");
if (contextWeakReference.get() != null) {
boolean isBind;
int tryCount = 0;
do {
try {
Thread.sleep(tryCount * 30 * 1000);
} catch (InterruptedException ignored) {
}
isBind = contextWeakReference.get().bindService(driverIntent, serviceConnection, Context.BIND_AUTO_CREATE);
} while (!isBind || tryCount++ < 10);
}
}
}, 3, TimeUnit.SECONDS);
}
/**
* 绑定东城驱动服务
* @param context
*/
public boolean bind(Context context){
driverIntent = new Intent("hzdongcheng.intent.action.DRIVER");
driverIntent.setPackage("com.hzdongcheng.drivers");
contextWeakReference = new WeakReference<>(context);
return context.bindService(driverIntent, serviceConnection, Context.BIND_AUTO_CREATE);
}
/**
* 获取副柜
* @return
*/
public static ISlaveController getSlaveController() {
if (slaveController != null&&slaveController.asBinder().isBinderAlive())
return slaveController;
if (driverManager != null) {
try {
slaveController = ISlaveController.Stub.asInterface(driverManager.getSlaveService());
} catch (RemoteException e) {
Log.e(TAG,">>副柜控制器获取失败>>" + e.getMessage());
}
}
if (slaveController == null) {
Log.e(TAG,"未获取到服务模块");
}
return slaveController;
}
/**
* 获取扫描枪服务
* @return
* @throws
*/
public IScannerController getScannerController() throws Exception {
if (scannerController != null&&scannerController.asBinder().isBinderAlive())
return scannerController;
if (driverManager != null) {
try {
scannerController = IScannerController.Stub.asInterface(driverManager.getScannerService());
if (scannerController == null) {
throw new Exception("未获取到服务模块");
}
scannerController.start();
scannerController.addObserver(HAL.scannerObserver);
} catch (RemoteException e) {
Log.e(TAG,">>扫描枪控制器获取失败>>" + e.getMessage());
}
}
if (scannerController == null) {
throw new Exception("未获取到服务模块");
}
return scannerController;
}
//解绑
public void unBind(){
if (contextWeakReference.get() != null){
contextWeakReference.get().unbindService(serviceConnection);
}
}
}
|
[
"1083546145@qq.com"
] |
1083546145@qq.com
|
ccf02265bbcdd55391eb8d8289c3f0f43a33e5dd
|
d38a8d9d1ce0dd8bc5e5c3e85d5a218d29e99eee
|
/src/main/java/net/nawaman/curry/DependencyInfo.java
|
1873f1b128c8e85533874ba2b3c843bf1b506525
|
[] |
no_license
|
NawaMan/Curry
|
0729ff46f18b5cbaf59a5a14715e2bfc98c848df
|
96dfaf8d8e188cc3a9274d0327fc702c8d6ba381
|
refs/heads/master
| 2023-03-30T19:30:37.533442
| 2023-03-24T04:05:02
| 2023-03-24T04:05:02
| 184,430,232
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,209
|
java
|
package net.nawaman.curry;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Vector;
import net.nawaman.util.UObject;
/** Information about dependency of a group of packages */
public class DependencyInfo implements Serializable {
static final private long serialVersionUID = 315432132135132135L;
public DependencyInfo(String[] pPackageNames, String[] pRequiredEngineExts, String[] pRequirePackageNames) {
this((pPackageNames == null) ? null : Arrays.asList((String[])pPackageNames),
(pRequiredEngineExts == null) ? null : Arrays.asList((String[])pRequiredEngineExts),
(pRequirePackageNames == null) ? null : Arrays.asList((String[])pRequirePackageNames)
);
}
public DependencyInfo(List<String> pPackageNames, List<String> pRequiredEngineExts,
List<String> pRequirePackageNames) {
if((pPackageNames == null) || (pPackageNames.size() == 0))
throw new NullPointerException();
// Ensure the package names are sorted
pPackageNames = new Vector<String>(new HashSet<String>(pPackageNames));
Collections.sort(pPackageNames);
this.PackageNames = pPackageNames.toArray(new String[pPackageNames.size()]);
// Ensure the required extension names are sorted
if((pRequiredEngineExts != null) && (pRequiredEngineExts.size() != 0)) {
pRequiredEngineExts = new Vector<String>(new HashSet<String>(pRequiredEngineExts));
Collections.sort(pRequiredEngineExts);
this.RequiredEngineExts = pRequiredEngineExts.toArray(new String[pRequiredEngineExts.size()]);
} else
this.RequiredEngineExts = null;
// Ensure the required package names are sorted
if((pRequirePackageNames != null) && (pRequirePackageNames.size() != 0)) {
pRequirePackageNames = new Vector<String>(new HashSet<String>(pRequirePackageNames));
// Ensure the required package name is sorted
pRequirePackageNames.removeAll(pPackageNames); // Required the local is not needed to be in there.
Collections.sort(pRequirePackageNames);
if(pRequirePackageNames.size() == 0)
this.RequiredPackageNames = null;
else this.RequiredPackageNames = pRequirePackageNames.toArray(new String[pRequirePackageNames.size()]);
} else this.RequiredPackageNames = null;
}
// All the data should be sorted
final String[] PackageNames;
final String[] RequiredEngineExts;
final String[] RequiredPackageNames;
/** Returns the number of package */
public int getRequiredPackageCount() {
return (this.RequiredPackageNames == null) ? 0 : this.RequiredPackageNames.length;
}
/** Returns the number of package */
public String getRequiredPackage(int I) {
if((I < 0) || (this.RequiredPackageNames == null) || (I >= this.RequiredPackageNames.length))
return null;
return this.RequiredPackageNames[I];
}
/**{@inheritDoc}*/ @Override
public int hashCode() {
return UObject.hash(this.PackageNames) +
UObject.hash(this.RequiredEngineExts) +
UObject.hash(this.RequiredPackageNames);
}
/**{@inheritDoc}*/ @Override
public boolean equals(Object O) {
if(!(O instanceof DependencyInfo)) return false;
return this.hashCode() == O.hashCode();
}
}
|
[
"nawa@nawaman.net"
] |
nawa@nawaman.net
|
3865b5b60af5965e4b0073a094d9cdf998b68746
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_b5edf8e89f372c95d0d420f02321f51567a8d7b3/CatchHealthIssue2/7_b5edf8e89f372c95d0d420f02321f51567a8d7b3_CatchHealthIssue2_s.java
|
ec82e78e1c953d269b8d35cc04c4ad90efa769cf
|
[] |
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
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.udhc.gen;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
//ServletFileUpload;
/**
*
* @author root
*/
public class CatchHealthIssue2 extends HttpServlet {
/**
* Processes requests for both HTTP
* <code>GET</code> and
* <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("--------------IN SERVLET-----");
String topic = "";//request.getParameter("topic");
String problem_details = "";//request.getParameter("problem_details");
String swid= User.getLoggedInUserEmail(request);
String patient_name="";
String isNew=""; // this denotes whether a new patient is to be added.
try {
List<FileItem> items = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);
String fieldname;
String fieldvalue=""; ;
InputStream filecontent=null ;
for (FileItem item : items) {
if (item.isFormField()) {
// Process regular form field (input type="text|radio|checkbox|etc", select, etc).
fieldname = item.getFieldName();
fieldvalue = item.getString();
if( fieldname.equals("isNew"))
{
isNew=fieldvalue;
}
if(fieldname.equals("topic"))
{
topic=fieldvalue;
}
else if(fieldname.equals("problem_details"))
{
problem_details=fieldvalue;
}
else if(fieldname.equals("patient_name"))
{
patient_name=fieldvalue;
}
System.out.println(fieldname+"....formfield...."+fieldvalue);
// ... (do your job here)
} else {
// Process form file field (input type="file").
//ouur String fieldname = item.getFieldName();
/*
* Currently there's just one file - the patient consent form.
* TO BE DONE: Support for upload of multiple files/scans
* during case upload
*
*/
String filename = (item.getName());
System.out.println("....non-form-field...."+filename);
// filecontent is the consent form.
filecontent = item.getInputStream();
}
}
/*
* String sc_name=org.udhc.gen.User.getScientificName();
*
* The above code is commented out because the patient sci name is recieved as a form parameter now
*
*/
HealthRecord hr=new HealthRecord(topic,swid,"0",problem_details,filecontent);
String name=org.udhc.gen.User.getLoggedInUserName(request);
// This is an object created to help invoke functions
User u=new User(patient_name,swid);
/*
The first condition checks whether its a new patient.
The second condition checks whether the logged in user is *not* a care-seeker because the rest can add new
patients to the database
*
*
*/
if(isNew.equals("1"))// && !User.getLoggedInUserRole(request).equals("0"))
{
u.insertSocialWorkerPatient();
}
String topic_id=hr.insertHealthRecord3(patient_name);
System.out.println(topic_id);
//HealthRecord.insertImage(filecontent,Integer.parseInt(fieldvalue));
/*
*
* Sending the email notification.
* The below process will be put into a utlity class to make sure
* for sending ouut all notifications.
*
*
*/
String to[]=User.getModeratorEmails();
String subject="[UDHC Alpha TEST] Patient name : "+ patient_name + " uploaded by " + org.udhc.gen.User.getLoggedInUserName(request);
String content=" Hello care-givers!, <br>A new health issue has been posted on UDHC : "+topic;
content+="<br><strong> ***This is an automated email sent from the UDHC website. </Strong> Visit <a href='http://care.udhc.co.in/UPLOADER/care-seeker-input-edit.jsp?topic_id="+topic_id+"'>Health issue approval page</a> to approve/edit the health issue ***<br><br>";
content+=" NARRATIVE: <br>"+problem_details;
content+="<br><br>Warm regards, <br> The UDHC Team";
topic="[ UDHC ] - "+ patient_name + "uploaded by " + org.udhc.gen.User.getLoggedInUserName(request);
org.udhc.gen.EmailUtil.sendMail("sbose78", to, subject, content);
response.sendRedirect(request.getContextPath()+"/UPLOADER/care-seeker-input-edit.jsp?topic_id="+topic_id);
}
catch (Exception e) {
throw new ServletException("Cannot parse multipart request.", e);
}
// ...
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP
* <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException{
processRequest(request, response);
}
/**
* Handles the HTTP
* <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException{
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e4c4429485c6a99553c0ba60148663e92b8da78a
|
a1a6c1b700c9cd8cba1fd43fbc83af071dfd2800
|
/kaixin_source/src/com/tencent/sdkutil/WebViewDialog$1.java
|
0769a72a86982e813900b75a12dbd1a89092d502
|
[] |
no_license
|
jingshauizh/kaixin
|
58c315f99dcdde09589471fcaa262e0a1598701c
|
11b8d109862dba00b7a78f9002e47064f26a0175
|
refs/heads/master
| 2021-07-11T00:55:46.997368
| 2021-04-16T09:41:47
| 2021-04-16T09:41:47
| 25,718,738
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
package com.tencent.sdkutil;
class WebViewDialog$1
{
}
/* Location: C:\9exce\android\pj\kaixin_android_3.9.9_034_kaixin001\classes_dex2jar.jar
* Qualified Name: com.tencent.sdkutil.WebViewDialog.1
* JD-Core Version: 0.6.0
*/
|
[
"jingshuaizh@163.com"
] |
jingshuaizh@163.com
|
217067c8a84ce3f61e0008711b77769d897ad985
|
2bff02cac0d0ef5da7dfa48a2acfc6cf5ef4b95f
|
/src/main/java/com/github/davidmoten/rx/internal/operators/OperatorUnsubscribeEagerly.java
|
bac7ed0083942ea32d05f6b17eff3a80c134a556
|
[
"Apache-2.0"
] |
permissive
|
davidmoten/rxjava-extras
|
de179bbcff65702265115567c4b7229650331ad2
|
59f14d651973c961d1542071de6acecf436722e3
|
refs/heads/master
| 2023-08-28T03:40:02.328544
| 2023-08-03T16:37:22
| 2023-08-03T16:39:53
| 27,285,466
| 305
| 39
|
Apache-2.0
| 2023-08-03T16:39:54
| 2014-11-28T23:25:14
|
Java
|
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
package com.github.davidmoten.rx.internal.operators;
import rx.Observable.Operator;
import rx.Subscriber;
public final class OperatorUnsubscribeEagerly<T> implements Operator<T, T> {
private OperatorUnsubscribeEagerly() {
// no instantiation outside of this class
}
private static final class Singleton {
private static final OperatorUnsubscribeEagerly<?> INSTANCE = new OperatorUnsubscribeEagerly<Object>();
}
@SuppressWarnings("unchecked")
public static final <T> OperatorUnsubscribeEagerly<T> instance() {
return (OperatorUnsubscribeEagerly<T>) Singleton.INSTANCE;
}
@Override
public Subscriber<? super T> call(final Subscriber<? super T> child) {
Subscriber<T> parent = new Subscriber<T>() {
@Override
public void onCompleted() {
unsubscribe();
child.onCompleted();
}
@Override
public void onError(Throwable e) {
unsubscribe();
child.onError(e);
}
@Override
public void onNext(T t) {
child.onNext(t);
}
};
child.add(parent);
return parent;
}
}
|
[
"davidmoten@gmail.com"
] |
davidmoten@gmail.com
|
9382b59be82c3399b648710331030c11eae88acf
|
68a8a36b9dfb928a9c1e36c48b89e6b47a8a8a9c
|
/SingletonDesignPattern/src/com/jit/singleton/Printer6.java
|
2ff7a50f5fd9e5a74c715ea05a1989ecfded0575
|
[] |
no_license
|
jitendrakr93/DesignPattern
|
02086b06aead5b9d47ceae2e4a14de3bd8b280db
|
9c20555b31f6361454294558438fa629e71f0e86
|
refs/heads/master
| 2023-07-03T03:15:43.489774
| 2021-08-03T17:41:03
| 2021-08-03T17:41:03
| 369,131,309
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 742
|
java
|
package com.jit.singleton;
public class Printer6 {
private static final Long serialVersionUID = 4234244L;
private static class InnerPrinter {
private static volatile Printer6 printerInstance = new Printer6();
}
private Printer6() {
}
public static Printer6 getPrinterInstance() {
return InnerPrinter.printerInstance;
}
@Override
public Object clone() throws CloneNotSupportedException {
// return InnerPrinter.printerInstance;
throw new CloneNotSupportedException("Clone not allowed");
}
public Object readResolve() {
// return InnerPrinter.printerInstance;
throw new IllegalArgumentException("Deserialization is not allowed");
}
public void printData() {
System.out.println("SINGLETON :: PRINT1");
}
}
|
[
"jk93.161@gmail.com"
] |
jk93.161@gmail.com
|
efe851909cc0d6e189cad64e240ef8308dc8858d
|
efc404cb75e61881bca6627333d93d8d01bcedb1
|
/app/src/main/java/com/journals/omicsonline/ui/viewmodel/JournalHomeViewModel.java
|
695fcd1a2d3126717b6d5ecc278c8840a92169f1
|
[] |
no_license
|
suresh429/OMICS_International
|
66f926d21b3b9dac62463f11c1f9bb3b41362243
|
01f2f5df1face98f9069adf8ebbd4e4a0ff0e946
|
refs/heads/master
| 2023-01-30T09:18:54.535609
| 2020-12-10T06:37:37
| 2020-12-10T06:37:37
| 320,160,393
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,448
|
java
|
package com.journals.omicsonline.ui.viewmodel;
import android.content.Context;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.google.gson.JsonObject;
import com.journals.omicsonline.model.JournalHomeResponse;
import com.journals.omicsonline.network.JournalRepository;
public class JournalHomeViewModel extends ViewModel {
private MutableLiveData<String> toastMessageObserver ;
private MutableLiveData<Boolean> progressbarObservable;
private MutableLiveData<JournalHomeResponse> mutableLiveData;
public void init(String page_url, Context context){
if (mutableLiveData != null){
return;
}
JournalRepository journalRepository = JournalRepository.getInstance(context);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("page_url",page_url);
mutableLiveData = journalRepository.getJournalHomeData(jsonObject);
progressbarObservable = journalRepository.getProgressbarObservable();
toastMessageObserver = journalRepository.getToastObserver();
}
public LiveData<JournalHomeResponse> getJournalHomeRepository() {
return mutableLiveData;
}
public LiveData<String> getToastObserver(){
return toastMessageObserver;
}
public MutableLiveData<Boolean> getProgressbarObservable() {
return progressbarObservable;
}
}
|
[
"ksuresh.unique@gmail.com"
] |
ksuresh.unique@gmail.com
|
29431bc293e3eebe130a63f9d7fd11b8f0e7fd8a
|
5ecd15baa833422572480fad3946e0e16a389000
|
/framework/MCS-Open/subsystems/runtime/main/api/java/com/volantis/mcs/protocols/EmphasisAttributes.java
|
b79761ff575dbdd848237140b9dfab52aee468ee
|
[] |
no_license
|
jabley/volmobserverce
|
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
|
6d760f27ac5917533eca6708f389ed9347c7016d
|
refs/heads/master
| 2021-01-01T05:31:21.902535
| 2009-02-04T02:29:06
| 2009-02-04T02:29:06
| 38,675,289
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,042
|
java
|
/*
This file is part of Volantis Mobility Server.
Volantis Mobility Server is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Volantis Mobility Server is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Volantis Mobility Server. If not, see <http://www.gnu.org/licenses/>.
*/
/* ----------------------------------------------------------------------------
* $Header: /src/voyager/com/volantis/mcs/protocols/EmphasisAttributes.java,v 1.2 2002/03/18 12:41:16 ianw Exp $
* ----------------------------------------------------------------------------
* (c) Volantis Systems Ltd 2000.
* ----------------------------------------------------------------------------
* Change History:
*
* Date Who Description
* --------- --------------- -----------------------------------------------
* 31-Jan-02 Paul VBM:2001122105 - Created for consistency.
* 18-Mar-02 Ian VBM:2002031203 Changed log4j Category from class
to string.
* ----------------------------------------------------------------------------
*/
package com.volantis.mcs.protocols;
public class EmphasisAttributes
extends MCSAttributes {
/**
* This constructor delegates all its work to the initialise method,
* no extra initialisation should be added here, instead it should be
* added to the initialise method.
*/
public EmphasisAttributes() {
initialise();
}
/**
* This method should reset the state of this object back to its
* state immediately after it was constructed.
*/
public void resetAttributes() {
super.resetAttributes();
// Call this after calling super.resetAttributes to allow initialise to
// override any inherited attributes.
initialise();
}
/**
* Initialise all the data members. This is called from the constructor
* and also from resetAttributes.
*/
private void initialise() {
// Set the default tag name, this is the name of the tag which makes
// the most use of this class.
setTagName("em");
}
}
/*
===========================================================================
Change History
===========================================================================
$Log$
08-Dec-04 6416/3 ianw VBM:2004120703 New Build
08-Dec-04 6416/1 ianw VBM:2004120703 New Build
01-Nov-04 6068/1 tom VBM:2004101508 renamed VolantisAttribute to MCSAttributes and added style properties container
===========================================================================
*/
|
[
"iwilloug@b642a0b7-b348-0410-9912-e4a34d632523"
] |
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
|
8f7e5eecaab50b4ac3764780391815739bdca321
|
d47c9dde7e4d8a5b5dfd37334161ae0241748d5d
|
/rest/src/main/java/org/jbpm/demo/rest/RestEasyClientGetProcessInstance.java
|
e3c4f3bb878ca5ab786c6dcde4587e0bf7e545e3
|
[
"Apache-2.0"
] |
permissive
|
huihuang1266/jbpm-examples
|
4ac98392654817b4ac67c43691a3ddec61994eae
|
5ea15a024ed30ea70001c15614148ce1ba73961a
|
refs/heads/master
| 2021-01-23T05:14:27.562995
| 2017-02-19T09:45:24
| 2017-02-19T09:45:24
| 86,288,397
| 1
| 0
| null | 2017-03-27T03:43:45
| 2017-03-27T03:43:45
| null |
UTF-8
|
Java
| false
| false
| 979
|
java
|
package org.jbpm.demo.rest;
import org.jboss.resteasy.client.ClientRequest;
import org.jboss.resteasy.client.ClientResponse;
import org.kie.services.client.serialization.jaxb.impl.process.JaxbProcessInstanceResponse;
public class RestEasyClientGetProcessInstance extends RestEasyClientBase {
public void execute() throws Exception {
int processInstanceId = 1;
String process_instance_procInstId = url + root + "/process/instance/" + processInstanceId;
System.out.println("get ProcessInstance via " + process_instance_procInstId);
ClientRequest restRequest = getClientRequestFactory().createRequest(process_instance_procInstId);
ClientResponse<?> responseObj = checkResponse(restRequest.get());
JaxbProcessInstanceResponse response = responseObj.getEntity(JaxbProcessInstanceResponse.class);
System.out.println(response);
}
public static void main(String[] args) throws Exception {
new RestEasyClientGetProcessInstance().execute();
}
}
|
[
"kylinsoong.1214@gmail.com"
] |
kylinsoong.1214@gmail.com
|
5bf4c219f6f21c600c003eeffb580db310a0a431
|
9723c0c6b578504d6354b28e51385db079b55749
|
/app/src/main/java/org/musicbrainz/android/adapter/recycler/CollectionsAdapter.java
|
d7b16c3df08ea282679cda22eb3b2ff4effa9b25
|
[] |
no_license
|
algerd/musicbrainz-android
|
a67ee28e5dcca566a17749ede85c8a88594b42be
|
c5bb54a19d366a8363ee2e0e01b55c544df6872a
|
refs/heads/master
| 2020-04-01T13:34:14.012909
| 2018-11-19T11:42:58
| 2018-11-19T11:42:58
| 153,257,641
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,430
|
java
|
package org.musicbrainz.android.adapter.recycler;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import org.musicbrainz.android.R;
import org.musicbrainz.android.api.model.Collection;
import java.util.List;
/**
* Created by Alex on 19.02.2018.
*/
public class CollectionsAdapter extends BaseRecyclerViewAdapter<CollectionsAdapter.CollectionsViewHolder> {
private CollectionsViewHolder.OnDeleteCollectionListener onDeleteCollectionListener;
private List<Collection> collections;
private boolean isPrivate;
public static class CollectionsViewHolder extends BaseRecyclerViewAdapter.BaseViewHolder {
public interface OnDeleteCollectionListener {
void onDelete(int position);
}
private OnDeleteCollectionListener onDeleteCollectionListener;
public void setOnDeleteCollectionListener(OnDeleteCollectionListener onDeleteCollectionListener) {
this.onDeleteCollectionListener = onDeleteCollectionListener;
}
static final int VIEW_HOLDER_LAYOUT = R.layout.card_collections;
private TextView collectionName;
private TextView collectionCount;
private ImageView collectionDelete;
public static CollectionsViewHolder create(ViewGroup parent) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(VIEW_HOLDER_LAYOUT, parent, false);
return new CollectionsViewHolder(view);
}
private CollectionsViewHolder(View v) {
super(v);
collectionName = v.findViewById(R.id.collection_name);
collectionCount = v.findViewById(R.id.collection_count);
collectionDelete = v.findViewById(R.id.collection_delete);
}
public void bindTo(Collection collection, boolean isPrivate) {
collectionDelete.setVisibility(isPrivate ? View.VISIBLE : View.GONE);
collectionDelete.setOnClickListener(v -> {
if (onDeleteCollectionListener != null) {
onDeleteCollectionListener.onDelete(getAdapterPosition());
}
});
collectionName.setText(collection.getName());
collectionCount.setText(String.valueOf(collection.getCount()));
}
}
public CollectionsAdapter(List<Collection> collections, boolean isPrivate) {
this.collections = collections;
this.isPrivate = isPrivate;
//Collections.sort(this.collections, (t1, t2) -> t2.getCount() - t1.getCount());
}
@Override
public void onBind(CollectionsViewHolder holder, final int position) {
holder.setOnDeleteCollectionListener(onDeleteCollectionListener);
holder.bindTo(collections.get(position), isPrivate);
}
@Override
public int getItemCount() {
return collections.size();
}
@NonNull
@Override
public CollectionsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return CollectionsViewHolder.create(parent);
}
public void setOnDeleteCollectionListener(CollectionsViewHolder.OnDeleteCollectionListener onDeleteCollectionListener) {
this.onDeleteCollectionListener = onDeleteCollectionListener;
}
}
|
[
"algerd75@mail.ru"
] |
algerd75@mail.ru
|
6db819cfa06b4ec4af59cd543e319853f0abb822
|
74e94b19b8a9748558bbaa2b86d4e7c6db835e2f
|
/service/webService/src/main/java/com/comcast/redirector/api/model/testsuite/visitor/ExpressionWithChildrenTestVisitor.java
|
61ca2f26b98e06148e7f4fb6f667f9fd7463ebba
|
[
"Apache-2.0"
] |
permissive
|
Comcast/redirector
|
b236567e2bae687e0189c2cdc45731dd8c055a1a
|
6770fe01383bc7ea110c7c8e14c137212ebc0ba1
|
refs/heads/master
| 2021-03-27T20:48:38.988332
| 2019-09-26T08:39:18
| 2019-09-26T08:39:18
| 80,451,996
| 10
| 13
|
Apache-2.0
| 2019-09-26T08:39:19
| 2017-01-30T18:50:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,428
|
java
|
/**
* Copyright 2017 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @author Alexander Binkovsky (abinkovski@productengine.com)
*/
package com.comcast.redirector.api.model.testsuite.visitor;
import com.comcast.redirector.api.model.Expressions;
import com.comcast.redirector.api.model.HasChildren;
import com.comcast.redirector.api.model.IVisitable;
import com.comcast.redirector.api.model.testsuite.visitor.BaseTestSuiteExpressionVisitor;
import static com.comcast.redirector.api.model.testsuite.visitor.TestSuiteExpressionVisitors.expressionToParameters;
public class ExpressionWithChildrenTestVisitor<T extends IVisitable & HasChildren> extends BaseTestSuiteExpressionVisitor<T> {
@Override
public void visit(T item) {
for (Expressions expression : item.getItems()) {
addParameters(expressionToParameters(expression));
}
}
}
|
[
"mailtojp@gmail.com"
] |
mailtojp@gmail.com
|
9281072444d8b7376caa35cf82a7f056d210b35b
|
4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d
|
/src/main/java/com/alipay/api/domain/AlipayEbppFacepayBillPayModel.java
|
d2aabaed8d04abed951bdf819e64663b44237d44
|
[
"Apache-2.0"
] |
permissive
|
weizai118/payment-alipay
|
042898e172ce7f1162a69c1dc445e69e53a1899c
|
e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1
|
refs/heads/master
| 2020-04-05T06:29:57.113650
| 2018-11-06T11:03:05
| 2018-11-06T11:03:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,783
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 当成付扣款接口
*
* @author auto create
* @since 1.0, 2017-07-29 23:56:37
*/
public class AlipayEbppFacepayBillPayModel extends AlipayObject {
private static final long serialVersionUID = 1444916385575243279L;
/**
* 账期
*/
@ApiField("bill_date")
private String billDate;
/**
* 户号(缴税业务:纳税人识别号,对于三证合一的企业来说,采用社会信用代码;对于个人来说,采用身份证号)
*/
@ApiField("bill_key")
private String billKey;
/**
* 业务类型英文名称,JF-缴费、TAX-缴税
*/
@ApiField("biz_type")
private String bizType;
/**
* 出账机构代码(缴税业务:指征收机关英文代码,例如南京玄武国税(NJXWGS))
*/
@ApiField("charge_inst")
private String chargeInst;
/**
* 扩展字段(缴税业务:taxpayerName -纳税人名称,taxOrgCode - 征收机关代码;缴费业务如需支付宝销账:billCacheKey -欠费单缓存Key,billUniqId - 欠费单唯一ID)
*/
@ApiField("extend_field")
private String extendField;
/**
* 滞纳金额,单位:元
*/
@ApiField("fine_amount")
private String fineAmount;
/**
* 机构账单ID(缴税业务:用外部申报号)
*/
@ApiField("inst_no")
private String instNo;
/**
* ISV流水号,用于控制幂等,须确保全局唯一(缴税业务:可采用{征收机关代码}-{外部申报号}的形式)
*/
@ApiField("out_order_no")
private String outOrderNo;
/**
* 支付金额(包含滞纳金),单位:元
*/
@ApiField("pay_amount")
private String payAmount;
/**
* 商户partnerId
*/
@ApiField("pid")
private String pid;
/**
* 子业务类型英文名称,ELECTRIC-电费,WATER-水费,GAS-燃气费,TAX-缴税
*/
@ApiField("sub_biz_type")
private String subBizType;
/**
* 用户支付宝付款码
*/
@ApiField("user_identity_code")
private String userIdentityCode;
/**
* Gets bill date.
*
* @return the bill date
*/
public String getBillDate() {
return this.billDate;
}
/**
* Sets bill date.
*
* @param billDate the bill date
*/
public void setBillDate(String billDate) {
this.billDate = billDate;
}
/**
* Gets bill key.
*
* @return the bill key
*/
public String getBillKey() {
return this.billKey;
}
/**
* Sets bill key.
*
* @param billKey the bill key
*/
public void setBillKey(String billKey) {
this.billKey = billKey;
}
/**
* Gets biz type.
*
* @return the biz type
*/
public String getBizType() {
return this.bizType;
}
/**
* Sets biz type.
*
* @param bizType the biz type
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* Gets charge inst.
*
* @return the charge inst
*/
public String getChargeInst() {
return this.chargeInst;
}
/**
* Sets charge inst.
*
* @param chargeInst the charge inst
*/
public void setChargeInst(String chargeInst) {
this.chargeInst = chargeInst;
}
/**
* Gets extend field.
*
* @return the extend field
*/
public String getExtendField() {
return this.extendField;
}
/**
* Sets extend field.
*
* @param extendField the extend field
*/
public void setExtendField(String extendField) {
this.extendField = extendField;
}
/**
* Gets fine amount.
*
* @return the fine amount
*/
public String getFineAmount() {
return this.fineAmount;
}
/**
* Sets fine amount.
*
* @param fineAmount the fine amount
*/
public void setFineAmount(String fineAmount) {
this.fineAmount = fineAmount;
}
/**
* Gets inst no.
*
* @return the inst no
*/
public String getInstNo() {
return this.instNo;
}
/**
* Sets inst no.
*
* @param instNo the inst no
*/
public void setInstNo(String instNo) {
this.instNo = instNo;
}
/**
* Gets out order no.
*
* @return the out order no
*/
public String getOutOrderNo() {
return this.outOrderNo;
}
/**
* Sets out order no.
*
* @param outOrderNo the out order no
*/
public void setOutOrderNo(String outOrderNo) {
this.outOrderNo = outOrderNo;
}
/**
* Gets pay amount.
*
* @return the pay amount
*/
public String getPayAmount() {
return this.payAmount;
}
/**
* Sets pay amount.
*
* @param payAmount the pay amount
*/
public void setPayAmount(String payAmount) {
this.payAmount = payAmount;
}
/**
* Gets pid.
*
* @return the pid
*/
public String getPid() {
return this.pid;
}
/**
* Sets pid.
*
* @param pid the pid
*/
public void setPid(String pid) {
this.pid = pid;
}
/**
* Gets sub biz type.
*
* @return the sub biz type
*/
public String getSubBizType() {
return this.subBizType;
}
/**
* Sets sub biz type.
*
* @param subBizType the sub biz type
*/
public void setSubBizType(String subBizType) {
this.subBizType = subBizType;
}
/**
* Gets user identity code.
*
* @return the user identity code
*/
public String getUserIdentityCode() {
return this.userIdentityCode;
}
/**
* Sets user identity code.
*
* @param userIdentityCode the user identity code
*/
public void setUserIdentityCode(String userIdentityCode) {
this.userIdentityCode = userIdentityCode;
}
}
|
[
"hanley@thlws.com"
] |
hanley@thlws.com
|
6c8ebc179f9eb0a43e970b520425350af9f6d552
|
5d69d80b9f723eaacf5bebd7e7745c6b842d68e8
|
/src/com/c/conditional/practise/HLabelledForLoop1.java
|
0e813f09bbe30f45307da1f64fa1a1f6f1e829a6
|
[] |
no_license
|
Bishnu-KC/ChapterWise
|
0c06423393316fed91fa7ac6bb17b4c2dfea834c
|
079e39091a91878ecde97d6364b71e1a7240e35d
|
refs/heads/master
| 2020-03-28T16:28:16.819773
| 2018-09-13T21:11:00
| 2018-09-13T21:11:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 339
|
java
|
package com.c.conditional.practise;
public class HLabelledForLoop1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
aa:
for(int i=1;i<=3;i++)
{
bb:
for(int j=1;j<=3;j++)
{
if(i==2&&j==2)
{
break aa;
}
System.out.println(i+" "+j);
}
}
}
}
|
[
"kcbishnu8@outlook.com"
] |
kcbishnu8@outlook.com
|
33039b27a109f9aa14b11addbeda8e0661391f2f
|
67248f18aac7a54ed850133fa63452135e54a92d
|
/src/main/java/tp/langage/v8/divers/Java7TestApp.java
|
9ce32199b481400d21b0bfce12a86c5effa2d56c
|
[] |
no_license
|
didier-mycontrib/java-lang-jdbc
|
503d4fe2d774a8276030cc6a5740b4a026ad5b27
|
f978c47770624ea24cea6453ff50e79905d1649a
|
refs/heads/master
| 2021-01-18T21:42:09.093197
| 2020-09-17T19:56:04
| 2020-09-17T19:56:04
| 28,233,797
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 474
|
java
|
package tp.langage.v8.divers;
public class Java7TestApp {
private String message="Hello World";
public static void main(String[] args) {
(new Java7TestApp()).testRun();
}
public void testRun(){
//classe anonyme imbriquée pouvant acceder à la variable d'instance "message" du niveau englobant
Runnable r1 = new Runnable(){
@Override
public void run() {
System.out.println(message);
}
};
Thread t1 = new Thread(r1); t1.start();
}
}
|
[
"didier@d-defrance.fr"
] |
didier@d-defrance.fr
|
c82765c3a26621723169a39d3ae2e5bc7a924e02
|
7b12f67da8c10785efaebe313547a15543a39c77
|
/jjg-security-core/src/main/java/com/xdl/jjg/social/weixinapp/connect/WeixinAppOauth2Template.java
|
78ca421c999d5a9c32b06d185acb377b56020cbb
|
[] |
no_license
|
liujinguo1994/xdl-jjg
|
071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8
|
051da0a0dba18e6e5021ecb4ef3debca16b01a93
|
refs/heads/master
| 2023-01-06T09:11:30.487559
| 2020-11-06T14:42:45
| 2020-11-06T14:42:45
| 299,525,315
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,726
|
java
|
package com.xdl.jjg.social.weixinapp.connect;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.xdl.jjg.social.weixin.connect.WeixinAccessGrant;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.social.oauth2.AccessGrant;
import org.springframework.social.oauth2.OAuth2Parameters;
import org.springframework.social.oauth2.OAuth2Template;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import java.nio.charset.Charset;
import java.util.Map;
/**
* @author qiushi
* @version 1.0
* @date 2019/8/12 9:49
*/
public class WeixinAppOauth2Template extends OAuth2Template {
private Logger logger = LoggerFactory.getLogger(getClass());
/**
* appId
*/
private String clientId;
/**
* appSecurity
*/
private String clientSecret;
/**
* 获取access_token的微信地址
*/
private String accessTokenUrl;
private static final String REFRESH_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/refresh_token";
/**
* 向微信发送Oauth2请求
*
* @param clientId
* @param clientSecret
* @param authorizeUrl
* @param accessTokenUrl
*/
public WeixinAppOauth2Template(String clientId, String clientSecret, String authorizeUrl, String accessTokenUrl) {
super(clientId, clientSecret, authorizeUrl, accessTokenUrl);
//此项标识为true,发送请求的时候才会携带client_id(appId)和client_secret(appSecret)源码org.springframework.social.oauth2.OAuth2Template 134
setUseParametersForClientAuthentication(true);
this.clientId = clientId;
this.clientSecret = clientSecret;
this.accessTokenUrl = accessTokenUrl;
}
/**
* 封装用于获取微信access_token地址
*
* @param authorizationCode
* @param redirectUri
* @param additionalParameters
* @return
*/
@Override
public AccessGrant exchangeForAccess(String authorizationCode, String redirectUri, MultiValueMap<String, String> additionalParameters) {
StringBuilder accessTokenRequestUrl = new StringBuilder(accessTokenUrl);
accessTokenRequestUrl.append("?appid=" + clientId);
accessTokenRequestUrl.append("&secret=" + clientSecret);
accessTokenRequestUrl.append("&code=" + authorizationCode);
accessTokenRequestUrl.append("&grant_type=authorization_code");
accessTokenRequestUrl.append("&redirect_uri=" + redirectUri);
return getAccessToken(accessTokenRequestUrl);
}
@Override
public AccessGrant refreshAccess(String refreshToken, MultiValueMap<String, String> additionalParameters) {
StringBuilder refreshTokenUrl = new StringBuilder(REFRESH_TOKEN_URL);
refreshTokenUrl.append("?appid=" + clientId);
refreshTokenUrl.append("&grant_type=refresh_token");
refreshTokenUrl.append("&refresh_token=" + refreshToken);
return getAccessToken(refreshTokenUrl);
}
/**
* 构建获取授权码的请求,也就是引导用户跳转到微信的地址
*
* @param parameters
* @return
*/
@Override
public String buildAuthenticateUrl(OAuth2Parameters parameters) {
String url = super.buildAuthenticateUrl(parameters);
url = url + "&appid=" + clientId + "&scope=snsapi_userinfo#wechat_redirect";
return url;
}
@Override
public String buildAuthorizeUrl(OAuth2Parameters parameters) {
return super.buildAuthorizeUrl(parameters);
}
/**
* 微信返回的contentType是html/text,添加相应的HttpMessageConverter来处理。
*
* @return
*/
@Override
protected RestTemplate createRestTemplate() {
RestTemplate restTemplate = super.createRestTemplate();
restTemplate.getMessageConverters().add(new StringHttpMessageConverter(Charset.forName("UTF-8")));
return restTemplate;
}
@SuppressWarnings("unchecked")
private AccessGrant getAccessToken(StringBuilder accessTokenRequestUrl) {
logger.info("获取access_token, 请求URL: " + accessTokenRequestUrl.toString());
String response = getRestTemplate().getForObject(accessTokenRequestUrl.toString(), String.class);
logger.info("获取access_token, 响应内容: " + response);
Map<String, Object> result = null;
try {
//将返回的结果转换成map对象
result = new ObjectMapper().readValue(response, Map.class);
} catch (Exception e) {
e.printStackTrace();
}
//返回错误码时直接返回空
if (StringUtils.isNotBlank(MapUtils.getString(result, "errcode"))) {
String errcode = MapUtils.getString(result, "errcode");
String errmsg = MapUtils.getString(result, "errmsg");
throw new RuntimeException("获取access token失败, errcode:" + errcode + ", errmsg:" + errmsg);
}
WeixinAccessGrant accessToken = new WeixinAccessGrant(
MapUtils.getString(result, "access_token"),
MapUtils.getString(result, "scope"),
MapUtils.getString(result, "refresh_token"),
MapUtils.getLong(result, "expires_in"));
accessToken.setOpenId(MapUtils.getString(result, "openid"));
return accessToken;
}
}
|
[
"344009799@qq.com"
] |
344009799@qq.com
|
adb3de197b901d992015a89a3a63cc605733306e
|
aae206f830163b2653d06e942482fed9a567a00d
|
/mvc03/src/com/bit/mvc03/utils/Test.java
|
dd3e69521b2c01bcfe835930e87e5913ee9c0ade
|
[] |
no_license
|
bit01class/web2020
|
1b0ced204ad0cf2fda2d115454b3402e4a016977
|
ce334e7dffe2145021c5a206b8362d2c505080d1
|
refs/heads/master
| 2020-09-30T10:22:03.835003
| 2020-01-10T08:54:22
| 2020-01-10T08:54:22
| 227,268,650
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 259
|
java
|
package com.bit.mvc03.utils;
import java.lang.reflect.AnnotatedType;
public class Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
AnnotatedType[] anno = JavaBean.class.getAnnotatedInterfaces();
}
}
|
[
"bit01class@gmail.com"
] |
bit01class@gmail.com
|
285cf777af69d767e5b91fac612afbabf36814e9
|
5ef0b4d230dc5243225d149efb44cdcdd2ffea9d
|
/trunk/JSnoopy/src/jsnoopy/parser/Token.java
|
79e9c3fb8d1f04ec0d193290a5f0d2cbf1d2e8ed
|
[] |
no_license
|
kai-zhu/the-teaching-machine-and-webwriter
|
3d3b3dfdecd61e0fb2146b44c42d6467489fd94f
|
67adf8f41bb475108c285eb0894906cb0878849c
|
refs/heads/master
| 2021-01-16T20:47:55.620437
| 2016-05-23T12:38:03
| 2016-05-23T12:38:12
| 61,149,759
| 1
| 0
| null | 2016-06-14T19:22:57
| 2016-06-14T19:22:57
| null |
UTF-8
|
Java
| false
| false
| 2,749
|
java
|
/* Generated By:JavaCC: Do not edit this line. Token.java Version 2.1 */
package jsnoopy.parser ;
/**
* Describes the input token stream.
*/
public class Token {
/**
* An integer that describes the kind of this token. This numbering
* system is determined by JavaCCParser, and a table of these numbers is
* stored in the file ...Constants.java.
*/
public int kind;
/**
* beginLine and beginColumn describe the position of the first character
* of this token; endLine and endColumn describe the position of the
* last character of this token.
*/
public int beginLine, beginColumn, endLine, endColumn;
/**
* The string image of the token.
*/
public String image;
/**
* A reference to the next regular (non-special) token from the input
* stream. If this is the last token from the input stream, or if the
* token manager has not read tokens beyond this one, this field is
* set to null. This is true only if this token is also a regular
* token. Otherwise, see below for a description of the contents of
* this field.
*/
public Token next;
/**
* This field is used to access special tokens that occur prior to this
* token, but after the immediately preceding regular (non-special) token.
* If there are no such special tokens, this field is set to null.
* When there are more than one such special token, this field refers
* to the last of these special tokens, which in turn refers to the next
* previous special token through its specialToken field, and so on
* until the first special token (whose specialToken field is null).
* The next fields of special tokens refer to other special tokens that
* immediately follow it (without an intervening regular token). If there
* is no such token, this field is null.
*/
public Token specialToken;
/**
* Returns the image.
*/
public final String toString()
{
return image;
}
/**
* Returns a new Token object, by default. However, if you want, you
* can create and return subclass objects based on the value of ofKind.
* Simply add the cases to the switch for all those special cases.
* For example, if you have a subclass of Token called IDToken that
* you want to create if ofKind is ID, simlpy add something like :
*
* case MyParserConstants.ID : return new IDToken();
*
* to the following switch statement. Then you can cast matchedToken
* variable to the appropriate type and use it in your lexical actions.
*/
public static final Token newToken(int ofKind)
{
switch(ofKind)
{
default : return new Token();
}
}
}
|
[
"theodore.norvell@gmail.com"
] |
theodore.norvell@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.