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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c349f5bc20e33f6a1a41da57884f39115789932e
|
b8b7e7f84e5dd812bbd70a72e9bc38c97f93950a
|
/plugins/org.polymap.rhei.ide/src/org/polymap/rhei/ide/Messages.java
|
65517e1bbe59a850984de1c81cb049847f2f5a5e
|
[] |
no_license
|
Polymap3/polymap3-rhei
|
8125d4d18aabd3bd065cfa15915d3accee28ec66
|
c60d3c715074b0eee071bc9f5656a0c80baa8a89
|
refs/heads/master
| 2021-01-18T22:36:46.223268
| 2016-06-29T16:37:00
| 2016-06-29T16:37:00
| 31,905,076
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,685
|
java
|
/*
* polymap.org
* Copyright 2010, Polymap GmbH, and individual contributors as indicated
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* $Id: $
*/
package org.polymap.rhei.ide;
import org.eclipse.rwt.RWT;
import org.polymap.core.runtime.MessagesImpl;
/**
*
*
* @author <a href="http://www.polymap.de">Falko Braeutigam</a>
* @version $Revision: $
*/
public class Messages {
private static final String BUNDLE_NAME = RheiIdePlugin.PLUGIN_ID + ".messages"; //$NON-NLS-1$
private static final MessagesImpl instance = new MessagesImpl( BUNDLE_NAME, Messages.class.getClassLoader() );
private Messages() {
// prevent instantiation
}
public static String i18n( String key, Object... args ) {
return get( key, args );
}
public static String get( String key, Object... args ) {
return instance.get( key, args );
}
public static String get2( Object caller, String key, Object... args ) {
return instance.get( caller, key, args );
}
public static Messages get() {
Class clazz = Messages.class;
return (Messages)RWT.NLS.getISO8859_1Encoded( BUNDLE_NAME, clazz );
}
}
|
[
"falko@polymap.de"
] |
falko@polymap.de
|
ec2e1f304886bd82ce5faa77c3491031fd7d2027
|
cbb57237a5c25735717ec2d6462463d1546f252f
|
/web/src/d20181114/SumData.java
|
4098471ccb4ada6eb55a586d06be0d2abad487ca
|
[] |
no_license
|
callmey/scriptlet
|
c95edd278abd69bba43145c3224697bb281ed364
|
89647ea576200f10ff18a535899f95045bc1e956
|
refs/heads/master
| 2020-04-04T21:56:38.958150
| 2018-11-27T03:03:29
| 2018-11-27T03:03:29
| 156,304,240
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,161
|
java
|
package d20181114;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/w20181114/SumData.do")
public class SumData extends HttpServlet{
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
req.setCharacterEncoding("UTF-8");
resp.setContentType("text/html;charset=UTF-8");
int sum = 0;
String n = req.getParameter("num");
if(n!=null) {
int num = Integer.parseInt(n);
for(int i = 1; i<=num;i++) {
sum +=i;
}
PrintWriter out = resp.getWriter();
//html로 출력
out.println("<html>");
out.println("<head>");
out.println("<title>Sum Check</title>");
out.println("</head>");
out.println("<body>");
out.println("<h2>1부터 "+ num +" 까지의 합은"+sum+"입니다.</h2>");
out.println("</body>");
out.println("</html>");
}
}
}
|
[
"soldesk@soldesk-PC"
] |
soldesk@soldesk-PC
|
743e17485d5520cb9c5b67028fb8ee21e21b1bc8
|
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
|
/bin/modules/commerce-services/commerceservices/src/de/hybris/platform/commerceservices/search/solrfacetsearch/provider/impl/SolrFirstVariantCategoryManager.java
|
20ec5464d50f2d5a6d0b55ecdce626ebb5485819
|
[] |
no_license
|
jp-developer0/hybrisTrail
|
82165c5b91352332a3d471b3414faee47bdb6cee
|
a0208ffee7fee5b7f83dd982e372276492ae83d4
|
refs/heads/master
| 2020-12-03T19:53:58.652431
| 2020-01-02T18:02:34
| 2020-01-02T18:02:34
| 231,430,332
| 0
| 4
| null | 2020-08-05T22:46:23
| 2020-01-02T17:39:15
| null |
UTF-8
|
Java
| false
| false
| 3,718
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl;
import de.hybris.platform.variants.model.GenericVariantProductModel;
import de.hybris.platform.variants.model.VariantValueCategoryModel;
import de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData;
import de.hybris.platform.servicelayer.i18n.L10NService;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map.Entry;
import java.util.SortedMap;
import org.springframework.beans.factory.annotation.Required;
/**
* Class to process {@link de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData} operations.
*/
public class SolrFirstVariantCategoryManager
{
protected static final String BEFORE_BEAN = "_SFVC_";
protected static final String FIELD_SEPARATOR = "_:_";
protected static final int TOTAL_FIELDS = 2;
private L10NService l10NService;
/**
* Builds a String to be used in first category name list Solr property.
*
* @param categoryVariantPairs
* Sorted pairs of {@link de.hybris.platform.variants.model.VariantValueCategoryModel} and {@link de.hybris.platform.variants.model.GenericVariantProductModel}.code.
* @return String to be used in Solr property.
*/
public String buildSolrPropertyFromCategoryVariantPairs(
final SortedMap<VariantValueCategoryModel, GenericVariantProductModel> categoryVariantPairs)
{
final StringBuilder builder = new StringBuilder();
if (categoryVariantPairs != null)
{
for (final Entry<VariantValueCategoryModel, GenericVariantProductModel> entry : categoryVariantPairs.entrySet())
{
builder.append(BEFORE_BEAN + localizeForKey(entry.getKey().getName()) + FIELD_SEPARATOR + entry.getValue().getCode());
}
}
return builder.toString();
}
/**
* Generate a list of {@link de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData} based on a Solr property String that holds the first
* category name list.
*
* @param solrProperty
* The first category name list.
* @return List of {@link de.hybris.platform.commerceservices.product.data.SolrFirstVariantCategoryEntryData};
*/
public List<SolrFirstVariantCategoryEntryData> buildFirstVariantCategoryListFromSolrProperty(final String solrProperty)
{
final List<SolrFirstVariantCategoryEntryData> entries = new ArrayList<>();
// Split by beans. Discard first entry in array, as it will be empty
final String[] original = solrProperty.split(BEFORE_BEAN);
if (original.length > 1)
{
final String[] propertyEntries = Arrays.copyOfRange(original, 1, original.length);
for (final String propertyEntry : propertyEntries)
{
final String[] tokens = propertyEntry.split(FIELD_SEPARATOR);
if (tokens != null && tokens.length == TOTAL_FIELDS)
{
for (int i = 0; i < tokens.length; i += TOTAL_FIELDS)
{
final SolrFirstVariantCategoryEntryData entry = new SolrFirstVariantCategoryEntryData();
entry.setCategoryName(tokens[i]);
entry.setVariantCode(tokens[i + 1]);
entries.add(entry);
}
}
else
{
throw new IllegalArgumentException("The solrProperty [" + solrProperty + "] should have " + TOTAL_FIELDS
+ " fields separated by '" + FIELD_SEPARATOR + "'");
}
}
}
return entries;
}
public String localizeForKey(final String key)
{
return getL10NService().getLocalizedString(key);
}
public L10NService getL10NService()
{
return l10NService;
}
@Required
public void setL10NService(final L10NService l10NService)
{
this.l10NService = l10NService;
}
}
|
[
"juan.gonzalez.working@gmail.com"
] |
juan.gonzalez.working@gmail.com
|
ecd01a12cf17400bfaabc0ffd02dfbebcdf1980c
|
752769cdbde5709ec894e46509ea26d072f63860
|
/jsf-utils/src/main/java/com/jsf/utils/sdk/fdfs/service/DefaultAppendFileStorageClient.java
|
69596f2db5b35f9877c4200634feb582a6dcddee
|
[
"BSD-3-Clause"
] |
permissive
|
cjg208/JSF
|
dca375b472d16e2a7cb9ac56e939b63d60cc86cf
|
693041b6bb6a1b753d3be072c8ee7d879622e6b5
|
refs/heads/master
| 2023-01-01T08:39:47.925873
| 2020-10-27T08:35:08
| 2020-10-27T08:35:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,909
|
java
|
package com.jsf.utils.sdk.fdfs.service;
import com.jsf.utils.sdk.fdfs.conn.ConnectionManager;
import com.jsf.utils.sdk.fdfs.domain.StorageNode;
import com.jsf.utils.sdk.fdfs.domain.StorageNodeInfo;
import com.jsf.utils.sdk.fdfs.domain.StorePath;
import com.jsf.utils.sdk.fdfs.proto.storage.StorageAppendFileCommand;
import com.jsf.utils.sdk.fdfs.proto.storage.StorageModifyCommand;
import com.jsf.utils.sdk.fdfs.proto.storage.StorageTruncateCommand;
import com.jsf.utils.sdk.fdfs.proto.storage.StorageUploadFileCommand;
import java.io.InputStream;
/**
* 存储服务客户端接口实现
*
* @author tobato
*
*/
public class DefaultAppendFileStorageClient extends DefaultGenerateStorageClient implements AppendFileStorageClient {
public DefaultAppendFileStorageClient(TrackerClient trackerClient,
ConnectionManager connectionManager) {
super(trackerClient, connectionManager);
}
/**
* 上传支持断点续传的文件
*/
@Override
public StorePath uploadAppenderFile(String groupName, InputStream inputStream, long fileSize, String fileExtName) {
StorageNode client = trackerClient.getStoreStorage(groupName);
StorageUploadFileCommand command = new StorageUploadFileCommand(client.getStoreIndex(), inputStream,
fileExtName, fileSize, true);
return connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command);
}
/**
* 继续上载文件
*/
@Override
public void appendFile(String groupName, String path, InputStream inputStream, long fileSize) {
StorageNodeInfo client = trackerClient.getUpdateStorage(groupName, path);
StorageAppendFileCommand command = new StorageAppendFileCommand(inputStream, fileSize, path);
connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command);
}
/**
* 修改文件
*/
@Override
public void modifyFile(String groupName, String path, InputStream inputStream, long fileSize, long fileOffset) {
StorageNodeInfo client = trackerClient.getUpdateStorage(groupName, path);
StorageModifyCommand command = new StorageModifyCommand(path, inputStream, fileSize, fileOffset);
connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command);
}
/**
* 清除文件
*/
@Override
public void truncateFile(String groupName, String path, long truncatedFileSize) {
StorageNodeInfo client = trackerClient.getUpdateStorage(groupName, path);
StorageTruncateCommand command = new StorageTruncateCommand(path, truncatedFileSize);
connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command);
}
/**
* 清除文件
*/
@Override
public void truncateFile(String groupName, String path) {
long truncatedFileSize = 0;
truncateFile(groupName, path, truncatedFileSize);
}
}
|
[
"809573150@qq.com"
] |
809573150@qq.com
|
737a6aab708e92c5070e89596bee5d0fe8b89486
|
4f41000b4f35453a14ae16035fcf9c79385f872a
|
/src/main/java/com/helmet/application/admin/MgrAccessGroupNewProcess.java
|
b63ef1d526d19c10c1e3790d9bece64fabb71803
|
[] |
no_license
|
InfomediaUK/testdb
|
4e229fc2121ad7e70d1f39d5a4b9e4ae5a237c40
|
1bf06309e5b0be07025d8c6b6d3675ae540e104e
|
refs/heads/master
| 2021-08-18T18:51:35.512500
| 2017-11-23T14:52:12
| 2017-11-23T14:52:12
| 103,923,546
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,294
|
java
|
package com.helmet.application.admin;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.MessageResources;
import org.apache.struts.validator.DynaValidatorForm;
import com.helmet.api.AdminService;
import com.helmet.api.ServiceFactory;
import com.helmet.api.exceptions.DuplicateDataException;
import com.helmet.application.admin.abztract.AdminAction;
import com.helmet.bean.MgrAccessGroup;
public class MgrAccessGroupNewProcess extends AdminAction {
protected transient XLogger logger = XLoggerFactory.getXLogger(getClass());
public ActionForward doExecute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
DynaValidatorForm dynaForm = (DynaValidatorForm)form;
logger.entry("In coming !!!");
MgrAccessGroup mgrAccessGroup = (MgrAccessGroup)dynaForm.get("mgrAccessGroup");
ActionMessages errors = new ActionMessages();
MessageResources messageResources = getResources(request);
AdminService adminService = ServiceFactory.getInstance().getAdminService();
try {
int rowCount = adminService.insertMgrAccessGroup(mgrAccessGroup, getAdministratorLoggedIn().getAdministratorId());
}
catch (DuplicateDataException e) {
errors.add("mgrAccessGroup", new ActionMessage("errors.duplicate", messageResources.getMessage("label." + e.getField())));
saveErrors(request, errors);
return mapping.getInputForward();
}
logger.exit("Out going !!!");
ActionForward actionForward = mapping.findForward("success");
return new ActionForward(actionForward.getName(),
actionForward.getPath() + "?mgrAccessGroup.mgrAccessGroupId=" + mgrAccessGroup.getMgrAccessGroupId(),
actionForward.getRedirect());
}
}
|
[
"lyndon@infomediauk.net"
] |
lyndon@infomediauk.net
|
4fccbb8615aa8e6873316cef5fbdf6c5e022855f
|
27ceb9728f25f76150e775845c002e901211c7c7
|
/Student Grading System/.history/src/Entities/Rubric_20210520011937.java
|
35dd82c7f561f61cfc8d6f6624f632b8ce2f17b9
|
[] |
no_license
|
cormacmattimoe/SoftwareQualityAssuranceFinalCa
|
bd1f4f64fef3396e4dfdfac199d1876311841596
|
7d4d9e8b9d36b28e77b319d4e5061da93233a442
|
refs/heads/master
| 2023-05-06T11:50:58.072870
| 2021-05-21T09:04:55
| 2021-05-21T09:04:55
| 368,800,636
| 0
| 0
| null | 2021-05-21T09:04:56
| 2021-05-19T08:40:30
|
Java
|
UTF-8
|
Java
| false
| false
| 6,355
|
java
|
package Entities;
import java.util.ArrayList;
// Rubric is been described as having a student name
// with an list of different criterias
public class Rubric {
private String rubricName;
//Collection to represent Criterions
private ArrayList<Criterion> criteria = new ArrayList<>();
//Collection to represent StudentGrades
private ArrayList<StudentGrade> studentGrades = new ArrayList<StudentGrade>();
public Rubric() {
}
public Rubric(String rubricName, ArrayList<Criterion> criteria) {
this.rubricName = rubricName;
this.criteria = criteria;
}
public String getRubricName() {
return rubricName;
}
public void setRubricName(String rubricName) {
this.rubricName = rubricName;
}
public ArrayList<Criterion> getCriteria() {
return criteria;
}
public void setCriteria(ArrayList<Criterion> criteria) {
this.criteria = criteria;
}
public void addCriteria(Criterion criteria) {
this.criteria.add(criteria);
}
//Method to return each studentGrades
public ArrayList<StudentGrade> getGrades()
{
return this.studentGrades;
}
//total+=stu.getResponsesSum();
}
//mean calculation
double mean = (float)total/this.studentGrades.size();
//absoulute deviations at this point
ArrayList<Double> absoultedev = new ArrayList<Double>();
for(StudentGrade sr : this.getResponses())
{
//must be absolute value
double abs = Math.abs(sr.getResponsesSum() - mean);
absoultedev.add(abs);
}
//absoulute devaiation
double totalabs = 0;
for(double d:absoultedev)
{
totalabs+=d;
}
double aveDev = Math.round((float)totalabs/this.responses.size() * 100.0)/100.0;
return aveDev;
}
public double getStandardDeviation()
{
//sum of each sum from a surevy response
int total = 0;
//iterates through each survey response in survey
for(surveyResponse sr : this.getResponses())
{
total+=sr.getResponsesSum();
}
//mean calculation
double mean = (float)total/this.responses.size();
//Gathering of the square of each value
ArrayList<Double> squares = new ArrayList<Double>();
for(surveyResponse sr : this.getResponses())
{
//square the result of each sum minus the sum
double square = (sr.getResponsesSum()-mean) *(sr.getResponsesSum()-mean);
squares.add(square);
}
//Total of squares
double totalsquaress = 0;
for(double d:squares)
{
totalsquaress+=d;
}
totalsquaress = totalsquaress/this.responses.size();
//Standard deviation by getting square root of the sum of squares
double stanDev = Math.sqrt(totalsquaress);
//rounded and returned
return Math.round(stanDev* 100.0)/100.0;
}
public int getMaxium()
{
//value to represent max
int max = 0;
//list for all the values from each question
ArrayList<Integer> values = new ArrayList<Integer>();
//adding question answer to list
for(surveyResponse sr : this.getResponses())
{
values.add(sr.getResponsesSum());
}
//getting the max value and retunring it
max = Collections.max(values);
return max;
}
public int getMinimum()
{
//value to represent max
int max = 0;
//list for all the values from each question
ArrayList<Integer> values = new ArrayList<Integer>();
//adding question answer to list
for(surveyResponse sr : this.getResponses())
{
values.add(sr.getResponsesSum());
}
//getting the max value and retunring it
max = Collections.min(values);
return max;
}
public double averageDeviationQuestion(int index)
{
//sum of question values
int total = 0;
for(surveyResponse sr: this.responses)
{
//adds the values of the questions that have been selected
total+= sr.questions.get(index).getAnswer();
}
//mean calculation
double mean = (float)total/this.responses.size();
//Gathering of absoulute deviations
ArrayList<Double> absoultedev = new ArrayList<Double>();
for(surveyResponse sr: this.responses)
{
double abs = Math.abs(sr.questions.get(index).getAnswer() - mean);
absoultedev.add(abs);
}
//absoulute devaiation
double totalabs = 0;
for(double d:absoultedev)
{
totalabs+=d;
}
//average deviation
double aveDev = Math.round((float)totalabs/this.responses.size() * 100.0)/100.0;
return Double.valueOf(aveDev);
}
public double StandardDeviationQuestion(int index)
{
//sum of question values
int total = 0;
//Looping through the values to get sum
for(surveyResponse sr: this.responses)
{
//adds the values of the questions that have been selected
total+= sr.questions.get(index).getAnswer();
}
//mean calculation
double mean = (float)total/this.responses.size();
//Gathering of the square of each value
ArrayList<Double> squares = new ArrayList<Double>();
for(surveyResponse sr: this.responses)
{
double square = (sr.questions.get(index).getAnswer()-mean) *(sr.questions.get(index).getAnswer()-mean);
squares.add(square);
}
//Total of squares
double totalsquaress = 0;
for(double d:squares)
{
totalsquaress+=d;
}
totalsquaress = totalsquaress/this.responses.size();
//Standard deviation by getting square root of the sum of squares
double stanDev = Math.sqrt(totalsquaress);
//rounded and returned
return Math.round(stanDev* 100.0)/100.0;
}
public int getMaxiumQuestion(int index)
{
//value to represent max
int max = 0;
//list for all the values from each question
ArrayList<Integer> values = new ArrayList<Integer>();
//adding question answer to list
for(surveyResponse sr: this.responses)
{
values.add(sr.questions.get(index).getAnswer());
}
//getting the max value and retunring it
max = Collections.max(values);
return max;
}
public int getMinimumQuestion(int index)
{
int min = 0;
//value to represent
ArrayList<Integer> values = new ArrayList<Integer>();
//list for all the values from each question
//adding question answer to list
for(surveyResponse sr: this.responses)
{
values.add(sr.questions.get(index).getAnswer());
}
//getting the min value and retunring it
min = Collections.min(values);
return min;
}
*/
@Override
public String toString() {
return
"Rubric name from rubric class = " + rubricName;
}
}
|
[
"cormacmattimoe98@gmail.com"
] |
cormacmattimoe98@gmail.com
|
15c173d9b4607a65c04f79e90eaa1c9fdf8ac4cc
|
58d9997a806407a09c14aa0b567e57d486b282d4
|
/com/planet_ink/coffee_mud/MOBS/Skeleton.java
|
4b83870a948182d6d8679d621cdf68aaed96e2e5
|
[
"Apache-2.0"
] |
permissive
|
kudos72/DBZCoffeeMud
|
553bc8619a3542fce710ba43bac01144148fe2ed
|
19a3a7439fcb0e06e25490e19e795394da1df490
|
refs/heads/master
| 2021-01-10T07:57:01.862867
| 2016-03-17T23:04:25
| 2016-03-17T23:04:25
| 39,215,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,315
|
java
|
package com.planet_ink.coffee_mud.MOBS;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2001-2014 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class Skeleton extends Undead
{
@Override public String ID(){return "Skeleton";}
public Skeleton()
{
super();
username="a skeleton";
setDescription("A walking pile of bones...");
setDisplayText("a skeleton rattles as it walks.");
setMoney(0);
basePhyStats.setWeight(30);
final Weapon sword=CMClass.getWeapon("Longsword");
if(sword!=null)
{
sword.wearAt(Wearable.WORN_WIELD);
addItem(sword);
}
basePhyStats().setDamage(5);
basePhyStats().setLevel(1);
basePhyStats().setArmor(90);
basePhyStats().setSpeed(1.0);
baseCharStats().setMyRace(CMClass.getRace("Skeleton"));
baseCharStats().getMyRace().startRacing(this,false);
baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level()));
recoverMaxState();
resetToMaxState();
recoverPhyStats();
recoverCharStats();
}
}
|
[
"kirk.narey@gmail.com"
] |
kirk.narey@gmail.com
|
9ac8b24d3e84b54a330fc513a588bd6bc0f1d73a
|
777d41c7dc3c04b17dfcb2c72c1328ea33d74c98
|
/DongCi_Android/app/src/main/java/com/wmlive/hhvideo/utils/MD5FileUtil.java
|
20e5de29623370bc279aef981b95d20d0469752e
|
[] |
no_license
|
foryoung2018/videoedit
|
00fc132c688be6565efb373cae4564874f61d52a
|
7a316996ce1be0f08dbf4c4383da2c091447c183
|
refs/heads/master
| 2020-04-08T04:56:42.930063
| 2018-11-25T14:27:43
| 2018-11-25T14:27:43
| 159,038,966
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,539
|
java
|
package com.wmlive.hhvideo.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class MD5FileUtil {
protected static char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e',
'f'};
protected static MessageDigest messagedigest = null;
static {
try {
messagedigest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
KLog.e("MD5FileUtil", "messagedigest初始化失败");
}
}
public static String getFileMD5String(File file) throws IOException {
FileInputStream in = new FileInputStream(file);
FileChannel ch = in.getChannel();
MappedByteBuffer byteBuffer = ch.map(FileChannel.MapMode.READ_ONLY, 0, file.length());
messagedigest.update(byteBuffer);
return bufferToHex(messagedigest.digest());
}
public static String getMD5String(String s) {
return getMD5String(s.getBytes());
}
public static String getMD5String(byte[] bytes) {
messagedigest.update(bytes);
return bufferToHex(messagedigest.digest());
}
private static String bufferToHex(byte bytes[]) {
return bufferToHex(bytes, 0, bytes.length);
}
private static String bufferToHex(byte bytes[], int m, int n) {
StringBuffer stringbuffer = new StringBuffer(2 * n);
int k = m + n;
for (int l = m; l < k; l++) {
appendHexPair(bytes[l], stringbuffer);
}
return stringbuffer.toString();
}
private static void appendHexPair(byte bt, StringBuffer stringbuffer) {
char c0 = hexDigits[(bt & 0xf0) >> 4];
char c1 = hexDigits[bt & 0xf];
stringbuffer.append(c0);
stringbuffer.append(c1);
}
public static boolean checkPassword(String password, String md5PwdStr) {
String s = getMD5String(password);
return s.equals(md5PwdStr);
}
public static void main(String[] args) throws IOException {
long begin = System.currentTimeMillis();
File big = new File("D:\\temp\\jre-7u11-linux-i586.tar.gz");
String md5 = getFileMD5String(big);
long end = System.currentTimeMillis();
// System.out.println("md5:" + md5);
// System.out.println("time:" + ((end - begin) / 1000) + "s");
}
}
|
[
"1184394624@qq.com"
] |
1184394624@qq.com
|
62f3d8bb0dcf5b5ec604c5faee41d1f0239525b5
|
5cb5d1fc80c1f68ade44f0a26a02d1aeb118c64d
|
/ink-msgcenter/ink-msgcenter-api/src/main/java/com/ink/msgcenter/api/service/SmsService.java
|
b674e31133954177a1dd877e45aad32d7e77af0c
|
[] |
no_license
|
gspandy/zx-parent
|
4350d1ef851d05eabdcf8c6c7049a46593e3c22e
|
5cdc52e645537887e86e5cbc117139ca1a56f55d
|
refs/heads/master
| 2023-08-31T15:29:50.763388
| 2016-08-11T09:17:29
| 2016-08-11T09:20:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 780
|
java
|
package com.ink.msgcenter.api.service;
import com.ink.msgcenter.api.model.input.SmsExtInput;
import com.ink.msgcenter.api.model.input.SmsInput;
import com.ink.msgcenter.api.model.input.SmsMassInput;
import com.ink.msgcenter.api.model.output.MsgOutput;
/**
* 短信发送接口
* Created by aiyungui on 2016/5/18.
*/
public interface SmsService {
/**
* 发送短信
* @param smsInput
* @return
*/
public MsgOutput sendSms(SmsInput smsInput);
/**
* 发送短信(含扩展接口)
* @param smsExtInput
* @return
*/
public MsgOutput sendSmsWithExt(SmsExtInput smsExtInput);
/**
* 短信群发接口
* @param smsMassInput
* @return
*/
public MsgOutput sendMassSms(SmsMassInput smsMassInput);
}
|
[
"zxzhouxiang123@163.com"
] |
zxzhouxiang123@163.com
|
96238a98deb794da3377515994bbc2271ed0ee7e
|
ef56693628321009d1025d7d11f19a0e4d7119be
|
/src/interview/MeituanFour.java
|
4887b0234aff6885f85f9434b47b4cf8e01e1956
|
[] |
no_license
|
LeBW/leetcode
|
b3aa893c3d5e386bfbc8851fe5670b9c35d4fcad
|
a854651b93941e3e270b616ad163b2abd06bf6dc
|
refs/heads/master
| 2023-05-12T09:33:02.551159
| 2021-09-22T01:44:53
| 2021-09-22T01:44:53
| 136,726,369
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,532
|
java
|
package interview;
import java.util.Arrays;
import java.util.Scanner;
/**
* @author LBW
*/
public class MeituanFour {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int m = scanner.nextInt();
int start = scanner.nextInt();
int end = scanner.nextInt();
int[][] peopleDis = new int[n + 1][n + 1];
int[][] carDis = new int[n + 1][n + 1];
for (int i = 0; i < m; i++) {
int x = scanner.nextInt(), y = scanner.nextInt();
carDis[x][y] = scanner.nextInt();
carDis[y][x] = carDis[x][y];
peopleDis[x][y] = scanner.nextInt();
peopleDis[y][x] = peopleDis[x][y];
}
int[] wait = new int[n + 1];
for (int i = 1; i <= n; i++) {
wait[i] = scanner.nextInt();
}
if (start == end) {
System.out.println(0);
return;
}
int res = Integer.MAX_VALUE;
for (int i = 1; i <= n; i++) {
if (i == start) {
if (carDis[start][end] > 0) {
res = Math.min(res, wait[start] + carDis[start][end]);
}
continue;
}
if (peopleDis[start][i] > 0 && carDis[i][end] > 0) {
int t = Math.max(peopleDis[start][i], wait[i]);
t += carDis[i][end];
res = Math.min(res, t);
}
}
System.out.println(res);
}
}
|
[
"27091925@qq.com"
] |
27091925@qq.com
|
b03572032282157c589a51cfb191f6894c4280ce
|
abdd83f2b48f6aca5569c9a4e03af4a6b8babd62
|
/src/test/java/com/anand/program/web/rest/util/PaginationUtilUnitTest.java
|
576e24376b243635420bac57d2b3e63ee45bee1d
|
[] |
no_license
|
anandguna/AnandTesting
|
2590156cddc3700b4b0f5740b147a8aade877e76
|
2b84da0ac188d131ab51ee235cbeff0d1efc06f6
|
refs/heads/master
| 2020-03-22T17:37:42.197628
| 2018-07-10T08:59:37
| 2018-07-10T08:59:37
| 140,405,525
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,745
|
java
|
package com.anand.program.web.rest.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.HttpHeaders;
/**
* Tests based on parsing algorithm in app/components/util/pagination-util.service.js
*
* @see PaginationUtil
*/
public class PaginationUtilUnitTest {
@Test
public void generatePaginationHttpHeadersTest() {
String baseUrl = "/api/_search/example";
List<String> content = new ArrayList<>();
Page<String> page = new PageImpl<>(content, PageRequest.of(6, 50), 400L);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl);
List<String> strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
String headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 4);
String expectedData = "</api/_search/example?page=7&size=50>; rel=\"next\","
+ "</api/_search/example?page=5&size=50>; rel=\"prev\","
+ "</api/_search/example?page=7&size=50>; rel=\"last\","
+ "</api/_search/example?page=0&size=50>; rel=\"first\"";
assertEquals(expectedData, headerData);
List<String> xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L));
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
6f9447aada7d1f0dd3fed8850e837339402d6d7f
|
183931eedd8ed7ff685e22cb055f86f12a54d707
|
/test/miscCode/src/main/java/oop/javarush/task2309/vo/NamedItem.java
|
4808afb383820cfbab5dca9ab149e7814f6b1de9
|
[] |
no_license
|
cynepCTAPuk/headFirstJava
|
94a87be8f6958ab373cd1640a5bdb9c3cc3bf166
|
7cb45f6e2336bbc78852d297ad3474fd491e5870
|
refs/heads/master
| 2023-08-16T06:51:14.206516
| 2023-08-08T16:44:11
| 2023-08-08T16:44:11
| 154,661,091
| 0
| 1
| null | 2023-01-06T21:32:31
| 2018-10-25T11:40:54
|
Java
|
UTF-8
|
Java
| false
| false
| 585
|
java
|
package oop.javarush.task2309.vo;
public class NamedItem {
private int id;
private String name;
private String description;
public NamedItem() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
|
[
"CTAPuk@gmail.com"
] |
CTAPuk@gmail.com
|
ce1ddbf6c94699a98b56abddb6e01b0cc72b24b4
|
de8eca94dc4b263a14cbd10e75827719e8f21233
|
/dmn-test-cases/signavio/rdf/rdf2java/expected/java/literal/dmn/simple-decision-free-text-complex-literal-expression/Monthly.java
|
11fd3c25d3ce6da0497ca1ecdd83863767b5cc32
|
[
"Apache-2.0"
] |
permissive
|
Mayank-Bhardwaj-404/jdmn
|
559dddac36b47075e97aad4dd69068a74c040d89
|
9dab9bf6e8952a30ff07e0771ef0ab4cd26c869f
|
refs/heads/master
| 2023-07-11T09:45:31.016832
| 2021-07-08T15:24:12
| 2021-07-08T15:24:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,590
|
java
|
import java.util.*;
import java.util.stream.Collectors;
@javax.annotation.Generated(value = {"signavio-decision.ftl", "monthly"})
@com.gs.dmn.runtime.annotation.DRGElement(
namespace = "",
name = "monthly",
label = "Monthly",
elementKind = com.gs.dmn.runtime.annotation.DRGElementKind.DECISION,
expressionKind = com.gs.dmn.runtime.annotation.ExpressionKind.LITERAL_EXPRESSION,
hitPolicy = com.gs.dmn.runtime.annotation.HitPolicy.UNKNOWN,
rulesCount = -1
)
public class Monthly extends com.gs.dmn.signavio.runtime.DefaultSignavioBaseDecision {
public static final com.gs.dmn.runtime.listener.DRGElement DRG_ELEMENT_METADATA = new com.gs.dmn.runtime.listener.DRGElement(
"",
"monthly",
"Monthly",
com.gs.dmn.runtime.annotation.DRGElementKind.DECISION,
com.gs.dmn.runtime.annotation.ExpressionKind.LITERAL_EXPRESSION,
com.gs.dmn.runtime.annotation.HitPolicy.UNKNOWN,
-1
);
public Monthly() {
}
public java.math.BigDecimal apply(String loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_) {
try {
return apply((loan != null ? com.gs.dmn.serialization.JsonSerializer.OBJECT_MAPPER.readValue(loan, new com.fasterxml.jackson.core.type.TypeReference<type.LoanImpl>() {}) : null), annotationSet_, new com.gs.dmn.runtime.listener.LoggingEventListener(LOGGER), new com.gs.dmn.runtime.external.DefaultExternalFunctionExecutor(), new com.gs.dmn.runtime.cache.DefaultCache());
} catch (Exception e) {
logError("Cannot apply decision 'Monthly'", e);
return null;
}
}
public java.math.BigDecimal apply(String loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) {
try {
return apply((loan != null ? com.gs.dmn.serialization.JsonSerializer.OBJECT_MAPPER.readValue(loan, new com.fasterxml.jackson.core.type.TypeReference<type.LoanImpl>() {}) : null), annotationSet_, eventListener_, externalExecutor_, cache_);
} catch (Exception e) {
logError("Cannot apply decision 'Monthly'", e);
return null;
}
}
public java.math.BigDecimal apply(type.Loan loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_) {
return apply(loan, annotationSet_, new com.gs.dmn.runtime.listener.LoggingEventListener(LOGGER), new com.gs.dmn.runtime.external.DefaultExternalFunctionExecutor(), new com.gs.dmn.runtime.cache.DefaultCache());
}
public java.math.BigDecimal apply(type.Loan loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) {
try {
// Start decision 'monthly'
long monthlyStartTime_ = System.currentTimeMillis();
com.gs.dmn.runtime.listener.Arguments monthlyArguments_ = new com.gs.dmn.runtime.listener.Arguments();
monthlyArguments_.put("Loan", loan);
eventListener_.startDRGElement(DRG_ELEMENT_METADATA, monthlyArguments_);
// Evaluate decision 'monthly'
java.math.BigDecimal output_ = evaluate(loan, annotationSet_, eventListener_, externalExecutor_, cache_);
// End decision 'monthly'
eventListener_.endDRGElement(DRG_ELEMENT_METADATA, monthlyArguments_, output_, (System.currentTimeMillis() - monthlyStartTime_));
return output_;
} catch (Exception e) {
logError("Exception caught in 'monthly' evaluation", e);
return null;
}
}
protected java.math.BigDecimal evaluate(type.Loan loan, com.gs.dmn.runtime.annotation.AnnotationSet annotationSet_, com.gs.dmn.runtime.listener.EventListener eventListener_, com.gs.dmn.runtime.external.ExternalFunctionExecutor externalExecutor_, com.gs.dmn.runtime.cache.Cache cache_) {
return numericDivide(numericDivide(numericMultiply(((java.math.BigDecimal)(loan != null ? loan.getPrincipal() : null)), ((java.math.BigDecimal)(loan != null ? loan.getRate() : null))), number("12")), numericSubtract(number("1"), numericExponentiation(numericAdd(number("1"), numericDivide(((java.math.BigDecimal)(loan != null ? loan.getRate() : null)), number("12"))), numericUnaryMinus(((java.math.BigDecimal)(loan != null ? loan.getTerm() : null))))));
}
}
|
[
"opatrascoiu@yahoo.com"
] |
opatrascoiu@yahoo.com
|
d879cb235bb03fedc34ef1084e43bd324f279e9d
|
ea65710a42cfd1a0d4c4141ac5ba297c5e6287aa
|
/FoodSpoty/FoodSpoty/src/com/google/android/gms/games/snapshot/SnapshotMetadataChange.java
|
c0fcbb55e1e3f2db6b79abf626cb6680bbb0ac3b
|
[] |
no_license
|
kanwarbirsingh/ANDROID
|
bc27197234c4c3295d658d73086ada47a0833d07
|
f84b29f0f6bd483d791983d5eeae75555e997c36
|
refs/heads/master
| 2020-03-18T02:26:55.720337
| 2018-05-23T18:05:47
| 2018-05-23T18:05:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,039
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.games.snapshot;
import android.graphics.Bitmap;
import android.net.Uri;
import com.google.android.gms.common.data.a;
// Referenced classes of package com.google.android.gms.games.snapshot:
// SnapshotMetadataChangeEntity, SnapshotMetadata
public abstract class SnapshotMetadataChange
{
public static final class Builder
{
private String UO;
private Long afb;
private a afc;
private Uri afd;
public SnapshotMetadataChange build()
{
return new SnapshotMetadataChangeEntity(UO, afb, afc, afd);
}
public Builder fromMetadata(SnapshotMetadata snapshotmetadata)
{
UO = snapshotmetadata.getDescription();
afb = Long.valueOf(snapshotmetadata.getPlayedTime());
if (afb.longValue() == -1L)
{
afb = null;
}
afd = snapshotmetadata.getCoverImageUri();
if (afd != null)
{
afc = null;
}
return this;
}
public Builder setCoverImage(Bitmap bitmap)
{
afc = new a(bitmap);
afd = null;
return this;
}
public Builder setDescription(String s)
{
UO = s;
return this;
}
public Builder setPlayedTimeMillis(long l)
{
afb = Long.valueOf(l);
return this;
}
public Builder()
{
}
}
public static final SnapshotMetadataChange EMPTY_CHANGE = new SnapshotMetadataChangeEntity();
protected SnapshotMetadataChange()
{
}
public abstract Bitmap getCoverImage();
public abstract String getDescription();
public abstract Long getPlayedTimeMillis();
public abstract a mT();
}
|
[
"singhkanwar235@gmail.com"
] |
singhkanwar235@gmail.com
|
3f4681811c48d2be415bf3feaaa0b490d6120400
|
ad5cd983fa810454ccbb8d834882856d7bf6faca
|
/platform/ext/platformservices/testsrc/de/hybris/platform/catalog/KeywordServiceTest.java
|
9e8ddc83415e8cd143533f56fc45bdedec03f99a
|
[] |
no_license
|
amaljanan/my-hybris
|
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
|
ef9f254682970282cf8ad6d26d75c661f95500dd
|
refs/heads/master
| 2023-06-12T17:20:35.026159
| 2021-07-09T04:33:13
| 2021-07-09T04:33:13
| 384,177,175
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,180
|
java
|
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.catalog;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.catalog.daos.KeywordDao;
import de.hybris.platform.catalog.impl.DefaultKeywordService;
import de.hybris.platform.catalog.model.CatalogVersionModel;
import de.hybris.platform.catalog.model.KeywordModel;
import de.hybris.platform.servicelayer.exceptions.AmbiguousIdentifierException;
import de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException;
import java.util.Arrays;
import java.util.Collections;
import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
/**
* tests {@link DefaultKeywordService}
*/
@UnitTest
public class KeywordServiceTest
{
String keyword = "keyword";
String typecode = "Typecode";
CatalogVersionModel catalogVersion = new CatalogVersionModel();
private DefaultKeywordService keywordService;
@Mock
private KeywordDao keywordDao;
@Before
public void setUp()
{
MockitoAnnotations.initMocks(this);
keywordService = new DefaultKeywordService();
keywordService.setKeywordDao(keywordDao);
}
@Test
public void testGetKeyward()
{
final KeywordModel keywordModel = new KeywordModel();
Mockito.when(keywordDao.getKeywords(catalogVersion, keyword)).thenReturn(Collections.singletonList(keywordModel));
Assertions.assertThat(keywordService.getKeyword(catalogVersion, keyword)).isSameAs(keywordModel);
}
@Test
public void testGetKeywardFailToMany()
{
Mockito.when(keywordDao.getKeywords(catalogVersion, keyword)).thenReturn(
Arrays.asList(new KeywordModel(), new KeywordModel()));
assertThatThrownBy(() -> keywordService.getKeyword(catalogVersion, keyword))
.isInstanceOf(AmbiguousIdentifierException.class);
}
@Test
public void testGetKeywardFailNullArg()
{
assertThatThrownBy(() -> keywordService.getKeyword(null, keyword)).isInstanceOf(IllegalArgumentException.class);
assertThatThrownBy(() -> keywordService.getKeyword(catalogVersion, null)).isInstanceOf(IllegalArgumentException.class);
}
@Test
public void testGetKeywardFailEmpty()
{
Mockito.when(keywordDao.getKeywords(catalogVersion, keyword)).thenReturn(Collections.emptyList());
assertThatThrownBy(() -> keywordService.getKeyword(catalogVersion, keyword)).isInstanceOf(
UnknownIdentifierException.class);
}
@Test
public void testTypecodeGetKeyward()
{
final KeywordModel keywordModel = new KeywordModel();
Mockito.when(keywordDao.getKeywords(typecode, catalogVersion, keyword)).thenReturn(
Collections.singletonList(keywordModel));
Assertions.assertThat(keywordService.getKeyword(typecode, catalogVersion, keyword)).isSameAs(keywordModel);
}
@Test
public void testTypecodeGetKeywardFailToMany()
{
Mockito.when(keywordDao.getKeywords(typecode, catalogVersion, keyword)).thenReturn(
Arrays.asList(new KeywordModel(), new KeywordModel()));
assertThatThrownBy(() -> keywordService.getKeyword(typecode, catalogVersion, keyword))
.isInstanceOf(AmbiguousIdentifierException.class);
}
@Test
public void testTypecodeGetKeywardFailEmpty()
{
Mockito.when(keywordDao.getKeywords(typecode, catalogVersion, keyword)).thenReturn(Collections.emptyList());
assertThatThrownBy(() -> keywordService.getKeyword(typecode, catalogVersion, keyword)).isInstanceOf(
UnknownIdentifierException.class);
}
@Test
public void testTypecodeGetKeywardFailNullArg()
{
assertThatThrownBy(() -> keywordService.getKeyword(null, catalogVersion, keyword)).isInstanceOf(
IllegalArgumentException.class);
assertThatThrownBy(() -> keywordService.getKeyword(typecode, null, keyword)).isInstanceOf(IllegalArgumentException.class);
assertThatThrownBy(() -> keywordService.getKeyword(typecode, catalogVersion, null)).isInstanceOf(
IllegalArgumentException.class);
}
}
|
[
"amaljanan333@gmail.com"
] |
amaljanan333@gmail.com
|
15d7ebca0bdbcc4a5a415f0da9d1f0c23c1c1e2e
|
19156214d3c456e7aa9b34183a928ef144b3c206
|
/src/test-suite-dependencies/geotk-xml-base-3.21-sources/src/main/java/org/geotoolkit/internal/jaxb/gml/CodeListProxy.java
|
553755d84206a8b47ec97f2dce89fce8ac8fb1c1
|
[] |
no_license
|
opengeospatial/teamengine-offline
|
85549dbab9ff681c4f6b09dfabce1e4b85ce4206
|
6b81fc3fc4647e8f68ba433701199b0e68fc36d2
|
refs/heads/master
| 2021-01-01T19:24:08.817030
| 2014-12-18T17:35:06
| 2014-12-18T17:35:06
| 21,212,109
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,900
|
java
|
/*
* Geotoolkit.org - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2008-2012, Open Source Geospatial Foundation (OSGeo)
* (C) 2009-2012, Geomatys
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package org.geotoolkit.internal.jaxb.gml;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.XmlAttribute;
import org.opengis.util.CodeList;
import org.geotoolkit.internal.CodeLists;
/**
* JAXB adapter for {@link GMLCodeList}, in order to integrate the value in an element
* complying with OGC/ISO standard.
* <p>
* This implementation can not be merged with {@link GMLCodeList} because we are not
* allowed to use {@code @XmlValue} annotation in a class that extend an other class.
*
* @author Guilhem Legal (Geomatys)
* @version 3.20
*
* @since 3.20 (derived from 3.00)
* @module
*/
public final class CodeListProxy {
/**
* The code space of the {@linkplain #identifier} as an URI, or {@code null}.
*/
@XmlAttribute
String codeSpace;
/**
* The code list identifier.
*/
@XmlValue
String identifier;
/**
* Empty constructor for JAXB only.
*/
public CodeListProxy() {
}
/**
* Creates a new adapter for the given value.
*/
CodeListProxy(final String codeSpace, final CodeList<?> value) {
this.codeSpace = codeSpace;
this.identifier = CodeLists.identifier(value);
}
}
|
[
"rjmartell@computer.org"
] |
rjmartell@computer.org
|
669b5f74e49c28d36a81bb3b36ee881dd735313b
|
0f95f50be23e409c083dd8562452cd8ca55b743c
|
/boss/src/com/tstar/callcenter/pub/tools/ParamUtil.java
|
1e9135c1d81d43f5ac219e6d6c48457252a55fb6
|
[] |
no_license
|
RisingStar20/yan
|
727d467bb43fb6fd911de9dcd73621376e5dc9c4
|
7002f62eac5872788715760f9af20af1d71173f3
|
refs/heads/master
| 2020-05-09T12:21:42.681959
| 2018-04-12T15:01:00
| 2018-04-12T15:01:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 364
|
java
|
package com.tstar.callcenter.pub.tools;
import java.util.Map;
public class ParamUtil {
public static Map<String,String[]> USER_NO_TEL_MAP;
public static Map<String, String[]> getUSER_NO_TEL_MAP() {
return USER_NO_TEL_MAP;
}
public static void setUSER_NO_TEL_MAP(Map<String, String[]> uSER_NO_TEL_MAP) {
USER_NO_TEL_MAP = uSER_NO_TEL_MAP;
}
}
|
[
"250739104@qq.com"
] |
250739104@qq.com
|
9b261e0ff2d6d153a24b645d27af51bd5617dd45
|
d81473c47713c687dc0f7cdd6ca27d1a79890435
|
/src/main/java/de/kekru/struktogrammeditor/control/OS.java
|
d60823c7d7728fb333e9f62fa4c276cc80c8ae33
|
[
"MIT"
] |
permissive
|
FairyTail2000/struktogrammeditor
|
b67e54ac08f25792e845a5aa9cba53cf4e477720
|
94c3a4a97386de911f919181f6f6812a618b9ac6
|
refs/heads/master
| 2020-08-05T01:33:59.963292
| 2020-07-09T20:29:39
| 2020-07-09T20:29:39
| 212,349,107
| 0
| 0
|
MIT
| 2019-10-02T13:29:23
| 2019-10-02T13:29:23
| null |
UTF-8
|
Java
| false
| false
| 365
|
java
|
package de.kekru.struktogrammeditor.control;
public class OS {
public static boolean windows = false, linux = false, mac = false;
static {
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
windows = true;
} else if (System.getProperty("os.name").toLowerCase().contains("mac")) {
mac = true;
} else {
linux = true;
}
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
0caad42c3a9a4a0a6cd166df837370fab70bb1d9
|
ff79e46531d5ad204abd019472087b0ee67d6bd5
|
/server-chat/src/och/chat/web/servlet/api/GetUpdatesResp.java
|
dc610ec48fd13e6ee8a4f536c1fde71761465394
|
[
"Apache-2.0"
] |
permissive
|
Frankie-666/live-chat-engine
|
24f927f152bf1ef46b54e3d55ad5cf764c37c646
|
3125d34844bb82a34489d05f1dc5e9c4aaa885a0
|
refs/heads/master
| 2020-12-25T16:36:00.156135
| 2015-08-16T09:16:57
| 2015-08-16T09:16:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 829
|
java
|
/*
* Copyright 2015 Evgeny Dolganov (evgenij.dolganov@gmail.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package och.chat.web.servlet.api;
import och.chat.web.model.ChatLogResp;
public class GetUpdatesResp {
public ChatLogResp log;
public GetUpdatesResp(ChatLogResp log) {
this.log = log;
}
}
|
[
"evgenij.dolganov@gmail.com"
] |
evgenij.dolganov@gmail.com
|
047641bc967539c8d2ea70bdba0e0ef8f78bdee5
|
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
|
/SCT2/tags/BEFORE_TYPE_SYSTEM/plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/EventSpecImpl.java
|
afb0d221d120c9cfea490396f9bce7918102b0d3
|
[] |
no_license
|
huybuidac20593/yakindu
|
377fb9100d7db6f4bb33a3caa78776c4a4b03773
|
304fb02b9c166f340f521f5e4c41d970268f28e9
|
refs/heads/master
| 2021-05-29T14:46:43.225721
| 2015-05-28T11:54:07
| 2015-05-28T11:54:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 862
|
java
|
/**
*/
package org.yakindu.sct.model.stext.stext.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.yakindu.sct.model.stext.stext.EventSpec;
import org.yakindu.sct.model.stext.stext.StextPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Event Spec</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class EventSpecImpl extends MinimalEObjectImpl.Container implements EventSpec {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EventSpecImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return StextPackage.Literals.EVENT_SPEC;
}
} //EventSpecImpl
|
[
"a.muelder@googlemail.com"
] |
a.muelder@googlemail.com
|
dcfe707eb4a5674ffe165f4d897ce1846b3ea3ba
|
61e1dd73579e4587ada4512a5281d89ed3160ff4
|
/src/main/java/cc/bukkit/item/ChainItemMeta.java
|
27947e0802ad0cb98e6578fa0f88b625b6901f8a
|
[
"MIT"
] |
permissive
|
bukkitcommons/BukkitCommons
|
ed504dc4a8a4399a1736ea94819184ddd0459418
|
c59c64b4602698e5a0db09634018af26c8a92cf0
|
refs/heads/master
| 2020-05-17T18:44:05.323496
| 2019-05-25T14:52:01
| 2019-05-25T14:52:01
| 183,893,344
| 7
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,986
|
java
|
package cc.bukkit.item;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.tags.CustomItemTagContainer;
import com.google.common.collect.Multimap;
import cc.bukkit.item.interfaces.ItemMetaSupplier;
import cc.bukkit.item.interfaces.ItemStackSupplier;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class ChainItemMeta implements ItemStackSupplier, ItemMetaSupplier {
protected final ItemStack item;
protected final ItemMeta meta;
@Override
public ItemMeta toItemMeta() {
return meta;
}
@Override
public ItemStack toItemStack() {
return item;
}
/**
*
* @return
*/
public ItemMetaReference reference() {
return new ItemMetaReference(item, meta);
}
// Performance things
/**
*
* @param itemStack
* @return
*/
public ChainItemMeta setMetaFor(ItemStack itemStack) {
itemStack.setItemMeta(meta);
return this;
}
/**
*
* @param itemStacks
* @return
*/
public ChainItemMeta setMetaFor(ItemStack... itemStacks) {
for (ItemStack itemStack : itemStacks)
itemStack.setItemMeta(meta);
return this;
}
/**
*
* @param clip
* @return
*/
public ChainItemMeta applyMetaClip(ItemMetaClip clip) {
clip.applyFor(meta);
return this;
}
// ------------------------------
// Setter
// ------------------------------
public ChainItemMeta addEnchant(Enchantment ench, int level, boolean ignoreLevelRestriction) {
meta.addEnchant(ench, level, ignoreLevelRestriction);
return this;
}
public ChainItemMeta removeEnchant(Enchantment ench) {
meta.removeEnchant(ench);
return this;
}
public ChainItemMeta getAttributeModifiers(EquipmentSlot slot) {
meta.getAttributeModifiers(slot);
return this;
}
public ChainItemMeta getAttributeModifiers(Attribute attribute) {
meta.getAttributeModifiers(attribute);
return this;
}
public ChainItemMeta addAttributeModifier(Attribute attribute, AttributeModifier modifier) {
meta.addAttributeModifier(attribute, modifier);
return this;
}
public ChainItemMeta removeAttributeModifier(Attribute attribute) {
meta.removeAttributeModifier(attribute);
return this;
}
public ChainItemMeta removeAttributeModifier(EquipmentSlot slot) {
meta.removeAttributeModifier(slot);
return this;
}
public ChainItemMeta removeAttributeModifier(Attribute attribute, AttributeModifier modifier) {
meta.removeAttributeModifier(attribute, modifier);
return this;
}
public ChainItemMeta setAttributeModifiers(Multimap<Attribute, AttributeModifier> attributeModifiers) {
meta.setAttributeModifiers(attributeModifiers);
return this;
}
public ChainItemMeta setDisplayName(String name) {
meta.setDisplayName(name);
return this;
}
public ChainItemMeta setLore(List<String> lore) {
meta.setLore(lore);
return this;
}
public ChainItemMeta setLocalizedName(String name) {
meta.setLocalizedName(name);
return this;
}
public ChainItemMeta addItemFlags(ItemFlag... itemFlags) {
meta.addItemFlags(itemFlags);
return this;
}
public ChainItemMeta removeItemFlags(ItemFlag... itemFlags) {
meta.removeItemFlags(itemFlags);
return this;
}
public ChainItemMeta setUnbreakable(boolean unbreakable) {
meta.setUnbreakable(unbreakable);
return this;
}
// ------------------------------
// Getter
// ------------------------------
public Map<String, Object> serialize() {
return meta.serialize();
}
public boolean hasDisplayName() {
return meta.hasDisplayName();
}
public String getDisplayName() {
return meta.getDisplayName();
}
public boolean hasLocalizedName() {
return meta.hasLocalizedName();
}
public String getLocalizedName() {
return meta.getLocalizedName();
}
public boolean hasLore() {
return meta.hasLore();
}
public List<String> getLore() {
return meta.getLore();
}
public boolean hasEnchants() {
return meta.hasEnchants();
}
public boolean hasEnchant(Enchantment ench) {
return meta.hasEnchant(ench);
}
public int getEnchantLevel(Enchantment ench) {
return meta.getEnchantLevel(ench);
}
public Map<Enchantment, Integer> getEnchants() {
return meta.getEnchants();
}
public boolean hasConflictingEnchant(Enchantment ench) {
return meta.hasConflictingEnchant(ench);
}
public Set<ItemFlag> getItemFlags() {
return meta.getItemFlags();
}
public boolean hasItemFlag(ItemFlag flag) {
return meta.hasItemFlag(flag);
}
public boolean isUnbreakable() {
return meta.isUnbreakable();
}
public boolean hasAttributeModifiers() {
return meta.hasAttributeModifiers();
}
public Multimap<Attribute, AttributeModifier> getAttributeModifiers() {
return meta.getAttributeModifiers();
}
public CustomItemTagContainer getCustomTagContainer() {
return meta.getCustomTagContainer();
}
public ItemMeta clone() {
return meta.clone();
}
public org.bukkit.inventory.meta.ItemMeta.Spigot spigot() {
return meta.spigot();
}
}
|
[
"i@omc.hk"
] |
i@omc.hk
|
42be9a1830c8ba6cd2796cb52e0e8389712d2db8
|
385e3414ccb7458bbd3cec326320f11819decc7b
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/EFResponseData.java
|
c9e9b416913c5acb5c5c87c9bb9997f2146e8bde
|
[] |
no_license
|
carlos22211/Tango_AL813
|
14de7f2693c3045b9d3c0cb52017ba2bb6e6b28f
|
b50b1b7491dc9c5e6b92c2d94503635c43e93200
|
refs/heads/master
| 2020-03-28T08:09:11.127995
| 2017-06-26T05:05:29
| 2017-06-26T05:05:29
| 147,947,860
| 1
| 0
| null | 2018-09-08T15:55:46
| 2018-09-08T15:55:45
| null |
UTF-8
|
Java
| false
| false
| 3,183
|
java
|
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek inc. and/or its licensors,
* any reproduction, modification, use or disclosure of MediaTek Software,
* and information contained herein, in whole or in part, shall be strictly prohibited.
*/
/* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
* THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
* CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
* SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
* CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek Software")
* have been modified by MediaTek Inc. All revisions are subject to any receiver's
* applicable license agreements with MediaTek Inc.
*/
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.internal.telephony;
public class EFResponseData {
private static final int RESPONSE_DATA_FILE_STATUS = 11;
private int mFileStatus;
public EFResponseData(byte[] data) {
mFileStatus = data[RESPONSE_DATA_FILE_STATUS] & 0xFF;
}
public int getFileStatus() {
return mFileStatus;
}
}
|
[
"zhangjinqiang@huaqin.com"
] |
zhangjinqiang@huaqin.com
|
c8d00b499594a7c43bb919ffcab04c19b5b875de
|
a735a57eaa585658175a929e205998c68274cb84
|
/src/Ynzc/YnzcAms/Service/Impl/CarCheckServiceImpl.java
|
48c06641a19b195f37c270ece67cba48a86e95b9
|
[] |
no_license
|
liuxiaoqiang/test2
|
9617c9d4bb4476ae46b4a409ceaab253342a3899
|
269fd31702a3a69a7d70dad2685188ddf61542a2
|
refs/heads/master
| 2016-08-09T23:04:03.234229
| 2016-03-25T07:43:24
| 2016-03-25T08:00:38
| 54,703,219
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,199
|
java
|
package Ynzc.YnzcAms.Service.Impl;
import java.util.List;
import Ynzc.YnzcAms.Dao.CarCheckDao;
import Ynzc.YnzcAms.Model.CarCheck;
import Ynzc.YnzcAms.Model.CarCheckView;
import Ynzc.YnzcAms.Model.Page;
import Ynzc.YnzcAms.Model.TractorRegistrationRecordProcessSource;
import Ynzc.YnzcAms.Service.CarCheckService;
public class CarCheckServiceImpl implements CarCheckService {
private CarCheckDao carCheckDao;
public CarCheckDao getCarCheckDao() {
return carCheckDao;
}
public void setCarCheckDao(CarCheckDao carCheckDao) {
this.carCheckDao = carCheckDao;
}
public List<CarCheck> getAllModelList(Page page, String conditions) {
// TODO Auto-generated method stub
return this.carCheckDao.getAllModelList(page, conditions);
}
public List<CarCheck> getAllModelList() {
// TODO Auto-generated method stub
return this.carCheckDao.getAllModelList();
}
public CarCheck findModelById(int id) {
// TODO Auto-generated method stub
return this.carCheckDao.findModelById(id);
}
public boolean addCarCheck(CarCheck model) {
// TODO Auto-generated method stub
return this.carCheckDao.addModel(model);
}
public boolean delModel(CarCheck model) {
// TODO Auto-generated method stub
return this.carCheckDao.delModel(model);
}
public boolean updateCarCheck(CarCheck model) {
// TODO Auto-generated method stub
return this.carCheckDao.updateModel(model);
}
public List<CarCheckView> getCarCheckViewList(Page page, String conditions,
int userid) {
// TODO Auto-generated method stub
return this.carCheckDao.getCarCheckViewList(page, conditions, userid);
}
public List<CarCheck> findCarCheckingByTractorinfoId(String tractorids) {
// TODO Auto-generated method stub
return this.carCheckDao.findCarCheckingByTractorinfoId(tractorids);
}
public boolean delCarCheckByIds(String ids) {
// TODO Auto-generated method stub
return this.carCheckDao.delCarCheckByIds(ids);
}
public boolean updateCarCheckStateByIds(int state, String ids) {
// TODO Auto-generated method stub
return this.carCheckDao.updateCarCheckStateByIds(state, ids);
}
public boolean auditCarCheck(int state, String checkuser, String checkip,
String checkcontext, String ids) {
// TODO Auto-generated method stub
return this.carCheckDao.auditCarCheck(state, checkuser, checkip, checkcontext, ids);
}
public List<CarCheckView> getCarCheckViewListByIds(String ids){
return this.carCheckDao.getCarCheckViewListByIds(ids);
}
public List<TractorRegistrationRecordProcessSource> recordReport(int id){
return carCheckDao.recordReport(id);
}
public List<CarCheckView> getCarCheckViewList(Page page, String conditions,
String regionid) {
// TODO Auto-generated method stub
return carCheckDao.getCarCheckViewList(page, conditions, regionid);
}
public List<CarCheckView> getFilingList(Page page, String conditions,
String regionid) {
// TODO Auto-generated method stub
return carCheckDao.getFilingList(page, conditions, regionid);
}
public List<CarCheckView> getFilingListQuery(Page page, String conditions,
String regionid) {
// TODO Auto-generated method stub
return carCheckDao.getFilingListQuery(page, conditions, regionid);
}
}
|
[
"liuxiaoqiang_0625@163.com"
] |
liuxiaoqiang_0625@163.com
|
fdfb929ef212d556eeaa051750ba9634c8b99ca5
|
05bd228f6fd74fcf706835975e8f2aa72b9fe649
|
/app/src/main/java/com/lwd/qjtv/view/RaceNumView.java
|
33928326359e276849b6577008bf83ff90077ba5
|
[
"Apache-2.0"
] |
permissive
|
541660139/qjtv
|
a17163763fdebe7574d4b3811e4590b169eee554
|
a2aed5aca0e7a4211226e1a8a6f5e63c4f401fc5
|
refs/heads/master
| 2020-03-30T07:26:03.479686
| 2018-09-30T06:48:49
| 2018-09-30T06:48:49
| 150,939,249
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 684
|
java
|
package com.lwd.qjtv.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import com.lwd.qjtv.R;
/**
* Email:wwwiiivip@yeah.net
* Created by ZhengQian on 2017/5/19.
*/
public class RaceNumView extends LinearLayout {
public RaceNumView(Context context) {
this(context,null);
}
public RaceNumView(Context context, AttributeSet attrs) {
this(context, attrs,0);
}
public RaceNumView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
View.inflate(context, R.layout.item_race_view_layout, this);
}
}
|
[
"541660139@qq.com"
] |
541660139@qq.com
|
d71022506f64df1e4d2329762155f67d71dff9fe
|
d463e82f8f9c71213f95e8744d2316d0adfb9755
|
/scan-lead-tools/lib/leadtools.src/leadtools/LeadFileStream.java
|
9c15bb76baebddbda8dba03b4f2a8c3ec5841306
|
[] |
no_license
|
wahid-nwr/docArchive
|
b3a7d7ecf5d69a7483786fc9758e3c4d1520134d
|
058e58bb45d91877719c8f9b560100ed78e6746d
|
refs/heads/master
| 2020-03-14T07:06:09.629722
| 2018-05-01T18:23:55
| 2018-05-01T18:23:55
| 131,496,664
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,757
|
java
|
/* */ package leadtools;
/* */
/* */ public final class LeadFileStream
/* */ implements ILeadStream
/* */ {
/* */ private String _fileName;
/* */
/* */ public LeadFileStream(String fileName)
/* */ {
/* 5 */ if (fileName == null) {
/* 6 */ throw new ArgumentNullException("fileName");
/* */ }
/* 8 */ this._fileName = fileName;
/* */ }
/* */
/* */ public String getFileName()
/* */ {
/* 14 */ return this._fileName;
/* */ }
/* */
/* */ public boolean canSeek() {
/* 18 */ return true;
/* */ }
/* */
/* */ public boolean canRead() {
/* 22 */ return true;
/* */ }
/* */
/* */ public boolean canWrite() {
/* 26 */ return true;
/* */ }
/* */
/* */ public boolean isStarted() {
/* 30 */ return false;
/* */ }
/* */
/* */ public boolean start() {
/* 34 */ return true;
/* */ }
/* */
/* */ public void stop(boolean resetPosition) {
/* */ }
/* */
/* */ public boolean openFile(String fileName, LeadStreamMode mode, LeadStreamAccess access, LeadStreamShare share) {
/* 41 */ return false;
/* */ }
/* */
/* */ public int read(byte[] buffer, int count) {
/* 45 */ return 0;
/* */ }
/* */
/* */ public int write(byte[] buffer, int count) {
/* 49 */ return 0;
/* */ }
/* */
/* */ public long seek(LeadSeekOrigin origin, long offset) {
/* 53 */ return -1L;
/* */ }
/* */
/* */ public void closeFile()
/* */ {
/* */ }
/* */ }
/* Location: /home/wahid/Downloads/docArchive/scan/lib/leadtools.jar
* Qualified Name: leadtools.LeadFileStream
* JD-Core Version: 0.6.2
*/
|
[
"wahid_nwr@yahoo.com"
] |
wahid_nwr@yahoo.com
|
37c8a67e40ebe1f544431daf04dd5903dd5529d8
|
e7c02b26e6da1b0652203285071edef433fae4cb
|
/rest-annotations/src/main/java/one/xingyi/restAnnotations/javascript/XingYiDomain.java
|
d9ae10a37453bb172e463faab29413c4f20446ea
|
[] |
no_license
|
phil-rice/rest
|
155af53fe32e6571001a4b640fcb546896e24dc8
|
3a31ce94c04871faded6fea645c2da0d99e342bb
|
refs/heads/master
| 2020-04-15T19:11:11.276133
| 2019-01-18T00:58:20
| 2019-01-18T00:58:20
| 164,940,369
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 196
|
java
|
package one.xingyi.restAnnotations.javascript;
abstract public class XingYiDomain {
public final Object mirror;
public XingYiDomain(Object mirror) {
this.mirror = mirror;
}
}
|
[
"phil.rice@iee.org"
] |
phil.rice@iee.org
|
66801dc58084f983fbc9615d748c7cf7115415e4
|
ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd
|
/Talagram/com/google/android/gms/internal/phenotype/zzb.java
|
c5fd9200882d52c480f4b20c24ff49e0d9702baf
|
[] |
no_license
|
danielperez9430/Third-party-Telegram-Apps-Spy
|
dfe541290c8512ca366e401aedf5cc5bfcaa6c3e
|
f6fc0f9c677bd5d5cd3585790b033094c2f0226d
|
refs/heads/master
| 2020-04-11T23:26:06.025903
| 2018-12-18T10:07:20
| 2018-12-18T10:07:20
| 162,166,647
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 128
|
java
|
package com.google.android.gms.internal.phenotype;
import android.os.IInterface;
public interface zzb extends IInterface {
}
|
[
"dpefe@hotmail.es"
] |
dpefe@hotmail.es
|
ccdd1b3a34e659259f15241b401fef2731feac0c
|
34221f3f7738d7a33c693e580dc6a99789349cf3
|
/app/src/main/java/defpackage/dis.java
|
90710cc23e10bc23712af4b7cdac862100e2568a
|
[] |
no_license
|
KobeGong/TasksApp
|
0c7b9f3f54bc4be755b1f605b41230822d6f9850
|
aacdd5cbf0ba073460797fa76f1aaf2eaf70f08e
|
refs/heads/master
| 2023-08-16T07:11:13.379876
| 2021-09-25T17:38:57
| 2021-09-25T17:38:57
| 374,659,931
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 279
|
java
|
package defpackage;
/* renamed from: dis reason: default package */
/* compiled from: PG */
public final class dis extends defpackage.dir {
public static final long serialVersionUID = 3283890091615336259L;
public dis(java.lang.String str) {
super(str);
}
}
|
[
"droidevapp1023@gmail.com"
] |
droidevapp1023@gmail.com
|
57740e50076b2cc61fd2cbaaf9033cd28eafcc9c
|
3f1957d6b8672711e58bff07cb3e24f342831c92
|
/lvlistenkeyboardevent/src/main/java/com/lv/listenkeyboardevent/SimpleUnregistrar.java
|
60cccf787f793d0e381a75ca1e1ad8111da4edd8
|
[] |
no_license
|
vihahb/xMec
|
782391a959d07b4a5a7747fe9173e9aad932d218
|
9da3333246aa1d0881b516777cedbb47aecf31b8
|
refs/heads/master
| 2021-03-27T12:42:23.427401
| 2017-08-11T12:19:14
| 2017-08-11T12:19:14
| 79,198,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,578
|
java
|
package com.lv.listenkeyboardevent;
import android.app.Activity;
import android.os.Build;
import android.view.View;
import android.view.ViewTreeObserver;
import java.lang.ref.WeakReference;
/**
* Created by Vulcl on 3/24/2017
*/
public class SimpleUnregistrar implements Unregistrar {
private WeakReference<Activity> mActivityWeakReference;
private WeakReference<ViewTreeObserver.OnGlobalLayoutListener> mOnGlobalLayoutListenerWeakReference;
public SimpleUnregistrar(Activity activity, ViewTreeObserver.OnGlobalLayoutListener globalLayoutListener) {
mActivityWeakReference = new WeakReference<>(activity);
mOnGlobalLayoutListenerWeakReference = new WeakReference<>(globalLayoutListener);
}
@Override
public void unregister() {
Activity activity = mActivityWeakReference.get();
ViewTreeObserver.OnGlobalLayoutListener globalLayoutListener = mOnGlobalLayoutListenerWeakReference.get();
if (null != activity && null != globalLayoutListener) {
View activityRoot = KeyboardVisibilityEvent.getActivityRoot(activity);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
activityRoot.getViewTreeObserver()
.removeOnGlobalLayoutListener(globalLayoutListener);
} else {
activityRoot.getViewTreeObserver()
.removeGlobalOnLayoutListener(globalLayoutListener);
}
}
mActivityWeakReference.clear();
mOnGlobalLayoutListenerWeakReference.clear();
}
}
|
[
"vihahb@gmail.com"
] |
vihahb@gmail.com
|
735250fd40a031d94fa34ae710a4fb20badc7dd3
|
176ff23723df0bbf555a4cfc3dec5264f60b82f1
|
/src/main/java/com/company/binaryTree/BinaryTreeTest.java
|
ad58aa12c487e9d2ba4dfd9f6ed897adb8259b19
|
[] |
no_license
|
doyoung0205/live-study
|
6c8df1c2989793f72f6466eb195ca5517932a37d
|
d8f8a8eba4d30636152ee8491ecab7a9bf3910e1
|
refs/heads/main
| 2023-03-26T23:30:14.853907
| 2021-03-14T06:51:51
| 2021-03-14T06:51:51
| 323,946,499
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,993
|
java
|
package com.company.binaryTree;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class BinaryTreeTest {
private static BinaryTree binaryTree;
final static int rootValue = 23;
@BeforeEach
public void rootInit() {
binaryTree = new BinaryTree(new Node(rootValue));
}
@Test
@DisplayName("dfs")
void dfs() throws IllegalAccessException {
// given
final BinaryTree binaryTree = sampleBinaryTree();
// when
final boolean result = binaryTree.dfs(35);
// then
assertTrue(result);
}
@Test
@DisplayName("bfs")
void bfs() throws IllegalAccessException {
// given
final BinaryTree binaryTree = sampleBinaryTree();
// when
final boolean result = binaryTree.bfs(35);
// then
assertTrue(result);
}
@Test
@DisplayName("이진트리에 값을 삭제 하는 경우")
void deleteNode() throws IllegalAccessException {
// given
final Node root = sampleBinaryTree().getRoot();
// when
assertEquals(root.getRight().getValue(), 29);
BinaryTreeTest.binaryTree.deleteNode(29);
// then
assertAll(() -> {
assertEquals(root.getRight().getValue(), 33);
assertNotEquals(root.getRight().getValue(), 29);
});
}
@Test
@DisplayName("이진트리에 중복값이 들어갔을 경우")
void insertDuplicateValue() {
// given
binaryTree = new BinaryTree(new Node(rootValue));
// when
// then
}
@Test
@DisplayName("이진트리에 제대로 들어 갔을 경우")
void insertNode() throws IllegalAccessException {
// given
final Node root = sampleBinaryTree().getRoot();
assertAll(() -> {
assertEquals(root.getLeft().getValue(), 10);
assertEquals(root.getLeft().getLeft().getValue(), 4);
assertEquals(root.getLeft().getLeft().getLeft().getValue(), 3);
assertEquals(root.getRight().getValue(), 29);
assertEquals(root.getRight().getLeft().getValue(), 28);
assertEquals(root.getRight().getLeft().getLeft().getValue(), 27);
assertEquals(root.getRight().getRight().getValue(), 40);
assertEquals(root.getRight().getRight().getLeft().getValue(), 33);
assertEquals(root.getRight().getRight().getRight().getValue(), 50);
assertEquals(root.getRight().getRight().getLeft().getRight().getValue(), 35);
});
}
private BinaryTree sampleBinaryTree() throws IllegalAccessException {
// root 23 에서 왼족으로 10 삽입
binaryTree.insertNode(10);
// root 23 에서 오른족으로 15 삽입
binaryTree.insertNode(29);
// 29 노드 에서 왼족으로 28 삽입
binaryTree.insertNode(28);
// 27 노드 에서 왼족으로 28 삽입
binaryTree.insertNode(27);
// 29 노드 에서 오른쪽으로 40 삽입
binaryTree.insertNode(40);
// 40 노드 에서 왼쪽으로 33 삽입
binaryTree.insertNode(33);
// 40 노드 에서 오른쪽으로 50 삽입
binaryTree.insertNode(50);
// 33 노드 에서 오른쪽으로 35 삽입
binaryTree.insertNode(35);
// 33 노드 에서 왼쪽으로 32 삽입
binaryTree.insertNode(32);
// 10 노드 에서 왼쪽으로 4 삽입
binaryTree.insertNode(4);
// 10 노드 에서 오른쪽으로 11 삽입
binaryTree.insertNode(11);
// 4 노드 에서 왼쪽으로 3 삽입
binaryTree.insertNode(3);
return binaryTree;
}
@Test
@DisplayName("루트 초기화 23 인가요?")
void initRoot() {
assertEquals(binaryTree.getRoot().getValue(), 23);
}
}
|
[
"doyoung0205@naver.com"
] |
doyoung0205@naver.com
|
cf599f543ce6a970ceb6ab06f461c9898a7e9b63
|
377e5e05fb9c6c8ed90ad9980565c00605f2542b
|
/.gitignore/bin/ext-accelerator/b2bpunchout/src/org/cxml/StatusUpdateRequest.java
|
dcdeecdc6bae39cdaa00fa3c8916d79396ee44c5
|
[] |
no_license
|
automaticinfotech/HybrisProject
|
c22b13db7863e1e80ccc29774f43e5c32e41e519
|
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
|
refs/heads/master
| 2021-07-20T18:41:04.727081
| 2017-10-30T13:24:11
| 2017-10-30T13:24:11
| 108,957,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,137
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*
*
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.05.12 at 07:19:30 PM EDT
//
package org.cxml;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"documentReference",
"status",
"paymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus",
"extrinsic"
})
@XmlRootElement(name = "StatusUpdateRequest")
public class StatusUpdateRequest {
@XmlElement(name = "DocumentReference")
protected DocumentReference documentReference;
@XmlElement(name = "Status", required = true)
protected Status status;
@XmlElements({
@XmlElement(name = "PaymentStatus", type = PaymentStatus.class),
@XmlElement(name = "SourcingStatus", type = SourcingStatus.class),
@XmlElement(name = "InvoiceStatus", type = InvoiceStatus.class),
@XmlElement(name = "DocumentStatus", type = DocumentStatus.class)
})
protected List<Object> paymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus;
@XmlElement(name = "Extrinsic")
protected List<Extrinsic> extrinsic;
/**
* Gets the value of the documentReference property.
*
* @return
* possible object is
* {@link DocumentReference }
*
*/
public DocumentReference getDocumentReference() {
return documentReference;
}
/**
* Sets the value of the documentReference property.
*
* @param value
* allowed object is
* {@link DocumentReference }
*
*/
public void setDocumentReference(DocumentReference value) {
this.documentReference = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link Status }
*
*/
public Status getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link Status }
*
*/
public void setStatus(Status value) {
this.status = value;
}
/**
* Gets the value of the paymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the paymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getPaymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link PaymentStatus }
* {@link SourcingStatus }
* {@link InvoiceStatus }
* {@link DocumentStatus }
*
*
*/
public List<Object> getPaymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus() {
if (paymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus == null) {
paymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus = new ArrayList<Object>();
}
return this.paymentStatusOrSourcingStatusOrInvoiceStatusOrDocumentStatus;
}
/**
* Gets the value of the extrinsic property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the extrinsic property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getExtrinsic().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Extrinsic }
*
*
*/
public List<Extrinsic> getExtrinsic() {
if (extrinsic == null) {
extrinsic = new ArrayList<Extrinsic>();
}
return this.extrinsic;
}
}
|
[
"santosh.kshirsagar@automaticinfotech.com"
] |
santosh.kshirsagar@automaticinfotech.com
|
28ebc6b9c87644f08cd8435b12ce0c9e14544255
|
05b3e5ad846c91bbfde097c32d5024dced19aa1d
|
/JavaProgramming/src/ch12/exam14/ExecuteServiceExample2.java
|
36e383b048ee241c25bef5a0abde24c136fb0b72
|
[] |
no_license
|
yjs0511/MyRepository
|
4c2b256cb8ac34869cce8dfe2b1d2ab163b0e5ec
|
63bbf1f607f9d91374649bb7cacdf532b52e613b
|
refs/heads/master
| 2020-04-12T03:05:29.993060
| 2016-11-17T04:34:51
| 2016-11-17T04:34:51
| 65,808,570
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 751
|
java
|
package ch12.exam14;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class ExecuteServiceExample2 {
public static void main(String[] args) {
// ThreadPool 생성
ExecutorService executorService = Executors.newFixedThreadPool(100);
for (int i = 0; i < 100; i++) {
int count = i;
// 작업 생성
Runnable task = new Runnable() {
@Override
public void run() {
for (int i = 0; i < 10; i++) {
System.out.println("실행 중 ... : (" +count+ ")" + Thread.currentThread().getName());
}
}
};
// 작업 큐에 작업 넣기
executorService.submit(task);
}
// 스레드풀 종료
executorService.shutdown();
}
}
|
[
"hypermega22@gmail.com"
] |
hypermega22@gmail.com
|
733ad113c8db58add38542ef8aa2677d9bd14b7b
|
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
|
/bin/ext-integration/sap/core/sapmodelbackoffice/src/de/hybris/platform/sapmodelbackoffice/SapmodelbackofficeStandalone.java
|
d89e66508d019aa0d524d869ca84e53e9a0c786b
|
[] |
no_license
|
sujanrimal/GiftCardProject
|
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
|
e0398eec9f4ec436d20764898a0255f32aac3d0c
|
refs/heads/master
| 2020-12-11T18:05:17.413472
| 2020-01-17T18:23:44
| 2020-01-17T18:23:44
| 233,911,127
| 0
| 0
| null | 2020-06-18T15:26:11
| 2020-01-14T18:44:18
| null |
UTF-8
|
Java
| false
| false
| 2,036
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.sapmodelbackoffice;
import de.hybris.platform.core.Registry;
import de.hybris.platform.jalo.JaloSession;
import de.hybris.platform.util.RedeployUtilities;
import de.hybris.platform.util.Utilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Demonstration of how to write a standalone application that can be run directly from within eclipse or from the
* commandline.<br>
* To run this from commandline, just use the following command:<br>
* <code>
* java -jar bootstrap/bin/ybootstrap.jar "new de.hybris.platform.sapmodelbackoffice.SapmodelbackofficeStandalone().run();"
* </code> From eclipse, just run as Java Application. Note that you maybe need to add all other projects like
* ext-commerce, ext-pim to the Launch configuration classpath.
*/
public class SapmodelbackofficeStandalone
{
private static final Logger LOGGER = LoggerFactory.getLogger(SapmodelbackofficeStandalone.class);
/**
* Main class to be able to run it directly as a java program.
*
* @param args
* the arguments from commandline
*/
public static void main(final String[] args)
{
new SapmodelbackofficeStandalone().run();
}
public void run()
{
Registry.activateStandaloneMode();
Registry.activateMasterTenant();
final JaloSession jaloSession = JaloSession.getCurrentSession();
final String sessionIDMessage = String.format("Session ID: %s", jaloSession.getSessionID());
final String userMessage = String.format("User: %s", jaloSession.getUser());
LOGGER.info(sessionIDMessage);
LOGGER.info(userMessage);
Utilities.printAppInfo();
RedeployUtilities.shutdown();
}
}
|
[
"travis.d.crawford@accenture.com"
] |
travis.d.crawford@accenture.com
|
66d7434518e8058e388d5a8bfdd52e720aa75758
|
a8cc070ce9d9883384038fa5d32f4c3722da62a0
|
/server/java/com/l2jserver/gameserver/util/Broadcast.java
|
e807eaa897c3aefffd953899cacee48728a0026a
|
[] |
no_license
|
gyod/l2jtw_pvp_server
|
c3919d6070b389eec533687c376bf781b1472772
|
ce886d33b7f0fcf484c862f54384336597f5bc53
|
refs/heads/master
| 2021-01-09T09:34:10.397333
| 2014-12-06T13:31:03
| 2014-12-06T13:31:03
| 25,984,922
| 1
| 0
| null | 2014-12-06T13:31:03
| 2014-10-30T18:46:17
|
Java
|
UTF-8
|
Java
| false
| false
| 7,713
|
java
|
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.util;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
import com.l2jserver.gameserver.network.serverpackets.RelationChanged;
/**
* This class ...
* @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $
*/
public final class Broadcast
{
private static Logger _log = Logger.getLogger(Broadcast.class.getName());
/**
* Send a packet to all L2PcInstance in the _KnownPlayers of the L2Character that have the Character targeted.<BR>
* <B><U> Concept</U> :</B><BR>
* L2PcInstance in the detection area of the L2Character are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the L2Character, server just need to go through _knownPlayers to send Server->Client Packet<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this L2Character (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* @param character
* @param mov
*/
public static void toPlayersTargettingMyself(L2Character character, L2GameServerPacket mov)
{
Collection<L2PcInstance> plrs = character.getKnownList().getKnownPlayers().values();
for (L2PcInstance player : plrs)
{
if (player.getTarget() != character)
{
continue;
}
player.sendPacket(mov);
}
}
/**
* Send a packet to all L2PcInstance in the _KnownPlayers of the L2Character.<BR>
* <B><U> Concept</U> :</B><BR>
* L2PcInstance in the detection area of the L2Character are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the L2Character, server just need to go through _knownPlayers to send Server->Client Packet<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this L2Character (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* @param character
* @param mov
*/
public static void toKnownPlayers(L2Character character, L2GameServerPacket mov)
{
Collection<L2PcInstance> plrs = character.getKnownList().getKnownPlayers().values();
for (L2PcInstance player : plrs)
{
if (player == null)
{
continue;
}
try
{
player.sendPacket(mov);
if ((mov instanceof CharInfo) && (character instanceof L2PcInstance))
{
int relation = ((L2PcInstance) character).getRelation(player);
Integer oldrelation = character.getKnownList().getKnownRelations().get(player.getObjectId());
if ((oldrelation != null) && (oldrelation != relation))
{
player.sendPacket(new RelationChanged((L2PcInstance) character, relation, character.isAutoAttackable(player)));
if (character.hasSummon())
{
player.sendPacket(new RelationChanged(character.getSummon(), relation, character.isAutoAttackable(player)));
}
}
}
}
catch (NullPointerException e)
{
_log.log(Level.WARNING, e.getMessage(), e);
}
}
}
/**
* Send a packet to all L2PcInstance in the _KnownPlayers (in the specified radius) of the L2Character.<BR>
* <B><U> Concept</U> :</B><BR>
* L2PcInstance in the detection area of the L2Character are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the L2Character, server just needs to go through _knownPlayers to send Server->Client Packet and check the distance between the targets.<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this L2Character (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* @param character
* @param mov
* @param radius
*/
public static void toKnownPlayersInRadius(L2Character character, L2GameServerPacket mov, int radius)
{
if (radius < 0)
{
radius = 1500;
}
Collection<L2PcInstance> plrs = character.getKnownList().getKnownPlayers().values();
for (L2PcInstance player : plrs)
{
if (character.isInsideRadius(player, radius, false, false))
{
player.sendPacket(mov);
}
}
}
/**
* Send a packet to all L2PcInstance in the _KnownPlayers of the L2Character and to the specified character.<BR>
* <B><U> Concept</U> :</B><BR>
* L2PcInstance in the detection area of the L2Character are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the L2Character, server just need to go through _knownPlayers to send Server->Client Packet<BR>
* @param character
* @param mov
*/
public static void toSelfAndKnownPlayers(L2Character character, L2GameServerPacket mov)
{
if (character instanceof L2PcInstance)
{
character.sendPacket(mov);
}
toKnownPlayers(character, mov);
}
// To improve performance we are comparing values of radius^2 instead of calculating sqrt all the time
public static void toSelfAndKnownPlayersInRadius(L2Character character, L2GameServerPacket mov, int radius)
{
if (radius < 0)
{
radius = 600;
}
if (character instanceof L2PcInstance)
{
character.sendPacket(mov);
}
Collection<L2PcInstance> plrs = character.getKnownList().getKnownPlayers().values();
for (L2PcInstance player : plrs)
{
if ((player != null) && Util.checkIfInRange(radius, character, player, false))
{
player.sendPacket(mov);
}
}
}
/**
* Send a packet to all L2PcInstance present in the world.<BR>
* <B><U> Concept</U> :</B><BR>
* In order to inform other players of state modification on the L2Character, server just need to go through _allPlayers to send Server->Client Packet<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this L2Character (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* @param packet
*/
public static void toAllOnlinePlayers(L2GameServerPacket packet)
{
for (L2PcInstance player : L2World.getInstance().getPlayers())
{
if (player.isOnline())
{
player.sendPacket(packet);
}
}
}
public static void announceToOnlinePlayers(String text, boolean isCritical)
{
CreatureSay cs;
if (isCritical)
{
cs = new CreatureSay(0, Say2.CRITICAL_ANNOUNCE, "", text);
}
else
{
cs = new CreatureSay(0, Say2.ANNOUNCEMENT, "", text);
}
toAllOnlinePlayers(cs);
}
public static void toPlayersInInstance(L2GameServerPacket packet, int instanceId)
{
for (L2PcInstance player : L2World.getInstance().getPlayers())
{
if (player.isOnline() && (player.getInstantWorldId() == instanceId))
{
player.sendPacket(packet);
}
}
}
}
|
[
"nakamura.shingo+l2j@gmail.com"
] |
nakamura.shingo+l2j@gmail.com
|
e1fc54f752d87f5d076bbb5f758c3ca1c2170fa3
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_1/src/b/c/g/g/Calc_1_1_12664.java
|
e8898c83246a55632c1bc16bd7b585b51a9564d2
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.c.g.g;
public class Calc_1_1_12664 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
89edfddd6ab008188e20bc967247f894ebaf583f
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/NLPCCd/Hadoop/9020_2.java
|
3ef7552dfcd31118ccee43aa736ae595ba1474a3
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 397
|
java
|
//,temp,sample_6344.java,2,9,temp,sample_1608.java,2,11
//,3
public class xxx {
private boolean removeResourceFromCacheFileSystem(Path path) throws IOException {
Path renamedPath = new Path(path.toString() + RENAMED_SUFFIX);
if (fs.rename(path, renamedPath)) {
return fs.delete(renamedPath, true);
} else {
log.info("we were not able to rename the directory to we will leave it intact");
}
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
07be21cb574fd567683900b4f49371b85cf09b25
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/sonarqube/2018/12/EventComponentChangeDao.java
|
7b209d74f7c161966fb77c1204c462887e6a6c3e
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 1,921
|
java
|
/*
* SonarQube
* Copyright (C) 2009-2018 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.db.event;
import java.util.List;
import org.sonar.api.utils.System2;
import org.sonar.db.Dao;
import org.sonar.db.DbSession;
import static org.sonar.db.DatabaseUtils.executeLargeInputs;
public class EventComponentChangeDao implements Dao {
private final System2 system2;
public EventComponentChangeDao(System2 system2) {
this.system2 = system2;
}
public List<EventComponentChangeDto> selectByEventUuid(DbSession dbSession, String eventUuid) {
return getMapper(dbSession).selectByEventUuid(eventUuid);
}
public List<EventComponentChangeDto> selectByAnalysisUuids(DbSession dbSession, List<String> analyses) {
return executeLargeInputs(analyses, getMapper(dbSession)::selectByAnalysisUuids);
}
public void insert(DbSession dbSession, EventComponentChangeDto dto, EventPurgeData eventPurgeData) {
getMapper(dbSession)
.insert(dto, eventPurgeData, system2.now());
}
private static EventComponentChangeMapper getMapper(DbSession dbSession) {
return dbSession.getMapper(EventComponentChangeMapper.class);
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
51e5aad6b710efde9e0102dbd4a9c79283980a88
|
b61c0384b67fb1a5c48630ba44a9e7e8ce410b59
|
/society-work/springboot/springboot-dataSources-master/src/main/java/com/deng/Application.java
|
7877122d99fc55befd0f897c29938d34affa5bc1
|
[] |
no_license
|
zhihuihu/svn-old-project
|
2fc8a33eca8ac685151ef48e2249a7a3ad34cd72
|
13de6b664c1001155611bc22c181a2f3b5a20d30
|
refs/heads/master
| 2021-04-30T14:04:25.929881
| 2018-03-02T02:54:15
| 2018-03-02T02:54:15
| 121,209,439
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 463
|
java
|
package com.deng;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.net.UnknownHostException;
@SpringBootApplication
@EnableAutoConfiguration
public class Application {
public static void main(String[] args) throws UnknownHostException {
SpringApplication.run(Application.class, args);
}
}
|
[
"huzhihui_c@qq.com"
] |
huzhihui_c@qq.com
|
0175144b9d89988a7407fcccee47c6d7b6ae04e8
|
552f9c5f59bf8ea607f996595f77d9321ca917ea
|
/src/main/java/org/opendaylight/yang/gen/v1/urn/etsi/osm/yang/mano/types/rev170208/config/file/ConfigFileBuilder.java
|
8052375c854c178d1beee749f61cb4cb52c15cf1
|
[] |
no_license
|
openslice/io.openslice.sol005nbi.osm7
|
9bba3c8b830b300b58606fe56a0a47d2bf522ead
|
3f46220606181625f24d0d7ef5afaa1998f70d86
|
refs/heads/master
| 2021-08-26T07:41:16.213883
| 2020-06-15T15:51:07
| 2020-06-15T15:51:07
| 247,079,115
| 0
| 0
| null | 2021-08-02T17:21:09
| 2020-03-13T13:35:51
|
Java
|
UTF-8
|
Java
| false
| false
| 7,657
|
java
|
package org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.mano.types.rev170208.config.file;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableMap;
import java.lang.Class;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.Augmentation;
import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
import org.opendaylight.yangtools.yang.binding.CodeHelpers;
import org.opendaylight.yangtools.yang.binding.DataObject;
/**
* Class that builds {@link ConfigFileBuilder} instances.
*
* @see ConfigFileBuilder
*
*/
public class ConfigFileBuilder implements Builder<ConfigFile> {
private String _dest;
private String _source;
private ConfigFileKey key;
Map<Class<? extends Augmentation<ConfigFile>>, Augmentation<ConfigFile>> augmentation = Collections.emptyMap();
public ConfigFileBuilder() {
}
public ConfigFileBuilder(ConfigFile base) {
this.key = base.key();
this._source = base.getSource();
this._dest = base.getDest();
if (base instanceof ConfigFileImpl) {
ConfigFileImpl impl = (ConfigFileImpl) base;
if (!impl.augmentation.isEmpty()) {
this.augmentation = new HashMap<>(impl.augmentation);
}
} else if (base instanceof AugmentationHolder) {
@SuppressWarnings("unchecked")
Map<Class<? extends Augmentation<ConfigFile>>, Augmentation<ConfigFile>> aug =((AugmentationHolder<ConfigFile>) base).augmentations();
if (!aug.isEmpty()) {
this.augmentation = new HashMap<>(aug);
}
}
}
public ConfigFileKey key() {
return key;
}
public String getDest() {
return _dest;
}
public String getSource() {
return _source;
}
@SuppressWarnings("unchecked")
public <E extends Augmentation<ConfigFile>> E augmentation(Class<E> augmentationType) {
return (E) augmentation.get(CodeHelpers.nonNullValue(augmentationType, "augmentationType"));
}
public ConfigFileBuilder withKey(final ConfigFileKey key) {
this.key = key;
return this;
}
public ConfigFileBuilder setDest(final String value) {
this._dest = value;
return this;
}
public ConfigFileBuilder setSource(final String value) {
this._source = value;
return this;
}
public ConfigFileBuilder addAugmentation(Class<? extends Augmentation<ConfigFile>> augmentationType, Augmentation<ConfigFile> augmentationValue) {
if (augmentationValue == null) {
return removeAugmentation(augmentationType);
}
if (!(this.augmentation instanceof HashMap)) {
this.augmentation = new HashMap<>();
}
this.augmentation.put(augmentationType, augmentationValue);
return this;
}
public ConfigFileBuilder removeAugmentation(Class<? extends Augmentation<ConfigFile>> augmentationType) {
if (this.augmentation instanceof HashMap) {
this.augmentation.remove(augmentationType);
}
return this;
}
@Override
public ConfigFile build() {
return new ConfigFileImpl(this);
}
private static final class ConfigFileImpl implements ConfigFile {
private final String _dest;
private final String _source;
private final ConfigFileKey key;
private Map<Class<? extends Augmentation<ConfigFile>>, Augmentation<ConfigFile>> augmentation = Collections.emptyMap();
ConfigFileImpl(ConfigFileBuilder base) {
if (base.key() != null) {
this.key = base.key();
} else {
this.key = new ConfigFileKey(base.getSource());
}
this._source = key.getSource();
this._dest = base.getDest();
this.augmentation = ImmutableMap.copyOf(base.augmentation);
}
@Override
public Class<ConfigFile> getImplementedInterface() {
return ConfigFile.class;
}
@Override
public ConfigFileKey key() {
return key;
}
@Override
public String getDest() {
return _dest;
}
@Override
public String getSource() {
return _source;
}
@SuppressWarnings("unchecked")
@Override
public <E extends Augmentation<ConfigFile>> E augmentation(Class<E> augmentationType) {
return (E) augmentation.get(CodeHelpers.nonNullValue(augmentationType, "augmentationType"));
}
private int hash = 0;
private volatile boolean hashValid = false;
@Override
public int hashCode() {
if (hashValid) {
return hash;
}
final int prime = 31;
int result = 1;
result = prime * result + Objects.hashCode(_dest);
result = prime * result + Objects.hashCode(_source);
result = prime * result + Objects.hashCode(augmentation);
hash = result;
hashValid = true;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DataObject)) {
return false;
}
if (!ConfigFile.class.equals(((DataObject)obj).getImplementedInterface())) {
return false;
}
ConfigFile other = (ConfigFile)obj;
if (!Objects.equals(_dest, other.getDest())) {
return false;
}
if (!Objects.equals(_source, other.getSource())) {
return false;
}
if (getClass() == obj.getClass()) {
// Simple case: we are comparing against self
ConfigFileImpl otherImpl = (ConfigFileImpl) obj;
if (!Objects.equals(augmentation, otherImpl.augmentation)) {
return false;
}
} else {
// Hard case: compare our augments with presence there...
for (Map.Entry<Class<? extends Augmentation<ConfigFile>>, Augmentation<ConfigFile>> e : augmentation.entrySet()) {
if (!e.getValue().equals(other.augmentation(e.getKey()))) {
return false;
}
}
// .. and give the other one the chance to do the same
if (!obj.equals(this)) {
return false;
}
}
return true;
}
@Override
public String toString() {
final MoreObjects.ToStringHelper helper = MoreObjects.toStringHelper("ConfigFile");
CodeHelpers.appendValue(helper, "_dest", _dest);
CodeHelpers.appendValue(helper, "_source", _source);
CodeHelpers.appendValue(helper, "augmentation", augmentation.values());
return helper.toString();
}
}
}
|
[
"ioannischatzis@gmail.com"
] |
ioannischatzis@gmail.com
|
af20fb46f1a52107d71f1a5a7cf861c2ae9d4f8b
|
2612f336d667a087823234daf946f09b40d8ca3d
|
/plugins/InspectionGadgets/testsrc/com/siyeh/ig/imports/JavaLangImportInspectionTest.java
|
f7f0e494c84d1505cf251a9f63e3a79d6a7c2d8a
|
[
"Apache-2.0"
] |
permissive
|
tnorbye/intellij-community
|
df7f181861fc5c551c02c73df3b00b70ab2dd589
|
f01cf262fc196bf4dbb99e20cd937dee3705a7b6
|
refs/heads/master
| 2021-04-06T06:57:57.974599
| 2018-03-13T17:37:00
| 2018-03-13T17:37:00
| 125,079,130
| 2
| 0
|
Apache-2.0
| 2018-03-13T16:09:41
| 2018-03-13T16:09:41
| null |
UTF-8
|
Java
| false
| false
| 1,539
|
java
|
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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.siyeh.ig.imports;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.siyeh.ig.LightInspectionTestCase;
import junit.framework.TestCase;
import org.jetbrains.annotations.Nullable;
/**
* @author Bas Leijdekkers
*/
public class JavaLangImportInspectionTest extends LightInspectionTestCase {
public void testSamePackageConflict() {
addEnvironmentClass("package a;" +
"class String {}");
doTest("package a;" +
"import java.lang.String;" +
"class X {{" +
" String s;" +
"}}");
}
public void testSimple() {
doTest("package a;" +
"/*Unnecessary import from package 'java.lang'*/import java.lang.String;/**/" +
"class X {{" +
" String s;" +
"}}");
}
@Nullable
@Override
protected InspectionProfileEntry getInspection() {
return new JavaLangImportInspection();
}
}
|
[
"basleijdekkers@gmail.com"
] |
basleijdekkers@gmail.com
|
577f9a68954f0e68698321ac9f800a55d5aeab1e
|
a94503718e5b517e0d85227c75232b7a238ef24f
|
/src/main/java/net/dryuf/comp/gallery/mvp/CommonMultiGalleryPresenter.java
|
5e6f6dd57ab2a3de8cad9c942c6a3596ffef1e09
|
[] |
no_license
|
kvr000/dryuf-old-comp
|
795c457e6131bb0b08f538290ff96f8043933c9f
|
ebb4a10b107159032dd49b956d439e1994fc320a
|
refs/heads/master
| 2023-03-02T20:44:19.336992
| 2022-04-04T21:51:59
| 2022-04-04T21:51:59
| 229,681,213
| 0
| 0
| null | 2023-02-22T02:52:16
| 2019-12-23T05:14:49
|
Java
|
UTF-8
|
Java
| false
| false
| 3,404
|
java
|
/*
* Dryuf framework
*
* ----------------------------------------------------------------------------------
*
* Copyright (C) 2000-2015 Zbyněk Vyškovský
*
* ----------------------------------------------------------------------------------
*
* LICENSE:
*
* This file is part of Dryuf
*
* Dryuf is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 3 of the License, or (at your option)
* any later version.
*
* Dryuf is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Dryuf; if not, write to the Free Software Foundation, Inc., 51
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @author 2000-2015 Zbyněk Vyškovský
* @link mailto:kvr@matfyz.cz
* @link http://kvr.matfyz.cz/software/java/dryuf/
* @link http://github.com/dryuf/
* @license http://www.gnu.org/licenses/lgpl.txt GNU Lesser General Public License v3
*/
package net.dryuf.comp.gallery.mvp;
import net.dryuf.core.Options;
import net.dryuf.core.ReportException;
import net.dryuf.comp.gallery.GalleryHandler;
import net.dryuf.core.StringUtil;
import net.dryuf.mvp.Presenter;
public abstract class CommonMultiGalleryPresenter extends net.dryuf.mvp.ChildPresenter
{
public CommonMultiGalleryPresenter(Presenter parentPresenter, Options options)
{
super(parentPresenter, options);
if ((store = (String) options.getOptionDefault("store", null)) == null)
store = getRootPresenter().getCurrentPath();
}
public boolean process()
{
String page;
if ((page = this.getPathGallery()) == null) {
return this.processNoGallery();
}
else if (page.equals("")) {
return false;
}
else {
GalleryPresenter galleryPresenter = new GalleryPresenter(this, Options.NONE, this.openGalleryHandler(page));
galleryPresenter.injectRenderReference(new Runnable() { public void run() { renderGalleryReference(); } });
}
return super.process();
}
public boolean processNoGallery()
{
return this.processFinal();
}
/**
* Gets gallery path.
*
* @return null
* if there was no path passed
* @return ""
* if redirect is required due to missing slash
* @return path with slash at the end
* if gallery was passed
*/
public String getPathGallery()
{
String page;
if ((page = this.getRootPresenter().getPathElement()) != null) {
if (this.getRootPresenter().needPathSlash(true) == null)
return "";
if (StringUtil.matchText("^([a-zA-Z0-9][-0-9A-Za-z_]*)$", page) == null)
throw new ReportException("wrong page");
return page+"/";
}
return null;
}
/**
* Opens gallery handler.
*
* @param page
* the last element in path
*
* @return null
* if there was no path passed
* @return gallery handler
* if found
*/
public abstract GalleryHandler openGalleryHandler(String page);
public void renderGalleryReference()
{
}
public void render()
{
super.render();
if (this.getLeadChild() == null) {
this.renderGalleries();
}
}
public void renderGalleries()
{
}
protected String store;
}
|
[
"kvr@centrum.cz"
] |
kvr@centrum.cz
|
2320332ace677c5a76494cd0910b759ec9db20c7
|
a15f8e4c24f061a73384a8a4e3fa6e01c2c06c4c
|
/twitter4j-core/src/main/java/twitter4j/internal/json/SimilarPlacesImpl.java
|
3fd1d5349c49f76f2edce18da4c69514781457ce
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
Sanchay-Sethi/twitter4j
|
c443a8a1646845fff81f3d969056d92496047f95
|
c2b13065aab449c72c298ec28e77ba45db16cb0d
|
refs/heads/master
| 2020-08-11T20:44:39.280343
| 2013-11-21T03:31:18
| 2013-11-21T03:31:18
| 214,624,174
| 0
| 0
|
Apache-2.0
| 2019-10-12T10:03:14
| 2019-10-12T10:03:14
| null |
UTF-8
|
Java
| false
| false
| 2,097
|
java
|
/*
* Copyright 2007 Yusuke Yamamoto
*
* 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 twitter4j.internal.json;
import twitter4j.Place;
import twitter4j.ResponseList;
import twitter4j.SimilarPlaces;
import twitter4j.TwitterException;
import twitter4j.conf.Configuration;
import twitter4j.internal.http.HttpResponse;
import twitter4j.internal.org.json.JSONException;
import twitter4j.internal.org.json.JSONObject;
/**
* @author Yusuke Yamamoto - yusuke at mac.com
* @since Twitter4J 2.1.7
*/
public class SimilarPlacesImpl extends ResponseListImpl<Place> implements SimilarPlaces {
private static final long serialVersionUID = -7897806745732767803L;
private final String token;
SimilarPlacesImpl(ResponseList<Place> places, HttpResponse res, String token) {
super(places.size(), res);
this.addAll(places);
this.token = token;
}
/**
* {@inheritDoc}
*/
@Override
public String getToken() {
return token;
}
/*package*/
static SimilarPlaces createSimilarPlaces(HttpResponse res, Configuration conf) throws TwitterException {
JSONObject json = null;
try {
json = res.asJSONObject();
JSONObject result = json.getJSONObject("result");
return new SimilarPlacesImpl(PlaceJSONImpl.createPlaceList(result.getJSONArray("places"), res, conf), res
, result.getString("token"));
} catch (JSONException jsone) {
throw new TwitterException(jsone.getMessage() + ":" + json.toString(), jsone);
}
}
}
|
[
"yusuke@mac.com"
] |
yusuke@mac.com
|
5c046201496c0b2f9f244ee9d5ba930a07ab993e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_2f3748c234582725b7b3ee8e37eedf1d34cdfa0c/UnixPlatformHelper/11_2f3748c234582725b7b3ee8e37eedf1d34cdfa0c_UnixPlatformHelper_s.java
|
3683faa0bbe0281bf367b3f8e17193a1d23cfcdc
|
[] |
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
| 5,849
|
java
|
/**
* UnixPlatformHelper
* 29.03.2012
* @author Philipp Haussleiter
*
*/
package helper.unix;
import helper.unix.parser.DetectPlatformPP;
import helper.unix.parser.DetectDistributionVersionPP;
import helper.unix.parser.DetectDistributionNamePP;
import helper.unix.parser.ListPackagePP;
import helper.PlatformHelper;
import helper.SystemHelper;
import helper.unix.parser.DetectHostPP;
import helper.unix.parser.SearchPackagePP;
import helper.unix.parser.UpdatePackagePP;
import helper.unix.parser.UpgradePackagePP;
import java.util.List;
import models.AppPackage;
import models.Distribution;
import models.Host;
import models.Platform;
import play.Logger;
/**
*
* @author philipp
*/
public class UnixPlatformHelper extends SystemHelper implements PlatformHelper {
//private static UnixPlatformHelper instance = new UnixPlatformHelper();
private UnixPlatformHelper() {
super();
}
public static UnixPlatformHelper getInstance() {
//return instance;
return new UnixPlatformHelper();
}
/**
* First character: The possible value for the first character. The first character signifies the desired state, like we (or some user) is marking the package for installation
u: Unknown (an unknown state)
i: Install (marked for installation)
r: Remove (marked for removal)
p: Purge (marked for purging)
h: Hold
Second Character: The second character signifies the current state, whether it is installed or not. The possible values are
n: Not- The package is not installed
i: Inst – The package is successfully installed
c: Cfg-files – Configuration files are present
u: Unpacked- The package is stilled unpacked
f: Failed-cfg- Failed to remove configuration files
h: Half-inst- The package is only partially installed
W: trig-aWait
t: Trig-pend
*/
public List<AppPackage> listPackages() {
ListPackagePP pp = new ListPackagePP();
pp.setDistribution(distribution);
pp.setHost(host);
runCommand(pp.getCommand(), pp);
return pp.getPackages();
}
public List<String> searchPackage(String query) {
SearchPackagePP sp = new SearchPackagePP(distribution);
runCommand(sp.getCommand(query), sp);
return sp.getOutput();
}
public boolean installPackage(String packageName) {
throw new UnsupportedOperationException("Not supported yet.");
}
public boolean removePackage(String packageName) {
throw new UnsupportedOperationException("Not supported yet.");
}
public void updateRepository() {
throw new UnsupportedOperationException("Not supported yet.");
}
/**
* cat /etc/issue
-a, --all
print all information, in the following order, except omit -p and -i if unknown:
-s, --kernel-name
print the kernel name
-n, --nodename
print the network node hostname
-r, --kernel-release
print the kernel release
-v, --kernel-version
print the kernel version
-m, --machine
print the machine hardware name
-p, --processor
print the processor type or "unknown"
-i, --hardware-platform
print the hardware platform or "unknown"
-o, --operating-system
print the operating system
*/
public Platform detectPlatform() {
DetectPlatformPP dp = new DetectPlatformPP(this.distribution);
runCommand(dp.getCommand(), dp);
platform = dp.getPlatform();
platform.distribution = distribution.save();
Logger.info("Platform: " + platform);
return platform.save();
}
public Distribution dectectDistribution() {
String command = "ls -a1 /etc/";
DetectDistributionNamePP ddn = new DetectDistributionNamePP();
runCommand(command, ddn);
DetectDistributionVersionPP ddv = new DetectDistributionVersionPP(ddn.getName());
runCommand(ddv.getCommand(), ddv);
distribution = Distribution.findOrCreateByNameAndVersion(ddn.getName(), ddv.getVersion());
Logger.info("Distribution: " + distribution);
return distribution.save();
}
public Host detectHost() {
DetectHostPP dh = new DetectHostPP(host);
String command = "hostname && "
+ "dnsdomainname";
runCommand(command, dh);
host = dh.getHost();
Logger.info("Host: " + host);
return host;
}
public List<String> updatedPackages() {
UpdatePackagePP up = new UpdatePackagePP(this.distribution);
runCommand(up.getCommand(), up);
return up.getOutput();
}
public List<String> upgradeDistribution() {
UpgradePackagePP up = new UpgradePackagePP(this.distribution);
runCommand(up.getCommand(), up);
return up.getOutput();
}
public void setHost(Host host) {
this.host = host;
platform = host.platform;
distribution = host.getDistribution();
/**
* thx to http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html.
*/
sshCmdPrefix = " ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no " + host.user + "@" + host.ip;
/**
* thx to http://freeunixtips.com/2009/03/ssh-pw-prompt/
*/
sshCheckPrefix = "ssh " + this.host.user + "@" + this.host.ip + " -qo PasswordAuthentication=no echo 0 || echo 1";
}
public Host getHost() {
host.platform = platform.save();
return host.save();
}
public Distribution getDistribution() {
return this.distribution;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
fd3d0eb33ad4caae30c5a3b127b7b61046557be2
|
94adcfc05863da01716046cb582ae7eaff4395c2
|
/src/main/java/com/andy/netty/server/Server.java
|
f007604ac9d0bbdbb8785ccf8e9750a7292f34bc
|
[] |
no_license
|
lookskystar/mavenNettyChat
|
e78f915416e324158da20f21bac312d168834ec7
|
08685a26f1cd9c23c2caaa8bf5bd2a762c34ed55
|
refs/heads/master
| 2020-03-08T21:35:23.270383
| 2018-04-07T08:17:16
| 2018-04-07T08:17:16
| 128,409,693
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,395
|
java
|
package com.andy.netty.server;
import com.andy.netty.im.common.IMConfig;
import com.andy.netty.im.common.IMMessage;
import com.andy.netty.im.common.MsgPackDecode;
import com.andy.netty.im.common.MsgPackEncode;
import com.andy.netty.server.handler.ServerHandler;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import io.netty.handler.codec.LengthFieldPrepender;
import java.io.IOException;
import java.util.Scanner;
/**
* 服务器程序Server
* 接收客户端连接,如果没有客户端连接过,就保存ChannelHandlerConetext到Map中用于发送消息。然后判断消息接收方是否在线。
* 若在线就直接发送消息,没有在线就返回“对方不在线”。当然,可以将消息发送者和消息接收者ID设置为相同就能仅开一个客户端,
* 自己和自己聊天(Echo Server)
*
* @author Andy
* @create 2018-04-06-20:13
*/
public class Server implements Runnable,IMConfig {
ServerHandler serverHandler=new ServerHandler();
public static void main(String[] args) throws Exception {
new Server().start();
}
/**
* MsgPackDecode和MsgPackEncode用于消息的编解码。
* 使用的是MessagePack(编码后字节流特小,编解码速度超快,同时几乎支持所有主流编程语言,
* 详情见官网:http://msgpack.org/)。这样我们可以随意编写实体用于发送消息,他们的代码将在后面给出。
* LengthFieldBasedFrameDecoder和LengthFieldPrepender:因为TCP底层传输数据时是不了解上层业务的,
* 所以传输消息的时候很容易造成粘包/半包的情况
* (一条完整的消息被拆开或者完整或者不完整的多条消息被合并到一起发送、接收),
* 这两个工具就是Netty提供的消息编码工具,2表示消息长度(不是正真的长度为2,是2个字节)。
*/
public void run() {
EventLoopGroup bossGroup=new NioEventLoopGroup();
EventLoopGroup workerGroup =new NioEventLoopGroup();
try{
ServerBootstrap b=new ServerBootstrap();
b.group(bossGroup,workerGroup).channel(NioServerSocketChannel.class)
.option(ChannelOption.SO_BACKLOG,1024)
.childHandler(new ChannelInitializer<SocketChannel>(){
@Override
public void initChannel(SocketChannel ch) throws Exception {
ch.pipeline().addLast("frameDecoder", new LengthFieldBasedFrameDecoder(65536, 0, 2, 0, 2));
ch.pipeline().addLast("msgpack decoder",new MsgPackDecode());
ch.pipeline().addLast("frameEncoder", new LengthFieldPrepender(2));
ch.pipeline().addLast("msgpack encoder",new MsgPackEncode());
ch.pipeline().addLast(serverHandler);
}
});
ChannelFuture f=b.bind(SERVER_PORT).sync();
f.channel().closeFuture().sync();
}catch ( Exception e){
e.printStackTrace();
}finally {
workerGroup.shutdownGracefully();
bossGroup.shutdownGracefully();
}
}
public void start() throws Exception{
new Thread(this).start();
runServerCMD();
}
/**
* 启动服务端控制台输入,可以给指定ID的客户推送消息(推送服务器就是这么来的)
* @throws IOException
*/
private void runServerCMD() throws IOException{
//服务端主动推送消息
int toID=1;
IMMessage message=new IMMessage(
APP_IM,
CLIENT_VERSION,
SERVER_ID,
TYPE_MSG_TEXT,
toID,
MSG_EMPTY);
@SuppressWarnings("resource")
Scanner scanner=new Scanner(System.in);
do {
message.setMsg(scanner.nextLine());
}while(serverHandler.sendMsg(message));
}
}
|
[
"lookskystar@163.com"
] |
lookskystar@163.com
|
ba362abd7058eb81fff75b18b727429e21ea6a1e
|
530e02cb5491d02d764c8f79c66b5b7722eb41c1
|
/AmapLibrary/src/main/java/com/map/library/service/utils/LocationStatusManager.java
|
13a382126fe3325fbd0943769480bee1f13c85bd
|
[] |
no_license
|
wangzm05/YisinglePassenger
|
7ee30eebce3efb292b4f40719aaf2ea5e2900583
|
660c0690541747438afcd8bb9e0feb3e20201f26
|
refs/heads/master
| 2020-07-29T21:17:54.159885
| 2018-11-01T10:10:48
| 2018-11-01T10:10:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,604
|
java
|
package com.map.library.service.utils;
import android.content.Context;
import android.content.SharedPreferences;
import com.amap.api.location.AMapLocation;
import static android.content.Context.MODE_PRIVATE;
/**
* Created by liangchao_suxun on 17/1/16.
* 在定位失败的情况下,用于判断当前定位错误是否是由于息屏导致的网络关闭引起的。
* 判断逻辑仅限于处理设备仅有wifi信号的情况下
*/
public class LocationStatusManager {
/**
* 上一次的定位是否成功
*/
private boolean mPriorSuccLocated = false;
/**
* 屏幕亮时可以定位
*/
private boolean mPirorLocatableOnScreen = false;
static class Holder {
public static LocationStatusManager instance = new LocationStatusManager();
}
public static LocationStatusManager getInstance() {
return Holder.instance;
}
/**
* 由于仅仅处理只有wifi连接的情况下,如果用户手机网络可连接,那么忽略。
* 定位成功时,重置为定位成功的状态
*
* @param isScreenOn 当前屏幕是否为点亮状态
* @param isMobileable 是否有手机信号
*/
public void onLocationSuccess(Context context, boolean isScreenOn, boolean isMobileable) {
if (isMobileable) {
return;
}
mPriorSuccLocated = true;
if (isScreenOn) {
mPirorLocatableOnScreen = true;
saveStateInner(context, true);
}
}
/**
* reset到默认状态
*
* @param context context
*/
public void resetToInit(Context context) {
this.mPirorLocatableOnScreen = false;
this.mPriorSuccLocated = false;
saveStateInner(context, false);
}
/**
* 由preference初始化。特别是在定位服务重启的时候会进行初始化
*/
public void initStateFromPreference(Context context) {
if (!isLocableOnScreenOn(context)) {
return;
}
this.mPriorSuccLocated = true;
this.mPirorLocatableOnScreen = true;
}
/**
* 判断是否由屏幕关闭导致的定位失败。
* 只有在 网络可访问&&errorCode==4&&(priorLocated&&locatableOnScreen) && !isScreenOn 才认为是有息屏引起的定位失败
* 如果判断条件较为严格,请按需要适当修改
*
* @param errorCode 定位错误码, 0=成功, 4=因为网络原因造成的失败
* @param isScreenOn 当前屏幕是否为点亮状态
*/
public boolean isFailOnScreenOff(Context context, int errorCode, boolean isScreenOn, boolean isWifiable) {
return !isWifiable && errorCode == AMapLocation.ERROR_CODE_FAILURE_CONNECTION && (mPriorSuccLocated && mPirorLocatableOnScreen) && !isScreenOn;
}
/**
* 是否存在屏幕亮而且可以定位的情况的key
*/
private String IS_LOCABLE_KEY = "is_locable_key";
/**
* IS_LOCABLE_KEY 的过期时间
*/
private String LOCALBLE_KEY_EXPIRE_TIME_KEY = "localble_key_expire_time_key";
/**
* 过期时间为10分钟
*/
private static final long MINIMAL_EXPIRE_TIME = 30 * 60 * 1000;
private static final String PREFER_NAME = LocationStatusManager.class.getSimpleName();
private static final long DEF_PRIOR_TIME_VAL = -1;
/**
* 如果isLocable,则存入正确的过期时间,否则存默认值
*
* @param context context
* @param isLocable isLocable
*/
public void saveStateInner(Context context, boolean isLocable) {
SharedPreferences sharedPreferences = context.getSharedPreferences(PREFER_NAME, MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(IS_LOCABLE_KEY, isLocable);
editor.putLong(LOCALBLE_KEY_EXPIRE_TIME_KEY, isLocable ? System.currentTimeMillis() : DEF_PRIOR_TIME_VAL);
editor.apply();
}
/**
* 从preference读取,判断是否存在网络状况ok,而且亮屏情况下,可以定位的情况
*/
public boolean isLocableOnScreenOn(Context context) {
SharedPreferences sharedPreferences = context.getSharedPreferences(PREFER_NAME, MODE_PRIVATE);
boolean res = sharedPreferences.getBoolean(IS_LOCABLE_KEY, false);
long priorTime = sharedPreferences.getLong(LOCALBLE_KEY_EXPIRE_TIME_KEY, DEF_PRIOR_TIME_VAL);
if (System.currentTimeMillis() - priorTime > MINIMAL_EXPIRE_TIME) {
saveStateInner(context, false);
return false;
}
return res;
}
}
|
[
"j314815101@qq.com"
] |
j314815101@qq.com
|
eca9f578862af724b78374cc97206c330b4e8a17
|
9e20645e45cc51e94c345108b7b8a2dd5d33193e
|
/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/gameserver/network/serverpackets/WareHouseWithdrawalList.java
|
4d67baed72c37f206a7131fba18b63992d7d2502
|
[] |
no_license
|
Enryu99/L2jMobius-01-11
|
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
|
4683916852a03573b2fe590842f6cac4cc8177b8
|
refs/heads/master
| 2023-09-01T22:09:52.702058
| 2021-11-02T17:37:29
| 2021-11-02T17:37:29
| 423,405,362
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,867
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.l2jmobius.gameserver.network.serverpackets;
import java.util.List;
import org.l2jmobius.gameserver.model.actor.instance.ItemInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
public class WareHouseWithdrawalList extends ServerBasePacket
{
private final PlayerInstance _cha;
private final int _money;
public WareHouseWithdrawalList(PlayerInstance cha)
{
_cha = cha;
_money = cha.getAdena();
}
@Override
public void writeImpl()
{
writeC(0x54);
writeD(_money);
final int count = _cha.getWarehouse().getSize();
writeH(count);
final List<ItemInstance> items = _cha.getWarehouse().getItems();
for (int i = 0; i < count; ++i)
{
final ItemInstance temp = items.get(i);
writeH(temp.getItem().getType1());
writeD(temp.getObjectId());
writeD(temp.getItemId());
writeD(temp.getCount());
writeH(temp.getItem().getType2());
writeH(100);
writeD(400);
writeH(temp.getEnchantLevel());
writeH(300);
writeH(200);
writeD(temp.getItemId());
}
}
}
|
[
"MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
|
103362527e01de82cf832a5325ed3ab19a7657ec
|
6e949d17adc95460425f043d5b70cb14bd13ef95
|
/service-fishing/src/main/java/com/tongzhu/fishing/config/JacksonConfig.java
|
39b0ff5023ed1d88ad7cd07ae345a737d8fbb4e6
|
[] |
no_license
|
HuangRicher/tree
|
ca1397d6a74eb5d8e49697934c1077beb415d704
|
88d314cac28d3eea820addcd392ff2d01a74f320
|
refs/heads/master
| 2020-05-21T06:08:50.365919
| 2019-05-15T05:49:39
| 2019-05-15T05:49:39
| 185,935,338
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,785
|
java
|
package com.tongzhu.fishing.config;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
/**
* 〈返回json空值去掉null和""〉
*/
@Configuration
public class JacksonConfig
{
@Bean
@Primary
@ConditionalOnMissingBean(ObjectMapper.class)
public ObjectMapper jacksonObjectMapper(Jackson2ObjectMapperBuilder builder) {
ObjectMapper objectMapper = builder.createXmlMapper(false).build();
// 通过该方法对mapper对象进行设置,所有序列化的对象都将按改规则进行系列化
// Include.Include.ALWAYS 默认
// Include.NON_DEFAULT 属性为默认值不序列化
// Include.NON_EMPTY 属性为 空("") 或者为 NULL 都不序列化,则返回的json是没有这个字段的。这样对移动端会更省流量
// Include.NON_NULL 属性为NULL 不序列化,就是为null的字段不参加序列化
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
// 字段保留,将null值转为""
/*objectMapper.getSerializerProvider().setNullValueSerializer(new JsonSerializer<Object>() {
@Override
public void serialize(Object o, JsonGenerator jsonGenerator,SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
jsonGenerator.writeString("");
}
});*/
return objectMapper;
}
}
|
[
"huangweibiao@instoms.cn"
] |
huangweibiao@instoms.cn
|
9a59334bc59a5a605b629e2b72ae7ae2d8496ad1
|
a181e404c0a7793783b6baecbce17b87e2339cb8
|
/skadmin-tools/src/main/java/com/dxj/domain/vo/EmailVo.java
|
94c8eef327f6288acae05b384844a616d5d41cee
|
[] |
no_license
|
xiaobaolei/sk-admin
|
8a25bd5afaccdf303f9ff1d2fd49f52b2f239560
|
3ddd52bf7dcf9bcec779507e6e6f2e031b079c53
|
refs/heads/dev
| 2020-05-29T20:36:05.930415
| 2019-05-30T06:14:17
| 2019-05-30T06:14:17
| 189,356,734
| 0
| 1
| null | 2019-05-30T06:16:06
| 2019-05-30T06:16:04
| null |
UTF-8
|
Java
| false
| false
| 603
|
java
|
package com.dxj.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* 发送邮件时,接收参数的类
* @author 郑杰
* @date 2018/09/28 12:02:14
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EmailVo {
/**
* 收件人,支持多个收件人,用逗号分隔
*/
@NotEmpty
private List<String> tos;
@NotBlank
private String subject;
@NotBlank
private String content;
}
|
[
"dengsinkiang@gmail.com"
] |
dengsinkiang@gmail.com
|
620c711cefb5f521fce0318aff8e0deb1b9e4067
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/actorapp--actor-platform/b56fe5b77d5f3d39968080b62825c765cf192fbf/after/ConversationState.java
|
e15562cc063b2ccf0cfc71237eae973c87f5d672
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,194
|
java
|
package im.actor.core.entity;
import java.io.IOException;
import im.actor.runtime.bser.Bser;
import im.actor.runtime.bser.BserCreator;
import im.actor.runtime.bser.BserObject;
import im.actor.runtime.bser.BserValues;
import im.actor.runtime.bser.BserWriter;
import im.actor.runtime.mvvm.ValueDefaultCreator;
import im.actor.runtime.storage.KeyValueItem;
public class ConversationState extends BserObject implements KeyValueItem {
public static ConversationState fromBytes(byte[] data) throws IOException {
return Bser.parse(new ConversationState(), data);
}
public static BserCreator<ConversationState> CREATOR = ConversationState::new;
public static ValueDefaultCreator<ConversationState> DEFAULT_CREATOR = id ->
new ConversationState(Peer.fromUniqueId(id), false, 0, 0, 0, 0, 0);
public static final String ENTITY_NAME = "ConversationState";
private Peer peer;
private boolean isLoaded;
private int unreadCount;
private long inMaxMessageDate;
private long inReadDate;
private long outReadDate;
private long outReceiveDate;
public ConversationState(Peer peer, boolean isLoaded,
int unreadCount,
long inMaxMessageDate,
long inReadDate,
long outReadDate,
long outReceiveDate) {
this.peer = peer;
this.isLoaded = isLoaded;
this.unreadCount = unreadCount;
this.inMaxMessageDate = inMaxMessageDate;
this.inReadDate = inReadDate;
this.outReadDate = outReadDate;
this.outReceiveDate = outReceiveDate;
}
private ConversationState() {
}
public Peer getPeer() {
return peer;
}
public boolean isLoaded() {
return isLoaded;
}
public long getInMaxMessageDate() {
return inMaxMessageDate;
}
public long getInReadDate() {
return inReadDate;
}
public long getOutReadDate() {
return outReadDate;
}
public long getOutReceiveDate() {
return outReceiveDate;
}
public int getUnreadCount() {
return unreadCount;
}
public ConversationState changeIsLoaded(boolean isLoaded) {
return new ConversationState(peer, isLoaded, unreadCount, inMaxMessageDate, inReadDate, outReadDate, outReceiveDate);
}
public ConversationState changeInReadDate(long inReadDate) {
return new ConversationState(peer, isLoaded, unreadCount, inMaxMessageDate, inReadDate, outReadDate, outReceiveDate);
}
public ConversationState changeInMaxDate(long inMaxMessageDate) {
return new ConversationState(peer, isLoaded, unreadCount, inMaxMessageDate, inReadDate, outReadDate, outReceiveDate);
}
public ConversationState changeOutReceiveDate(long outReceiveDate) {
return new ConversationState(peer, isLoaded, unreadCount, inMaxMessageDate, inReadDate, outReadDate, outReceiveDate);
}
public ConversationState changeOutReadDate(long outReadDate) {
return new ConversationState(peer, isLoaded, unreadCount, inMaxMessageDate, inReadDate, outReadDate, outReceiveDate);
}
public ConversationState changeCounter(int unreadCount) {
return new ConversationState(peer, isLoaded, unreadCount, inMaxMessageDate, inReadDate, outReadDate, outReceiveDate);
}
@Override
public void parse(BserValues values) throws IOException {
peer = Peer.fromBytes(values.getBytes(1));
isLoaded = values.getBool(2, false);
inReadDate = values.getLong(3, 0);
outReceiveDate = values.getLong(4, 0);
outReadDate = values.getLong(5, 0);
unreadCount = values.getInt(6);
}
@Override
public void serialize(BserWriter writer) throws IOException {
writer.writeBytes(1, peer.toByteArray());
writer.writeBool(2, isLoaded);
writer.writeLong(3, inReadDate);
writer.writeLong(4, outReceiveDate);
writer.writeLong(5, outReadDate);
writer.writeInt(6, unreadCount);
}
@Override
public long getEngineId() {
return peer.getUnuqueId();
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
6683f05a03a417246fe2781f94a47f0ef3134995
|
7bbc806193820f39f846d6381d10366f187e3dfc
|
/edi/WEB-INF/src/ecom/action/ECom002Action.java
|
bc7738d97a17f49df998b9ce58f997c45e414168
|
[] |
no_license
|
artmalling/artmalling
|
fc45268b7cf566a2bc2de0549581eeb96505968a
|
0dd2d495d0354a38b05f7986bfb572d7d7dd1b08
|
refs/heads/master
| 2020-03-07T07:55:07.111863
| 2018-03-30T06:51:35
| 2018-03-30T06:51:35
| 127,362,251
| 0
| 0
| null | 2018-03-30T01:05:05
| 2018-03-30T00:45:52
| null |
UTF-8
|
Java
| false
| false
| 3,561
|
java
|
/*
* Copyright (c) 2010 한국후지쯔. All rights reserved.
*
* This software is the confidential and proprietary information of 한국후지쯔.
* You shall not disclose such Confidential Information and shall use it
* only in accordance with the terms of the license agreement you entered into
* with 한국후지쯔
*/
package ecom.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import kr.fujitsu.ffw.control.ActionForm;
import kr.fujitsu.ffw.control.ActionForward;
import kr.fujitsu.ffw.control.ActionMapping;
import kr.fujitsu.ffw.control.ActionUtil;
import kr.fujitsu.ffw.control.DispatchAction;
import org.apache.log4j.Logger;
import ecom.dao.ECom002DAO;
public class ECom002Action extends DispatchAction {
/*
* Java Pattern 에서 지원하는 logger를 사용할 수 있도록 객체를 선언
*/
private Logger logger = Logger.getLogger(ECom002Action.class);
/**
* 로그 아웃을 하는 경우
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward logout(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
try {
HttpSession session = request.getSession();
session.removeAttribute("sessionInfo");
session.invalidate();
response.getWriter().println("<script>");
response.getWriter().println("window.open('/edi/jsp/login.jsp', '', 'width=1024-10, height=768-55, status=1, resizable=1, titlebar=1, location=1, toolbar=1, menubar=1, scrollbars=1');");
response.getWriter().println("parent.close();");
response.getWriter().println("</script>");
} catch (Exception e) {
e.printStackTrace();
logger.error("", e);
throw e;
}
return mapping.findForward("logout");
}
/**
* 메인페이지로 이동
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward goMain(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
return mapping.findForward("goMain");
}
/**
* 매출정보조회
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward getSale(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
StringBuffer sb = null;
ECom002DAO dao = null;
String strGoto = form.getParam("goTo");
try{
dao = new ECom002DAO();
sb = dao.getSale(form);
}catch(Exception e){
e.printStackTrace();
}
ActionUtil.sendAjaxResponse(response, sb);
return mapping.findForward(strGoto);
}
/**
* 대금정보조회
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward getbillmst(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
StringBuffer sb = null;
ECom002DAO dao = null;
String strGoto = form.getParam("goTo");
try{
dao = new ECom002DAO();
sb = dao.getbillmst(form);
}catch(Exception e){
e.printStackTrace();
}
ActionUtil.sendAjaxResponse(response, sb);
return mapping.findForward(strGoto);
}
}
|
[
"HP@HP-PC0000a"
] |
HP@HP-PC0000a
|
3f848ce36fbe182098704103695c50aa93215b25
|
770a9c017b87cb2e36b2dcde726a62a70700888e
|
/src/main/java/datastructure/string/codinginterviewguide/chapter_5_stringproblem/Problem_06_ReplaceString.java
|
0ca95afdd6c859bed3378821a8976aeb9c3d1984
|
[] |
no_license
|
wz3118103/algorithm
|
1cabcf4461d2dfea924adf8070c415a2852e92a1
|
f812370316a96757f5e5c62d2783b5ff618644a2
|
refs/heads/master
| 2020-06-27T06:36:40.567939
| 2019-11-14T03:15:57
| 2019-11-14T03:15:57
| 199,841,781
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,321
|
java
|
package datastructure.string.codinginterviewguide.chapter_5_stringproblem;
public class Problem_06_ReplaceString {
public static String replace(String str, String from, String to) {
if (str == null || from == null || str.equals("") || from.equals("")) {
return str;
}
char[] chas = str.toCharArray();
char[] chaf = from.toCharArray();
int match = 0;
for (int i = 0; i < chas.length; i++) {
if (chas[i] == chaf[match++]) {
if (match == chaf.length) {
clear(chas, i, chaf.length);
match = 0;
}
} else {
if (chas[i] == chaf[0]) {
i--;
}
match = 0;
}
}
String res = "";
String cur = "";
for (int i = 0; i < chas.length; i++) {
if (chas[i] != 0) {
cur = cur + String.valueOf(chas[i]);
}
if (chas[i] == 0 && (i == 0 || chas[i - 1] != 0)) {
res = res + cur + to;
cur = "";
}
}
if (!cur.equals("")) {
res = res + cur;
}
return res;
}
public static void clear(char[] chas, int end, int len) {
while (len-- != 0) {
chas[end--] = 0;
}
}
public static void main(String[] args) {
String str = "abc1abcabc1234abcabcabc5678";
String from = "abc";
String to = "XXXXX";
System.out.println(replace(str, from, to));
str = "abc";
from = "123";
to = "X";
System.out.println(replace(str, from, to));
}
}
|
[
"296215200@qq.com"
] |
296215200@qq.com
|
88060c67b1c7a89b54ec3d265defd12de1fd0d67
|
08b8d598fbae8332c1766ab021020928aeb08872
|
/src/gcom/gerencial/micromedicao/hidrometro/GHidrometroDiametro.java
|
2698d865addb80d330c7a0e342b181be11829d7c
|
[] |
no_license
|
Procenge/GSAN-CAGEPA
|
53bf9bab01ae8116d08cfee7f0044d3be6f2de07
|
dfe64f3088a1357d2381e9f4280011d1da299433
|
refs/heads/master
| 2020-05-18T17:24:51.407985
| 2015-05-18T23:08:21
| 2015-05-18T23:08:21
| 25,368,185
| 3
| 1
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 6,119
|
java
|
/*
* Copyright (C) 2007-2007 the GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
* GSAN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN – Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
* Adriano Britto Siqueira
* Alexandre Santos Cabral
* Ana Carolina Alves Breda
* Ana Maria Andrade Cavalcante
* Aryed Lins de Araújo
* Bruno Leonardo Rodrigues Barros
* Carlos Elmano Rodrigues Ferreira
* Cláudio de Andrade Lira
* Denys Guimarães Guenes Tavares
* Eduardo Breckenfeld da Rosa Borges
* Fabíola Gomes de Araújo
* Flávio Leonardo Cavalcanti Cordeiro
* Francisco do Nascimento Júnior
* Homero Sampaio Cavalcanti
* Ivan Sérgio da Silva Júnior
* José Edmar de Siqueira
* José Thiago Tenório Lopes
* Kássia Regina Silvestre de Albuquerque
* Leonardo Luiz Vieira da Silva
* Márcio Roberto Batista da Silva
* Maria de Fátima Sampaio Leite
* Micaela Maria Coelho de Araújo
* Nelson Mendonça de Carvalho
* Newton Morais e Silva
* Pedro Alexandre Santos da Silva Filho
* Rafael Corrêa Lima e Silva
* Rafael Francisco Pinto
* Rafael Koury Monteiro
* Rafael Palermo de Araújo
* Raphael Veras Rossiter
* Roberto Sobreira Barbalho
* Rodrigo Avellar Silveira
* Rosana Carvalho Barbosa
* Sávio Luiz de Andrade Cavalcante
* Tai Mu Shih
* Thiago Augusto Souza do Nascimento
* Tiago Moreno Rodrigues
* Vivianne Barbosa Sousa
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da
* Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais
* detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.gerencial.micromedicao.hidrometro;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
public class GHidrometroDiametro
implements Serializable {
private static final long serialVersionUID = 1L;
/** identifier field */
private Integer id;
/** persistent field */
private String descricaoHidrometroDiametro;
/** persistent field */
private String descricaoAbreviadaHidrometroDiametro;
/** nullable persistent field */
private Short indicadorUso;
/** persistent field */
private Date ultimaAlteracao;
/** nullable persistent field */
private Short numeroOrdem;
/** persistent field */
private Set resumoHidrometros;
/** full constructor */
public GHidrometroDiametro(Integer id, String descricaoHidrometroDiametro, String descricaoAbreviadaHidrometroDiametro,
Short indicadorUso, Date ultimaAlteracao, Short numeroOrdem, Set resumoHidrometros) {
this.id = id;
this.descricaoHidrometroDiametro = descricaoHidrometroDiametro;
this.descricaoAbreviadaHidrometroDiametro = descricaoAbreviadaHidrometroDiametro;
this.indicadorUso = indicadorUso;
this.ultimaAlteracao = ultimaAlteracao;
this.numeroOrdem = numeroOrdem;
this.resumoHidrometros = resumoHidrometros;
}
/** default constructor */
public GHidrometroDiametro() {
}
/** minimal constructor */
public GHidrometroDiametro(Integer id, String descricaoHidrometroDiametro, String descricaoAbreviadaHidrometroDiametro,
Date ultimaAlteracao, Set resumoHidrometros) {
this.id = id;
this.descricaoHidrometroDiametro = descricaoHidrometroDiametro;
this.descricaoAbreviadaHidrometroDiametro = descricaoAbreviadaHidrometroDiametro;
this.ultimaAlteracao = ultimaAlteracao;
this.resumoHidrometros = resumoHidrometros;
}
public Integer getId(){
return this.id;
}
public void setId(Integer id){
this.id = id;
}
public String getDescricaoHidrometroDiametro(){
return this.descricaoHidrometroDiametro;
}
public void setDescricaoHidrometroDiametro(String descricaoHidrometroDiametro){
this.descricaoHidrometroDiametro = descricaoHidrometroDiametro;
}
public String getDescricaoAbreviadaHidrometroDiametro(){
return this.descricaoAbreviadaHidrometroDiametro;
}
public void setDescricaoAbreviadaHidrometroDiametro(String descricaoAbreviadaHidrometroDiametro){
this.descricaoAbreviadaHidrometroDiametro = descricaoAbreviadaHidrometroDiametro;
}
public Short getIndicadorUso(){
return this.indicadorUso;
}
public void setIndicadorUso(Short indicadorUso){
this.indicadorUso = indicadorUso;
}
public Date getUltimaAlteracao(){
return this.ultimaAlteracao;
}
public void setUltimaAlteracao(Date ultimaAlteracao){
this.ultimaAlteracao = ultimaAlteracao;
}
public Short getNumeroOrdem(){
return this.numeroOrdem;
}
public void setNumeroOrdem(Short numeroOrdem){
this.numeroOrdem = numeroOrdem;
}
public Set getResumoHidrometros(){
return this.resumoHidrometros;
}
public void setResumoHidrometros(Set resumoHidrometros){
this.resumoHidrometros = resumoHidrometros;
}
public String toString(){
return new ToStringBuilder(this).append("id", getId()).toString();
}
}
|
[
"Yara.Souza@procenge.com.br"
] |
Yara.Souza@procenge.com.br
|
5304b7646688dac6f33c92c803890d1c699b5d90
|
3b6a37e4ce71f79ae44d4b141764138604a0f2b9
|
/phloc-commons/src/test/java/com/phloc/commons/io/file/filter/FileFilterToIFilterAdapterTest.java
|
db7243f7cdf7decd375ed91195c7e36198f066d5
|
[
"Apache-2.0"
] |
permissive
|
lsimons/phloc-schematron-standalone
|
b787367085c32e40d9a4bc314ac9d7927a5b83f1
|
c52cb04109bdeba5f1e10913aede7a855c2e9453
|
refs/heads/master
| 2021-01-10T21:26:13.317628
| 2013-09-13T12:18:02
| 2013-09-13T12:18:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,941
|
java
|
/**
* Copyright (C) 2006-2013 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.commons.io.file.filter;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;
import org.junit.Test;
import com.phloc.commons.filter.IFilter;
import com.phloc.commons.mock.PhlocTestUtils;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* Test class for class {@link FileFilterToIFilterAdapter}.
*
* @author Philip Helger
*/
public final class FileFilterToIFilterAdapterTest
{
@Test
@SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION")
public void testAll ()
{
try
{
new FileFilterToIFilterAdapter ((FilenameFilter) null);
fail ();
}
catch (final NullPointerException ex)
{}
try
{
new FileFilterToIFilterAdapter ((FileFilter) null);
fail ();
}
catch (final NullPointerException ex)
{}
IFilter <File> aFilter = new FileFilterToIFilterAdapter (FileFilterParentDirectoryPublic.getInstance ());
// file
assertTrue (aFilter.matchesFilter (new File ("pom.xml")));
// not existing file
assertTrue (aFilter.matchesFilter (new File ("file.htm")));
// directory
assertTrue (aFilter.matchesFilter (new File ("src")));
// null
assertFalse (aFilter.matchesFilter (null));
PhlocTestUtils.testToStringImplementation (aFilter);
aFilter = FileFilterToIFilterAdapter.getANDChained (FileFilterParentDirectoryPublic.getInstance (),
FileFilterFileOnly.getInstance ());
assertNotNull (aFilter);
// file
assertTrue (aFilter.matchesFilter (new File ("pom.xml")));
// not existing file
assertFalse (aFilter.matchesFilter (new File ("file.htm")));
// directory
assertFalse (aFilter.matchesFilter (new File ("src")));
// null
assertFalse (aFilter.matchesFilter (null));
PhlocTestUtils.testToStringImplementation (aFilter);
aFilter = FileFilterToIFilterAdapter.getORChained (FileFilterParentDirectoryPublic.getInstance (),
FileFilterFileOnly.getInstance ());
assertNotNull (aFilter);
// file
assertTrue (aFilter.matchesFilter (new File ("pom.xml")));
// not existing file
assertTrue (aFilter.matchesFilter (new File ("file.htm")));
// directory
assertTrue (aFilter.matchesFilter (new File ("src")));
// null
assertFalse (aFilter.matchesFilter (null));
PhlocTestUtils.testToStringImplementation (aFilter);
try
{
FileFilterToIFilterAdapter.getANDChained ((FileFilter []) null);
fail ();
}
catch (final IllegalArgumentException ex)
{}
try
{
FileFilterToIFilterAdapter.getANDChained (new FileFilter [0]);
fail ();
}
catch (final IllegalArgumentException ex)
{}
try
{
FileFilterToIFilterAdapter.getORChained ((FileFilter []) null);
fail ();
}
catch (final IllegalArgumentException ex)
{}
try
{
FileFilterToIFilterAdapter.getORChained (new FileFilter [0]);
fail ();
}
catch (final IllegalArgumentException ex)
{}
}
}
|
[
"mail@leosimons.com"
] |
mail@leosimons.com
|
e97529f045340501a6793663d13ce4c9dfcaa28b
|
c216eda30594e14e2a79111ff33ea007aa2374ca
|
/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/request/RelationshipUR.java
|
45da77ad5f93a7cc133675af3d4f62a9eaae65e2
|
[
"Apache-2.0"
] |
permissive
|
apache/syncope
|
e027b60dfd50309c7d5a54fbcbc642a1be21b12f
|
ec54d59f6a44701ff2383d5729b54a4a07917f06
|
refs/heads/master
| 2023-08-31T11:11:36.107226
| 2023-08-29T09:17:46
| 2023-08-29T09:29:31
| 25,623,942
| 233
| 333
|
Apache-2.0
| 2023-09-14T08:07:44
| 2014-10-23T07:00:10
|
Java
|
UTF-8
|
Java
| false
| false
| 2,478
|
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.syncope.common.lib.request;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.syncope.common.lib.to.RelationshipTO;
public class RelationshipUR extends AbstractPatch {
private static final long serialVersionUID = 1314175521205206511L;
public static class Builder extends AbstractPatch.Builder<RelationshipUR, Builder> {
public Builder(final RelationshipTO relationshipTO) {
super();
getInstance().setRelationshipTO(relationshipTO);
}
@Override
protected RelationshipUR newInstance() {
return new RelationshipUR();
}
}
private RelationshipTO relationshipTO;
public RelationshipTO getRelationshipTO() {
return relationshipTO;
}
public void setRelationshipTO(final RelationshipTO relationshipTO) {
this.relationshipTO = relationshipTO;
}
@Override
public int hashCode() {
return new HashCodeBuilder().
appendSuper(super.hashCode()).
append(relationshipTO).
build();
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final RelationshipUR other = (RelationshipUR) obj;
return new EqualsBuilder().
appendSuper(super.equals(obj)).
append(relationshipTO, other.relationshipTO).
build();
}
}
|
[
"ilgrosso@apache.org"
] |
ilgrosso@apache.org
|
dcbdbe524acf4a643546d6940e3bdc217ac17461
|
b755a269f733bc56f511bac6feb20992a1626d70
|
/qiyun-lottery/lottery-model/src/main/java/com/qiyun/model2/FootballTeam2.java
|
6266a73dd5c80e4529cc9a46fca57fdceaa5b082
|
[] |
no_license
|
yysStar/dubbo-zookeeper-SSM
|
55df313b58c78ab2eaa3d021e5bb201f3eee6235
|
e3f85dea824159fb4c29207cc5c9ccaecf381516
|
refs/heads/master
| 2022-12-21T22:50:33.405116
| 2020-05-09T09:20:41
| 2020-05-09T09:20:41
| 125,301,362
| 2
| 0
| null | 2022-12-16T10:51:09
| 2018-03-15T02:27:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,418
|
java
|
package com.qiyun.model2;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class FootballTeam2 {
private Integer id;
private String standardName;
private String dc;
private String jc;
private String fb;
private String dyj;
private Integer pm;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getStandardName() {
return standardName;
}
public void setStandardName(String standardName) {
this.standardName = standardName == null ? null : standardName.trim();
}
public String getDc() {
return dc;
}
public void setDc(String dc) {
this.dc = dc == null ? null : dc.trim();
}
public String getJc() {
return jc;
}
public void setJc(String jc) {
this.jc = jc == null ? null : jc.trim();
}
public String getFb() {
return fb;
}
public void setFb(String fb) {
this.fb = fb == null ? null : fb.trim();
}
public String getDyj() {
return dyj;
}
public void setDyj(String dyj) {
this.dyj = dyj == null ? null : dyj.trim();
}
public Integer getPm() {
return pm;
}
public void setPm(Integer pm) {
this.pm = pm;
}
}
|
[
"qawsed1231010@126.com"
] |
qawsed1231010@126.com
|
221ed955b6a71b0e606c74659d815d91dc40b4c5
|
48587cfdada22c7580bd5b95dd2db8cf139b7015
|
/src/main/java/com/goodsoft/yuanlin/YlcxptApplication.java
|
3f872af3958eb9b02efd92c4a12aacc28ae18da2
|
[] |
no_license
|
MANJUSAK/ylcx
|
1cf7c948f56b1789d779266a9338a13f22da7af3
|
65175964d69bf92125cadb3849acdedf6cc7eb14
|
refs/heads/master
| 2021-01-22T07:31:53.100219
| 2017-09-04T10:11:27
| 2017-09-04T10:11:27
| 102,305,878
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 758
|
java
|
package com.goodsoft.yuanlin;
import org.apache.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
/**
* function 系统启动程序入口
* Created by 严彬荣 on 2017/8/4.
*/
@ComponentScan(basePackages = "com.goodsoft.yuanlin")
@ServletComponentScan(basePackages = "com.goodsoft.yuanlin.config")
@SpringBootApplication
public class YlcxptApplication {
private Logger logger = Logger.getLogger(YlcxptApplication.class);
public static void main(String[] args) {
SpringApplication.run(YlcxptApplication.class, args);
}
}
|
[
"453420698@qq.com"
] |
453420698@qq.com
|
0d84e13277f43bc73f9347e32262c2f0fe122d07
|
b4c47b649e6e8b5fc48eed12fbfebeead32abc08
|
/android/app/backup/WallpaperBackupHelper.java
|
91fddc89895e0f6bef5c8d9a8c089fe24345aacd
|
[] |
no_license
|
neetavarkala/miui_framework_clover
|
300a2b435330b928ac96714ca9efab507ef01533
|
2670fd5d0ddb62f5e537f3e89648d86d946bd6bc
|
refs/heads/master
| 2022-01-16T09:24:02.202222
| 2018-09-01T13:39:50
| 2018-09-01T13:39:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,946
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
package android.app.backup;
import android.app.WallpaperManager;
import android.content.Context;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.util.Slog;
import java.io.*;
// Referenced classes of package android.app.backup:
// FileBackupHelperBase, BackupHelper, BackupDataInputStream, BackupDataOutput
public class WallpaperBackupHelper extends FileBackupHelperBase
implements BackupHelper
{
public WallpaperBackupHelper(Context context, String as[])
{
super(context);
mContext = context;
mKeys = as;
mWpm = (WallpaperManager)context.getSystemService("wallpaper");
}
public void performBackup(ParcelFileDescriptor parcelfiledescriptor, BackupDataOutput backupdataoutput, ParcelFileDescriptor parcelfiledescriptor1)
{
}
public void restoreEntity(BackupDataInputStream backupdatainputstream)
{
Object obj;
Object obj1;
Object obj3;
obj = null;
obj1 = null;
obj3 = backupdatainputstream.getKey();
if(!isKeyInList(((String) (obj3)), mKeys) || !((String) (obj3)).equals("/data/data/com.android.settings/files/wallpaper")) goto _L2; else goto _L1
_L1:
File file = new File(STAGE_FILE);
boolean flag = writeFile(file, backupdatainputstream);
if(!flag) goto _L4; else goto _L3
_L3:
Object obj4;
obj4 = null;
obj3 = null;
backupdatainputstream = JVM INSTR new #101 <Class FileInputStream>;
backupdatainputstream.FileInputStream(file);
mWpm.setStream(backupdatainputstream);
obj3 = obj1;
if(backupdatainputstream == null)
break MISSING_BLOCK_LABEL_97;
backupdatainputstream.close();
obj3 = obj1;
_L7:
if(obj3 == null) goto _L6; else goto _L5
_L5:
try
{
throw obj3;
}
// Misplaced declaration of an exception variable
catch(BackupDataInputStream backupdatainputstream) { }
_L8:
obj3 = JVM INSTR new #113 <Class StringBuilder>;
((StringBuilder) (obj3)).StringBuilder();
Slog.e("WallpaperBackupHelper", ((StringBuilder) (obj3)).append("Unable to set restored wallpaper: ").append(backupdatainputstream.getMessage()).toString());
_L6:
file.delete();
_L2:
return;
obj3;
goto _L7
backupdatainputstream;
_L12:
throw backupdatainputstream;
obj;
obj1 = backupdatainputstream;
backupdatainputstream = ((BackupDataInputStream) (obj));
_L11:
obj = obj1;
if(obj3 == null)
break MISSING_BLOCK_LABEL_173;
((FileInputStream) (obj3)).close();
obj = obj1;
_L9:
if(obj == null)
break MISSING_BLOCK_LABEL_223;
try
{
throw obj;
}
// Misplaced declaration of an exception variable
catch(BackupDataInputStream backupdatainputstream) { }
goto _L8
obj3;
label0:
{
if(obj1 != null)
break label0;
obj = obj3;
}
goto _L9
obj = obj1;
if(obj1 == obj3) goto _L9; else goto _L10
_L10:
((Throwable) (obj1)).addSuppressed(((Throwable) (obj3)));
obj = obj1;
goto _L9
backupdatainputstream;
file.delete();
throw backupdatainputstream;
throw backupdatainputstream;
_L4:
Slog.e("WallpaperBackupHelper", "Unable to save restored wallpaper");
goto _L6
backupdatainputstream;
obj3 = obj4;
obj1 = obj;
goto _L11
Object obj2;
obj2;
obj3 = backupdatainputstream;
backupdatainputstream = ((BackupDataInputStream) (obj2));
obj2 = obj;
goto _L11
obj2;
obj3 = backupdatainputstream;
backupdatainputstream = ((BackupDataInputStream) (obj2));
goto _L12
}
public volatile void writeNewStateDescription(ParcelFileDescriptor parcelfiledescriptor)
{
super.writeNewStateDescription(parcelfiledescriptor);
}
private static final boolean DEBUG = false;
private static final String STAGE_FILE = (new File(Environment.getUserSystemDirectory(0), "wallpaper-tmp")).getAbsolutePath();
private static final String TAG = "WallpaperBackupHelper";
public static final String WALLPAPER_IMAGE_KEY = "/data/data/com.android.settings/files/wallpaper";
public static final String WALLPAPER_INFO_KEY = "/data/system/wallpaper_info.xml";
private final String mKeys[];
private final WallpaperManager mWpm;
}
|
[
"hosigumayuugi@gmail.com"
] |
hosigumayuugi@gmail.com
|
3a91b2ffc1dc637af3887419c22ae57a7693f3d2
|
0fa28354a25df8ea3ec06b65e65337063ce873ee
|
/jo.ar.gen/src/jo/util/utils/obj/BooleanUtils.java
|
278b494bb136c3e903c2e3284ba1612c2e24ab39
|
[] |
no_license
|
Jorch72/JoAdvancedRocketry
|
bd1944b7f16b193e4a1055af77fb2fc3c2bd4b32
|
d3c2d7b9e472946b514b70dc8029d885b8998eb8
|
refs/heads/master
| 2020-03-29T11:22:17.329044
| 2018-02-01T03:22:15
| 2018-02-01T03:22:15
| 149,848,680
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,763
|
java
|
package jo.util.utils.obj;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
public class BooleanUtils
{
public static Object[] toArray(boolean[] booleanArray)
{
if (booleanArray == null)
return null;
Boolean[] objArray = new Boolean[booleanArray.length];
for (int i = 0; i < booleanArray.length; i++)
objArray[i] = new Boolean(booleanArray[i]);
return objArray;
}
public static boolean parseBoolean(String v)
{
return parseBoolean(v, false);
}
public static boolean parseBoolean(Object v)
{
if (v instanceof Boolean)
return ((Boolean)v).booleanValue();
if (v instanceof Number)
return ((Number)v).intValue() != 0;
return parseBoolean(v, false);
}
public static boolean parseBoolean(String v, boolean def)
{
if (StringUtils.isTrivial(v))
return def;
return v.equalsIgnoreCase("true") || v.equalsIgnoreCase("yes") || v.equalsIgnoreCase("y")
|| v.equalsIgnoreCase("1") || v.equalsIgnoreCase("-1");
}
public static boolean parseBoolean(Object v, boolean def)
{
if (v == null)
return def;
if (v instanceof Boolean)
return ((Boolean)v).booleanValue();
if (v instanceof String)
return parseBoolean((String)v);
if (v instanceof Number)
return Math.abs(((Number)v).doubleValue()) < 0.0001;
return def;
}
public static boolean[] fromBytes(byte[] bytes)
{
try
{
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
int len = ois.readInt();
boolean[] ret = new boolean[len];
for (int i = 0; i < len; i++)
ret[i] = (ois.readInt() != 0);
return ret;
}
catch (IOException e)
{
e.printStackTrace();
return null;
}
}
public static byte[] toBytes(boolean[] vals)
{
try
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeInt(vals.length);
for (int i = 0; i < vals.length; i++)
oos.writeInt(vals[i] ? 1 : 0);
oos.flush();
return baos.toByteArray();
}
catch (IOException e)
{
e.printStackTrace();
return null;
}
}
}
|
[
"jo@111george.com"
] |
jo@111george.com
|
e6c8a6ec7e9285d768de802000f15ca4ec1df1b2
|
217b6ca03aae468cbae64b519237044cd3178b33
|
/olyo/src/net/java/sip/communicator/service/systray/SystrayService.java
|
ee7c51f3cec2b268ce2e5c8f178af5ddeea6399f
|
[] |
no_license
|
lilichun/olyo
|
41778e668784ca2fa179c65a67d99f3b94fdbb45
|
b3237b7d62808a5b1d059a8dd426508e6e4af0b9
|
refs/heads/master
| 2021-01-22T07:27:30.658459
| 2008-06-19T09:57:36
| 2008-06-19T09:57:36
| 32,123,461
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,493
|
java
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.systray;
import net.java.sip.communicator.service.systray.event.*;
/**
* The <tt>SystrayService</tt> manages the system tray icon, menu and messages.
* It is meant to be used by all bundles that want to show a system tray message.
*
* @author Yana Stamcheva
*/
public interface SystrayService
{
/**
* Message type corresponding to an error message.
*/
public static final int ERROR_MESSAGE_TYPE = 0;
/**
* Message type corresponding to an information message.
*/
public static final int INFORMATION_MESSAGE_TYPE = 1;
/**
* Message type corresponding to a warning message.
*/
public static final int WARNING_MESSAGE_TYPE = 2;
/**
* Message type is not accessible.
*/
public static final int NONE_MESSAGE_TYPE = -1;
/**
* Image type corresponding to the sip-communicator icon
*/
public static final int SC_IMG_TYPE = 0;
/**
* Image type corresponding to the envelope icon
*/
public static final int ENVELOPE_IMG_TYPE = 1;
/**
* Shows a system tray message with the given title and message content. The
* message type will affect the icon used to present the message.
*
* @param title the title, which will be shown
* @param messageContent the content of the message to display
* @param messageType the message type; one of XXX_MESSAGE_TYPE constants
* declared in this class
*/
public void showPopupMessage(String title,
String messageContent, int messageType);
/**
* Adds a listener for <tt>SystrayPopupMessageEvent</tt>s posted when user
* clicks on the system tray popup message.
*
* @param listener the listener to add
*/
public void addPopupMessageListener(SystrayPopupMessageListener listener);
/**
* Removes a listener previously added with <tt>addPopupMessageListener</tt>.
*
* @param listener the listener to remove
*/
public void removePopupMessageListener(SystrayPopupMessageListener listener);
/**
* Sets a new icon to the systray.
*
* @param imageType the type of the image to set
*/
public void setSystrayIcon(int imageType);
}
|
[
"dongfengyu20032045@1a5f2d27-d927-0410-a143-5778ce1304a0"
] |
dongfengyu20032045@1a5f2d27-d927-0410-a143-5778ce1304a0
|
c0bf2cec5c9a42bb121be55b8356e78f135b01dc
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_0f9b43a209ac3dc49e7bfd8324d24ec63cf11ee7/ProjectileMovement/18_0f9b43a209ac3dc49e7bfd8324d24ec63cf11ee7_ProjectileMovement_s.java
|
6cb3becd5a95beaf014ec631d14fa2d4c99e1c7a
|
[] |
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,091
|
java
|
package qp.main.threads;
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import qp.main.entity.Enemy;
import qp.main.entity.Projectile;
import qp.main.gui.frame.Frame;
public class ProjectileMovement implements Runnable{
private Projectile p;
public ProjectileMovement(Projectile p){
this.p = p;
}
public void run(){
try{
while(p.exists){
if(!(p.x - p.width > 0 && p.x< Frame.WIDTH && p.y + p.height < Frame.HEIGHT && p.y > 0 )){
p.remove();
p.exists = false;
}
try{
if(!Enemy.getEnemies().isEmpty()){
for(Enemy e: (ArrayList<Enemy>) Enemy.getEnemies().clone()){
if(e.intersects(p.x,p.y,p.width,p.height)){
e.remove();
p.remove();
}
}
}
}catch(Exception e){
if (e instanceof NullPointerException || e instanceof ConcurrentModificationException)
break;
e.printStackTrace();
}
Thread.sleep(2);
p.move();
}
}catch(Exception e){
e.printStackTrace();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
097ca1c50732a1f50d28d62af0d32289cff45ca8
|
ea65352c3cc9288eb66a5c1c98a2de7a6a7f6a4b
|
/src/main/java/net/simpleframework/lib/org/mvel2/templates/res/TerminalExpressionNode.java
|
802078db1749fafe541ac5ca960cb345d4bffc73
|
[] |
no_license
|
simpleframework/simple-common
|
5c95611bc48d9c82a9c81976c44c24024fe933db
|
97a5c1954eaa2519629c39b7da0c2e1a1453b116
|
refs/heads/master
| 2021-07-13T03:55:25.417762
| 2021-07-01T07:06:58
| 2021-07-01T07:06:58
| 14,333,099
| 4
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,624
|
java
|
/**
* MVEL 2.0
* Copyright (C) 2007 The Codehaus
* Mike Brock, Dhanji Prasanna, John Graham, Mark Proctor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.simpleframework.lib.org.mvel2.templates.res;
import net.simpleframework.lib.org.mvel2.MVEL;
import net.simpleframework.lib.org.mvel2.integration.VariableResolverFactory;
import net.simpleframework.lib.org.mvel2.templates.TemplateRuntime;
import net.simpleframework.lib.org.mvel2.templates.util.TemplateOutputStream;
public class TerminalExpressionNode extends Node {
public TerminalExpressionNode() {
}
public TerminalExpressionNode(final Node node) {
this.begin = node.begin;
this.name = node.name;
this.contents = node.contents;
this.cStart = node.cStart;
this.cEnd = node.cEnd;
}
@Override
public Object eval(final TemplateRuntime runtime, final TemplateOutputStream appender,
final Object ctx, final VariableResolverFactory factory) {
return MVEL.eval(contents, cStart, cEnd - cStart, ctx, factory);
}
@Override
public boolean demarcate(final Node terminatingNode, final char[] template) {
return false;
}
}
|
[
"cknet@126.com"
] |
cknet@126.com
|
78bb46dd19ba2ba9e1698ebb7c4b6c7aac1d7c27
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/AnnotationMapper.java
|
98e9e024f37ce3b7ded99d0b1a1dcc717de8379b
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,403
|
java
|
15
https://raw.githubusercontent.com/zjjxxlgb/mybatis2sql/master/src/test/java/org/apache/ibatis/submitted/global_variables/AnnotationMapper.java
/**
* Copyright ${license.git.copyrightYears} 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.apache.ibatis.submitted.global_variables;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Property;
import org.apache.ibatis.annotations.Select;
@CacheNamespace(implementation = CustomCache.class, properties = {
@Property(name = "stringValue", value = "${stringProperty}"),
@Property(name = "integerValue", value = "${integerProperty}"),
@Property(name = "longValue", value = "${longProperty}")
})
public interface AnnotationMapper {
@Select("select * from ${table} where id = #{id}")
User getUser(Integer id);
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
162aad24ee1fb718aeab6909833047a4ef8c76a5
|
93d06d6b9657cf4ce8fb7583f30615ddc2851c95
|
/ssaw-me-helper/src/test/java/com/ssaw/ssawmehelper/SsawMeHelperApplicationTests.java
|
48914b34dd2b52732adfe2eea33179d5a7452b09
|
[] |
no_license
|
IsSenHu/sapache2
|
89f532fc0353dc5639c1c30ac59a83dae6f35b47
|
f563bf69449af827b6b0163a67c2ec39f5873164
|
refs/heads/master
| 2023-08-05T05:45:34.448788
| 2019-07-26T11:56:11
| 2019-07-26T11:56:11
| 187,483,694
| 2
| 1
| null | 2023-07-22T06:17:33
| 2019-05-19T13:58:44
|
Java
|
UTF-8
|
Java
| false
| false
| 4,327
|
java
|
package com.ssaw.ssawmehelper;
import com.ssaw.redis.lock.RedisLock;
import com.ssaw.redis.lock.RedisSemaphore;
import com.ssaw.ssawmehelper.dao.redis.*;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SsawMeHelperApplicationTests {
@Autowired
private KaoQinDao kaoQinDao;
@Autowired
private MyCollectionDao myCollectionDao;
@Autowired
private GoodsDemoDao goodsDemoDao;
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Autowired
private MarketDao marketDao;
@Autowired
private LogDao logDao;
@Autowired
private AutoCompletionDao autoCompletionDao;
@Autowired
private LockDao lockDao;
@Test
public void contextLoads() {
stringRedisTemplate.opsForValue().set("sentinel", "test");
System.out.println(stringRedisTemplate.opsForValue().get("sentinel"));
}
@Test
public void demo2() {
marketDao.watch("你好");
}
@Test
public void demo3() {
autoCompletionDao.get("ac");
}
@Test
public void demo4() throws InterruptedException {
lockDao.lock("husen");
lockDao.unlock("husen");
}
@Test
public void demo5() throws InterruptedException {
lockDao.lock("husen");
lockDao.unlock("husen");
}
@Test
public void demo6() throws InterruptedException {
RedisSemaphore semaphore = new RedisSemaphore(stringRedisTemplate, 2);
for (int i = 0; i < 3; i++) {
new Thread(() -> {
String acquire = semaphore.acquire("semaphore:key");
System.out.println(acquire);
try {
Thread.sleep(1000L);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (Objects.nonNull(acquire)) {
semaphore.release("semaphore:key", acquire);
}
}).start();
}
Thread.sleep(1000000L);
}
@Test
public void demo7() {
stringRedisTemplate.executePipelined((RedisCallback<Object>) connection -> {
connection.zAdd("233".getBytes(), System.currentTimeMillis(), "333".getBytes());
Long aLong = connection.zRank("233".getBytes(), "333".getBytes());
List<Object> objects = connection.closePipeline();
return null;
});
}
@Test
public void demo8() throws InterruptedException {
RedisLock redisLock = new RedisLock(stringRedisTemplate);
boolean asdedddd = redisLock.lock("asdedddd", 100, TimeUnit.SECONDS);
System.out.println(asdedddd);
redisLock.unlock("asdedddd");
Thread.sleep(1000000L);
}
@Test
public void demo9() throws InterruptedException {
RedisLock redisLock = new RedisLock(stringRedisTemplate);
boolean asdedddd = redisLock.lock("asdedddd", 100, TimeUnit.SECONDS);
System.out.println(asdedddd);
redisLock.unlock("asdedddd");
Thread.sleep(1000000L);
}
@Test
public void demo10() {
ListOperations<String, String> list = stringRedisTemplate.opsForList();
list.rightPushAll("queue1", "husen", "senhu");
list.rightPushAll("queue2", "husen2", "senhu2");
list.rightPushAll("queue3", "husen3", "senhu3");
}
@Test
public void demo11() {
while (true) {
Object execute = stringRedisTemplate.execute((RedisCallback<String>) connection -> {
List<byte[]> bytes = connection.bLPop(30, "queue1".getBytes(), "queue2".getBytes(), "queue3".getBytes());
return new String(bytes.get(1));
});
System.out.println(execute);
}
}
}
|
[
"1178515826@qq.com"
] |
1178515826@qq.com
|
5e27dc2cbbdfcbb9eeb8586a52aa5c1031902470
|
e1feb82d55edab3825e748113b3672174dcf1ed3
|
/app/src/main/java/com/lntu/online/activity/CrashShowActivity.java
|
0028a960a0bae752789a110bde66068c565b8c0f
|
[] |
no_license
|
qq24090467/LntuOnline-Android
|
ef7b95be8e08a1687747f4ffa5af2b9eeddf48d9
|
030a7f2cb6d9bee4feb68f6bd15567c71235b969
|
refs/heads/master
| 2021-01-16T01:07:20.728796
| 2015-03-27T12:52:17
| 2015-03-27T12:52:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,864
|
java
|
package com.lntu.online.activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.text.format.Time;
import android.view.View;
import android.widget.TextView;
import com.afollestad.materialdialogs.MaterialDialog;
import com.lntu.online.R;
import com.lntu.online.http.HttpUtil;
import com.lntu.online.http.NormalAuthListener;
import com.lntu.online.info.NetworkConfig;
import com.loopj.android.http.RequestParams;
import com.takwolf.android.util.AppUtils;
import org.apache.http.Header;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
public class CrashShowActivity extends ActionBarActivity {
@InjectView(R.id.toolbar)
protected Toolbar toolbar;
@InjectView(R.id.crash_show_tv_info)
protected TextView tvInfo;
private String sorry = "" +
"非常抱歉,程序运行过程中出现了一个无法避免的错误。" +
"您可以将该问题发送给我们,此举将有助于我们改善应用体验。" +
"由此给您带来的诸多不便,我们深表歉意,敬请谅解。\n" +
"----------------\n";
private String crashLog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_crash_show);
ButterKnife.inject(this);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_error_white_24dp);
//接收异常对象
Intent intent = getIntent();
Throwable e = (Throwable) intent.getSerializableExtra("e");
//构建字符串
StringBuffer sb = new StringBuffer();
sb.append("生产厂商:\n");
sb.append(Build.MANUFACTURER + "\n\n");
sb.append("手机型号:\n");
sb.append(Build.MODEL + "\n\n");
sb.append("系统版本:\n");
sb.append(Build.VERSION.RELEASE + "\n\n");
sb.append("异常时间:\n");
Time time = new Time();
time.setToNow();
sb.append(time.toString() + "\n\n");
sb.append("异常类型:\n");
sb.append(e.getClass().getName() + "\n\n");
sb.append("异常信息:\n");
sb.append(e.getMessage() + "\n\n");
sb.append("异常堆栈:\n" );
Writer writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
e.printStackTrace(printWriter);
Throwable cause = e.getCause();
while (cause != null) {
cause.printStackTrace(printWriter);
cause = cause.getCause();
}
printWriter.close();
sb.append(writer.toString());
crashLog = sb.toString();
//显示信息
tvInfo.setText(sorry + crashLog);
}
@OnClick(R.id.crash_show_btn_send)
public void onBtnSend(final View view) {
RequestParams params = new RequestParams();
params.put("info", crashLog);
params.put("platform", "android");
params.put("version", AppUtils.getVersionCode(this));
params.put("osVer", Build.VERSION.RELEASE);
params.put("manufacturer", Build.MANUFACTURER);
params.put("model", Build.MODEL);
HttpUtil.post(this, NetworkConfig.serverUrl + "feedback/crashLog", params, new NormalAuthListener(this) {
@Override
public void onSuccess(int statusCode, Header[] headers, String responseString) {
if (view == null) {
return; //强制提交的不提示
}
if ((responseString + "").equals("OK")) {
new MaterialDialog.Builder(getContext())
.title("提示")
.content("问题已经提交,非常感谢")
.cancelable(false)
.positiveText("确定")
.positiveColorRes(R.color.colorPrimary)
.callback(new MaterialDialog.ButtonCallback() {
@Override
public void onPositive(MaterialDialog dialog) {
finish();
}
})
.show();
} else {
String[] msgs = responseString.split("\n");
showErrorDialog("提示", msgs[0], msgs[1]);
}
}
});
}
@Override
public void onBackPressed() {
finish();
}
}
|
[
"takwolf@foxmail.com"
] |
takwolf@foxmail.com
|
0205611e8d7caafbc97a4bdae4b8d17c17df68ec
|
b7aff63b8a97f99949edabafdd8ef637bcfe3dc5
|
/common/src/com/hex/bigdata/udsp/common/controller/ComPropertiesController.java
|
d31feca9d12502115b5ec69efa143f47b3cf522f
|
[] |
no_license
|
dfhao/boracay
|
432c60301d9e82337f46eea89ffc1f8dc28c1371
|
b317a2fb69aed8f217c1ab0dbff585549b29f62b
|
refs/heads/master
| 2021-09-04T03:30:31.226691
| 2017-12-28T11:16:05
| 2017-12-28T11:16:05
| 116,001,453
| 1
| 0
| null | 2018-01-04T09:54:57
| 2018-01-02T10:03:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,895
|
java
|
package com.hex.bigdata.udsp.common.controller;
import com.hex.bigdata.udsp.common.model.ComProperties;
import com.hex.bigdata.udsp.common.service.ComPropertiesService;
import com.hex.goframe.controller.BaseController;
import com.hex.goframe.model.MessageResult;
import com.hex.goframe.model.PageListResult;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* 公共配置控制层
* Created by tomnic on 2017/2/27.
*/
@RequestMapping("/com/props/")
@Controller
public class ComPropertiesController extends BaseController {
private static Logger logger = LogManager.getLogger(ComPropertiesController.class);
@Autowired
private ComPropertiesService comPropertiesService;
@RequestMapping({"/select/{fkId}"})
@ResponseBody
public MessageResult select(@PathVariable("fkId") String fkId) {
boolean status = true;
String message = "查询成功";
List<ComProperties> list = null;
if (StringUtils.isBlank(fkId)) {
status = false;
message = "请求参数为空";
} else {
try {
list = this.comPropertiesService.selectByFkId(fkId);
} catch (Exception e) {
e.printStackTrace();
status = false;
message = "系统异常:" + e;
}
}
if (status) {
logger.debug(message);
} else {
logger.info(message);
}
return new PageListResult(list);
}
}
|
[
"junjie.miao@goupwith.com"
] |
junjie.miao@goupwith.com
|
19680e77fd0e6e067e66b0e81430ea07a65d65e0
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/java/java-impl-refactorings/src/com/intellij/refactoring/extractMethodObject/ExtractGeneratedClassUtil.java
|
5faa29237443da82f12f309bc0e49f201aff44b9
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 6,793
|
java
|
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.refactoring.extractMethodObject;
import com.intellij.ide.highlighter.JavaFileType;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.util.PsiTypesUtil;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
final class ExtractGeneratedClassUtil {
private static final String GENERATED_CLASS_PACKAGE = "idea.debugger.rt";
private static final Logger LOG = Logger.getInstance(ExtractGeneratedClassUtil.class);
static PsiClass extractGeneratedClass(@NotNull PsiClass generatedInnerClass,
@NotNull PsiElementFactory elementFactory,
@NotNull PsiElement anchor) {
Project project = generatedInnerClass.getProject();
PsiClass extractedClass = elementFactory.createClass("GeneratedEvaluationClass");
for (PsiField field : generatedInnerClass.getAllFields()) {
extractedClass.add(elementFactory.createFieldFromText(field.getText(), anchor)); // TODO: check if null is OK
}
for (PsiMethod psiMethod : generatedInnerClass.getMethods()) {
extractedClass.add(elementFactory.createMethodFromText(psiMethod.getText(), anchor));
}
PsiJavaFile generatedFile = (PsiJavaFile)PsiFileFactory.getInstance(project)
.createFileFromText(extractedClass.getName() + ".java", JavaFileType.INSTANCE, extractedClass.getContainingFile().getText());
// copy.getModificationStamp(),
//false, false);
generatedFile.setPackageName(GENERATED_CLASS_PACKAGE);
extractedClass = PsiTreeUtil.findChildOfType(generatedFile, PsiClass.class);
copyStaticImports(generatedInnerClass, generatedFile, elementFactory);
assert extractedClass != null;
PsiElement codeBlock = PsiTreeUtil.findFirstParent(anchor, false, element -> element instanceof PsiCodeBlock);
if (codeBlock == null) {
codeBlock = anchor.getParent();
}
addGeneratedClassInfo(codeBlock, generatedInnerClass, extractedClass);
return extractedClass;
}
private static void copyStaticImports(@NotNull PsiElement from,
@NotNull PsiJavaFile destFile,
@NotNull PsiElementFactory elementFactory) {
PsiJavaFile fromFile = PsiTreeUtil.getParentOfType(from, PsiJavaFile.class);
if (fromFile != null) {
PsiImportList sourceImportList = fromFile.getImportList();
if (sourceImportList != null) {
PsiImportList destImportList = destFile.getImportList();
LOG.assertTrue(destImportList != null, "import list of destination file should not be null");
for (PsiImportStatementBase importStatement : sourceImportList.getAllImportStatements()) {
if (importStatement instanceof PsiImportStaticStatement && isPublic((PsiImportStaticStatement)importStatement)) {
PsiElement importStatementCopy = copy((PsiImportStaticStatement)importStatement, elementFactory);
if (importStatementCopy != null) {
destImportList.add(importStatementCopy);
}
else {
LOG.warn("Unable to copy static import statement: " + importStatement.getText());
}
}
}
}
}
}
@Nullable
private static PsiElement copy(@NotNull PsiImportStaticStatement importStatement,
@NotNull PsiElementFactory elementFactory) {
PsiClass targetClass = importStatement.resolveTargetClass();
String memberName = importStatement.getReferenceName();
if (targetClass != null && memberName != null) {
return elementFactory.createImportStaticStatement(targetClass, memberName);
}
return null;
}
private static boolean isPublic(@NotNull PsiImportStaticStatement staticImport) {
PsiClass targetClass = staticImport.resolveTargetClass();
if (targetClass != null && isPublicClass(targetClass)) {
PsiElement importedElement = staticImport.resolve();
if (importedElement instanceof PsiModifierListOwner) {
return ((PsiModifierListOwner)importedElement).hasModifierProperty(PsiModifier.PUBLIC);
}
}
return false;
}
private static boolean isPublicClass(@NotNull PsiClass psiClass) {
while (psiClass != null) {
if (!psiClass.hasModifierProperty(PsiModifier.PUBLIC)) {
return false;
}
psiClass = psiClass.getContainingClass();
}
return true;
}
private static void addGeneratedClassInfo(@NotNull PsiElement element,
@NotNull PsiClass generatedClass,
@NotNull PsiClass extractedClass) {
generatedClass.putUserData(LightMethodObjectExtractedData.REFERENCED_TYPE, PsiTypesUtil.getClassType(extractedClass));
element.accept(new JavaRecursiveElementVisitor() {
@Override
public void visitNewExpression(@NotNull PsiNewExpression expression) {
super.visitNewExpression(expression);
PsiMethod constructor = expression.resolveConstructor();
if (constructor != null && generatedClass.equals(constructor.getContainingClass())) {
List<PsiMethod> methods = ContainerUtil.filter(extractedClass.getConstructors(), x -> isSameMethod(x, constructor));
if (methods.size() == 1) {
LOG.info("Replace constructor: " + constructor.getName());
constructor.putUserData(LightMethodObjectExtractedData.REFERENCE_METHOD, methods.get(0));
}
}
}
@Override
public void visitMethodCallExpression(@NotNull PsiMethodCallExpression expression) {
super.visitMethodCallExpression(expression);
PsiMethod method = expression.resolveMethod();
if (method != null && generatedClass.equals(method.getContainingClass())) {
List<PsiMethod> methods = ContainerUtil.filter(extractedClass.getMethods(), x -> isSameMethod(x, method));
if (methods.size() == 1) {
LOG.info("Replace method: " + method.getName());
method.putUserData(LightMethodObjectExtractedData.REFERENCE_METHOD, methods.get(0));
}
}
}
private static boolean isSameMethod(@NotNull PsiMethod first, @NotNull PsiMethod second) {
if (first.getName().equals(second.getName())) {
return first.getParameterList().getParametersCount() == second.getParameterList().getParametersCount();
}
return false;
}
});
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
f66610317076aa1f095106046acc070cd9a7059a
|
b60db6d5b65796710ba0e7e3caaec9fed244f4e8
|
/OSalesSystem/src/cn/zying/osales/service/stocks/imples/StockReturnServiceImple.java
|
c9a1fd272d40c04dc0aa4e42116831d1002c9b21
|
[] |
no_license
|
pzzying20081128/OSales_System
|
cb5e56ed9d096bfb3f3915bd280732f5f16ffb3b
|
ed5a1cd53c68460653f82c2c6bdff24bea5db9e4
|
refs/heads/master
| 2021-01-10T04:47:46.861972
| 2016-01-23T17:33:59
| 2016-01-23T17:33:59
| 50,175,928
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,075
|
java
|
package cn.zying.osales.service.stocks.imples ;
import java.util.List ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Qualifier ;
import org.springframework.stereotype.Component ;
import cn.zy.apps.tools.units.CommSearchBean ;
import cn.zy.apps.tools.web.SelectPage ;
import cn.zying.osales.OSalesConfigProperties.OptType ;
import cn.zying.osales.pojos.StockReturn ;
import cn.zying.osales.service.ABCommonsService ;
import cn.zying.osales.service.SystemOptServiceException ;
import cn.zying.osales.service.stocks.IStockReturnService ;
import cn.zying.osales.service.stocks.units.StockReturnCheckUnits ;
import cn.zying.osales.service.stocks.units.StockReturnRemoveUnits ;
import cn.zying.osales.service.stocks.units.StockReturnSaveUpdateUnits ;
import cn.zying.osales.service.stocks.units.StockReturnSearchUnits ;
import cn.zying.osales.units.search.bean.StockReturnSearchBean ;
@Component(IStockReturnService.name)
public class StockReturnServiceImple extends ABCommonsService implements IStockReturnService {
//@Resource(name="StockReturnSearchUnits")
@Autowired
@Qualifier("StockReturnSearchUnits")
private StockReturnSearchUnits iStockReturnSearchUnits ;
@Autowired
@Qualifier("StockReturnCheckUnits")
private StockReturnCheckUnits iStockReturnCheckUnits ;
//@Resource(name=" StockReturnSaveUpdateUnits")
@Autowired
@Qualifier("StockReturnSaveUpdateUnits")
private StockReturnSaveUpdateUnits iStockReturnSaveUpdateUnits ;
@Autowired
@Qualifier("StockReturnRemoveUnits")
private StockReturnRemoveUnits iStockReturnRemoveUnits ;
@Override
public StockReturn saveUpdate(OptType optType, StockReturn optStockReturn, int optUserId) throws SystemOptServiceException {
optStockReturn.setRecordManId(optUserId) ;
return iStockReturnSaveUpdateUnits.saveUpdate(optType, optStockReturn) ;
}
@Override
public SelectPage<StockReturn> search(OptType optType, StockReturnSearchBean searchBean, CommSearchBean commSearchBean, int... startLimit) throws SystemOptServiceException {
return iStockReturnSearchUnits.search(optType, searchBean, commSearchBean, startLimit) ;
}
@Override
public List<StockReturn> searchList(OptType optType, StockReturnSearchBean searchBean, CommSearchBean commSearchBean, int... startLimit) throws SystemOptServiceException {
return iStockReturnSearchUnits.list(optType, searchBean, commSearchBean, startLimit) ;
}
@Override
public StockReturn remove(OptType optType, StockReturn optStockReturn) throws SystemOptServiceException {
return iStockReturnRemoveUnits.remove(optType, optStockReturn) ;
}
@Override
public StockReturn get(Integer id) throws SystemOptServiceException {
return baseService.get(id, StockReturn.class) ;
}
@Override
public void check(Integer stockReturnId, int optUser) throws SystemOptServiceException {
iStockReturnCheckUnits.check(stockReturnId, optUser) ;
}
}
|
[
"pzzying20081128@163.com"
] |
pzzying20081128@163.com
|
8b44958a9b5f159506a5d610fb6034436ef2f823
|
8cc1bbe55fb795b75c5e455d4bd26d0e51321575
|
/src/test/java/org/apache/ibatis/submitted/inheritance/InheritanceTest.java
|
83da9e92cdaa8e9468d5a6764dd3e278bf43fbc9
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
liupjie/mybatis
|
e74e034cb051144a4a57e276496147c5b09d1986
|
ba863886c3ee8b7ece58b1debb16def8e2473f27
|
refs/heads/master
| 2023-07-19T13:10:53.520255
| 2021-09-15T03:18:30
| 2021-09-15T03:18:30
| 392,498,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,039
|
java
|
/**
* Copyright ${license.git.copyrightYears} the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.ibatis.submitted.inheritance;
import java.io.Reader;
import org.apache.ibatis.BaseDataTest;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
// see issue #289
class InheritanceTest {
private static SqlSessionFactory sqlSessionFactory;
@BeforeAll
static void setUp() throws Exception {
// create a SqlSessionFactory
try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/inheritance/mybatis-config.xml")) {
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
}
// populate in-memory database
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
"org/apache/ibatis/submitted/inheritance/CreateDB.sql");
}
@Test
void shouldGetAUser() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
UserProfileMapper mapper = sqlSession.getMapper(UserProfileMapper.class);
UserProfile user = mapper.retrieveById(1);
Assertions.assertEquals("Profile1", user.getName());
}
}
}
|
[
"374299590@qq.com"
] |
374299590@qq.com
|
370a3fe1e598d5a2dfb80a0a2100af8f0a54c743
|
808b985690efbca4cd4db5b135bb377fe9c65b88
|
/tbs_core_45016_20191122114850_nolog_fs_obfs/assets/webkit/unZipCode/tbs_sdk_extension.src/com/tencent/smtt/jscore/X5JsVirtualMachine.java
|
5a099ec0236924d4ec050cb120604c332b851430
|
[] |
no_license
|
polarrwl/WebviewCoreAnalysis
|
183e12b76df3920c5afc65255fd30128bb96246b
|
e21a294bf640578e973b3fac604b56e017a94060
|
refs/heads/master
| 2022-03-16T17:34:15.625623
| 2019-12-17T03:16:51
| 2019-12-17T03:16:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,375
|
java
|
package com.tencent.smtt.jscore;
import android.content.Context;
import android.os.Looper;
import com.tencent.smtt.export.external.jscore.interfaces.IX5JsContext;
import com.tencent.smtt.export.external.jscore.interfaces.IX5JsVirtualMachine;
import org.chromium.base.annotations.UsedByReflection;
public class X5JsVirtualMachine
implements IX5JsVirtualMachine
{
private static final String CLAZZ_NAME = "X5JsVirtualMachine";
private final X5JsVirtualMachineImpl mJsVirtualMachine;
@UsedByReflection("WebCoreProxy.java")
public X5JsVirtualMachine(Context paramContext, Looper paramLooper)
{
this.mJsVirtualMachine = X5JsCoreFactory.createJsVirtualMachine(paramContext, paramLooper);
}
public IX5JsContext createJsContext()
{
return new X5JsContext(this, this.mJsVirtualMachine.createJsContext());
}
public void destroy()
{
this.mJsVirtualMachine.destroy();
}
public Looper getLooper()
{
return this.mJsVirtualMachine.getLooper();
}
public void onPause()
{
this.mJsVirtualMachine.onPause();
}
public void onResume()
{
this.mJsVirtualMachine.onResume();
}
}
/* Location: C:\Users\Administrator\Desktop\学习资料\dex2jar\dex2jar-2.0\classes-dex2jar.jar!\com\tencent\smtt\jscore\X5JsVirtualMachine.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1542951820@qq.com"
] |
1542951820@qq.com
|
88b104bfb1e738430ffe02c51337ac29dcfce9ad
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/com/tencent/mm/plugin/appbrand/appcache/u.java
|
26743fea3fb84315f76784632fb9f6515c57b2ed
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 740
|
java
|
package com.tencent.mm.plugin.appbrand.appcache;
import com.tencent.mm.sdk.e.e;
import com.tencent.mm.sdk.e.i;
public final class u
extends i<t>
{
public static final String[] dzV = { i.a(t.fgt, "PkgUpdateStats") };
public u(e parame)
{
super(parame, t.fgt, "PkgUpdateStats", t.ciG);
}
final boolean af(String paramString, int paramInt)
{
t localt = new t();
localt.field_key = paramString;
localt.field_version = paramInt;
return super.a(localt, t.fgs);
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes5-dex2jar.jar!/com/tencent/mm/plugin/appbrand/appcache/u.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
2be34d010848cfca4122ef3410613f26a910f829
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/59/org/apache/commons/math/stat/ranking/NaturalRanking_NaturalRanking_141.java
|
7ffda599338ad0abb67b75eeb8e77cfdc8345a51
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,510
|
java
|
org apach common math stat rank
rank base natur order doubl
nan treat configur link strategi nanstrategi ti
handl select link ti strategi tiesstrategi
configur set suppli option constructor argument
default link strategi nanstrategi maxim link ti strategi tiesstrategi averag
link ti strategi tiesstrategi random
link random gener randomgener suppli constructor argument
exampl
tabl border cellpad
colspan
input data doubl nan doubl neg infin
strategi nanstrategi ti strategi tiesstrategi
code rank data code
nan maxim
ti averag
nan maxim
minimum
minim
ti averag
remov
sequenti
minim
maximum
tabl
version revis date
natur rank naturalrank rank algorithm rankingalgorithm
creat natur rank naturalrank ti strategi tiesstrategi random
random gener randomgener sourc random data
param random gener randomgener sourc random data
natur rank naturalrank random gener randomgener random gener randomgener
ti strategi tiesstrategi ti strategi tiesstrategi random
nan strategi nanstrategi default nan strategi
random data randomdata random data impl randomdataimpl random gener randomgener
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
bdfec5cdb8e441405c51c85ed78704b6e50ab1f1
|
6e966225b3b05b07dc6208abc2cf27c4041db38a
|
/src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSEnchantmentDepthStrider.java
|
697ae9c7463fce063ea1a0224cf91e28c2a15242
|
[
"Apache-2.0"
] |
permissive
|
Vilsol/NMSWrapper
|
a73a2c88fe43384139fefe4ce2b0586ac6421539
|
4736cca94f5a668e219a78ef9ae4746137358e6e
|
refs/heads/master
| 2021-01-10T14:34:41.673024
| 2016-04-11T13:02:21
| 2016-04-11T13:02:22
| 51,975,408
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,386
|
java
|
package me.vilsol.nmswrapper.wraps.unparsed;
import me.vilsol.nmswrapper.*;
import me.vilsol.nmswrapper.reflections.*;
import me.vilsol.nmswrapper.wraps.*;
@ReflectiveClass(name = "EnchantmentDepthStrider")
public class NMSEnchantmentDepthStrider extends NMSEnchantment {
public NMSEnchantmentDepthStrider(Object nmsObject){
super(nmsObject);
}
public NMSEnchantmentDepthStrider(int i, NMSMinecraftKey minecraftKey, int i1){
super("EnchantmentDepthStrider", new Object[]{int.class, NMSMinecraftKey.class, int.class}, new Object[]{i, minecraftKey, i1});
}
/**
* TODO Find correct name
* @see net.minecraft.server.v1_9_R1.EnchantmentDepthStrider#a(int)
*/
@ReflectiveMethod(name = "a", types = {int.class})
public int a(int i){
return (int) NMSWrapper.getInstance().exec(nmsObject, i);
}
/**
* TODO Find correct name
* @see net.minecraft.server.v1_9_R1.EnchantmentDepthStrider#b(int)
*/
@ReflectiveMethod(name = "b", types = {int.class})
public int b(int i){
return (int) NMSWrapper.getInstance().exec(nmsObject, i);
}
/**
* @see net.minecraft.server.v1_9_R1.EnchantmentDepthStrider#getMaxLevel()
*/
@ReflectiveMethod(name = "getMaxLevel", types = {})
public int getMaxLevel(){
return (int) NMSWrapper.getInstance().exec(nmsObject);
}
}
|
[
"vilsol2000@gmail.com"
] |
vilsol2000@gmail.com
|
acba39c63fdca7b3348c24607b9dfdbab9665f46
|
0e87d775ce8674e11b48313448ca5a2bca9e7be3
|
/Quickstep/src/main/java/com/nature/quickstep/pageobjects/PageObject.java
|
4b318c377df9860ee5810c9a96cc2ba64d9e2055
|
[] |
no_license
|
ravinder1414/Quicksteps
|
9f828b37e76af8714a5195c9e9f5c3518647c480
|
f4143425d9df5f3548a51c550301e02652867ba8
|
refs/heads/master
| 2021-01-01T05:20:13.944907
| 2016-05-11T14:45:57
| 2016-05-11T14:45:57
| 58,553,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,418
|
java
|
package com.nature.quickstep.pageobjects;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import com.nature.quickstep.util.QuickstepContext;
import com.nature.quickstep.util.SeleniumWaitBuilder.WaitBuilder;
import com.nature.quickstep.util.SeleniumWaitBuilder.WaitCondition;
import com.nature.quickstep.util.SeleniumWaitBuilder.WaitInit;
import com.nature.quickstep.util.WebDriverUtils;
/**
* This abstract class provides core functionality for all page objects and also
* specifies a number of methods which should be implemented by each page
* object. All page objects should be subclasses of this class.
*
* @author mark.micallef
*
*/
public abstract class PageObject {
/**
* Cached value violates lifacycle of WebDriver instance
* This value is going to be removed in Quickstep 1.2
*
* Use browser() instead of accessing this field directly
*
*/
@Deprecated
protected WebDriver browser;
/**
* Use context() instead of accessing this field directly
*/
@Deprecated
protected QuickstepContext context = QuickstepContext.getInstance();
/**
* Instantiates the page object given a reference to a WebDriver.
*
* @param browser
*/
public PageObject(WebDriver browser) {
if (browser == null) {
this.browser = WebDriverUtils.getBrowser();
} else {
this.browser = browser;
}
}
/**
* Instantiates the page object using a default web browser.
*/
public PageObject() {
this(null);
}
/**
* @return WebDriver instance
*/
protected WebDriver browser() {
return WebDriverUtils.getBrowser();
}
/**
* @return QuickstepContext instance
*/
protected QuickstepContext context() {
return QuickstepContext.getInstance();
}
/**
* Navigates to the page being represented, ideally using the same method
* that a user would. <BR>
* <BR>
* <b>Note:</b>Should be implemented by every page object.
*
*/
public abstract void navigateTo();
/**
* Checks whether the page or object represented by the page object is
* currently present in the browser.
*
* @return <code>true</code> if present, <code>false</code> if not
*/
public abstract boolean isPresent();
/**
* Conditional wait after click
*/
protected WaitInit click(By locator) {
WebElement element = browser().findElement(locator);
return click(element);
}
/**
* Conditional wait after click
*/
protected WaitInit click(WebElement element) {
element.click();
return ensure();
}
/**
* Conditional wait after navigation
* Depends on correct navigateTo() and isPresent() implementation
*/
public void navigateTo(int seconds) {
this.navigateTo();
ensure().page(this).seconds(seconds);
}
public WaitBuilder ensure() {
return new WaitBuilder(browser());
}
public WaitCondition refuse() {
return new WaitBuilder(browser()).refuse();
}
/**
* Navigate with optional waiting
*
* XXX Probably should not be here...
*/
public WaitInit goTo(String url) {
browser().navigate().to(url);
return ensure();
}
}
|
[
"kumarravinder4141@gmail.com"
] |
kumarravinder4141@gmail.com
|
bf0f3d31d827d66cada52213229d0d3ad46a1e6c
|
573b9c497f644aeefd5c05def17315f497bd9536
|
/src/main/java/com/alipay/api/domain/ZhimaCreditEpSceneFulfillmentlistSyncModel.java
|
3e6c135c050e029be9395e1790b55f2c826ebc84
|
[
"Apache-2.0"
] |
permissive
|
zzzyw-work/alipay-sdk-java-all
|
44d72874f95cd70ca42083b927a31a277694b672
|
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
|
refs/heads/master
| 2022-04-15T21:17:33.204840
| 2020-04-14T12:17:20
| 2020-04-14T12:17:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,238
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 信用服务履约同步(批量)
*
* @author auto create
* @since 1.0, 2019-05-22 14:42:21
*/
public class ZhimaCreditEpSceneFulfillmentlistSyncModel extends AlipayObject {
private static final long serialVersionUID = 6679695676367464265L;
/**
* 信用订单号,即调用zhima.credit.ep.scene.agreement.use返回的信用订单号。
*/
@ApiField("credit_order_no")
private String creditOrderNo;
/**
* 履约信息列表,最大不超过200项
*/
@ApiListField("fulfillment_info_list")
@ApiField("fulfillment_info")
private List<FulfillmentInfo> fulfillmentInfoList;
public String getCreditOrderNo() {
return this.creditOrderNo;
}
public void setCreditOrderNo(String creditOrderNo) {
this.creditOrderNo = creditOrderNo;
}
public List<FulfillmentInfo> getFulfillmentInfoList() {
return this.fulfillmentInfoList;
}
public void setFulfillmentInfoList(List<FulfillmentInfo> fulfillmentInfoList) {
this.fulfillmentInfoList = fulfillmentInfoList;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d5622fc5ca93d370302a4a8a55743ac12f916938
|
ac7c0f451cd5b311c6e1211642e9da0960f3dcd7
|
/1.SocketIO_01/src/main/java/com/liuxun/bio/Server.java
|
bc84f39ee618f9013bb3ff8551f9e5087051979a
|
[] |
no_license
|
LX1993728/network-programming
|
8c4532add55bb8d1e90dad7456489c7e1bc2e2da
|
6d57c59b2044f39296be637672912778d5ac4233
|
refs/heads/master
| 2020-03-28T00:42:36.706038
| 2018-10-16T04:46:28
| 2018-10-16T04:46:28
| 147,442,738
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 952
|
java
|
package com.liuxun.bio;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
/**
* @author liuxun
* bio 在这里表示是Blocking IO阻塞的IO
*/
public class Server {
final static int PORT = 8765;
public static void main(String[] args){
ServerSocket server = null;
try {
server = new ServerSocket(PORT);
System.out.println(" server start ...");
// 进行阻塞
Socket socket = server.accept();
// 新建一个线程执行客户端的任务
new Thread(new ServerHandler(socket)).start();
}catch (Exception e){
e.printStackTrace();
}finally {
if (server != null){
try {
server.close();
}catch (IOException e){
e.printStackTrace();
}
}
server = null;
}
}
}
|
[
"2652790899@qq.com"
] |
2652790899@qq.com
|
9f5fa8a5f4771fed6323b3e382ab341fb95f315e
|
ccdbc8345410ff4082139869ca1cd17f923baaae
|
/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/compute/strategy/CleanupOrphanKeysTest.java
|
01d2e9d3fc6e98f26beaa50acd6d0a1b9bc1bd2f
|
[
"Apache-2.0"
] |
permissive
|
novel/jclouds
|
678ff8e92a09a6c78da9ee2c9854eeb1474659a5
|
ff2982c747b47e067f06badc73587bfe103ca37d
|
refs/heads/master
| 2021-01-20T22:58:44.675667
| 2012-03-25T17:04:05
| 2012-03-25T17:04:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,316
|
java
|
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.trmk.vcloud_0_8.compute.strategy;
import static org.easymock.EasyMock.expect;
import static org.easymock.classextension.EasyMock.createMock;
import static org.easymock.classextension.EasyMock.replay;
import static org.easymock.classextension.EasyMock.verify;
import static org.jclouds.compute.predicates.NodePredicates.parentLocationId;
import java.net.URI;
import java.util.Map;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.NodeState;
import org.jclouds.compute.strategy.ListNodesStrategy;
import org.jclouds.domain.Credentials;
import org.jclouds.trmk.vcloud_0_8.compute.domain.OrgAndName;
import org.jclouds.trmk.vcloud_0_8.compute.functions.NodeMetadataToOrgAndName;
import org.jclouds.trmk.vcloud_0_8.compute.strategy.CleanupOrphanKeys;
import org.jclouds.trmk.vcloud_0_8.compute.strategy.DeleteKeyPair;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
/**
* @author Adrian Cole
*/
@Test(groups = "unit")
public class CleanupOrphanKeysTest {
public void testWhenNoDeletedNodes() {
Iterable<? extends NodeMetadata> deadOnes = ImmutableSet.<NodeMetadata> of();
// create mocks
CleanupOrphanKeys strategy = setupStrategy();
// setup expectations
// replay mocks
replayStrategy(strategy);
// run
strategy.execute(deadOnes);
// verify mocks
verifyStrategy(strategy);
}
public void testWhenDeletedNodesHaveNoTag() {
// create mocks
CleanupOrphanKeys strategy = setupStrategy();
NodeMetadata nodeMetadata = createMock(NodeMetadata.class);
Iterable<? extends NodeMetadata> deadOnes = ImmutableSet.<NodeMetadata> of(nodeMetadata);
// setup expectations
expect(strategy.nodeToOrgAndName.apply(nodeMetadata)).andReturn(null).atLeastOnce();
expectCleanupCredentialStore(strategy, nodeMetadata);
// replay mocks
replay(nodeMetadata);
replayStrategy(strategy);
// run
strategy.execute(deadOnes);
// verify mocks
verify(nodeMetadata);
verifyStrategy(strategy);
}
public void testWhenStillRunningWithTag() {
// create mocks
CleanupOrphanKeys strategy = setupStrategy();
NodeMetadata nodeMetadata = createMock(NodeMetadata.class);
Iterable<? extends NodeMetadata> deadOnes = ImmutableSet.<NodeMetadata> of(nodeMetadata);
OrgAndName orgTag = new OrgAndName(URI.create("location"), "group");
// setup expectations
expect(strategy.nodeToOrgAndName.apply(nodeMetadata)).andReturn(orgTag).atLeastOnce();
expect((Object) strategy.listNodes.listDetailsOnNodesMatching(parentLocationId(orgTag.getOrg().toASCIIString())))
.andReturn(ImmutableSet.of(nodeMetadata));
expect(nodeMetadata.getGroup()).andReturn(orgTag.getName()).atLeastOnce();
expect(nodeMetadata.getState()).andReturn(NodeState.RUNNING).atLeastOnce();
expectCleanupCredentialStore(strategy, nodeMetadata);
// replay mocks
replay(nodeMetadata);
replayStrategy(strategy);
// run
strategy.execute(deadOnes);
// verify mocks
verify(nodeMetadata);
verifyStrategy(strategy);
}
public void testWhenTerminatedWithTag() {
// create mocks
CleanupOrphanKeys strategy = setupStrategy();
NodeMetadata nodeMetadata = createMock(NodeMetadata.class);
Iterable<? extends NodeMetadata> deadOnes = ImmutableSet.<NodeMetadata> of(nodeMetadata);
OrgAndName orgTag = new OrgAndName(URI.create("location"), "group");
// setup expectations
expect(strategy.nodeToOrgAndName.apply(nodeMetadata)).andReturn(orgTag).atLeastOnce();
expect((Object) strategy.listNodes.listDetailsOnNodesMatching(parentLocationId(orgTag.getOrg().toASCIIString())))
.andReturn(ImmutableSet.of(nodeMetadata));
expect(nodeMetadata.getGroup()).andReturn(orgTag.getName()).atLeastOnce();
expect(nodeMetadata.getState()).andReturn(NodeState.TERMINATED).atLeastOnce();
strategy.deleteKeyPair.execute(orgTag);
expectCleanupCredentialStore(strategy, nodeMetadata);
// replay mocks
replay(nodeMetadata);
replayStrategy(strategy);
// run
strategy.execute(deadOnes);
// verify mocks
verify(nodeMetadata);
verifyStrategy(strategy);
}
private void expectCleanupCredentialStore(CleanupOrphanKeys strategy, NodeMetadata nodeMetadata) {
expect("node#" + nodeMetadata.getId()).andReturn("1");
expect(strategy.credentialStore.remove("node#1")).andReturn(null);
}
public void testWhenNoneLeftWithTag() {
// create mocks
CleanupOrphanKeys strategy = setupStrategy();
NodeMetadata nodeMetadata = createMock(NodeMetadata.class);
Iterable<? extends NodeMetadata> deadOnes = ImmutableSet.<NodeMetadata> of(nodeMetadata);
OrgAndName orgTag = new OrgAndName(URI.create("location"), "group");
// setup expectations
expect(strategy.nodeToOrgAndName.apply(nodeMetadata)).andReturn(orgTag).atLeastOnce();
expect((Object) strategy.listNodes.listDetailsOnNodesMatching(parentLocationId(orgTag.getOrg().toASCIIString())))
.andReturn(ImmutableSet.of());
strategy.deleteKeyPair.execute(orgTag);
expectCleanupCredentialStore(strategy, nodeMetadata);
// replay mocks
replay(nodeMetadata);
replayStrategy(strategy);
// run
strategy.execute(deadOnes);
// verify mocks
verify(nodeMetadata);
verifyStrategy(strategy);
}
private void verifyStrategy(CleanupOrphanKeys strategy) {
verify(strategy.nodeToOrgAndName);
verify(strategy.deleteKeyPair);
verify(strategy.listNodes);
verify(strategy.credentialStore);
}
private CleanupOrphanKeys setupStrategy() {
NodeMetadataToOrgAndName nodeToOrgAndName = createMock(NodeMetadataToOrgAndName.class);
DeleteKeyPair deleteKeyPair = createMock(DeleteKeyPair.class);
ListNodesStrategy listNodes = createMock(ListNodesStrategy.class);
@SuppressWarnings("unchecked")
Map<String, Credentials> credentialStore = createMock(Map.class);
return new CleanupOrphanKeys(nodeToOrgAndName, deleteKeyPair, credentialStore, listNodes);
}
private void replayStrategy(CleanupOrphanKeys strategy) {
replay(strategy.nodeToOrgAndName);
replay(strategy.deleteKeyPair);
replay(strategy.listNodes);
replay(strategy.credentialStore);
}
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
b340c50c00cc23aee889f863b6c567d997a39f88
|
2cd44309ae3d46f4890b810200fbe184a406d533
|
/sslr/oracle-jdk-1.7.0.3/com/sun/corba/se/spi/activation/ORBPortInfo.java
|
b66e6e3d3d61dd646ec806938107080f7dff5eb4
|
[] |
no_license
|
wtweeker/ruling_java
|
b47ddfb082d45e52af967353ceb406a18a6e00a8
|
1d67d1557d98c88a7f92e6c25cdc3cf3f8fd9ef7
|
refs/heads/master
| 2020-03-31T15:39:07.416440
| 2015-07-09T12:13:24
| 2015-07-09T12:26:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 606
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/ORBPortInfo.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Friday, January 20, 2012 10:02:29 AM GMT-08:00
*/
public final class ORBPortInfo implements org.omg.CORBA.portable.IDLEntity
{
public String orbId = null;
public int port = (int)0;
public ORBPortInfo ()
{
} // ctor
public ORBPortInfo (String _orbId, int _port)
{
orbId = _orbId;
port = _port;
} // ctor
} // class ORBPortInfo
|
[
"nicolas.peru@sonarsource.com"
] |
nicolas.peru@sonarsource.com
|
a4cc0af36c6005f09f5abcd500b21b30beccb28f
|
4ed8a261dc1d7a053557c9c0bcec759978559dbd
|
/cnd/cnd.script/src/org/netbeans/modules/cnd/api/makefile/MakefileInclude.java
|
a7248c02f59f05581f27161067dbc8aac3386ff2
|
[
"Apache-2.0"
] |
permissive
|
kaveman-/netbeans
|
0197762d834aa497ad17dccd08a65c69576aceb4
|
814ad30e2d0a094f4aa3813bcbb5323a95a0b1d6
|
refs/heads/master
| 2021-01-04T06:49:41.139015
| 2020-02-06T15:13:37
| 2020-02-06T15:13:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,968
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*
* Contributor(s):
*
* Portions Copyrighted 2010 Sun Microsystems, Inc.
*/
package org.netbeans.modules.cnd.api.makefile;
import java.util.Collections;
import java.util.List;
import org.openide.filesystems.FileObject;
/**
*/
public final class MakefileInclude extends MakefileElement {
private final List<String> fileNames;
/*package*/ MakefileInclude(
FileObject fileObject, int startOffset, int endOffset,
List<String> fileNames) {
super(Kind.INCLUDE, fileObject, startOffset, endOffset);
this.fileNames = Collections.unmodifiableList(fileNames);
}
public List<String> getFileNames() {
return fileNames;
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder("INCLUDE"); // NOI18N
for (String file : fileNames) {
buf.append(' ').append(file);
}
return buf.toString();
}
}
|
[
"geertjan@apache.org"
] |
geertjan@apache.org
|
705fb60b462f93a76df920284f4018001dc9af9b
|
18c10aa1261bea4ae02fa79598446df714519c6f
|
/70_spring/24_SpringMVC_Annotation_String/src/main/java/com/spring/biz/view/User/UserController.java
|
344d1ebd0022ef6e1487bb44106e057effe74763
|
[] |
no_license
|
giveseul-23/give_Today_I_Learn
|
3077efbcb11ae4632f68dfa3f9285d2c2ad27359
|
f5599f0573fbf0ffdfbcc9c79b468e3c76303dd4
|
refs/heads/master
| 2023-05-06T08:13:49.845436
| 2021-05-25T04:33:20
| 2021-05-25T04:33:20
| 330,189,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,449
|
java
|
package com.spring.biz.view.User;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.spring.biz.user.UserVO;
import com.spring.biz.user.impl.UserDAO;
@Controller
public class UserController {
/*
@RequestMapping : 요청과 처리(Controller) 연결(HandlerMapping 역할 대체)
command 객체 사용 : 파라미터로 전달되는 값을 Command 객체에 설정
스프링프레임워크에서 객체에 생성하고 파라미터 값을 설정해서 전달해줌
1. UserVO 타입의 객체 생성
2. UserVO 타입의 객체에 전달받은 파라미터 값을 설정(이름 일치하는 경우)
3. UserVO 타입의 객체를 메소드의 파라미터(인수) 값으로 전달
*/
@RequestMapping("/login.do")
public String login(UserVO vo, UserDAO userDAO) {
System.out.println(">>> 로그인 처리 - login()");
System.out.println("> 전달받은 vo : " + vo);
UserVO user = userDAO.getUser(vo);
if(user != null) {
return "getBoardList.do";
}else {
return "login.jsp";
}
}
@RequestMapping("/logout.do")
public String logout(HttpSession session) {
System.out.println(">>> 로그인아웃 처리 - logout()");
//1. 세션 초기화(세션 객체 종료)
session.invalidate();
//2. 화면 네비게이션(로그인페이지)
return "login.jsp";
}
}
|
[
"joodasel@icloud.com"
] |
joodasel@icloud.com
|
5a855624636649b6b9df04d17d940f0c18daadb8
|
18b20a45faa4cf43242077e9554c0d7d42667fc2
|
/HelicoBacterMod/build/tmp/expandedArchives/forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3-sources.jar_db075387fe30fb93ccdc311746149f9d/net/minecraft/network/play/client/CConfirmTransactionPacket.java
|
abd0cf99b5b3b80ca9e618d12c9242a10a88099e
|
[] |
no_license
|
qrhlhplhp/HelicoBacterMod
|
2cbe1f0c055fd5fdf97dad484393bf8be32204ae
|
0452eb9610cd70f942162d5b23141b6bf524b285
|
refs/heads/master
| 2022-07-28T16:06:03.183484
| 2021-03-20T11:01:38
| 2021-03-20T11:01:38
| 347,618,857
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,525
|
java
|
package net.minecraft.network.play.client;
import java.io.IOException;
import net.minecraft.network.IPacket;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.IServerPlayNetHandler;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class CConfirmTransactionPacket implements IPacket<IServerPlayNetHandler> {
private int windowId;
private short uid;
private boolean accepted;
public CConfirmTransactionPacket() {
}
@OnlyIn(Dist.CLIENT)
public CConfirmTransactionPacket(int windowIdIn, short uidIn, boolean acceptedIn) {
this.windowId = windowIdIn;
this.uid = uidIn;
this.accepted = acceptedIn;
}
public void processPacket(IServerPlayNetHandler handler) {
handler.processConfirmTransaction(this);
}
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException {
this.windowId = buf.readByte();
this.uid = buf.readShort();
this.accepted = buf.readByte() != 0;
}
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException {
buf.writeByte(this.windowId);
buf.writeShort(this.uid);
buf.writeByte(this.accepted ? 1 : 0);
}
public int getWindowId() {
return this.windowId;
}
public short getUid() {
return this.uid;
}
}
|
[
"rubickraft169@gmail.com"
] |
rubickraft169@gmail.com
|
c6f53ddcbd3ffc2ca945f3c427cbb358e7777c08
|
db4385e116cd30f7690cce398dba622563cda153
|
/homes-order-mobile-android-vendor-work-copy/app/src/main/java/com/homesordervendor/product/addproduct/model/DeliveryArea.java
|
09dcdaab48e37d8aa99eee39b821712ae6aaa660
|
[] |
no_license
|
karthikeyan1495/homesordervendor
|
3cc1b1b155ff343cf58aedeeb7741be0ba1ca701
|
d385c7c9e4484503c34deedabfde5ec868ef8804
|
refs/heads/master
| 2020-04-08T15:55:32.502226
| 2018-12-01T11:17:50
| 2018-12-01T11:17:50
| 159,497,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 640
|
java
|
package com.homesordervendor.product.addproduct.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* Created by innoppl on 27/04/18.
*/
public class DeliveryArea {
@SerializedName("areaID")
@Expose
private String areaID;
@SerializedName("price")
@Expose
private String price;
public String getAreaID() {
return areaID;
}
public void setAreaID(String areaID) {
this.areaID = areaID;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
}
|
[
"you@example.com"
] |
you@example.com
|
069e6c6ca7948fcd938be7afa82ef2549702e01d
|
ec201761fa0e144844fae66f521bc5f7962b72f2
|
/app/src/main/java/com/example/han/referralproject/activity/AlertHeightActivity.java
|
c7d5a2bb5c78d72c705797572080787cf6b82c11
|
[] |
no_license
|
dcy000/ML-Xien
|
d5a33fa2bd120edd4293e9db2a7390ba0f5512e8
|
ed149f396f96892e2d8713bc9a0cc9b80e142124
|
refs/heads/master
| 2020-04-16T01:53:46.044860
| 2019-06-24T10:32:23
| 2019-06-24T10:32:23
| 165,189,688
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,836
|
java
|
package com.example.han.referralproject.activity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import com.example.han.referralproject.R;
import com.example.han.referralproject.application.MyApplication;
import com.example.han.referralproject.network.NetworkApi;
import com.example.han.referralproject.network.NetworkManager;
import com.example.han.referralproject.util.LocalShared;
import com.example.han.referralproject.util.ToastTool;
import com.gzq.lib_core.bean.UserInfoBean;
import com.medlink.danbogh.register.SelectAdapter;
import com.medlink.danbogh.utils.T;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import github.hellocsl.layoutmanager.gallery.GalleryLayoutManager;
public class AlertHeightActivity extends BaseActivity {
@BindView(R.id.tv_sign_up_height)
TextView tvSignUpHeight;
@BindView(R.id.rv_sign_up_content)
RecyclerView rvSignUpContent;
@BindView(R.id.tv_sign_up_unit)
TextView tvSignUpUnit;
@BindView(R.id.tv_sign_up_go_back)
TextView tvSignUpGoBack;
@BindView(R.id.tv_sign_up_go_forward)
TextView tvSignUpGoForward;
protected int selectedPosition = 1;
protected SelectAdapter adapter;
protected ArrayList<String> mStrings;
protected UserInfoBean data;
protected String eat = "", smoke = "", drink = "", exercise = "";
protected StringBuffer buffer;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_alert_height);
ButterKnife.bind(this);
mToolbar.setVisibility(View.VISIBLE);
mTitleText.setText("修改身高");
tvSignUpGoBack.setText("取消");
tvSignUpGoForward.setText("确定");
data = (UserInfoBean) getIntent().getSerializableExtra("data");
buffer = new StringBuffer();
if (data != null) {
initView();
}
}
protected void initView() {
if (data==null){
return;
}
if (!TextUtils.isEmpty(data.eatingHabits)) {
switch (data.eatingHabits) {
case "荤素搭配":
eat = "1";
break;
case "偏好吃荤":
eat = "2";
break;
case "偏好吃素":
eat = "3";
break;
case "偏好吃咸":
break;
case "偏好油腻":
break;
case "偏好甜食":
break;
}
}
if (!TextUtils.isEmpty(data.smoke)) {
switch (data.smoke) {
case "经常抽烟":
smoke = "1";
break;
case "偶尔抽烟":
smoke = "2";
break;
case "从不抽烟":
smoke = "3";
break;
}
}
if (!TextUtils.isEmpty(data.drink)) {
switch (data.drink) {
case "经常喝酒":
smoke = "1";
break;
case "偶尔喝酒":
smoke = "2";
break;
case "从不喝酒":
smoke = "3";
break;
}
}
if (!TextUtils.isEmpty(data.exerciseHabits)) {
switch (data.exerciseHabits) {
case "每天一次":
exercise = "1";
break;
case "每周几次":
exercise = "2";
break;
case "偶尔运动":
exercise = "3";
break;
case "从不运动":
exercise = "4";
break;
}
}
if ("尚未填写".equals(data.mh)) {
buffer = null;
} else {
String[] mhs = data.mh.split("\\s+");
for (int i = 0; i <mhs.length; i++) {
if (mhs[i].equals("高血压"))
buffer.append(1 + ",");
else if (mhs[i].equals("糖尿病"))
buffer.append(2 + ",");
else if (mhs[i].equals("冠心病"))
buffer.append(3 + ",");
else if (mhs[i].equals("慢阻肺"))
buffer.append(4 + ",");
else if (mhs[i].equals("孕产妇"))
buffer.append(5 + ",");
else if (mhs[i].equals("痛风"))
buffer.append(6 + ",");
else if (mhs[i].equals("甲亢"))
buffer.append(7 + ",");
else if (mhs[i].equals("高血脂"))
buffer.append(8 + ",");
else if (mhs[i].equals("其他"))
buffer.append(9 + ",");
}
}
tvSignUpUnit.setText("cm");
GalleryLayoutManager layoutManager = new GalleryLayoutManager(GalleryLayoutManager.VERTICAL);
layoutManager.attach(rvSignUpContent, selectedPosition);
layoutManager.setCallbackInFling(true);
layoutManager.setOnItemSelectedListener(new GalleryLayoutManager.OnItemSelectedListener() {
@Override
public void onItemSelected(RecyclerView recyclerView, View item, int position) {
selectedPosition = position;
select(mStrings == null ? String.valueOf(position) : mStrings.get(position));
}
});
adapter = new SelectAdapter();
adapter.setStrings(getStrings());
adapter.setOnItemClickListener(new SelectAdapter.OnItemClickListener() {
@Override
public void onItemClick(View view, int position) {
rvSignUpContent.smoothScrollToPosition(position);
}
});
rvSignUpContent.setAdapter(adapter);
}
protected List<String> getStrings() {
mStrings = new ArrayList<>();
for (int i = 150; i < 200; i++) {
mStrings.add(String.valueOf(i));
}
return mStrings;
}
private void select(String text) {
T.show(text);
}
protected int geTip() {
return R.string.sign_up_height_tip;
}
@OnClick(R.id.tv_sign_up_go_back)
public void onTvGoBackClicked() {
finish();
}
@OnClick(R.id.tv_sign_up_go_forward)
public void onTvGoForwardClicked() {
final String height = mStrings.get(selectedPosition);
NetworkApi.alertBasedata(MyApplication.getInstance().userId, height, data.weight, eat, smoke, drink, exercise,
buffer == null ? "" : buffer.substring(0, buffer.length() - 1), data.dz, new NetworkManager.SuccessCallback<Object>() {
@Override
public void onSuccess(Object response) {
LocalShared.getInstance(AlertHeightActivity.this).setUserHeight(height);
ToastTool.showShort("修改成功");
speak("您好,您的身高已经修改为" + height + "厘米");
}
}, new NetworkManager.FailedCallback() {
@Override
public void onFailed(String message) {
// ToastTool.showShort(message);
// speak("您好,出了一些小问题,未修改成功");
}
});
}
@Override
protected void onActivitySpeakFinish() {
finish();
}
}
|
[
"774550196@qq.com"
] |
774550196@qq.com
|
fe1442a810f7e32552b6b567b678e9480d940e30
|
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
|
/sources/kotlin/reflect/jvm/internal/impl/util/OperatorChecks$checks$1.java
|
1bf076dc366e99e8eeaf4665931934846ddd88f8
|
[] |
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,803
|
java
|
package kotlin.reflect.jvm.internal.impl.util;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/* compiled from: modifierChecks.kt */
final class OperatorChecks$checks$1 extends Lambda implements Function1<FunctionDescriptor, String> {
public static final OperatorChecks$checks$1 INSTANCE = new OperatorChecks$checks$1();
OperatorChecks$checks$1() {
super(1);
}
@Nullable
public final String invoke(@NotNull FunctionDescriptor functionDescriptor) {
Intrinsics.checkParameterIsNotNull(functionDescriptor, "$receiver");
List<ValueParameterDescriptor> valueParameters = functionDescriptor.getValueParameters();
Intrinsics.checkExpressionValueIsNotNull(valueParameters, "valueParameters");
ValueParameterDescriptor valueParameterDescriptor = (ValueParameterDescriptor) CollectionsKt.lastOrNull(valueParameters);
boolean z = false;
if (valueParameterDescriptor != null) {
if (!DescriptorUtilsKt.declaresOrInheritsDefaultValue(valueParameterDescriptor) && valueParameterDescriptor.getVarargElementType() == null) {
z = true;
}
}
OperatorChecks operatorChecks = OperatorChecks.INSTANCE;
if (!z) {
return "last parameter should not have a default value or be a vararg";
}
return null;
}
}
|
[
"joshuahj.tsao@gmail.com"
] |
joshuahj.tsao@gmail.com
|
12c08476298112c74fc5a0e7bf977a6df31681df
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE190_Integer_Overflow/s02/CWE190_Integer_Overflow__int_getCookies_Servlet_square_81_base.java
|
d2e3b5239d526c4ff9337dd0979ca078b23f4955
|
[] |
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
| 1,000
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_getCookies_Servlet_square_81_base.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-81_base.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* 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: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE190_Integer_Overflow.s02;
import testcasesupport.*;
import javax.servlet.http.*;
public abstract class CWE190_Integer_Overflow__int_getCookies_Servlet_square_81_base
{
public abstract void action(int data , HttpServletRequest request, HttpServletResponse response) throws Throwable;
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
dde6e57c95919c9cde8976092fc69a3649d828b4
|
01ebbc94cd4d2c63501c2ebd64b8f757ac4b9544
|
/backend/gxqpt-pt/gxqpt-mt-api/src/main/java/com/hengyunsoft/platform/mt/api/help/dto/UseTheHelpUpdateDTO.java
|
0f6b264f4edf662e4ea7b0407943aff4a561cf9e
|
[] |
no_license
|
KevinAnYuan/gxq
|
60529e527eadbbe63a8ecbbad6aaa0dea5a61168
|
9b59f4e82597332a70576f43e3f365c41d5cfbee
|
refs/heads/main
| 2023-01-04T19:35:18.615146
| 2020-10-27T06:24:37
| 2020-10-27T06:24:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 768
|
java
|
package com.hengyunsoft.platform.mt.api.help.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class UseTheHelpUpdateDTO extends BaseUseTheHelpDTO implements Serializable{
/**
* 标题
*
* @mbggenerated
*/
@ApiModelProperty(value = "标题")
private String title;
/**
* 内容
*
* @mbggenerated
*/
@ApiModelProperty(value = "内容")
private String content;
/**
* 审核意见
*
* @mbggenerated
*/
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
/**
* 模块id
*
* @mbggenerated
*/
@ApiModelProperty(value = "模块id")
private Long modularId;
}
|
[
"470382668@qq.com"
] |
470382668@qq.com
|
ee5c9719cdada3bbb20f742dbb7b2d412fd180de
|
81b3984cce8eab7e04a5b0b6bcef593bc0181e5a
|
/android/CarLife/app/src/main/java/com/baidu/carlife/p059c/C1149g.java
|
dc1e76eb479ada85bbf12dceb57a070bc94b79d8
|
[] |
no_license
|
ausdruck/Demo
|
20ee124734d3a56b99b8a8e38466f2adc28024d6
|
e11f8844f4852cec901ba784ce93fcbb4200edc6
|
refs/heads/master
| 2020-04-10T03:49:24.198527
| 2018-07-27T10:14:56
| 2018-07-27T10:14:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,037
|
java
|
package com.baidu.carlife.p059c;
import android.os.Handler;
import android.os.Looper;
import com.baidu.carlife.p059c.C1105d.C1091a;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/* compiled from: TaskScheduler */
/* renamed from: com.baidu.carlife.c.g */
public class C1149g {
/* renamed from: a */
private static final int f2945a = 5;
/* renamed from: b */
private static final int f2946b = 10;
/* renamed from: c */
private static final int f2947c = 60;
/* renamed from: d */
private Handler f2948d = new Handler(Looper.getMainLooper());
/* renamed from: e */
private ThreadPoolExecutor f2949e = new ThreadPoolExecutor(5, 10, 60, TimeUnit.SECONDS, new LinkedBlockingQueue(5));
/* renamed from: a */
public static C1149g m3852a() {
return new C1149g();
}
private C1149g() {
}
/* renamed from: a */
public <R> void m3854a(final R output, final C1091a<R> taskCallback) {
this.f2948d.post(new Runnable(this) {
/* renamed from: c */
final /* synthetic */ C1149g f2935c;
public void run() {
taskCallback.mo1409a(output);
}
});
}
/* renamed from: a */
public <R> void m3853a(final C1091a<R> taskCallback) {
this.f2948d.post(new Runnable(this) {
/* renamed from: b */
final /* synthetic */ C1149g f2937b;
public void run() {
taskCallback.mo1408a();
}
});
}
/* renamed from: b */
public <R> void m3856b(final C1091a<R> taskCallback) {
this.f2948d.post(new Runnable(this) {
/* renamed from: b */
final /* synthetic */ C1149g f2939b;
public void run() {
taskCallback.mo1410b();
}
});
}
/* renamed from: a */
public void m3855a(Runnable runnable) {
this.f2949e.submit(runnable);
}
}
|
[
"objectyan@gmail.com"
] |
objectyan@gmail.com
|
1de9fc253c02a5df1df434188a04d386cbc76969
|
f0afc0a2ee67d15b42e0aa86f0fb1121f29ffea9
|
/Backend/Sources/server/shared/data/src/main/java/com/luretechnologies/server/data/model/survey/FormControl.java
|
236099de34ed8730afa95ef47df511785484fc9c
|
[] |
no_license
|
vinaykumaraai/GemView
|
3104283f6920ff3e3b3414b00ab9ed71ab78b841
|
8c160949ae043b9c7a52ef1ad0a6a477aadb1baf
|
refs/heads/master
| 2021-04-15T10:48:20.287728
| 2018-11-21T16:15:39
| 2018-11-21T16:15:39
| 126,915,708
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,028
|
java
|
/**
* COPYRIGHT @ Lure Technologies, LLC.
* ALL RIGHTS RESERVED
*
* Developed by Lure Technologies, LLC. (www.luretechnologies.com)
*
* Copyright in the whole and every part of this software program belongs to
* Lure Technologies, LLC (“Lure”). It may not be used, sold, licensed,
* transferred, copied or reproduced in whole or in part in any manner or
* form other than in accordance with and subject to the terms of a written
* license from Lure or with the prior written consent of Lure or as
* permitted by applicable law.
*
* This software program contains confidential and proprietary information and
* must not be disclosed, in whole or in part, to any person or organization
* without the prior written consent of Lure. If you are neither the
* intended recipient, nor an agent, employee, nor independent contractor
* responsible for delivering this message to the intended recipient, you are
* prohibited from copying, disclosing, distributing, disseminating, and/or
* using the information in this email in any manner. If you have received
* this message in error, please advise us immediately at
* legal@luretechnologies.com by return email and then delete the message from your
* computer and all other records (whether electronic, hard copy, or
* otherwise).
*
* Any copies or reproductions of this software program (in whole or in part)
* made by any method must also include a copy of this legend.
*
* Inquiries should be made to legal@luretechnologies.com
*
*/
package com.luretechnologies.server.data.model.survey;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
//import org.hibernate.annotations.DynamicUpdate;
//import org.hibernate.annotations.SelectBeforeUpdate;
/**
* Relation between a form and its controls.
*/
@Entity
@Table(name = "Form_Control")
//@DynamicUpdate
//@SelectBeforeUpdate
public class FormControl implements Serializable {
/**
*
*/
public FormControl() {
}
@Column(name = "id", nullable = false, length = 20)
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@ManyToOne(targetEntity = Form.class, fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "form", referencedColumnName = "id", nullable = false)})
private Form form;
@ManyToOne(targetEntity = Control.class, fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "control", referencedColumnName = "id", nullable = false)})
private Control control;
@Column(name = "control_parent", nullable = true, length = 20)
private Long controlParent;
@Column(name = "id_control_form", nullable = false, length = 2)
private int idControlForm;
@Column(name = "property", nullable = true, length = 255)
private String property;
@OneToMany(mappedBy = "formControl", targetEntity = PageControlValue.class, fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST})
private java.util.Set<PageControlValue> pageControlValues = new HashSet<>();
/**
* Identification for the control inside the form.
*/
private void setId(long value) {
this.id = value;
}
/**
* Identification for the control inside the form.
*
* @return
*/
public long getId() {
return id;
}
// /**
// * In case control is Question or Answer, it stores which is the
// * parent(question) for the answer.
// *
// * @param value
// */
// public void setControlParent(long value) {
// setControlParent(new Long(value));
// }
/**
* In case control is Question or Answer, it stores which is the
* parent(question) for the answer.
*
* @param value
*/
public void setControlParent(Long value) {
this.controlParent = value;
}
/**
* In case control is Question or Answer, it stores which is the
* parent(question) for the answer.
*
* @return
*/
public Long getControlParent() {
return controlParent;
}
/**
* Identification of the control inside the form. This is relative to the
* form.
*
* @param value
*/
public void setIdControlForm(int value) {
this.idControlForm = value;
}
/**
* Identification of the control inside the form. This is relative to the
* form.
*
* @return
*/
public int getIdControlForm() {
return idControlForm;
}
/**
*
* @param value
*/
public void setForm(Form value) {
this.form = value;
}
/**
*
* @return
*/
public Form getForm() {
return form;
}
/**
*
* @param value
*/
public void setControl(Control value) {
this.control = value;
}
/**
*
* @return
*/
public Control getControl() {
return control;
}
/**
*
* @return
*/
public String getProperty() {
return property;
}
/**
*
* @return
*/
public Set<PageControlValue> getPageControlValues() {
return pageControlValues;
}
/**
*
* @param property
*/
public void setProperty(String property) {
this.property = property;
}
/**
*
* @param pageControlValues
*/
public void setPageControlValues(Set<PageControlValue> pageControlValues) {
this.pageControlValues = pageControlValues;
}
@Override
public String toString() {
return String.valueOf(getId());
}
}
|
[
"37821322+vinaykumaraai@users.noreply.github.com"
] |
37821322+vinaykumaraai@users.noreply.github.com
|
ace34ab26b6af24bce1abe338232818fc288f48e
|
e5dc7ee6dccb9d83741c54b13f30f4af1e417d2c
|
/work_algo/algorithm/src/baekjoon/bj16922_로마숫자만들기/로마숫자만들기_sol.java
|
7b132ea6d805123f4e2f7bbb868baff8ac482c68
|
[] |
no_license
|
JeongJunHo/algorithm
|
a68d06882215f2c7328fa7a7efbd67cda02f9c18
|
182d27bd2220f063d24ed07b0852fbdbcab99fe8
|
refs/heads/master
| 2022-03-14T09:00:28.173294
| 2019-11-30T15:24:09
| 2019-11-30T15:24:09
| 197,900,634
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,155
|
java
|
package baekjoon.bj16922_로마숫자만들기;
import java.util.Arrays;
import java.util.Scanner;
public class 로마숫자만들기_sol {
static boolean[] nums = new boolean[1001];
static char[] numbers = { 'I', 'V', 'X', 'L' };
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
comb_re(new char[N], 0, 0);
int cnt = 0;
for (int i = 0; i < nums.length; i++) {
if(nums[i]) {
cnt++;
}
}
System.out.println(cnt);
}
static void comb_re(char[] sel, int idx, int sidx) {
if (sidx == sel.length) {
// 다고름
System.out.println(Arrays.toString(sel));
int sum = 0;
for (int i = 0; i < sel.length; i++) {
switch (sel[i]) {
case 'I':
sum += 1;
break;
case 'V':
sum += 5;
break;
case 'X':
sum += 10;
break;
case 'L':
sum += 50;
break;
default:
break;
}
}
nums[sum] = true;
return;
}
if (idx == numbers.length) {
// 더이상 고를게 없음
return;
}
for (int i = idx; i < numbers.length; i++) {
sel[sidx] = numbers[i];
comb_re(sel, i, sidx + 1);
}
}
}
|
[
"jjh49470826@gmail.com"
] |
jjh49470826@gmail.com
|
6a46c035983cdb4cd38669dd4f6b802c84f50752
|
1e057f635f99647e6c75a43d9bd5ad8733c46106
|
/src/main/java/com/ithinksky/petterns/a03structural/t05bridge/d02/Shape.java
|
a6f384a4b541819fab328e7e2f15c59983a22f3a
|
[
"MIT"
] |
permissive
|
duanshaowei/java-patterns
|
8e8682fb1272a6d1fe6ebc415c4f8c3cc83fedf1
|
9f6c7ba23655999895f39a64a8fb83e88f71112e
|
refs/heads/master
| 2022-11-13T06:31:51.210063
| 2020-07-02T18:51:05
| 2020-07-02T18:51:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 314
|
java
|
package com.ithinksky.petterns.a03structural.t05bridge.d02;
/**
* @author tengpeng.gao
*/
public abstract class Shape {
protected Color color;
public Shape() {
}
public Color getColor() {
return color;
}
public void setColor(Color color) {
this.color = color;
}
public abstract void draw();
}
|
[
"tengpeng.gao@gmail.com"
] |
tengpeng.gao@gmail.com
|
34909f6b042e43ab816d8414aed2b483d0150bfe
|
d7f3e8adbcea25d6977ad72c6e23b596afdd31d4
|
/app/src/main/java/com/ics/newapp/fregment/Dealer_to_buyer.java
|
a4cd898b2e601b58cd212fcfdc9292cd7f069c27
|
[] |
no_license
|
NothingbutPro/DigFAb24
|
8608aad4723febab1a795a0c0466e3e21046260d
|
01c394fb2a7279b12ee7482dcf46a13b640a8ea7
|
refs/heads/master
| 2020-05-09T22:38:16.254783
| 2019-04-29T08:06:59
| 2019-04-29T08:06:59
| 181,477,119
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 705
|
java
|
package com.ics.newapp.fregment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.ics.newapp.R;
public class Dealer_to_buyer extends Fragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.deal_to_buyer , container , false);
return view;
// return super.onCreateView(inflater, container, savedInstanceState);
}
}
|
[
"paragsharma611@gmail.com"
] |
paragsharma611@gmail.com
|
c29889b3c5a4ec505b729c37e08db98e30b1b927
|
73d42ff117809d0411ef3248fb4cedfe8e699cec
|
/app/src/main/java/com/bccnw/reader/meimeilovereader/tool/ParamsPutterTool.java
|
2b8cc3bea66ba03ba400c44355262aa75a8ff83a
|
[] |
no_license
|
guyuegeblog/loveloveReaders-masters
|
5e9b37a56b7bed4d004fbc0bf52751b39edb1152
|
105f667e99660c9b13fb431deeab7cc14a5ec36d
|
refs/heads/master
| 2020-12-30T17:50:55.667664
| 2017-04-20T06:19:50
| 2017-04-20T06:19:50
| 88,608,286
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,894
|
java
|
package com.bccnw.reader.meimeilovereader.tool;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
/**
* Created by ASUS on 2016/12/6.
*/
public class ParamsPutterTool {
/***
* SharedPreferences 写入数据
*/
public static void sharedPreferencesWriteData(Context context, String filename, String key, String value) {
//实例化SharedPreferences对象,参数1是存储文件的名称,参数2是文件的打开方式,当文件不存在时,直接创建,如果存在,则直接使用
SharedPreferences mySharePreferences = context.getSharedPreferences(filename, Activity.MODE_PRIVATE);
//实例化SharedPreferences.Editor对象
SharedPreferences.Editor editor = mySharePreferences.edit();
//用putString的方法保存数据
editor.putString(key, value);
//提交数据
editor.commit();
}
/**
* 获取数据
*/
public static String sharedPreferencesReadData(Context context, String filename, String key) {
//实例化SharedPreferences对象
SharedPreferences mySharePerferences = context.getSharedPreferences(filename, Activity.MODE_PRIVATE);
//用getString获取值
return mySharePerferences.getString(key, "");
}
/***
* shared删除文件中的全部数据
*
* @param context
* @param filename
*/
public static void sharedPreferencesDelByFileAllData(Context context, String filename) {
//实例化SharedPreferences对象,参数1是存储文件的名称,参数2是文件的打开方式,当文件不存在时,直接创建,如果存在,则直接使用
SharedPreferences mySharePreferences = context.getSharedPreferences(filename, Activity.MODE_PRIVATE);
//实例化SharedPreferences.Editor对象
SharedPreferences.Editor editor = mySharePreferences.edit();
//用clear()的方法删除数据
editor.clear();
editor.clear();
editor.clear();
editor.clear();
editor.clear();
//提交数据
editor.commit();
}
/***
* shared删除指定的数据
*
* @param context
* @param filename
*/
public static void sharedPreferencesDelOrderData(Context context, String filename, String key) {
//实例化SharedPreferences对象,参数1是存储文件的名称,参数2是文件的打开方式,当文件不存在时,直接创建,如果存在,则直接使用
SharedPreferences mySharePreferences = context.getSharedPreferences(filename, Activity.MODE_PRIVATE);
//实例化SharedPreferences.Editor对象
SharedPreferences.Editor editor = mySharePreferences.edit();
//删除指定数据
editor.remove(key);
//提交数据
editor.commit();
}
}
|
[
"2219736084@qq.com"
] |
2219736084@qq.com
|
4a09fc92ece4f0f80381cad87f152d01dae31fd2
|
72cb5bbaab8faf4cc202af61fedf7493a9d9818a
|
/src/com/alex/yuza/site/PhysicalLocation.java
|
f39e29440e1c3be090e527d138e352a5a31ef48e
|
[] |
no_license
|
axenlarde/Yuza
|
9408034757fddc90bbb8fc56c12aef713212ed00
|
085eaad79efb15584c82d79c84c2a1238472f3a6
|
refs/heads/master
| 2021-09-12T11:00:26.876096
| 2018-04-16T07:23:39
| 2018-04-16T07:23:39
| 115,441,732
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,414
|
java
|
package com.alex.yuza.site;
//import jxl.Workbook;
import org.apache.poi.ss.usermodel.Workbook;
import com.alex.yuza.axlitems.PhysicalLocationLinker;
import com.alex.yuza.misc.ItemToInject;
import com.alex.yuza.utils.Variables;
import com.alex.yuza.utils.Variables.itemType;
import com.alex.yuza.utils.Variables.statusType;
/**********************************
* Class used to define an item of type "Physical Location"
*
* @author RATEL Alexandre
**********************************/
public class PhysicalLocation extends ItemToInject
{
/**
* Variables
*/
private PhysicalLocationLinker myPhysicalLocation;
private String description;
/***************
* Constructor
* @throws Exception
***************/
public PhysicalLocation(String name, String description, Workbook myWorkbook) throws Exception
{
super(itemType.physicallocation, name, myWorkbook);
myPhysicalLocation = new PhysicalLocationLinker(name);
this.description = description;
/**
* We set the item parameters
*/
myPhysicalLocation.setName(this.getName());
myPhysicalLocation.setDescription(this.description);
/*********/
}
public PhysicalLocation(String name) throws Exception
{
super(itemType.physicallocation, name);
myPhysicalLocation = new PhysicalLocationLinker(name);
}
/***********
* Method used to prepare the item for the injection
* by gathering the needed UUID from the CUCM
*/
public void doBuild() throws Exception
{
//We check that the item doesn't already exist
if(isExisting())
{
this.status = statusType.injected;
}
else
{
//The item doesn't already exist we have to inject it
this.status = statusType.waiting;
}
}
/**
* Method used to inject data in the CUCM using
* the Cisco API
*
* It also return the item's UUID once injected
*/
public String doInject() throws Exception
{
return myPhysicalLocation.inject();//Return UUID
}
/**
* Method used to delete data in the CUCM using
* the Cisco API
*/
public void doDelete() throws Exception
{
myPhysicalLocation.delete();
}
/**
* Method used to delete data in the CUCM using
* the Cisco API
*/
public void doUpdate() throws Exception
{
myPhysicalLocation.update();
}
/**
* Method used to check if the element exist in the CUCM
*/
public boolean isExisting() throws Exception
{
try
{
PhysicalLocation myP = (PhysicalLocation) myPhysicalLocation.get();
this.UUID = myP.getUUID();
this.description = myP.getDescription();
Variables.getLogger().debug("Item "+this.name+" already exist in the CUCM");
return true;
}
catch (Exception e)
{
//If we reach this point, it means that the item doesn't already exist
Variables.getLogger().debug("Item "+this.name+" doesn't already exist in the CUCM");
}
return false;
}
public String getInfo()
{
//Has to be written
return "";
}
/**
* Method used to resolve pattern into real value
*/
public void resolve() throws Exception
{
//Has to be written for further uses
}
public String getDescription()
{
return description;
}
public void setDescription(String description)
{
this.description = description;
}
/*2015*//*RATEL Alexandre 8)*/
}
|
[
"Alexandre@NANALENO"
] |
Alexandre@NANALENO
|
59caa1247dc6994a31e42d8ba473c1791246223a
|
01b67b2ba9b1d251b8158279c18e7ea69c888fd5
|
/backend/meduo-tools/meduo-tools-db/src/main/java/org/quick/meduo/tools/db/meta/JdbcType.java
|
4d435b31ae0825e20e38dacbbde12b7831bdb6c4
|
[
"LicenseRef-scancode-unknown-license-reference",
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en"
] |
permissive
|
suwinner1987/meduo
|
7489e24a4623c95ed4794d3262839478f65566d5
|
34c8d707a423dfbcf1b0f103a527eb1f3735c188
|
refs/heads/master
| 2023-06-10T11:02:53.867308
| 2020-11-23T07:43:48
| 2020-11-23T07:43:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,392
|
java
|
package org.quick.meduo.tools.db.meta;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* JDBC中字段类型枚举
*
* @author Clinton Begin
* @see java.sql.Types
*/
public enum JdbcType {
ARRAY(java.sql.Types.ARRAY), //
BIT(java.sql.Types.BIT), //
TINYINT(java.sql.Types.TINYINT), //
SMALLINT(java.sql.Types.SMALLINT), //
INTEGER(java.sql.Types.INTEGER), //
BIGINT(java.sql.Types.BIGINT), //
FLOAT(java.sql.Types.FLOAT), //
REAL(java.sql.Types.REAL), //
DOUBLE(java.sql.Types.DOUBLE), //
NUMERIC(java.sql.Types.NUMERIC), //
DECIMAL(java.sql.Types.DECIMAL), //
CHAR(java.sql.Types.CHAR), //
VARCHAR(java.sql.Types.VARCHAR), //
LONGVARCHAR(java.sql.Types.LONGVARCHAR), //
DATE(java.sql.Types.DATE), //
TIME(java.sql.Types.TIME), //
TIMESTAMP(java.sql.Types.TIMESTAMP), //
BINARY(java.sql.Types.BINARY), //
VARBINARY(java.sql.Types.VARBINARY), //
LONGVARBINARY(java.sql.Types.LONGVARBINARY), //
NULL(java.sql.Types.NULL), //
OTHER(java.sql.Types.OTHER), //
BLOB(java.sql.Types.BLOB), //
CLOB(java.sql.Types.CLOB), //
BOOLEAN(java.sql.Types.BOOLEAN), //
CURSOR(-10), // Oracle
UNDEFINED(Integer.MIN_VALUE + 1000), //
NVARCHAR(java.sql.Types.NVARCHAR), // JDK6
NCHAR(java.sql.Types.NCHAR), // JDK6
NCLOB(java.sql.Types.NCLOB), // JDK6
STRUCT(java.sql.Types.STRUCT), //
JAVA_OBJECT(java.sql.Types.JAVA_OBJECT), //
DISTINCT(java.sql.Types.DISTINCT), //
REF(java.sql.Types.REF), //
DATALINK(java.sql.Types.DATALINK), //
ROWID(java.sql.Types.ROWID), // JDK6
LONGNVARCHAR(java.sql.Types.LONGNVARCHAR), // JDK6
SQLXML(java.sql.Types.SQLXML), // JDK6
DATETIMEOFFSET(-155), // SQL Server 2008
TIME_WITH_TIMEZONE(2013), // JDBC 4.2 JDK8
TIMESTAMP_WITH_TIMEZONE(2014); // JDBC 4.2 JDK8
public final int typeCode;
/**
* 构造
*
* @param code {@link java.sql.Types} 中对应的值
*/
JdbcType(int code) {
this.typeCode = code;
}
private static final Map<Integer, JdbcType> CODE_MAP = new ConcurrentHashMap<>(100, 1);
static {
for (JdbcType type : JdbcType.values()) {
CODE_MAP.put(type.typeCode, type);
}
}
/**
* 通过{@link java.sql.Types}中对应int值找到enum值
*
* @param code Jdbc type值
* @return {@link JdbcType}
*/
public static JdbcType valueOf(int code) {
return CODE_MAP.get(code);
}
}
|
[
"gao.brian@gmail.com"
] |
gao.brian@gmail.com
|
718745d1635ab6ac5a49ae6fccb4d44b98b6dc97
|
e4b1d9b159abebe01b934f0fd3920c60428609ae
|
/src/main/java/org/proteored/miapeapi/xml/ms/autogenerated/FuGECollectionProviderType.java
|
fa5759479638a514f3279178f8960daba42f101d
|
[
"Apache-2.0"
] |
permissive
|
smdb21/java-miape-api
|
83ba33cc61bf2c43c4049391663732c9cc39a718
|
5a49b49a3fed97ea5e441e85fe2cf8621b4e0900
|
refs/heads/master
| 2022-12-30T15:28:24.384176
| 2020-12-16T23:48:07
| 2020-12-16T23:48:07
| 67,961,174
| 0
| 0
|
Apache-2.0
| 2022-12-16T03:22:23
| 2016-09-12T00:01:29
|
Java
|
UTF-8
|
Java
| false
| false
| 2,812
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-7
// 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: 2012.06.19 at 01:51:42 PM CEST
//
package org.proteored.miapeapi.xml.ms.autogenerated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* The provider of the document in terms of the Contact and the software the produced the document instance.
*
* <p>Java class for FuGE.Collection.ProviderType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="FuGE.Collection.ProviderType">
* <complexContent>
* <extension base="{}FuGE.Common.IdentifiableType">
* <sequence>
* <element ref="{}ContactRole" minOccurs="0"/>
* </sequence>
* <attribute name="Software_ref" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FuGE.Collection.ProviderType", propOrder = {
"contactRole"
})
public class FuGECollectionProviderType
extends FuGECommonIdentifiableType
{
@XmlElement(name = "ContactRole")
protected FuGECommonAuditContactRoleType contactRole;
@XmlAttribute(name = "Software_ref")
protected String softwareRef;
/**
* The Contact that provided the document instance.
*
* @return
* possible object is
* {@link FuGECommonAuditContactRoleType }
*
*/
public FuGECommonAuditContactRoleType getContactRole() {
return contactRole;
}
/**
* Sets the value of the contactRole property.
*
* @param value
* allowed object is
* {@link FuGECommonAuditContactRoleType }
*
*/
public void setContactRole(FuGECommonAuditContactRoleType value) {
this.contactRole = value;
}
/**
* Gets the value of the softwareRef property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSoftwareRef() {
return softwareRef;
}
/**
* Sets the value of the softwareRef property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSoftwareRef(String value) {
this.softwareRef = value;
}
}
|
[
"salvador@scripps.edu"
] |
salvador@scripps.edu
|
c0685a5f43dbd68b51e6395438e2eee959abec7b
|
cceb4e618ce4ccf7a20ae1e6a2a0b53cf5924a19
|
/src/main/java/cn/bestsec/dcms/platform/api/Group_QueryByIdApi.java
|
48d582040cf77e42aedda32d45771120574e2c62
|
[] |
no_license
|
zhanght86/dcms
|
9843663cb278ebafb6f26bc662b385b713f2058d
|
8e51ec3434ffb1784d9ea5d748e8972dc8fc629b
|
refs/heads/master
| 2021-06-24T16:14:09.891624
| 2017-09-08T08:18:39
| 2017-09-08T08:18:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 396
|
java
|
package cn.bestsec.dcms.platform.api;
import cn.bestsec.dcms.platform.api.exception.ApiException;
import cn.bestsec.dcms.platform.api.model.*;
/**
* 自动生成的API接口类,不要手动修改
*/
public interface Group_QueryByIdApi {
/**
* 权限:系统管理员
*/
Group_QueryByIdResponse execute(Group_QueryByIdRequest group_QueryByIdRequest) throws ApiException;
}
|
[
"liu@gmail.com"
] |
liu@gmail.com
|
92f37bd5e6068ac165dd1b650b5d557539ee55de
|
69ab601bc6bc3a9d5097ba944b8bf355b6af0cde
|
/src/main/java/de/uni_mannheim/informatik/dws/winter/matching/rules/Comparator.java
|
00e31012e1d7e3f8d3a62d61759d78ee344fc300
|
[
"Apache-2.0"
] |
permissive
|
peiwangdb/winter
|
091d0f8f30f0cd6b6d0483596dfdacc9c4f3dc06
|
29ae4e6a080bb4bb314e3ce1519f470ae275af73
|
refs/heads/master
| 2021-05-05T18:48:08.119282
| 2017-09-11T11:59:37
| 2017-09-11T11:59:37
| 103,756,248
| 1
| 0
| null | 2017-09-16T14:02:09
| 2017-09-16T14:02:08
| null |
UTF-8
|
Java
| false
| false
| 2,205
|
java
|
/*
* Copyright (c) 2017 Data and Web Science Group, University of Mannheim, Germany (http://dws.informatik.uni-mannheim.de/)
*
* 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 de.uni_mannheim.informatik.dws.winter.matching.rules;
import java.io.Serializable;
import de.uni_mannheim.informatik.dws.winter.model.AbstractRecord;
import de.uni_mannheim.informatik.dws.winter.model.Correspondence;
import de.uni_mannheim.informatik.dws.winter.model.Matchable;
import de.uni_mannheim.informatik.dws.winter.usecase.movies.identityresolution.MovieTitleComparatorJaccard;
/**
* Interface for all {@link AbstractRecord} comparators.
*
* A Comparator calculates a similarity value for two given records and an optional correspondence.
* Implementations can test the values of specific attributes or use the correspondence to determine which values to compare.
*
* For an example of a specific attribute comparator, see {@link MovieTitleComparatorJaccard}.
*
*
* @author Oliver Lehmberg (oli@dwslab.de)
*
* @param <RecordType>
*/
public interface Comparator<RecordType extends Matchable, SchemaElementType extends Matchable> extends Serializable {
/**
* Compares two records and returns a similarity value
*
* @param record1
* the first record (must not be null)
* @param record2
* the second record (must not be null)
* @param schemaCorrespondence
* A schema correspondence between two record1 and record2 (can be null)
* @return the similarity of the records
*/
double compare(RecordType record1, RecordType record2, Correspondence<SchemaElementType, Matchable> schemaCorrespondence);
}
|
[
"oliver.lehmberg@live.de"
] |
oliver.lehmberg@live.de
|
57fd4671d2147ab2e9c8727c281c5dc71b42c6e7
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_89778de2f94de1d8f59bbfbaed00dec7b75412c6/HttpResponse/4_89778de2f94de1d8f59bbfbaed00dec7b75412c6_HttpResponse_s.java
|
7946ea86a0882cbcb50a76d5cf67a9ea7b95def2
|
[] |
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,421
|
java
|
package org.deft.web.protocol;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import org.deft.util.DateUtil;
import org.deft.util.HttpUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HttpResponse {
private final static Logger logger = LoggerFactory.getLogger(HttpProtocolImpl.class);
private final static Charset CHAR_SET = Charset.forName("US-ASCII");
private final SocketChannel clientChannel;
private /*<> AtomicInteger */ int statusCode = 200; // default response status code
//<> TODO RS 100924 could experiment with cliff clicks high scale lib (e.g. NonBlockingHashMap) instead of
//<> the CCHM used below
//<> private final ConcurrentMap<String, String> headers = new ConcurrentHashMap<String, String>();
private final Map<String, String> headers = new HashMap<String, String>();
private boolean headersCreated = false;
private String responseData = "";
public HttpResponse(SocketChannel sc) {
clientChannel = sc;
headers.put("Server", "DeftServer/0.0.1");
headers.put("Date", DateUtil.getCurrentAsString());
}
public void setStatusCode(int sc) {
statusCode = sc;
}
public void setHeader(String header, String value) {
headers.put(header, value);
}
public void write(String data) {
responseData +=data;
}
public void flush() {
if (!headersCreated) {
String initial = createInitalLineAndHeaders();
responseData = initial + responseData;
headersCreated = true;
}
ByteBuffer output = ByteBuffer.wrap(responseData.getBytes(CHAR_SET));
try {
long bytesWritten = clientChannel.write(output);
} catch (IOException e) {
logger.error("Error writing response: {}", e);
} finally {
responseData = "";
}
}
public void finish() {
flush();
try {
clientChannel.close();
} catch (IOException ioe) {
logger.error("Could not close client (SocketChannel) connection. {}", ioe);
}
}
private /*<> synchronzied */ String createInitalLineAndHeaders() {
String initial = HttpUtil.createInitialLine(statusCode);
for (Map.Entry<String, String> header : headers.entrySet()) {
initial += header.getKey() + ": " + header.getValue() + "\r\n";
}
return initial + "\r\n";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
613a71caf6f8b3f57abfa122ac1313de3d700305
|
63f9306d97ccf36996b28296982e2c08c38c30e4
|
/src/main/java/cn/com/rebirth/core/web/controller/RenderVariableInterceptor.java
|
00b9866ca2cd6ca306aa25ac622dcf4fe0958b9e
|
[] |
no_license
|
dowsam/rebirth-core-web
|
1fb57a25597e1e808b791bf8b6e5e3363fef0516
|
ad86fc3334076a8fb251faafe83a2ec03afe7b17
|
refs/heads/master
| 2020-12-24T14:53:14.277485
| 2012-09-05T05:32:42
| 2012-09-05T05:32:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,210
|
java
|
/*
* Copyright (c) 2005-2012 www.summall.com.cn All rights reserved
* Info:summall-core RenderVariableInterceptor.java 2012-2-11 15:49:55 l.xue.nong$$
*/
package cn.com.rebirth.core.web.controller;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import cn.com.rebirth.core.web.HttpInclude;
import cn.com.rebirth.core.web.RequestFlashData;
/**
* The Class RenderVariableInterceptor.
*
* @author l.xue.nong
*/
public class RenderVariableInterceptor extends HandlerInterceptorAdapter implements InitializingBean {
//系统启动并初始化一次的变量
/** The global render variables. */
private Map<String, Object> globalRenderVariables = new HashMap<String, Object>();
/* (non-Javadoc)
* @see org.springframework.web.servlet.handler.HandlerInterceptorAdapter#postHandle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.web.servlet.ModelAndView)
*/
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
if (modelAndView == null) {
return;
}
String viewName = modelAndView.getViewName();
if (viewName != null && !viewName.startsWith("redirect:")) {
modelAndView.addAllObjects(globalRenderVariables);
modelAndView.addAllObjects(perRequest(request, response));
modelAndView.addObject("httpInclude", new HttpInclude(request, response));
}
}
/**
* Per request.
*
* @param request the request
* @param response the response
* @return the map
*/
protected Map<String, Object> perRequest(HttpServletRequest request, HttpServletResponse response) {
HashMap<String, Object> model = new HashMap<String, Object>();
model.put("share_current_request_time", new Date());
model.put("base", getServerPath(request));
model.put("flash", RequestFlashData.current().getData());
model.putAll(RequestFlashData.current().getData());
model.put("url", request.getRequestURI());
return model;
}
/**
* Gets the server path.
*
* @param request the request
* @return the server path
*/
protected static String getServerPath(HttpServletRequest request) {
return request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ ("/".equalsIgnoreCase(request.getContextPath()) ? "" : request.getContextPath());
}
//用于初始化 sharedRenderVariables, 全局共享变量请尽量用global前缀
/**
* Inits the shared render variables.
*/
private void initSharedRenderVariables() {
globalRenderVariables.put("global_system_start_time", new Date());
//也可以存放一些共享的工具类,以便视图使用,如StringUtils
}
/* (non-Javadoc)
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
@Override
public void afterPropertiesSet() throws Exception {
initSharedRenderVariables();
}
}
|
[
"l.xue.nong@gmail.com"
] |
l.xue.nong@gmail.com
|
129165a8599e90f9d85a9e5ce5f093ed38089e1c
|
a35b21de1b30f820214ed6a3f42543e0005c295b
|
/AJC/02.DesignAndDesignPatterns/02.Abstraction/src/parking/model/UnregisteredCar.java
|
c0c60079c1ceac5e09769da92ed4afb747757048
|
[] |
no_license
|
rosie-s/courses
|
a8baf2c0e0962b8e2429958e54cf1591f7aaaebf
|
379d3b1472e4e79d40ea3b539368bd321174c209
|
refs/heads/master
| 2022-06-23T19:39:50.897293
| 2020-10-23T13:32:26
| 2020-10-23T13:32:26
| 117,899,193
| 2
| 0
| null | 2022-06-21T04:07:50
| 2018-01-17T22:14:54
|
Java
|
UTF-8
|
Java
| false
| false
| 264
|
java
|
package parking.model;
public class UnregisteredCar extends Car implements TollGatePayable {
public UnregisteredCar(String brand, String plate) {
super(brand, plate);
}
@Override
public double payTollGate() {
return 3.00;
}
}
|
[
"rosie-s@users.noreply.github.com"
] |
rosie-s@users.noreply.github.com
|
205b636fee652f86ed2f7f61407d93316659aeed
|
6215a01051d2e57a980c14d19a41cf8041cbe9e5
|
/pbm/src/main/java/pmm/pbm/util/cms/HiddenField.java
|
2fbe3132c23a88737e1f6f5c5d906db886b0e0d2
|
[
"Apache-2.0"
] |
permissive
|
phylame/pmm
|
f0788f2bcb6ff12f26c070a0038950b05e49db0d
|
066f32d84cce3a1063bd7f5d453e772bbcd166fa
|
refs/heads/master
| 2021-05-02T04:22:31.213857
| 2017-01-11T08:43:08
| 2017-01-11T08:43:08
| 76,454,061
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 502
|
java
|
package pmm.pbm.util.cms;
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;
/**
* Fields of VO with this annotation will no be shown in CMS list.
*
* @author PW[<a href="mailto:phylame@163.com">phylame@163.com</a>]
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface HiddenField {
}
|
[
"phylame@163.com"
] |
phylame@163.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.