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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3829f5f477698270c1cea82af19427e6266fa7ca
|
1f2073269378e734b5c9baafa23890558b004673
|
/xfire1.2.6/src/com/webservice/xfire/IHelloWebServiceEnc.java
|
8776bbd75543245c533b44829f3d35ba93190595
|
[] |
no_license
|
hungmans6779/Java-Web-integration-development
|
7db40c418c13c3efa27e249cdf1e8fe8e39dfa83
|
289d03edd927484e30b053d1e23b218f003d2359
|
refs/heads/master
| 2020-04-14T01:14:35.712861
| 2018-12-30T02:28:32
| 2018-12-30T02:28:32
| 163,555,635
| 1
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 160
|
java
|
package com.webservice.xfire;
/*
* HelloWebServiceEnc ªº¤¶±
*/
public interface IHelloWebServiceEnc {
public String sayHello(String message);
}
|
[
"hungmans6779@msn.com"
] |
hungmans6779@msn.com
|
56cbb7d710703b1c39109f08b4db4f34ccb62f1c
|
19fd09a1a9fbe29fbf7318156d8bc0c9dccc6246
|
/src/br/gov/sp/etec/condicao/Ex13_Calculadora.java
|
5e10e1cdfc70f8f13b2f67bcd1c858f73ee25ef5
|
[] |
no_license
|
LucasPaixao1/test-merge
|
d47daad71666eb9c4cd6f281b9f00c9a147f979e
|
b92cc344ddb0e9f76512cd53d3f61a8eab66d9c0
|
refs/heads/master
| 2020-03-18T02:31:30.522781
| 2018-05-20T23:43:16
| 2018-05-20T23:43:16
| 134,194,679
| 0
| 0
| null | 2018-05-20T23:43:17
| 2018-05-20T23:18:37
| null |
ISO-8859-1
|
Java
| false
| false
| 1,521
|
java
|
package br.gov.sp.etec.condicao;
import java.util.Scanner;
public class Ex13_Calculadora {
public static void main(String[] args) {
Scanner dado = new Scanner(System.in);
int resultado = 0;
System.out.println("*********************");
System.out.println("* CALCULADORA *");
System.out.println("*********************");
System.out.println("* 1 - SOMA *");
System.out.println("* 2 - SUBTRAÇAO *");
System.out.println("* 3 - MULTIPLICAÇAO *");
System.out.println("* 4 - DIVISAO *");
System.out.println("*********************");
System.out.println("");
System.out.print("Informe sua opçao: ");
int opcao = dado.nextInt();
System.out.println("");
System.out.print("Informe o PRIMEIRO valor: ");
int valor1 = dado.nextInt();
System.out.print("Informe o SEGUNDO valor: ");
int valor2 = dado.nextInt();
switch (opcao) {
case 1:
resultado = valor1 + valor2;
System.out.println("O valor da soma é: " + resultado);
break;
case 2:
resultado = valor1 - valor2;
System.out.println("O valor da subtraçao é: " + resultado);
break;
case 3:
resultado = valor1 * valor2;
System.out.println("O valor da multiplicaçao é: " + resultado);
break;
case 4:
resultado = valor1 / valor2;
System.out.println("O valor da divisao é: " + resultado);
break;
default:
System.out.println("Opçao inválida");
break;
}
dado.close();
System.exit(0);
}
}
|
[
"you@example.com"
] |
you@example.com
|
fb44753cbd6ddb6002de2a832496d133844b1a5b
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/tags/3.5.5/code/base/dso-system-tests/tests.system/com/tctest/jdk15/LinkedBlockingQueueYoungGenGCTest.java
|
9a604602796d53939e6b9efb540cbc77af9e4f66
|
[] |
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
| 673
|
java
|
/*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright
* notice. All rights reserved.
*/
package com.tctest.jdk15;
import com.tctest.TestConfigurator;
import com.tctest.TransparentTestIface;
import com.tctest.YoungGCTestBase;
public class LinkedBlockingQueueYoungGenGCTest extends YoungGCTestBase implements TestConfigurator {
public void doSetUp(TransparentTestIface t) throws Exception {
t.getTransparentAppConfig().setAttribute(LinkedBlockingQueueTestApp.GC_TEST_KEY, "true");
super.doSetUp(t);
}
protected Class getApplicationClass() {
return LinkedBlockingQueueTestApp.class;
}
}
|
[
"cruise@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
|
91f0db0a20eb78234dfa81f1be100198e6f1e70c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_9cde3009b143aff23daef0827546e6f8b88696bc/SellFormController/2_9cde3009b143aff23daef0827546e6f8b88696bc_SellFormController_s.java
|
ed75d6114f53d0e92cfdacae8eaf4e608fc4fa3c
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,189
|
java
|
package edu.unsw.triangle.web;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import edu.unsw.triangle.controller.AbstractFormController;
import edu.unsw.triangle.controller.ModelView;
import edu.unsw.triangle.model.Item;
import edu.unsw.triangle.service.ItemService;
import edu.unsw.triangle.util.Errors;
import edu.unsw.triangle.util.ItemValidator;
import edu.unsw.triangle.util.Messages;
import edu.unsw.triangle.util.Validator;
import edu.unsw.triangle.view.ItemBinder;
import edu.unsw.triangle.view.RequestBinder;
public class SellFormController extends AbstractFormController
{
private final Logger logger = Logger.getLogger(SellFormController.class.getName());
@Override
public String getFormView()
{
return "sell.view";
}
@Override
protected Object createBackingObject(HttpServletRequest request)
{
// TODO Auto-generated method stub
return null;
}
@Override
protected ModelView handleFormSubmit(Object command)
{
Item item = (Item) command;
ModelView modelView = null;
// Service operations here
try
{
ItemService.addNewItem(item);
// Success message
Messages message = new Messages();
message.add("sell.success", "item is saved");
modelView = new ModelView(getSuccessView()).addModel("messages", message);
}
catch (Exception e)
{
logger.warning("cannot add new item to repository reason: " + e.getMessage());
e.printStackTrace();
Errors errors = new Errors().rejectValue("sell.error", "cannot add new item to repository");
modelView = handleFormError(command, errors);
}
return modelView;
}
@Override
protected Validator getValidator()
{
return new ItemValidator();
}
@Override
protected RequestBinder getBinder()
{
return new ItemBinder();
}
@Override
protected String getSuccessView()
{
return "sell.confirm.view";
}
@Override
protected ModelView handleFormError(Object command, Errors errors)
{
ModelView modelView = new ModelView(getFormView()).forward().
addModel("item", command).addModel("errors", errors);
return modelView;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
00a584d895082fbf42da838b13106760421717db
|
94d391922b685f3a911702f4b4fb5ecfbc67b65f
|
/manager/jam-services/src/main/java/org/yes/cart/payment/service/DtoCustomerOrderPaymentService.java
|
858d469e387a28f47946a20a50388d649e57d871
|
[
"Apache-2.0"
] |
permissive
|
yuzhijia88/yes-cart
|
6ee20754ac0c9d4b4c7ea60c3f6a17920f5d2f40
|
a93e0b9b640a1c0985bcc8be986802830ec6ddec
|
refs/heads/master
| 2020-04-04T14:12:35.838691
| 2018-11-03T09:16:56
| 2018-11-03T09:16:56
| 155,991,408
| 1
| 0
| null | 2018-11-03T14:35:30
| 2018-11-03T14:35:30
| null |
UTF-8
|
Java
| false
| false
| 614
|
java
|
package org.yes.cart.payment.service;
import org.yes.cart.payment.persistence.entity.CustomerOrderPayment;
import java.util.List;
/**
* User: denispavlov
* Date: 05/09/2016
* Time: 18:32
*/
public interface DtoCustomerOrderPaymentService {
/**
* Find payments.
*
* @param filter filter
* @param operations operations
* @param statuses statuses
* @param page page start
* @param pageSize max results
*
* @return payments
*/
List<CustomerOrderPayment> findBy(String filter, List<String> operations, List<String> statuses, int page, int pageSize);
}
|
[
"denis.v.pavlov@gmail.com"
] |
denis.v.pavlov@gmail.com
|
a4c85aeb505b972b89139b1ba49ec93bec087c1e
|
6b0f14db531af8501bfcd92714725ac4fe455835
|
/kijaro/langtools/src/share/classes/com/sun/mirror/apt/Messager.java
|
37ab26ae2f2c80147c092090842b2d2f152e8f6d
|
[] |
no_license
|
jodastephen/kijaro
|
9e6870c3d2e6cf77f3e9ce45abc50516f0bc8710
|
978d0ce8e4f2f586ab03f19de0dd6b67f5cd3992
|
refs/heads/master
| 2021-01-17T16:00:15.599315
| 2016-06-13T20:41:01
| 2016-06-13T20:41:01
| 58,209,109
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,951
|
java
|
/*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package com.sun.mirror.apt;
import com.sun.mirror.util.SourcePosition;
/**
* A <tt>Messager</tt> provides the way for
* an annotation processor to report error messages, warnings, and
* other notices.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
public interface Messager {
/**
* Prints an error message.
* Equivalent to <tt>printError(null, msg)</tt>.
* @param msg the message, or an empty string if none
*/
void printError(String msg);
/**
* Prints an error message.
* @param pos the position where the error occured, or null if it is
* unknown or not applicable
* @param msg the message, or an empty string if none
*/
void printError(SourcePosition pos, String msg);
/**
* Prints a warning message.
* Equivalent to <tt>printWarning(null, msg)</tt>.
* @param msg the message, or an empty string if none
*/
void printWarning(String msg);
/**
* Prints a warning message.
* @param pos the position where the warning occured, or null if it is
* unknown or not applicable
* @param msg the message, or an empty string if none
*/
void printWarning(SourcePosition pos, String msg);
/**
* Prints a notice.
* Equivalent to <tt>printNotice(null, msg)</tt>.
* @param msg the message, or an empty string if none
*/
void printNotice(String msg);
/**
* Prints a notice.
* @param pos the position where the noticed occured, or null if it is
* unknown or not applicable
* @param msg the message, or an empty string if none
*/
void printNotice(SourcePosition pos, String msg);
}
|
[
"scolebourne@joda.org"
] |
scolebourne@joda.org
|
da2a07756776c741a282e064e8eee2420cb0281a
|
90a20f79a3566551c12f78c5f8649b98a7793e1d
|
/src/main/java/ar/com/cipres/dao/impl/ExiArtDAO.java
|
4421ce45b3a782a7bc8b638c827872d0abfef354
|
[] |
no_license
|
jmcarrascal/trazawebtemp
|
3a247eb21110ba5104306a6f84016a88df87f3e1
|
df08e782322e18ab6bfc31e6af7b463bc54fe007
|
refs/heads/master
| 2023-05-11T15:58:59.333967
| 2023-04-28T12:55:49
| 2023-04-28T12:55:49
| 99,819,236
| 0
| 0
| null | 2022-07-12T22:30:08
| 2017-08-09T14:43:43
|
Java
|
UTF-8
|
Java
| false
| false
| 1,134
|
java
|
package ar.com.cipres.dao.impl;
import java.util.List;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;
import ar.com.cipres.dao.IExiArtDAO;
import ar.com.cipres.model.ExiArt;
import ar.com.cipres.model.Transac;
@Repository
public class ExiArtDAO extends GenericDAO<ExiArt> implements IExiArtDAO {
private String[] defaultOrderCriteria = { "nrArt" };
public ExiArtDAO() {
super(ExiArt.class);
}
protected String[] getDefaultOrderCriteria() {
return defaultOrderCriteria;
}
public Double getStockReservadoPVta(String articuloId) {
Double count = 0d;
try {
String queryStr = "select sum(Cant1 - Cant1Entregado)"
+ " from Transac t, Items i where t.transacNr = i.id.transacNr and i.stock.id = '" + articuloId
+ "' and Cant1Entregado < Cant1 and t.destino = -1 and t.tipoComprob.nr = 8";
Query query = sessionFactory.getCurrentSession().createQuery(queryStr);
count = (Double) query.list().get(0);
} catch (Exception e) {
System.out.println(e.getMessage());
}
if (count == null)
count = 0d;
return count;
}
}
|
[
"jmcarrascal@gmail.com"
] |
jmcarrascal@gmail.com
|
0b6d0fdb808e4a14065fbc5bef8b3c7b79f542d6
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_8217.java
|
10b339ae4664b19e8da3f2f3afca7aed4bd3fee5
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,913
|
java
|
private void mentionListViewUpdateLayout(){
if (mentionListView.getChildCount() <= 0) {
mentionListViewScrollOffsetY=0;
mentionListViewLastViewPosition=-1;
return;
}
View child=mentionListView.getChildAt(mentionListView.getChildCount() - 1);
RecyclerListView.Holder holder=(RecyclerListView.Holder)mentionListView.findContainingViewHolder(child);
if (mentionLayoutManager.getReverseLayout()) {
if (holder != null) {
mentionListViewLastViewPosition=holder.getAdapterPosition();
mentionListViewLastViewTop=child.getBottom();
}
else {
mentionListViewLastViewPosition=-1;
}
child=mentionListView.getChildAt(0);
holder=(RecyclerListView.Holder)mentionListView.findContainingViewHolder(child);
int newOffset=child.getBottom() < mentionListView.getMeasuredHeight() && holder != null && holder.getAdapterPosition() == 0 ? child.getBottom() : mentionListView.getMeasuredHeight();
if (mentionListViewScrollOffsetY != newOffset) {
mentionListView.setBottomGlowOffset(mentionListViewScrollOffsetY=newOffset);
mentionListView.setTopGlowOffset(0);
mentionListView.invalidate();
mentionContainer.invalidate();
}
}
else {
if (holder != null) {
mentionListViewLastViewPosition=holder.getAdapterPosition();
mentionListViewLastViewTop=child.getTop();
}
else {
mentionListViewLastViewPosition=-1;
}
child=mentionListView.getChildAt(0);
holder=(RecyclerListView.Holder)mentionListView.findContainingViewHolder(child);
int newOffset=child.getTop() > 0 && holder != null && holder.getAdapterPosition() == 0 ? child.getTop() : 0;
if (mentionListViewScrollOffsetY != newOffset) {
mentionListView.setTopGlowOffset(mentionListViewScrollOffsetY=newOffset);
mentionListView.setBottomGlowOffset(0);
mentionListView.invalidate();
mentionContainer.invalidate();
}
}
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
a4454ee8cb5ce260c1d60b52750a781722f9488c
|
a602903c73834edbd6b1161dd202d1e36428a7ca
|
/Java/restassured.sandata.interop/src/test/java/Ohio_V1/Visit/Auto_TC70212_Ohio_Visit_CallType_CallIn_Manual_CallOut_Mobile.java
|
9053b2cae401c88e975a5b57e016d7e4473056a0
|
[] |
no_license
|
PharahPhat/Selenium
|
e5e0ce5ca91708f63005fe205b061f23f1cd2c8e
|
572fcf773c9e70b7ac168752d11c11b24837cab9
|
refs/heads/master
| 2022-12-08T12:59:52.010706
| 2020-04-01T04:49:04
| 2020-04-01T04:49:04
| 143,975,962
| 0
| 0
| null | 2022-12-06T00:44:30
| 2018-08-08T07:20:16
|
Java
|
UTF-8
|
Java
| false
| false
| 2,047
|
java
|
package Ohio_V1.Visit;
import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import org.testng.annotations.Test;
import com.ohio.intake.Visit.v1.DbVerifier_Ohio_Visit_v1;
import com.ohio.intake.Visit.v1.GlobalVariable_Ohio_Visit_v1;
import com.ohio.intake.Visit.v1.UniqueJsonGenerator_Ohio_Visit_v1;
import com.relevantcodes.extentreports.LogStatus;
import Utills_ExtentReport_Log4j.BaseTest;
public class Auto_TC70212_Ohio_Visit_CallType_CallIn_Manual_CallOut_Mobile extends BaseTest{
private UniqueJsonGenerator_Ohio_Visit_v1 uniqueJsonGeneratorOhioVisitV1=new UniqueJsonGenerator_Ohio_Visit_v1();
private DbVerifier_Ohio_Visit_v1 dbVerifierOhioVisitV1=new DbVerifier_Ohio_Visit_v1();
private Map<String, String> jsonField1 =new HashMap<String,String>();
private Map<String, String> jsonField2 =new HashMap<String,String>();
@Test(groups = {"All", "Regression"})
public void TC70212_Ohio_Visit_CallType_CallIn_Manual_CallOut_Mobile() throws ClassNotFoundException, InterruptedException, IOException, ParseException, SQLException, java.text.ParseException{
// logger = extent.startTest("TC70212_Ohio_Visit_CallType_CallIn_Manual_CallOut_Mobile");
logger.log(LogStatus.INFO, GlobalVariable_Ohio_Visit_v1.generateFieldValue );
jsonField1.put(GlobalVariable_Ohio_Visit_v1.callTypejson, "Manual" );
jsonField2.put(GlobalVariable_Ohio_Visit_v1.callTypejson, "Mobile" );
logger.log(LogStatus.INFO, GlobalVariable_Ohio_Visit_v1.PostGetLog);
Map<String, JSONObject> returnObject=uniqueJsonGeneratorOhioVisitV1.processOhioVisitV1SubArrayCalls(jsonField1,jsonField2);
logger.log(LogStatus.INFO, GlobalVariable_Ohio_Visit_v1.DBVerify);
dbVerifierOhioVisitV1.jsonAssertInboxVisitCallsGeneric(returnObject.get(GlobalVariable_Ohio_Visit_v1.jsonObject),
returnObject.get(GlobalVariable_Ohio_Visit_v1.jsonObject_callIn),returnObject.get(GlobalVariable_Ohio_Visit_v1.jsonObject_callOut));
}
}
|
[
"phattnguyen@kms-technology.com"
] |
phattnguyen@kms-technology.com
|
99cffa878d26aae6dc66d4e08046195ed355fcbf
|
6c0d4f3828966746d72471b2131f68a05b4036bf
|
/src/product/cmc/com/topvision/ems/cmc/cm/service/CcmtsCmListService.java
|
e62d14ab10095e3b7886ec01ec4ba14046b263da
|
[] |
no_license
|
kevinXiao2016/topvision-server
|
b5b97de7436edcae94ad2648bce8a34759f7cf0b
|
b5934149c50f22661162ac2b8903b61a50bc63e9
|
refs/heads/master
| 2020-04-12T00:54:33.351152
| 2018-12-18T02:16:14
| 2018-12-18T02:16:14
| 162,215,931
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
/***********************************************************************
* $Id: CcmtsCmListService.java,v1.0 2013-10-30 上午9:44:19 $
*
* @author: YangYi
*
* (c)Copyright 2011 Topvision All rights reserved.
***********************************************************************/
package com.topvision.ems.cmc.cm.service;
import java.util.List;
import com.topvision.ems.cmc.facade.domain.CmAttribute;
import com.topvision.framework.service.Service;
import com.topvision.platform.domain.UserContext;
/**
* @author YangYi
* @created @2013-10-30-上午9:44:19
*
*/
public interface CcmtsCmListService extends Service {
/**
* 刷新CC页面中关联的CM列表tab
*
* @param cmcId
* Long
* @param cmcIndex
* Long
* @return List<CmAttribute>
*/
List<CmAttribute> refreshContactedCmList(Long cmcId, Long cmcIndex);
/**
* 清除CC下所有下线的CM_在设备上操作
*
* @param cmcId
*/
void clearAllOfflineCmsOnCC(Long cmcId);
/**
* 删除数据库中cmc下已下线的cm
*
* @param cmcId
* Long
*/
void deleteCmcOfflineCm(long cmcId);
/**
* 根据Mac重启Cm
*
* @param cmcId
* @param mac
*/
void restartCmByMac(Long cmcId, String mac);
/**
* 重启CCMTS下所有CM
*
* @param cmcId
*/
void restartAllCm(Long cmcId);
/**
* 根据CPE设备ip定位到所在CM
*
* @param cpeIp
* String
* @return List<CmAttribute>
*/
List<CmAttribute> showCmByCpeIp(String cpeIp);
List<CmAttribute> getCmListByCmcId(Long cmcId);
}
|
[
"785554043@qq.com"
] |
785554043@qq.com
|
f360b7a4d573853d3a3e65a3b9fcbf40cb308e20
|
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
|
/sources/kotlin/reflect/jvm/internal/KMutableProperty1Impl$_setter$1.java
|
21e15cd741c183ac2c395c7735eb2ff9f39591a7
|
[] |
no_license
|
sengeiou/KnowAndGo-android-thunkable
|
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
|
39e809d0bbbe9a743253bed99b8209679ad449c9
|
refs/heads/master
| 2023-01-01T02:20:01.680570
| 2020-10-22T04:35:27
| 2020-10-22T04:35:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,268
|
java
|
package kotlin.reflect.jvm.internal;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Lambda;
import kotlin.reflect.jvm.internal.KMutableProperty1Impl;
import org.jetbrains.annotations.NotNull;
@Metadata(mo39784bv = {1, 0, 3}, mo39785d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0000\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003H\n¢\u0006\u0002\b\u0004"}, mo39786d2 = {"<anonymous>", "Lkotlin/reflect/jvm/internal/KMutableProperty1Impl$Setter;", "T", "R", "invoke"}, mo39787k = 3, mo39788mv = {1, 1, 15})
/* compiled from: KProperty1Impl.kt */
final class KMutableProperty1Impl$_setter$1 extends Lambda implements Function0<KMutableProperty1Impl.Setter<T, R>> {
final /* synthetic */ KMutableProperty1Impl this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
KMutableProperty1Impl$_setter$1(KMutableProperty1Impl kMutableProperty1Impl) {
super(0);
this.this$0 = kMutableProperty1Impl;
}
@NotNull
public final KMutableProperty1Impl.Setter<T, R> invoke() {
return new KMutableProperty1Impl.Setter<>(this.this$0);
}
}
|
[
"joshuahj.tsao@gmail.com"
] |
joshuahj.tsao@gmail.com
|
d245cd9b5bb396d5016d234b67856bbfff7bfcde
|
95addbf59a259c416def27fce76b6c714fd9451f
|
/testSpringGraphQL/src/microResource/model/Info.java
|
018afdf36c875732a819c717e79f94fc78f30a15
|
[] |
no_license
|
luckychenheng/app_demo
|
820f6f21f9de163fb2de0813eca9f63d4acd15c7
|
c7aab7b1537614409e6657b5b4fbdaf7b18d4e27
|
refs/heads/master
| 2020-04-15T10:50:53.482454
| 2019-03-19T09:42:33
| 2019-03-19T09:42:33
| 164,602,008
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,238
|
java
|
package microResource.model;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@Entity
@Table(name = "info")
public class Info {
private int id;
private String truename;
private String address;
private User user;
public Info(int id, String truename, String address, User user) {
super();
this.id = id;
this.truename = truename;
this.address = address;
this.user = user;
}
public Info() {
}
@Override
public String toString() {
return "Info [id=" + id + ", truename=" + truename + ", address=" + address + ", user=" + user + "]";
}
@Id
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTruename() {
return truename;
}
public void setTruename(String truename) {
this.truename = truename;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@OneToOne
@JoinColumn(name = "user")
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
}
|
[
"seemac@seedeMacBook-Pro.local"
] |
seemac@seedeMacBook-Pro.local
|
ed531241d01316d26937f9c273d0696374e3f027
|
a4ae008cc004278f14d7f07a165acf40b1d30c7d
|
/src/main/java/com/dao/goods/DetailsParams.java
|
90980db0534aa0e2eb00ce882b0c0e5bff694463
|
[] |
no_license
|
rrong777/autoinput
|
d6faa08bb87a20f9e027a1a8af1ff4c203c168a2
|
147a34e526d428110c9baaa2ed9b1c6e131dc7a6
|
refs/heads/master
| 2023-06-25T03:10:09.611172
| 2021-07-26T08:14:36
| 2021-07-26T08:14:36
| 330,578,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,927
|
java
|
package com.dao.goods;
/**
* 自动录入请求参数实体
* @author: wql78
* @date: 2020/11/22 13:45
* @description:
*/
public class DetailsParams {
// 申请单号
private String InspectionNumber;
// 发货时间
private String DeliveryTime;
// 运输工具号码
private String VehicleNumber;
// 配载数量
private Integer Pcs;
// 发货数量
private Double Weight;
public DetailsParams() {
}
@Override
public String toString() {
return "DetailsParams{" +
"InspectionNumber='" + InspectionNumber + '\'' +
", DeliveryTime='" + DeliveryTime + '\'' +
", VehicleNumber='" + VehicleNumber + '\'' +
", Pcs=" + Pcs +
", Weight=" + Weight +
'}';
}
public DetailsParams(String inspectionNumber, String deliveryTime, String vehicleNumber, Integer pcs, Double weight) {
InspectionNumber = inspectionNumber;
DeliveryTime = deliveryTime;
VehicleNumber = vehicleNumber;
Pcs = pcs;
Weight = weight;
}
public String getInspectionNumber() {
return InspectionNumber;
}
public void setInspectionNumber(String inspectionNumber) {
InspectionNumber = inspectionNumber;
}
public String getDeliveryTime() {
return DeliveryTime;
}
public void setDeliveryTime(String deliveryTime) {
DeliveryTime = deliveryTime;
}
public String getVehicleNumber() {
return VehicleNumber;
}
public void setVehicleNumber(String vehicleNumber) {
VehicleNumber = vehicleNumber;
}
public Integer getPcs() {
return Pcs;
}
public void setPcs(Integer pcs) {
Pcs = pcs;
}
public Double getWeight() {
return Weight;
}
public void setWeight(Double weight) {
Weight = weight;
}
}
|
[
"wql789@qq.com"
] |
wql789@qq.com
|
6d3f8bf1766ff2246cdbb6a625a6589fe64cd3d7
|
572071ee133309caf78e076b669f9b33a868d60c
|
/org.activebpel.rt.bpel.server/classes/org/activebpel/rt/bpel/server/engine/storage/.svn/text-base/AeCharArrayDocumentReader.java.svn-base
|
917f2a7ba5b57936ce4e06bcfb9ecb474b677ebc
|
[] |
no_license
|
deib-polimi/DyBPEL
|
3809bb3f9f453750db52bc1ce1ffd5af412a2c8b
|
7043cec7032858cfd889c9022e935c946e130a6e
|
refs/heads/master
| 2021-01-20T12:21:50.392988
| 2014-12-18T15:07:24
| 2014-12-18T15:07:24
| 28,188,077
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,841
|
// $Header: /gestionale/org.activebpel.rt.bpel.server/src/org/activebpel/rt/bpel/server/engine/storage/AeCharArrayDocumentReader.java,v 1.1 2009/09/23 13:57:04 zampognaro Exp $
/////////////////////////////////////////////////////////////////////////////
// PROPRIETARY RIGHTS STATEMENT
// The contents of this file represent confidential information that is the
// proprietary property of Active Endpoints, Inc. Viewing or use of
// this information is prohibited without the express written consent of
// Active Endpoints, Inc. Removal of this PROPRIETARY RIGHTS STATEMENT
// is strictly forbidden. Copyright (c) 2002-2004 All rights reserved.
/////////////////////////////////////////////////////////////////////////////
package org.activebpel.rt.bpel.server.engine.storage;
import java.io.CharArrayReader;
import java.io.CharArrayWriter;
import java.io.Reader;
import org.activebpel.rt.AeException;
import org.activebpel.rt.bpel.impl.fastdom.AeFastDocument;
import org.activebpel.rt.bpel.impl.fastdom.AeXMLFormatter;
import org.activebpel.rt.bpel.server.AeMessages;
import org.activebpel.rt.util.AeCloser;
import org.activebpel.rt.util.AeUnsynchronizedCharArrayWriter;
import org.activebpel.rt.xml.AeXMLParserBase;
import org.w3c.dom.Document;
/**
* Delivers an <code>AeFastDocument</code> or standard XML
* <code>Document</code> as a fixed-length character stream using an in-memory
* character array.
*/
public class AeCharArrayDocumentReader extends AeDocumentReader
{
/** Serialization of XML document. */
private final char[] mCharArray;
/**
* Constructor.
*
* @param aDocument The <code>AeFastDocument</code>.
*/
protected AeCharArrayDocumentReader(AeFastDocument aDocument)
{
mCharArray = toCharArray(aDocument);
}
/**
* Constructor.
*
* @param aDocument The standard XML <code>Document</code>.
*/
protected AeCharArrayDocumentReader(Document aDocument)
{
mCharArray = toCharArray(aDocument);
}
/**
* @see org.activebpel.rt.bpel.server.engine.storage.AeDocumentReader#createReader()
*/
protected Reader createReader()
{
return new CharArrayReader(getCharArray());
}
/**
* Returns character array containing serialization of the XML document.
*/
protected char[] getCharArray()
{
return mCharArray;
}
/**
* @see org.activebpel.rt.bpel.server.engine.storage.AeDocumentReader#getLength()
*/
public int getLength()
{
return getCharArray().length;
}
/**
* Returns character array containing serialization of the specified
* <code>AeFastDocument</code>.
*
* @param aDocument The <code>AeFastDocument</code>.
*/
protected char[] toCharArray(AeFastDocument aDocument)
{
CharArrayWriter out = new AeUnsynchronizedCharArrayWriter();
try
{
new AeXMLFormatter().format(aDocument, out);
return out.toCharArray();
}
finally
{
AeCloser.close(out);
}
}
/**
* Returns character array containing serialization of the specified
* standard XML <code>Document</code>.
*
* @param aDocument The standard XML <code>Document</code>.
*/
protected char[] toCharArray(Document aDocument)
{
CharArrayWriter out = new AeUnsynchronizedCharArrayWriter();
try
{
AeXMLParserBase.saveDocument(aDocument, out);
return out.toCharArray();
}
catch (AeException e)
{
AeException.logError(e, AeMessages.getString("AeCharArrayDocumentReader.ERROR_0")); //$NON-NLS-1$
return new char[0];
}
finally
{
AeCloser.close(out);
}
}
}
|
[
"giovanniquattrocchi@MacBook-Pro-di-Giovanni.local"
] |
giovanniquattrocchi@MacBook-Pro-di-Giovanni.local
|
|
d61d8ff224de7e08571e89df73656c2be91fd88c
|
f28dce60491e33aefb5c2187871c1df784ccdb3a
|
/src/main/java/com/prolificinteractive/materialcalendarview/DecoratorResult.java
|
43e6b6f3725cd936807f1ad86ffdba8805f47534
|
[
"Apache-2.0"
] |
permissive
|
JackChan1999/boohee_v5.6
|
861a5cad79f2bfbd96d528d6a2aff84a39127c83
|
221f7ea237f491e2153039a42941a515493ba52c
|
refs/heads/master
| 2021-06-11T23:32:55.977231
| 2017-02-14T18:07:04
| 2017-02-14T18:07:04
| 81,962,585
| 8
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 313
|
java
|
package com.prolificinteractive.materialcalendarview;
class DecoratorResult {
public final DayViewDecorator decorator;
public final DayViewFacade result;
DecoratorResult(DayViewDecorator decorator, DayViewFacade result) {
this.decorator = decorator;
this.result = result;
}
}
|
[
"jackychan2040@gmail.com"
] |
jackychan2040@gmail.com
|
90095d44e3d2676f1cebd595722d2e72f33c776a
|
7ced6c0ed03f2f9345bbc06a09dbbcf5c8687619
|
/catering-basic-server/catering-pay/catering-allin-pay-server/src/main/java/com/meiyuan/catering/allinpay/model/param/member/BindBankCardParams.java
|
e4d2c8812eef9c2501ec5b600a6acfe7bf5e008a
|
[] |
no_license
|
haorq/food-word
|
c14d5752c6492aed4a6a1410f9e0352479460da0
|
18a71259d77b4d96261dab8ed51ca1f109ab5c2f
|
refs/heads/master
| 2023-01-01T12:19:48.967366
| 2020-10-26T07:32:25
| 2020-10-26T07:32:25
| 307,292,398
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,819
|
java
|
package com.meiyuan.catering.allinpay.model.param.member;
import com.alibaba.fastjson.annotation.JSONField;
import com.meiyuan.catering.allinpay.model.param.AllinPayBaseServiceParams;
import com.meiyuan.catering.allinpay.utils.DecryptDeserializer;
import com.meiyuan.catering.allinpay.utils.EncryptSerializer;
import lombok.Builder;
import lombok.Data;
/**
* @author zengzhangni
* @date 2020/9/25 11:33
* @since v1.1.0
*/
@Data
@Builder
public class BindBankCardParams extends AllinPayBaseServiceParams {
/**
* 类型: String
* 是否必填:是
* 描述: 流水号
* 示例值: 请求绑定银行卡接口返回
*/
private String tranceNum;
/**
* 类型: String
* 是否必填:否
* 描述: 申请时间
* 示例值: 请求绑定银行卡接口返回
*/
private String transDate;
/**
* 类型: String
* 是否必填:是
* 描述: 银行预留手机
* 示例值: xx
*/
private String phone;
/**
* 类型: String
* 是否必填:是
* 是否加密:AES加密
* 描述: 有效期
* 示例值: s格式为月年;如0321,2位月2位年,AES加密,使用万鉴通4要素绑信用卡可以不上送此字段
*/
@JSONField(serializeUsing = EncryptSerializer.class, deserializeUsing = DecryptDeserializer.class)
private String validate;
/**
* 类型: String
* 是否必填:是
* 是否加密:AES加密
* 描述: CVV2
* 示例值: 3位数字
*/
@JSONField(serializeUsing = EncryptSerializer.class, deserializeUsing = DecryptDeserializer.class)
private String cvv2;
/**
* 类型: String
* 是否必填:是
* 描述: 短信验证码
* 示例值: xxx
*/
private String verificationCode;
}
|
[
"386234736"
] |
386234736
|
939577c9fdd3834ed04d48a742350eb640979a45
|
e4e8f3dae79c568edfeb96390e6fa63ffee46e0e
|
/Dart/gen/com/jetbrains/lang/dart/psi/impl/DartMixinDeclarationImpl.java
|
62d8186666b34fddd9e068dcb85894a0dabdc89d
|
[
"Apache-2.0"
] |
permissive
|
adventurous-gerbil/intellij-plugins
|
f1f32e292cd3bb41cb2c5aae421efb93d2d81a9a
|
3f727261f6e6c65f57b1c9ac1911e4d5b6962e2d
|
refs/heads/master
| 2020-12-04T04:02:36.465066
| 2020-01-02T10:03:11
| 2020-01-02T13:34:21
| 231,599,523
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 1,701
|
java
|
// This is a generated file. Not intended for manual editing.
package com.jetbrains.lang.dart.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static com.jetbrains.lang.dart.DartTokenTypes.*;
import com.jetbrains.lang.dart.psi.*;
import com.jetbrains.lang.dart.util.DartPsiImplUtil;
public class DartMixinDeclarationImpl extends AbstractDartPsiClass implements DartMixinDeclaration {
public DartMixinDeclarationImpl(@NotNull ASTNode node) {
super(node);
}
public void accept(@NotNull DartVisitor visitor) {
visitor.visitMixinDeclaration(this);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof DartVisitor) accept((DartVisitor)visitor);
else super.accept(visitor);
}
@Override
@NotNull
public DartClassBody getClassBody() {
return findNotNullChildByClass(DartClassBody.class);
}
@Override
@NotNull
public DartComponentName getComponentName() {
return findNotNullChildByClass(DartComponentName.class);
}
@Override
@Nullable
public DartInterfaces getInterfaces() {
return findChildByClass(DartInterfaces.class);
}
@Override
@NotNull
public List<DartMetadata> getMetadataList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, DartMetadata.class);
}
@Override
@Nullable
public DartOnMixins getOnMixins() {
return findChildByClass(DartOnMixins.class);
}
@Override
@Nullable
public DartTypeParameters getTypeParameters() {
return findChildByClass(DartTypeParameters.class);
}
}
|
[
"alexander.doroshko@jetbrains.com"
] |
alexander.doroshko@jetbrains.com
|
bf97eb6ff298a2c6d3733281242e9a6a64d2a3ba
|
d2402ea937a0330e92ccaf6e1bfd8fc02e1b29c9
|
/src/com/ms/silverking/cloud/toporing/InstantiatedRingTree.java
|
fd7d1cf3085449c1ac7e79e66c11db3030627bb0
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
duyangzhou/SilverKing
|
b8880e0527eb6b5d895da4dbcf7a600b8a7786d8
|
b1b582f96d3771c01bf8239c64e99869f54bb3a1
|
refs/heads/master
| 2020-04-29T19:34:13.958262
| 2019-07-25T17:48:17
| 2019-07-25T17:48:17
| 176,359,498
| 0
| 0
|
Apache-2.0
| 2019-03-18T19:55:08
| 2019-03-18T19:55:08
| null |
UTF-8
|
Java
| false
| false
| 653
|
java
|
package com.ms.silverking.cloud.toporing;
import java.util.Map;
import com.ms.silverking.cloud.topology.Topology;
import com.ms.silverking.collection.Pair;
public class InstantiatedRingTree extends RingTree {
private final Pair<Long,Long> ringVersionPair;
public InstantiatedRingTree(Topology topology,
Map<String, TopologyRing> maps, Pair<Long, Long> ringVersionPair,
long ringCreationTime) {
super(topology, maps, ringVersionPair.getV1(), ringCreationTime);
this.ringVersionPair = ringVersionPair;
}
public Pair<Long,Long> getRingVersionPair() {
return ringVersionPair;
}
}
|
[
"Benjamin.Holst@morganstanley.com"
] |
Benjamin.Holst@morganstanley.com
|
3cb681b5d7e8bb2aee84e61b2928c40f9955205b
|
fe2549cb80cd94008cfcd3cc694e336a7527431f
|
/RandomNumber/src/RandomNumber.java
|
dc453ae74997bca4de7b34195e62f3ceb5fa8ceb
|
[] |
no_license
|
shonessy/JAVA-Eclipse-Workspace
|
557b5bda904196ec73297d8e546c9c369dbb48c0
|
0bb720c7d1a01f3ae57adbf01843a54897fe35c6
|
refs/heads/master
| 2021-07-09T19:15:57.458067
| 2017-10-08T12:25:08
| 2017-10-08T12:25:08
| 106,173,681
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 635
|
java
|
import java.util.Random;
public class RandomNumber {
public static void main(String[] Args){
Random randObj1=new Random();
//Random randObj2=new Random(10);
for(int i=0;i<2;i++){
Random randObj2=new Random(10);
System.out.printf("Poziv: %d\n", i);
System.out.print("Random sa vremenskim sjemenom: ");
for(int j=0;j<10;j++)
System.out.printf(" %d ", randObj1.nextInt(20));
System.out.print("\nRandom sa prosledjenim sjemenom: ");
for(int j=0;j<10;j++)
System.out.printf(" %d ", randObj2.nextInt(20));
System.out.print("\n-------------------------------\n");
}
}
}
|
[
"nemanja.el@hotmail.com"
] |
nemanja.el@hotmail.com
|
1d60a0995a552337912bac62bf9553d132427d63
|
694d574b989e75282326153d51bd85cb8b83fb9f
|
/google-ads/src/main/java/com/google/ads/googleads/v1/resources/KeywordViewProto.java
|
824871165b5bdca4d902e57102cc9c9e73c885f6
|
[
"Apache-2.0"
] |
permissive
|
tikivn/google-ads-java
|
99201ef20efd52f884d651755eb5a3634e951e9b
|
1456d890e5c6efc5fad6bd276b4a3cd877175418
|
refs/heads/master
| 2023-08-03T13:02:40.730269
| 2020-07-17T16:33:40
| 2020-07-17T16:33:40
| 280,845,720
| 0
| 0
|
Apache-2.0
| 2023-07-23T23:39:26
| 2020-07-19T10:51:35
| null |
UTF-8
|
Java
| false
| true
| 2,907
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v1/resources/keyword_view.proto
package com.google.ads.googleads.v1.resources;
public final class KeywordViewProto {
private KeywordViewProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_ads_googleads_v1_resources_KeywordView_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_ads_googleads_v1_resources_KeywordView_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n4google/ads/googleads/v1/resources/keyw" +
"ord_view.proto\022!google.ads.googleads.v1." +
"resources\032\034google/api/annotations.proto\"" +
"$\n\013KeywordView\022\025\n\rresource_name\030\001 \001(\tB\375\001" +
"\n%com.google.ads.googleads.v1.resourcesB" +
"\020KeywordViewProtoP\001ZJgoogle.golang.org/g" +
"enproto/googleapis/ads/googleads/v1/reso" +
"urces;resources\242\002\003GAA\252\002!Google.Ads.Googl" +
"eAds.V1.Resources\312\002!Google\\Ads\\GoogleAds" +
"\\V1\\Resources\352\002%Google::Ads::GoogleAds::" +
"V1::Resourcesb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.AnnotationsProto.getDescriptor(),
}, assigner);
internal_static_google_ads_googleads_v1_resources_KeywordView_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_google_ads_googleads_v1_resources_KeywordView_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_ads_googleads_v1_resources_KeywordView_descriptor,
new java.lang.String[] { "ResourceName", });
com.google.api.AnnotationsProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
|
[
"nwbirnie@gmail.com"
] |
nwbirnie@gmail.com
|
af4291c8ecfdad212ff7bab57bcab76a6d8c22fb
|
1fe7eb733b1bb1f99feb96aa75963645dfd3cefb
|
/src/main/java/vpay/homtech/vn/domain/PersistentAuditEvent.java
|
57f6108ba5b283196ed7e654e232b127c207c710
|
[] |
no_license
|
tkmd123/VPay
|
69619240c06c3e6e90b3f0ea5c03deb557699368
|
9415b5298f06e36b4d1c0eaef130c4f27bf1fe11
|
refs/heads/master
| 2020-04-03T19:06:13.835349
| 2018-10-31T06:35:03
| 2018-10-31T06:35:03
| 155,510,244
| 0
| 0
| null | 2018-11-02T08:28:42
| 2018-10-31T06:34:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,892
|
java
|
package vpay.homtech.vn.domain;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
/**
* Persist AuditEvent managed by the Spring Boot actuator.
*
* @see org.springframework.boot.actuate.audit.AuditEvent
*/
@Entity
@Table(name = "jhi_persistent_audit_event")
public class PersistentAuditEvent implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "event_id")
private Long id;
@NotNull
@Column(nullable = false)
private String principal;
@Column(name = "event_date")
private Instant auditEventDate;
@Column(name = "event_type")
private String auditEventType;
@ElementCollection
@MapKeyColumn(name = "name")
@Column(name = "value")
@CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns=@JoinColumn(name="event_id"))
private Map<String, String> data = new HashMap<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPrincipal() {
return principal;
}
public void setPrincipal(String principal) {
this.principal = principal;
}
public Instant getAuditEventDate() {
return auditEventDate;
}
public void setAuditEventDate(Instant auditEventDate) {
this.auditEventDate = auditEventDate;
}
public String getAuditEventType() {
return auditEventType;
}
public void setAuditEventType(String auditEventType) {
this.auditEventType = auditEventType;
}
public Map<String, String> getData() {
return data;
}
public void setData(Map<String, String> data) {
this.data = data;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
bd908c016d15f9fe38d58d9b09f5df4eeb1d06e7
|
e1b368d37a7be941a7468305f4e2e1fa0bdf9f67
|
/NetBeansProjects/ARRAY - EmpresaInformatica + JavaDoc/src/empresainformatica/EmpresaInformatica.java
|
a186330761bc9f16b92f7f27afb1bfae5f05300f
|
[] |
no_license
|
elbarbero/TrabajosJavaClase
|
a3bc1c133cd1b997b50a081327d54f29b07ce630
|
c87703768617bdf2605fce085b53fc2bb5285bbe
|
refs/heads/master
| 2020-03-17T03:14:20.378120
| 2018-05-13T10:39:43
| 2018-05-13T10:39:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 558
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package empresainformatica;
/**
*
* @author Admin R30
*/
public class EmpresaInformatica {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Empresa EsguevaCompany;
EsguevaCompany = new Empresa(3);
EsguevaCompany.pedirDatosEmpleados();
EsguevaCompany.informeSalario();
}
}
|
[
"39236006+elbarbero@users.noreply.github.com"
] |
39236006+elbarbero@users.noreply.github.com
|
84e622333d290ce5e6dd0719dc51540c484362af
|
21c97e560417c64e4b72a5c22a35aae1cb9e7928
|
/frame-k8s-support/frame-logback-support/frame-logback-mongo-support/src/main/java/com/lvmoney/k8s/logback/mongo/mo/LogMo.java
|
babe6bcb27ce47f71258785ab01c02b7531861b3
|
[] |
no_license
|
lvmoney/frame
|
5680dedc556abbfe06089c8cd0e2e7f35a25fd06
|
69769ee0a83982e7fc49cab219f53bbeb955a870
|
refs/heads/master
| 2023-08-08T15:34:57.169564
| 2020-07-27T08:54:53
| 2020-07-27T08:54:53
| 194,578,286
| 10
| 4
| null | 2023-07-22T09:41:59
| 2019-07-01T01:14:18
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 725
|
java
|
package com.lvmoney.k8s.logback.mongo.mo;/**
* 描述:
* 包名:com.lvmoney.k8s.logback.mo
* 版本信息: 版本1.0
* 日期:2019/8/22
* Copyright XXXXXX科技有限公司
*/
import com.lvmoney.k8s.logback.mongo.constant.LogbackMongConstant;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;
import java.io.Serializable;
/**
* @describe:
* @author: lvmoney/XXXXXX科技有限公司
* @version:v1.0 2019/8/22 17:51
*/
@Document(collection = LogbackMongConstant.MONGO_LOGBACK_COLLECTION)
@Data
public class LogMo implements Serializable {
private String level;
private String logger;
private String thread;
private String message;
private Long timeStamp;
}
|
[
"xmangl1990728"
] |
xmangl1990728
|
79fcd89e6d22e422da1f82019828cb33f797fcb5
|
cded08c92cd17d66eaf5c412eaa4ce0f11f4c54a
|
/inference-framework/annotation-tools/annotation-file-utilities/tests/LocalMultiple.java
|
c9c67b63effaa5b8efb8749791438fff4db15006
|
[
"Apache-2.0"
] |
permissive
|
ANter-xidian/type-inference
|
77aa54f5fa93abc8dfcdbc93be4654cfebaa5ad9
|
90d002a1e2d0a3d160ab204084da9d5be5fdd971
|
refs/heads/master
| 2020-09-27T14:53:33.530140
| 2019-01-22T21:26:11
| 2019-01-22T21:26:11
| 226,540,844
| 1
| 0
|
NOASSERTION
| 2019-12-07T16:12:36
| 2019-12-07T16:12:35
| null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
package annotator.tests;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class LocalMultiple {
public void foo(Object o) {
List myList = null;
if(myList.size() != 0) {
/* @Mutable*/ Set localVar = null;
myList.add(localVar);
} else {
/* @ReadOnly*/ Set localVar = null;
myList.add(localVar);
}
foo(o);
}
}
|
[
"csweihuang@gmail.com@e039eaa7-eea3-5927-096b-721137851c37"
] |
csweihuang@gmail.com@e039eaa7-eea3-5927-096b-721137851c37
|
b7a090d15ae5bb6fb50dda53455d1707b7049f74
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/15/15_8eacdd99df1f03c674e8ae6093dd34ca1e5a8832/ChartsearchPageController/15_8eacdd99df1f03c674e8ae6093dd34ca1e5a8832_ChartsearchPageController_t.java
|
bb3f5ad4da4360e51d18d0880486bcedf7e93d4f
|
[] |
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,857
|
java
|
package org.openmrs.module.chartsearch.page.controller;
/**
* Created by Eli on 10/03/14.
*/
import org.openmrs.api.context.Context;
import org.openmrs.module.appui.UiSessionContext;
import org.openmrs.module.chartsearch.SearchAPI;
import org.openmrs.module.chartsearch.solr.ChartSearchIndexer;
import org.openmrs.module.chartsearch.solr.ChartSearchSearcher;
import org.openmrs.ui.framework.page.PageModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
public class ChartsearchPageController {
private static final Logger log = LoggerFactory.getLogger(ChartsearchPageController.class);
private ChartSearchIndexer chartSearchIndexer = getComponent(ChartSearchIndexer.class);
private ChartSearchSearcher searcher = getComponent(ChartSearchSearcher.class);
public void controller(PageModel model, UiSessionContext sessionContext, @RequestParam("patientId") Integer patient) {
//model.addAttribute("user", sessionContext.getCurrentUser());
SearchAPI searchAPI =SearchAPI.getInstance();
model.addAttribute("patientID_from_get", patient);
log.info("getting patient ID :" + patient);
log.info("trying to index a patient");
// ArrayList<String> lst = new ArrayList<String>();
if (chartSearchIndexer != null && patient != null) {
chartSearchIndexer.indexPatientData(patient);
}
log.info("indexed patient");
//log.info("indexed successfully");
}
private <T> T getComponent(Class<T> clazz) {
List<T> list = Context.getRegisteredComponents(clazz);
if (list == null || list.size() == 0)
throw new RuntimeException("Cannot find component of " + clazz);
return list.get(0);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a7a0ab7a7a4146fe8f3ba72d912da5453142ce3a
|
c278b2e06e98b0b99ca7350cfc12d2e535db1841
|
/payinterface/payinterface-hessian/src/main/java/com/yl/payinterface/core/hessian/AuthPayHessianService.java
|
3e3d282ec9e201f0b182a3e56e1fc18d28208fdf
|
[] |
no_license
|
SplendorAnLin/paymentSystem
|
ea778c03179a36755c52498fd3f5f1a5bbeb5d34
|
db308a354a23bd3a48ff88c16b29a43c4e483e7d
|
refs/heads/master
| 2023-02-26T14:16:27.283799
| 2022-10-20T07:50:35
| 2022-10-20T07:50:35
| 191,535,643
| 5
| 6
| null | 2023-02-22T06:42:24
| 2019-06-12T09:01:15
|
Java
|
UTF-8
|
Java
| false
| false
| 904
|
java
|
package com.yl.payinterface.core.hessian;
import java.util.Map;
import com.yl.payinterface.core.bean.AuthSaleBean;
/**
* 认证支付处理接口
*
* @author 聚合支付有限公司
* @since 2016年8月27日
* @version V1.0.0
*/
public interface AuthPayHessianService {
/**
* 获取短信验证码
* params
* @return
*/
Map<String, String> sendVerifyCode(Map<String, String> params);
/**
* 支付
* @param authSaleBean
* @return
*/
Map<String, String> pay(AuthSaleBean authSaleBean);
/**
* 消费
* @param authSaleBean 认证消费bean
* @return
*/
Map<String,String> sale(AuthSaleBean authSaleBean);
/**
* 订单查询
* @param merOrderId 支付订单号
* @return
*/
Map<String,String> queryOrder(String merOrderId, String interfaceCode);
/**
* 支付完成接口
* @param completeMap
*/
void complete(Map<String, String> completeMap);
}
|
[
"zl88888@live.com"
] |
zl88888@live.com
|
0bc41b633fb9dd87d894b36b72c16aa4b89a11c6
|
6e732289257a989d0aaf2d662c33fa8b8104c82c
|
/Ardent AP CS A/Winter 2019 P209C16 - AP Computer Science A (Java)/Week 17/PawnShop.java
|
5cb8a3314ac4ba3684479be21ccd4fcbf9ec7e2d
|
[] |
no_license
|
wendyw1999/AP-CS-A
|
589d543f18430dc1c7144f2d40fcc98dc8751a08
|
0ba344e1df76d793a3d9eee32f205c6ed797c6b4
|
refs/heads/master
| 2023-03-16T17:20:45.245786
| 2019-05-28T23:32:58
| 2019-05-28T23:32:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 254
|
java
|
public class PawnShop{
public static void main (String[] args ){
Inventory i = new Inventory();
i.add(new Bike());
i.add(new Shoe());
i.add(new Bike());
i.add(new Shoe());
System.out.println(i);
}
}
|
[
"joshkmartinez@gmail.com"
] |
joshkmartinez@gmail.com
|
d6653531c130c66d56903ecaf59bd1d3c5cf61cb
|
f4e15ee34808877459d81fd601d6be03bdfb4a9d
|
/org/apache/http/entity/EntityTemplate.java
|
c429280acfcfccfd4d062f61d987206542647b0c
|
[] |
no_license
|
Lianite/wurm-server-reference
|
369081debfa72f44eafc6a080002c4a3970f8385
|
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
|
refs/heads/master
| 2023-07-22T16:06:23.426163
| 2020-04-07T23:15:35
| 2020-04-07T23:15:35
| 253,933,452
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,294
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package org.apache.http.entity;
import java.io.IOException;
import java.io.ByteArrayInputStream;
import java.io.OutputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
public class EntityTemplate extends AbstractHttpEntity
{
private final ContentProducer contentproducer;
public EntityTemplate(final ContentProducer contentproducer) {
if (contentproducer == null) {
throw new IllegalArgumentException("Content producer may not be null");
}
this.contentproducer = contentproducer;
}
public long getContentLength() {
return -1L;
}
public InputStream getContent() throws IOException {
final ByteArrayOutputStream buf = new ByteArrayOutputStream();
this.writeTo(buf);
return new ByteArrayInputStream(buf.toByteArray());
}
public boolean isRepeatable() {
return true;
}
public void writeTo(final OutputStream outstream) throws IOException {
if (outstream == null) {
throw new IllegalArgumentException("Output stream may not be null");
}
this.contentproducer.writeTo(outstream);
}
public boolean isStreaming() {
return false;
}
}
|
[
"jdraco6@gmail.com"
] |
jdraco6@gmail.com
|
0523553ff90d595411df5dc04e5a5a56bff3aa50
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__byte_max_square_54e.java
|
54b3347092dbd7d7ca272db375fb0fcb6f9e9a0e
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,067
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__byte_max_square_54e.java
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-54e.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the max value for byte
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: square
* GoodSink: Ensure there will not be an overflow before squaring data
* BadSink : Square data, which can lead to overflow
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE190_Integer_Overflow;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.lang.Math;
public class CWE190_Integer_Overflow__byte_max_square_54e
{
public void bad_sink(byte data ) throws Throwable
{
/* POTENTIAL FLAW: if (data*data) > Byte.MAX_VALUE, this will overflow */
byte result = (byte)(data * data);
IO.writeLine("result: " + result);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(byte data ) throws Throwable
{
/* POTENTIAL FLAW: if (data*data) > Byte.MAX_VALUE, this will overflow */
byte result = (byte)(data * data);
IO.writeLine("result: " + result);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(byte data ) throws Throwable
{
/* FIX: Add a check to prevent an overflow from occurring */
/* NOTE: Math.abs of the minimum int or long will return that same value, so we must check for it */
if ((data != Integer.MIN_VALUE) && (data != Long.MIN_VALUE) && (Math.abs(data) <= (long)Math.sqrt(Byte.MAX_VALUE)))
{
byte result = (byte)(data * data);
IO.writeLine("result: " + result);
}
else {
IO.writeLine("data value is too large to perform squaring.");
}
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
235c89aa13016058828172f780d7a7866c788d15
|
23b6d6971a66cf057d1846e3b9523f2ad4e05f61
|
/MLMN-Statistics/src/vn/com/vhc/vmsc2/statistics/dao/VRpWkBscHoBhIbcDAOImpl.java
|
b7ae27c3eec8e317dbeea0fbec5eaaead495b80b
|
[] |
no_license
|
vhctrungnq/mlmn
|
943f5a44f24625cfac0edc06a0d1b114f808dfb8
|
d3ba1f6eebe2e38cdc8053f470f0b99931085629
|
refs/heads/master
| 2020-03-22T13:48:30.767393
| 2018-07-08T05:14:12
| 2018-07-08T05:14:12
| 140,132,808
| 0
| 1
| null | 2018-07-08T05:29:27
| 2018-07-08T02:57:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,934
|
java
|
package vn.com.vhc.vmsc2.statistics.dao;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import vn.com.vhc.vmsc2.statistics.domain.VRpWkBscHoBhIbc;
public class VRpWkBscHoBhIbcDAOImpl extends SqlMapClientDaoSupport implements VRpWkBscHoBhIbcDAO {
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table V_RP_WK_BSC_HO_BH_IBC
*
* @ibatorgenerated Thu Nov 18 15:01:01 ICT 2010
*/
public VRpWkBscHoBhIbcDAOImpl() {
super();
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table V_RP_WK_BSC_HO_BH_IBC
*
* @ibatorgenerated Thu Nov 18 15:01:01 ICT 2010
*/
public void insert(VRpWkBscHoBhIbc record) {
getSqlMapClientTemplate().insert("V_RP_WK_BSC_HO_BH_IBC.ibatorgenerated_insert", record);
}
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table V_RP_WK_BSC_HO_BH_IBC
*
* @ibatorgenerated Thu Nov 18 15:01:01 ICT 2010
*/
public void insertSelective(VRpWkBscHoBhIbc record) {
getSqlMapClientTemplate().insert("V_RP_WK_BSC_HO_BH_IBC.ibatorgenerated_insertSelective", record);
}
@SuppressWarnings("unchecked")
public List<VRpWkBscHoBhIbc> filterDetails(String startWeek, String startYear, String endWeek, String endYear, String bscid, String region) {
Map<String, String> map = new HashMap<String, String>();
map.put("bscid", bscid);
map.put("startWeek", startWeek);
map.put("startYear", startYear);
map.put("endWeek", endWeek);
map.put("endYear", endYear);
map.put("region", region);
return getSqlMapClientTemplate().queryForList("V_RP_WK_BSC_HO_BH_IBC.filterDetails", map);
}
}
|
[
"trungnq@vhc.com.vn"
] |
trungnq@vhc.com.vn
|
3492068a9cc3265f79fcf7f9941947dbd840e042
|
43b415ef149f9ca933e2dea419ba1fea202bb90e
|
/src/org/netbeans/modules/jndi/utils/SimpleListModel.java
|
36dc11cb020aeed1fea8eef97857a5126975251b
|
[] |
no_license
|
wardat/Netbeans-v1.0.x
|
9aa632eae36572510dbb2eb892b2b9f394ce32cf
|
3f4f5dfb465504c6a233eb5c26c649bef351e751
|
refs/heads/master
| 2020-03-30T17:47:47.696568
| 2018-10-03T19:44:35
| 2018-10-03T19:44:35
| 151,470,593
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,572
|
java
|
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.jndi.utils;
import javax.swing.AbstractListModel;
import java.util.Vector;
/** This class represent an Dat Model for JList component
*/
public class SimpleListModel extends javax.swing.AbstractListModel {
/** Data pool*/
private Vector data;
/** Constructor*/
public SimpleListModel() {
this.data= new Vector();
}
/** Adding of element to Data Model
* @param Object object to be inserted
* @return void
*/
public void addElement(Object obj){
this.data.addElement(obj);
this.fireIntervalAdded(this,this.data.size()-1,this.data.size()-1);
}
/** Removing of element at given position
* @param int index of element
* @return void
*/
public void removeElementAt(int index){
this.data.removeElementAt(index);
this.fireIntervalRemoved(this,index,index);
}
/** Clear the Data Model
*
* @return void
*/
public void clear(){
int upIndex=this.data.size()-1;
if (upIndex<0) return; //Nothing to clear
this.data.removeAllElements();
this.fireIntervalRemoved(this,0,upIndex);
}
/** Sets the data
* @param Vector data
*/
public void setData (Vector v) {
int upindex = this.data.size();
if (upindex >= 0 )
this.fireIntervalRemoved(this,0,upindex);
this.data=v;
upindex = this.data.size();
if (upindex >= 0 )
this.fireIntervalAdded(this,0,upindex);
}
/** Returns Vector representation of data
*
* @return Vector the data
*/
public Vector asVector(){
return this.data;
}
/** Returns element at given index
* @param int index of element
* @return Object object at index or null
*/
public Object getElementAt(int index){
return this.data.elementAt(index);
}
/** Returns number of elements in Data Model
*
* @return int number of elements
*/
public int getSize(){
return this.data.size();
}
}
|
[
"mawardat12@gmail.com"
] |
mawardat12@gmail.com
|
aef6e233c33f7749acae894fd8a7a4e3d7699200
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE78_OS_Command_Injection/CWE78_OS_Command_Injection__database_10.java
|
ecbf9a213fa2cfa6faa74a84427fb92c989b069b
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,779
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__database_10.java
Label Definition File: CWE78_OS_Command_Injection.label.xml
Template File: sources-sink-10.tmpl.java
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: database Read data from a database
* GoodSource: A hardcoded string
* BadSink: exec dynamic command execution with Runtime.getRuntime().exec()
* Flow Variant: 10 Control flow: if(IO.staticTrue) and if(IO.staticFalse)
*
* */
package testcases.CWE78_OS_Command_Injection;
import testcasesupport.*;
import javax.servlet.http.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
public class CWE78_OS_Command_Injection__database_10 extends AbstractTestCase
{
/* uses badsource and badsink */
public void bad() throws Throwable
{
String data;
if (IO.staticTrue)
{
data = ""; /* Initialize data */
/* Read data from a database */
{
Connection connection = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
try
{
/* setup the connection */
connection = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
preparedStatement = connection.prepareStatement("select name from users where id=0");
resultSet = preparedStatement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
data = resultSet.getString(1);
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error with SQL statement", exceptSql);
}
finally
{
/* Close database objects */
try
{
if (resultSet != null)
{
resultSet.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", exceptSql);
}
try
{
if (preparedStatement != null)
{
preparedStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing PreparedStatement", exceptSql);
}
try
{
if (connection != null)
{
connection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process process = Runtime.getRuntime().exec(osCommand + data);
process.waitFor();
}
/* goodG2B1() - use goodsource and badsink by changing IO.staticTrue to IO.staticFalse */
private void goodG2B1() throws Throwable
{
String data;
if (IO.staticFalse)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
else
{
/* FIX: Use a hardcoded string */
data = "foo";
}
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process process = Runtime.getRuntime().exec(osCommand + data);
process.waitFor();
}
/* goodG2B2() - use goodsource and badsink by reversing statements in if */
private void goodG2B2() throws Throwable
{
String data;
if (IO.staticTrue)
{
/* FIX: Use a hardcoded string */
data = "foo";
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = null;
}
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process process = Runtime.getRuntime().exec(osCommand + data);
process.waitFor();
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
18f540b887c1bcdb4735f291fe80214ebe9ec1e6
|
40dd2c2ba934bcbc611b366cf57762dcb14c48e3
|
/RI_Stack/java/src/base/org/havi/ui/event/HBackgroundImageEvent.java
|
5159b94b6b54fae90f72dcc1b69676cc1cd006d3
|
[] |
no_license
|
amirna2/OCAP-RI
|
afe0d924dcf057020111406b1d29aa2b3a796e10
|
254f0a8ebaf5b4f09f4a7c8f4961e9596c49ccb7
|
refs/heads/master
| 2020-03-10T03:22:34.355822
| 2018-04-11T23:08:49
| 2018-04-11T23:08:49
| 129,163,048
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,924
|
java
|
// COPYRIGHT_BEGIN
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
//
// Copyright (C) 2008-2013, Cable Television Laboratories, Inc.
//
// This software is available under multiple licenses:
//
// (1) BSD 2-clause
// 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.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// (2) GPL Version 2
// 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, version 2. This program is distributed
// in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
// even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program.If not, see<http:www.gnu.org/licenses/>.
//
// (3)CableLabs License
// If you or the company you represent has a separate agreement with CableLabs
// concerning the use of this code, your rights and obligations with respect
// to this code shall be as set forth therein. No license is granted hereunder
// for any other purpose.
//
// Please contact CableLabs if you need additional information or
// have any questions.
//
// CableLabs
// 858 Coal Creek Cir
// Louisville, CO 80027-9750
// 303 661-9100
// COPYRIGHT_END
/*
* Copyright 2000-2003 by HAVi, Inc. Java is a trademark of Sun
* Microsystems, Inc. All rights reserved.
*/
package org.havi.ui.event;
/**
* This event informs an application that a loading operation for an
* {@link org.havi.ui.HBackgroundImage HBackgroundImage} has finished.
*
* <hr>
* The parameters to the constructors are as follows, in cases where parameters
* are not used, then the constructor should use the default values.
* <p>
* <h3>Default parameter values exposed in the constructors</h3>
* <table border>
* <tr>
* <th>Parameter</th>
* <th>Description</th>
* <th>Default value</th>
* <th>Set method</th>
* <th>Get method</th>
* </tr>
* <tr>
* <td colspan=5>None.</td>
* </tr>
* </table>
* <h3>Default parameter values not exposed in the constructors</h3>
* <table border>
* <tr>
* <th>Description</th>
* <th>Default value</th>
* <th>Set method</th>
* <th>Get method</th>
* </tr>
* <tr>
* <td colspan=4>None.</td>
* </tr>
* </table>
*
* @author Aaron Kamienski
*/
public class HBackgroundImageEvent extends java.util.EventObject
{
/**
* Marks the first integer for the range of background image events
*/
public static final int BACKGROUNDIMAGE_FIRST = 1;
/**
* The loading succeeded
*/
public static final int BACKGROUNDIMAGE_LOADED = 1;
/**
* The loading failed before attempting to load any data from the file. e.g.
* the file not existing or due to a badly formed or otherwise broken
* filename
*/
public static final int BACKGROUNDIMAGE_FILE_NOT_FOUND = 2;
/**
* The loading failed due to an error while loading the data. e.g. the file
* is not accessible or loading of it was interrupted
*/
public static final int BACKGROUNDIMAGE_IOERROR = 3;
/**
* The loading failed because the data loaded is not valid. e.g. not a
* supported coding format for background images.
*/
public static final int BACKGROUNDIMAGE_INVALID = 4;
/**
* Marks the last integer for the range of background image events
*/
public static final int BACKGROUNDIMAGE_LAST = 4;
/**
* Constructs a new {@link org.havi.ui.event.HBackgroundImageEvent
* HBackgroundImageEvent}.
*
* @param source
* the {@link org.havi.ui.HBackgroundImage HBackgroundImage}
* which has been loaded.
* @param id
* the type of event (one of
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_LOADED
* BACKGROUNDIMAGE_LOADED},
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_FILE_NOT_FOUND
* BACKGROUNDIMAGE_FILE_NOT_FOUND},
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_IOERROR
* BACKGROUNDIMAGE_IOERROR} or
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_INVALID
* BACKGROUNDIMAGE_INVALID}).
*/
public HBackgroundImageEvent(java.lang.Object source, int id)
{
super(source);
this.id = id;
}
/**
* Returns the {@link org.havi.ui.HBackgroundImage HBackgroundImage} for
* which the data has been loaded.
*
* @return the object which has been loaded.
*/
public java.lang.Object getSource()
{
return super.getSource();
}
/**
* Returns the type for this event.
*
* @return the event type (one of
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_LOADED
* BACKGROUNDIMAGE_LOADED},
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_FILE_NOT_FOUND
* BACKGROUNDIMAGE_FILE_NOT_FOUND},
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_IOERROR
* BACKGROUNDIMAGE_IOERROR} or
* {@link org.havi.ui.event.HBackgroundImageEvent#BACKGROUNDIMAGE_INVALID
* BACKGROUNDIMAGE_INVALID}).
*/
public int getID()
{
return id;
}
/**
* The ID of this event.
*/
private int id;
}
|
[
"amir.nathoo@ubnt.com"
] |
amir.nathoo@ubnt.com
|
1459598184215c6a08b211a403961aa7ca55a41b
|
b555a178e4c8bc98b27565551657b6f16bee27a0
|
/app/src/main/java/developersancho/uberfit/model/Result.java
|
3c37563f0129863bd1d125ba6fe5e770cfcad7ef
|
[] |
no_license
|
developersancho/UberFit
|
0369922671888be5aa68f642169eb8a5223b44f1
|
81fdc2a631835b306d4dd52c4b92ea13a47137fc
|
refs/heads/master
| 2021-08-30T10:13:17.073460
| 2017-12-17T12:43:18
| 2017-12-17T12:43:18
| 113,472,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 428
|
java
|
package developersancho.uberfit.model;
/**
* Created by developersancho on 11.12.2017.
*/
public class Result {
private String message_id;
public Result(String message_id) {
this.message_id = message_id;
}
public Result() {
}
public String getMessage_id() {
return message_id;
}
public void setMessage_id(String message_id) {
this.message_id = message_id;
}
}
|
[
"developersancho@gmail.com"
] |
developersancho@gmail.com
|
0e50a095f47a08e37b35e8e9c8f64a6127a2bcd8
|
61da317a7f6ccb601bb6f301d28a0919fb4c08cc
|
/flyway-core/src/main/java/com/googlecode/flyway/core/dbsupport/oracle/OracleDbSupport.java
|
86de1eebc399b6c63a93058ccd565d045da6a8e4
|
[
"Apache-2.0"
] |
permissive
|
tototoshi/flyway
|
54c03c783bd0891c9b9fe3eb9aeadd6c99d89eb9
|
3008dae3e2f4280f624e40eaff4ca980ddb89f13
|
refs/heads/master
| 2021-12-14T09:54:23.765189
| 2013-04-06T17:34:49
| 2013-04-06T17:34:49
| 9,269,014
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,450
|
java
|
/**
* Copyright (C) 2010-2013 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 com.googlecode.flyway.core.dbsupport.oracle;
import com.googlecode.flyway.core.dbsupport.DbSupport;
import com.googlecode.flyway.core.dbsupport.JdbcTemplate;
import com.googlecode.flyway.core.dbsupport.Schema;
import com.googlecode.flyway.core.dbsupport.SqlStatementBuilder;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Types;
/**
* Oracle-specific support.
*/
public class OracleDbSupport extends DbSupport {
/**
* Creates a new instance.
*
* @param connection The connection to use.
*/
public OracleDbSupport(Connection connection) {
super(new JdbcTemplate(connection, Types.VARCHAR));
}
public String getScriptLocation() {
return "com/googlecode/flyway/core/dbsupport/oracle/";
}
public String getCurrentUserFunction() {
return "USER";
}
@Override
protected String doGetCurrentSchema() throws SQLException {
return jdbcTemplate.queryForString("SELECT USER FROM dual");
}
@Override
protected void doSetCurrentSchema(Schema schema) throws SQLException {
jdbcTemplate.execute("ALTER SESSION SET CURRENT_SCHEMA=" + schema);
}
public boolean supportsDdlTransactions() {
return false;
}
public String getBooleanTrue() {
return "1";
}
public String getBooleanFalse() {
return "0";
}
public SqlStatementBuilder createSqlStatementBuilder() {
return new OracleSqlStatementBuilder();
}
@Override
public String doQuote(String identifier) {
return "\"" + identifier + "\"";
}
@Override
public Schema getSchema(String name) {
return new OracleSchema(jdbcTemplate, this, name);
}
@Override
public boolean catalogIsSchema() {
return false;
}
}
|
[
"business@axelfontaine.com"
] |
business@axelfontaine.com
|
f6c11d28e28ccea29447e7ab2fcbf78116124dd3
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/files/File_1011658.java
|
a25f2c40c361cce2a9a61a40b30207dc75e1ca15
|
[
"Apache-2.0"
] |
permissive
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,968
|
java
|
package jetbrains.mps.core.xml.sax.intentions;
/*Generated by MPS */
import jetbrains.mps.intentions.AbstractIntentionDescriptor;
import jetbrains.mps.openapi.intentions.IntentionFactory;
import java.util.Collection;
import jetbrains.mps.openapi.intentions.IntentionExecutable;
import jetbrains.mps.openapi.intentions.Kind;
import jetbrains.mps.smodel.SNodePointer;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import java.util.Collections;
import jetbrains.mps.intentions.AbstractIntentionExecutable;
import jetbrains.mps.smodel.action.SNodeFactoryOperations;
import jetbrains.mps.openapi.intentions.IntentionDescriptor;
public final class addHandler_Intention extends AbstractIntentionDescriptor implements IntentionFactory {
private Collection<IntentionExecutable> myCachedExecutable;
public addHandler_Intention() {
super(Kind.NORMAL, false, new SNodePointer("r:1f1edf97-bae4-47a7-9d76-afcb8231d0cf(jetbrains.mps.core.xml.sax.intentions)", "2264311582634140824"));
}
@Override
public String getPresentation() {
return "addHandler";
}
@Override
public boolean isApplicable(final SNode node, final EditorContext editorContext) {
if (!(isApplicableToNode(node, editorContext))) {
return false;
}
return true;
}
private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) {
return (SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0xdcb5a83a19a844ffL, 0xa4cbfc7d324ecc63L, 0x1f6c736337b5e2cbL, 0x1f6c736337b5e2cdL, "handler")) == null);
}
@Override
public boolean isSurroundWith() {
return false;
}
public Collection<IntentionExecutable> instances(final SNode node, final EditorContext context) {
if (myCachedExecutable == null) {
myCachedExecutable = Collections.<IntentionExecutable>singletonList(new addHandler_Intention.IntentionImplementation());
}
return myCachedExecutable;
}
/*package*/ final class IntentionImplementation extends AbstractIntentionExecutable {
public IntentionImplementation() {
}
@Override
public String getDescription(final SNode node, final EditorContext editorContext) {
return "Add handler";
}
@Override
public void execute(final SNode node, final EditorContext editorContext) {
SLinkOperations.setTarget(node, MetaAdapterFactory.getContainmentLink(0xdcb5a83a19a844ffL, 0xa4cbfc7d324ecc63L, 0x1f6c736337b5e2cbL, 0x1f6c736337b5e2cdL, "handler"), SNodeFactoryOperations.createNewNode(MetaAdapterFactory.getConcept(0xdcb5a83a19a844ffL, 0xa4cbfc7d324ecc63L, 0x1f6c736337b5e2c1L, "jetbrains.mps.core.xml.sax.structure.XMLSAXAttributeHandler"), null));
}
@Override
public IntentionDescriptor getDescriptor() {
return addHandler_Intention.this;
}
}
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
e4ad82bb726322c12f1d1d71cd3fc3ff0ab1f340
|
7a9ba5e31ef02c74a1fac63e56dfdc19b44856c3
|
/src/togos/solidtree/shape/NodeShaper.java
|
94af020600fe2ec2e07eaac19ab5e82cac3e9d4a
|
[] |
no_license
|
TOGoS/SolidTree
|
53705c3c1040191c4f26936618f798b285549fb8
|
74c2748c2e37808284fe41cf92a957bff4461328
|
refs/heads/master
| 2021-01-21T08:11:38.051135
| 2016-04-21T17:36:23
| 2016-04-21T17:36:23
| 9,753,196
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,303
|
java
|
package togos.solidtree.shape;
import togos.lazy.HardHandle;
import togos.lazy.Ref;
import togos.solidtree.DereferenceException;
import togos.solidtree.HomogeneousSolidNode;
import togos.solidtree.NodeDereffer;
import togos.solidtree.RegularlySubdividedSolidNode;
import togos.solidtree.SolidNode;
import togos.solidtree.SolidNode.Type;
import togos.solidtree.shape.Shape.Containment;
public class NodeShaper
{
public int divX = 3, divY = 3, divZ = 3;
protected NodeDereffer nodeDereffer;
public Ref<SolidNode> add( Ref<SolidNode> originalRef, double minX, double minY, double minZ, double maxX, double maxY, double maxZ, Shape s, Ref<SolidNode> leafRef, int maxRecursion )
throws DereferenceException
{
switch( s.contains(minX, minY, minZ, maxX, maxY, maxZ) ) {
case NONE: return originalRef;
case ALL: return leafRef;
case SOME:
if( maxRecursion == 0 ) return originalRef;
SolidNode original = nodeDereffer.deref(originalRef, SolidNode.class);
int divCount = divX*divY*divZ;
@SuppressWarnings("unchecked")
Ref<SolidNode>[] newKids = new Ref[divCount];
if( original.getType() == Type.REGULARLY_SUBDIVIDED ) {
if( original.getDivX() != divX || original.getDivY() != divY || original.getDivZ() != divZ ) {
throw new RuntimeException(
"Can't subdivide node; already subdivided with different divisions!"
);
}
for(int i=divCount-1; i>=0; --i ) {
newKids[i] = original.subNode(i);
}
} else {
for(int i=divCount-1; i>=0; --i ) {
newKids[i] = originalRef;
}
}
double ssX = (maxX-minX)/divX;
double ssY = (maxY-minY)/divY;
double ssZ = (maxZ-minZ)/divZ;
boolean anythingChanged = false;
for( int i=0, z=0; z<divZ; ++z ) {
double sMinZ = minZ + ssZ*z;
double sMaxZ = minZ + ssZ*(z+1);
for( int y=0; y<divZ; ++y ) {
double sMinY = minY + ssY*y;
double sMaxY = minY + ssY*(y+1);
for( int x=0; x<divX; ++x, ++i ) {
double sMinX = minX + ssX*x;
double sMaxX = minX + ssX*(x+1);
if( s.contains(sMinX, sMinY, sMinZ, sMaxX, sMaxY, sMaxZ) != Containment.NONE ) {
anythingChanged = true;
newKids[i] = add( newKids[i], sMinX, sMinY, sMinZ, sMaxX, sMaxY, sMaxZ, s, leafRef, maxRecursion - 1 );
}
}
}
}
return anythingChanged ? new HardHandle<SolidNode>(RegularlySubdividedSolidNode.build(
divX, divY, divZ, newKids
)) : originalRef;
default:
throw new RuntimeException("Invalid containment");
}
}
////
public Ref<SolidNode> rootRef = new HardHandle<SolidNode>(HomogeneousSolidNode.EMPTY);
public double rootMinX = -1, rootMinY = -1, rootMinZ = -1, rootMaxX = 1, rootMaxY = 1, rootMaxZ = 1;
public void setRoot( Ref<SolidNode> r, double minX, double minY, double minZ, double maxX, double maxY, double maxZ ) {
rootRef = r;
rootMinX = minX; rootMaxX = maxX;
rootMinY = minY; rootMaxY = maxY;
rootMinZ = minZ; rootMaxZ = maxZ;
}
public void setRoot( Ref<SolidNode> r, double radius ) {
setRoot( r, -radius, -radius, -radius, radius, radius, radius );
}
public void add( Shape s, Ref<SolidNode> leafRef, int maxRecursion ) throws DereferenceException {
rootRef = add( rootRef, rootMinX, rootMinY, rootMinZ, rootMaxX, rootMaxY, rootMaxZ, s, leafRef, maxRecursion );
}
}
|
[
"togos00@gmail.com"
] |
togos00@gmail.com
|
859650ef0a93c72d6cec54e5eb3617c2d2987245
|
bd52b05568187b1118d78fec7af60ee7310e4df4
|
/src/main/java/tpietzsch/scene/TexturedDepthRamp.java
|
01e677a56db296b3c34d9ab43fc94db598d683f0
|
[] |
no_license
|
skalarproduktraum/jogl-minimal
|
30eeed75ce3707f1e749082985c71b3ab20e3dd7
|
9a1a7ef55c9286927bb662e3175d332e4452250f
|
refs/heads/master
| 2021-06-12T18:34:58.302792
| 2019-08-23T11:40:55
| 2019-08-23T11:40:55
| 146,005,644
| 0
| 0
| null | 2018-08-24T15:01:24
| 2018-08-24T15:01:23
| null |
UTF-8
|
Java
| false
| false
| 3,711
|
java
|
package tpietzsch.scene;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL3;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.util.Collections;
import org.joml.Matrix4fc;
import tpietzsch.backend.jogl.JoglGpuContext;
import tpietzsch.shadergen.DefaultShader;
import tpietzsch.shadergen.Shader;
import tpietzsch.shadergen.generate.Segment;
import tpietzsch.shadergen.generate.SegmentTemplate;
import tpietzsch.util.Images;
import static com.jogamp.opengl.GL.GL_DEPTH_TEST;
import static com.jogamp.opengl.GL.GL_ELEMENT_ARRAY_BUFFER;
import static com.jogamp.opengl.GL.GL_FLOAT;
import static com.jogamp.opengl.GL.GL_RGB;
import static com.jogamp.opengl.GL.GL_TEXTURE0;
import static com.jogamp.opengl.GL.GL_TEXTURE_2D;
import static com.jogamp.opengl.GL.GL_TRIANGLES;
import static com.jogamp.opengl.GL.GL_UNSIGNED_BYTE;
import static com.jogamp.opengl.GL.GL_UNSIGNED_INT;
public class TexturedDepthRamp
{
private final Shader prog;
private int vao;
private int texId;
public TexturedDepthRamp()
{
final Segment rampVp = new SegmentTemplate( TexturedDepthRamp.class, "ramp.vp" ).instantiate();
final Segment rampFp = new SegmentTemplate( TexturedDepthRamp.class, "ramp.fp" ).instantiate();
prog = new DefaultShader( rampVp.getCode(), rampFp.getCode() );
}
private boolean initialized;
private void init( GL3 gl )
{
initialized = true;
// ..:: VERTEX BUFFER ::..
final float vertices[] = { // 3 pos, 2 tex
1, 1, -1, 1, 1,
1, -1, -1, 1, 0,
-2, -2, -2, 0, 0,
-2, 2, -2, 0, 1,
};
final int[] tmp = new int[ 2 ];
gl.glGenBuffers( 1, tmp, 0 );
final int vbo = tmp[ 0 ];
gl.glBindBuffer( GL.GL_ARRAY_BUFFER, vbo );
gl.glBufferData( GL.GL_ARRAY_BUFFER, vertices.length * Float.BYTES, FloatBuffer.wrap( vertices ), GL.GL_STATIC_DRAW );
gl.glBindBuffer( GL.GL_ARRAY_BUFFER, 0 );
// ..:: ELEMENT BUFFER ::..
int indices[] = { // note that we start from 0!
0, 1, 3, // first triangle
1, 2, 3 // second triangle
};
gl.glGenBuffers( 1, tmp, 0 );
final int ebo = tmp[ 0 ];
gl.glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, ebo );
gl.glBufferData( GL_ELEMENT_ARRAY_BUFFER, indices.length * Integer.BYTES, IntBuffer.wrap( indices ), GL.GL_STATIC_DRAW );
gl.glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 );
// ..:: TEXTURES ::..
gl.glGenTextures( 1, tmp, 0 );
texId = tmp[ 0 ];
byte[] data = null;
try
{
data = Images.loadBytesRGB( TexturedDepthRamp.class.getResourceAsStream( "awesomeface.png" ) );
}
catch ( final IOException e )
{
e.printStackTrace();
}
gl.glActiveTexture( GL_TEXTURE0 );
gl.glBindTexture( GL_TEXTURE_2D, texId );
gl.glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, ByteBuffer.wrap( data ) );
gl.glGenerateMipmap( GL_TEXTURE_2D );
// ..:: VERTEX ARRAY OBJECT ::..
gl.glGenVertexArrays( 1, tmp, 0 );
vao = tmp[ 0 ];
gl.glBindVertexArray( vao );
gl.glBindBuffer( GL.GL_ARRAY_BUFFER, vbo );
gl.glVertexAttribPointer( 0, 3, GL_FLOAT, false, 5 * Float.BYTES, 0 );
gl.glEnableVertexAttribArray( 0 );
gl.glVertexAttribPointer( 1, 2, GL_FLOAT, false, 5 * Float.BYTES, 3 * Float.BYTES );
gl.glEnableVertexAttribArray( 1 );
gl.glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, ebo );
gl.glBindVertexArray( 0 );
}
public void draw( GL3 gl )
{
if ( !initialized )
init( gl );
JoglGpuContext context = JoglGpuContext.get( gl );
prog.use( context );
gl.glActiveTexture( GL_TEXTURE0 );
gl.glBindTexture( GL_TEXTURE_2D, texId );
gl.glBindVertexArray( vao );
gl.glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0 );
gl.glBindVertexArray( 0 );
}
}
|
[
"tobias.pietzsch@gmail.com"
] |
tobias.pietzsch@gmail.com
|
f88256ac1e854fa517a99410fae2b4e7b3f4b383
|
c85c460e7c7410e66aec5d2b1c5b44467a320d58
|
/src/test/java/com/alibaba/druid/bvt/filter/wall/WallUpdateTest1.java
|
efbe586f740cb8e81c01cd6841677553081059da
|
[] |
no_license
|
Pengxiaolong/druid
|
f51900708114a34872b79a397a254344f066bb54
|
cc6956c7df7c2037d8d2169cea068444b20f7d5d
|
refs/heads/master
| 2020-12-25T17:03:11.640854
| 2012-08-18T14:28:42
| 2012-08-18T14:28:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 804
|
java
|
package com.alibaba.druid.bvt.filter.wall;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.wall.WallConfig;
import com.alibaba.druid.wall.WallUtils;
/**
* 这个场景,检测
* @author wenshao
*
*/
public class WallUpdateTest1 extends TestCase {
private String sql = "UPDATE T_USER SET FNAME = ? WHERE FID = ?";
private WallConfig config = new WallConfig();
protected void setUp() throws Exception {
config.setUpdateAllow(false);
}
public void testMySql() throws Exception {
Assert.assertFalse(WallUtils.isValidateMySql(sql, config));
}
public void testORACLE() throws Exception {
Assert.assertFalse(WallUtils.isValidateOracle(sql, config));
}
}
|
[
"xiusiyan@gmail.com"
] |
xiusiyan@gmail.com
|
84ac9532c35089a5c93eb30780574a2cd4b84252
|
1f91b10c85fd557e348f91c7f30cf9994f191a85
|
/src/org/acm/seguin/ide/elixir/ElixirTextPrinter.java
|
65e65a7a319b89605816d68e552643c7fca018cb
|
[] |
no_license
|
wardat/JRefactory-v2.6.24
|
9162121deb1fe94d65b21daaba358e61e1ea7f93
|
38c5bbe34c0aabcb83a6b74e29a6869880102ebb
|
refs/heads/master
| 2020-03-30T17:43:59.013295
| 2018-10-03T19:23:18
| 2018-10-03T19:23:18
| 151,467,662
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,444
|
java
|
/*
* Author: Chris Seguin
*
* This software has been developed under the copyleft
* rules of the GNU General Public License. Please
* consult the GNU General Public License for more
* details about use and distribution of this software.
*/
package org.acm.seguin.ide.elixir;
import java.io.File;
import org.acm.seguin.ide.common.TextPrinter;
import org.acm.seguin.tools.install.RefactoryInstaller;
import org.acm.seguin.uml.print.PrintingThread;
/**
* Text printer for elixir
*
*@author Chris Seguin
*@created May 31, 1999
*/
public class ElixirTextPrinter extends TextPrinter {
/**
* Prints the current document
*/
public void print() {
// Make sure everything is installed properly
(new RefactoryInstaller(false)).run();
// Get the data from the window
FrameManager fm = FrameManager.current();
ViewManager currentView = fm.getViewSite().getCurrentViewManager();
if (currentView instanceof UMLViewManager) {
UMLViewManager node = (UMLViewManager) currentView;
(new PrintingThread(node.getDiagram())).start();
}
else {
BasicViewManager bvm = (BasicViewManager) currentView;
String windowText = bvm.getContentsString();
String fullFilename = bvm.getTitle();
File file = new File(fullFilename);
print(file.getName(), windowText);
}
}
/**
* Prints the current document
*/
public static void printCurrent() {
(new ElixirTextPrinter()).print();
}
}
|
[
"mawardat12@gmail.com"
] |
mawardat12@gmail.com
|
3bacb6aef7b737ba9feda82817e4d3b9c322b7af
|
51a516e8abb1599d38f41b41ad4e1994caa55407
|
/src/main/java/cw06/HW4.java
|
88bd95113f8f23c5801494f62bf35b060f261d78
|
[] |
no_license
|
Eugene1992/java-starter-10
|
9b3d2141ab0ccd59b4920abee9e59075bf1ebac8
|
a00073b89748fbee5293817222aa9176b1fc0e29
|
refs/heads/master
| 2020-04-06T07:04:00.592291
| 2016-08-31T20:04:02
| 2016-08-31T20:04:02
| 64,824,627
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 495
|
java
|
package cw06;
public class HW4 {
public static void main(String[] args) {
printFourNumbersSequence();
}
/**
* 1. Создайте программу, выводящую на экран все четырёхзначные числа
* последовательности 1000 1003 1006 1009 1012 1015 ….
*/
static void printFourNumbersSequence(){
for (int i = 1000; i < 10000; i+=3) {
System.out.print(i + " ");
}
}
}
|
[
"deyneko55@gmail.com"
] |
deyneko55@gmail.com
|
c0ca9593836bdf7ac48f6e1bb461958b84470fb2
|
16950c82b9009ed50b1e595491ae778ce55f051f
|
/nutspoker/app/src/main/java/com/htgames/nutspoker/interfaces/AreaClickListener.java
|
5d637808fceb4e02ca7e23a982ee0aec73a5fc63
|
[] |
no_license
|
wangchenxing1990/dashen
|
f4bf121ed4a75f1981608719a7746412d6b6c3eb
|
5bd57100492557d3872cc346e644c3f571734351
|
refs/heads/master
| 2020-05-25T15:32:55.235083
| 2019-05-21T16:05:30
| 2019-05-21T16:05:30
| 187,870,586
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 170
|
java
|
package com.htgames.nutspoker.interfaces;
/**
* Created by 20150726 on 2015/10/12.
*/
public interface AreaClickListener {
public void onAreaClick(String area);
}
|
[
"18317770484@163.com"
] |
18317770484@163.com
|
cefc41680f1c6fc93a4336b62da07b6b1ae1d1c4
|
7005851126f6a30ae637f28d0aa9b3ef639556cd
|
/core/trunk/binding/ncipv2_01/src/main/java/org/extensiblecatalog/ncip/v2/binding/ncipv2_01/jaxb/dozer/MediumTypeJAXBElementSchemeValuePairConverter.java
|
3779542f338c603dcdba3087029ad1869c973cbd
|
[
"MIT"
] |
permissive
|
eXtensibleCatalog/NCIP2-Toolkit
|
c1c0f482e7fa34c3ac5dd8e2842ea0c0db6764a7
|
3e2603c2010dd2bcbdbe104eb46d64c38c539dc6
|
refs/heads/master
| 2022-09-19T23:43:55.650756
| 2017-02-20T08:39:02
| 2017-02-20T08:39:02
| 44,343,498
| 0
| 3
| null | 2022-08-25T20:20:18
| 2015-10-15T20:25:44
|
Java
|
UTF-8
|
Java
| false
| false
| 968
|
java
|
/**
* Copyright (c) 2010 eXtensible Catalog Organization
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the MIT/X11 license. The text of the license can be
* found at http://www.opensource.org/licenses/mit-license.php.
*/
package org.extensiblecatalog.ncip.v2.binding.ncipv2_01.jaxb.dozer;
import org.extensiblecatalog.ncip.v2.binding.jaxb.dozer.BaseJAXBElementSchemeValuePairConverter;
import org.extensiblecatalog.ncip.v2.binding.ncipv2_01.jaxb.elements.SchemeValuePair;
import org.extensiblecatalog.ncip.v2.service.MediumType;
public class MediumTypeJAXBElementSchemeValuePairConverter
extends BaseJAXBElementSchemeValuePairConverter<SchemeValuePair,
MediumType> {
public MediumTypeJAXBElementSchemeValuePairConverter() {
super(org.extensiblecatalog.ncip.v2.binding.ncipv2_01.jaxb.elements.SchemeValuePair.class,
MediumType.class);
}
}
|
[
"xrosecky@gmail.com"
] |
xrosecky@gmail.com
|
770186b2a647031bc5cc5e91e92d729ed33b59cb
|
1635497a712361850bcb908fb44825419d9f3f13
|
/src/main/java/hr/ja/config/Constants.java
|
99cc9c820bc7c4fabab2c16a4b410a40ae0a3631
|
[] |
no_license
|
jankod/CajgerHipster
|
f6486345d39edd3f92a1edbe32c83828601116eb
|
54dbbdc7b3dd8b0dda5062af57ecae2146f29e20
|
refs/heads/master
| 2020-03-17T03:22:11.844690
| 2018-05-13T11:49:27
| 2018-05-13T11:49:27
| 133,232,297
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package hr.ja.config;
/**
* Application constants.
*/
public final class Constants {
// Regex for acceptable logins
public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$";
public static final String SYSTEM_ACCOUNT = "system";
public static final String ANONYMOUS_USER = "anonymoususer";
public static final String DEFAULT_LANGUAGE = "en";
private Constants() {
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
3bda06a95cbf7451437f416ed6a604ece9922c64
|
14f8e80f05020ae0416122248faf0262a2505b4b
|
/Java/Semester 1 usorteret/Lektion34_Fletning/src/Opg1/Customer.java
|
7f073deb9ec3f1142750c4077506912eede5e5f9
|
[] |
no_license
|
saphyron/randomstuff
|
6befba6ffba0818b8f57683f028b425239cb92a9
|
e21ba06758818ab11c28a19a608b3804bd589e3f
|
refs/heads/main
| 2023-05-19T15:59:31.006362
| 2021-06-09T07:57:13
| 2021-06-09T07:57:13
| 360,878,053
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 259
|
java
|
package Opg1;
public class Customer {
private String name;
private int age;
public Customer(String name, int age) {
this.age = age;
this.name = name;
}
public String getName() {
return name;
}
public int getAge() {
return age;
}
}
|
[
"30288325+saphyron@users.noreply.github.com"
] |
30288325+saphyron@users.noreply.github.com
|
d758e454b5010d661dc1dd9f2ce7a03b74dd07e7
|
9b5cbbd0d0703b274b752a6eed14af64f85f884a
|
/src/core/src/test/java/org/apache/struts2/views/freemarker/TestAction.java
|
7d0d39ed7ac0b4fb14a0c12b953a2ad7769f8135
|
[
"Apache-2.0"
] |
permissive
|
Iletee/struts2-showcase-demo
|
00bae82c7723611a802e4101fc0cf1b390169634
|
9a8d781db5d3fa41ea435d5efd3160d0adb8e209
|
refs/heads/master
| 2021-09-16T22:41:30.732315
| 2018-06-18T11:06:03
| 2018-06-18T11:06:03
| 104,106,137
| 0
| 4
|
Apache-2.0
| 2018-06-18T11:01:40
| 2017-09-19T17:30:01
|
Java
|
UTF-8
|
Java
| false
| false
| 1,555
|
java
|
/*
* $Id$
*
* 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.struts2.views.freemarker;
import java.util.ArrayList;
import java.util.List;
import com.opensymphony.xwork2.ActionSupport;
/**
*/
public class TestAction extends ActionSupport {
private static final long serialVersionUID = -762413863731432302L;
public TestAction() {
super();
}
public List getBeanList() {
List list = new ArrayList();
list.add(new TestBean("one", "1"));
list.add(new TestBean("two", "2"));
list.add(new TestBean("three", "3"));
return list;
}
public List getStringList() {
List list = new ArrayList();
list.add("one");
list.add("two");
list.add("three");
return list;
}
}
|
[
"iturunen@sonatype.com"
] |
iturunen@sonatype.com
|
9d19ca2949f3de21aa41cd08c2673deb57275c3b
|
af3f8d8a5a99279a0af21269dfb5bdca40dda2f3
|
/namiya/src/main/java/global/sesoc/namiya/HomeController.java
|
4bf11ac9b97da6acdc9246d1c8d2ca7046f75900
|
[] |
no_license
|
namiyastore/namiyaa
|
6554a05ccfec12940732d8f37cf39d2af9a4fda8
|
51510365829a3f5089b991db746c0a4c6d675d12
|
refs/heads/master
| 2020-03-26T05:33:51.169846
| 2018-08-13T10:42:49
| 2018-08-13T10:42:49
| 144,562,732
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package global.sesoc.namiya;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Handles requests for the application home page.
*/
@Controller
public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
/**
* Simply selects the home view to render by returning its name.
*/
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(Locale locale, Model model) {
logger.info("Welcome home! The client locale is {}.", locale);
Date date = new Date();
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
String formattedDate = dateFormat.format(date);
model.addAttribute("serverTime", formattedDate );
return "home";
}
}
|
[
"user@user-PC"
] |
user@user-PC
|
a2039f6098fae6aea3f21769ca3ec45406607ca0
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.fitnesstracker-base/sources/com/google/common/util/concurrent/ForwardingListenableFuture.java
|
664ed82e38f7c211fefd059a6370c60a07d301b1
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 1,729
|
java
|
package com.google.common.util.concurrent;
import com.google.common.base.Preconditions;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.concurrent.Executor;
@CanIgnoreReturnValue
public abstract class ForwardingListenableFuture<V> extends ForwardingFuture<V> implements ListenableFuture<V> {
/* access modifiers changed from: protected */
@Override // com.google.common.collect.ForwardingObject, com.google.common.util.concurrent.ForwardingFuture, com.google.common.util.concurrent.ForwardingFuture
public abstract ListenableFuture<? extends V> delegate();
protected ForwardingListenableFuture() {
}
@Override // com.google.common.util.concurrent.ListenableFuture
public final void addListener(Runnable runnable, Executor executor) {
delegate().addListener(runnable, executor);
}
public static abstract class SimpleForwardingListenableFuture<V> extends ForwardingListenableFuture<V> {
private final ListenableFuture<V> delegate;
protected SimpleForwardingListenableFuture(ListenableFuture<V> listenableFuture) {
this.delegate = (ListenableFuture) Preconditions.checkNotNull(listenableFuture);
}
/* access modifiers changed from: protected */
@Override // com.google.common.collect.ForwardingObject, com.google.common.util.concurrent.ForwardingListenableFuture, com.google.common.util.concurrent.ForwardingListenableFuture, com.google.common.util.concurrent.ForwardingListenableFuture, com.google.common.util.concurrent.ForwardingFuture, com.google.common.util.concurrent.ForwardingFuture
public final ListenableFuture<V> delegate() {
return this.delegate;
}
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
20be0c1993c7439f3e6f4bafed7da55379f485a6
|
59e6dc1030446132fb451bd711d51afe0c222210
|
/components/business-messaging/hl7/org.wso2.carbon.business.messaging.hl7.store/4.2.0/src/main/java/org/wso2/carbon/business/messaging/hl7/store/JDBCStore.java
|
e6f39ff7d2c2bb2ff571881a474e8bdb4a1b3488
|
[] |
no_license
|
Alsan/turing-chunk07
|
2f7470b72cc50a567241252e0bd4f27adc987d6e
|
e9e947718e3844c07361797bd52d3d1391d9fb5e
|
refs/heads/master
| 2020-05-26T06:20:24.554039
| 2014-02-07T12:02:53
| 2014-02-07T12:02:53
| 38,284,349
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,928
|
java
|
package org.wso2.carbon.business.messaging.hl7.store;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.MessageContext;
import org.apache.synapse.core.SynapseEnvironment;
import org.apache.synapse.message.MessageConsumer;
import org.apache.synapse.message.MessageProducer;
import org.apache.synapse.message.store.MessageStore;
import org.apache.synapse.message.store.Constants;
import java.sql.*;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.concurrent.atomic.AtomicInteger;
public class JDBCStore implements MessageStore {
private static final Log logger = LogFactory.getLog(JDBCStore.class.getName());
private boolean isInitialized = false;
private String name;
private String description;
private Map<String, Object> parameters;
private String fileName;
private int maxProducerId = Integer.MAX_VALUE;
/** Message producer id */
private AtomicInteger producerId = new AtomicInteger(0);
/** Message consumer id */
private AtomicInteger consumerId = new AtomicInteger(0);
private Connection conn;
private String driverClass = "com.mysql.jdbc.Driver";
private String dbUrl = "jdbc:mysql://localhost/test";
private String dbUser = "root";
private String dbPass = "root";
private void parseParameters() {
this.driverClass = (String) parameters.get("jdbcDriverClass");
this.dbUrl = (String) parameters.get("jdbcUrl");
this.dbUser = (String) parameters.get("jdbcUser");
this.dbPass = (String) parameters.get("jdbcPass");
if(this.driverClass == null || this.dbUrl == null) {
logger.error("Required parameters jdbcDriverClass and jdbcUrl missing");
}
}
@Override
public void init(SynapseEnvironment synapseEnvironment) {
if(synapseEnvironment == null) {
logger.error("Cannot initialize HL7 JDBC Store");
return;
}
parseParameters();
this.isInitialized = initJDBCStore();
if(this.isInitialized) {
logger.info(toString() + ". Initialized... ");
} else {
logger.warn(toString() + ". Initialization Failed... ");
}
}
public Connection getConnection() {
return this.conn;
}
private boolean initJDBCStore() {
try {
Class.forName(driverClass);
this.conn = DriverManager.getConnection(dbUrl, dbUser, dbPass);
if (!initTables()) {
logger.error("Failed to initialize data tables for '" + dbUrl + "'");
return false;
} else {
return true;
}
} catch (ClassNotFoundException e) {
logger.error("Could not find JDBC driver '" + driverClass + "'");
return false;
} catch (SQLException e) {
logger.error("Error on connection to '" + dbUrl + "'. " + e.getMessage());
return false;
}
}
private boolean initTables() throws SQLException {
Statement statement = conn.createStatement();
ResultSet result = statement.executeQuery(JDBCUtils.getTableExistsQuery(getName()));
if(!result.next()) {
statement.execute(JDBCUtils.getCreateTableQuery(getName()));
return true;
} else {
return false;
}
}
@Override
public void destroy() {
try {
if (!this.conn.isClosed()) {
this.conn.close();
}
} catch (SQLException e) {
logger.error("Error while destroying connection to '" + dbUrl + "'");
}
}
@Override
public String getName() {
return this.name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public void setDescription(String description) {
this.description = description;
}
@Override
public String getDescription() {
return this.description;
}
@Override
public MessageProducer getProducer() {
JDBCProducer producer = new JDBCProducer(this);
producer.setId(nextProducerId());
return producer;
}
@Override
public MessageConsumer getConsumer() {
return null;
}
@Override
public void setParameters(Map<String, Object> parameters) {
this.parameters = parameters;
}
@Override
public Map<String, Object> getParameters() {
return this.parameters;
}
@Override
public int getType() {
return Constants.JDBC_MS;
}
@Override
public MessageContext remove() throws NoSuchElementException {
return null;
}
@Override
public void clear() {
}
@Override
public MessageContext remove(String s) {
return null;
}
@Override
public int size() {
return 0;
}
@Override
public MessageContext get(int i) {
return null;
}
@Override
public List<MessageContext> getAll() {
return null;
}
@Override
public MessageContext get(String s) {
return null;
}
@Override
public String toString() {
return "HL7 Store [" + getName() + "]";
}
@Override
public void setFileName(String fileName) {
this.fileName = fileName;
}
@Override
public String getFileName() {
return this.fileName;
}
private int nextConsumerId() {
int id = consumerId.incrementAndGet();
return id;
}
private int nextProducerId() {
int id = producerId.incrementAndGet();
if (id == maxProducerId) {
logger.info("Setting producer ID generator to 0...");
producerId.set(0);
id = producerId.incrementAndGet();
}
return id;
}
}
|
[
"malaka@wso2.com"
] |
malaka@wso2.com
|
095b7f232cc20cc41acff82e22054f5d956b62a0
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/waf-openapi-20190910/src/main/java/com/aliyun/waf_openapi20190910/models/DescribeProtectionModuleStatusResponseBody.java
|
c50d430903f83c4376dda16c2322cf8dfcfe0ff3
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,068
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.waf_openapi20190910.models;
import com.aliyun.tea.*;
public class DescribeProtectionModuleStatusResponseBody extends TeaModel {
@NameInMap("RequestId")
public String requestId;
@NameInMap("ModuleStatus")
public Integer moduleStatus;
public static DescribeProtectionModuleStatusResponseBody build(java.util.Map<String, ?> map) throws Exception {
DescribeProtectionModuleStatusResponseBody self = new DescribeProtectionModuleStatusResponseBody();
return TeaModel.build(map, self);
}
public DescribeProtectionModuleStatusResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public DescribeProtectionModuleStatusResponseBody setModuleStatus(Integer moduleStatus) {
this.moduleStatus = moduleStatus;
return this;
}
public Integer getModuleStatus() {
return this.moduleStatus;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
7785955f5d88c7e1e411d51bf87811a9ecd576a3
|
97fd02f71b45aa235f917e79dd68b61c62b56c1c
|
/src/main/java/com/tencentcloudapi/iotexplorer/v20190423/models/ModifySpacePropertyResponse.java
|
72654187719ed51b1c08ebe196d4f9bbbac7e65a
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java
|
7df922f7c5826732e35edeab3320035e0cdfba05
|
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
|
refs/heads/master
| 2023-09-04T10:51:57.854153
| 2023-09-01T03:21:09
| 2023-09-01T03:21:09
| 129,837,505
| 537
| 317
|
Apache-2.0
| 2023-09-13T02:42:03
| 2018-04-17T02:58:16
|
Java
|
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* 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.tencentcloudapi.iotexplorer.v20190423.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ModifySpacePropertyResponse extends AbstractModel{
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public ModifySpacePropertyResponse() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public ModifySpacePropertyResponse(ModifySpacePropertyResponse source) {
if (source.RequestId != null) {
this.RequestId = new String(source.RequestId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
01d8cc7c6d704e350311c59baa23f54df20c8e22
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE15_External_Control_of_System_or_Configuration_Setting/CWE15_External_Control_of_System_or_Configuration_Setting__console_readLine_51b.java
|
87fd3611b269aad4c57a1dc741f25dfec0e2f170
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,918
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE15_External_Control_of_System_or_Configuration_Setting__console_readLine_51b.java
Label Definition File: CWE15_External_Control_of_System_or_Configuration_Setting.label.xml
Template File: sources-sink-51b.tmpl.java
*/
/*
* @description
* CWE: 15 External Control of System or Configuration Setting
* BadSource: console_readLine Read data from the console using readLine()
* GoodSource: A hardcoded string
* BadSink: Set the catalog name with the value of data
* Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package
*
* */
package testcases.CWE15_External_Control_of_System_or_Configuration_Setting;
import testcasesupport.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.logging.Level;
public class CWE15_External_Control_of_System_or_Configuration_Setting__console_readLine_51b
{
public void badSink(String data ) throws Throwable
{
Connection dbConnection = null;
try
{
dbConnection = IO.getDBConnection();
/* POTENTIAL FLAW: Set the catalog name with the value of data
* allowing a nonexistent catalog name or unauthorized access to a portion of the DB */
dbConnection.setCatalog(data);
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(String data ) throws Throwable
{
Connection dbConnection = null;
try
{
dbConnection = IO.getDBConnection();
/* POTENTIAL FLAW: Set the catalog name with the value of data
* allowing a nonexistent catalog name or unauthorized access to a portion of the DB */
dbConnection.setCatalog(data);
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
0e1efec6c34a0de583f34889543d4f887307ae1d
|
cc65e10feea55bfa97cade23176cd6e574d3bbea
|
/iportal/iportal-core/src/main/java/com/imall/iportal/core/platform/service/GoodsDocDailyNecessitiesService.java
|
bfd84272a64599237cdf784dfe0a054be057dee8
|
[] |
no_license
|
weishihuai/imallCloudc
|
ef5a0d7e4866ad7e63251dff512afede7246bd4f
|
f3163208eaf539aa63dc9e042d2ff6c7403aa405
|
refs/heads/master
| 2021-08-20T05:42:23.717707
| 2017-11-28T09:10:36
| 2017-11-28T09:10:36
| 112,305,704
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 632
|
java
|
package com.imall.iportal.core.platform.service;
import com.imall.iportal.core.platform.entity.GoodsDocDailyNecessities;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotNull;
/**
* (服务层类)
* @author by imall core generator
* @version 1.0.0
*/
@Validated
public interface GoodsDocDailyNecessitiesService{
GoodsDocDailyNecessities save(GoodsDocDailyNecessities goodsDailyNecessities);
/**
* 通过商品档案ID 查找
* @param id
* @return
*/
GoodsDocDailyNecessities findByGoodsDocId(@NotNull Long id);
void delete(Long id);
}
|
[
"34024258+weishihuai@users.noreply.github.com"
] |
34024258+weishihuai@users.noreply.github.com
|
696e13f2be927381736acbbb97a87a9fe0fd193b
|
2b8b17ea40c6f725996657d4a2e05c0819939728
|
/Exercicio003/src/exe007/Funcionario.java
|
a195e1142db6d1f67adc99e1397bf612ca320b9c
|
[] |
no_license
|
PedroMateusCunha/Exercicios-de-ProgII
|
f5b7b3a445ef201b557607a8094be85bece35eb0
|
834116170ed73d88bf250a567513913623396bea
|
refs/heads/master
| 2020-07-27T21:32:23.416657
| 2019-12-10T22:07:16
| 2019-12-10T22:07:16
| 209,221,756
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 635
|
java
|
package exe007;
import java.util.Date;
public class Funcionario {
private String nome;
private Date dataNascimento;
private String cpf;
private String sexo;
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public Date getDataNascimento() {
return dataNascimento;
}
public void setDataNascimento(Date dataNascimento) {
this.dataNascimento = dataNascimento;
}
public String getCpf() {
return cpf;
}
public void setCpf(String cpf) {
this.cpf = cpf;
}
public String getSexo() {
return sexo;
}
public void setSexo(String sexo) {
this.sexo = sexo;
}
}
|
[
"="
] |
=
|
56c91aaec51b04f782b30880f02074d41cb3a9a4
|
33b1fb5acdfb4f23fd08b7e8defb487897fdd60f
|
/jtss/src/main/java/ec/tss/tsproviders/utils/UriBuilder.java
|
df8d154b8bd0e20c9862fcf448a6126110ffced0
|
[] |
no_license
|
IngaDa/jdemetra-core
|
6cafed92ea5fd08690f7e0831a45468f87f21284
|
865da3a076d0b68570b0f7978ca6de1ac38864e1
|
refs/heads/master
| 2020-05-04T16:14:44.176623
| 2019-01-15T09:59:48
| 2019-01-15T09:59:48
| 179,272,719
| 1
| 0
| null | 2019-04-03T11:07:26
| 2019-04-03T11:07:26
| null |
UTF-8
|
Java
| false
| false
| 7,882
|
java
|
/*
* Copyright 2013 National Bank of Belgium
*
* Licensed under the EUPL, Version 1.1 or – as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://ec.europa.eu/idabc/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package ec.tss.tsproviders.utils;
import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import com.google.common.collect.Streams;
import ec.tstoolkit.design.IBuilder;
import ec.tstoolkit.utilities.URLEncoder2;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.SortedMap;
import java.util.function.BiConsumer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* http://en.wikipedia.org/wiki/URI_scheme
* http://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx
*
* @author Philippe Charles
*/
public final class UriBuilder implements IBuilder<URI> {
// PROPERTIES
private final String scheme;
private final String host;
private String[] path;
private SortedMap<String, String> query;
private SortedMap<String, String> fragment;
public UriBuilder(@Nonnull String scheme, @Nonnull String host) {
Preconditions.checkArgument(!Strings.isNullOrEmpty(scheme), "scheme can't be null or empty");
Preconditions.checkArgument(!Strings.isNullOrEmpty(host), "host can't be null or empty");
this.scheme = scheme;
this.host = host;
reset();
}
@Nonnull
public UriBuilder reset() {
this.path = null;
this.query = null;
this.fragment = null;
return this;
}
@Nonnull
public UriBuilder path(@Nullable String... path) {
this.path = path;
return this;
}
@Nonnull
public UriBuilder query(@Nullable SortedMap<String, String> query) {
this.query = query;
return this;
}
@Nonnull
public UriBuilder fragment(@Nullable SortedMap<String, String> fragment) {
this.fragment = fragment;
return this;
}
@Nonnull
public String buildString() {
StringBuilder result = new StringBuilder();
result.append(scheme);
result.append("://");
result.append(host);
if (path != null) {
appendArray(result.append('/'), path, '/');
}
if (query != null) {
appendMap(result.append('?'), query, '&', '=');
}
if (fragment != null) {
appendMap(result.append('#'), fragment, '&', '=');
}
return result.toString();
}
@Override
public URI build() {
return URI.create(buildString());
}
private static String decodeUrlUtf8(String o) {
try {
return URLDecoder.decode(o, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException ex) {
throw new RuntimeException(ex);
}
}
@Nonnull
private static StringBuilder appendEntry(@Nonnull StringBuilder sb, @Nonnull Entry<String, String> o, char sep) {
URLEncoder2.encode(sb, o.getKey(), StandardCharsets.UTF_8);
sb.append(sep);
URLEncoder2.encode(sb, o.getValue(), StandardCharsets.UTF_8);
return sb;
}
@Nonnull
private static StringBuilder appendMap(@Nonnull StringBuilder sb, @Nonnull Map<String, String> keyValues, char sep1, char sep2) {
if (!keyValues.isEmpty()) {
Iterator<Entry<String, String>> iterator = keyValues.entrySet().iterator();
appendEntry(sb, iterator.next(), sep2);
while (iterator.hasNext()) {
appendEntry(sb.append(sep1), iterator.next(), sep2);
}
}
return sb;
}
@Nonnull
private static StringBuilder appendArray(@Nonnull StringBuilder sb, @Nonnull String[] array, char sep) {
if (array.length > 0) {
int i = 0;
URLEncoder2.encode(sb, array[i], StandardCharsets.UTF_8);
while (++i < array.length) {
URLEncoder2.encode(sb.append(sep), array[i], StandardCharsets.UTF_8);
}
}
return sb;
}
@Nullable
public static String[] getPathArray(@Nonnull URI uri) {
String path = uri.getRawPath();
return path != null && !path.isEmpty() ? splitToArray(path.subSequence(1, path.length())) : null;
}
@Nullable
public static String[] getPathArray(@Nonnull URI uri, int expectedSize) {
String path = uri.getRawPath();
return path != null && !path.isEmpty() ? splitToArray(path.subSequence(1, path.length()), expectedSize) : null;
}
@Nullable
public static Map<String, String> getQueryMap(@Nonnull URI uri) {
String query = uri.getRawQuery();
return query != null ? splitMap(query) : null;
}
@Nullable
public static Map<String, String> getFragmentMap(@Nonnull URI uri) {
String fragment = uri.getRawFragment();
return fragment != null ? splitMap(fragment) : null;
}
private static final Splitter PATH_SPLITTER = Splitter.on('/');
private static final Splitter ENTRY_SPLITTER = Splitter.on('&');
private static final Splitter KEY_VALUE_SPLITTER = Splitter.on('=');
@Nullable
private static String[] splitToArray(@Nonnull CharSequence input) {
return Streams.stream(PATH_SPLITTER.split(input)).map(UriBuilder::decodeUrlUtf8).toArray(String[]::new);
}
@Nullable
private static String[] splitToArray(@Nonnull CharSequence input, int expectedSize) {
Iterator<String> items = PATH_SPLITTER.split(input).iterator();
if (expectedSize == 0 || !items.hasNext()) {
return null;
}
String[] result = new String[expectedSize];
int index = 0;
do {
result[index++] = decodeUrlUtf8(items.next());
} while (index < expectedSize && items.hasNext());
return !items.hasNext() && index == expectedSize ? result : null;
}
@Nullable
private static Map<String, String> splitMap(@Nonnull CharSequence input) {
if (input.length() == 0) {
return Collections.emptyMap();
}
Map<String, String> result = new HashMap<>();
return splitMapTo(input, result::put) ? result : null;
}
private static boolean splitMapTo(@Nonnull CharSequence input, @Nonnull BiConsumer<String, String> consumer) {
for (String entry : ENTRY_SPLITTER.split(input)) {
Iterator<String> entryFields = KEY_VALUE_SPLITTER.split(entry).iterator();
if (!entryFields.hasNext()) {
return false;
}
String key = entryFields.next();
if (!entryFields.hasNext()) {
return false;
}
String value = entryFields.next();
if (entryFields.hasNext()) {
return false;
}
consumer.accept(decodeUrlUtf8(key), decodeUrlUtf8(value));
}
return true;
}
}
|
[
"philippe.charles@nbb.be"
] |
philippe.charles@nbb.be
|
18664b08e16afa7ae6e2a532ae4a2d3f391ff1d5
|
996dc8b8118defa369b8d3abfbd583790f3ac5c5
|
/InversionOfControlChallenge/src/main/java/com/spring/InversionOfControlChallenge/City.java
|
166acf796a0dfd7587d7756dbdf87c6ed4212443
|
[
"Apache-2.0"
] |
permissive
|
david2999999/Spring-Framework-4
|
9d8dcece9805fb366ec6445582625ff50e891ffc
|
905a62840f20ad9e7631c295fc06250cc3ce551f
|
refs/heads/master
| 2021-04-06T06:08:06.277374
| 2019-05-17T23:58:10
| 2019-05-17T23:58:10
| 125,078,937
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 157
|
java
|
package com.spring.InversionOfControlChallenge;
public class City {
public void cityName() {
System.out.println("City name is New York");
}
}
|
[
"djiang86@binghamton.edu"
] |
djiang86@binghamton.edu
|
4f4567a870ac16898824d56ecaf335bff4da8ee1
|
c70d6b74fed3f2df60928482c5e2e8a7db1a4abd
|
/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisRepositoriesAutoConfiguration.java
|
a6d4da315940a967acb7920e4a4b3fb678fbec3f
|
[
"Apache-2.0"
] |
permissive
|
chixue1016/spring-boot
|
925718ee2112dfaea61db4deaa476982696c6781
|
2ae1435916f0546af6c82374b3c2d5694fe1ebb1
|
refs/heads/master
| 2020-04-05T19:04:25.017725
| 2016-03-21T14:43:27
| 2016-03-21T14:43:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,990
|
java
|
/*
* Copyright 2012-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 org.springframework.boot.autoconfigure.data.redis;
import redis.clients.jedis.Jedis;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;
import org.springframework.data.redis.repository.support.RedisRepositoryFactoryBean;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Spring Data's Redis
* Repositories.
*
* @author Eddú Meléndez
* @see EnableRedisRepositories
* @since 1.4.0
*/
@Configuration
@ConditionalOnClass({ Jedis.class, EnableRedisRepositories.class })
@ConditionalOnProperty(prefix = "spring.data.redis.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnMissingBean(RedisRepositoryFactoryBean.class)
@Import(RedisRepositoriesAutoConfigureRegistrar.class)
@AutoConfigureAfter(RedisAutoConfiguration.class)
public class RedisRepositoriesAutoConfiguration {
}
|
[
"snicoll@pivotal.io"
] |
snicoll@pivotal.io
|
16506b838a99d22dcae57bffc7c97255f6f1ecbf
|
c9b4e3dd7ef80ac7e1fdf3ccae818ba0d57246eb
|
/stock-day/src/main/java/com/stock/stockday/service/StockDay0006Service.java
|
965f7c5a6e66472bca6d25ca8583ddd490a91627
|
[] |
no_license
|
wuxingle/stock-day
|
104259d3583a5ddbb32d0c79b695999bf1938ab2
|
95ce8201479d3f330fb182ae8b299cabcb171a16
|
refs/heads/master
| 2022-06-27T21:45:17.085292
| 2020-04-13T07:45:36
| 2020-04-13T07:45:36
| 188,746,226
| 0
| 0
| null | 2022-06-21T01:10:29
| 2019-05-27T00:37:23
|
Java
|
UTF-8
|
Java
| false
| false
| 528
|
java
|
package com.stock.stockday.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.stock.stockday.entity.StockDay0002;
import com.stock.stockday.entity.StockDay0006;
import java.util.List;
public interface StockDay0006Service extends IService<StockDay0006> {
List<StockDay0006> selectByCodeAndEx(String codeId, String codeEx);
List<StockDay0006> selectByCodeAndExPage(Page<StockDay0006> page, String codeId, String codeEx);
}
|
[
"1546752823@qq.com"
] |
1546752823@qq.com
|
a04a5e7cd6689c3c810b013448b689b0e51cb19a
|
43f89c7ea961f24d7255aa967c149353a32b8e18
|
/javoszie/src/main/java/com/strobel/assembler/metadata/signatures/LongSignature.java
|
fee3f1a320f45754a38b74c0173cef6804349dd6
|
[] |
no_license
|
Neumann789/springboot-learn
|
43ae3550c3b8237b261c72225dafed76dcf4cf2c
|
2e1fb8fb60bb07d5a3dff765d9d82a4d7e0e6d17
|
refs/heads/master
| 2022-12-21T09:06:07.587918
| 2018-04-05T00:45:22
| 2018-04-05T00:45:22
| 97,288,751
| 1
| 0
| null | 2022-12-16T07:56:00
| 2017-07-15T03:08:50
|
Java
|
UTF-8
|
Java
| false
| false
| 448
|
java
|
package com.strobel.assembler.metadata.signatures;
public final class LongSignature
implements BaseType
{
private static final LongSignature _singleton = new LongSignature();
public static LongSignature make()
{
return _singleton;
}
public void accept(TypeTreeVisitor<?> v) {
v.visitLongSignature(this);
}
}
|
[
"test@test.com"
] |
test@test.com
|
2f11034024092c45844d31e10f3b1fee8d816139
|
9deefa27a637e863162fdc1377ca99f933cd66f6
|
/src/org/dmd/examples/contacts/client/Dark_matter_contacts.java
|
351b6c3004468e9dcf2e1defc48d685b30a1e453
|
[] |
no_license
|
dark-matter-org/dark-matter-contacts
|
2b41c5457fd9c346519a954250d246a472743aec
|
3d165d997c2bb8db28498b2ad8badfc1966e5495
|
refs/heads/master
| 2021-01-10T12:46:09.988870
| 2018-02-28T19:15:14
| 2018-02-28T19:15:14
| 46,194,335
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 809
|
java
|
package org.dmd.examples.contacts.client;
import org.dmd.examples.contacts.client.application.extended.ContactWebApplication;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Dark_matter_contacts implements EntryPoint {
ContactWebApplication app;
/**
* This is the entry point method.
*/
public void onModuleLoad() {
System.out.println("appname = " + Window.Navigator.getAppName());
System.out.println("appcodename = " + Window.Navigator.getAppCodeName());
System.out.println("useragent = " + Window.Navigator.getUserAgent());
System.out.println("platform = " + Window.Navigator.getPlatform());
app = new ContactWebApplication();
app.run();
}
}
|
[
"pstrong99@gmail.com"
] |
pstrong99@gmail.com
|
bdff732858b67ceb208df8881e9f02c108584bc1
|
78991fbbe463c1601a5d91fcd7ea05a5e493d2c9
|
/panasonic-image-app_1.10.14/source/com/google/android/gms/p035d/C1013li.java
|
37fe8bca51dbee29b93157f2c1d7c9039f22a1bf
|
[] |
no_license
|
maiermic/panasonic-image-app
|
480dc4f0500a2e14bd7d4138f6fb9c7dc7871b61
|
ef9bd7c2a8390204894c53b49d1e01a230141e2d
|
refs/heads/master
| 2020-07-10T06:02:42.687761
| 2019-08-22T12:07:42
| 2019-08-22T12:07:42
| 204,177,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
package com.google.android.gms.p035d;
import com.google.android.gms.common.internal.C0612ab;
import com.google.android.gms.common.util.C0688c;
/* renamed from: com.google.android.gms.d.li */
final class C1013li {
/* renamed from: a */
private final C0688c f2913a;
/* renamed from: b */
private long f2914b;
public C1013li(C0688c cVar) {
C0612ab.m2289a(cVar);
this.f2913a = cVar;
}
/* renamed from: a */
public final void mo2693a() {
this.f2914b = this.f2913a.mo1761b();
}
/* renamed from: a */
public final boolean mo2694a(long j) {
return this.f2914b == 0 || this.f2913a.mo1761b() - this.f2914b >= j;
}
/* renamed from: b */
public final void mo2695b() {
this.f2914b = 0;
}
}
|
[
"maier1michael@gmail.com"
] |
maier1michael@gmail.com
|
69e6207a17276c715965f7f602d2e143f24417fc
|
3bd3f4b6d35687115e772b072bf3caf63f615f75
|
/2023-01/spring-26/classwork/src/main/java/ru/otus/spring/controller/PagesController.java
|
c7e8419c28e8fed838dff6c68754a8fcf7012099
|
[] |
no_license
|
OtusTeam/Spring
|
a2394de99776bff02610bd17c67a8403d38cc0d5
|
afbcb23d33a9688652da604d2a508036fc5236a7
|
refs/heads/master
| 2023-08-28T19:12:49.241468
| 2023-08-26T07:28:32
| 2023-08-26T07:28:32
| 173,905,170
| 142
| 187
| null | 2023-07-07T23:21:26
| 2019-03-05T08:23:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,463
|
java
|
package ru.otus.spring.controller;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import ru.otus.spring.service.MyService;
@Controller
public class PagesController {
private final MyService myService;
public PagesController(MyService myService) {
this.myService = myService;
}
@GetMapping("/")
public String indexPage() {
return "index";
}
@GetMapping("/public")
public String publicPage() {
return "public";
}
@GetMapping("/user")
public String userPage() {
myService.onlyUser();
return "user";
}
@GetMapping("/manager")
public String managerPage() {
return "manager";
}
@GetMapping("/admin")
//@Secured( "ADMIN" )
public String adminPage() {
myService.onlyUser();
//myService.onlyAdmin();
return "admin";
}
@GetMapping("/authenticated")
public String authenticatedPage() {
UserDetails userDetails = (UserDetails) SecurityContextHolder
.getContext().getAuthentication().getPrincipal();
System.out.println(userDetails.getUsername());
return "authenticated";
}
@GetMapping("/success")
public String successPage() {
return "success";
}
}
|
[
"kataus@gmail.com"
] |
kataus@gmail.com
|
9afca1681c619c9d3d725f5a9a5befb2b9427c4e
|
7038e25ce514d6024146e002e9fc0c868214d9ae
|
/2015年以前的旧代码/AmericaUniversityCrawler/src/cn/edu/bjtu/auc/task/PurdueTask.java
|
325a355a296792a2b083ac31c9684852f44e159c
|
[] |
no_license
|
3qwasd/jobs
|
d63f67ec08f9de36e32c4ab401ea0ab73b64636c
|
8c21066062ecbb71d630c2f0cbebe0635547887d
|
refs/heads/master
| 2023-01-02T11:24:43.780319
| 2019-07-22T16:49:13
| 2019-07-22T16:49:13
| 64,465,190
| 1
| 0
| null | 2022-12-16T02:53:31
| 2016-07-29T08:40:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,141
|
java
|
/**
* @QiaoJian
*/
package cn.edu.bjtu.auc.task;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import cn.edu.bjtu.auc.CollectTask;
import cn.edu.bjtu.auc.StudentInfo;
import cn.edu.bjtu.auc.task.service.PurdueService;
/**
* @author QiaoJian
*
*/
public class PurdueTask extends CollectTask {
PurdueService service;
/**
*
*/
public PurdueTask() {
// TODO Auto-generated constructor stub
}
/**
* @param taskName
*/
public PurdueTask(String taskName) {
super(taskName);
// TODO Auto-generated constructor stub
}
/* (non-Javadoc)
* @see cn.edu.bjtu.auc.CollectTask#collect(java.lang.String)
*/
@Override
public void collect(String lastName) {
// TODO Auto-generated method stub
restConnectioner();
infos = new ArrayList<StudentInfo>();
String url = "http://www.itap.purdue.edu/directory/";
params = new HashMap<String, String>();
params.put("searchType", "student");
params.put("search", lastName);
this.doPostVistor(url);
if(service.isToManyResult()){
collectInfos(lastName+" ");
}else{
List<StudentInfo> list = service.collecte(lastName);
if(list!=null&&list.size()>0)
infos.addAll(list);
}
writeToExcel(lastName);
}
public void collectInfos(String queryStr){
restConnectioner();
for(String let:letter){
String url = "http://www.itap.purdue.edu/directory/";
params = new HashMap<String, String>();
params.put("searchType", "student");
params.put("search", queryStr+let);
doPostVistor(url);
if(service.isToManyResult()){
collectInfos(queryStr+let);
}else{
List<StudentInfo> list = service.collecte(queryStr+let);
if(list!=null&&list.size()>0)
infos.addAll(list);
}
}
}
/* (non-Javadoc)
* @see cn.edu.bjtu.auc.CollectTask#init()
*/
@Override
public void init() {
// TODO Auto-generated method stub
initConnectioner();
commoneHeader = connectioner.createCommonHeader();
commoneHeader.put("Host", "www.itap.purdue.edu");
service = new PurdueService();
baseService = service;
}
}
|
[
"3qwasd@163.com"
] |
3qwasd@163.com
|
4f81148f1113fc8d6644293bc940f60e8ceccf71
|
cd0bd4b251a98646f086f27687402a1c8042fdbc
|
/shop/src/main/java/vip/hht/controller/LoginController.java
|
adb4dbf3a1e27f99b097be280a1372829b0f1fa9
|
[] |
no_license
|
huanghetang/eclipse_workspace
|
4bd76d339ba1878a084f595bb0832e7987954db7
|
a89dc12d021ab55810e86016050829a0103adde1
|
refs/heads/master
| 2020-03-26T11:04:10.524462
| 2018-08-15T08:40:42
| 2018-08-15T08:40:42
| 144,826,607
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,358
|
java
|
package vip.hht.controller;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import vip.hht.beans.QueryVo;
import vip.hht.beans.User;
import vip.hht.service.UserService;
@Controller
public class LoginController {
@Autowired
private UserService userServiceImpl;
/**
* 跳转登陆
* @return
*/
/* @RequestMapping("/login")
public String toLogin(){
return "login";
}*/
/**
* 更换验证码
* @param request
* @param response
* @throws IOException
*/
@RequestMapping("/checkCode")
public void checkCode(HttpServletRequest request,HttpServletResponse response) throws IOException{
// 创建画布
int width = 120;
int height = 40;
BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// 获得画笔
Graphics g = bufferedImage.getGraphics();
// 填充背景颜色
g.setColor(Color.white);
g.fillRect(0, 0, width, height);
// 绘制边框
g.setColor(Color.red);
g.drawRect(0, 0, width - 1, height - 1);
// 生成随机字符
// 准备数据
String data = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
// 准备随机对象
Random r = new Random();
// 声明一个变量 保存验证码
String code = "";
// 书写4个随机字符
for (int i = 0; i < 4; i++) {
// 设置字体
g.setFont(new Font("宋体", Font.BOLD, 28));
// 设置随机颜色
g.setColor(new Color(r.nextInt(255), r.nextInt(255), r.nextInt(255)));
String str = data.charAt(r.nextInt(data.length())) + "";
g.drawString(str, 10 + i * 28, 30);
// 将新的字符 保存到验证码中
code = code + str;
}
// 绘制干扰线
for (int i = 0; i < 6; i++) {
// 设置随机颜色
g.setColor(new Color(r.nextInt(255), r.nextInt(255), r.nextInt(255)));
g.drawLine(r.nextInt(width), r.nextInt(height), r.nextInt(width), r.nextInt(height));
}
// 将验证码 打印到控制台
System.out.println(code);
// 将验证码放到session中
request.getSession().setAttribute("code_session", code);
// 将画布显示在浏览器中
ImageIO.write(bufferedImage, "jpg", response.getOutputStream());
}
/**
* 登陆
* @throws IOException
*/
@RequestMapping("/doLogin")
public String doLogin(QueryVo vo,HttpServletResponse response,HttpServletRequest request,Model model) throws IOException{
//查看验证码对不对
String yzm = (String)request.getSession().getAttribute("code_session");
if(yzm!=null && yzm.equalsIgnoreCase(vo.getCheckCode())){//对
User u = userServiceImpl.findUserWhenLogin(vo);
if(u!=null){//登陆成功
//记住用户名
if("on".equals(vo.getRember())){
// String encodeValue = URLEncoder.encode("我", "utf-8");
Cookie cookie = new Cookie("username",u.getEmail());
cookie.setMaxAge(60*60*24*7);
response.addCookie(cookie);
}else{//清除用客户端cookie用户名
Cookie cookie = new Cookie("username","");
cookie.setMaxAge(0);
response.addCookie(cookie);
}
//加入数据
// model.addAttribute("user", u);
request.getSession().setAttribute("user", u);
//返回主页
return "index";
}
}
model.addAttribute("msg","验证码错误");
//登陆失败,返回主页
return "login";
}
/**
* 注销
*/
@RequestMapping("/loginout")
public String loginout(HttpSession session){
session.invalidate();
//清空user
return "login";
}
/**
* 页面跳转
*/
@RequestMapping("/{path}")
public String login(@PathVariable String path,HttpSession session){
//已登陆可以跳转
User user = (User)session.getAttribute("user");
if(user!=null){
return path;
}
//没有登陆,跳转到登陆
return "login";
}
}
|
[
"1278699240@qq.com"
] |
1278699240@qq.com
|
a0fce903a3e7c2b68c567389550efc39fe417257
|
d31d744f62c09cb298022f42bcaf9de03ad9791c
|
/java/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/IgammaGradA.java
|
e57b8d886e136fa08ae525fbdc0f835dc7ecb040
|
[] |
no_license
|
yuhuofei/TensorFlow-1
|
b2085cb5c061aefe97e2e8f324b01d7d8e3f04a0
|
36eb6994d36674604973a06159e73187087f51c6
|
refs/heads/master
| 2023-02-22T13:57:28.886086
| 2021-01-26T14:18:18
| 2021-01-26T14:18:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,361
|
java
|
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
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.
=======================================================================*/
// This class has been generated, DO NOT EDIT!
package org.tensorflow.op.math;
import org.tensorflow.Operand;
import org.tensorflow.Operation;
import org.tensorflow.OperationBuilder;
import org.tensorflow.Output;
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.family.TNumber;
import org.tensorflow.types.family.TType;
/**
* Computes the gradient of `igamma(a, x)` wrt `a`.
*
* @param <T> data type for {@code z()} output
*/
public final class IgammaGradA<T extends TNumber> extends RawOp implements Operand<T> {
/**
* Factory method to create a class wrapping a new IgammaGradA operation.
*
* @param scope current scope
* @param a
* @param x
* @return a new instance of IgammaGradA
*/
@Endpoint(describeByClass = true)
public static <T extends TNumber> IgammaGradA<T> create(Scope scope, Operand<T> a, Operand<T> x) {
OperationBuilder opBuilder = scope.env().opBuilder("IgammaGradA", scope.makeOpName("IgammaGradA"));
opBuilder.addInput(a.asOutput());
opBuilder.addInput(x.asOutput());
opBuilder = scope.applyControlDependencies(opBuilder);
return new IgammaGradA<T>(opBuilder.build());
}
/**
*/
public Output<T> z() {
return z;
}
@Override
public Output<T> asOutput() {
return z;
}
/** The name of this op, as known by TensorFlow core engine */
public static final String OP_NAME = "IgammaGradA";
private Output<T> z;
private IgammaGradA(Operation operation) {
super(operation);
int outputIdx = 0;
z = operation.output(outputIdx++);
}
}
|
[
"nateweiler84@gmail.com"
] |
nateweiler84@gmail.com
|
ddbfb3d681b2ae10a7e5c05c2169890379408898
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_a1449d7f75df3733dc0d6e8f5b8cdada93f69a10/DiffTest/8_a1449d7f75df3733dc0d6e8f5b8cdada93f69a10_DiffTest_t.java
|
7604276c667fab1e62b1bad07845a6e24a64e2c8
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,231
|
java
|
package at.rovo.test;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import at.rovo.UrlReader;
import at.rovo.parser.ParseResult;
import at.rovo.parser.Parser;
import at.rovo.parser.Token;
import at.rovo.diff.Results;
import at.rovo.diff.Snake;
/**
* <p>
* This class simple compares two HTML files and prints the differences in both
* files to the console where a line starting with <em>D</em> marks a deletion
* of a token (HTML tag or word) from the first file and a line starting with
* <em>I</em> marks an insertion of a token from the second file at this
* position.
* </p>
*
* @author Roman Vottner
*/
public class DiffTest
{
/**
* <p>
* Entrance point to the application. Reads in two files (
* <em>testPattern1.html</em> and <em>testPattern2.html</em>) from the
* resource directory the test-classpath is pointing to and compares these
* two files with each other and calls
* {@link #printDifferences(Results, List)} to print the differences of both
* files to the console.
* </p>
*
* @param args
* Some arguments passed to the application. Note that this
* example application does not check for any passed parameters
* @throws Exception
* Thrown if either an error is thrown while trying to read one
* of the files to compare or while comparing those files
*/
public static void main(String[] args) throws Exception
{
String[] pages = new String[]
{
"testPattern1.html",
"testPattern2.html"
};
List<Token[]> patterns = new ArrayList<Token[]>();
for (String pattern : pages)
{
URL url = DiffTest.class.getResource("/" + pattern);
String html = readFile(url.toURI().getPath());
Parser parser = new Parser();
ParseResult res = parser.tokenize(html, false);
List<Token> p = res.getParsedTokens();
Token[] tmp = new Token[0];
patterns.add(p.toArray(tmp));
}
Results<Token> res;
// res = at.rovo.diff.GreedyDiff.Compare(patterns.get(0),patterns.get(1), false);
res = at.rovo.diff.LinearDiff.Compare(patterns.get(0),patterns.get(1));
if (res.getSnakes() != null)
{
printDifferences(res, patterns);
}
else
System.out.println("No snakes found!");
}
/**
* <p>
* Prints the differences of two compared files to the console where lines
* starting with <em>D</em> mark a deletion of a token from the first file
* while lines starting with <em>I</em> indicate an insertion of a token
* from the second file at this position.
* </p>
*
* @param res
* The result returned by the comparison algorithm
* @param patterns
* The source files which got compared with each other
*/
private static void printDifferences(Results<Token> res,
List<Token[]> patterns)
{
for (Snake<Token> snake : res.getSnakes())
{
// X is the position in the first file
int Xstart = snake.getStartPoint().X();
int Xend = snake.getEndPoint().X();
if (!snake.IsForward)
{
int tmp = Xstart;
Xstart = Xend;
Xend = tmp;
}
// Y is the position in the second file
int Ystart = snake.getStartPoint().Y();
int Yend = snake.getEndPoint().Y();
if (!snake.IsForward)
{
int tmp = Ystart;
Ystart = Yend;
Yend = tmp;
}
// System.out.println("X.start "+ snake.getStartPoint().X()
// +" Y.start "+ snake.getStartPoint().Y()
// +" X.end "+snake.getEndPoint().X()
// +" Y.end "+snake.getEndPoint().Y()
// +" X.mid "+snake.getMidPoint().X()
// +" Y.mid "+snake.getMidPoint().Y());
// System.out.println(snake);
if (snake.IsForward)
{
// tokens that got deleted from the first file
if (snake.ADeleted > 0)
{
for (int pos = Xstart; pos < Xend - snake.DiagonalLength; pos++)
{
System.out.println("D: " + patterns.get(0)[pos]);
}
}
// tokens that got inserted from the second file
if (snake.BInserted > 0)
{
for (int pos = Ystart; pos < Yend - snake.DiagonalLength; pos++)
{
System.out.println("I: " + patterns.get(1)[pos]);
}
}
// tokens that are equal in both files
if (snake.DiagonalLength > 0)
{
for (int pos = Xstart + snake.ADeleted; pos < Xend; pos++)
{
System.out.print(patterns.get(0)[pos] + " ");
}
System.out.println();
}
}
else
{
// tokens that are equal in both files
if (snake.DiagonalLength > 0)
{
for (int pos = Xstart; pos < Xend - snake.ADeleted; pos++)
{
System.out.print(patterns.get(0)[pos] + " ");
}
System.out.println();
}
// tokens that got deleted from the first file
if (snake.ADeleted > 0)
{
for (int pos = Xstart + snake.DiagonalLength; pos < Xend; pos++)
{
System.out.println("D: " + patterns.get(0)[pos]);
}
}
// tokens that got inserted from the second file
if (snake.BInserted > 0)
{
for (int pos = Ystart + snake.DiagonalLength; pos < Yend; pos++)
{
System.out.println("I: " + patterns.get(1)[pos]);
}
}
}
}
}
/**
* <p>Reads a file and stores its content in a {@link String} so it can
* be processed.</p>
*
* @param file The file to read
* @return The fully read file stored in a {@link String}
* @throws IOException If an error occurs while reading the file
*/
private static String readFile(String file) throws IOException
{
System.out.print("Reading file '" + file + "'");
if (file.startsWith("http://"))
return new UrlReader().readPage(file);
String result = null;
BufferedReader br = new BufferedReader(new FileReader(file));
try
{
StringBuilder sb = new StringBuilder();
String line = br.readLine();
while (line != null)
{
sb.append(line);
sb.append("\n");
line = br.readLine();
}
result = sb.toString();
}
finally
{
br.close();
}
System.out.println(" ... DONE");
return result;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
758c12cdd67aa86f22ad25fa723798add4d7cae4
|
5c77c9a68236776be1a9be846fd7f9094e50667b
|
/shop/com/enation/app/shop/core/tag/member/MemberInfoTag.java
|
057f19dfd91f85dfa0c1daf111d06ab7a2bc11c4
|
[] |
no_license
|
xizil/javamall
|
1f9c0f7f917b2c758a0854ce9c1b0270f9f56bde
|
86aa53892f164aafcdd985be5da36411518d0b90
|
refs/heads/master
| 2021-01-12T08:02:55.259646
| 2016-12-06T01:59:57
| 2016-12-06T01:59:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,364
|
java
|
package com.enation.app.shop.core.tag.member;
import java.util.Map;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.enation.app.base.core.model.Member;
import com.enation.app.base.core.service.IMemberManager;
import com.enation.eop.sdk.context.UserConext;
import com.enation.framework.taglib.BaseFreeMarkerTag;
import freemarker.template.TemplateModelException;
/**
* 会员信息标签
* 返回当前的会员,如果没有登录返回null
* @author kingapex
*2013-8-1下午3:24:08
*/
@Component
@Scope("prototype")
public class MemberInfoTag extends BaseFreeMarkerTag {
private IMemberManager memberManager;
/**
* 会员详细标签
* @param 无
* @return 返回当前会员,Member型
* 如果未登录,返回null
* {@link Member}
*/
@SuppressWarnings("rawtypes")
@Override
protected Object exec(Map params) throws TemplateModelException {
Member member = UserConext.getCurrentMember();
if(member==null){
throw new TemplateModelException("未登录不能使用此标签[MemberInfoTag]");
}else{
return member;
// return this.memberManager.get(member.getMember_id());
}
}
public IMemberManager getMemberManager() {
return memberManager;
}
public void setMemberManager(IMemberManager memberManager) {
this.memberManager = memberManager;
}
}
|
[
"hemes1314@163.com"
] |
hemes1314@163.com
|
dd49fb362516a4f4b0d24179422fb349b81b84ee
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/LANG-44b-1-16-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang/NumberUtils_ESTest.java
|
e5066b1eaa80e497c5ebeec0b8cfae1886f62ef7
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 552
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 06:58:40 UTC 2020
*/
package org.apache.commons.lang;
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 NumberUtils_ESTest extends NumberUtils_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a858d46c35e3e7629dc0dee438bd7e754e5dd8c5
|
9aaec9a8d7631f6c04ce8037e0fcb593e71fc0ca
|
/util/src/main/java/com/hsbank/util/android/fragment/util/BaseFragment.java
|
8d0ddc9585b30123503752f5d8936021a737040f
|
[] |
no_license
|
hanpenghu/luxclub_android
|
7a43cd0c09035092883d1ddcdecc7e30b5134c6a
|
ae26af55c865d1178dd2dabafca018099e800048
|
refs/heads/master
| 2020-03-09T00:51:04.690255
| 2018-04-07T05:12:45
| 2018-04-07T05:12:45
| 128,498,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,100
|
java
|
package com.hsbank.util.android.fragment.util;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.hsbank.util.android.util.helper.ViewFindHelper;
import com.hsbank.util.project.util.BaseProjectEvent;
import com.trello.rxlifecycle.components.support.RxFragment;
import de.greenrobot.event.EventBus;
/**
* 基础Fragment
* @author Arthur.Xie
* 2016-01-24
*/
public abstract class BaseFragment extends RxFragment {
/**视图辅助类*/
protected ViewFindHelper mViewHelper;
/**当前类的Activity的上下文对象,为了简化书写*/
protected Context mContext;
@Override
public void onAttach(Context context) {
super.onAttach(context);
mContext = context;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(this.getClass().getName(), "................" + this.getClass().getName() + "..................");
//注册EventBus
EventBus.getDefault().register(this);
}
/**
* EventBus消息处理器
* 注意:此方法必须以onEvent开头的、非静态的、public权限,否则打包后会出现崩溃
* @param event 事件
*/
public void onEventMainThread(BaseProjectEvent event) {
}
@Override
public void onDestroy() {
super.onDestroy();
//注销EventBus
EventBus.getDefault().unregister(this);
//垃圾回收
System.gc();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mViewHelper = new ViewFindHelper(inflater, container, getLayoutId());
return mViewHelper.getContentView();
}
/**
* 得到布局文件Id
* @return 布局文件Id
*/
protected abstract int getLayoutId();
@Override
public void onPause() {
super.onPause();
//页面跳转时候取消Toast对象的显示
// AlertUtil.getInstance().cancel();
}
@Override
public void onStop() {
super.onStop();
//页面跳转时候取消Toast对象的显示
// AlertUtil.getInstance().cancel();
}
}
|
[
"563909408@qq.com"
] |
563909408@qq.com
|
bc0def936f3a7605fd10bc8e2db705058ed06620
|
9a921cbc0f28633ad4fca9d8ec4107b718739c88
|
/src/org/benf/cfr/reader/util/bytestream/OffsetBackedByteData.java
|
31cd6da0b7df1a8829db4309b5fb88284d733d6c
|
[] |
no_license
|
OndraZizka/CFR-decompiler
|
7a4aebd6e5a4f6a0d4a6672740b3bdc08c5ade2f
|
872571f535ff396e52271e1a3cfaf7175960d0f6
|
refs/heads/master
| 2021-01-19T06:58:18.317704
| 2014-05-10T00:45:20
| 2014-05-10T00:45:20
| 19,629,858
| 8
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,516
|
java
|
/*
* Decompiled with CFR 0_78.
*/
package org.benf.cfr.reader.util.bytestream;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.InputStream;
import org.benf.cfr.reader.util.bytestream.AbstractBackedByteData;
import org.benf.cfr.reader.util.bytestream.ByteData;
import org.benf.cfr.reader.util.bytestream.OffsettingBackedByteData;
import org.benf.cfr.reader.util.bytestream.OffsettingByteData;
public class OffsetBackedByteData
extends AbstractBackedByteData {
final int offset;
final byte[] data;
public OffsetBackedByteData(byte[] data, long offset) {
this.offset = (int)offset;
this.data = data;
}
@Override
public DataInputStream rawDataAsStream(int start, int len) {
return new DataInputStream(new ByteArrayInputStream(this.data, start + this.offset, len));
}
@Override
public ByteData getOffsetData(long offset) {
return new OffsetBackedByteData(this.data, (long)this.offset + offset);
}
@Override
public OffsettingByteData getOffsettingOffsetData(long offset) {
return new OffsettingBackedByteData(this.data, (long)this.offset + offset);
}
@Override
public byte getS1At(long o) {
return this.data[(int)((long)this.offset + o)];
}
@Override
public byte[] getBytesAt(int count, long offset) {
byte[] res = new byte[count];
System.arraycopy(this.data, (int)((long)this.offset + offset), res, 0, count);
return res;
}
}
|
[
"zizka@seznam.cz"
] |
zizka@seznam.cz
|
d1b81549d3925565db89a90a2e01bc86ad5fff0a
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/org/apache/flink/configuration/description/DescriptionHtmlTest.java
|
b9a701e75585cae3e563eb716db60e4d63776ca8
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 3,843
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.configuration.description;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests for {@link Description} and formatting with {@link HtmlFormatter}.
*/
public class DescriptionHtmlTest {
@Test
public void testDescriptionWithLink() {
Description description = Description.builder().text("This is a text with a link %s", LinkElement.link("https://somepage", "to here")).build();
String formattedDescription = new HtmlFormatter().format(description);
Assert.assertEquals(("This is a text with a link <a href=\"https://somepage\">" + "to here</a>"), formattedDescription);
}
@Test
public void testDescriptionWithPercents() {
Description description = Description.builder().text("This is a text that has some percentage value of 20%.").build();
String formattedDescription = new HtmlFormatter().format(description);
Assert.assertEquals("This is a text that has some percentage value of 20%.", formattedDescription);
}
@Test
public void testDescriptionWithMultipleLinks() {
Description description = Description.builder().text("This is a text with a link %s and another %s", LinkElement.link("https://somepage", "to here"), LinkElement.link("https://link")).build();
String formattedDescription = new HtmlFormatter().format(description);
Assert.assertEquals(("This is a text with a link <a href=\"https://somepage\">to here</a> and another " + "<a href=\"https://link\">https://link</a>"), formattedDescription);
}
@Test
public void testDescriptionWithList() {
Description description = Description.builder().text("This is some list: ").list(LinkElement.link("http://first_link"), TextElement.text("this is second element of list with a %s", LinkElement.link("https://link"))).build();
String formattedDescription = new HtmlFormatter().format(description);
Assert.assertEquals(("This is some list: <ul><li><a href=\"http://first_link\">http://first_link" + ("</a></li><li>this is second element of list " + "with a <a href=\"https://link\">https://link</a></li></ul>")), formattedDescription);
}
@Test
public void testDescriptionWithLineBreak() {
Description description = Description.builder().text("This is first line.").linebreak().text("This is second line.").build();
String formattedDescription = new HtmlFormatter().format(description);
Assert.assertEquals("This is first line.<br />This is second line.", formattedDescription);
}
@Test
public void testDescriptionWithListAndEscaping() {
Description description = Description.builder().text("This is some list: ").list(TextElement.text("this is first element with illegal character '>' and '<'")).build();
String formattedDescription = new HtmlFormatter().format(description);
Assert.assertEquals("This is some list: <ul><li>this is first element with illegal character '>' and '<'</li></ul>", formattedDescription);
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
5abdcb8111f050627500f3733a418dd7bb68ed2a
|
6545d7ce0c976ccf9949a393ac5fde2f2738475b
|
/src/main/java/cwl/ekkel/c21/E1.java
|
06018621fa2cefeb4d5ac449f42be6637d09f36a
|
[] |
no_license
|
barba-dorada/ekkel2015
|
2c06b8cf1370fd00515d015e891b117dbad7ad32
|
23a4ebe866f9b703a3c0ae2c618d7179888ccb65
|
refs/heads/master
| 2021-01-01T06:47:25.644960
| 2017-07-17T20:22:35
| 2017-07-17T20:22:35
| 97,513,504
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 624
|
java
|
package cwl.ekkel.c21;
/**
* Created by vadim.tishenko
* on 17.07.2017 22:28.
*/
public class E1 implements Runnable {
int id = 0;
static int count = 0;
public E1() {
id = count++;
}
public static void main(String[] args) {
System.out.println("app start");
for (int i = 0; i < 5; i++) {
Thread t = new Thread(new E1());
t.start();
}
System.out.println("app finish");
}
public void run() {
for (int c = 0; c < 10; c++) {
System.out.printf("#%d(%d) ", id, c);
Thread.yield();
}
}
}
|
[
"vad.tishenko@gmail.com"
] |
vad.tishenko@gmail.com
|
894fbd5288622f3afb26dd6ce320a5db906d7939
|
c9645bff7b73eaed47b1c9ad5b49797781de57a6
|
/org.openntf.base.jaxb.dxl/src/org/openntf/base/jaxb/dxl/Filedata.java
|
4325494754750bb580b47b6fca91cffc09671108
|
[
"Apache-2.0"
] |
permissive
|
guedeWebGate/org.openntf.base
|
2f3fb577ac34aab6d5f9a96ba23dd7e5741233a5
|
8284fb0a4ac2e7fe59f5f46b039b477fe92a6e7c
|
refs/heads/master
| 2021-01-19T18:30:23.039969
| 2014-12-30T12:15:51
| 2014-12-30T12:15:51
| 28,329,673
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,582
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.12.23 at 02:06:11 PM CET
//
package org.openntf.base.jaxb.dxl;
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 filedata complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="filedata">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "filedata", namespace = "http://www.lotus.com/dxl", propOrder = {
"value"
})
public class Filedata {
@XmlValue
protected byte[] value;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* byte[]
*/
public void setValue(byte[] value) {
this.value = ((byte[]) value);
}
}
|
[
"christian.guedemann@webgate.biz"
] |
christian.guedemann@webgate.biz
|
e9625ac9c83cc72fd711577848b8edc6fabf505e
|
b74231a4dc139899a4de2faa7abdabbf817069bb
|
/src/main/java/ameba/captcha/text/renderer/WordRenderer.java
|
5dd9532477d5ef59783845f10cb56a62ca07dd69
|
[
"MIT"
] |
permissive
|
icode/ameba-utils
|
0a63cd57afd0aa60241be6a5de8e1d190536fef1
|
1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35
|
refs/heads/master
| 2020-12-24T06:20:13.571532
| 2016-12-13T01:24:02
| 2016-12-13T01:24:02
| 22,682,941
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 505
|
java
|
package ameba.captcha.text.renderer;
import java.awt.image.BufferedImage;
/**
* Render the answer for the CAPTCHA onto the image.
*
* @author <a href="mailto:james.childers@gmail.com">James Childers</a>
* request
*/
public interface WordRenderer {
/**
* Render a word to a BufferedImage.
*
* @param word The sequence of characters to be rendered.
* @param image The image onto which the word will be rendered.
*/
void render(String word, BufferedImage image);
}
|
[
"intelligentcodemail@gmail.com"
] |
intelligentcodemail@gmail.com
|
4678331d36f45d32dc1fd04a9c7ca9ce56cfc23c
|
9af5abe79a9d2d38b2d6d34c4d821a07935e3339
|
/src/main/java/com/phonemetra/turbo/compute/ComputeTaskSessionFullSupport.java
|
0aea62345990128f9706cc9eb6ea59e37d96c9e3
|
[
"Apache-2.0"
] |
permissive
|
Global-localhost/TurboSQL
|
a66b70a8fdb4cd67642dda0dad132986f2b9165c
|
10dd81a36a0e25b1f786e366eb3ed9af0e5e325b
|
refs/heads/master
| 2022-12-17T05:48:16.652086
| 2019-04-16T23:02:00
| 2019-04-16T23:02:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,094
|
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 com.phonemetra.turbo.compute;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.Map;
/**
* Annotation for enabling task session attributes and checkpoints for tasks.
* <p>
* Use this annotation when planning to use checkpoints or task session attributes API to
* distribute session attributes between jobs.
* <p>
* By default attributes and checkpoints are disabled for performance reasons.
* @see ComputeTaskSession
* @see ComputeTaskSession#setAttribute(Object, Object)
* @see ComputeTaskSession#setAttributes(Map)
* @see ComputeTaskSession#addAttributeListener(ComputeTaskSessionAttributeListener, boolean)
* @see ComputeTaskSession#saveCheckpoint(String, Object)
* @see ComputeTaskSession#saveCheckpoint(String, Object, ComputeTaskSessionScope, long)
* @see ComputeTaskSession#saveCheckpoint(String, Object, ComputeTaskSessionScope, long, boolean)
* @see ComputeTaskSession#loadCheckpoint(String)
* @see ComputeTaskSession#removeCheckpoint(String)
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface ComputeTaskSessionFullSupport {
// No-op.
}
|
[
"devteam@phonemetra.com"
] |
devteam@phonemetra.com
|
72368d1c55ab3bae516cf2f9242698b4aed8a789
|
03513b58b6b98a89bba6223bd41626db147af254
|
/src/l1j/server/server/serverpackets/S_Elixir.java
|
f0f588ecbe146b61117f96f3e81a6a14a8d8c84e
|
[] |
no_license
|
damageDown/ChoLong_KOR_Gamja_0805
|
9ea1ab6e3967fc95e546e163e8bd77f211696ad0
|
43261d5dde31b41a9852d19bfb3e09e7463793e6
|
refs/heads/master
| 2021-01-11T07:07:58.571241
| 2016-10-31T10:52:22
| 2016-10-31T10:52:22
| 72,427,743
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 450
|
java
|
package l1j.server.server.serverpackets;
import l1j.server.server.Opcodes;
public class S_Elixir extends ServerBasePacket {
public static final int Elixir = 0xe9;
public S_Elixir(int type, int stat) {
writeC(Opcodes.S_EXTENDED_PROTOBUF);
writeC(type);
writeC(0x01);
switch (type) {
case Elixir:
writeC(0x08);
writeC(stat);
writeH(0);
break;
}
}
@Override
public byte[] getContent() {
return getBytes();
}
}
|
[
"noorygo@gmail.com"
] |
noorygo@gmail.com
|
df6619e5d2eda28a5c2274a3a989f0e117588486
|
abe16d0ba344a67354718c7324e1ddac43efd373
|
/dahua-design/src/main/java/ch14/Purchase.java
|
3c682d923ecf2351490a458a441220bb5f6dac9c
|
[] |
no_license
|
gerrywen/java-learn
|
9888ccdf04aff50e4d8e5902c03e13c64dbf65b8
|
a3ed4ab50af0c2bf305eda04730f7f2db326a141
|
refs/heads/master
| 2022-12-24T18:14:07.724295
| 2020-06-15T08:30:49
| 2020-06-15T08:30:49
| 203,317,957
| 0
| 0
| null | 2022-12-15T23:58:26
| 2019-08-20T06:56:17
|
Java
|
UTF-8
|
Java
| false
| false
| 864
|
java
|
package ch14;
/**
* program: java-learn->Purchase
* description:
* author: gerry
* created: 2020-03-21 15:24
**/
public class Purchase {
//采购IBM电脑
public void buyIBMcomputer(int number) {
//访问库存
Stock stock = new Stock();
//访问销售
Sale sale = new Sale();
//电脑的销售情况
int saleStatus = sale.getSaleStatus();
if (saleStatus > 80) {//销售情况良好
System.out.println("采购IBM电脑:" + number + "台");
stock.increase(number);
} else {//销售情况不好
int buyNumber = number / 2; //折半采购
System.out.println("采购IBM电脑:" + buyNumber + "台");
}
}
//不再采购IBM电脑
public void refuseBuyIBM() {
System.out.println("不再采购IBM电脑");
}
}
|
[
"blog@gerrywen.com"
] |
blog@gerrywen.com
|
1422f662d1fb4c65cf4f375964096a109aceb3ca
|
35b3787701004674c3ab5d4c0caee560b5125fa0
|
/starters/spring-rest/src/main/java/com/example/springrest/SpringRestApplication.java
|
f8541b6df27b8e867a930a4308e6b562994521d0
|
[] |
no_license
|
nguyenshana/cmpe172
|
e33d62b801e6263419807deefd445cfd3a909f06
|
b6be61680550b0f3cd4837d30bed762cc87fc213
|
refs/heads/main
| 2023-08-16T15:54:04.585354
| 2021-10-05T04:00:08
| 2021-10-05T04:00:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 323
|
java
|
package com.example.springrest;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringRestApplication {
public static void main(String[] args) {
SpringApplication.run(SpringRestApplication.class, args);
}
}
|
[
"paul.nguyen@sjsu.edu"
] |
paul.nguyen@sjsu.edu
|
89851b37fd3fd1d78bc1d3ef3c567c785d8e455b
|
d00958862bdeab0de6eafb29625be92ca5fda62e
|
/src/sorting/practice/SelectionSort.java
|
97a7713bf36ac37a243fa571603b5f4c6ba6cf84
|
[] |
no_license
|
mrashmi791/Practice_Program
|
9b556fb8014cd579d28252575c5809e2cae7a71f
|
866180429b00d1e337df48eafeac86b17a7b3ccb
|
refs/heads/master
| 2022-06-30T20:41:42.936447
| 2020-05-13T10:03:22
| 2020-05-13T10:03:22
| 243,255,292
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package sorting.practice;
import java.util.Scanner;
public class SelectionSort {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int arr[] = new int[n];
for(int i = 0;i < n ; i++) {
arr[i] = sc.nextInt();
}
for(int i = 0;i < n-1; i++) {
int min = i;
for(int j = i+1 ; j < n ; j++) {
if(arr[j] < arr[min]) {
min = j;
}
}
int temp = arr[i];
arr[i] = arr[min];
arr[min] = temp;
}
for(int x : arr) {
System.out.print(x +" ");
}
}
}
|
[
"mrashmi791@gmail.com"
] |
mrashmi791@gmail.com
|
dea3b37e0a456e0b3691a5a9cadb48305b2ff6fc
|
c3fd5e06226d5fe3d15548313cec5dc783d1d306
|
/tags/1.6.0/jbidibc/src/main/java/org/bidib/jbidibc/VendorData.java
|
9f94cae645dab52b96f8545cedd54c512ed2098f
|
[] |
no_license
|
svn2github/jbidibc
|
37917bead3721f0781bedf267afa0c71f7ab7975
|
12184930eaa7af18c38dc83dccad2f8d330bcf06
|
refs/heads/master
| 2021-01-13T02:03:00.163181
| 2015-01-18T14:45:10
| 2015-01-18T14:45:10
| 20,271,028
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 499
|
java
|
package org.bidib.jbidibc;
public class VendorData {
private String name;
private String value;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String toString() {
return getClass().getSimpleName() + "[name=" + name + ",value=" + value + "]";
}
}
|
[
"akuhtz@87107999-b52a-42af-a34b-1e85ba8a0939"
] |
akuhtz@87107999-b52a-42af-a34b-1e85ba8a0939
|
d73e56b7f22b4601bcec1d44d072e1ed4bee8313
|
93f4ddae480d493a57fe3714eca08978303030f3
|
/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/persistence/AbstractManager.java
|
40084584e41702a6d3471042902b46870ccf3217
|
[
"Apache-2.0"
] |
permissive
|
relational-data-systems/flowable-engine
|
5f58fda07ea5a7e48c77242ffb0710d783a08142
|
beee29a3c3117212d83a8c783e0b971cf215a5ba
|
refs/heads/master
| 2021-01-22T23:27:11.427285
| 2019-04-24T01:59:33
| 2019-04-24T01:59:33
| 85,639,360
| 0
| 0
|
Apache-2.0
| 2018-09-12T01:16:28
| 2017-03-21T00:00:03
|
Java
|
UTF-8
|
Java
| false
| false
| 5,859
|
java
|
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.engine.impl.persistence;
import org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.activiti.engine.impl.context.Context;
import org.activiti.engine.impl.db.DbSqlSession;
import org.activiti.engine.impl.db.PersistentObject;
import org.activiti.engine.impl.history.HistoryManager;
import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.persistence.entity.AttachmentEntityManager;
import org.activiti.engine.impl.persistence.entity.ByteArrayEntityManager;
import org.activiti.engine.impl.persistence.entity.DeploymentEntityManager;
import org.activiti.engine.impl.persistence.entity.EventSubscriptionEntityManager;
import org.activiti.engine.impl.persistence.entity.ExecutionEntityManager;
import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntityManager;
import org.activiti.engine.impl.persistence.entity.HistoricDetailEntityManager;
import org.activiti.engine.impl.persistence.entity.HistoricIdentityLinkEntityManager;
import org.activiti.engine.impl.persistence.entity.HistoricProcessInstanceEntityManager;
import org.activiti.engine.impl.persistence.entity.HistoricTaskInstanceEntityManager;
import org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntityManager;
import org.activiti.engine.impl.persistence.entity.IdentityLinkEntityManager;
import org.activiti.engine.impl.persistence.entity.ModelEntityManager;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityManager;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionInfoEntityManager;
import org.activiti.engine.impl.persistence.entity.ResourceEntityManager;
import org.activiti.engine.impl.persistence.entity.TaskEntityManager;
import org.activiti.engine.impl.persistence.entity.VariableInstanceEntityManager;
/**
* @author Tom Baeyens
* @author Joram Barrez
*/
public abstract class AbstractManager implements Session {
public void insert(PersistentObject persistentObject) {
getDbSqlSession().insert(persistentObject);
}
public void delete(PersistentObject persistentObject) {
getDbSqlSession().delete(persistentObject);
}
protected DbSqlSession getDbSqlSession() {
return getSession(DbSqlSession.class);
}
protected <T> T getSession(Class<T> sessionClass) {
return Context.getCommandContext().getSession(sessionClass);
}
protected DeploymentEntityManager getDeploymentManager() {
return getSession(DeploymentEntityManager.class);
}
protected ResourceEntityManager getResourceManager() {
return getSession(ResourceEntityManager.class);
}
protected ByteArrayEntityManager getByteArrayManager() {
return getSession(ByteArrayEntityManager.class);
}
protected ProcessDefinitionEntityManager getProcessDefinitionManager() {
return getSession(ProcessDefinitionEntityManager.class);
}
protected ProcessDefinitionInfoEntityManager getProcessDefinitionInfoManager() {
return getSession(ProcessDefinitionInfoEntityManager.class);
}
protected ModelEntityManager getModelManager() {
return getSession(ModelEntityManager.class);
}
protected ExecutionEntityManager getProcessInstanceManager() {
return getSession(ExecutionEntityManager.class);
}
protected TaskEntityManager getTaskManager() {
return getSession(TaskEntityManager.class);
}
protected IdentityLinkEntityManager getIdentityLinkManager() {
return getSession(IdentityLinkEntityManager.class);
}
protected EventSubscriptionEntityManager getEventSubscriptionManager() {
return (getSession(EventSubscriptionEntityManager.class));
}
protected VariableInstanceEntityManager getVariableInstanceManager() {
return getSession(VariableInstanceEntityManager.class);
}
protected HistoricProcessInstanceEntityManager getHistoricProcessInstanceManager() {
return getSession(HistoricProcessInstanceEntityManager.class);
}
protected HistoricDetailEntityManager getHistoricDetailManager() {
return getSession(HistoricDetailEntityManager.class);
}
protected HistoricActivityInstanceEntityManager getHistoricActivityInstanceManager() {
return getSession(HistoricActivityInstanceEntityManager.class);
}
protected HistoricVariableInstanceEntityManager getHistoricVariableInstanceManager() {
return getSession(HistoricVariableInstanceEntityManager.class);
}
protected HistoricTaskInstanceEntityManager getHistoricTaskInstanceManager() {
return getSession(HistoricTaskInstanceEntityManager.class);
}
protected HistoricIdentityLinkEntityManager getHistoricIdentityLinkEntityManager() {
return getSession(HistoricIdentityLinkEntityManager.class);
}
protected AttachmentEntityManager getAttachmentManager() {
return getSession(AttachmentEntityManager.class);
}
protected HistoryManager getHistoryManager() {
return getSession(HistoryManager.class);
}
protected ProcessEngineConfigurationImpl getProcessEngineConfiguration() {
return Context.getProcessEngineConfiguration();
}
public void close() {
}
public void flush() {
}
}
|
[
"tijs.rademakers@gmail.com"
] |
tijs.rademakers@gmail.com
|
3023c54bc57c44c4cfe9027c8cc3e7c5f6cbfb45
|
6a922e840b33f11ab3d0f154afa0b33cff272676
|
/src/samples/pptx4j/org/pptx4j/samples/SlideFindTable.java
|
ec435c261366dad85d6cc80445110bd1e7162ba3
|
[
"Apache-2.0"
] |
permissive
|
baochanghong/docx4j
|
912fc146cb5605e6f7869c4839379a83a8b4afd8
|
4c83d8999c9396067dd583b82a6fc892469a3919
|
refs/heads/master
| 2021-01-12T15:30:26.971311
| 2016-10-20T00:44:25
| 2016-10-20T00:44:25
| 71,792,895
| 3
| 0
| null | 2016-10-24T13:39:57
| 2016-10-24T13:39:57
| null |
UTF-8
|
Java
| false
| false
| 4,096
|
java
|
/*
* Copyright 2015, Plutext Pty Ltd.
*
* This file is part of docx4j.
docx4j is 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.pptx4j.samples;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.docx4j.TraversalUtil;
import org.docx4j.TraversalUtil.CallbackImpl;
import org.docx4j.XmlUtils;
import org.docx4j.dml.CTTable;
import org.docx4j.dml.CTTableRow;
import org.docx4j.openpackaging.packages.OpcPackage;
import org.docx4j.openpackaging.packages.PresentationMLPackage;
import org.docx4j.openpackaging.parts.PartName;
import org.docx4j.openpackaging.parts.PresentationML.SlidePart;
/**
* Given a slide, find the first table, then duplicate a table row.
*
*
* @author jharrop
*
*/
public class SlideFindTable {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
String inputfilepath = System.getProperty("user.dir") + "/sample-docs/pptx/table.pptx";
PresentationMLPackage pMLPackage =
(PresentationMLPackage)OpcPackage.load(new java.io.File(inputfilepath));
SlidePart slide = (SlidePart)pMLPackage.getParts().get(new PartName("/ppt/slides/slide1.xml") );
// First, find the tables
ClassFinder dmlTableFinder = new ClassFinder(org.docx4j.dml.CTTable.class);
new TraversalUtil(slide.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame(), dmlTableFinder);
/* structure will contain:
*
org.pptx4j.pml.CTGraphicalObjectFrame
org.docx4j.dml.CTTable
org.docx4j.dml.CTTableRow
org.docx4j.dml.CTTableCell
org.docx4j.dml.CTTableCell
org.docx4j.dml.CTTableRow
org.docx4j.dml.CTTableCell
org.docx4j.dml.CTTableCell
org.docx4j.dml.CTTableRow
org.docx4j.dml.CTTableCell
org.docx4j.dml.CTTableCell
*/
if (dmlTableFinder.results.isEmpty() ) {
System.out.println(
"No org.docx4j.dml.CTTable found on this slide" );
return;
}
CTTable theTable = (CTTable)dmlTableFinder.results.get(0);
// Now copy a table row
// First, get the row to copy
CTTableRow srcRow = theTable.getTr().get(0);
// Next, copy it
CTTableRow clonedRow = XmlUtils.deepCopy(srcRow);
// Finally, insert the copy in the list
theTable.getTr().add(clonedRow); // standard Java list API
// Save the result
pMLPackage.save(new File( System.getProperty("user.dir") + "/OUT_SlideFindTable.pptx"));
}
static class ClassFinder extends CallbackImpl {
protected Class<?> typeToFind;
public ClassFinder(Class<?> typeToFind) {
this.typeToFind = typeToFind;
}
public List<Object> results = new ArrayList<Object>();
@Override
public List<Object> apply(Object o) {
// Adapt as required
if (o.getClass().equals(typeToFind)) {
results.add(o);
}
return null;
}
public List<Object> getChildren(Object o) {
if (o instanceof org.pptx4j.pml.CTGraphicalObjectFrame) {
org.docx4j.dml.Graphic graphic = ((org.pptx4j.pml.CTGraphicalObjectFrame)o).getGraphic();
if (graphic!=null
&& graphic.getGraphicData()!=null) {
return graphic.getGraphicData().getAny();
} else {
return null;
}
}
return TraversalUtil.getChildrenImpl(o);
}
}
}
|
[
"jason@plutext.org"
] |
jason@plutext.org
|
d582032c4379bb9b33a04d332f95503c9aa396dd
|
9c08c4c850131deb91fe3f8dcc8a0f5954fad707
|
/src/main/java/com/codimiracle/application/platform/huidu/mapper/NotificationMapper.java
|
dd86690194d6534c2afda37b439a90519809d340
|
[] |
no_license
|
codimiracle/huidu-backend
|
ef39a72239c6610a993e7ffff711e72cf6cb2fb2
|
2ca5740bd0ad7e8c6a757df9f45512426f2690f1
|
refs/heads/master
| 2022-08-21T21:37:23.820481
| 2020-04-22T23:12:37
| 2020-04-22T23:12:37
| 249,469,070
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 877
|
java
|
package com.codimiracle.application.platform.huidu.mapper;
import com.codimiracle.application.platform.huidu.contract.Filter;
import com.codimiracle.application.platform.huidu.contract.Mapper;
import com.codimiracle.application.platform.huidu.contract.Page;
import com.codimiracle.application.platform.huidu.contract.Sorter;
import com.codimiracle.application.platform.huidu.entity.po.Notification;
import com.codimiracle.application.platform.huidu.entity.vo.NotificationVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface NotificationMapper extends Mapper<Notification> {
List<NotificationVO> selectAllIntegrally(@Param("filter") Filter filter, @Param("sorter") Sorter sorter, @Param("page") Page page);
void deleteByIdLogically(String id);
void markAsRead(String id);
NotificationVO selectByIdIntegrally(String id);
}
|
[
"codimiracle@outlook.com"
] |
codimiracle@outlook.com
|
5972132550bd7458dcf2ae62da5f2fdf9801d452
|
471a6511c91a87111aac30d9e1d0cf44812af6a2
|
/src/main/java/org/codelibs/fess/es/bsentity/BsFileAuthentication.java
|
5b601eff7710bf11c3217b210fcd3de6ddcbdae0
|
[
"Apache-2.0"
] |
permissive
|
beavis28/fess
|
1160e8a66de4805ee235d1ce64f409f8247bf737
|
8dbc3e9b77c93fe270ff15210dfe3000cc3c9d8c
|
refs/heads/master
| 2020-12-11T07:39:26.254838
| 2015-10-11T06:51:14
| 2015-10-11T06:51:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,942
|
java
|
package org.codelibs.fess.es.bsentity;
import java.util.HashMap;
import java.util.Map;
import org.codelibs.fess.es.bsentity.dbmeta.FileAuthenticationDbm;
/**
* ${table.comment}
* @author FreeGen
*/
public class BsFileAuthentication extends AbstractEntity {
private static final long serialVersionUID = 1L;
@Override
public FileAuthenticationDbm asDBMeta() {
return FileAuthenticationDbm.getInstance();
}
@Override
public String asTableDbName() {
return "file_authentication";
}
// ===================================================================================
// Attribute
// =========
/** createdBy */
protected String createdBy;
/** createdTime */
protected Long createdTime;
/** fileConfigId */
protected String fileConfigId;
/** hostname */
protected String hostname;
/** parameters */
protected String parameters;
/** password */
protected String password;
/** port */
protected Integer port;
/** protocolScheme */
protected String protocolScheme;
/** updatedBy */
protected String updatedBy;
/** updatedTime */
protected Long updatedTime;
/** username */
protected String username;
// [Referrers] *comment only
// ===================================================================================
// Accessor
// ========
public String getCreatedBy() {
checkSpecifiedProperty("createdBy");
return createdBy;
}
public void setCreatedBy(String value) {
registerModifiedProperty("createdBy");
this.createdBy = value;
}
public Long getCreatedTime() {
checkSpecifiedProperty("createdTime");
return createdTime;
}
public void setCreatedTime(Long value) {
registerModifiedProperty("createdTime");
this.createdTime = value;
}
public String getFileConfigId() {
checkSpecifiedProperty("fileConfigId");
return fileConfigId;
}
public void setFileConfigId(String value) {
registerModifiedProperty("fileConfigId");
this.fileConfigId = value;
}
public String getHostname() {
checkSpecifiedProperty("hostname");
return hostname;
}
public void setHostname(String value) {
registerModifiedProperty("hostname");
this.hostname = value;
}
public String getId() {
checkSpecifiedProperty("id");
return asDocMeta().id();
}
public void setId(String value) {
registerModifiedProperty("id");
asDocMeta().id(value);
}
public String getParameters() {
checkSpecifiedProperty("parameters");
return parameters;
}
public void setParameters(String value) {
registerModifiedProperty("parameters");
this.parameters = value;
}
public String getPassword() {
checkSpecifiedProperty("password");
return password;
}
public void setPassword(String value) {
registerModifiedProperty("password");
this.password = value;
}
public Integer getPort() {
checkSpecifiedProperty("port");
return port;
}
public void setPort(Integer value) {
registerModifiedProperty("port");
this.port = value;
}
public String getProtocolScheme() {
checkSpecifiedProperty("protocolScheme");
return protocolScheme;
}
public void setProtocolScheme(String value) {
registerModifiedProperty("protocolScheme");
this.protocolScheme = value;
}
public String getUpdatedBy() {
checkSpecifiedProperty("updatedBy");
return updatedBy;
}
public void setUpdatedBy(String value) {
registerModifiedProperty("updatedBy");
this.updatedBy = value;
}
public Long getUpdatedTime() {
checkSpecifiedProperty("updatedTime");
return updatedTime;
}
public void setUpdatedTime(Long value) {
registerModifiedProperty("updatedTime");
this.updatedTime = value;
}
public String getUsername() {
checkSpecifiedProperty("username");
return username;
}
public void setUsername(String value) {
registerModifiedProperty("username");
this.username = value;
}
@Override
public Map<String, Object> toSource() {
Map<String, Object> sourceMap = new HashMap<>();
if (createdBy != null) {
sourceMap.put("createdBy", createdBy);
}
if (createdTime != null) {
sourceMap.put("createdTime", createdTime);
}
if (fileConfigId != null) {
sourceMap.put("fileConfigId", fileConfigId);
}
if (hostname != null) {
sourceMap.put("hostname", hostname);
}
if (asDocMeta().id() != null) {
sourceMap.put("id", asDocMeta().id());
}
if (parameters != null) {
sourceMap.put("parameters", parameters);
}
if (password != null) {
sourceMap.put("password", password);
}
if (port != null) {
sourceMap.put("port", port);
}
if (protocolScheme != null) {
sourceMap.put("protocolScheme", protocolScheme);
}
if (updatedBy != null) {
sourceMap.put("updatedBy", updatedBy);
}
if (updatedTime != null) {
sourceMap.put("updatedTime", updatedTime);
}
if (username != null) {
sourceMap.put("username", username);
}
return sourceMap;
}
}
|
[
"shinsuke@yahoo.co.jp"
] |
shinsuke@yahoo.co.jp
|
2e64d85995960551948f503ba2677dd88c587b08
|
0f22217e7eb93492221fa6f78fb7c64293604827
|
/osa02-Osa02_07.HelloPostRedirectGet/src/main/java/postredirectget/PostRedirectGetController.java
|
e440faa7f08cbeea64de7098586a9e81f59db1e3
|
[] |
no_license
|
kevin0110w/Web_Server_Programming_In_Java
|
5e30af4905932a66de0688c8d3b8976f746cd3d5
|
55188b0bd6d9bd8e7cb2c590e6ddfda69c73acbe
|
refs/heads/master
| 2022-06-07T15:01:59.888229
| 2020-05-05T20:32:30
| 2020-05-05T20:32:30
| 258,319,559
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,056
|
java
|
package postredirectget;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
public class PostRedirectGetController {
private List<String> list;
public PostRedirectGetController() {
this.list = new ArrayList<>();
}
@RequestMapping("/")
public String index(Model model) {
model.addAttribute("list", this.list);
return "index";
}
@RequestMapping (value = "/", method = RequestMethod.POST)
public String post(@RequestParam String content) {
if (!(content == null) || content.trim().isEmpty()) {
this.list.add(content);
}
return "redirect:/";
}
}
|
[
"kevin0110w@gmail.com"
] |
kevin0110w@gmail.com
|
6759ee7182b9dedf811be2f8efe54f8b766c17df
|
f563d5aedb3441a9ff872eeb4d561dfa78ecfb9c
|
/src/headfirst16/command/party/Stereo.java
|
998dee9912d5ebcefe5e144714d5b17dc028bc61
|
[] |
no_license
|
nevenchen/headfirst
|
b1e72fd976cf8b0a52b8c8e8b89ba546e0f9a771
|
d7ec8272af10226f24de0a84ce598df281503b87
|
refs/heads/master
| 2021-01-25T03:49:36.487684
| 2019-04-24T01:37:32
| 2019-04-24T01:37:32
| 7,239,898
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 770
|
java
|
package headfirst16.command.party;
public class Stereo {
String location;
public Stereo(String location) {
this.location = location;
}
public void on() {
System.out.println(location + " stereo is on");
}
public void off() {
System.out.println(location + " stereo is off");
}
public void setCD() {
System.out.println(location + " stereo is set for CD input");
}
public void setDVD() {
System.out.println(location + " stereo is set for DVD input");
}
public void setRadio() {
System.out.println(location + " stereo is set for Radio");
}
public void setVolume(int volume) {
// code to set the volume
// valid range: 1-11 (after all 11 is better than 10, right?)
System.out.println(location + " Stereo volume set to " + volume);
}
}
|
[
"neven.chen@hotmail.com"
] |
neven.chen@hotmail.com
|
a76f31367af1b4584bf01fa16ffe622831903391
|
3d4349c88a96505992277c56311e73243130c290
|
/Preparation/processed-dataset/god-class_4_925/111.java
|
5e22b29db169a714bad104b4a751a0096c79ac13
|
[] |
no_license
|
D-a-r-e-k/Code-Smells-Detection
|
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
|
079a02e5037d909114613aedceba1d5dea81c65d
|
refs/heads/master
| 2020-05-20T00:03:08.191102
| 2019-05-15T11:51:51
| 2019-05-15T11:51:51
| 185,272,690
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 166
|
java
|
/**
* Gets the classloader used to load the dynamicaly resolved
* classes.
* @since 1.4.6
*/
public ClassLoader getClassLoader() {
return classLoader;
}
|
[
"dariusb@unifysquare.com"
] |
dariusb@unifysquare.com
|
44ec710b59d3348ea2ee2c690c171045c424c80c
|
3b9f25acaf1a2a60615f0770668eca521ab5349f
|
/src/com/jaxrs/common/application/MyApplication.java
|
c17d0d0ab1ff6ef93301224d386e340fbd96a9ab
|
[] |
no_license
|
venkateshpavuluri/JaxRsContentHandlers
|
94bf4f594ba636a5c7817b345a05b47d58c9fb29
|
9013fc9da020668b8952d9cd78e0eb819b659c41
|
refs/heads/master
| 2020-03-25T06:52:25.112438
| 2018-08-08T17:56:11
| 2018-08-08T17:56:11
| 143,529,315
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 604
|
java
|
package com.jaxrs.common.application;
import java.util.HashSet;
import java.util.Set;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import com.jaxrs.resources.BillingService;
@ApplicationPath("/api")
public class MyApplication extends Application {
/*private Set<Object> singletons;
private Set<Class<?>> classes;
public MyApplication()
{
singletons=new HashSet<>();
singletons.add(new BillingService());
classes=new HashSet<>();
}
public Set<Object> getSingletons()
{
return singletons;
}
public Set<Class<?>> getClasses()
{
return classes;
}*/
}
|
[
"pavuluri.venki@gmail.com"
] |
pavuluri.venki@gmail.com
|
e5f298bc7e16e55c38be76be84312b2495b68f30
|
963599f6f1f376ba94cbb504e8b324bcce5de7a3
|
/sources/com/google/android/datatransport/runtime/dagger/internal/Beta.java
|
5ed8095da485b0412b9ec4e3a3772fda152a368a
|
[] |
no_license
|
NikiHard/cuddly-pancake
|
563718cb73fdc4b7b12c6233d9bf44f381dd6759
|
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
|
refs/heads/main
| 2023-04-09T06:58:04.403056
| 2021-04-20T00:45:08
| 2021-04-20T00:45:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package com.google.android.datatransport.runtime.dagger.internal;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Documented
@Retention(RetentionPolicy.SOURCE)
public @interface Beta {
}
|
[
"a.amirovv@mail.ru"
] |
a.amirovv@mail.ru
|
678a73eae868781d390ec77e2ebaf2f6ba3052a6
|
4f58a60cc9399f48d958590dc872ecfae431b866
|
/jcache/embedded/src/main/java/org/infinispan/jcache/embedded/functions/Remove.java
|
7b4d22cec95b761fe5801f974a901fce118d5b6b
|
[
"Apache-2.0",
"LicenseRef-scancode-dco-1.1"
] |
permissive
|
wfink/infinispan
|
528e16f1f8737886e55539b990ba93fcb8244a4a
|
04cc9fd806c820a550d3890470c00f780532fad3
|
refs/heads/master
| 2023-05-25T19:53:22.274511
| 2021-06-03T14:29:01
| 2021-06-10T09:20:27
| 254,347,412
| 2
| 0
|
Apache-2.0
| 2020-04-09T11:02:12
| 2020-04-09T11:02:11
| null |
UTF-8
|
Java
| false
| false
| 643
|
java
|
package org.infinispan.jcache.embedded.functions;
import java.util.function.Function;
import org.infinispan.functional.EntryView;
public class Remove<K, V> implements Function<EntryView.ReadWriteEntryView<K, V>, Boolean> {
private static final Remove INSTANCE = new Remove();
public static <K, V> Remove<K, V> getInstance() {
return INSTANCE;
}
@Override
public Boolean apply(EntryView.ReadWriteEntryView<K, V> view) {
boolean exists = view.peek().isPresent();
// Contrary to view.remove() this forces the remove to be persisted even if it does not exist
view.set(null);
return exists;
}
}
|
[
"gustavonalle@gmail.com"
] |
gustavonalle@gmail.com
|
6c6376c3e43a1ee7278d6a299f39a41733caa883
|
042342f9dc0e8662a1a7da671ab5dc9d82ccd835
|
/jaggery/org.eclipse.php.core/src/org/eclipse/php/internal/core/typeinference/evaluators/PrefixExpressionEvaluator.java
|
52833678646c1d784f653fa89c2f10056f91fa45
|
[
"EPL-1.0",
"Apache-2.0"
] |
permissive
|
ksdperera/developer-studio
|
6fe6d50a66e4fb73de3a4dbeef8d68b461da1ab6
|
9c0f601b91cc34dda036c660598a93c232260e08
|
refs/heads/developer-studio-3.8.0
| 2021-01-15T08:50:21.571267
| 2018-10-26T12:59:17
| 2018-10-26T12:59:17
| 39,486,894
| 0
| 1
|
Apache-2.0
| 2018-10-26T12:59:18
| 2015-07-22T05:13:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,734
|
java
|
/*******************************************************************************
* Copyright (c) 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Zend Technologies
*******************************************************************************/
package org.eclipse.php.internal.core.typeinference.evaluators;
import org.eclipse.dltk.ti.GoalState;
import org.eclipse.dltk.ti.goals.ExpressionTypeGoal;
import org.eclipse.dltk.ti.goals.GoalEvaluator;
import org.eclipse.dltk.ti.goals.IGoal;
import org.eclipse.dltk.ti.types.IEvaluatedType;
import org.eclipse.php.internal.core.compiler.ast.nodes.PrefixExpression;
public class PrefixExpressionEvaluator extends GoalEvaluator {
private IEvaluatedType result;
public PrefixExpressionEvaluator(IGoal goal) {
super(goal);
}
public IGoal[] init() {
ExpressionTypeGoal typedGoal = (ExpressionTypeGoal) goal;
PrefixExpression prefixExpression = (PrefixExpression) typedGoal
.getExpression();
// XXX: actually, we have to check the contents of the variable here,
// since for example typeof(++"abc")=string, but typeof(++"123")=integer
// ...
return new IGoal[] { new ExpressionTypeGoal(goal.getContext(),
prefixExpression.getVariable()) };
}
public IGoal[] subGoalDone(IGoal subgoal, Object result, GoalState state) {
this.result = (IEvaluatedType) result;
return IGoal.NO_GOALS;
}
public Object produceResult() {
return result;
}
}
|
[
"harshana@wso2.com"
] |
harshana@wso2.com
|
1f49a3579128b9e2863bbaa4bb1e2730068e6fdf
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_28fe30dfb61e5cddc49fc6730f9229b8701b979f/TransmissionExceptionTest/12_28fe30dfb61e5cddc49fc6730f9229b8701b979f_TransmissionExceptionTest_s.java
|
32260fb6f1c19d98295180146224deefcca1d903
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,351
|
java
|
/**
* Copyright (c) 2012 centeractive ag. All Rights Reserved.
*
* 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 com.centeractive.ws.client;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
/**
* @author Tom Bujok
* @since 1.0.0
*/
public class TransmissionExceptionTest {
@Test
public void messageFormatEmptyTest() {
TransmissionException ex = new TransmissionException("", 0, new RuntimeException());
assertEquals("", ex.getMessage());
}
@Test
public void messageFormatCodeTest() {
TransmissionException ex = new TransmissionException("", 404, new RuntimeException());
assertEquals("HTTP code = [404]; ", ex.getMessage());
}
@Test
public void messageFormatMessageTest() {
TransmissionException ex = new TransmissionException("Message", 0, new RuntimeException());
assertEquals("Message; ", ex.getMessage());
}
@Test
public void messageFormatCauseTest() {
TransmissionException ex = new TransmissionException("", 0, new RuntimeException("Cause"));
assertEquals("Possible cause: Cause;", ex.getMessage());
}
@Test
public void messageFormatFullFormatTest() {
TransmissionException ex = new TransmissionException("SOAP communication failed", 500, new RuntimeException("Internal server error"));
assertEquals("SOAP communication failed; HTTP code = [500]; Possible cause: Internal server error;", ex.getMessage());
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d0b1fc27707ee36832cae8d9b2b21837197c5e18
|
819a2656acb3ee806696c094efd0c4dbce1b7d7c
|
/3. Web/day42 Model2/src/kr/or/kosta/shoppingmall/demo/controller/TodayController.java
|
d60894af5e19146be08bf5cc0d24fff838d0772b
|
[] |
no_license
|
hojinWoo/eduagain
|
620a3cecbff576eef0af3f1a69aeea654f6fdb26
|
e72312246a00d3e65f5658a2171d6dfee074c8e8
|
refs/heads/master
| 2021-07-23T15:28:43.915751
| 2018-11-21T03:49:27
| 2018-11-21T03:49:27
| 144,929,745
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 939
|
java
|
package kr.or.kosta.shoppingmall.demo.controller;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import kr.or.kosta.shoppingmall.common.controller.Controller;
import kr.or.kosta.shoppingmall.common.controller.ModelAndView;
/**
* /hello.mall 요청에 대한 처리 클래스
* @author hojin
*/
public class TodayController implements Controller{
@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException {
// ModelAndView로 캡슐화해서 V2로 넘기기
ModelAndView mav = new ModelAndView();
Calendar calendar = Calendar.getInstance();
String today = String.format("%1$tF %1$tT", calendar);
mav.addObject("today", today);
mav.setView("/demo/today.jsp");
return mav;
}
}
|
[
"dnghwls7@ajou.ac.kr"
] |
dnghwls7@ajou.ac.kr
|
a90d7d07184b5374750c83291e9592094a94dc5e
|
890b0d9bd68aa61cb5256148f0d11990af058bb9
|
/src/main/java/io/vertx/codegen/PackageModel.java
|
f2698ea35181370e13bb70a870875e340e00db50
|
[
"Apache-2.0"
] |
permissive
|
yangyuny/vertx-codegen
|
6d00e3a1a3013045c37d73afb6a5c92cc77bc03d
|
78f7a566d722fa0acd69a0442048128fa806da16
|
refs/heads/master
| 2021-07-13T23:58:00.694882
| 2017-10-18T19:46:28
| 2017-10-18T19:46:28
| 108,489,376
| 1
| 0
| null | 2017-10-27T02:28:06
| 2017-10-27T02:28:06
| null |
UTF-8
|
Java
| false
| false
| 858
|
java
|
package io.vertx.codegen;
import javax.lang.model.element.Element;
import java.util.HashMap;
import java.util.Map;
/**
* @author <a href="mailto:julien@julienviet.com">Julien Viet</a>
*/
public class PackageModel implements Model {
private final String fqn;
private final ModuleInfo module;
public PackageModel(String fqn, ModuleInfo module) {
this.fqn = fqn;
this.module = module;
}
@Override
public String getKind() {
return "package";
}
@Override
public Element getElement() {
return null;
}
@Override
public String getFqn() {
return fqn;
}
@Override
public Map<String, Object> getVars() {
Map<String, Object> vars = Model.super.getVars();
vars.put("fqn", fqn);
vars.put("module", module);
return vars;
}
@Override
public ModuleInfo getModule() {
return module;
}
}
|
[
"julien@julienviet.com"
] |
julien@julienviet.com
|
f4bf033856ec3037b09210e334ed25f7ffd7d305
|
c470092e831a90709ffa5d8ae0030175d876c467
|
/jetpack/src/main/java/com/engineer/jetpack/model/SeekbarViewModel.java
|
89b283981232eda0d6a8e65fd66bfefa714e9e39
|
[
"Apache-2.0"
] |
permissive
|
flyingTest/My-MVP
|
df78cb427bbd690811b02f94944d10ea467edeb5
|
73e6c66e1ea1a87290f1afd3d3c16d23b05bff1f
|
refs/heads/master
| 2020-06-02T23:26:53.824357
| 2019-06-10T08:49:43
| 2019-06-10T08:49:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 311
|
java
|
package com.engineer.jetpack.model;
import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;
/**
* @author: Rookie
* @date: 2018-09-30
* @desc
*/
public class SeekbarViewModel extends ViewModel {
public MutableLiveData<Integer> seekbarValue = new MutableLiveData<>();
}
|
[
"foreverlove.zyl@163.com"
] |
foreverlove.zyl@163.com
|
b16a631ec47b7dacff12d3d3e029b6875cfca09e
|
025b06d4749d203cb00ba3370fdca792b3dfc955
|
/View/PopupWindow/PopupWindowDefine/src/main/java/com/view/popupwindow/MainActivity.java
|
e20853bd918a87e524d2c3e6054420af7a54e81c
|
[] |
no_license
|
BaeBae33/as_x_modlestudy
|
59644078b70e541a72039c9527016121e3dd253f
|
993aed7d5fce13ae92d9a6e9999adf45236a6a64
|
refs/heads/master
| 2023-02-17T11:07:02.902101
| 2021-01-15T06:22:56
| 2021-01-15T06:22:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,514
|
java
|
package com.view.popupwindow;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.view.popupwindow.activity.DeleteMenuActivity;
import com.view.popupwindow.activity.DropMenuActivity;
import com.view.popupwindow.view.TopMenuWidget;
import com.yline.test.BaseTestActivity;
import com.yline.test.StrConstant;
public class MainActivity extends BaseTestActivity {
@Override
public void testStart(View view, Bundle savedInstanceState) {
addButton("长按删除", new View.OnClickListener() {
@Override
public void onClick(View v) {
DeleteMenuActivity.launcher(MainActivity.this);
}
});
final Button secondBtn = addButton("下拉菜单", new View.OnClickListener() {
@Override
public void onClick(View v) {
DropMenuActivity.launcher(MainActivity.this);
}
});
addButton("顶部弹出", new View.OnClickListener() {
@Override
public void onClick(View v) {
TopMenuWidget menuWidget = new TopMenuWidget(MainActivity.this);
StringBuilder stringBuilder = new StringBuilder();
for (String str : StrConstant.getListRandom(20)) {
stringBuilder.append(str);
stringBuilder.append('\n');
}
menuWidget.showAsDropDown(secondBtn, stringBuilder.toString());
}
});
}
}
|
[
"957339173@qq.com"
] |
957339173@qq.com
|
e8d3eb72816f019d561d483476b78f83878bd3a1
|
145993c6190554c00c014e47338c891199a3e467
|
/asProject/XCameraAi/app/src/main/java/com/editvideo/dataInfo/CompoundCaptionInfo.java
|
df2690beb1b4574f9673eacb41b965864d382c30
|
[] |
no_license
|
cuipengpeng/codeUtil
|
d45d4f239de40fe2806011b5b7fd6238b23e940c
|
ae0bdbcf6237fa3cfb6fac724e487627ee06d1c3
|
refs/heads/master
| 2023-02-25T14:57:56.259687
| 2023-01-04T13:09:19
| 2023-02-10T16:14:10
| 126,859,505
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,005
|
java
|
package com.editvideo.dataInfo;
import android.graphics.PointF;
import java.util.ArrayList;
public class CompoundCaptionInfo {
private float m_scaleFactorX;//X缩放因子
private float m_scaleFactorY;//Y缩放因子
private PointF m_anchor;//锚点
private PointF m_translation;//字幕偏移量
private float m_rotation;//旋转角度
//组合字幕样式属性
private long m_inPoint;//字幕入点
private long m_outPoint;//字幕出点
private String m_captionStyleUuid;//字幕样式Uuid
private int m_captionZVal;//字幕Z值
private ArrayList<CompoundCaptionAttr> m_captionAttributeList;//字幕属性列表
public int getCaptionZVal() {
return m_captionZVal;
}
public void setCaptionZVal(int m_captionZVal) {
this.m_captionZVal = m_captionZVal;
}
public long getInPoint() {
return m_inPoint;
}
public void setInPoint(long inPoint) {
this.m_inPoint = inPoint;
}
public long getOutPoint() {
return m_outPoint;
}
public void setOutPoint(long outPoint) {
this.m_outPoint = outPoint;
}
public String getCaptionStyleUuid() {
return m_captionStyleUuid;
}
public void setCaptionStyleUuid(String captionStyleUuid) {
this.m_captionStyleUuid = captionStyleUuid;
}
public ArrayList<CompoundCaptionAttr> getCaptionAttributeList() {
return m_captionAttributeList;
}
public void addCaptionAttributeList(CompoundCaptionAttr captionAttribute) {
this.m_captionAttributeList.add(captionAttribute);
}
public CompoundCaptionInfo() {
m_scaleFactorX = 1.0f;
m_scaleFactorY = 1.0f;
m_anchor = null;
m_rotation = 0;
m_translation = null;
m_inPoint = 0;
m_outPoint = 0;
m_captionStyleUuid = "";
m_captionZVal = 0;
m_captionAttributeList = new ArrayList<>();
}
public void setScaleFactorX(float value) {
m_scaleFactorX = value;
}
public float getScaleFactorX() {
return m_scaleFactorX;
}
public void setScaleFactorY(float value) {
m_scaleFactorY = value;
}
public float getScaleFactorY() {
return m_scaleFactorY;
}
public void setAnchor(PointF point) {
m_anchor = point;
}
public PointF getAnchor() {
return m_anchor;
}
public void setRotation(float value) {
m_rotation = value;
}
public float getRotation() {
return m_rotation;
}
public void setTranslation(PointF point) {
m_translation = point;
}
public PointF getTranslation() {
return m_translation;
}
public CompoundCaptionInfo clone(){
CompoundCaptionInfo newCaptionInfo = new CompoundCaptionInfo();
newCaptionInfo.setAnchor(this.getAnchor());
newCaptionInfo.setRotation(this.getRotation());
newCaptionInfo.setScaleFactorX(this.getScaleFactorX());
newCaptionInfo.setScaleFactorY(this.getScaleFactorY());
newCaptionInfo.setTranslation(this.getTranslation());
//copy data
newCaptionInfo.setInPoint(this.getInPoint());
newCaptionInfo.setOutPoint(this.getOutPoint());
newCaptionInfo.setCaptionZVal(this.getCaptionZVal());
newCaptionInfo.setCaptionStyleUuid(this.getCaptionStyleUuid());
ArrayList<CompoundCaptionAttr> captionAttrList = this.getCaptionAttributeList();
if(captionAttrList != null){
int compoundAttrCount = captionAttrList.size();
for (int index = 0;index < compoundAttrCount;++index){
CompoundCaptionAttr attr=captionAttrList.get(index).clone();
newCaptionInfo.addCaptionAttributeList(attr);
}
}
return newCaptionInfo;
}
public static class CompoundCaptionAttr{
public String getCaptionFontName() {
return captionFontName;
}
public void setCaptionFontName(String captionFontName) {
this.captionFontName = captionFontName;
}
public String getCaptionColor() {
return captionColor;
}
public void setCaptionColor(String captionColor) {
this.captionColor = captionColor;
}
public String getCaptionText() {
return captionText;
}
public void setCaptionText(String captionText) {
this.captionText = captionText;
}
public CompoundCaptionAttr clone(){
CompoundCaptionAttr newACaptionAttr = new CompoundCaptionAttr();
newACaptionAttr.setCaptionColor(this.getCaptionColor());
newACaptionAttr.setCaptionFontName(this.getCaptionFontName());
newACaptionAttr.setCaptionText(this.getCaptionText());
return newACaptionAttr;
}
private String captionFontName;
private String captionColor;
private String captionText;
}
}
|
[
"abcd123@123.com"
] |
abcd123@123.com
|
e7e9e1881b66cb55026137c37ccdbb9568d40664
|
ac82c09fd704b2288cef8342bde6d66f200eeb0d
|
/projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/VariableNotionalProvider.java
|
44cfd6fcb75e82c69e0c18e177c1a14766fa9bf7
|
[
"Apache-2.0"
] |
permissive
|
cobaltblueocean/OG-Platform
|
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
|
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
|
refs/heads/master
| 2021-08-26T00:44:27.315546
| 2018-02-23T20:12:08
| 2018-02-23T20:12:08
| 241,467,299
| 0
| 2
|
Apache-2.0
| 2021-08-02T17:20:41
| 2020-02-18T21:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,640
|
java
|
/**
* Copyright (C) 2014 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.instrument;
import java.util.Arrays;
import java.util.List;
import org.threeten.bp.LocalDate;
import org.threeten.bp.ZonedDateTime;
import com.opengamma.util.ArgumentChecker;
/**
* The class describes variable notionals.
*/
public class VariableNotionalProvider implements NotionalProvider {
private LocalDate[] _dates;
private final double[] _notionals;
/**
* Construct notional provider for variable notional
* @param dates Array of dates specifying variable notionals
* @param notionals The notionals
*/
public VariableNotionalProvider(LocalDate[] dates, double[] notionals) {
ArgumentChecker.notEmpty(dates, "dates");
ArgumentChecker.notEmpty(notionals, "notionals");
int nDates = dates.length;
ArgumentChecker.isTrue(notionals.length == nDates, "dates and notionals should have the same length");
_dates = Arrays.copyOf(dates, nDates);
_notionals = Arrays.copyOf(notionals, nDates);
}
/**
* Constructor used when schedule is not yet known
* @param notionals The notionals
*/
public VariableNotionalProvider(double[] notionals) {
ArgumentChecker.notEmpty(notionals, "notionals");
_dates = null;
_notionals = Arrays.copyOf(notionals, notionals.length);
}
/**
* Construct the provide with dates
* @param dateList The dates
* @return VariableNotionalProvider
*/
public VariableNotionalProvider withZonedDateTime(List<ZonedDateTime> dateList) {
ArgumentChecker.notEmpty(dateList, "dates");
int nDates = dateList.size();
ArgumentChecker.isTrue(_notionals.length == nDates, "zonedDates and notionals should have the same length");
LocalDate[] dates = new LocalDate[nDates];
for (int i = 0; i < nDates; ++i) {
dates[i] = dateList.get(i).toLocalDate();
}
return new VariableNotionalProvider(dates, _notionals);
}
@Override
public double getAmount(final LocalDate date) {
if (_dates == null) {
throw new IllegalArgumentException("date set is null");
}
for (int i = 0; i < _dates.length; ++i) {
if (_dates[i].equals(date)) {
return _notionals[i];
}
}
throw new IllegalArgumentException("The date " + date + " is not found in the date set");
}
/**
* Access notionals
* @return _notionals
*/
public double[] getNotionals() {
return _notionals;
}
/**
* Access dates
* @return _dates
*/
public LocalDate[] getDates() {
return _dates;
}
}
|
[
"cobaltblue.ocean@gmail.com"
] |
cobaltblue.ocean@gmail.com
|
235eb16690770cf30a66a8342651d4082a458271
|
25181b803a6da5fa748bc8ec353cd2f3a3a836ed
|
/clientAndServer/circle/model/model-common/java/g/model/enums/GameModelCodeEnum.java
|
07cfda6b25b5869c164f61d1209fbe8be2e73ae0
|
[] |
no_license
|
primary10/bullCard
|
991ed8619cac7a75fa56ce8cb6879f6c0bba2d62
|
39f4e36624a692b8fb6d991b791e0e2e9e8d7722
|
refs/heads/master
| 2022-11-08T02:20:57.135154
| 2019-10-12T01:15:52
| 2019-10-12T01:15:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 735
|
java
|
package g.model.enums;
import org.soul.commons.enums.EnumTool;
import org.soul.commons.enums.ICodeEnum;
/**
* Created by Jason on 16/8/29.
*/
public enum GameModelCodeEnum implements ICodeEnum {
FIGHT("FIGHT","对战"),
/** 投注 */
BET("BET","投注"),
/** 夺宝 */
GRAB("GRAB","夺宝"),
;
private String code;
private String trans;
GameModelCodeEnum(String code, String trans) {
this.code = code;
this.trans = trans;
}
public String getTrans() {
return trans;
}
public String getCode() {
return code;
}
public static GameModelCodeEnum enumOf(String code) {
return EnumTool.enumOf(GameModelCodeEnum.class, code);
}
}
|
[
"1406733029@qq.com"
] |
1406733029@qq.com
|
1dd8966b40427af76ae530a3f4a44e3d0730bb01
|
e96172bcad99d9fddaa00c25d00a319716c9ca3a
|
/plugin/src/main/java/consulo/java/impl/codeInsight/JavaCodeInsightSettings.java
|
982db44bb97365439c073f81923d33db0c4898b7
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-java
|
8c1633d485833651e2a9ecda43e27c3cbfa70a8a
|
a96757bc015eff692571285c0a10a140c8c721f8
|
refs/heads/master
| 2023-09-03T12:33:23.746878
| 2023-08-29T07:26:25
| 2023-08-29T07:26:25
| 13,799,330
| 5
| 4
|
Apache-2.0
| 2023-01-03T08:32:23
| 2013-10-23T09:56:39
|
Java
|
UTF-8
|
Java
| false
| false
| 1,466
|
java
|
package consulo.java.impl.codeInsight;
import consulo.annotation.component.ComponentScope;
import consulo.annotation.component.ServiceAPI;
import consulo.annotation.component.ServiceImpl;
import consulo.component.persist.PersistentStateComponent;
import consulo.component.persist.State;
import consulo.component.persist.Storage;
import consulo.component.persist.StoragePathMacros;
import consulo.ide.ServiceManager;
import consulo.util.xml.serializer.XmlSerializerUtil;
import jakarta.inject.Singleton;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* @author VISTALL
* @since 13.10.2015
*/
@Singleton
@State(
name = "JavaCodeInsightSettings",
storages = {
@Storage(
file = StoragePathMacros.APP_CONFIG + "/editor.codeinsight.xml")
})
@ServiceAPI(ComponentScope.APPLICATION)
@ServiceImpl
public class JavaCodeInsightSettings implements PersistentStateComponent<JavaCodeInsightSettings> {
@Nonnull
public static JavaCodeInsightSettings getInstance() {
return ServiceManager.getService(JavaCodeInsightSettings.class);
}
public boolean USE_INSTANCEOF_ON_EQUALS_PARAMETER = false;
public boolean USE_ACCESSORS_IN_EQUALS_HASHCODE = false;
public boolean SHOW_SOURCE_INFERRED_ANNOTATIONS = true;
@Nullable
@Override
public JavaCodeInsightSettings getState() {
return this;
}
@Override
public void loadState(JavaCodeInsightSettings state) {
XmlSerializerUtil.copyBean(state, this);
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.