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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
741c5a3822ae5388ac1865efed6fe922fe55d7cd
|
235d06d08187ae4af8c073e39c74572eff4a3afa
|
/java-e-jpa-ii/src/main/java/br/com/cmdev/javaejpaii/tests/TesteCriteria.java
|
6bdcf6974d4c298a42a8a29c166fb63bfbe308af
|
[] |
no_license
|
calixtomacedo/alura-formacao-spring-framework
|
9e56aff574c7ab2e417ef15cbbf42bf10dadbca6
|
4a85223f9c143997d093433f0c909bc297513647
|
refs/heads/master
| 2023-07-14T14:06:14.532558
| 2021-08-19T03:13:10
| 2021-08-19T03:13:10
| 384,835,010
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,709
|
java
|
package br.com.cmdev.javaejpaii.tests;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import javax.persistence.EntityManager;
import br.com.cmdev.javaejpaii.dao.CategoriaDAO;
import br.com.cmdev.javaejpaii.dao.ProdutoDAO;
import br.com.cmdev.javaejpaii.model.Categoria;
import br.com.cmdev.javaejpaii.model.Produto;
import br.com.cmdev.javaejpaii.utils.JPAUtil;
public class TesteCriteria {
public static void main(String[] args) {
popularBancoDeDados();
EntityManager em = JPAUtil.getEntityManager();
ProdutoDAO produtoDAO = new ProdutoDAO(em);
List<Produto> produtos = produtoDAO.buscarProdutoComCriteria(null, null, LocalDateTime.now());
produtos.forEach(p -> System.out.println(p.getNome()));
}
private static void popularBancoDeDados() {
Categoria celulares = new Categoria("CELULARES");
Categoria videogames = new Categoria("VIDEOGAMES");
Categoria informatica = new Categoria("INFORMATICA");
Produto celular = new Produto("Xiaomi Redmi", "Muito legal", new BigDecimal("800"), celulares);
Produto videogame = new Produto("PS5", "Playstation 5", new BigDecimal("8000"), videogames);
Produto macbook = new Produto("Macbook", "Macboo pro retina", new BigDecimal("14000"), informatica);
EntityManager em = JPAUtil.getEntityManager();
ProdutoDAO produtoDAO = new ProdutoDAO(em);
CategoriaDAO categoriaDAO = new CategoriaDAO(em);
em.getTransaction().begin();
categoriaDAO.cadastrar(celulares);
categoriaDAO.cadastrar(videogames);
categoriaDAO.cadastrar(informatica);
produtoDAO.cadastrar(celular);
produtoDAO.cadastrar(videogame);
produtoDAO.cadastrar(macbook);
em.getTransaction().commit();
em.close();
}
}
|
[
"calixto.macedo@gmail.com"
] |
calixto.macedo@gmail.com
|
8c31ef66ca63f241bb949744241512ec63e884f4
|
2ebca69e016eeb9e218b3172930e8b80ed86ca40
|
/spring-functionaltest-web/src/main/java/jp/co/ntt/fw/spring/functionaltest/app/aply/LoggingIpAddressFilter.java
|
efbf9daa392a7368f56c09cb92eecf999a40ea3d
|
[] |
no_license
|
btkatoutmj/spring-functionaltest
|
ca1dd65dac88ca16e7fd436e731d05ee8fd931fa
|
7dd1337592dbc2482d33d48d900122f967ce47a3
|
refs/heads/master
| 2021-01-24T05:05:28.438345
| 2017-05-30T09:31:20
| 2017-06-12T00:57:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,105
|
java
|
/*
* Copyright(c) 2014-2017 NTT Corporation.
*/
package jp.co.ntt.fw.spring.functionaltest.app.aply;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.filter.OncePerRequestFilter;
public class LoggingIpAddressFilter extends OncePerRequestFilter {
private static final Logger logger = LoggerFactory
.getLogger(LoggingIpAddressFilter.class);
private static final String ATTRIBUTE_NAME = "X-Forwarded-For";
protected final void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
String remoteIp = request.getHeader(ATTRIBUTE_NAME);
if (remoteIp == null) {
remoteIp = request.getRemoteAddr();
}
logger.info("Client IP Adress:{}", remoteIp);
filterChain.doFilter(request, response);
}
}
|
[
"takuya.iwatsuka@gmail.com"
] |
takuya.iwatsuka@gmail.com
|
17b18977d9b142e61a00d656fd995345449f834d
|
08c5675ad0985859d12386ca3be0b1a84cc80a56
|
/src/main/java/com/sun/corba/se/PortableActivationIDL/InvalidORBidHelper.java
|
0d8039f3a0cbc4144f159fee6db21de9ec268270
|
[] |
no_license
|
ytempest/jdk1.8-analysis
|
1e5ff386ed6849ea120f66ca14f1769a9603d5a7
|
73f029efce2b0c5eaf8fe08ee8e70136dcee14f7
|
refs/heads/master
| 2023-03-18T04:37:52.530208
| 2021-03-09T02:51:16
| 2021-03-09T02:51:16
| 345,863,779
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,515
|
java
|
package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/InvalidORBidHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u60/4407/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Tuesday, August 4, 2015 11:07:52 AM PDT
*/
abstract public class InvalidORBidHelper {
private static String _id = "IDL:PortableActivationIDL/InvalidORBid:1.0";
public static void insert(org.omg.CORBA.Any a, com.sun.corba.se.PortableActivationIDL.InvalidORBid that) {
org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
a.type(type());
write(out, that);
a.read_value(out.create_input_stream(), type());
}
public static com.sun.corba.se.PortableActivationIDL.InvalidORBid extract(org.omg.CORBA.Any a) {
return read(a.create_input_stream());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type() {
if (__typeCode == null) {
synchronized (org.omg.CORBA.TypeCode.class) {
if (__typeCode == null) {
if (__active) {
return org.omg.CORBA.ORB.init().create_recursive_tc(_id);
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
__typeCode = org.omg.CORBA.ORB.init().create_exception_tc(com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.id(), "InvalidORBid", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id() {
return _id;
}
public static com.sun.corba.se.PortableActivationIDL.InvalidORBid read(org.omg.CORBA.portable.InputStream istream) {
com.sun.corba.se.PortableActivationIDL.InvalidORBid value = new com.sun.corba.se.PortableActivationIDL.InvalidORBid();
// read and discard the repository ID
istream.read_string();
return value;
}
public static void write(org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.PortableActivationIDL.InvalidORBid value) {
// write the repository ID
ostream.write_string(id());
}
}
|
[
"787491096@qq.com"
] |
787491096@qq.com
|
eadea9df3eb5e4f10239cdda77d52d66e7834cf1
|
0054a5e800e5a67dad19346af8034b25a12e12ef
|
/src/com/julyerr/leetcode/dynamic/LongestPalindromicSubsequence.java
|
f2704e2c55216b30a0732892c0e35b9b00f6cb01
|
[] |
no_license
|
julyerr/algo
|
3cd75afc7b660c3942975759582029f794af5d75
|
f05de5ff57e4696e87d63e53f3ffc5b09433ee99
|
refs/heads/master
| 2021-05-12T12:50:20.231013
| 2018-10-05T09:08:11
| 2018-10-05T09:08:11
| 117,422,528
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 866
|
java
|
package com.julyerr.leetcode.dynamic;
/*
* 参考资料:https://blog.csdn.net/geekmanong/article/details/51056375
* */
public class LongestPalindromicSubsequence {
public int longestPalindromeSubseq(String s) {
if (s == null || s.length() == 0) {
return 0;
}
int n = s.length();
int[][] dp = new int[n][n];
for (int i = 0; i < n; i++) {
dp[i][i] = 1;
}
for (int i = 1; i < n; i++) {
for (int j = 0; j + i < n; j++) {
int tmp = 0;
if (s.charAt(j) == s.charAt(j + i)) {
tmp = dp[j + 1][j + i - 1] + 2;
} else {
tmp = Math.max(dp[j + 1][j + i], dp[j][i + j - 1]);
}
dp[j][i + j] = tmp;
}
}
return dp[0][n - 1];
}
}
|
[
"julyerr.test@gmail.com"
] |
julyerr.test@gmail.com
|
737fdbaa61077f794a4ce2f0e9536a0c82b422e7
|
19a5dda09353f63131f3aa6124d764ded28a527b
|
/app/src/main/java/com/mynews/model/blog/ModelBlog.java
|
fc2939f79e64e632ed7af1b81b20897a77dc7de2
|
[] |
no_license
|
tsfapps/MyNews
|
b841f101e8401c3a2d179e08c54559d76b086b6d
|
49b15ca1cc3a26970d2c768b3dc11afb534afb0c
|
refs/heads/master
| 2020-05-02T07:26:40.591111
| 2019-03-26T15:35:16
| 2019-03-26T15:35:16
| 177,818,168
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 878
|
java
|
package com.mynews.model.blog;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class ModelBlog {
@SerializedName("status")
@Expose
private String status;
@SerializedName("message")
@Expose
private String message;
@SerializedName("response")
@Expose
private List<BlogResponse> response = null;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public List<BlogResponse> getResponse() {
return response;
}
public void setResponse(List<BlogResponse> response) {
this.response = response;
}
}
|
[
"appslelo.com@gmail.com"
] |
appslelo.com@gmail.com
|
c7369667a57bfe144b80f2af5bb38ab12cd3fe13
|
e5a1601564d7ab9a8b2be05a1bbfc75cf90aaacc
|
/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/provider/DefaultAuthorizationRequestFactory.java
|
dd49f9e0847afe0fd41e6d4ad325f19fe286a09e
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
aniXification/spring-security-oauth
|
ce439612e73a3c2badf04593e64cfacfcd297bbf
|
d876a66a1b624a9a2c9c861636c86361a334a5f9
|
refs/heads/master
| 2021-01-24T01:11:56.433932
| 2012-05-18T17:56:26
| 2012-05-25T00:47:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,958
|
java
|
/*
* Copyright 2006-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.springframework.security.oauth2.provider;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import org.springframework.security.oauth2.common.exceptions.InvalidGrantException;
import org.springframework.security.oauth2.common.exceptions.InvalidScopeException;
/**
* Default implementation of {@link AuthorizationRequestFactory} which validates grant types and scopes and fills in
* scopes with the default values from the client if they are missing.
*
* @author Dave Syer
*
*/
public class DefaultAuthorizationRequestFactory implements AuthorizationRequestFactory {
private final ClientDetailsService clientDetailsService;
public DefaultAuthorizationRequestFactory(ClientDetailsService clientDetailsService) {
this.clientDetailsService = clientDetailsService;
}
public AuthorizationRequest createAuthorizationRequest(Map<String, String> parameters, String clientId, String grantType, Set<String> scopes) {
ClientDetails clientDetails = clientDetailsService.loadClientByClientId(clientId);
validateGrantType(grantType, clientDetails);
if (scopes != null) {
validateScope(clientDetails, scopes);
}
if (scopes == null || scopes.isEmpty()) {
// If no scopes are specified in the incoming data, use the default values registered with the client
// (the spec allows us to choose between this option and rejecting the request completely, so we'll take the
// least obnoxious choice as a default).
scopes = clientDetails.getScope();
}
return new AuthorizationRequest(clientId, scopes, clientDetails.getAuthorities(),
clientDetails.getResourceIds());
}
private void validateScope(ClientDetails clientDetails, Set<String> scopes) {
if (clientDetails.isScoped()) {
Set<String> validScope = clientDetails.getScope();
for (String scope : scopes) {
if (!validScope.contains(scope)) {
throw new InvalidScopeException("Invalid scope: " + scope, validScope);
}
}
}
}
private void validateGrantType(String grantType, ClientDetails clientDetails) {
Collection<String> authorizedGrantTypes = clientDetails.getAuthorizedGrantTypes();
if (authorizedGrantTypes != null && !authorizedGrantTypes.isEmpty()
&& !authorizedGrantTypes.contains(grantType)) {
throw new InvalidGrantException("Unauthorized grant type: " + grantType);
}
}
}
|
[
"dsyer@vmware.com"
] |
dsyer@vmware.com
|
dbc36cfb556bd6371e2a36ba487dcf083a0cc61c
|
376259e37dc1a387ea30497b28768bf31c98b9bc
|
/herddb-jdbc/src/main/java/herddb/jdbc/Driver.java
|
85a78bb452683dd43a817cdb2117f474980fda60
|
[
"Apache-2.0"
] |
permissive
|
mino181295/herddb
|
967ad5f3eecb80ecf888b22e84ad936b3e829a9f
|
e65ef6badd817ed005a5fdefb0d152841748ff0a
|
refs/heads/master
| 2021-07-24T20:26:13.459184
| 2017-10-30T14:42:41
| 2017-10-30T14:42:41
| 109,666,389
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,448
|
java
|
/*
Licensed to Diennea S.r.l. under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. Diennea S.r.l. 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 herddb.jdbc;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.DriverPropertyInfo;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.HashMap;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* JDBC Driver
*
* @author enrico.olivelli
*/
@SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE")
public class Driver implements java.sql.Driver, AutoCloseable {
private static final Logger LOG = Logger.getLogger(Driver.class.getName());
private static final Driver INSTANCE = new Driver();
static {
try {
DriverManager.registerDriver(INSTANCE, () -> {
INSTANCE.close();
});
} catch (SQLException error) {
LOG.log(Level.SEVERE, "error while registring JDBC driver:" + error, error);
}
}
public Driver() {
}
private final HashMap<String, HerdDBEmbeddedDataSource> datasources = new HashMap<>();
@Override
public Connection connect(String url, Properties info) throws SQLException {
HerdDBEmbeddedDataSource datasource = ensureDatasource(url, info);
return datasource.getConnection();
}
@Override
public boolean acceptsURL(String url) throws SQLException {
return url != null && url.startsWith("jdbc:herddb:");
}
@Override
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException {
return new DriverPropertyInfo[0];
}
@Override
public int getMajorVersion() {
return 0;
}
@Override
public int getMinorVersion() {
return 0;
}
@Override
public boolean jdbcCompliant() {
return false;
}
@Override
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
return LOG;
}
private synchronized HerdDBEmbeddedDataSource ensureDatasource(String url, Properties info) {
String key = url + "_" + info;
HerdDBEmbeddedDataSource ds = datasources.get(key);
if (ds != null) {
return ds;
}
/**
* DriverManager puts username/password in 'user' and 'password' properties
*/
ds = new HerdDBEmbeddedDataSource(info);
ds.setUrl(url);
datasources.put(key, ds);
return ds;
}
@Override
public synchronized void close() {
LOG.log(Level.SEVERE, "Unregistering HerdDB JDBC Driver");
datasources.values().forEach(BasicHerdDBDataSource::close);
datasources.clear();
}
}
|
[
"eolivelli@gmail.com"
] |
eolivelli@gmail.com
|
c84c0b32c3dee9c7766ec29fe722da10e593e984
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/LANG-19b-1-10-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang3/text/translate/NumericEntityUnescaper_ESTest.java
|
bb3559d6532f20042139edf208ade72d60c2d3cb
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,294
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jan 19 18:44:40 UTC 2020
*/
package org.apache.commons.lang3.text.translate;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.io.StringWriter;
import java.nio.CharBuffer;
import org.apache.commons.lang3.text.translate.NumericEntityUnescaper;
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 NumericEntityUnescaper_ESTest extends NumericEntityUnescaper_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
NumericEntityUnescaper numericEntityUnescaper0 = new NumericEntityUnescaper();
char[] charArray0 = new char[7];
charArray0[3] = '&';
charArray0[4] = '#';
StringWriter stringWriter0 = new StringWriter(255);
CharBuffer charBuffer0 = CharBuffer.wrap(charArray0);
StringWriter stringWriter1 = stringWriter0.append((CharSequence) charBuffer0);
StringBuffer stringBuffer0 = stringWriter1.getBuffer();
// Undeclared exception!
numericEntityUnescaper0.translate((CharSequence) stringBuffer0);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
6ae8f32a55629fa808071a5112de59a3042a5731
|
405c4a2aa91c27b271d2d71f2248f9b1cd14ceba
|
/module-mine/src/main/java/com/gcml/module_mine/FeedbackActivity.java
|
c43bb165d47213790d48aec0be8c6bf46f81ddbc
|
[] |
no_license
|
henrycoding/HealthDoctor
|
c0b52b093b26c3ff75bb88456650e22fb8563fcd
|
e7a4201805d190895a2621c1189ddada16dd162f
|
refs/heads/master
| 2023-03-17T03:47:25.312634
| 2019-07-20T02:50:41
| 2019-07-20T02:50:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,155
|
java
|
package com.gcml.module_mine;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.gzq.lib_core.base.Box;
import com.gzq.lib_core.utils.ToastUtils;
import com.gzq.lib_resource.mvp.StateBaseActivity;
import com.gzq.lib_resource.mvp.base.BasePresenter;
import com.gzq.lib_resource.mvp.base.IPresenter;
import com.sjtu.yifei.annotation.Route;
@Route(path = "/mine/feedback")
public class FeedbackActivity extends StateBaseActivity {
/**
* 亲,我们非常重视您给我们提出的宝贵建议,帮助我们不断完善产品,谢谢
*/
private EditText mEtContent;
/**
* 0/200
*/
private TextView mTvContentLength;
/**
* 填写您的手机或邮箱
*/
private EditText mEtEmail;
@Override
public int layoutId(Bundle savedInstanceState) {
return R.layout.activity_feedback;
}
@Override
protected boolean isBackgroundF8F8F8() {
return true;
}
@Override
public void initParams(Intent intentArgument, Bundle bundleArgument) {
}
@Override
public void initView() {
showSuccess();
mTvTitle.setText("意见反馈");
mLlRight.setVisibility(View.VISIBLE);
mIvRight.setVisibility(View.GONE);
mTvRight.setText("写好了");
mTvRight.setTextColor(Box.getColor(R.color.colorAccent));
mEtContent = (EditText) findViewById(R.id.et_content);
mTvContentLength = (TextView) findViewById(R.id.tv_content_length);
mEtEmail = (EditText) findViewById(R.id.et_email);
}
@Override
protected void clickToolbarRight() {
ToastUtils.showShort("写好了");
}
@Override
public IPresenter obtainPresenter() {
return new BasePresenter(this) {
@Override
public void preData(Object... objects) {
}
@Override
public void refreshData(Object... objects) {
}
@Override
public void loadMoreData(Object... objects) {
}
};
}
}
|
[
"774550196@qq.com"
] |
774550196@qq.com
|
5bfa8a1fbcbb5cbdfa4908f4185e0f446f828c3e
|
66879fb5e25987ec0374f05445859c3069c47290
|
/src/main/java/com/hs3/dao/article/MessageContentDao.java
|
77fbff8c4d129044731e98bfdd559edc15fb8804
|
[] |
no_license
|
wangpiju/java-kernal
|
0aceb90aa7705e18175a660fa64fa8f3b998779b
|
17ef494cc4a1a3f86013f0330642d76965fc502c
|
refs/heads/master
| 2020-04-01T09:18:18.310531
| 2018-10-15T07:20:51
| 2018-10-15T07:20:51
| 153,069,500
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,197
|
java
|
package com.hs3.dao.article;
import com.hs3.dao.BaseDao;
import com.hs3.db.DbSession;
import com.hs3.db.Page;
import com.hs3.entity.article.MessageContent;
import com.hs3.utils.StrUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository("messageContentDao")
public class MessageContentDao
extends BaseDao<MessageContent> {
public List<MessageContent> listByCond(MessageContent m, Date startTime, Date endTime, Page page) {
String sql = "SELECT * FROM t_message_content WHERE 1 = 1";
List<Object> cond = new ArrayList();
if (m.getId() != null) {
sql = sql + " AND id = ?";
cond.add(m.getId());
}
if (m.getMessageId() != null) {
sql = sql + " AND messageId = ?";
cond.add(m.getMessageId());
}
if (!StrUtils.hasEmpty(new Object[]{m.getSender()})) {
sql = sql + " AND sender = ?";
cond.add(m.getSender());
}
if (!StrUtils.hasEmpty(new Object[]{m.getRever()})) {
sql = sql + " AND rever = ?";
cond.add(m.getRever());
}
if (!StrUtils.hasEmpty(new Object[]{m.getContent()})) {
sql = sql + " AND content = ?";
cond.add(m.getContent());
}
if (startTime != null) {
sql = sql + " AND createTime >= ?";
cond.add(startTime);
}
if (endTime != null) {
sql = sql + " AND createTime <= ?";
cond.add(endTime);
}
sql = sql + " ORDER BY id";
return this.dbSession.list(sql, cond.toArray(new Object[cond.size()]), this.cls, page);
}
public void save(MessageContent m) {
saveAuto(m);
}
public int update(MessageContent m) {
return updateByIdAuto(m, m.getId());
}
protected String[] getColumns() {
return new String[]{"messageId", "sender", "rever", "content", "createTime"};
}
protected Object[] getValues(MessageContent m) {
return new Object[]{m.getMessageId(), m.getSender(), m.getRever(), m.getContent(), m.getCreateTime()};
}
}
|
[
"wangpiju0420@gmail.com"
] |
wangpiju0420@gmail.com
|
4ed533399adb31763d870a2726f901ef154e3c9d
|
ddfb3a710952bf5260dfecaaea7d515526f92ebb
|
/build/tmp/expandedArchives/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-sources.jar_c582e790131b6dd3325b282fce9d2d3d/net/minecraftforge/common/BiomeManager.java
|
733f6bc2935c60d21fd958a5a18a3b486a163d88
|
[
"Apache-2.0"
] |
permissive
|
TheDarkRob/Sgeorsge
|
88e7e39571127ff3b14125620a6594beba509bd9
|
307a675cd3af5905504e34717e4f853b2943ba7b
|
refs/heads/master
| 2022-11-25T06:26:50.730098
| 2020-08-03T15:42:23
| 2020-08-03T15:42:23
| 284,748,579
| 0
| 0
|
Apache-2.0
| 2020-08-03T16:19:36
| 2020-08-03T16:19:35
| null |
UTF-8
|
Java
| false
| false
| 6,566
|
java
|
/*
* Minecraft Forge
* Copyright (c) 2016-2019.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.common;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.google.common.collect.ImmutableList;
import net.minecraft.world.biome.Biomes;
import net.minecraft.util.WeightedRandom;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.provider.BiomeProvider;
import javax.annotation.Nullable;
public class BiomeManager
{
private static TrackedList<BiomeEntry>[] biomes = setupBiomes();
public static List<Biome> oceanBiomes = new ArrayList<Biome>();
static
{
oceanBiomes.add(Biomes.OCEAN);
oceanBiomes.add(Biomes.DEEP_OCEAN);
oceanBiomes.add(Biomes.FROZEN_OCEAN);
}
private static TrackedList<BiomeEntry>[] setupBiomes()
{
@SuppressWarnings("unchecked")
TrackedList<BiomeEntry>[] currentBiomes = new TrackedList[BiomeType.values().length];
List<BiomeEntry> list = new ArrayList<BiomeEntry>();
list.add(new BiomeEntry(Biomes.FOREST, 10));
list.add(new BiomeEntry(Biomes.DARK_FOREST, 10));
list.add(new BiomeEntry(Biomes.MOUNTAINS, 10));
list.add(new BiomeEntry(Biomes.PLAINS, 10));
list.add(new BiomeEntry(Biomes.BIRCH_FOREST, 10));
list.add(new BiomeEntry(Biomes.SWAMP, 10));
currentBiomes[BiomeType.WARM.ordinal()] = new TrackedList<BiomeEntry>(list);
list.clear();
list.add(new BiomeEntry(Biomes.FOREST, 10));
list.add(new BiomeEntry(Biomes.MOUNTAINS, 10));
list.add(new BiomeEntry(Biomes.TAIGA, 10));
list.add(new BiomeEntry(Biomes.PLAINS, 10));
currentBiomes[BiomeType.COOL.ordinal()] = new TrackedList<BiomeEntry>(list);
list.clear();
list.add(new BiomeEntry(Biomes.SNOWY_TUNDRA, 30));
list.add(new BiomeEntry(Biomes.SNOWY_TAIGA, 10));
currentBiomes[BiomeType.ICY.ordinal()] = new TrackedList<BiomeEntry>(list);
list.clear();
currentBiomes[BiomeType.DESERT.ordinal()] = new TrackedList<BiomeEntry>(list);
return currentBiomes;
}
public static void addSpawnBiome(Biome biome)
{
if (!BiomeProvider.BIOMES_TO_SPAWN_IN.contains(biome))
{
BiomeProvider.BIOMES_TO_SPAWN_IN.add(biome);
}
}
public static void removeSpawnBiome(Biome biome)
{
if (BiomeProvider.BIOMES_TO_SPAWN_IN.contains(biome))
{
BiomeProvider.BIOMES_TO_SPAWN_IN.remove(biome);
}
}
public static void addBiome(BiomeType type, BiomeEntry entry)
{
int idx = type.ordinal();
List<BiomeEntry> list = idx > biomes.length ? null : biomes[idx];
if (list != null) list.add(entry);
}
public static void removeBiome(BiomeType type, BiomeEntry entry)
{
int idx = type.ordinal();
List<BiomeEntry> list = idx > biomes.length ? null : biomes[idx];
if (list != null && list.contains(entry))
{
list.remove(entry);
}
}
@Nullable
public static ImmutableList<BiomeEntry> getBiomes(BiomeType type)
{
int idx = type.ordinal();
List<BiomeEntry> list = idx >= biomes.length ? null : biomes[idx];
return list != null ? ImmutableList.copyOf(list) : null;
}
public static boolean isTypeListModded(BiomeType type)
{
int idx = type.ordinal();
TrackedList<BiomeEntry> list = idx > biomes.length ? null : biomes[idx];
if (list != null) return list.isModded();
return false;
}
public static enum BiomeType
{
DESERT, WARM, COOL, ICY;
public static BiomeType create(String name) {
return null;
}
}
public static class BiomeEntry extends WeightedRandom.Item
{
public final Biome biome;
public BiomeEntry(Biome biome, int weight)
{
super(weight);
this.biome = biome;
}
}
private static class TrackedList<E> extends ArrayList<E>
{
private static final long serialVersionUID = 1L;
private boolean isModded = false;
public TrackedList(Collection<? extends E> c)
{
super(c);
}
@Override
public E set(int index, E element)
{
isModded = true;
return super.set(index, element);
}
@Override
public boolean add(E e)
{
isModded = true;
return super.add(e);
}
@Override
public void add(int index, E element)
{
isModded = true;
super.add(index, element);
}
@Override
public E remove(int index)
{
isModded = true;
return super.remove(index);
}
@Override
public boolean remove(Object o)
{
isModded = true;
return super.remove(o);
}
@Override
public void clear()
{
isModded = true;
super.clear();
}
@Override
public boolean addAll(Collection<? extends E> c)
{
isModded = true;
return super.addAll(c);
}
@Override
public boolean addAll(int index, Collection<? extends E> c)
{
isModded = true;
return super.addAll(index, c);
}
@Override
public boolean removeAll(Collection<?> c)
{
isModded = true;
return super.removeAll(c);
}
@Override
public boolean retainAll(Collection<?> c)
{
isModded = true;
return super.retainAll(c);
}
public boolean isModded()
{
return isModded;
}
}
}
|
[
"iodiceandrea251@gmail.com"
] |
iodiceandrea251@gmail.com
|
cdd2e366edfb460c1af5294ed518aedeca1cca7c
|
4e90b1f53de6bd78063ba9c348a1e9792ac5c2cd
|
/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/V3ModifyIndicator.java
|
46eaad8993f85d5ad273bd000e243723dfec4c20
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
matt-blanchette/hapi-fhir
|
fd2c096145ed50341b50b48358a53f239f7089ef
|
0f835b5e5500e95eb6acc7f327579b37a5adcf4b
|
refs/heads/master
| 2020-12-24T10:24:36.455253
| 2016-01-20T16:50:49
| 2016-01-20T16:50:49
| 50,038,488
| 0
| 0
| null | 2016-01-20T15:18:50
| 2016-01-20T15:18:49
| null |
UTF-8
|
Java
| false
| false
| 1,580
|
java
|
package org.hl7.fhir.dstu21.model.valuesets;
import org.hl7.fhir.dstu21.exceptions.FHIRException;
public enum V3ModifyIndicator {
/**
* Modified subscription to a query server.
*/
M,
/**
* New subscription to a query server.
*/
N,
/**
* added to help the parsers
*/
NULL;
public static V3ModifyIndicator fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("M".equals(codeString))
return M;
if ("N".equals(codeString))
return N;
throw new FHIRException("Unknown V3ModifyIndicator code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case M: return "M";
case N: return "N";
default: return "?";
}
}
public String getSystem() {
return "http://hl7.org/fhir/v3/ModifyIndicator";
}
public String getDefinition() {
switch (this) {
case M: return "Modified subscription to a query server.";
case N: return "New subscription to a query server.";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case M: return "Modified subscription";
case N: return "New subscription";
default: return "?";
}
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
a7252f6b02c7a1cc3893b36ac33b1718b9ed8198
|
24586fb3d59de7174f53477ac31634e0535682a3
|
/app/src/main/java/com/jyx/android/activity/purchase/CommentListsActivity.java
|
531c9a5b3a5b0bb4e92548afb71535e9c5eea455
|
[] |
no_license
|
www586089/Borrow
|
d937d0a2002058ed48a2c85c4c9bb88d1dd0cc61
|
158ff81150091ddb1159e0db670fadd46614d420
|
refs/heads/master
| 2021-08-14T15:31:25.234957
| 2017-11-16T04:28:30
| 2017-11-16T04:28:30
| 110,715,177
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,539
|
java
|
package com.jyx.android.activity.purchase;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.google.gson.Gson;
import com.jyx.android.R;
import com.jyx.android.base.Application;
import com.jyx.android.base.BaseActivity;
import com.jyx.android.base.RecycleBaseAdapter;
import com.jyx.android.base.UserRecord;
import com.jyx.android.model.BaseEntry;
import com.jyx.android.model.ItemBean;
import com.jyx.android.model.ItemCommentDetailBean;
import com.jyx.android.model.ItemCommentParam;
import com.jyx.android.model.PublishItemResultBean;
import com.jyx.android.net.ApiManager;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import butterknife.Bind;
import butterknife.OnClick;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* Created by yiyi on 2015/11/6.
*/
public class CommentListsActivity extends BaseActivity {
private String TAG = "CommentListsActivity";
@Bind(R.id.et_commentlists_input)
EditText inputEditText;
private ItemBean itemBean = null;
@Override
protected int getActionBarTitle() {
return R.string.toolbar_title_commentlists;
}
@Override
protected int getLayoutId() {
return R.layout.activity_commentlists;
}
@Override
protected boolean hasBackButton() {
return true;
}
@Override
protected int getActionBarCustomView() {
return R.layout.toolbar_simple_title_with_right_text;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
getBundleData();
super.onCreate(savedInstanceState);
}
@Override
protected void init(Bundle savedInstanceState) {
super.init(savedInstanceState);
setActionRightText("");
}
private void getBundleData() {
Bundle bundle = getIntent().getExtras();
if (null != bundle) {
itemBean = bundle.getParcelable("item");
}
}
public String getItemId() {
return itemBean.getItem_id();
}
@OnClick(R.id.btn_commentlists_publish)
void clickPublish() {
final String inputText = inputEditText.getText().toString().trim();
if (inputText != null && inputText.length() > 0) {
ItemCommentParam xml = new ItemCommentParam();
xml.setFunction("submititemcomment");
xml.setUserid(UserRecord.getInstance().getUserId());
xml.setItemid(itemBean.getItem_id());
xml.setTheme(itemBean.getName());
xml.setContexts(inputText);
Call<BaseEntry<List<PublishItemResultBean>>> result = ApiManager.getApi().commentItem(new Gson().toJson(xml));
result.enqueue(new Callback<BaseEntry<List<PublishItemResultBean>>>() {
@Override
public void onResponse(Response<BaseEntry<List<PublishItemResultBean>>> response) {
if (null != response && response.isSuccess()) {
BaseEntry<List<PublishItemResultBean>> body = response.body();
if (0 == body.getResult()) {
Application.showToast("提交成功");
ComentListFragment fragment = (ComentListFragment) getSupportFragmentManager().findFragmentByTag("ComentListFragment");
if (null != fragment) {
Date date = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //设置时间格式
String defaultStartDate = sdf.format(calendar.getTime());
RecycleBaseAdapter adapter = fragment.getListAdapter();
ItemCommentDetailBean itemCommentDetailBean = new ItemCommentDetailBean();
itemCommentDetailBean.setNickname(UserRecord.getInstance().getNickName());
itemCommentDetailBean.setPortraituri(UserRecord.getInstance().getUserEntity().getPortraitUri());
itemCommentDetailBean.setContexts(inputText);
itemCommentDetailBean.setCreatedat(defaultStartDate);
adapter.addItem(adapter.getData().size(), itemCommentDetailBean);
fragment.getListAdapter().notifyDataSetChanged();
inputEditText.setText("");
closeInputMethod();
}
}
}
}
@Override
public void onFailure(Throwable t) {
Log.e(TAG, "Error onItemSupport.");
}
});
}
}
private void closeInputMethod() {
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
InputMethodManager m = (InputMethodManager) inputEditText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
}
}, 300);
}
}
|
[
"414929680@qq.com"
] |
414929680@qq.com
|
53371fee71282bb55059228d8c4245cc0d713601
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/com/tencent/mm/ui/BorderNumView.java
|
8f39c3bcfe964cd2f570b5f6bfc577efeff82a6c
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,918
|
java
|
package com.tencent.mm.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.util.AttributeSet;
import android.view.View;
import com.tencent.mm.platformtools.c.a;
public class BorderNumView
extends View
{
private static int tgX = 22;
private static int tgY = 105;
private static int tgZ = 100;
private Paint cN;
private Context context = null;
private int tgW = 100;
public BorderNumView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
this.context = paramContext;
init();
}
public BorderNumView(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
this.context = paramContext;
init();
}
private void init()
{
this.cN = new Paint();
}
public void onDraw(Canvas paramCanvas)
{
super.onDraw(paramCanvas);
if (this.tgW < 100) {
tgX += 15;
}
if (this.tgW >= 1000) {
tgZ -= 20;
}
float f1 = c.a.b(this.context, tgX);
float f2 = c.a.b(this.context, tgY);
String str = this.tgW;
this.cN.setAntiAlias(true);
this.cN.setTextSize(tgZ);
this.cN.setColor(-11491572);
this.cN.setStyle(Paint.Style.STROKE);
this.cN.setStrokeWidth(8.0F);
paramCanvas.drawText(str, f1, f2, this.cN);
this.cN.setTextSize(tgZ);
this.cN.setColor(-1770573);
this.cN.setStyle(Paint.Style.FILL);
this.cN.setStrokeWidth(8.0F);
paramCanvas.drawText(str, f1, f2, this.cN);
}
public void setPaintNum(int paramInt)
{
this.tgW = paramInt;
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes3-dex2jar.jar!/com/tencent/mm/ui/BorderNumView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
59a35bdc13491fd49b5f0bf55c3b0b3afc599363
|
473b76b1043df2f09214f8c335d4359d3a8151e0
|
/benchmark/bigclonebenchdata_partial/22447616.java
|
30dd9bed373c456ab4f1d29225890dbeb3ab6a8c
|
[] |
no_license
|
whatafree/JCoffee
|
08dc47f79f8369af32e755de01c52d9a8479d44c
|
fa7194635a5bd48259d325e5b0a190780a53c55f
|
refs/heads/master
| 2022-11-16T01:58:04.254688
| 2020-07-13T20:11:17
| 2020-07-13T20:11:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,628
|
java
|
class c22447616 {
public Usuario insertUsuario(IUsuario usuario) throws SQLException {
Connection conn = null;
String insert = "insert into Usuario (idusuario, nome, email, telefone, cpf, login, senha) " + "values " + "(nextval('seq_usuario'), '" + usuario.getNome() + "', '" + usuario.getEmail() + "', " + "'" + usuario.getTelefone() + "', '" + usuario.getCpf() + "', '" + usuario.getLogin() + "', '" + usuario.getSenha() + "')";
try {
conn = connectionFactory.getConnection(true);
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
Integer result = stmt.executeUpdate(insert);
if (result == 1) {
String sqlSelect = "select last_value from seq_usuario";
ResultSet rs = stmt.executeQuery(sqlSelect);
while (rs.next()) {
usuario.setIdUsuario(rs.getInt("last_value"));
}
if (usuario instanceof Requerente) {
RequerenteDAO requerenteDAO = new RequerenteDAO();
requerenteDAO.insertRequerente((Requerente) usuario, conn);
} else if (usuario instanceof RecursoHumano) {
RecursoHumanoDAO recursoHumanoDAO = new RecursoHumanoDAO();
recursoHumanoDAO.insertRecursoHumano((RecursoHumano) usuario, conn);
}
}
conn.commit();
} catch (SQLException e) {
conn.rollback();
throw e;
} finally {
conn.close();
}
return null;
}
}
|
[
"piyush16066@iiitd.ac.in"
] |
piyush16066@iiitd.ac.in
|
1f52c25f1b1edefa7cefc57074591869c1e0f558
|
d884455a9fbc20e77d72535546e6b5c455a8a4fb
|
/XLS2TXT/src/com/progdan/xls2txt/common/log/Log4JLogger.java
|
ffe10f775be666cba27dbbd41078c15fb7865dfa
|
[] |
no_license
|
maksymmykytiuk/EDMIS
|
53634f4d071829a805f58efd497eba011f4e2c03
|
4dff1ca6f68cede51ee9f6076d1641fd1c5711fd
|
refs/heads/master
| 2021-05-28T20:03:38.711307
| 2013-02-08T18:21:20
| 2013-02-08T18:21:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,217
|
java
|
/*********************************************************************
*
* Copyright (C) 2003 Andrew Khan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package com.progdan.xls2txt.common.log;
import com.progdan.logengine.*;
/**
* A logger which uses the log4j library from jakarta. Each instance
* of this class acts as a wrapper to the log4j Logger class
*/
public class Log4JLogger extends com.progdan.xls2txt.common.Logger
{
/**
* The log4j logger
*/
private Logger log4jLogger;
/**
* Default constructor. This constructor is
*/
public Log4JLogger()
{
super();
}
/**
* Constructor invoked by the getLoggerImpl method to return a logger
* for a particular class
*/
private Log4JLogger(Logger l)
{
super();
log4jLogger = l;
}
/**
* Log a debug message
*/
public void debug(Object message)
{
log4jLogger.debug(message);
}
/**
* Log a debug message and exception
*/
public void debug(Object message, Throwable t)
{
log4jLogger.debug(message, t);
}
/**
* Log an error message
*/
public void error(Object message)
{
log4jLogger.error(message);
}
/**
* Log an error message object and exception
*/
public void error(Object message, Throwable t)
{
log4jLogger.error(message, t);
}
/**
* Log a fatal message
*/
public void fatal(Object message)
{
log4jLogger.fatal(message);
}
/**
* Log a fatal message and exception
*/
public void fatal(Object message, Throwable t)
{
log4jLogger.fatal(message,t);
}
/**
* Log an information message
*/
public void info(Object message)
{
log4jLogger.info(message);
}
/**
* Logs an information message and an exception
*/
public void info(Object message, Throwable t)
{
log4jLogger.info(message, t);
}
/**
* Log a warning message object
*/
public void warn(Object message)
{
log4jLogger.warn(message);
}
/**
* Log a warning message with exception
*/
public void warn(Object message, Throwable t)
{
log4jLogger.warn(message, t);
}
/**
* Accessor to the logger implementation
*/
protected com.progdan.xls2txt.common.Logger getLoggerImpl(Class cl)
{
Logger l = Logger.getLogger(cl);
return new Log4JLogger(l);
}
}
|
[
"progdan@gmail.com"
] |
progdan@gmail.com
|
c6b3d73f61d9462d461124be87c68015f0d4e40d
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes11.dex_source_from_JADX/com/facebook/strictmode/setter/predefined/DetectAll.java
|
860d83a21eb7a00db6419860394649724745e117
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 314
|
java
|
package com.facebook.strictmode.setter.predefined;
import com.facebook.strictmode.setter.StrictModeMultiSetter;
/* compiled from: No asset for verification status */
public class DetectAll extends StrictModeMultiSetter {
public DetectAll() {
super(new ThreadDetectAll(), new VmDetectAll());
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
79308e77fc884a77193df7bbb8e0387f7ad1fdcf
|
94ee41830d69895c428f9b1e408d677f748aea61
|
/CreditCardCronJob/src/main/java/com/bcj/creditcard/entity/EmploymentDetails.java
|
40fcbc09fa806811b69d40c0241ce14dc8f3d573
|
[] |
no_license
|
sachgits/webservices
|
dd7c43e6c1e13d6f650975b6a945b8d5025c1852
|
6056f843428c2b4bd2d3e81125f456ae3e2b734f
|
refs/heads/master
| 2020-03-17T09:48:49.653788
| 2017-10-23T15:21:46
| 2017-10-23T15:21:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 701
|
java
|
package com.bcj.creditcard.entity;
public class EmploymentDetails {
private int Id;
private String CompanyName;
private float annualIncome;
@Override
public String toString() {
return "EmploymentDetails [Id=" + Id + ", CompanyName=" + CompanyName + ", annualIncome=" + annualIncome + "]";
}
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public String getCompanyName() {
return CompanyName;
}
public void setCompanyName(String companyName) {
CompanyName = companyName;
}
public float getAnnualIncome() {
return annualIncome;
}
public void setAnnualIncome(float annualIncome) {
this.annualIncome = annualIncome;
}
}
|
[
"pmutthoju.bcj@gmail.com"
] |
pmutthoju.bcj@gmail.com
|
e827bb2e708e42c8ec7282344fa1d00af3cdda9d
|
bb67511bec8421fd2ecf0d281ef4113923c8873b
|
/src/main/java/com/tencent/bugly/proguard/au.java
|
f57481ce82422e884da145173b63ad90cba0a37a
|
[] |
no_license
|
TaintBench/hummingbad_android_samp
|
5b5183737d92948fb2def5b70af8f008bf94e364
|
b7ce27e2a9f2977c11ba57144c639fa5c55dbcb5
|
refs/heads/master
| 2021-07-21T19:35:45.570627
| 2021-07-16T11:38:49
| 2021-07-16T11:38:49
| 234,354,957
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 653
|
java
|
package com.tencent.bugly.proguard;
import java.util.ArrayList;
/* compiled from: BUGLY */
public final class au extends m implements Cloneable {
static ArrayList<String> c;
public String a = "";
public ArrayList<String> b = null;
public void a(l lVar) {
lVar.a(this.a, 0);
if (this.b != null) {
lVar.a(this.b, 1);
}
}
public void a(k kVar) {
this.a = kVar.a(0, true);
if (c == null) {
c = new ArrayList();
c.add("");
}
this.b = (ArrayList) kVar.a(c, 1, false);
}
public void a(StringBuilder stringBuilder, int i) {
}
}
|
[
"malwareanalyst1@gmail.com"
] |
malwareanalyst1@gmail.com
|
772aafb703a325132e7a98d914c8b64a5ff2b079
|
d04fb21d8fac1820ab141ec1db2e58585cd7b828
|
/Module2/src/_11_map_tree/_01_practice/HashMapHashSet/Student.java
|
b8c27a270b8563d9c48adfc81b2681a9b2dd7c36
|
[] |
no_license
|
minhtuan94/C1020G1-Le-Hoang-Minh-Tuan
|
5f4830a7d8efbbc0f66262c0c0765c20dffa9f33
|
e8a6ab9228b37076594ac857dba7cee79a6f8bc0
|
refs/heads/main
| 2023-06-07T13:28:41.687609
| 2021-07-12T03:21:46
| 2021-07-12T03:21:46
| 317,453,048
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,059
|
java
|
package _11_map_tree._01_practice.HashMapHashSet;
public class Student {
private String name;
private int age;
private String address;
public Student() {
}
public Student(String name, int age, String address) {
super();
this.name = name;
this.age = age;
this.address = address;
}
public Student(int i, String nguyen_van_a) {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Override
public String toString() {
return "Student name=" + name + ",age=" + age + ",address=" + address;
}
}
|
[
"minhhoangtuan21@gmail.com"
] |
minhhoangtuan21@gmail.com
|
7e5d571174ecd0343eb7ac7bcf715e8dff436e56
|
4cd34a06cb14a5670ebae7feab52e665f3d29aa0
|
/junior1_kuangshen_case1/src/main/java/com/ryzezhao/example10/MyConfig10.java
|
3188056a898bf9749150e23e1946ace1473fdeee
|
[] |
no_license
|
Ryze-Zhao/basic-spring-framework
|
cbd684bd59eb0a15220500355737c695739a1ded
|
c6aec0a53b5fd5e1d623e91d86923ad0ef103d61
|
refs/heads/master
| 2022-04-21T21:42:07.432339
| 2020-04-24T10:01:40
| 2020-04-24T10:01:40
| 256,726,844
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 563
|
java
|
package com.ryzezhao.example10;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
//这个也会Spring容器拖管,注册到容器中,因为他本来就是一个@Component;而@Configuration代表这是一个配置类,可以类等于之前的example.xml
@Configuration
//第一种方式必须开启扫描,否则报错;第二种方式,不需要开启扫描
@ComponentScan("com.ryzezhao.example10")
public class MyConfig10 {}
|
[
"643080112@qq.com"
] |
643080112@qq.com
|
150a927b811157cd5a07f6f15afe62adc08e09c6
|
e632016a58877dfb415df7ee3e478b33837dd3dc
|
/plugins/org.polymap.core/src/org/polymap/core/runtime/Closer.java
|
6e899fe0856fd39e7f216bac5ba951af92ba5a3b
|
[] |
no_license
|
fb71/polymap4-core
|
c52575ff42fccf1349fef6701b39cb8e218094e5
|
773dc772586c297b42879d3f7ef019854ae332c3
|
refs/heads/master
| 2020-03-18T09:35:07.487139
| 2018-04-18T16:17:01
| 2018-04-18T16:17:01
| null | 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 4,306
|
java
|
/*
* polymap.org
* Copyright (C) 2015, Falko Bräutigam. All rights reserved.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 3.0 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package org.polymap.core.runtime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Callable;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Provides chained, automatic and quietly closing of {@link AutoCloseable}s.
*
* @author <a href="http://www.polymap.de">Falko Bräutigam</a>
*/
public class Closer {
private static Log log = LogFactory.getLog( Closer.class );
public static Closer with( AutoCloseable... closeables ) {
return new Closer( closeables );
}
public static Closer create() {
return new Closer( new AutoCloseable[] {} );
}
// instance *******************************************
private List<AutoCloseable> closeables = new ArrayList();
private List<Throwable> exceptions = new ArrayList();
protected Closer( AutoCloseable[] closeables ) {
this.closeables.addAll( Arrays.asList( closeables ) );
}
/**
* Runs the given Callable and {@link #close(AutoCloseable) closes} all closeables
* specified by {@link #with(AutoCloseable...)}. All exceptions thrown by the given
* code or during close are catched silently and collected internally.
*
* @see Closer#rethrowOrWrap(Class)
* @param exe The code to execute.
* @return this.
*/
public Closer runAndClose( Callable exe ) {
try {
exe.call();
}
catch (Throwable e) {
exceptions.add( e );
}
finally {
closeables.forEach( e -> close( e ) );
}
return this;
}
/**
* See {@link #runAndClose(Callable)}.
*/
public Closer runAndClose( Runnable exe ) {
return runAndClose( new Callable() {
public Object call() throws Exception {
exe.run();
return null;
}
});
}
/**
* Quietly closes the given closeable. A possible Exception during close() is not
* rethrown but catched and collected internally.
*
* @param closeable
* @return this
*/
public Closer close( AutoCloseable closeable ) {
try {
if (closeable != null) {
closeable.close();
}
}
catch (Throwable e) {
exceptions.add( e );
}
return this;
}
/**
* Quietly closes the given closeable. A possible Exception during close() is not
* rethrown but catched and collected internally.
*
* @param closeable
* @return null This allows to set a variable to null after close.
*/
public <T> T closeAndNull( AutoCloseable closeable ) {
close( closeable );
return null;
}
public <E extends Throwable> Closer rethrow( Class<E> match ) throws E {
for (Throwable e : exceptions) {
if (match.isAssignableFrom( e.getClass() )) {
throw (E)e;
}
}
return this;
}
public <E extends Throwable> Closer rethrowOrWrap( Class<E> match ) throws E {
for (Throwable e : exceptions) {
if (match.isAssignableFrom( e.getClass() )) {
throw (E)e;
}
else {
throw new RuntimeException( e );
}
}
return this;
}
/**
* Always returns null. This can be used to set a client variable to
* <code>null</code> as last step of the method chain.
*
* @return <code>null</code>.
*/
public <T> T setNull() {
return null;
}
}
|
[
"falko@polymap.de"
] |
falko@polymap.de
|
74fed9a17218b0a8d06b9ab3a404fb205333e4ef
|
f1d567b5664ba4db93b9527dbc645b76babb5501
|
/src/com/javarush/test/level27/lesson15/big01/statistic/event/VideoSelectedEventDataRow.java
|
d71d5156c8e40d37e21cc1bed4604a01515a5890
|
[] |
no_license
|
zenonwch/JavaRushEducation
|
8b619676ba7f527497b5a657b060697925cf0d8c
|
73388fd058bdd01f1673f87ab309f89f98e38fb4
|
refs/heads/master
| 2020-05-21T20:31:07.794128
| 2016-11-12T16:28:22
| 2016-11-12T16:28:22
| 65,132,378
| 8
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 871
|
java
|
package com.javarush.test.level27.lesson15.big01.statistic.event;
import com.javarush.test.level27.lesson15.big01.ad.Advertisement;
import java.util.Date;
import java.util.List;
public class VideoSelectedEventDataRow implements EventDataRow {
private List<Advertisement> optimalVideoSet;
private long amount;
private int totalDuration;
private Date currentDate;
public VideoSelectedEventDataRow(List<Advertisement> optimalVideoSet, long amount, int totalDuration) {
this.optimalVideoSet = optimalVideoSet;
this.amount = amount;
this.totalDuration = totalDuration;
this.currentDate = new Date();
}
public long getAmount() {
return amount;
}
@Override
public EventType getType() {
return EventType.SELECTED_VIDEOS;
}
@Override
public Date getDate() {
return currentDate;
}
@Override
public int getTime() {
return totalDuration;
}
}
|
[
"andrey.veshtard@ctco.lv"
] |
andrey.veshtard@ctco.lv
|
05d66b1fd71bbf443517a944b4e7043f9f1ea148
|
c7d8f5376333e89d2c4866f2e607209f297de56b
|
/app/src/main/java/com/powerleader/orcode/zxing/pdf417/decoder/Codeword.java
|
9bd0ac55b39d6a6ec2a31c4a97f56fcad8da456f
|
[] |
no_license
|
ALiSir/QRcode
|
73a19a44f04a10e8da26a0d1a9ebf95b49329ad0
|
d4f6906d389542446e3a84f464e77c8aa0508052
|
refs/heads/master
| 2022-01-12T07:23:58.643689
| 2019-05-23T07:33:41
| 2019-05-23T07:33:41
| 112,437,123
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,810
|
java
|
/*
* Copyright 2013 ZXing 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 com.powerleader.orcode.zxing.pdf417.decoder;
/**
* @author Guenther Grau
*/
final class Codeword {
private static final int BARCODE_ROW_UNKNOWN = -1;
private final int startX;
private final int endX;
private final int bucket;
private final int value;
private int rowNumber = BARCODE_ROW_UNKNOWN;
Codeword(int startX, int endX, int bucket, int value) {
this.startX = startX;
this.endX = endX;
this.bucket = bucket;
this.value = value;
}
boolean hasValidRowNumber() {
return isValidRowNumber(rowNumber);
}
boolean isValidRowNumber(int rowNumber) {
return rowNumber != BARCODE_ROW_UNKNOWN && bucket == (rowNumber % 3) * 3;
}
void setRowNumberAsRowIndicatorColumn() {
rowNumber = (value / 30) * 3 + bucket / 3;
}
int getWidth() {
return endX - startX;
}
int getStartX() {
return startX;
}
int getEndX() {
return endX;
}
int getBucket() {
return bucket;
}
int getValue() {
return value;
}
int getRowNumber() {
return rowNumber;
}
void setRowNumber(int rowNumber) {
this.rowNumber = rowNumber;
}
@Override
public String toString() {
return rowNumber + "|" + value;
}
}
|
[
"1170884598@qq.com"
] |
1170884598@qq.com
|
feb3676e06c74674a4e0ee33b0318d79cf8539ef
|
2ba3734443e2886aa4c4f649b6fbafb30bec43e0
|
/livedata/src/main/java/com/cxp/livedata/LiveDataFragment.java
|
4328073096a01d8b88ca4434688f9a689e7f30cc
|
[] |
no_license
|
cheng-peng/Lifecycle-LiveData-ViewModel-Room
|
5ee640e2c407fd1971a8584f9bc590d25c06b115
|
bdc236374398de65e8f704237d337c6eaae78dbd
|
refs/heads/master
| 2020-03-11T14:51:02.479076
| 2018-04-18T13:41:38
| 2018-04-18T13:41:38
| 130,067,096
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,192
|
java
|
package com.cxp.livedata;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProviders;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
/**
* 文 件 名: LiveDataFragment
* 创 建 人: CXP
* 创建日期: 2018-04-18 14:38
* 描 述:
* 修 改 人:
* 修改时间:
* 修改备注:
*/
public class LiveDataFragment extends Fragment {
private static final String TAG = "LiveDataFragment";
private NameViewModel mNameViewModel;
TextView mTvName;
Button bt1;
Button bt2;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mNameViewModel = ViewModelProviders.of(this).get(NameViewModel.class);
mNameViewModel.getCurrentName().observe(this, new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
mTvName.setText(s);
}
});
mNameViewModel.getNameList().observe(this, new Observer<List<String>>() {
@Override
public void onChanged(@Nullable List<String> strings) {
for (String string : strings) {
Log.e("CXP", "name:" + string);
}
}
});
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_live_data, container, false);
//初始化视图
initView(view);
return view;
}
//初始化视图
private void initView(View view) {
mTvName = view.findViewById(R.id.fragment_live_data_tv);
bt1= view.findViewById(R.id.fragment_live_data_bt1);
bt2= view.findViewById(R.id.fragment_live_data_bt2);
bt1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new Thread(new Runnable() {
@Override
public void run() {
//postValue 可以异步赋值,也可以同步赋值
mNameViewModel.getCurrentName().postValue("哈哈哈");
}
}).start();
//setValue 只能同步赋值
// mNameViewModel.getCurrentName().setValue("CXP");
}
});
bt2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
List<String> nameList = new ArrayList<>();
for (int i = 0; i < 10; i++){
nameList.add("CXP<" + i + ">");
}
mNameViewModel.getNameList().setValue(nameList);
}
});
}
}
|
[
"q978515742@163.com"
] |
q978515742@163.com
|
bddedbd5e79239b7f3212f8d66ef8a693a9aba9e
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/o/src/main/java/org.wp.o/ui/reader/ReaderBlogFragment.java
|
36bf0b063099e33df6df1e45b387709c4086bf08
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 5,730
|
java
|
package org.wp.o.ui.reader;
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.wp.o.R;
import org.wp.o.models.ReaderBlog;
import org.wp.o.models.ReaderRecommendedBlog;
import org.wp.o.ui.reader.adapters.ReaderBlogAdapter;
import org.wp.o.ui.reader.adapters.ReaderBlogAdapter.ReaderBlogType;
import org.wp.o.ui.reader.views.ReaderRecyclerView;
import org.wp.o.util.AppLog;
import org.wp.o.util.WPActivityUtils;
/*
* fragment hosted by ReaderSubsActivity which shows either recommended blogs and followed blogs
*/
public class ReaderBlogFragment extends Fragment
implements ReaderBlogAdapter.BlogClickListener {
private ReaderRecyclerView mRecyclerView;
private ReaderBlogAdapter mAdapter;
private ReaderBlogType mBlogType;
private boolean mWasPaused;
private static final String ARG_BLOG_TYPE = "blog_type";
static ReaderBlogFragment newInstance(ReaderBlogType blogType) {
AppLog.d(AppLog.T.READER, "reader blog fragment > newInstance");
Bundle args = new Bundle();
args.putSerializable(ARG_BLOG_TYPE, blogType);
ReaderBlogFragment fragment = new ReaderBlogFragment();
fragment.setArguments(args);
return fragment;
}
@Override
public void setArguments(Bundle args) {
super.setArguments(args);
restoreState(args);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
AppLog.d(AppLog.T.READER, "reader blog fragment > restoring instance state");
restoreState(savedInstanceState);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.reader_fragment_list, container, false);
mRecyclerView = (ReaderRecyclerView) view.findViewById(R.id.recycler_view);
return view;
}
private void checkEmptyView() {
if (!isAdded()) return;
TextView emptyView = (TextView) getView().findViewById(R.id.text_empty);
if (emptyView == null) return;
boolean isEmpty = hasBlogAdapter() && getBlogAdapter().isEmpty();
if (isEmpty) {
switch (getBlogType()) {
case RECOMMENDED:
emptyView.setText(R.string.reader_empty_recommended_blogs);
break;
case FOLLOWED:
emptyView.setText(R.string.reader_empty_followed_blogs_title);
break;
}
}
emptyView.setVisibility(isEmpty ? View.VISIBLE : View.GONE);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mRecyclerView.setAdapter(getBlogAdapter());
refresh();
}
@Override
public void onSaveInstanceState(Bundle outState) {
outState.putSerializable(ARG_BLOG_TYPE, getBlogType());
outState.putBoolean(ReaderConstants.KEY_WAS_PAUSED, mWasPaused);
super.onSaveInstanceState(outState);
}
private void restoreState(Bundle args) {
if (args != null) {
mWasPaused = args.getBoolean(ReaderConstants.KEY_WAS_PAUSED);
if (args.containsKey(ARG_BLOG_TYPE)) {
mBlogType = (ReaderBlogType) args.getSerializable(ARG_BLOG_TYPE);
}
}
}
@Override
public void onPause() {
super.onPause();
mWasPaused = true;
}
@Override
public void onResume() {
super.onResume();
// refresh the adapter if the fragment is resuming from a paused state so that changes
// made in another activity (such as follow state) are reflected here
if (mWasPaused) {
mWasPaused = false;
refresh();
}
}
void refresh() {
if (hasBlogAdapter()) {
AppLog.d(AppLog.T.READER, "reader subs > refreshing blog fragment " + getBlogType().name());
getBlogAdapter().refresh();
}
}
private boolean hasBlogAdapter() {
return (mAdapter != null);
}
private ReaderBlogAdapter getBlogAdapter() {
if (mAdapter == null) {
Context context = WPActivityUtils.getThemedContext(getActivity());
mAdapter = new ReaderBlogAdapter(context, getBlogType());
mAdapter.setBlogClickListener(this);
mAdapter.setDataLoadedListener(new ReaderInterfaces.DataLoadedListener() {
@Override
public void onDataLoaded(boolean isEmpty) {
checkEmptyView();
}
});
}
return mAdapter;
}
public ReaderBlogType getBlogType() {
return mBlogType;
}
@Override
public void onBlogClicked(Object item) {
long blogId;
long feedId;
if (item instanceof ReaderRecommendedBlog) {
ReaderRecommendedBlog blog = (ReaderRecommendedBlog) item;
blogId = blog.blogId;
feedId = 0;
} else if (item instanceof ReaderBlog) {
ReaderBlog blog = (ReaderBlog) item;
blogId = blog.blogId;
feedId = blog.feedId;
} else {
return;
}
if (feedId != 0) {
ReaderActivityLauncher.showReaderFeedPreview(getActivity(), feedId);
} else if (blogId != 0) {
ReaderActivityLauncher.showReaderBlogPreview(getActivity(), blogId);
}
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
8dd077d776d9c52ec5c7d8f1a97316e90d3a77c9
|
277bbcd2e3f89e885f454e6e5608e74c9ddbcc88
|
/util/src/test/java/org/xipki/common/test/ConfPairsTest.java
|
52fc19e433711a0515922fa2b5d193a821443756
|
[
"Apache-2.0"
] |
permissive
|
bartzjegr/xipki
|
ab6639b5685ce58d535afd17438fd26a5391f0b6
|
7b84bbbf469613f838b9f2e73999553079925f6f
|
refs/heads/master
| 2020-05-20T06:37:30.756036
| 2019-05-06T21:57:47
| 2019-05-06T21:57:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,660
|
java
|
/*
*
* Copyright (c) 2013 - 2019 Lijun Liao
*
* 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.xipki.common.test;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.junit.Test;
import org.xipki.util.ConfPairs;
import junit.framework.Assert;
/**
* TODO.
* @author Lijun Liao
* @since 2.0.0
*/
public class ConfPairsTest {
@Test
public void test1() {
ConfPairs pairs = new ConfPairs("key-a?", "value-a=");
pairs.putPair("key-b", "value-b");
String expEncoded = "key-a?=value-a\\=,key-b=value-b";
Map<String, String> expNameValues = new HashMap<>();
expNameValues.put("key-a?", "value-a=");
expNameValues.put("key-b", "value-b");
check(pairs, expEncoded, expNameValues);
}
@Test
public void test2() {
ConfPairs pairs = new ConfPairs("key-a=value-a");
String expEncoded = "key-a=value-a";
Map<String, String> expNameValues = new HashMap<>();
expNameValues.put("key-a", "value-a");
check(pairs, expEncoded, expNameValues);
}
@Test
public void test3() {
ConfPairs pairs = new ConfPairs("key-empty-value=");
String expEncoded = "key-empty-value=";
Map<String, String> expNameValues = new HashMap<>();
expNameValues.put("key-empty-value", "");
check(pairs, expEncoded, expNameValues);
}
@Test
public void test4() {
ConfPairs pairs = new ConfPairs("key-empty-value=,key-b=value-b");
String expEncoded = "key-b=value-b,key-empty-value=";
Map<String, String> expNameValues = new HashMap<>();
expNameValues.put("key-b", "value-b");
expNameValues.put("key-empty-value", "");
check(pairs, expEncoded, expNameValues);
}
@Test
public void test5() {
ConfPairs pairs = new ConfPairs("key-a=value-a\\,");
String expEncoded = "key-a=value-a\\,";
Map<String, String> expNameValues = new HashMap<>();
expNameValues.put("key-a", "value-a,");
check(pairs, expEncoded, expNameValues);
}
@Test
public void test6() {
ConfPairs pairs = new ConfPairs("key-a=value-a\\=\\,");
String expEncoded = "key-a=value-a\\=\\,";
Map<String, String> expNameValues = new HashMap<>();
expNameValues.put("key-a", "value-a=,");
check(pairs, expEncoded, expNameValues);
}
@Test
public void test7() {
ConfPairs pairs = new ConfPairs("key-a=value-a\\=\\?");
String expEncoded = "key-a=value-a\\=?";
Map<String, String> expNameValues = new HashMap<>();
expNameValues.put("key-a", "value-a=?");
check(pairs, expEncoded, expNameValues);
}
private static void check(ConfPairs confPairs, String expEncoded,
Map<String, String> expNameValues) {
String isEncoded = confPairs.getEncoded();
Assert.assertEquals("encoded", expEncoded, isEncoded);
Set<String> isNames = confPairs.names();
Assert.assertEquals("names", expNameValues.size(), isNames.size());
for (String isName : isNames) {
String expValue = expNameValues.get(isName);
Assert.assertNotNull("name " + isName + " is not expected", expValue);
Assert.assertEquals("value of name " + isName, expValue, confPairs.value(isName));
}
}
}
|
[
"lijun.liao@gmail.com"
] |
lijun.liao@gmail.com
|
c12bb91a72a82f68ffb1f7d3ee04f54788e40e64
|
4c50f39f7412125204d2514693dcfb08162d656e
|
/src/org/apromore/dao/model/TempVersion.java
|
51d7c7093b95ac61916879c61d8daa8b50dd3cc1
|
[] |
no_license
|
alex-fedorov-012088/SMD
|
7e956d92701835bbac3f584a2dea05690c201a94
|
9b2a025b9124639d8262331487ee136d56b9b93b
|
refs/heads/master
| 2023-03-15T19:15:15.273499
| 2015-03-30T01:31:44
| 2015-03-30T01:31:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,406
|
java
|
package org.apromore.dao.model;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.beans.factory.annotation.Configurable;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;
/**
* The Id of the Temp Version entity.
*
* @author Cameron James
*/
@Entity
@Table(name = "temp_version")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Configurable("tempVersion")
public class TempVersion implements Serializable {
/** Hard coded for interoperability. */
private static final long serialVersionUID = -235331446190485548L;
private TempVersionId id;
private Date recordTime;
private String preVersion;
private String natType;
private String creationDate;
private String lastUpdate;
private String ranking;
private String documentation;
private String name;
private String cpf;
private String apf;
private String npf;
/**
* Default Constructor.
*/
public TempVersion() { }
/**
* Get the Primary Key for the Object.
* @return Returns the Id.
*/
@EmbeddedId
@AttributeOverrides({
@AttributeOverride(name = "code", column = @Column(name = "code", nullable = false)),
@AttributeOverride(name = "processId", column = @Column(name = "processId", nullable = false)),
@AttributeOverride(name = "newVersion", column = @Column(name = "new_version", nullable = false, length = 40))
})
public TempVersionId getId() {
return this.id;
}
/**
* Set the Primary Key for the Object.
* @param newId The id to set.
*/
public void setId(TempVersionId newId) {
this.id = newId;
}
/**
* Get the recordTime for the Object.
* @return Returns the recordTime.
*/
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "recordTime", length = 19)
public Date getRecordTime() {
return this.recordTime;
}
/**
* Set the recordTime for the Object.
* @param newRecordTime The recordTime to set.
*/
public void setRecordTime(final Date newRecordTime) {
this.recordTime = newRecordTime;
}
/**
* Get the preVersion for the Object.
* @return Returns the preVersion.
*/
@Column(name = "pre_version", length = 40)
public String getPreVersion() {
return this.preVersion;
}
/**
* Set the preVersion for the Object.
* @param newPreVersion The preVersion to set.
*/
public void setPreVersion(final String newPreVersion) {
this.preVersion = newPreVersion;
}
/**
* Get the natType for the Object.
* @return Returns the natType.
*/
@Column(name = "nat_type", length = 20)
public String getNatType() {
return this.natType;
}
/**
* Set the natType for the Object.
* @param newNatType The natType to set.
*/
public void setNatType(final String newNatType) {
this.natType = newNatType;
}
/**
* Get the creationDate for the Object.
* @return Returns the creationDate.
*/
@Column(name = "creation_date", length = 35)
public String getCreationDate() {
return this.creationDate;
}
/**
* Set the creationDate for the Object.
* @param newCreationDate The creationDate to set.
*/
public void setCreationDate(final String newCreationDate) {
this.creationDate = newCreationDate;
}
/**
* Get the lastUpdate for the Object.
* @return Returns the lastUpdate.
*/
@Column(name = "last_update", length = 35)
public String getLastUpdate() {
return this.lastUpdate;
}
/**
* Set the lastUpdate for the Object.
* @param newLastUpdate The lastUpdate to set.
*/
public void setLastUpdate(final String newLastUpdate) {
this.lastUpdate = newLastUpdate;
}
/**
* Get the ranking for the Object.
* @return Returns the ranking.
*/
@Column(name = "ranking", length = 10)
public String getRanking() {
return this.ranking;
}
/**
* Set the ranking for the Object.
* @param newRanking The ranking to set.
*/
public void setRanking(final String newRanking) {
this.ranking = newRanking;
}
/**
* Get the documentation for the Object.
* @return Returns the documentation.
*/
@Column(name = "documentation", length = 65535)
public String getDocumentation() {
return this.documentation;
}
/**
* Set the documentation for the Object.
* @param newDocumentation The documentation to set.
*/
public void setDocumentation(final String newDocumentation) {
this.documentation = newDocumentation;
}
/**
* Get the name for the Object.
* @return Returns the name.
*/
@Column(name = "name", length = 40)
public String getName() {
return this.name;
}
/**
* Set the name for the Object.
* @param newName The name to set.
*/
public void setName(final String newName) {
this.name = newName;
}
/**
* Get the cpf for the Object.
* @return Returns the cpf.
*/
@Column(name = "cpf")
public String getCpf() {
return this.cpf;
}
/**
* Set the cpf for the Object.
* @param newCpf The cpf to set.
*/
public void setCpf(final String newCpf) {
this.cpf = newCpf;
}
/**
* Get the apf for the Object.
* @return Returns the apf.
*/
@Column(name = "apf")
public String getApf() {
return this.apf;
}
/**
* Set the apf for the Object.
* @param newApf The apf to set.
*/
public void setApf(final String newApf) {
this.apf = newApf;
}
/**
* Get the npf for the Object.
* @return Returns the npf.
*/
@Column(name = "npf")
public String getNpf() {
return this.npf;
}
/**
* Set the npf for the Object.
* @param newNpf The npf to set.
*/
public void setNpf(final String newNpf) {
this.npf = newNpf;
}
}
|
[
"apromore@gmail.com"
] |
apromore@gmail.com
|
c55aeed38ffcc017c5a5f9366054bf6344c16564
|
bfbc77f749b4998d5e34796e5cb608bdf6b05cb5
|
/src/main/java/com/github/alturkovic/asn/tag/Tag.java
|
1c7789128d8e0c89b7c12b3ff18404526d2d3734
|
[
"MIT"
] |
permissive
|
alturkovic/asn-parser
|
ed7273c5dbde6de2aa5aefa1775ef07beac1181c
|
d6905483f378b2d3ad2967fbe3dfd121c07ac297
|
refs/heads/master
| 2021-08-01T22:18:46.950832
| 2021-07-23T10:27:19
| 2021-07-23T10:27:19
| 97,948,924
| 1
| 5
|
MIT
| 2020-10-13T06:42:49
| 2017-07-21T13:14:04
|
Java
|
UTF-8
|
Java
| false
| false
| 1,880
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 Alen Turkovic
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package com.github.alturkovic.asn.tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Data
@ToString
@EqualsAndHashCode(of = {"value", "type"})
public class Tag implements Comparable<Tag> {
private final int value;
private final Type type;
private final boolean constructed;
public Tag(final int value, final Type type, final boolean constructed) {
this.value = value;
this.type = type;
this.constructed = constructed;
}
@Override
// order by type, then by value
public int compareTo(final Tag tag) {
final var typeComparison = type.compareTo(tag.type);
if (typeComparison != 0) {
return typeComparison;
}
return Integer.compare(value, tag.value);
}
}
|
[
"alturkovic@gmail.com"
] |
alturkovic@gmail.com
|
98be95e91fe7ff2b17d57c7cf5ac4cfd12994bed
|
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
|
/src/modules/agrega/soporte/parseadorXML/src/main/java/es/pode/parseadorXML/castor/Coverage.java
|
e63f929a2c748a3dce9a6f0db19cbf2b636acf7f
|
[] |
no_license
|
nwlg/Colony
|
0170b0990c1f592500d4869ec8583a1c6eccb786
|
07c908706991fc0979e4b6c41d30812d861776fb
|
refs/heads/master
| 2021-01-22T05:24:40.082349
| 2010-12-23T14:49:00
| 2010-12-23T14:49:00
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 5,437
|
java
|
/* Agrega es una federación de repositorios de objetos digitales educativos formada por todas las Comunidades Autónomas propiedad de Red.es. Este código ha sido desarrollado por la Entidad Pública Empresarial red.es adscrita al Ministerio de Industria,Turismo y Comercio a través de la Secretaría de Estado de Telecomunicaciones y para la Sociedad de la Información, dentro del Programa Internet en el Aula, que se encuadra dentro de las actuaciones previstas en el Plan Avanza (Plan 2006-2010 para el desarrollo de la Sociedad de la Información y de Convergencia con Europa y entre Comunidades Autónomas y Ciudades Autónomas) y ha sido cofinanciado con fondos FEDER del Programa Operativo FEDER 2000-2006 “Sociedad de la Información”
This program is free software: you can redistribute it and/or modify it under the terms of the European Union Public Licence (EUPL v.1.0). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the European Union Public Licence (EUPL v.1.0). You should have received a copy of the EUPL licence along with this program. If not, see http://ec.europa.eu/idabc/en/document/7330.
*/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
package es.pode.parseadorXML.castor;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
/**
* Class Coverage.
*
* @version $Revision$ $Date$
*/
public class Coverage implements java.io.Serializable {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field _groupCoverageCoverage.
*/
private es.pode.parseadorXML.castor.GroupCoverageCoverage _groupCoverageCoverage;
//----------------/
//- Constructors -/
//----------------/
public Coverage() {
super();
}
//-----------/
//- Methods -/
//-----------/
/**
* Returns the value of field 'groupCoverageCoverage'.
*
* @return the value of field 'GroupCoverageCoverage'.
*/
public es.pode.parseadorXML.castor.GroupCoverageCoverage getGroupCoverageCoverage(
) {
return this._groupCoverageCoverage;
}
/**
* Method isValid.
*
* @return true if this object is valid according to the schema
*/
public boolean isValid(
) {
try {
validate();
} catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
}
/**
*
*
* @param out
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*/
public void marshal(
final java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, out);
}
/**
*
*
* @param handler
* @throws java.io.IOException if an IOException occurs during
* marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
*/
public void marshal(
final org.xml.sax.ContentHandler handler)
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, handler);
}
/**
* Sets the value of field 'groupCoverageCoverage'.
*
* @param groupCoverageCoverage the value of field
* 'groupCoverageCoverage'.
*/
public void setGroupCoverageCoverage(
final es.pode.parseadorXML.castor.GroupCoverageCoverage groupCoverageCoverage) {
this._groupCoverageCoverage = groupCoverageCoverage;
}
/**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
* @return the unmarshaled
* es.pode.parseadorXML.castor.Coverage
*/
public static es.pode.parseadorXML.castor.Coverage unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (es.pode.parseadorXML.castor.Coverage) Unmarshaller.unmarshal(es.pode.parseadorXML.castor.Coverage.class, reader);
}
/**
*
*
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*/
public void validate(
)
throws org.exolab.castor.xml.ValidationException {
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
}
}
|
[
"build@zeno.siriusit.co.uk"
] |
build@zeno.siriusit.co.uk
|
446d1bed3369d312d4b0c52fc33cdefd893cdebd
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/Zookeeper/111_2.java
|
40de89b3c65db519db5e21e45e6883483b71d5ea
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,074
|
java
|
//,temp,RemoveWatchesTest.java,109,127,temp,RemoveWatchesTest.java,88,107
//,3
public class xxx {
private void removeWatches(ZooKeeper zk, String path, Watcher watcher,
WatcherType watcherType, boolean local, KeeperException.Code rc)
throws InterruptedException, KeeperException {
LOG.info(
"Sending removeWatches req using zk {} path: {} type: {} watcher: {} ",
new Object[] { zk, path, watcherType, watcher });
if (useAsync) {
MyCallback c1 = new MyCallback(rc.intValue(), path);
zk.removeWatches(path, watcher, watcherType, local, c1, null);
Assert.assertTrue("Didn't succeeds removeWatch operation",
c1.matches());
if (KeeperException.Code.OK.intValue() != c1.rc) {
KeeperException ke = KeeperException
.create(KeeperException.Code.get(c1.rc));
throw ke;
}
} else {
zk.removeWatches(path, watcher, watcherType, local);
}
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
fad8e771d332e0a567ed158a1834bc27420d9aee
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project12/src/main/java/org/gradle/test/performance12_5/Production12_410.java
|
b337ed4340fc7451262430137c1ffb72a93dc53e
|
[] |
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
| 303
|
java
|
package org.gradle.test.performance12_5;
public class Production12_410 extends org.gradle.test.performance8_5.Production8_410 {
private final String property;
public Production12_410() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
7918b78685cb22e8377becddf4c19b888c5e0c4a
|
fabaf137cffd183d4bee37eae6ed28991e833b89
|
/src/main/java/com/zisal/security/springbootjwtsecurity/security/UserAuthenticationContext.java
|
2f8c122101e8027dc5d2f4876aef9f298a392a1f
|
[] |
no_license
|
betates/springboot-jwt-security
|
0dd89dcc457b70af0082cd9f747c2a8bd3421e81
|
096a9999f34c22c52138caae4b14c65ef1312228
|
refs/heads/master
| 2021-09-14T19:24:05.969616
| 2018-05-17T21:36:30
| 2018-05-17T21:36:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,838
|
java
|
package com.zisal.security.springbootjwtsecurity.security;
import com.zisal.security.springbootjwtsecurity.entity.User;
import lombok.NoArgsConstructor;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
/**
* Created on 5/17/18.
*
* @author <a href="mailto:fauzi.knightmaster.achmad@gmail.com">Achmad Fauzi</a>
*/
@NoArgsConstructor
public class UserAuthenticationContext {
private static UserAuthenticationContext instance = null;
public static UserAuthenticationContext getInstance() {
if (instance == null) {
instance = new UserAuthenticationContext();
}
return instance;
}
public String getCurrentUserName() {
if (!(SecurityContextHolder.getContext().getAuthentication() instanceof AnonymousAuthenticationFilter))
return SecurityContextHolder.getContext().getAuthentication().getName();
return null;
}
public Authentication getGrantedAuthentication() {
if (!(getDefaultAuthentication() instanceof AnonymousAuthenticationFilter))
return getDefaultAuthentication();
return null;
}
public Authentication getDefaultAuthentication() {
return SecurityContextHolder.getContext().getAuthentication();
}
public void setAuthentication(Authentication authentication) {
SecurityContextHolder.getContext().setAuthentication(authentication);
}
public boolean hasRole(String p_Role) {
User user = (User) getDefaultAuthentication().getPrincipal();
return user.getRoles().contains(new SimpleGrantedAuthority(p_Role));
}
}
|
[
"fauzi.knightmaster.achmad@gmail.com"
] |
fauzi.knightmaster.achmad@gmail.com
|
b10f2d90364bcb6d3aefbce260eed55821c77542
|
b4b95c21572ac6573706df0edba99e4abb947924
|
/component-studio/component-runtime-di/src/test/java/org/talend/sdk/component/runtime/di/beam/InMemoryQueueIOTest.java
|
678a6e88294a139920590d5a238de75365c4d8b2
|
[
"Apache-2.0"
] |
permissive
|
RyanSkraba/component-runtime
|
33d3231658cda17c3861f16f0cceca628c27a4c2
|
cae7b10238ee5b62256a72a780c781c40fc52822
|
refs/heads/master
| 2023-02-18T02:38:37.859335
| 2021-01-18T15:31:32
| 2021-01-18T18:07:04
| 126,361,369
| 0
| 0
|
Apache-2.0
| 2018-03-22T16:07:04
| 2018-03-22T16:07:01
| null |
UTF-8
|
Java
| false
| false
| 5,517
|
java
|
/**
* Copyright (C) 2006-2020 Talend Inc. - www.talend.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.talend.sdk.component.runtime.di.beam;
import static java.lang.Thread.sleep;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
import org.apache.beam.sdk.PipelineResult;
import org.apache.beam.sdk.coders.SerializableCoder;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.testing.TestPipeline;
import org.apache.beam.sdk.transforms.Create;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.ParDo;
import org.junit.Rule;
import org.junit.Test;
import org.talend.sdk.component.api.record.Record;
import org.talend.sdk.component.runtime.beam.coder.registry.SchemaRegistryCoder;
import org.talend.sdk.component.runtime.manager.ComponentManager;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class InMemoryQueueIOTest implements Serializable {
private static final Collection<Record> INPUT_OUTPUTS = new CopyOnWriteArrayList<>();
@Rule
public transient final TestPipeline pipeline =
TestPipeline.fromOptions(PipelineOptionsFactory.fromArgs("--blockOnRun=false").create());
@Test(timeout = 60000)
public void input() {
INPUT_OUTPUTS.clear();
final PipelineResult result;
try (final LoopState state = LoopState.newTracker(null)) {
IntStream.range(0, 2).forEach(i -> state.push(new RowStruct(i)));
pipeline.apply(InMemoryQueueIO.from(state)).apply(ParDo.of(new DoFn<Record, Void>() {
@ProcessElement
public void onElement(@Element final Record record) {
INPUT_OUTPUTS.add(record);
}
}));
result = pipeline.run();
IntStream.range(2, 5).forEach(i -> state.push(new RowStruct(i)));
// for inputs it is key to notify beam we are done
state.end();
final long end = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(2);
long lastLog = System.currentTimeMillis();
while (INPUT_OUTPUTS.size() < 5 && end - System.currentTimeMillis() >= 0) {
try {
if (lastLog - System.currentTimeMillis() > TimeUnit.SECONDS.toMillis(10)) {
log.info("Not yet 5 records: {}, waiting", INPUT_OUTPUTS.size());
}
sleep(150);
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}
result.waitUntilFinish();
assertEquals(5, INPUT_OUTPUTS.size());
assertEquals(IntStream.range(0, 5).boxed().collect(toSet()),
INPUT_OUTPUTS.stream().mapToInt(o -> o.getInt("id")).boxed().collect(toSet()));
}
@Test(timeout = 60000)
public void output() {
final Collection<Record> objects = new ArrayList<>();
try (final LoopState state = LoopState.newTracker(null)) {
pipeline
.apply(Create.of(IntStream.range(0, 5).mapToObj(RowStruct::new).collect(toList())))
.setCoder(SerializableCoder.of(RowStruct.class))
.apply(ParDo.of(new DoFn<RowStruct, Record>() {
@ProcessElement
public void onElement(final ProcessContext context) {
final Record record = ComponentManager
.instance()
.getRecordBuilderFactoryProvider()
.apply(null)
.newRecordBuilder()
.withInt("id", context.element().id)
.build();
context.output(record);
}
}))
.setCoder(SchemaRegistryCoder.of())
.apply(InMemoryQueueIO.to(state));
pipeline.run().waitUntilFinish();
Record next;
do {
next = state.next();
if (next != null) {
objects.add(next);
}
} while (next != null);
}
assertEquals(5, objects.size());
assertEquals(IntStream.range(0, 5).boxed().collect(toSet()),
objects.stream().mapToInt(o -> o.getInt("id")).boxed().collect(toSet()));
}
@Data
@AllArgsConstructor
public static class RowStruct implements Serializable {
public int id;
}
}
|
[
"rmannibucau@gmail.com"
] |
rmannibucau@gmail.com
|
132de3c8f319f4145ed96b9641df04fb8d889c56
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE129_Improper_Validation_of_Array_Index/CWE129_Improper_Validation_of_Array_Index__Property_array_read_check_min_81_goodG2B.java
|
ac7a4b1f1eaedfcf1792625159f32d26b5f26d90
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,731
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__Property_array_read_check_min_81_goodG2B.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-81_goodG2B.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: Property Read data from a system property
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_read_check_min
* GoodSink: Read from array after verifying that data is at least 0 and less than array.length
* BadSink : Read from array after verifying that data is at least 0 (but not verifying that data less than array.length)
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE129_Improper_Validation_of_Array_Index;
import testcasesupport.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.sql.*;
import javax.servlet.http.*;
public class CWE129_Improper_Validation_of_Array_Index__Property_array_read_check_min_81_goodG2B extends CWE129_Improper_Validation_of_Array_Index__Property_array_read_check_min_81_base
{
public void action(int data ) throws Throwable
{
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* POTENTIAL FLAW: Verify that data >= 0, but don't verify that data < array.length, so may be attempting to read out of the array bounds */
if(data >= 0)
{
IO.writeLine(array[data]);
}
else {
IO.writeLine("Array index out of bounds");
}
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
5e8dd43454a0df4d324f989d4fed1c874b8fa02b
|
b4464bb61cb5424139dc956934e0197e9f9b591c
|
/app/src/main/java/com/cpsdbd/sohelcon/Utility/FontUtils.java
|
bef55b5686e059ccad0e392911954c656b7ab5e0
|
[] |
no_license
|
sohel2178/SohelCon
|
65b61aa15ffc6ee92e79b9b9d7d80d83cfb9d169
|
9aa37a787a2ec32fd44287dd61a6ddbebf21410a
|
refs/heads/master
| 2021-01-12T03:27:18.870082
| 2017-06-03T05:36:29
| 2017-06-03T05:36:31
| 78,211,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,288
|
java
|
package com.cpsdbd.sohelcon.Utility;
import android.graphics.Typeface;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import java.util.List;
/**
* Created by Sohel on 10/26/2016.
*/
public class FontUtils {
public static void setFont(String typeface, TextView textView){
Typeface tf = Typeface.createFromAsset(textView.getContext().getAssets(),typeface);
textView.setTypeface(tf);
}
public static void setFont(String typeface, EditText editText){
Typeface tf = Typeface.createFromAsset(editText.getContext().getAssets(),typeface);
editText.setTypeface(tf);
}
public static void setFont(String typeface, Button button){
Typeface tf = Typeface.createFromAsset(button.getContext().getAssets(),typeface);
button.setTypeface(tf);
}
public static void setFonts(List<View> views,String typeFace){
for (View x: views){
if(x instanceof TextView){
setFont(typeFace, (TextView) x);
}else if(x instanceof EditText){
setFont(typeFace, (EditText) x);
}else if(x instanceof Button){
setFont(typeFace, (Button) x);
}
}
}
}
|
[
"sohel.ahmed2178@gmail.com"
] |
sohel.ahmed2178@gmail.com
|
14db4f10b79b99d9361a54ff54f7c731108e4b48
|
a8c5b7b04eace88b19b5a41a45f1fb030df393e3
|
/projects/integration/src/main/java/com/opengamma/integration/regression/AbstractGoldenCopyDumpCreator.java
|
906dbedf98ec1ed3596acdbfb786d350582d3c9a
|
[
"Apache-2.0"
] |
permissive
|
McLeodMoores/starling
|
3f6cfe89cacfd4332bad4861f6c5d4648046519c
|
7ae0689e06704f78fd9497f8ddb57ee82974a9c8
|
refs/heads/master
| 2022-12-04T14:02:00.480211
| 2020-04-28T17:22:44
| 2020-04-28T17:22:44
| 46,577,620
| 4
| 4
|
Apache-2.0
| 2022-11-24T07:26:39
| 2015-11-20T17:48:10
|
Java
|
UTF-8
|
Java
| false
| false
| 7,139
|
java
|
/**
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*
* Modified by McLeod Moores Software Limited.
*
* Copyright (C) 2015-Present McLeod Moores Software Limited. All rights reserved.
*/
package com.opengamma.integration.regression;
import java.io.IOException;
import java.util.Collection;
import java.util.Set;
import com.google.common.base.Function;
import com.opengamma.financial.tool.ToolContext;
import com.opengamma.id.UniqueId;
import com.opengamma.id.UniqueIdentifiable;
import com.opengamma.master.AbstractDocument;
import com.opengamma.master.AbstractMaster;
import com.opengamma.master.config.ConfigDocument;
import com.opengamma.master.config.ConfigMaster;
import com.opengamma.master.config.impl.DataTrackingConfigMaster;
import com.opengamma.master.convention.ConventionDocument;
import com.opengamma.master.convention.ConventionMaster;
import com.opengamma.master.convention.impl.DataTrackingConventionMaster;
import com.opengamma.master.exchange.ExchangeDocument;
import com.opengamma.master.exchange.ExchangeMaster;
import com.opengamma.master.exchange.impl.DataTrackingExchangeMaster;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoDocument;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesMaster;
import com.opengamma.master.historicaltimeseries.impl.DataTrackingHistoricalTimeSeriesMaster;
import com.opengamma.master.holiday.HolidayDocument;
import com.opengamma.master.holiday.HolidayMaster;
import com.opengamma.master.holiday.impl.DataTrackingHolidayMaster;
import com.opengamma.master.legalentity.LegalEntityDocument;
import com.opengamma.master.legalentity.LegalEntityMaster;
import com.opengamma.master.legalentity.impl.DataTrackingLegalEntityMaster;
import com.opengamma.master.marketdatasnapshot.MarketDataSnapshotDocument;
import com.opengamma.master.marketdatasnapshot.MarketDataSnapshotMaster;
import com.opengamma.master.marketdatasnapshot.impl.DataTrackingMarketDataSnapshotMaster;
import com.opengamma.master.portfolio.PortfolioDocument;
import com.opengamma.master.portfolio.PortfolioMaster;
import com.opengamma.master.portfolio.impl.DataTrackingPortfolioMaster;
import com.opengamma.master.position.PositionDocument;
import com.opengamma.master.position.PositionMaster;
import com.opengamma.master.position.impl.DataTrackingPositionMaster;
import com.opengamma.master.security.SecurityDocument;
import com.opengamma.master.security.SecurityMaster;
import com.opengamma.master.security.impl.DataTrackingSecurityMaster;
import com.opengamma.util.ArgumentChecker;
/**
* Executes a DB dump, only including the records which have been accessed.
*/
public abstract class AbstractGoldenCopyDumpCreator {
/**
* The name of the output file.
*/
public static final String DB_DUMP_ZIP = "dbdump.zip";
/** Regression I/O */
private final RegressionIO _regressionIO;
/** The tool context */
private final ToolContext _tc;
/**
* @param regressionIO
* the regression I/O, not null
* @param tc
* the tool context, not null
*/
public AbstractGoldenCopyDumpCreator(final RegressionIO regressionIO, final ToolContext tc) {
_regressionIO = ArgumentChecker.notNull(regressionIO, "regressionIO");
_tc = ArgumentChecker.notNull(tc, "tc");
}
/**
* Run the db dump, building appropriate filters from the passed DataTracking masters.
*
* @throws IOException
* if there is a problem writing the output
*/
public void execute() throws IOException {
final MasterQueryManager filterManager = buildFilterManager();
_regressionIO.beginWrite();
try {
// dump ref data accesses first
recordDataAccessed();
final DatabaseDump databaseDump = new DatabaseDump(_regressionIO,
_tc.getSecurityMaster(),
_tc.getPositionMaster(),
_tc.getPortfolioMaster(),
_tc.getConfigMaster(),
_tc.getHistoricalTimeSeriesMaster(),
_tc.getHolidayMaster(),
_tc.getExchangeMaster(),
_tc.getMarketDataSnapshotMaster(),
_tc.getLegalEntityMaster(),
_tc.getConventionMaster(),
filterManager);
databaseDump.dumpDatabase();
} finally {
_regressionIO.endWrite();
}
}
/**
* Gets the regression I/O.
*
* @return the regression I/O
*/
public RegressionIO getRegressionIO() {
return _regressionIO;
}
/**
* Records the data that has been accessed.
*
* @throws IOException
* if there is a problem writing the output
*/
protected abstract void recordDataAccessed() throws IOException;
/**
* Builds a filter manager for the ids used when creating the dump.
*
* @return the manager
*/
private MasterQueryManager buildFilterManager() {
return new MasterQueryManager(
new UniqueIdentifiableQuery<SecurityDocument, SecurityMaster>(((DataTrackingSecurityMaster) _tc.getSecurityMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<PositionDocument, PositionMaster>(((DataTrackingPositionMaster) _tc.getPositionMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<PortfolioDocument, PortfolioMaster>(((DataTrackingPortfolioMaster) _tc.getPortfolioMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<ConfigDocument, ConfigMaster>(((DataTrackingConfigMaster) _tc.getConfigMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<HistoricalTimeSeriesInfoDocument, HistoricalTimeSeriesMaster>(
((DataTrackingHistoricalTimeSeriesMaster) _tc.getHistoricalTimeSeriesMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<HolidayDocument, HolidayMaster>(((DataTrackingHolidayMaster) _tc.getHolidayMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<ExchangeDocument, ExchangeMaster>(((DataTrackingExchangeMaster) _tc.getExchangeMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<MarketDataSnapshotDocument, MarketDataSnapshotMaster>(
((DataTrackingMarketDataSnapshotMaster) _tc.getMarketDataSnapshotMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<LegalEntityDocument, LegalEntityMaster>(((DataTrackingLegalEntityMaster) _tc.getLegalEntityMaster()).getIdsAccessed()),
new UniqueIdentifiableQuery<ConventionDocument, ConventionMaster>(((DataTrackingConventionMaster) _tc.getConventionMaster()).getIdsAccessed()));
}
/**
* Filter which checks a {@link UniqueIdentifiable} object is identified by one of a set of ids.
*/
private static class UniqueIdentifiableQuery<D extends AbstractDocument, M extends AbstractMaster<D>> implements Function<M, Collection<D>> {
/** The ids to include */
private final Set<UniqueId> _idsToInclude;
/**
* Creates a query.
*
* @param uniqueId
* the unique ids
*/
UniqueIdentifiableQuery(final Set<UniqueId> uniqueId) {
_idsToInclude = uniqueId;
}
@Override
public Collection<D> apply(final M input) {
return input.get(_idsToInclude).values();
}
}
}
|
[
"em.mcleod@gmail.com"
] |
em.mcleod@gmail.com
|
bc4b70ccd17563ce885eda369730ca69999b7e79
|
89fbd82dcf18d560e8cb9276b7ea72fe5e04c45c
|
/presto-main/src/main/java/com/facebook/presto/sql/planner/iterative/rule/PruneSemiJoinFilteringSourceColumns.java
|
8093917a1b3c9e661186356a71e1397d2f580488
|
[
"Apache-2.0"
] |
permissive
|
isthari/presto
|
fa21abd5a88f78d72a95946a04f3162ea07b350e
|
04966f1edfd1a55f6f649778b337af5752084a01
|
refs/heads/master
| 2021-08-30T03:51:00.289446
| 2017-12-15T22:10:11
| 2017-12-15T22:10:11
| 114,416,418
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,199
|
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.facebook.presto.sql.planner.iterative.rule;
import com.facebook.presto.matching.Pattern;
import com.facebook.presto.sql.planner.Symbol;
import com.facebook.presto.sql.planner.iterative.Rule;
import com.facebook.presto.sql.planner.plan.PlanNode;
import com.facebook.presto.sql.planner.plan.SemiJoinNode;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Streams;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Stream;
import static com.facebook.presto.sql.planner.iterative.rule.Util.restrictOutputs;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
public class PruneSemiJoinFilteringSourceColumns
implements Rule
{
private static final Pattern PATTERN = Pattern.typeOf(SemiJoinNode.class);
@Override
public Pattern getPattern()
{
return PATTERN;
}
@Override
public Optional<PlanNode> apply(PlanNode node, Context context)
{
SemiJoinNode semiJoinNode = (SemiJoinNode) node;
Set<Symbol> requiredFilteringSourceInputs = Streams.concat(
Stream.of(semiJoinNode.getFilteringSourceJoinSymbol()),
semiJoinNode.getFilteringSourceHashSymbol().map(Stream::of).orElse(Stream.empty()))
.collect(toImmutableSet());
return restrictOutputs(context.getIdAllocator(), semiJoinNode.getFilteringSource(), requiredFilteringSourceInputs)
.map(newFilteringSource ->
semiJoinNode.replaceChildren(ImmutableList.of(
semiJoinNode.getSource(), newFilteringSource)));
}
}
|
[
"g.kokosinski@gmail.com"
] |
g.kokosinski@gmail.com
|
8c9976330683b9aaf493093f30ecfc316366f73b
|
42816ebebe8e29e53f1a651a836ed51abf76bcf4
|
/LogiWeb/src/main/java/ru/usachev/LogiWebProject/controller/admin/AdminUserController.java
|
8fc4dc2bdd2566f44b18d8bbb8542a469f2c5358
|
[] |
no_license
|
alexusachev1999/ModuleProject
|
fcacd72f300280e06a25747b153e372897b30eb9
|
759fe59e6cc4f24f96a7fd0684cfd67e726dedf0
|
refs/heads/master
| 2023-06-03T19:28:03.650754
| 2021-06-22T09:29:47
| 2021-06-22T09:29:47
| 375,293,862
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,462
|
java
|
package ru.usachev.LogiWebProject.controller.admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import ru.usachev.LogiWebProject.converter.api.UserConverter;
import ru.usachev.LogiWebProject.dto.UserDTO;
import ru.usachev.LogiWebProject.entity.User;
import ru.usachev.LogiWebProject.service.api.UserService;
import ru.usachev.LogiWebProject.validation.UserValidator;
import javax.validation.Valid;
import java.util.List;
@Controller
@RequestMapping("/admin")
public class AdminUserController {
@Autowired
private UserService userService;
@Autowired
private UserValidator userValidator;
@Autowired
private UserConverter userConverter;
@GetMapping("/users")
public String getAllUsers(Model model){
List<User> users = userService.getAllUsers();
model.addAttribute("users", users);
return "admin/all-users";
}
@GetMapping("/addUser")
public String addUser(Model model){
UserDTO userDTO = new UserDTO();
model.addAttribute("user", userDTO);
model.addAttribute("uniqueError", "no error");
return "admin/add-user";
}
@PostMapping(value = "/saveUser", produces = "text/plain;charset=UTF-8")
public String saveUser(@Valid @ModelAttribute("user") UserDTO userDTO, BindingResult bindingResult
, Model model){
boolean isValidUser = userValidator.validUser(userDTO);
if (bindingResult.hasErrors() || !isValidUser){
if (!isValidUser)
model.addAttribute("uniqueError", "Пользователь " +
"с таким именем существует!");
else
model.addAttribute("uniqueError", "no error");
model.addAttribute("user", userDTO);
return "admin/add-user";}
else {
userService.saveUser(userDTO);
model.addAttribute("uniqueDriverError", "no error");
return "redirect:/admin/users";
}
}
@RequestMapping("/deleteUser")
public String deleteUser(@RequestParam(name = "userName") String userName){
User user = userService.getUserByUsername(userName);
userService.deleteUser(user);
return "redirect:/admin/users";
}
}
|
[
"sashulya.usachev@list.ru"
] |
sashulya.usachev@list.ru
|
d16f1ce9e6ec859a57466c294efefda7db0a6b5c
|
f40c5613a833bc38fca6676bad8f681200cffb25
|
/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2beta2/HPAScalingPolicy.java
|
f2627c84e84a8d97f728ddf513bcb562edd33cc1
|
[
"Apache-2.0"
] |
permissive
|
rohanKanojia/kubernetes-client
|
2d599e4ed1beedf603c79d28f49203fbce1fc8b2
|
502a14c166dce9ec07cf6adb114e9e36053baece
|
refs/heads/master
| 2023-07-25T18:31:33.982683
| 2022-04-12T13:39:06
| 2022-04-13T05:12:38
| 106,398,990
| 2
| 3
|
Apache-2.0
| 2023-04-28T16:21:03
| 2017-10-10T09:50:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,889
|
java
|
package io.fabric8.kubernetes.api.model.autoscaling.v2beta2;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.IntOrString;
import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.fabric8.kubernetes.api.model.LabelSelector;
import io.fabric8.kubernetes.api.model.LocalObjectReference;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectReference;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.PodTemplateSpec;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.BuildableReference;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"periodSeconds",
"type",
"value"
})
@ToString
@EqualsAndHashCode
@Setter
@Accessors(prefix = {
"_",
""
})
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = {
@BuildableReference(ObjectMeta.class),
@BuildableReference(LabelSelector.class),
@BuildableReference(Container.class),
@BuildableReference(PodTemplateSpec.class),
@BuildableReference(ResourceRequirements.class),
@BuildableReference(IntOrString.class),
@BuildableReference(ObjectReference.class),
@BuildableReference(LocalObjectReference.class),
@BuildableReference(PersistentVolumeClaim.class)
})
public class HPAScalingPolicy implements KubernetesResource
{
@JsonProperty("periodSeconds")
private Integer periodSeconds;
@JsonProperty("type")
private String type;
@JsonProperty("value")
private Integer value;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
/**
* No args constructor for use in serialization
*
*/
public HPAScalingPolicy() {
}
/**
*
* @param periodSeconds
* @param type
* @param value
*/
public HPAScalingPolicy(Integer periodSeconds, String type, Integer value) {
super();
this.periodSeconds = periodSeconds;
this.type = type;
this.value = value;
}
@JsonProperty("periodSeconds")
public Integer getPeriodSeconds() {
return periodSeconds;
}
@JsonProperty("periodSeconds")
public void setPeriodSeconds(Integer periodSeconds) {
this.periodSeconds = periodSeconds;
}
@JsonProperty("type")
public String getType() {
return type;
}
@JsonProperty("type")
public void setType(String type) {
this.type = type;
}
@JsonProperty("value")
public Integer getValue() {
return value;
}
@JsonProperty("value")
public void setValue(Integer value) {
this.value = value;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
|
[
"marc@marcnuri.com"
] |
marc@marcnuri.com
|
08cb54f1cde505cbc35429cdd6eb892471dda434
|
fba2092bf9c8df1fb6c053792c4932b6de017ceb
|
/wms/WEB-INF/src/jp/co/daifuku/wms/part11/listbox/areahistorylist/LstAreaHistoryParams.java
|
57505297d038993222c11eb8041266c6bc3d1cf6
|
[] |
no_license
|
FlashChenZhi/exercise
|
419c55c40b2a353e098ce5695377158bd98975d3
|
51c5f76928e79a4b3e1f0d68fae66ba584681900
|
refs/heads/master
| 2020-04-04T03:23:44.912803
| 2018-11-01T12:36:21
| 2018-11-01T12:36:21
| 155,712,318
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,354
|
java
|
// $Id: LstAreaHistoryParams.java,v 1.1.1.1 2009/02/10 08:55:41 arai Exp $
package jp.co.daifuku.wms.part11.listbox.areahistorylist;
/*
* Copyright(c) 2000-2007 DAIFUKU Co.,Ltd. All Rights Reserved.
*
* This software is the proprietary information of DAIFUKU Co.,Ltd.
* Use is subject to license terms.
*/
import java.io.IOException;
import java.util.Map;
import jp.co.daifuku.bluedog.util.StringParameters;
import jp.co.daifuku.foundation.common.Key;
import jp.co.daifuku.foundation.common.ParamKey;
import jp.co.daifuku.foundation.common.Params;
/**
* 親画面とポップアップ画面間で使用されるパラメータのキーを定義するクラスです。
* ここに具体的なクラスの説明を記述して下さい。
*
* @version $Revision: 1.1.1.1 $, $Date: 2009/02/10 08:55:41 $
* @author BusiTune 1.0 Generator.
* @author Last commit: $Author: arai $
*/
public class LstAreaHistoryParams
extends Params
{
//------------------------------------------------------------
// fields (upper case only)
//------------------------------------------------------------
/** DBTYPE_KEY */
public static final ParamKey DBTYPE_KEY = new ParamKey("DBTYPE_KEY");
/** DISPFROMDAY_KEY */
public static final ParamKey DISPFROMDAY_KEY = new ParamKey("DISPFROMDAY_KEY");
/** DISPFROMTIME_KEY */
public static final ParamKey DISPFROMTIME_KEY = new ParamKey("DISPFROMTIME_KEY");
/** DISPTODAY_KEY */
public static final ParamKey DISPTODAY_KEY = new ParamKey("DISPTODAY_KEY");
/** DISPTOTIME_KEY */
public static final ParamKey DISPTOTIME_KEY = new ParamKey("DISPTOTIME_KEY");
/** DSNUMBER_KEY */
public static final ParamKey DSNUMBER_KEY = new ParamKey("DSNUMBER_KEY");
/** PAGENAMERESOURCEKEY */
public static final ParamKey PAGENAMERESOURCEKEY = new ParamKey("PAGENAMERESOURCEKEY");
/** TABLE_NAME */
public static final ParamKey TABLE_NAME = new ParamKey("TABLE_NAME");
/** USERID_KEY */
public static final ParamKey USERID_KEY = new ParamKey("USERID_KEY");
//------------------------------------------------------------
// class variables (prefix '$')
//------------------------------------------------------------
//------------------------------------------------------------
// instance variables (prefix '_')
//------------------------------------------------------------
//------------------------------------------------------------
// constructors
//------------------------------------------------------------
/**
* デフォルトコンストラクターです。
*/
public LstAreaHistoryParams()
{
super();
}
/**
* StringParameterの情報を元にパラメータクラスを作成します。
* @param param StringParameters
* @throws IOException
*/
public LstAreaHistoryParams(StringParameters param)
throws IOException
{
super(param);
}
/**
* Mapの情報を元にパラメータクラスを作成します。
* @param initMap Map
*/
public LstAreaHistoryParams(Map<Key, Object> initMap)
{
super(initMap);
}
//------------------------------------------------------------
// public methods
//------------------------------------------------------------
//------------------------------------------------------------
// accessor methods
//------------------------------------------------------------
//------------------------------------------------------------
// package methods
//------------------------------------------------------------
//------------------------------------------------------------
// protected methods
//------------------------------------------------------------
//------------------------------------------------------------
// private methods
//------------------------------------------------------------
//------------------------------------------------------------
// utility methods
//------------------------------------------------------------
/**
* このクラスのバージョン情報を返します。
* @return version
*/
public static String getVersion()
{
return "";
}
}
//end of class
|
[
"zhangming@worgsoft.com"
] |
zhangming@worgsoft.com
|
003a4f7c03161a63b2c6de4bd88cd9f1504bf243
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-1.3/mule/examples/loanbroker/src/main/java/org/mule/samples/loanbroker/Bank.java
|
3017d0e0f0d67db8e0e6c6ae16f8b9c192e2ec33
|
[] |
no_license
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 2,733
|
java
|
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the MuleSource MPL
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.samples.loanbroker;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mule.impl.UMODescriptorAware;
import org.mule.samples.loanbroker.service.BankService;
import org.mule.umo.UMODescriptor;
import java.io.Serializable;
/**
* <code>Bank</code> is a representation of a bank from which to obtain loan
* quotes.
*
* @author Gregor Hohpe, Bobby Wolfe, et al. EI Patterns
* @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
* @version $Revision$
*/
public class Bank implements BankService, UMODescriptorAware, Serializable
{
/**
* Serial version
*/
private static final long serialVersionUID = 2576893239001689631L;
/**
* logger used by this class
*/
protected static transient Log logger = LogFactory.getLog(Bank.class);
private String bankName;
private String endpoint = "";
private double primeRate;
public Bank()
{
this.primeRate = Math.random() * 10;
}
public Bank(String bankname, String endpoint)
{
this();
this.bankName = bankname;
this.endpoint = endpoint;
}
public void setDescriptor(UMODescriptor descriptor)
{
this.bankName = descriptor.getName();
}
// public LoanQuote getLoanQuote(LoanRequest request, CreditProfile creditProfile)
// {
// LoanQuote quote = new LoanQuote();
// quote.setBankName(getBankName());
// quote.setInterestRate(primeRate);
// logger.info("Returning Rate is:" + quote);
// return quote;
// }
public LoanQuote getLoanQuote(BankQuoteRequest request)
{
LoanQuote quote = new LoanQuote();
quote.setBankName(getBankName());
quote.setInterestRate(primeRate);
logger.info("Returning Rate is:" + quote);
return quote;
}
public String getBankName()
{
return bankName;
}
public void setBankName(String bankName)
{
this.bankName = bankName;
}
public String getEndpoint()
{
return endpoint;
}
public void setEndpoint(String endpoint)
{
this.endpoint = endpoint;
}
public double getPrimeRate()
{
return primeRate;
}
public void setPrimeRate(double primeRate)
{
this.primeRate = primeRate;
}
}
|
[
"tcarlson@bf997673-6b11-0410-b953-e057580c5b09"
] |
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
|
9b263cc0f708e2f39c045f21b366137af3a4e3b9
|
c48a71f09c6a6a98b858e8e92347cec142b941d9
|
/broker/src/main/java/org/apache/rocketmq/broker/filtersrv/FilterServerManager.java
|
b424447c354372555fa87a54b33c8f968301a878
|
[] |
no_license
|
wp518cookie/rocketmq-study
|
28daa20ca7425b6e54b58821cfe7d820751f95b3
|
e37304a2d46b02c246944ad1009408ed2946cd6d
|
refs/heads/master
| 2022-10-27T17:55:43.376264
| 2019-01-13T12:42:36
| 2019-01-13T12:42:36
| 164,536,803
| 0
| 1
| null | 2022-10-05T19:18:53
| 2019-01-08T02:13:24
|
Java
|
UTF-8
|
Java
| false
| false
| 6,592
|
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.rocketmq.broker.filtersrv;
import io.netty.channel.Channel;
import org.apache.rocketmq.broker.BrokerController;
import org.apache.rocketmq.broker.BrokerStartup;
import org.apache.rocketmq.common.ThreadFactoryImpl;
import org.apache.rocketmq.common.constant.LoggerName;
import org.apache.rocketmq.logging.InternalLogger;
import org.apache.rocketmq.logging.InternalLoggerFactory;
import org.apache.rocketmq.remoting.common.RemotingUtil;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class FilterServerManager {
public static final long FILTER_SERVER_MAX_IDLE_TIME_MILLS = 30000;
private static final InternalLogger log = InternalLoggerFactory.getLogger(LoggerName.BROKER_LOGGER_NAME);
private final ConcurrentMap<Channel, FilterServerInfo> filterServerTable =
new ConcurrentHashMap<Channel, FilterServerInfo>(16);
private final BrokerController brokerController;
private ScheduledExecutorService scheduledExecutorService = Executors
.newSingleThreadScheduledExecutor(new ThreadFactoryImpl("FilterServerManagerScheduledThread"));
public FilterServerManager(final BrokerController brokerController) {
this.brokerController = brokerController;
}
public void start() {
this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
try {
FilterServerManager.this.createFilterServer();
} catch (Exception e) {
log.error("", e);
}
}
}, 1000 * 5, 1000 * 30, TimeUnit.MILLISECONDS);
}
public void createFilterServer() {
int more =
this.brokerController.getBrokerConfig().getFilterServerNums() - this.filterServerTable.size();
String cmd = this.buildStartCommand();
for (int i = 0; i < more; i++) {
FilterServerUtil.callShell(cmd, log);
}
}
private String buildStartCommand() {
String config = "";
if (BrokerStartup.configFile != null) {
config = String.format("-c %s", BrokerStartup.configFile);
}
if (this.brokerController.getBrokerConfig().getNamesrvAddr() != null) {
config += String.format(" -n %s", this.brokerController.getBrokerConfig().getNamesrvAddr());
}
if (RemotingUtil.isWindowsPlatform()) {
return String.format("start /b %s\\bin\\mqfiltersrv.exe %s",
this.brokerController.getBrokerConfig().getRocketmqHome(),
config);
} else {
return String.format("sh %s/bin/startfsrv.sh %s",
this.brokerController.getBrokerConfig().getRocketmqHome(),
config);
}
}
public void shutdown() {
this.scheduledExecutorService.shutdown();
}
public void registerFilterServer(final Channel channel, final String filterServerAddr) {
FilterServerInfo filterServerInfo = this.filterServerTable.get(channel);
if (filterServerInfo != null) {
filterServerInfo.setLastUpdateTimestamp(System.currentTimeMillis());
} else {
filterServerInfo = new FilterServerInfo();
filterServerInfo.setFilterServerAddr(filterServerAddr);
filterServerInfo.setLastUpdateTimestamp(System.currentTimeMillis());
this.filterServerTable.put(channel, filterServerInfo);
log.info("Receive a New Filter Server<{}>", filterServerAddr);
}
}
public void scanNotActiveChannel() {
Iterator<Entry<Channel, FilterServerInfo>> it = this.filterServerTable.entrySet().iterator();
while (it.hasNext()) {
Entry<Channel, FilterServerInfo> next = it.next();
long timestamp = next.getValue().getLastUpdateTimestamp();
Channel channel = next.getKey();
if ((System.currentTimeMillis() - timestamp) > FILTER_SERVER_MAX_IDLE_TIME_MILLS) {
log.info("The Filter Server<{}> expired, remove it", next.getKey());
it.remove();
RemotingUtil.closeChannel(channel);
}
}
}
public void doChannelCloseEvent(final String remoteAddr, final Channel channel) {
FilterServerInfo old = this.filterServerTable.remove(channel);
if (old != null) {
log.warn("The Filter Server<{}> connection<{}> closed, remove it", old.getFilterServerAddr(),
remoteAddr);
}
}
public List<String> buildNewFilterServerList() {
List<String> addr = new ArrayList<>();
Iterator<Entry<Channel, FilterServerInfo>> it = this.filterServerTable.entrySet().iterator();
while (it.hasNext()) {
Entry<Channel, FilterServerInfo> next = it.next();
addr.add(next.getValue().getFilterServerAddr());
}
return addr;
}
static class FilterServerInfo {
private String filterServerAddr;
private long lastUpdateTimestamp;
public String getFilterServerAddr() {
return filterServerAddr;
}
public void setFilterServerAddr(String filterServerAddr) {
this.filterServerAddr = filterServerAddr;
}
public long getLastUpdateTimestamp() {
return lastUpdateTimestamp;
}
public void setLastUpdateTimestamp(long lastUpdateTimestamp) {
this.lastUpdateTimestamp = lastUpdateTimestamp;
}
}
}
|
[
"403704156@qq.com"
] |
403704156@qq.com
|
47633ae3868354b07e7226da551224b3e064346c
|
6da648bfa9724e974f28a6c43e0178649daa300f
|
/app/src/main/java/takjxh/android/com/taapp/activityui/presenter/impl/IWdZxbbPresenter.java
|
195f24d8b8e4ddf9bce9ba227d85434fc462fc7e
|
[] |
no_license
|
Bingoliallen/takjxhApp
|
2ca44409a4e38f4ca6a4055eb347997fd755efa0
|
4fab96e53bad1806b5e48301a75b798b9beaca25
|
refs/heads/master
| 2023-06-16T17:23:30.364111
| 2021-07-15T07:28:35
| 2021-07-15T07:28:35
| 246,971,816
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 553
|
java
|
package takjxh.android.com.taapp.activityui.presenter.impl;
import java.util.List;
import takjxh.android.com.commlibrary.presenter.IBasePresenter;
import takjxh.android.com.taapp.activityui.bean.WdZxbbBean;
/**
* 类名称:
*
* @Author: libaibing
* @Date: 2019-11-07 14:44
* @Description:
**/
public interface IWdZxbbPresenter {
void applyslist(String token,String kay, String page, String pageSize);
interface IView extends IBasePresenter.IView {
void applyslistSuccess(List<WdZxbbBean.ApplyOrdersBean> data);
}
}
|
[
"1241903717@qq.com"
] |
1241903717@qq.com
|
0081a6d1595406d062e0ccceaeee2547bd42d08d
|
7a682dcc4e284bced37d02b31a3cd15af125f18f
|
/bitcamp-java-application4-server/v47_1/src/main/java/com/eomcs/lms/handler/BoardDetailCommand.java
|
65c5512075574505c470f18792c0d6633164fdf4
|
[] |
no_license
|
eomjinyoung/bitcamp-java-20190527
|
a415314b74954f14989042c475a4bf36b7311a8c
|
09f1b677587225310250078c4371ed94fe428a35
|
refs/heads/master
| 2022-03-15T04:33:15.248451
| 2019-11-11T03:33:58
| 2019-11-11T03:33:58
| 194,775,330
| 4
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,108
|
java
|
package com.eomcs.lms.handler;
import java.io.BufferedReader;
import java.io.PrintStream;
import com.eomcs.lms.dao.BoardDao;
import com.eomcs.lms.domain.Board;
import com.eomcs.util.Component;
import com.eomcs.util.Input;
@Component("/board/detail")
public class BoardDetailCommand implements Command {
private BoardDao boardDao;
public BoardDetailCommand(BoardDao boardDao) {
this.boardDao = boardDao;
}
@Override
public void execute(BufferedReader in, PrintStream out) {
try {
// 클라이언트에게 번호를 요구하여 받는다.
int no = Input.getIntValue(in, out, "번호? ");
Board board = boardDao.findBy(no);
if (board == null) {
out.println("해당 번호의 데이터가 없습니다!");
return;
}
boardDao.increaseViewCount(no);
out.printf("내용: %s\n", board.getContents());
out.printf("작성일: %s\n", board.getCreatedDate());
} catch (Exception e) {
out.println("데이터 조회에 실패했습니다!");
System.out.println(e.getMessage());
}
}
}
|
[
"jinyoung.eom@gmail.com"
] |
jinyoung.eom@gmail.com
|
aabb064eddd278dc8619c2b2d56e2dfe26af492a
|
3841f7991232e02c850b7e2ff6e02712e9128b17
|
/小浪底泥沙三维/EV_Xld/jni/src/JAVA/EV_GAWrapper/src/com/earthview/world/spatial3d/controls/CollisionDetectionCameraManipulatorClassFactory.java
|
c47d4c188a4a66d82b715ae8b99e0176564d4d39
|
[] |
no_license
|
15831944/BeijingEVProjects
|
62bf734f1cb0a8be6fed42cf6b207f9dbdf99e71
|
3b5fa4c4889557008529958fc7cb51927259f66e
|
refs/heads/master
| 2021-07-22T14:12:15.106616
| 2017-10-15T11:33:06
| 2017-10-15T11:33:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 453
|
java
|
package com.earthview.world.spatial3d.controls;
import global.*;
import com.earthview.world.base.*;
import com.earthview.world.util.*;
import com.earthview.world.core.*;
public class CollisionDetectionCameraManipulatorClassFactory implements IClassFactory {
public BaseObject create()
{
CollisionDetectionCameraManipulator emptyInstance = new CollisionDetectionCameraManipulator(CreatedWhenConstruct.CWC_NotToCreate);
return emptyInstance;
}
}
|
[
"yanguanqi@aliyun.com"
] |
yanguanqi@aliyun.com
|
f581b64183b3c31933e438f446e9aea241fad283
|
5e4100a6611443d0eaa8774a4436b890cfc79096
|
/src/main/java/com/alipay/api/response/ZhimaCustomerEpIdentificationCertifyResponse.java
|
474783f91c952ada3345a7185ec87888ae5630bf
|
[
"Apache-2.0"
] |
permissive
|
coderJL/alipay-sdk-java-all
|
3b471c5824338e177df6bbe73ba11fde8bc51a01
|
4f4ed34aaf5a320a53a091221e1832f1fe3c3a87
|
refs/heads/master
| 2020-07-15T22:57:13.705730
| 2019-08-14T10:37:41
| 2019-08-14T10:37:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 754
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: zhima.customer.ep.identification.certify response.
*
* @author auto create
* @since 1.0, 2019-08-01 17:31:18
*/
public class ZhimaCustomerEpIdentificationCertifyResponse extends AlipayResponse {
private static final long serialVersionUID = 8181417141259187313L;
/**
* 一次认证的唯一标识,在商户调用认证初始化接口的时候获取,认证完成返回的biz_no和请求的一致。
*/
@ApiField("biz_no")
private String bizNo;
public void setBizNo(String bizNo) {
this.bizNo = bizNo;
}
public String getBizNo( ) {
return this.bizNo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
b77b906e60037c1cc40f65310acdb592150fd462
|
80a76df4cbca83b3b8971a70b08d106c849b10f1
|
/tj4/src/main/java/innerclasses/Parcel11.java
|
8c2fdb2f45a20dd548da0de958491acbe3074081
|
[] |
no_license
|
lucifer7/java-study
|
6b71392d31bd02d4d6546ef52342e3bdf4067391
|
f2781059ae25b50c49b45df8de9146b5ae8e9628
|
refs/heads/master
| 2020-04-03T20:59:06.207960
| 2018-07-17T14:29:27
| 2018-07-17T14:29:27
| 59,581,919
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 972
|
java
|
package innerclasses;//: innerclasses/Parcel11.java
// Nested classes (static inner classes).
public class Parcel11 {
private static class ParcelContents implements Contents {
private int i = 11;
public int value() { return i; }
}
protected static class ParcelDestination
implements Destination {
private String label;
private ParcelDestination(String whereTo) {
label = whereTo;
}
public String readLabel() { return label; }
// Nested classes can contain other static elements:
public static void f() {}
static int x = 10;
static class AnotherLevel {
public static void f() {}
static int x = 10;
}
}
public static Destination destination(String s) {
return new ParcelDestination(s);
}
public static Contents contents() {
return new ParcelContents();
}
public static void main(String[] args) {
Contents c = contents();
Destination d = destination("Tasmania");
}
} ///:~
|
[
"skyvoice@foxmail.com"
] |
skyvoice@foxmail.com
|
75f5b2539ae7c395c7ecf6edeb76daaef9e33b55
|
b3759d19e314109c1bba00ef4426a4fffffc1887
|
/src/main/java/com/neu/cs5200/buycar/repository/AdminRepository.java
|
596649cbf98443b874421734deb368f3350a5c13
|
[] |
no_license
|
sunke38/cs5200fianl2
|
084a256a55fa758e0dbc74ff4a399d9182480608
|
b0d07733b7d45878f354d98b667dd5382fefa139
|
refs/heads/master
| 2022-04-20T18:37:04.494829
| 2020-04-22T02:34:34
| 2020-04-22T02:34:34
| 257,742,525
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 221
|
java
|
package com.neu.cs5200.buycar.repository;
import org.springframework.data.repository.CrudRepository;
import com.neu.cs5200.buycar.model.Admin;
public interface AdminRepository extends CrudRepository<Admin,Integer>{
}
|
[
"="
] |
=
|
24de64541d457349305eef66bb465b21ea9c9dc3
|
3a06e003b3bca4f64274faba4e77064d3ac50e9b
|
/src/main/java/in/ravikalla/xml_compare/util/ConvertXMLToFullPathInCSV.java
|
6752d891eda510be45b519037b2c07ff37f66809
|
[
"Apache-2.0"
] |
permissive
|
alberpad/xml-compare
|
8f546c2561294948d7f1280955c7f0675600243f
|
d458940764d4f00b983c1caefed519e076c849ba
|
refs/heads/master
| 2022-12-26T01:42:36.650280
| 2020-05-09T21:31:15
| 2020-05-09T21:31:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,966
|
java
|
package in.ravikalla.xml_compare.util;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class ConvertXMLToFullPathInCSV {
private final static Logger logger = Logger.getLogger(ConvertXMLToFullPathInCSV.class);
public static List<String> getFirstLevelOfReapeatingElements(String strXML1, String strXML2) {
List<Node> lstResultNodes = null;
List<String> lstResultNodeNames_Temp = new ArrayList<String>();
List<String> lstResultNodeNames = new ArrayList<String>();
try {
// Create document
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
Document document;
InputStream is = null;
is = new ByteArrayInputStream(strXML1.getBytes());
document = domFactory.newDocumentBuilder().parse(is);
// List of all nodes containing a value
document.getDocumentElement().normalize();
lstResultNodes = getFirstRepeatingAndLeafNodes(document);
// Get list of names from list of nodes
for (Node objNode : lstResultNodes) {
StringBuilder strNodePath = new StringBuilder(objNode.getNodeName());
// Traverse all parents and prepend their names to path
objNode = objNode.getParentNode();
while (objNode.getNodeType() != Node.DOCUMENT_NODE) {
strNodePath.insert(0, objNode.getNodeName() + '/');
objNode = objNode.getParentNode();
}
strNodePath.insert(0, '/');
lstResultNodeNames_Temp = addStringToListIfNotAdded(strNodePath.toString(), lstResultNodeNames_Temp);
}
is = new ByteArrayInputStream(strXML2.getBytes());
document= domFactory.newDocumentBuilder().parse(is);
// List of all nodes containing a value
document.getDocumentElement().normalize();
lstResultNodes = getFirstRepeatingAndLeafNodes(document);
// Get list of names from list of Nodes
for (Node objNode : lstResultNodes) {
StringBuilder strNodePath = new StringBuilder(objNode.getNodeName());
// Traverse all parents and prepend their names to path
objNode = objNode.getParentNode();
while(objNode.getNodeType() != Node.DOCUMENT_NODE) {
strNodePath.insert(0, objNode.getNodeName() + '/');
objNode = objNode.getParentNode();
}
strNodePath.insert(0, '/');
lstResultNodeNames_Temp = addStringToListIfNotAdded(strNodePath.toString(), lstResultNodeNames_Temp);
}
// Convert list to a string with a separator
for (int i=0; i < lstResultNodeNames_Temp.size(); i++) {
lstResultNodeNames.add(lstResultNodeNames_Temp.get(i));
}
} catch (SAXException e) {
logger.error("72 : ConvertXMLToFullPathInCSV.getFirstLevelOfReapeatingElements(...)"
+ " : SAXException e : " + e);
} catch (IOException e) {
logger.error("75 : ConvertXMLToFullPathInCSV.getFirstLevelOfReapeatingElements(...)"
+ " : IOException e : " + e);
} catch (ParserConfigurationException e) {
logger.error("80 : ConvertXMLToFullPathInCSV.getFirstLevelOfReapeatingElements(...)"
+ " : ParserConfigurationException e : " + e);
}
return lstResultNodeNames;
}
private static List<String> addStringToListIfNotAdded(String strToCheck, List<String> lst) {
int intElementPosToReplace = -1;
boolean blnExists = false;
for (int i=0; i < lst.size(); i++) {
if (lst.get(0).indexOf(strToCheck) == 0) {
blnExists = true;
if (lst.get(i).length() > strToCheck.length()) {
intElementPosToReplace = i;
}
break;
}
}
if (-1 != intElementPosToReplace) {
lst.remove(intElementPosToReplace);
if (!blnExists)
lst.add(strToCheck);
}
else if (!blnExists)
lst.add(strToCheck);
return lst;
}
private static List<Node> getFirstRepeatingAndLeafNodes(Node node) {
NodeList lstChildren = node.getChildNodes();
List<Node> lstRepeatingNodes = getRepeatedNodes(lstChildren);
List<Node> lstNonRepeatingNodes = getNonRepeatedNodes(lstChildren, lstRepeatingNodes);
List<Node> lstNonRepeatingLeafNodes = getNonRepeatingLeafNodes(lstNonRepeatingNodes);
List<Node> lstRepeatingAndLeafNodes = new ArrayList<Node>();
lstRepeatingAndLeafNodes.addAll(lstRepeatingNodes);
lstRepeatingAndLeafNodes.addAll(lstNonRepeatingLeafNodes);
List<Node> lstNonRepeatingWithoutLeafNodes = getNonRepeatingWithoutLeafNodes(lstNonRepeatingNodes, lstNonRepeatingLeafNodes);
for (Node objNonRepeatingNonLeafNode : lstNonRepeatingWithoutLeafNodes) {
lstRepeatingAndLeafNodes.addAll(getFirstRepeatingAndLeafNodes(objNonRepeatingNonLeafNode));
}
return lstRepeatingAndLeafNodes;
}
private static List<Node> getNonRepeatingWithoutLeafNodes(List<Node> lstNonRepeatingNodes,
List<Node> lstNonRepeatingLeafNodes) {
List<Node> lstNonRepeatingWithoutLeafNodes = new ArrayList<Node>();
boolean blnNodeIsLeaf;
for (Node objNonRepeatingNode : lstNonRepeatingNodes) {
blnNodeIsLeaf = false;
for (Node objNonRepeatingLeafNode : lstNonRepeatingLeafNodes) {
if (objNonRepeatingNode.getNodeName().equals(objNonRepeatingLeafNode.getNodeName())) {
blnNodeIsLeaf = true;
break;
}
}
if (!blnNodeIsLeaf)
lstNonRepeatingWithoutLeafNodes.add(objNonRepeatingNode);
}
return lstNonRepeatingWithoutLeafNodes;
}
private static List<Node> getNonRepeatingLeafNodes(List<Node> lstNonRepeatingNodes) {
List<Node> lstNonRepeatingLeafNode = new ArrayList<Node> ();
for (Node objNonRepeatingNode : lstNonRepeatingNodes) {
if (isLeafNode(objNonRepeatingNode)) {
lstNonRepeatingLeafNode.add(objNonRepeatingNode);
}
}
return lstNonRepeatingLeafNode;
}
private static boolean isLeafNode(Node objNonRepeatingNode) {
NodeList lst = objNonRepeatingNode.getChildNodes();
return ((lst.getLength() == 1) && (lst.item(0).getNodeType() == Node.TEXT_NODE));
}
private static List<Node> getNonRepeatedNodes(NodeList objNodeList, List<Node> lstRepeatingNodes) {
List<Node> lstNonRepeatedNodes = new ArrayList<Node>();
Node objNodeFromEntireList= null;
boolean blnNodeExistInRepeatingList;
for (int intNodeList_Ctr = 0; intNodeList_Ctr < objNodeList.getLength(); intNodeList_Ctr++) {
objNodeFromEntireList = objNodeList.item(intNodeList_Ctr);
if (objNodeFromEntireList.getNodeType() == Node.ELEMENT_NODE) {
blnNodeExistInRepeatingList = false;
for (Node objNodeFromRepeatingList : lstRepeatingNodes) {
if (objNodeFromEntireList.getNodeName().equals(objNodeFromRepeatingList.getNodeName())) {
blnNodeExistInRepeatingList = true;
break;
}
}
if (!blnNodeExistInRepeatingList)
lstNonRepeatedNodes.add(objNodeFromEntireList);
}
}
return lstNonRepeatedNodes;
}
private static List<Node> getRepeatedNodes(NodeList lstChildren) {
List<Node> lstUnionOfNodes = new ArrayList<Node>();
List<Node> lstRepeatingNodes = new ArrayList<Node>();
Node objNode;
String strNodeName_Temp;
for (int i=0; i < lstChildren.getLength(); i++) {
objNode = lstChildren.item(i);
if (objNode.getNodeType() == Node.ELEMENT_NODE) {
strNodeName_Temp = objNode.getNodeName();
if (nodeExistsInList(strNodeName_Temp, lstUnionOfNodes))
lstRepeatingNodes.add(objNode);
else
lstUnionOfNodes.add(objNode);
}
}
return lstRepeatingNodes;
}
private static boolean nodeExistsInList(String strNodeName_Temp, List<Node> lstUnionOfNodes) {
boolean nodeExistsInList = false;
for (Node objNode_Temp : lstUnionOfNodes) {
if (objNode_Temp.getNodeName().equals(strNodeName_Temp)) {
nodeExistsInList = true;
break;
}
}
return nodeExistsInList;
}
}
|
[
"ravi2523096@gmail.com"
] |
ravi2523096@gmail.com
|
6a655d83d15e5497bb8ce75f759934d759a6ec4c
|
98dd716ab628df8b04e71f7305eaf0f82714ced6
|
/java/client/src/main/java/com/dounine/japi/utils/FileUtil.java
|
3b67e8f27020587e087b9d344b9230757fee12fa
|
[
"MIT"
] |
permissive
|
lijianhu1/japi
|
a9e72cfa8fed34949e187c6bbc3658b50b7fb3e7
|
e2b5546c9abf016081ba8f84f1d61be74c2ff8b2
|
refs/heads/master
| 2021-01-22T15:12:00.768178
| 2017-03-18T08:26:20
| 2017-03-18T08:26:20
| 68,688,839
| 0
| 2
| null | 2016-10-14T06:35:37
| 2016-09-20T08:04:06
|
CSS
|
UTF-8
|
Java
| false
| false
| 1,943
|
java
|
package com.dounine.japi.utils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
/**
* Created by ike on 17-1-17.
*/
public class FileUtil {
public static HttpPost UPLOAD_REQUEST = new HttpPost("http://localhost:8080/interfaceapidoc/upload");
public static String upload(String projectName,String filePathParameter,File uploadFile) {
return upload(projectName,filePathParameter,uploadFile,false);
}
public static String upload(String projectName,String filePathParameter,File uploadFile,boolean returnResult) {
final MultipartEntityBuilder multipartEntity = MultipartEntityBuilder.create();
multipartEntity.setCharset(Charset.forName("utf-8"));
multipartEntity.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
multipartEntity.addPart("projectName", new StringBody(projectName, ContentType.APPLICATION_JSON));
multipartEntity.addPart("filePathParameter", new StringBody(filePathParameter, ContentType.APPLICATION_JSON));
multipartEntity.addBinaryBody("file", uploadFile);
UPLOAD_REQUEST.setEntity(multipartEntity.build());
HttpClient httpClient = HttpClients.createMinimal();
try {
HttpResponse httpResponse = httpClient.execute(UPLOAD_REQUEST);
if(returnResult){
return EntityUtils.toString(httpResponse.getEntity());
}
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}
|
[
"102535481@qq.com"
] |
102535481@qq.com
|
219603d1e11539554a3c57293f931430f7d6edf9
|
774b50fe5091754f23ef556c07a4d1aab56efe27
|
/oag/src/main/java/org/oagis/model/v101/CancelFieldDataAreaType.java
|
695856436c730323659cb288c878e18919c06b9e
|
[] |
no_license
|
otw1248/thirdpartiess
|
daa297c2f44adb1ffb6530f88eceab6b7f37b109
|
4cbc4501443d807121656e47014d70277ff30abc
|
refs/heads/master
| 2022-12-07T17:10:17.320160
| 2022-11-28T10:56:19
| 2022-11-28T10:56:19
| 33,661,485
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,895
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.04.09 at 04:05:45 PM CST
//
package org.oagis.model.v101;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CancelFieldDataAreaType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CancelFieldDataAreaType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Cancel" type="{http://www.openapplications.org/oagis/10}ProcessType"/>
* <element name="Field" type="{http://www.openapplications.org/oagis/10}FieldType" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CancelFieldDataAreaType", propOrder = {
"cancel",
"field"
})
public class CancelFieldDataAreaType {
@XmlElement(name = "Cancel", required = true)
protected ProcessType cancel;
@XmlElement(name = "Field", required = true)
protected List<FieldType> field;
/**
* Gets the value of the cancel property.
*
* @return
* possible object is
* {@link ProcessType }
*
*/
public ProcessType getCancel() {
return cancel;
}
/**
* Sets the value of the cancel property.
*
* @param value
* allowed object is
* {@link ProcessType }
*
*/
public void setCancel(ProcessType value) {
this.cancel = value;
}
/**
* Gets the value of the field property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the field property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getField().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link FieldType }
*
*
*/
public List<FieldType> getField() {
if (field == null) {
field = new ArrayList<FieldType>();
}
return this.field;
}
}
|
[
"otw1248@otw1248.com"
] |
otw1248@otw1248.com
|
ecc7cfe8d82fa3d7787e537a338a8a0f6a795dee
|
8e815c36f8c43b645fc2de89fe474221b0de8f25
|
/ui/src/main/java/io/threesixty/compare/ui/component/DataRecordPanel.java
|
7c77dd8c603e97f092e68e27c610a3799fd4e3fd
|
[] |
no_license
|
markash/komparator
|
3b3ab476d39ddea894f7f2d370ca35d05ab6f2f1
|
a4e2ef50df6d117670cf32fc4e9b8f937f90e784
|
refs/heads/master
| 2022-03-15T15:34:05.748988
| 2019-01-23T19:55:16
| 2019-01-23T19:55:16
| 88,660,207
| 0
| 0
| null | 2022-02-22T09:15:57
| 2017-04-18T18:59:54
|
CSS
|
UTF-8
|
Java
| false
| false
| 3,185
|
java
|
package io.threesixty.compare.ui.component;
import com.vaadin.data.provider.ListDataProvider;
import com.vaadin.ui.Grid;
import io.threesixty.compare.Attribute;
import io.threesixty.compare.DataRecord;
import io.threesixty.compare.DataRecordColumn;
import io.threesixty.compare.DataRecordSet;
import org.vaadin.viritin.layouts.MHorizontalLayout;
import org.vaadin.viritin.layouts.MPanel;
import java.util.ArrayList;
import java.util.List;
/**
* @author Mark P Ashworth
*/
public class DataRecordPanel extends MPanel implements DataRecordProvider {
private List<DataRecord> dataSource = new ArrayList<>();
private ListDataProvider<DataRecord> dataProvider = new ListDataProvider<>(dataSource);
private Grid<DataRecord> grid = new Grid<>(dataProvider);
public DataRecordPanel(final String caption) {
super(caption);
configureDataGrid();
configureDummyColumns();
MHorizontalLayout content =
new MHorizontalLayout(
grid)
.withMargin(false)
.withSpacing(false)
.withFullWidth()
.withFullHeight();
this.setContent(content);
}
public List<DataRecord> getDataRecords() {
return dataSource;
}
public void setDataRecordSet(final DataRecordSet recordSet) {
setColumns(recordSet.getColumns());
setRecords(recordSet.getRecords());
}
private void configureDataGrid() {
grid.setWidth("100%");
grid.setColumnReorderingAllowed(true);
grid.setHeightByRows(5);
}
private void configureDummyColumns() {
List<DataRecordColumn> columns = new ArrayList<>();
columns.add(new DataRecordColumn("Column 1", String.class));
columns.add(new DataRecordColumn("Column 2", String.class));
columns.add(new DataRecordColumn("Column 3", String.class));
setColumns(columns);
}
/**
* Setup the column of the grid
* @param columns The columns of the data record set
*/
private void setColumns(final List<DataRecordColumn> columns) {
grid.removeAllColumns();
Grid.Column<DataRecord, ?> gridColumn;
for (DataRecordColumn column : columns) {
gridColumn = grid.addColumn(dataRecord -> provideValueForAttribute(dataRecord, column));
gridColumn.setCaption(column.getName());
}
}
/**
* Provides the value for the given column of the data record
* @param dataRecord The data record
* @param column The column to provide the value for
* @return The value of the attribute
*/
private Object provideValueForAttribute(DataRecord dataRecord, DataRecordColumn column) {
return dataRecord
.getAttribute(column.getName())
.orElse(Attribute.create(column.getName(), "", column.isKey()))
.getValue();
}
/**
* Setup the data provider of the grid
* @param records The records of the record set
*/
private void setRecords(List<DataRecord> records) {
/* */
dataSource.addAll(records);
dataProvider.refreshAll();
}
}
|
[
"mp.ashworth@gmail.com"
] |
mp.ashworth@gmail.com
|
ab6b40c029e9f328b3baab6b64148486d610c461
|
23a89f503ae4aecd3141bf90a3852e57966c2d8d
|
/src/java/controller/Backend.java
|
ddf79a6ce125b368f141613b3390edaf0b1de5c3
|
[] |
no_license
|
lode1k/Shopnhaccu
|
e9bd6524b89b29bab44217face3a62540b6c309d
|
eb1f72eb5bec1e95b0eb220631bc7b028d81ab5a
|
refs/heads/master
| 2023-03-08T05:07:56.474681
| 2021-02-25T11:35:16
| 2021-02-25T11:35:16
| 342,222,649
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,547
|
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 controller;
import dao.ImplAdmin;
import entity.Admin;
import javax.validation.Valid;
import javax.xml.ws.BindingType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import dao.IAdminDAO;
/**
*
* @author PC
*/
@Controller
public class Backend {
@RequestMapping("/admin")
public String index(Model m){
Admin a = new Admin();
m.addAttribute("admin", a);
return "admin-login";
}
@RequestMapping("/admin-login")
public String login(@Valid @ModelAttribute("admin") Admin a,BindingResult result,Model m){
m.addAttribute("admin",a);
if(result.hasErrors()){
return "admin/admin-login";
}else{
//Thực hiện đăng nhập
IAdminDAO dao = new ImplAdmin();
boolean success = dao.getAdminByParam(a.getUsername(), a.getPassword());
if(!success){
m.addAttribute("msg","Đăng nhập thất bại");
return "admin/admin-login";
}else{
return "admin/admin-home";
}
}
}
}
|
[
"="
] |
=
|
b7f7ef6e5a793dd0db996fdb0adfb4c6afe674ed
|
643d1d9269a8eb87924ac142aac7c890cac4f405
|
/src/main/java/ncis/dsb/stts/use/serv/dao/ServcUseStteDao.java
|
3c60617a38dcd645b1f377348203026beb25703f
|
[] |
no_license
|
jobbs/example
|
e090c1d9233e76e6a928801473e9f2a7c83ca725
|
874be10b39c02081ce2b899b91d1ba7851c4ff23
|
refs/heads/master
| 2020-04-07T08:32:16.566777
| 2018-11-19T12:34:07
| 2018-11-19T12:34:07
| 158,218,294
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,675
|
java
|
/**
* copyright 2016 NCIS Cloud Portal System
* @description
* <pre></pre>
*
* ServcUseStteDao.java
*
* @author 양정순
* @lastmodifier 양정순
* @created 2016. 10. 10
* @lastmodified2016. 10. 10
*
* @history
* -----------------------------------------------------------
* Date author ver Description
* -----------------------------------------------------------
* 2016. 10. 10 양정순 v1.0 최초생성
*
*/
package ncis.dsb.stts.use.serv.dao;
import java.util.List;
import ncis.dsb.stts.use.serv.vo.ServcUseStteSearchVo;
import ncis.dsb.stts.use.serv.vo.ServcUseStteVo;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository("servcUseStteDao")
public class ServcUseStteDao {
@Autowired SqlSessionTemplate sqlSession;
/**
* 클라우드 서비스 이용 현황 목록(가상서버)
* */
public List<ServcUseStteVo> selectServcUseStteList(ServcUseStteSearchVo searchVo){
//return null;
return sqlSession.selectList("ncis.sql.dsb.stts.serv.selectServcUseStteList",searchVo);
}
/**
* 클라우드 서비스 이용 현황 건수
* */
public int selectServcUseStteTotCnt(ServcUseStteSearchVo searchVo){
return sqlSession.selectOne("ncis.sql.dsb.stts.serv.selectServcUseStteTotCnt",searchVo);
}
/**
* 클라우드 서비스 이용 현황 목록(자동확장)
* */
public List<ServcUseStteVo> selectServcUseStteAtmSclList(ServcUseStteSearchVo searchVo){
return sqlSession.selectList("ncis.sql.dsb.stts.serv.selectServcUseStteAtmSclList",searchVo);
}
}
|
[
"jobbs@selim.co.kr"
] |
jobbs@selim.co.kr
|
a6d4f8806a6a22873b2baba37df3694fed98a6df
|
36c0a0e21f3758284242b8d2e40b60c36bd23468
|
/src/main/java/com/datasphere/server/query/druid/funtions/Lookup.java
|
29b87abd6a8655aeeb6dc07c3d10550e7e6671f6
|
[
"LicenseRef-scancode-mulanpsl-1.0-en"
] |
permissive
|
neeeekoooo/datasphere-service
|
0185bca5a154164b4bc323deac23a5012e2e6475
|
cb800033ba101098b203dbe0a7e8b7f284319a7b
|
refs/heads/master
| 2022-11-15T01:10:05.530442
| 2020-02-01T13:54:36
| 2020-02-01T13:54:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,349
|
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.datasphere.server.query.druid.funtions;
import com.google.common.base.Preconditions;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by aladin on 2019. 4. 27..
*/
public class Lookup {
private static final String REPLACEMISSINGVALUEWITH_PARAM = "replaceMissingValueWith";
String namespaceName;
String replaceMissingValueWith;
List<String> keys;
public Lookup(String namespaceName, List<String> keys) {
Preconditions.checkArgument(CollectionUtils.isNotEmpty(keys), "Key required for Lookup function");
this.namespaceName = namespaceName;
this.keys = keys;
}
public Lookup(String namespaceName, String replaceMissingValueWith, List<String> keys) {
Preconditions.checkArgument(CollectionUtils.isNotEmpty(keys), "Key required for Lookup function");
this.namespaceName = namespaceName;
this.replaceMissingValueWith = replaceMissingValueWith;
this.keys = keys;
}
public void setReplaceMissingValueWith(String replaceMissingValueWith) {
this.replaceMissingValueWith = replaceMissingValueWith;
}
public String value() {
StringBuilder builder = new StringBuilder();
builder.append("lookup('")
.append(namespaceName).append("',");
builder.append(StringUtils.join(
keys.stream()
.map(s -> "\"" + s + "\"").collect(Collectors.toList()), ","));
if(StringUtils.isNotEmpty(replaceMissingValueWith)) {
builder.append(",").append(REPLACEMISSINGVALUEWITH_PARAM)
.append("=")
.append("'")
.append(replaceMissingValueWith)
.append("'");
}
builder.append(")");
return builder.toString();
}
}
|
[
"jack_r_ge@126.com"
] |
jack_r_ge@126.com
|
46b431a203fd908893fedf79a915c5e808d5cd2b
|
ba0657f835fe4a2fb0b0524ad2a38012be172bc8
|
/src/main/java/algorithms/chapitres/chap6/portes/PorteImpl.java
|
a22e601a783787a12bf49c9a85c62862ebc1930c
|
[] |
no_license
|
jsdumas/java-dev-practice
|
bc2e29670dd6f1784b3a84f52e526a56a66bbba2
|
db85b830e7927fea863d95f5ea8baf8d3bdc448b
|
refs/heads/master
| 2020-12-02T16:28:41.081765
| 2017-12-08T23:10:53
| 2017-12-08T23:10:53
| 96,547,922
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 406
|
java
|
package algorithms.chapitres.chap6.portes;
public abstract class PorteImpl implements Porte {
boolean entree1, entree2;
@Override
public boolean getEntree1() {
return entree1;
}
@Override
public boolean getEntree2() {
return entree2;
}
@Override
public void setEntree1(boolean valeur) {
entree1 = valeur;
}
@Override
public void setEntree2(boolean valeur) {
entree2 = valeur;
}
}
|
[
"jsdumas@free.fr"
] |
jsdumas@free.fr
|
703cf512995c4c8d758a6c1e30dcb3e906c3ee50
|
7fa4e72b9232202dfb6051769353b64d4645f192
|
/mock-domain/src/main/java/com/cherong/mock/domain/bank/service/impl/CardServiceImpl.java
|
29c8d6026fdaef331c6d56ff7d7e053a5c0fabc1
|
[] |
no_license
|
Sos10086tsj/mock
|
fce967dfa32b8862a1ba9f3592bc23108bc79ca7
|
1afa7d21a722a0e984400f9f65edb14a11bed540
|
refs/heads/master
| 2016-09-13T21:37:51.817954
| 2016-05-18T01:10:36
| 2016-05-18T01:10:36
| 56,492,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,282
|
java
|
package com.cherong.mock.domain.bank.service.impl;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import com.cherong.mock.common.base.jpa.service.BaseServiceImpl;
import com.cherong.mock.domain.api.bank.model.Card;
import com.cherong.mock.domain.api.bank.service.CardService;
import com.cherong.mock.domain.api.bank.vo.CardQueryVo;
import com.cherong.mock.domain.api.serializable.Pagination;
import com.cherong.mock.domain.bank.repository.CardRepository;
/**
* Description:
* Auth:Paris
* Date:Apr 7, 2016
**/
@Service("cardService")
public class CardServiceImpl extends BaseServiceImpl<Card, Long> implements CardService{
@Resource
private CardRepository repository;
@PersistenceContext
private EntityManager em;
@Override
public Card saveCard(Card card) {
return this.repository.save(card);
}
@Override
public Card updateCard(Card card) {
return this.repository.save(card);
}
@Override
public Pagination<Card> findPage(CardQueryVo queryVo, Pageable pageable) {
Page<Card> page = this.repository.findAll(this.getQuerySpecification(queryVo), pageable);
Pagination<Card> pagination = new Pagination<Card>();
pagination.setPageNum(page.getNumber());
pagination.setPageSize(page.getSize());
pagination.setTotal(page.getTotalElements());
pagination.setData(page.getContent());
return pagination;
}
private Specification<Card> getQuerySpecification(final CardQueryVo queryVo) {
Specification<Card> condition = new Specification<Card>() {
@Override
public Predicate toPredicate(Root<Card> root, CriteriaQuery<?> query,
CriteriaBuilder cb) {
List<Predicate> pds = new ArrayList<Predicate>();
if (null != queryVo) {
if (!StringUtils.isEmpty(queryVo.getMdcardno())) {
Predicate p = cb.like(root.get("mdcardno").as(String.class), "%" + queryVo.getMdcardno() + "%");
pds.add(p);
}
}
return cb.and(pds.toArray(new Predicate[] {}));
}
};
return condition;
}
@Override
public List<Card> findByMdcardnoLike(String mdcardno) {
return this.repository.findByMdcardnoLike(mdcardno);
}
@Override
public List<Card> findAll() {
return this.repository.findAll();
}
@Override
public Card findByMdcardno(String mdcardno) {
return this.repository.findByMdcardno(mdcardno);
}
@SuppressWarnings("unchecked")
@Override
public List<Card> findAllFqCard() {
StringBuffer sqlBuffer = new StringBuffer();
sqlBuffer.append(" select bc.* from ")
.append(" bank_card bc, ")
.append(" bank_card_fq bcf ")
.append(" where bcf.mdcardno = bc.mdcardno ")
.append(" and bcf.leftnum != 0 ");
Query query = em.createNativeQuery(sqlBuffer.toString(), Card.class);
return query.getResultList();
}
}
|
[
"paristao1989@gmail.com"
] |
paristao1989@gmail.com
|
cd36abe4804676cdb0a6ad824de3460ac3465dbf
|
db3039c10729e23b0c365e7a8eda9e151b2e3754
|
/src/cn/fox/nlp/ChinesePos.java
|
1006d63e2813f72b36358fdcae31615754df4012
|
[] |
no_license
|
cmingwhu/FoxNlpToolKit
|
5130d34690331695c74e3bd231dd6c93c38deef4
|
e2c746e693c16edc5f82bbd0335d91ffe31203fc
|
refs/heads/master
| 2020-06-13T15:41:55.274742
| 2016-07-01T02:53:29
| 2016-07-01T02:53:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,938
|
java
|
package cn.fox.nlp;
public class ChinesePos {
// with chinese-distsim.tagger set, it's similar with Chinese TreeBank Tag Set
public enum Type {
ADVERB(1),NOUN(2), VERB(3),NUMBER(4),PARTICLE(5),PRONOUN(6), CONJ(7),MEASURE(8),PUNCTUATION(9), LOCALIZER(10),
DETERMINER(11),NOUN_MODIFIER(12), INTERJECTION(13),PREP(14), URL(15),BA(16),BEI(17),OTHER(18);
private int _value;
private Type(int value)
{
_value = value;
}
public int value()
{
return _value;
}
}
// we only capture the very explicit and meaningful pos
public static Type getType(String pos) {
if(pos.equals("NR") || pos.equals("NN") || pos.equals("NT")) return Type.NOUN; // 名词
else if(pos.equals("VA") || pos.equals("VC") || pos.equals("VE") || pos.equals("VV")) return Type.VERB; // 动词
else if(pos.equals("AS") /*着*/ || pos.indexOf("DE") != -1 /*的*/ || pos.equals("ETC")/*等等*/ || pos.equals("SP")/*句子结尾分词,吗*/)
return Type.PARTICLE;
else if(pos.equals("PN")) return Type.PRONOUN; // 代词
else if(pos.equals("DT")) return Type.DETERMINER; // 这
else if(pos.equals("JJ")) return Type.NOUN_MODIFIER; // 修饰名词的前缀
else if(pos.equals("P")) return Type.PREP; // 介词
else if(pos.equals("BA"))
return Type.BA; // 把
else if(pos.equals("LB") || pos.equals("SB"))
return Type.BEI; // 被
else if(pos.equals("AD")) return Type.ADVERB; // 副词
else if(pos.equals("LC")) return Type.LOCALIZER; // 里 外
else if(pos.equals("CD") || pos.equals("OD"))
return Type.NUMBER; // 数词
else if(pos.equals("M")) return Type.MEASURE; // 量词
else if(pos.equals("CC") || pos.equals("CS"))
return Type.CONJ; // 连词
else if(pos.equals("PU")) return Type.PUNCTUATION; // 标点符号
else if(pos.equals("IJ"))
return Type.INTERJECTION; // 感叹词
else if(pos.equals("URL")) return Type.URL; // 网址
else return Type.OTHER;
}
}
|
[
"foxlf823@qq.com"
] |
foxlf823@qq.com
|
857c3408a93eb2e619a744505d21113f3146ac5b
|
012e9bd5bfbc5ceca4e36af55a7ddf4fce98b403
|
/code/app/src/main/java/com/yzb/card/king/ui/app/base/BasePresenter.java
|
90fb440da5c3bccd1886df3a6fb9916449c441fb
|
[] |
no_license
|
litliang/ms
|
a7152567c2f0e4d663efdda39503642edd33b4b6
|
d7483bc76d43e060906c47acc1bc2c3179838249
|
refs/heads/master
| 2021-09-01T23:51:50.934321
| 2017-12-29T07:30:49
| 2017-12-29T07:30:49
| 115,697,248
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 250
|
java
|
package com.yzb.card.king.ui.app.base;
import java.util.Map;
/**
* 功能:Presenter 基类;
*
* @author:gengqiyun
* @date: 2016/9/14
*/
public interface BasePresenter
{
void loadData(boolean event_tag, Map<String, Object> paramMap);
}
|
[
"864631546@qq.com"
] |
864631546@qq.com
|
bb12d6bb69f976dcdacaa006cf2b46849e7d3772
|
573e7ed07456a35209af6967e5266a904ba7389e
|
/src/main/java/com/vilin/thread/HungerySingleton.java
|
8e0c0d305ac427704a7d9101541f95e7a84ecf4b
|
[] |
no_license
|
guangyongluo/JavaNewFeatrues
|
28732d1233d85363431f255e1a8661c1550f5e7a
|
5809e8086a54c62bc5fd4858a36129299f478fd7
|
refs/heads/master
| 2022-12-21T11:46:11.768552
| 2022-12-12T10:42:28
| 2022-12-12T10:42:28
| 224,560,625
| 0
| 2
| null | 2022-03-31T18:40:45
| 2019-11-28T03:13:46
|
Java
|
UTF-8
|
Java
| false
| false
| 671
|
java
|
package com.vilin.thread;
public class HungerySingleton {
//加载的时候就产生实例对象
private static HungerySingleton instance = new HungerySingleton();
private HungerySingleton(){
}
//返回实例对象
public static HungerySingleton getInstance(){
return instance;
}
public static void main(String[] args) {
// HungerySingleton hungerySingleton = HungerySingleton.getInstance();
// System.out.println(hungerySingleton);
for(int i = 0; i < 20; i++){
new Thread(() -> {
System.out.println(HungerySingleton.getInstance());
}).start();
}
}
}
|
[
"llooww@mail.ustc.edu.cn"
] |
llooww@mail.ustc.edu.cn
|
c0f7d162b4c3f1a59d2782466a5caa7548e929f2
|
15ae8d4bd9e1085e0ba7a54beae2f0c126a2dce4
|
/src/company/lianjia/exam/p2/Main.java
|
b1ce8f2dac78b0bd61a1e062db37dcd02b8b532a
|
[] |
no_license
|
qdh0520/Algorithm
|
aae9cc61cc020ba371afe4e638bdb5bff11150cf
|
40f626d95eb877005149631d4ffc228b2829cc89
|
refs/heads/master
| 2020-07-06T12:23:23.300710
| 2019-09-19T14:50:29
| 2019-09-19T14:50:29
| 203,016,025
| 1
| 0
| null | 2019-08-18T14:32:46
| 2019-08-18T14:32:45
| null |
UTF-8
|
Java
| false
| false
| 959
|
java
|
package company.lianjia.exam.p2;
import java.util.Scanner;
/**
* Created by Dell on 2017-08-19.
*/
public class Main {
public static void main(String[] args){
Scanner in=new Scanner(System.in);
while(in.hasNextInt()) {
int n = in.nextInt();
int[] arr=new int[n];
arr[0]=in.nextInt();
for(int i=1;i<n;i++) {
arr[i]=in.nextInt()+arr[i-1];
}
int q = in.nextInt();
int[] query=new int[q];
for(int i=0;i<q;i++) {
query[i]=in.nextInt();
}
for(int i=1;i<n;i++) {
System.out.print(arr[i] +" ");
}
System.out.println();
for(int i=0;i<q;i++){
int j=0;
while(j<arr.length&&query[i]>arr[j]){
j++;
}
System.out.println(j+1);
}
}
}
}
|
[
"18103412880@163.com"
] |
18103412880@163.com
|
7b4d716a04d0d9c1dc840c646a050c8069e69cf3
|
595e95bc2423550ce402f15dfccbbf89c74c044b
|
/src/com/wip/_1/_3/UVA11956.java
|
c1bc713cdbe1f5ffb62066b7eb394f80ff188066
|
[] |
no_license
|
willsaibott/competitive-programming-java
|
71c7b8e7a55b9f14012f0615684b3b2b4cc40a5d
|
5162c1d13082c072e5bc03ed6229f92c53193fc4
|
refs/heads/master
| 2021-06-08T16:00:03.158106
| 2020-03-31T23:09:15
| 2020-03-31T23:09:15
| 115,653,835
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,845
|
java
|
package com.wip._1._3;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import static com.wip.Utils.defineInputMethod;
/**
* In order to submit it in uva judge platform, remove the public modifier from the
* class declaration, rename the class to Main and remove the package declaration
*/
public class UVA11956 {
public static void main(String[] args) throws IOException {
defineInputMethod(UVA11956.class);
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
String line;
int k = 0;
int testCases = Integer.parseInt(bf.readLine());
while ((line = bf.readLine()) != null) {
char[] program = line.toCharArray();
byte[] memory = new byte[100];
int pointer = 0;
for (char inst : program)
{
switch (inst)
{
case '+':
memory[pointer]++;
break;
case '-':
memory[pointer]--;
break;
case '>':
pointer = (pointer + 1) % 100;
break;
case '<':
pointer--;
if (pointer < 0)
pointer = 99;
break;
default:
break;
}
}
StringBuilder sb = new StringBuilder();
for (byte b : memory)
{
sb.append(String.format("%02X ", b));
}
System.out.printf("Case %d: %s\n", ++k, sb.toString().trim());
}
}
}
|
[
"="
] |
=
|
0d7d38f8dcde5fe67e302139535d00a652e6d7ec
|
a6bbde70f364405987af91c52c9258ebc2c814fd
|
/src/main/java/com/kyrostechnologies/crm/model/ReminderTypeModel.java
|
7db5b317340b15a1fa3f4d2a6fe6c8c7700b7f66
|
[] |
no_license
|
Arasu378/CRMSpringBoot
|
5358318e02f9572f62cb53328d727efb0e587d1c
|
a2e76fbae12e12caa795ed0c1a489f0a44e10f02
|
refs/heads/master
| 2021-08-24T00:53:56.483556
| 2017-12-07T10:04:21
| 2017-12-07T10:04:21
| 111,690,269
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,465
|
java
|
package com.kyrostechnologies.crm.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlElement;
@Entity
@Table(name="settings.remindertype")
public class ReminderTypeModel implements Serializable{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@JsonProperty("ReminderTypeId")
private int reminderTypeId;
@JsonProperty("ReminderTypeName")
private String reminderTypeName;
@JsonProperty("IsActive")
private boolean isActive;
@JsonProperty("CreatedDate")
private String createdDate;
@JsonProperty("ModifiedDate")
private String modifiedDate;
public ReminderTypeModel(){
}
public int getReminderTypeId() {
return reminderTypeId;
}
public void setReminderTypeId(int reminderTypeId) {
this.reminderTypeId = reminderTypeId;
}
public String getReminderTypeName() {
return reminderTypeName;
}
public void setReminderTypeName(String reminderTypeName) {
this.reminderTypeName = reminderTypeName;
}
public boolean getIsActive() {
return isActive;
}
public void setIsActive(boolean isActive) {
this.isActive = isActive;
}
public String getCreatedDate() {
return createdDate;
}
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
public String getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(String modifiedDate) {
this.modifiedDate = modifiedDate;
}
}
|
[
"info@kyrostechnologies.com"
] |
info@kyrostechnologies.com
|
90758a16a5701766f22ce43c94fdfd272744350b
|
3e611373d2ff48dbffc25ca367c0f0e3e51e2f90
|
/AE_MQL_WS/MQLApplication/org.MQLApplication.ui/src-gen/org/xtext/ui/MQLExecutableExtensionFactory.java
|
3196788ed19285f7059a9f150317901a3b3bab2e
|
[] |
no_license
|
Racheast/AE_MQL
|
999fbd74a15261006fe8f3a0e2fdc1323b05c0a5
|
3f94f6d41986ae3786ae4291736b11f0750e6091
|
refs/heads/master
| 2020-04-26T08:53:49.746321
| 2019-06-01T10:13:26
| 2019-06-01T10:13:26
| 173,438,094
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 860
|
java
|
/*
* generated by Xtext 2.14.0
*/
package org.xtext.ui;
import com.google.inject.Injector;
import org.MQLApplication.ui.internal.MQLApplicationActivator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
import org.osgi.framework.Bundle;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class MQLExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
@Override
protected Bundle getBundle() {
return Platform.getBundle(MQLApplicationActivator.PLUGIN_ID);
}
@Override
protected Injector getInjector() {
MQLApplicationActivator activator = MQLApplicationActivator.getInstance();
return activator != null ? activator.getInjector(MQLApplicationActivator.ORG_XTEXT_MQL) : null;
}
}
|
[
"e1128978@student.tuwien.ac.at"
] |
e1128978@student.tuwien.ac.at
|
13deeb6dfb6ab9a91468a160baafcd84b49cae6c
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2018/4/ForcedSecondaryUnitRecordFormat.java
|
39d21196c650c651d180aa38a45d0298b245fb46
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 2,949
|
java
|
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.store.format;
import java.io.IOException;
import org.neo4j.io.pagecache.PageCursor;
import org.neo4j.kernel.impl.store.StoreHeader;
import org.neo4j.kernel.impl.store.id.IdSequence;
import org.neo4j.kernel.impl.store.record.AbstractBaseRecord;
import org.neo4j.kernel.impl.store.record.RecordLoad;
public class ForcedSecondaryUnitRecordFormat<RECORD extends AbstractBaseRecord> implements RecordFormat<RECORD>
{
private final RecordFormat<RECORD> actual;
public ForcedSecondaryUnitRecordFormat( RecordFormat<RECORD> actual )
{
this.actual = actual;
}
@Override
public RECORD newRecord()
{
return actual.newRecord();
}
@Override
public int getRecordSize( StoreHeader storeHeader )
{
return actual.getRecordSize( storeHeader );
}
@Override
public int getRecordHeaderSize()
{
return actual.getRecordHeaderSize();
}
@Override
public boolean isInUse( PageCursor cursor )
{
return actual.isInUse( cursor );
}
@Override
public void read( RECORD record, PageCursor cursor, RecordLoad mode, int recordSize ) throws IOException
{
actual.read( record, cursor, mode, recordSize );
}
@Override
public void prepare( RECORD record, int recordSize, IdSequence idSequence )
{
actual.prepare( record, recordSize, idSequence );
if ( !record.hasSecondaryUnitId() )
{
record.setSecondaryUnitId( idSequence.nextId() );
}
}
@Override
public void write( RECORD record, PageCursor cursor, int recordSize ) throws IOException
{
actual.write( record, cursor, recordSize );
}
@Override
public long getNextRecordReference( RECORD record )
{
return actual.getNextRecordReference( record );
}
@Override
public boolean equals( Object otherFormat )
{
return actual.equals( otherFormat );
}
@Override
public int hashCode()
{
return actual.hashCode();
}
@Override
public long getMaxId()
{
return actual.getMaxId();
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
3a36f025e5f3c81faecd22f67ebb9f476d2b94b9
|
946e853c88517e7a89e785ef91b8e5a782854e46
|
/contribs/taxi/src/main/java/org/matsim/contrib/taxi/schedule/TaxiEmptyDriveTask.java
|
73e37f8e91b5cca577196a1743e4511a4ae62570
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
strawrange/matsim
|
75922dd23ed8ed1ad54dc16e03e6a0bfe7f7c17e
|
8a37ba8e22cebab0df6de2ab8e336735ed93dabe
|
refs/heads/master
| 2020-06-18T02:03:06.435016
| 2017-11-17T00:19:38
| 2017-11-17T00:19:38
| 74,963,647
| 1
| 0
| null | 2016-11-28T10:48:36
| 2016-11-28T10:48:36
| null |
UTF-8
|
Java
| false
| false
| 1,927
|
java
|
/* *********************************************************************** *
* project: org.matsim.*
* *
* *********************************************************************** *
* *
* copyright : (C) 2013 by the members listed in the COPYING, *
* LICENSE and WARRANTY file. *
* email : info at matsim dot org *
* *
* *********************************************************************** *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* See also COPYING, LICENSE and WARRANTY file *
* *
* *********************************************************************** */
package org.matsim.contrib.taxi.schedule;
import org.matsim.contrib.dvrp.path.VrpPathWithTravelData;
import org.matsim.contrib.dvrp.schedule.DriveTaskImpl;
public class TaxiEmptyDriveTask
extends DriveTaskImpl
implements TaxiTask
{
public TaxiEmptyDriveTask(VrpPathWithTravelData path)
{
super(path);
}
@Override
public TaxiTaskType getTaxiTaskType()
{
return TaxiTaskType.EMPTY_DRIVE;
}
@Override
protected String commonToString()
{
return "[" + getTaxiTaskType().name() + "]" + super.commonToString();
}
}
|
[
"michal.mac@gmail.com"
] |
michal.mac@gmail.com
|
28248a59e0428216fb5fa0f52f651e275fd26474
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/21/21_610a99032cd4a5dfb440b65fb4b2cc8ff6a74a02/Max/21_610a99032cd4a5dfb440b65fb4b2cc8ff6a74a02_Max_t.java
|
3bab86a56fe96c78e57a328d68a317f34cce21f9
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,308
|
java
|
/******************************************************************
* File: Max.java
* Created by: Dave Reynolds
* Created on: 22-Sep-2003
*
* (c) Copyright 2003, Hewlett-Packard Company, all rights reserved.
* [See end of file]
* $Id: Max.java,v 1.2 2003-09-22 15:35:04 der Exp $
*****************************************************************/
package com.hp.hpl.jena.reasoner.rulesys.builtins;
import com.hp.hpl.jena.reasoner.rulesys.*;
import com.hp.hpl.jena.graph.*;
/**
* Bind the third arg to the max of the first two args.
*
* @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
* @version $Revision: 1.2 $ on $Date: 2003-09-22 15:35:04 $
*/
public class Max extends BaseBuiltin {
/**
* Return a name for this builtin, normally this will be the name of the
* functor that will be used to invoke it.
*/
public String getName() {
return "max";
}
/**
* Return the expected number of arguments for this functor or 0 if the number is flexible.
*/
public int getArgLength() {
return 3;
}
/**
* This method is invoked when the builtin is called in a rule body.
* @param args the array of argument values for the builtin, this is an array
* of Nodes, some of which may be Node_RuleVariables.
* @param length the length of the argument list, may be less than the length of the args array
* for some rule engines
* @param context an execution context giving access to other relevant data
* @return return true if the buildin predicate is deemed to have succeeded in
* the current environment
*/
public boolean bodyCall(Node[] args, int length, RuleContext context) {
checkArgs(length, context);
BindingEnvironment env = context.getEnv();
Node n1 = args[0];
Node n2 = args[1];
if (n1.isLiteral() && n2.isLiteral()) {
Object v1 = n1.getLiteral().getValue();
Object v2 = n2.getLiteral().getValue();
Node res = null;
if (v1 instanceof Number && v2 instanceof Number) {
Number nv1 = (Number)v1;
Number nv2 = (Number)v2;
if (v1 instanceof Float || v1 instanceof Double
|| v2 instanceof Float || v2 instanceof Double) {
res = (nv1.doubleValue() > nv2.doubleValue()) ? n1 : n2;
} else {
res = (nv1.longValue() > nv2.longValue()) ? n1 : n2;
}
env.bind(args[2], res);
return true;
}
}
// Doesn't (yet) handle partially bound cases
return false;
}
}
/*
(c) Copyright Hewlett-Packard Company 2003
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
*/
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
c44199e161aa3ef515d745157f08790b5bd17f6b
|
bc82a2a61c065fc74e26d3910ab6f9fbb52306e2
|
/ureport2-core/src/main/java/com/bstek/ureport/expression/function/math/ChnFunction.java
|
3e3398b5e7f6eaba768755f8e72516e0bc04e48c
|
[
"Apache-2.0"
] |
permissive
|
seebeyond/ureport
|
5a3e45bb2846e367dca084ccb3aa7f29e63d4a14
|
c8296c580ab121ef010f97f630501267be0f33cd
|
refs/heads/master
| 2021-01-01T19:43:46.289229
| 2017-07-27T07:22:12
| 2017-07-27T07:22:12
| 98,659,330
| 1
| 0
| null | 2017-07-28T14:49:20
| 2017-07-28T14:49:20
| null |
UTF-8
|
Java
| false
| false
| 3,278
|
java
|
/*******************************************************************************
* Copyright 2017 Bstek
*
* 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.bstek.ureport.expression.function.math;
import java.math.BigDecimal;
import java.util.List;
import com.bstek.ureport.Utils;
import com.bstek.ureport.build.Context;
import com.bstek.ureport.exception.ReportComputeException;
import com.bstek.ureport.expression.model.data.ExpressionData;
import com.bstek.ureport.expression.model.data.ObjectExpressionData;
import com.bstek.ureport.model.Cell;
/**
* @author Jacky.gao
* @since 2017年1月23日
*/
public class ChnFunction extends MathFunction {
private static final char[] cnNumbers = { '零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖' };
private static final String[] series = { "" , "拾", "佰", "仟", "万", "拾", "佰","仟", "亿" , "拾", "佰", "仟" , "万" , "拾", "佰" , "仟"};
@Override
public Object execute(List<ExpressionData<?>> dataList, Context context,Cell currentCell) {
BigDecimal data = buildBigDecimal(dataList);
int type=0;
if(dataList.size()==2){
ExpressionData<?> exprData=dataList.get(1);
if(exprData instanceof ObjectExpressionData){
ObjectExpressionData objData=(ObjectExpressionData)exprData;
Object obj=objData.getData();
if(obj==null){
throw new ReportComputeException("Pow Function second parameter can not be null.");
}
type=Utils.toBigDecimal(obj).intValue();
}
}
return buildChnString(data.toString(), type);
}
@Override
public String name() {
return "chn";
}
public String buildChnString(String original,int type) {
String integerPart = "";
String floatPart = "";
if (original.contains(".")) {
int dotIndex = original.indexOf(".");
integerPart = original.substring(0, dotIndex);
floatPart = original.substring(dotIndex + 1);
} else {
integerPart = original;
}
if(integerPart.length()>16){
throw new ReportComputeException("Chn function max support 16 bit integer,current is "+integerPart+"");
}
StringBuffer sb = new StringBuffer();
for (int i = 0; i < integerPart.length(); i++) {
int number = getNumber(integerPart.charAt(i));
char num=cnNumbers[number];
sb.append(num);
if(type==0){
String unit=series[integerPart.length() -1 - i];
sb.append(unit);
}
}
if (floatPart.length() > 0) {
sb.append("点");
for (int i = 0; i < floatPart.length(); i++) {
int number = getNumber(floatPart.charAt(i));
sb.append(cnNumbers[number]);
}
}
return sb.toString();
}
private int getNumber(char c) {
String str = String.valueOf(c);
return Integer.parseInt(str);
}
}
|
[
"jacky6024@sina.com"
] |
jacky6024@sina.com
|
611b44232e227856b4aca8f4dab8d3b13c58be51
|
8a5336e535a47af949a6041bd734fee7b054571f
|
/modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/entity/DeadLetterJobEntityManager.java
|
9c94c7246ac6da1e6bd70a8516d491802566d27b
|
[
"Apache-2.0"
] |
permissive
|
robsoncardosoti/flowable-engine
|
ad4628b21d7d13104acf25edd78c13bef50c4546
|
2343cb36c35f8476d935565cdab8de1d3b6d1ddd
|
refs/heads/master
| 2021-01-20T03:47:47.373132
| 2017-06-19T16:11:07
| 2017-06-19T16:11:07
| 89,585,359
| 1
| 0
| null | 2017-06-19T16:11:08
| 2017-04-27T10:23:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,813
|
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 org.flowable.engine.impl.persistence.entity;
import java.util.List;
import org.flowable.engine.common.impl.Page;
import org.flowable.engine.common.impl.persistence.entity.EntityManager;
import org.flowable.engine.impl.DeadLetterJobQueryImpl;
import org.flowable.engine.impl.JobQueryImpl;
import org.flowable.engine.runtime.Job;
/**
* @author Tijs Rademakers
*/
public interface DeadLetterJobEntityManager extends EntityManager<DeadLetterJobEntity> {
/**
* Returns all {@link DeadLetterJobEntity} instances related to on {@link ExecutionEntity}.
*/
List<DeadLetterJobEntity> findJobsByExecutionId(String id);
/**
* Executes a {@link JobQueryImpl} and returns the matching {@link DeadLetterJobEntity} instances.
*/
List<Job> findJobsByQueryCriteria(DeadLetterJobQueryImpl jobQuery, Page page);
/**
* Same as {@link #findJobsByQueryCriteria(DeadLetterJobQueryImpl, Page)}, but only returns a count and not the instances itself.
*/
long findJobCountByQueryCriteria(DeadLetterJobQueryImpl jobQuery);
/**
* Changes the tenantId for all jobs related to a given {@link DeploymentEntity}.
*/
void updateJobTenantIdForDeployment(String deploymentId, String newTenantId);
}
|
[
"tijs.rademakers@gmail.com"
] |
tijs.rademakers@gmail.com
|
bea9211bfacbd051b2880c3a2a8bd7664526e15f
|
6d9dd7de3c2fbc18ab0cad7bae0fbd13c2fd0178
|
/ezyhttp-server-core/src/test/java/com/tvd12/ezyhttp/server/core/test/handler/RequestHandlerTest.java
|
5d207313688920c8548b7481597605a13b8c516e
|
[
"Apache-2.0"
] |
permissive
|
youngmonkeys/ezyhttp
|
e0db664fb3523b2202ccbb308682cae9f99fb81e
|
78f6752ad8127f0f0a81ce34b23eb1b13c60155b
|
refs/heads/master
| 2023-08-29T08:01:56.708829
| 2023-08-13T14:28:49
| 2023-08-13T14:28:49
| 226,145,856
| 10
| 6
|
Apache-2.0
| 2023-08-06T02:45:42
| 2019-12-05T16:38:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,011
|
java
|
package com.tvd12.ezyhttp.server.core.test.handler;
import org.testng.annotations.Test;
import com.tvd12.ezyhttp.core.constant.HttpMethod;
import com.tvd12.ezyhttp.server.core.handler.RequestHandler;
import com.tvd12.ezyhttp.server.core.request.RequestArguments;
public class RequestHandlerTest {
@Test
public void test() {
// given
ExRequestHandler handler = new ExRequestHandler();
// when
// then
handler.setController(null);
handler.setHandlerMethod(null);
}
private static class ExRequestHandler implements RequestHandler {
@Override
public Object handle(RequestArguments arguments) {
return null;
}
@Override
public HttpMethod getMethod() {
return null;
}
@Override
public String getRequestURI() {
return null;
}
@Override
public String getResponseContentType() {
return null;
}
}
}
|
[
"itprono3@gmail.com"
] |
itprono3@gmail.com
|
d38520bf51c3243116e22dbe69d954e0684f794f
|
4c94eb1819a753c90eb9df9cc8f52849fe51a3e1
|
/com/planet_ink/coffee_mud/Abilities/Thief/Thief_Embezzle.java
|
57507466c81a7308c96a6b8611ac25fffeb0ca5b
|
[
"Apache-2.0"
] |
permissive
|
oriontribunal/CoffeeMud
|
2bee11999827561e72c837f174091630b5ea199f
|
95dc9fa54a609b6fce86545addef059a145a412d
|
refs/heads/master
| 2021-01-18T12:34:38.521119
| 2016-05-06T14:41:42
| 2016-05-06T14:41:42
| 57,451,290
| 0
| 0
| null | 2016-05-06T14:41:43
| 2016-04-30T16:22:41
|
Java
|
UTF-8
|
Java
| false
| false
| 8,009
|
java
|
package com.planet_ink.coffee_mud.Abilities.Thief;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2003-2016 Bo Zimmerman
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.
*/
public class Thief_Embezzle extends ThiefSkill
{
@Override public String ID() { return "Thief_Embezzle"; }
private final static String localizedName = CMLib.lang().L("Embezzle");
@Override public String name() { return localizedName; }
@Override public String displayText(){return "";}
@Override protected int canAffectCode(){return CAN_MOBS;}
@Override protected int canTargetCode(){return CAN_MOBS;}
@Override public int abstractQuality(){return Ability.QUALITY_MALICIOUS;}
private static final String[] triggerStrings =I(new String[] {"EMBEZZLE"});
@Override public String[] triggerStrings(){return triggerStrings;}
@Override public int classificationCode() { return Ability.ACODE_SKILL|Ability.DOMAIN_CRIMINAL; }
@Override protected boolean disregardsArmorCheck(MOB mob){return true;}
public List<MOB> mobs=new Vector<MOB>();
private final LinkedList<Pair<MOB,Integer>> lastOnes=new LinkedList<Pair<MOB,Integer>>();
protected int timesPicked(MOB target)
{
int times=0;
for(final Iterator<Pair<MOB,Integer>> p=lastOnes.iterator();p.hasNext();)
{
final Pair<MOB,Integer> P=p.next();
final MOB M=P.first;
final Integer I=P.second;
if(M==target)
{
times=I.intValue();
p.remove();
break;
}
}
if(lastOnes.size()>=50)
lastOnes.removeFirst();
lastOnes.add(new Pair<MOB,Integer>(target,Integer.valueOf(times+1)));
return times+1;
}
@Override
public boolean okMessage(final Environmental myHost, final CMMsg msg)
{
if((msg.amITarget(affected))
&&(mobs.contains(msg.source())))
{
if((msg.targetMinor()==CMMsg.TYP_BUY)
||(msg.targetMinor()==CMMsg.TYP_BID)
||(msg.targetMinor()==CMMsg.TYP_SELL)
||(msg.targetMinor()==CMMsg.TYP_LIST)
||(msg.targetMinor()==CMMsg.TYP_VALUE)
||(msg.targetMinor()==CMMsg.TYP_VIEW))
{
msg.source().tell(L("@x1 looks unwilling to do business with you.",affected.name()));
return false;
}
}
return super.okMessage(myHost,msg);
}
@Override
public int castingQuality(MOB mob, Physical target)
{
if(mob!=null)
{
if(mob.isInCombat())
return Ability.QUALITY_INDIFFERENT;
}
return super.castingQuality(mob,target);
}
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
if((commands.size()<1)&&(givenTarget==null))
{
mob.tell(L("Embezzle money from whose accounts?"));
return false;
}
MOB target=null;
if((givenTarget!=null)&&(givenTarget instanceof MOB))
target=(MOB)givenTarget;
else
target=mob.location().fetchInhabitant(CMParms.combine(commands,0));
if((target==null)||(target.amDead())||(!CMLib.flags().canBeSeenBy(target,mob)))
{
mob.tell(L("You don't see '@x1' here.",CMParms.combine(commands,1)));
return false;
}
if(!(target instanceof Banker))
{
mob.tell(L("You can't embezzle from @x1's accounts.",target.name(mob)));
return false;
}
if(mob.isInCombat())
{
mob.tell(L("You are too busy to embezzle."));
return false;
}
final Banker bank=(Banker)target;
final Ability A=target.fetchEffect(ID());
if(A!=null)
{
mob.tell(L("@x1 is watching @x2 books too closely.",target.name(mob),target.charStats().hisher()));
return false;
}
final int levelDiff=target.phyStats().level()-(mob.phyStats().level()+(2*getXLEVELLevel(mob)));
if(!target.mayIFight(mob))
{
mob.tell(L("You cannot embezzle from @x1.",target.charStats().himher()));
return false;
}
Item myCoins=null;
String myAcct=mob.Name();
if(bank.isSold(ShopKeeper.DEAL_CLANBANKER))
{
Pair<Clan,Integer> clanPair=CMLib.clans().findPrivilegedClan(mob, Clan.Function.WITHDRAW);
if(clanPair == null)
clanPair=CMLib.clans().findPrivilegedClan(mob, Clan.Function.DEPOSIT_LIST);
if(clanPair == null)
clanPair=CMLib.clans().findPrivilegedClan(mob, Clan.Function.DEPOSIT);
if(clanPair!=null)
myAcct=clanPair.first.clanID();
}
myCoins=bank.findDepositInventory(myAcct,"1");
if((myCoins==null)||(!(myCoins instanceof Coins)))
{
mob.tell(L("You don't have your own account with @x1.",target.name(mob)));
return false;
}
final List<String> accounts=bank.getAccountNames();
String victim="";
int tries=0;
Coins hisCoins=null;
double hisAmount=0;
while((hisCoins==null)&&((++tries)<10))
{
final String possVic=accounts.get(CMLib.dice().roll(1,accounts.size(),-1));
final Item C=bank.findDepositInventory(possVic,"1");
if((C!=null)
&&(C instanceof Coins)
&&((((Coins)C).getTotalValue()/50.0)>0.0)
&&(!mob.Name().equals(possVic)))
{
hisCoins=(Coins)C;
victim=possVic;
hisAmount=hisCoins.getTotalValue()/50.0;
}
}
final int classLevel=CMLib.ableMapper().qualifyingClassLevel(mob,this)+(2*getXLEVELLevel(mob));
if((classLevel>0)
&&(Math.round(hisAmount)>(1000*(classLevel)+(2*getXLEVELLevel(mob)))))
hisAmount=1000l*(classLevel+(2l*getXLEVELLevel(mob)));
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,(-(levelDiff+(timesPicked(mob)*50))),auto);
if((success)&&(hisAmount>0)&&(hisCoins!=null))
{
final String str=L("<S-NAME> embezzle(s) @x1 from the @x2 account maintained by <T-NAME>.",CMLib.beanCounter().nameCurrencyShort(target,hisAmount),victim);
final CMMsg msg=CMClass.getMsg(mob,target,this,(auto?CMMsg.MASK_ALWAYS:0)|CMMsg.MSG_THIEF_ACT,str,null,str);
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
beneficialAffect(mob,target,asLevel,(int)(((CMProps.getMillisPerMudHour()*mob.location().getArea().getTimeObj().getHoursInDay()*mob.location().getArea().getTimeObj().getDaysInMonth())/CMProps.getTickMillis())));
bank.delDepositInventory(victim,hisCoins);
hisCoins=CMLib.beanCounter().makeBestCurrency(target,hisCoins.getTotalValue()-(hisAmount/3.0));
if(hisCoins.getNumberOfCoins()>0)
bank.addDepositInventory(victim,hisCoins,null);
bank.delDepositInventory(myAcct,myCoins);
myCoins=CMLib.beanCounter().makeBestCurrency(mob,((Coins)myCoins).getTotalValue()+hisAmount);
if(((Coins)myCoins).getNumberOfCoins()>0)
bank.addDepositInventory(myAcct,myCoins,null);
}
}
else
maliciousFizzle(mob,target,L("<T-NAME> catch(es) <S-NAME> trying to embezzle money!"));
return success;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
de5a4f523674093e655256bba9207932d371a812
|
f9b2ccbd0b2209188ce34b274bd79e08e5b4f3e9
|
/app/src/main/java/org/cnodejs/android/md/display/base/BaseActivity.java
|
d7386f10c662cba620fc5ec5d0e979d9014f1118
|
[
"Apache-2.0"
] |
permissive
|
yfsoftcom/CNode-Material-Design
|
006753c140225a7363437afbd225a3eadb72a93a
|
091fb22a9911338911bebd6619112afbf42715d1
|
refs/heads/develop
| 2022-07-26T09:58:28.417152
| 2016-05-13T00:07:57
| 2016-05-13T00:07:57
| 58,782,098
| 0
| 0
|
Apache-2.0
| 2022-07-09T06:54:42
| 2016-05-14T00:48:19
|
Java
|
UTF-8
|
Java
| false
| false
| 436
|
java
|
package org.cnodejs.android.md.display.base;
import android.support.v7.app.AppCompatActivity;
import com.umeng.analytics.MobclickAgent;
public abstract class BaseActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onResume(this);
}
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPause(this);
}
}
|
[
"takwolf@foxmail.com"
] |
takwolf@foxmail.com
|
2cb04288c7994e1a279fcc2c0ee91483828278d8
|
9bf6dee1407f112cebf42443e0f492e89d0d3fbc
|
/gameserver/src/org/openaion/gameserver/model/gameobjects/PersistentState.java
|
c7516965d8225c89cf3267a97030c6882e5b1d41
|
[] |
no_license
|
vavavr00m/aion-source
|
6caef6738fee6d4898fcb66079ea63da46f5c9c0
|
8ce4c356d860cf54e5f3fe4a799197725acffc3b
|
refs/heads/master
| 2021-01-10T02:08:43.965463
| 2011-08-22T10:47:12
| 2011-08-22T10:47:12
| 50,949,918
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 913
|
java
|
/*
* This file is part of aion-emu <aion-unique.com>.
*
* aion-unique 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.
*
* aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>.
*/
package org.openaion.gameserver.model.gameobjects;
/**
* @author ATracer
*
*/
public enum PersistentState
{
NEW,
UPDATE_REQUIRED,
UPDATED,
DELETED,
NOACTION
}
|
[
"tomulescu@gmail.com"
] |
tomulescu@gmail.com
|
45d008a4787a7e8b02828e5e3476a53a45eb2b39
|
7fee915c61b321b3eb1e3e3bc983e2b76e1872f6
|
/jsonrpc/src/main/java/com/xhsoft/retrofit/jsonrpc/adapter/JsonRpcCallAdapterFactory.java
|
8e76ea599a1652c9825abb14a7d56a9e9d773a5d
|
[] |
no_license
|
zhangxhbeta/retrofit-jsonrpc
|
d01489832cd74647558c20e89efb03cc698bad29
|
a855a35926e7268f1d0e8f0c4227b485dec7bc03
|
refs/heads/master
| 2021-01-12T19:42:39.615641
| 2017-02-04T03:15:10
| 2017-02-04T03:17:05
| 55,576,746
| 1
| 0
| null | 2016-04-06T04:53:43
| 2016-04-06T04:53:43
| null |
UTF-8
|
Java
| false
| false
| 1,485
|
java
|
package com.xhsoft.retrofit.jsonrpc.adapter;
import com.xhsoft.retrofit.jsonrpc.JsonRpcResponse;
import retrofit2.Call;
import retrofit2.CallAdapter;
import retrofit2.Retrofit;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.concurrent.Executor;
/**
* JsonRpcCall适配器工厂.
*
* @author zhangxh
*/
public class JsonRpcCallAdapterFactory extends CallAdapter.Factory {
@Override
public CallAdapter<JsonRpcCall<?>> get(Type returnType, Annotation[] annotations,
Retrofit retrofit) {
if (getRawType(returnType) != JsonRpcCall.class) {
return null;
}
if (!(returnType instanceof ParameterizedType)) {
throw new IllegalStateException(
"JsonRpcCall must have generic type (e.g., JsonRpcCall<ResponseBody>)");
}
final Type responseType = getParameterUpperBound(0, (ParameterizedType) returnType);
final Class<?> t = getRawType(responseType);
final boolean clientRequireAllResponse = t == JsonRpcResponse.class;
final Executor callbackExecutor = retrofit.callbackExecutor();
return new CallAdapter<JsonRpcCall<?>>() {
@Override
public Type responseType() {
return responseType;
}
@Override
public <R> JsonRpcCall<R> adapt(Call<R> call) {
return new JsonRpcCallAdapter<R>(call, callbackExecutor, clientRequireAllResponse);
}
};
}
}
|
[
"zhangxhbeta@gmail.com"
] |
zhangxhbeta@gmail.com
|
9468d0b9a0d7db460d9db58215d2f02ddfdfd3d1
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/elastic--elasticsearch/2cc97a0d3ed2a9276378e2a6462942deab04a1fb/before/DetailedErrorsDisabledIT.java
|
0ff3e1d4e86e733ca37899d8eb94d02c46592952
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,794
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.options.detailederrors;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.http.netty.NettyHttpServerTransport;
import org.elasticsearch.node.Node;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.rest.client.http.HttpDeleteWithEntity;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
/**
* Tests that when disabling detailed errors, a request with the error_trace parameter returns a HTTP 400
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 1)
public class DetailedErrorsDisabledIT extends ESIntegTestCase {
// Build our cluster settings
@Override
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.settingsBuilder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, true)
.put(NettyHttpServerTransport.SETTING_HTTP_DETAILED_ERRORS_ENABLED, false)
.build();
}
@Test
public void testThatErrorTraceParamReturns400() throws Exception {
// Make the HTTP request
HttpResponse response = new HttpRequestBuilder(HttpClients.createDefault())
.httpTransport(internalCluster().getDataNodeInstance(HttpServerTransport.class))
.addParam("error_trace", "true")
.method(HttpDeleteWithEntity.METHOD_NAME)
.execute();
assertThat(response.getHeaders().get("Content-Type"), is("application/json"));
assertThat(response.getBody(), is("{\"error\":\"error traces in responses are disabled.\"}"));
assertThat(response.getStatusCode(), is(400));
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
86e50eac288fb93f24117f36e53c23360f5b4ac1
|
af4323ebec25c7ff9c5bfcdc76a2329349bd882b
|
/qlack2-fuse-file-upload/qlack2-fuse-file-upload-api/src/main/java/com/eurodyn/qlack2/fuse/fileupload/api/FileUpload.java
|
871a20a7b9618a2ffdc0ab9ad3791d6becd5e33d
|
[] |
no_license
|
NMichas-test/Qlack2-Fuse
|
8c49e8d01b88838ca9ac0ccf6a0fce3f69d9c493
|
f6adc5f24763195e74f0c74c994aaba59ccb4636
|
refs/heads/master
| 2021-01-12T05:40:09.388173
| 2016-12-21T15:41:27
| 2016-12-21T15:42:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,469
|
java
|
/*
* Copyright 2014 EUROPEAN DYNAMICS SA <info@eurodyn.com>
*
* Licensed under the EUPL, Version 1.1 only (the "License").
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
* https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package com.eurodyn.qlack2.fuse.fileupload.api;
import com.eurodyn.qlack2.fuse.fileupload.api.request.CheckChunkRequest;
import com.eurodyn.qlack2.fuse.fileupload.api.request.FileUploadRequest;
import com.eurodyn.qlack2.fuse.fileupload.api.request.VirusScanRequest;
import com.eurodyn.qlack2.fuse.fileupload.api.response.CheckChunkResponse;
import com.eurodyn.qlack2.fuse.fileupload.api.response.ChunkGetResponse;
import com.eurodyn.qlack2.fuse.fileupload.api.response.FileDeleteResponse;
import com.eurodyn.qlack2.fuse.fileupload.api.response.FileGetResponse;
import com.eurodyn.qlack2.fuse.fileupload.api.response.FileListResponse;
import com.eurodyn.qlack2.fuse.fileupload.api.response.FileUploadResponse;
import com.eurodyn.qlack2.fuse.fileupload.api.response.VirusScanResponse;
public interface FileUpload {
CheckChunkResponse checkChunk(CheckChunkRequest req);
FileUploadResponse upload(FileUploadRequest req);
FileDeleteResponse deleteByID(String fileID);
FileGetResponse getByID(String fileID);
/**
* Retrieves a specific chunk of a required file
* @param fileID the ID of the file from which a chunk will be retrieved
* @param chunckNbr The number of the chunk
* @return ChunkGetResponse The response which will contain the retrieved chunk
* */
ChunkGetResponse getByIDAndChunk(String fileID, long chunkNbr);
FileListResponse listFiles(boolean includeBinaryContent);
VirusScanResponse virusScan(VirusScanRequest req);
/**
* Cleans up file-chunks which have been uploaded but never
* reclaimed/deleted.
*
* @param deleteBefore
* The EPOCH before which all files get deleted.
*/
void cleanupExpired(long deleteBefore);
FileDeleteResponse deleteByIDForConsole(String fileID);
FileGetResponse getByIDForConsole(String fileID);
FileListResponse listFilesForConsole(boolean includeBinary);
}
|
[
"nassosmichas@me.com"
] |
nassosmichas@me.com
|
24104bc8ac07ba261838225c5fc69ae15bcaccf1
|
183732491ccf0693b044163c3eb9a0e657fcce94
|
/phloc-commons/src/test/java/com/phloc/commons/text/resource/ResourceBundleKeyTest.java
|
7af19edeb7289e7c2c8dd89352e716837d97ee7a
|
[] |
no_license
|
phlocbg/phloc-commons
|
9b0d6699af33d67ee832c14e0594c97cef44c05d
|
6f86abe9c4bb9f9f94fe53fc5ba149356f88a154
|
refs/heads/master
| 2023-04-23T22:25:52.355734
| 2023-03-31T18:09:10
| 2023-03-31T18:09:10
| 41,243,446
| 0
| 0
| null | 2022-07-01T22:17:52
| 2015-08-23T09:19:38
|
Java
|
UTF-8
|
Java
| false
| false
| 3,358
|
java
|
/**
* Copyright (C) 2006-2015 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.commons.text.resource;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test;
import com.phloc.commons.mock.AbstractPhlocTestCase;
import com.phloc.commons.mock.PhlocTestUtils;
/**
* Test class for class {@link ResourceBundleKey}.
*
* @author Philip Helger
*/
public final class ResourceBundleKeyTest extends AbstractPhlocTestCase
{
@Test
public void testCtor ()
{
try
{
new ResourceBundleKey ("bundle", "");
fail ();
}
catch (final IllegalArgumentException ex)
{}
try
{
new ResourceBundleKey ("", "key");
fail ();
}
catch (final IllegalArgumentException ex)
{}
PhlocTestUtils.testDefaultImplementationWithEqualContentObject (new ResourceBundleKey ("properties/test-iso8859",
"key1"),
new ResourceBundleKey ("properties/test-iso8859",
"key1"));
PhlocTestUtils.testDefaultImplementationWithDifferentContentObject (new ResourceBundleKey ("properties/test-iso8859",
"key1"),
new ResourceBundleKey ("properties/test-iso8859-1",
"key1"));
PhlocTestUtils.testDefaultImplementationWithDifferentContentObject (new ResourceBundleKey ("properties/test-iso8859",
"key1"),
new ResourceBundleKey ("properties/test-iso8859",
"key2"));
ResourceBundleUtils.clearCache ();
}
@Test
public void testISO8859 ()
{
final ResourceBundleKey key = new ResourceBundleKey ("properties/test-iso8859", "key1");
assertEquals ("properties/test-iso8859", key.getBundleName ());
assertEquals ("key1", key.getKey ());
assertEquals ("äöü", key.getString (L_DE));
}
@Test
public void testUTF8 ()
{
final ResourceBundleKey key = new ResourceBundleKey ("properties/test-utf8", "key1");
assertEquals ("properties/test-utf8", key.getBundleName ());
assertEquals ("key1", key.getKey ());
assertEquals ("äöü", key.getUtf8String (L_DE));
}
}
|
[
"bg@phloc.com"
] |
bg@phloc.com
|
cd77adf656438d66cb0a54d93ba7fead67b8b3cd
|
65a3203330a87f7cd0e224c3c1d71944d1130041
|
/netty-in-action-cn/chapterTest/example/src/main/java/nia/test/echo/EchoClientHandler.java
|
3fcf06c55adf76103ca5768555edaeb2594262b4
|
[] |
no_license
|
inzahgi/netty_test
|
ec941cb00380f9fa60897d87d0e2fec288b1dc49
|
b306b98525950fcefefc8878fa232a2b9603113b
|
refs/heads/master
| 2020-03-14T07:19:47.512932
| 2018-06-14T15:56:27
| 2018-06-14T15:56:27
| 128,943,047
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,234
|
java
|
package nia.test.echo;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
public class EchoClientHandler extends ChannelInboundHandlerAdapter {
private ByteBuf firstMessage;
public EchoClientHandler(){
firstMessage = Unpooled.buffer(EchoClient.SIZE);
for(int i = 0; i < firstMessage.capacity(); i++){
firstMessage.writeByte((byte)i);
}
}
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
ctx.writeAndFlush(firstMessage);
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
ctx.write(msg);
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
ctx.flush();
//--------------------------------------------------------------
System.out.println(" close active !!!!!!!!!!!!!!!!!!!!!!!!");
ctx.close();
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
cause.printStackTrace();
ctx.close();
}
}
|
[
"inzahgi@126.com"
] |
inzahgi@126.com
|
5e4521cda03b4705c02f0a8dfd721384fe6632f6
|
f680094f6d14de8d3f57bd25013729f2d5578592
|
/src/org/encog/neural/networks/training/LearningRate.java
|
109aedeaad167c536ac8a37d5148fb5d0f9d1fca
|
[] |
no_license
|
bernardobreder/demo-neural-network
|
82dc070f04eb8995ece040274a9c04e06c5cb153
|
adf4485064bc4c1cf9dbad2f54242e31e23bdcd2
|
refs/heads/master
| 2022-04-07T06:19:31.087748
| 2020-02-10T11:58:47
| 2020-02-10T11:58:47
| 104,338,038
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,348
|
java
|
/*
* Encog(tm) Core v3.3 - Java Version
* http://www.heatonresearch.com/encog/
* https://github.com/encog/encog-java-core
* Copyright 2008-2014 Heaton Research, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information on Heaton Research copyrights, licenses
* and trademarks visit:
* http://www.heatonresearch.com/copyright
*/
package org.encog.neural.networks.training;
/**
* Specifies that a training algorithm has the concept of a learning rate. This
* allows it to be used with strategies that automatically adjust the learning
* rate.
*
* @author jheaton
*
*/
public interface LearningRate {
/**
* Set the learning rate.
*
* @param rate
* The new learning rate
*/
void setLearningRate(double rate);
/**
* @return The learning rate.
*/
double getLearningRate();
}
|
[
"bernardobreder@gmail.com"
] |
bernardobreder@gmail.com
|
e29ac7caca9044504775dc3a0c0a7edb760ab1f3
|
7a504369f46c2d789184993cdd82a71c14230f99
|
/common-api/src/main/java/io/github/ma1uta/matrix/event/RoomPowerLevels.java
|
3c27f89e35310495ae1b6fa5a8f0c1c295c3f142
|
[
"Apache-2.0"
] |
permissive
|
dhavalmshah/jeon
|
dcb5cc44264ef025f1d3cf964091ae183b176e74
|
81d3ffb1a7d5fd7b7e845d89757fd250a3054787
|
refs/heads/master
| 2020-09-29T12:33:30.607039
| 2019-12-10T06:14:24
| 2019-12-10T06:14:24
| 227,038,282
| 0
| 0
|
Apache-2.0
| 2019-12-10T05:43:28
| 2019-12-10T05:43:27
| null |
UTF-8
|
Java
| false
| false
| 5,757
|
java
|
/*
* Copyright sablintolya@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.github.ma1uta.matrix.event;
import io.github.ma1uta.matrix.event.content.RoomPowerLevelsContent;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* This event specifies the minimum level a user must have in order to perform a certain action. It also specifies the levels of
* each user in the room.
* <p>
* If a user_id is in the users list, then that user_id has the associated power level. Otherwise they have the default level
* users_default. If users_default is not supplied, it is assumed to be 0. If the room contains no m.room.power_levels event,
* the room's creator has a power level of 100, and all other users have a power level of 0.
* </p>
* <p>
* The level required to send a certain event is governed by events, state_default and events_default. If an event type is
* specified in events, then the user must have at least the level specified in order to send that event. If the event type
* is not supplied, it defaults to events_default for Message Events and state_default for State Events.
* </p>
* <p>
* If there is no state_default in the m.room.power_levels event, the state_default is 50. If there is no events_default
* in the m.room.power_levels event, the events_default is 0. If the room contains no m.room.power_levels event, both the
* state_default and events_default are 0.
* </p>
* <p>
* The power level required to invite a user to the room, kick a user from the room, ban a user from the room, or redact an
* event, is defined by invite, kick, ban, and redact, respectively. Each of these levels defaults to 50 if they are not
* specified in the m.room.power_levels event, or if the room contains no m.room.power_levels event.
* </p>
*/
@Schema(
description = "This event specifies the minimum level a user must have in order to perform a certain action."
+ " It also specifies the levels of each user in the room. If a user_id is in the users list, then that user_id has"
+ " the associated power level. Otherwise they have the default level users_default. If users_default is not supplied,"
+ " it is assumed to be 0. If the room contains no m.room.power_levels event, the room's creator has a power level of"
+ " 100, and all other users have a power level of 0. The level required to send a certain event is governed by events,"
+ " state_default and events_default. If an event type is specified in events, then the user must have at least the level"
+ " specified in order to send that event. If the event type is not supplied, it defaults to events_default for Message"
+ " Events and state_default for State Events. If there is no state_default in the m.room.power_levels event,"
+ " the state_default is 50. If there is no events_default in the m.room.power_levels event, the events_default is 0."
+ " If the room contains no m.room.power_levels event, both the state_default and events_default are 0."
+ " The power level required to invite a user to the room, kick a user from the room, ban a user from the room, or redact an"
+ " event, is defined by invite, kick, ban, and redact, respectively. Each of these levels defaults to 50 if they are not"
+ " specified in the m.room.power_levels event, or if the room contains no m.room.power_levels event."
)
public class RoomPowerLevels extends StateEvent<RoomPowerLevelsContent> {
/**
* This event specifies the minimum level a user must have in order to perform a certain action. It also specifies the
* levels of each user in the room.
* <br>
* If a user_id is in the users list, then that user_id has the associated power level. Otherwise they have the default
* level users_default. If users_default is not supplied, it is assumed to be 0. If the room contains no m.room.power_levels
* event, the room's creator has a power level of 100, and all other users have a power level of 0.
* <br>
* The level required to send a certain event is governed by events, state_default and events_default. If an event type is
* specified in events, then the user must have at least the level specified in order to send that event. If the event type
* is not supplied, it defaults to events_default for Message Events and state_default for State Events.
* <br>
* If there is no state_default in the m.room.power_levels event, the state_default is 50. If there is no events_default
* in the m.room.power_levels event, the events_default is 0. If the room contains no m.room.power_levels event, both the
* state_default and events_default are 0.
* <br>
* The power level required to invite a user to the room, kick a user from the room, ban a user from the room, or redact
* an event, is defined by invite, kick, ban, and redact, respectively. Each of these levels defaults to 50 if they are
* not specified in the m.room.power_levels event, or if the room contains no m.room.power_levels event.
*/
public static final String TYPE = "m.room.power_levels";
@Override
public String getType() {
return TYPE;
}
}
|
[
"sablintolya@gmail.com"
] |
sablintolya@gmail.com
|
e1954c85b2d713cd6e900948e31bce9d15eebdbf
|
7c9f40c50e5cabcb320195e3116384de139002c6
|
/Plugin_Parser/src/tinyos/yeti/nesc12/parser/actions/Action657.java
|
83b8e49a8152692e4b79e488a970c2607ab34c04
|
[] |
no_license
|
phsommer/yeti
|
8e89ad89f1a4053e46693244256d03e71fe830a8
|
dec8c79e75b99c2a2a43aa5425f608128b883e39
|
refs/heads/master
| 2021-01-10T05:33:57.285499
| 2015-05-21T19:41:02
| 2015-05-21T19:41:02
| 36,033,399
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,724
|
java
|
/*
* Yeti 2, NesC development in Eclipse.
* Copyright (C) 2009 ETH Zurich
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Web: http://tos-ide.ethz.ch
* Mail: tos-ide@tik.ee.ethz.ch
*/
package tinyos.yeti.nesc12.parser.actions;
import tinyos.yeti.nesc12.lexer.Token;
import tinyos.yeti.nesc12.lexer.Lexer;
import tinyos.yeti.nesc12.parser.ast.*;
import tinyos.yeti.nesc12.parser.ast.nodes.*;
import tinyos.yeti.nesc12.parser.ast.nodes.declaration.*;
import tinyos.yeti.nesc12.parser.ast.nodes.definition.*;
import tinyos.yeti.nesc12.parser.ast.nodes.error.*;
import tinyos.yeti.nesc12.parser.ast.nodes.expression.*;
import tinyos.yeti.nesc12.parser.ast.nodes.general.*;
import tinyos.yeti.nesc12.parser.ast.nodes.nesc.*;
import tinyos.yeti.nesc12.parser.ast.nodes.statement.*;
import tinyos.yeti.nesc12.parser.*;
public final class Action657 implements ParserAction{
public final java_cup.runtime.Symbol do_action(
int CUP$parser$act_num,
java_cup.runtime.lr_parser CUP$parser$parser,
java.util.Stack CUP$parser$stack,
int CUP$parser$top,
parser parser)
throws java.lang.Exception{
java_cup.runtime.Symbol CUP$parser$result;
// c_direct_declarator_typedef_name ::= c_direct_declarator_typedef_name P_RECT_OPEN c_assignment_expression P_RECT_CLOSE
{
Declarator RESULT =null;
Declarator d = (Declarator)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
Expression a = (Expression)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
Token rr = (Token)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
ArrayDeclarator result = new ArrayDeclarator( d, null, a ); RESULT = result; result.setRight( rr.getRight() );
CUP$parser$result = parser.getSymbolFactory().newSymbol("c_direct_declarator_typedef_name",102, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);
}
return CUP$parser$result;
}
}
|
[
"besigg@2a69fd7c-12de-fc47-e5bb-db751a41839b"
] |
besigg@2a69fd7c-12de-fc47-e5bb-db751a41839b
|
d55500732b154b92a71664a87608ae669bafce61
|
6d644a22829d10c34a539bba926ebf20910d251d
|
/app/src/main/java/cn/lds/ui/adapter/FeedBackGridAdapter.java
|
6ba0d4e6bb77cb25d130d8f35b38f2afefe96735
|
[] |
no_license
|
binbin5257/MyApplication
|
6c83b1a352ddd9c45ac99b32d3fd304f756b94ed
|
3a4e510448193162d7fe7bc7564b6451b644f02f
|
refs/heads/master
| 2020-03-16T07:43:37.421917
| 2018-05-08T09:41:53
| 2018-05-08T09:41:53
| 132,582,063
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,402
|
java
|
package cn.lds.ui.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.facebook.drawee.view.SimpleDraweeView;
import java.util.List;
import cn.lds.R;
import cn.lds.common.api.ModuleUrls;
import cn.lds.ui.view.GlideRoundTransform;
/**
* Created by sibinbin on 18-3-21.
*/
public class FeedBackGridAdapter extends BaseAdapter {
private Context mContext;
private List<String> mList;
private final LayoutInflater inflater;
private final RequestOptions myOptions;
public FeedBackGridAdapter( Context context,List<String> pictures){
this.mContext = context;
this.mList = pictures;
inflater = LayoutInflater.from(mContext);
myOptions = new RequestOptions()
.transform(new GlideRoundTransform(mContext,2));
}
@Override
public int getCount() {
int count = mList == null ? 1 : mList.size() + 1;
if (count > 9) {
return mList.size();
} else {
return count;
}
}
@Override
public Object getItem( int position ) {
return mList.get(position);
}
@Override
public long getItemId( int position ) {
return position;
}
@Override
public View getView( int position, View convertView, ViewGroup parent ) {
ViewHolder holder;
if(convertView == null){
convertView = inflater.inflate(R.layout.item_feed_back,null);
holder = new ViewHolder();
holder.icon = convertView.findViewById(R.id.icon);
convertView.setTag(holder);
}else{
holder = (ViewHolder) convertView.getTag();
}
if (position < mList.size()) {
//代表+号之前的需要正常显示图片
String picUrl = mList.get(position); //图片路径
holder.icon.setImageURI(picUrl);
// Glide.with(mContext).load(picUrl).apply(myOptions).into(holder.icon);
} else {
holder.icon.setImageResource(R.drawable.zj);//最后一个显示加号图片
}
return convertView;
}
public class ViewHolder{
private SimpleDraweeView icon;
}
}
|
[
"13624266523@163.com"
] |
13624266523@163.com
|
10a3c4cd9aab7b6fa1fb44d18a42151a0d514018
|
02cf6b8c574bdcf7955f844fa236a4a37c6a6c47
|
/app/src/main/java/org/team2767/deadeye/opengl/FrameBufferHelper.java
|
4702af323509ef2cddb5fc85a7df96794dc80f17
|
[
"MIT"
] |
permissive
|
strykeforce/deadeye-android
|
e927e116abba3ff6f1b7ebeec283558d9778f6af
|
e070d83c9732de731f3336e697544838175dead2
|
refs/heads/master
| 2021-07-18T04:51:53.642320
| 2021-04-29T09:32:06
| 2021-04-29T09:32:06
| 113,485,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,199
|
java
|
package org.team2767.deadeye.opengl;
import static android.opengl.GLES20.GL_COLOR_ATTACHMENT0;
import static android.opengl.GLES20.GL_FRAMEBUFFER;
import static android.opengl.GLES20.GL_FRAMEBUFFER_COMPLETE;
import static android.opengl.GLES20.GL_TEXTURE_2D;
import static android.opengl.GLES20.glBindFramebuffer;
import static android.opengl.GLES20.glCheckFramebufferStatus;
import static android.opengl.GLES20.glFramebufferTexture2D;
import static android.opengl.GLES20.glGenFramebuffers;
import timber.log.Timber;
public class FrameBufferHelper {
public static int initFrameBuffer(int textureId) {
final int[] frameBufferIds = new int[1];
glGenFramebuffers(1, frameBufferIds, 0);
// subsequent calls apply to this new framebuffer
glBindFramebuffer(GL_FRAMEBUFFER, frameBufferIds[0]);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureId, 0);
int status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
Timber.e("Could not generate a new OpenGL frame buffer object.");
}
// unbind from frame buffer
glBindFramebuffer(GL_FRAMEBUFFER, 0);
return frameBufferIds[0];
}
}
|
[
"jeff@jeffhutchison.com"
] |
jeff@jeffhutchison.com
|
1d48d8516ab7a10298208a99a2fed4535e9682cc
|
50a209e5dbe97de9398ccfe9b0ecb7298d527648
|
/src/main/java/com/shsnc/service/sample/web/rest/vm/LoggerVM.java
|
63317f9071f2a755843452af60e0b428074053c6
|
[] |
no_license
|
jmwasky/jhipsterMicroserviceApp
|
0f24872d782aebb3caa141c34dc1c6afa114d03e
|
8a29d92baec14cae866aa098f213c7149df1142a
|
refs/heads/master
| 2020-03-11T06:51:47.620281
| 2018-04-17T03:44:02
| 2018-04-17T03:44:02
| 129,842,162
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 892
|
java
|
package com.shsnc.service.sample.web.rest.vm;
import ch.qos.logback.classic.Logger;
/**
* View Model object for storing a Logback logger.
*/
public class LoggerVM {
private String name;
private String level;
public LoggerVM(Logger logger) {
this.name = logger.getName();
this.level = logger.getEffectiveLevel().toString();
}
public LoggerVM() {
// Empty public constructor used by Jackson.
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
@Override
public String toString() {
return "LoggerVM{" +
"name='" + name + '\'' +
", level='" + level + '\'' +
'}';
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
d38582e797b78e8afeb15c32c0bea527b26846d8
|
2b0694f0563192e2d148d130164e94faf3b4e12f
|
/android_phone_developed_completely_lecture/ch08/ch08_phoneblacklist/src/net/blogjava/mobile/Main.java
|
33101f786b40ccac3cb9fe63a014cab52aba4cef
|
[] |
no_license
|
bxh7425014/BookCode
|
4757956275cf540e9996b9064d981f6da75c9602
|
8996b36e689861d55662d15c5db8b0eb498c864b
|
refs/heads/master
| 2020-05-23T00:48:51.430340
| 2017-02-06T01:04:25
| 2017-02-06T01:04:25
| 84,735,079
| 9
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,423
|
java
|
package net.blogjava.mobile;
import android.app.Activity;
import android.content.Context;
import android.media.AudioManager;
import android.os.Bundle;
import android.provider.MediaStore.Audio;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.widget.Toast;
public class Main extends Activity
{
public class MyPhoneCallListener extends PhoneStateListener
{
@Override
public void onCallStateChanged(int state, String incomingNumber)
{
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
;
switch (state)
{
case TelephonyManager.CALL_STATE_IDLE:
audioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
break;
case TelephonyManager.CALL_STATE_RINGING:
if ("12345678".equals(incomingNumber))
{
audioManager
.setRingerMode(AudioManager.RINGER_MODE_SILENT);
}
break;
}
super.onCallStateChanged(state, incomingNumber);
}
}
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
MyPhoneCallListener myPhoneCallListener = new MyPhoneCallListener();
tm.listen(myPhoneCallListener, PhoneStateListener.LISTEN_CALL_STATE);
}
}
|
[
"bxh7425014@163.com"
] |
bxh7425014@163.com
|
17a2438aac8fa375ebf3360cd81adc8455dd36d7
|
2024fcc39ab55d98c9a7ce52730dcac69624ea16
|
/src/main/java/com/dominator/weixin/util/aes/AesException.java
|
2d48ea9cbce73332b8af4984a1ab11cd0289aab7
|
[] |
no_license
|
n040661/pms-allinpayb
|
f0366d2801dad9479d24d5a4450f60e60a686611
|
b98cac46b94c890f49fcab4b953346cc6c930415
|
refs/heads/master
| 2020-03-19T01:05:11.494661
| 2018-05-29T01:36:02
| 2018-05-29T01:36:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,290
|
java
|
package com.dominator.weixin.util.aes;
@SuppressWarnings("serial")
public class AesException extends Exception {
public final static int OK = 0;
public final static int ValidateSignatureError = -40001;
public final static int ParseXmlError = -40002;
public final static int ComputeSignatureError = -40003;
public final static int IllegalAesKey = -40004;
public final static int ValidateAppidError = -40005;
public final static int EncryptAESError = -40006;
public final static int DecryptAESError = -40007;
public final static int IllegalBuffer = -40008;
private int code;
private static String getMessage(int code) {
switch (code) {
case ValidateSignatureError:
return "签名验证错误";
case ParseXmlError:
return "xml解析失败";
case ComputeSignatureError:
return "sha加密生成签名失败";
case IllegalAesKey:
return "SymmetricKey非法";
case ValidateAppidError:
return "appid校验失败";
case EncryptAESError:
return "aes加密失败";
case DecryptAESError:
return "aes解密失败";
case IllegalBuffer:
return "解密后得到的buffer非法";
default:
return null; // cannot be
}
}
public int getCode() {
return code;
}
AesException(int code) {
super(getMessage(code));
this.code = code;
}
}
|
[
"zhangsuliang_job@163.com"
] |
zhangsuliang_job@163.com
|
abbd407c5092842ba12017ebdfea05a8c46e45b3
|
e76a79816ff5203be2c4061e263a09d31072c940
|
/src/com/facebook/buck/core/filesystems/AbsPathImpl.java
|
13ba0aa0d53be619dce29c072588607df1404e1e
|
[
"Apache-2.0"
] |
permissive
|
facebook/buck
|
ef3a833334499b1b44c586e9bc5e2eec8d930e09
|
9c7c421e49f4d92d67321f18c6d1cd90974c77c4
|
refs/heads/main
| 2023-08-25T19:30:28.803205
| 2023-04-19T11:32:59
| 2023-04-19T11:32:59
| 9,504,214
| 8,481
| 1,338
|
Apache-2.0
| 2023-05-04T22:13:59
| 2013-04-17T18:12:18
|
Java
|
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.facebook.buck.core.filesystems;
import java.nio.file.Path;
/**
* Implementation of {@link com.facebook.buck.core.filesystems.AbsPath} for paths which are not
* {@link BuckUnixPath}.
*/
class AbsPathImpl extends PathWrapperImpl implements AbsPath {
public AbsPathImpl(Path path) {
super(path);
if (!path.isAbsolute()) {
throw new IllegalArgumentException("path must be absolute: " + path);
}
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
f5c61e31f9e24591a4eb822940ab09c674305cd8
|
5b18c2aa61fd21f819520f1b614425fd6bc73c71
|
/src/main/java/com/sinosoft/claim/ui/control/action/UIScheduleAction.java
|
3becfe36ee59c3d1b462e07d81c863b7560666b2
|
[] |
no_license
|
Akira-09/claim
|
471cc215fa77212099ca385e7628f3d69f83d6d8
|
6dd8a4d4eedb47098c09c2bf3f82502aa62220ad
|
refs/heads/master
| 2022-01-07T13:08:27.760474
| 2019-03-24T23:50:09
| 2019-03-24T23:50:09
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 8,024
|
java
|
package com.sinosoft.claim.ui.control.action;
import java.sql.SQLException;
import java.util.Collection;
import com.sinosoft.claim.dto.custom.ScheduleDto;
import com.sinosoft.claim.dto.custom.WorkFlowDto;
import com.sinosoft.claim.ui.model.PrpLscheduleItemFindByConCommand;
import com.sinosoft.claim.ui.model.PrpLscheduleItemFindByConditionsCommand;
import com.sinosoft.claim.ui.model.PrpLscheduleItemGetCountCommand;
import com.sinosoft.claim.ui.model.PrpLscheduleMainWFFindByConCommand;
import com.sinosoft.claim.ui.model.PrpLscheduleMainWFFindByConditionsCommand;
import com.sinosoft.claim.ui.model.PrpLscheduleMainWFGetCountCommand;
import com.sinosoft.claim.ui.model.ScheduleChangeSaveCommand;
import com.sinosoft.claim.ui.model.ScheduleDeleteCommand;
import com.sinosoft.claim.ui.model.ScheduleFindByConCommand;
import com.sinosoft.claim.ui.model.ScheduleGetNoCommand;
import com.sinosoft.claim.ui.model.ScheduleIsExistCommand;
import com.sinosoft.claim.ui.model.ScheduleSaveCommand;
import com.sinosoft.sysframework.common.datatype.PageRecord;
import com.sinosoft.sysframework.exceptionlog.UserException;
/**
* 理赔案件调度处理Schedule
* <p>Title: 车险理赔理赔案件调度处理 </p>
* <p>Description: 车险理赔理赔案件调度处理</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: Sinosoft</p>
* @author lixiang
* @version 1.0
*/
public class UIScheduleAction
{
/**
* 保存理赔案件调度处理
* @param ScheduleDto:理赔案件调度处理DTO
* @throws Exception
*/
public void save(ScheduleDto scheduleDto) throws SQLException,Exception
{
ScheduleSaveCommand scheduleSaveCommand = new ScheduleSaveCommand(scheduleDto);
scheduleSaveCommand.execute();
}
/**
* 保存理赔案件调度处理带工作流
* @param ScheduleDto:理赔案件调度处理DTO,workflowDto
* @throws Exception
*/
public void save(ScheduleDto scheduleDto,WorkFlowDto workFlowDto) throws SQLException,Exception
{
ScheduleSaveCommand scheduleSaveCommand = new ScheduleSaveCommand(scheduleDto,workFlowDto);
scheduleSaveCommand.execute();
}
/**
* 保存理赔案件调度处理带工作流
* @param ScheduleDto:理赔案件调度处理DTO,workflowDto
* @throws Exception
*/
public void changeSave(ScheduleDto scheduleDto,WorkFlowDto workFlowDto) throws SQLException,Exception
{
ScheduleChangeSaveCommand scheduleChangeSaveCommand = new ScheduleChangeSaveCommand(scheduleDto,workFlowDto);
scheduleChangeSaveCommand.execute();
}
/**
* 保存理赔案件调度处理带工作流
* @param ScheduleDto:理赔案件调度处理DTO,workflowDto
* @throws Exception
*/
public void changeSave(ScheduleDto scheduleDto) throws SQLException,Exception
{
ScheduleChangeSaveCommand scheduleChangeSaveCommand = new ScheduleChangeSaveCommand(scheduleDto);
scheduleChangeSaveCommand.execute();
}
/**
* 删除理赔案件调度处理
* @param ScheduleNo:理赔案件调度处理号
* @throws Exception
*/
public void delete(int scheduleID,String registNo) throws SQLException,Exception
{
ScheduleDeleteCommand scheduleDeleteCommand = new ScheduleDeleteCommand(scheduleID,registNo);
scheduleDeleteCommand.execute();
}
/**
* 获得理赔案件调度处理信息
* @param ScheduleNo:理赔案件调度处理号
* @return 理赔案件调度处理
* @throws Exception
*/
public ScheduleDto findByPrimaryKey(int scheduleID,String registNo) throws SQLException,UserException,Exception
{
ScheduleFindByConCommand scheduleFindByConCommand = new ScheduleFindByConCommand(scheduleID,registNo);
ScheduleDto scheduleDto = (ScheduleDto)scheduleFindByConCommand.execute();
if (scheduleDto == null)
{
throw new UserException(-98,-1000,this.getClass().getName()+".findByPrimaryKey("+registNo+")");
}
return scheduleDto;
}
/**
* 判断理赔案件调度处理号是否存在
* @param ScheduleNo:理赔案件调度处理号
* @return 是/否
* @throws Exception
*/
public boolean isExist(int scheduleID,String registNo) throws SQLException,Exception
{
ScheduleIsExistCommand scheduleIsExistCommand = new ScheduleIsExistCommand(scheduleID,registNo);
return ((Boolean)scheduleIsExistCommand.execute()).booleanValue();
}
/**
* 获得案件调度处理信息
* @param conditions:查询条件
* @return 案件调度处理对象
* @throws Exception
*/
public Collection findByConditions(String conditions) throws SQLException,Exception
{
PrpLscheduleMainWFFindByConCommand prpLscheduleMainWFFindByConCommand = new PrpLscheduleMainWFFindByConCommand(conditions);
return (Collection)prpLscheduleMainWFFindByConCommand.execute();
}
/**
* 获得调度查询信息
* @param conditions:查询条件
* @return page
* @throws Exception
* Add By lixiang 2005-08-17 Reason:增加新的查询条件
*/
public PageRecord findByConditions(String conditions,int pageNo,int recordPerPage) throws SQLException,Exception
{
PrpLscheduleMainWFFindByConditionsCommand prpLscheduleMainWFFindByConCommand = new PrpLscheduleMainWFFindByConditionsCommand(conditions,pageNo,recordPerPage);
return (PageRecord)prpLscheduleMainWFFindByConCommand.execute();
}
/**
* 获取调度处理的调度号
* @param registNo:报案处理号
* @return ScheduleID
* @throws Exception
*/
public int getNo(String registNo) throws SQLException,Exception
{
ScheduleGetNoCommand scheduleGetNoCommand = new ScheduleGetNoCommand(registNo);
return ((Integer)scheduleGetNoCommand.execute()).intValue() ;
}
/**
* 获得案件调度Item处理信息
* @param conditions:查询条件
* @return 案件调度Item处理对象
* @throws Exception
*/
public Collection findItemByConditions(String conditions) throws SQLException,Exception
{
PrpLscheduleItemFindByConCommand prpLscheduleItemFindByConCommand = new PrpLscheduleItemFindByConCommand(conditions);
return (Collection)prpLscheduleItemFindByConCommand.execute();
}
/**
* 获得调度查询信息
* @param conditions:查询条件
* @return page
* @throws Exception
* Add By lixiang 2005-08-17 Reason:增加新的查询条件
*/
public PageRecord findItemByConditions(String conditions,int pageNo,int recordPerPage) throws SQLException,Exception
{
PrpLscheduleItemFindByConditionsCommand prpLscheduleItemFindByConCommand = new PrpLscheduleItemFindByConditionsCommand(conditions,pageNo,recordPerPage);
return (PageRecord)prpLscheduleItemFindByConCommand.execute();
}
/**
* 查找符合条件的个数(scheduleMainWF表)
* @param conditon
* @return
* @throws Exception
*/
public int findScheduleMainWFCountByConditon(String condition)throws Exception
{
int intRet=0;
PrpLscheduleMainWFGetCountCommand prpLscheduleMainWFGetCountCommand = new PrpLscheduleMainWFGetCountCommand(condition);
intRet =((Integer)prpLscheduleMainWFGetCountCommand .execute()).intValue() ;
return intRet;
}
/**
* 查找符合条件的个数(scheduleMainWF表)
* @param conditon
* @return
* @throws Exception
*/
public int findScheduleItemCountByConditon(String condition)throws Exception
{
int intRet=0;
PrpLscheduleItemGetCountCommand prpLscheduleItemGetCountCommand = new PrpLscheduleItemGetCountCommand(condition);
intRet =((Integer)prpLscheduleItemGetCountCommand .execute()).intValue() ;
return intRet;
}
//add by zhaolu 20060802 start
//reason:增加分页查询
public PageRecord findForRegistConditions(String conditions,int pageNo,int recordPerPage)throws Exception
{
ScheduleGetNoCommand scheduleGetNoCommand = new ScheduleGetNoCommand(conditions,pageNo,recordPerPage);
return (PageRecord)scheduleGetNoCommand.executeCommand();
}
}
|
[
"26166405+vincentdk77@users.noreply.github.com"
] |
26166405+vincentdk77@users.noreply.github.com
|
a03a85ecb5acf788ba223633f73695381a5fca77
|
3796f6edf053b9f613370e96ae8cde48065aed33
|
/lib/src/main/java/tk/zielony/randomdata/common/StringHashGenerator.java
|
8a4b05da73ea078b7c39da5292eeee6c75a933d2
|
[
"Apache-2.0"
] |
permissive
|
lindy8632/RandomData
|
3c8555456591c604ad248843d5de77eafaa9a4ae
|
812a7c222afb4e6edd11414f42270d7e5c92e813
|
refs/heads/master
| 2021-01-21T09:34:01.231255
| 2017-04-23T21:36:45
| 2017-04-23T21:36:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 962
|
java
|
package tk.zielony.randomdata.common;
import java.util.Random;
import tk.zielony.randomdata.DataContext;
import tk.zielony.randomdata.Generator;
import tk.zielony.randomdata.Matcher;
/**
* Created by Marcin on 27.03.2017.
*/
public class StringHashGenerator extends Generator<String> {
private Random random = new Random();
private int length;
public StringHashGenerator() {
length = 32;
}
public StringHashGenerator(int length) {
this.length = length;
}
@Override
protected Matcher getDefaultMatcher() {
return f -> f.getType().equals(String.class) && f.getName().contains("hash");
}
@Override
public String next(DataContext context) {
char[] hash = new char[length];
for (int i = 0; i < hash.length; i++)
hash[i] = (char) (random.nextBoolean() ? random.nextInt('0' - '1') + '1' : random.nextInt('z' - 'a') + 'a');
return new String(hash);
}
}
|
[
"niewartotupisac@gmail.com"
] |
niewartotupisac@gmail.com
|
ec4567f837d82e4295fd5b42e8a9f8f51a52eecf
|
512f433119684e6d6b5fb5f0d5ac40f2403fa16c
|
/src/main/java/databaseservice/CharacterDataProvider.java
|
4f9ca8dbfeb6bd7a3738fb8be0684e1c7eb95101
|
[] |
no_license
|
hanfak/yatspec-example-demo
|
6b152cba0af7965779c10f279108d70a049f536d
|
32abedce830fc828b04c87f1c00382d117857709
|
refs/heads/master
| 2022-06-19T13:11:54.270215
| 2020-05-06T16:21:58
| 2020-05-06T16:21:58
| 257,958,178
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,051
|
java
|
package databaseservice;
import domain.Person;
import domain.SpeciesInfo;
import org.jooq.DSLContext;
import org.jooq.Record1;
import org.jooq.Record3;
import org.jooq.SQLDialect;
import org.jooq.impl.DSL;
import javax.sql.DataSource;
import java.util.Optional;
import static org.jooq.sources.Tables.CHARACTERINFO;
import static org.jooq.sources.Tables.CHARACTERS;
import static org.jooq.sources.Tables.SPECIFIESINFO;
public class CharacterDataProvider implements DataProvider {
private final DataSource dataSource = DatasourceConfig.createDataSource();
@Override
public Integer getPersonId(String personName) {
DSLContext dslContext = DSL.using(dataSource, SQLDialect.POSTGRES);
Optional<Record1<Integer>> result = dslContext.select(CHARACTERS.PERSON_ID)
.from(CHARACTERS)
.where(CHARACTERS.PERSON_NAME.eq(personName))
.fetchOptional();
return result.map(Record1::component1).orElse(0);
}
@Override
public void storeCharacterInfo(String personId, Person characterInfo) {
DSLContext dslContext = DSL.using(dataSource, SQLDialect.POSTGRES);
dslContext.insertInto(CHARACTERINFO)
.set(CHARACTERINFO.PERSON_ID, Integer.parseInt(personId))
.set(CHARACTERINFO.BIRTH_YEAR, characterInfo.getBirthYear())
.set(CHARACTERINFO.PERSON_NAME, characterInfo.getName())
.execute();
}
@Override
public SpeciesInfo getSpeciesInfo(Integer personId) {
DSLContext dslContext = DSL.using(dataSource, SQLDialect.POSTGRES);
Optional<Record3<String, Float, Integer>> result = dslContext.select(SPECIFIESINFO.SPECIES, SPECIFIESINFO.AVG_HEIGHT, SPECIFIESINFO.LIFESPAN)
.from(SPECIFIESINFO)
.where(SPECIFIESINFO.PERSON_ID.eq(personId))
.fetchOptional();
String name = result.get().field1().getName();
System.out.println("name = " + name);
return result.map(record -> new SpeciesInfo(record.component1(), record.component3(), record.component2())).orElseThrow(IllegalStateException::new);
}
}
|
[
"fakira.work@gmail.com"
] |
fakira.work@gmail.com
|
ba2f5c01849c5add0d607b4cfc2738508c1976be
|
54bcbdc3250e6e8152ac1746f709ec134e798305
|
/src/org/omg/CosNaming/NamingContextPackage/CannotProceed.java
|
e8d4b2d7991ba1d504a8aa47cd7515354c0015ea
|
[] |
no_license
|
TANGMONK-MEAT/jdk-src-demo
|
78bed79d8a3819bf48d5eed399b869ac090138a4
|
4b4fa0779b67c7079b8d263ada2bb514c366a3e8
|
refs/heads/master
| 2023-03-02T21:35:09.758995
| 2021-02-16T07:39:26
| 2021-02-16T07:39:26
| 268,969,374
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,114
|
java
|
package org.omg.CosNaming.NamingContextPackage;
/**
* org/omg/CosNaming/NamingContextPackage/CannotProceed.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u231/13620/corba/src/share/classes/org/omg/CosNaming/nameservice.idl
* Saturday, October 5, 2019 3:13:31 AM PDT
*/
public final class CannotProceed extends org.omg.CORBA.UserException
{
public org.omg.CosNaming.NamingContext cxt = null;
public org.omg.CosNaming.NameComponent rest_of_name[] = null;
public CannotProceed ()
{
super(CannotProceedHelper.id());
} // ctor
public CannotProceed (org.omg.CosNaming.NamingContext _cxt, org.omg.CosNaming.NameComponent[] _rest_of_name)
{
super(CannotProceedHelper.id());
cxt = _cxt;
rest_of_name = _rest_of_name;
} // ctor
public CannotProceed (String $reason, org.omg.CosNaming.NamingContext _cxt, org.omg.CosNaming.NameComponent[] _rest_of_name)
{
super(CannotProceedHelper.id() + " " + $reason);
cxt = _cxt;
rest_of_name = _rest_of_name;
} // ctor
} // class CannotProceed
|
[
"58246525+tangsengrou01@users.noreply.github.com"
] |
58246525+tangsengrou01@users.noreply.github.com
|
8486ad004398be187d5204972b27d5ee0270f164
|
8ea99b0e685ef705f764e8fc7a20fa6a60041101
|
/src/test/java/loghub/processors/TestUrlDecoders.java
|
ca7fab9c8fd4a48fda56ced347ce6ccc5e060c3f
|
[
"Apache-2.0"
] |
permissive
|
qq254963746/LogHub
|
fb16cd31cc9a247fe2e5967ca71b8412a13afbf7
|
84f2cb11a6425639fbc70896ab5f6223b3d7eb25
|
refs/heads/master
| 2021-01-22T02:12:49.758718
| 2016-01-26T09:47:31
| 2016-01-26T09:47:31
| 56,210,825
| 1
| 0
| null | 2016-04-14T05:55:16
| 2016-04-14T05:55:16
| null |
UTF-8
|
Java
| false
| false
| 1,778
|
java
|
package loghub.processors;
import java.io.IOException;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import loghub.Event;
import loghub.EventWrapper;
import loghub.LogUtils;
import loghub.ProcessorException;
import loghub.Tools;
public class TestUrlDecoders {
private static Logger logger;
@BeforeClass
static public void configure() throws IOException {
Tools.configure();
logger = LogManager.getLogger();
LogUtils.setLevel(logger, Level.TRACE, "loghub.processors.DecodeUrl");
}
@Test
public void testUrlDecoder() throws ProcessorException {
DecodeUrl t = new DecodeUrl();
t.setFields(new Object[] { "*" });
EventWrapper e = new EventWrapper(new Event());
e.setProcessor(t);
e.put("q", "%22Paints%22+Oudalan");
e.put("userAgent", "%2520");
t.process(e);
Assert.assertEquals("key 'q' invalid", "\"Paints\" Oudalan", e.get("q"));
Assert.assertEquals("key 'userAgent' not found", "%20", e.get("userAgent"));
}
@Test
public void testUrlDecoderLoop() throws ProcessorException {
DecodeUrl t = new DecodeUrl();
t.setFields(new Object[] { "userAgent" });
t.setLoop(true);
EventWrapper e = new EventWrapper(new Event());
e.setProcessor(t);
e.put("q", "%22Paints%22+Oudalan");
e.put("userAgent", "%2520");
t.process(e);
System.out.println(e);
Assert.assertEquals("key 'q' invalid", "%22Paints%22+Oudalan", e.get("q"));
Assert.assertEquals("key 'userAgent' not found", " ", e.get("userAgent"));
}
}
|
[
"fbacchella@spamcop.net"
] |
fbacchella@spamcop.net
|
5bb0179586c4477cd84dc0322cc54230839e91a7
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_24de54494b59e6fc392b0f24e0ddb2cddb0a394d/ModuleBeanPostProcessor/12_24de54494b59e6fc392b0f24e0ddb2cddb0a394d_ModuleBeanPostProcessor_s.java
|
e8e7f1ebf4ca881484a9dba25dc634fb40f3914c
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,338
|
java
|
/* vim: set ts=2 et sw=2 cindent fo=qroca: */
package com.globant.katari.core.web;
import static com.globant.katari.core.web.ModuleUtils.getModuleNameFromBeanName;
import org.apache.commons.lang.Validate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
/**<p>A spring bean post processor that looks for implementations of the Module
* interface in the application context and registers them.
* </p>
*/
public class ModuleBeanPostProcessor implements BeanFactoryPostProcessor {
/** The class logger. */
private static Logger log = LoggerFactory
.getLogger(ModuleBeanPostProcessor.class);
/** The registrar we will be getting the contexts from.
*
* It is never null.
*/
private ModuleContextRegistrar contextRegistrar;
/** Build a ModuleBeanPostProcessor.
*
* @param theContextRegistrar The context registrar where all the module
* contexts are registered. It cannot be null.
*/
public ModuleBeanPostProcessor(final ModuleContextRegistrar
theContextRegistrar) {
Validate.notNull(theContextRegistrar, "The context registrar cannot "
+ "be null.");
contextRegistrar = theContextRegistrar;
}
/** Post process the bean factory and looks for all beans that implements the
* Module interface.
*
* This method simply records the map of bean names to url. This list will be
* used in ModuleInitializer to call init on each of the registered modules.
*
* @param beanFactory the bean factory where the modules are sought. Cannot
* be null.
*/
public void postProcessBeanFactory(final ConfigurableListableBeanFactory
beanFactory) {
Validate.notNull(beanFactory, "The beanFactory cannot be null");
log.trace("Entering postProcessBeanFactory");
String[] beanNames = beanFactory.getBeanNamesForType(Module.class);
for (String beanName : beanNames) {
String name = getModuleNameFromBeanName(beanName);
contextRegistrar.addModuleName(beanName, "module/" + name);
}
log.trace("Leaving postProcessBeanFactory");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
5face8a02ca32ea6225a8ae0dad4eff8d87ba4d6
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_2/src/b/g/g/c/Calc_1_2_16628.java
|
b834fe1cb0cac0476daf855a48ea99394ed39584
|
[] |
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
| 134
|
java
|
package b.g.g.c;
public class Calc_1_2_16628 {
/** @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
|
3368910b04494b95ba38bb927d49263e208f4ef5
|
569d16bdf15c42955206f92c4e4ee238546836e1
|
/core-client/base-client/src/main/java/com/cyc/baseclient/cycobject/ElMtConstant.java
|
7a2a64a4a8183e8a483742e58c743d6d756053cb
|
[
"Apache-2.0"
] |
permissive
|
JimSow/api-suite
|
09c767e4f062f0ac364ed665b462a0b2f309403e
|
c37ef37b5ce6357758963301aac08e9a5f60444b
|
refs/heads/master
| 2021-01-12T02:36:09.013493
| 2016-01-27T02:35:29
| 2016-01-27T02:35:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,482
|
java
|
package com.cyc.baseclient.cycobject;
/*
* #%L
* File: ElMtConstant.java
* Project: Base Client
* %%
* Copyright (C) 2013 - 2016 Cycorp, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.cyc.base.cycobject.CycConstant;
import com.cyc.base.cycobject.ElMt;
import com.cyc.base.exception.BaseClientRuntimeException;
import com.cyc.baseclient.CycObjectFactory;
import com.cyc.kb.Context;
/**
* Provides the container for the ElMt CycConstantImpl (Epistemlogical Level Microtheory
Constant).<p>
*
* @version $Id: ElMtConstant.java 163503 2016-01-11 23:42:19Z nwinant $
* @author Tony Brusseau
*/
public class ElMtConstant extends CycConstantImpl implements ElMt {
static final long serialVersionUID = -2405506745680227189L;
/** Privately creates a new instance of ElMtConstant
* deprecated
*/
private ElMtConstant(CycConstant cycConstant) {
super(cycConstant.getName(), cycConstant.getGuid());
}
/**
* Returns a new ElMtConstant given a CycConstantImpl. Note, use the
factory method in the CycClient to create these.
*/
public static ElMtConstant makeElMtConstant(CycConstant cycConstant) {
CycObjectFactory.removeCaches(cycConstant);
ElMtConstant elmtConstant = new ElMtConstant(cycConstant);
CycObjectFactory.addCycConstantCache(cycConstant);
return elmtConstant;
}
public static boolean isCompatible(Context context) {
final Object core = context.getCore();
return (core instanceof ElMtConstant) || (core instanceof CycConstant);
}
public static ElMtConstant fromContext(Context context) {
final Object core = context.getCore();
if (core instanceof ElMtConstant) {
return (ElMtConstant) core;
} else if (core instanceof CycConstant) {
return makeElMtConstant((CycConstant) core);
}
throw new BaseClientRuntimeException("Could not create " + ElMtConstant.class.getSimpleName()
+ " from " + core);
}
}
|
[
"nw@exegetic.net"
] |
nw@exegetic.net
|
9c26ae895a06fd89498c4e53f40c8e248ab6a037
|
47c2c2b4ba3cf7a1a85cead1049e03161648a2a5
|
/src/main/java/com/mgp/dbproject/commons/listeners/SpringStartup.java
|
8c5aae57a8d392a1f93ca75d194cce1f6be2ce83
|
[] |
no_license
|
3449708385/DBProject2
|
92da7b463fa34205c9a14a93ccdc72d1a6ef054a
|
d33188a597270b92894cf246ba28089340ffb1af
|
refs/heads/master
| 2020-04-23T00:59:02.144999
| 2019-02-15T03:55:17
| 2019-02-15T03:55:19
| 170,798,847
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 623
|
java
|
package com.mgp.dbproject.commons.listeners;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
public class SpringStartup implements ApplicationListener<ContextRefreshedEvent> {
Logger logger=LoggerFactory.getLogger(SpringStartup.class);
@Override
public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
if(contextRefreshedEvent.getApplicationContext().getDisplayName().equals("Root WebApplicationContext")){
logger.info("Spring Start up!");
}
}
}
|
[
"991335931@qq.com"
] |
991335931@qq.com
|
3854cd934ff3368c0bb679ba693a59f5e2f2de50
|
77b18c18b5d1815ae869bfe25fc180fa6a8db74c
|
/src/io/spring/part11/ShopConfiguration.java
|
106ea2fec532243b536d5d7c9a13476a5fb6a6b3
|
[] |
no_license
|
tutkuince/SpringCoreTasks
|
afbe0f122b384b0f01ec7974b359025bbdd48497
|
4930dc76f9026b7425f146e99b71a0556758ca86
|
refs/heads/master
| 2020-03-22T07:38:44.069047
| 2018-07-16T09:47:29
| 2018-07-16T09:47:29
| 139,714,554
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 438
|
java
|
package io.spring.part11;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ShopConfiguration {
@Bean(initMethod = "openFile", destroyMethod = "closeFile")
public Cashier cashier() {
final String path = System.getProperty("java.io.tmpdir") + "cashier";
Cashier cashier = new Cashier();
cashier.setBeanName(path);
return cashier;
}
}
|
[
"tutku.ince@outlook.com"
] |
tutku.ince@outlook.com
|
0c3df2a901f935100adff408cf7443ccbdb5a188
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.27.0/sources/com/iqoption/core/connect/f.java
|
73ff78475178ee51d238c607089d47e8615d6974
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 1,135
|
java
|
package com.iqoption.core.connect;
import com.iqoption.core.connect.bus.IQBusState;
import io.reactivex.e;
import kotlin.i;
@i(bne = {1, 1, 15}, bnf = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\bf\u0018\u00002\u00020\u0001J\u0010\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\rH&J\b\u0010\u000e\u001a\u00020\u000bH&R\u0012\u0010\u0002\u001a\u00020\u0003X¦\u0004¢\u0006\u0006\u001a\u0004\b\u0004\u0010\u0005R\u0018\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u0007X¦\u0004¢\u0006\u0006\u001a\u0004\b\b\u0010\t¨\u0006\u000f"}, bng = {"Lcom/iqoption/core/connect/IQBus;", "", "state", "Lcom/iqoption/core/connect/bus/IQBusState;", "getState", "()Lcom/iqoption/core/connect/bus/IQBusState;", "stateStream", "Lio/reactivex/Flowable;", "getStateStream", "()Lio/reactivex/Flowable;", "connect", "Lio/reactivex/Completable;", "ssid", "", "disconnect", "core_release"})
/* compiled from: IQBus.kt */
public interface f {
e<IQBusState> Ux();
IQBusState Uy();
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
7dc2bef0691b7ea6cce35abada52622dded96a37
|
c577f5380b4799b4db54722749cc33f9346eacc1
|
/BugSwarm/Azure-azure-sdk-for-java-134840154/buggy_files/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobSchedulePatchOptions.java
|
75fb34cfc0f6e8bbc49163f1dafc5f22bf3ccfac
|
[] |
no_license
|
tdurieux/BugSwarm-dissection
|
55db683fd95f071ff818f9ca5c7e79013744b27b
|
ee6b57cfef2119523a083e82d902a6024e0d995a
|
refs/heads/master
| 2020-04-30T17:11:52.050337
| 2019-05-09T13:42:03
| 2019-05-09T13:42:03
| 176,972,414
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,525
|
java
|
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.batch.protocol.models;
import com.microsoft.rest.DateTimeRfc1123;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Additional parameters for the JobSchedule_Patch operation.
*/
public class JobSchedulePatchOptions {
/**
* The maximum time that the server can spend processing the request, in
* seconds. The default is 30 seconds.
*/
@JsonProperty(value = "")
private Integer timeout;
/**
* The caller-generated request identity, in the form of a GUID with no
* decoration such as curly braces, e.g.
* 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
*/
@JsonProperty(value = "")
private String clientRequestId;
/**
* Whether the server should return the client-request-id identifier in
* the response.
*/
@JsonProperty(value = "")
private Boolean returnClientRequestId;
/**
* The time the request was issued. If not specified, this header will be
* automatically populated with the current system clock time.
*/
@JsonProperty(value = "")
private DateTimeRfc1123 ocpDate;
/**
* An ETag is specified. Specify this header to perform the operation only
* if the resource's ETag is an exact match as specified.
*/
@JsonProperty(value = "")
private String ifMatch;
/**
* An ETag is specified. Specify this header to perform the operation only
* if the resource's ETag does not match the specified ETag.
*/
@JsonProperty(value = "")
private String ifNoneMatch;
/**
* Specify this header to perform the operation only if the resource has
* been modified since the specified date/time.
*/
@JsonProperty(value = "")
private DateTimeRfc1123 ifModifiedSince;
/**
* Specify this header to perform the operation only if the resource has
* not been modified since the specified date/time.
*/
@JsonProperty(value = "")
private DateTimeRfc1123 ifUnmodifiedSince;
/**
* Get the timeout value.
*
* @return the timeout value
*/
public Integer timeout() {
return this.timeout;
}
/**
* Set the timeout value.
*
* @param timeout the timeout value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withTimeout(Integer timeout) {
this.timeout = timeout;
return this;
}
/**
* Get the clientRequestId value.
*
* @return the clientRequestId value
*/
public String clientRequestId() {
return this.clientRequestId;
}
/**
* Set the clientRequestId value.
*
* @param clientRequestId the clientRequestId value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withClientRequestId(String clientRequestId) {
this.clientRequestId = clientRequestId;
return this;
}
/**
* Get the returnClientRequestId value.
*
* @return the returnClientRequestId value
*/
public Boolean returnClientRequestId() {
return this.returnClientRequestId;
}
/**
* Set the returnClientRequestId value.
*
* @param returnClientRequestId the returnClientRequestId value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withReturnClientRequestId(Boolean returnClientRequestId) {
this.returnClientRequestId = returnClientRequestId;
return this;
}
/**
* Get the ocpDate value.
*
* @return the ocpDate value
*/
public DateTime ocpDate() {
if (this.ocpDate == null) {
return null;
}
return this.ocpDate.getDateTime();
}
/**
* Set the ocpDate value.
*
* @param ocpDate the ocpDate value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withOcpDate(DateTime ocpDate) {
this.ocpDate = new DateTimeRfc1123(ocpDate);
return this;
}
/**
* Get the ifMatch value.
*
* @return the ifMatch value
*/
public String ifMatch() {
return this.ifMatch;
}
/**
* Set the ifMatch value.
*
* @param ifMatch the ifMatch value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withIfMatch(String ifMatch) {
this.ifMatch = ifMatch;
return this;
}
/**
* Get the ifNoneMatch value.
*
* @return the ifNoneMatch value
*/
public String ifNoneMatch() {
return this.ifNoneMatch;
}
/**
* Set the ifNoneMatch value.
*
* @param ifNoneMatch the ifNoneMatch value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withIfNoneMatch(String ifNoneMatch) {
this.ifNoneMatch = ifNoneMatch;
return this;
}
/**
* Get the ifModifiedSince value.
*
* @return the ifModifiedSince value
*/
public DateTime ifModifiedSince() {
if (this.ifModifiedSince == null) {
return null;
}
return this.ifModifiedSince.getDateTime();
}
/**
* Set the ifModifiedSince value.
*
* @param ifModifiedSince the ifModifiedSince value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withIfModifiedSince(DateTime ifModifiedSince) {
this.ifModifiedSince = new DateTimeRfc1123(ifModifiedSince);
return this;
}
/**
* Get the ifUnmodifiedSince value.
*
* @return the ifUnmodifiedSince value
*/
public DateTime ifUnmodifiedSince() {
if (this.ifUnmodifiedSince == null) {
return null;
}
return this.ifUnmodifiedSince.getDateTime();
}
/**
* Set the ifUnmodifiedSince value.
*
* @param ifUnmodifiedSince the ifUnmodifiedSince value to set
* @return the JobSchedulePatchOptions object itself.
*/
public JobSchedulePatchOptions withIfUnmodifiedSince(DateTime ifUnmodifiedSince) {
this.ifUnmodifiedSince = new DateTimeRfc1123(ifUnmodifiedSince);
return this;
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.