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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8b01ed8250358473c5c9c25f506b4aadeb0811b3
|
70f718fdf708df23150c55c4ad60b10144d89501
|
/design-pattern/src/main/java/com/coderandyli/designpattern/chapter_04_designPhilosophy/solid/section_18_ISP/case_04/KafkaConfig.java
|
0b292c1952bce766d5cfc1580a5f48993b542c24
|
[] |
no_license
|
coderandyli/code_repository
|
a5d93207b06d6f3cac63307ad1e9e1c8a596f350
|
6ac35b25cef91b27865d5ba222cf4d20addbf539
|
refs/heads/master
| 2023-08-04T08:39:14.817544
| 2022-12-13T13:47:38
| 2022-12-13T13:47:38
| 160,043,376
| 3
| 0
| null | 2023-07-20T08:48:09
| 2018-12-02T12:08:41
|
Java
|
UTF-8
|
Java
| false
| false
| 282
|
java
|
package com.coderandyli.designpattern.chapter_04_designPhilosophy.solid.section_18_ISP.case_04;
/**
* Created by lizhen on 2019-12-16
*/
public class KafkaConfig implements Updater {
//...省略其他属性和方法...
@Override
public void update() { //... }
}
}
|
[
"coderandyli@163.com"
] |
coderandyli@163.com
|
9a3601ec2ecd72ac9590d9fd576b0e199157f841
|
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
|
/src/br/com/mind5/business/employee/model/checker/EmpCheckSearch.java
|
f2be9df3abb299cf984d04c4436b460f103914a6
|
[] |
no_license
|
grazianiborcai/Agenda_WS
|
4b2656716cc49a413636933665d6ad8b821394ef
|
e8815a951f76d498eb3379394a54d2aa1655f779
|
refs/heads/master
| 2023-05-24T19:39:22.215816
| 2023-05-15T15:15:15
| 2023-05-15T15:15:15
| 109,902,084
| 0
| 0
| null | 2022-06-29T19:44:56
| 2017-11-07T23:14:21
|
Java
|
UTF-8
|
Java
| false
| false
| 911
|
java
|
package br.com.mind5.business.employee.model.checker;
import java.sql.Connection;
import br.com.mind5.business.employee.info.EmpInfo;
import br.com.mind5.common.SystemCode;
import br.com.mind5.model.checker.ModelCheckerOption;
import br.com.mind5.model.checker.ModelCheckerTemplateSimple;
public final class EmpCheckSearch extends ModelCheckerTemplateSimple<EmpInfo> {
public EmpCheckSearch(ModelCheckerOption option) {
super(option);
}
@Override protected boolean checkHook(EmpInfo recordInfo, Connection conn, String schemaName) {
if (recordInfo.codOwner <= 0 ||
recordInfo.personData == null ||
recordInfo.codLanguage == null ||
recordInfo.username == null )
return super.FAILED;
return super.SUCCESS;
}
@Override protected int getCodMsgOnResultFalseHook() {
return SystemCode.EMP_MANDATORY_FIELD_EMPTY;
}
}
|
[
"mmaciel@mind5.com"
] |
mmaciel@mind5.com
|
0f436991cf7068f0858d7a9a7c8ee1969f2cee6c
|
31f4cab278d83a755f1e434f35273223b049d172
|
/bugs/accumulo/5594b2e0/src/core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java
|
44062230d9840cdae70768b38311781dfd9bbbb0
|
[
"BSD-3-Clause",
"Apache-2.0",
"MIT"
] |
permissive
|
JenniferJohnson89/bugs_dot_jar_dissection
|
2a017f5f77772ddb2b9a5e45423ae084fa1bd7a0
|
7012cccce9a3fdbfc97a0ca507420c24650f6bcf
|
refs/heads/main
| 2022-12-28T16:38:18.039203
| 2020-10-20T09:45:47
| 2020-10-20T09:45:47
| 305,639,612
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,128
|
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.accumulo.core.client;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map.Entry;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.hadoop.io.Text;
/**
* This class hosts configuration methods that are shared between different types of scanners.
*
*/
public interface ScannerBase extends Iterable<Entry<Key,Value>> {
/**
* Add a server-side scan iterator.
*
* @param cfg
* fully specified scan-time iterator, including all options for the iterator. Any changes to the iterator setting after this call are not propagated
* to the stored iterator.
* @throws IllegalArgumentException
* if the setting conflicts with existing iterators
*/
public void addScanIterator(IteratorSetting cfg);
/**
* Remove an iterator from the list of iterators.
*
* @param iteratorName
* nickname used for the iterator
*/
public void removeScanIterator(String iteratorName);
/**
* Update the options for an iterator. Note that this does <b>not</b> change the iterator options during a scan, it just replaces the given option on a
* configured iterator before a scan is started.
*
* @param iteratorName
* the name of the iterator to change
* @param key
* the name of the option
* @param value
* the new value for the named option
*/
public void updateScanIteratorOption(String iteratorName, String key, String value);
/**
* @deprecated since 1.4
* @see {@link org.apache.accumulo.core.client.ScannerBase#addScanIterator(IteratorSetting)}
*/
public void setScanIterators(int priority, String iteratorClass, String iteratorName) throws IOException;
/**
* @deprecated since 1.4
* @see {@link org.apache.accumulo.core.client.ScannerBase#addScanIterator(IteratorSetting)}
*/
public void setScanIteratorOption(String iteratorName, String key, String value);
/**
* Call this method to initialize regular expressions on a scanner. If it is not called, reasonable defaults will be used.
*
* @param iteratorName
* a nickname for the iterator
* @param iteratorPriority
* determines the order in which iterators are applied (system iterators are always applied first, then per-table and scan-time, lowest first)
* @throws IOException
* if an exception occurs reading from the iterator stack
*
* @deprecated since 1.4
* @see {@link org.apache.accumulo.core.client.ScannerBase#addScanIterator(IteratorSetting)}
* @see {@link org.apache.accumulo.core.iterators.user.RegExFilter}
*/
public void setupRegex(String iteratorName, int iteratorPriority) throws IOException;
/**
*
* Set a row regular expression that filters non matching entries server side.
*
* @param regex
* java regular expression to match
*
* @deprecated since 1.4
* @see {@link org.apache.accumulo.core.client.ScannerBase#addScanIterator(IteratorSetting)}
* @see {@link org.apache.accumulo.core.iterators.user.RegExFilter#ROW_REGEX}
*
* <pre>
* // Use the more flexible addScanIterator method:
* ScanIterator cfg = new ScanIterator("regex", RegexIterator.class);
* RegexIterator.setRegexs(cfg, row, null, null, null, false);
* scanner.addScanIterator(priority, cfg);
* </pre>
*/
public void setRowRegex(String regex);
/**
*
* Set a column family regular expression that filters non matching entries server side.
*
* @param regex
* java regular expression to match
*
* @deprecated since 1.4
* @see {@link org.apache.accumulo.core.client.ScannerBase#addScanIterator(IteratorSetting)}
* @see {@link org.apache.accumulo.core.iterators.user.RegExFilter#COLF_REGEX}
*/
public void setColumnFamilyRegex(String regex);
/**
* Use addScanIterator(int, ScanIterator);
*
* Set a column qualifier regular expression that filters non matching entries server side.
*
* @param regex
* java regular expression to match
*
* @deprecated since 1.4
* @see {@link org.apache.accumulo.core.client.ScannerBase#addScanIterator(IteratorSetting)}
* @see {@link org.apache.accumulo.core.iterators.user.RegExFilter#COLQ_REGEX}.
*
*/
public void setColumnQualifierRegex(String regex);
/**
* Set a value regular expression that filters non matching entries server side.
*
* @param regex
* java regular expression to match
*
* @deprecated since 1.4
* @see {@link org.apache.accumulo.core.client.ScannerBase#addScanIterator(IteratorSetting)}
* @see {@link org.apache.accumulo.core.iterators.user.RegExFilter}
*/
public void setValueRegex(String regex);
/**
* Adds a column family to the list of columns that will be fetched by this scanner. By default when no columns have been added the scanner fetches all
* columns.
*
* @param col
* the column family to be fetched
*/
public void fetchColumnFamily(Text col);
/**
* Adds a column to the list of columns that will be fetched by this scanner. The column is identified by family and qualifier. By default when no columns
* have been added the scanner fetches all columns.
*
* @param colFam
* the column family of the column to be fetched
* @param colQual
* the column qualifier of the column to be fetched
*/
public void fetchColumn(Text colFam, Text colQual);
/**
* Clears the columns to be fetched (useful for resetting the scanner for reuse). Once cleared, the scanner will fetch all columns.
*/
public void clearColumns();
/**
* Clears scan iterators prior to returning a scanner to the pool.
*/
public void clearScanIterators();
/**
* Returns an iterator over an accumulo table. This iterator uses the options that are currently set for its lifetime, so setting options will have no effect
* on existing iterators.
*
* Keys returned by the iterator are not guaranteed to be in sorted order.
*
* @return an iterator over Key,Value pairs which meet the restrictions set on the scanner
*/
public Iterator<Entry<Key,Value>> iterator();
}
|
[
"JenniferJonhnson89@163.com"
] |
JenniferJonhnson89@163.com
|
6cbab2218d0619396a7911d397a26f77cecde2bd
|
ce54a65bd0a1206b49adcdc8706b114dc5c60dc8
|
/src/main/java/com/xcs/phase2/response/uac/UserAccountinsAllResponse.java
|
31867cb8f5739fa9945d0bd5e45e8aa43dd41988
|
[] |
no_license
|
Sitta-Dev/Excise_API
|
d961fa215ef59ed13b5749b010563e07bf00516c
|
c1657a342ac759e7acf8eae60a2c4ceefba73098
|
refs/heads/master
| 2023-01-13T12:05:50.060374
| 2020-11-19T05:58:08
| 2020-11-19T05:58:08
| 285,178,533
| 0
| 1
| null | 2020-08-05T09:22:54
| 2020-08-05T04:26:09
|
Java
|
UTF-8
|
Java
| false
| false
| 311
|
java
|
package com.xcs.phase2.response.uac;
import lombok.Data;
import java.util.List;
@Data
public class UserAccountinsAllResponse extends UacResponse {
private String IsSuccess;
private String Msg;
private int USER_ACCOUNT_ID;
private List<UserAccountPermissionResponse> UserAccountPermission;
}
|
[
"bakugan_chun@hotmail.com"
] |
bakugan_chun@hotmail.com
|
d03f3a56ace848e864d078e707b3b9b450d188ed
|
258d5e98910fc5062d513a871de72ece373c4354
|
/src/main/java/cn/itcast/travel/web/servlet/FavoriteServlet.java
|
cd8daf2567666bf90ff3e50bf92732196d473b94
|
[] |
no_license
|
lixinye99/Travel
|
966134687ddc8dea6d6a3557c96f465492f0c2dc
|
bc6766a615ada2ee8ff4626126a58b0b422c805c
|
refs/heads/master
| 2022-12-09T12:58:45.047474
| 2020-08-27T03:57:33
| 2020-08-27T03:57:33
| 290,670,176
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,256
|
java
|
package cn.itcast.travel.web.servlet;
import cn.itcast.travel.service.impl.FavoriteService;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
/**
* 处理收藏请求
* 未收藏则收藏,已收藏则取消收藏
*
* @author Arno Clare
*/
@WebServlet("/favorite")
public class FavoriteServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
/*获取请求参数*/
String rid = req.getParameter("rid");
String uid = req.getSession().getAttribute("uid").toString();
/*收藏处理*/
FavoriteService fService = new FavoriteService();
JSONObject jsonObject = fService.service(Integer.parseInt(rid), Integer.parseInt(uid));
//配置 response
resp.setContentType("text/html;charset=utf-8");
resp.setHeader("Cache-Control", "no-cache");
resp.getWriter().write(String.valueOf(jsonObject));
}
}
|
[
"you@example.com"
] |
you@example.com
|
537dbc3ef883365f25e81721d3a015f3c5e4496a
|
c6c632c5d0f47a30cedddfeaa073b3419cfe31e5
|
/otp-business-capability-services/src/main/java/com/lulobank/otp/services/features/emailnotification/NewEmailMessageHandler.java
|
7f62bf04ec4982177f08322bd8d04527276934e0
|
[] |
no_license
|
juandevtoledo/otp
|
9c9171fec04c04c5cb93792b051c07f9d871bea7
|
366755f9091c3bc2ea5082cd14dd6eb64bcbc30b
|
refs/heads/main
| 2023-06-08T21:04:07.857210
| 2021-06-29T23:19:10
| 2021-06-29T23:19:10
| 381,520,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,796
|
java
|
package com.lulobank.otp.services.features.emailnotification;
import com.lulobank.core.events.Event;
import com.lulobank.core.events.EventHandler;
import com.lulobank.otp.sdk.dto.email.EmailAttachment;
import com.lulobank.otp.sdk.dto.email.EmailTemplate;
import com.lulobank.otp.sdk.dto.events.EmailMessageNotification;
import com.lulobank.otp.services.outbounadadapters.services.MailSender;
import com.lulobank.otp.services.ports.service.FileService;
import com.lulobank.otp.services.utils.LogMessages;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
public class NewEmailMessageHandler implements EventHandler<Event<EmailMessageNotification>> {
private static final Logger LOGGER = LoggerFactory.getLogger(NewEmailMessageHandler.class);
private MailSender mailSender;
private String emailSenderAddress;
private String emailBcc;
private final FileService fileService;
public NewEmailMessageHandler(MailSender mailSender, String emailSenderAddress,
String emailBcc, FileService fileService) {
this.mailSender = mailSender;
this.emailSenderAddress = emailSenderAddress;
this.emailBcc = emailBcc;
this.fileService = fileService;
}
@Override
public void apply(Event<EmailMessageNotification> event) {
EmailMessageNotification emailMessageNotification = event.getPayload();
emailMessageNotification.getEmailTemplate().setFrom(emailSenderAddress);
emailMessageNotification.getEmailTemplate().setBcc(Arrays.asList(emailBcc));
try {
emailMessageNotification.setEmailTemplate(validateEmailAttachments(emailMessageNotification.getEmailTemplate()));
mailSender.sendEmail(emailMessageNotification.getEmailTemplate());
LOGGER.trace(LogMessages.SENDING_MESSAGE_TO.name(), emailMessageNotification.getEmailTemplate().getTo());
} catch (IOException ex) {
LOGGER.error(LogMessages.SENDING_MESSAGE_TO.name(), emailMessageNotification.getEmailTemplate().getTo(), ex);
}
}
public EmailTemplate validateEmailAttachments(EmailTemplate emailTemplate) throws IOException {
if (Objects.nonNull(emailTemplate.getFiles()) && !emailTemplate.getFiles().isEmpty()) {
List<EmailAttachment> emailAttachmentList = emailTemplate.getFiles().stream()
.filter(emailAttachment -> emailAttachment.getReportUrl() != null)
.collect(Collectors.toList());
List<EmailAttachment> emailAttachmentNew = new ArrayList<>();
if (!emailAttachmentList.isEmpty()) {
for (EmailAttachment attachment : emailAttachmentList) {
emailAttachmentNew.add(validateAttachment(attachment));
}
}
emailAttachmentNew
.addAll(emailTemplate.getFiles().stream().filter(emailAttachment -> emailAttachment.getReportUrl() == null)
.collect(Collectors.toList()));
emailTemplate.setFiles(emailAttachmentNew);
}
return emailTemplate;
}
public EmailAttachment validateAttachment(EmailAttachment emailAttachment) throws IOException {
return new EmailAttachment(emailAttachment.getName(),
emailAttachment.getReportUrl().startsWith("s3://")?
getFileS3AsByteArray(emailAttachment.getReportUrl()
.replace("s3://", "")):
getFile(emailAttachment.getReportUrl()),
emailAttachment.getContentType());
}
public byte[] getFile(String url) throws IOException {
URL urlFile = new URL(url);
return getFileAsByteArray(urlFile);
}
public byte[] getFileAsByteArray(URL url) throws IOException {
URLConnection connection = url.openConnection();
InputStream in = connection.getInputStream();
int contentLength = connection.getContentLength();
ByteArrayOutputStream tmpOut;
if (contentLength != -1) {
tmpOut = new ByteArrayOutputStream(contentLength);
} else {
tmpOut = new ByteArrayOutputStream(163840);
}
return getByteArray(in, tmpOut);
}
public byte[] getFileS3AsByteArray(String url) throws IOException {
InputStream in = fileService.getFile(url);
ByteArrayOutputStream tmpOut = new ByteArrayOutputStream(163840);
return getByteArray(in, tmpOut);
}
public byte[] getByteArray(InputStream in, ByteArrayOutputStream tmpOut) throws IOException {
byte[] buf = new byte[512];
while (true) {
int len = in.read(buf);
if (len == -1) {
break;
}
tmpOut.write(buf, 0, len);
}
in.close();
tmpOut.close();
return tmpOut.toByteArray();
}
}
|
[
"juan.toledo@globant.com"
] |
juan.toledo@globant.com
|
58ab69ba757d0fcb802f08340aa5c69bf05a0422
|
6fd8e47cdba944697e6bb3acbc9ccb0d09a17991
|
/api/trunk/src/main/java/eu/cloud4soa/api/datamodel/semantic/foaf/FoafImage.java
|
06c48fb55f6df033495d093ba09245d6a6c9f379
|
[] |
no_license
|
Cloud4SOA/Cloud4SOA
|
0bc251780fcb6934b1d50027c3638f31d60c0f40
|
eff65895b215873bef0dd07e899fc01abccb19b6
|
refs/heads/master
| 2023-01-22T02:22:01.225319
| 2013-08-08T08:03:39
| 2013-08-08T08:03:39
| 11,971,122
| 2
| 2
| null | 2023-01-02T21:59:37
| 2013-08-08T08:00:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,977
|
java
|
/*
* Copyright 2013 Cloud4SOA, www.cloud4soa.eu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* generated by http://RDFReactor.semweb4j.org ($Id: CodeGenerator.java 1765 2010-02-11 09:51:13Z max.at.xam.de $) on 9/19/11 6:31 PM
*/
package eu.cloud4soa.api.datamodel.semantic.foaf;
import com.viceversatech.rdfbeans.annotations.RDF;
import com.viceversatech.rdfbeans.annotations.RDFBean;
import com.viceversatech.rdfbeans.annotations.RDFSubject;
import eu.cloud4soa.api.datamodel.semantic.Thing;
/**
* This class manages access to these properties:
* <ul>
* <li> Depicts </li>
* <li> Thumbnail </li>
* </ul>
*
* This class was generated by <a href="http://RDFReactor.semweb4j.org">RDFReactor</a> on 9/19/11 6:31 PM
* Modified version 0.1
*/
@RDFBean("http://xmlns.com/foaf/0.1/Image")
public class FoafImage extends Thing {
private Thing depicts;
private FoafImage thumbnail;
@Override
@RDFSubject(prefix="http://xmlns.com/foaf/0.1/Image/")
public String getUriId() {
return super.getUriId();
}
@RDF("http://xmlns.com/foaf/0.1/depicts")
public Thing getDepicts() {
return depicts;
}
public void setDepicts( Thing depicts ) {
this.depicts = depicts;
}
@RDF("http://xmlns.com/foaf/0.1/thumbnail")
public FoafImage getThumbnail() {
return thumbnail;
}
public void setThumbnail( FoafImage thumbnail ) {
this.thumbnail = thumbnail;
}
}
|
[
"pgouvas@gmail.com"
] |
pgouvas@gmail.com
|
c9e9cfc7fac7f2f127f101edf22b24c5cb6bd7fe
|
736e4a61e9f0fad887a74099c4b437ef1deab68b
|
/vertx-gaia/vertx-co/src/test/java/io/vertx/up/util/StringUtilTc.java
|
e5679fa105e310c8186829a690fda3d0d5bd4156
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
javac-xinghejun/vertx-zero
|
29ffdd7edbe31ce88c5b7be0a20838c64f0c9570
|
9c6e9a3fce574a2c3c1ffc29feb8d8769894eb4b
|
refs/heads/master
| 2022-04-05T18:26:57.172562
| 2020-03-02T03:59:35
| 2020-03-02T03:59:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,088
|
java
|
package io.vertx.up.util;
import io.vertx.core.json.JsonObject;
import io.vertx.up.exception.heart.JexlExpressionException;
import org.junit.Assert;
import org.junit.Test;
public class StringUtilTc {
@Test
public void testAequilatus() {
final String result = Ut.fromAequilatus(3, 10);
Assert.assertEquals("0000000003", result);
}
@Test
public void testAequilatus2() {
final String result = Ut.fromAequilatus(13456, 10);
Assert.assertEquals("0000013456", result);
}
@Test
public void testAequilatus3() {
final String result = Ut.fromAequilatus(1567, 4);
Assert.assertEquals("1567", result);
}
@Test
public void testExpr() {
final String result = Ut.fromExpression("`${name}`", new JsonObject().put("name", "Lang"));
System.out.println(result);
}
@Test(expected = JexlExpressionException.class)
public void testExpr1() {
final String result = Ut.fromExpression("${name}", new JsonObject().put("name", "Lang"));
System.out.println(result);
}
}
|
[
"silentbalanceyh@126.com"
] |
silentbalanceyh@126.com
|
30785b07348beab7cf9c6b7e3af177d5510f5992
|
32bd505bfed24ad0ae0f88b9c754a608cc1da8a6
|
/grafikon-model/src/main/java/net/parostroj/timetable/model/events/FreightNetListener.java
|
a989a4973caf2526da42a79ecbd6bd7ab03204ca
|
[] |
no_license
|
ranou712/grafikon
|
95741773bd55f93f88cf9434e47cfcb5b2627712
|
d2c86a8c7d547459ada470b59f70338958c1cb6d
|
refs/heads/master
| 2020-04-25T20:44:34.359331
| 2015-03-17T15:09:38
| 2015-03-17T15:09:38
| 33,311,917
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 208
|
java
|
package net.parostroj.timetable.model.events;
/**
* Net listener.
*
* @author jub
*/
public interface FreightNetListener extends GTListener {
public void freightNetChanged(FreightNetEvent event);
}
|
[
"jub@parostroj.net"
] |
jub@parostroj.net
|
0bff35772712edaae08a34f93a1541484444c1cc
|
e8f171ddb3c8fb54fcecaff0a84648e76681f982
|
/community/logicaldoc/tags/logicaldoc-7.2.1/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/i18n/I18N.java
|
12a93ec3a851b176a8431ae68dc63439e058c50e
|
[] |
no_license
|
zhunengfei/logicaldoc
|
f12114ef72935e683af4b50f30a88fbd5df9bfde
|
9d432d29a9b43ebd2b13a1933a50add3f4784815
|
refs/heads/master
| 2021-01-20T01:05:48.499693
| 2017-01-13T16:24:16
| 2017-01-13T16:24:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,705
|
java
|
package com.logicaldoc.gui.common.client.i18n;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.logicaldoc.gui.common.client.beans.GUIInfo;
import com.logicaldoc.gui.common.client.beans.GUISession;
import com.logicaldoc.gui.common.client.beans.GUIValuePair;
/**
* Retrieves i18n resources
*
* @author Marco Meschieri - Logical Objects
* @since 6.0
*/
public class I18N {
private static String locale = "en";
private static GUIValuePair[] languages;
private static GUIValuePair[] guiLanguages;
private static HashMap<String, String> bundle = new HashMap<String, String>();
private static DateTimeFormat dateFormatShort = null;
private static DateTimeFormat dateFormat = null;
public static String message(String key) {
if (bundle.containsKey(key))
return bundle.get(key);
else
return key;
}
public static String message(String key, String val) {
return message(key, val, null);
}
public static String message(String key, String val1, String val2) {
String tmp = message(key);
try {
tmp = tmp.replaceAll("\\{0\\}", val1);
} catch (Throwable t) {
}
try {
tmp = tmp.replaceAll("\\{1\\}", val2);
} catch (Throwable t) {
}
return tmp;
}
public static String message(String key, String[] vals) {
String tmp = message(key);
try {
for (int i = 0; i < vals.length; i++) {
tmp = tmp.replaceAll("\\{" + i + "\\}", vals[i]);
}
} catch (Throwable t) {
}
return tmp;
}
public static String getLocale() {
return locale;
}
/**
* Computes the default suitable language for documents
*/
public static String getDefaultLocaleForDoc() {
// Search for exact match
for (GUIValuePair l : languages) {
if (l.getCode().equals(locale))
return l.getCode();
}
// Check the first 2 letters(the language)
for (GUIValuePair l : languages) {
if (l.getCode().startsWith(locale.substring(0, 2)))
return l.getCode();
}
return languages[0].getCode();
}
public static char groupingSepator() {
String gs = message("grouping_separator");
return gs.charAt(gs.length() - 1);
}
public static char decimalSepator() {
String gs = message("decimal_separator");
return gs.charAt(gs.length() - 1);
}
public static void setLocale(String locale) {
I18N.locale = locale;
}
public static LinkedHashMap<String, String> getSupportedLanguages(boolean addEmpty) {
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
if (addEmpty)
map.put("", " ");
if (languages != null)
for (GUIValuePair l : languages) {
map.put(l.getCode(), l.getValue());
}
return map;
}
public static LinkedHashMap<String, String> getSupportedGuiLanguages(boolean addEmpty) {
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
if (addEmpty)
map.put("", " ");
if (guiLanguages != null)
for (GUIValuePair l : guiLanguages) {
map.put(l.getCode(), l.getValue());
}
return map;
}
public GUIValuePair[] getLanguages() {
return languages;
}
public static void setLanguages(GUIValuePair[] languages) {
I18N.languages = languages;
}
public static void initBundle(GUIValuePair[] messages) {
bundle.clear();
for (GUIValuePair val : messages) {
bundle.put(val.getCode(), val.getValue());
}
}
public static void init(GUIInfo info) {
setLanguages(info.getSupportedLanguages());
setGuiLanguages(info.getSupportedGUILanguages());
initBundle(info.getBundle());
/*
* Prepare the date formatters
*/
dateFormatShort = DateTimeFormat.getFormat(message("format_dateshort"));
dateFormat = DateTimeFormat.getFormat(message("format_date"));
}
public static void init(GUISession session) {
init(session.getInfo());
I18N.locale = session.getUser().getLanguage();
}
public static GUIValuePair[] getGuiLanguages() {
return guiLanguages;
}
public static void setGuiLanguages(GUIValuePair[] guiLanguages) {
I18N.guiLanguages = guiLanguages;
}
public static String formatDateShort(Date date) {
if (date == null)
return null;
return dateFormatShort.format(new Date(date.getTime()));
}
public static String formatDate(Date date) {
if (date == null)
return null;
return dateFormat.format(new Date(date.getTime()));
}
public static DateTimeFormat getDateFormatShort() {
return dateFormatShort;
}
public static DateTimeFormat getDateFormat() {
return dateFormat;
}
}
|
[
"car031@bae09422-6297-422f-b3ee-419521344c47"
] |
car031@bae09422-6297-422f-b3ee-419521344c47
|
e2748ef5047962f9dcb182e221db1f529f40b861
|
3c0a799ccd177bb4cec3060262f2fc699a94dc18
|
/src/基础知识/Java基础/java8时间API/DateTimeFormatterTest.java
|
3efd82c5ad5ebe6fad9d9385ec4f0958880c1141
|
[] |
no_license
|
gaohanghang/technology
|
6c855a0b17c85940affdd67df807dd2106f5087c
|
f7de7153e1b9805a0cae5fea894bd9ba54627b97
|
refs/heads/master
| 2022-10-04T10:13:11.942340
| 2022-09-27T17:45:01
| 2022-09-27T17:45:01
| 125,711,791
| 1
| 2
| null | 2022-05-22T15:08:41
| 2018-03-18T09:58:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,268
|
java
|
package 基础知识.Java基础.java8时间API;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/**
* 日期格式化
* <p>
* 在日常开发中我们用到最多的也许就是日期、时间的格式化了,那在Java8种该如何操作呢?
*
* @author GaoHangHang
* @date 2018/07/12 16:30
**/
public class DateTimeFormatterTest {
public static void main(String[] args) {
//日期格式化
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
System.out.println("默认格式化: " + now);
System.out.println("自定义格式化: " + now.format(dateTimeFormatter));
LocalDateTime localDateTime = LocalDateTime.parse("2017-07-20 15:27:44", dateTimeFormatter);
System.out.println("字符串转LocalDateTime: " + localDateTime);
// 也可以使用DateTimeFormatter的format方法将日期、时间格式化为字符串
DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateString = dateTimeFormatter2.format(LocalDate.now());
System.out.println("日期转字符串: " + dateString);
}
}
|
[
"1341947277@qq.com"
] |
1341947277@qq.com
|
d4fd2eae7fb5ce73781785673faf6f497a81ec23
|
6cd756bf890b53b748d41d14d6c460349a898c99
|
/fr-designer-chart-8.0/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java
|
c6acddd06e220eaa3d5c9dffc525c1d4efe7a8b6
|
[] |
no_license
|
jiangzhenjian/FineReport
|
4208b347f3b7fe839fec97cc0cb67bd33d761ba8
|
ca34e419b4f117684ecbfafdd6a1178cc94ce5c6
|
refs/heads/master
| 2021-01-07T20:53:20.460962
| 2017-01-22T03:25:11
| 2017-01-22T03:25:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,230
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
package com.fr.design.chart.gui.active.action;
import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.general.Inter;
import java.awt.event.ActionEvent;
// Referenced classes of package com.fr.design.chart.gui.active.action:
// ChartComponentAction
public class SetPlotStyleAction extends ChartComponentAction
{
private static final long serialVersionUID = 0x282a01b07a3de844L;
public SetPlotStyleAction(ChartComponent chartcomponent)
{
super(chartcomponent);
setName(Inter.getLocText(new String[] {
"Set", "ChartF-Plot"
}));
}
public void actionPerformed(ActionEvent actionevent)
{
showPlotPane();
}
public void showPlotPane()
{
ChartEditPane.getInstance().GoToPane(new String[] {
PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_AREA_TITLE, PaneTitleConstants.CHART_STYLE_AREA_PLOT_TITLE
});
}
}
|
[
"hao01@hao"
] |
hao01@hao
|
28c40fb6c53135c0ab9e6cba9d8d96039e0c6ffe
|
ce32decef039a586855c362381003d21d1ab3342
|
/modules/flowable-engine/src/main/java/org/flowable/engine/app/AppModel.java
|
b7083af7830ea966193336a88da78cb93a0458c4
|
[
"Apache-2.0"
] |
permissive
|
flowable/flowable-engine
|
fa5fb5c29a453669887bee7874ca6d73fd2663c7
|
7bd4ee8b7374b43dcdd517a26afa14e6806f40e4
|
refs/heads/main
| 2023-08-31T03:55:26.415399
| 2023-08-29T11:53:55
| 2023-08-29T11:53:55
| 70,780,002
| 7,040
| 2,775
|
Apache-2.0
| 2023-09-14T16:51:30
| 2016-10-13T07:21:43
|
Java
|
UTF-8
|
Java
| false
| false
| 1,874
|
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.app;
public class AppModel {
protected String key;
protected String name;
protected String description;
protected String theme;
protected String icon;
protected String usersAccess;
protected String groupsAccess;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getTheme() {
return theme;
}
public void setTheme(String theme) {
this.theme = theme;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getUsersAccess() {
return usersAccess;
}
public void setUsersAccess(String usersAccess) {
this.usersAccess = usersAccess;
}
public String getGroupsAccess() {
return groupsAccess;
}
public void setGroupsAccess(String groupsAccess) {
this.groupsAccess = groupsAccess;
}
}
|
[
"tijs.rademakers@gmail.com"
] |
tijs.rademakers@gmail.com
|
3b0d4e354b1d9a3a2ae06c7d21eb32b49fa6d6d2
|
41738bbc29db248db606efe6e5dac01dbcfd7bb2
|
/unit-tests/src/test/java/com/gs/collections/impl/list/immutable/primitive/ImmutableBooleanEmptyListTest.java
|
5b878589bdb389703e220dd17c51f1828ec7fffc
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
cnxtech/gs-collections
|
d27d7d28c45ba50e4a6a90e821315da9bf5e810d
|
fa8bf3e103689efa18bca2ab70203e71cde34b52
|
refs/heads/master
| 2022-05-22T07:44:42.234768
| 2016-02-19T17:18:59
| 2016-02-19T17:18:59
| 189,935,865
| 0
| 0
|
Apache-2.0
| 2022-05-01T14:23:59
| 2019-06-03T04:46:55
|
Java
|
UTF-8
|
Java
| false
| false
| 4,250
|
java
|
/*
* Copyright 2014 Goldman Sachs.
*
* 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.gs.collections.impl.list.immutable.primitive;
import com.gs.collections.api.BooleanIterable;
import com.gs.collections.api.list.primitive.ImmutableBooleanList;
import com.gs.collections.impl.block.factory.primitive.BooleanPredicates;
import com.gs.collections.impl.test.Verify;
import org.junit.Assert;
import org.junit.Test;
public class ImmutableBooleanEmptyListTest extends AbstractImmutableBooleanListTestCase
{
@Override
protected ImmutableBooleanList classUnderTest()
{
return ImmutableBooleanEmptyList.INSTANCE;
}
@Override
@Test
public void newWithout()
{
ImmutableBooleanList emptyList = this.newWith();
ImmutableBooleanList newList = emptyList.newWithout(true);
Assert.assertEquals(this.newWith(), newList);
Assert.assertSame(emptyList, newList);
Assert.assertEquals(this.newMutableCollectionWith(), emptyList);
}
@Override
@Test(expected = IndexOutOfBoundsException.class)
public void get()
{
this.classUnderTest().get(0);
}
@Override
@Test(expected = IndexOutOfBoundsException.class)
public void getFirst()
{
this.classUnderTest().getFirst();
}
@Override
@Test(expected = IndexOutOfBoundsException.class)
public void getLast()
{
this.classUnderTest().getLast();
}
@Override
@Test
public void indexOf()
{
Assert.assertEquals(-1L, this.classUnderTest().indexOf(true));
Assert.assertEquals(-1L, this.classUnderTest().indexOf(false));
}
@Override
@Test
public void lastIndexOf()
{
Assert.assertEquals(-1L, this.classUnderTest().lastIndexOf(true));
Assert.assertEquals(-1L, this.classUnderTest().lastIndexOf(false));
}
@Override
@Test
public void forEachWithIndex()
{
String[] sum = new String[2];
sum[0] = "";
this.classUnderTest().forEachWithIndex((each, index) -> sum[0] += index + ":" + each);
Assert.assertEquals("", sum[0]);
}
@Override
@Test
public void toReversed()
{
Assert.assertEquals(this.classUnderTest(), this.classUnderTest().toReversed());
}
@Override
@Test
public void isEmpty()
{
Verify.assertEmpty(this.classUnderTest());
}
@Override
@Test
public void notEmpty()
{
Assert.assertFalse(this.classUnderTest().notEmpty());
}
@Override
@Test
public void select()
{
super.select();
BooleanIterable iterable = this.classUnderTest();
Verify.assertEmpty(iterable.select(BooleanPredicates.isTrue()));
BooleanIterable booleanIterable = iterable.select(BooleanPredicates.isFalse());
Verify.assertEmpty(booleanIterable);
Assert.assertSame(iterable, booleanIterable);
}
@Override
@Test
public void reject()
{
super.reject();
BooleanIterable iterable = this.classUnderTest();
Verify.assertEmpty(iterable.reject(BooleanPredicates.isTrue()));
BooleanIterable booleanIterable = iterable.reject(BooleanPredicates.isFalse());
Verify.assertEmpty(booleanIterable);
Assert.assertSame(iterable, booleanIterable);
}
@Override
@Test
public void testEquals()
{
Verify.assertEqualsAndHashCode(this.newMutableCollectionWith(), this.classUnderTest());
Verify.assertPostSerializedIdentity(this.newWith());
Assert.assertNotEquals(this.classUnderTest(), this.newWith(false, false, false, true));
Assert.assertNotEquals(this.classUnderTest(), this.newWith(true));
}
}
|
[
"craig.motlin@gs.com"
] |
craig.motlin@gs.com
|
e03c0eadf422bd9882ad14d592432182b8d8b606
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/ExprBinary.java
|
09af4089233962af619efeccaca17179b5dca22b
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 609
|
java
|
3
https://raw.githubusercontent.com/RhenaudTheLukark/Lea2C/master/src/fr/ubordeaux/deptinfo/compilation/lea/abstract_syntax/ExprBinary.java
package fr.ubordeaux.deptinfo.compilation.lea.abstract_syntax;
import fr.ubordeaux.deptinfo.compilation.lea.type.TypeException;
public abstract class ExprBinary extends Expr {
private Expr left;
private Expr right;
public ExprBinary(Expr left, Expr right, int line, int column) throws TypeException {
super(line, column);
this.left = left;
this.right = right;
}
public Expr getLeft() {
return left;
}
public Expr getRight() {
return right;
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
b6ea59016685cc7b67b8dbdd4ca747002c505cf0
|
326b59ba3ad20993ce9a9103503faab242f59090
|
/src/net/minecraft/server/class_aym.java
|
73ce8561fcf590ea4276cd1897a519e581451fc1
|
[] |
no_license
|
MinecraftSources/MinecraftServerDec19
|
0960ab05ef7a52d2008c199d33dbf6b5f1bdfdbe
|
c58a9821063cfb5f1c65674ce9c172d945a8fdf9
|
refs/heads/master
| 2021-01-17T05:18:33.321026
| 2015-08-29T03:09:12
| 2015-08-29T03:09:12
| 44,114,398
| 6
| 2
| null | 2015-10-12T14:55:05
| 2015-10-12T14:55:04
| null |
UTF-8
|
Java
| false
| false
| 3,504
|
java
|
package net.minecraft.server;
public class class_aym {
public final double a;
public final double b;
public final double c;
public class_aym(double var1, double var3, double var5) {
if (var1 == -0.0D) {
var1 = 0.0D;
}
if (var3 == -0.0D) {
var3 = 0.0D;
}
if (var5 == -0.0D) {
var5 = 0.0D;
}
a = var1;
b = var3;
c = var5;
}
public class_aym(class_df var1) {
this(var1.n(), var1.o(), var1.p());
}
public class_aym a(class_aym var1) {
return new class_aym(var1.a - a, var1.b - b, var1.c - c);
}
public class_aym a() {
double var1 = MathHelper.a((a * a) + (b * b) + (c * c));
return var1 < 1.0E-4D ? new class_aym(0.0D, 0.0D, 0.0D) : new class_aym(a / var1, b / var1, c / var1);
}
public double b(class_aym var1) {
return (a * var1.a) + (b * var1.b) + (c * var1.c);
}
public class_aym d(class_aym var1) {
return this.a(var1.a, var1.b, var1.c);
}
public class_aym a(double var1, double var3, double var5) {
return this.b(-var1, -var3, -var5);
}
public class_aym e(class_aym var1) {
return this.b(var1.a, var1.b, var1.c);
}
public class_aym b(double var1, double var3, double var5) {
return new class_aym(a + var1, b + var3, c + var5);
}
public double g(class_aym var1) {
double var2 = var1.a - a;
double var4 = var1.b - b;
double var6 = var1.c - c;
return (var2 * var2) + (var4 * var4) + (var6 * var6);
}
public double c(double var1, double var3, double var5) {
double var7 = var1 - a;
double var9 = var3 - b;
double var11 = var5 - c;
return (var7 * var7) + (var9 * var9) + (var11 * var11);
}
public class_aym a(double var1) {
return new class_aym(a * var1, b * var1, c * var1);
}
public double b() {
return MathHelper.a((a * a) + (b * b) + (c * c));
}
public class_aym a(class_aym var1, double var2) {
double var4 = var1.a - a;
double var6 = var1.b - b;
double var8 = var1.c - c;
if ((var4 * var4) < 1.0000000116860974E-7D) {
return null;
} else {
double var10 = (var2 - a) / var4;
return (var10 >= 0.0D) && (var10 <= 1.0D) ? new class_aym(a + (var4 * var10), b + (var6 * var10), c + (var8 * var10)) : null;
}
}
public class_aym b(class_aym var1, double var2) {
double var4 = var1.a - a;
double var6 = var1.b - b;
double var8 = var1.c - c;
if ((var6 * var6) < 1.0000000116860974E-7D) {
return null;
} else {
double var10 = (var2 - b) / var6;
return (var10 >= 0.0D) && (var10 <= 1.0D) ? new class_aym(a + (var4 * var10), b + (var6 * var10), c + (var8 * var10)) : null;
}
}
public class_aym c(class_aym var1, double var2) {
double var4 = var1.a - a;
double var6 = var1.b - b;
double var8 = var1.c - c;
if ((var8 * var8) < 1.0000000116860974E-7D) {
return null;
} else {
double var10 = (var2 - c) / var8;
return (var10 >= 0.0D) && (var10 <= 1.0D) ? new class_aym(a + (var4 * var10), b + (var6 * var10), c + (var8 * var10)) : null;
}
}
@Override
public String toString() {
return "(" + a + ", " + b + ", " + c + ")";
}
public class_aym a(float var1) {
float var2 = MathHelper.b(var1);
float var3 = MathHelper.a(var1);
double var4 = a;
double var6 = (b * var2) + (c * var3);
double var8 = (c * var2) - (b * var3);
return new class_aym(var4, var6, var8);
}
public class_aym b(float var1) {
float var2 = MathHelper.b(var1);
float var3 = MathHelper.a(var1);
double var4 = (a * var2) + (c * var3);
double var6 = b;
double var8 = (c * var2) - (a * var3);
return new class_aym(var4, var6, var8);
}
}
|
[
"jpguereque@yahoo.com.mx"
] |
jpguereque@yahoo.com.mx
|
f4d3b85c412cdb16ffd0daa12f7c3b63116df27a
|
2f08ebda36c998e3c3f4e4201cbc7351c06b3ee5
|
/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/annotations/SearchParamDefinition.java
|
d972429af4ab0b8e21a0d86a5f72524d8b8e2a9e
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
ekivemark/FHIR-Server
|
59e4e738cfaa0853734c559e7f9d630a26380773
|
a83db70fd78ed3fb72175573d7af2e41c7e57925
|
refs/heads/master
| 2021-01-14T12:36:25.123885
| 2015-05-26T00:27:36
| 2015-05-26T00:27:36
| 35,138,490
| 1
| 1
| null | 2015-05-12T21:57:50
| 2015-05-06T03:56:39
|
Java
|
UTF-8
|
Java
| false
| false
| 2,474
|
java
|
package org.hl7.fhir.instance.model.annotations;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(value=ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface SearchParamDefinition {
/**
* The name for this parameter
*/
String name();
/**
* The path for this parameter
*/
String path();
/**
* A description of this parameter
*/
String description() default "";
/**
* The type for this parameter, e.g. "string", or "token"
*/
String type() default "string";
/**
* If the parameter is of type "composite", this parameter lists the names of the parameters
* which this parameter is a composite of. E.g. "name-value-token" is a composite of "name" and "value-token".
* <p>
* If the parameter is not a composite, this parameter must be empty
* </p>
*/
String[] compositeOf() default {};
}
|
[
"gajen.sunthara@gmail.com"
] |
gajen.sunthara@gmail.com
|
f3ed73d55128617bd78d468027473ec76a99205d
|
2ca109aecf6968874eddcc5d59f60bdd409de919
|
/Developing-Android-Apps/Lesson02-GitHub-Repo-Search/SunshineExercises/S02.01-Exercise-Networking/app/src/main/java/com/example/android/sunshine/utilities/NetworkUtils.java
|
efd8cc749c1e13a9626619511ede59128d69ce63
|
[
"Apache-2.0"
] |
permissive
|
MRohit/My-Udacity-Classroom
|
2344572ddd53c395dea83e898d3c426ece27ee3c
|
f75bb66c1ee1fc05810f5d7860e937a302a957a0
|
refs/heads/master
| 2020-12-02T10:04:12.444913
| 2018-06-09T17:00:47
| 2018-06-09T17:00:47
| 96,685,921
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,731
|
java
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.sunshine.utilities;
import android.net.Uri;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;
/**
* These utilities will be used to communicate with the weather servers.
*/
public final class NetworkUtils {
private static final String TAG = NetworkUtils.class.getSimpleName();
private static final String DYNAMIC_WEATHER_URL =
"https://andfun-weather.udacity.com/weather";
private static final String STATIC_WEATHER_URL =
"https://andfun-weather.udacity.com/staticweather";
private static final String FORECAST_BASE_URL = STATIC_WEATHER_URL;
/*
* NOTE: These values only effect responses from OpenWeatherMap, NOT from the fake weather
* server. They are simply here to allow us to teach you how to build a URL if you were to use
* a real API.If you want to connect your app to OpenWeatherMap's API, feel free to! However,
* we are not going to show you how to do so in this course.
*/
/* The format we want our API to return */
private static final String format = "json";
/* The units we want our API to return */
private static final String units = "metric";
/* The number of days we want our API to return */
private static final int numDays = 14;
final static String QUERY_PARAM = "q";
final static String LAT_PARAM = "lat";
final static String LON_PARAM = "lon";
final static String FORMAT_PARAM = "mode";
final static String UNITS_PARAM = "units";
final static String DAYS_PARAM = "cnt";
/**
* Builds the URL used to talk to the weather server using a location. This location is based
* on the query capabilities of the weather provider that we are using.
*
* @param locationQuery The location that will be queried for.
* @return The URL to use to query the weather server.
*/
public static URL buildUrl(String locationQuery) {
Log.v(TAG, "Started building URI");
// TODO (1) Fix this method to return the URL used to query Open Weather Map's API
Uri buildUri = Uri.parse(FORECAST_BASE_URL).buildUpon().appendQueryParameter(QUERY_PARAM,locationQuery)
.appendQueryParameter(FORMAT_PARAM,format)
.appendQueryParameter(UNITS_PARAM,units)
.appendQueryParameter(DAYS_PARAM,Integer.toString(numDays))
.build();
URL url = null;
Log.v(TAG, "Built URI 1" + url);
try {
url = new URL(buildUri.toString());
} catch (MalformedURLException e) {
e.printStackTrace();
}
Log.v(TAG, "Built URI 2" + url);
return url;
}
/**
* Builds the URL used to talk to the weather server using latitude and longitude of a
* location.
*
* @param lat The latitude of the location
* @param lon The longitude of the location
* @return The Url to use to query the weather server.
*/
public static URL buildUrl(Double lat, Double lon) {
/** This will be implemented in a future lesson **/
return null;
}
/**
* This method returns the entire result from the HTTP response.
*
* @param url The URL to fetch the HTTP response from.
* @return The contents of the HTTP response.
* @throws IOException Related to network and stream reading
*/
public static String getResponseFromHttpUrl(URL url) throws IOException {
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
try {
InputStream in = urlConnection.getInputStream();
Scanner scanner = new Scanner(in);
scanner.useDelimiter("\\A");
boolean hasInput = scanner.hasNext();
if (hasInput) {
return scanner.next();
} else {
return null;
}
} finally {
urlConnection.disconnect();
}
}
}
|
[
"mourya.rohit32@gmail.com"
] |
mourya.rohit32@gmail.com
|
69b66f89afefd1273a60596c2c1cf1c272842a01
|
754a0fdc13c70711b33a414e48f41333a7e8052d
|
/app/src/main/java/com/pbph/yuguo/myview/MyScrollView.java
|
decc61f3408dd12d01fcb490153b2c70305f460a
|
[] |
no_license
|
lianjf646/PbphYuGuo
|
b70b3315d9815af078101573066cbc215d46945c
|
78e643cd1b0f142f96ce595fb0c5788b3e4bb09a
|
refs/heads/master
| 2023-04-23T00:48:00.842462
| 2021-04-30T06:25:12
| 2021-04-30T06:25:12
| 363,044,826
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,342
|
java
|
package com.pbph.yuguo.myview;
import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.Display;
import android.widget.ScrollView;
/**
* Created by 挡风的纱窗 on 2018/12/24.
*/
public class MyScrollView extends ScrollView {
private Context mContext;
public MyScrollView(Context context) {
this(context, null);
}
public MyScrollView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public MyScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
this.mContext = context;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
try {
Display display = ((Activity) mContext).getWindowManager().getDefaultDisplay();
DisplayMetrics d = new DisplayMetrics();
display.getMetrics(d);
// 设置控件最大高度不能超过屏幕高度的一半
heightMeasureSpec = MeasureSpec.makeMeasureSpec(d.heightPixels / 2, MeasureSpec.AT_MOST);
} catch (Exception e) {
e.printStackTrace();
} // 重新计算控件的宽高
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
|
[
"1548300188@qq.com"
] |
1548300188@qq.com
|
a7c4ed3eb692b45e71037efe7a94276be60d5507
|
876e631034c7a985574de505bd558abef4bc5b41
|
/src/main/java/com/sample/helloWorld/HelloWorldServiceImpl.java
|
a666055f5b71bfad1613aabaa61e07d92ee13754
|
[
"Apache-2.0"
] |
permissive
|
amanjadon54/GRPC_SPRING_BOOT
|
fe5b5661fd7787ca3116e84ef7889746e4ae7621
|
77eb5b7f13f048941ab639c915ad18a573a39811
|
refs/heads/master
| 2020-04-29T18:34:28.965788
| 2019-03-18T17:14:40
| 2019-03-18T17:14:40
| 176,327,980
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 873
|
java
|
package com.sample.helloWorld;
import com.sample.helloworld.Greeting;
import com.sample.helloworld.HelloWorldServiceGrpc;
import com.sample.helloworld.Person;
import io.grpc.stub.StreamObserver;
import org.lognet.springboot.grpc.GRpcService;
@GRpcService
public class HelloWorldServiceImpl extends HelloWorldServiceGrpc.HelloWorldServiceImplBase {
@Override
public void sayHello(Person request, StreamObserver<Greeting> responseObserver) {
System.out.println("server received {} "+ request);
String message = "Hello " + request.getFirstName() + " "
+ request.getLastName() + "!";
Greeting greeting =
Greeting.newBuilder().setMessage(message).build();
System.out.println("server responded {} "+ greeting);
responseObserver.onNext(greeting);
responseObserver.onCompleted();
}
}
|
[
"amanjadon54@gmail.com"
] |
amanjadon54@gmail.com
|
a2fb138286bec3163d04c48f7bda8eb12222093e
|
f07c74888bf32e8df1a9547e290a02e0726b49a8
|
/src/main/java/com/springbook/biz/common/AroundAdvice.java
|
ce6d1ed8ca74bea369057cc85480a606e11e87ea
|
[] |
no_license
|
moving-line/spring-board
|
ac5f73ad6816dfd59e3c3c4bac2c787bfa3a20d4
|
4e0a4f602f981d18171548ea7f8ffebca618ca52
|
refs/heads/master
| 2022-12-23T01:43:10.798695
| 2020-03-05T11:32:22
| 2020-03-05T11:32:22
| 180,132,322
| 0
| 0
| null | 2022-12-16T07:13:18
| 2019-04-08T11:13:07
|
Java
|
UTF-8
|
Java
| false
| false
| 720
|
java
|
package com.springbook.biz.common;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Service;
import org.springframework.util.StopWatch;
@Service
@Aspect
public class AroundAdvice {
@Around("PointcutCommon.allPointcut()")
public Object aroundLog(ProceedingJoinPoint pjp) throws Throwable {
String method = pjp.getSignature().getName();
StopWatch stopWatch = new StopWatch();
stopWatch.start();
Object returnObj = pjp.proceed();
stopWatch.stop();
System.out.println(method + "수행에 걸린 시간 :" + stopWatch.getTotalTimeMillis() + "(ms)초");
return returnObj;
}
}
|
[
"movinglinecheck@gmail.com"
] |
movinglinecheck@gmail.com
|
b761136a1c78d4ab43762b014d6672b01dc473b7
|
53510b2f25f4fab32b9a0494500b84f6c79cb2ee
|
/FQPMall/app/src/main/java/com/fengqipu/mall/view/wheel/widget/OnWheelChangedListener.java
|
f3ce677e6a4a5242512a2237dd96ed39927d7191
|
[] |
no_license
|
shenkuen88/FQPMall
|
14c594172e9e70c8c752c1a452bd898161c796c6
|
6b81cc076844f126c5e682e9c1d5f5c7bc5add6e
|
refs/heads/master
| 2020-12-03T00:42:41.203339
| 2017-11-30T06:48:29
| 2017-11-30T06:48:29
| 96,063,803
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,176
|
java
|
/*
* Copyright 2011 Yuri Kanivets
*
* 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.fengqipu.mall.view.wheel.widget;
/**
* Wheel changed listener interface.
* <p>The onChanged() method is called whenever current wheel positions is changed:
* <li> New Wheel position is set
* <li> Wheel view is scrolled
*/
public interface OnWheelChangedListener {
/**
* Callback method to be invoked when current item changed
* @param wheel the wheel view whose state has changed
* @param oldValue the old value of current item
* @param newValue the new value of current item
*/
void onChanged(WheelView wheel, int oldValue, int newValue);
}
|
[
"543126764@qq.com"
] |
543126764@qq.com
|
8a083856d7631a4d037b307785788e48e2078340
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_587a9e47db4e257b2d1df789ba660c90fed330fa/SesameStatement/5_587a9e47db4e257b2d1df789ba660c90fed330fa_SesameStatement_s.java
|
9ab74ebe60b98ee4334ba99b1760041a337ea67c
|
[] |
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,361
|
java
|
package sesameWrapper;
import it.unibz.krdb.obda.model.BNode;
import it.unibz.krdb.obda.model.Constant;
import it.unibz.krdb.obda.model.Predicate;
import it.unibz.krdb.obda.model.URIConstant;
import it.unibz.krdb.obda.model.ValueConstant;
import it.unibz.krdb.obda.model.Predicate.COL_TYPE;
import it.unibz.krdb.obda.model.impl.OBDAVocabulary;
import it.unibz.krdb.obda.ontology.Assertion;
import it.unibz.krdb.obda.ontology.BinaryAssertion;
import it.unibz.krdb.obda.ontology.ClassAssertion;
import it.unibz.krdb.obda.ontology.UnaryAssertion;
import org.openrdf.model.Literal;
import org.openrdf.model.Resource;
import org.openrdf.model.Statement;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.model.ValueFactory;
import org.openrdf.model.impl.ValueFactoryImpl;
public class SesameStatement implements Statement {
private Resource subject = null;
private URI predicate = null;
private Value object = null;
private Resource context = null;
private ValueFactory fact = new ValueFactoryImpl();
public SesameStatement(Assertion assertion) {
Constant subj;
if (assertion instanceof BinaryAssertion) {
//object or data property assertion
BinaryAssertion ba = (BinaryAssertion) assertion;
subj = ba.getValue1();
Predicate pred = ba.getPredicate();
Constant obj = ba.getValue2();
// convert string into respective type
if (subj instanceof BNode)
subject = fact.createBNode(((BNode) subj).getName());
else if (subj instanceof URIConstant)
subject = fact.createURI(subj.getValue());
else if (subj instanceof ValueConstant)
throw new RuntimeException("Invalid ValueConstant as subject!");
predicate = fact.createURI(pred.getName().toString()); // URI
if (obj instanceof BNode)
object = fact.createBNode(((BNode) obj).getName());
else if (obj instanceof URIConstant)
object = fact.createURI(obj.getValue());
else if (obj instanceof ValueConstant)
object = getLiteral((ValueConstant)obj);
} else if (assertion instanceof UnaryAssertion) {
//class assertion
UnaryAssertion ua = (UnaryAssertion) assertion;
subj = ua.getValue();
String pred = OBDAVocabulary.RDF_TYPE;
Predicate obj = ua.getPredicate();
// convert string into respective type
if (subj instanceof BNode)
subject = fact.createBNode(((BNode) subj).getName());
else if (subj instanceof URIConstant)
subject = fact.createURI(subj.getValue());
else if (subj instanceof ValueConstant)
throw new RuntimeException("Invalid ValueConstant as subject!");
predicate = fact.createURI(pred); // URI
object = fact.createURI(obj.getName().toString());
}
}
private Literal getLiteral(ValueConstant literal)
{
URI datatype = null;
if (literal.getType() == COL_TYPE.BOOLEAN)
datatype = fact
.createURI(OBDAVocabulary.XSD_BOOLEAN_URI);
else if (literal.getType() == COL_TYPE.DATETIME)
datatype = fact
.createURI(OBDAVocabulary.XSD_DATETIME_URI);
else if (literal.getType() == COL_TYPE.DECIMAL)
datatype = fact
.createURI(OBDAVocabulary.XSD_DECIMAL_URI);
else if (literal.getType() == COL_TYPE.DOUBLE)
datatype = fact
.createURI(OBDAVocabulary.XSD_DOUBLE_URI);
else if (literal.getType() == COL_TYPE.INTEGER)
datatype = fact
.createURI(OBDAVocabulary.XSD_INTEGER_URI);
else if (literal.getType() == COL_TYPE.LITERAL)
datatype = null;
else if (literal.getType() == COL_TYPE.OBJECT)
datatype = fact
.createURI(OBDAVocabulary.XSD_STRING_URI);
else if (literal.getType() == COL_TYPE.STRING)
datatype = fact
.createURI(OBDAVocabulary.XSD_STRING_URI);
Literal value = fact.createLiteral(literal.getValue(), datatype);
return value;
}
public Resource getSubject() {
return subject;
}
public URI getPredicate() {
return predicate;
}
public Value getObject() {
return object;
}
public Resource getContext() {
// TODO Auto-generated method stub
return context;
}
@Override
public String toString()
{
return "("+subject+", "+predicate+", "+object+")";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
076d52f4e8460b8e653dc535cf918d6b23cba546
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE89_SQL_Injection/CWE89_SQL_Injection__console_readLine_executeUpdate_51b.java
|
7738fe9e68c34f6537181847b0a893d3b8e37958
|
[] |
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
| 5,334
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__console_readLine_executeUpdate_51b.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-51b.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: console_readLine Read data from the console using readLine()
* GoodSource: A hardcoded string
* Sinks: executeUpdate
* GoodSink: Use prepared statement and executeUpdate (properly)
* BadSink : data concatenated into SQL statment used in executeUpdate(), which could result in SQL Injection
* Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package
*
* */
package testcases.CWE89_SQL_Injection;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE89_SQL_Injection__console_readLine_executeUpdate_51b
{
public void bad_sink(String data ) throws Throwable
{
Connection conn_tmp2 = null;
Statement sqlstatement = null;
try {
conn_tmp2 = IO.getDBConnection();
sqlstatement = conn_tmp2.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statment used in executeUpdate(), which could result in SQL Injection */
int iResult = sqlstatement.executeUpdate("insert into users (status) values ('updated') where name='"+data+"'");
IO.writeLine("Updated " + iResult + " rows successfully.");
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error getting database connection", se);
}
finally {
try {
if( sqlstatement != null )
{
sqlstatement.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Statement", e);
}
finally {
try {
if( conn_tmp2 != null )
{
conn_tmp2.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Connection", e);
}
}
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data ) throws Throwable
{
Connection conn_tmp2 = null;
Statement sqlstatement = null;
try {
conn_tmp2 = IO.getDBConnection();
sqlstatement = conn_tmp2.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statment used in executeUpdate(), which could result in SQL Injection */
int iResult = sqlstatement.executeUpdate("insert into users (status) values ('updated') where name='"+data+"'");
IO.writeLine("Updated " + iResult + " rows successfully.");
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error getting database connection", se);
}
finally {
try {
if( sqlstatement != null )
{
sqlstatement.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Statement", e);
}
finally {
try {
if( conn_tmp2 != null )
{
conn_tmp2.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Connection", e);
}
}
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(String data ) throws Throwable
{
Connection conn_tmp2 = null;
PreparedStatement sqlstatement = null;
try {
/* FIX: Use prepared statement and executeUpdate (properly) */
conn_tmp2 = IO.getDBConnection();
sqlstatement = conn_tmp2.prepareStatement("insert into users (status) values ('updated') where name=?");
sqlstatement.setString(1, data);
int iResult = sqlstatement.executeUpdate();
IO.writeLine("Updated " + iResult + " rows successfully.");
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error getting database connection", se);
}
finally {
try {
if( sqlstatement != null )
{
sqlstatement.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing PreparedStatment", e);
}
finally {
try {
if( conn_tmp2 != null )
{
conn_tmp2.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Connection", e);
}
}
}
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
653d634ed08608eb83a554bdeece0e7dd8400e57
|
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
|
/schemaOrgGson/src/org/kyojo/schemaOrg/m3n3/gson/core/clazz/ParentAudienceDeserializer.java
|
a0dab8b8a3758de7437a6a9953d7abc5a75d7296
|
[
"Apache-2.0"
] |
permissive
|
nagaikenshin/schemaOrg
|
3dec1626781913930da5585884e3484e0b525aea
|
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
|
refs/heads/master
| 2021-06-25T04:52:49.995840
| 2019-05-12T06:22:37
| 2019-05-12T06:22:37
| 134,319,974
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,089
|
java
|
package org.kyojo.schemaorg.m3n3.gson.core.clazz;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import org.kyojo.gson.JsonDeserializationContext;
import org.kyojo.gson.JsonDeserializer;
import org.kyojo.gson.JsonElement;
import org.kyojo.gson.JsonObject;
import org.kyojo.gson.JsonParseException;
import org.kyojo.gson.reflect.TypeToken;
import org.kyojo.schemaorg.m3n3.core.impl.PARENT_AUDIENCE;
import org.kyojo.schemaorg.m3n3.core.Clazz.ParentAudience;
public class ParentAudienceDeserializer implements JsonDeserializer<ParentAudience> {
@Override
public ParentAudience deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
throws JsonParseException {
if(jsonElement.isJsonPrimitive()) {
return new PARENT_AUDIENCE(jsonElement.getAsString());
}
JsonObject jsonObject = jsonElement.getAsJsonObject();
ParentAudience obj = new PARENT_AUDIENCE();
HashMap<String, Field> fldMap = new HashMap<>();
Field[] flds = PARENT_AUDIENCE.class.getFields();
for(Field fld : flds) {
fldMap.put(fld.getName(), fld);
}
for(Entry<String, JsonElement> ent : jsonObject.entrySet()) {
if(fldMap.containsKey(ent.getKey())) {
Field fld = fldMap.get(ent.getKey());
JsonElement elm = ent.getValue();
try {
if(fld.getType().equals(List.class)) {
ParameterizedType gType = (ParameterizedType)fld.getGenericType();
Type[] aTypes = gType.getActualTypeArguments();
Type listType = TypeToken.getParameterized(ArrayList.class, (Class<?>)aTypes[0]).getType();
List<?> list = context.deserialize(elm, listType);
fld.set(obj, list);
} else {
Object val = context.deserialize(elm, fld.getType());
fld.set(obj, val);
}
} catch(IllegalArgumentException iae) {
throw new JsonParseException(iae);
} catch(IllegalAccessException iae) {
throw new JsonParseException(iae);
}
}
}
return obj;
}
}
|
[
"nagai@nagaikenshin.com"
] |
nagai@nagaikenshin.com
|
b6d320afe2e54dfbd47dd465d960413436610b37
|
a6006a376d7fd56980896d983e202b407213abf5
|
/bargraph/src/main/java/com/example/bargraph/BarCharGroupView.java
|
e22ba5274c7f119aeb174140b09ecf6d229babd9
|
[] |
no_license
|
ghl7231699/PersonalTest
|
3f0960c012336b6b3d79a0b1783604f1b43b4cc1
|
1a2505a527927f91758a89c056695c7abb4fbb51
|
refs/heads/master
| 2021-01-19T02:57:05.759437
| 2020-07-04T09:54:26
| 2020-07-04T09:54:26
| 87,300,126
| 6
| 1
| null | 2017-11-05T13:56:03
| 2017-04-05T11:09:15
|
Java
|
UTF-8
|
Java
| false
| false
| 5,800
|
java
|
package com.example.bargraph;
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.DashPathEffect;
import android.graphics.Paint;
import android.graphics.Path;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
/**
* Created by guhongliang on 2017/9/8.
*/
public class BarCharGroupView extends LinearLayout {
private boolean orientation = false;//默认为水平方向
private int mWidth;//获取到控件的宽度
private int mHeight;
private Activity mActivity;
private int paddingLeft;//距离左边的距离
private int paddingRight;//距离右边的距离
private int paddingTop;//距离右边的距离
private int paddingBottom;//距离右边的距离
private int num;//加入的子view的个数
private int viewMargin = 10;//相邻两个view之间的距离
MarginLayoutParams layoutParams;
private Path mPath;
private String[] ySteps = new String[]{"0", "20k", "40k", "60k", "80k", "100k"};
private Paint mPaint;
public BarCharGroupView(Context context) {
this(context, null);
}
public BarCharGroupView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
WindowManager windowManager;
if (orientation) {
setOrientation(VERTICAL);
} else {
setOrientation(HORIZONTAL);
}
if (context instanceof Activity) {
mActivity = (Activity) context;
windowManager = mActivity.getWindowManager();
DisplayMetrics metrics = new DisplayMetrics();
windowManager.getDefaultDisplay().getMetrics(metrics);
mWidth = metrics.widthPixels;
// mHeight = metrics.heightPixels;
}
mPaint = new Paint();
// mPaint.setColor(R.color.imaginary_line);
mPaint.setColor(Color.BLACK);
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeWidth(3);
mPath = new Path();
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int size = MeasureSpec.getSize(heightMeasureSpec);
int mode = MeasureSpec.getMode(heightMeasureSpec);
int screenWidth = Utils.getScreenWidth(getContext());
int screenHeight = Utils.getScreenHeight(getContext());
//计算出所有子view的宽、高
measureChildren(widthMeasureSpec, heightMeasureSpec);
if (mode == MeasureSpec.EXACTLY) {
mHeight = size;
} else if (mode == MeasureSpec.AT_MOST) {
mHeight = Math.min(screenWidth, size);
}
int modeWidth = MeasureSpec.getMode(widthMeasureSpec);
int sizeWidth = MeasureSpec.getSize(widthMeasureSpec);
if (modeWidth == MeasureSpec.EXACTLY) {
mWidth = sizeWidth;
} else if (modeWidth == MeasureSpec.AT_MOST) {
mWidth = Math.min(screenHeight, sizeWidth);
}
Log.e(MainActivity.TAG, "mWidth: " + mWidth + " mHeight: " + mHeight);
setMeasuredDimension(mWidth, mHeight);
// super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
num = getChildCount();
//获取到每个子view的宽度
int viewWidth = (mWidth - paddingLeft - paddingRight - viewMargin * (num - 1)) / num;
for (int i = 0; i < num; i++) {
View childAt = getChildAt(i);
int childWidth = childAt.getMeasuredWidth();
int childHeight = childAt.getMeasuredHeight();
Log.e(MainActivity.TAG, "childWidth: " + childWidth + " childHeight: " + childHeight);
layoutParams = (MarginLayoutParams) childAt.getLayoutParams();
int cl = viewWidth * i + layoutParams.leftMargin * (i + 1);
int ct = mHeight - childHeight;
int cr = cl + viewWidth * (i + 1);
int cb = mHeight-10;
Log.e(MainActivity.TAG, "cl=="
+ cl + "\n" + "ct=="
+ ct + "\n" + "cr=="
+ cr + "\n" + "cb=="
+ cb);
childAt.layout(cl, ct, cr, cb);
}
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
int y = mHeight;
canvas.drawLine(0, y - 10, mWidth, y - 10, mPaint);
//画虚线
int oneH = y / (ySteps.length - 1);
drawImaginaryLine(canvas, oneH);
drawYText(canvas, y, oneH);
}
private void drawYText(Canvas canvas, int y, int oneH) {
for (int i = 0; i < ySteps.length; i++) {
if (i == ySteps.length - 1) {
canvas.drawText(ySteps[i], 10, y + 10 - oneH * i, mPaint);
} else {
canvas.drawText(ySteps[i], 10, y - oneH * i, mPaint);
}
}
}
private void drawImaginaryLine(Canvas canvas, int oneH) {
mPaint.setColor(R.color.imaginary_line);
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeWidth(3);
mPaint.setAntiAlias(true);
mPaint.setPathEffect(new DashPathEffect(new float[]{15, 5}, 0));
for (int i = 0; i < ySteps.length - 1; i++) {
mPath.reset();
mPath.moveTo(50, oneH + oneH * i);
mPath.lineTo(mWidth, oneH + oneH * i);
// canvas.drawLine(50, oneH + oneH * i, mWidth, oneH + oneH * i, mPaint);
canvas.drawPath(mPath, mPaint);
}
}
}
|
[
"ghl1149660196@163.com"
] |
ghl1149660196@163.com
|
d0c96b87f553181d96d1c795c9b0d90e64130716
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/27/27_d54f81a91735dd6e275e945d9588083a0b464c42/TestMain/27_d54f81a91735dd6e275e945d9588083a0b464c42_TestMain_t.java
|
4347fbb18a0f4c474dc2923a3c0e43d0d0e2470c
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,977
|
java
|
package ece454p1;
import java.util.*;
import java.util.Map.Entry;
import java.net.*;
import java.io.*;
public class TestMain {
public static InetAddress localAddress;
public static int localPort;
static String peersFilename = null;
static int peerNumber = -1;
private static void printUsageAndQuit(int code) {
System.out.println();
System.out.println("Usage:");
System.out.println("\tjava ece454p1.TestMain peers-file peer-number");
System.out.println();
System.exit(code);
}
private static void getMoreInput(){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Input PeerFile: ");
try {
peersFilename = br.readLine();
} catch (IOException e) {
System.out.println("Error parsing peerName");
System.exit(1);
}
System.out.print("Input PeerNumber: ");
try {
peerNumber = Integer.parseInt(br.readLine());
} catch (IOException e) {
System.out.println("Error parsing peerNumber");
System.exit(1);
}
}
/**
* This is our simple command line test harness
* It has usage of java ece454p1.TestMain peers-file peer-number
* where peers-file is the path to the peers.txt
* and peer-number is the line number of ip and port of local machine
*
* peer number is used to make the local instances to play nicely
* originally, the ip address was used to determine the local machine
*
* Available commands to the harness are:
* {insert, query, join, leave} for testing the peer API
* insert (filename) will tell peer to insert the filename
* query will create new Status object to be altered by peer
* join will tell peer to join the pool and signal other peers
* leave will tell peer to leave the pool and notify other peers
* join and leave will fail if you are already connected/disconnected
* {show, set, exit} to make development easier easier
* show will show the online and off-line status of proxy peers
* set will change the local port of the peer
* exit will end the test harness (doesn't system.exit)
* @param args
*/
public static void main(String[] args) {
// parse args
for (int i = 0; i < args.length; i++) {
if (i == args.length - 2) { // Peers file
peersFilename = args[i];
} else if (i == args.length - 1) { // Peer number
try {
peerNumber = Integer.parseInt(args[i]);
} catch (NumberFormatException e) {
System.out.println("Error parsing peer number");
}
} else {
System.out.println("Unknown arg: " + args[i]);
}
}
if (peersFilename == null || peerNumber == -1) {
System.out.println("Error: Missing peers file or peer number.");
getMoreInput();
}
// Parse peers file
ArrayList<ProxyPeer> proxyPeerList = new ArrayList<ProxyPeer>();
RandomAccessFile peersIn = null;
try {
peersIn = new RandomAccessFile(peersFilename, "r");
int lineNumber = 0;
String line;
while ((line = peersIn.readLine()) != null) {
String[] items = line.split(" ");
if (items.length != 2) {
System.out.println("Error parsing peers file");
System.exit(1);
}
InetAddress address = null;
try {
address = InetAddress.getByName(items[0]);
} catch (UnknownHostException e) {
System.out.println("Error parsing peer address");
System.exit(1);
}
int port = -1;
try {
port = Integer.parseInt(items[1]);
} catch (NumberFormatException e) {
System.out.println("Error parsing port number");
System.exit(1);
}
if (lineNumber == peerNumber) {
localAddress = address;
localPort = port;
} else {
proxyPeerList.add(new ProxyPeer(address, port));
}
lineNumber++;
}
} catch (IOException e) {
System.out.println("Error reading peers file");
System.exit(1);
} finally {
try {
if (peersIn != null)
peersIn.close();
} catch (IOException e) {
}
}
if (peerNumber < 0 || peerNumber > proxyPeerList.size()) {
System.out.println("Error: Peer number out of range");
System.exit(1);
}
// Startup info
System.out.println("We are "+localAddress.getHostAddress() + ":" + localPort);
System.out.println("Other peers:");
for (ProxyPeer p : proxyPeerList){
System.out.println("\t"+p.host.getHostAddress() + ":" + p.port);
}
// Create local peer
Peer peer = new Peer(proxyPeerList);
peer.localAddress = localAddress;
peer.localPort = localPort;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String input = "";
while(true){
System.out.print("COMMANDS (insert, query, join, leave) PROMPT> ");
String argv[] = {};
try {
input = br.readLine();
if (input.split(" ").length > 1){
argv = input.split(" ");
input = argv[0];
}
} catch (IOException ioe) {
}
if (input.toLowerCase().equals("show")){
for(ProxyPeer pi : proxyPeerList){
System.out.println(pi.host+":"+pi.port+" is "+(pi.connected ? "online" : "offline"));
}
}else if (input.toLowerCase().equals("set")){
System.out.println("Change myPort to...");
String input2 = "";
try {
input2 = br.readLine();
peer.localPort = Integer.parseInt(input2);
} catch (IOException ioe) {
}
}else if (input.toLowerCase().equals("insert")){
String input2 = "";
if (argv.length > 1){
input2 = argv[1];
}else{
System.out.println("what is the path of the file you want to insert?");
try {
input2 = br.readLine();
} catch (IOException ioe) {
}
}
System.out.println("Telling peer to insert "+input2);
peer.insert(input2);
}else if (input.toLowerCase().equals("insert")){
System.out.println("what is the path of the file you want to insert?");
String input2 = "";
try {
input2 = br.readLine();
System.out.println("Telling peer to insert "+input2);
peer.insert(input2);
} catch (IOException ioe) {
}
}else if(input.toLowerCase().equals("query")){
System.out.println("Telling peer to query...");
Status status = new Status();
peer.query(status);
System.out.println("Status contains info of "+status.numberOfFiles()+" files");
}else if(input.toLowerCase().equals("join")){
if(peer.join()== ReturnCodes.ERR_UNKNOWN_WARNING){
System.out.println("Peer is already connected. Leave first.");
}else{
System.out.println("Telling peer to join...");
}
}else if(input.toLowerCase().equals("leave")){
if(peer.leave()== ReturnCodes.ERR_UNKNOWN_WARNING){
System.out.println("Peer is already not connected. Join first.");
}else{
System.out.println("Telling peer to leave...");
}
}else if(input.toLowerCase().equals("exit")){
break;
}else{
System.out.println("Invalid command!");
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
5990483591fc63f138bd5b3cdb3e9c8643473bc0
|
5fc707b4ef12826faca8ec1c580cb1dcf4cc7dc2
|
/news-master/news-admin/src/main/java/com/kanfa/news/admin/entity/ActivityVote.java
|
67e59ca2497f0284bcf57a1625ee5debaa5ab471
|
[] |
no_license
|
MavonCmc/wdw
|
06597b8aca4054ecc6be7d2062543311da2073c0
|
814911c723fe6a9a7cd2c13e968776ead71f1b1b
|
refs/heads/master
| 2023-03-15T14:49:46.993701
| 2018-08-29T08:34:42
| 2018-08-29T08:34:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,227
|
java
|
package com.kanfa.news.admin.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
* 活动--投票表
*
* @author chenjie
* @email chenjie@kanfanews.com
* @date 2018-04-10 17:01:20
*/
@Table(name = "kf_activity_vote")
public class ActivityVote implements Serializable {
private static final long serialVersionUID = 1L;
//
@Id
private Integer id;
//
@Column(name = "activity_id")
private Integer activityId;
//背景颜色
@Column(name = "bgcolor")
private String bgcolor;
//是否允许登录
@Column(name = "need_login")
private Integer needLogin;
//是否允许多选
@Column(name = "vote_multi")
private Integer voteMulti;
//多选,最多选择几张
@Column(name = "vote_multi_num")
private Integer voteMultiNum;
//状态
@Column(name = "stat")
private Integer stat;
//是否只允许投一次
@Column(name = "vote_once")
private Integer voteOnce;
//再次投票时间间隔
@Column(name = "vote_period")
private Integer votePeriod;
//是否显示数量
@Column(name = "show_num")
private Integer showNum;
//
@Column(name = "vote_total")
private Integer voteTotal;
//
@Column(name = "comment_total")
private Integer commentTotal;
//是否凌晨清空投票记数
@Column(name = "flush_vote_num")
private Integer flushVoteNum;
/**
* 设置:
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:
*/
public Integer getId() {
return id;
}
/**
* 设置:
*/
public void setActivityId(Integer activityId) {
this.activityId = activityId;
}
/**
* 获取:
*/
public Integer getActivityId() {
return activityId;
}
/**
* 设置:背景颜色
*/
public void setBgcolor(String bgcolor) {
this.bgcolor = bgcolor;
}
/**
* 获取:背景颜色
*/
public String getBgcolor() {
return bgcolor;
}
/**
* 设置:是否允许登录
*/
public void setNeedLogin(Integer needLogin) {
this.needLogin = needLogin;
}
/**
* 获取:是否允许登录
*/
public Integer getNeedLogin() {
return needLogin;
}
/**
* 设置:是否允许多选
*/
public void setVoteMulti(Integer voteMulti) {
this.voteMulti = voteMulti;
}
/**
* 获取:是否允许多选
*/
public Integer getVoteMulti() {
return voteMulti;
}
/**
* 设置:多选,最多选择几张
*/
public void setVoteMultiNum(Integer voteMultiNum) {
this.voteMultiNum = voteMultiNum;
}
/**
* 获取:多选,最多选择几张
*/
public Integer getVoteMultiNum() {
return voteMultiNum;
}
/**
* 设置:状态
*/
public void setStat(Integer stat) {
this.stat = stat;
}
/**
* 获取:状态
*/
public Integer getStat() {
return stat;
}
/**
* 设置:是否只允许投一次
*/
public void setVoteOnce(Integer voteOnce) {
this.voteOnce = voteOnce;
}
/**
* 获取:是否只允许投一次
*/
public Integer getVoteOnce() {
return voteOnce;
}
/**
* 设置:再次投票时间间隔
*/
public void setVotePeriod(Integer votePeriod) {
this.votePeriod = votePeriod;
}
/**
* 获取:再次投票时间间隔
*/
public Integer getVotePeriod() {
return votePeriod;
}
/**
* 设置:是否显示数量
*/
public void setShowNum(Integer showNum) {
this.showNum = showNum;
}
/**
* 获取:是否显示数量
*/
public Integer getShowNum() {
return showNum;
}
/**
* 设置:
*/
public void setVoteTotal(Integer voteTotal) {
this.voteTotal = voteTotal;
}
/**
* 获取:
*/
public Integer getVoteTotal() {
return voteTotal;
}
/**
* 设置:
*/
public void setCommentTotal(Integer commentTotal) {
this.commentTotal = commentTotal;
}
/**
* 获取:
*/
public Integer getCommentTotal() {
return commentTotal;
}
/**
* 设置:是否凌晨清空投票记数
*/
public void setFlushVoteNum(Integer flushVoteNum) {
this.flushVoteNum = flushVoteNum;
}
/**
* 获取:是否凌晨清空投票记数
*/
public Integer getFlushVoteNum() {
return flushVoteNum;
}
}
|
[
"wdw.ok@163.com"
] |
wdw.ok@163.com
|
f93e7cd31f9ecba1ab95ecd0fac1e17f4251dd5d
|
84837d55a3f8327f54880392bf239313f41442fe
|
/app/src/main/java/cn/idcby/jiajubang/view/refresh/Util.java
|
8d8da6a75294981fcc66be1e4b1398afd7462d51
|
[] |
no_license
|
WhiteorBlack/mojiang
|
910d381c7bed984a2c68d37ba86ccd73ff5a1411
|
dca1f06818f79fb1953e9f7ca8bdf96363b99618
|
refs/heads/master
| 2020-04-07T04:54:58.654297
| 2018-12-29T10:28:37
| 2018-12-29T10:28:37
| 158,077,012
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 770
|
java
|
package cn.idcby.jiajubang.view.refresh;
import android.content.Context;
public class Util {
public static int dip2px(Context context, float dpValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}
public static int px2dip(Context context, float pxValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (pxValue / scale + 0.5f);
}
public static float limitValue(float a, float b) {
float valve = 0;
final float min = Math.min(a, b);
final float max = Math.max(a, b);
valve = valve > min ? valve : min;
valve = valve < max ? valve : max;
return valve;
}
}
|
[
"415082375@qq.com"
] |
415082375@qq.com
|
47cc277cde82b8e8f0a4cc06a15f71b46edae18b
|
54b44662ea3db38363a890f94259995374fec7ee
|
/APP Common/hr/adriacomsoftware/app/common/pranjenovca/po/dto/PrnPoPovezanaOsobaRs.java
|
b29371f34e1b30fb6838aed668345cf4b3c8e377
|
[] |
no_license
|
zrosko/COMPONENTS-COMMON
|
e9a534a130c7764d774bae9cd3fda52dc131cdc2
|
5859a6947ae3459bc5d3a38fd5cdb8ab30101ee8
|
refs/heads/master
| 2021-01-10T20:05:23.108044
| 2015-03-11T15:01:41
| 2015-03-11T15:01:41
| 31,539,371
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 767
|
java
|
package hr.adriacomsoftware.app.common.pranjenovca.po.dto;
import hr.as2.inf.common.data.AS2Record;
import hr.as2.inf.common.data.AS2RecordList;
import java.util.Iterator;
public class PrnPoPovezanaOsobaRs extends AS2RecordList {
private static final long serialVersionUID = 1L;
public PrnPoPovezanaOsobaRs() {
super();
}
public PrnPoPovezanaOsobaRs(AS2RecordList set) {
super(); // rows not set inside super constructor
setColumnNames(set.getColumnNames());
setColumnSizes(set.getColumnSizes());
setMetaData(set.getMetaData());
Iterator<AS2Record> E = set.getRows().iterator();
while (E.hasNext()) {
AS2Record row = E.next();
PrnPoPovezanaOsobaVo vo = new PrnPoPovezanaOsobaVo(row);
this.addRow(vo);
}
}
}
|
[
"zrosko@gmail.com"
] |
zrosko@gmail.com
|
eae03b9d118a4221d56142b443e93ff1e21afb8e
|
51934a954934c21cae6a8482a6f5e6c3b3bd5c5a
|
/output/94cdac70c7e24b4e8bdb9e513a8688a3.java
|
584df3efcf6a4e158a523a3e72670ccb1200275d
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
comprakt/comprakt-fuzz-tests
|
e8c954d94b4f4615c856fd3108010011610a5f73
|
c0082d105d7c54ad31ab4ea461c3b8319358eaaa
|
refs/heads/master
| 2021-09-25T15:29:58.589346
| 2018-10-23T17:33:46
| 2018-10-23T17:33:46
| 154,370,249
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 974
|
java
|
class Ms_5XkRJs3Q29H {
}
class JUMfmw3Svs2Uu {
}
class LUvYG9gy23YM {
}
class NE {
public int f9R93EYnd08N;
public void Nx;
public boolean[][][][] e () throws MFEHM {
void KEeT5uTRH = -e().k8qjFElhNs1WNI();
boolean[][][] e21Sf8ScJ;
int[][] S_zld7uJTLgaP = false.yt_R_3ojUE();
;
void OijIdHyUL = -r.C3oDT0nhnbc_V();
boolean D1p4pl8h9I;
boolean FuLA1pwJ;
while ( -!--!!!!-( new boolean[ --!-new X92Z2ZDRsr().iO_jZ].T)[ oKIrfqoTrc9kJ_[ 60189325[ !-!new nX4hfHm8x2c7yM()[ null.Pbp()]]]]) null.fQLk_S;
int[] i7BfehghsM_Q = --!!!null.x();
null[ -new BMbpXzb[ new int[ new void[ new GqlJrWAka[ -!RQhZpVPPVl().l123b][ !true[ LcoDWzCB5tXH().osr_n5()]]][ null[ new MAExEWE().MPQ_7zSRb_hE()]]].VXDTcUXANzqoA()].wRlXdmoD_GB()];
void[][] BnuYMvG = -!!r4q6gj.TBOkgfcMK5();
while ( 209786.VLSBjhem()) if ( true.mg02JL()) ;
return;
}
}
class x9gKa58uR {
}
|
[
"hello@philkrones.com"
] |
hello@philkrones.com
|
e757314fa32b6d28c5f3d973dae66da9c6efb3ce
|
f6b90fae50ea0cd37c457994efadbd5560a5d663
|
/android/nut-dex2jar.src/okhttp3/bc.java
|
c879ff62f7f11b565198cead2ba6b15561494ea7
|
[] |
no_license
|
dykdykdyk/decompileTools
|
5925ae91f588fefa7c703925e4629c782174cd68
|
4de5c1a23f931008fa82b85046f733c1439f06cf
|
refs/heads/master
| 2020-01-27T09:56:48.099821
| 2016-09-14T02:47:11
| 2016-09-14T02:47:11
| 66,894,502
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 446
|
java
|
package okhttp3;
import a.j;
final class bc extends bb
{
bc(ai paramai, long paramLong, j paramj)
{
}
public final long contentLength()
{
return this.b;
}
public final ai contentType()
{
return this.a;
}
public final j source()
{
return this.c;
}
}
/* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar
* Qualified Name: okhttp3.bc
* JD-Core Version: 0.6.2
*/
|
[
"819468107@qq.com"
] |
819468107@qq.com
|
fcd8ab07b4bc74f6ef021716e6a23e3104a3acef
|
2fa668108e6d03968117b5646c4cdfaf1b22f2ba
|
/IJSE-Dinamore-Server/src/lk/ijse/dinamore/repository/custom/UserRepository.java
|
d6f994a5428620a5c7ebd94d3f7d250c804da6ea
|
[] |
no_license
|
AmilaWasantha/Dinamore-system
|
05022c95b5bfdf3a1cddf198f5079be516f958ac
|
d4f28ba1fe854a9a9b078436e59d7c15f58865e2
|
refs/heads/master
| 2020-04-06T19:48:19.793508
| 2018-11-15T17:47:52
| 2018-11-15T17:47:52
| 157,750,181
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 540
|
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 lk.ijse.dinamore.repository.custom;
import lk.ijse.dinamore.entity.TelephoneOperator;
import lk.ijse.dinamore.entity.User;
import lk.ijse.dinamore.repository.SuperRepository;
/**
*
* @author User
*/
public interface UserRepository extends SuperRepository<User, String>{
public boolean login(User user) throws Exception;
}
|
[
"amilawasantha20@gmail.com"
] |
amilawasantha20@gmail.com
|
91cec8da414999f977984980f04a4309669ed181
|
81f73a11945e9a61cca2c2da914852396a6729a0
|
/src/main/java/niceMethodToWriteTests/AnotherService.java
|
9b4e1c67396619b28e6bdeaf40c9d575b554d4f5
|
[] |
no_license
|
Jeka1978/spring-for-nice-2017-01
|
82309e0050c120a4bcec1f172ef173b2737a46d1
|
b6f69bd98f5e46e98475bfff5005f715161e9643
|
refs/heads/master
| 2021-01-13T16:36:25.552206
| 2017-01-24T14:57:23
| 2017-01-24T14:57:23
| 79,123,743
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package niceMethodToWriteTests;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
/**
* Created by Evegeny on 24/01/2017.
*/
@Service
@Setter
public class AnotherService {
@Autowired
private MyService myService;
public void doStuff(){
myService.doWork();
}
}
|
[
"papakita2009"
] |
papakita2009
|
c8ccdfccb13a2f85770d5e38d1b9fbf498bbbef0
|
fa43289298d72d1cff59b3d1f0c8e0e719b5cbc0
|
/octanner/octannerfulfilmentprocess/src/com/octanner/fulfilmentprocess/actions/order/SplitOrderAction.java
|
3e886c75cf36288c6f6f8d370fef57912cf52c44
|
[] |
no_license
|
cbarath/custom
|
2e611c35cf8aaa1126c15ccbb064ea2e944a5143
|
67d0cf069c0cf99f8454cea69d58e0bbea56dfc0
|
refs/heads/master
| 2021-01-17T11:48:30.621543
| 2015-08-11T01:08:17
| 2015-08-11T01:08:17
| 40,492,659
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,449
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package com.octanner.fulfilmentprocess.actions.order;
import de.hybris.platform.core.enums.OrderStatus;
import de.hybris.platform.core.model.order.AbstractOrderEntryModel;
import de.hybris.platform.orderprocessing.model.OrderProcessModel;
import de.hybris.platform.ordersplitting.OrderSplittingService;
import de.hybris.platform.ordersplitting.model.ConsignmentModel;
import de.hybris.platform.ordersplitting.model.ConsignmentProcessModel;
import de.hybris.platform.processengine.BusinessProcessService;
import de.hybris.platform.processengine.action.AbstractProceduralAction;
import com.octanner.fulfilmentprocess.constants.OctannerFulfilmentProcessConstants;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Required;
public class SplitOrderAction extends AbstractProceduralAction<OrderProcessModel>
{
private static final Logger LOG = Logger.getLogger(SplitOrderAction.class);
private OrderSplittingService orderSplittingService;
private BusinessProcessService businessProcessService;
@Override
public void executeAction(final OrderProcessModel process) throws Exception
{
if (LOG.isInfoEnabled())
{
LOG.info("Process: " + process.getCode() + " in step " + getClass());
}
// find the order's entries that are not already allocated to consignments
final List<AbstractOrderEntryModel> entriesToSplit = new ArrayList<AbstractOrderEntryModel>();
for (final AbstractOrderEntryModel entry : process.getOrder().getEntries())
{
if (entry.getConsignmentEntries() == null || entry.getConsignmentEntries().isEmpty())
{
entriesToSplit.add(entry);
}
}
final List<ConsignmentModel> consignments = getOrderSplittingService().splitOrderForConsignment(process.getOrder(),
entriesToSplit);
if (LOG.isDebugEnabled())
{
LOG.debug("Splitting order into " + consignments.size() + " consignments.");
}
final BusinessProcessService businessProcessService = getBusinessProcessService();
int index = 0;
for (final ConsignmentModel consignment : consignments)
{
final ConsignmentProcessModel subProcess = businessProcessService.<ConsignmentProcessModel> createProcess(
process.getCode() + "_" + (++index), OctannerFulfilmentProcessConstants.CONSIGNMENT_SUBPROCESS_NAME);
subProcess.setParentProcess(process);
subProcess.setConsignment(consignment);
save(subProcess);
businessProcessService.startProcess(subProcess);
}
setOrderStatus(process.getOrder(), OrderStatus.ORDER_SPLIT);
}
protected OrderSplittingService getOrderSplittingService()
{
return orderSplittingService;
}
@Required
public void setOrderSplittingService(final OrderSplittingService orderSplittingService)
{
this.orderSplittingService = orderSplittingService;
}
protected BusinessProcessService getBusinessProcessService()
{
return businessProcessService;
}
@Required
public void setBusinessProcessService(final BusinessProcessService businessProcessService)
{
this.businessProcessService = businessProcessService;
}
}
|
[
"ferrarif789@gmail.com"
] |
ferrarif789@gmail.com
|
6c594dac27f21447f468424ea5bc92da03dc6875
|
b66bdee811ed0eaea0b221fea851f59dd41e66ec
|
/src/com/facebook/share/internal/p.java
|
72743c91bc9c29a17b5dbb790f21cb1d4f5d8872
|
[] |
no_license
|
reverseengineeringer/com.grubhub.android
|
3006a82613df5f0183e28c5e599ae5119f99d8da
|
5f035a4c036c9793483d0f2350aec2997989f0bb
|
refs/heads/master
| 2021-01-10T05:08:31.437366
| 2016-03-19T20:41:23
| 2016-03-19T20:41:23
| 54,286,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 390
|
java
|
package com.facebook.share.internal;
class p
implements Runnable
{
private String a;
private String b;
p(String paramString1, String paramString2)
{
a = paramString1;
b = paramString2;
}
public void run()
{
a.a(a, b);
}
}
/* Location:
* Qualified Name: com.facebook.share.internal.p
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
450b272aa86a23bf239e555323aaca216224dc57
|
8a8765cf57713a04ef6dda31f0547386d5bf61c6
|
/src/main/java/com/tmy/controller/TestController.java
|
f123da13fb96c5d36b2410e201145d878a80a421
|
[] |
no_license
|
wanwanpp/simple-pagination
|
0aedde5283b2ea841b23a23230d3598468ac045a
|
73ddc56e9f0f7f5a29d15767f1e969927b99905d
|
refs/heads/master
| 2021-06-14T18:44:41.070532
| 2017-01-18T05:05:03
| 2017-01-18T05:05:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,150
|
java
|
package com.tmy.controller;
import com.tmy.entry.Blog;
import com.tmy.repository.BlogRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.web.PageableDefault;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/page")
public class TestController {
@Autowired BlogRepository blogRepository;
@RequestMapping("/returnpage")
public String page(){
return "pagination";
}
@RequestMapping(value = "/showpage", method=RequestMethod.GET)
@ResponseBody
public Page<Blog> showPage(@RequestParam(value = "page", defaultValue = "0") Integer page,
@RequestParam(value = "size", defaultValue = "10") Integer size) {
Sort sort = new Sort(Direction.ASC, "id");
Pageable pageable = new PageRequest(page, size, sort);
return blogRepository.findAll(pageable);
}
@RequestMapping(value = "/params", method=RequestMethod.GET)
@ResponseBody
public Page<Blog> getEntryByParams(@RequestParam(value = "page", defaultValue = "0") Integer page,
@RequestParam(value = "size", defaultValue = "15") Integer size) {
Sort sort = new Sort(Direction.DESC, "id");
Pageable pageable = new PageRequest(page, size, sort);
return blogRepository.findAll(pageable);
}
@RequestMapping(value = "", method=RequestMethod.GET)
@ResponseBody
public Page<Blog> getEntryByPageable(@PageableDefault(value = 15, sort = { "id" }, direction = Sort.Direction.DESC)
Pageable pageable) {
return blogRepository.findAll(pageable);
}
}
|
[
"wang.03.25@qq.com"
] |
wang.03.25@qq.com
|
f8e2d33314eca84306df5a98fb902763deffaa85
|
9f5fcbf93a1772b4efd5b57bd4735921408b50ad
|
/runtime/testsrc/com/exedio/cope/PlusDoubleOrderTest.java
|
5803a4c0a3bad55c7163429e2cb7f256faa83549
|
[] |
no_license
|
exedio/persistence
|
0a99c5f5c6c4bf52e2976fddf533ef3857be5319
|
1e122e105f3ed3837b09828315525c708e754b95
|
refs/heads/master
| 2023-08-18T01:09:07.221399
| 2023-08-15T10:32:32
| 2023-08-15T10:32:32
| 32,997,177
| 8
| 2
| null | 2022-12-08T13:10:29
| 2015-03-27T16:31:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,011
|
java
|
/*
* Copyright (C) 2004-2015 exedio GmbH (www.exedio.com)
*
* 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.exedio.cope;
import static com.exedio.cope.AbstractRuntimeTest.d3;
import static com.exedio.cope.AbstractRuntimeTest.d7;
import static com.exedio.cope.AbstractRuntimeTest.d8;
import static com.exedio.cope.PlusDoubleItem.TYPE;
import static com.exedio.cope.PlusDoubleItem.multiplyBC;
import static com.exedio.cope.PlusDoubleItem.numA;
import static com.exedio.cope.PlusDoubleItem.numB;
import static com.exedio.cope.PlusDoubleItem.plusAB;
import static com.exedio.cope.tojunit.Assert.list;
import static java.lang.Double.valueOf;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class PlusDoubleOrderTest extends TestWithEnvironment
{
public PlusDoubleOrderTest()
{
super(PlusDoubleTest.MODEL);
}
PlusDoubleItem item1;
PlusDoubleItem item2;
PlusDoubleItem item3;
@BeforeEach final void setUp()
{
item1 = new PlusDoubleItem(1.1, 6.6, -1000.99);
item2 = new PlusDoubleItem(2.2, 1.1, -1000.99);
item3 = new PlusDoubleItem(6.6, 2.2, -1000.99);
}
private static final double EPS = 0.000000000000001d;
@Test void testSumOrder()
{
assertEquals(d7, item1.getPlusAB(), EPS);
assertEquals(d3, item2.getPlusAB(), EPS);
assertEquals(d8, item3.getPlusAB());
assertEquals(valueOf(6.6 * -1000.99), item1.getMultiplyBC());
assertEquals(valueOf(1.1 * -1000.99), item2.getMultiplyBC());
assertEquals(valueOf(2.2 * -1000.99), item3.getMultiplyBC());
assertOrder(list(item1, item2, item3), numA);
assertOrder(list(item2, item3, item1), numB);
assertOrder(list(item2, item1, item3), plusAB);
assertOrder(list(item1, item3, item2), multiplyBC);
}
private static void assertOrder(final List<?> expectedOrder, final Function<?> orderBy)
{
final Query<PlusDoubleItem> query = TYPE.newQuery(null);
query.setOrderBy(orderBy, true);
assertEquals(expectedOrder, query.search());
final List<?> expectedReverseOrder = new ArrayList<>(expectedOrder);
Collections.reverse(expectedReverseOrder);
query.setOrderBy(orderBy, false);
assertEquals(expectedReverseOrder, query.search());
}
}
|
[
"ralf.wiebicke@exedio.com"
] |
ralf.wiebicke@exedio.com
|
12d8b32293213d4d26aca0c609c0b638b4a3b019
|
8358717b853f240843ffa56784773a29b1efc19e
|
/service-impl-wms/src/main/java/com/jumbo/dao/baseinfo/BrandDao.java
|
c907ca7aa9df06d55b4433b93f217d24d07af6e1
|
[] |
no_license
|
huanglongf/enterprise_project
|
65ec3e2c56e4a2909f0881a9276a9966857bb9c7
|
de1865e638c9620e702818124f0b2deac04028c9
|
refs/heads/master
| 2020-05-07T13:25:07.223338
| 2018-10-21T08:44:33
| 2018-10-21T08:44:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,413
|
java
|
package com.jumbo.dao.baseinfo;
import java.util.List;
import loxia.annotation.NamedQuery;
import loxia.annotation.NativeQuery;
import loxia.annotation.QueryParam;
import loxia.dao.GenericEntityDao;
import loxia.dao.Pagination;
import loxia.dao.Sort;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.transaction.annotation.Transactional;
import com.jumbo.wms.model.baseinfo.Brand;
@Transactional
public interface BrandDao extends GenericEntityDao<Brand, Long> {
@NamedQuery
Brand findBrandByName(@QueryParam("brandName") String name);
@NamedQuery
Brand findBrandByNameAndId(@QueryParam("brandName") String name, @QueryParam("id") Long id);
@NamedQuery
Brand getByCode(@QueryParam("brandCode") String brandCode);
@NativeQuery
List<Brand> findAllBrand(BeanPropertyRowMapper<Brand> beanPropertyRowMapper);
/**
* 弹出框查询品牌
*
* @param start
* @param beanPropertyRowMapper
* @param sorts
* @param pageSize
* @return
*/
@NativeQuery(pagable = true)
Pagination<Brand> findBrandByPage(int start, int pagesize, BeanPropertyRowMapper<Brand> beanPropertyRowMapper, Sort[] sorts);
/**
* Edw
* @param rowMapper
* @return
*/
@NativeQuery
List<Brand> findEdwTbiBrand(RowMapper<Brand> rowMapper);
}
|
[
"lijg@many-it.com"
] |
lijg@many-it.com
|
7b282ce49a8f8149246ded9fabc5666db1c427eb
|
a915d83d3088d355d90ba03e5b4df4987bf20a2a
|
/src/Applications/h2/src/tools/org/h2/build/doc/GenerateHelp.java
|
9c5ed5760bec897e752bbde02306ae98052778fc
|
[] |
no_license
|
worldeditor/Aegean
|
164c74d961185231d8b40dbbb6f8b88dcd978d79
|
33a2c651e826561e685fb84c1e3848c44d2ac79f
|
refs/heads/master
| 2022-02-15T15:34:02.074428
| 2019-08-21T03:52:48
| 2019-08-21T15:37:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,280
|
java
|
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.build.doc;
import org.h2.tools.Csv;
import org.h2.tools.SimpleResultSet;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Types;
/**
* Generates the help.csv file that is included in the jar file.
*/
public class GenerateHelp {
/**
* This method is called when executing this application from the command
* line.
*
* @param args the command line parameters
*/
public static void main(String... args) throws Exception {
new GenerateHelp().run();
}
private void run() throws Exception {
String in = "src/docsrc/help/help.csv";
String out = "src/main/org/h2/res/help.csv";
ResultSet rs = Csv.getInstance().read(in, null, null);
SimpleResultSet rs2 = new SimpleResultSet();
ResultSetMetaData meta = rs.getMetaData();
int columnCount = meta.getColumnCount() - 1;
for (int i = 0; i < columnCount; i++) {
rs2.addColumn(meta.getColumnLabel(1 + i), Types.VARCHAR, 0, 0);
}
while (rs.next()) {
Object[] row = new Object[columnCount];
for (int i = 0; i < columnCount; i++) {
String s = rs.getString(1 + i);
if (i == 3) {
int dot = s.indexOf('.');
if (dot >= 0) {
s = s.substring(0, dot + 1);
}
}
row[i] = s;
}
rs2.addRow(row);
}
BufferedWriter writer = new BufferedWriter(new FileWriter(out));
writer.write("# Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License,\n" +
"# Version 1.0, and under the Eclipse Public License, Version 1.0\n" +
"# (http://h2database.com/html/license.html).\n" +
"# Initial Developer: H2 Group)\n");
Csv csv = Csv.getInstance();
csv.setLineSeparator("\n");
csv.write(writer, rs2);
}
}
|
[
"remzican_aksoy@apple.com"
] |
remzican_aksoy@apple.com
|
7cc63baa6931aa945ce1723a82fa7d9ad3e14d65
|
3dd35c0681b374ce31dbb255b87df077387405ff
|
/generated/com/guidewire/_generated/entity/GL7ExpSchedExclItemCondInternal.java
|
21768b575c159d492d4617ce94076cdc2208add3
|
[] |
no_license
|
walisashwini/SBTBackup
|
58b635a358e8992339db8f2cc06978326fed1b99
|
4d4de43576ec483bc031f3213389f02a92ad7528
|
refs/heads/master
| 2023-01-11T09:09:10.205139
| 2020-11-18T12:11:45
| 2020-11-18T12:11:45
| 311,884,817
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,143
|
java
|
package com.guidewire._generated.entity;
@javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "GL7ExpSchedExclItemCond.eti;GL7ExpSchedExclItemCond.eix;GL7ExpSchedExclItemCond.etx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
public interface GL7ExpSchedExclItemCondInternal extends com.guidewire._generated.entity.EffDatedInternal, com.guidewire._generated.entity.PolicyConditionInternal, com.guidewire._generated.entity.GL7ClauseInternal, gw.api.copier.EffDatedCopyable, gw.api.domain.PolicyConditionAdapter, gw.api.logicalmatch.EffDatedLogicalMatcher {
/**
* Adds the given element to the ExpSchedExclItemCondCosts array. This is achieved by setting the parent foreign key to this entity instance.
*/
public void addToExpSchedExclItemCondCosts(entity.GL7ExpSchedExclItemCondCost element);
/**
* Gets the value of the BasedOnValue field.
* Link to the row on which this row is based; or null if new to branch
*/
@gw.internal.gosu.parser.ExtendedProperty
public entity.GL7ExpSchedExclItemCond getBasedOnValue();
public gw.pl.persistence.core.Key getBasedOnValueID();
/**
* Gets the value of the BranchValue field.
* Link to root of effdated tree
*/
@gw.internal.gosu.parser.ExtendedProperty
public entity.PolicyPeriod getBranchValue();
public gw.pl.persistence.core.Key getBranchValueID();
/**
* Gets the value of the ExpSchedExclItemCondCosts field.
*/
@gw.internal.gosu.parser.ExtendedProperty
public entity.GL7ExpSchedExclItemCondCost[] getExpSchedExclItemCondCosts();
/**
* Gets the value of the Fixed field.
* Unique ID for this 'object' across all branches and periods
*/
@gw.internal.gosu.parser.ExtendedProperty
public entity.GL7ExpSchedExclItemCond getFixed();
public gw.pl.persistence.core.Key getFixedID();
/**
* Gets the value of the GL7ExposureSchedExclItem field.
*/
@gw.internal.gosu.parser.ExtendedProperty
public entity.GL7ExposureSchedExclItem getGL7ExposureSchedExclItem();
public gw.pl.persistence.core.Key getGL7ExposureSchedExclItemID();
/**
* Gets the value of the Subtype field.
* Identifies a particular subtype within a supertype table; each subtype of a supertype has its own unique subtype value
*/
@gw.internal.gosu.parser.ExtendedProperty
public typekey.GL7ExpSchedExclItemCond getSubtype();
/**
* Removes the given element from the ExpSchedExclItemCondCosts array. This is achieved by marking the element for removal.
*/
public void removeFromExpSchedExclItemCondCosts(entity.GL7ExpSchedExclItemCondCost element);
/**
* Removes the given element from the ExpSchedExclItemCondCosts array. This is achieved by marking the element for removal.
* @deprecated Please use the version that takes an entity instead.
*/
@java.lang.Deprecated
public void removeFromExpSchedExclItemCondCosts(gw.pl.persistence.core.Key elementID);
/**
* Sets the value of the BasedOnValue field.
*/
public void setBasedOnValue(entity.GL7ExpSchedExclItemCond value);
public void setBasedOnValueID(gw.pl.persistence.core.Key value);
/**
* Sets the value of the BranchValue field.
*/
public void setBranchValue(entity.PolicyPeriod value);
public void setBranchValueID(gw.pl.persistence.core.Key value);
/**
* Sets the value of the ExpSchedExclItemCondCosts field.
*/
public void setExpSchedExclItemCondCosts(entity.GL7ExpSchedExclItemCondCost[] value);
/**
* Sets the value of the Fixed field.
*/
public void setFixed(entity.GL7ExpSchedExclItemCond value);
public void setFixedID(gw.pl.persistence.core.Key value);
/**
* Sets the value of the GL7ExposureSchedExclItem field.
*/
public void setGL7ExposureSchedExclItem(entity.GL7ExposureSchedExclItem value);
public void setGL7ExposureSchedExclItemID(gw.pl.persistence.core.Key value);
/**
* Sets the value of the Subtype field.
*/
public void setSubtype(typekey.GL7ExpSchedExclItemCond value);
}
|
[
"ashwini@cruxxtechnologies.com"
] |
ashwini@cruxxtechnologies.com
|
863967cefdbb7acb312f786e5837449b5eab6161
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/20/20_e60e7e1cc3f9d4f16f1a5b1c22f830782e5a93f6/ELibBuilder/20_e60e7e1cc3f9d4f16f1a5b1c22f830782e5a93f6_ELibBuilder_s.java
|
9c2362ec79d1e8df877576d2a93976edb9970f26
|
[] |
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,996
|
java
|
/*
* This file is a part of Alchemy OS project.
* Copyright (C) 2011 Sergey Basalaev <sbasalaev@gmail.com>
*
* 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/>.
*/
package alchemy.evm;
import alchemy.core.Context;
import alchemy.core.Function;
import alchemy.core.HashLibrary;
import alchemy.core.LibBuilder;
import alchemy.core.Library;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* Library builder for Embedded Virtual Machine.
* @author Sergey Basalaev
*/
public class ELibBuilder implements LibBuilder {
/**
* Version of library file format.
* <ul>
* <li>
* Two highest bytes are zeroes.
* <li>
* Byte 1 is MAJOR version. Formats with two different
* major versions are incompatible.
* <li>
* Byte 0 is MINOR version. Formats with the same major
* version are backward compatible, that is file's minor
* version must be equal to or less than this value.
* </ul>
*/
static public final int VERSION = 0x0101;
/*
* New in format 1.1
* Instructions: call calv newarray aload astore alen newba
* baload bastore balen newca caload castore calen
*/
/** Determines whether this library has dependencies. */
static private final int LFLAG_DEPS = 1;
/** Determines whether this library defines a soname. */
static private final int LFLAG_SONAME = 4;
/** Determines whether the function has relocation table. */
static private final int FFLAG_RELOC = 1;
public Library build(Context c, InputStream in) throws IOException, InstantiationException {
DataInputStream data = new DataInputStream(in);
HashLibrary lib = new HashLibrary();
//reading format version
int ver = data.readUnsignedShort();
if ((ver|0xff) != (VERSION|0xff) || (ver&0xff) > (VERSION&0xff))
throw new InstantiationException("Incompatible file format");
//reading flags
int lflags = data.readUnsignedByte();
//reading soname
String libname = null;
if ((lflags & LFLAG_SONAME) != 0) {
libname = data.readUTF();
}
//loading dependency libs
Library[] libdeps = null;
if ((lflags & LFLAG_DEPS) != 0) {
int depcount = data.readUnsignedShort();
libdeps = new Library[depcount];
for (int i=0; i<depcount; i++) {
libdeps[i] = c.loadLibrary(data.readUTF());
}
}
//constructing constant pool
int ccount = data.readUnsignedShort();
Object[] cpool = new Object[ccount];
for (int cindex=0; cindex<ccount; cindex++) {
int ctype = data.readUnsignedByte();
switch (ctype) {
case '0': //null, aligning object
break;
case 'i': //integer
cpool[cindex] = new Integer(data.readInt());
break;
case 'l': //long
cpool[cindex] = new Long(data.readLong());
break;
case 'f': //float
cpool[cindex] = new Float(data.readFloat());
break;
case 'd': //double
cpool[cindex] = new Float(data.readDouble());
break;
case 'S': //string
cpool[cindex] = data.readUTF();
break;
case 'E': { //external function
int libref = data.readUnsignedShort();
int nameref = data.readUnsignedShort();
cpool[cindex] = libdeps[libref].getFunc((String)cpool[nameref]);
} break;
case 'H': //private function
case 'P': { //public function
//reading data
int nameref = data.readUnsignedShort();
int fflags = data.readUnsignedByte();
int stacksize = data.readUnsignedByte();
int localsize = data.readUnsignedByte();
int codesize = data.readUnsignedShort();
byte[] code = new byte[codesize];
data.readFully(code);
//skipping relocation table
if ((fflags & FFLAG_RELOC) != 0) {
int relcount = data.readUnsignedShort();
data.skipBytes(relcount << 1);
}
//constructing function
Function func = new EFunction(libname, (String)cpool[nameref], cpool, stacksize, localsize, code);
cpool[cindex] = func;
if (ctype == 'P') lib.putFunc(func);
} break;
case 'U': { //unresolved function
int nameref = data.readUnsignedShort();
throw new InstantiationException("Unresolved function: "+cpool[nameref]);
}
default:
throw new InstantiationException("Unknown data type: "+ctype);
}
}
in.close();
lib.lock();
return lib;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4a2c2f7a8838db8a95197d68b08da8ad2cfc6413
|
96f8d42c474f8dd42ecc6811b6e555363f168d3e
|
/zuiyou/sources/com/facebook/drawee/drawable/a$1.java
|
622e114fe2a2ef2a3fcb8d52fb0d121b7ff08b15
|
[] |
no_license
|
aheadlcx/analyzeApk
|
050b261595cecc85790558a02d79739a789ae3a3
|
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
|
refs/heads/master
| 2020-03-10T10:24:49.773318
| 2018-04-13T09:44:45
| 2018-04-13T09:44:45
| 129,332,351
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 408
|
java
|
package com.facebook.drawee.drawable;
import android.graphics.drawable.Drawable;
class a$1 implements c {
final /* synthetic */ int a;
final /* synthetic */ a b;
a$1(a aVar, int i) {
this.b = aVar;
this.a = i;
}
public Drawable a(Drawable drawable) {
return this.b.a(this.a, drawable);
}
public Drawable a() {
return this.b.a(this.a);
}
}
|
[
"aheadlcxzhang@gmail.com"
] |
aheadlcxzhang@gmail.com
|
a4b603c62f438015b73fd8175da9849eb5ed29fe
|
4771edd416f5e3f8cfc99f6652de4e761f61429b
|
/VideoProject/src/com/video/videoproject/adapter/VideoAdapter.java
|
39cfbb1eeeb7d2bcb54a316a1f312a600e498fe0
|
[] |
no_license
|
HotBloodMan/CommonCode
|
26453bc3ba325663be78d4dd4a5afc83e60285d1
|
3198b2b48da39b21e7295c0bf6db5aac7db18622
|
refs/heads/master
| 2020-05-21T23:55:22.128001
| 2016-12-04T07:11:17
| 2016-12-04T07:11:17
| 62,364,448
| 6
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,372
|
java
|
package com.video.videoproject.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.video.videoproject.R;
public class VideoAdapter extends BaseAdapter {
private Context cxt;
private int[] img;
private String[] title;
public VideoAdapter(Context context, String[] title, int[] img){
this.cxt = context;
this.title = title;
this.img = img;
}
@Override
public int getCount() {
return img.length;
}
@Override
public Object getItem(int arg0) {
return arg0;
}
@Override
public long getItemId(int arg0) {
return arg0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder hold;
if (convertView == null) {
hold = new ViewHolder();
convertView = View.inflate(cxt, R.layout.activity_video_item, null);
// hold.mImage = (ImageView) convertView.findViewById(R.id.video_pic);
hold.mTitle = (TextView) convertView.findViewById(R.id.tv_video_title);
convertView.setTag(hold);
}else{
hold = (ViewHolder) convertView.getTag();
}
// hold.mImage.setTag(img[position]);
hold.mTitle.setText(title[position]);
return convertView;
}
private static class ViewHolder{
private ImageView mImage;
private TextView mTitle;
}
}
|
[
"18303011272@163.com"
] |
18303011272@163.com
|
380b784e542f7110adeabdfbac47d8f18b777d2a
|
828b5327357d0fb4cb8f3b4472f392f3b8b10328
|
/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/join/HashJoinType.java
|
0d6b8267b8173518efdd96ca0f1dfdafb40d9ec7
|
[
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"ISC",
"MIT-0",
"GPL-2.0-only",
"BSD-2-Clause-Views",
"OFL-1.1",
"Apache-2.0",
"LicenseRef-scancode-jdom",
"GCC-exception-3.1",
"MPL-2.0",
"CC-PDDC",
"AGPL-3.0-only",
"MPL-2.0-no-copyleft-exception",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"BSD-2-Clause",
"CDDL-1.1",
"CDDL-1.0",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-proprietary-license",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-free-unknown",
"CC0-1.0",
"Classpath-exception-2.0",
"CC-BY-2.5"
] |
permissive
|
Romance-Zhang/flink_tpc_ds_game
|
7e82d801ebd268d2c41c8e207a994700ed7d28c7
|
8202f33bed962b35c81c641a05de548cfef6025f
|
refs/heads/master
| 2022-11-06T13:24:44.451821
| 2019-09-27T09:22:29
| 2019-09-27T09:22:29
| 211,280,838
| 0
| 1
|
Apache-2.0
| 2022-10-06T07:11:45
| 2019-09-27T09:11:11
|
Java
|
UTF-8
|
Java
| false
| false
| 2,364
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.table.runtime.operators.join;
/**
* Join type for hash table.
*/
public enum HashJoinType {
INNER,
BUILD_OUTER,
PROBE_OUTER,
FULL_OUTER,
SEMI,
ANTI,
BUILD_LEFT_SEMI,
BUILD_LEFT_ANTI;
public boolean isBuildOuter() {
return this.equals(BUILD_OUTER) || this.equals(FULL_OUTER);
}
public boolean isProbeOuter() {
return this.equals(PROBE_OUTER) || this.equals(FULL_OUTER);
}
public boolean buildLeftSemiOrAnti() {
return this.equals(BUILD_LEFT_SEMI) || this.equals(BUILD_LEFT_ANTI);
}
public boolean needSetProbed() {
return isBuildOuter() || buildLeftSemiOrAnti();
}
public static HashJoinType of(boolean leftIsBuild, boolean leftOuter, boolean rightOuter) {
if (leftOuter && rightOuter) {
return FULL_OUTER;
} else if (leftOuter) {
return leftIsBuild ? BUILD_OUTER : PROBE_OUTER;
} else if (rightOuter) {
return leftIsBuild ? PROBE_OUTER : BUILD_OUTER;
} else {
return INNER;
}
}
public static HashJoinType of(boolean leftIsBuild, boolean leftOuter, boolean rightOuter,
boolean isSemi, boolean isAnti) {
if (leftOuter && rightOuter) {
return FULL_OUTER;
} else if (leftOuter) {
return leftIsBuild ? BUILD_OUTER : PROBE_OUTER;
} else if (rightOuter) {
return leftIsBuild ? PROBE_OUTER : BUILD_OUTER;
} else if (isSemi) {
return leftIsBuild ? BUILD_LEFT_SEMI : SEMI;
} else if (isAnti) {
return leftIsBuild ? BUILD_LEFT_ANTI : ANTI;
} else {
return INNER;
}
}
}
|
[
"1003761104@qq.com"
] |
1003761104@qq.com
|
d6b5b0cf72b92b4e3b5fc546f1e8c39ac6cd989f
|
eb76cbf4a3f8f52f8982153fba965cd83f6e4cc4
|
/src/test/java/org/vaadin/addon/leaflet/demoandtestapp/EditingTest.java
|
c842a695e741012d23a79810772f8330fe95bf5d
|
[] |
no_license
|
jtreml/v-leaflet
|
00dcdb41e2f276d79517b893afe9fa4057f211e3
|
a45b8148e358ca91fd649995901adad0dad6bcd0
|
refs/heads/master
| 2021-01-24T04:20:10.747441
| 2013-11-26T17:42:44
| 2013-11-26T17:42:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,087
|
java
|
package org.vaadin.addon.leaflet.demoandtestapp;
import org.vaadin.addon.leaflet.AbstractLeafletVector;
import org.vaadin.addon.leaflet.LCircle;
import org.vaadin.addon.leaflet.LMap;
import org.vaadin.addon.leaflet.LMarker;
import org.vaadin.addon.leaflet.LMarker.DragEndEvent;
import org.vaadin.addon.leaflet.LMarker.DragEndListener;
import org.vaadin.addon.leaflet.LPolygon;
import org.vaadin.addon.leaflet.LPolyline;
import org.vaadin.addon.leaflet.LTileLayer;
import org.vaadin.addon.leaflet.demoandtestapp.util.AbstractTest;
import org.vaadin.addon.leaflet.draw.LDraw.FeatureModifiedEvent;
import org.vaadin.addon.leaflet.draw.LDraw.FeatureModifiedListener;
import org.vaadin.addon.leaflet.draw.LEditing;
import org.vaadin.addon.leaflet.shared.Point;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Component;
import com.vaadin.ui.Notification;
public class EditingTest extends AbstractTest implements
FeatureModifiedListener {
@Override
public String getDescription() {
return "Test leaflet draws editing feature";
}
private LMap leafletMap;
private LEditing lEditing;
@Override
public Component getTestComponent() {
leafletMap = new LMap();
leafletMap.setHeight("300px");
leafletMap.setCenter(0, 0);
leafletMap.setZoomLevel(0);
leafletMap.addLayer(new LTileLayer(
"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"));
final LMarker marker = new LMarker(10, 10);
// adding drag end listener makes marker draggable
marker.addDragEndListener(new DragEndListener() {
@Override
public void dragEnd(DragEndEvent event) {
Notification.show("Marker dragged" + marker.getPoint());
}
});
LCircle circle = new LCircle(new Point(-50, 0), 3000 * 1000);
LPolyline polyline = new LPolyline(new Point(40, 0), new Point(70, 0));
LPolygon polygon = new LPolygon(new Point(0, 0), new Point(30, 30),
new Point(30, 0));
lEditing = new LEditing(polygon);
lEditing.addFeatureModifiedListener(this);
leafletMap.addComponents(marker, polyline, circle, polygon);
return leafletMap;
}
@Override
protected void setup() {
super.setup();
for (final Component c : leafletMap) {
if (c instanceof AbstractLeafletVector) {
Button button = new Button("Edit"
+ c.getClass().getSimpleName());
button.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (lEditing != null && lEditing.getParent() != null) {
lEditing.remove();
}
lEditing = new LEditing((AbstractLeafletVector) c);
}
});
content.addComponent(button);
}
}
content.addComponent(new Button("Stop editing",
new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if (lEditing.getParent() != null) {
lEditing.remove();
}
}
}));
}
@Override
public void featureModified(FeatureModifiedEvent event) {
Notification.show("Edited"
+ event.getModifiedFeature().getClass().getSimpleName());
}
}
|
[
"matti@vaadin.com"
] |
matti@vaadin.com
|
90cf83543b66755eff82733c3be6bb52ca3bf301
|
05965fc81f35de533671a1f03e1e86b7e2b8898d
|
/app/src/main/java/com/moor/im/common/utils/NullUtil.java
|
c8d58f95a90bf10fd8d6e1691f8cb54719c6c8ce
|
[] |
no_license
|
longwei243/im2.0
|
f056ec82df399e64ae27fb212bce57e468f88cd7
|
fb77a3004a38fbb99ab875153f3c4102965d9971
|
refs/heads/master
| 2020-04-15T13:38:28.346810
| 2016-10-08T09:05:07
| 2016-10-08T09:05:07
| 57,932,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 623
|
java
|
package com.moor.im.common.utils;
/**
* 检测值是否为空
* Created by longwei on 2015/10/30.
*/
public class NullUtil {
/**
* 检测字符串是否是空的,若是空的则返回空字符串,避免空指针错误
* @param str
* @return
*/
public static String checkNull(String str) {
if(str != null && !"".equals(str)) {
return str;
}else {
return "";
}
}
public static Integer checkNull(Integer i) {
if(i != null) {
return i;
}else {
return -1;
}
}
}
|
[
"liulongwei243@yeah.net"
] |
liulongwei243@yeah.net
|
312293d7a80a650c6ef78943ed3437126a5f0b64
|
a4178e5042f43f94344789794d1926c8bdba51c0
|
/iwxxmCore/src/test/resources/iwxxm/3.1/output/aero/aixm/schema/_5_1/VisualGlideSlopeIndicatorType.java
|
1bae8d3404085180008675e029262ab81b112b7c
|
[
"Apache-2.0"
] |
permissive
|
moryakovdv/iwxxmConverter
|
c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0
|
5c2b57e57c3038a9968b026c55e381eef0f34dad
|
refs/heads/master
| 2023-07-20T06:58:00.317736
| 2023-07-05T10:10:10
| 2023-07-05T10:10:10
| 128,777,786
| 11
| 7
|
Apache-2.0
| 2023-07-05T10:03:12
| 2018-04-09T13:38:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,788
|
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: 2019.05.06 at 11:11:25 PM MSK
//
package aero.aixm.schema._5_1;
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 VisualGlideSlopeIndicatorType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="VisualGlideSlopeIndicatorType">
* <complexContent>
* <extension base="{http://www.aixm.aero/schema/5.1.1}AbstractGroundLightSystemType">
* <sequence>
* <element name="timeSlice" type="{http://www.aixm.aero/schema/5.1.1}VisualGlideSlopeIndicatorTimeSlicePropertyType" maxOccurs="unbounded"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VisualGlideSlopeIndicatorType", propOrder = {
"timeSlice"
})
public class VisualGlideSlopeIndicatorType
extends AbstractGroundLightSystemType
{
@XmlElement(required = true)
protected List<VisualGlideSlopeIndicatorTimeSlicePropertyType> timeSlice;
/**
* Gets the value of the timeSlice 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 timeSlice property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getTimeSlice().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link VisualGlideSlopeIndicatorTimeSlicePropertyType }
*
*
*/
public List<VisualGlideSlopeIndicatorTimeSlicePropertyType> getTimeSlice() {
if (timeSlice == null) {
timeSlice = new ArrayList<VisualGlideSlopeIndicatorTimeSlicePropertyType>();
}
return this.timeSlice;
}
public boolean isSetTimeSlice() {
return ((this.timeSlice!= null)&&(!this.timeSlice.isEmpty()));
}
public void unsetTimeSlice() {
this.timeSlice = null;
}
}
|
[
"moryakovdv@gmail.com"
] |
moryakovdv@gmail.com
|
6906cd40045195039d0b9f2a59c4ad36431bc3e2
|
afb78b6d9d2a3cb1f8d9714231a44d4423b7184b
|
/Java-OCP2-master/Lesson_10_Lambda_Operations/Practice2/Main.java
|
da082f48dd848ab7e688c05d960eb3c246c68d49
|
[] |
no_license
|
Shaigift/Java2HerbertSchildt
|
056afb53a536ce2936fcae25f8888be0681a0180
|
b55046273bfd53b6088366c1c9895652da260025
|
refs/heads/main
| 2023-05-09T03:14:09.633196
| 2021-06-08T09:03:20
| 2021-06-08T09:03:20
| 374,947,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 185
|
java
|
package Lesson_10_Lambda_Operations.Practice2;
/**
*
* @author MikeW
*/
public class Main {
public static void main(String[] args) {
LazyTest.main(args);
}
}
|
[
"mphogivenshai@gmail.com"
] |
mphogivenshai@gmail.com
|
f11d1dbee42615fcb0626bd843abefd2d9c6e8b0
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/55/org/apache/commons/math/optimization/direct/CMAESOptimizer_CMAESOptimizer_261.java
|
95ad95b2fa2aaa088ec3bc421244389120734d8c
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,800
|
java
|
org apach common math optim direct
cma algorithm code translat adapt matlab version
algorithm implement modul code cmae version
implement activ covari matrix adapt evolut strategi cma
linear convex smooth global function minim
cma evolut strategi cma reliabl stochast optim method
appli deriv base method quasi newton bfg
conjug gradient fail due rug search landscap nois local
optima outlier object function
quasi newton method cma learn appli variabl metric
underli search space unlik quasi newton method
cma estim gradient make consider
reliabl term find good close optim solut
gener smooth object function cma roughli ten time
slower bfg count object function evalu gradient provid
math math variabl deriv free simplex
direct search method nelder mead faster
reliabl cma
cma suit separ
badli condit problem
observ advantag cma compar convent
evolut strategi math math function
evalu difficult problem complet
optim singl run expect roughli
math math math math
function evalu
inform refer link
href http www lri hansen cmae matlab code
href http www lri hansen cmaesintro html introduct cma
href http wikipedia org wiki cma wikipedia
version revis date
cmae optim cmaesoptim
param lambda
popul size
param input sigma inputsigma
initi search volum sigma offspr object
variabl
param boundari
boundari object variabl
cmae optim cmaesoptim lambda input sigma inputsigma
boundari
lambda input sigma inputsigma boundari default maxiter default stopfit
default isactivecma default diagonalonli
default checkfeasablecount default randomgener
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
2d7c73d70ef5d7ac37971840e93f09d529e9383b
|
2b554c46349d636018fa72dfe96fb99454fbc3c7
|
/spring-provider-81/src/main/java/com/etoc/service/roleRes/RoleResourceService.java
|
b20f488287deb4bed0620f9fe151f6fafff83272
|
[] |
no_license
|
liuxiaolonger/spring-demo
|
8ac8a56014c4df6a5e077b27a0e1e5d36ba1cf0c
|
434c004c4abdc6f3e3834987f8b67cd15986b197
|
refs/heads/master
| 2022-07-12T18:15:42.337307
| 2019-12-01T05:36:51
| 2019-12-01T05:36:51
| 178,666,430
| 0
| 0
| null | 2022-06-29T17:48:51
| 2019-03-31T09:18:01
|
Java
|
UTF-8
|
Java
| false
| false
| 1,182
|
java
|
package com.etoc.service.roleRes;
import java.util.List;
import com.etoc.base.BaseService;
import com.etoc.base.impl.SysQueryListService;
import com.etoc.service.roleRes.vo.RoleResource;
public interface RoleResourceService
{
RoleResourceService addIsLeaf(Integer isLeaf);
RoleResourceService addQueryId(String type, String id);
RoleResourceService setObject(String type, String id, List<String> ids);
SysQueryListService<RoleResource> queryRoleResource() throws Exception;
/**
* 保存角色资源关联信息
* <功能详细描述>
* @return
* @throws Exception
* @see [类、类#方法、类#成员]
*/
BaseService saveRoleResource() throws Exception;
/**
* 修改角色资源关联信息
* <功能详细描述>
* @return
* @throws Exception
* @see [类、类#方法、类#成员]
*/
BaseService moveRoleResource() throws Exception;
/**
* 删除角色资源关联信息
* <功能详细描述>
* @return
* @throws Exception
* @see [类、类#方法、类#成员]
*/
BaseService removeRoleResource() throws Exception;
}
|
[
"896846152@qq.com"
] |
896846152@qq.com
|
d62269c8e165101d1976e880ee3788119fc6a754
|
d9a676dc2c8473ff274290ef8d0b1e80f7943276
|
/src/main/java/model/diagram/Action.java
|
1e1b7197479fe836cd24c5fc5675168f51a30555
|
[] |
no_license
|
khovanskiy/verification-course
|
f3cb996e8b43871358fd5a6d17a45623d5031795
|
7034a23300de98e69cddcb0ef845d0a5326f84db
|
refs/heads/master
| 2023-04-13T20:32:27.448100
| 2023-03-31T17:12:04
| 2023-03-31T17:12:04
| 92,288,862
| 1
| 0
| null | 2023-03-31T17:12:05
| 2017-05-24T12:17:21
|
C
|
UTF-8
|
Java
| false
| false
| 865
|
java
|
package model.diagram;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.Getter;
import lombok.NoArgsConstructor;
/**
* @author Victor Khovanskiy
* @since 1.0.0
*/
@Getter
@JacksonXmlRootElement(localName = "action")
@JsonIgnoreProperties(ignoreUnknown = true)
@NoArgsConstructor
public class Action {
private String name;
private String comment;
public Action(String name, String comment) {
this.name = name;
this.comment = comment;
}
@JacksonXmlProperty(isAttribute = true)
public String getName() {
return name;
}
@JacksonXmlProperty(isAttribute = true)
public String getComment() {
return comment;
}
}
|
[
"victor.khovanskiy@gmail.com"
] |
victor.khovanskiy@gmail.com
|
f3a6a6eb5c1f4ee731ec7fb5d3fbfaf8e23f718a
|
1b599e3a9adee5dd8af011fdf82972824562a872
|
/sa_center/sacenter-parent/sacenter-shcmcc/src/main/java/com/asiainfo/sacenter/shcmcc/provision/sandpay/dbcp/impl/ISandPayProtocolImpl.java
|
cbc31329694ef8edef9b4a7a38f13502196ca4f5
|
[] |
no_license
|
mtbdc-dy/zhongds01
|
e1381d44b0562d576cfdff6b7a5fb7297990a2a4
|
ceb5e90d468add16d982f3eb10d5503a7a5c1cea
|
refs/heads/master
| 2020-07-07T10:30:32.012016
| 2019-08-07T08:18:08
| 2019-08-07T08:18:08
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 5,364
|
java
|
package com.asiainfo.sacenter.shcmcc.provision.sandpay.dbcp.impl;
import com.ai.sacenter.IUpdcContext;
import com.ai.sacenter.SFException;
import com.ai.sacenter.comptel.IUpdcpFactory;
import com.ai.sacenter.i18n.ExceptionFactory;
import com.ai.sacenter.provision.dbcp.impl.IHttpProtocolImpl;
import com.ai.sacenter.provision.mstp.IUpfwmClient;
import com.ai.sacenter.provision.mstp.impl.UpfwmHttpClient;
import com.ai.sacenter.provision.valuebean.IOVUpfwmOffer;
import com.ai.sacenter.provision.valuebean.IOVUpfwmRequest;
import com.ai.sacenter.provision.valuebean.IOVUpfwmResponse;
import com.ai.sacenter.util.JSONUtils;
import com.ai.sacenter.util.StringUtils;
import com.ai.sacenter.util.UpdcUtils;
import com.ai.sacenter.valuebean.IOVUpdspmLife;
import com.ai.sacenter.valuebean.IPlatformTemplate;
import com.asiainfo.sacenter.shcmcc.provision.sandpay.util.ISandUtils;
import com.asiainfo.sacenter.shcmcc.provision.sandpay.valuebean.ISandPayRequest;
import com.asiainfo.sacenter.shcmcc.provision.sandpay.valuebean.ISandPayResponse;
/**
* <p>Title: sacenter-shcmcc</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2017Äê5ÔÂ12ÈÕ</p>
* <p>Company: AI(NanJing)</p>
* @author maohuiyun
* @version 2.0
*
*/
public class ISandPayProtocolImpl extends IHttpProtocolImpl {
public ISandPayProtocolImpl() {
super();
}
/* (non-Javadoc)
* @see com.ai.sacenter.provision.dbcp.impl.IUpfwmProtocolImpl#finishRQKUpfwm(com.ai.sacenter.provision.valuebean.IOVUpfwmOffer, com.ai.sacenter.valuebean.IOVUpdspmLife, com.ai.sacenter.provision.valuebean.IOVUpfwmRequest, com.ai.sacenter.IUpdcContext)
*/
public IOVUpfwmRequest finishRQKUpfwm(IOVUpfwmOffer fromUpfwm,
IOVUpdspmLife fromUpdfwm,
IOVUpfwmRequest fromUpdcpm,
IUpdcContext aContext) throws SFException, Exception {
try
{
IPlatformTemplate.IUpffmDirective fromUpdfm = fromUpdfwm.getDIRECTIVE();
String fromPLMMX = UpdcUtils.ISubFlow.getDIRECTIVE( fromUpdfm, aContext );
fromPLMMX = IUpdcpFactory.getIUpfwmSV().finishSFUpdbmChain(fromUpdfm.getID(),
fromPLMMX,
fromUpdcpm.getSUBFLOW().getSUBFLOW(),
fromUpdcpm.getSUBFLOW().getPLATFORM(),
aContext );
fromUpdcpm.getPLATFORM().setORIGINAL( fromPLMMX );
fromUpdcpm.getPLATFORM().setBOTTOM ( fromPLMMX );
}
finally{
}
return fromUpdcpm;
}
/* (non-Javadoc)
* @see com.ai.sacenter.provision.dbcp.impl.IHttpProtocolImpl#finishBPKUpfwm(com.ai.sacenter.provision.valuebean.IOVUpfwmOffer, com.ai.sacenter.valuebean.IOVUpdspmLife, com.ai.sacenter.provision.mstp.IUpfwmClient, com.ai.sacenter.provision.valuebean.IOVUpfwmRequest, com.ai.sacenter.IUpdcContext)
*/
public Object finishBPKUpfwm(IOVUpfwmOffer fromUpfwm,
IOVUpdspmLife fromUpdfwm,
IUpfwmClient fromNetWork,
IOVUpfwmRequest fromUpdcpm,
IUpdcContext aContext) throws SFException, Exception {
String fromRsBody = null;
ISandPayRequest fromRequest = null;
try
{
UpfwmHttpClient fromClient = (UpfwmHttpClient)fromNetWork;
if( log.isDebugEnabled() ) log.debug("request:"+ fromUpdcpm.getPLATFORM().getORIGINAL() );
fromRequest = ISandUtils.ICustom._wrapWithReq( (String)fromUpdcpm.getPLATFORM().getORIGINAL() );
if( fromRequest == null || fromRequest.getORDER() == null ){
ExceptionFactory.throwIllegal("IOS0012016", new String[] { fromClient.getNETWORK_().getID_(), "xmlhead/xmlbody" });
}
if( log.isDebugEnabled() ) log.debug( "request:" + fromRequest.getORDER().getXmlbody() );
fromRsBody = fromClient.call( fromRequest.getORDER().getXmlhead(), fromRequest.getORDER().getXmlbody() );
if( log.isDebugEnabled() ) log.debug("response:" + fromRsBody );
if( StringUtils.isBlank( fromRsBody ) ){
ExceptionFactory.throwRemote("IOS0012011", new String[]{ fromClient.getNETWORK_().getID_() } );
}
if( StringUtils.contains( fromRsBody, "time out" ) ){
ExceptionFactory.throwTimeOut("IOS0012004", new String[]{ fromClient.getNETWORK_().getID_() } );
}
fromRsBody = JSONUtils.fromXML("InterBOSS", fromRsBody );
}
finally{
if( fromRequest != null ){ fromRequest = null; }
}
return fromRsBody;
}
/* (non-Javadoc)
* @see com.ai.sacenter.provision.dbcp.impl.IUpfwmProtocolImpl#finishASKUpfwm(com.ai.sacenter.provision.valuebean.IOVUpfwmOffer, com.ai.sacenter.valuebean.IOVUpdspmLife, java.lang.Object, com.ai.sacenter.IUpdcContext)
*/
public IOVUpfwmResponse finishASKUpfwm(IOVUpfwmOffer fromUpfwm,
IOVUpdspmLife fromUpdfwm,
Object fromRsBody,
IUpdcContext aContext) throws SFException, Exception {
IOVUpfwmResponse fromUpdcpm = null;
ISandPayResponse fromRsRsp = null;
try
{
fromUpdcpm = new IOVUpfwmResponse( fromUpfwm );
fromRsRsp = ISandUtils.ICustom._wrapWithRsp( (String)fromRsBody );
if( fromRsRsp == null || fromRsRsp.getResult() == null ){
fromUpdcpm.setFAILURE( Boolean.TRUE );
}
else{
fromUpdcpm.setFAILURE( StringUtils.equals( fromRsRsp.getResult().getRspCode(), "0000")?
Boolean.FALSE:Boolean.TRUE );
fromUpdcpm.setRspCode ( fromRsRsp.getResult().getRspCode () );
fromUpdcpm.setRspDesc ( fromRsRsp.getResult().getRspDesc () );
fromUpdcpm.setRspBody ( fromRsRsp.getResult().getRspBody () );
fromUpdcpm.setRspBottom( fromRsRsp.getResult().getRspResult() );
}
}
finally{
if( fromRsRsp != null ){ fromRsRsp = null; }
}
return fromUpdcpm;
}
}
|
[
"1246696804@qq.com"
] |
1246696804@qq.com
|
fc527ec20c90cf98347357cccef8b04edf77ed70
|
2ed0c54fb9c565239c7ed4db785fd0d7fd00c2d2
|
/src/codility/lesson7/Brackets.java
|
3be89a3a034df856f87f1dceeeaa3ba62be0ef6b
|
[] |
no_license
|
jaeho214/Algorithm_study
|
d825d033b18094c083527096a549b240ccade850
|
449d9e1a3e74ada93855f0474fccac15a0f2e79a
|
refs/heads/master
| 2021-06-24T12:34:43.312884
| 2021-03-30T08:11:19
| 2021-03-30T08:11:19
| 217,222,426
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
package codility.lesson7;
import java.util.Arrays;
import java.util.List;
import java.util.Stack;
public class Brackets {
public static void main(String[] args) {
Brackets brackets = new Brackets();
System.out.println(brackets.solution("({})({}"));
}
public int solution(String S) {
Stack<Character> stack = new Stack<>();
List<Character> list1 = Arrays.asList('(', ')');
List<Character> list2 = Arrays.asList('{', '}');
List<Character> list3 = Arrays.asList('[', ']');
for(int i=0;i<S.length();i++){
if(S.charAt(i) == '[' || S.charAt(i) == '(' || S.charAt(i) == '{')
stack.push(S.charAt(i));
else{
if(stack.isEmpty())
return 0;
else if(list1.contains(stack.peek()) && list1.contains(S.charAt(i))){
stack.pop();
}
else if(list2.contains(stack.peek()) && list2.contains(S.charAt(i))){
stack.pop();
}
else if(list3.contains(stack.peek()) && list3.contains(S.charAt(i))){
stack.pop();
}else
return 0;
}
}
if(stack.isEmpty())
return 1;
return 0;
}
}
|
[
"jaeho214@naver.com"
] |
jaeho214@naver.com
|
b35489e6a0e5f244ee3585f857df9e8b0006222a
|
1f72856f07c504fff8eb74ac95746bcf5f2941ce
|
/src/main/java/org/eclipse/hudson/plugins/birtcharts/BirtChartSupport.java
|
743b7f7274e8f11fc6720ce100829fe7d984fc96
|
[] |
no_license
|
isabella232/hudson.plugins.birt-charts
|
edfa164d5cda652796942f8a390664294b2760b3
|
283002f3657b894121dda04a399b4e20da33b22f
|
refs/heads/master
| 2021-05-26T12:37:03.274982
| 2011-12-15T02:55:54
| 2011-12-15T02:55:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,100
|
java
|
/*******************************************************************************
*
* Copyright (c) 2011 Oracle Corporation.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
* Winston Prakash
*
*******************************************************************************/
package org.eclipse.hudson.plugins.birtcharts;
import hudson.Extension;
import hudson.util.graph.DataSet;
import hudson.util.graph.GraphSupport;
import hudson.util.graph.GraphSupportDescriptor;
import hudson.util.graph.MultiStageTimeSeries;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.List;
import org.eclipse.birt.chart.api.ChartEngine;
import org.eclipse.birt.chart.device.EmptyUpdateNotifier;
import org.eclipse.birt.chart.device.IDeviceRenderer;
import org.eclipse.birt.chart.device.IDisplayServer;
import org.eclipse.birt.chart.device.IImageMapEmitter;
import org.eclipse.birt.chart.exception.ChartException;
import org.eclipse.birt.chart.factory.GeneratedChartState;
import org.eclipse.birt.chart.factory.IGenerator;
import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.model.attribute.Bounds;
import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
import org.eclipse.birt.core.framework.PlatformConfig;
/**
* BIRT Chart implementation for Hudson Graph Support
* @author Winston Prakash
*/
public class BirtChartSupport extends GraphSupport {
private String chartTitle;
private String xAxisLabel;
private String yAxisLabel;
private IDeviceRenderer dRenderer = null;
private int chartType = 3; // 1 - Stacked Area, 2 - Line, 3 - Stacked Bar
private DataSet dataSet;
public BirtChartSupport() {
}
@Override
public void setChartType(int chartType) {
this.chartType = chartType;
}
@Override
public void setTitle(String title) {
chartTitle = title;
}
@Override
public void setXAxisLabel(String xLabel) {
xAxisLabel = xLabel;
}
@Override
public void setYAxisLabel(String yLabel) {
yAxisLabel = yLabel;
}
@Override
public BufferedImage render(int width, int height) {
Chart cm = createBirtChart();
// obtain a png image device renderer
ChartEngine ce = null;
try {
PlatformConfig config = new PlatformConfig();
config.setProperty("STANDALONE", "true");
ce = ChartEngine.instance(config);
dRenderer = ce.getRenderer("dv.PNG");
} catch (ChartException ex) {
ex.printStackTrace();
}
BufferedImage image = new BufferedImage(width,
height,
BufferedImage.TYPE_INT_RGB);
//Draw the chart in the buffered image
Graphics2D g2d = (Graphics2D) image.getGraphics();
dRenderer.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT, g2d);
dRenderer.setProperty(IDeviceRenderer.CACHED_IMAGE, image);
try {
Bounds bo = BoundsImpl.create(0, 0, width, height);
// convert pixels to points (1 inch = 72 points = dpi pixels )
// 1 pixel = 72/dpi points
bo.scale(72d / dRenderer.getDisplayServer().getDpiResolution());
IGenerator gr = ce.getGenerator();
IDisplayServer dServer = dRenderer.getDisplayServer();
GeneratedChartState gcs =
gr.build(dServer,
cm,
bo,
null,
null,
null);
dRenderer.setProperty(IDeviceRenderer.UPDATE_NOTIFIER,
new EmptyUpdateNotifier(cm, gcs.getChartModel()));
gr.render(dRenderer, gcs); // Style processor
} catch (ChartException ex) {
ex.printStackTrace();
}
return image;
}
private Chart createBirtChart() {
return new BirtChart(chartTitle, xAxisLabel, yAxisLabel, dataSet).createChart();
}
@Override
public void setData(DataSet data) {
dataSet = data;
}
@Override
public String getImageMap(String id, int width, int height) {
//Unfortunately we have to render it again, because the map is loaded lazily in another HTTP request
render(width, height);
String imageMap = ((IImageMapEmitter) dRenderer).getImageMap();
StringBuilder sb = new StringBuilder();
sb.append("<map id=\"map\" name=\"" + id + "\"'>");
sb.append(imageMap);
sb.append("</map>");
return sb.toString();
}
@Override
public void setMultiStageTimeSeries(List<MultiStageTimeSeries> multiStageTimeSeries) {
}
@Extension
public static class DescriptorImpl extends GraphSupportDescriptor {
@Override
public String getDisplayName() {
return "Birt Charts";
}
}
}
|
[
"winston.prakash@gmail.com"
] |
winston.prakash@gmail.com
|
cd94f8b4a3ebfc30fea850410058b84ebe059331
|
a8b35e97e90b88ea3ca746c8b31463a7a131020f
|
/proback/src/main/java/com/wanhao/proback/dao/finance/MoneysMapper.java
|
adcd9320a6a595c4ed43409cda9c00c4f5e29884
|
[] |
no_license
|
millions-idea/witkey
|
3f781306bcc48787815c38fa670af066c699e38e
|
5b8c723ba19794831f9c0feafe69676c5e315513
|
refs/heads/master
| 2020-03-23T01:34:13.298929
| 2018-08-11T17:35:51
| 2018-08-11T17:35:51
| 140,924,754
| 0
| 1
| null | 2018-08-11T17:35:52
| 2018-07-14T07:11:04
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,818
|
java
|
/***
* @pName proback
* @name MoneysMapper
* @user HongWei
* @date 2018/8/5
* @desc
*/
package com.wanhao.proback.dao.finance;
import com.wanhao.proback.bean.finance.Moneys;
import com.wanhao.proback.bean.finance.MoneysView;
import com.wanhao.proback.bean.finance.TransactionsView;
import com.wanhao.proback.dao.provider.MoneysMapperProvider;
import com.wanhao.proback.utils.MyMapper;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/***
* 资金变化仓储接口
*/
@Mapper
public interface MoneysMapper extends MyMapper<Moneys> {
@InsertProvider(type = MoneysMapperProvider.class, method = "batchInsert")
/**
* 批量插入记录 韦德 2018年8月5日18:10:27
* @param moneyList
* @return
*/
int batchInsert(@Param("list") List<Moneys> moneyList);
@Select("SELECT t1.*,t2.username FROM tb_moneys t1 LEFT JOIN tb_member t2 ON t1.from_uid = t2.id WHERE ${condition} ORDER BY add_date DESC LIMIT #{page},${limit}")
/**
* 查询-分页 韦德 2018年8月7日02:17:33
* @param page
* @param limit
* @param trade_type
* @param trade_date_begin
* @param trade_date_end
* @param where
* @return
*/
List<MoneysView> selectLimit(@Param("page") Integer page, @Param("limit") String limit
, @Param("trade_type") Integer trade_type
, @Param("beginTime") String trade_date_begin
, @Param("endTime") String trade_date_end
, @Param("condition") String condition);
@Select("SELECT COUNT(*) FROM tb_moneys")
/**
* 查询记录总数 韦德 2018年8月7日02:19:49
* @return
*/
int count();
}
|
[
"2407439@qq.com"
] |
2407439@qq.com
|
b2519731e67d06572c526ce78df8860bb3ebd224
|
a823d48f9c18a308d389492471f205365bb4e578
|
/0000-java8-master/src/main/java/org/omg/PortableServer/POAManager.java
|
479bc2ae7413d44ddae3f87295f9921a9bd6b5f6
|
[] |
no_license
|
liuawen/Learning-Algorithms
|
3e145915ceecb93e88ca92df5dc1d0bf623db429
|
983c93a96ce0807534285782a55b22bb31252078
|
refs/heads/master
| 2023-07-19T17:04:39.723755
| 2023-07-14T14:59:03
| 2023-07-14T14:59:03
| 200,856,810
| 16
| 6
| null | 2023-04-17T19:13:20
| 2019-08-06T13:26:41
|
Java
|
UTF-8
|
Java
| false
| false
| 685
|
java
|
package org.omg.PortableServer;
/**
* org/omg/PortableServer/POAManager.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Friday, April 10, 2015 10:49:22 AM PDT
*/
/**
* Each POA object has an associated POAManager object.
* A POA manager may be associated with one or more
* POA objects. A POA manager encapsulates the processing
* state of the POAs it is associated with.
*/
public interface POAManager extends POAManagerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
{
} // interface POAManager
|
[
"157514367@qq.com"
] |
157514367@qq.com
|
67d44a5abf4d19d64c13720969dcd73d8ff01602
|
926d8912dc0de466ffb3a88510d19d6b6b8cc44b
|
/src/main/java/io/github/atealxt/projecteuler/problem/Problem15.java
|
3657a0401a75a7001e97972cf903e2739dfe04fd
|
[
"MIT"
] |
permissive
|
atealxt/projecteuler
|
472e271c83f7b76d11436a709981c339fe5ff4f4
|
5a3b8e42e2f7243cdd52f01373871223d566ea09
|
refs/heads/master
| 2022-02-13T17:50:10.722611
| 2022-01-05T01:00:56
| 2022-01-05T01:00:56
| 18,832,009
| 0
| 0
|
MIT
| 2022-01-05T01:00:56
| 2014-04-16T08:12:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,505
|
java
|
package io.github.atealxt.projecteuler.problem;
import io.github.atealxt.projecteuler.Problem;
import java.math.BigInteger;
import java.util.LinkedList;
public class Problem15 extends Problem {
@Override
public String getTitle() {
return "Lattice paths";
}
@Override
public String getResult() {
return String.valueOf(getNumOfRoutes2(20));
}
private String getNumOfRoutes2(int width) {
return factorial(2 * width).divide(factorial(width).pow(2)).toString();
}
static BigInteger factorial(int n) {
BigInteger x = new BigInteger("1");
for (int i = 2; i <= n; i++) {
x = x.multiply(new BigInteger(String.valueOf(i)));
}
return x;
}
@SuppressWarnings("unused")
private int getNumOfRoutes(int width) {
int numOfRoutes = 1;
LinkedList<Point> fork = new LinkedList<>();
Point start = new Point(0, width);
fork.add(start);
Point p;
while (!fork.isEmpty()) {
p = fork.pop();
if (p.x == width && p.y == 0) {
break;
}
if (p.x == width) {
fork.add(new Point(p.x, p.y - 1));
} else if (p.y == 0) {
fork.add(new Point(p.x + 1, p.y));
} else {
numOfRoutes++;
fork.add(new Point(p.x, p.y - 1));
fork.add(new Point(p.x + 1, p.y));
}
}
return numOfRoutes;
}
class Point {
int x;
int y;
public Point(int x, int y) {
super();
this.x = x;
this.y = y;
}
@Override
public String toString() {
return "Point [x=" + x + ", y=" + y + "]";
}
}
}
// Reference: http://www.robertdickau.com/manhattan.html
|
[
"atealxt@gmail.com"
] |
atealxt@gmail.com
|
1550f68f1142ea805b7d7d8210eb4a9173670b63
|
1e16f1124163640efa0bdfc1965f5cab0b6196c0
|
/mall-user/src/main/java/com/lee/mall/user/MallUserApplication.java
|
fd982979f30cad11cceef492c8f0e8069b581619
|
[
"Apache-2.0"
] |
permissive
|
BlueLeer/toy-mall
|
b203a488c5df8a9971f9b9f6e22ed8877d7d607d
|
dd1f4a0514a654084ff2b148015c0cf7a13d1fd0
|
refs/heads/master
| 2020-11-24T11:19:07.484857
| 2019-12-15T14:51:29
| 2019-12-15T14:51:29
| 228,122,883
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 581
|
java
|
package com.lee.mall.user;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* @date: 2019/12/15
* @time: 12:20
* @author: lee
* @description:
*/
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class MallUserApplication {
public static void main(String[] args) {
SpringApplication.run(MallUserApplication.class, args);
}
}
|
[
"251668577@qq.com"
] |
251668577@qq.com
|
de2b8a282c41f617d7da324c76e699b1acc7d290
|
94ccab478b3cd5bafe58d32f8c69fb2396053249
|
/Ch04/src/ch04/FlowEx22.java
|
c4c14d7ca25789e82b821e91d33d046b8564bd22
|
[] |
no_license
|
dudgks/work_java
|
9c52e546b7d20e79b8ec1cc48c688d58891f49e0
|
b699447031e4db1462a5a520939243d2a21c2de6
|
refs/heads/master
| 2021-08-07T23:11:06.200802
| 2018-08-03T10:57:56
| 2018-08-03T10:57:56
| 134,249,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 691
|
java
|
package ch04;
public class FlowEx22 {
public static void main(String[] args) {
// C언어 사용자를 위한 배열 선언 및 초기화 코드
// 자세한 내용은 5장에서 설명
int[] arr = {10, 20, 30, 40, 50};
int sum = 0;
// 기존 for문
for(int i = 0; i < arr.length; i++)
System.out.printf("%d ", arr[i]);
System.out.println();
// 향상된 for문 (JDK 1.5 버전부터 사용가능)
// 형태 : for (타입 변수명 : 배열 또는 컬렉션)
// 컬렉션은 ? 11장에서 설명
for(int tmp : arr) {
System.out.printf("%d ", tmp);
sum += tmp;
}
System.out.println();
System.out.println("sum=" + sum);
}
}
|
[
"KOITT@KOITT-PC"
] |
KOITT@KOITT-PC
|
77208b17c629930992dbdeaada82efc31d76057b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/21/21_d323e20663cc981962e2386d2e9a622c3da126de/KeepLightsOn/21_d323e20663cc981962e2386d2e9a622c3da126de_KeepLightsOn_s.java
|
1b5512cbc5361cc150a33075acc405819d3c6086
|
[] |
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,133
|
java
|
package eu.uberdust.lights.tasks;
/**
* Created by IntelliJ IDEA.
* User: dimitris
* Date: 5/3/12
* Time: 12:48 AM
* To change this template use File | Settings | File Templates.
*/
import eu.uberdust.MainApp;
import eu.uberdust.communication.rest.RestClient;
import eu.uberdust.lights.LightController;
import org.apache.log4j.Logger;
import java.util.Timer;
import java.util.TimerTask;
public class KeepLightsOn extends TimerTask {
private static final Logger LOGGER = Logger.getLogger(KeepLightsOn.class);
private final Timer timer;
public static final long DELAY = 60000;
public KeepLightsOn(final Timer thatTimer) {
super();
this.timer = thatTimer;
}
@Override
public void run() {
LOGGER.info("KeepLightsOn: initiated");
LOGGER.info("KeepLightsOn: isYellowLocked -- "+LightController.getInstance().isYellowLocked());
LOGGER.info("KeepLightsOn: isBlancoLocked -- "+LightController.getInstance().isBlancoLocked());
LOGGER.info("KeepLightsOn: isAmethystLocked -- "+LightController.getInstance().isAmethystLocked());
LOGGER.info("KeepLightsOn: isSilverLocked -- "+LightController.getInstance().isSilverLocked());
if (LightController.getInstance().getMedian() < LightController.LUM_THRESHOLD_1) {
if (!LightController.getInstance().isYellowLocked()) {
LightController.getInstance().controlLight(true, 1);
}
if (!LightController.getInstance().isBlancoLocked()) {
LightController.getInstance().controlLight(true, 2);
}
if (!LightController.getInstance().isAmethystLocked()) {
LightController.getInstance().controlLight(true, 3);
}
if (!LightController.getInstance().isSilverLocked()) {
LightController.getInstance().controlLight(true, 4);
}
} else {
LightController.getInstance().controlLight(false, -1);
}
this.timer.schedule(new KeepLightsOn(timer), DELAY);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
84cdf6bc285d76835af52920fa697978824bdbe2
|
48f4ee839300f711933e86ffbb2354530b538fc4
|
/modules/oneTransportBucks/bucks/src/main/java/net/uk/onetransport/android/county/bucks/trafficqueue/TrafficQueue.java
|
472d0d274b023e57bb85aad6dcde01880cd38b07
|
[] |
no_license
|
oneTRANSPORT/android-one-transport-sdk
|
370ea5f26a73f65d3c85da4d27bac99a815e408e
|
86e78c256db19986c7b0ae83f8fb4991ad5b735b
|
refs/heads/master
| 2021-01-12T18:14:35.133354
| 2016-11-01T08:45:00
| 2016-11-01T08:45:00
| 71,344,449
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,773
|
java
|
/* Copyright 2016 InterDigital Communications, 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.
*/
package net.uk.onetransport.android.county.bucks.trafficqueue;
import com.google.gson.annotations.Expose;
public class TrafficQueue {
@Expose
private String id;
@Expose
private String tpegDirection;
@Expose
private String fromType;
@Expose
private String fromDescriptor;
@Expose
private Double fromLatitude;
@Expose
private Double fromLongitude;
@Expose
private String toType;
@Expose
private String toDescriptor;
@Expose
private Double toLatitude;
@Expose
private Double toLongitude;
@Expose
private String time;
@Expose
private Double severity;
@Expose
private String present;
private String cinId;
private Long creationTime;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTpegDirection() {
return tpegDirection;
}
public void setTpegDirection(String tpegDirection) {
this.tpegDirection = tpegDirection;
}
public String getFromType() {
return fromType;
}
public void setFromType(String fromType) {
this.fromType = fromType;
}
public String getFromDescriptor() {
return fromDescriptor;
}
public void setFromDescriptor(String fromDescriptor) {
this.fromDescriptor = fromDescriptor;
}
public Double getFromLatitude() {
return fromLatitude;
}
public void setFromLatitude(Double fromLatitude) {
this.fromLatitude = fromLatitude;
}
public Double getFromLongitude() {
return fromLongitude;
}
public void setFromLongitude(Double fromLongitude) {
this.fromLongitude = fromLongitude;
}
public String getToType() {
return toType;
}
public void setToType(String toType) {
this.toType = toType;
}
public String getToDescriptor() {
return toDescriptor;
}
public void setToDescriptor(String toDescriptor) {
this.toDescriptor = toDescriptor;
}
public Double getToLatitude() {
return toLatitude;
}
public void setToLatitude(Double toLatitude) {
this.toLatitude = toLatitude;
}
public Double getToLongitude() {
return toLongitude;
}
public void setToLongitude(Double toLongitude) {
this.toLongitude = toLongitude;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public Double getSeverity() {
return severity;
}
public void setSeverity(Double severity) {
this.severity = severity;
}
public String getPresent() {
return present;
}
public void setPresent(String present) {
this.present = present;
}
public String getCinId() {
return cinId;
}
public void setCinId(String cinId) {
this.cinId = cinId;
}
public Long getCreationTime() {
return creationTime;
}
public void setCreationTime(Long creationTime) {
this.creationTime = creationTime;
}
}
|
[
"dr.paul.thomas@gmail.com"
] |
dr.paul.thomas@gmail.com
|
6797d1d5780fdbb62d099011bc7ccabee7ebb5ef
|
d349ed27f01e2c8e494c1c3cd18d165b9bd13c53
|
/game-context/src/main/generated/com/sky/game/context/MessageInternalBeanHolder.java
|
8fcd7f2b1ce9096876aab7cb8591de1888f9d1a7
|
[] |
no_license
|
autumnsparrow/poker-game
|
385ce3e4146013caf894a4b80c4e1b74e5e826f9
|
7766a7529e4feed95c3a2c2cfc27ce25ad913bb6
|
refs/heads/master
| 2021-04-06T20:46:38.077347
| 2018-03-14T15:11:44
| 2018-03-14T15:11:44
| 125,230,336
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 776
|
java
|
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.0
//
// <auto-generated>
//
// Generated from file `message.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.sky.game.context;
public final class MessageInternalBeanHolder
{
public
MessageInternalBeanHolder()
{
}
public
MessageInternalBeanHolder(MessageInternalBean value)
{
this.value = value;
}
public MessageInternalBean value;
}
|
[
"ruiqiuzhang@gmail.com"
] |
ruiqiuzhang@gmail.com
|
7686ae2411e9e6b63a508a584a2bbd732c70fd28
|
3cc9943dd8c7271e098b1f0a1f610ebcf39343b8
|
/src/main/java/com/kolich/interview/random/TwoDice.java
|
46e312078c65d21f95550d7f476e2d2b307746ae
|
[] |
no_license
|
markkolich/interviews
|
d4108bc17869ded0374cbb321c41c70d6da9fb00
|
e0811fb5fe08f42ce26665182bbda90f5ac199ea
|
refs/heads/master
| 2022-11-15T04:52:25.583601
| 2022-11-10T21:27:00
| 2022-11-10T21:27:00
| 7,464,630
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 889
|
java
|
package com.kolich.interview.random;
import java.util.Random;
public class TwoDice {
private static class Dice {
private Random random_;
public Dice() {
random_ = new Random();
}
public int roll() {
// Returns an integer between 1 and 6.
return random_.nextInt(6) + 1;
}
}
public static void main(String[] args) {
// Holds counts between 2-12, indexes 0 and 1 are unused
final int[] totals = new int[13];
// Roll each 200 times.
final Dice d1 = new Dice(), d2 = new Dice();
for(int i = 0; i < 200; i++) {
int total = d1.roll() + d2.roll();
totals[total]++;
}
// Print out a nice bell curve like diagram.
for(int i = 2; i <= 12; i++) {
int total = totals[i];
System.out.print(i + ":\t");
for(int j = total; j > 0; j--) {
if(j % 2 == 0) {
System.out.print("XX");
}
}
System.out.println("");
}
}
}
|
[
"social@kolich.com"
] |
social@kolich.com
|
0ee0b4170d8bc8a3682be87d6422c0829006c818
|
ba26b6239d97c129995fc030c0fae99b1001deaf
|
/oxygen-core/src/main/java/vip/justlive/oxygen/core/util/base/PlaceHolderHelper.java
|
9acc40a777189d77c92a49329e82ca2e297b8c3d
|
[
"Apache-2.0"
] |
permissive
|
justlive1/oxygen
|
3d9c718f72f6e84ed4892a20717e4bb15ad4a738
|
9eca9af91d08b032749334195fb93a3a38680e42
|
refs/heads/master
| 2023-07-25T00:06:50.421696
| 2022-08-03T06:39:16
| 2022-08-03T06:39:16
| 150,673,713
| 164
| 14
|
Apache-2.0
| 2023-07-07T21:58:13
| 2018-09-28T02:19:57
|
Java
|
UTF-8
|
Java
| false
| false
| 7,490
|
java
|
/*
* Copyright (C) 2020 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 vip.justlive.oxygen.core.util.base;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.function.UnaryOperator;
/**
* placeHolder帮助类
* <br>
* 用于解析value中使用占位的情况
*
* @author wubo
*/
public class PlaceHolderHelper {
/**
* 默认占位符前缀: {@value}
*/
public static final String DEFAULT_PLACEHOLDER_PREFIX = "${";
/**
* 默认占位符后缀: {@value}
*/
public static final String DEFAULT_PLACEHOLDER_SUFFIX = "}";
/**
* 默认占位值分隔符: {@value}
*/
public static final String DEFAULT_VALUE_SEPARATOR = ":";
/**
* 默认实例
*/
public static final PlaceHolderHelper DEFAULT_HELPER;
private static final Map<String, String> SIMPLE_PREFIXES = new HashMap<>(4);
static {
SIMPLE_PREFIXES.put("}", "{");
SIMPLE_PREFIXES.put("]", "[");
SIMPLE_PREFIXES.put(")", "(");
DEFAULT_HELPER = new PlaceHolderHelper(DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX,
DEFAULT_VALUE_SEPARATOR, true);
}
private final String placeholderPrefix;
private final String placeholderSuffix;
private final String simplePrefix;
private final String valueSeparator;
private final boolean ignoreUnresolvablePlaceholders;
public PlaceHolderHelper(String placeholderPrefix, String placeholderSuffix) {
this(placeholderPrefix, placeholderSuffix, null, true);
}
public PlaceHolderHelper(String placeholderPrefix, String placeholderSuffix,
String valueSeparator, boolean ignoreUnresolvablePlaceholders) {
MoreObjects.notNull(placeholderPrefix, "'placeholderPrefix' must not be null");
MoreObjects.notNull(placeholderSuffix, "'placeholderSuffix' must not be null");
this.placeholderPrefix = placeholderPrefix;
this.placeholderSuffix = placeholderSuffix;
String simplePrefixForSuffix = SIMPLE_PREFIXES.get(this.placeholderSuffix);
if (simplePrefixForSuffix != null && this.placeholderPrefix.endsWith(simplePrefixForSuffix)) {
this.simplePrefix = simplePrefixForSuffix;
} else {
this.simplePrefix = this.placeholderPrefix;
}
this.valueSeparator = valueSeparator;
this.ignoreUnresolvablePlaceholders = ignoreUnresolvablePlaceholders;
}
public static PlaceHolderHelper defaultInstance() {
return DEFAULT_HELPER;
}
private static boolean substringMatch(CharSequence str, int index, CharSequence substring) {
if (index + substring.length() > str.length()) {
return false;
}
for (int i = 0; i < substring.length(); i++) {
if (str.charAt(index + i) != substring.charAt(i)) {
return false;
}
}
return true;
}
/**
* 替换所有占位格式 {@code ${name}}
*
* @param value 需要转换的属性
* @param properties 配置集合
* @return 替换后的字符串
*/
public String replacePlaceholders(String value, final Properties properties) {
MoreObjects.notNull(properties, "'properties' must not be null");
MoreObjects.notNull(value, "'value' must not be null");
return parseStringValue(value, properties::getProperty, new HashSet<>());
}
public String replacePlaceholders(String value, UnaryOperator<String> operator) {
MoreObjects.notNull(operator, "'operator' must not be null");
MoreObjects.notNull(value, "'value' must not be null");
return parseStringValue(value, operator, new HashSet<>());
}
protected String parseStringValue(String value, UnaryOperator<String> operator,
Set<String> visitedPlaceholders) {
StringBuilder result = new StringBuilder(value);
int startIndex = value.indexOf(this.placeholderPrefix);
while (startIndex != -1) {
int endIndex = findPlaceholderEndIndex(result, startIndex);
if (endIndex != -1) {
String placeholder = result
.substring(startIndex + this.placeholderPrefix.length(), endIndex);
String originalPlaceholder = placeholder;
if (!visitedPlaceholders.add(originalPlaceholder)) {
throw new IllegalArgumentException(
"Circular placeholder reference '" + originalPlaceholder
+ "' in property definitions");
}
// 递归
placeholder = parseStringValue(placeholder, operator, visitedPlaceholders);
// 获取没有占位的属性值
String propVal = operator.apply(placeholder);
propVal = getCommonVal(operator, placeholder, propVal);
if (propVal != null) {
// 递归 表达式中含有表达式
propVal = parseStringValue(propVal, operator, visitedPlaceholders);
result.replace(startIndex, endIndex + this.placeholderSuffix.length(), propVal);
startIndex = result.indexOf(this.placeholderPrefix, startIndex + propVal.length());
} else if (this.ignoreUnresolvablePlaceholders) {
// 继续解析
startIndex = result
.indexOf(this.placeholderPrefix, endIndex + this.placeholderSuffix.length());
} else {
throw new IllegalArgumentException(String
.format("Could not resolve placeholder '%s' in value '%s'", placeholder, value));
}
visitedPlaceholders.remove(originalPlaceholder);
} else {
startIndex = -1;
}
}
return result.toString();
}
private String getCommonVal(UnaryOperator<String> operator, String placeholder, String propVal) {
if (propVal == null && this.valueSeparator != null) {
int separatorIndex = placeholder.indexOf(this.valueSeparator);
if (separatorIndex != -1) {
String actualPlaceholder = placeholder.substring(0, separatorIndex);
String defaultValue = placeholder.substring(separatorIndex + this.valueSeparator.length());
propVal = operator.apply(actualPlaceholder);
if (propVal == null) {
propVal = defaultValue;
}
}
}
return propVal;
}
private int findPlaceholderEndIndex(CharSequence buf, int startIndex) {
int index = startIndex + this.placeholderPrefix.length();
int withinNestedPlaceholder = 0;
while (index < buf.length()) {
if (substringMatch(buf, index, this.placeholderSuffix)) {
if (withinNestedPlaceholder > 0) {
withinNestedPlaceholder--;
index = index + this.placeholderSuffix.length();
} else {
return index;
}
} else if (substringMatch(buf, index, this.simplePrefix)) {
withinNestedPlaceholder++;
index = index + this.simplePrefix.length();
} else {
index++;
}
}
return -1;
}
}
|
[
"qq11419041@163.com"
] |
qq11419041@163.com
|
af959d158c5003dee01277fb6ae05159bf8cb1a5
|
b06acf556b750ac1fa5b28523db7188c05ead122
|
/IfcXML/src/org/tech/iai/ifc/xml/ifc/_2x3/final_/IfcManifoldSolidBrep.java
|
ea799a31192c91594ac0dff73a6f0363a52c4f74
|
[] |
no_license
|
christianharrington/MDD
|
3500afbe5e1b1d1a6f680254095bb8d5f63678ba
|
64beecdaed65ac22b0047276c616c269913afd7f
|
refs/heads/master
| 2021-01-10T21:42:53.686724
| 2012-12-17T03:27:05
| 2012-12-17T03:27:05
| 6,157,471
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,678
|
java
|
/**
*/
package org.tech.iai.ifc.xml.ifc._2x3.final_;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Ifc Manifold Solid Brep</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcManifoldSolidBrep#getOuter <em>Outer</em>}</li>
* </ul>
* </p>
*
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage#getIfcManifoldSolidBrep()
* @model abstract="true"
* extendedMetaData="name='IfcManifoldSolidBrep' kind='elementOnly'"
* @generated
*/
public interface IfcManifoldSolidBrep extends IfcSolidModel {
/**
* Returns the value of the '<em><b>Outer</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Outer</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Outer</em>' containment reference.
* @see #setOuter(OuterType)
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage#getIfcManifoldSolidBrep_Outer()
* @model containment="true" required="true"
* extendedMetaData="kind='element' name='Outer' namespace='##targetNamespace'"
* @generated
*/
OuterType getOuter();
/**
* Sets the value of the '{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcManifoldSolidBrep#getOuter <em>Outer</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Outer</em>' containment reference.
* @see #getOuter()
* @generated
*/
void setOuter(OuterType value);
} // IfcManifoldSolidBrep
|
[
"christian@harrington.dk"
] |
christian@harrington.dk
|
ec3c930ed048444f053748360d373630de4e48b7
|
755adf77ac6a04139351bedac3141ee227842e6f
|
/src/main/java/com/edu/thread/annotation/copy/ThreadAnnotationTest.java
|
6655422e700e2f61492ad2a0a8c6b0772357898c
|
[] |
no_license
|
zuohuai/coreJava
|
e37b6873e4baeebe3ba6464a30bfaaef33c7af63
|
ca7ad299c141544d8b187100579a25a49c618a59
|
refs/heads/master
| 2021-01-17T13:39:56.335930
| 2017-07-20T06:55:54
| 2017-07-20T06:55:54
| 47,189,343
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 188
|
java
|
package com.edu.thread.annotation.copy;
public class ThreadAnnotationTest {
public static void main(String[] args){
}
public void test() throws Exception{
}
}
|
[
"zuo_huai@163.com"
] |
zuo_huai@163.com
|
77afbbba88152aee1efdbf8f159b621f66940569
|
6335f904a8496c07a6fec02b6c28b0153356d651
|
/hybris/bin/custom/checkboxconfiguratortemplateaddon/src/de/hybris/platform/checkboxconfiguratortemplateaddon/CheckboxconfiguratortemplateaddonStandalone.java
|
94955846b035f3cd99b10ae1e539d4a1bdc6f6a0
|
[] |
no_license
|
EvgeniyChaika/hybris-trails
|
57501f844cb4659615b1c0a8b50aca864b476268
|
e2dd1ca23d4d7d53cafc226aa4c2d9749d4991bb
|
refs/heads/master
| 2020-04-01T18:13:17.922654
| 2018-10-31T12:53:15
| 2018-10-31T12:53:15
| 153,479,437
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,854
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.checkboxconfiguratortemplateaddon;
import de.hybris.platform.core.Registry;
import de.hybris.platform.jalo.JaloSession;
import de.hybris.platform.util.RedeployUtilities;
import de.hybris.platform.util.Utilities;
/**
* Demonstration of how to write a standalone application that can be run directly from within eclipse or from the
* commandline.<br>
* To run this from commandline, just use the following command:<br>
* <code>
* java -jar bootstrap/bin/ybootstrap.jar "new de.hybris.platform.checkboxconfiguratortemplateaddon.CheckboxconfiguratortemplateaddonStandalone().run();"
* </code> From eclipse, just run as Java Application. Note that you maybe need to add all other projects like
* ext-commerce, ext-pim to the Launch configuration classpath.
*/
public class CheckboxconfiguratortemplateaddonStandalone
{
/**
* Main class to be able to run it directly as a java program.
*
* @param args
* the arguments from commandline
*/
public static void main(final String[] args)
{
new CheckboxconfiguratortemplateaddonStandalone().run();
}
public void run()
{
Registry.activateStandaloneMode();
Registry.activateMasterTenant();
final JaloSession jaloSession = JaloSession.getCurrentSession();
System.out.println("Session ID: " + jaloSession.getSessionID()); //NOPMD
System.out.println("User: " + jaloSession.getUser()); //NOPMD
Utilities.printAppInfo();
RedeployUtilities.shutdown();
}
}
|
[
"evgeniy.chaika.83@gmail.com"
] |
evgeniy.chaika.83@gmail.com
|
ac97ea0a5111c8770aa5420c9abf7a129dcf4cbb
|
85ebef91a523233c83569aa3a1de6529a866ad6d
|
/app/src/main/java/com/oxilo/mrsafer/modal/ReportResponse.java
|
552e2cb481d415aacde3a2ac60783f79bce2530c
|
[] |
no_license
|
nirru/UpperBetter
|
23622089bdf26b3196fd97907686c7868b3114a3
|
10b74c8391a4e6c60de64a9ba5eae9d10a224f5e
|
refs/heads/master
| 2021-08-19T07:54:11.656315
| 2017-11-25T09:28:20
| 2017-11-25T09:28:20
| 111,991,550
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,179
|
java
|
package com.oxilo.mrsafer.modal;
/**
* Created by ericbasendra on 13/06/16.
*/
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class ReportResponse implements Parcelable{
@SerializedName("status")
@Expose
private Integer status;
@SerializedName("message")
@Expose
private String message;
@SerializedName("ReportList")
@Expose
private List<ReportList> reportList = new ArrayList<ReportList>();
protected ReportResponse(Parcel in) {
message = in.readString();
reportList = in.createTypedArrayList(ReportList.CREATOR);
}
public static final Creator<ReportResponse> CREATOR = new Creator<ReportResponse>() {
@Override
public ReportResponse createFromParcel(Parcel in) {
return new ReportResponse(in);
}
@Override
public ReportResponse[] newArray(int size) {
return new ReportResponse[size];
}
};
/**
*
* @return
* The status
*/
public Integer getStatus() {
return status;
}
/**
*
* @param status
* The status
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
*
* @return
* The message
*/
public String getMessage() {
return message;
}
/**
*
* @param message
* The message
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* @return
* The reportList
*/
public List<ReportList> getReportList() {
return reportList;
}
/**
*
* @param reportList
* The ReportList
*/
public void setReportList(List<ReportList> reportList) {
this.reportList = reportList;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(message);
dest.writeTypedList(reportList);
}
}
|
[
"nikk3008@outlook.com"
] |
nikk3008@outlook.com
|
6b2231d9ee44f70ef8d443a106f559364aa22beb
|
315af64ea65cc45354e8a393ab2b9aa13337b446
|
/cofpasgers/src/main/java/com/huiketong/cofpasgers/json/layuidata/CusSerResp.java
|
4b3d2b94dc1461dc6eaa5de49ced9bc724d97d5b
|
[
"Apache-2.0"
] |
permissive
|
ZuofeiGithub/javaweb_huiketong
|
3d7d3777f9081101fa1fc4ac6bdb25ff96010b23
|
0c2e630fd1be9a0ecf02230acf6b82e9b6bc8b2c
|
refs/heads/master
| 2020-04-19T08:01:30.179765
| 2019-05-28T07:58:26
| 2019-05-28T07:58:26
| 168,064,380
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 826
|
java
|
package com.huiketong.cofpasgers.json.layuidata;
import java.util.List;
public class CusSerResp {
private int code;
private String msg;
private String count;
private List<DataBean> data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public List<DataBean> getData() {
return data;
}
public void setData(List<DataBean> data) {
this.data = data;
}
public static class DataBean {
String name;
String telphone;
}
}
|
[
"348068347@qq.com"
] |
348068347@qq.com
|
3a2dedb1557eb9b023cf8617a1a53c6eb79a7683
|
76852b1b29410436817bafa34c6dedaedd0786cd
|
/sources-2020-11-04-tempmail/sources/com/google/android/gms/internal/ads/zzdfi.java
|
a5d8977ec8884c5e147dff67ae8a29eac36a6203
|
[] |
no_license
|
zteeed/tempmail-apks
|
040e64e07beadd8f5e48cd7bea8b47233e99611c
|
19f8da1993c2f783b8847234afb52d94b9d1aa4c
|
refs/heads/master
| 2023-01-09T06:43:40.830942
| 2020-11-04T18:55:05
| 2020-11-04T18:55:05
| 310,075,224
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,530
|
java
|
package com.google.android.gms.internal.ads;
import android.content.Context;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
/* compiled from: com.google.android.gms:play-services-ads@@19.2.0 */
public final class zzdfi implements zzela<zzdfe> {
/* renamed from: a reason: collision with root package name */
private final zzelj<zzaxd> f8164a;
/* renamed from: b reason: collision with root package name */
private final zzelj<Integer> f8165b;
/* renamed from: c reason: collision with root package name */
private final zzelj<Context> f8166c;
/* renamed from: d reason: collision with root package name */
private final zzelj<zzaxh> f8167d;
/* renamed from: e reason: collision with root package name */
private final zzelj<ScheduledExecutorService> f8168e;
/* renamed from: f reason: collision with root package name */
private final zzelj<Executor> f8169f;
public zzdfi(zzelj<zzaxd> zzelj, zzelj<Integer> zzelj2, zzelj<Context> zzelj3, zzelj<zzaxh> zzelj4, zzelj<ScheduledExecutorService> zzelj5, zzelj<Executor> zzelj6) {
this.f8164a = zzelj;
this.f8165b = zzelj2;
this.f8166c = zzelj3;
this.f8167d = zzelj4;
this.f8168e = zzelj5;
this.f8169f = zzelj6;
}
public final /* synthetic */ Object get() {
return new zzdfe(this.f8164a.get(), this.f8165b.get().intValue(), this.f8166c.get(), this.f8167d.get(), this.f8168e.get(), this.f8169f.get());
}
}
|
[
"zteeed@minet.net"
] |
zteeed@minet.net
|
fe8e46d20750b680938a6ded4d08067213ad03ea
|
cd6878a38194bd006e27dfbdf4ed725eb88560ba
|
/src/main/java/com/ricardo/cursomc/repositories/ProdutoRepository.java
|
b9e0a74ae8fe7a682cc040e8df0d4bf8ac4934d5
|
[] |
no_license
|
RBatista6/cursomc
|
78ffde77f3f04241b8568d32950fc7bb42f3336a
|
e787c6cfc1dcec2be4e42bd509397cc379ea689d
|
refs/heads/master
| 2020-03-19T02:35:47.418592
| 2018-08-02T10:21:13
| 2018-08-02T10:21:13
| 135,642,627
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 293
|
java
|
package com.ricardo.cursomc.repositories;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.ricardo.cursomc.domain.Produto;
@Repository
public interface ProdutoRepository extends JpaRepository<Produto, Integer> {
}
|
[
"="
] |
=
|
e369c8657cad62589a2d3122fb57f780625428af
|
df755f1ad9f30e2968faaf65d5f203ac9de8dcf1
|
/mftcc-platform-web-master/src/main/java/app/component/msgconf/feign/MfMsgVarFeign.java
|
bc7e54ba35d6137000c1bebedf59b5cdc3194e04
|
[] |
no_license
|
gaoqiang9399/eclipsetogit
|
afabf761f77fe542b3da1535b15d4005274b8db7
|
03e02ef683929ea408d883ea35cbccf07a4c43e6
|
refs/heads/master
| 2023-01-22T16:42:32.813383
| 2020-11-23T07:31:23
| 2020-11-23T07:31:23
| 315,209,391
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,711
|
java
|
package app.component.msgconf.feign;
import java.util.List;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import app.component.msgconf.entity.MfMsgVar;
import app.util.toolkit.Ipage;
/**
* Title: MfMsgVarBo.java
* Description:
* @author:kaifa@dhcc.com.cn
* @Wed Jul 05 15:23:19 CST 2017
**/
@FeignClient("mftcc-platform-factor")
public interface MfMsgVarFeign {
@RequestMapping(value = "/mfMsgVar/insert")
public void insert(@RequestBody MfMsgVar mfMsgVar) throws Exception;
@RequestMapping(value = "/mfMsgVar/delete")
public void delete(@RequestBody MfMsgVar mfMsgVar) throws Exception;
@RequestMapping(value = "/mfMsgVar/update")
public void update(@RequestBody MfMsgVar mfMsgVar) throws Exception;
@RequestMapping(value = "/mfMsgVar/updateFlag")
public int updateFlag(@RequestBody MfMsgVar mfMsgVar) throws Exception;
@RequestMapping(value = "/mfMsgVar/getById")
public MfMsgVar getById(@RequestBody MfMsgVar mfMsgVar) throws Exception;
@RequestMapping(value = "/mfMsgVar/findByPage")
public Ipage findByPage(@RequestBody Ipage ipage) throws Exception;
@RequestMapping(value = "/mfMsgVar/getAll")
public List<MfMsgVar> getAll(@RequestBody MfMsgVar mfMsgVar) throws Exception;
@RequestMapping(value = "/mfMsgVar/getListByVarUsages")
public List<MfMsgVar> getListByVarUsages(@RequestBody MfMsgVar mfMsgVar) throws Exception;
@RequestMapping(value = "/mfMsgVar/getListByVarUsage")
public List<MfMsgVar> getListByVarUsage(@RequestBody MfMsgVar mfMsgVar) throws Exception;
}
|
[
"gaoqiang1@chenbingzhu.zgcGuaranty.net"
] |
gaoqiang1@chenbingzhu.zgcGuaranty.net
|
8056ad7097e563f9fca3547ce1167cfb3ed627b6
|
cbde503c151471defe730f413f8c449ef670a33f
|
/src/com/pro/dao/OfuserDaoImpl.java
|
4ca0d4d58951febdfc837111b55ce27ba54c5b80
|
[] |
no_license
|
scorpiopapa/xiaozhang
|
4dd5f7d52bbf4e628cfb0381bcc585c23ddcf1be
|
5e80931795e198908bfd8debce79271b2895a783
|
refs/heads/master
| 2021-01-10T20:29:15.784526
| 2014-08-31T12:54:29
| 2014-08-31T12:54:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 142
|
java
|
package com.pro.dao;
import com.qiYang.model.Ofuser;
public class OfuserDaoImpl extends BaseDaoImpl<Ofuser, Long> implements OfuserDao {
}
|
[
"liliang2005@gmail.com"
] |
liliang2005@gmail.com
|
0635ec7d45ff8fbc3a0f79abe2b9610368d68b4c
|
6617a7091490a0f600de9a21a7748d0d2de3e2d3
|
/loader/src/test/java/org/cucina/loader/agent/SchedulingAgentTest.java
|
3f5c3239f8409b3684a4d90e7fd7257f82ef917a
|
[
"Apache-2.0"
] |
permissive
|
cucina/opencucina
|
f80ee908eb9d7138493b9f720aefe9270ad1a3c4
|
ac683668bf7b2fa6c31491c6eafbfb5c95b651eb
|
refs/heads/master
| 2021-05-15T02:00:45.714499
| 2018-03-09T06:37:41
| 2018-03-09T06:37:43
| 30,875,325
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,755
|
java
|
package org.cucina.loader.agent;
import org.cucina.core.service.ScheduleService;
import org.junit.Before;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
import static org.mockito.Mockito.*;
/**
* JAVADOC for Class Level
*
* @author $Author: $
* @version $Revision: $
*/
public class SchedulingAgentTest {
private Agent delegate;
private ScheduleService service;
private String GROUPNAME = "myGroupName";
private String NAME = "myName";
/**
* JAVADOC Method Level Comments
*
* @throws Exception JAVADOC.
*/
@Before
public void setUp()
throws Exception {
service = mock(ScheduleService.class);
delegate = new Agent() {
@Override
public void execute() {
}
};
}
/**
* JAVADOC Method Level Comments
*/
@Test(expected = IllegalArgumentException.class)
public void testCtor() {
new SchedulingAgent(null, delegate, NAME, 2);
}
/**
* JAVADOC Method Level Comments
*/
@Test(expected = IllegalArgumentException.class)
public void testCtor2() {
new SchedulingAgent(service, null, NAME, 2);
}
/**
* JAVADOC Method Level Comments
*/
@Test(expected = IllegalArgumentException.class)
public void testCtor3() {
new SchedulingAgent(service, delegate, "", 2);
}
/**
* JAVADOC Method Level Comments
*/
@Test(expected = IllegalArgumentException.class)
public void testCtor4() {
new SchedulingAgent(service, delegate, NAME, 0);
}
/**
* JAVADOC Method Level Comments
*/
@Test
public void testExecute() {
SchedulingAgent executor = new SchedulingAgent(service, delegate, NAME, 2);
executor.execute();
verify(service, times(1)).stop(NAME, "agent");
verify(service, times(1))
.start(NAME, "agent", 2000, delegate, "execute", new HashMap<String, Object>());
}
/**
* JAVADOC Method Level Comments
*/
@Test
public void testExecuteProps() {
SchedulingAgent executor = new SchedulingAgent(service, delegate, NAME, 21);
executor.execute();
Map<String, Object> propsMap = new HashMap<String, Object>();
propsMap.put("x", "y");
executor.setProperties(propsMap);
executor.execute();
verify(service, times(2)).stop(NAME, "agent");
verify(service, times(1))
.start(NAME, "agent", 21000, delegate, "execute", new HashMap<String, Object>());
verify(service, times(1)).start(NAME, "agent", 21000, delegate, "execute", propsMap);
}
/**
* JAVADOC Method Level Comments
*/
@Test
public void testGroupName() {
SchedulingAgent executor = new SchedulingAgent(service, delegate, NAME, 5);
executor.setGroupName(GROUPNAME);
executor.execute();
verify(service, times(1)).stop(NAME, GROUPNAME);
verify(service, times(1))
.start(NAME, GROUPNAME, 5 * 1000, delegate, "execute", new HashMap<String, Object>());
}
}
|
[
"viktor.levine@gmail.com"
] |
viktor.levine@gmail.com
|
891e5dcc4814b446bedb209a9185d7c9f404349a
|
725e1b887c81b59fb6626ddd80f8619c1f37190a
|
/openmeetings-web/src/test/java/org/apache/openmeetings/service/scheduler/TestJob.java
|
89515a835d1dcdbe4287f74b56eec68fe1010e1d
|
[
"Apache-2.0",
"LicenseRef-scancode-jdom",
"BSD-3-Clause",
"CPL-1.0",
"EPL-1.0",
"Plexus",
"LicenseRef-scancode-indiana-extreme",
"Classpath-exception-2.0",
"CDDL-1.0",
"MPL-1.1",
"GPL-2.0-only",
"MIT",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-oracle-openjdk-exception-2.0",
"CDDL-1.1"
] |
permissive
|
mmg-3/openmeetings
|
9dd2ac09bf2c04954d2190550fd5ebd37c25526e
|
ec5c85fe647079422b58d164923a22279fb49395
|
refs/heads/master
| 2023-03-19T10:54:51.315884
| 2021-03-12T11:04:32
| 2021-03-12T11:04:32
| 347,519,725
| 0
| 0
|
Apache-2.0
| 2021-03-14T01:43:47
| 2021-03-14T01:39:45
| null |
UTF-8
|
Java
| false
| false
| 5,043
|
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.openmeetings.service.scheduler;
import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DASHBOARD_SHOW_RSS;
import static org.apache.openmeetings.util.OpenmeetingsVariables.setInitComplete;
import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;
import org.apache.openmeetings.AbstractWicketTester;
import org.apache.openmeetings.core.mail.MailHandler;
import org.apache.openmeetings.db.entity.basic.Configuration;
import org.apache.openmeetings.db.entity.user.Group;
import org.apache.openmeetings.db.entity.user.GroupUser;
import org.apache.openmeetings.db.entity.user.User;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.stubbing.Answer;
import org.springframework.beans.factory.annotation.Autowired;
@ExtendWith(MockitoExtension.class)
class TestJob extends AbstractWicketTester {
@Autowired
private CleanupJob cleanJob;
@Mock
private MailHandler mailHandler;
@Autowired
@InjectMocks
private ReminderJob reminderJob;
@Test
void testNotInited() {
try {
setInitComplete(false);
cleanJob.cleanExpiredRecordings();
cleanJob.cleanExpiredResetHash();
cleanJob.cleanSessions();
cleanJob.cleanTestSetup();
reminderJob.loadRss();
reminderJob.remindExpiringRecordings();
reminderJob.remindMeetings();
reminderJob.notifyNewGroupUsers();
assertTrue(true, "All methods are executed, no exception");
} finally {
setInitComplete(true);
}
}
private void testRss(boolean enabled, Runnable r) {
boolean prevRss = cfgDao.getBool(CONFIG_DASHBOARD_SHOW_RSS, false);
Configuration cfg = cfgDao.get(CONFIG_DASHBOARD_SHOW_RSS);
try {
cfg.setValueB(enabled);
cfgDao.update(cfg, null);
r.run();
} finally {
cfg.setValueB(prevRss);
cfgDao.update(cfg, null);
}
}
@Test
void testRssDisabled() {
testRss(false, () -> reminderJob.loadRss());
}
@Test
void testRssEnabled() {
testRss(true, () -> reminderJob.loadRss());
}
@Test
void testNotifyNewGroupUsers() throws Exception {
Group g = new Group();
g.setName("NotifyNewGroupUsers");
g.setNotifyInterval(1);
groupDao.update(g, null);
User ga = getUser();
ga.setGroupUsers(List.of(new GroupUser(g, ga)));
ga.getGroupUsers().get(0).setModerator(true);
userDao.update(ga, null);
User u = getUser();
u.setGroupUsers(List.of(new GroupUser(g, u)));
userDao.update(u, null);
// to ensure test will run through all branches
reminderJob.groupNotifications.clear();
reminderJob.notifyNewGroupUsers(); // will set initial checkTime
assertNotNull(reminderJob.groupNotifications.get(g.getId()));
// will check "too-early" branch
reminderJob.notifyNewGroupUsers();
verify(mailHandler, times(0)).send(anyString(), anyString(), anyString());
// will check mail send
reminderJob.groupNotifications.put(g.getId(), LocalDateTime.now().minusHours(1).minusMinutes(1));
doAnswer(new Answer<Void>() {
@Override
public Void answer(InvocationOnMock invocation) throws Throwable {
return null;
}
}).when(mailHandler).send(anyString(), anyString(), anyString());
reminderJob.notifyNewGroupUsers();
verify(mailHandler, times(1)).send(anyString(), anyString(), anyString());
// will check no new users
reminderJob.groupNotifications.put(g.getId(), LocalDateTime.now().minusHours(1).minusMinutes(1));
Date newInserted = Date.from(LocalDateTime.now().minusHours(2).atZone(ZoneId.systemDefault()).toInstant());
ga.getGroupUsers().get(0).setInserted(newInserted);
userDao.update(ga, null);
u.getGroupUsers().get(0).setInserted(newInserted);
userDao.update(u, null);
reminderJob.notifyNewGroupUsers();
verify(mailHandler, times(1)).send(anyString(), anyString(), anyString());
}
}
|
[
"solomax666@gmail.com"
] |
solomax666@gmail.com
|
1530dac186cb0366a9032929c3269364fced54bf
|
96e13dd386491e9cc444170c705577b35a487859
|
/tidb/src/main/java/com/jdcloud/sdk/service/tidb/model/VerifyFilefromOSSResult.java
|
56890450b7331ee513b1162d61a8f40e6641d549
|
[
"Apache-2.0"
] |
permissive
|
shijunLee/jdcloud-sdk-java
|
125cdea82e84687dab4e2770612908c9a2af4a71
|
08be41292da36d0604013d34d6704ae13076006a
|
refs/heads/master
| 2022-11-30T10:07:17.436266
| 2022-11-11T13:44:59
| 2022-11-11T13:44:59
| 137,592,050
| 0
| 1
| null | 2018-06-16T15:51:03
| 2018-06-16T15:51:03
| null |
UTF-8
|
Java
| false
| false
| 2,498
|
java
|
/*
* Copyright 2018 JDCLOUD.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.
*
* Data-Migration
* 数据迁移管理相关接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.tidb.model;
import com.jdcloud.sdk.service.JdcloudResult;
/**
* 校验需要导入的备份文件在OSS上是否存在,需要的读取权限是否具备
*/
public class VerifyFilefromOSSResult extends JdcloudResult implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* true:成功false:失败,文件不存在,类型不对或需要的权限不正确
*/
private String success;
/**
* 具体的错误信息
*/
private String errMsg;
/**
* get true:成功false:失败,文件不存在,类型不对或需要的权限不正确
*
* @return
*/
public String getSuccess() {
return success;
}
/**
* set true:成功false:失败,文件不存在,类型不对或需要的权限不正确
*
* @param success
*/
public void setSuccess(String success) {
this.success = success;
}
/**
* get 具体的错误信息
*
* @return
*/
public String getErrMsg() {
return errMsg;
}
/**
* set 具体的错误信息
*
* @param errMsg
*/
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
/**
* set true:成功false:失败,文件不存在,类型不对或需要的权限不正确
*
* @param success
*/
public VerifyFilefromOSSResult success(String success) {
this.success = success;
return this;
}
/**
* set 具体的错误信息
*
* @param errMsg
*/
public VerifyFilefromOSSResult errMsg(String errMsg) {
this.errMsg = errMsg;
return this;
}
}
|
[
"jdcloud-api@jd.com"
] |
jdcloud-api@jd.com
|
1950f263ca2723d8715440508765506b282dc364
|
0a0cbe30a545ab35e2e0bf30f017cca02b222e20
|
/src/main/java/com/bishe/bbs/controller/RetrieveController.java
|
4828e8f927ca93ae8127aa8a935a94fd9636a3e1
|
[] |
no_license
|
1579106394/ghl_bbs
|
2caf25c24a06580e634cad206aea05fb7f2ce995
|
47acaecfa6bf0b5fd0bc65814038af3a39486384
|
refs/heads/master
| 2022-12-27T03:09:33.118962
| 2020-01-20T12:39:36
| 2020-01-20T12:39:36
| 235,098,414
| 0
| 0
| null | 2022-12-16T09:44:20
| 2020-01-20T12:39:24
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,350
|
java
|
package com.bishe.bbs.controller;
import com.bishe.bbs.pojo.User;
import com.bishe.bbs.pojo.UserWithBLOBs;
import com.bishe.bbs.service.UserService;
import com.bishe.bbs.utils.MailUtils;
import com.bishe.bbs.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.mail.MessagingException;
import javax.mail.internet.AddressException;
@Controller
public class RetrieveController {
@Autowired
private UserService userService;
//发送验证码
@RequestMapping("/getCode.action")
@ResponseBody
public Integer retrieve(@RequestBody User user) throws AddressException, MessagingException {
UserVo vo;
try {
vo = userService.getUserByUsernameOrMobile(user);
} catch (Exception e) {
//用户名不存在
return 1;
}
try {
Integer code = (int) (Math.random() * 9000 + 1000);
String emailMsg = "您正在尝试找回账号为" + vo.getUsername() + "的密码,验证码为" + code + ",如非本人操作,请无视本邮件<br/><b color='red'>井冈山大学软件协会,致力于打造井大最强IT协会</b>";
MailUtils.sendMail(code, vo.getEmail(), emailMsg);
return code;
} catch (Exception e) {
//邮箱没注册
return 0;
}
}
@RequestMapping("/zhaohui.html")
public String zhaohui(UserWithBLOBs user, Model model) throws AddressException, MessagingException {
try {
UserVo vo = userService.getUserByUsernameOrMobile(user);
vo.setPassword("123456");
userService.updateBase(vo);
//修改成功
model.addAttribute("zhaohui", "找回成功!密码重置为123456,请及时登录修改密码");
return "login";
} catch (Exception e) {
//修改失败
model.addAttribute("zhaohui", "找回失败!请重新获取验证码,或者联系软协管理人员协助修改密码");
return "zhaohui";
}
}
}
|
[
"1579106394@qq.com"
] |
1579106394@qq.com
|
b94c9cdccef5b25729601750f529587337b4eb63
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/37/org/apache/commons/lang3/ArrayUtils_lastIndexOf_1462.java
|
0763e0fbeb8b5f7f614cccd24909b96561fe51d5
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 5,252
|
java
|
org apach common lang3
oper arrai primit arrai code code
primit wrapper arrai code integ code
handl code code input gracefulli
except thrown code code
arrai input object arrai code code
element except method document behaviour
author apach softwar foundat
author moritz petersen
author href mailto fredrik westermarck fredrik westermarck
author nikolai metchev
author matthew hawthorn
author tim brien o'brien
author pete gieser
author gari gregori
author href mailto equinus100 hotmail ashwin
author maarten coen
version
arrai util arrayutil
find index arrai
method return link index found code code code code input arrai
param arrai arrai traver backword object code code
param find valuetofind object find
index arrai
link index found code code found code code arrai input
index lastindexof arrai find valuetofind
index lastindexof arrai find valuetofind integ max
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
82e668c40db46fd7a2efcf0b6dc616bd0b83d223
|
b6bd876d9fab31bfab3b799f4e9d19549e97fc49
|
/1.10/src/main/java/com/mrcrayfish/furniture/render/tileentity/DoorMatRenderer.java
|
9c35f3483b119d25f1c53effc74483180d312173
|
[] |
no_license
|
bloodmc/MrCrayfishFurnitureMod
|
a9a7ff975b01cab3d4d8b47dac0d06ca3fdec3f7
|
d3f4b7ca154eaba883f7b85c7bd3d7028c81e566
|
refs/heads/master
| 2021-01-16T22:24:46.754736
| 2016-08-19T12:27:37
| 2016-08-25T03:38:16
| 55,027,473
| 1
| 1
| null | 2016-03-30T02:54:20
| 2016-03-30T02:54:20
| null |
UTF-8
|
Java
| false
| false
| 2,615
|
java
|
package com.mrcrayfish.furniture.render.tileentity;
import java.awt.Color;
import java.util.List;
import com.mrcrayfish.furniture.blocks.BlockDoorMat;
import com.mrcrayfish.furniture.tileentity.TileEntityDoorMat;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
public class DoorMatRenderer extends TileEntitySpecialRenderer<TileEntityDoorMat>
{
@Override
public void renderTileEntityAt(TileEntityDoorMat doorMat, double x, double y, double z, float partialTicks, int destroyStage)
{
if (doorMat.getMessage() != null)
{
IBlockState state = getWorld().getBlockState(doorMat.getPos());
if (state.getBlock() instanceof BlockDoorMat)
{
int rotation = state.getValue(BlockDoorMat.FACING).getHorizontalIndex();
GlStateManager.pushMatrix();
{
GlStateManager.translate(x, y, z);
GlStateManager.translate(0.5, 0.0626F, 0.5);
GlStateManager.rotate(-90F * rotation, 0, 1, 0);
GlStateManager.rotate(180F, 0, 1, 0);
GlStateManager.rotate(-90F, 1, 0, 0);
GlStateManager.translate(-0.375, 0, 0);
GlStateManager.scale(1, -1, -1);
GlStateManager.scale(0.015625F, 0.015625F, 0.015625F);
int lines = getFontRenderer().listFormattedStringToWidth(doorMat.getMessage(), 50).size();
GlStateManager.translate(0, -(lines * getFontRenderer().FONT_HEIGHT - 1) / 2, 0);
GlStateManager.enableAlpha();
GlStateManager.disableLighting();
drawSplitString(getFontRenderer(), doorMat.getMessage(), 0, 0, 50, Color.white.getRGB());
GlStateManager.enableLighting();
GlStateManager.disableAlpha();
}
GlStateManager.popMatrix();
}
}
}
public void drawSplitString(FontRenderer renderer, String str, int x, int y, int wrapWidth, int textColor)
{
str = this.trimStringNewline(str);
this.renderSplitStringCentered(renderer, str, x, y, wrapWidth, textColor);
}
private void renderSplitStringCentered(FontRenderer renderer, String str, int x, int y, int wrapWidth, int textColor)
{
List<String> lines = renderer.listFormattedStringToWidth(str, wrapWidth);
for (int i = 0; i < lines.size() && i < 4; i++)
{
String line = lines.get(i);
x = (wrapWidth + -renderer.getStringWidth(line)) / 2;
renderer.drawString(line, x, y, textColor);
y += renderer.FONT_HEIGHT;
}
}
private String trimStringNewline(String text)
{
while (text != null && text.endsWith("\n"))
{
text = text.substring(0, text.length() - 1);
}
return text;
}
}
|
[
"mrcrayfish@hotmail.com"
] |
mrcrayfish@hotmail.com
|
2c209a55ae51f55fb9f06fb5c4119f422e483168
|
4c9a817eeeda79eef7f04bda450c919a030b2fc4
|
/exercises/src/general/NewPerson.java
|
fde8816688ca229841345c3a3cfc64882ad703b7
|
[] |
no_license
|
tbhaumik/PiJ
|
6fe64966916aa92d00a3f5ba2cc863976a87dd19
|
fb0effbead9ad1f2b28856ff32828e9a42edd857
|
refs/heads/master
| 2016-09-06T15:34:43.971110
| 2013-03-13T12:46:39
| 2013-03-13T12:46:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 696
|
java
|
package general;
public class NewPerson implements Comparable<NewPerson> {
private String firstName;
private String lastName;
public NewPerson(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String toString() {
return "Name: " + firstName + " " + lastName;
}
public int compareTo(NewPerson person) {
String pname1 = lastName + firstName;
String pname2 = person.lastName + person.firstName;
return pname1.compareTo(pname2);
}
}
|
[
"keith@dcs.bbk.ac.uk"
] |
keith@dcs.bbk.ac.uk
|
1106c3f913ece8a893f5f0dce717dc3e325d20db
|
f2e9603b216e21d34f25d8f2ff38e092dc6cbcdf
|
/4.IoC/src/main/java/com/denglitong/reflect/Car.java
|
3cc20002243f02852ddf65e54f5546aa4d0724c1
|
[] |
no_license
|
denglitong/proficient_in_4x_spring
|
2da474277ca9bc7d4ea744249a3d57007b52bfa6
|
d37eaac9db1fa3d167692bd9828f84ee379947f2
|
refs/heads/master
| 2023-06-16T07:09:12.860008
| 2021-07-11T09:02:01
| 2021-07-11T09:02:01
| 372,717,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,092
|
java
|
package com.denglitong.reflect;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.*;
/**
* 实现 Bean 生命周期管理接口的 Car
*
* @author litong.deng@foxmail.com
* @date 2021/6/2
*/
public class Car implements BeanFactoryAware, BeanNameAware,
InitializingBean, DisposableBean {
private String brand;
private String color;
private Integer maxSpeed;
private BeanFactory beanFactory;
private String beanName;
public Car() {
System.out.println("调用 Car() 构造函数。");
}
public Car(String brand, String color, Integer maxSpeed) {
this.brand = brand;
this.color = color;
this.maxSpeed = maxSpeed;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
System.out.println("调用 BeanFactoryAware.setBeanFactory().");
this.beanFactory = beanFactory;
}
@Override
public void setBeanName(String beanName) {
System.out.println("调用 BeanNameAware.setBeanName().");
this.beanName = beanName;
}
@Override
public void afterPropertiesSet() throws Exception {
System.out.println("调用 InitializingBean.afterPropertiesSet().");
}
@Override
public void destroy() throws Exception {
System.out.println("调用 DisposableBean.destroy().");
}
// 通过 <bean> 的 init-method 属性指定的初始化方法
public void myInit() {
System.out.println("调用 init-method 所指定的 myInit(),将 maxSpeed 设置为 240.");
this.maxSpeed = 240;
}
// 通过 <bean> 的 destroy-method 属性指定的销毁方法
public void myDestroy() {
System.out.println("调用 destroy-method 所指定的 myDestroy().");
}
public void introduce() {
System.out.println("brand:" + brand + ";color:" + color + ";maxSpeed:" + maxSpeed);
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public Integer getMaxSpeed() {
return maxSpeed;
}
public void setMaxSpeed(Integer maxSpeed) {
this.maxSpeed = maxSpeed;
}
public BeanFactory getBeanFactory() {
return beanFactory;
}
public String getBeanName() {
return beanName;
}
@Override
public String toString() {
return "Car{" +
"brand='" + brand + '\'' +
", color='" + color + '\'' +
", maxSpeed=" + maxSpeed +
", beanFactory=" + beanFactory +
", beanName='" + beanName + '\'' +
'}';
}
public static void main(String[] args) {
Car car = new Car();
car.setBrand("红旗 CA72");
System.out.println(car);
car = new Car("红旗 CA72", "黑色", 240);
System.out.println(car);
}
}
|
[
"litong.deng@foxmail.com"
] |
litong.deng@foxmail.com
|
1908c3dd3f8206dcec10c96b696a6e9561c9f7b7
|
7def034cd5b44fd053d7749569cbd7961bbe1552
|
/shared/src/main/java/fr/persistence/copy/JpaConfiguration.java
|
85d8291b6ddab062a71e92a2da6bb81f80295402
|
[] |
no_license
|
speralta/hibernate4-eventcache
|
c2fb1b81a2d662591b00efefac9ec62f495248f3
|
a902f34dec2d4414ac0724911bc348c96651c826
|
refs/heads/master
| 2021-01-01T18:02:32.576425
| 2014-01-29T23:33:04
| 2014-01-29T23:33:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,190
|
java
|
/*
* (c) Copyright 2005-2013 JAXIO, http://www.jaxio.com
* Source code generated by Celerio, a Jaxio product
* Want to purchase Celerio ? email us at info@jaxio.com
* Follow us on twitter: @springfuse
* Documentation: http://www.jaxio.com/documentation/celerio/
* Template pack-bdf-backend-jpa2:src/main/java/configuration/JpaConfiguration.p.vm.java
*/
package fr.persistence.copy;
import java.util.Properties;
import javax.inject.Inject;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableTransactionManagement
public class JpaConfiguration {
@Inject
private Properties jpaProperties;
@Bean
public DataSource dataSource() {
return new EmbeddedDatabaseBuilder().addDefaultScripts().setType(EmbeddedDatabaseType.H2).build();
}
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
return new PersistenceExceptionTranslationPostProcessor();
}
@Bean
public JpaTransactionManager transactionManager() {
return new JpaTransactionManager();
}
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory(JpaVendorAdapter jpaVendorAdapter, DataSource dataSource) {
LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
emf.setDataSource(dataSource);
emf.setPersistenceXmlLocation("classpath:META-INF/persistence.xml");
emf.setPersistenceUnitName("PU");
emf.setJpaVendorAdapter(jpaVendorAdapter);
emf.setJpaProperties(jpaProperties);
return emf;
}
}
|
[
"sebastien@peralta.fr"
] |
sebastien@peralta.fr
|
a5476bb4e5d0a760f3773cd8add61e4c8f1fd91e
|
1924afaf1909a7b91c3500591764c22392ec10b3
|
/app/src/main/java/com/kinder/menu/viewsxml/Parent_TitleBarXml.java
|
cdf3ef55e17b13e7e436af00e8f7dd04ca41f994
|
[] |
no_license
|
guoyang123/kindergarten
|
5608c85dfa5deb93d00d7ed9ef59391d0f0cc95d
|
c179b237bb39422ba7c0c98e96ce6fb44c7e96a7
|
refs/heads/master
| 2021-07-15T22:52:44.305282
| 2016-11-11T00:19:00
| 2016-11-11T00:19:00
| 54,606,031
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,250
|
java
|
package com.kinder.menu.viewsxml;
import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
import cn.com.iucd.iucdframe.utils.DensityUtil;
import com.myt360.app.customviews.MyRelativeLayout;
public class Parent_TitleBarXml extends MyRelativeLayout {
//左侧按钮
public Button leftBtn;
//中间文本
public TextView centerTextView;
//右侧按钮
public Button rightBtn;
public Parent_TitleBarXml(Context context, float pro, float screenW,
float screenH)
{
super(context, pro, screenW, screenH);
// TODO Auto-generated constructor stub
RelativeLayout wrap=productRelativeLayout(context, pro, 571,
LayoutParams.MATCH_PARENT, 44,
0, 0, 0, 0,
0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0, this);
wrap.setBackgroundColor(Color.parseColor("#6ccfa9"));
leftBtn=new Button(context);
leftBtn.setId(10008);
LayoutParams leftBtn_params=new LayoutParams((int)(DensityUtil.dip2px(context,44) * pro),(int)(DensityUtil.dip2px(context,44) * pro));
leftBtn.setLayoutParams(leftBtn_params);
leftBtn.setBackgroundResource(R.getRCode("drawable", "home_slide_selector"));
wrap.addView(leftBtn);
centerTextView=new TextView(context);
centerTextView.setId(10009);
LayoutParams centerTextView_params=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
centerTextView_params.addRule(RelativeLayout.CENTER_IN_PARENT);
centerTextView.setLayoutParams(centerTextView_params);
centerTextView.setText("幼儿园");
centerTextView.setTextSize((int)19*pro);
centerTextView.setTextColor(Color.parseColor("#ffffff"));
wrap.addView(centerTextView);
rightBtn=new Button(context);
rightBtn.setId(10010);
LayoutParams rightBtn_params=new LayoutParams((int)(DensityUtil.dip2px(context,44) * pro),(int)(DensityUtil.dip2px(context,44) * pro));
rightBtn_params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
rightBtn.setLayoutParams(rightBtn_params);
rightBtn.setBackgroundResource(R.getRCode("drawable", "home_search_selector"));
wrap.addView(rightBtn);
}
}
|
[
"3137772593@qq.com"
] |
3137772593@qq.com
|
7088fafe7abb8fea8ab41274d0504da7a0642943
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_a3d556af714cb90e1db1d70f3f1af2013847d60d/Tech42013/9_a3d556af714cb90e1db1d70f3f1af2013847d60d_Tech42013_s.java
|
ac1f8e5f87293a5b4b045d652547f4c0a32ffdcb
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,607
|
java
|
package tech4;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.SessionScope;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
/**
*
*/
@Component
public class Tech42013 {
static int counter = 0;
public static LinkedList<String> kommentare = new LinkedList<String>();
public synchronized int getCounter() {
Tech42013.counter = Tech42013.counter + 1;
return Tech42013.counter;
}
public void updateList(String komm) {
if (komm != null && !komm.equals("")) {
kommentare.add(0,komm);
if (kommentare.size() > 10) {
kommentare.removeLast();
}
kommentar = null;
}
}
public synchronized void save() {
HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
String txtProperty = request.getParameter("form:text");
updateList(txtProperty);
}
public List<String> getKommentare() {
return (List<String>) kommentare;
}
private String kommentar = "";
public synchronized String getKommentar() {
return kommentar;
}
public void setKommentar(String kommentar) {
this.kommentar = kommentar;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d858fce4cc1c32764cb5e0df024e48d950c5cfee
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/gp_JADX/android/support/p027e/ai.java
|
887a16e9be5faf0d7629fc8506102443e285dc9c
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 342
|
java
|
package android.support.p027e;
import android.animation.PropertyValuesHolder;
import android.graphics.Path;
import android.util.Property;
final class ai implements aj {
ai() {
}
public final PropertyValuesHolder mo198a(Property property, Path path) {
return PropertyValuesHolder.ofObject(property, null, path);
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
649a9890478c6afcf4f1a4e0c8f363f0f755614a
|
e42c98daf48cb6b70e3dbd5f5af3517d901a06ab
|
/modules/uctool-manager/src/main/java/com/cisco/axl/api/_10/GetResourcePriorityNamespaceRes.java
|
55dd98bd3400dec6506813c3a35d23a4b0311b91
|
[] |
no_license
|
mgnext/UCTOOL
|
c238d8f295e689a8babcc1156eb0b487cba31da0
|
5e7aeb422a33b3cf33fca0231616ac0416d02f1a
|
refs/heads/master
| 2020-06-03T04:07:57.650216
| 2015-08-07T10:44:04
| 2015-08-07T10:44:04
| 39,693,900
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,742
|
java
|
package com.cisco.axl.api._10;
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 GetResourcePriorityNamespaceRes complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="GetResourcePriorityNamespaceRes">
* <complexContent>
* <extension base="{http://www.cisco.com/AXL/API/10.5}APIResponse">
* <sequence>
* <element name="return">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="resourcePriorityNamespace" type="{http://www.cisco.com/AXL/API/10.5}RResourcePriorityNamespace"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GetResourcePriorityNamespaceRes", propOrder = {
"_return"
})
public class GetResourcePriorityNamespaceRes
extends APIResponse
{
@XmlElement(name = "return", required = true)
protected GetResourcePriorityNamespaceRes.Return _return;
/**
* Gets the value of the return property.
*
* @return
* possible object is
* {@link GetResourcePriorityNamespaceRes.Return }
*
*/
public GetResourcePriorityNamespaceRes.Return getReturn() {
return _return;
}
/**
* Sets the value of the return property.
*
* @param value
* allowed object is
* {@link GetResourcePriorityNamespaceRes.Return }
*
*/
public void setReturn(GetResourcePriorityNamespaceRes.Return value) {
this._return = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="resourcePriorityNamespace" type="{http://www.cisco.com/AXL/API/10.5}RResourcePriorityNamespace"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"resourcePriorityNamespace"
})
public static class Return {
@XmlElement(required = true)
protected RResourcePriorityNamespace resourcePriorityNamespace;
/**
* Gets the value of the resourcePriorityNamespace property.
*
* @return
* possible object is
* {@link RResourcePriorityNamespace }
*
*/
public RResourcePriorityNamespace getResourcePriorityNamespace() {
return resourcePriorityNamespace;
}
/**
* Sets the value of the resourcePriorityNamespace property.
*
* @param value
* allowed object is
* {@link RResourcePriorityNamespace }
*
*/
public void setResourcePriorityNamespace(RResourcePriorityNamespace value) {
this.resourcePriorityNamespace = value;
}
}
}
|
[
"agentmilindu@gmail.com"
] |
agentmilindu@gmail.com
|
b8af32776078cebbe6a94afe6abfb4fcdc99290b
|
aa931ca9e4d607d709119bb288cc0cba6032b568
|
/src/main/java/com/kobylynskyi/graphql/codegen/extension/GrowingIOConfig.java
|
f33ebaadefd7cddf3277f90871f0cede7dbbcffc
|
[
"MIT"
] |
permissive
|
growingio/graphql-java-codegen
|
6f881dfc5955da1875b9e9b54a3012f1c0879156
|
0320174c087d7e02db15bbf34f822fbbc0b6d498
|
refs/heads/master
| 2023-02-09T07:17:16.922598
| 2020-12-23T07:48:26
| 2020-12-23T08:30:41
| 305,938,345
| 1
| 1
|
MIT
| 2020-12-23T02:59:47
| 2020-10-21T07:09:52
|
Java
|
UTF-8
|
Java
| false
| false
| 1,405
|
java
|
package com.kobylynskyi.graphql.codegen.extension;
import java.util.Map;
/**
* @author liguobin@growingio.com
* @version 1.0, 2020/10/22
*/
public class GrowingIOConfig {
private Integer responseProjectionMaxDepth = 3;
private String graphQLServerHost;
private Map<String, String> headers;
public GrowingIOConfig(String graphQLServerHost) {
this.graphQLServerHost = graphQLServerHost;
}
public GrowingIOConfig(String graphQLServerHost, Map<String, String> headers) {
this.graphQLServerHost = graphQLServerHost;
this.headers = headers;
}
public GrowingIOConfig(String graphQLServerHost, Integer responseProjectionMaxDepth) {
this.responseProjectionMaxDepth = responseProjectionMaxDepth;
this.graphQLServerHost = graphQLServerHost;
}
public GrowingIOConfig(String graphQLServerHost, Integer responseProjectionMaxDepth, Map<String, String> headers) {
this.responseProjectionMaxDepth = responseProjectionMaxDepth;
this.graphQLServerHost = graphQLServerHost;
this.headers = headers;
}
private GrowingIOConfig() {
}
public Integer getResponseProjectionMaxDepth() {
return responseProjectionMaxDepth;
}
public String getGraphQLServerHost() {
return graphQLServerHost;
}
public Map<String, String> getHeaders() {
return headers;
}
}
|
[
"dreamylost@outlook.com"
] |
dreamylost@outlook.com
|
94c3e1485e72ce1276a0b5bd16e0cb3a266dea65
|
0816917e627add3cfa3776a3f67373fb7922c484
|
/water-crawler/src/main/java/edu/cug/water/crawler/config/MybatisPlusConfig.java
|
d59c3b9196e300b6d2a8c2a98fed8a908ead6462
|
[] |
no_license
|
Honyelchak/water
|
b0c28444584e6ad3a6c70c15aee5ccf5addf4c67
|
16915fa2fff8a2129fb5cbddbe725d514e39e734
|
refs/heads/master
| 2023-07-09T18:40:49.192731
| 2021-08-18T05:26:12
| 2021-08-18T05:26:12
| 395,613,497
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 638
|
java
|
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有,侵权必究!
*/
package edu.cug.water.crawler.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* mybatis-plus配置
*
* @author Mark sunlightcs@gmail.com
*/
@Configuration
public class MybatisPlusConfig {
/**
* 分页插件
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}
|
[
"554417388@qq.com"
] |
554417388@qq.com
|
06d541513b47432dd9619a5499f4cc97fffa7a69
|
6096137ff060ff0e9cba8730b1bbcf473c54b65d
|
/JAVA-MMU/MMU-server/project/src/project/com/hit/algo/MRUAlgoCacheImpl.java
|
d42a6e87b63a87c44f0a85c1c211003f58e79ebf
|
[] |
no_license
|
brachapokroy/JAVA-MMU
|
d5391c49e63ed288968d9a280753a5116ba66f90
|
205c86473574f9d2f6359c27f334edee6c85aca4
|
refs/heads/master
| 2023-08-25T17:57:41.304943
| 2021-09-30T14:01:54
| 2021-09-30T14:01:54
| 399,223,432
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,701
|
java
|
package project.com.hit.algo;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
//an algo//holds a map counter to count the activity of each value cache that flushes the memory that has been used the most in use because now it's the least likely to be used
public class MRUAlgoCacheImpl <k,v> extends AbstractAlgorithm <k,v>{
// holds a map counter to count the activity of each value
Map<k ,Integer> counter;
//constructor
public MRUAlgoCacheImpl(int capacity) {
super(capacity);
this.counter = new HashMap<>();
}
//d constructor
public MRUAlgoCacheImpl(){
}
//Returns the element by key
@Override
public v getElement(k key) {
if (getpagetabelelement().containsKey(key)) {
counter.put(key, (counter.get(key).intValue())+1);
return getpagetabelelement().get(key);
}
return null;
}
//Inserts a new element by key and value
@Override
public v putElement(k key, v value) {
if (getpagetabelelement().containsKey(key)){
return null;
}
if (getCapacity()>getpagetabelelement().size()){
getpagetabelelement().put(key,value);
counter.put(key,0);
return null;
}
k maximum = Collections.max(counter.entrySet(), (entry1, entry2) -> entry1.getValue() - entry2.getValue()).getKey();
counter.put(maximum,0);
counter.remove(maximum);
return getpagetabelelement().remove(maximum);
}
//Deletes an element
@Override
public void deleteElement(k key) {
getpagetabelelement().remove(key);
counter.remove(key);
}
}
|
[
"you@example.com"
] |
you@example.com
|
c4056ecb6b6f9ec42020f3625abeb00ec5b36702
|
8055b532077b515c13920180e901b7c4e51eefab
|
/HelloJava/src/cn/ucai/day12/TestStringBuilder.java
|
c83bc2801a8d1d8f9a732333db720bd15f30db02
|
[] |
no_license
|
MyCloudream/java1017
|
1950629c3ea0079b126272d9b25d54870b79cafd
|
b111df2547e76d7aff8f91ec8ee74de0dc208d76
|
refs/heads/master
| 2021-01-12T06:31:47.897270
| 2016-12-26T09:52:48
| 2016-12-26T09:52:48
| 77,374,635
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,635
|
java
|
package cn.ucai.day12;
/**
* 针对大规模的String的拼接,使用StringBuilder或者StringBuffer
*
* StringBuilder StringBuffer
* 区别:
* 1、StringBuilder从1.5开始,StringBuffer从1.0开始
* 2、StringBuilder不支持多线程(线程不安全) StringBuffer线程安全(支持多线程)
* 3、StringBuilder效率高,StringBuffer效率低
*
* ArrayList Vector
* Hashtable HashMap
*
* 我们平时常用的,就是效率高的。
*
* String、StringBuilder和StringBuffer的联系:
* 都是CharSequence接口的实现类
*/
public class TestStringBuilder {
public static void main(String[] args) {
String s1 = "zhangsan";
String s2 = "123456";
String s3 = "18911011001";
String s4 = "zhangsan@ucai.cn";
String s5 = "87Fak8";
String s6 = "#";
// "zhangsan#" "zhangsan#123456" "zhangsan#123456#"
String str = s1+s6+s2+s6+s3+s6+s4+s6+s5;
System.out.println(str);
// 1、字符数组如何存不定长度的内容? 数组的扩容
// 2、
/*StringBuilder builder = new StringBuilder();
builder.append(s1).append(s6).append(s2).append(s6)
.append(s3).append(s6).append(s4).append(s6).append(s5);
String strResult = builder.toString();
System.out.println(builder);
System.out.println(builder.toString());
System.out.println(strResult);*/
StringBuffer buffer = new StringBuffer();
buffer.append(s1).append(s6).append(s2).append(s6)
.append(s3).append(s6).append(s4).append(s6).append(s5);
String strResult2 = buffer.toString();
System.out.println(buffer);
System.out.println(buffer.toString());
System.out.println(strResult2);
}
}
|
[
"chenjun_work@163.com"
] |
chenjun_work@163.com
|
68461cf0b1fc2a84ce725656f41c5c95473288c0
|
8645c69457deede66267c99cc7b6abde29a73531
|
/data-center-server/src/main/java/com/dryork/config/mulds/MulDsContext.java
|
ce3cd5294c96d98d1297e3e24efa68825c7c41df
|
[] |
no_license
|
jsen-joker/DC
|
139d0545eabee8fb39fbd3a8549eea740a630103
|
a15bfc82f4ab456971332b87acd981a85455576e
|
refs/heads/master
| 2020-04-08T23:01:45.330193
| 2018-11-30T10:40:54
| 2018-11-30T10:40:54
| 159,808,531
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,536
|
java
|
package com.dryork.config.mulds;
import com.google.common.collect.Maps;
import javax.sql.DataSource;
import java.util.Map;
/**
* <p>
* </p>
*
* @author jsen
* @since 19/11/2018
*/
public class MulDsContext {
/**
* 保存app的ds
*/
private static final Map<String, DataSource> dsPool = Maps.newHashMap();
/**
* 保存配置的默认数据源
* sys 和 dc
*/
private static final Map<String, DataSource> stPool = Maps.newHashMap();
// public static void addDS(String key, DataSource dataSource) {
// dsPool.put(key, dataSource);
// }
public static void addDsSt(String key, DataSource dataSource) {
stPool.put(key, dataSource);
}
// public static void remove(String key) {
// dsPool.remove(key);
// }
public static DataSource get(String key) {
return dsPool.getOrDefault(key, stPool.getOrDefault(key, stPool.get("default")));
}
// public static void clear() {
// dsPool.clear();
// }
// public static void createDatasource(DcApp dcApp) {
// DataSource dataSource = DataSourceBuilder.create().type(com.alibaba.druid.pool.DruidDataSource.class)
// .driverClassName("com.mysql.jdbc.Driver")
// .type(com.zaxxer.hikari.HikariDataSource.class)
// .username(dcApp.getUsername().trim())
// .password(dcApp.getPassword().trim())
// .url(dcApp.getDs()).build();
//
// MulDsContext.addDS(dcApp.getAppName(), dataSource);
// }
}
|
[
"jsen1922279340@163.com"
] |
jsen1922279340@163.com
|
bc55a21e9e680ba85601393a25a1b2cf85b48d06
|
313cac74fe44fa4a08c50b2f251e4167f637c049
|
/retail-fas-1.1.2/retail-fas/retail-fas-service/src/main/java/cn/wonhigh/retail/fas/service/BillShopBalanceProSumServiceImpl.java
|
bca9e31be6159c2a0c81130c46fe3448de598657
|
[] |
no_license
|
gavin2lee/spring-projects
|
a1d6d495f4a027b5896e39f0de2765aaadc8a9de
|
6e4a035ae3c9045e880a98e373dd67c8c81bfd36
|
refs/heads/master
| 2020-04-17T04:52:41.492652
| 2016-09-29T16:07:40
| 2016-09-29T16:07:40
| 66,710,003
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,510
|
java
|
package cn.wonhigh.retail.fas.service;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cn.wonhigh.retail.fas.common.model.BillShopBalanceProSum;
import cn.wonhigh.retail.fas.dal.database.BillShopBalanceProSumMapper;
import com.yougou.logistics.base.common.exception.ServiceException;
import com.yougou.logistics.base.dal.database.BaseCrudMapper;
import com.yougou.logistics.base.service.BaseCrudServiceImpl;
/**
* 请写出类的用途
* @author chen.mj
* @date 2014-12-02 14:50:43
* @version 1.0.0
* @copyright (C) 2013 YouGou Information Technology Co.,Ltd
* All Rights Reserved.
*
* The software for the YouGou technology development, without the
* company's written consent, and any other individuals and
* organizations shall not be used, Copying, Modify or distribute
* the software.
*
*/
@Service("billShopBalanceProSumService")
class BillShopBalanceProSumServiceImpl extends BaseCrudServiceImpl implements BillShopBalanceProSumService {
@Resource
private BillShopBalanceProSumMapper billShopBalanceProSumMapper;
@Override
public BaseCrudMapper init() {
return billShopBalanceProSumMapper;
}
@Override
public List<BillShopBalanceProSum> getSumAmount(Map<String, Object> params)
throws ServiceException {
try {
return billShopBalanceProSumMapper.getSumAmount(params);
} catch(Exception e) {
throw new ServiceException(e.getMessage(), e);
}
}
}
|
[
"gavin2lee@163.com"
] |
gavin2lee@163.com
|
091a723bf10aa778471db624a2e716ef4b26656f
|
689cdf772da9f871beee7099ab21cd244005bfb2
|
/classes/com/android/dazhihui/d/bf.java
|
62bc9b9cb14b0be62c79223f0be9fded9fa29a37
|
[] |
no_license
|
waterwitness/dazhihui
|
9353fd5e22821cb5026921ce22d02ca53af381dc
|
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
|
refs/heads/master
| 2020-05-29T08:54:50.751842
| 2016-10-08T08:09:46
| 2016-10-08T08:09:46
| 70,314,359
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,071
|
java
|
package com.android.dazhihui.d;
import android.content.Context;
import android.content.res.Resources;
import com.android.dazhihui.DzhApplication;
import com.android.dazhihui.ui.model.stock.MarketManager;
import java.util.HashMap;
public class bf
{
private static boolean a = false;
private static HashMap<String, bg> b;
public static bg a()
{
if (!a) {
b();
}
return new bg(DzhApplication.a().getApplicationContext().getResources().getStringArray(2131361805), new boolean[] { 0, 1, 1, 0, 0, 1, 1, 0, 0 }, new int[] { 0, 4, 1, 0, 0, 2, 3, 0, 0 }, 1, 2);
}
public static bg a(String paramString)
{
if (!a) {
b();
}
bg localbg = (bg)b.get(paramString);
String str = paramString;
for (paramString = localbg;; paramString = (bg)b.get(str))
{
if ((paramString != null) || (MarketManager.get().getParent(str) == null) || (MarketManager.get().getParent(str).equals(str))) {
return paramString;
}
str = MarketManager.get().getParent(str);
}
}
private static void b()
{
Resources localResources = DzhApplication.a().getApplicationContext().getResources();
b = new HashMap();
bg localbg1 = new bg(localResources.getStringArray(2131361805), new boolean[9], new int[9], 1, 2);
b.put("全球市场", localbg1);
b.put("外汇", localbg1);
b.put("市场板块", localbg1);
b.put("上证期权", localbg1);
b.put("股指期权", localbg1);
b.put("全球指数", localbg1);
localbg1 = new bg(localResources.getStringArray(2131361799), new boolean[] { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1 }, new int[] { 0, 4, 1, 0, 0, 2, 3, 0, 0, 22, 25, 21, 20, 26, 23, 24 }, 33273, 2);
b.put("沪深市场", localbg1);
b.put("基础层", localbg1);
b.put("创新层", localbg1);
bg localbg2 = new bg(localResources.getStringArray(2131361799), new boolean[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 4, 1, 0, 0, 2, 3, 0, 0, 22, 25, 21, 20, 26, 23, 24 }, 33273, 2);
b.put("沪深指数", localbg2);
localbg2 = new bg(localResources.getStringArray(2131361805), new boolean[] { 0, 1, 1, 0, 0, 1, 1, 0, 0 }, new int[] { 0, 4, 1, 0, 0, 2, 3, 0, 0 }, 1, 2);
b.put("港股", localbg2);
b.put("美股", localbg2);
b.put("债券", localbg2);
b.put("常用商品", new bg(localResources.getStringArray(2131361824), new boolean[12], new int[12], 8697, 0));
b.put("分级B", new bg(new String[] { "名称", "最新", "涨幅%", "价格杠杆", "整体溢价%", "成交额", "场内份额", "跟踪指数", "指数涨幅%", "母基代码", "母基实时净值", "上折母基需涨%", "下折母基需跌%" }, new boolean[] { 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1 }, new int[] { 0, 1, 2, 8, 4, 3, 9, 0, 0, 0, 5, 6, 7 }, -100, 2));
b.put("分级A", new bg(new String[] { "名称", "最新", "涨幅%", "隐含收益%", "成交额", "场内份额", "约定收益%", "母基代码", "整体溢价%" }, new boolean[] { 0, 1, 1, 1, 1, 1, 1, 0, 1 }, new int[] { 0, 1, 2, 6, 3, 5, 7, 0, 4 }, -100, 2));
b.put("上市母基", new bg(new String[] { "名称", "最新", "涨幅%", "估算净值", "母基溢价%", "成交额", "跟踪指数", "指数涨幅%", "申购费%", "赎回费%" }, new boolean[] { 0, 1, 1, 1, 1, 1, 0, 1, 0, 0 }, new int[] { 0, 1, 2, 5, 4, 3, 0, 6, 0, 0 }, -100, 2));
b.put("基金", localbg1);
b.put("DDE决策", new bg(localResources.getStringArray(2131361804), new boolean[] { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, new int[] { 0, 10, 11, 12, 13, 14, 15, 16, 4, 1 }, 34944, 1));
b.put("个股资金最近1天", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 17, 0, 0, 0, 0, 0, 0, 0, 0 }, 38032, 1));
b.put("个股资金最近1周", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 18, 0, 0, 0, 0, 0, 0, 0, 0 }, 38032, 1));
b.put("个股资金最近1月", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 19, 0, 0, 0, 0, 0, 0, 0, 0 }, 38032, 1));
b.put("板块资金最近1天", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 17, 0, 0, 0, 0, 0, 0, 0, 0 }, 37904, 1));
b.put("板块资金最近1周", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 18, 0, 0, 0, 0, 0, 0, 0, 0 }, 37904, 1));
b.put("板块资金最近1月", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 19, 0, 0, 0, 0, 0, 0, 0, 0 }, 37904, 1));
b.put("板块详情最近1天", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 17, 0, 0, 0, 0, 0, 0, 0, 0 }, 37904, 1));
b.put("板块详情最近1周", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 18, 0, 0, 0, 0, 0, 0, 0, 0 }, 37904, 1));
b.put("板块详情最近1月", new bg(localResources.getStringArray(2131361903), new boolean[] { 0, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 19, 0, 0, 0, 0, 0, 0, 0, 0 }, 37904, 1));
b.put("5分钟涨幅", new bg(localResources.getStringArray(2131361812), new boolean[] { 0, 1, 1, 1 }, new int[] { 0, 4, 1, 25 }, 32928, 3));
b.put("阶段统计", new bg(localResources.getStringArray(2131361889), new boolean[] { 0, 1, 1, 1, 1, 1, 1 }, new int[] { 0, 5, 6, 7, 8, 4, 1 }, 33920, 1));
b.put("交易关注", new bg(localResources.getStringArray(2131361807), new boolean[4], new int[4], 33792, 0));
b.put("富时A50指数期货", new bg(localResources.getStringArray(2131361823), new boolean[] { 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 2, 1, 0, 5, 3, 4, 0, 0, 0, 0, 0, 0 }, 32816, 0));
a = true;
}
}
/* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\dazhihui\d\bf.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
825fecd400655cee776e89753f62bf913b6d2712
|
634ae05c5e190412b2c50a7b5317c3d331322bdf
|
/Sandbox/src/main/java/demo/base64/Base64Demo.java
|
c29743c0669f4c53a5788c72517227804b26c720
|
[] |
no_license
|
ganqzz/java_workspace
|
1b919aff1f177c5b6971e7f19f465129a247ed72
|
3a7285e9b1945c8b55a4b02bbb20aee3d31a9086
|
refs/heads/master
| 2023-07-16T06:03:36.310878
| 2021-09-04T03:44:37
| 2021-09-04T03:44:37
| 389,467,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 965
|
java
|
package demo.base64;
import java.util.Base64;
/**
* Java8~
*/
public class Base64Demo {
public static void main(String[] args) {
String[] testValues = {
"hoge:hoge",
"あいうえおかきくけこ",
"okoglngl:pwoetjpwetwenknlknldnlgjbo@wegtnwegnqihoqegnelknlqebflqwebgegbleetg4j9034t58knkrlgn",
"ABCDEFG",
};
for (String value : testValues) {
System.out.println(value);
// String => bytes => (base64 encoded bytes) => String(ISO_8859_1)
String encodedValue = Base64.getEncoder().encodeToString(value.getBytes());
System.out.println(encodedValue);
// String(ISO_8859_1) => (base64 encoded bytes) => bytes => String
String decodedValue = new String(Base64.getDecoder().decode(encodedValue));
System.out.println(decodedValue);
System.out.println("---");
}
}
}
|
[
"ganqzz@users.noreply.github.com"
] |
ganqzz@users.noreply.github.com
|
91caec56cb8f3328616ea6bdcb9b6d5494bb902e
|
a5fba1ba56a2fac1a258838021204a14cda3efbf
|
/Universal/src/main/java/com/acrylic/universal/entity/GiantEntityInstance.java
|
12165d01241c33a1ad5b96c7c3ccbccb78ded6e2
|
[
"MIT"
] |
permissive
|
Acrylic125/AcrylicMinecraftLib
|
e40af31c8d923598387285e3ab18715b8d0aaba5
|
3d4f95558c429df604320a71b4f08f53ffe0cf18
|
refs/heads/master
| 2023-04-22T02:51:55.145132
| 2021-04-09T05:31:12
| 2021-04-09T05:31:12
| 311,928,131
| 0
| 0
| null | 2020-11-11T13:17:50
| 2020-11-11T09:52:42
|
Java
|
UTF-8
|
Java
| false
| false
| 838
|
java
|
package com.acrylic.universal.entity;
import org.bukkit.entity.Giant;
import org.jetbrains.annotations.NotNull;
public interface GiantEntityInstance extends LivingEntityInstance {
@NotNull
@Override
Giant getBukkitEntity();
class Builder extends LivingEntityBuilder<Builder> {
private final GiantEntityInstance giantInstance;
public Builder(GiantEntityInstance giantInstance) {
this.giantInstance = giantInstance;
}
@Override
public Giant buildEntity() {
return giantInstance.getBukkitEntity();
}
@Override
public GiantEntityInstance buildEntityInstance() {
return giantInstance;
}
@Override
public GiantEntityInstance getBuildFrom() {
return giantInstance;
}
}
}
|
[
"acrylic125email@gmail.com"
] |
acrylic125email@gmail.com
|
50f9889ff3d1bede8f5da17641003e55759b93fd
|
1a14da8cfc4050c44f681614719191324e65b441
|
/src/main/java/org/alvin/cishan/sys/service/eventuser/EventUser.java
|
59cb58fdcfcfb9fda8383f7dc1c59fbc5af725b1
|
[
"MIT"
] |
permissive
|
zilinyuan/erp_laozhang
|
e5b20856e0083a8b9814c3acb0581b515b78eea0
|
3938c113998771c583a8ad88b3e86e383e001afa
|
refs/heads/master
| 2020-04-08T10:12:37.193380
| 2018-11-27T01:12:00
| 2018-11-27T01:12:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
package org.alvin.cishan.sys.service.eventuser;
import lombok.Getter;
import lombok.Setter;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @类说明: 活动参与方--实体类
* @author: 高振中
* @date : 2018-10-30 11:50:24
**/
@Setter
@Getter
@Accessors(chain = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "EventUser", description = "活动参与方实体")
public class EventUser {
//数据库中的字段
@ApiModelProperty(value = "主键", dataType = "Long")
private Long id;// 主键
@ApiModelProperty(value = "活动ID", dataType = "Long")
private Long event_id;// 活动ID
@ApiModelProperty(value = "参与人ID", dataType = "Long")
private Long user_id;// 参与人ID
//此处可添加查询显示辅助字段
@ApiModelProperty(value = "活动名称", dataType = "String")
private String event_name; //活动名称
@ApiModelProperty(value = "参与人名称", dataType = "String")
private String join_user_name;//参与人名称
}
|
[
"alvin198761@163.com"
] |
alvin198761@163.com
|
da4d404e1ad89c53f2ada7d99e4287b78f58463e
|
88aabd4a037dc8805262310030f929e28aa2ed56
|
/app/src/main/java/net/coding/program/maopao/item/ImageCommentHolder.java
|
8da2f3bbcb01a18348ff7e71669dc7f17753d057
|
[
"MIT"
] |
permissive
|
awesome-archive/Coding-Android
|
3192e17fbefdeda6bd95bd7a73c97ae0aa0c1cc4
|
d4597ebfa84d427a446b3aeef766a6e2ad8b55af
|
refs/heads/master
| 2021-01-11T02:47:43.002344
| 2015-09-03T01:39:15
| 2015-09-03T01:39:15
| 70,902,627
| 0
| 0
|
MIT
| 2020-01-13T02:57:00
| 2016-10-14T11:07:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,804
|
java
|
package net.coding.program.maopao.item;
import android.text.Html;
import android.view.View;
import net.coding.program.common.ImageLoadTool;
import net.coding.program.common.comment.BaseCommentHolder;
import net.coding.program.common.comment.BaseCommentParam;
import net.coding.program.model.BaseComment;
import net.coding.program.model.Commit;
import net.coding.program.model.DynamicObject;
/**
* Created by chenchao on 15/3/31.
* 可以带多张小图片的评论item
*/
public class ImageCommentHolder extends BaseCommentHolder {
private ContentAreaMuchImages contentArea;
public ImageCommentHolder(View convertView, View.OnClickListener onClickComment, Html.ImageGetter imageGetter, ImageLoadTool imageLoadTool, View.OnClickListener clickUser, View.OnClickListener clickImage) {
super(convertView, onClickComment, imageGetter, imageLoadTool, clickUser);
contentArea = new ContentAreaMuchImages(convertView, onClickComment, clickImage, imageGetter, imageLoadTool); //
}
public ImageCommentHolder(View convertView, BaseCommentParam param) {
super(convertView, param);
this.contentArea = new ContentAreaMuchImages(convertView, param.onClickComment, param.mClickImage, param.imageGetter, param.imageLoadTool);
}
@Override
public void setContent(Object data) {
super.setContent(data);
if (data instanceof BaseComment) {
contentArea.setDataContent(((BaseComment) data).content, data);
} else if (data instanceof Commit) {
contentArea.setDataContent(((Commit) data).getTitle(), data);
} else if (data instanceof DynamicObject.DynamicProjectFileComment) {
contentArea.setDataContent(((DynamicObject.DynamicProjectFileComment) data).getComment(), data);
}
}
}
|
[
"8206503@qq.com"
] |
8206503@qq.com
|
899ceea4efa85ff4a7dcd811b5e76b3b8839be4c
|
4d54cee594deb52f682432ea80e974edd49dd4f6
|
/corpus/java/training/stringtemplate4/org/stringtemplate/v4/gui/JTreeASTModel.java
|
6c0bae48cea52b59c32bf053946ff09bcf4de6d5
|
[
"BSD-2-Clause"
] |
permissive
|
bloriot97/codebuff
|
fb3949b9429a6ff446dcd92273d2f65a43506fbb
|
99ea273504811a32413bcd937ff6d989b36a7cda
|
refs/heads/master
| 2020-03-29T17:09:24.279320
| 2018-09-24T18:09:32
| 2018-09-24T18:09:32
| 150,146,675
| 0
| 0
|
BSD-2-Clause
| 2018-09-24T18:08:02
| 2018-09-24T18:08:01
| null |
UTF-8
|
Java
| false
| false
| 2,976
|
java
|
/*
* [The "BSD license"]
* Copyright (c) 2011 Terence Parr
* 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.
*/
package org.stringtemplate.v4.gui;
import org.antlr.runtime.tree.CommonTreeAdaptor;
import org.antlr.runtime.tree.TreeAdaptor;
import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
// TODO: copied from ANTLR v4; rm when upgraded to v4
public class JTreeASTModel implements TreeModel {
TreeAdaptor adaptor;
Object root;
public JTreeASTModel(TreeAdaptor adaptor, Object root) {
this.adaptor = adaptor;
this.root = root;
}
public JTreeASTModel(Object root) {
this.adaptor = new CommonTreeAdaptor();
this.root = root;
}
@Override
public int getChildCount(Object parent) {
return adaptor.getChildCount(parent);
}
@Override
public int getIndexOfChild(Object parent, Object child){
if ( parent==null ) return -1;
return adaptor.getChildIndex(child);
}
@Override
public Object getChild(Object parent, int index){
return adaptor.getChild(parent, index);
}
@Override
public boolean isLeaf(Object node) {
return getChildCount(node)==0;
}
@Override
public Object getRoot() { return root; }
@Override
public void valueForPathChanged(TreePath treePath, Object o) {
}
@Override
public void addTreeModelListener(TreeModelListener treeModelListener) {
}
@Override
public void removeTreeModelListener(TreeModelListener treeModelListener) {
}
}
|
[
"parrt@cs.usfca.edu"
] |
parrt@cs.usfca.edu
|
aa66622dc4eecd9ef9d9d2e381e228494098f356
|
7ee27191217553a815458a622a1b7878274f7088
|
/src/main/java/jdkguide/thread/future/Future.java
|
8b9c57cac9f2f1e8345b501d7201aeaafede9a90
|
[] |
no_license
|
BigPayno/JavaGuide
|
bd3a14cab15188894ade972201f437cc8ceadbb7
|
512f084343e03de87e4949dd66fba77eb69972ed
|
refs/heads/master
| 2022-12-12T23:29:53.618292
| 2020-05-29T08:30:36
| 2020-05-29T08:30:36
| 221,147,356
| 1
| 0
| null | 2022-12-10T05:44:10
| 2019-11-12T06:34:42
|
Java
|
UTF-8
|
Java
| false
| false
| 186
|
java
|
package jdkguide.thread.future;
/**
* @author payno
* @date 2019/11/8 10:52
* @description
*/
public interface Future<V> {
boolean isReady();
V get();
void setV(V v);
}
|
[
"1361098889@qq.com"
] |
1361098889@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.