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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fad0d84104789666d58f000fe82268a9a8113976
|
7003f8a6e4e0e9ac4da6311957a4dd639edbf5a2
|
/src/main/java/br/com/envCCe/TransformType.java
|
7756c2022f2673f74fb6c7eb2b7e22c1e01fa4ba
|
[] |
no_license
|
renangtm/frente_caixa_contabilidade
|
65e2586ec2e4e10d7d0dbad70b66fda52a81c0ac
|
91b1175d3adc8d1357a2cf99efac11223d4071d0
|
refs/heads/master
| 2022-12-10T09:59:18.687217
| 2019-11-06T05:34:12
| 2019-11-06T05:34:12
| 212,447,056
| 1
| 1
| null | 2023-08-23T17:54:30
| 2019-10-02T21:43:38
|
Java
|
ISO-8859-1
|
Java
| false
| false
| 2,998
|
java
|
//
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
// Gerado em: 2018.07.10 às 10:05:32 AM BRT
//
package br.com.envCCe;
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.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java de TransformType complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType name="TransformType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence maxOccurs="unbounded" minOccurs="0">
* <element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* <attribute name="Algorithm" use="required" type="{http://www.w3.org/2000/09/xmldsig#}TTransformURI" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TransformType", propOrder = {
"xPath"
})
public class TransformType {
@XmlElement(name = "XPath")
protected List<String> xPath;
@XmlAttribute(name = "Algorithm", required = true)
protected String algorithm;
/**
* Gets the value of the xPath 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 xPath property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getXPath().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getXPath() {
if (xPath == null) {
xPath = new ArrayList<String>();
}
return this.xPath;
}
/**
* Obtém o valor da propriedade algorithm.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAlgorithm() {
return algorithm;
}
/**
* Define o valor da propriedade algorithm.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAlgorithm(String value) {
this.algorithm = value;
}
}
|
[
"renan_goncalves@outlook.com.br"
] |
renan_goncalves@outlook.com.br
|
7d4954532078966459d9f078ccd59e1fc22ae395
|
9587fc040e52ee4384216ef60eeae4199bdc89e5
|
/src/net/info/db/UserId_likeDAO.java
|
9192d47d8d1a637a3e5f0426e52cc6efd08ab8bb
|
[] |
no_license
|
MinjiJo/Lightgram
|
e30a89051fe246e59303ec4b5d165fa75aaeb56d
|
b88c4251bee26e6734ac9c7e4e2e61fc909cde45
|
refs/heads/master
| 2020-12-12T01:02:08.392887
| 2020-01-15T05:13:47
| 2020-01-15T05:13:47
| 234,002,022
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,361
|
java
|
package net.info.db;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
public class UserId_likeDAO {
private Connection conn;
private DataSource ds;
private ResultSet rs;
private PreparedStatement pstmt;
int result;
public UserId_likeDAO() {
try {
Context init = new InitialContext();
ds = (DataSource)init.lookup("java:comp/env/jdbc/OracleDB");
} catch(Exception e) {
e.printStackTrace();
}
}
public void close() {
if(rs != null) {
try {
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if(pstmt != null) {
try {
pstmt.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if(conn != null) {
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
public JsonArray getLikes(String loginId, String postId, int postNum) {
JsonArray result = new JsonArray();
try {
conn = ds.getConnection();
conn.setAutoCommit(false);
String sql = "select * from " + postId + "_post_like where itemNum = ? and likes = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setInt(1, postNum);
pstmt.setString(2, loginId);
rs = pstmt.executeQuery();
if(rs.next()) {
result.add(1);
} else {
result.add(0);
}
sql = "select count(*) from " + postId + "_post_like where itemNum = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setInt(1, postNum);
rs = pstmt.executeQuery();
if(rs.next()) {
result.add(rs.getInt(1));
}
conn.commit();
} catch(Exception e) {
e.printStackTrace();
try {
conn.rollback();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
} finally {
close();
}
return result;
}
public int setLike(String loginId, String postId, int postNum) {
try {
conn = ds.getConnection();
conn.setAutoCommit(false);
String sql = "select * from " + postId + "_post_like where itemNum = ? and likes = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setInt(1, postNum);
pstmt.setString(2, loginId);
rs = pstmt.executeQuery();
if(!rs.next()) {
sql = "insert into " + postId + "_post_like (itemNum, likes) values(?, ?)";
pstmt = conn.prepareStatement(sql);
pstmt.setInt(1, postNum);
pstmt.setString(2, loginId);
result = pstmt.executeUpdate();
if(result == 1) {
conn.commit();
return 1;
}
}else {
sql = "delete from " + postId + "_post_like where itemNum = ? and likes = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setInt(1, postNum);
pstmt.setString(2, loginId);
result = pstmt.executeUpdate();
if(result == 1) {
conn.commit();
return 0;
}
}
} catch(Exception e) {
e.printStackTrace();
try {
conn.rollback();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
} finally {
close();
}
return -1;
}
}
|
[
"MinjiJo@users.noreply.github.com"
] |
MinjiJo@users.noreply.github.com
|
d24f0199b66925f9ec8c3827a83a77ca2760fbba
|
561792a13784c07f6bfef2d2370709de0f27e447
|
/wtshop-web/src/main/java/com/wtshop/controller/admin/UserFollowController.java
|
79b7d06a5a80b3de77e9040237b038b452b87778
|
[] |
no_license
|
523570822/wtshop
|
a0b1d7390a6377af2307871ae20d8e669a8c4f4b
|
6cfcf659babde3449df82ac57ce3b4bba5925ec4
|
refs/heads/master
| 2022-12-09T10:42:14.245989
| 2019-10-09T06:30:15
| 2019-10-09T06:30:15
| 139,920,178
| 0
| 1
| null | 2022-12-06T00:39:24
| 2018-07-06T01:52:39
|
Java
|
UTF-8
|
Java
| false
| false
| 2,816
|
java
|
package com.wtshop.controller.admin;
import com.jfinal.ext.route.ControllerBind;
import com.jfinal.plugin.activerecord.Page;
import com.wtshop.Pageable;
import com.wtshop.model.Goods;
import com.wtshop.model.Member;
import com.wtshop.model.MemberFavoriteGoods;
import com.wtshop.service.*;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import static com.wtshop.controller.wap.BaseController.convertToLong;
/**
* Created by 蔺哲 on 2017/8/17.
*/
@ControllerBind(controllerKey = "/admin/userFollow")
public class UserFollowController extends BaseController{
private MemberService memberService = enhance(MemberService.class);
private MemberAttributeService memberAttributeService = enhance(MemberAttributeService.class);
private MemberFavoriteGoodsService memberFavoriteGoodsService = enhance(MemberFavoriteGoodsService.class);
private GoodsService goodsService = enhance(GoodsService.class);
/**
* 列表
*/
public void list() {
Pageable pageable = getBean(Pageable.class);
Page<Member> pages = memberService.findPage(pageable);
setAttr("memberAttributes", memberAttributeService.findAll());
setAttr("pageable", pageable);
setAttr("page", pages );
render("/admin/userFollow/list.ftl");
}
/**
* 用户相关收藏商品
*/
public void detailsList(){
Pageable pageable = getBean(Pageable.class);
Long memberId = getParaToLong("memberId");
setAttr("memberId",memberId);
setAttr("page",memberFavoriteGoodsService.findFavoriteGoodsByMember(pageable,memberId));
setAttr("pageable", pageable );
render("/admin/userFollow/detailsList.ftl");
}
/**
* 商品维度列表
*/
public void goodsDimension(){
Pageable pageable = getBean(Pageable.class);
Page<Goods> pages = memberFavoriteGoodsService.queryGoodsOfMemberNum(pageable);
setAttr("pageable", pageable);
setAttr("page", pages );
render("/admin/userFollow/goodsList.ftl");
}
/**
* 商品对应用户关注详情
*/
public void goodsDetailsList(){
Pageable pageable = getBean(Pageable.class);
Long goodsId = getParaToLong("goodsId");
List<Long> goodsList = new ArrayList<Long>();
Page<MemberFavoriteGoods> pages = memberFavoriteGoodsService.findGoodsByMember(pageable,goodsId);
for(MemberFavoriteGoods MemberFavoriteGoods : pages.getList()){
goodsList.add(MemberFavoriteGoods.getFavoriteMembers());
}
setAttr("goodsList",goodsList);
setAttr("goodsId",goodsId);
setAttr("pageable", pageable);
setAttr("page", pages );
render("/admin/userFollow/goodsDetailsList.ftl");
}
}
|
[
"523570822@qq.com"
] |
523570822@qq.com
|
8bd84a4e5f1be3612c5f4c547df3b93b6e680d60
|
7b17f15297561ba5d9149ffea065ee515878899b
|
/src/com/galaxii/front/action/community/AbstractReadAction.java
|
0dc37bb0548eae8144def579701d8185f2df7e7d
|
[] |
no_license
|
t-kawatsu/galaxii
|
f4ece07fd98091164f42656e2ea811866ec87780
|
4828cfc34997ea5b0629dc5509ef6b8fe9148d87
|
refs/heads/master
| 2020-03-23T23:39:15.026973
| 2018-07-25T05:32:06
| 2018-07-25T05:32:06
| 142,247,063
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,950
|
java
|
package com.galaxii.front.action.community;
import java.util.List;
import javax.annotation.Resource;
import com.galaxii.common.dao.CommunityDao;
import com.galaxii.common.dao.CommunityUserDao;
import com.galaxii.common.dto.RecommendNews;
import com.galaxii.common.entity.Community;
import com.galaxii.common.entity.CommunityActivity;
import com.galaxii.common.entity.CommunityContentsCategory;
import com.galaxii.common.entity.CommunityUser;
import com.galaxii.common.service.CommunityActivityService;
import com.galaxii.common.service.CommunityService;
import com.galaxii.common.util.SimplePager;
import com.galaxii.front.action.AbstractAction;
public class AbstractReadAction extends AbstractAction {
/**
*
*/
private static final long serialVersionUID = 1L;
protected int DISP_ACTIVITY_NUM_PAR_PAGE = 15;
protected int DISP_RECOMMEND_NEWS_NUM_PAR_PAGE = 6;
@Resource
protected CommunityService communityService;
@Resource
protected CommunityActivityService communityActivityService;
@Resource
protected CommunityDao communityDao;
@Resource
protected CommunityUserDao communityUserDao;
protected Integer id;
protected Integer contentsId;
protected Community community;
protected SimplePager<CommunityUser> communityUsers;
protected SimplePager<CommunityActivity> communityActivities;
protected List<RecommendNews> recommendNews;
protected CommunityContentsCategory communityContentsCategory
= CommunityContentsCategory.HOME;
protected boolean isMember;
public String beforeReadProcess(Integer id) throws Exception {
// community
community = communityService.findById(id);
if(community == null) {
return ERROR;
}
if(isPjax()) {
return SUCCESS;
}
// is member ??
if(getIsLogined()) {
isMember = communityUserDao.isExistCommunityUser(
id, getCurrentUser().getId());
}
// community users
communityUsers = communityUserDao.paginateByCommunityId(
id, SUB_CONTENTS_COMMUNITY_USERS_LIMIT, 1);
// recommend informations
recommendNews = communityService.findRecommendNews(
community, DISP_RECOMMEND_NEWS_NUM_PAR_PAGE, 1);
return SUCCESS;
}
public void setId(Integer id) {
this.id = id;
}
public void setContentsId(Integer contentsId) {
this.contentsId = contentsId;
}
public Integer getContentsId() {
return contentsId;
}
public Community getCommunity() {
return community;
}
public SimplePager<CommunityUser> getCommunityUsers() {
return communityUsers;
}
public SimplePager<CommunityActivity> getCommunityActivities() {
return communityActivities;
}
public List<RecommendNews> getRecommendNews() {
return recommendNews;
}
public boolean getIsMember() {
return isMember;
}
public void setContents(String contents) {
communityContentsCategory = CommunityContentsCategory.nameOf(contents);
}
public CommunityContentsCategory getContents() {
return communityContentsCategory;
}
}
|
[
"t-kawatsu@share.jogoj.com"
] |
t-kawatsu@share.jogoj.com
|
725c900e4c78fc3d88c3917eb71e6a8f61e8047a
|
2851384b67fc053a6ec8bb32fe366f328be782b4
|
/iqvia_demos/productmvcapp/src/main/java/com/iqvia/config/WebAppInitializer.java
|
581bc6b3e1f4f04966dd601833714d5e628d61d1
|
[] |
no_license
|
ullasnaik/FullstackProjects
|
3869becd021702544dbfa5785a43aac4f6eaf5ad
|
d23a7e143756a5cff7a38bc6c8730e776d123a2e
|
refs/heads/main
| 2022-12-30T01:52:13.202058
| 2020-10-21T11:13:39
| 2020-10-21T11:13:39
| 305,998,267
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
package com.iqvia.config;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class[] {ApplicationConfig.class};
}
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[] {WebMvcConfig.class};
}
@Override
protected String[] getServletMappings() {
return new String[] {"/"};
}
}
|
[
"naik.ullas@gmail.com"
] |
naik.ullas@gmail.com
|
56ee409efa5e6d33690a5e0edb2b348797065f49
|
62b36b279296d999fbab6df95309c05b45262f86
|
/plugins/InspectionGadgets/test/com/siyeh/igtest/internationalization/unnecessary_unicode_escape/afterUnnecessaryEscape.java
|
a33dc49009e1ab3fa5580c58b5fd340156dee8e0
|
[
"Apache-2.0"
] |
permissive
|
huwensen/intellij-community
|
2e84b5d447f0e8b227024190be5912b5feceec7c
|
abb490446a7f9abbc55f100b166cadee7dba60ae
|
refs/heads/master
| 2023-07-23T19:14:15.258542
| 2023-07-17T21:40:16
| 2023-07-18T02:33:37
| 201,616,287
| 1
| 0
|
Apache-2.0
| 2019-08-10T10:41:04
| 2019-08-10T10:41:03
| null |
UTF-8
|
Java
| false
| false
| 129
|
java
|
// "Fix all 'Unnecessary unicode escape sequence' problems in file" "true"
class X {
void test() {
String s = "abcd";
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
663e5b7040e3c66b9824f77dad3fb494d3794d6f
|
0c21777557f347ae4ac1b3197d1f7c28e05aed1b
|
/com/ad4screen/sdk/service/modules/inbox/a.java
|
519cd4dca0782a4154f5408e5b4ca2a71980f3e1
|
[] |
no_license
|
dmisuvorov/HappyFresh.Android
|
68421b90399b72523f398aabbfd30b61efaeea1f
|
242c5b0c006e7825ed34da57716d2ba9d1371d65
|
refs/heads/master
| 2020-04-29T06:47:34.143095
| 2016-01-11T06:24:16
| 2016-01-11T06:24:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 867
|
java
|
package com.ad4screen.sdk.service.modules.inbox;
import com.ad4screen.sdk.inbox.Message;
import com.ad4screen.sdk.systems.f.a;
public final class a
{
public static final class a
implements f.a<a.c>
{
public void a(a.c paramc)
{
paramc.a();
}
}
public static final class b
implements f.a<a.c>
{
Message[] a;
public b(Message[] paramArrayOfMessage)
{
this.a = paramArrayOfMessage;
}
public void a(a.c paramc)
{
paramc.a(this.a);
}
}
public static abstract interface c
{
public abstract void a();
public abstract void a(Message[] paramArrayOfMessage);
}
}
/* Location: /Users/michael/Downloads/dex2jar-2.0/HappyFresh.jar!/com/ad4screen/sdk/service/modules/inbox/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"michael@MJSTONE-MACBOOK.local"
] |
michael@MJSTONE-MACBOOK.local
|
a2bd123671a951f62643c10800933b61c35de880
|
16144c7555d8826f07b47e071bebabdc15e38e31
|
/cloudsecurity/Example1/OAuth2AuthServer/src/test/java/com/laxtech/example/OAuth2AuthServer/OAuth2AuthServerApplicationTests.java
|
c1d8787ebda9852444ca572bc34bc04c722ed7e1
|
[] |
no_license
|
gsanjeev/cloudsamples
|
bbfa0d5ac6a9ce50c901d07467ebe2059b2094ff
|
06f680df00ee505996d995a72b99d45ca376fa17
|
refs/heads/master
| 2021-09-14T00:36:14.937339
| 2018-05-06T18:41:52
| 2018-05-06T18:41:52
| 104,307,998
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
package com.laxtech.example.OAuth2AuthServer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class OAuth2AuthServerApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"gsanjeevtripathi@gmail.com"
] |
gsanjeevtripathi@gmail.com
|
e5958d0c2a39936a64c65d22079372f7f55b8cf1
|
84df9b88acba3c6df2b99fe776d028964243790a
|
/src/main/java/controlselection/controlselection/consonant/ToConsonant.java
|
eecdcfa99a5ed38b81ad01213f2f4b67d34368be
|
[] |
no_license
|
GeleteiKrisztian/training-solutions
|
904efcd9a76ad783c6e287455423c046aa584d50
|
641bc703c3bd5cb270711293cff89d464158fee2
|
refs/heads/master
| 2023-03-22T17:58:56.348772
| 2021-03-15T00:31:39
| 2021-03-15T00:31:39
| 308,332,572
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 316
|
java
|
package controlselection.controlselection.consonant;
public class ToConsonant {
public static final String VOWELS = "aeiou";
public char convertToConsonant(char c) {
if (VOWELS.indexOf(c) >= 0) {
return (char) (c + 1);
}
else {
return c;
}
}
}
|
[
"geleteikrisztian@gmail.com"
] |
geleteikrisztian@gmail.com
|
005cd4c2afea5b22281b4222baa714c50977a9ed
|
45dd9e8dc389f9f99e4f4e626dd2b03aec7329bc
|
/app/src/main/java/com/aiqing/kaiheiba/download/downloader/Constants.java
|
fae4de6fc74013836cf0180c5e53750ac4e3d8a0
|
[] |
no_license
|
huxq17/app
|
fb0538f375ad2c85c677da58429bdc10ea5437ab
|
d80be52541ce064affbc4b87455a4e6861bc432c
|
refs/heads/master
| 2020-03-07T09:46:06.305994
| 2018-05-19T14:28:23
| 2018-05-19T14:28:23
| 127,415,644
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 288
|
java
|
package com.aiqing.kaiheiba.download.downloader;
public class Constants {
static final int DEFAULT_READ_TIMEOUT_MILLIS = 20 * 1000; // 20s
static final int DEFAULT_WRITE_TIMEOUT_MILLIS = 20 * 1000; // 20s
static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 15 * 1000; // 15s
}
|
[
"huxq17@163.com"
] |
huxq17@163.com
|
5b512ec84b65844858043952a62c09ff9f30d342
|
e2f48f6c4c339d556b3ea246a4ff584cef9cb505
|
/src/main/java/com/hpcloud/mon/resource/exception/JsonProcessingExceptionMapper.java
|
5321e4736558691e5de7228dbd1db43b43cac560
|
[
"Apache-2.0"
] |
permissive
|
markdav/monasca-api
|
30ea2f3a8ab530f330e86307e667815ed10d6450
|
6f1595ce0d456dda029421a5f6012eb63aa50f08
|
refs/heads/master
| 2021-01-24T16:02:47.335042
| 2014-08-21T17:03:41
| 2014-08-21T17:04:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,661
|
java
|
/*
* Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
*
* 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.hpcloud.mon.resource.exception;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.hpcloud.mon.resource.exception.Exceptions.FaultType;
/**
* Adapted from Dropwizard's JsonProcessingExceptionMapper.
*/
@Provider
public class JsonProcessingExceptionMapper implements ExceptionMapper<JsonProcessingException> {
@Override
public Response toResponse(JsonProcessingException exception) {
/*
* If the error is in the JSON generation, it's a server error.
*/
if (exception instanceof JsonGenerationException)
return Response
.status(Status.INTERNAL_SERVER_ERROR)
.type(MediaType.APPLICATION_JSON)
.entity(
Exceptions.buildLoggedErrorMessage(FaultType.SERVER_ERROR, "Error generating JSON",
null, exception)).build();
final String message = exception.getMessage();
/*
* If we can't deserialize the JSON because someone forgot a no-arg constructor, it's a server
* error and we should inform the developer.
*/
if (message.startsWith("No suitable constructor found"))
return Response
.status(Status.INTERNAL_SERVER_ERROR)
.type(MediaType.APPLICATION_JSON)
.entity(
Exceptions.buildLoggedErrorMessage(FaultType.SERVER_ERROR,
"Unable to deserialize the provided JSON", null, exception)).build();
/*
* Otherwise, it's those pesky users.
*/
return Response
.status(Status.BAD_REQUEST)
.type(MediaType.APPLICATION_JSON)
.entity(
Exceptions.buildLoggedErrorMessage(FaultType.BAD_REQUEST,
"Unable to process the provided JSON",
Exceptions.stripLocationFromStacktrace(message), exception)).build();
}
}
|
[
"jhalterman@gmail.com"
] |
jhalterman@gmail.com
|
a8392e3cf2646bc48d25b2cf5a6e0003848504fd
|
66581bc32744f3a30be77c7638a534f024daddb6
|
/sakai-mini/2.8.0/jsf/jsf-widgets/src/java/org/sakaiproject/jsf/tag/ToolBarSpacerTag.java
|
3c57d6f8a1532ab3c246813f0bdcdce03ee7dc5f
|
[
"ECL-2.0"
] |
permissive
|
lijiangt/sakai
|
087be33a4f20fe199458fe6a4404f37c613f3fa2
|
2647ef7e93617e33d53b1756918e64502522636b
|
refs/heads/master
| 2021-01-10T08:44:39.756518
| 2012-03-05T14:40:08
| 2012-03-05T14:40:08
| 36,716,620
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,461
|
java
|
/**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/jsf/tags/jsf-2.8.1/jsf-widgets/src/java/org/sakaiproject/jsf/tag/ToolBarSpacerTag.java $
* $Id: ToolBarSpacerTag.java 68846 2009-11-13 12:27:32Z arwhyte@umich.edu $
***********************************************************************************
*
* Copyright (c) 2003, 2004, 2005, 2006, 2008 The Sakai Foundation
*
* Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.jsf.tag;
import javax.faces.webapp.UIComponentTag;
public class ToolBarSpacerTag extends UIComponentTag
{
public String getComponentType()
{
return "org.sakaiproject.ToolBarSpacer";
}
public String getRendererType()
{
return "org.sakaiproject.ToolBarSpacer";
}
}
|
[
"lijiangt@gmail.com"
] |
lijiangt@gmail.com
|
9927df10d683c24a53ef451333b288282b568df3
|
a31f95e42a8f79add6c111391a869bb1aea620b8
|
/src/com/stinfo/pushme/rest/entity/LastAppVerReq.java
|
adfdd277970567ef991e1a5001c96aa647829ec4
|
[] |
no_license
|
tangzhezhi/I_Campus
|
b35be708cb17731f7976a096aa713d753bcee27d
|
e1eda66e009bb8ff8fab9c1d5e9964a98f8ee3f8
|
refs/heads/master
| 2020-07-21T23:30:49.072761
| 2014-10-16T06:13:47
| 2014-10-16T06:13:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 885
|
java
|
package com.stinfo.pushme.rest.entity;
import java.util.HashMap;
import com.stinfo.pushme.common.AppConstant;
public class LastAppVerReq extends BaseRequest {
private String appName = "";
private int appType = 1;
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public int getAppType() {
return appType;
}
public void setAppType(int appType) {
this.appType = appType;
}
@Override
public String getPath() {
// return AppConstant.BASE_URL + "lastAppVer.ashx";
return AppConstant.School_Platform_BASE_URL + "appVersion/nonChecked/lastAppVer";
}
@Override
public HashMap<String, String> toParamsMap() {
HashMap<String, String> paramsHashMap = new HashMap<String, String>();
paramsHashMap.put("appname", this.appName);
paramsHashMap.put("apptype", "1");
return paramsHashMap;
}
}
|
[
"330882908@qq.com"
] |
330882908@qq.com
|
ec644d1f7dab3e9879a10e60e00e0b4102bb84b1
|
1e61a20a8275794b37f57292cbd4fbda2b65c732
|
/spring-statemachine-samples/ordershipping/src/test/java/demo/ordershipping/OrdershippingTests.java
|
0c7c6d8e285ee32655edbc263e314893cfe51045
|
[
"Apache-2.0"
] |
permissive
|
josecarloscanova/spring-statemachine-1
|
0ee856e3d34d9b63d2d68006441d699285e0ad48
|
8fc7592404b439b7501832cfeab3fb8e5d54ebfe
|
refs/heads/master
| 2020-05-21T08:50:24.487362
| 2016-09-26T09:29:01
| 2016-09-26T09:29:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,291
|
java
|
/*
* Copyright 2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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 demo.ordershipping;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.annotation.DirtiesContext.ClassMode;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { Application.class})
@WebAppConfiguration
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
public class OrdershippingTests {
private MockMvc mvc;
@Autowired
private WebApplicationContext context;
@Test
public void testHome() throws Exception {
mvc.
perform(get("/state")).
andExpect(status().isOk()).
andExpect(content().string(containsString("Machines:")));
}
@Test
public void testCreateOrder() throws Exception {
mvc.
perform(get("/state").
param("action", "order").
param("customer", "customer1").
param("order", "order1")).
andExpect(status().isOk()).
andExpect(content().string(containsString("customer1:order1"))).
andExpect(content().string(containsString("[WAIT_NEW_ORDER]")));
mvc.
perform(get("/state").
param("action", "event").
param("event", "PLACE_ORDER").
param("customer", "customer1").
param("order", "order1")).
andExpect(status().isOk()).
andExpect(content().string(containsString("customer1:order1"))).
andExpect(content().string(containsString("[HANDLE_ORDER, WAIT_PRODUCT, WAIT_PAYMENT]")));
mvc.
perform(get("/state").
param("action", "event").
param("event", "RECEIVE_PAYMENT").
param("guide", "payment").
param("customer", "customer1").
param("order", "order1")).
andExpect(status().isOk()).
andExpect(content().string(containsString("customer1:order1"))).
andExpect(content().string(containsString("[ORDER_SHIPPED]")));
}
@Before
public void setup() throws Exception {
mvc = MockMvcBuilders.webAppContextSetup(context).build();
}
}
|
[
"janne.valkealahti@gmail.com"
] |
janne.valkealahti@gmail.com
|
415b6279b87c154653fc45da1100deed244fa8e7
|
5d5530e2d361fbf230d434e29e6140c7aa8e219e
|
/impl/core/src/main/java/be/atbash/ee/security/octopus/crypto/hash/KeyFactoryNameFactory.java
|
6bbd7ead242f08ba35002b004ad91e854a30bc89
|
[
"Apache-2.0"
] |
permissive
|
atbashEE/atbash-octopus
|
1b2efa004d4b009ede5230be76a414192a1d440a
|
122cd96f414fbb10a3dc850083b7f48907e6addc
|
refs/heads/master
| 2023-01-30T00:41:42.840435
| 2020-10-08T19:11:55
| 2020-10-08T19:11:55
| 113,004,137
| 4
| 0
|
Apache-2.0
| 2023-01-13T01:54:34
| 2017-12-04T06:30:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,577
|
java
|
/*
* Copyright 2014-2018 Rudy De Busscher (https://www.atbash.be)
*
* 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 be.atbash.ee.security.octopus.crypto.hash;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* Generates mapping between the 'simple' name (like PBKDF2) and the actual name used by the JDK like PBKDF2WithHmacSHA1
* which is Java Version specific.
* For all names which are not supported (no mapping defined), the name is returned as is.
*/
class KeyFactoryNameFactory {
private static String JAVA_VERSION = Runtime.class.getPackage().getSpecificationVersion();
private static KeyFactoryNameFactory INSTANCE;
private Map<String, Map<String, String>> defaultKeyFactoryNames;
private KeyFactoryNameFactory() {
defaultKeyFactoryNames = new HashMap<>();
definePBKDF2Names();
}
private void definePBKDF2Names() {
Map<String, String> mapping = new HashMap<>();
mapping.put("1.7", "PBKDF2WithHmacSHA1");
mapping.put("1.8", "PBKDF2WithHmacSHA256");
// FIXME Support for Java 9+ (probably will only support 11)
defaultKeyFactoryNames.put("PBKDF2", mapping);
}
/**
* Returns the actual name for the Key derivation function, like PBKDF2WithHmacSHA1 or the parameter itself when no
* mapping is defined.
*
* @param name The name for which we need the Java Version specific name.
* @return The name of the Key derivation function for this Java Version.
*/
String getKeyFactoryName(String name) {
String nameUpperCase = name.toUpperCase(Locale.ENGLISH);
String result;
if (defaultKeyFactoryNames.containsKey(nameUpperCase)) {
result = defaultKeyFactoryNames.get(nameUpperCase).get(JAVA_VERSION);
} else {
result = name;
}
return result;
}
static KeyFactoryNameFactory getInstance() {
if (INSTANCE == null) {
INSTANCE = new KeyFactoryNameFactory();
}
return INSTANCE;
}
}
|
[
"rdebusscher@gmail.com"
] |
rdebusscher@gmail.com
|
ca9e1febeecca99b77b940a836d570e298161909
|
bb5e00483d2f2019631467edafcf76aef2659dd5
|
/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/authentication/OAuth2ClientCredentialsAuthenticationToken.java
|
5ff5556c5642ec4fb4dd813a83793d72fd6e3d86
|
[
"Apache-2.0"
] |
permissive
|
hamakeliKS/spring-authorization-server
|
4bf8fe61a1d7ce7187588842eb8116db643f252f
|
c418306fd994d25f9095d602a7a0cc31b05fe701
|
refs/heads/main
| 2023-09-05T10:38:23.848437
| 2021-11-26T09:51:54
| 2021-11-26T11:46:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,081
|
java
|
/*
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.oauth2.server.authorization.authentication;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.springframework.lang.Nullable;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.core.AuthorizationGrantType;
/**
* An {@link Authentication} implementation used for the OAuth 2.0 Client Credentials Grant.
*
* @author Alexey Nesterov
* @since 0.0.1
* @see OAuth2AuthorizationGrantAuthenticationToken
* @see OAuth2ClientCredentialsAuthenticationProvider
*/
public class OAuth2ClientCredentialsAuthenticationToken extends OAuth2AuthorizationGrantAuthenticationToken {
private final Set<String> scopes;
/**
* Constructs an {@code OAuth2ClientCredentialsAuthenticationToken} using the provided parameters.
*
* @param clientPrincipal the authenticated client principal
* @param scopes the requested scope(s)
* @param additionalParameters the additional parameters
* @deprecated Use {@link #OAuth2ClientCredentialsAuthenticationToken(String, Authentication, Set, Map)} instead
*/
@Deprecated
public OAuth2ClientCredentialsAuthenticationToken(Authentication clientPrincipal,
@Nullable Set<String> scopes, @Nullable Map<String, Object> additionalParameters) {
super(AuthorizationGrantType.CLIENT_CREDENTIALS, clientPrincipal, additionalParameters);
this.scopes = Collections.unmodifiableSet(
scopes != null ? new HashSet<>(scopes) : Collections.emptySet());
}
/**
* Constructs an {@code OAuth2ClientCredentialsAuthenticationToken} using the provided parameters.
*
* @param issuer the issuer identifier
* @param clientPrincipal the authenticated client principal
* @param scopes the requested scope(s)
* @param additionalParameters the additional parameters
* @since 0.2.1
*/
public OAuth2ClientCredentialsAuthenticationToken(String issuer, Authentication clientPrincipal,
@Nullable Set<String> scopes, @Nullable Map<String, Object> additionalParameters) {
super(AuthorizationGrantType.CLIENT_CREDENTIALS, issuer, clientPrincipal, additionalParameters);
this.scopes = Collections.unmodifiableSet(
scopes != null ? new HashSet<>(scopes) : Collections.emptySet());
}
/**
* Returns the requested scope(s).
*
* @return the requested scope(s), or an empty {@code Set} if not available
*/
public Set<String> getScopes() {
return this.scopes;
}
}
|
[
"jgrandja@vmware.com"
] |
jgrandja@vmware.com
|
8a58a96a9399de5f7368c65ce48208ad4ab67758
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/61/org/apache/commons/math/linear/AbstractFieldMatrix_transpose_607.java
|
ea8014b878b595bd7c79eb3106e44f6da11376d2
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,810
|
java
|
org apach common math linear
basic implement link field matrix fieldmatrix method underli storag
method implement link entri getentri access
matrix element deriv provid faster implement
param type field element
version revis date
abstract field matrix abstractfieldmatrix field element fieldel field matrix fieldmatrix
inherit doc inheritdoc
field matrix fieldmatrix transpos
row nrow row dimens getrowdimens
col ncol column dimens getcolumndimens
field matrix fieldmatrix creat matrix creatematrix col ncol row nrow
walk optim order walkinoptimizedord default field matrix preserv visitor defaultfieldmatrixpreservingvisitor field getzero
inherit doc inheritdoc
overrid
visit row column
set entri setentri column row
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
0c926bf6ed1f5d99812630c6814106e990d8a59e
|
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
|
/app/src/main/java/com/syd/source/aosp/external/testng/src/test/java/test/dataprovider/UnnamedDataProviderTest.java
|
1fc5fc9580b28455a9deae53f1089a9baa1aafdc
|
[
"Apache-2.0"
] |
permissive
|
lz-purple/Source
|
a7788070623f2965a8caa3264778f48d17372bab
|
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
|
refs/heads/master
| 2020-12-23T17:03:12.412572
| 2020-01-31T01:54:37
| 2020-01-31T01:54:37
| 237,205,127
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 729
|
java
|
package test.dataprovider;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
* This class/interface
*/
public class UnnamedDataProviderTest {
private boolean m_false = false;
private boolean m_true = false;
@Test(dataProvider = "unnamedDataProvider")
public void doStuff(boolean t) {
if (t) {
m_true = true;
}
if (! t) {
m_false = true;
}
}
@Test(dependsOnMethods = {"doStuff"} )
public void verify() {
Assert.assertTrue(m_true);
Assert.assertTrue(m_false);
}
@DataProvider
public Object[][] unnamedDataProvider() {
return new Object[][] {
{Boolean.TRUE},
{Boolean.FALSE}
};
}
}
|
[
"997530783@qq.com"
] |
997530783@qq.com
|
8b2d22ff22f2b7095a6d172ce5e7280bfa70fc4a
|
62a1719c9c932db99334dc937e71365fb732b363
|
/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMap.java
|
dcf0c1fbe8ebce0b3dd78beb41647f553538d16a
|
[] |
no_license
|
GamerHun1238/liambuddy
|
37fd77c6ff81752e87e693728e12a27c368b9f25
|
a1a9a319dc401c527414c850f11732b431e75208
|
refs/heads/main
| 2023-06-12T10:12:15.787917
| 2021-07-06T17:14:56
| 2021-07-06T17:14:56
| 383,539,574
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,513
|
java
|
package org.apache.commons.collections4.bidimap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.collections4.OrderedBidiMap;
import org.apache.commons.collections4.OrderedMapIterator;
import org.apache.commons.collections4.Unmodifiable;
import org.apache.commons.collections4.iterators.UnmodifiableOrderedMapIterator;
import org.apache.commons.collections4.map.UnmodifiableEntrySet;
import org.apache.commons.collections4.set.UnmodifiableSet;
public final class UnmodifiableOrderedBidiMap<K, V>
extends AbstractOrderedBidiMapDecorator<K, V>
implements Unmodifiable
{
private UnmodifiableOrderedBidiMap<V, K> inverse;
public static <K, V> OrderedBidiMap<K, V> unmodifiableOrderedBidiMap(OrderedBidiMap<? extends K, ? extends V> map)
{
if ((map instanceof Unmodifiable))
{
OrderedBidiMap<K, V> tmpMap = map;
return tmpMap;
}
return new UnmodifiableOrderedBidiMap(map);
}
private UnmodifiableOrderedBidiMap(OrderedBidiMap<? extends K, ? extends V> map)
{
super(map);
}
public void clear()
{
throw new UnsupportedOperationException();
}
public V put(K key, V value)
{
throw new UnsupportedOperationException();
}
public void putAll(Map<? extends K, ? extends V> mapToCopy)
{
throw new UnsupportedOperationException();
}
public V remove(Object key)
{
throw new UnsupportedOperationException();
}
public Set<Map.Entry<K, V>> entrySet()
{
Set<Map.Entry<K, V>> set = super.entrySet();
return UnmodifiableEntrySet.unmodifiableEntrySet(set);
}
public Set<K> keySet()
{
Set<K> set = super.keySet();
return UnmodifiableSet.unmodifiableSet(set);
}
public Set<V> values()
{
Set<V> set = super.values();
return UnmodifiableSet.unmodifiableSet(set);
}
public K removeValue(Object value)
{
throw new UnsupportedOperationException();
}
public OrderedBidiMap<V, K> inverseBidiMap()
{
return inverseOrderedBidiMap();
}
public OrderedMapIterator<K, V> mapIterator()
{
OrderedMapIterator<K, V> it = decorated().mapIterator();
return UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(it);
}
public OrderedBidiMap<V, K> inverseOrderedBidiMap()
{
if (inverse == null) {
inverse = new UnmodifiableOrderedBidiMap(decorated().inverseBidiMap());
inverse.inverse = this;
}
return inverse;
}
}
|
[
"gamerhun1253@gmail.com"
] |
gamerhun1253@gmail.com
|
79f5c98ca7fb2c46b841314df1bbe1e12e4a4dbc
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Codec-18/org.apache.commons.codec.binary.StringUtils/BBC-F0-opt-50/11/org/apache/commons/codec/binary/StringUtils_ESTest_scaffolding.java
|
cf4c220e0a4f1f2d7af8fd4ea90ff8eca99dffc0
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 3,427
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Oct 21 19:09:17 GMT 2021
*/
package org.apache.commons.codec.binary;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class StringUtils_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.codec.binary.StringUtils";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(StringUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.codec.binary.StringUtils",
"org.apache.commons.codec.Charsets",
"org.apache.commons.codec.binary.CharSequenceUtils"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(StringUtils_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.codec.binary.StringUtils",
"org.apache.commons.codec.Charsets",
"org.apache.commons.codec.binary.CharSequenceUtils"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a4efce53ba1ef1e31cf2a62496529ca7329377d1
|
86c01941aa884489dc81e480e27b77f47b77529f
|
/vista/test/vista/db/hdf5/test/TestDataSetRetreive.java
|
694f9880636e965c4dbb579367f4c3592564f03a
|
[] |
no_license
|
CADWRDeltaModeling/dsm2-vista
|
cdcb3135a4bc8ed2af0d9a5242411b9aadf3e986
|
5115fbae9edae5fa1d90ed795687fd74e69d5051
|
refs/heads/master
| 2023-05-25T13:01:31.466663
| 2023-05-18T18:51:40
| 2023-05-18T18:51:40
| 32,541,476
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,574
|
java
|
package vista.db.hdf5.test;
import java.util.List;
import junit.framework.TestCase;
import ncsa.hdf.object.Attribute;
import ncsa.hdf.object.HObject;
import ncsa.hdf.object.h5.H5File;
import ncsa.hdf.object.h5.H5ScalarDS;
import vista.set.RegularTimeSeries;
import vista.set.TimeSeries;
import vista.time.Time;
import vista.time.TimeFactory;
import vista.time.TimeInterval;
public class TestDataSetRetreive extends TestCase {
public void testDataSetRetrieve() throws Exception {
H5File h5File = new H5File(
"test/hist.h5");
h5File = new H5File("d:/temp/test_big.h5");
int fileId = h5File.open();
assertTrue(fileId > 0);
HObject hObject = h5File.get("/hydro/data/channel flow");
assertNotNull(hObject);
assertTrue(hObject instanceof H5ScalarDS);
H5ScalarDS ds = (H5ScalarDS) hObject;
//
List<Attribute> metadata = ds.getMetadata();
long[] startDims = ds.getStartDims();
long[] stride = ds.getStride();
long[] selectedDims = ds.getSelectedDims();
long[] dims = ds.getDims();
//
startDims[0] = 0; // beginining of time
startDims[1] = 0; // up node/ down node
startDims[2] = 0; // channel no
//
stride[0] = 1;
stride[1] = 1;
stride[2] = 1;
//
selectedDims[0] = dims[0]; // end of time
selectedDims[1] = 1; // just that node
selectedDims[2] = 1; // just that channel
//
int i = 1;
startDims[1] = 1;
startDims[2] = i;
//
Object data = ds.read();
assertTrue(data instanceof float[]);
float[] dataArray = (float[]) data;
assertNotNull(dataArray);
assertTrue(dataArray.length >= 400);
assertNotNull(data);
double[] xdataArray = new double[dataArray.length];
for (int j = 0; j < xdataArray.length; j++) {
xdataArray[j] = dataArray[j];
}
Time startTime = null;
TimeInterval timeInterval = null;
for (Attribute attribute : metadata) {
String name = attribute.getName();
Object value = attribute.getValue();
if (name.equals("CLASS")) {
} else if (name.equals("start_time")) {
String tmstr = ((String[]) value)[0];
startTime = TimeFactory.getInstance().createTime(tmstr,
"yyyy-MM-dd HH:mm:ss");
} else if (name.equals("interval")) {
String intervalAsString = ((String[]) value)[0];
timeInterval = TimeFactory.getInstance().createTimeInterval(
intervalAsString);
}
}
TimeSeries ts = new RegularTimeSeries("/hydro/channel " + i
+ " upnode/channel flow//1hour/version8/", startTime,
timeInterval, xdataArray, null, null);
System.out.println(ts);
}
}
|
[
"psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06"
] |
psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06
|
b58ac8ed45ac662f0109c719550b7fd2847f17be
|
323c723bdbdc9bdf5053dd27a11b1976603609f5
|
/nssicc/nssicc_web/src/main/java/biz/belcorp/ssicc/web/scdf/action/ProductoSearchAction.java
|
56e5ec71008bcf7987d2816acfa95b29c9409e6f
|
[] |
no_license
|
cbazalar/PROYECTOS_PROPIOS
|
adb0d579639fb72ec7871334163d3fef00123a1c
|
3ba232d1f775afd07b13c8246d0a8ac892e93167
|
refs/heads/master
| 2021-01-11T03:38:06.084970
| 2016-10-24T01:33:00
| 2016-10-24T01:33:00
| 71,429,267
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,747
|
java
|
package biz.belcorp.ssicc.web.scdf.action;
import java.util.List;
import java.util.Map;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import biz.belcorp.ssicc.dao.model.Pais;
import biz.belcorp.ssicc.dao.model.Usuario;
import biz.belcorp.ssicc.dao.scdf.model.Producto;
import biz.belcorp.ssicc.service.exception.InvalidDescriptionException;
import biz.belcorp.ssicc.service.exception.InvalidIdentifierException;
import biz.belcorp.ssicc.service.scdf.InterfazSiCCService;
import biz.belcorp.ssicc.service.scdf.ProductoService;
import biz.belcorp.ssicc.web.framework.base.action.BaseMantenimientoSearchAbstractAction;
import biz.belcorp.ssicc.web.framework.base.form.BaseEditForm;
import biz.belcorp.ssicc.web.framework.base.form.BaseSearchForm;
import biz.belcorp.ssicc.web.framework.util.DataTableModel;
import biz.belcorp.ssicc.web.scdf.form.ProductoForm;
import biz.belcorp.ssicc.web.scdf.form.ProductoSearchForm;
@ManagedBean
@SessionScoped
@SuppressWarnings({"rawtypes","unchecked"})
public class ProductoSearchAction extends BaseMantenimientoSearchAbstractAction
{
/**
*
*/
private static final long serialVersionUID = -2057856765245873806L;
@Override
protected String getSalirForward()
{
return "productoList";
}
@Override
protected String getPaginaMantenimiento() throws Exception
{
return "productoForm";
}
@Override
protected BaseSearchForm devuelveFormBusqueda() throws Exception
{
ProductoSearchForm searchForm = new ProductoSearchForm();
return searchForm;
}
@Override
protected List setFindAttributes() throws Exception
{
if (log.isDebugEnabled()) {
log.debug("Entering 'search' method");
}
Pais pais = this.mPantallaPrincipalBean.getCurrentCountry();
ProductoSearchForm searchForm = (ProductoSearchForm) this.formBusqueda;
// Obtenemos las propiedades del bean como un 'Map'
Map criteria = BeanUtils.describe(searchForm);
// Modificamos los valores que requieren el caracter '%'
criteria.put("codigoPais", pais.getCodigo());
if (StringUtils.isNotBlank(searchForm.getCodigoProducto())) {
criteria.put("codigoProducto", searchForm.getCodigoProducto());
}
if (StringUtils.isNotBlank(searchForm.getDescripcionProducto())) {
criteria.put("descripcionProducto", searchForm.getDescripcionProducto() + "%");
}
if (log.isDebugEnabled()) {
log.debug(criteria.toString());
}
ProductoService service = (ProductoService) getBean("scdf.productoService");
List lista = service.getProductosByCriteria(criteria);
return lista;
}
@Override
protected boolean setDeleteAttributes() throws Exception {
// TODO Auto-generated method stub
return false;
}
@Override
protected boolean setSaveAttributes() throws Exception
{
if (log.isDebugEnabled()) {
log.debug("Entering 'setSaveAttributes' method");
}
Pais pais = this.mPantallaPrincipalBean.getCurrentCountry();
// Extraemos atributos y parámetros a usar
ProductoForm productoForm = (ProductoForm) this.formMantenimiento;
// Extreamos el usuario de la sesión
Usuario usuario = this.mPantallaPrincipalBean.getCurrentUser();
// Creamos la instancia del servicio y le asignamos
// el usuario que va a realizar las operaciones
ProductoService service = (ProductoService) getBean("scdf.productoService");
Producto producto = new Producto();
BeanUtils.copyProperties(producto, productoForm);
producto.setCodigoPais(pais.getCodigo());
try {
service.updateProducto(producto, usuario);
} catch (InvalidIdentifierException iie)
{
String codigo = iie.getIdentifier().toString();
throw new Exception(this.getResourceMessage("errors.invalid.id", new Object[]{codigo}));
} catch (InvalidDescriptionException ide)
{
String descripcion = ide.getDescription();
throw new Exception(this.getResourceMessage("errors.invalid.description", new Object[]{descripcion}));
}
return true;
}
@Override
protected BaseEditForm setObtenerRegistroAttributes() throws Exception
{
// TODO Auto-generated method stub
// return null;
ProductoForm productoForm = new ProductoForm();
Producto productobusqueda = (Producto)this.beanRegistroSeleccionado;
Pais pais = this.mPantallaPrincipalBean.getCurrentCountry();
// Si el id ha sido enviado, buscamos la informacion
// en caso contrario, no hacemos nada, se esta insertando
// un nuevo registro a la aplicación
if (productobusqueda.getCodigo() != null) {
if (log.isDebugEnabled()) {
log.debug("Id seleccionado de la lista: " + productobusqueda.getCodigo());
}
Producto parametro = new Producto();
parametro.setCodigo(productobusqueda.getCodigo());
parametro.setCodigoPais(pais.getCodigo());
ProductoService service = (ProductoService) getBean("scdf.productoService");
Producto producto = (Producto) service.getProducto(parametro);
BeanUtils.copyProperties(productoForm, producto);
productoForm.setNewRecord(false);
}
return productoForm;
}
@Override
protected void setViewAtributes() throws Exception
{
this.mostrarBotonConsultar = false;
this.mostrarBotonNuevo = false;
this.mostrarBotonEliminar = false;
this.datatableBusqueda = new DataTableModel(this.listaBusqueda);
this.salirGrabarPantallaPadre = true;
}
@Override
protected String devuelveMensajeKeySaveOK() {
ProductoForm productoForm = (ProductoForm) this.formMantenimiento;
boolean isNew = productoForm.isNewRecord();
if(isNew){
return "";
}else{
return "producto.updated";
}
}
public void refrescar(ActionEvent event)
{
try {
if (log.isDebugEnabled()) {
log.debug("Entering 'refresh' method");
}
Pais pais = this.mPantallaPrincipalBean.getCurrentCountry();
// Extreamos el usuario de la sesión
Usuario usuario = this.mPantallaPrincipalBean.getCurrentUser();
InterfazSiCCService service = (InterfazSiCCService) getBean("scdf.interfazSiCCService");
service.executeCargaProductos(pais.getCodigo(), usuario.getLogin());
this.listaBusqueda = this.setFindAttributes();
this.datatableBusqueda = new DataTableModel(this.listaBusqueda);
this.addInfo("", this.getResourceMessage("producto.refreshed"));
} catch (Exception e) {
this.addError("Error: ", this.obtieneMensajeErrorException(e));
}
}
@Override
public String setValidarConfirmar(String accion) {
return "";
}
}
|
[
"cbazalarlarosa@gmail.com"
] |
cbazalarlarosa@gmail.com
|
501d8d38a273b727f521f67d03c1d454f2292510
|
beffc6542dc4bf85946ceca7cca4a31ac230d376
|
/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java
|
bef9073451b2ee01d237e9dcd10616e93508c66a
|
[
"Apache-2.0"
] |
permissive
|
ZhouKaiDongGitHub/spring-boot-2.0.x
|
4395970b183eff7321748d4ad0155784aa94eaa6
|
3f443764747c4ee01085bed6381292fa44744a49
|
refs/heads/master
| 2023-01-07T07:27:51.067468
| 2020-09-13T07:13:04
| 2020-09-13T07:13:04
| 215,676,265
| 1
| 0
|
Apache-2.0
| 2022-12-27T14:52:46
| 2019-10-17T01:24:02
|
Java
|
UTF-8
|
Java
| false
| false
| 3,792
|
java
|
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.testsupport.testcontainers.CassandraContainer;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.data.cassandra.config.CassandraSessionFactoryBean;
import org.springframework.data.cassandra.config.SchemaAction;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link CassandraDataAutoConfiguration} that require a Cassandra instance.
*
* @author Mark Paluch
* @author Stephane Nicoll
*/
public class CassandraDataAutoConfigurationIntegrationTests {
@ClassRule
public static CassandraContainer cassandra = new CassandraContainer();
private AnnotationConfigApplicationContext context;
@Before
public void setUp() {
this.context = new AnnotationConfigApplicationContext();
TestPropertyValues
.of("spring.data.cassandra.port=" + cassandra.getMappedPort(),
"spring.data.cassandra.read-timeout=24000", "spring.data.cassandra.connect-timeout=10000")
.applyTo(this.context.getEnvironment());
}
@After
public void close() {
if (this.context != null) {
this.context.close();
}
}
@Test
public void hasDefaultSchemaActionSet() {
String cityPackage = City.class.getPackage().getName();
AutoConfigurationPackages.register(this.context, cityPackage);
this.context.register(CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class);
this.context.refresh();
CassandraSessionFactoryBean bean = this.context.getBean(CassandraSessionFactoryBean.class);
assertThat(bean.getSchemaAction()).isEqualTo(SchemaAction.NONE);
}
@Test
public void hasRecreateSchemaActionSet() {
createTestKeyspaceIfNotExists();
String cityPackage = City.class.getPackage().getName();
AutoConfigurationPackages.register(this.context, cityPackage);
TestPropertyValues.of("spring.data.cassandra.schemaAction=recreate_drop_unused",
"spring.data.cassandra.keyspaceName=boot_test").applyTo(this.context);
this.context.register(CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class);
this.context.refresh();
CassandraSessionFactoryBean bean = this.context.getBean(CassandraSessionFactoryBean.class);
assertThat(bean.getSchemaAction()).isEqualTo(SchemaAction.RECREATE_DROP_UNUSED);
}
private void createTestKeyspaceIfNotExists() {
Cluster cluster = Cluster.builder().withPort(cassandra.getMappedPort()).addContactPoint("localhost").build();
try (Session session = cluster.connect()) {
session.execute("CREATE KEYSPACE IF NOT EXISTS boot_test"
+ " WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };");
}
}
}
|
[
"Kaidong.Zhou@eisgroup.com"
] |
Kaidong.Zhou@eisgroup.com
|
7509616eb149dd683af40ddba04f9b8cbb7c8a91
|
3a0a51add2930bb96b8b6ea2cd76a4fe47cda032
|
/experiments/subjects/jfreechart/src/test/java/org/jfree/chart/labels/StandardXYToolTipGeneratorTest.java
|
843413b34ff801c02327ac4e78dfe0088a48647e
|
[
"MIT",
"GPL-3.0-only",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"LGPL-2.1-or-later",
"LGPL-2.1-only"
] |
permissive
|
soneyahossain/hcc-gap-recommender
|
d313efb6b44ade04ef02e668ee06d29ae2fbb002
|
b2c79532d5246c8b52e2234f99dc62a26b3f364b
|
refs/heads/main
| 2023-04-14T08:11:22.986933
| 2023-01-27T00:01:09
| 2023-01-27T00:01:09
| 589,493,747
| 5
| 1
|
MIT
| 2023-03-16T15:41:47
| 2023-01-16T08:53:46
|
Java
|
UTF-8
|
Java
| false
| false
| 5,634
|
java
|
/* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2016, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.]
*
* -----------------------------------
* StandardXYToolTipGeneratorTest.java
* -----------------------------------
* (C) Copyright 2004-2016, by Object Refinery Limited and Contributors.
*
* Original Author: David Gilbert (for Object Refinery Limited);
* Contributor(s): -;
*
* Changes
* -------
* 11-May-2004 : Version 1 (DG);
* 23-Apr-2008 : Added testPublicCloneable() (DG);
*
*/
package org.jfree.chart.labels;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import org.jfree.chart.TestUtils;
import org.jfree.chart.util.PublicCloneable;
import org.junit.Test;
/**
* Tests for the {@link StandardXYToolTipGenerator} class.
*/
public class StandardXYToolTipGeneratorTest {
/**
* Tests the equals() method.
*/
@Test
public void testEquals() {
// some setup...
String f1 = "{1}";
String f2 = "{2}";
NumberFormat xnf1 = new DecimalFormat("0.00");
NumberFormat xnf2 = new DecimalFormat("0.000");
NumberFormat ynf1 = new DecimalFormat("0.00");
NumberFormat ynf2 = new DecimalFormat("0.000");
StandardXYToolTipGenerator g1 = null;
StandardXYToolTipGenerator g2 = null;
g1 = new StandardXYToolTipGenerator(f1, xnf1, ynf1);
g2 = new StandardXYToolTipGenerator(f1, xnf1, ynf1);
assertTrue(g1.equals(g2));
assertTrue(g2.equals(g1));
g1 = new StandardXYToolTipGenerator(f2, xnf1, ynf1);
assertFalse(g1.equals(g2));
g2 = new StandardXYToolTipGenerator(f2, xnf1, ynf1);
assertTrue(g1.equals(g2));
g1 = new StandardXYToolTipGenerator(f2, xnf2, ynf1);
assertFalse(g1.equals(g2));
g2 = new StandardXYToolTipGenerator(f2, xnf2, ynf1);
assertTrue(g1.equals(g2));
g1 = new StandardXYToolTipGenerator(f2, xnf2, ynf2);
assertFalse(g1.equals(g2));
g2 = new StandardXYToolTipGenerator(f2, xnf2, ynf2);
assertTrue(g1.equals(g2));
DateFormat xdf1 = new SimpleDateFormat("d-MMM");
DateFormat xdf2 = new SimpleDateFormat("d-MMM-yyyy");
DateFormat ydf1 = new SimpleDateFormat("d-MMM");
DateFormat ydf2 = new SimpleDateFormat("d-MMM-yyyy");
g1 = new StandardXYToolTipGenerator(f1, xdf1, ydf1);
g2 = new StandardXYToolTipGenerator(f1, xdf1, ydf1);
assertTrue(g1.equals(g2));
assertTrue(g2.equals(g1));
g1 = new StandardXYToolTipGenerator(f1, xdf2, ydf1);
assertFalse(g1.equals(g2));
g2 = new StandardXYToolTipGenerator(f1, xdf2, ydf1);
assertTrue(g1.equals(g2));
g1 = new StandardXYToolTipGenerator(f1, xdf2, ydf2);
assertFalse(g1.equals(g2));
g2 = new StandardXYToolTipGenerator(f1, xdf2, ydf2);
assertTrue(g1.equals(g2));
}
/**
* Simple check that hashCode is implemented.
*/
@Test
public void testHashCode() {
StandardXYToolTipGenerator g1
= new StandardXYToolTipGenerator();
StandardXYToolTipGenerator g2
= new StandardXYToolTipGenerator();
assertTrue(g1.equals(g2));
assertTrue(g1.hashCode() == g2.hashCode());
}
/**
* Confirm that cloning works.
*/
@Test
public void testCloning() throws CloneNotSupportedException {
StandardXYToolTipGenerator g1 = new StandardXYToolTipGenerator();
StandardXYToolTipGenerator g2 = (StandardXYToolTipGenerator) g1.clone();
assertTrue(g1 != g2);
assertTrue(g1.getClass() == g2.getClass());
assertTrue(g1.equals(g2));
}
/**
* Check to ensure that this class implements PublicCloneable.
*/
@Test
public void testPublicCloneable() {
StandardXYToolTipGenerator g1 = new StandardXYToolTipGenerator();
assertTrue(g1 instanceof PublicCloneable);
}
/**
* Serialize an instance, restore it, and check for equality.
*/
@Test
public void testSerialization() {
StandardXYToolTipGenerator g1 = new StandardXYToolTipGenerator();
StandardXYToolTipGenerator g2 = (StandardXYToolTipGenerator)
TestUtils.serialised(g1);
assertEquals(g1, g2);
}
}
|
[
"an7s@virginia.edu"
] |
an7s@virginia.edu
|
c98203ca1e4e985ff8b0b25c04c1f671bc9b73dd
|
b79d189fc142f49adc1c34dd9a72bb82926a5a87
|
/Academico3C/src/main/java/pe/edu/upeu/web/LanguageBean.java
|
02cc0cf03f32f4456e60358744615247a3779155
|
[] |
no_license
|
davidmp/ProyectJavaArquitecturas
|
c749fba1bf184167f328d60a2638f2123d805212
|
8c780af50c9930973f870e290674c0cfac110790
|
refs/heads/master
| 2020-03-26T21:55:08.801988
| 2018-11-21T17:12:08
| 2018-11-21T17:12:08
| 145,417,711
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,382
|
java
|
package pe.edu.upeu.web;
import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
@ManagedBean(name="language")
@SessionScoped
public class LanguageBean implements Serializable{
private static final long serialVersionUID = 1L;
private String localeCode;
private static Map<String,Object> countries;
static{
countries = new LinkedHashMap<String,Object>();
countries.put("English", Locale.ENGLISH); //label, value
countries.put("Chinese", Locale.SIMPLIFIED_CHINESE);
}
public Map<String, Object> getCountriesInMap() {
return countries;
}
public String getLocaleCode() {
return localeCode;
}
public void setLocaleCode(String localeCode) {
this.localeCode = localeCode;
}
public void countryLocaleCodeChanged(ValueChangeEvent e){
String newLocaleValue = e.getNewValue().toString();
//loop a map to compare the locale code
for (Map.Entry<String, Object> entry : countries.entrySet()) {
if(entry.getValue().toString().equals(newLocaleValue)){
FacesContext.getCurrentInstance()
.getViewRoot().setLocale((Locale)entry.getValue());
}
}
}
}
|
[
"mamanipari@gmail.com"
] |
mamanipari@gmail.com
|
5f8f65240274a3f3c86018a4f22490bbb2834c54
|
da0efa8ffd08b86713aad007f10794c4b04d8267
|
/com/google/android/gms/internal/cx.java
|
f52148fc0f92297299ae9442968dd7e286204135
|
[] |
no_license
|
ibeae/tcash
|
e200c209c63fdfe63928b94846824d7091533f8a
|
4bd25deb63ea7605202514f6a405961a14ef2553
|
refs/heads/master
| 2020-05-05T13:09:34.582260
| 2017-09-07T06:19:19
| 2017-09-07T06:19:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,899
|
java
|
package com.google.android.gms.internal;
import com.facebook.AppEventsConstants;
import com.facebook.internal.NativeProtocol;
import com.facebook.internal.ServerProtocol;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
class cx {
private final List<String> f1230a;
private final List<String> f1231b;
private final String f1232c;
private final String f1233d;
private final String f1234e;
private final String f1235f;
private final String f1236g;
private final boolean f1237h;
private final int f1238i;
public cx(Map<String, String> map) {
this.f1236g = (String) map.get(NativeProtocol.IMAGE_URL_KEY);
this.f1233d = (String) map.get("base_uri");
this.f1234e = (String) map.get("post_parameters");
this.f1237h = m2006a((String) map.get("drt_include"));
this.f1232c = (String) map.get("activation_overlay_url");
this.f1231b = m2007b((String) map.get("check_packages"));
this.f1238i = m2008c((String) map.get("request_id"));
this.f1235f = (String) map.get("type");
this.f1230a = m2007b((String) map.get("errors"));
}
private static boolean m2006a(String str) {
return str != null && (str.equals(AppEventsConstants.EVENT_PARAM_VALUE_YES) || str.equals(ServerProtocol.DIALOG_RETURN_SCOPES_TRUE));
}
private List<String> m2007b(String str) {
return str == null ? null : Arrays.asList(str.split(","));
}
private int m2008c(String str) {
return str == null ? 0 : Integer.parseInt(str);
}
public List<String> m2009a() {
return this.f1230a;
}
public String m2010b() {
return this.f1234e;
}
public String m2011c() {
return this.f1236g;
}
public String m2012d() {
return this.f1235f;
}
public boolean m2013e() {
return this.f1237h;
}
}
|
[
"igedetirtanata@gmail.com"
] |
igedetirtanata@gmail.com
|
d89ae8e9cf5c1ba34769898966af8ea4d6244500
|
4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d
|
/src/main/java/com/alipay/api/domain/PointsExchangeInfo.java
|
f7f2189ce58fdcd66ace103adae93daf5da4110f
|
[
"Apache-2.0"
] |
permissive
|
weizai118/payment-alipay
|
042898e172ce7f1162a69c1dc445e69e53a1899c
|
e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1
|
refs/heads/master
| 2020-04-05T06:29:57.113650
| 2018-11-06T11:03:05
| 2018-11-06T11:03:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,115
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 积分兑换内容
*
* @author auto create
* @since 1.0, 2018-05-23 20:58:14
*/
public class PointsExchangeInfo extends AlipayObject {
private static final long serialVersionUID = 4374239284737364996L;
/**
* 兑换内容的ID
*/
@ApiListField("ids")
@ApiField("string")
private List<String> ids;
/**
* 积分兑换内容的类型,比如券
*/
@ApiField("type")
private String type;
/**
* Gets ids.
*
* @return the ids
*/
public List<String> getIds() {
return this.ids;
}
/**
* Sets ids.
*
* @param ids the ids
*/
public void setIds(List<String> ids) {
this.ids = ids;
}
/**
* Gets type.
*
* @return the type
*/
public String getType() {
return this.type;
}
/**
* Sets type.
*
* @param type the type
*/
public void setType(String type) {
this.type = type;
}
}
|
[
"hanley@thlws.com"
] |
hanley@thlws.com
|
f907c2e9ed688d4a12318cac89845381d2457ef0
|
83593598f21cba234f08eca4dec44d2f73a6052d
|
/prj/commodity/web-broker/web-broker-common/src/main/java/gnnt/MEBS/common/broker/common/QueryConditions.java
|
caa6c9e541de6b999b219e76d52ad29149a35a5a
|
[
"Apache-2.0"
] |
permissive
|
bigstar18/prjs
|
23a04309a51b0372ddf6c391ee42270e640ec13c
|
c29da4d0892ce43e074d9e9831f1eedf828cd9d8
|
refs/heads/master
| 2021-05-31T19:55:16.217893
| 2016-06-24T02:35:31
| 2016-06-24T02:35:31
| 42,025,473
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,005
|
java
|
package gnnt.MEBS.common.broker.common;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
public class QueryConditions
{
private List<Condition> conditionList = new ArrayList();
public QueryConditions(List<Condition> paramList)
{
this.conditionList = paramList;
}
public QueryConditions()
{
}
public QueryConditions(String paramString1, String paramString2, Object paramObject)
{
addCondition(paramString1, paramString2, paramObject);
}
public void addCondition(String paramString1, String paramString2, Object paramObject)
{
this.conditionList.add(new Condition(paramString1, paramString2, paramObject));
}
public void removeCondition(String paramString)
{
for (int i = 0; i < this.conditionList.size(); i++)
{
Condition localCondition = (Condition)this.conditionList.get(i);
if (localCondition.getField().equals(paramString))
this.conditionList.remove(i);
}
}
public void removeCondition(String paramString1, String paramString2)
{
for (int i = 0; i < this.conditionList.size(); i++)
{
Condition localCondition = (Condition)this.conditionList.get(i);
if ((localCondition.getField().equals(paramString1)) && (localCondition.getOperator().equals(paramString2)))
this.conditionList.remove(i);
}
}
public String getFieldsSqlClause()
{
String str = null;
if ((this.conditionList != null) && (this.conditionList.size() > 0))
{
Condition localCondition = null;
for (int i = 0; i < this.conditionList.size(); i++)
{
localCondition = (Condition)this.conditionList.get(i);
if (str != null)
str = str + " and " + localCondition.getSqlClause();
else
str = localCondition.getSqlClause();
}
}
return str;
}
public Object[] getValueArray()
{
Object[] arrayOfObject = null;
if ((this.conditionList != null) && (this.conditionList.size() > 0))
{
Condition localCondition = null;
ArrayList localArrayList = new ArrayList();
for (int i = 0; i < this.conditionList.size(); i++)
{
localCondition = (Condition)this.conditionList.get(i);
Object localObject = localCondition.getSqlValue();
if (localObject != null)
localArrayList.add(localObject);
}
arrayOfObject = localArrayList.toArray();
}
return arrayOfObject;
}
public Object getConditionValue(String paramString)
{
if (paramString == null)
return null;
for (int i = 0; i < this.conditionList.size(); i++)
{
Condition localCondition = (Condition)this.conditionList.get(i);
if (paramString.equals(localCondition.getField()))
return localCondition.getValue();
}
return null;
}
public Object getConditionValue(String paramString1, String paramString2)
{
if ((paramString1 == null) || (paramString2 == null))
return null;
for (int i = 0; i < this.conditionList.size(); i++)
{
Condition localCondition = (Condition)this.conditionList.get(i);
if ((paramString1.equals(localCondition.getField())) && (paramString2.equals(localCondition.getOperator())))
return localCondition.getValue();
}
return null;
}
public List<Condition> getConditionList()
{
return this.conditionList;
}
public void setConditionList(List<Condition> paramList)
{
this.conditionList = paramList;
}
public static void main(String[] paramArrayOfString)
{
QueryConditions localQueryConditions = new QueryConditions("code", "=", "");
localQueryConditions.addCondition("code", "is", "null");
localQueryConditions.addCondition("code", "is", "not null");
System.out.println(localQueryConditions.getFieldsSqlClause());
System.out.println(localQueryConditions.getValueArray().length);
}
}
|
[
"hxx@hxx-PC"
] |
hxx@hxx-PC
|
fd127edda40a6f3526638596a28130ed00bfb7cb
|
f5eb9262ae9cb7cf150640c314144a917b20fa9d
|
/src/main/java/com/evacipated/cardcrawl/mod/hubris/actions/unique/StartNewTurnAction.java
|
9923bc209fbc59f660d18d1793968445ba9a9def
|
[] |
no_license
|
kiooeht/Hubris
|
475e826d816a4cf33033feb5cacffa28d1b9390c
|
7d3a0d1bff0ff6229542790c9ecbb1036c7b257a
|
refs/heads/master
| 2023-05-13T19:07:45.388315
| 2023-05-04T03:43:46
| 2023-05-04T03:43:46
| 149,699,046
| 6
| 16
| null | 2019-03-17T23:34:35
| 2018-09-21T02:31:44
|
Java
|
UTF-8
|
Java
| false
| false
| 465
|
java
|
package com.evacipated.cardcrawl.mod.hubris.actions.unique;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
public class StartNewTurnAction extends AbstractGameAction
{
@Override
public void update()
{
isDone = true;
AbstractDungeon.actionManager.actions.remove(AbstractDungeon.actionManager.actions.size()-1);
AbstractDungeon.actionManager.endTurn();
}
}
|
[
"kiooeht@gmail.com"
] |
kiooeht@gmail.com
|
2f710cad639216158dc74f79e5055718d9f28633
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_d907e7b6cd4c87c2e5743a3ec61a54dc9b0d46ac/UdpTransport/31_d907e7b6cd4c87c2e5743a3ec61a54dc9b0d46ac_UdpTransport_t.java
|
f8f6fc0a6a9424b83a6dceade3c54128b8bd34f8
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,936
|
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.directory.server.protocol.shared.transport;
import java.net.InetSocketAddress;
import org.apache.mina.core.service.IoAcceptor;
import org.apache.mina.transport.socket.DatagramAcceptor;
import org.apache.mina.transport.socket.nio.NioDatagramAcceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @org.apache.xbean.XBean
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
public class UdpTransport extends AbstractTransport
{
/** A logger for this class */
private static final Logger LOG = LoggerFactory.getLogger( UdpTransport.class );
/**
* Creates an instance of the UdpTransport class
*/
public UdpTransport()
{
super();
}
/**
* Creates an instance of the UdpTransport class on localhost
* @param udpPort The port
*/
public UdpTransport( int udpPort )
{
super( udpPort );
this.acceptor = createAcceptor( null, udpPort );
LOG.debug( "UDP Transport created : <*:{},>", udpPort );
}
/**
* Creates an instance of the UdpTransport class
* @param address The address
* @param udpPort The port
*/
public UdpTransport( String address, int udpPort )
{
super( address, udpPort );
this.acceptor = createAcceptor( address, udpPort );
LOG.debug( "UDP Transport created : <{}:{},>", address, udpPort );
}
/**
* Initialize the Acceptor if needed
*/
public void init()
{
acceptor = createAcceptor( getAddress(), getPort() );
LOG.debug( "UDP Transport created : <{}:{},>", getAddress(), getPort() );
}
/**
* @return The associated DatagramAcceptor
*/
public DatagramAcceptor getAcceptor()
{
if( ( acceptor != null ) && acceptor.isDisposed() )
{
acceptor = createAcceptor( getAddress(), getPort() );
}
return acceptor == null ? null : (DatagramAcceptor)acceptor;
}
/**
* Helper method to create an IoAcceptor
*/
private IoAcceptor createAcceptor( String address, int port )
{
NioDatagramAcceptor acceptor = new NioDatagramAcceptor();
InetSocketAddress socketAddress = null;
// The address can be null here, if one want to connect using the wildcard address
if ( address == null )
{
// Create a socket listening on the wildcard address
socketAddress = new InetSocketAddress( port );
}
else
{
socketAddress = new InetSocketAddress( address, port );
}
acceptor.setDefaultLocalAddress( socketAddress );
return acceptor;
}
/**
* @see Object#toString()
*/
public String toString()
{
return "UdpTransport" + super.toString();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
179b63ce3456134ecb4be5e773f6bd0f0244fb34
|
69aa67ad5ff9e0762cbb4a6674a43cf467f31e21
|
/src/com/codingblocks/lecture_12/DynamicStack.java
|
c1bfbb0e536118085c6e2210217b92db0568226c
|
[] |
no_license
|
shobhu98/Crux-Noida-2018-Dec-Morning
|
705e19761974805d6e53f8f114b7535585f9e0ab
|
d07e79fe5b075f113a8666daf0504b8c4298d5a8
|
refs/heads/master
| 2021-10-20T21:48:23.749131
| 2019-03-02T04:55:13
| 2019-03-02T04:55:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 420
|
java
|
package com.codingblocks.lecture_12;
import com.codingblocks.lecture_10.Stack;
public class DynamicStack extends Stack {
@Override
public void push(int item) {
if (isFull()){
int[] temp = new int[data.length * 2];
for (int i = 0; i < data.length; i++) {
temp[i] = data[i];
}
data = temp;
}
super.push(item);
}
}
|
[
"anujgargcse@gmail.com"
] |
anujgargcse@gmail.com
|
24a5e8a10cf8f1060554102182fa6a3d65afa9db
|
22eace99be67c1c036f2d34a348e2b603753cdf6
|
/app/src/main/java/com/star/starbuzz/TopLevelActivity.java
|
9b6db0dd69288fbc659a1c5cd42d430eaf079a69
|
[] |
no_license
|
crystalDf/Head-First-Android-Development-Chapter-11-Starbuzz
|
825ebcd9986f80d431eecf4cf94bc1859e059ef4
|
5613450c77579ff937b346387653e785128f4636
|
refs/heads/master
| 2020-04-12T10:56:39.606831
| 2015-09-18T15:46:04
| 2015-09-18T15:46:04
| 42,730,691
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,051
|
java
|
package com.star.starbuzz;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
public class TopLevelActivity extends AppCompatActivity {
private ListView mListView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_top_level);
mListView = (ListView) findViewById(R.id.list_options);
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0:
Intent intent = new Intent(TopLevelActivity.this,
DrinkCategoryActivity.class);
startActivity(intent);
}
}
});
}
}
|
[
"chendong333@gmail.com"
] |
chendong333@gmail.com
|
61e018561e4b70f0fcd59eba3b08102d55f141e3
|
a862a140dd6a5c63b4f709c5cdc6cf75d319dcdf
|
/Jn-IDE-AndroidSample/WrapperClassesAndJavaLangPackage/LongWrapperClass/src/main/java/sample/longToLongExample.java
|
2bee3563620181f85403ebbb1a0a60036f37b222
|
[] |
no_license
|
MartyMcAir/FromAppsAndBooks
|
2e730d480737784b9bfff3f49169fdec2fa0448c
|
7bcbd405053474630c5b5e78d70da1128885fc82
|
refs/heads/master
| 2022-02-06T06:14:15.738157
| 2022-02-01T12:18:37
| 2022-02-01T12:18:37
| 222,210,663
| 3
| 0
| null | 2021-08-02T17:19:31
| 2019-11-17T07:07:59
|
Java
|
UTF-8
|
Java
| false
| false
| 442
|
java
|
package sample;
/*
Convert long primitive to Long object Example
This example shows how a long primitive value can be converted to Long object
*/
public class longToLongExample {
public static void main(String[] args) {
long i = 10;
/*
Use Long constructor to convert long primitive type to Long object.
*/
Long lObj = new Long(i);
System.out.println(lObj);
}
}
/*
Output of the program would be
10
*/
|
[
"martymcair@gmail.com"
] |
martymcair@gmail.com
|
ee34615c6b65067e4d3197c4d4eb33d54ed61375
|
174927158a2846c6908f0154bbae3137c99b4c3a
|
/src/main/java/org/cosmo/common/record/IndexDocument.java
|
af7f06a48b7efc73610e292cf3b9d9ce56919d97
|
[] |
no_license
|
cosmoking/cosmo
|
6b71387d2b9f3cdfaa1f7c8cc93dc1bc9c2d2818
|
54701e3aef0104f3c910de2e5a08e91fe33ee841
|
refs/heads/master
| 2021-01-01T17:21:26.105294
| 2012-05-29T04:17:36
| 2012-05-29T04:17:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,335
|
java
|
/*******************************************************************************
* Copyright 2012 Jack Wang
*
* 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.cosmo.common.record;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.List;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.NumericField;
import org.apache.lucene.index.Term;
import ariba.util.core.Assert;
import ariba.util.core.Fmt;
public class IndexDocument
{
public static final String RecordId = "id";
Document _document;
Index _index;
long _id;
public IndexDocument (Index index, long id)
{
_document = new Document();
_index = index;
_id = id;
}
public void addField (Defn defn, Object fieldValue)
{
if (defn._isIndexField && fieldValue != null) {
fieldValue = defn.fmt(fieldValue, Defn.FormatType.ForIndex);
//XXX Field.Index.ANALYZED will tokenize the terms ie search "A" will return "A B C" but not "A B C"
addField(defn.getIndexFieldName(), (String)fieldValue, defn.getIndexType());
}
}
public void addField (String fieldName, String fieldValue, Field.Index type)
{
Field field = new Field(fieldName, fieldValue , Field.Store.NO, type);
_document.add(field);
}
public void addNumericField (String fieldName, long fieldValue)
{
NumericField field = new NumericField(fieldName, Field.Store.NO, true);
field.setLongValue(fieldValue);
}
public void save (boolean insert)
throws IOException
{
if (insert) {
_document.add(new Field(RecordId, String.valueOf(_id), Field.Store.YES, Field.Index.NOT_ANALYZED));
_index._indexWriter.addDocument(_document);
}
else {
Term term = new Term(RecordId, String.valueOf(_id));
_index._indexWriter.updateDocument(term, _document);
}
}
// XXX This actually changes lucene docid to recordid mapping because
// the updated docid will now be inconsistent with recordid
// need to have a way to resolve that during search
// perhaps introduce a new Field "Header" type
public void update (Defn defn, Object fieldValue)
throws IOException
{
// XX remove this when we have a fix
if (true) {
return;
}
if (defn._isIndexField && fieldValue != null) {
Record record = defn._declaringMeta.store().read(_id);
List<Defn> defns = defn._declaringMeta._defns;
for (Defn aDefn : defns) {
if (aDefn == defn || aDefn.equals(defn)) {
addField(aDefn, fieldValue);
continue;
}
if (aDefn._isIndexField && aDefn.getValue(record) != null) {
addField(aDefn, aDefn.getValue(record));
}
}
Term term = new Term(RecordId, String.valueOf(_id));
_index._indexWriter.updateDocument(term, _document);
}
}
}
|
[
"jackwang65@gmail.com"
] |
jackwang65@gmail.com
|
15b5bc5fda910feee89cabb57fa64c06cc7782c2
|
e83dc7f7d63fe78992891d197cefb86047534505
|
/src/main/java/org/bian/dto/CRBranchLocationAdministrativePlanCaptureInputModelCaptureRecordType.java
|
76ee25808540c7bf326bd70d4e96de33d1933d95
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-branch-location-operations-v3
|
d20488c25a1b9cd744bf33af582c61f6105760ca
|
47b3086491c87c6b2c75820664cc326f7444c9d1
|
refs/heads/master
| 2022-12-17T16:52:00.855305
| 2020-09-26T08:41:27
| 2020-09-26T08:41:27
| 297,953,983
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 921
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
/**
* CRBranchLocationAdministrativePlanCaptureInputModelCaptureRecordType
*/
public class CRBranchLocationAdministrativePlanCaptureInputModelCaptureRecordType {
private Object captureInputRecord = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: Structured input transaction/record (e.g. timesheet, event record, account posting)
* @return captureInputRecord
**/
public Object getCaptureInputRecord() {
return captureInputRecord;
}
public void setCaptureInputRecord(Object captureInputRecord) {
this.captureInputRecord = captureInputRecord;
}
}
|
[
"spabandara@Virtusa.com"
] |
spabandara@Virtusa.com
|
122461f448a1b59bda357efb398d2fbf23d1e445
|
8ec2cbabd6125ceeb00e0c6192c3ce84477bdde6
|
/com.nokia.as.gpto.agent/src/com/nokia/as/gpto/agent/impl/ScenarioExecution.java
|
3de252e89fa86da7a1055f4bb4b034237d840322
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
nokia/osgi-microfeatures
|
2cc2b007454ec82212237e012290425114eb55e6
|
50120f20cf929a966364550ca5829ef348d82670
|
refs/heads/main
| 2023-08-28T12:13:52.381483
| 2021-11-12T20:51:05
| 2021-11-12T20:51:05
| 378,852,173
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,163
|
java
|
// Copyright 2000-2021 Nokia
//
// Licensed under the Apache License 2.0
// SPDX-License-Identifier: Apache-2.0
//
package com.nokia.as.gpto.agent.impl;
import java.time.LocalDateTime;
import java.util.Optional;
public class ScenarioExecution {
public enum Mode {
FIXED_RATE, FIXED_DELAY;
}
//TODO: don't expose this to client
private final int runId;
private volatile LocalDateTime start;
private volatile long nanoTimeStart;
private volatile float rate;
private volatile Mode mode;
public ScenarioExecution(int runId) {
super();
this.runId = runId;
this.start = start;
mode = Mode.FIXED_DELAY;
}
public int getRunId() {
return runId;
}
public void setStartDate(LocalDateTime startDate, long nanoTime) {
start = startDate;
nanoTimeStart = nanoTime;
}
public Optional<LocalDateTime> getStartDate() {
return Optional.ofNullable(start);
}
public float getRate() {
return rate;
}
public void setRate(float rate) {
this.rate = rate;
}
public Mode getMode() {
return mode;
}
public void setMode(Mode mode) {
this.mode = mode;
}
public long getNanoTimeStart() {
return nanoTimeStart;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((mode == null) ? 0 : mode.hashCode());
result = prime * result + (int) (nanoTimeStart ^ (nanoTimeStart >>> 32));
result = prime * result + Float.floatToIntBits(rate);
result = prime * result + runId;
result = prime * result + ((start == null) ? 0 : start.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ScenarioExecution other = (ScenarioExecution) obj;
if (mode != other.mode)
return false;
if (nanoTimeStart != other.nanoTimeStart)
return false;
if (Float.floatToIntBits(rate) != Float.floatToIntBits(other.rate))
return false;
if (runId != other.runId)
return false;
if (start == null) {
if (other.start != null)
return false;
} else if (!start.equals(other.start))
return false;
return true;
}
}
|
[
"pierre.de_rop@nokia.com"
] |
pierre.de_rop@nokia.com
|
090a82f44bcb31ad51c06911e32b4775e76e8b7a
|
bf92ea3f90e8a47fa0fc6bf3883e7ed48d7b0106
|
/src/hyFlow/edu/vt/rt/hyflow/benchmark/tm/list2/Node.java
|
a358f129fa7e9363b5eb66b2bb8433175f76022b
|
[] |
no_license
|
junwhan/replication
|
5a34b679774590dbcb01c5dcbe81b93e7ecdcec6
|
a8005e85510a86691731f5640234dd11c07bd3ac
|
refs/heads/master
| 2016-09-05T23:25:24.615598
| 2014-01-02T02:22:53
| 2014-01-02T02:22:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,571
|
java
|
package edu.vt.rt.hyflow.benchmark.tm.list2;
import java.rmi.AccessException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.util.Arrays;
import org.deuce.reflection.AddressUtil;
import org.deuce.transaction.AbstractContext;
import org.deuce.transaction.Context;
import org.deuce.transaction.ContextDelegator;
import aleph.GlobalObject;
import edu.vt.rt.hyflow.HyFlow;
import edu.vt.rt.hyflow.core.AbstractDistinguishable;
import edu.vt.rt.hyflow.core.dir.IHyFlow;
import edu.vt.rt.hyflow.core.tm.control.ControlContext;
import edu.vt.rt.hyflow.core.tm.undoLog.AbstractLoggableObject;
import edu.vt.rt.hyflow.transaction.Remote;
import edu.vt.rt.hyflow.util.io.Logger;
public class Node
extends AbstractLoggableObject // Implementation specific code for UndoLog context
implements IHyFlow{ // Implementation specific code for ControlFlowDirecotry
private Integer value = 0;
public static long value__ADDRESS__;
private String nextId;
public static long nextId__ADDRESS__;
private String id;
public static long id__ADDRESS__;
private $HY$_INode $HY$_proxy;
public static long $HY$_proxy__ADDRESS__;
private Object $HY$_id;
public static long $HY$_id__ADDRESS__;
public static Object __CLASS_BASE__;
{
try{
value__ADDRESS__ = AddressUtil.getAddress(Node.class.getDeclaredField("value"));
nextId__ADDRESS__ = AddressUtil.getAddress(Node.class.getDeclaredField("nextId"));
id__ADDRESS__ = AddressUtil.getAddress(Node.class.getDeclaredField("id"));
$HY$_proxy__ADDRESS__ = AddressUtil.getAddress(Node.class.getDeclaredField("$HY$_proxy"));
$HY$_id__ADDRESS__ = AddressUtil.getAddress(Node.class.getDeclaredField("$HY$_id"));
}catch (Exception e) {
e.printStackTrace();
}
}
public Node(){} // required for control flow model
public Node(String id, Integer value) {
this.id = id;
this.value = value;
AbstractContext context = ContextDelegator.getTopInstance();
if(context==null)
HyFlow.getLocator().register(this); // publish it now
else
context.newObject(this); // add it to context publish-set
}
public void setNext(String nextId){
this.nextId = nextId;
}
public void setNext(String nextId, Context __transactionContext__){
if($HY$_proxy!=null){
try {
$HY$_proxy.setNext($HY$_id, (ControlContext) __transactionContext__, nextId);
return;
} catch (RemoteException e) {
e.printStackTrace();
}
}
ContextDelegator.onWriteAccess(this, nextId, nextId__ADDRESS__, __transactionContext__);
}
public String getNext(){
return nextId;
}
public String getNext(Context __transactionContext__){
if($HY$_proxy!=null){
try {
return $HY$_proxy.getNext($HY$_id, (ControlContext) __transactionContext__);
} catch (RemoteException e) {
e.printStackTrace();
}
}
ContextDelegator.beforeReadAccess(this, nextId__ADDRESS__, __transactionContext__);
return (String)ContextDelegator.onReadAccess(this, nextId, nextId__ADDRESS__, __transactionContext__);
}
public Integer getValue(){
return value;
}
public Integer getValue(Context __transactionContext__){
if($HY$_proxy!=null){
try {
return $HY$_proxy.getValue($HY$_id, (ControlContext) __transactionContext__);
} catch (RemoteException e) {
e.printStackTrace();
}
}
ContextDelegator.beforeReadAccess(this, value__ADDRESS__, __transactionContext__);
return (Integer)ContextDelegator.onReadAccess(this, value, value__ADDRESS__, __transactionContext__);
}
@Override
public Object getId() {
return id;
}
private Long [] ts;
@Override
public Long[] getTS(){
return ts;
}
@Override
public void setTS(Long [] ts){
// for DATS
this.ts = ts;
}
@Override
public void setRemote(Object id, String ownerIP, int ownerPort) {
$HY$_id = id;
try {
$HY$_proxy = (($HY$_INode)LocateRegistry.getRegistry(ownerIP, ownerPort).lookup(getClass().getName()));
} catch (AccessException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (NotBoundException e) {
e.printStackTrace();
} catch (Exception e) {
try {
Logger.debug(Arrays.toString(LocateRegistry.getRegistry(ownerIP, ownerPort).list()));
} catch (AccessException e1) {
e1.printStackTrace();
} catch (RemoteException e1) {
e1.printStackTrace();
}
}
}
}
|
[
"jkim@gojkim"
] |
jkim@gojkim
|
c8bb9fac7e12b59070480a6c9979fffe9ef147d7
|
a7623ed10abd11354696f749a9bdb98e4ad04005
|
/src/com/neusoft/busManager/repairinfo/model/BusRepairInfoDetailModel.java
|
d7f94934648bbf71dd4fa4e37da25db92dd0f1ff
|
[] |
no_license
|
niududu/busmis
|
f28374568a8fd2ed283d75820db8d300fa22c1e4
|
b0fcf81a4107fa5f5ba3c4373cd154032b2d5e5e
|
refs/heads/master
| 2021-01-23T14:21:47.816014
| 2017-09-13T16:38:40
| 2017-09-13T16:38:40
| 102,684,854
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,397
|
java
|
package com.neusoft.busManager.repairinfo.model;
import org.apache.ibatis.type.Alias;
/**
* 车辆维修明细表
* @author niududu
*
*/
@Alias("BusRepairDetail")
public class BusRepairInfoDetailModel {
//维修明细序号
private int DetailNo;
//维修项目名称
private String Item;
//维修项目个数
private double ItemQTY;
//维修项目单价
private double itemUnitPrice;
//维修项目说明
private String ItemDesc;
//维修序号(一个维修明细表对应一个维修表:一对一)
private BusRepairInfoModel reapirNo;
public BusRepairInfoModel getReapirNo() {
return reapirNo;
}
public void setReapirNo(BusRepairInfoModel reapirNo) {
this.reapirNo = reapirNo;
}
public int getDetailNo() {
return DetailNo;
}
public void setDetailNo(int detailNo) {
DetailNo = detailNo;
}
public String getItem() {
return Item;
}
public void setItem(String item) {
Item = item;
}
public double getItemQTY() {
return ItemQTY;
}
public void setItemQTY(double itemQTY) {
ItemQTY = itemQTY;
}
public double getItemUnitPrice() {
return itemUnitPrice;
}
public void setItemUnitPrice(double itemUnitPrice) {
this.itemUnitPrice = itemUnitPrice;
}
public String getItemDesc() {
return ItemDesc;
}
public void setItemDesc(String itemDesc) {
ItemDesc = itemDesc;
}
}
|
[
"admin@admin-PC"
] |
admin@admin-PC
|
cd77cd1e7995a50bdd6c5c41c79822435c4f3513
|
6552244c7ef44150ea74cef7ec801d5a9f7171e9
|
/app/src/main/java/com/google/android/gms/reminders/model/zzr.java
|
00e4210b518e6e72cacd3828d322f28b93f4a64e
|
[] |
no_license
|
amithbm/cbskeep
|
c9469156efd307fb474d817760a0b426af8f7c5c
|
a800f00ab617cba49d1a1bea1f0282c0cde525e7
|
refs/heads/master
| 2016-09-06T12:42:33.824977
| 2015-08-24T15:33:50
| 2015-08-24T15:33:50
| 41,311,235
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,717
|
java
|
package com.google.android.gms.reminders.model;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zza.zza;
import com.google.android.gms.common.internal.safeparcel.zzb;
public class zzr
implements Parcelable.Creator<TaskIdEntity>
{
static void zza(TaskIdEntity paramTaskIdEntity, Parcel paramParcel, int paramInt)
{
paramInt = zzb.zzcR(paramParcel);
zzb.zzc(paramParcel, 1, mVersionCode);
zzb.zza(paramParcel, 2, paramTaskIdEntity.getServerAssignedId(), false);
zzb.zza(paramParcel, 3, paramTaskIdEntity.getClientAssignedId(), false);
zzb.zza(paramParcel, 4, paramTaskIdEntity.getClientAssignedThreadId(), false);
zzb.zzJ(paramParcel, paramInt);
}
public TaskIdEntity zzkW(Parcel paramParcel)
{
String str2 = null;
int j = zza.zzcQ(paramParcel);
int i = 0;
String str1 = null;
Long localLong = null;
while (paramParcel.dataPosition() < j)
{
int k = zza.zzcP(paramParcel);
switch (zza.zzeS(k))
{
default:
zza.zzb(paramParcel, k);
break;
case 1:
i = zza.zzg(paramParcel, k);
break;
case 2:
localLong = zza.zzj(paramParcel, k);
break;
case 3:
str1 = zza.zzp(paramParcel, k);
break;
case 4:
str2 = zza.zzp(paramParcel, k);
}
}
if (paramParcel.dataPosition() != j)
throw new zza.zza("Overread allowed size end=" + j, paramParcel);
return new TaskIdEntity(i, localLong, str1, str2);
}
public TaskIdEntity[] zzoA(int paramInt)
{
return new TaskIdEntity[paramInt];
}
}
|
[
"amithbm@gmail.com"
] |
amithbm@gmail.com
|
53ba6d83f72abb9cd114c8e833d9659bdff4b156
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/ui/chatting/d$5.java
|
61e634eed4b7f0d263ff18d83ca79be1e40caa8c
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 442
|
java
|
package com.tencent.mm.ui.chatting;
import com.tencent.mm.sdk.platformtools.x;
class d$5 implements Runnable {
final /* synthetic */ d yqB;
d$5(d dVar) {
this.yqB = dVar;
}
public final void run() {
if (this.yqB.yqo != null && this.yqB.fhr.csy() != null) {
x.i("MicroMsg.AutoPlay", "resetAutoPlay notifyDataSetChanged");
this.yqB.fhr.csy().notifyDataSetChanged();
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
7141aa1d19289a386fb5a82269a56c95fa906c97
|
d9e78246af5911628bd85fe705f8b9ea28a12408
|
/src/main/java/com/note/designpattern/bjsxt/factory/factorymethod/Audi.java
|
688f431dbb5d0213942eb0b0d7cadbfbd9bd1a85
|
[] |
no_license
|
thinkal01/note02
|
c2775d9c72f8f65a2bf771d5ec8606a4628e1bca
|
33583112b1f52a3f49d61931a4f2f3189690dd61
|
refs/heads/master
| 2022-12-22T11:01:51.290414
| 2020-03-16T11:25:06
| 2020-03-16T11:25:06
| 164,791,160
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 189
|
java
|
package com.note.designpattern.bjsxt.factory.factorymethod;
public class Audi implements Car {
@Override
public void run() {
System.out.println("奥迪再跑!");
}
}
|
[
"875535828@qq.com"
] |
875535828@qq.com
|
69ff5f82311dd2b379752b3b9898a244391d2577
|
926c4df30cf7bd30606dc1f37d4d1ee51658b32d
|
/src/main/java/io/hari/demo/entity/Test.java
|
20379ff90bed4899a87ad5cc57b761400845f395
|
[] |
no_license
|
khangnick14/teacher_student_LLD_spring_boot
|
1386104055d75cab9e44069d0522cbc5fd0c1918
|
323f0653b0f3bc84f0b4e3727a4a9da0dd2dba9b
|
refs/heads/master
| 2023-03-17T02:06:01.352932
| 2021-03-11T16:01:09
| 2021-03-11T16:01:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 803
|
java
|
package io.hari.demo.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
/**
* @Author Hariom Yadav
* @create 11-03-2021
*/
@Getter
@Setter
@NoArgsConstructor
@ToString(exclude = {}, callSuper = true)
@AllArgsConstructor
@Builder
@Entity
@Table(name = "tests")
public class Test extends BaseEntity{
private String name;
@ManyToMany(fetch = FetchType.EAGER)
private Set<Question> questions = new HashSet<>();
//other metadata
@JsonProperty
public Integer getMaxTestScore() {
return questions.stream().map(Question::getScore).reduce(0, (a , b) -> a + b);
}
@JsonProperty
public Set<Question> getAllQuestions() {
return questions;
}
}
|
[
"hoc.yadav@gmail.com"
] |
hoc.yadav@gmail.com
|
35be596cb9710f8288e2ab4124d4a3b8d13578e0
|
20ea5ee84221ff5fd7e3cc1e1ca38db910caf3de
|
/src/main/java/com/victropolis/euler/Problem352.java
|
1470163ab9f08d41ee828a7531e802be277a83ba
|
[] |
no_license
|
victropolis/project-euler-solved
|
a76207d8583126618ff8af801262e6077c536e55
|
b4f153a42e101b4d780178af05aab8a0203931ec
|
refs/heads/master
| 2016-09-06T13:38:52.788092
| 2015-07-04T22:03:32
| 2015-07-04T22:03:37
| 37,392,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,732
|
java
|
package com.victropolis.euler;
/**
* Generated programatically by victropolis on 07/04/15.
*/
public class Problem352 extends BaseProblem {
/*
Description (from https://projecteuler.net/problem=352):
Each one of the 25 sheep in a flock must be tested for a rare virus, known to affect 2% of the sheep population.
An accurate and extremely sensitive PCR test exists for blood samples, producing a clear positive / negative
result, but it is very time-consuming and expensive. Because of the high cost, the vet-in-charge suggests that
instead of performing 25 separate tests, the following procedure can be used instead: The sheep are split into 5
groups of 5 sheep in each group. For each group, the 5 samples are mixed together and a single test is performed.
Then, If the result is negative, all the sheep in that group are deemed to be virus-free. If the result is
positive, 5 additional tests will be performed (a separate test for each animal) to determine the affected
individual(s). Since the probability of infection for any specific animal is only 0.02, the first test (on
the pooled samples) for each group will be: Negative (and no more tests needed) with probability 0.985 = 0
.9039207968. Positive (5 additional tests needed) with probability 1 - 0.9039207968 = 0.0960792032. Thus, the
expected number of tests for each group is 1 + 0.0960792032 × 5 = 1.480396016. Consequently, all 5 groups can
be screened using an average of only 1.480396016 × 5 = 7.40198008 tests, which represents a huge saving of more
than 70% ! Although the scheme we have just described seems to be very efficient, it can still be improved
considerably (always assuming that the test is sufficiently sensitive and that there are no adverse effects
caused by mixing different samples). E.g.: We may start by running a test on a mixture of all the 25 samples
. It can be verified that in about 60.35% of the cases this test will be negative, thus no more tests will be
needed. Further testing will only be required for the remaining 39.65% of the cases. If we know that at least
one animal in a group of 5 is infected and the first 4 individual tests come out negative, there is no need to
run a test on the fifth animal (we know that it must be infected). We can try a different number of groups /
different number of animals in each group, adjusting those numbers at each level so that the total expected
number of tests will be minimised. To simplify the very wide range of possibilities, there is one
restriction we place when devising the most cost-efficient testing scheme: whenever we start with a mixed
sample, all the sheep contributing to that sample must be fully screened (i.e. a verdict of infected /
virus-free must be reached for all of them) before we start examining any other animals. For the current
example, it turns out that the most cost-efficient testing scheme (we'll call it the optimal strategy)
requires an average of just 4.155452 tests! Using the optimal strategy, let T(s,p) represent the average
number of tests needed to screen a flock of s sheep for a virus having probability p to be present in any
individual. Thus, rounded to six decimal places, T(25, 0.02) = 4.155452 and T(25, 0.10) = 12.702124. Find
ΣT(10000, p) for p=0.01, 0.02, 0.03, ... 0.50. Give your answer rounded to six decimal places.
*/
public static float solve(/* change signature to provide required inputs */) {
throw new UnsupportedOperationException("Problem352 hasn't been solved yet.");
}
}
|
[
"victropolis@gmail.com"
] |
victropolis@gmail.com
|
38352f8b5d652cc1536bed312a2c57a850b90424
|
c173832fd576d45c875063a1a480672fbd59ca04
|
/seguridad/tags/release-1.0/modulos/plugins/GeorreferenciacionExterna/src/main/java/com/geopista/ui/plugin/georreferenciacionExterna/RowBean.java
|
305243a7bce98a04e5d6e7633f3f349ca65bad71
|
[] |
no_license
|
jormaral/allocalgis
|
1308616b0f3ac8aa68fb0820a7dfa89d5a64d0e6
|
bd5b454b9c2e8ee24f70017ae597a32301364a54
|
refs/heads/master
| 2021-01-16T18:08:36.542315
| 2016-04-12T11:43:18
| 2016-04-12T11:43:18
| 50,914,723
| 0
| 0
| null | 2016-02-02T11:04:27
| 2016-02-02T11:04:27
| null |
UTF-8
|
Java
| false
| false
| 445
|
java
|
package com.geopista.ui.plugin.georreferenciacionExterna;
public class RowBean {
public ColumnsBean[] getColumns() {
return columns;
}
public void setColumns(ColumnsBean[] columns) {
this.columns = columns;
}
public String getGeometryWkt() {
return geometryWkt;
}
public void setGeometryWkt(String geometryWkt) {
this.geometryWkt = geometryWkt;
}
private ColumnsBean[] columns;
private String geometryWkt;
}
|
[
"jorge.martin@cenatic.es"
] |
jorge.martin@cenatic.es
|
fe486249ca7da653f87220aa570951d01c65fd12
|
e6d862a9df10dccfa88856cf16951de8e0eeff2b
|
/VMS/core/java/src/test/java/com/allocate/vms/api/model/DutyLocationTest.java
|
ed2f8a36f5dabf9a03447d7f901975dfdf5ecedf
|
[] |
no_license
|
AllocateSoftware/API-Stubs
|
c3de123626f831b2bd37aba25050c01746f5e560
|
f19d153f8e9a37c7fb1474a63c92f67fc6c8bdf0
|
refs/heads/master
| 2022-06-01T07:26:53.264948
| 2020-01-09T13:44:41
| 2020-01-09T13:44:41
| 232,816,845
| 0
| 0
| null | 2022-05-20T21:23:09
| 2020-01-09T13:34:35
|
C#
|
UTF-8
|
Java
| false
| false
| 1,492
|
java
|
/*
* VMS API
* ## Description API to be impemented by VMS systems for integration into HealthSuite business processes
*
* The version of the OpenAPI document: 1.0.0
* Contact: support@allocatesoftware.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.allocate.vms.api.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for DutyLocation
*/
public class DutyLocationTest {
private final DutyLocation model = new DutyLocation();
/**
* Model tests for DutyLocation
*/
@Test
public void testDutyLocation() {
// TODO: test DutyLocation
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
/**
* Test the property 'parentLocation'
*/
@Test
public void parentLocationTest() {
// TODO: test parentLocation
}
}
|
[
"nigel.magnay@gmail.com"
] |
nigel.magnay@gmail.com
|
b84e33eecc2bcabbe1fad47e52322404b5b59c3b
|
52c36ce3a9d25073bdbe002757f08a267abb91c6
|
/src/main/java/com/alipay/api/domain/FengdieSpaceMemberCreateModel.java
|
40021534644e9cd74e545b16e4262fa64edf3a2a
|
[
"Apache-2.0"
] |
permissive
|
itc7/alipay-sdk-java-all
|
d2f2f2403f3c9c7122baa9e438ebd2932935afec
|
c220e02cbcdda5180b76d9da129147e5b38dcf17
|
refs/heads/master
| 2022-08-28T08:03:08.497774
| 2020-05-27T10:16:10
| 2020-05-27T10:16:10
| 267,271,062
| 0
| 0
|
Apache-2.0
| 2020-05-27T09:02:04
| 2020-05-27T09:02:04
| null |
UTF-8
|
Java
| false
| false
| 885
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 创建云凤蝶空间成员返回值模型
*
* @author auto create
* @since 1.0, 2018-10-22 16:57:57
*/
public class FengdieSpaceMemberCreateModel extends AlipayObject {
private static final long serialVersionUID = 8654634232573839299L;
/**
* 用户的昵称
*/
@ApiField("nick")
private String nick;
/**
* 云凤蝶业务空间成员所关联的第三方用户 ID
*/
@ApiField("origin_user_id")
private String originUserId;
public String getNick() {
return this.nick;
}
public void setNick(String nick) {
this.nick = nick;
}
public String getOriginUserId() {
return this.originUserId;
}
public void setOriginUserId(String originUserId) {
this.originUserId = originUserId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
fef91139652990ce89167a4b4664499e7e6df52d
|
403277853ddaa968e3a082020ff7219353d24e87
|
/Shuangge/src/com/shuangge/english/support/utils/DESUtils.java
|
94de56d8651a71b5eb1c14516901dec3d1376b06
|
[] |
no_license
|
dougisadog/eng
|
d2bdb4613592574b5ce8332ee9ac126320f10adc
|
2a6d3083be1d1974dede04deb94f69643c44b4b3
|
refs/heads/master
| 2021-01-10T12:19:11.496701
| 2015-12-01T09:33:20
| 2015-12-01T09:33:20
| 47,179,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,910
|
java
|
package com.shuangge.english.support.utils;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.ArrayList;
import java.util.Date;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
import android.text.TextUtils;
import android.util.Base64;
import com.shuangge.english.config.ConfigConstants.RewardsCode;
import com.shuangge.english.support.http.HttpReqFactory;
public class DESUtils {
private static String charSet = "utf-8";
private static String key = "07882f106f9f93929447b3895ab058fd";
private static final int TYPE_STRING = 0;
private static final int TYPE_INT = 1;
private static final int TYPE_DOUBLE = 2;
private static final int TYPE_BOOLEAN = 3;
private static final int TYPE_DATE = 4;
private static final int TYPE_STRING_ARR = 10;
private static final int TYPE_INT_ARR = 11;
private static final int TYPE_DOUBLE_ARR = 12;
private static final int TYPE_BOOLEAN_ARR = 13;
private static final int TYPE_DATE_ARR = 14;
private static final int TYPE_ENUM_REWARDS_CODE = 21;
public enum ParamType {
base, rewardsCode;
}
private static String encryptStr(HttpReqFactory.ReqParam[] params) {
final String PARAMS_SYMBOL = "#@@#";
final String LINk_SYMBOL = "#==#";
String str = "";
ArrayList<?> list = null;
ParamType paramType = ParamType.base;
for (HttpReqFactory.ReqParam param : params) {
boolean isDate = false;
if (null == param.getValue()) {
continue;
}
Class<?> clazz = param.getValue().getClass();
if (clazz.equals(String.class)) {
if (TextUtils.isEmpty(param.getValue().toString())) {
continue;
}
str += param.getKey() + LINk_SYMBOL + TYPE_STRING + LINk_SYMBOL + param.getValue();
}
else if (clazz.equals(Integer.class) || clazz.equals(Long.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_INT + LINk_SYMBOL + param.getValue();
}
else if (clazz.equals(Double.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_DOUBLE + LINk_SYMBOL + param.getValue();
}
else if (clazz.equals(Boolean.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_BOOLEAN + LINk_SYMBOL + param.getValue();
}
else if (clazz.equals(Date.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_DATE + LINk_SYMBOL + ((Date) param.getValue()).getTime();
}
else if (clazz.equals(RewardsCode.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_ENUM_REWARDS_CODE + LINk_SYMBOL + ((RewardsCode) param.getValue()).name();
}
else if (clazz.equals(ArrayList.class)) {
list = (ArrayList<?>) param.getValue();
if (list.size() == 0) {
continue;
}
if (null == list.get(0)) {
clazz = String.class;
}
else {
clazz = list.get(0).getClass();
}
if (clazz.equals(String.class)) {
if (TextUtils.isEmpty(param.getValue().toString())) {
continue;
}
str += param.getKey() + LINk_SYMBOL + TYPE_STRING_ARR + LINk_SYMBOL;
}
else if (clazz.equals(Integer.class) || clazz.equals(Long.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_INT_ARR + LINk_SYMBOL;
}
else if (clazz.equals(Double.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_DOUBLE_ARR + LINk_SYMBOL;
}
else if (clazz.equals(Boolean.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_BOOLEAN_ARR + LINk_SYMBOL;
}
else if (clazz.equals(Date.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_DATE_ARR + LINk_SYMBOL;
isDate = true;
}
else if (clazz.equals(RewardsCode.class)) {
str += param.getKey() + LINk_SYMBOL + TYPE_ENUM_REWARDS_CODE + LINk_SYMBOL;
paramType = ParamType.rewardsCode;
}
for (int i = 0; i < list.size(); i++) {
if (i != 0) {
str += ",";
}
if (isDate) {
str += ((Date) list.get(i)).getTime();
continue;
}
switch (paramType) {
case rewardsCode:
str += ((RewardsCode) list.get(i)).name();
continue;
default:
str += list.get(i);
continue;
}
}
}
str += PARAMS_SYMBOL;
}
return str;
}
public static HttpReqFactory.ReqParam encryptFromParams(HttpReqFactory.ReqParam[] params) {
String paramStr = null;
paramStr = encryptStr(params);
paramStr = encrypt(paramStr);
return new HttpReqFactory.ReqParam("params", paramStr);
}
public static String encrypt(String str) {
// if (true) {
// return str;
// }
String string = null;
byte[] b = null;
try {
string = Base64.encodeToString(str.getBytes(charSet),
Base64.DEFAULT);
DESedeKeySpec dks = new DESedeKeySpec(key.getBytes(charSet));
SecretKeyFactory keyFactory = SecretKeyFactory
.getInstance("DESede");
SecretKey securekey = keyFactory.generateSecret(dks);
Cipher cipher = Cipher.getInstance("DESede");
cipher.init(Cipher.ENCRYPT_MODE, securekey);
b = cipher.doFinal(string.getBytes());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeySpecException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
if (null == b)
return "";
return Base64.encodeToString(b, Base64.DEFAULT);
}
public static String decrypt(String str) {
// if (true) {
// return str;
// }
byte[] bytesrc = null;
DESedeKeySpec dks = null;
String val = "";
try {
bytesrc = Base64.decode(str.getBytes(charSet), Base64.DEFAULT);
dks = new DESedeKeySpec(key.getBytes(charSet));
SecretKeyFactory keyFactory = SecretKeyFactory
.getInstance("DESede");
SecretKey securekey = keyFactory.generateSecret(dks);
Cipher cipher = Cipher.getInstance("DESede");
cipher.init(Cipher.DECRYPT_MODE, securekey);
byte[] retByte = cipher.doFinal(bytesrc);
String string = new String(retByte);
byte[] b = Base64.decode(string.getBytes(charSet), Base64.DEFAULT);
val = new String(b, charSet);
} catch (IOException e1) {
e1.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeySpecException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return val;
}
}
|
[
"wzc2542736@163.com"
] |
wzc2542736@163.com
|
099b0672e0aa405a1c131c1d488ae81113a7a505
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2007-06-29/seasar2-2.4.14/s2-framework/src/test/java/org/seasar/framework/beans/impl/PropertyDescImplTest.java
|
847b4acf0bf92b5a851598165c28c61685392652
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,355
|
java
|
/*
* Copyright 2004-2007 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.framework.beans.impl;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Date;
import junit.framework.TestCase;
import org.seasar.framework.beans.BeanDesc;
import org.seasar.framework.beans.IllegalPropertyRuntimeException;
import org.seasar.framework.beans.PropertyDesc;
/**
* @author higa
*
*/
public class PropertyDescImplTest extends TestCase {
/**
* @throws Exception
*/
public void testSetValue() throws Exception {
MyBean myBean = new MyBean();
BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
PropertyDesc propDesc = beanDesc.getPropertyDesc("fff");
propDesc.setValue(myBean, new BigDecimal(2));
assertEquals(2, myBean.getFff());
}
/**
* @throws Exception
*/
public void testSetValue_null() throws Exception {
MyBean myBean = new MyBean();
BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
PropertyDesc propDesc = beanDesc.getPropertyDesc("fff");
propDesc.setValue(myBean, null);
assertEquals(0, myBean.getFff());
}
/**
* @throws Exception
*/
public void testSetIllegalValue() throws Exception {
MyBean myBean = new MyBean();
BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
PropertyDesc propDesc = beanDesc.getPropertyDesc("fff");
try {
propDesc.setValue(myBean, "hoge");
fail("1");
} catch (IllegalPropertyRuntimeException ex) {
System.out.println(ex);
}
}
/**
* @throws Exception
*/
public void testSetBigDecimalValue() throws Exception {
MyBean myBean = new MyBean();
BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
PropertyDesc propDesc = beanDesc.getPropertyDesc("ggg");
propDesc.setValue(myBean, new Integer(1));
assertEquals("1", new BigDecimal(1), myBean.getGgg());
}
/**
* @throws Exception
*/
public void testSetTimestampValue() throws Exception {
MyBean myBean = new MyBean();
BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
PropertyDesc propDesc = beanDesc.getPropertyDesc("hhh");
propDesc.setValue(myBean, "2000/11/8");
assertNotNull("1", myBean.getHhh());
}
/**
* @throws Exception
*/
public void testSetCalendarValue() throws Exception {
MyBean myBean = new MyBean();
BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
PropertyDesc propDesc = beanDesc.getPropertyDesc("cal");
Date date = new Date();
propDesc.setValue(myBean, date);
assertEquals(date, myBean.getCal().getTime());
}
/**
* @throws Exception
*/
public void testConvertWithStringConstructor() throws Exception {
MyBean myBean = new MyBean();
BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
PropertyDesc propDesc = beanDesc.getPropertyDesc("URL");
propDesc.setValue(myBean, "http://www.seasar.org");
assertNotNull("1", myBean.getURL());
}
/**
*
*/
public static class MyBean {
private int fff_;
private BigDecimal ggg_;
private Timestamp hhh_;
private URL url_;
private Calendar cal;
/**
* @return
*/
public String getAaa() {
return null;
}
/**
* @param a
* @return
*/
public String getBbb(Object a) {
return null;
}
/**
* @return
*/
public boolean isCCC() {
return true;
}
/**
* @return
*/
public Object isDdd() {
return null;
}
/**
* @return
*/
public String getEee() {
return null;
}
/**
* @param eee
*/
public void setEee(String eee) {
}
/**
* @return
*/
public int getFff() {
return fff_;
}
/**
* @param fff
*/
public void setFff(int fff) {
fff_ = fff;
}
/**
* @param arg1
* @param arg2
* @return
*/
public Number add(Number arg1, Number arg2) {
return new Integer(3);
}
/**
* @return
*/
public BigDecimal getGgg() {
return ggg_;
}
/**
* @param ggg
*/
public void setGgg(BigDecimal ggg) {
this.ggg_ = ggg;
}
/**
* @return
*/
public Timestamp getHhh() {
return hhh_;
}
/**
* @param hhh
*/
public void setHhh(Timestamp hhh) {
this.hhh_ = hhh;
}
/**
* @return
*/
public URL getURL() {
return url_;
}
/**
* @param url
*/
public void setURL(URL url) {
url_ = url;
}
/**
* @return Returns the cal.
*/
public Calendar getCal() {
return cal;
}
/**
* @param cal
* The cal to set.
*/
public void setCal(Calendar cal) {
this.cal = cal;
}
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
0b066e2138fa5c111ac87274dcc3198692fd7f05
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_3d5991536b40cfe3b222f8677d375e3522566980/XMLTileFactory/18_3d5991536b40cfe3b222f8677d375e3522566980_XMLTileFactory_s.java
|
ad8a843a14efc003e509c4c1d72ba82a0dde9188
|
[] |
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,918
|
java
|
package vooga.towerdefense.model.tiles.factories;
import java.util.HashMap;
import org.w3c.dom.Element;
import util.Location;
import util.XMLTool;
import vooga.towerdefense.model.GameMap;
import vooga.towerdefense.model.Tile;
import vooga.towerdefense.model.tiles.VersaTile;
import vooga.towerdefense.util.Pixmap;
public class XMLTileFactory extends TileFactory {
private static final String TILE_IMAGES_CLASS_PATH = "/vooga/towerdefense/images/map/";
private static final String IMGFILE_TAG = "image";
private static final String NAME_TAG = "name";
private static final String WALKABLE_TAG = "walkable";
private static final String BUILDABLE_TAG = "buildable";
private static final String XML_TRUE = "yes";
private String myName;
private String myID;
private Pixmap myImage;
private XMLTool myXMLTool;
private HashMap<String, String> myData;
public XMLTileFactory(XMLTool tool, Element tileElement, String id) {
myXMLTool = tool;
myID = id;
setData(tileElement);
}
private void setData (Element tileElement) {
myData = (HashMap<String, String>) myXMLTool.getChildrenStringMap(tileElement);
myName = myData.get(NAME_TAG);
myImage = new Pixmap(TILE_IMAGES_CLASS_PATH + myData.get(IMGFILE_TAG));
}
@Override
public String getName () {
return myName;
}
@Override
public Tile createTile (Location center, GameMap map) {
VersaTile tile = new VersaTile(myImage, center, map.getTileSize());
tile.setName(myName);
tile.setTileBuildable(myData.get(BUILDABLE_TAG).equals(XML_TRUE));
tile.setTileWalkable(myData.get(WALKABLE_TAG).equals(XML_TRUE));
return tile;
}
@Override
public String getTileId () {
return myID;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
709ec2fb28b4dc677954baeb45bc913aec713b7a
|
4e8d52f594b89fa356e8278265b5c17f22db1210
|
/WebServiceArtifacts/CI_CI_PERSONAL_DATA/com/oracle/xmlns/enterprise/tools/schemas/m795726/PROPORIGINCHETypeShape.java
|
e468891c63230d9d8e8939abda22cfdfc7212623
|
[] |
no_license
|
ouniali/WSantipatterns
|
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
|
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
|
refs/heads/master
| 2021-01-10T05:22:19.631231
| 2015-05-26T06:27:52
| 2015-05-26T06:27:52
| 36,153,404
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,347
|
java
|
package com.oracle.xmlns.enterprise.tools.schemas.m795726;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for PROP_ORIGIN_CHETypeShape complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PROP_ORIGIN_CHETypeShape">
* <simpleContent>
* <extension base="<http://xmlns.oracle.com/Enterprise/Tools/schemas/M795726.V1>PROP_ORIGIN_CHETypeDef">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PROP_ORIGIN_CHETypeShape", propOrder = {
"value"
})
public class PROPORIGINCHETypeShape {
@XmlValue
protected String value;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
|
[
"ouni_ali@yahoo.fr"
] |
ouni_ali@yahoo.fr
|
7eec12562adec74f6d9d985523cadf442cd458be
|
e21e57d7c7945eeb6b389143f4206431808b1902
|
/src/main/java/br/com/anderson/domain/AbstractAuditingEntity.java
|
b55312cd16aab10a0147b33a14f5c9e34f01651e
|
[] |
no_license
|
BulkSecurityGeneratorProject/venda-simples
|
452c344036eb4737eee470ec60758c29914789ea
|
2568a92c11504fd3f9b4fc216adc81031f9568ad
|
refs/heads/master
| 2022-12-17T05:15:08.321701
| 2018-07-31T00:33:55
| 2018-07-31T00:33:55
| 296,523,629
| 0
| 0
| null | 2020-09-18T05:34:22
| 2020-09-18T05:34:21
| null |
UTF-8
|
Java
| false
| false
| 2,230
|
java
|
package br.com.anderson.domain;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.envers.Audited;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.Instant;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
/**
* Base abstract class for entities which will hold definitions for created, last modified by and created,
* last modified by date.
*/
@MappedSuperclass
@Audited
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@CreatedBy
@Column(name = "created_by", nullable = false, length = 50, updatable = false)
@JsonIgnore
private String createdBy;
@CreatedDate
@Column(name = "created_date", nullable = false, updatable = false)
@JsonIgnore
private Instant createdDate = Instant.now();
@LastModifiedBy
@Column(name = "last_modified_by", length = 50)
@JsonIgnore
private String lastModifiedBy;
@LastModifiedDate
@Column(name = "last_modified_date")
@JsonIgnore
private Instant lastModifiedDate = Instant.now();
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Instant getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Instant createdDate) {
this.createdDate = createdDate;
}
public String getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
public Instant getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(Instant lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
421fc4267417fdfe16e9840eadb9a64152ec21f2
|
b2f7be70ae384fb1589660c466c197262a2c8cfd
|
/python/testSrc/com/jetbrains/env/debug/PythonDebuggerMultiprocessingTest.java
|
8bbf3565663c2afa74c2e74aebc43d1e03a59351
|
[
"Apache-2.0"
] |
permissive
|
artheus/intellij-community
|
5460c890f9c9e8102c51b684556b95d23453b1b7
|
276d94d75abb8791e10b58cbfe2a49c1fee7bd67
|
refs/heads/master
| 2023-04-16T11:36:02.543439
| 2023-04-07T15:01:40
| 2023-04-07T16:18:10
| 190,389,139
| 0
| 0
|
Apache-2.0
| 2019-06-05T12:19:57
| 2019-06-05T12:19:56
| null |
UTF-8
|
Java
| false
| false
| 7,592
|
java
|
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.env.debug;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.intellij.openapi.util.SystemInfo;
import com.jetbrains.env.EnvTestTagsRequired;
import com.jetbrains.env.PyEnvTestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.junit.Assume;
import org.junit.Test;
import java.util.Collections;
import java.util.Set;
import static org.junit.Assert.assertFalse;
public class PythonDebuggerMultiprocessingTest extends PyEnvTestCase {
private static class PyDebuggerMultiprocessTask extends PyDebuggerTask {
PyDebuggerMultiprocessTask(@Nullable String relativeTestDataPath, String scriptName) {
super(relativeTestDataPath, scriptName);
}
@Override
protected void init() {
setMultiprocessDebug(true);
}
}
@Test
public void testMultiprocess() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_multiprocess.py") {
@Override
public void before() {
toggleBreakpoint(getScriptName(), 9);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("i").hasValue("'Result:OK'");
resume();
waitForOutput("Result:OK");
}
@NotNull
@Override
public Set<String> getTags() {
return Sets.newHashSet("python3");
}
});
}
@EnvTestTagsRequired(tags = "-python3.11")
@Test
public void testMultiprocessingSubprocess() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_multiprocess_args.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath("test_remote.py"), 2);
setWaitForTermination(false);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("sys.argv[1]").hasValue("'subprocess'");
eval("sys.argv[2]").hasValue("'etc etc'");
resume();
}
@NotNull
@Override
public Set<String> getTags() {
return ImmutableSet.of("-iron", "-jython"); //can't run on iron and jython
}
});
}
@Test
public void testMultiprocessPool() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_multiprocess_pool.py") {
@Override
public void testing() throws Exception {
waitForOutput("Done");
assertFalse(output().contains("KeyboardInterrupt"));
}
@NotNull
@Override
public Set<String> getTags() {
return Collections.singleton("-iron");
}
});
}
@EnvTestTagsRequired(tags = "-python3.11")
@Test
public void testPythonSubprocessWithCParameter() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_python_subprocess_with_c_parameter.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath("test_python_subprocess_another_helper.py"), 2);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("x").hasValue("42");
resume();
waitForOutput("Hello!");
}
@NotNull
@Override
public Set<String> getTags() {
return ImmutableSet.of("-iron", "-jython");
}
});
}
@Test
public void testMultiprocessProcess() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_multiprocess_process.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath("test_multiprocess_process.py"), 5);
setWaitForTermination(false);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("name").hasValue("'subprocess'");
resume();
}
@NotNull
@Override
public Set<String> getTags() {
return ImmutableSet.of("-iron", "-jython"); //can't run on iron and jython
}
});
}
@Test
public void testSubprocess() {
runPythonTest(new PyDebuggerTask("/debug", "test_subprocess.py") {
@Override
public void before() throws Exception {
toggleBreakpoint(getFilePath(getScriptName()), 8);
}
@Override
public void testing() throws Exception {
waitForPause();
resume();
waitForTerminate();
outputContains("The subprocess finished with the return code 0.");
}
});
}
@Test
public void testPosixSpawn() {
Assume.assumeFalse("Windows doesn't support `posix_spawn`", SystemInfo.isWindows);
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_posix_spawn.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath(getScriptName()), 6);
toggleBreakpoint(getFilePath("test2.py"), 7);
setWaitForTermination(false);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("z").hasValue("2");
resume();
waitForPause();
resume();
waitForOutput("Process finished with exit code 0");
}
@NotNull
@Override
public Set<String> getTags() {
return Collections.singleton("python3.8");
}
});
}
@EnvTestTagsRequired(tags = "-python3.11")
@Test
public void testSubprocessModule() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_subprocess_module.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath("test_python_subprocess_another_helper.py"), 2);
setWaitForTermination(false);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("x").hasValue("42");
resume();
waitForOutput("Module returned code 0");
}
});
}
@EnvTestTagsRequired(tags = "-python3.11")
@Test
public void testSubprocessIsolated() {
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_subprocess_isolated.py") {
@Override
public void before() {
toggleBreakpoint(getFilePath("test_python_subprocess_another_helper.py"), 2);
setWaitForTermination(false);
}
@Override
public void testing() throws Exception {
waitForPause();
eval("x").hasValue("42");
resume();
waitForOutput("Module returned code 0");
}
@NotNull
@Override
public Set<String> getTags() {
return Collections.singleton("python3");
}
});
}
@Test
public void testCallExecWithPythonArg() {
runPythonTest(new PyDebuggerTask("/debug", "test_call_exec_with_python_arg.py") {
@Override
protected void init() {
setMultiprocessDebug(true);
}
@Override
public void before() {
toggleBreakpoint(getFilePath("test4.py"), 1);
}
@Override
public void testing() throws Exception {
waitForPause();
setProcessCanTerminate(true);
resume();
waitForOutput("3");
}
@Override
public @NotNull Set<String> getTags() {
return Collections.singleton("python2.7");
}
});
runPythonTest(new PyDebuggerTask("/debug", "test_call_python_version.py") {
@Override
public void testing() throws Exception {
waitForTerminate();
outputContains("Python");
}
@Override
public @NotNull Set<String> getTags() {
return Collections.singleton("python2.7");
}
});
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
96ce39483132595cbca62ea6f36266e83403c756
|
e054c1e6903e4b5eb166d107802c0c2cadd2eb03
|
/modules/datex-serializer/src/generated/java/eu/datex2/schema/_2/_2_0/UrlLinkTypeEnum.java
|
170032d41a20f6b0a0efe230d50990e68dccae15
|
[
"MIT"
] |
permissive
|
svvsaga/gradle-modules-public
|
02dc90ad2feb58aef7629943af3e0d3a9f61d5cf
|
e4ef4e2ed5d1a194ff426411ccb3f81d34ff4f01
|
refs/heads/main
| 2023-05-27T08:25:36.578399
| 2023-05-12T14:15:47
| 2023-05-12T14:33:14
| 411,986,217
| 2
| 1
|
MIT
| 2023-05-12T14:33:15
| 2021-09-30T08:36:11
|
Java
|
UTF-8
|
Java
| false
| false
| 1,679
|
java
|
package eu.datex2.schema._2._2_0;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlEnumValue;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for UrlLinkTypeEnum.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <pre>
* <simpleType name="UrlLinkTypeEnum">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="documentPdf"/>
* <enumeration value="html"/>
* <enumeration value="image"/>
* <enumeration value="rss"/>
* <enumeration value="videoStream"/>
* <enumeration value="voiceStream"/>
* <enumeration value="other"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "UrlLinkTypeEnum")
@XmlEnum
public enum UrlLinkTypeEnum {
@XmlEnumValue("documentPdf")
DOCUMENT_PDF("documentPdf"),
@XmlEnumValue("html")
HTML("html"),
@XmlEnumValue("image")
IMAGE("image"),
@XmlEnumValue("rss")
RSS("rss"),
@XmlEnumValue("videoStream")
VIDEO_STREAM("videoStream"),
@XmlEnumValue("voiceStream")
VOICE_STREAM("voiceStream"),
@XmlEnumValue("other")
OTHER("other");
private final String value;
UrlLinkTypeEnum(String v) {
value = v;
}
public String value() {
return value;
}
public static UrlLinkTypeEnum fromValue(String v) {
for (UrlLinkTypeEnum c: UrlLinkTypeEnum.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"geir.sagberg@gmail.com"
] |
geir.sagberg@gmail.com
|
630ced12248dbb4f9809068883f6d5586b829733
|
68a19507f18acff18aa4fa67d6611f5b8ac8913c
|
/plfx/plfx-xl/plfx-xl-pojo/src/main/java/plfx/xl/pojo/command/dealer/AuditLineDealerCommand.java
|
2916eb4fb72402ce2a2b1db8a62da8cccb416751
|
[] |
no_license
|
ksksks2222/pl-workspace
|
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
|
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
|
refs/heads/master
| 2021-09-13T08:59:17.177105
| 2018-04-27T09:46:42
| 2018-04-27T09:46:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,141
|
java
|
package plfx.xl.pojo.command.dealer;
import hg.common.component.BaseCommand;
/**
*
* @类功能说明:启用禁用线路经销商command
* @类修改者:
* @修改日期:
* @修改说明:
* @公司名称:浙江汇购科技有限公司
* @部门:技术部
* @作者:tuhualiang
* @创建时间:2014年12月10日下午2:41:13
* @版本:V1.0
*
*/
@SuppressWarnings("serial")
public class AuditLineDealerCommand extends BaseCommand{
/**
* ID
*/
private String id;
/**
* 批量禁用启用id字符串
*/
private String[] ids;
/**
* 禁用启用开关
*/
private String flag;
/**
*
*/
private String status;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String[] getIds() {
return ids;
}
public void setIds(String[] ids) {
this.ids = ids;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
|
[
"cangsong6908@gmail.com"
] |
cangsong6908@gmail.com
|
4c4a36cbd5a698261fdd5699b3e74c09f6ee470c
|
0611bee65ff0e1e84d21962ef78a37f2e3a96dae
|
/permission/src/main/java/com/yanzhenjie/permission/checker/PhoneStateReadTest.java
|
a55398f28e6f8a4098fcc243fc7fb405699d7b50
|
[
"Apache-2.0"
] |
permissive
|
yuan7016/AndPermission
|
49bd6888c1b433d9bfcab1ccc1f7c6776aff1252
|
a90239e59844349982d136ecade3f5d96f2d2a1a
|
refs/heads/master
| 2020-03-28T22:44:54.334597
| 2019-03-06T06:06:09
| 2019-03-06T06:06:09
| 149,255,005
| 2
| 0
|
Apache-2.0
| 2018-09-18T08:34:14
| 2018-09-18T08:34:13
| null |
UTF-8
|
Java
| false
| false
| 1,576
|
java
|
/*
* Copyright © Yan Zhenjie
*
* 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.yanzhenjie.permission.checker;
import android.content.Context;
import android.content.pm.PackageManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
/**
* Created by YanZhenjie on 2018/1/25.
*/
class PhoneStateReadTest implements PermissionTest {
private Context mContext;
PhoneStateReadTest(Context context) {
this.mContext = context;
}
@Override
public boolean test() throws Throwable {
PackageManager packageManager = mContext.getPackageManager();
if (!packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) return true;
TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
return telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE
|| !TextUtils.isEmpty(telephonyManager.getDeviceId())
|| !TextUtils.isEmpty(telephonyManager.getSubscriberId());
}
}
|
[
"smallajax@foxmail.com"
] |
smallajax@foxmail.com
|
9bb0416e661a53c7a025a0eb9750ee70f6c8bea6
|
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
|
/android/support/v4/view/accessibility/AccessibilityManagerCompatIcs.java
|
df95c0c312482f437988a39d83a2cc360688dd52
|
[] |
no_license
|
killbus/jd_decompile
|
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
|
50c521ce6a2c71c37696e5c131ec2e03661417cc
|
refs/heads/master
| 2022-01-13T03:27:02.492579
| 2018-05-14T11:21:30
| 2018-05-14T11:21:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,214
|
java
|
package android.support.v4.view.accessibility;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener;
import java.util.List;
/* compiled from: TbsSdkJava */
class AccessibilityManagerCompatIcs {
/* compiled from: TbsSdkJava */
interface AccessibilityStateChangeListenerBridge {
void onAccessibilityStateChanged(boolean z);
}
/* compiled from: TbsSdkJava */
public static class AccessibilityStateChangeListenerWrapper implements AccessibilityStateChangeListener {
Object mListener;
AccessibilityStateChangeListenerBridge mListenerBridge;
public AccessibilityStateChangeListenerWrapper(Object obj, AccessibilityStateChangeListenerBridge accessibilityStateChangeListenerBridge) {
this.mListener = obj;
this.mListenerBridge = accessibilityStateChangeListenerBridge;
}
public int hashCode() {
return this.mListener == null ? 0 : this.mListener.hashCode();
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
AccessibilityStateChangeListenerWrapper accessibilityStateChangeListenerWrapper = (AccessibilityStateChangeListenerWrapper) obj;
if (this.mListener != null) {
return this.mListener.equals(accessibilityStateChangeListenerWrapper.mListener);
}
if (accessibilityStateChangeListenerWrapper.mListener != null) {
return false;
}
return true;
}
public void onAccessibilityStateChanged(boolean z) {
this.mListenerBridge.onAccessibilityStateChanged(z);
}
}
AccessibilityManagerCompatIcs() {
}
public static boolean addAccessibilityStateChangeListener(AccessibilityManager accessibilityManager, AccessibilityStateChangeListenerWrapper accessibilityStateChangeListenerWrapper) {
return accessibilityManager.addAccessibilityStateChangeListener(accessibilityStateChangeListenerWrapper);
}
public static boolean removeAccessibilityStateChangeListener(AccessibilityManager accessibilityManager, AccessibilityStateChangeListenerWrapper accessibilityStateChangeListenerWrapper) {
return accessibilityManager.removeAccessibilityStateChangeListener(accessibilityStateChangeListenerWrapper);
}
public static List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(AccessibilityManager accessibilityManager, int i) {
return accessibilityManager.getEnabledAccessibilityServiceList(i);
}
public static List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList(AccessibilityManager accessibilityManager) {
return accessibilityManager.getInstalledAccessibilityServiceList();
}
public static boolean isTouchExplorationEnabled(AccessibilityManager accessibilityManager) {
return accessibilityManager.isTouchExplorationEnabled();
}
}
|
[
"13511577582@163.com"
] |
13511577582@163.com
|
b35b70c7c158ea579fed8d87786a8e18959cacd2
|
3bf6f851788febf9bde8677d5e61bbc2d342f434
|
/nb-water-interface/src/main/java/com/ets/business/equipment/entity/nb_watermeter_equipment.java
|
689627e452de2b49c9034819278cf4116b9caf81
|
[] |
no_license
|
TangLiTao2810020131/NB-WATER2.0
|
084f7884f5031cbccab0e9fb092428d421336d04
|
8510786673f70ea9bee38bba1284555df6565141
|
refs/heads/master
| 2022-11-18T16:03:09.912711
| 2019-08-15T06:15:38
| 2019-08-15T06:15:38
| 202,481,264
| 5
| 4
| null | 2022-11-16T06:36:53
| 2019-08-15T05:46:40
|
Java
|
UTF-8
|
Java
| false
| false
| 3,911
|
java
|
package com.ets.business.equipment.entity;
/**
* 水表设备实体类
* @author Administrator
*
*/
public class nb_watermeter_equipment {
private String id;
private String customercode;
private String watermetercode;
private String watermeterid;
private String basenum;
private String optionuser;
private String operationmode;
private String status;
private String productiondate;
private String productionnum;
private String installdate;
private String describe;
private String ctime;
private String doornumid;
private String deviceid;
private String isonline;
private String psvoltage;
private String rssi;
private String snr;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCustomercode() {
return customercode;
}
public void setCustomercode(String customercode) {
this.customercode = customercode;
}
public String getWatermetercode() {
return watermetercode;
}
public void setWatermetercode(String watermetercode) {
this.watermetercode = watermetercode;
}
public String getWatermeterid() {
return watermeterid;
}
public void setWatermeterid(String watermeterid) {
this.watermeterid = watermeterid;
}
public String getBasenum() {
return basenum;
}
public void setBasenum(String basenum) {
this.basenum = basenum;
}
public String getOptionuser() {
return optionuser;
}
public void setOptionuser(String optionuser) {
this.optionuser = optionuser;
}
public String getOperationmode() {
return operationmode;
}
public void setOperationmode(String operationmode) {
this.operationmode = operationmode;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getProductiondate() {
return productiondate;
}
public void setProductiondate(String productiondate) {
this.productiondate = productiondate;
}
public String getProductionnum() {
return productionnum;
}
public void setProductionnum(String productionnum) {
this.productionnum = productionnum;
}
public String getInstalldate() {
return installdate;
}
public void setInstalldate(String installdate) {
this.installdate = installdate;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
public String getCtime() {
return ctime;
}
public void setCtime(String ctime) {
this.ctime = ctime;
}
public String getDoornumid() {
return doornumid;
}
public void setDoornumid(String doornumid) {
this.doornumid = doornumid;
}
public String getDeviceid() {
return deviceid;
}
public void setDeviceid(String deviceid) {
this.deviceid = deviceid;
}
public String getIsonline() {
return isonline;
}
public void setIsonline(String isonline) {
this.isonline = isonline;
}
public String getPsvoltage() {
return psvoltage;
}
public void setPsvoltage(String psvoltage) {
this.psvoltage = psvoltage;
}
public String getRssi() {
return rssi;
}
public void setRssi(String rssi) {
this.rssi = rssi;
}
public String getSnr() {
return snr;
}
public void setSnr(String snr) {
this.snr = snr;
}
@Override
public String toString() {
return "nb_watermeter_equipment{" +
"id='" + id + '\'' +
", customercode='" + customercode + '\'' +
", watermetercode='" + watermetercode + '\'' +
", watermeterid='" + watermeterid + '\'' +
", basenum='" + basenum + '\'' +
", optionuser='" + optionuser + '\'' +
", operationmode='" + operationmode + '\'' +
", status='" + status + '\'' +
", productiondate='" + productiondate + '\'' +
", productionnum='" + productionnum + '\'' +
", installdate='" + installdate + '\'' +
", describe='" + describe + '\'' +
", ctime='" + ctime + '\'' +
", doornumid='" + doornumid + '\'' +
", deviceid='" + deviceid + '\'' +
'}';
}
}
|
[
"2810020131@qq.com"
] |
2810020131@qq.com
|
010940a589ac8ba1e4d86613ad9f7581fa06b958
|
e182e893f20538ffcef5fcb63e63cc4ed347c1cf
|
/core/src/main/java/io/hyperfoil/core/steps/collections/RemoveItemAction.java
|
efff4e331da71e80ea1527e85cd57272f999d01c
|
[
"Apache-2.0"
] |
permissive
|
Hyperfoil/Hyperfoil
|
c6f93b99121a0a77985d2a4277967ab1f8bac5da
|
5b0270aa95d8bacd262300a467bc170d4dc2c194
|
refs/heads/master
| 2023-09-02T01:37:10.744274
| 2023-08-30T00:16:20
| 2023-08-30T00:16:20
| 166,011,837
| 69
| 33
|
Apache-2.0
| 2023-08-30T11:41:15
| 2019-01-16T09:26:31
|
Java
|
UTF-8
|
Java
| false
| false
| 2,534
|
java
|
package io.hyperfoil.core.steps.collections;
import org.kohsuke.MetaInfServices;
import io.hyperfoil.api.config.BenchmarkDefinitionException;
import io.hyperfoil.api.config.Name;
import io.hyperfoil.api.session.Action;
import io.hyperfoil.api.session.ReadAccess;
import io.hyperfoil.api.session.Session;
import io.hyperfoil.core.builders.IntSourceBuilder;
import io.hyperfoil.core.session.ObjectVar;
import io.hyperfoil.core.session.SessionFactory;
import io.hyperfoil.function.SerializableToIntFunction;
public class RemoveItemAction implements Action {
private final ReadAccess fromVar;
private final SerializableToIntFunction<Session> index;
public RemoveItemAction(ReadAccess fromVar, SerializableToIntFunction<Session> index) {
this.fromVar = fromVar;
this.index = index;
}
@Override
public void run(Session session) {
Object value = fromVar.getObject(session);
if (value instanceof ObjectVar[]) {
ObjectVar[] vars = (ObjectVar[]) value;
int index = this.index.applyAsInt(session);
int lastIndex = index;
for (int i = index + 1; i < vars.length && vars[i].isSet(); ++i) {
vars[i - 1].set(vars[i].objectValue(session));
lastIndex = i;
}
vars[lastIndex].unset();
} else {
throw new IllegalStateException("Variable " + fromVar + " should contain a writable array.");
}
}
/**
* Removes element from an array of variables.
*/
@MetaInfServices(Action.Builder.class)
@Name("removeItem")
public static class Builder implements Action.Builder {
private String fromVar;
private IntSourceBuilder<Builder> index = new IntSourceBuilder<>(this);
/**
* Variable containing an existing array of object variables.
*
* @param fromVar Variable name.
* @return Self.
*/
public Builder fromVar(String fromVar) {
this.fromVar = fromVar;
return this;
}
/**
* Set index at which the item should be removed. Elements to the right of this
* are moved to the left.
*
* @return Builder.
*/
public IntSourceBuilder<Builder> index() {
return index;
}
@Override
public RemoveItemAction build() {
if (fromVar == null) {
throw new BenchmarkDefinitionException("Property 'fromVar' must be set!");
}
return new RemoveItemAction(SessionFactory.readAccess(fromVar), index.build());
}
}
}
|
[
"rvansa@redhat.com"
] |
rvansa@redhat.com
|
254ca223dc044e534b739ee9889a56e4c3d5284b
|
8f72834f14a0ba7c6c976f9363ffe710c1dbf685
|
/src/main/java/nc/container/processor/ContainerAssembler.java
|
f2987d34e239a7dc95138331bf580d4147d209c1
|
[
"CC0-1.0"
] |
permissive
|
WuzgLOL/NuclearCraft
|
29bc77738d704459f1427e532f6323623d3f3030
|
984e4395899c86cad7056ce22f1b27bd02857e55
|
refs/heads/master
| 2022-11-20T02:54:44.962738
| 2020-07-16T03:39:46
| 2020-07-16T03:39:46
| 279,321,973
| 1
| 0
| null | 2020-07-13T14:14:27
| 2020-07-13T14:14:26
| null |
UTF-8
|
Java
| false
| false
| 1,294
|
java
|
package nc.container.processor;
import static nc.recipe.NCRecipes.assembler;
import nc.container.slot.*;
import nc.tile.processor.TileItemProcessor;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
public class ContainerAssembler extends ContainerItemProcessor {
public ContainerAssembler(EntityPlayer player, TileItemProcessor tileEntity) {
super(player, tileEntity, assembler);
addSlotToContainer(new SlotProcessorInput(tileEntity, recipeHandler, 0, 46, 31));
addSlotToContainer(new SlotProcessorInput(tileEntity, recipeHandler, 1, 66, 31));
addSlotToContainer(new SlotProcessorInput(tileEntity, recipeHandler, 2, 46, 51));
addSlotToContainer(new SlotProcessorInput(tileEntity, recipeHandler, 3, 66, 51));
addSlotToContainer(new SlotFurnace(player, tileEntity, 4, 126, 41));
addSlotToContainer(new SlotSpecificInput(tileEntity, 5, 132, 76, SPEED_UPGRADE));
addSlotToContainer(new SlotSpecificInput(tileEntity, 6, 152, 76, ENERGY_UPGRADE));
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) {
addSlotToContainer(new Slot(player.inventory, j + 9 * i + 9, 8 + 18 * j, 96 + 18 * i));
}
}
for (int i = 0; i < 9; i++) {
addSlotToContainer(new Slot(player.inventory, i, 8 + 18 * i, 154));
}
}
}
|
[
"joedodd35@gmail.com"
] |
joedodd35@gmail.com
|
bfba628b0a8630467fc62ceee5e2bf41dd3d79ea
|
f404f7198c91a0f91ed6d6dd0a1cda9adf3edbb1
|
/com/planet_ink/coffee_mud/Items/MiscMagic/Wand_Nourishment.java
|
2d0adbdbc8f2049c0022169fab8452e0e32c9a92
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bbailey/ewok
|
1f1d35b219a6ebd33fd3ad3d245383d075ef457d
|
b4fcf4ba90c7460b19d0af56a3ecabbc88470f6f
|
refs/heads/master
| 2020-04-05T08:27:05.904034
| 2017-02-01T04:14:19
| 2017-02-01T04:14:19
| 656,100
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,914
|
java
|
package com.planet_ink.coffee_mud.Items.MiscMagic;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2001-2016 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class Wand_Nourishment extends StdWand
{
@Override
public String ID()
{
return "Wand_Nourishment";
}
public Wand_Nourishment()
{
super();
setName("a wooden wand");
setDisplayText("a small wooden wand is here.");
setDescription("A wand made out of wood");
secretIdentity="The wand of nourishment. Hold the wand say \\`shazam\\` to it.";
baseGoldValue=200;
material=RawMaterial.RESOURCE_OAK;
recoverPhyStats();
secretWord="SHAZAM";
}
@Override
public void setSpell(Ability theSpell)
{
super.setSpell(theSpell);
secretWord="SHAZAM";
}
@Override
public void setMiscText(String newText)
{
super.setMiscText(newText);
secretWord="SHAZAM";
}
@Override
public void executeMsg(final Environmental myHost, final CMMsg msg)
{
if(msg.amITarget(this))
{
final MOB mob=msg.source();
switch(msg.targetMinor())
{
case CMMsg.TYP_WAND_USE:
if((mob.isMine(this))
&&(!amWearingAt(Wearable.IN_INVENTORY))
&&(msg.targetMessage()!=null))
{
if(msg.targetMessage().toUpperCase().indexOf("SHAZAM")>=0)
{
if(mob.curState().adjHunger(50,mob.maxState().maxHunger(mob.baseWeight())))
mob.tell(L("You are full."));
else
mob.tell(L("You feel nourished."));
}
}
return;
default:
break;
}
}
super.executeMsg(myHost,msg);
}
}
|
[
"nosanity79@gmail.com"
] |
nosanity79@gmail.com
|
3aa0c4171143704243dfd1c32c5cbdd9fdd84d65
|
8bac06757b4960f29d05ab3ecc6de0fcae79ccc7
|
/analysisCommon/src/com/liusy/dataapplatform/base/util/TimestampConverter.java
|
e759a5defe9a567d3d75799de97bb380fc68a5fd
|
[] |
no_license
|
lsylive/DataAnalysis
|
7dfc8ab165b258e9d1c415667b632d042dfa3048
|
9484265761eadc25aa82bcb0277810da7e714152
|
refs/heads/master
| 2016-09-10T08:12:57.345561
| 2014-06-06T07:17:57
| 2014-06-06T07:17:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
// TimestampConverter.java
package com.liusy.dataapplatform.base.util;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import org.apache.commons.lang.StringUtils;
// Referenced classes of package com.liusy.dataapplatform.base.util:
// DateConverter, DateUtil
public class TimestampConverter extends DateConverter
{
public static final String TS_FORMAT = (new StringBuilder(String.valueOf(DateUtil.getDatePattern()))).append(" HH:mm:ss.S").toString();
public TimestampConverter()
{
}
protected Object convertToDate(Class type, Object value)
{
DateFormat df;
df = new SimpleDateFormat(TS_FORMAT);
if (StringUtils.isEmpty(value.toString()))
return null;
try {
return df.parse((String)value);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
protected Object convertToString(Class type, Object value)
{
DateFormat df;
df = new SimpleDateFormat(TS_FORMAT);
return df.format(value);
}
}
|
[
"lsylive@gmail.com"
] |
lsylive@gmail.com
|
9f14dfe0222ce675a38aacd90e1632ef60d7bed6
|
0908336886a13296394c433eee2461e6a3172f49
|
/sdk/plugins/com.liferay.ide.taglib.ui/src/com/liferay/ide/taglib/ui/snippets/AlloyTagInsertDialog.java
|
d850f83997379b308d33e48ca7c39c08c6a60da6
|
[] |
no_license
|
hstachon/liferay-ide
|
56b6d915dde4d7f376eed10bc0691ff877d7770d
|
3f5bf9967b2d91b7cf333cb6c5a131c58013bb80
|
refs/heads/master
| 2020-12-30T18:31:19.189413
| 2012-12-31T07:31:09
| 2013-01-02T06:08:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,722
|
java
|
/*******************************************************************************
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* 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.
*
*******************************************************************************/
package com.liferay.ide.taglib.ui.snippets;
import com.liferay.ide.core.util.StringUtil;
import com.liferay.ide.taglib.ui.model.Tag;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.sapphire.modeling.IModelElement;
import org.eclipse.sapphire.ui.swt.SapphireDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.common.snippets.core.ISnippetItem;
import org.eclipse.wst.common.snippets.internal.util.StringUtils;
/**
* @author Gregory Amerson
*/
@SuppressWarnings( "restriction" )
public class AlloyTagInsertDialog extends SapphireDialog
{
protected List<DisposeListener> disposeListeners = new ArrayList<DisposeListener>();
protected ISnippetItem fItem = null;
protected String fPreparedText = null;
public AlloyTagInsertDialog( Shell host, IModelElement model, String dialogDefPath, boolean clearModality )
{
super( host, model, dialogDefPath );
/**
* Required to fix defect 218700, since Dialogs default to APPLICATION_MODAL.
*/
if( clearModality )
{
setShellStyle( SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MODELESS );
}
else
{
setShellStyle( SWT.RESIZE | getShellStyle() );
}
}
protected void configureShell( Shell shell )
{
super.configureShell( shell );
shell.setSize( 600, 730 );
}
public void addDisposeListener( DisposeListener listener )
{
if( !disposeListeners.contains( listener ) )
{
disposeListeners.add( listener );
}
}
/**
* @see org.eclipse.jface.window.Window#create()
*/
public void create()
{
super.create();
for( int i = 0; i < disposeListeners.size(); i++ )
{
getShell().addDisposeListener( disposeListeners.get( i ) );
}
getShell().setActive();
}
protected void prepareText()
{
// this could be horribly inefficient
String text = ( (Tag) getModelElement() ).getSource().getContent();
// remove all cursor markers
text = StringUtils.replace( text, "${cursor}", StringUtil.EMPTY ); //$NON-NLS-1$
// Update EOLs (bug 80231)
String systemEOL = System.getProperty( "line.separator" ); //$NON-NLS-1$
text = StringUtils.replace( text, "\r\n", "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
text = StringUtils.replace( text, "\r", "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
if( !"\n".equals( systemEOL ) && systemEOL != null ) { //$NON-NLS-1$
text = StringUtils.replace( text, "\n", systemEOL ); //$NON-NLS-1$
}
setPreparedText( text );
}
/**
* Gets the item.
*
* @return Returns a ISnippetItem
*/
public ISnippetItem getItem()
{
return fItem;
}
/**
* Gets the preparedText.
*
* @return Returns a String
*/
public String getPreparedText()
{
if( fPreparedText == null )
prepareText();
return fPreparedText;
}
public void removeDisposeListener( DisposeListener listener )
{
disposeListeners.remove( listener );
}
/**
* Sets the item.
*
* @param item
* The item to set
*/
public void setItem( ISnippetItem item )
{
fItem = item;
}
/**
* Sets the preparedText.
*
* @param preparedText
* The preparedText to set
*/
protected void setPreparedText( String preparedText )
{
fPreparedText = preparedText;
}
protected void createButtonsForButtonBar( Composite parent )
{
super.createButtonsForButtonBar( parent );
getButton( IDialogConstants.OK_ID ).setText( "Insert" ); //$NON-NLS-1$
}
}
|
[
"gregory.amerson@liferay.com"
] |
gregory.amerson@liferay.com
|
7202ef63d44ae31e0a0b1782a455bc0745bbc0a4
|
0ac05e3da06d78292fdfb64141ead86ff6ca038f
|
/OSWE/oswe/openCRX/rtjar/rt.jar.src/javax/print/PrintService.java
|
052d237f67059fcea5501634c8baa490b5a3ef6a
|
[] |
no_license
|
qoo7972365/timmy
|
31581cdcbb8858ac19a8bb7b773441a68b6c390a
|
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
|
refs/heads/master
| 2023-07-26T12:26:35.266587
| 2023-07-17T12:35:19
| 2023-07-17T12:35:19
| 353,889,195
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,633
|
java
|
package javax.print;
import javax.print.attribute.Attribute;
import javax.print.attribute.AttributeSet;
import javax.print.attribute.PrintServiceAttributeSet;
import javax.print.event.PrintServiceAttributeListener;
public interface PrintService {
String getName();
DocPrintJob createPrintJob();
void addPrintServiceAttributeListener(PrintServiceAttributeListener paramPrintServiceAttributeListener);
void removePrintServiceAttributeListener(PrintServiceAttributeListener paramPrintServiceAttributeListener);
PrintServiceAttributeSet getAttributes();
<T extends javax.print.attribute.PrintServiceAttribute> T getAttribute(Class<T> paramClass);
DocFlavor[] getSupportedDocFlavors();
boolean isDocFlavorSupported(DocFlavor paramDocFlavor);
Class<?>[] getSupportedAttributeCategories();
boolean isAttributeCategorySupported(Class<? extends Attribute> paramClass);
Object getDefaultAttributeValue(Class<? extends Attribute> paramClass);
Object getSupportedAttributeValues(Class<? extends Attribute> paramClass, DocFlavor paramDocFlavor, AttributeSet paramAttributeSet);
boolean isAttributeValueSupported(Attribute paramAttribute, DocFlavor paramDocFlavor, AttributeSet paramAttributeSet);
AttributeSet getUnsupportedAttributes(DocFlavor paramDocFlavor, AttributeSet paramAttributeSet);
ServiceUIFactory getServiceUIFactory();
boolean equals(Object paramObject);
int hashCode();
}
/* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/javax/print/PrintService.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"t0984456716"
] |
t0984456716
|
d2737e4a4221122104c44b19bb8a41b011637aaf
|
9d856a7b9921ed175117eae7e5ae4b93dbbc4900
|
/src/main/java/couk/rob4001/iauction/chat/NonChannelChat.java
|
4e58f8ee5f34ea311a7b634cad46db53b2fd6d3e
|
[] |
no_license
|
incredinex/iAuction
|
86afc64c113453792e7a13813a7403e415c200cf
|
f14e5744462ada604325b323919ba88815e6226c
|
refs/heads/master
| 2020-04-07T16:11:25.843999
| 2012-08-09T20:22:09
| 2012-08-09T20:22:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package couk.rob4001.iauction.chat;
import java.util.ArrayList;
import org.bukkit.entity.Player;
public class NonChannelChat implements Chat<NonChannelChat>{
ArrayList<Player> listeners = new ArrayList<Player>();
@Override
public void broadcast(String Msg) {
for (Player p : listeners){
p.sendMessage(Msg);
}
}
@Override
public NonChannelChat setup() {
return this;
}
@Override
public void addListener(Player p) {
if(!listeners.contains(p)){
listeners.add(p);
}
}
@Override
public void removeListener(Player p) {
listeners.remove(p);
}
}
|
[
"robert.wilson1717@gmail.com"
] |
robert.wilson1717@gmail.com
|
d1519eeb8974caf0e1ac4dfd89754167719185b7
|
df8e63036c612d099576cd07256c27b4214fea4b
|
/app/src/androidTest/java/com/shuishou/jslog/ExampleInstrumentedTest.java
|
8f6fbfb2f86b8a73f03d7e125d149587ae283391
|
[] |
no_license
|
lousongtao/loginout-android
|
f044ccb0802370931bba73f11f2b08ed859c1ab8
|
b1e507fecdf69a3cc6a414a6b75eaa65021272c5
|
refs/heads/master
| 2020-04-02T03:54:51.070904
| 2018-10-21T09:20:18
| 2018-10-21T09:20:18
| 153,990,793
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 720
|
java
|
package com.shuishou.jslog;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.shuishou.jslog", appContext.getPackageName());
}
}
|
[
"lousongtao@gmail.com"
] |
lousongtao@gmail.com
|
86b4a55985a7110d509aecf7baf66b7fb70f4d9a
|
c1248eb892670ca9ea49381e812b2d4f659ff2c9
|
/src/main/java/com/yunnex/ops/erp/modules/workflow/flow/dto/AdvAuditStatusDto.java
|
d1ce275dda5cab6c0a1c5b5fdfea9bb09c9a71b6
|
[
"Apache-2.0"
] |
permissive
|
13802706376/HIYA_CORE_CODES_6ISA_ops-web-erp
|
fe62fb23211648587b5d8396a9462e0587c23e55
|
705e90e0e48ec2afaa63d54db6b74d39fad750ff
|
refs/heads/master
| 2020-04-08T08:24:09.287005
| 2018-11-26T14:33:11
| 2018-11-26T14:33:11
| 159,177,385
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,917
|
java
|
package com.yunnex.ops.erp.modules.workflow.flow.dto;
import java.io.Serializable;
/**
* 广告主审核状态DTO
*/
public class AdvAuditStatusDto implements Serializable {
private static final long serialVersionUID = 1L;
private String storeName;
private Integer friendsAuditStatus;
private Integer momoAuditStatus;
private Integer weiboAuditStatus;
private String friendsAuditName;
private String momoAuditName;
private String weiboAuditName;
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public Integer getFriendsAuditStatus() {
return friendsAuditStatus;
}
public void setFriendsAuditStatus(Integer friendsAuditStatus) {
this.friendsAuditStatus = friendsAuditStatus;
}
public Integer getMomoAuditStatus() {
return momoAuditStatus;
}
public void setMomoAuditStatus(Integer momoAuditStatus) {
this.momoAuditStatus = momoAuditStatus;
}
public Integer getWeiboAuditStatus() {
return weiboAuditStatus;
}
public void setWeiboAuditStatus(Integer weiboAuditStatus) {
this.weiboAuditStatus = weiboAuditStatus;
}
public String getFriendsAuditName() {
return friendsAuditName;
}
public void setFriendsAuditName(String friendsAuditName) {
this.friendsAuditName = friendsAuditName;
}
public String getMomoAuditName() {
return momoAuditName;
}
public void setMomoAuditName(String momoAuditName) {
this.momoAuditName = momoAuditName;
}
public String getWeiboAuditName() {
return weiboAuditName;
}
public void setWeiboAuditName(String weiboAuditName) {
this.weiboAuditName = weiboAuditName;
}
}
|
[
"caozhijun@caozhijun-book"
] |
caozhijun@caozhijun-book
|
32ce260371e98f9aaaf0965449041097d0e014ba
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module0454_public/tests/more/src/java/module0454_public_tests_more/a/Foo0.java
|
02593cd98d9c2bd5692205fdff4633909b46284f
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,298
|
java
|
package module0454_public_tests_more.a;
import java.util.logging.*;
import java.util.zip.*;
import javax.annotation.processing.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.net.ssl.ExtendedSSLSession
* @see javax.rmi.ssl.SslRMIClientSocketFactory
* @see java.awt.datatransfer.DataFlavor
*/
@SuppressWarnings("all")
public abstract class Foo0<M> implements module0454_public_tests_more.a.IFoo0<M> {
java.beans.beancontext.BeanContext f0 = null;
java.io.File f1 = null;
java.rmi.Remote f2 = null;
public M element;
public static Foo0 instance;
public static Foo0 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return null;
}
public String getName() {
return element.toString();
}
public void setName(String string) {
return;
}
public M get() {
return element;
}
public void set(Object element) {
this.element = (M)element;
}
public M call() throws Exception {
return (M)getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
f30160a808e9d694957310ed95dd1679b11a1289
|
40d3009354dedebeece55ca708cf1d4630ba9c03
|
/src/main/java/ash/java/tools/restifier/handler/digester/DigesterBase.java
|
5430b9fb59fa7f8f1dcd5aa99beea7ec71f1ab51
|
[] |
no_license
|
ashokkumarta/restifier
|
a484608437bac3520e27b2bdf021ec60795e7cae
|
1d1473f557078627e1513e299c652995ccc6fd12
|
refs/heads/main
| 2022-12-23T02:56:20.597516
| 2020-10-09T03:03:21
| 2020-10-09T03:03:21
| 302,258,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 186
|
java
|
package ash.java.tools.restifier.handler.digester;
import ash.java.tools.restifier.handler.HandlerBase;
public abstract class DigesterBase extends HandlerBase implements Digester {
}
|
[
"ashokkumar.ta@gmail.com"
] |
ashokkumar.ta@gmail.com
|
38afa7039e41da49d569d13ba01370ceeae30181
|
65caa1f041537fed25c0b979ee2f34280f28f0aa
|
/src/main/java/com/kangyonggan/extra/Demo04.java
|
066a248bc354a147a27276edca00590837c64aef
|
[] |
no_license
|
kangyonggan/extra-test
|
f6d84ecfc54acea231073f57de3e3c7ce448e6a4
|
6892a698c97ffa6ef4bd2d8eb8e1e73cd320b532
|
refs/heads/master
| 2021-08-11T05:03:28.911910
| 2017-11-13T06:26:41
| 2017-11-13T06:26:41
| 109,792,715
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 204
|
java
|
package com.kangyonggan.extra;
import com.kangyonggan.extra.annotation.Log;
/**
* @author kangyonggan
* @since 2017/11/5 0005
*/
public class Demo04 {
// @Log
public void hello() {
}
}
|
[
"kangyonggan@gmail.com"
] |
kangyonggan@gmail.com
|
c281c20beb607c78fbcddeaf4cd6dc864f422da6
|
27f902afe3f47037fab636d2da9635d57b581636
|
/JokeWidget/app/src/main/java/com/dstrube/jokewidget/MainActivity.java
|
d4529d34ac6680368ea302f05881e0bf55b0cbcf
|
[] |
no_license
|
dstrube1/playground_android
|
704349ce48eb20b9a3b4ffc0ea83b7e945c5c2c7
|
fd21e578d020939ab67910d989905c30d80763ea
|
refs/heads/master
| 2023-06-24T17:18:23.973314
| 2023-06-20T17:12:50
| 2023-06-20T17:12:50
| 182,904,948
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 306
|
java
|
package com.dstrube.jokewidget;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"dstrube@gmail.com"
] |
dstrube@gmail.com
|
6a0a1f709fb7e86613dd49106937368e2d7009de
|
ec5ee0c75640206efcb7f7bc4a3f46f0a55b7652
|
/src/main/java/com/bitmovin/api/sdk/encoding/encodings/inputStreams/captions/cea608/Cea608CaptionInputStreamListQueryParams.java
|
9e3cc64ec6db361ae203a2066fa26e4f60fb573c
|
[
"MIT"
] |
permissive
|
mcherif/bitmovinexp
|
eb831c18b041c9c86f6d9520b1028dc9b2ea72f6
|
d4d746794f26c8e9692c834e63d5d19503693bbf
|
refs/heads/main
| 2023-04-30T08:14:33.171375
| 2021-05-11T11:19:04
| 2021-05-11T11:19:04
| 368,218,598
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 812
|
java
|
package com.bitmovin.api.sdk.encoding.encodings.inputStreams.captions.cea608;
import java.util.Date;
import java.util.HashMap;
import com.bitmovin.api.sdk.model.*;
public class Cea608CaptionInputStreamListQueryParams extends HashMap<String, Object> {
public Integer getOffset() {
return (Integer) this.get("offset");
}
/**
* @param offset Index of the first item to return, starting at 0. Default is 0 (optional)
*/
public void setOffset(Integer offset) {
this.put("offset", offset);
}
public Integer getLimit() {
return (Integer) this.get("limit");
}
/**
* @param limit Maximum number of items to return. Default is 25, maximum is 100 (optional)
*/
public void setLimit(Integer limit) {
this.put("limit", limit);
}
}
|
[
"openapi@bitmovin.com"
] |
openapi@bitmovin.com
|
d4dccdf9950e5c83b6f94e0083c2810d3782d7e4
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/cargo-core-0.9/containers/weblogic/src/main/java/org/codehaus/cargo/container/weblogic/WebLogic8xInstalledLocalContainer.java
|
809e58bf9240a65bb37e8910d1ef47b3fee14f64
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,917
|
java
|
/*
* ========================================================================
*
* Copyright 2004-2006 Vincent Massol.
*
* 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.codehaus.cargo.container.weblogic;
import org.codehaus.cargo.container.configuration.LocalConfiguration;
import org.codehaus.cargo.container.weblogic.internal.AbstractWebLogicInstalledLocalContainer;
/**
* Special container support for the Bea WebLogic 8.x application server.
*
* @version $Id$
*/
public class WebLogic8xInstalledLocalContainer extends AbstractWebLogicInstalledLocalContainer
{
/**
* Unique container id.
*/
public static final String ID = "weblogic8x";
/**
* {@inheritDoc}
* @see AbstractWebLogicInstalledLocalContainer#AbstractInstalledLocalContainer(org.codehaus.cargo.container.configuration.LocalConfiguration)
*/
public WebLogic8xInstalledLocalContainer(LocalConfiguration configuration)
{
super(configuration);
}
/**
* {@inheritDoc}
* @see org.codehaus.cargo.container.Container#getName()
*/
public final String getName()
{
return "WebLogic 8.x";
}
/**
* {@inheritDoc}
* @see org.codehaus.cargo.container.Container#getId()
*/
public final String getId()
{
return ID;
}
}
|
[
"hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864
|
2cb0fb798454f48981414da9f7b34390757a8a3b
|
db99b347a88d789d5132952d6931c0169a5f019c
|
/auth2/resourceServer/src/main/java/com/yhl/resourceServer/entity/OAthGrantedAuthority.java
|
661181884e9d604a539ee7929dd18ecd0894ea5d
|
[] |
no_license
|
SuperRookieMam/bigData
|
9a175d9ef90e5eef1b27770b1c194b337b246d15
|
1e9344915430402cb30b2591d93d44f966dd2f97
|
refs/heads/master
| 2022-07-03T11:36:01.005417
| 2020-04-09T07:13:59
| 2020-04-09T07:13:59
| 180,294,482
| 2
| 0
| null | 2022-06-17T02:08:13
| 2019-04-09T05:52:14
|
Java
|
UTF-8
|
Java
| false
| false
| 5,064
|
java
|
package com.yhl.resourceServer.entity;
import com.yhl.base.entity.BaseEntity;
import com.yhl.oauthCommon.entity.OAthGrantedAuthorityDto;
import lombok.Getter;
import lombok.Setter;
import org.springframework.http.HttpMethod;
import javax.persistence.*;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
@Getter
@Setter
@Entity
@Table(name = "oath_granted_authority",
uniqueConstraints = {@UniqueConstraint(columnNames = {"client_id", "role_info", "api_uri"})},
indexes = {@Index(columnList = "client_id")
, @Index(columnList = "role_info")})
public class OAthGrantedAuthority extends BaseEntity {
private static final long serialVersionUID = 4062924753193768577L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
//客户端id
@Column(name = "client_id")
private String clientId;
/*apiName*/
@Column(name = "api_name")
private String apiName;
/*api描述*/
@Column(name = "api_description")
private String apiDescription;
/*资源定位*/
@Column(name = "api_uri")
private String apiUri;
@ManyToOne
@JoinColumn(name = "role_info")
private RoleInfo roleInfo;
//对此接口的读写权限,如果多个
@Column(name = "method")
@Enumerated(EnumType.STRING)
private HttpMethod method = HttpMethod.GET;
@Column(name = "company_id")
private Long companyId;
@Column(name = "macther_Type")
private String mactherType;
public String getAuthority() {
String jsonStr="{";
jsonStr+="\"companyId\":\""+roleInfo.getCompanyId()+"\",";
jsonStr+="\"rolName\":\""+roleInfo.getRolName()+"\",";
jsonStr+="\"apiUri\":\""+apiUri+"\",";
jsonStr+="\"method\":\""+method.name()+"\",";
jsonStr+="\"method\":\""+mactherType+"\"}";
return jsonStr;
}
public static OAthGrantedAuthorityDto tooAthGrantedAuthorityDto(OAthGrantedAuthority oAthGrantedAuthority){
OAthGrantedAuthorityDto oAthGrantedAuthorityDto = new OAthGrantedAuthorityDto();
oAthGrantedAuthorityDto.setApiDescription(oAthGrantedAuthority.getApiDescription());
oAthGrantedAuthorityDto.setApiName(oAthGrantedAuthority.getApiName());
oAthGrantedAuthorityDto.setApiUri(oAthGrantedAuthority.getApiUri());
oAthGrantedAuthorityDto.setClientId(oAthGrantedAuthority.getClientId());
oAthGrantedAuthorityDto.setRoleInfo(RoleInfo.toRoleInfoDto(oAthGrantedAuthority.getRoleInfo()));
oAthGrantedAuthorityDto.setMethod(oAthGrantedAuthority.getMethod());
oAthGrantedAuthorityDto.setMactherType(oAthGrantedAuthority.getMactherType());
oAthGrantedAuthorityDto.setCompanyId(oAthGrantedAuthority.getCompanyId());
return oAthGrantedAuthorityDto;
}
public static Set<OAthGrantedAuthorityDto> tooAthGrantedAuthorityDto(Collection<OAthGrantedAuthority> oAthGrantedAuthoritys){
Iterator<OAthGrantedAuthority> iterator = oAthGrantedAuthoritys.iterator();
Set<OAthGrantedAuthorityDto> set = Collections.emptySet();
while (iterator.hasNext()) {
OAthGrantedAuthority oAthGrantedAuthority =iterator.next();
OAthGrantedAuthorityDto oAthGrantedAuthorityDto = new OAthGrantedAuthorityDto();
oAthGrantedAuthorityDto.setApiDescription(oAthGrantedAuthority.getApiDescription());
oAthGrantedAuthorityDto.setApiName(oAthGrantedAuthority.getApiName());
oAthGrantedAuthorityDto.setApiUri(oAthGrantedAuthority.getApiUri());
oAthGrantedAuthorityDto.setClientId(oAthGrantedAuthority.getClientId());
oAthGrantedAuthorityDto.setRoleInfo(RoleInfo.toRoleInfoDto(oAthGrantedAuthority.getRoleInfo()));
oAthGrantedAuthorityDto.setMethod(oAthGrantedAuthority.getMethod());
oAthGrantedAuthorityDto.setMactherType(oAthGrantedAuthority.getMactherType());
oAthGrantedAuthorityDto.setCompanyId(oAthGrantedAuthority.getCompanyId());
set.add(oAthGrantedAuthorityDto);
}
return set;
}
public static OAthGrantedAuthority copyProperties(OAthGrantedAuthorityDto oAthGrantedAuthorityDto){
OAthGrantedAuthority oAthGrantedAuthority = new OAthGrantedAuthority();
oAthGrantedAuthority.setApiDescription(oAthGrantedAuthorityDto.getApiDescription());
oAthGrantedAuthority.setApiName(oAthGrantedAuthorityDto.getApiName());
oAthGrantedAuthority.setApiUri(oAthGrantedAuthorityDto.getApiUri());
oAthGrantedAuthority.setClientId(oAthGrantedAuthorityDto.getClientId());
oAthGrantedAuthority.setRoleInfo(RoleInfo.copyPropertis(oAthGrantedAuthorityDto.getRoleInfo()));
oAthGrantedAuthority.setMethod(oAthGrantedAuthorityDto.getMethod());
oAthGrantedAuthority.setMactherType(oAthGrantedAuthorityDto.getMactherType());
oAthGrantedAuthority.setCompanyId(oAthGrantedAuthorityDto.getCompanyId());
return oAthGrantedAuthority;
}
}
|
[
"422375723@qq.com"
] |
422375723@qq.com
|
495120245fa98f3f43cfdbde514f2c47fe0d9fde
|
7a3234d282fda192fed2c0aacc57c79477a27074
|
/net/minecraft/client/model/ModelPig.java
|
dfcf9db285742d6b21d9db4eb4b6f7bdd8470480
|
[] |
no_license
|
mjuniper/mod-design
|
88a70724730492f9637f210410bcb128b7f7fe8d
|
9106cbffb1eb8113add8da7cfbb2bf37e9f1b38c
|
refs/heads/master
| 2021-01-10T06:46:12.944366
| 2016-10-03T21:59:05
| 2016-10-03T21:59:05
| 44,486,038
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 452
|
java
|
package net.minecraft.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ModelPig extends ModelQuadruped
{
public ModelPig()
{
this(0.0F);
}
public ModelPig(float par1)
{
super(6, par1);
this.head.setTextureOffset(16, 16).addBox(-2.0F, 0.0F, -9.0F, 4, 3, 1, par1);
this.field_78145_g = 4.0F;
}
}
|
[
"mjuniper@gmail.com"
] |
mjuniper@gmail.com
|
315d4bc5909f22fdffaf65fef3421ba50d077880
|
d3172b2ae655f105fa96c1d1cff9ffc4828a4f7f
|
/design-patterns/src/main/java/com/fs/structural/criteriaPattern/criteria/And.java
|
ada0401f6b3338bead9099f3b15de6f3b622703a
|
[] |
no_license
|
SleepingTalent/Design-Patterns
|
db1bc69b54ca4243ac5e635938bbe9883ce9f82c
|
8c50da60165bbcf45f8d33145156e74cf5f99641
|
refs/heads/master
| 2021-01-13T01:54:10.214532
| 2014-02-17T21:41:54
| 2014-02-17T21:41:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 604
|
java
|
package com.fs.structural.criteriaPattern.criteria;
import com.fs.structural.criteriaPattern.Person;
import java.util.List;
public class And implements Criteria {
private Criteria criteria;
private Criteria otherCriteria;
public And(Criteria criteria, Criteria otherCriteria) {
this.criteria = criteria;
this.otherCriteria = otherCriteria;
}
@Override
public List<Person> meetCriteria(List<Person> persons) {
List<Person> firstCriteriaPersons = criteria.meetCriteria(persons);
return otherCriteria.meetCriteria(firstCriteriaPersons);
}
}
|
[
"jaybono30@hotmail.com"
] |
jaybono30@hotmail.com
|
774b02bbed9f5eef877986f4ea04d637dc04bf8a
|
be86038d829ad6f3046253b510641841f494f6a7
|
/src/main/java/org/zerock/service/CommentServiceImpl.java
|
0c897c603222bbb9450500b9a40ae203e82bafd2
|
[] |
no_license
|
RyuChaehyeong/spring-ex02-20210112
|
8308a00d1ab8e76255a26feb402ecb5a6492bdbf
|
78adad6d42b28766c2eef822ed267eba0f2f3340
|
refs/heads/master
| 2023-02-25T18:30:53.372371
| 2021-02-01T05:32:28
| 2021-02-01T05:32:28
| 328,834,494
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 885
|
java
|
package org.zerock.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.zerock.domain.CommentVO;
import org.zerock.mapper.BoardMapper;
import org.zerock.mapper.CommentMapper;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j;
@Service
@AllArgsConstructor //모든 필드로 생성자 만듦
@Log4j
public class CommentServiceImpl implements CommentService {
private CommentMapper mapper;
@Override
public void register(CommentVO comment) {
mapper.insertSelectKey(comment);
}
@Override
public List<CommentVO> getList() {
return mapper.getList();
}
@Override
public CommentVO get(Long cno) {
return mapper.read(cno);
}
@Override
public boolean remove(Long cno) {
return mapper.delete(cno) == 1;
}
@Override
public boolean modify(CommentVO comment) {
return mapper.update(comment) == 1;
}
}
|
[
"fluid15@naver.com"
] |
fluid15@naver.com
|
d750f75b3b868a29618361752a5eb508567cf3a2
|
592b0e0ad07e577e2510723519c0c603d3eb2808
|
/src/main/java/com/jst/prodution/lanefront/dubbo/service/QueryBindCardListDuService.java
|
1649eb64baf168eeddc75c37c6ec09d904242b3d
|
[] |
no_license
|
huangleisir/api-js180323
|
494d7a1d9b07385fc95e9927195e70727e626e53
|
7cc5d16e12cbe6c56b48831bab3736e8477d7360
|
refs/heads/master
| 2021-04-15T05:25:32.061201
| 2018-06-30T15:12:31
| 2018-06-30T15:12:31
| 126,464,555
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 288
|
java
|
/**
*
*/
package com.jst.prodution.lanefront.dubbo.service;
import com.jst.prodution.base.service.BaseService;
/**
* @Description:查询通道绑卡列表
* @author
* @date 2017-06-07 下午4:35:05
*
*/
public interface QueryBindCardListDuService extends BaseService{
}
|
[
"lei.huang@jieshunpay.cn"
] |
lei.huang@jieshunpay.cn
|
90d833357bcdc3950188741ce691b786312b1551
|
f710cc629e765d10a69892afcea54677d535950e
|
/inetsdk/src/main/java/com/company/NetSDK/EM_FACEDETECT_GLASSES_TYPE.java
|
5c0cffd2b9369d5ffab1ba9adceba8d4b3dadc45
|
[] |
no_license
|
zhongershashen/zhi_hui_hui_tian
|
c67bed23f9f5a23c7e58f55a69568b4c2408c227
|
879ac9f3309beff53d17abc57fdfff4eac4d6b77
|
refs/heads/main
| 2023-07-27T17:06:55.259720
| 2021-09-09T09:50:20
| 2021-09-09T09:50:20
| 400,028,506
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 828
|
java
|
package com.company.NetSDK;
import java.io.Serializable;
/**
* \if ENGLISH_LANG
* feature type of detected human face
* \else
* 人脸检测对应人脸特征类型
* \endif
*/
public class EM_FACEDETECT_GLASSES_TYPE implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* \if ENGLISH_LANG
* unknown
* \else
* 未知
* \endif
*/
public static final int EM_FACEDETECT_GLASSES_UNKNOWN = 0;
/**
* \if ENGLISH_LANG
* Wear glasses
* \else
* 戴眼镜
* \endif
*/
public static final int EM_FACEDETECT_WITH_GLASSES = 1;
/**
* \if ENGLISH_LANG
* Without glasses
* \else
* 不戴眼镜
* \endif
*/
public static final int EM_FACEDETECT_WITHOUT_GLASSES = 2;
}
|
[
"1159842919@qq.com"
] |
1159842919@qq.com
|
0d1bfe9678bc098defa4daf4a0ede8f8201e38f2
|
31f671524902a7f28ef6fd0f5ad26510ff69aa20
|
/src/main/java/javaconcurrencye3/executorframework/costposting/entity/CostPostingDtl.java
|
6669b540ad78f9f66b1d39d186fccbc984aab2de
|
[] |
no_license
|
isaacjumac/JavaConcurrencyE2
|
202d98538de25679003cc8a1ed6ba041ae85c418
|
53c3d7f2ca9fc96879986fdeeade8038ab9a5a5e
|
refs/heads/master
| 2021-06-22T09:41:51.922733
| 2019-12-17T02:14:44
| 2019-12-17T02:14:44
| 206,117,079
| 0
| 0
| null | 2021-03-31T22:54:27
| 2019-09-03T16:00:34
|
Java
|
UTF-8
|
Java
| false
| false
| 324
|
java
|
package javaconcurrencye3.executorframework.costposting.entity;
import lombok.Builder;
import lombok.Data;
import java.util.UUID;
@Data
@Builder
public class CostPostingDtl {
private int rowNo;
private UUID projectId;
private String projectName;
private UUID accountId;
private String accountName;
}
|
[
"="
] |
=
|
e8cb9903971fce1ae2c5c449dcea2be8f55abf46
|
4f886387a6c0c86b39d799c0270bfc8eabf11e8c
|
/JAVA/stsWorkspace/TestProject/src/TestNumber.java
|
f32e1c4b2fe2e93a42bf2182ed322490b9330ea7
|
[] |
no_license
|
rumen-scholar/kosmo41_KimCheolEon
|
38d3cbdd7576784440c95b6291656e11eb20915e
|
3ea53334f6b8178c8f85c8bc5bf23d58429bb3a0
|
refs/heads/master
| 2020-03-21T04:41:23.634173
| 2018-12-20T09:19:06
| 2018-12-20T09:19:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 856
|
java
|
public class TestNumber {
// public static int[][] makeCodi(int x, int y) {
//
// }
public static void main(String[] args) {
// TODO Auto-generated method stub
// 9 x 2
// int[][] mNumber = {
// {0,0},
// {0,1},
// {0,2},
// {1,0},
// {1,1},
// {1,2},
// {2,0},
// {2,1},
// {2,2}
// };
// int x,y;
//
//
// for(int i = 0; i < 9; i++) {
// x=mNumber[i][0];
// y=mNumber[i][1];
// System.out.println(x + " " + y);
//
// }
int x = 3;
int y = 3;
int[][] array = new int[9][2];
int x1;
int y1;
int count = x * y;
for (int i = 0; i < count; i++) {
x1 = i / x;
y1 = i % x;
array[i][0] = x1;
array[i][1] = y1;
System.out.println(x1 + " , " + y1);
}
for (int i = 0; i < 9; i++) {
System.out.printf("%2d,%2d\n", array[i][0], array[i][1]);
}
System.out.println();
}
}
|
[
"kchy12345@gmail.com"
] |
kchy12345@gmail.com
|
7b018f6c8188ec843f11f2afae5d85d8b90a99dd
|
82adffa46f4d9b3bef068724e7a3fb5cc7299f47
|
/genesis_src/matthewFay/representations/RelationGraph.java
|
6f45d831a86d0a55348232b8e30d58b3e2a33878
|
[] |
no_license
|
giripal/genesis
|
3fbe9577613a77b485212cfc8bc8ce87ad13b652
|
25e23a5fc1d9463cf54791a551ce0176daea2a99
|
refs/heads/master
| 2020-04-27T10:48:52.570891
| 2014-09-29T03:15:53
| 2014-09-29T03:15:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,299
|
java
|
/* 1: */ package matthewFay.representations;
/* 2: */
/* 3: */ import bridge.reps.entities.Entity;
/* 4: */ import java.util.ArrayList;
/* 5: */ import java.util.HashSet;
/* 6: */ import java.util.List;
/* 7: */ import java.util.Set;
/* 8: */ import matthewFay.CharacterModeling.CharacterProcessor;
/* 9: */ import matthewFay.Utilities.EntityHelper;
/* 10: */ import matthewFay.Utilities.HashMatrix;
/* 11: */
/* 12: */ public class RelationGraph
/* 13: */ {
/* 14: */ private HashMatrix<BasicCharacterModel, BasicCharacterModel, List<Entity>> adjacency_matrix;
/* 15: */
/* 16: */ public RelationGraph()
/* 17: */ {
/* 18:28 */ this.adjacency_matrix = new HashMatrix();
/* 19: */ }
/* 20: */
/* 21: */ public void addEvent(Entity event)
/* 22: */ {
/* 23:32 */ Set<BasicCharacterModel> character_set = new HashSet();
/* 24:33 */ List<Entity> entities = EntityHelper.getAllEntities(event);
/* 25:34 */ for (Entity entity : entities) {
/* 26:35 */ if (CharacterProcessor.isCharacter(entity)) {
/* 27:36 */ character_set.add(CharacterProcessor.getCharacterModel(entity, true));
/* 28: */ }
/* 29: */ }
/* 30:39 */ if (character_set.size() == 2)
/* 31: */ {
/* 32:40 */ List<BasicCharacterModel> character_list = new ArrayList(character_set);
/* 33:41 */ BasicCharacterModel c1 = (BasicCharacterModel)character_list.get(0);
/* 34:42 */ BasicCharacterModel c2 = (BasicCharacterModel)character_list.get(1);
/* 35: */ List<Entity> elts;
/* 36:44 */ if (!this.adjacency_matrix.contains(c1, c2))
/* 37: */ {
/* 38:45 */ List<Entity> elts = new ArrayList();
/* 39:46 */ this.adjacency_matrix.put(c1, c2, elts);
/* 40:47 */ this.adjacency_matrix.put(c2, c1, elts);
/* 41: */ }
/* 42: */ else
/* 43: */ {
/* 44:49 */ elts = (List)this.adjacency_matrix.get(c1, c2);
/* 45: */ }
/* 46:51 */ elts.add(event);
/* 47: */ }
/* 48: */ }
/* 49: */ }
/* Location: C:\Yuya\Development\Genesis\genesis.jar
* Qualified Name: matthewFay.representations.RelationGraph
* JD-Core Version: 0.7.0.1
*/
|
[
"yuyajeremyong@gmail.com"
] |
yuyajeremyong@gmail.com
|
07dc8706e11257d7453c47921b2a91c1cbb27563
|
f35f4008d60bf04e6e3236a60514693cae296d42
|
/app/src/main/java/com/google/android/gms/fitness/request/q.java
|
b25bd8070d62545811a1d8fdf66fc89299fc5e03
|
[] |
no_license
|
alsmwsk/golfmon
|
ef0c8e8c7ecaa13371deed40f7e20468b823b0e9
|
740132d47185bfe9ec9d6774efbde5404ea8cf6d
|
refs/heads/master
| 2020-03-22T11:16:01.438894
| 2018-07-06T09:47:10
| 2018-07-06T09:47:10
| 139,959,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,909
|
java
|
package com.google.android.gms.fitness.request;
import android.app.PendingIntent;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.fitness.data.k;
import com.google.android.gms.fitness.data.k.a;
public class q
implements SafeParcelable
{
public static final Parcelable.Creator<q> CREATOR = new r();
private final int CK;
private final k VW;
private final PendingIntent mPendingIntent;
q(int paramInt, IBinder paramIBinder, PendingIntent paramPendingIntent)
{
this.CK = paramInt;
if (paramIBinder == null) {}
for (k localk = null;; localk = k.a.aq(paramIBinder))
{
this.VW = localk;
this.mPendingIntent = paramPendingIntent;
return;
}
}
public q(k paramk, PendingIntent paramPendingIntent)
{
this.CK = 2;
this.VW = paramk;
this.mPendingIntent = paramPendingIntent;
}
public int describeContents()
{
return 0;
}
int getVersionCode()
{
return this.CK;
}
public PendingIntent kb()
{
return this.mPendingIntent;
}
IBinder kg()
{
if (this.VW == null) {
return null;
}
return this.VW.asBinder();
}
public String toString()
{
Object[] arrayOfObject = new Object[1];
arrayOfObject[0] = this.VW;
return String.format("SensorUnregistrationRequest{%s}", arrayOfObject);
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
r.a(this, paramParcel, paramInt);
}
}
/* Location: C:\Users\TGKIM\Downloads\작업폴더\리버싱\androidReversetools\jd-gui-0.3.6.windows\com.appg.golfmon-1-dex2jar.jar
* Qualified Name: com.google.android.gms.fitness.request.q
* JD-Core Version: 0.7.0.1
*/
|
[
"alsmwsk@naver.com"
] |
alsmwsk@naver.com
|
77178a4f31b20dfc574539cffa30d119c765a7a6
|
6f3b475dfa253ab9e9533428088790ef5c6898b2
|
/Spring DI/src/org/javaturk/spring/di/ch06/profile/domain/bean/BeanD.java
|
e672b7fdbb009eba06018ed8c25a93197118cb20
|
[] |
no_license
|
yusufsevinc/springLearnExamples
|
710bf2f2d4380e3250a976f7e70e6f8607581f5d
|
2fc8caa5a13e97557297d8d9e273888a7287111b
|
refs/heads/master
| 2023-07-09T13:05:10.085534
| 2021-08-05T13:59:56
| 2021-08-18T14:59:12
| 381,757,686
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.javaturk.spring.di.ch06.profile.domain.bean;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
@Component
@Profile("MySQL & PostgreSQL")
public class BeanD {
@Override
public String toString() {
return "BeanD []";
}
}
|
[
"1yusufsevinc@gmail.com"
] |
1yusufsevinc@gmail.com
|
8d541b49b7a87c6b221a960bc9ec05feed71d554
|
4a0f2d321a642075997b2b9ec700e7d4d395d66e
|
/src/com/core/v2ch05/Retire/GBC.java
|
8c235487baeb01cb5d9f59ed8512eb3f26a8bb8a
|
[] |
no_license
|
rexnie/my_java
|
4598fd833d295908c04f5dc77d5e71234e4298dc
|
11fa99dadc93b14ebd949b87458656a0131bfbf1
|
refs/heads/master
| 2021-01-01T05:51:24.291937
| 2017-03-22T12:05:07
| 2017-03-22T12:05:07
| 41,648,277
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,703
|
java
|
package com.core.v2ch05.Retire;
/*
GBC - A convenience class to tame the GridBagLayout
Copyright (C) 2002 Cay S. Horstmann (http://horstmann.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 2 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import java.awt.*;
/**
This class simplifies the use of the GridBagConstraints
class.
*/
public class GBC extends GridBagConstraints
{
/**
Constructs a GBC with a given gridx and gridy position and
all other grid bag constraint values set to the default.
@param gridx the gridx position
@param gridy the gridy position
*/
public GBC(int gridx, int gridy)
{
this.gridx = gridx;
this.gridy = gridy;
}
/**
Constructs a GBC with given gridx, gridy, gridwidth, gridheight
and all other grid bag constraint values set to the default.
@param gridx the gridx position
@param gridy the gridy position
@param gridwidth the cell span in x-direction
@param gridheight the cell span in y-direction
*/
public GBC(int gridx, int gridy, int gridwidth, int gridheight)
{
this.gridx = gridx;
this.gridy = gridy;
this.gridwidth = gridwidth;
this.gridheight = gridheight;
}
/**
Sets the anchor.
@param anchor the anchor value
@return this object for further modification
*/
public GBC setAnchor(int anchor)
{
this.anchor = anchor;
return this;
}
/**
Sets the fill direction.
@param fill the fill direction
@return this object for further modification
*/
public GBC setFill(int fill)
{
this.fill = fill;
return this;
}
/**
Sets the cell weights.
@param weightx the cell weight in x-direction
@param weighty the cell weight in y-direction
@return this object for further modification
*/
public GBC setWeight(double weightx, double weighty)
{
this.weightx = weightx;
this.weighty = weighty;
return this;
}
/**
Sets the insets of this cell.
@param distance the spacing to use in all directions
@return this object for further modification
*/
public GBC setInsets(int distance)
{
this.insets = new Insets(distance, distance, distance, distance);
return this;
}
/**
Sets the insets of this cell.
@param top the spacing to use on top
@param left the spacing to use to the left
@param bottom the spacing to use on the bottom
@param right the spacing to use to the right
@return this object for further modification
*/
public GBC setInsets(int top, int left, int bottom, int right)
{
this.insets = new Insets(top, left, bottom, right);
return this;
}
/**
Sets the internal padding
@param ipadx the internal padding in x-direction
@param ipady the internal padding in y-direction
@return this object for further modification
*/
public GBC setIpad(int ipadx, int ipady)
{
this.ipadx = ipadx;
this.ipady = ipady;
return this;
}
}
|
[
"niedaocai@snda.com"
] |
niedaocai@snda.com
|
64c911e81f22533f3b2087b75b97fb5e9b330486
|
17e37ca416a82f4081f01df86941ca6e5ae4c914
|
/core-projects/nhm-stockimport-defaultdto-import/src/test/java/uk/org/cse/stockimport/hom/impl/steps/services/heating/SecondaryHeatingSystemBuilderTest.java
|
dad56fb53560b25c539531d7629c108d6dec7bcf
|
[] |
no_license
|
decc/national-household-model-core-components
|
d0c8e08c9d23da4c6812df9e07b69eadf7fa16a4
|
31b72cdb3ddaf834a3ba57954d42f531004786b9
|
refs/heads/master
| 2020-05-26T00:33:53.193176
| 2017-08-29T14:23:05
| 2017-08-29T14:23:05
| 57,210,476
| 0
| 1
| null | 2017-04-04T13:45:41
| 2016-04-27T12:08:08
|
Java
|
UTF-8
|
Java
| false
| false
| 3,578
|
java
|
package uk.org.cse.stockimport.hom.impl.steps.services.heating;
import org.junit.Test;
import junit.framework.Assert;
import uk.org.cse.nhm.hom.emf.technologies.FuelType;
import uk.org.cse.nhm.hom.emf.technologies.IRoomHeater;
import uk.org.cse.nhm.hom.emf.technologies.ISpaceHeater;
import uk.org.cse.nhm.hom.emf.technologies.boilers.FlueType;
import uk.org.cse.nhm.hom.emf.util.Efficiency;
import uk.org.cse.stockimport.domain.services.SecondaryHeatingSystemType;
public class SecondaryHeatingSystemBuilderTest {
@Test
public void testBuildNullSecondaryHeatingSystem() {
final SecondaryHeatingSystemBuilder builder = new SecondaryHeatingSystemBuilder();
Assert.assertNull(builder.createSecondaryHeatingSystem(SecondaryHeatingSystemType.NOT_KNOWN));
Assert.assertNull(builder.createSecondaryHeatingSystem(SecondaryHeatingSystemType.NO_SECONDARY_SYSTEM));
}
@Test
public void testBuildElectricSHS() {
final SecondaryHeatingSystemBuilder builder = new SecondaryHeatingSystemBuilder();
ISpaceHeater heater = builder.createSecondaryHeatingSystem(SecondaryHeatingSystemType.ELECTRIC_ROOM_HEATERS);
Assert.assertTrue(heater instanceof IRoomHeater);
final IRoomHeater rh = (IRoomHeater) heater;
Assert.assertEquals(FuelType.ELECTRICITY, rh.getFuel());
Assert.assertEquals(Efficiency.fromDouble(1d), rh.getEfficiency());
Assert.assertEquals(FlueType.NOT_APPLICABLE, rh.getFlueType());
}
@Test
public void testBuildLPGHeater() {
final SecondaryHeatingSystemBuilder builder = new SecondaryHeatingSystemBuilder();
ISpaceHeater heater = builder.createSecondaryHeatingSystem(SecondaryHeatingSystemType.LPG_HEATER);
Assert.assertTrue(heater instanceof IRoomHeater);
final IRoomHeater rh = (IRoomHeater) heater;
Assert.assertEquals(FuelType.BOTTLED_LPG, rh.getFuel());
Assert.assertEquals(Efficiency.fromDouble(0.58), rh.getEfficiency());
Assert.assertEquals(FlueType.NOT_APPLICABLE, rh.getFlueType());
}
@Test
public void testBuildGasFire() {
final SecondaryHeatingSystemBuilder builder = new SecondaryHeatingSystemBuilder();
ISpaceHeater heater = builder.createSecondaryHeatingSystem(SecondaryHeatingSystemType.GAS_FIRE);
Assert.assertTrue(heater instanceof IRoomHeater);
final IRoomHeater rh = (IRoomHeater) heater;
Assert.assertEquals(FuelType.MAINS_GAS, rh.getFuel());
Assert.assertEquals(Efficiency.fromDouble(0.58), rh.getEfficiency());
Assert.assertEquals(FlueType.BALANCED_FLUE, rh.getFlueType());
}
@Test
public void testBuildGasCEFire() {
final SecondaryHeatingSystemBuilder builder = new SecondaryHeatingSystemBuilder();
ISpaceHeater heater = builder.createSecondaryHeatingSystem(SecondaryHeatingSystemType.GAS_COAL_EFFECT_FIRE);
Assert.assertTrue(heater instanceof IRoomHeater);
final IRoomHeater rh = (IRoomHeater) heater;
Assert.assertEquals(FuelType.MAINS_GAS, rh.getFuel());
Assert.assertEquals(Efficiency.fromDouble(0.4), rh.getEfficiency());
Assert.assertEquals(FlueType.BALANCED_FLUE, rh.getFlueType());
}
@Test
public void testBuildOpenFire() {
final SecondaryHeatingSystemBuilder builder = new SecondaryHeatingSystemBuilder();
ISpaceHeater heater = builder.createSecondaryHeatingSystem(SecondaryHeatingSystemType.OPEN_FIRE);
Assert.assertTrue(heater instanceof IRoomHeater);
final IRoomHeater rh = (IRoomHeater) heater;
Assert.assertEquals(FuelType.MAINS_GAS, rh.getFuel());
Assert.assertEquals(Efficiency.fromDouble(0.45), rh.getEfficiency());
Assert.assertEquals(FlueType.CHIMNEY, rh.getFlueType());
}
}
|
[
"richard.tiffin@akoolla.com"
] |
richard.tiffin@akoolla.com
|
b47e669c81aabf2d144e4943860683cbb55c5525
|
9cc124920bdd52460cf3e602b049542f328c97aa
|
/rdap-service/src/main/java/org/restfulwhois/rdap/redirect/dao/impl/AutnumRedirectDao.java
|
4801c9978f62dbf6a4bac6dfbb7cc5d16a315cf6
|
[
"BSD-2-Clause"
] |
permissive
|
whileZhou/rdap
|
373d5e6f19a32b38594b45f6856b30593bfb18eb
|
94a79a8ce67b90d4f093878030b276dc83d8c998
|
refs/heads/master
| 2021-01-20T16:47:29.432866
| 2015-09-17T02:01:59
| 2015-09-17T02:01:59
| 38,670,099
| 0
| 0
| null | 2015-07-07T07:04:08
| 2015-07-07T07:04:08
| null |
UTF-8
|
Java
| false
| false
| 6,968
|
java
|
/*
* Copyright (c) 2012 - 2015, Internet Corporation for Assigned Names and
* Numbers (ICANN) and China Internet Network Information Center (CNNIC)
*
* 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 the ICANN, CNNIC 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 ICANN OR CNNIC 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.restfulwhois.rdap.redirect.dao.impl;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.restfulwhois.rdap.bootstrap.bean.AutnumRedirect;
import org.restfulwhois.rdap.bootstrap.bean.Redirect;
import org.restfulwhois.rdap.common.support.QueryParam;
import org.restfulwhois.rdap.redirect.bean.RedirectResponse;
import org.restfulwhois.rdap.redirect.dao.RedirectDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.PreparedStatementCreator;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;
/**
* <pre>
* autnum redirect DAO maily select autnum object from RDAP_AUTNUM_REDIRECT.
* overrite the query method in RedirectDao and return the RedirectResponse.
* </pre>
*
* @author jiashuo
*
*/
@Repository
public class AutnumRedirectDao implements RedirectDao {
/**
* logger.
*/
private static final Logger LOGGER = LoggerFactory
.getLogger(AutnumRedirectDao.class);
/**
* save.
*/
private static final String SAVE_REDIRECT =
"insert into RDAP_AUTNUM_REDIRECT"
+ "(START_AUTNUM,END_AUTNUM,REDIRECT_URL) values (?,?,?)";
/**
* select max id.
*/
private static final String SELECT_MAX_ID =
"select max(AS_REDIRECT_ID) from RDAP_AUTNUM_REDIRECT";
/**
* delete rows <= id.
*/
private static final String DELETE_SMALLER_THAN_ID =
"delete from RDAP_AUTNUM_REDIRECT where AS_REDIRECT_ID<=?";
/**
* JDBC template.
*/
@Autowired
private JdbcTemplate jdbcTemplate;
/**
* <pre>
* redirect the autnum.
* select data from RDAP_AUTNUM_REDIRECT table.
* </pre>
*
* @param queryParam
* the queryParam for autnum.
* @return RedirectResponse response of select redirect autnum.
*/
@Override
public RedirectResponse query(QueryParam queryParam) {
LOGGER.debug("query, queryParam:" + queryParam);
final String autnumQ = queryParam.getQ();
final String sql =
"select *,end_autnum - start_autnum as asInterval "
+ " from RDAP_AUTNUM_REDIRECT "
+ " where START_AUTNUM <= ? and END_AUTNUM >= ?"
+ " order by asInterval limit 1";
List<String> result =
jdbcTemplate.query(new PreparedStatementCreator() {
@Override
public PreparedStatement createPreparedStatement(
Connection conn) throws SQLException {
PreparedStatement ps = conn.prepareStatement(sql);
ps.setString(1, autnumQ);
ps.setString(2, autnumQ);
return ps;
}
}, new RowMapper<String>() {
@Override
public String mapRow(ResultSet rs, int rowNum)
throws SQLException {
return rs.getString("REDIRECT_URL");
}
});
if (null == result || result.size() == 0) {
LOGGER.debug("query, result is null");
return null;
}
LOGGER.debug("query, result:" + result.get(0));
return new RedirectResponse(result.get(0));
}
@Override
public void save(List<Redirect> bootstraps) {
if (null == bootstraps || bootstraps.size() == 0) {
LOGGER.info("bootstraps is empty, not do sync.");
return;
}
Long maxOldId = getMaxId();
LOGGER.info("get tobe delete maxOldId:{}", maxOldId);
LOGGER.info("save new bootstraps...");
saveNew(bootstraps);
LOGGER.info("delete old bootstraps...");
deleteOld(maxOldId);
}
/**
* delete old redirects.
*
* @param maxOldId
* maxOldId.
*/
private void deleteOld(Long maxOldId) {
if (null == maxOldId) {
LOGGER.info("maxOldId is null, not delete.");
return;
}
jdbcTemplate.update(DELETE_SMALLER_THAN_ID, maxOldId);
}
/**
* save new bootstraps.
*
* @param bootstraps
* bootstraps.
*/
private void saveNew(List<Redirect> bootstraps) {
List<Object[]> batchSaveParams = new ArrayList<Object[]>();
for (Redirect bootstrap : bootstraps) {
AutnumRedirect autnumRedirect = (AutnumRedirect) bootstrap;
batchSaveParams.add(new Object[] {autnumRedirect.getStartAutnum(),
autnumRedirect.getEndAutnum(),
autnumRedirect.getUrls().get(0) });
}
if (batchSaveParams.size() > 0) {
jdbcTemplate.batchUpdate(SAVE_REDIRECT, batchSaveParams);
}
}
/**
* get max id.
*
* @return max id.
*/
private Long getMaxId() {
return jdbcTemplate.queryForObject(SELECT_MAX_ID, Long.class);
}
}
|
[
"jiashuo@cnnic.cn"
] |
jiashuo@cnnic.cn
|
8db4f4d006f4a25cc2239774c6586288ccf41ec4
|
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
|
/src/main/java/com/alipay/api/domain/AlipayDataAiserviceCloudbusScheduletaskshiftAddModel.java
|
244133663c2227a9938b8eb058df399c92d1fff0
|
[
"Apache-2.0"
] |
permissive
|
zhangpo/alipay-sdk-java-all
|
13f79e34d5f030ac2f4367a93e879e0e60f335f7
|
e69305d18fce0cc01d03ca52389f461527b25865
|
refs/heads/master
| 2022-11-04T20:47:21.777559
| 2020-06-15T08:31:02
| 2020-06-15T08:31:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,956
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 排班调度---轮班任务
*
* @author auto create
* @since 1.0, 2020-03-02 16:58:00
*/
public class AlipayDataAiserviceCloudbusScheduletaskshiftAddModel extends AlipayObject {
private static final long serialVersionUID = 2645367765432695249L;
/**
* 接口版本号
*/
@ApiField("app_version")
private String appVersion;
/**
* 市
*/
@ApiField("city_code")
private String cityCode;
/**
* 公交公司id
*/
@ApiField("corp_id")
private String corpId;
/**
* 待轮班的日期天数
*/
@ApiField("cycle_cnt")
private Long cycleCnt;
/**
* 该线路配备的司机数
*/
@ApiField("driver_cnt")
private Long driverCnt;
/**
* 拓展参数
*/
@ApiField("ext_param")
private String extParam;
/**
* 线路id
*/
@ApiField("line_id")
private String lineId;
/**
* 待排班的时期列表,多个用逗号分隔
*/
@ApiListField("shift_date_list")
@ApiField("string")
private List<String> shiftDateList;
/**
* 任务名称
*/
@ApiField("task_name")
private String taskName;
/**
* 排班任务id
*/
@ApiListField("work_schedule_pids")
@ApiField("string")
private List<String> workSchedulePids;
public String getAppVersion() {
return this.appVersion;
}
public void setAppVersion(String appVersion) {
this.appVersion = appVersion;
}
public String getCityCode() {
return this.cityCode;
}
public void setCityCode(String cityCode) {
this.cityCode = cityCode;
}
public String getCorpId() {
return this.corpId;
}
public void setCorpId(String corpId) {
this.corpId = corpId;
}
public Long getCycleCnt() {
return this.cycleCnt;
}
public void setCycleCnt(Long cycleCnt) {
this.cycleCnt = cycleCnt;
}
public Long getDriverCnt() {
return this.driverCnt;
}
public void setDriverCnt(Long driverCnt) {
this.driverCnt = driverCnt;
}
public String getExtParam() {
return this.extParam;
}
public void setExtParam(String extParam) {
this.extParam = extParam;
}
public String getLineId() {
return this.lineId;
}
public void setLineId(String lineId) {
this.lineId = lineId;
}
public List<String> getShiftDateList() {
return this.shiftDateList;
}
public void setShiftDateList(List<String> shiftDateList) {
this.shiftDateList = shiftDateList;
}
public String getTaskName() {
return this.taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public List<String> getWorkSchedulePids() {
return this.workSchedulePids;
}
public void setWorkSchedulePids(List<String> workSchedulePids) {
this.workSchedulePids = workSchedulePids;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0f2327e6134e735426063fd6b87ddfcbe136336f
|
6df1f52608fe9acbdd34afdd889c61768d3d2c97
|
/src/main/java/dev/mvc/prodest/ProdestCont.java
|
03f5fcce57b8ef40f21467d36b3fb6703c61d591
|
[] |
no_license
|
khb1124/Team4_Combined
|
1bc72428dbf1daf0115a5c6f87eba3e54bb8e79d
|
ea7f0a4786b247603a10f7dffbf4e5aa545ed4b1
|
refs/heads/master
| 2022-12-21T08:55:03.203292
| 2019-08-05T08:33:38
| 2019-08-05T08:33:38
| 200,615,921
| 0
| 0
| null | 2022-12-16T00:58:09
| 2019-08-05T08:35:25
|
Java
|
UHC
|
Java
| false
| false
| 1,289
|
java
|
package dev.mvc.prodest;
import java.util.ArrayList;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
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.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import dev.mvc.prodcate.ProdcateProcInter;
import dev.mvc.prodcategrp.ProdcategrpProcInter;
import dev.mvc.product.ProductProcInter;
@Controller
public class ProdestCont {
//ProdcategrpProcInter 를 구현한 ProdcategrpProc 객체가 만들어져 할당됨.
@Autowired
@Qualifier("dev.mvc.prodcate.ProdcateProc")
private ProdcateProcInter prodcateProc;
@Autowired
@Qualifier("dev.mvc.product.ProductProc")
private ProductProcInter productProc = null;
@Autowired
@Qualifier("dev.mvc.prodest.ProdestProc")
private ProdestProcInter prodestProc;
public ProdestCont() {
System.out.println("--> ProdestCont created.");
}
}
|
[
"soldesk@soldesk-PC"
] |
soldesk@soldesk-PC
|
a60c76032554473951b1d165668c7960b7e12e86
|
05948ca1cd3c0d2bcd65056d691c4d1b2e795318
|
/classes/android/support/v4/view/accessibility/AccessibilityNodeInfoCompatIcs.java
|
8e0ff506e54a602dfa77316734c347df00550fe4
|
[] |
no_license
|
waterwitness/xiaoenai
|
356a1163f422c882cabe57c0cd3427e0600ff136
|
d24c4d457d6ea9281a8a789bc3a29905b06002c6
|
refs/heads/master
| 2021-01-10T22:14:17.059983
| 2016-10-08T08:39:11
| 2016-10-08T08:39:11
| 70,317,042
| 0
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,190
|
java
|
package android.support.v4.view.accessibility;
import android.graphics.Rect;
import android.view.View;
import android.view.accessibility.AccessibilityNodeInfo;
import java.util.List;
class AccessibilityNodeInfoCompatIcs
{
public static void addAction(Object paramObject, int paramInt)
{
((AccessibilityNodeInfo)paramObject).addAction(paramInt);
}
public static void addChild(Object paramObject, View paramView)
{
((AccessibilityNodeInfo)paramObject).addChild(paramView);
}
public static List<Object> findAccessibilityNodeInfosByText(Object paramObject, String paramString)
{
return (List)((AccessibilityNodeInfo)paramObject).findAccessibilityNodeInfosByText(paramString);
}
public static int getActions(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getActions();
}
public static void getBoundsInParent(Object paramObject, Rect paramRect)
{
((AccessibilityNodeInfo)paramObject).getBoundsInParent(paramRect);
}
public static void getBoundsInScreen(Object paramObject, Rect paramRect)
{
((AccessibilityNodeInfo)paramObject).getBoundsInScreen(paramRect);
}
public static Object getChild(Object paramObject, int paramInt)
{
return ((AccessibilityNodeInfo)paramObject).getChild(paramInt);
}
public static int getChildCount(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getChildCount();
}
public static CharSequence getClassName(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getClassName();
}
public static CharSequence getContentDescription(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getContentDescription();
}
public static CharSequence getPackageName(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getPackageName();
}
public static Object getParent(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getParent();
}
public static CharSequence getText(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getText();
}
public static int getWindowId(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).getWindowId();
}
public static boolean isCheckable(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isCheckable();
}
public static boolean isChecked(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isChecked();
}
public static boolean isClickable(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isClickable();
}
public static boolean isEnabled(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isEnabled();
}
public static boolean isFocusable(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isFocusable();
}
public static boolean isFocused(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isFocused();
}
public static boolean isLongClickable(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isLongClickable();
}
public static boolean isPassword(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isPassword();
}
public static boolean isScrollable(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isScrollable();
}
public static boolean isSelected(Object paramObject)
{
return ((AccessibilityNodeInfo)paramObject).isSelected();
}
public static Object obtain()
{
return AccessibilityNodeInfo.obtain();
}
public static Object obtain(View paramView)
{
return AccessibilityNodeInfo.obtain(paramView);
}
public static Object obtain(Object paramObject)
{
return AccessibilityNodeInfo.obtain((AccessibilityNodeInfo)paramObject);
}
public static boolean performAction(Object paramObject, int paramInt)
{
return ((AccessibilityNodeInfo)paramObject).performAction(paramInt);
}
public static void recycle(Object paramObject)
{
((AccessibilityNodeInfo)paramObject).recycle();
}
public static void setBoundsInParent(Object paramObject, Rect paramRect)
{
((AccessibilityNodeInfo)paramObject).setBoundsInParent(paramRect);
}
public static void setBoundsInScreen(Object paramObject, Rect paramRect)
{
((AccessibilityNodeInfo)paramObject).setBoundsInScreen(paramRect);
}
public static void setCheckable(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setCheckable(paramBoolean);
}
public static void setChecked(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setChecked(paramBoolean);
}
public static void setClassName(Object paramObject, CharSequence paramCharSequence)
{
((AccessibilityNodeInfo)paramObject).setClassName(paramCharSequence);
}
public static void setClickable(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setClickable(paramBoolean);
}
public static void setContentDescription(Object paramObject, CharSequence paramCharSequence)
{
((AccessibilityNodeInfo)paramObject).setContentDescription(paramCharSequence);
}
public static void setEnabled(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setEnabled(paramBoolean);
}
public static void setFocusable(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setFocusable(paramBoolean);
}
public static void setFocused(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setFocused(paramBoolean);
}
public static void setLongClickable(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setLongClickable(paramBoolean);
}
public static void setPackageName(Object paramObject, CharSequence paramCharSequence)
{
((AccessibilityNodeInfo)paramObject).setPackageName(paramCharSequence);
}
public static void setParent(Object paramObject, View paramView)
{
((AccessibilityNodeInfo)paramObject).setParent(paramView);
}
public static void setPassword(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setPassword(paramBoolean);
}
public static void setScrollable(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setScrollable(paramBoolean);
}
public static void setSelected(Object paramObject, boolean paramBoolean)
{
((AccessibilityNodeInfo)paramObject).setSelected(paramBoolean);
}
public static void setSource(Object paramObject, View paramView)
{
((AccessibilityNodeInfo)paramObject).setSource(paramView);
}
public static void setText(Object paramObject, CharSequence paramCharSequence)
{
((AccessibilityNodeInfo)paramObject).setText(paramCharSequence);
}
}
/* Location: E:\apk\xiaoenai2\classes-dex2jar.jar!\android\support\v4\view\accessibility\AccessibilityNodeInfoCompatIcs.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
1d5e77b9e2625371780660a5ef999580a5f8f714
|
cbdb7891230c83b61be509bc0c8cd02ff5f420d8
|
/jczh/jczh_common_service/src/main/java/com/kaiwait/service/mst/impl/LoginServiceImpl.java
|
4efd247d5feb084f5d6937eae74d8d7a780e14b9
|
[] |
no_license
|
zhanglixye/jcyclic
|
87e26d1412131e441279240b4468993cb9b08bc3
|
8a311f8b1e6a81fb40f093d725b5182763d6624e
|
refs/heads/master
| 2023-01-04T11:23:22.001517
| 2020-11-02T05:20:08
| 2020-11-02T05:20:08
| 309,265,334
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,031
|
java
|
package com.kaiwait.service.mst.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.kaiwait.bean.mst.entity.User;
import com.kaiwait.core.utils.DateUtil;
import com.kaiwait.core.utils.RequestUtil;
import com.kaiwait.core.utils.SpringUtil;
import com.kaiwait.mappers.mst.UserMapper;
import com.kaiwait.service.mst.LoginService;
@Service
public class LoginServiceImpl implements LoginService {
@Resource
private UserMapper userMapper;
public User login(String userName, String pwd) {
//try {
/*
MessageDigest md = MessageDigest.getInstance("MD5");
BASE64Encoder base64en = new BASE64Encoder();
*/
List<User> userList = userMapper.getUserForLogin(userName);
User user = new User();
String timeZone = "";
Boolean isLogin = false;
for(int i = 0;i < userList.size();i++)
{
isLogin = SpringUtil.match(pwd,userList.get(i).getPwd());
if(isLogin)
{
user = userList.get(i);
user.setRoleStr(userMapper.searchRoleStr(userList.get(i).getUserCD()));
if(user.getSysLockFlg() == 1)
{
Boolean flg = RequestUtil.getSysLockFlg(user.getRoleStr());
if(flg)
{
user.setSysLockMsg("locked");
return user;
}
}
user.setRoleList(userMapper.searchNodeListByUser(userList.get(i).getUserCD(), userList.get(i).getCompanyCD()));
user.setPageNodeList(userMapper.searchPageNodeList());
user.setComapnyList(userMapper.getCheckedCompanyList(userList.get(i).getUserCD()));
timeZone = userMapper.getTimeZoneByCompany(userList.get(i).getCompanyCD());
user.setTimeZoneType(timeZone);
user.setDateCompanyZone(DateUtil.getNewTime(DateUtil.getDateForNow(DateUtil.dateTimeFormat), Integer.valueOf(timeZone)));
break;
}
}
if(isLogin)
{
return user;
}else {
return null;
}
//} catch (Exception e) {
// return null;
//}
}
public int changePwd(String userName, String pwd,String oldPassword) {
User user = new User();
user = this.login(userName,oldPassword);
if(user != null)
{
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String pswupdate = formatter.format(date);
String password = SpringUtil.encrypt(pwd);
int isChange = (int)userMapper.changePwdTx(user.getUserCD(),password,pswupdate);
if(isChange > 0)
{
return 1;
}
else {
return 0;
}
}
return 0;
/*
try {
MessageDigest md = MessageDigest.getInstance("MD5");
BASE64Encoder base64en = new BASE64Encoder();
String password = base64en.encode(md.digest(pwd.getBytes("UTF-8")));
String oldPwd = base64en.encode(md.digest(oldPassword.getBytes("UTF-8")));
int isChange = (int)userMapper.changePwdTx(userName,password,oldPwd);
if(isChange > 0)
{
return 1;
}
else {
return 0;
}
} catch (Exception e) {
return 0;
}
*/
}
}
|
[
"1364969970@qq.com"
] |
1364969970@qq.com
|
2ab58a103d4e04a3f1f286fe49efce00682d36aa
|
0ac05e3da06d78292fdfb64141ead86ff6ca038f
|
/OSWE/oswe/openCRX/rtjar/rt.jar.src/com/sun/xml/internal/bind/annotation/XmlLocation.java
|
a94ff683bb36faa1fcfbcfbc2694427c16d3c660
|
[] |
no_license
|
qoo7972365/timmy
|
31581cdcbb8858ac19a8bb7b773441a68b6c390a
|
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
|
refs/heads/master
| 2023-07-26T12:26:35.266587
| 2023-07-17T12:35:19
| 2023-07-17T12:35:19
| 353,889,195
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 525
|
java
|
package com.sun.xml.internal.bind.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface XmlLocation {}
/* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/com/sun/xml/internal/bind/annotation/XmlLocation.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"t0984456716"
] |
t0984456716
|
eccea2b293a64233dc97b33f1f3ab3563824c0d4
|
7df84ffd084caff7f89e4f9bfe4ea92531148568
|
/src/com/thinkinginjava/controlling_execution/exercise/Ex04.java
|
c044a8104a32ab32d9a0ff6b0cf8c167f18df86b
|
[] |
no_license
|
MonikaSophin/myproject
|
ece1fb8d0406867a67b5e2b53291973e20843c9e
|
679ae00ff5533f7d502b1e4fead60eff462ced1d
|
refs/heads/master
| 2022-06-25T22:50:55.316203
| 2020-12-02T07:22:07
| 2020-12-02T07:22:07
| 152,444,035
| 0
| 1
| null | 2022-06-21T03:27:24
| 2018-10-10T15:12:07
|
Java
|
UTF-8
|
Java
| false
| false
| 781
|
java
|
package com.thinkinginjava.controlling_execution.exercise;
/**
* @Author: monika
* @Date: 2018/11/4 19:54
* @Version: 1.0
* @Description: page 67
* 练习4:写一个程序,使用两个嵌套的for循环和取余操作符(%)来探测和打印
* 素数(只能被其自身和1整除,而不能被其他数字整除的整数)。
*/
public class Ex04 {
public static void main(String[] args) {
int count =0;
for (int i = 1; i <= 1000; i++) {
int factors = 0;
//排除自身,只有被1整除。
for (int j = 1; j <= Math.sqrt(i); j++) {//j < (i+2)/2
if ((i % j) == 0) factors++;
}
if (factors < 2) System.out.println(i + " is prime"+" "+ ++count);
}
}
}
|
[
"43468391+MonikaSophin@users.noreply.github.com"
] |
43468391+MonikaSophin@users.noreply.github.com
|
9133c2e5df9c9801f2fdbcab654badee87b69a0a
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XRENDERING-481-64-29-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest.java
|
a05c121ab3928bc951c2e2f3d50522374248dffb
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 584
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Mar 31 19:11:50 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class InternalTemplateManager_ESTest extends InternalTemplateManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
228406236954611498d0799919cd39335f064d72
|
b66bdee811ed0eaea0b221fea851f59dd41e66ec
|
/src/android/support/v4/app/aa.java
|
d57b3021449ebbfaec5a3d21677a6c3915d36967
|
[] |
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
| 902
|
java
|
package android.support.v4.app;
import android.support.v4.view.bp;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
class aa
implements Animation.AnimationListener
{
private boolean a = false;
private View b;
public aa(View paramView, Animation paramAnimation)
{
if ((paramView == null) || (paramAnimation == null)) {
return;
}
b = paramView;
}
public void onAnimationEnd(Animation paramAnimation)
{
if (a) {
bp.a(b, 0, null);
}
}
public void onAnimationRepeat(Animation paramAnimation) {}
public void onAnimationStart(Animation paramAnimation)
{
a = z.a(b, paramAnimation);
if (a) {
bp.a(b, 2, null);
}
}
}
/* Location:
* Qualified Name: android.support.v4.app.aa
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
634afd3a6bfb08537886a1aa3f2f26e64809c59a
|
a390ca70d2535c31c2174c724b323722115d9b98
|
/interface21-framework/src/main/java/com/interface21/dao/DeadlockLoserDataAccessException.java
|
045c8bafaf7a1fc1e5f4c5b111ed5ab018184e92
|
[
"Apache-2.0"
] |
permissive
|
hcmfys/spring-framework-2003
|
2ebf1b70dfd3a5c355fc65e875ef2867d1002570
|
1fa511ad547ea98d7bfee4bb439e6e9dd5eae40a
|
refs/heads/master
| 2022-07-10T15:01:10.494715
| 2020-01-13T01:18:52
| 2020-01-13T01:18:52
| 232,512,278
| 0
| 0
|
Apache-2.0
| 2022-06-29T17:53:44
| 2020-01-08T08:10:54
|
Java
|
UTF-8
|
Java
| false
| false
| 912
|
java
|
/*
* Copyright (c) 2011-2025 PiChen
*/
/**
* Generic framework code included with
* <a href="http://www.amazon.com/exec/obidos/tg/detail/-/1861007841/">Expert One-On-One J2EE Design and Development</a>
* by Rod Johnson (Wrox, 2002).
* This code is free to use and modify.
* Please contact <a href="mailto:rod.johnson@interface21.com">rod.johnson@interface21.com</a>
* for commercial support.
*/
package com.interface21.dao;
/**
* Generic exception thrown when the current process was
* a deadlock loser, and its transaction rolled back.
*
* @author Rod Johnson
* @version $Id$
*/
public class DeadlockLoserDataAccessException extends DataAccessException {
/**
* Constructor for DeadlockLoserDataAccessException.
*
* @param msg mesg
* @param ex root cause
*/
public DeadlockLoserDataAccessException(String msg, Throwable ex) {
super(msg, ex);
}
}
|
[
"123456"
] |
123456
|
f03aec5a859d2fb4e4033eff7cc68de9e3e32b47
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/newmedia/p897ui/webview/C20005g.java
|
dfe6c9e3b9dd78fb89c430ca80eb1c896ba04868
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,015
|
java
|
package com.p280ss.android.newmedia.p897ui.webview;
import android.content.Context;
import android.os.Build.VERSION;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.bytedance.common.utility.C6319n;
import com.bytedance.ies.ugc.appcontext.C6399b;
import com.p280ss.android.common.util.NetworkUtils;
import com.p280ss.android.ugc.aweme.app.C22912d;
import com.p280ss.android.ugc.aweme.crossplatform.C25881h;
import com.p280ss.android.ugc.aweme.i18n.language.C30476b;
import com.p280ss.android.ugc.aweme.language.C32326h;
import java.util.Locale;
import kotlin.TypeCastException;
import kotlin.jvm.internal.C7573i;
import kotlin.text.C7634n;
/* renamed from: com.ss.android.newmedia.ui.webview.g */
public final class C20005g {
/* renamed from: a */
public static final C20005g f54137a = new C20005g();
private C20005g() {
}
/* renamed from: a */
public final void mo53551a(WebView webView) {
if (webView != null) {
Context context = webView.getContext();
C7573i.m23582a((Object) context, "webview.context");
String a = m65925a(context, webView);
if (!C6319n.m19593a(a)) {
WebSettings settings = webView.getSettings();
C7573i.m23582a((Object) settings, "webview.settings");
settings.setUserAgentString(a);
}
}
}
/* renamed from: a */
private static String m65925a(Context context, WebView webView) {
String str;
C7573i.m23587b(context, "context");
C7573i.m23587b(webView, C22912d.f60641a);
String a = C20006h.m65927a(context, webView);
if (a == null) {
a = "";
}
StringBuilder sb = new StringBuilder();
sb.append(a);
sb.append(" trill_");
sb.append(C6399b.m19933i());
sb.append(" JsSdk/1.0 NetType/");
String networkAccessType = NetworkUtils.getNetworkAccessType(C6399b.m19921a());
C7573i.m23582a((Object) networkAccessType, "NetworkUtils.getNetworkA….getApplicationContext())");
if (networkAccessType != null) {
String upperCase = networkAccessType.toUpperCase();
C7573i.m23582a((Object) upperCase, "(this as java.lang.String).toUpperCase()");
sb.append(upperCase);
sb.append(" Channel/");
sb.append(C6399b.m19941q());
sb.append(" AppName/");
sb.append(C6399b.m19929e());
sb.append(" app_version/");
sb.append(C6399b.m19934j());
String sb2 = sb.toString();
Locale a2 = C30476b.m99547a();
if (VERSION.SDK_INT >= 21) {
StringBuilder sb3 = new StringBuilder();
sb3.append(sb2);
sb3.append(" ByteLocale/");
sb3.append(a2.toLanguageTag());
str = sb3.toString();
} else {
StringBuilder sb4 = new StringBuilder();
sb4.append(sb2);
sb4.append(" ByteLocale/");
String locale = a2.toString();
C7573i.m23582a((Object) locale, "locale.toString()");
sb4.append(C7634n.m23711a(locale, "_", "-", false));
str = sb4.toString();
}
StringBuilder sb5 = new StringBuilder();
sb5.append(str);
sb5.append(" ByteFullLocale/");
sb5.append(C30476b.m99553b());
String sb6 = sb5.toString();
StringBuilder sb7 = new StringBuilder();
sb7.append(sb6);
sb7.append(" Region/");
sb7.append(C32326h.m104885g());
String sb8 = sb7.toString();
StringBuilder sb9 = new StringBuilder();
sb9.append(sb8);
sb9.append(" AppSkin/");
sb9.append(C25881h.m85148a());
return sb9.toString();
}
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
f42cccc600ca885be68fc350fba9f50d448b7c9e
|
03e11116eed9b3abaf8593b85ed382e86524e60d
|
/lc-system/src/main/java/com/ylkget/system/mapper/SysUserPostMapper.java
|
c7d1f0a373e389a67d8535c71b340e5884615a28
|
[] |
no_license
|
ylksty/lc-vue
|
38ae95c20a4d496fcf87895e883ff7343eaa95c1
|
2d729ce1505fb295434320de0d4330786f38bc3a
|
refs/heads/master
| 2023-05-14T04:38:26.022464
| 2021-06-06T13:56:39
| 2021-06-06T13:56:39
| 370,209,922
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 925
|
java
|
package com.ylkget.system.mapper;
import com.ylkget.system.domain.SysUserPost;
import java.util.List;
/**
* 用户与岗位关联表 数据层
*
* @author ylkget
*/
public interface SysUserPostMapper
{
/**
* 通过用户ID删除用户和岗位关联
*
* @param userId 用户ID
* @return 结果
*/
public int deleteUserPostByUserId(Long userId);
/**
* 通过岗位ID查询岗位使用数量
*
* @param postId 岗位ID
* @return 结果
*/
public int countUserPostById(Long postId);
/**
* 批量删除用户和岗位关联
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUserPost(Long[] ids);
/**
* 批量新增用户岗位信息
*
* @param userPostList 用户角色列表
* @return 结果
*/
public int batchUserPost(List<SysUserPost> userPostList);
}
|
[
"ylksty@163.com"
] |
ylksty@163.com
|
aa0effded0d8921f6f8ea14e193dd8844fa49fbf
|
60ab345245921aea8cab939fd44679d758b0d093
|
/src/com/afunms/application/model/Ftpmonitor_realtime.java
|
b56d99a086ab9b847b6d6cec89913e2480ee8fd9
|
[] |
no_license
|
guogongzhou/afunms
|
405d56f7c5cad91d0a5e1fea5c9858f1358d0172
|
40127ef7aecdc7428a199b0e8cce30b27207fee8
|
refs/heads/master
| 2021-01-15T19:23:43.488074
| 2014-11-11T06:36:48
| 2014-11-11T06:36:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,948
|
java
|
package com.afunms.application.model;
import com.afunms.common.base.BaseVo;
import java.util.Calendar;
public class Ftpmonitor_realtime extends BaseVo {
/** identifier field */
private int id;
/** nullable persistent field */
private int ftp_id;
/** nullable persistent field */
private int is_canconnected;
/** nullable persistent field */
private String reason;
/** nullable persistent field */
private Calendar mon_time;
private int sms_sign;
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the ftp_id
*/
public int getFtp_id() {
return ftp_id;
}
/**
* @param ftp_id
* the ftp_id to set
*/
public void setFtp_id(int ftp_id) {
this.ftp_id = ftp_id;
}
/**
* @return the is_canconnected
*/
public int getIs_canconnected() {
return is_canconnected;
}
/**
* @param is_canconnected
* the is_canconnected to set
*/
public void setIs_canconnected(int is_canconnected) {
this.is_canconnected = is_canconnected;
}
/**
* @return the reason
*/
public String getReason() {
return reason;
}
/**
* @param reason
* the reason to set
*/
public void setReason(String reason) {
this.reason = reason;
}
/**
* @return the mon_time
*/
public Calendar getMon_time() {
return mon_time;
}
/**
* @param mon_time
* the mon_time to set
*/
public void setMon_time(Calendar mon_time) {
this.mon_time = mon_time;
}
/**
* @return the sms_sign
*/
public int getSms_sign() {
return sms_sign;
}
/**
* @param sms_sign
* the sms_sign to set
*/
public void setSms_sign(int sms_sign) {
this.sms_sign = sms_sign;
}
/**
* @return the id
*/
}
|
[
"happysoftware@foxmail.com"
] |
happysoftware@foxmail.com
|
c0003d2b34dd4bd4d803982574c085cb1e18af40
|
09e6690147eedf58189c09546a8b4d50300c725b
|
/weizu-parent/weizu-web-modules/weizu-web-forward/src/main/java/com/weizu/flowsys/web/http/dao/AgencyBackwardDao.java
|
cfa641fadb5d2999262e054c386fa7c0435adfbe
|
[] |
no_license
|
showlofans/weizu_channel
|
3c846e8df738b28db539324c28500d2b82172e83
|
39de1347be4a988acd2aa929d0d52e95dc8dbba9
|
refs/heads/master
| 2022-01-27T09:35:10.396785
| 2022-01-23T12:25:32
| 2022-01-23T12:25:32
| 95,176,460
| 0
| 1
| null | 2018-04-14T10:01:38
| 2017-06-23T02:42:08
|
Java
|
UTF-8
|
Java
| false
| false
| 709
|
java
|
package com.weizu.flowsys.web.http.dao;
import javax.annotation.Resource;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;
import com.weizu.flowsys.web.http.pojo.AgencyBackwardPo;
import com.weizu.web.foundation.core.dao.impl.DaoImpl;
/**
* @description:代理商DAO层实现类
* @projectName:crud
* @className:AgencyBackwardDao.java
* @author:POP产品研发部 宁强
* @createTime:2017年4月25日 下午12:44:25
* @version 1.0
*/
@Repository("agencyBackwardDao")
public class AgencyBackwardDao extends DaoImpl<AgencyBackwardPo, Integer> implements AgengcyBackwardDaoInterface {
@Resource
private SqlSessionTemplate sqlSessionTemplateASS;
}
|
[
"1727661035@qq.com"
] |
1727661035@qq.com
|
96a8023d70831b5d3b75a31263c33240ba392133
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/146/357/CWE89_SQL_Injection__connect_tcp_prepareStatement_72a.java
|
0d6e53f9b25cb63031a537955d8a57a0fe8e4b3e
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 7,057
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__connect_tcp_prepareStatement_72a.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-72a.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded string
* Sinks: prepareStatement
* GoodSink: Use prepared statement and execute (properly)
* BadSink : data concatenated into SQL statement used in prepareStatement() call, which could result in SQL Injection
* Flow Variant: 72 Data flow: data passed in a Vector from one method to another in different source files in the same package
*
* */
import java.util.Vector;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.Socket;
import java.util.logging.Level;
public class CWE89_SQL_Injection__connect_tcp_prepareStatement_72a extends AbstractTestCase
{
public void bad() throws Throwable
{
String data;
data = ""; /* Initialize data */
/* Read data using an outbound tcp connection */
{
Socket socket = null;
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
/* Read data using an outbound tcp connection */
socket = new Socket("host.example.org", 39544);
/* read input from socket */
readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data using an outbound tcp connection */
data = readerBuffered.readLine();
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
/* clean up socket objects */
try
{
if (socket != null)
{
socket.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO);
}
}
}
Vector<String> dataVector = new Vector<String>(5);
dataVector.add(0, data);
dataVector.add(1, data);
dataVector.add(2, data);
(new CWE89_SQL_Injection__connect_tcp_prepareStatement_72b()).badSink(dataVector );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use GoodSource and BadSink */
private void goodG2B() throws Throwable
{
String data;
/* FIX: Use a hardcoded string */
data = "foo";
Vector<String> dataVector = new Vector<String>(5);
dataVector.add(0, data);
dataVector.add(1, data);
dataVector.add(2, data);
(new CWE89_SQL_Injection__connect_tcp_prepareStatement_72b()).goodG2BSink(dataVector );
}
/* goodB2G() - use BadSource and GoodSink */
private void goodB2G() throws Throwable
{
String data;
data = ""; /* Initialize data */
/* Read data using an outbound tcp connection */
{
Socket socket = null;
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
/* Read data using an outbound tcp connection */
socket = new Socket("host.example.org", 39544);
/* read input from socket */
readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data using an outbound tcp connection */
data = readerBuffered.readLine();
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
/* clean up socket objects */
try
{
if (socket != null)
{
socket.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO);
}
}
}
Vector<String> dataVector = new Vector<String>(5);
dataVector.add(0, data);
dataVector.add(1, data);
dataVector.add(2, data);
(new CWE89_SQL_Injection__connect_tcp_prepareStatement_72b()).goodB2GSink(dataVector );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.