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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ed206f330bf0af4014433fb3751cba942d0904de | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/28/28_274a2f8e7974c826b7c060a68e00c5fdc80ac8ef/HBCIDauerauftragDeleteJob/28_274a2f8e7974c826b7c060a68e00c5fdc80ac8ef_HBCIDauerauftragDeleteJob_t.java | cbbd19cda192a20b04fd4ace7ccc9b121fb8f532 | [] | 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 | 7,883 | java | /**********************************************************************
* $Source$
* $Revision$
* $Date$
* $Author$
* $Locker$
* $State$
*
* Copyright (c) by willuhn.webdesign
* All rights reserved
*
**********************************************************************/
package de.willuhn.jameica.hbci.server.hbci;
import java.rmi.RemoteException;
import java.util.Date;
import java.util.Enumeration;
import java.util.Properties;
import de.willuhn.jameica.hbci.HBCI;
import de.willuhn.jameica.hbci.HBCIProperties;
import de.willuhn.jameica.hbci.Settings;
import de.willuhn.jameica.hbci.rmi.Dauerauftrag;
import de.willuhn.jameica.hbci.rmi.HibiscusAddress;
import de.willuhn.jameica.hbci.rmi.Konto;
import de.willuhn.jameica.hbci.rmi.Protokoll;
import de.willuhn.jameica.hbci.rmi.Turnus;
import de.willuhn.jameica.hbci.server.Converter;
import de.willuhn.jameica.hbci.server.hbci.tests.CanTermDelRestriction;
import de.willuhn.jameica.system.Application;
import de.willuhn.logging.Logger;
import de.willuhn.util.ApplicationException;
import de.willuhn.util.I18N;
/**
* Job fuer "Dauerauftrag loeschen".
*/
public class HBCIDauerauftragDeleteJob extends AbstractHBCIJob
{
private I18N i18n = null;
private Dauerauftrag dauerauftrag = null;
private Konto konto = null;
/**
* ct.
* @param auftrag Dauerauftrag, der geloescht werden soll
* @param date Datum, zu dem der Auftrag geloescht werden soll oder <code>null</code>
* wenn zum naechstmoeglichen Zeitpunkt geloescht werden soll.
* @throws RemoteException
* @throws ApplicationException
*/
public HBCIDauerauftragDeleteJob(Dauerauftrag auftrag, Date date) throws RemoteException, ApplicationException
{
try
{
i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();
if (auftrag == null)
throw new ApplicationException(i18n.tr("Bitte whlen Sie einen Dauerauftrag aus"));
if (!auftrag.isActive())
throw new ApplicationException(i18n.tr("Dauerauftrag liegt nicht bei Bank vor und muss daher nicht online gelscht werden"));
if (auftrag.isNewObject())
auftrag.store();
this.dauerauftrag = auftrag;
this.konto = auftrag.getKonto();
setJobParam("orderid",this.dauerauftrag.getOrderID());
setJobParam("src",Converter.HibiscusKonto2HBCIKonto(konto));
String curr = konto.getWaehrung();
if (curr == null || curr.length() == 0)
curr = HBCIProperties.CURRENCY_DEFAULT_DE;
setJobParam("btg",dauerauftrag.getBetrag(),curr);
HibiscusAddress empfaenger = (HibiscusAddress) Settings.getDBService().createObject(HibiscusAddress.class,null);
empfaenger.setBLZ(dauerauftrag.getGegenkontoBLZ());
empfaenger.setKontonummer(dauerauftrag.getGegenkontoNummer());
empfaenger.setName(dauerauftrag.getGegenkontoName());
setJobParam("dst",Converter.Address2HBCIKonto(empfaenger));
setJobParam("name",empfaenger.getName());
setJobParam("usage",dauerauftrag.getZweck());
String zweck2 = dauerauftrag.getZweck2();
if (zweck2 != null)
zweck2 = zweck2.trim(); // BUGZILLA 517
if (zweck2 != null && zweck2.length() > 0)
setJobParam("usage_2",zweck2);
setJobParam("firstdate",dauerauftrag.getErsteZahlung());
Date letzteZahlung = dauerauftrag.getLetzteZahlung();
if (letzteZahlung != null)
setJobParam("lastdate",letzteZahlung);
Turnus turnus = dauerauftrag.getTurnus();
setJobParam("timeunit",turnus.getZeiteinheit() == Turnus.ZEITEINHEIT_MONATLICH ? "M" : "W");
setJobParam("turnus",turnus.getIntervall());
setJobParam("execday",turnus.getTag());
if (date != null)
{
Properties p = HBCIFactory.getInstance().getJobRestrictions(this.konto,this);
Enumeration keys = p.keys();
while (keys.hasMoreElements())
{
String s = (String) keys.nextElement();
Logger.debug("[hbci job restriction] name: " + s + ", value: " + p.getProperty(s));
}
Logger.info("target date for DauerDel: " + date.toString());
new CanTermDelRestriction(p).test(); // Test nur, wenn Datum angegeben
setJobParam("date",date);
}
// Den brauchen wir, damit das Loeschen funktioniert.
HBCIFactory.getInstance().addJob(new HBCIDauerauftragListJob(this.konto));
}
catch (RemoteException e)
{
throw e;
}
catch (ApplicationException e2)
{
throw e2;
}
catch (Throwable t)
{
Logger.error("error while executing job " + getIdentifier(),t);
throw new ApplicationException(i18n.tr("Fehler beim Erstellen des Auftrags. Fehlermeldung: {0}",t.getMessage()),t);
}
}
/**
* @see de.willuhn.jameica.hbci.server.hbci.AbstractHBCIJob#getIdentifier()
*/
String getIdentifier() {
return "DauerDel";
}
/**
* Prueft, ob das Loeschen bei der Bank erfolgreich war und loescht den
* Dauerauftrag anschliessend in der Datenbank.
* @see de.willuhn.jameica.hbci.server.hbci.AbstractHBCIJob#handleResult()
*/
void handleResult() throws ApplicationException, RemoteException
{
String empfName = dauerauftrag.getGegenkontoName();
if (getJobResult().isOK())
{
konto.addToProtokoll(i18n.tr("Dauerauftrag gelscht an {0}",empfName),Protokoll.TYP_SUCCESS);
dauerauftrag.delete();
Logger.info("dauerauftrag deleted successfully");
return;
}
String msg = i18n.tr("Fehler beim Lschen des Dauerauftrages an {0}",empfName);
String error = getStatusText();
konto.addToProtokoll(msg + ": " + error,Protokoll.TYP_ERROR);
throw new ApplicationException(msg + ": " + error);
}
/**
* @see de.willuhn.jameica.hbci.server.hbci.AbstractHBCIJob#getName()
*/
public String getName() throws RemoteException
{
return i18n.tr("Dauerauftrag an {0} lschen",dauerauftrag.getGegenkontoName());
}
}
/**********************************************************************
* $Log$
* Revision 1.18 2007-12-13 14:20:00 willuhn
* @B Bug 517
*
* Revision 1.17 2007/12/06 23:53:56 willuhn
* @B Bug 490
*
* Revision 1.16 2007/12/06 14:25:32 willuhn
* @B Bug 494
*
* Revision 1.15 2007/04/23 18:07:14 willuhn
* @C Redesign: "Adresse" nach "HibiscusAddress" umbenannt
* @C Redesign: "Transfer" nach "HibiscusTransfer" umbenannt
* @C Redesign: Neues Interface "Transfer", welches von Ueberweisungen, Lastschriften UND Umsaetzen implementiert wird
* @N Anbindung externer Adressbuecher
*
* Revision 1.14 2006/06/19 11:52:15 willuhn
* @N Update auf hbci4java 2.5.0rc9
*
* Revision 1.13 2006/03/15 18:01:30 willuhn
* @N AbstractHBCIJob#getName
*
* Revision 1.12 2006/03/15 17:28:41 willuhn
* @C Refactoring der Anzeige der HBCI-Fehlermeldungen
*
* Revision 1.11 2005/07/20 22:40:56 web0
* *** empty log message ***
*
* Revision 1.10 2005/05/19 23:31:07 web0
* @B RMI over SSL support
* @N added handbook
*
* Revision 1.9 2005/03/02 17:59:30 web0
* @N some refactoring
*
* Revision 1.8 2004/11/18 23:46:21 willuhn
* *** empty log message ***
*
* Revision 1.7 2004/11/17 19:02:28 willuhn
* *** empty log message ***
*
* Revision 1.6 2004/11/14 19:21:37 willuhn
* *** empty log message ***
*
* Revision 1.5 2004/11/13 17:02:04 willuhn
* @N Bearbeiten des Zahlungsturnus
*
* Revision 1.4 2004/11/12 18:25:08 willuhn
* *** empty log message ***
*
* Revision 1.3 2004/10/26 23:47:08 willuhn
* *** empty log message ***
*
* Revision 1.2 2004/10/25 22:39:14 willuhn
* *** empty log message ***
*
* Revision 1.1 2004/10/25 17:58:56 willuhn
* @N Haufen Dauerauftrags-Code
*
**********************************************************************/
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
22a6a8cb7d6f4fb41c76ae1640650d1e50caa6d4 | 4582e28b2279f2d409ca0a2ddee612addf361abb | /src/main/java/com/experts/core/biller/statemachine/api/constraints/package-info.java | c9b00f80fa8eac7d136861887f66ed7ad8e7e80d | [
"MIT"
] | permissive | yousefexperts/CloudServer | 664e3f32c5a806e09600e78f38654304c14ad36b | 85b172491a59e602ae6e7bf725a691aa468f7f31 | refs/heads/master | 2023-01-11T07:21:08.698380 | 2019-06-15T15:58:26 | 2019-06-15T15:58:26 | 188,826,541 | 0 | 2 | MIT | 2022-12-27T14:44:23 | 2019-05-27T10:58:32 | JavaScript | UTF-8 | Java | false | false | 203 | java | /**
* ドメインで汎用的に利用される制約定義。
* <p>JSR303(Bean Valildation)の用途で利用される想定です。
*/
package com.experts.core.biller.statemachine.api.constraints; | [
"yousef.experts@outlook.com"
] | yousef.experts@outlook.com |
252e7d3b965e9784a17db23cf2830160daa1b00c | b71673707e418dcbf869d0e53ef76f7ec7651ce1 | /integration/deltaspike-data/rest/api/src/main/java/com/blazebit/persistence/deltaspike/data/rest/PageableConfiguration.java | 7921d84a84420b39fc9f54f7a2dcc63a3d021ffe | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Mobe91/blaze-persistence | bf92028028b241eb6a0a5f13dec323566f5ec9f8 | 8a4c867f07d6d31404d35e4db672b481fc8a2d59 | refs/heads/master | 2023-08-17T05:42:02.526696 | 2020-11-28T20:13:04 | 2020-11-28T20:13:04 | 83,560,399 | 0 | 0 | NOASSERTION | 2020-02-05T21:56:44 | 2017-03-01T13:59:01 | Java | UTF-8 | Java | false | false | 4,246 | java | /*
* Copyright 2014 - 2020 Blazebit.
*
* 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.blazebit.persistence.deltaspike.data.rest;
import com.blazebit.persistence.deltaspike.data.Pageable;
/**
* @author Christian Beikov
* @since 1.2.0
*/
public interface PageableConfiguration {
/**
* Returns the pageable to fall back to when no page configuration is given.
*
* @return The fallback pageable
*/
public Pageable getFallbackPageable();
/**
* Sets the pageable to use when no page configuration is given.
*
* @param fallbackPageable The fallback pageable
*/
public void setFallbackPageable(Pageable fallbackPageable);
/**
* Returns the name of the query parameter to use for the <em>offset</em>.
*
* @return The query parameter name for the offset
* @since 1.3.0
*/
public String getOffsetParameterName();
/**
* Sets the name of the query parameter that should be used to extract the <em>offset</em> value.
*
* @param offsetParameterName The query parameter name for the offset
* @since 1.3.0
*/
public void setOffsetParameterName(String offsetParameterName);
/**
* Returns the name of the query parameter to use for the <em>page</em>.
*
* @return The query parameter name for the page
*/
public String getPageParameterName();
/**
* Sets the name of the query parameter that should be used to extract the <em>page</em> value.
*
* @param pageParameterName The query parameter name for the page
*/
public void setPageParameterName(String pageParameterName);
/**
* Returns the name of the query parameter to use for the <em>pageSize</em>.
*
* @return The query parameter name for the page size
*/
public String getSizeParameterName();
/**
* Sets the name of the query parameter that should be used to extract the <em>pageSize</em> value.
*
* @param sizeParameterName The query parameter name for the page size
*/
public void setSizeParameterName(String sizeParameterName);
/**
* Returns the name of the query parameter to use for the <em>sort</em>.
*
* @return The query parameter name for the sort
*/
public String getSortParameterName();
/**
* Sets the name of the query parameter that should be used to extract the <em>sort</em> value.
*
* @param sortParameterName The query parameter name for the sort
*/
public void setSortParameterName(String sortParameterName);
/**
* Returns the name prefix to use when extracting query parameters.
*
* @return The query parameter name prefix
*/
public String getPrefix();
/**
* Sets the query parameter name prefix to use for extracting query parameters.
*
* @param prefix The query parameter name prefix
*/
public void setPrefix(String prefix);
/**
* Returns the allowed maximum page size.
*
* @return The allowed maximum page size
*/
public int getMaxPageSize();
/**
* Sets the allowed maximum page size.
*
* @param maxPageSize The allowed maximum page size
*/
public void setMaxPageSize(int maxPageSize);
/**
* Returns whether the page parameter is 1-based rather than 0-based.
*
* @return <code>true</code> if page is 1-based, false if 0-based
*/
public boolean isOneIndexedParameters();
/**
* Sets whether the page parameter is 1-based or 0-based.
*
* @param oneIndexedParameters <code>true</code> if 1-based, false if 0-based
*/
public void setOneIndexedParameters(boolean oneIndexedParameters);
}
| [
"christian.beikov@gmail.com"
] | christian.beikov@gmail.com |
f88b19192ab9f35bb4224f40eb5570a33cac3938 | 8dc49f037b885dae5f198d625129c96edce2bc1e | /study/bill/org/hsqldb/lib/InputStreamWrapper.java | 3288cf15fec8fedafbabfad71e8f949779f2bbf0 | [] | no_license | Dlyyy/javaproject | 65460e0d281f017a346776f3f4b6efff6b284642 | 0d37584bf1b3fb4302afbe9571850a7c7f70a11a | refs/heads/master | 2020-04-10T21:33:09.102813 | 2019-01-26T01:33:20 | 2019-01-26T01:33:20 | 161,299,205 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,072 | java | package org.hsqldb.lib;
import java.io.IOException;
import java.io.InputStream;
public class InputStreamWrapper
implements InputStreamInterface
{
InputStream is;
long limitSize = -1L;
long fetchedSize = 0L;
public InputStreamWrapper(InputStream paramInputStream)
{
this.is = paramInputStream;
}
public int read()
throws IOException
{
if (this.fetchedSize == this.limitSize) {
return -1;
}
int i = this.is.read();
if (i < 0)
{
if (this.limitSize == -1L) {
return -1;
}
throw new IOException("stream not reached the end" + this.fetchedSize + " " + this.limitSize);
}
this.fetchedSize += 1L;
return i;
}
public int read(byte[] paramArrayOfByte)
throws IOException
{
return read(paramArrayOfByte, 0, paramArrayOfByte.length);
}
public int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws IOException
{
if (this.fetchedSize == this.limitSize) {
return -1;
}
if ((this.limitSize >= 0L) && (this.limitSize - this.fetchedSize < paramInt2)) {
paramInt2 = (int)(this.limitSize - this.fetchedSize);
}
int i = this.is.read(paramArrayOfByte, paramInt1, paramInt2);
if (i < 0)
{
if (this.limitSize == -1L) {
return -1;
}
throw new IOException("stream not reached the end" + this.fetchedSize + " " + this.limitSize);
}
this.fetchedSize += i;
return i;
}
public long skip(long paramLong)
throws IOException
{
return this.is.skip(paramLong);
}
public int available()
throws IOException
{
return this.is.available();
}
public void close()
throws IOException
{
this.is.close();
}
public void setSizeLimit(long paramLong)
{
this.limitSize = paramLong;
}
public long getSizeLimit()
{
return this.limitSize;
}
}
/* Location: E:\java\java学习\hutubill\lib\all.jar!\org\hsqldb\lib\InputStreamWrapper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"704220442@qq.com"
] | 704220442@qq.com |
6bec4de388e344716b4cd13278102a67815f19aa | d71cb2e4538e901c73f240625bef39cbb4dea6c9 | /src/main/java/cn/huaruan/ud24/query/mapper/WithdrawalAuditMapper.java | f552094bfc40baeb565bebd8e16828b32681d879 | [] | no_license | jpengkun/24ud | e43788181ae4c4c591374566bb729f8e8e9e0381 | 217b56238aeb65e26a3c694f126b41074185aa8d | refs/heads/master | 2022-12-12T16:23:08.132710 | 2020-09-15T13:29:29 | 2020-09-15T13:29:29 | 290,714,388 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,132 | java | package cn.huaruan.ud24.query.mapper;
import cn.huaruan.ud24.query.entity.WithdrawalAudit;
import cn.huaruan.ud24.query.entity.WithdrawalAuditExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Created by Mybatis Generator
* @author outas
* @date 2019-12-08 00:50:53
*/
@Mapper
public interface WithdrawalAuditMapper {
long countByExample(WithdrawalAuditExample example);
int deleteByExample(WithdrawalAuditExample example);
int deleteByPrimaryKey(Integer id);
int insert(WithdrawalAudit record);
int insertSelective(WithdrawalAudit record);
List<WithdrawalAudit> selectByExample(WithdrawalAuditExample example);
WithdrawalAudit selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") WithdrawalAudit record, @Param("example") WithdrawalAuditExample example);
int updateByExample(@Param("record") WithdrawalAudit record, @Param("example") WithdrawalAuditExample example);
int updateByPrimaryKeySelective(WithdrawalAudit record);
int updateByPrimaryKey(WithdrawalAudit record);
} | [
"824780260@qq.com"
] | 824780260@qq.com |
57526f94747b90afe28c115dc6a72ebf51d89da2 | ca3bc4c8c68c15c961098c4efb2e593a800fe365 | /TableToMyibatisUtf-8/file/com/neusoft/crm/api/cpc/prod/dto/ProdInstContactDTO.java | e56c627918b267f8ce850c7f76681021fbf01f64 | [] | no_license | fansq-j/fansq-summary | 211b01f4602ceed077b38bb6d2b788fcd4f2c308 | 00e838843e6885135eeff1eb1ac95d0553fc36ea | refs/heads/master | 2022-12-17T01:18:34.323774 | 2020-01-14T06:57:24 | 2020-01-14T06:57:24 | 214,321,994 | 0 | 0 | null | 2022-11-17T16:20:29 | 2019-10-11T02:02:23 | Java | UTF-8 | Java | false | false | 223 | java | package com.neusoft.crm.api.cpc.prod.dto;
import com.neusoft.crm.api.cpc.prod.data.ProdInstContactDO;
/**
* PROD_INST_CONTACT表对应的实体DTO信息
*/
public class ProdInstContactDTO extends ProdInstContactDO{
}
| [
"13552796829@163.com"
] | 13552796829@163.com |
e64924e12285fc96b45f745798a2e0a52707edab | 47798511441d7b091a394986afd1f72e8f9ff7ab | /src/main/java/com/alipay/api/domain/ApplyCodeResponse.java | a6781e3c41cf1659f447a608f29b1ad552cc182f | [
"Apache-2.0"
] | permissive | yihukurama/alipay-sdk-java-all | c53d898371032ed5f296b679fd62335511e4a310 | 0bf19c486251505b559863998b41636d53c13d41 | refs/heads/master | 2022-07-01T09:33:14.557065 | 2020-05-07T11:20:51 | 2020-05-07T11:20:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 854 | 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;
/**
* 申请S码的结果对象
*
* @author auto create
* @since 1.0, 2019-09-18 18:03:11
*/
public class ApplyCodeResponse extends AlipayObject {
private static final long serialVersionUID = 7573191153775978482L;
/**
* apply_code_results,申请S码的结果中的批量发码结果
*/
@ApiListField("apply_code_result")
@ApiField("apply_code_result")
private List<ApplyCodeResult> applyCodeResult;
public List<ApplyCodeResult> getApplyCodeResult() {
return this.applyCodeResult;
}
public void setApplyCodeResult(List<ApplyCodeResult> applyCodeResult) {
this.applyCodeResult = applyCodeResult;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
573902198cc299831e8bd15cc489ae3bcb2a90cd | 7f5843a1d855f69bb5f6f57277ca4e048a6ecd8d | /src/main/java/com/eaglesakura/andriders/error/AceException.java | 534718a0ec6495a6a9ccea92323f86fd6a1b9e63 | [
"MIT"
] | permissive | eaglesakura/andriders-central-engine-sdk | 39c312aef0bf9f6104356d650a172f731df81c10 | fcce5ba25eff820b881243dbb8f8352f8202dce3 | refs/heads/v3.0.x | 2020-04-04T05:38:18.582074 | 2018-02-24T15:25:43 | 2018-02-24T15:25:43 | 34,196,074 | 1 | 0 | MIT | 2018-04-18T00:00:00 | 2015-04-19T06:29:06 | Java | UTF-8 | Java | false | false | 421 | java | package com.eaglesakura.andriders.error;
/**
* ACE関係で処理で問題が発生した
*/
public class AceException extends Exception {
public AceException() {
}
public AceException(String message) {
super(message);
}
public AceException(String message, Throwable cause) {
super(message, cause);
}
public AceException(Throwable cause) {
super(cause);
}
}
| [
"eagle.sakura@gmail.com"
] | eagle.sakura@gmail.com |
d598631a048dc6a27dd9494980f0ec30f5231733 | 5741045375dcbbafcf7288d65a11c44de2e56484 | /reddit-decompilada/org/jcodec/scale/ImageConvert.java | 11b1d41aaa25d4965db06ca4cb40a9c6d233bf1d | [] | no_license | miarevalo10/ReporteReddit | 18dd19bcec46c42ff933bb330ba65280615c281c | a0db5538e85e9a081bf268cb1590f0eeb113ed77 | refs/heads/master | 2020-03-16T17:42:34.840154 | 2018-05-11T10:16:04 | 2018-05-11T10:16:04 | 132,843,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,128 | java | package org.jcodec.scale;
import java.nio.ByteBuffer;
import org.jcodec.codecs.mjpeg.JpegConst;
public class ImageConvert {
private static final int CROP = 1024;
private static final int FIX_0_71414 = FIX(0.71414d);
private static final int FIX_1_402 = FIX(1.402d);
private static final int FIX_1_772 = FIX(1.772d);
private static final int ONE_HALF = 512;
private static final int SCALEBITS = 10;
private static final int _FIX_0_34414 = (-FIX(0.34414d));
private static final byte[] cropTable = new byte[2304];
private static final int[] intCropTable = new int[2304];
private static final byte[] y_ccir_to_jpeg = new byte[256];
private static final byte[] y_jpeg_to_ccir = new byte[256];
private static final int FIX(double d) {
return (int) ((d * 1024.0d) + 0.5d);
}
static {
int i = -1024;
while (true) {
int i2 = 0;
if (i >= 0) {
break;
}
int i3 = i + 1024;
cropTable[i3] = (byte) 0;
intCropTable[i3] = 0;
i++;
}
for (i = 0; i < 256; i++) {
i3 = i + 1024;
cropTable[i3] = (byte) i;
intCropTable[i3] = i;
}
for (i = 256; i < 1024; i++) {
i3 = i + 1024;
cropTable[i3] = (byte) -1;
intCropTable[i3] = 255;
}
while (i2 < 256) {
y_ccir_to_jpeg[i2] = crop(Y_CCIR_TO_JPEG(i2));
y_jpeg_to_ccir[i2] = crop(Y_JPEG_TO_CCIR(i2));
i2++;
}
}
public static final int ycbcr_to_rgb24(int i, int i2, int i3) {
i <<= 10;
i2 -= 128;
i3 -= 128;
int i4 = ((_FIX_0_34414 * i2) - (FIX_0_71414 * i3)) + 512;
i2 = (((FIX_1_402 * i3) + 512) + i) >> 10;
int i5 = (i4 + i) >> 10;
i = (i + ((FIX_1_772 * i2) + 512)) >> 10;
return (crop(i) & 255) | (((crop(i2) & 255) << 16) | ((crop(i5) & 255) << 8));
}
static final int Y_JPEG_TO_CCIR(int i) {
return ((i * FIX(0.8588235294117647d)) + 16896) >> 10;
}
static final int Y_CCIR_TO_JPEG(int i) {
return ((i * FIX(1.1643835616438356d)) + (512 - (16 * FIX(1.1643835616438356d)))) >> 10;
}
public static final int icrop(int i) {
return intCropTable[i + 1024];
}
public static final byte crop(int i) {
return cropTable[i + 1024];
}
public static final byte y_ccir_to_jpeg(byte b) {
return y_ccir_to_jpeg[b & 255];
}
public static final byte y_jpeg_to_ccir(byte b) {
return y_jpeg_to_ccir[b & 255];
}
public static void YUV444toRGB888(int i, int i2, int i3, ByteBuffer byteBuffer) {
i2 -= 128;
i3 -= 128;
int i4 = 298 * (i - 16);
i3 = (((i4 - (100 * i2)) - (JpegConst.RST0 * i3)) + 128) >> 8;
i2 = ((i4 + (516 * i2)) + 128) >> 8;
byteBuffer.put(crop((((409 * i3) + i4) + 128) >> 8));
byteBuffer.put(crop(i3));
byteBuffer.put(crop(i2));
}
public static void RGB888toYUV444(ByteBuffer byteBuffer, ByteBuffer byteBuffer2, ByteBuffer byteBuffer3, ByteBuffer byteBuffer4) {
int i = byteBuffer.get() & 255;
int i2 = byteBuffer.get() & 255;
byteBuffer = byteBuffer.get() & 255;
int i3 = ((66 * i) + (129 * i2)) + (25 * byteBuffer);
int i4 = ((112 * i) - (94 * i2)) - (18 * byteBuffer);
i = ((((-38 * i) - (74 * i2)) + (112 * byteBuffer)) + 128) >> 8;
i2 = (i4 + 128) >> 8;
byteBuffer2.put(crop(((i3 + 128) >> 8) + 16));
byteBuffer3.put(crop(i + 128));
byteBuffer4.put(crop(i2 + 128));
}
public static byte RGB888toY4(int i, int i2, int i3) {
return crop((((((66 * i) + (129 * i2)) + (25 * i3)) + 128) >> 8) + 16);
}
public static byte RGB888toU4(int i, int i2, int i3) {
return crop((((((-38 * i) - (74 * i2)) + (112 * i3)) + 128) >> 8) + 128);
}
public static byte RGB888toV4(int i, int i2, int i3) {
return crop((((((112 * i) - (94 * i2)) - (18 * i3)) + 128) >> 8) + 128);
}
}
| [
"mi.arevalo10@uniandes.edu.co"
] | mi.arevalo10@uniandes.edu.co |
557d058124629aa47d0758ce16767dd7e8d8294a | 6252c165657baa6aa605337ebc38dd44b3f694e2 | /org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator1804.java | ae0c7fa2837651bd7a5c992e4da216644e1d3cfa | [] | no_license | soha500/EglSync | 00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638 | 55101bc781349bb14fefc178bf3486e2b778aed6 | refs/heads/master | 2021-06-23T02:55:13.464889 | 2020-12-11T19:10:01 | 2020-12-11T19:10:01 | 139,832,721 | 0 | 1 | null | 2019-05-31T11:34:02 | 2018-07-05T10:20:00 | Java | UTF-8 | Java | false | false | 267 | java | package syncregions;
public class BoilerActuator1804 {
public int execute(int temperatureDifference1804, boolean boilerStatus1804) {
//sync _bfpnGUbFEeqXnfGWlV1804, behaviour
Half Change - return temperature - targetTemperature;
//endSync
}
}
| [
"sultanalmutairi@172.20.10.2"
] | sultanalmutairi@172.20.10.2 |
bd6a83fcd5a393d2f2f737b41f83bba70e6294e9 | 2fbd01a415130b738726b00817f236df46e0c52b | /MDPnPBloodPump/src/main/java/org/mdpnp/devices/DomainParticipantFactoryFactory.java | 3893bcf870fe16ee4cc4d99265cc401735196b5b | [] | no_license | DylanBagshaw/CPM | e60c34716e6fcbccaab831ba58368485d472492f | c00ad41f46dae40800fa97de4279876c8861fbba | refs/heads/master | 2020-03-11T20:05:47.618502 | 2018-09-13T16:08:35 | 2018-09-13T16:08:35 | 130,227,287 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 974 | java | package org.mdpnp.devices;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.FactoryBean;
import com.rti.dds.domain.DomainParticipantFactory;
public class DomainParticipantFactoryFactory
implements FactoryBean<com.rti.dds.domain.DomainParticipantFactory>, DisposableBean {
private com.rti.dds.domain.DomainParticipantFactory instance;
public DomainParticipantFactoryFactory() {
}
@Override
public com.rti.dds.domain.DomainParticipantFactory getObject() throws Exception {
if (null == instance) {
instance = DomainParticipantFactory.get_instance();
}
return instance;
}
@Override
public Class<DomainParticipantFactory> getObjectType() {
return DomainParticipantFactory.class;
}
@Override
public boolean isSingleton() {
return true;
}
@Override
public void destroy() throws Exception {
if (null != instance) {
DomainParticipantFactory.finalize_instance();
instance = null;
}
}
}
| [
"dmbagshaw@yahoo.com"
] | dmbagshaw@yahoo.com |
95f4015227189875b7f7ea4998e689f9ed4ec800 | 592b0e0ad07e577e2510723519c0c603d3eb2808 | /src/main/java/com/jst/prodution/market/dubbo/serviceBean/QueryRedPacketBean.java | a4ae2b99d803209bcb072b4ea0f9973d05c5d4db | [] | no_license | huangleisir/api-js180323 | 494d7a1d9b07385fc95e9927195e70727e626e53 | 7cc5d16e12cbe6c56b48831bab3736e8477d7360 | refs/heads/master | 2021-04-15T05:25:32.061201 | 2018-06-30T15:12:31 | 2018-06-30T15:12:31 | 126,464,555 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 446 | java | package com.jst.prodution.market.dubbo.serviceBean;
import com.jst.prodution.base.bean.BaseBean;
public class QueryRedPacketBean extends BaseBean {
/**
*
*/
private static final long serialVersionUID = 1L;
private String redPacketActStatus = "0";
public String getRedPacketActStatus() {
return redPacketActStatus;
}
public void setRedPacketActStatus(String redPacketActStatus) {
this.redPacketActStatus = redPacketActStatus;
}
}
| [
"lei.huang@jieshunpay.cn"
] | lei.huang@jieshunpay.cn |
91367923d8fb731dc8c2e9fbba3a55734385b524 | 8edee90cb9610c51539e0e6b126de7c9145c57bc | /datastructures-raml/src/main/java/org/xbib/raml/internal/impl/v10/type/TypeId.java | 6ef62e995f102c5c9a21e601a12996026d31ba09 | [
"Apache-2.0"
] | permissive | jprante/datastructures | 05f3907c2acba8f743639bd8b64bde1e771bb074 | efbce5bd1c67a09b9e07d2f0d4e795531cdc583b | refs/heads/main | 2023-08-14T18:44:35.734136 | 2023-04-25T15:47:23 | 2023-04-25T15:47:23 | 295,021,623 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,166 | java | /*
* Copyright 2013 (c) MuleSoft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*/
package org.xbib.raml.internal.impl.v10.type;
public enum TypeId {
STRING("string"),
ANY("any"),
NULL("nil"),
NUMBER("number"),
INTEGER("integer"),
BOOLEAN("boolean"),
DATE_ONLY("date-only"),
TIME_ONLY("time-only"),
DATE_TIME_ONLY("datetime-only"),
DATE_TIME("datetime"),
FILE("file"),
OBJECT("object"),
ARRAY("array"); // TODO this is not a valid id but
private final String type;
TypeId(String type) {
this.type = type;
}
public String getType() {
return this.type;
}
}
| [
"joergprante@gmail.com"
] | joergprante@gmail.com |
7bbd269f3d5b3e668c8f669657473a41f6db0085 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /waf-openapi-20190910/src/main/java/com/aliyun/waf_openapi20190910/models/ModifyDomainIpv6StatusResponse.java | 9af804abf3d75a9f550b05dca684c7f343efe746 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,132 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.waf_openapi20190910.models;
import com.aliyun.tea.*;
public class ModifyDomainIpv6StatusResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public ModifyDomainIpv6StatusResponseBody body;
public static ModifyDomainIpv6StatusResponse build(java.util.Map<String, ?> map) throws Exception {
ModifyDomainIpv6StatusResponse self = new ModifyDomainIpv6StatusResponse();
return TeaModel.build(map, self);
}
public ModifyDomainIpv6StatusResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public ModifyDomainIpv6StatusResponse setBody(ModifyDomainIpv6StatusResponseBody body) {
this.body = body;
return this;
}
public ModifyDomainIpv6StatusResponseBody getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
31e5425e0f9cb7dadd7e6e8808466cc4bae6a260 | e3eecfce5fc2258c95c3205d04d8e2ae8a9875f5 | /deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/api/storage/StorageMetaData.java | 0ed3ff53c6ca81fa685a4c91945d8d81986eef19 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | farizrahman4u/deeplearning4j | 585bdec78e7e8252ca63a0691102b15774e7a6dc | e0555358db5a55823ea1af78ae98a546ad64baab | refs/heads/master | 2021-06-28T19:20:38.204203 | 2019-10-02T10:16:12 | 2019-10-02T10:16:12 | 134,716,860 | 1 | 1 | Apache-2.0 | 2019-10-02T10:14:08 | 2018-05-24T13:08:06 | Java | UTF-8 | Java | false | false | 1,001 | java | package org.deeplearning4j.api.storage;
import java.io.Serializable;
/**
* StorageMetaData: contains metadata (such at types, and arbitrary custom serializable data) for storage
*
* @author Alex Black
*/
public interface StorageMetaData extends Persistable {
/**
* Timestamp for the metadata
*/
long getTimeStamp();
/**
* Session ID for the metadata
*/
String getSessionID();
/**
* Type ID for the metadata
*/
String getTypeID();
/**
* Worker ID for the metadata
*/
String getWorkerID();
/**
* Full class name for the initialization information that will be posted. Is expected to implement {@link Persistable}.
*/
String getInitTypeClass();
/**
* Full class name for the update information that will be posted. Is expected to implement {@link Persistable}.
*/
String getUpdateTypeClass();
/**
* Get extra metadata, if any
*/
Serializable getExtraMetaData();
}
| [
"blacka101@gmail.com"
] | blacka101@gmail.com |
0177edeaaabf9823a82007fe82c7b216c32974a3 | b85b2e744829d7dfe5d28babb4c3644ad67f6aa9 | /SEAD-VA-extensions/dcs-access/sead-access-ui/src/main/java/org/dataconservancy/dcs/access/server/TransformerServiceImpl.java | 7fa26c0b7d13ea80f7ee29233ee5a7ac719281ee | [] | no_license | Data-to-Insight-Center/sead-virtual-archive | 850bcc22a0e6a6beef50e59b6f6397b9b57a725d | 5aecb3512f4942d0f4c1273cdae8419ee7d5577f | refs/heads/master | 2020-04-14T13:13:55.011374 | 2020-02-01T16:22:23 | 2020-02-01T16:22:23 | 14,767,215 | 0 | 1 | null | 2020-02-01T16:22:28 | 2013-11-28T03:50:23 | Java | UTF-8 | Java | false | false | 7,958 | java | /*
* Copyright 2013 The Trustees of Indiana University
*
* 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.dataconservancy.dcs.access.server;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import org.apache.commons.io.IOUtils;
import org.dataconservancy.dcs.access.client.api.TransformerService;
import org.dataconservancy.dcs.access.client.model.SchemaType;
import org.dataconservancy.dcs.access.server.util.ServerConstants;
import org.w3c.dom.Document;
import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.Charset;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
import java.util.regex.Pattern;
public class TransformerServiceImpl extends RemoteServiceServlet
implements TransformerService
{
public TransformerServiceImpl()
{
}
@Override
public String xslTransform(SchemaType.Name inputSchema, SchemaType.Name outputSchema, String metadataXml) throws TransformerException{
TransformerFactory factory = TransformerFactory.newInstance();
Source xslt = new StreamSource(new File(getServletContext().getContextPath()+"xml/"+ inputSchema.name() +"to"+outputSchema.name()+ ".xsl"));
Transformer transformer = factory.newTransformer(xslt);
StringReader reader = new StringReader(metadataXml);
StringWriter writer = new StringWriter();
Source text = new StreamSource(reader);
transformer.transform(text, new StreamResult(writer));
return writer.toString();
}
@Override
public SchemaType.Name validateXML(String inputXml, String schemaURI) {
if(schemaURI== null)
return null;
for(SchemaType.Name schemaName: SchemaType.Name.values()){
if(Pattern.compile(Pattern.quote(schemaName.nameValue()), Pattern.CASE_INSENSITIVE).matcher(schemaURI).find()) {
DocumentBuilder parser;
Document document;
try {
parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
document = parser.parse(new StringBufferInputStream(inputXml));
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Source schemaFile = new StreamSource(new File(
getServletContext().getContextPath()+"xml/"+
schemaName.name()+".xsd"));
Schema schema = factory.newSchema(schemaFile);
Validator validator = schema.newValidator();
validator.validate(new DOMSource(document));
return schemaName;
} catch (Exception e) {
e.printStackTrace();
}
}
}
return null;
}
String homeDir = "/home/kavchand/tmp/";
@Override
public String fgdcToHtml(String inputUrl, String format) {
if(format.contains("fgdc")){
TransformerFactory factory = TransformerFactory.newInstance();
Source xslt = new StreamSource(new File(
homeDir+"queryFgdcResult.xsl"
));
Transformer transformer;
try {
transformer = factory.newTransformer(xslt);
String inputPath =
homeDir+UUID.randomUUID().toString()+"fgdcinput.xml";
saveUrl(inputPath, inputUrl);
Source text = new StreamSource(new File(
inputPath
));
String outputPath =
homeDir+UUID.randomUUID().toString()+"fgdcoutput.html";
File outputFile = new File(
outputPath
);
transformer.transform(text, new StreamResult(outputFile));
FileInputStream stream = new FileInputStream(new File(outputPath));
try {
FileChannel fc = stream.getChannel();
MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
/* Instead of using default, pass in a decoder. */
return Charset.defaultCharset().decode(bb).toString();
}
finally {
stream.close();
}
} catch (TransformerConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TransformerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
else{
try{
String inputPath =
//getServletContext().getContextPath()+"/xml/"+
homeDir+UUID.randomUUID().toString()+"fgdcinput.xml";
saveUrl(inputPath, inputUrl);
Source text = new StreamSource(new File(
//"/home/kavchand/Desktop/fgdc.xml"
inputPath
));
FileInputStream stream = new FileInputStream(new File(inputPath));
FileChannel fc = stream.getChannel();
MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
/* Instead of using default, pass in a decoder. */
return Charset.defaultCharset().decode(bb).toString();
}
catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
}
public void saveUrl(String filename, String urlString) throws MalformedURLException, IOException
{
BufferedInputStream in = null;
FileOutputStream fout = null;
try
{
in = new BufferedInputStream(new URL(urlString).openStream());
fout = new FileOutputStream(filename);
byte data[] = new byte[1024];
int count;
while ((count = in.read(data, 0, 1024)) != -1)
{
fout.write(data, 0, count);
}
}
finally
{
if (in != null)
in.close();
if (fout != null)
fout.close();
}
}
@Override
public String dateToString(Date date){
return ServerConstants.dateFormat.format(date);
}
@Override
public String readFile(String filePath){
try {
return IOUtils.toString( new FileInputStream(filePath));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
@Override
public Map<String, String> parseEntityMetadata(String metadataXml) {
XStream xStream = new XStream(new DomDriver());
xStream.alias("map",Map.class);
Map<String,String> map = (Map<String, String>) xStream.fromXML(metadataXml);
return map;
}
@Override
public String getMetadata(Map<String, String> metadata) {
XStream xStream = new XStream(new DomDriver());
xStream.alias("map",Map.class);
return xStream.toXML(metadata);
}
} | [
"kavchand@indiana.edu"
] | kavchand@indiana.edu |
c7b2fce55c3fe14d88f25fd7c68b3652d57ba48c | d0c0d6f3da7784543dc5f0d862d8246566f3a30d | /sample/src/main/java/osp/leobert/android/vh/sample/FooVH2.java | 8225ba03aaaf70fb7d0ae603da4c853d2ac1b6f1 | [
"MIT"
] | permissive | leobert-lan/PandoraDoc | 4005a5bc02a5187d07b4cbce94130c92f274b17b | fb8608d5a4fed7e2cf52df5fd8db0bf133139bca | refs/heads/master | 2020-04-30T14:17:15.849737 | 2019-06-03T02:48:15 | 2019-06-03T02:48:15 | 176,886,176 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,735 | java | package osp.leobert.android.vh.sample;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import osp.leobert.android.pandora.rv.ViewHolderCreator;
import osp.leobert.android.vh.reporter.ViewHolder;
/**
* <p><b>Package:</b> osp.leobert.android.vh.sample </p>
* <p><b>Project:</b> PandoraDoc </p>
* <p><b>Classname:</b> Foo </p>
* <p><b>Description:</b> TODO </p>
* Created by leobert on 2019-06-03.
*/
@ViewHolder(usage = ViewHolder.Global, alias = "别名", version = 2,
pic = {"http://img0.imgtn.bdimg.com/it/u=3560217793,3007674441&fm=26&gp=0.jpg",
"http://img2.imgtn.bdimg.com/it/u=2006056231,3443127119&fm=26&gp=0.jpg"})
public class FooVH2 extends AbsViewHolder<FooVO2> {
private final ItemInteract mItemInteract;
private FooVO2 mData;
public FooVH2(View itemView, ItemInteract itemInteract) {
super(itemView);
this.mItemInteract = itemInteract;
//TODO: find views and bind actions here
}
@Override
public void setData(FooVO2 data) {
mData = data;
//TODO: bind data to views
}
public static final class Creator extends ViewHolderCreator {
private final ItemInteract itemInteract;
public Creator(ItemInteract itemInteract) {
this.itemInteract = itemInteract;
}
@Override
public AbsViewHolder<FooVO2> createViewHolder(ViewGroup parent) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.app_vh_foo, parent, false);
return new FooVH2(view, itemInteract);
}
}
public interface ItemInteract {
//TODO: define your actions here
}
} | [
"774057695@qq.com"
] | 774057695@qq.com |
bbee372ad1fc03c1af1cd9975981f4e22a8bf04d | 1c40b7839027cf2ef11826a31d65e6fea18c0b38 | /renderer/src/main/java/jet/opengl/renderer/Unreal4/mesh/EPrimitiveIdMode.java | dac553bb663f3e1dbdac9a57ddb66f290aec0016 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mzhg/PostProcessingWork | 5370d37597015a178aef8cb631cc2925e4dde71e | fbc0f2a4693995102f623bf5b7643c15d7309f9a | refs/heads/master | 2022-10-21T04:32:24.792131 | 2022-10-06T06:37:31 | 2022-10-06T06:37:31 | 86,224,204 | 17 | 8 | null | null | null | null | UTF-8 | Java | false | false | 966 | java | package jet.opengl.renderer.Unreal4.mesh;
public enum EPrimitiveIdMode {
/**
* PrimitiveId will be taken from the FPrimitiveSceneInfo corresponding to the FMeshBatch.
* Primitive data will then be fetched by supporting VF's from the GPUScene persistent PrimitiveBuffer.
*/
PrimID_FromPrimitiveSceneInfo ,
/**
* The renderer will upload Primitive data from the FMeshBatchElement's PrimitiveUniformBufferResource to the end of the GPUScene PrimitiveBuffer, and assign the offset to DynamicPrimitiveShaderDataIndex.
* PrimitiveId for drawing will be computed as Scene->NumPrimitives + FMeshBatchElement's DynamicPrimitiveShaderDataIndex.
*/
PrimID_DynamicPrimitiveShaderData ,
/**
* PrimitiveId will always be 0. Instancing not supported.
* View.PrimitiveSceneDataOverrideSRV must be set in this configuration to control what the shader fetches at PrimitiveId == 0.
*/
PrimID_ForceZero ,
}
| [
"mzhg001@sina.com"
] | mzhg001@sina.com |
81c4d445115c40db317ec374cbbac27ee8129a31 | 3060ddda400e661642f1889512efba44ac2b68ef | /src/main/java/com/ecommerse/service/ProductServiceImpl.java | c39e3af0c1f942b8143afd796749af9650e4396f | [] | no_license | maheshgt/ecommerce | 5aa4200aa48dca67788b36342b4c3922b0004ba9 | 1c3bf48e697eddb6ddb9a02602a14f66dbee70fa | refs/heads/master | 2020-06-27T20:49:41.233913 | 2019-08-05T09:24:19 | 2019-08-05T09:24:19 | 200,045,823 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 968 | java |
package com.ecommerse.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ecommerse.entity.AnalyticInfo;
import com.ecommerse.entity.Categories;
import com.ecommerse.entity.Products;
import com.ecommerse.repo.AnalyticRepo;
import com.ecommerse.repo.ProductRepo;
@Service
public class ProductServiceImpl implements ProductService {
@Autowired
ProductRepo productRepo;
@Autowired
AnalyticRepo analyticRepo;
@Override
public List<Products> getAll() {
return productRepo.findAll();
}
@Override
public Products getById(int id) {
Products pro = productRepo.findByProductId(id);
Categories id1 = pro.getCategories();
AnalyticInfo ai = (AnalyticInfo) analyticRepo.findByProductId(id);
int count = ai.getProductCount();
ai.setProductCount(++count);
ai.setProducts(pro);
ai.setCategories(id1);
analyticRepo.save(ai);
return pro;
}
}
| [
"nithin2889@gmail.com"
] | nithin2889@gmail.com |
d9f22f094567d6a192cc28574ede01a02976f300 | 470772e8e6537f4a3deb7ec0b7693113d6f2fa56 | /src/main/java/me/comu/exeter/commands/image/EnlargeImageCommand.java | 52d4bec79b84cd8adb8fb6bb0951101ae9b3c904 | [] | no_license | NAQ8/Xavier-Discord-Bot | 80eb030e7f785a9df50f6b5dd4105c0634c509be | 54603e15c69de4a8f629f8bb9297cc400a6a55ea | refs/heads/master | 2023-06-10T23:26:16.631569 | 2021-07-04T17:45:42 | 2021-07-04T17:45:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,101 | java | package me.comu.exeter.commands.image;
import me.comu.exeter.core.Config;
import me.comu.exeter.core.Core;
import me.comu.exeter.interfaces.ICommand;
import me.comu.exeter.utility.Utility;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
public class EnlargeImageCommand implements ICommand {
@Override
public void handle(List<String> args, GuildMessageReceivedEvent event) {
if (Utility.beingProcessed) {
event.getChannel().sendMessage("An image is already being processed, please wait.").queue();
return;
}
if (event.getMessage().getAttachments().isEmpty()) {
if (args.isEmpty()) {
event.getChannel().sendMessage("Please insert an image link to manipulate").queue();
return;
}
Utility.beingProcessed = true;
event.getChannel().sendMessage("`Processing Image...`").queue(message -> {
try {
int random = new Random().nextInt(1000);
int newRandom = new Random().nextInt(1000);
Utility.saveImage(args.get(0), "cache", "image" + random);
File file = new File("cache/image" + random + ".png");
BufferedImage image = ImageIO.read(file);
CompletableFuture.supplyAsync(() -> image)
.thenApply(this::resizeImage)
.completeOnTimeout(null, 10, TimeUnit.SECONDS)
.thenAccept(processedImage -> {
if (processedImage == null) {
message.editMessage("Processing thread timed out.").queue();
Config.clearCacheDirectory();
Utility.beingProcessed = false;
} else {
try {
File newFilePNG = new File("cache/image" + newRandom + ".png");
ImageIO.write(processedImage, "png", newFilePNG);
message.delete().queue();
event.getChannel().sendFile(newFilePNG, "swag.png").queue(lol -> Config.clearCacheDirectory());
Utility.beingProcessed = false;
} catch (Exception ignored) {
message.editMessage("Something went wrong with processing the image").queue();
Utility.beingProcessed = false;
}
}
});
} catch (Exception ignored) {
message.editMessage("Something went wrong with processing the image").queue();
Utility.beingProcessed = false;
}
});
} else {
Utility.beingProcessed = true;
event.getChannel().sendMessage("`Processing Image...`").queue(message -> {
try {
int random = new Random().nextInt(1000);
int newRandom = new Random().nextInt(1000);
Utility.saveImage(event.getMessage().getAttachments().get(0).getUrl(), "cache", "image" + random);
File file = new File("cache/image" + random + ".png");
BufferedImage image = ImageIO.read(file);
CompletableFuture.supplyAsync(() -> image)
.thenApply(this::resizeImage)
.completeOnTimeout(null, 10, TimeUnit.SECONDS)
.thenAccept(processedImage -> {
if (processedImage == null) {
message.editMessage("Processing thread timed out.").queue();
Config.clearCacheDirectory();
Utility.beingProcessed = false;
} else {
try {
File newFilePNG = new File("cache/image" + newRandom + ".png");
ImageIO.write(processedImage, "png", newFilePNG);
message.delete().queue();
event.getChannel().sendFile(newFilePNG, "swag.png").queue(lol -> Config.clearCacheDirectory());
Utility.beingProcessed = false;
} catch (Exception ignored) {
message.editMessage("Something went wrong with processing the image").queue();
Utility.beingProcessed = false;
}
}
});
} catch (Exception ex) {
message.editMessage("Something went wrong with processing the image").queue();
Utility.beingProcessed = false;
}
});
}
Config.clearCacheDirectory();
}
private BufferedImage resizeImage(final Image image) {
final BufferedImage bufferedImage = new BufferedImage(1080, 3000, BufferedImage.TYPE_INT_RGB);
final Graphics2D graphics2D = bufferedImage.createGraphics();
graphics2D.setComposite(AlphaComposite.Src);
graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
graphics2D.drawImage(image, 0, 0, 1080, 3000, null);
graphics2D.dispose();
return bufferedImage;
}
@Override
public String getHelp() {
return "Enlarges the specified image\n`" + Core.PREFIX + getInvoke() + " [image]`\nAliases: `" + Arrays.deepToString(getAlias()) + "`";
}
@Override
public String getInvoke() {
return "enlarge";
}
@Override
public String[] getAlias() {
return new String[]{"enlargeimage", "enlargeimg", "bigger", "larger"};
}
@Override
public Category getCategory() {
return Category.IMAGE;
}
}
| [
"humza484@gmail.com"
] | humza484@gmail.com |
f5357c0e384cc96774a47a1cef525b75b1951106 | 1bad8b29b661cde256be8a425f4dfa54b434cf1b | /app/src/main/java/com/zhangwan/app/adapter/AllCommentAdapter.java | c73756b74c0ac2d5cbc83d42aa796c6e6204f83e | [] | no_license | EvlinLee/BookProject | 78cc99080886356118b8ae551d7d15541a9c3f0d | 718dcbf87ac85e4bd0ed826cb9bf25c81a891e2a | refs/heads/master | 2020-04-01T13:40:53.900566 | 2018-06-16T12:31:48 | 2018-06-16T12:31:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,137 | java | package com.zhangwan.app.adapter;
import android.content.Context;
import android.widget.ImageView;
import com.gxtc.commlibrary.helper.ImageHelper;
import com.zhangwan.app.R;
import com.zhangwan.app.base.BaseRecyclerAdapter;
import com.zhangwan.app.bean.AllCommentBean;
import java.util.List;
//全部评论
public class AllCommentAdapter extends BaseRecyclerAdapter<AllCommentBean> {
public AllCommentAdapter(Context context, List<AllCommentBean> list) {
super(context, list, R.layout.item_comment);
}
@Override
public void bindData(ViewHolder holder, int position, AllCommentBean allCommentBean) {
ImageHelper.getInstance().loadHeadRoundedImage(context, allCommentBean.getUserPic(), (ImageView) holder.getView(R.id.cv_item_comment));
holder.setText(R.id.tv_item_comment_name, allCommentBean.getUserName());
holder.setText(R.id.tv_item_comment_content, allCommentBean.getComment());
holder.setText(R.id.tv_item_comment_thumbsup, allCommentBean.getThumbsupNum());
holder.setText(R.id.tv_item_comment, allCommentBean.getIsThumbsup());
}
}
| [
"17301673845@163.com"
] | 17301673845@163.com |
1e03620d9bb4ec763ca389fe836b884dfa0d49a7 | 74afed96b70d7032d2dee3e1e515d3ea471c068c | /Gradle/multi-project/gradle-build-tool-fundamentals-m6/p2/kts/jacket/JacketWeb/src/main/java/com/pluralsight/config/WebAppInitializer.java | b95ae0d94d1eaa09ad6b2bf904ee82570ac4b607 | [] | no_license | sagarrao1/Maven_Eclipse_Junit_Mockito | f3e4c64c2673b011e69a36033363adebf79a9357 | 593e57d5add3ffb4f9ad8588d1b52e448131efe9 | refs/heads/master | 2023-08-18T22:03:18.712647 | 2023-08-18T16:38:03 | 2023-08-18T16:45:59 | 211,867,784 | 0 | 0 | null | 2022-01-26T06:31:38 | 2019-09-30T13:35:25 | Java | UTF-8 | Java | false | false | 1,160 | java | package com.pluralsight.config;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
public class WebAppInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
WebApplicationContext context = getContext();
servletContext.addListener(new ContextLoaderListener(context));
ServletRegistration.Dynamic dispatcher = servletContext.addServlet("DispatcherServlet", new DispatcherServlet(context) );
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("/");
}
private WebApplicationContext getContext() {
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
context.register(WebConfig.class);
return context;
}
}
| [
"sagarrao1@gmail.com"
] | sagarrao1@gmail.com |
3446bbb63d5409528fdd901c9206e336fd2cf3ba | 1238111b7d48562825ee32e71afb986f2a4e891a | /app/src/main/java/com/maxiaobu/healthclub/adapter/AdapterGcourseFrg.java | 0ab0a3cbb11ca8d2d39c8bd934487d1938d41b83 | [] | no_license | malong1999/Efithealth | 2fd5184ab9e7a8dcdf731578bdfcb5f89f70c601 | 8c6916db0f9132ed7cc38ca062356f532f0e3fc0 | refs/heads/master | 2021-01-21T11:22:40.232288 | 2017-03-04T12:48:07 | 2017-03-04T12:48:07 | 83,558,081 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,350 | java | package com.maxiaobu.healthclub.adapter;
import android.app.Activity;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.maxiaobu.healthclub.R;
import com.maxiaobu.healthclub.common.beangson.BeanCoachesDetail;
import com.maxiaobu.healthclub.ui.activity.GcourseActivity;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by 马小布 on 2016/9/1.
* 团操列表
*/
public class AdapterGcourseFrg extends RecyclerView.Adapter {
private List<BeanCoachesDetail.GcourseListBean> mData;
private Activity mActivity;
public AdapterGcourseFrg(Activity activity, List<BeanCoachesDetail.GcourseListBean> data) {
mActivity = activity;
mData = data;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_rv_gcourser_frg, parent, false);
return new MyViewHolder(v);
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
final BeanCoachesDetail.GcourseListBean bean = mData.get(position);
MyViewHolder viewHolder = (MyViewHolder) holder;
Glide.with(mActivity).load(bean.getImgpfilename()).placeholder(R.mipmap.ic_place_holder).into(viewHolder.mIvHead);
viewHolder.mTvTitle.setText(bean.getGcalname());
viewHolder.mTvNum.setText(bean.getGcoursetimes()+"次/"+bean.getGcoursedays()+"天");
viewHolder.mTvClubName.setText(bean.getClubname());
viewHolder.mTvAddress.setText(bean.getAddress());
viewHolder.mTvPrice.setText(bean.getGcourseprice()+"元");
viewHolder.mTvTime.setText("名额:"+bean.getGcoursenum()+"人/时长:"+bean.getGcourseminutes()+"分钟");
viewHolder.mLyRoot.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mActivity, GcourseActivity.class);
//file:///android_asset/gcourse.html?gcalid=G000052&conphone=13400001111
intent.putExtra("page","gcourse.html?gcalid="+bean.getGcalid()+"&conphone=13400000000");
mActivity.startActivity(intent);
}
});
}
@Override
public int getItemCount() {
return mData.size();
}
static class MyViewHolder extends RecyclerView.ViewHolder {
@Bind(R.id.iv_head)
ImageView mIvHead;
@Bind(R.id.tv_title)
TextView mTvTitle;
@Bind(R.id.tv_price)
TextView mTvPrice;
@Bind(R.id.tv_num)
TextView mTvNum;
@Bind(R.id.tv_time)
TextView mTvTime;
@Bind(R.id.tv_more_club)
TextView mTvMoreClub;
@Bind(R.id.tv_club_name)
TextView mTvClubName;
@Bind(R.id.tv_address)
TextView mTvAddress;
@Bind(R.id.ly_root)
LinearLayout mLyRoot;
public MyViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
}
| [
"maqinglong1999@gmail.com"
] | maqinglong1999@gmail.com |
1a325871a70af7f90e7e5c5c8d9f26fc04821153 | 5d7c8d78e72ae3ea6e61154711fdd23248c19614 | /sources/com/yunos/tvtaobao/biz/util/VisualMarkConfig.java | 636e6f7e965b788a7972344b9bb8e6ee2cbb2245 | [] | no_license | activeliang/tv.taobao.android | 8058497bbb45a6090313e8445107d987d676aff6 | bb741de1cca9a6281f4c84a6d384333b6630113c | refs/heads/master | 2022-11-28T10:12:53.137874 | 2020-08-06T05:43:15 | 2020-08-06T05:43:15 | 285,483,760 | 7 | 6 | null | null | null | null | UTF-8 | Java | false | false | 5,764 | java | package com.yunos.tvtaobao.biz.util;
import android.content.Context;
import android.graphics.Color;
import android.util.DisplayMetrics;
import com.yunos.tv.core.util.DeviceUtil;
import com.yunos.tvtaobao.businessview.R;
public final class VisualMarkConfig {
public static final int COL_COUNT = 4;
public static float Display_Scale = 1.0f;
public static int EACH_HEIGHT = 0;
public static final int EACH_REQUEST_PAGE_COUNT = 4;
public static int EACH_WIDTH = 0;
public static int ITEM_SHADOW = 0;
public static int ITEM_SPACE = 7;
public static final int LIMIT_WORDS = 15;
public static int PAGEVIEW_GAP = 0;
public static final int PAGE_COUNT = 8;
public static int PAGE_HEIGHT = ((EACH_HEIGHT * 2) + (ITEM_SPACE * 1));
public static final int PAGE_TOTAL = 52;
public static int PAGE_VIEW_MARGIN_LEFT = 0;
public static int PAGE_VIEW_MARGIN_TOP = 0;
public static int PAGE_WIDTH = ((EACH_WIDTH * 4) + (ITEM_SPACE * 3));
public static final int ROW_COUNT = 2;
public static int SCREEN_HEIGHT = 0;
public static int SCREEN_WIDTH = 0;
public static final int SD_CARD_CACHE_FILE_COUNT = 20;
public static int TABEL_HEIGHT = 0;
public static String URL_Bitmap_Size = URL_Bitmap_Size_270;
private static String URL_Bitmap_Size_270 = "_270x270.jpg";
private static String URL_Bitmap_Size_400 = "_400x400.jpg";
public static final int color_b = 51;
public static final int color_focus_b = 0;
public static final int color_focus_g = 0;
public static final int color_focus_r = 255;
public static final int color_g = 51;
public static final int color_r = 51;
public static final int color_select_b = 0;
public static final int color_select_g = 102;
public static final int color_select_r = 255;
public static final int mBitmapBound_Color = Color.rgb(246, 246, 246);
public static final int mGoodName_Color = Color.rgb(51, 51, 51);
public static String mItemDefaultImage = "goodlist_default_image_270.png";
public static int mPageTextSize = 0;
public static int mPage_Offsex_X = 0;
public static int mPage_Offsex_Y = 0;
public static final int mPriceText_Color = Color.rgb(255, 102, 0);
public static final String mSelectedBoxImage = "page_item_selector.9.png";
public static int mSelectedBoxImageResId = R.drawable.ytbv_common_focus;
public static final int mSoldText_Color = Color.rgb(153, 153, 153);
public static int mTableBar_Offset_X = 0;
public static int mTableBar_Offset_Y = 0;
public static final int mUiBackgroundColor = Color.argb(255, 232, 229, 229);
public static int offset_space = 0;
public static int textHeight = 0;
public static int textSize = 0;
public static final String onGetURL_Bitmap_Size(int size) {
if (size <= 0) {
return "";
}
String w = String.valueOf(size);
return "_" + w + "x" + w + ".jpg";
}
public static void getScreenTypeFromDevice(Context context) {
if (context != null) {
new DisplayMetrics();
int screenWidth = context.getResources().getDisplayMetrics().widthPixels;
mItemDefaultImage = "goodlist_default_image_270.png";
Display_Scale = 1.0f;
if (screenWidth == 1920) {
mItemDefaultImage = "goodlist_default_image_400.png";
Display_Scale = 1.5f;
}
}
}
public static void onInitValue() {
ITEM_SPACE = 7;
EACH_WIDTH = 270;
EACH_HEIGHT = 270;
PAGEVIEW_GAP = 14;
PAGE_VIEW_MARGIN_LEFT = 85;
PAGE_VIEW_MARGIN_TOP = 118;
ITEM_SHADOW = 50;
SCREEN_WIDTH = DeviceUtil.SCREENTYPE.ScreenType_720p;
SCREEN_HEIGHT = 672;
TABEL_HEIGHT = 69;
mPageTextSize = 30;
mPage_Offsex_X = 82;
mPage_Offsex_Y = 36;
textSize = 24;
textHeight = 25;
mTableBar_Offset_X = 780;
mTableBar_Offset_Y = 40;
offset_space = 50;
URL_Bitmap_Size = URL_Bitmap_Size_270;
if (Display_Scale != 1.0f) {
onHandleScale();
}
PAGE_WIDTH = (EACH_WIDTH * 4) + (ITEM_SPACE * 3);
PAGE_HEIGHT = (EACH_HEIGHT * 2) + (ITEM_SPACE * 1);
}
public static void onHandleScale() {
ITEM_SPACE = (int) (((float) ITEM_SPACE) * Display_Scale);
ITEM_SPACE += 5;
EACH_WIDTH = (int) (((float) EACH_WIDTH) * Display_Scale);
EACH_HEIGHT = (int) (((float) EACH_HEIGHT) * Display_Scale);
PAGEVIEW_GAP = (int) (((float) PAGEVIEW_GAP) * Display_Scale);
PAGEVIEW_GAP += 5;
PAGE_VIEW_MARGIN_LEFT = (int) (((float) PAGE_VIEW_MARGIN_LEFT) * Display_Scale);
PAGE_VIEW_MARGIN_TOP = (int) (((float) PAGE_VIEW_MARGIN_TOP) * Display_Scale);
ITEM_SHADOW = (int) (((float) ITEM_SHADOW) * Display_Scale);
SCREEN_WIDTH = (int) (((float) SCREEN_WIDTH) * Display_Scale);
SCREEN_HEIGHT = (int) (((float) SCREEN_HEIGHT) * Display_Scale);
TABEL_HEIGHT = (int) (((float) TABEL_HEIGHT) * Display_Scale);
mPageTextSize = (int) (((float) mPageTextSize) * Display_Scale);
mPage_Offsex_X = (int) (((float) mPage_Offsex_X) * Display_Scale);
mPage_Offsex_Y = (int) (((float) mPage_Offsex_Y) * Display_Scale);
textSize = (int) (((float) textSize) * Display_Scale);
textHeight = (int) (((float) textHeight) * Display_Scale);
mTableBar_Offset_X = (int) (((float) mTableBar_Offset_X) * Display_Scale);
mTableBar_Offset_Y = (int) (((float) mTableBar_Offset_Y) * Display_Scale);
offset_space = (int) (((float) offset_space) * Display_Scale);
URL_Bitmap_Size = URL_Bitmap_Size_400;
}
}
| [
"activeliang@gmail.com"
] | activeliang@gmail.com |
981b400ab90465533342b482971261287ca6a9a2 | bdd4c789150d84087e19eede48f801776fedc58c | /moco-runner/src/test/java/com/github/dreamhead/moco/MocoMountStandaloneTest.java | 6c4b510073ba3c73cb7ba4d8ac6d24d355544b7c | [
"MIT"
] | permissive | xuehanxin/moco | e4dc240e9db7feefdc7df73988cfb7a36ca88ebd | 85978d7030bc36abe13db094d5c2624c60648502 | refs/heads/master | 2021-01-15T12:25:18.147679 | 2016-08-22T12:31:15 | 2016-08-22T12:31:15 | 66,355,437 | 1 | 0 | null | 2016-08-23T09:59:44 | 2016-08-23T09:59:44 | null | UTF-8 | Java | false | false | 2,234 | java | package com.github.dreamhead.moco;
import com.google.common.io.CharStreams;
import com.google.common.net.HttpHeaders;
import org.apache.http.client.HttpResponseException;
import org.junit.Test;
import java.io.IOException;
import java.io.InputStreamReader;
import static com.github.dreamhead.moco.helper.RemoteTestUtils.remoteUrl;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class MocoMountStandaloneTest extends AbstractMocoStandaloneTest {
@Test
public void should_mount_dir_to_uri() throws IOException {
runWithConfiguration("mount.json");
assertThat(helper.get(remoteUrl("/mount/mount.response")), is("response from mount"));
}
@Test
public void should_mount_dir_to_uri_with_include() throws IOException {
runWithConfiguration("mount.json");
assertThat(helper.get(remoteUrl("/mount-include/mount.response")), is("response from mount"));
}
@Test(expected = HttpResponseException.class)
public void should_return_non_inclusion() throws IOException {
runWithConfiguration("mount.json");
helper.get(remoteUrl("/mount-include/foo.bar"));
}
@Test
public void should_mount_dir_to_uri_with_exclude() throws IOException {
runWithConfiguration("mount.json");
assertThat(helper.get(remoteUrl("/mount-exclude/foo.bar")), is("foo.bar"));
}
@Test(expected = HttpResponseException.class)
public void should_return_exclusion() throws IOException {
runWithConfiguration("mount.json");
helper.get(remoteUrl("/mount-exclude/mount.response"));
}
@Test
public void should_mount_dir_to_uri_with_response() throws IOException {
runWithConfiguration("mount.json");
org.apache.http.HttpResponse httpResponse = org.apache.http.client.fluent.Request.Get(remoteUrl("/mount-response/mount.response")).execute().returnResponse();
String value = httpResponse.getFirstHeader(HttpHeaders.CONTENT_TYPE).getValue();
assertThat(value, is("text/plain"));
String content = CharStreams.toString(new InputStreamReader(httpResponse.getEntity().getContent()));
assertThat(content, is("response from mount"));
}
}
| [
"dreamhead.cn@gmail.com"
] | dreamhead.cn@gmail.com |
a4fa25bd3aa5ab1485b7ce64088b8c62d70a5d91 | e75be673baeeddee986ece49ef6e1c718a8e7a5d | /submissions/blizzard/Corpus/eclipse.pde.ui/531.java | 8e37aac5f17420b4df303286fa039b8150fad7d2 | [
"MIT"
] | permissive | zhendong2050/fse18 | edbea132be9122b57e272a20c20fae2bb949e63e | f0f016140489961c9e3c2e837577f698c2d4cf44 | refs/heads/master | 2020-12-21T11:31:53.800358 | 2018-07-23T10:10:57 | 2018-07-23T10:10:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,221 | java | /*******************************************************************************
* Copyright (c) 2007, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.pde.internal.ua.ui.wizards.toc;
import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPlugin;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
public class TocHTMLOperation extends WorkspaceModifyOperation {
private IFile fFile;
private static byte[] getHTMLContent() throws CoreException {
//$NON-NLS-1$
String indent = " ";
//$NON-NLS-1$
String delimiter = System.getProperty("line.separator");
StringBuffer buf = new StringBuffer();
//$NON-NLS-1$
buf.append("<!DOCTYPE HTML PUBLIC");
//$NON-NLS-1$
buf.append(" \"-//W3C//DTD HTML 4.01 Transitional//EN\"");
//$NON-NLS-1$
buf.append(" \"http://www.w3.org/TR/html4/loose.dtd\">");
buf.append(delimiter);
//$NON-NLS-1$
buf.append("<html>");
buf.append(delimiter);
buf.append(indent);
//$NON-NLS-1$
buf.append("<head>");
buf.append(delimiter);
buf.append(indent);
buf.append(indent);
//$NON-NLS-1$
buf.append("<title>Title</title>");
buf.append(delimiter);
buf.append(indent);
//$NON-NLS-1$
buf.append("</head>");
buf.append(delimiter);
buf.append(delimiter);
buf.append(indent);
//$NON-NLS-1$
buf.append("<body>");
buf.append(delimiter);
buf.append(indent);
buf.append(indent);
//$NON-NLS-1$
buf.append("<h2>");
buf.append(delimiter);
buf.append(indent);
buf.append(indent);
buf.append(indent);
//$NON-NLS-1$
buf.append("Title");
buf.append(delimiter);
buf.append(indent);
buf.append(indent);
//$NON-NLS-1$
buf.append("</h2>");
buf.append(delimiter);
buf.append(indent);
buf.append(indent);
//$NON-NLS-1$
buf.append("<p>");
buf.append(delimiter);
buf.append(indent);
buf.append(indent);
buf.append(indent);
//$NON-NLS-1$
buf.append("Body");
buf.append(delimiter);
buf.append(indent);
buf.append(indent);
//$NON-NLS-1$
buf.append("</p>");
buf.append(delimiter);
buf.append(indent);
//$NON-NLS-1$
buf.append("</body>");
buf.append(delimiter);
//$NON-NLS-1$
buf.append("</html>");
buf.append(delimiter);
try {
//$NON-NLS-1$
return buf.toString().getBytes("UTF8");
} catch (UnsupportedEncodingException e) {
PDEUserAssistanceUIPlugin.logException(e);
IStatus status = new Status(IStatus.ERROR, PDEUserAssistanceUIPlugin.PLUGIN_ID, IStatus.ERROR, e.getMessage(), e);
throw new CoreException(status);
}
}
public TocHTMLOperation(IFile file) {
fFile = file;
}
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
ByteArrayInputStream stream = new ByteArrayInputStream(getHTMLContent());
fFile.setContents(stream, 0, monitor);
monitor.done();
}
}
| [
"tim.menzies@gmail.com"
] | tim.menzies@gmail.com |
7d872e5477f6340280313d43c07e19fd13204c5d | 4b321bc5dd32cb7bbfb5451b475432a55066053a | /src/_module3/les_26_170117/_3_4_multithread/_car/t.java | 4e2cf5f31761e354de4bf607f085d25a51f9b48d | [] | no_license | Golovko-Vitalii/Java-1-course | ae3888fbd996f473fb39552fe4625715b916f338 | aee48538c0c4173c81cf3211e1e513c08c562abe | refs/heads/master | 2021-01-22T05:42:26.623550 | 2017-05-26T07:59:52 | 2017-05-26T07:59:52 | 92,486,819 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,089 | java | package _module3.les_26_170117._3_4_multithread._car;
public class t {
public static void main(String[] args) {
Runnable r = new Runnable() {// анонимный класс реализации интерфейса
@Override
public void run() {
for (int i = 0; i < 5; i++) {
System.out.println("yes!");
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
};
//Thread t1 = new Thread(r);t1.start();// или следующее
new Thread(r).start();
try {
Thread.currentThread().sleep(200);
} catch (InterruptedException e) {
e.printStackTrace();
}
new Car() {
@Override
void m() {
System.out.println("child of car");
}
}.m();
}
}
class Car {
void m() {
System.out.println("car");
}
} | [
"golovko.inc@gmail.com"
] | golovko.inc@gmail.com |
cf4c6806af514ebf004e706794eb330459307de5 | 7dd8e503b77544988202daa681fa26b7d2485e8c | /core-parent/model/src/main/java/fr/javatronic/damapping/processor/model/impl/DAMethodImpl.java | d7dd212dc4cb2c41aba2b1d23a46e1506a3b1c1f | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | HiWong/damapping | 2988dd6ab622dcba498c67d413d45fa302118071 | 357afa5866939fd2a18c09213975ffef4836f328 | refs/heads/master | 2021-01-21T02:56:50.265833 | 2015-02-28T11:09:25 | 2015-03-02T20:37:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,590 | java | /**
* Copyright (C) 2013 Sébastien Lesaint (http://www.javatronic.fr/)
*
* 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 fr.javatronic.damapping.processor.model.impl;
import fr.javatronic.damapping.processor.model.DAAnnotation;
import fr.javatronic.damapping.processor.model.DAMethod;
import fr.javatronic.damapping.processor.model.DAModifier;
import fr.javatronic.damapping.processor.model.DAName;
import fr.javatronic.damapping.processor.model.DAParameter;
import fr.javatronic.damapping.processor.model.DAType;
import fr.javatronic.damapping.processor.model.predicate.DAAnnotationPredicates;
import fr.javatronic.damapping.processor.model.visitor.DAModelVisitor;
import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import static fr.javatronic.damapping.processor.model.util.ImmutabilityHelper.nonNullFrom;
import static fr.javatronic.damapping.util.Preconditions.checkNotNull;
/**
* DAMethodImpl - Implementation of DAMethod as a immutable object.
*
* @author Sébastien Lesaint
*/
@Immutable
public class DAMethodImpl implements DAMethod {
private final boolean constructor;
@Nonnull
private final DAName name;
@Nonnull
private final List<DAAnnotation> annotations;
@Nonnull
private final Set<DAModifier> modifiers;
@Nullable
private final DAType returnType;
@Nonnull
private final List<DAParameter> parameters;
private final boolean mapperFactoryMethod;
private final boolean guavaFunctionApplyMethod;
private final boolean mapperMethod;
private DAMethodImpl(Builder builder, boolean mapperFactoryMethod) {
this.constructor = builder.constructor;
this.name = builder.name;
this.annotations = nonNullFrom(builder.annotations);
this.modifiers = nonNullFrom(builder.modifiers);
this.returnType = builder.returnType;
this.parameters = nonNullFrom(builder.parameters);
this.mapperFactoryMethod = mapperFactoryMethod;
this.guavaFunctionApplyMethod = false;
this.mapperMethod = false;
}
private DAMethodImpl(DAMethod from, boolean guavaFunctionApplyMethod, boolean mapperMethod) {
this.constructor = from.isConstructor();
this.name = from.getName();
this.annotations = from.getAnnotations();
this.modifiers = from.getModifiers();
this.returnType = from.getReturnType();
this.parameters = from.getParameters();
this.mapperFactoryMethod = from.isMapperFactoryMethod();
this.guavaFunctionApplyMethod = guavaFunctionApplyMethod;
this.mapperMethod = mapperMethod;
}
public static Builder methodBuilder() {
return new Builder(false);
}
public static Builder constructorBuilder() {
return new Builder(true);
}
@Nonnull
public static DAMethod makeMapperMethod(@Nonnull DAMethod daMethod) {
return new DAMethodImpl(checkNotNull(daMethod), false, true);
}
@Nonnull
public static DAMethod makeGuavaFunctionApplyMethod(@Nonnull DAMethod daMethod) {
return new DAMethodImpl(checkNotNull(daMethod), true, false);
}
@Override
public boolean isConstructor() {
return constructor;
}
@Override
@Nonnull
public DAName getName() {
return name;
}
@Override
@Nonnull
public List<DAAnnotation> getAnnotations() {
return annotations;
}
@Override
@Nonnull
public Set<DAModifier> getModifiers() {
return modifiers;
}
@Override
@Nullable
public DAType getReturnType() {
return returnType;
}
@Override
@Nonnull
public List<DAParameter> getParameters() {
return parameters;
}
@Override
public boolean isMapperFactoryMethod() {
return mapperFactoryMethod;
}
@Override
public boolean isMapperMethod() {
return mapperMethod;
}
@Override
public boolean isGuavaFunctionApplyMethod() {
return guavaFunctionApplyMethod;
}
@Override
public void accept(DAModelVisitor visitor) {
visitor.visit(this);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DAMethodImpl daMethod = (DAMethodImpl) o;
if (!name.equals(daMethod.name)) {
return false;
}
if (constructor != daMethod.constructor) {
return false;
}
if (guavaFunctionApplyMethod != daMethod.guavaFunctionApplyMethod) {
return false;
}
if (mapperMethod != daMethod.mapperMethod) {
return false;
}
if (mapperFactoryMethod != daMethod.mapperFactoryMethod) {
return false;
}
if (!modifiers.equals(daMethod.modifiers)) {
return false;
}
if (returnType == null ? daMethod.returnType != null : !returnType.equals(daMethod.returnType)) {
return false;
}
if (!annotations.equals(daMethod.annotations)) {
return false;
}
if (!parameters.equals(daMethod.parameters)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = (constructor ? 1 : 0);
result = 31 * result + name.hashCode();
result = 31 * result + annotations.hashCode();
result = 31 * result + modifiers.hashCode();
result = 31 * result + (returnType != null ? returnType.hashCode() : 0);
result = 31 * result + parameters.hashCode();
result = 31 * result + (mapperFactoryMethod ? 1 : 0);
result = 31 * result + (guavaFunctionApplyMethod ? 1 : 0);
result = 31 * result + (mapperMethod ? 1 : 0);
return result;
}
public static class Builder {
@Nonnull
private final boolean constructor;
@Nonnull
private DAName name;
@Nullable
private List<DAAnnotation> annotations;
@Nullable
private Set<DAModifier> modifiers;
@Nullable
private DAType returnType;
@Nullable
private List<DAParameter> parameters;
public Builder(boolean constructor) {
this.constructor = constructor;
}
public Builder withName(@Nonnull DAName name) {
this.name = name;
return this;
}
public Builder withAnnotations(@Nullable List<DAAnnotation> annotations) {
this.annotations = annotations;
return this;
}
public Builder withModifiers(@Nullable Set<DAModifier> modifiers) {
this.modifiers = modifiers;
return this;
}
public Builder withReturnType(@Nullable DAType returnType) {
this.returnType = returnType;
return this;
}
public Builder withParameters(@Nullable List<DAParameter> parameters) {
this.parameters = parameters;
return this;
}
public DAMethod build() {
List<DAAnnotation> daAnnotations = nonNullFrom(this.annotations);
return new DAMethodImpl(this, computeMapperFactoryMethodFlag(daAnnotations));
}
private static boolean computeMapperFactoryMethodFlag(@Nonnull List<DAAnnotation> daAnnotations) {
for (DAAnnotation daAnnotation : daAnnotations) {
if (DAAnnotationPredicates.isMapperFactoryMethod().apply(daAnnotation)) {
return true;
}
}
return false;
}
}
}
| [
"sebastien.lesaint@gmail.com"
] | sebastien.lesaint@gmail.com |
cbfe5d92eb67b0dc92daa94dec17d0e00bc4365a | 01dfb27f1288a9ed62f83be0e0aeedf121b4623a | /GeradorEtiqueta/src/java/com/t2tierp/geradoretiqueta/servidor/EtiquetaLayoutDetalheAction.java | 7f0447b5ffbee8337aae6b0ca54daf982c184674 | [
"MIT"
] | permissive | FabinhuSilva/T2Ti-ERP-2.0-Java-OpenSwing | deb486a13c264268d82e5ea50d84d2270b75772a | 9531c3b6eaeaf44fa1e31b11baa630dcae67c18e | refs/heads/master | 2022-11-16T00:03:53.426837 | 2020-07-08T00:36:48 | 2020-07-08T00:36:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,481 | java | /*
* The MIT License
*
* Copyright: Copyright (C) 2014 T2Ti.COM
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* The author may be contacted at: t2ti.com@gmail.com
*
* @author Claudio de Barros (T2Ti.com)
* @version 2.0
*/
package com.t2tierp.geradoretiqueta.servidor;
import com.t2tierp.padrao.java.Constantes;
import com.t2tierp.padrao.servidor.HibernateUtil;
import com.t2tierp.geradoretiqueta.java.EtiquetaLayoutVO;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.openswing.swing.message.receive.java.ErrorResponse;
import org.openswing.swing.message.receive.java.Response;
import org.openswing.swing.message.receive.java.VOResponse;
import org.openswing.swing.server.Action;
import org.openswing.swing.server.UserSessionParameters;
public class EtiquetaLayoutDetalheAction implements Action {
public EtiquetaLayoutDetalheAction() {
}
public String getRequestName() {
return "etiquetaLayoutDetalheAction";
}
public Response executeCommand(Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) {
Object[] pars = (Object[]) inputPar;
Integer acao = (Integer) pars[0];
switch (acao) {
case Constantes.LOAD: {
return load(inputPar, userSessionPars, request, response, userSession, context);
}
case Constantes.INSERT: {
return insert(inputPar, userSessionPars, request, response, userSession, context);
}
case Constantes.UPDATE: {
return update(inputPar, userSessionPars, request, response, userSession, context);
}
case Constantes.DELETE: {
return delete(inputPar, userSessionPars, request, response, userSession, context);
}
}
return null;
}
private Response load(Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) {
Session session = null;
Object[] pars = (Object[]) inputPar;
String pk = (String) pars[1];
try {
session = HibernateUtil.getSessionFactory().openSession();
Criteria criteria = session.createCriteria(EtiquetaLayoutVO.class);
criteria.add(Restrictions.eq("id", Integer.valueOf(pk)));
EtiquetaLayoutVO etiquetaLayout = (EtiquetaLayoutVO) criteria.uniqueResult();
return new VOResponse(etiquetaLayout);
} catch (Exception ex) {
ex.printStackTrace();
return new ErrorResponse(ex.getMessage());
} finally {
try {
session.close();
} catch (Exception ex1) {
}
}
}
public Response insert(Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) {
Session session = null;
try {
Object[] pars = (Object[]) inputPar;
EtiquetaLayoutVO etiquetaLayout = (EtiquetaLayoutVO) pars[1];
session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
session.save(etiquetaLayout);
session.getTransaction().commit();
return new VOResponse(etiquetaLayout);
} catch (Exception ex) {
ex.printStackTrace();
if (session != null) {
session.getTransaction().rollback();
}
return new ErrorResponse(ex.getMessage());
} finally {
try {
if (session != null) {
session.close();
}
} catch (Exception ex1) {
ex1.printStackTrace();
}
}
}
public Response update(Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) {
Session session = null;
try {
Object[] pars = (Object[]) inputPar;
EtiquetaLayoutVO etiquetaLayout = (EtiquetaLayoutVO) pars[2];
session = HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
session.update(etiquetaLayout);
session.getTransaction().commit();
return new VOResponse(etiquetaLayout);
} catch (Exception ex) {
ex.printStackTrace();
if (session != null) {
session.getTransaction().rollback();
}
return new ErrorResponse(ex.getMessage());
} finally {
try {
if (session != null) {
session.close();
}
} catch (Exception ex1) {
ex1.printStackTrace();
}
}
}
public Response delete(Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) {
return null;
}
}
| [
"claudiobsi@gmail.com"
] | claudiobsi@gmail.com |
60d9bbb1819d0e76177df53672786bad834fb845 | 884056b6a120b2a4c1c1202a4c69b07f59aecc36 | /java projects/checkIT/src/slicedCheckItTest.java | cf6974f47ad0b3b5b043232f3b006ebdb431359c | [
"MIT"
] | permissive | NazaninBayati/SMBFL | a48b16dbe2577a3324209e026c1b2bf53ee52f55 | 999c4bca166a32571e9f0b1ad99085a5d48550eb | refs/heads/master | 2021-07-17T08:52:42.709856 | 2020-09-07T12:36:11 | 2020-09-07T12:36:11 | 204,252,009 | 3 | 0 | MIT | 2020-01-31T18:22:23 | 2019-08-25T05:47:52 | Java | UTF-8 | Java | false | false | 1,482 | java | import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class slicedCheckItTest {
/*
* Test case number: 1
* Test case values: a=false, b=true, c=false
* Expected output (Post-state): P isn't true
*/
@Test
public void test1()
{
String result = slicedCheckIt.checkIt(false, true, false);
assertEquals("P isn't true" ,result);
}
/*
* Test case number: 2
* Test case values: a=true, b=true, c=false
* Expected output (Post-state): P is true
*/
@Test
public void test2()
{
String result = slicedCheckIt.checkIt(true, true, false);
assertEquals("P is true" ,result);
}
/*
* Test case number: 3
* Test case values: a=true, b=false, c=true
* Expected output (Post-state): P is true
*/
@Test
public void test3()
{
String result = slicedCheckIt.checkIt(true, false, true);
assertEquals("P is true" ,result);
}
/*
* Test case number: 4
* Test case values: a=true, b=false, c=false
* Expected output (Post-state): P isn't true
*/
@Test
public void test4()
{
String result = slicedCheckIt.checkIt(true, false, false);
assertEquals("P isn't true" ,result);
}
/*
* Test case number: 5
* Test case values: a=true, b=true, c=true
* Expected output (Post-state): P is true
*/
@Test
public void test5()
{
String result = slicedCheckIt.checkIt(true, true, true);
assertEquals("P is true" ,result);
}
}
| [
"n.bayati20@gmail.com"
] | n.bayati20@gmail.com |
d48f59b28448fdd5b18be991bb51ded41a81ebd0 | 2dbce297335bdd2386475b65717870795e2ede4f | /src/main/java/edu/emory/cs/graph/flow/MaxFlow.java | b6e900c3b902166e179d4d1a7f57c1f0a532ff24 | [] | no_license | leahsidoniesmith/dsa-java-1 | 4df7355abad720eed5e8e6118800d4d88a5d9c22 | b7df6abf9de3b6751c77b38860b87a5cf4c8c95f | refs/heads/master | 2023-01-04T18:40:16.585436 | 2020-10-28T20:39:55 | 2020-10-28T20:39:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,242 | java | /*
* Copyright 2020 Emory University
*
* 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 edu.emory.cs.graph.flow;
import edu.emory.cs.graph.Edge;
import edu.emory.cs.graph.Graph;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Jinho D. Choi ({@code jinho.choi@emory.edu})
*/
public class MaxFlow {
private Map<Edge, Double> m_flows;
private double d_maxFlow;
public MaxFlow(Graph graph) {
init(graph);
}
public void init(Graph graph) {
m_flows = new HashMap<>();
d_maxFlow = 0;
for (Edge edge : graph.getAllEdges())
m_flows.put(edge, 0d);
}
// ============================== Getter ==============================
public double getResidual(Edge edge) {
return edge.getWeight() - m_flows.get(edge);
}
public double getMaxFlow() {
return d_maxFlow;
}
public List<Edge> getFlowEdges() {
List<Edge> edges = new ArrayList<>();
double r;
Edge e;
for (Edge edge : m_flows.keySet()) {
r = m_flows.get(edge);
if (r > 0) {
e = new Edge(edge.getSource(), edge.getTarget(), r);
edges.add(e);
}
}
return edges;
}
// ============================== Setter ==============================
public void updateResidual(List<Edge> path, double flow) {
for (Edge edge : path) updateResidual(edge, flow);
d_maxFlow += flow;
}
public void updateResidual(Edge edge, double flow) {
Double prev = m_flows.get(edge);
if (prev == null) prev = 0d;
m_flows.put(edge, prev + flow);
}
}
| [
"jinho.choi@emory.edu"
] | jinho.choi@emory.edu |
20f70522c2d329af9ecb81254ef8ead115fcde46 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/view/refreshLayout/g/c.java | e4e4720aa1b10d4de2d26bb3153bca3d7b19ccee | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 6,229 | java | package com.tencent.mm.view.refreshLayout.g;
import android.graphics.PointF;
import android.view.View;
import android.view.ViewGroup;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ah.a.g;
import com.tencent.mm.view.refreshLayout.b.g;
import com.tencent.mm.view.refreshLayout.f.a;
import kotlin.Metadata;
import kotlin.g.b.s;
@Metadata(d1={""}, d2={"Lcom/tencent/mm/view/refreshLayout/widget/RefreshBoundaryDecider;", "Lcom/tencent/mm/view/refreshLayout/interfaces/IScrollBoundaryDecider;", "()V", "boundary", "mActionEvent", "Landroid/graphics/PointF;", "mEnableLoadMoreWhenContentNotFull", "", "canLoadMore", "content", "Landroid/view/View;", "targetView", "touch", "contentFull", "canRefresh", "isTransformedTouchPointInView", "group", "child", "x", "", "y", "outLocalPoint", "libmmui_release"}, k=1, mv={1, 5, 1}, xi=48)
public final class c
implements g
{
public PointF agRr;
public g agRs;
public boolean agRt = true;
private final boolean a(View paramView, PointF paramPointF)
{
AppMethodBeat.i(235122);
if (paramView == null)
{
AppMethodBeat.o(235122);
return false;
}
if ((paramView.canScrollVertically(-1)) && (paramView.getVisibility() == 0))
{
AppMethodBeat.o(235122);
return false;
}
int i;
PointF localPointF;
if (((paramView instanceof ViewGroup)) && (paramPointF != null))
{
i = ((ViewGroup)paramView).getChildCount();
localPointF = new PointF();
if (i <= 0) {}
}
for (;;)
{
int j = i - 1;
View localView = ((ViewGroup)paramView).getChildAt(i - 1);
s.s(localView, "child");
if (a(paramView, localView, paramPointF.x, paramPointF.y, localPointF))
{
paramView = localView.getTag(a.g.wx_rl_tag);
if ((s.p("fixed", paramView)) || (s.p("fixed-bottom", paramView)))
{
AppMethodBeat.o(235122);
return false;
}
paramPointF.offset(localPointF.x, localPointF.y);
boolean bool = a(localView, paramPointF);
paramPointF.offset(-localPointF.x, -localPointF.y);
AppMethodBeat.o(235122);
return bool;
}
if (j <= 0)
{
AppMethodBeat.o(235122);
return true;
}
i = j;
}
}
private final boolean a(View paramView, PointF paramPointF, boolean paramBoolean)
{
AppMethodBeat.i(235131);
if (paramView == null)
{
AppMethodBeat.o(235131);
return false;
}
if ((paramView.canScrollVertically(1)) && (paramView.getVisibility() == 0))
{
AppMethodBeat.o(235131);
return false;
}
Object localObject;
int i;
if (((paramView instanceof ViewGroup)) && (paramPointF != null))
{
localObject = a.agRg;
if (!a.mF(paramView))
{
i = ((ViewGroup)paramView).getChildCount();
localObject = new PointF();
if (i <= 0) {}
}
}
for (;;)
{
int j = i - 1;
View localView = ((ViewGroup)paramView).getChildAt(i - 1);
s.s(localView, "child");
if (a(paramView, localView, paramPointF.x, paramPointF.y, (PointF)localObject))
{
paramView = localView.getTag(a.g.wx_rl_tag);
if ((s.p("fixed", paramView)) || (s.p("fixed-top", paramView)))
{
AppMethodBeat.o(235131);
return false;
}
paramPointF.offset(((PointF)localObject).x, ((PointF)localObject).y);
paramBoolean = a(localView, paramPointF, paramBoolean);
paramPointF.offset(-((PointF)localObject).x, -((PointF)localObject).y);
AppMethodBeat.o(235131);
return paramBoolean;
}
if (j <= 0)
{
if ((paramBoolean) || (paramView.canScrollVertically(-1)))
{
AppMethodBeat.o(235131);
return true;
}
AppMethodBeat.o(235131);
return false;
}
i = j;
}
}
public static boolean a(View paramView1, View paramView2, float paramFloat1, float paramFloat2, PointF paramPointF)
{
AppMethodBeat.i(235116);
s.u(paramView1, "group");
s.u(paramView2, "child");
if (paramView2.getVisibility() != 0)
{
AppMethodBeat.o(235116);
return false;
}
float[] arrayOfFloat = new float[2];
arrayOfFloat[0] = paramFloat1;
arrayOfFloat[1] = paramFloat2;
arrayOfFloat[0] = (arrayOfFloat[0] + paramView1.getScrollX() - paramView2.getLeft());
arrayOfFloat[1] = (arrayOfFloat[1] + paramView1.getScrollY() - paramView2.getTop());
if ((arrayOfFloat[0] >= 0.0F) && (arrayOfFloat[1] >= 0.0F) && (arrayOfFloat[0] < paramView2.getWidth()) && (arrayOfFloat[1] < paramView2.getHeight())) {}
for (boolean bool = true;; bool = false)
{
if (bool) {
paramPointF.set(arrayOfFloat[0] - paramFloat1, arrayOfFloat[1] - paramFloat2);
}
AppMethodBeat.o(235116);
return bool;
}
}
public final boolean mD(View paramView)
{
AppMethodBeat.i(235138);
Object localObject = this.agRs;
if (localObject == null) {}
for (localObject = null; localObject == null; localObject = Boolean.valueOf(((g)localObject).mD(paramView)))
{
bool = a(paramView, this.agRr);
AppMethodBeat.o(235138);
return bool;
}
boolean bool = ((Boolean)localObject).booleanValue();
AppMethodBeat.o(235138);
return bool;
}
public final boolean mE(View paramView)
{
AppMethodBeat.i(235143);
Object localObject = this.agRs;
if (localObject == null) {}
for (localObject = null; localObject == null; localObject = Boolean.valueOf(((g)localObject).mE(paramView)))
{
bool = a(paramView, this.agRr, this.agRt);
AppMethodBeat.o(235143);
return bool;
}
boolean bool = ((Boolean)localObject).booleanValue();
AppMethodBeat.o(235143);
return bool;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes10.jar
* Qualified Name: com.tencent.mm.view.refreshLayout.g.c
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
80c96b5719a40a726ec7478886812dabc7c70103 | b8e3e449651bd64e5c126b5f91853428a595b5d8 | /service-api/src/main/java/com/similan/service/api/collaborationworkspace/dto/operation/NewExternalSharedDocumentDto.java | f40abf974c57d305bd84e08c88b417f64e6afd5e | [] | no_license | suparna2702/ServiceFabric | ee5801a346fda63edf0bea75103e693e52037fc4 | d526376f9530f608726fa6ad1b7912b4ec384a82 | refs/heads/master | 2021-03-22T04:40:41.688184 | 2016-12-06T02:06:38 | 2016-12-06T02:06:38 | 75,250,704 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 853 | java | package com.similan.service.api.collaborationworkspace.dto.operation;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import com.similan.service.api.base.dto.operation.OperationDto;
import com.similan.service.api.collaborationworkspace.dto.key.CollaborationWorkspaceKey;
import com.similan.service.api.community.dto.key.SocialActorKey;
import com.similan.service.api.profile.dto.ExternalSocialPersonDto;
@Getter
@Setter
@ToString
public class NewExternalSharedDocumentDto extends OperationDto {
@XmlElement
private String header;
@XmlElement
private String message;
@XmlElement
private SocialActorKey sharer;
@XmlElement
private CollaborationWorkspaceKey workspaceToKey;
@XmlElement
private List<ExternalSocialPersonDto> shareList;
}
| [
"suparna2702@gmail.com"
] | suparna2702@gmail.com |
32db0063f69d80bd1ceee2419060c17563e818d1 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/cs61bl/lab04/cs61bl-hu/AccountTest.java | 7480aea9ebac6b16d0c6b840d05e3913ff7f3c59 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Java | false | false | 1,015 | java | import junit.framework.TestCase;
public class AccountTest extends TestCase {
public void testInit() {
Account c;
c = new Account(1000);
assertTrue (c.balance() == 1000);
}
public void testInvalidArgs () {
Account c;
c = new Account(1000);
c.withdraw(-200);
assertTrue (c.balance() == 1000);
}
public void testOverdraft () {
Account c;
Account A;
c = new Account(1000);
A = new Account(500, c);
A.withdraw (2000);
assertTrue (c.balance() == 1000);
assertTrue (A.balance() == 500);
}
public void testWithdraw() {
Account c;
Account A;
c = new Account(1000);
A = new Account(500, c);
A.withdraw (200);
assertTrue (A.balance() == 300);
A.withdraw (500);
assertTrue (A.balance() == 0);
assertTrue (c.balance() == 800);
}
public void testDeposit() {
Account c;
c = new Account(1000);
c.deposit(500);
assertTrue (c.balance() == 1500);
}
}
| [
"moghadam.joseph@gmail.com"
] | moghadam.joseph@gmail.com |
f7bb3f75dc603c2ab5cef6ecc8c5b36943dc3e0b | 447520f40e82a060368a0802a391697bc00be96f | /apks/malware/app98/source/com/squareup/okhttp/internal/http/RouteSelector.java | 6a38018a5c5b2c09d5d198a694e26fe5b51f0e61 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 6,698 | java | package com.squareup.okhttp.internal.http;
import com.squareup.okhttp.Address;
import com.squareup.okhttp.Connection;
import com.squareup.okhttp.ConnectionPool;
import com.squareup.okhttp.Route;
import com.squareup.okhttp.internal.Dns;
import com.squareup.okhttp.internal.Util;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.Proxy.Type;
import java.net.ProxySelector;
import java.net.URI;
import java.net.UnknownHostException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
import javax.net.ssl.SSLHandshakeException;
public final class RouteSelector
{
private static final int TLS_MODE_COMPATIBLE = 0;
private static final int TLS_MODE_MODERN = 1;
private static final int TLS_MODE_NULL = -1;
private final Address address;
private final Dns dns;
private final Set<Route> failedRoutes;
private boolean hasNextProxy;
private InetSocketAddress lastInetSocketAddress;
private Proxy lastProxy;
private int nextSocketAddressIndex;
private int nextTlsMode = -1;
private final ConnectionPool pool;
private final List<Route> postponedRoutes;
private final ProxySelector proxySelector;
private Iterator<Proxy> proxySelectorProxies;
private InetAddress[] socketAddresses;
private int socketPort;
private final URI uri;
private Proxy userSpecifiedProxy;
public RouteSelector(Address paramAddress, URI paramURI, ProxySelector paramProxySelector, ConnectionPool paramConnectionPool, Dns paramDns, Set<Route> paramSet)
{
this.address = paramAddress;
this.uri = paramURI;
this.proxySelector = paramProxySelector;
this.pool = paramConnectionPool;
this.dns = paramDns;
this.failedRoutes = paramSet;
this.postponedRoutes = new LinkedList();
resetNextProxy(paramURI, paramAddress.getProxy());
}
private boolean hasNextInetSocketAddress()
{
return this.socketAddresses != null;
}
private boolean hasNextPostponed()
{
return !this.postponedRoutes.isEmpty();
}
private boolean hasNextProxy()
{
return this.hasNextProxy;
}
private boolean hasNextTlsMode()
{
return this.nextTlsMode != -1;
}
private InetSocketAddress nextInetSocketAddress()
throws UnknownHostException
{
Object localObject = this.socketAddresses;
int i = this.nextSocketAddressIndex;
this.nextSocketAddressIndex = (i + 1);
localObject = new InetSocketAddress(localObject[i], this.socketPort);
if (this.nextSocketAddressIndex == this.socketAddresses.length)
{
this.socketAddresses = null;
this.nextSocketAddressIndex = 0;
}
return localObject;
}
private Route nextPostponed()
{
return (Route)this.postponedRoutes.remove(0);
}
private Proxy nextProxy()
{
if (this.userSpecifiedProxy != null)
{
this.hasNextProxy = false;
return this.userSpecifiedProxy;
}
if (this.proxySelectorProxies != null) {
while (this.proxySelectorProxies.hasNext())
{
Proxy localProxy = (Proxy)this.proxySelectorProxies.next();
if (localProxy.type() != Proxy.Type.DIRECT) {
return localProxy;
}
}
}
this.hasNextProxy = false;
return Proxy.NO_PROXY;
}
private int nextTlsMode()
{
if (this.nextTlsMode == 1)
{
this.nextTlsMode = 0;
return 1;
}
if (this.nextTlsMode == 0)
{
this.nextTlsMode = -1;
return 0;
}
throw new AssertionError();
}
private void resetNextInetSocketAddress(Proxy paramProxy)
throws UnknownHostException
{
this.socketAddresses = null;
if (paramProxy.type() == Proxy.Type.DIRECT) {
paramProxy = this.uri.getHost();
}
InetSocketAddress localInetSocketAddress;
for (this.socketPort = Util.getEffectivePort(this.uri);; this.socketPort = localInetSocketAddress.getPort())
{
this.socketAddresses = this.dns.getAllByName(paramProxy);
this.nextSocketAddressIndex = 0;
return;
paramProxy = paramProxy.address();
if (!(paramProxy instanceof InetSocketAddress)) {
throw new IllegalArgumentException("Proxy.address() is not an InetSocketAddress: " + paramProxy.getClass());
}
localInetSocketAddress = (InetSocketAddress)paramProxy;
paramProxy = localInetSocketAddress.getHostName();
}
}
private void resetNextProxy(URI paramURI, Proxy paramProxy)
{
this.hasNextProxy = true;
if (paramProxy != null) {
this.userSpecifiedProxy = paramProxy;
}
do
{
return;
paramURI = this.proxySelector.select(paramURI);
} while (paramURI == null);
this.proxySelectorProxies = paramURI.iterator();
}
private void resetNextTlsMode()
{
if (this.address.getSslSocketFactory() != null) {}
for (int i = 1;; i = 0)
{
this.nextTlsMode = i;
return;
}
}
public void connectFailed(Connection paramConnection, IOException paramIOException)
{
paramConnection = paramConnection.getRoute();
if ((paramConnection.getProxy().type() != Proxy.Type.DIRECT) && (this.proxySelector != null)) {
this.proxySelector.connectFailed(this.uri, paramConnection.getProxy().address(), paramIOException);
}
this.failedRoutes.add(paramConnection);
if (!(paramIOException instanceof SSLHandshakeException)) {
this.failedRoutes.add(paramConnection.flipTlsMode());
}
}
public boolean hasNext()
{
return (hasNextTlsMode()) || (hasNextInetSocketAddress()) || (hasNextProxy()) || (hasNextPostponed());
}
public Connection next()
throws IOException
{
boolean bool = true;
Object localObject = this.pool.get(this.address);
if (localObject != null) {
return localObject;
}
if (!hasNextTlsMode())
{
if (!hasNextInetSocketAddress())
{
if (!hasNextProxy())
{
if (!hasNextPostponed()) {
throw new NoSuchElementException();
}
return new Connection(nextPostponed());
}
this.lastProxy = nextProxy();
resetNextInetSocketAddress(this.lastProxy);
}
this.lastInetSocketAddress = nextInetSocketAddress();
resetNextTlsMode();
}
if (nextTlsMode() == 1) {}
for (;;)
{
localObject = new Route(this.address, this.lastProxy, this.lastInetSocketAddress, bool);
if (!this.failedRoutes.contains(localObject)) {
break;
}
this.postponedRoutes.add(localObject);
return next();
bool = false;
}
return new Connection((Route)localObject);
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
5102b9dddeab9bd5a5d2d4138531a9f55e8943fe | 284bca68fbdb859dda08d99f6170e60855e97070 | /Patterns/Java/src/DecoratorPatterns/Sample6/Decorator.java | ffd4a2eca4302a382197b6981bdcfb632468d1ab | [] | no_license | RHeijnen/Study | 625c135300fcb9ea1859be815baad9c62e09ae8b | 6821da33be3c17d3459740250d5e8693e4af78fa | refs/heads/master | 2021-01-20T17:54:14.493400 | 2016-07-03T14:35:03 | 2016-07-03T14:35:03 | 62,010,741 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 306 | java | package DecoratorPatterns.Sample6;
/**
* Created by Indi on 6/22/2016.
*/
public abstract class Decorator implements Shape {
protected Shape decoratedshape;
public Decorator(Shape shape){
this.decoratedshape = shape;
}
public void Draw(){
decoratedshape.Draw();
}
}
| [
"0872002@hr.nl"
] | 0872002@hr.nl |
faf98437391f4a7d5197aab58a52f6bb0eb3e8b2 | aebc64415090ab67574aea581f0935c6af7df350 | /policy-service/src/main/java/zw/co/mynhaka/policyservice/service/AccidentPlanService.java | e46bb716063a87ac9f5815e7ca1e9ad37f832861 | [] | no_license | emanyeruke/emanyeruke | 12d1828535322e8aef89c1158a8a048076e5a9ec | da5a0faef7053a3b384b1a236c71e5e7f405f8a5 | refs/heads/main | 2023-09-06T09:18:40.677758 | 2021-11-09T13:33:36 | 2021-11-09T13:33:36 | 425,185,901 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 916 | java | package zw.co.mynhaka.policyservice.service;
import zw.co.mynhaka.policyservice.domain.dto.accidentplan.AccidentPlanCreateDTO;
import zw.co.mynhaka.policyservice.domain.dto.accidentplan.AccidentPlanCreateReverse;
import zw.co.mynhaka.policyservice.domain.dto.accidentplan.AccidentPlanResultDTO;
import zw.co.mynhaka.policyservice.domain.dto.accidentplan.AccidentPlanUpdateDto;
import zw.co.mynhaka.policyservice.domain.model.AccidentPlan;
import java.util.List;
public interface AccidentPlanService {
List<AccidentPlanResultDTO> findAll();
AccidentPlanResultDTO findById(Long id);
AccidentPlanResultDTO save(AccidentPlanCreateDTO accidentProductCreateDto);
AccidentPlanResultDTO saveReverse(AccidentPlanCreateReverse accidentPlanCreateReverse);
AccidentPlanResultDTO save(AccidentPlanUpdateDto accidentProductUpdateDto);
AccidentPlan getOne(Long id);
void deleteById(Long id);
}
| [
"annettez@sonity.net"
] | annettez@sonity.net |
d95951a4d90387440f02353cfa7b5268fd59b5c8 | 265f43c557ab32cf549b165a1ad7931c0c99e085 | /app/src/main/java/com/icom/gosutv/sao/RestfulService.java | 64fa2e3f8e33cd414589125272f63722f5b32582 | [] | no_license | trungptdhcn/gosutv | a1a431995525d7c0c312103430d5ffe26f0d8eb7 | 5863351f5293d0a169d9fbf297e2552bd5f3b9a6 | refs/heads/master | 2020-05-04T23:46:57.719379 | 2015-09-28T06:20:37 | 2015-09-28T06:20:37 | 41,793,220 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 480 | java | package com.icom.gosutv.sao;
/**
* Created by Trung on 7/22/2015.
*/
public class RestfulService
{
private static RestfulServiceIn restfulServiceIn;
public static RestfulServiceIn getInstance()
{
if (restfulServiceIn != null)
{
return restfulServiceIn;
}
else
{
restfulServiceIn = RestfulAdapter.getRestAdapter().create(RestfulServiceIn.class);
return restfulServiceIn;
}
}
}
| [
"trungptdhcn@gmail.com"
] | trungptdhcn@gmail.com |
a48478e531f0fe1e038c982add456eeace4d4cc3 | b9b7fb41ee1aecb89ae45c3af39c5cd104b8ad82 | /src/test/java/com/beit/web/rest/WithUnauthenticatedMockUser.java | 55ebe348450fdf19bbf6a5d6c8cb2f4d54cd11c4 | [] | no_license | roudane1994/TestBeIt | 0bef720e48b7faa4a8f516a2236f5990305f5d50 | b3823184a5b30a5f933b98325a264a3c13dad241 | refs/heads/master | 2022-12-14T23:20:55.855264 | 2020-09-09T09:25:38 | 2020-09-09T09:25:38 | 294,055,733 | 0 | 0 | null | 2020-09-09T09:25:39 | 2020-09-09T08:49:03 | Java | UTF-8 | Java | false | false | 981 | java | package com.beit.web.rest;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.test.context.support.WithSecurityContext;
import org.springframework.security.test.context.support.WithSecurityContextFactory;
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@WithSecurityContext(factory = WithUnauthenticatedMockUser.Factory.class)
public @interface WithUnauthenticatedMockUser {
class Factory implements WithSecurityContextFactory<WithUnauthenticatedMockUser> {
@Override
public SecurityContext createSecurityContext(WithUnauthenticatedMockUser annotation) {
return SecurityContextHolder.createEmptyContext();
}
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
ede0660ccaa860edf81e458144aef365bf756f08 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/neo4j/2019/12/DynamicIntArrayTest.java | 452919e75b786cc5385f945424544752d0aa15ec | [] | 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,706 | java | /*
* Copyright (c) 2002-2019 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.internal.batchimport.cache;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class DynamicIntArrayTest
{
@Test
void shouldWorkOnSingleChunk()
{
// GIVEN
int defaultValue = 0;
IntArray array = NumberArrayFactory.AUTO_WITHOUT_PAGECACHE.newDynamicIntArray( 10, defaultValue );
array.set( 4, 5 );
// WHEN
assertEquals( 5L, array.get( 4 ) );
assertEquals( defaultValue, array.get( 12 ) );
array.set( 7, 1324 );
assertEquals( 1324L, array.get( 7 ) );
}
@Test
void shouldChunksAsNeeded()
{
// GIVEN
IntArray array = NumberArrayFactory.AUTO_WITHOUT_PAGECACHE.newDynamicIntArray( 10, 0 );
// WHEN
long index = 243;
int value = 5485748;
array.set( index, value );
// THEN
assertEquals( value, array.get( index ) );
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
a4752a24fb29d9eab510315f377fb0bb1b45f31e | 92c1674aacda6c550402a52a96281ff17cfe5cff | /module06/module163/module4/src/main/java/com/android/example/module06_module163_module4/ClassAAD.java | 4d80a35f1f6095293b6c1dbb795d57dd76ea07dd | [] | no_license | bingranl/android-benchmark-project | 2815c926df6a377895bd02ad894455c8b8c6d4d5 | 28738e2a94406bd212c5f74a79179424dd72722a | refs/heads/main | 2023-03-18T20:29:59.335650 | 2021-03-12T11:47:03 | 2021-03-12T11:47:03 | 336,009,838 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,920 | java | package com.android.example.module06_module163_module4;
public class ClassAAD {
private com.android.example.module06_module163_module1.ClassAAD instance_var_1_0 = new com.android.example.module06_module163_module1.ClassAAD();
private com.android.example.module06_module163_module1.ClassAAE instance_var_1_1 = new com.android.example.module06_module163_module1.ClassAAE();
private com.android.example.module06_module163_module5.ClassAAB instance_var_1_2 = new com.android.example.module06_module163_module5.ClassAAB();
private com.android.example.module06_module163_module5.ClassAAH instance_var_1_3 = new com.android.example.module06_module163_module5.ClassAAH();
public void method0(
com.android.example.module06_module163_module5.ClassAAB param0,
com.android.example.module06_module163_module5.ClassAAC param1,
com.android.example.module06_module163_module1.ClassAAH param2) throws Throwable {
com.android.example.module06_module342_module3.ClassAAD local_var_2_3 = new com.android.example.module06_module342_module3.ClassAAD();
local_var_2_3.method0("SomeString", "SomeString", "SomeString", "SomeString");
}
public void method1(
com.android.example.module06_module163_module5.ClassAAG param0) throws Throwable {
param0.method0(new com.android.example.module06_module342_module3.ClassAAG());
com.android.example.module06_module342_module3.ClassAAB local_var_2_1 = new com.android.example.module06_module342_module3.ClassAAB();
local_var_2_1.method0("SomeString", "SomeString", "SomeString", "SomeString");
}
public void method2(
com.android.example.module06_module163_module1.ClassAAC param0) throws Throwable {
param0.method3(new com.android.example.module06_module163_module5.ClassAAD(), new com.android.example.module06_module163_module5.ClassAAB(), new com.android.example.module06_module163_module5.ClassAAJ());
com.android.example.module06_module342_module3.ClassAAE local_var_2_1 = new com.android.example.module06_module342_module3.ClassAAE();
local_var_2_1.method4("SomeString", "SomeString", "SomeString");
}
public void method3(
com.android.example.module06_module163_module1.ClassAAD param0) throws Throwable {
com.android.example.module06_module342_module3.ClassAAB local_var_2_1 = new com.android.example.module06_module342_module3.ClassAAB();
local_var_2_1.method2("SomeString", "SomeString");
com.android.example.module06_module342_module3.ClassAAC local_var_2_2 = new com.android.example.module06_module342_module3.ClassAAC();
local_var_2_2.method3("SomeString");
com.android.example.module06_module342_module3.ClassAAF local_var_2_3 = new com.android.example.module06_module342_module3.ClassAAF();
local_var_2_3.method0("SomeString", "SomeString");
}
public void method4(
com.android.example.module06_module163_module1.ClassAAI param0,
com.android.example.module06_module163_module5.ClassAAC param1) throws Throwable {
}
}
| [
"bingran@google.com"
] | bingran@google.com |
0f7aca0360663979b481dd7de17bf4499e152bcf | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/19/19_6752c041886997d10a842464feb5a79502a8c59f/SpawnProcesses/19_6752c041886997d10a842464feb5a79502a8c59f_SpawnProcesses_s.java | 23dbefb206e4c3f425a9d116a57f73e4ec06dc13 | [] | 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,741 | java | /*
* Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
*
* 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.axemblr.provisionr.sample.multiinstance;
import com.google.common.collect.ImmutableMap;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.activiti.engine.runtime.ProcessInstance;
public class SpawnProcesses implements JavaDelegate {
public static AtomicReference<RuntimeService> runtimeService = new AtomicReference<RuntimeService>();
@Override
public void execute(DelegateExecution execution) throws Exception {
@SuppressWarnings("unchecked")
List<String> people = (List<String>) execution.getVariable("people");
for (String person : people) {
ProcessInstance instance = runtimeService.get().startProcessInstanceByKey("helloDude",
ImmutableMap.<String, Object>of("singlePerson", person));
System.out.println("Started process with ID " + instance.getId() + " for person " + person);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
75087a888e0095c345de1747ba81c377aa885492 | 2efe04af81ebd7138cf85ebbd4f9ab12c1384817 | /orm/test/runtime/org.jboss.tools.hibernate.runtime.v_4_3.test/src/org/jboss/tools/hibernate/runtime/v_4_3/internal/EnvironmentFacadeTest.java | 784f92fcb98a70d81efd41d8fedeefcca2a613eb | [] | no_license | hbakir/jbosstools-hibernate | c1c25956f5c734b6249d1ad2fedb0c4804c4947a | 03efa0368d5705c814c4bdcc5f47bc6f9543140f | refs/heads/master | 2023-08-11T03:45:34.260544 | 2021-09-22T13:57:04 | 2021-09-22T13:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,441 | java | package org.jboss.tools.hibernate.runtime.v_4_3.internal;
import org.hibernate.cfg.Environment;
import org.jboss.tools.hibernate.runtime.common.IFacadeFactory;
import org.jboss.tools.hibernate.runtime.spi.IEnvironment;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class EnvironmentFacadeTest {
private static final IFacadeFactory FACADE_FACTORY = new FacadeFactoryImpl();
private IEnvironment environmentFacade = null;
@Before
public void setUp() throws Exception {
environmentFacade = new EnvironmentFacadeImpl(FACADE_FACTORY);
}
@Test
public void testGetTransactionManagerStrategy() {
Assert.assertEquals(
"hibernate.transaction.manager_lookup_class",
environmentFacade.getTransactionManagerStrategy());
}
@Test
public void testGetDriver() {
Assert.assertEquals(
Environment.DRIVER,
environmentFacade.getDriver());
}
@Test
public void testGetHBM2DDLAuto() {
Assert.assertEquals(
Environment.HBM2DDL_AUTO,
environmentFacade.getHBM2DDLAuto());
}
@Test
public void testGetDialect() {
Assert.assertEquals(
Environment.DIALECT,
environmentFacade.getDialect());
}
@Test
public void testGetDataSource() {
Assert.assertEquals(
Environment.DATASOURCE,
environmentFacade.getDataSource());
}
@Test
public void testGetConnectionProvider() {
Assert.assertEquals(
Environment.CONNECTION_PROVIDER,
environmentFacade.getConnectionProvider());
}
@Test
public void testGetURL() {
Assert.assertEquals(
Environment.URL,
environmentFacade.getURL());
}
@Test
public void testGetUser() {
Assert.assertEquals(
Environment.USER,
environmentFacade.getUser());
}
@Test
public void testGetPass() {
Assert.assertEquals(
Environment.PASS,
environmentFacade.getPass());
}
@Test
public void testGetSessionFactoryName() {
Assert.assertEquals(
Environment.SESSION_FACTORY_NAME,
environmentFacade.getSessionFactoryName());
}
@Test
public void testGetDefaultCatalog() {
Assert.assertEquals(
Environment.DEFAULT_CATALOG,
environmentFacade.getDefaultCatalog());
}
@Test
public void testGetDefaultSchema() {
Assert.assertEquals(
Environment.DEFAULT_SCHEMA,
environmentFacade.getDefaultSchema());
}
@Test
public void testWrappedClass() {
Assert.assertSame(
Environment.class,
environmentFacade.getWrappedClass());
}
}
| [
"koen.aers@gmail.com"
] | koen.aers@gmail.com |
162761c869341b453df97761e77e9038c008bb8d | 3441de0b93c9bc4dc40e1a46abd7d36cafe51c2d | /paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/model/enums/UacUserTokenStatusEnum.java | 3699f25f84574c3efb39ca5e972792bffdfb4b97 | [] | no_license | XinxiJiang/passcloud-master | 23baeb1c4360432585c07e49e7e2366dc2955398 | 212c2d7c2c173a788445c21de4775c4792a11242 | refs/heads/master | 2023-04-11T21:31:27.208057 | 2018-12-11T04:42:18 | 2018-12-11T04:44:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,485 | java | package com.paascloud.provider.model.enums;
import com.google.common.collect.Lists;
import java.util.List;
/**
* The enum Uac user token status enum.
*
* @author liyuzhang
*/
public enum UacUserTokenStatusEnum {
/**
* 启用
*/
ON_LINE(0, "在线"),
/**
* 已刷新
*/
ON_REFRESH(10, "已刷新"),
/**
* 离线
*/
OFF_LINE(20, "离线");
/**
* The Status.
*/
int status;
/**
* The Value.
*/
String value;
/**
* Gets name.
*
* @param status the status
*
* @return the name
*/
public static String getName(int status) {
for (UacUserTokenStatusEnum ele : UacUserTokenStatusEnum.values()) {
if (status == ele.getStatus()) {
return ele.getValue();
}
}
return null;
}
UacUserTokenStatusEnum(int status, String value) {
this.status = status;
this.value = value;
}
/**
* Gets status.
*
* @return the status
*/
public int getStatus() {
return status;
}
/**
* Gets value.
*
* @return the value
*/
public String getValue() {
return value;
}
private static List<Integer> getStatusList() {
List<Integer> list = Lists.newArrayList();
for (UacUserTokenStatusEnum ele : UacUserTokenStatusEnum.values()) {
list.add(ele.getStatus());
}
return list;
}
/**
* Contains boolean.
*
* @param status the status
*
* @return the boolean
*/
public static boolean contains(Integer status) {
List<Integer> statusList = getStatusList();
return statusList.contains(status);
}
} | [
"35205889+mliyz@users.noreply.github.com"
] | 35205889+mliyz@users.noreply.github.com |
096cf19a85632b102d1e315a27b065aba5920ff5 | 854d06932d1ad8b6f58f03a1a3fae2b6e30594a0 | /DuvidaDaoComposicao/src/dao/insercao/DaoInsercaoMySql.java | 8904679d8c2948f83bc3d92f413b1c7c051dc805 | [] | no_license | viniciusdenovaes/Unip202ALPOOdiurno | baf5a82f2fbcf01a1853882aed77f43ad55f2ec6 | 723378d60193f1c4755f308acf6c554d4d3e54d7 | refs/heads/master | 2023-01-09T14:01:33.244900 | 2020-11-06T12:49:48 | 2020-11-06T12:49:48 | 288,170,869 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 199 | java | package dao.insercao;
import entidade.Livro;
public class DaoInsercaoMySql implements DaoInsercao{
@Override
public void insereLivro(Livro livro) {
// TODO Auto-generated method stub
}
}
| [
"viniciusdenovaes@gmail.com"
] | viniciusdenovaes@gmail.com |
5bef2709a2fcc18125743de22169d523ec8fedf6 | a8fa66e479705e114b36a21d9e1623b276714fe3 | /springboot-food/src/main/java/com/song/springboot/food/mapper/OrderMapper.java | 471483492415bd5165c8da3b11e467d8ae0f99ab | [] | no_license | songshengping/springboot-dianping | 22e7c4684eb46e9ee076528432a8aaf3f3e8a07a | 63359293a3bd6eb61b51252865b9ecfd4040cd58 | refs/heads/master | 2023-01-30T16:02:28.351347 | 2020-12-15T15:09:16 | 2020-12-15T15:09:16 | 293,186,536 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 369 | java | package com.song.springboot.food.mapper;
import com.song.springboot.food.model.Order;
public interface OrderMapper {
int deleteByPrimaryKey(Integer id);
int insert(Order record);
int insertSelective(Order record);
Order selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Order record);
int updateByPrimaryKey(Order record);
} | [
"="
] | = |
9f1fac3dc5698dc88ab4ebb9a93f6ac853961e13 | aed0236a359c0a603566cf56ba7dca975eba2311 | /dop/group-15/release-4/date-repeat/src/reminder/daterepeat/util/Patterns.java | 730c029d4451ca5ee60a9438b0bc7cf53313d187 | [] | no_license | Reminder-App/reminder-tests | e1fde7bbd262e1e6161b979a2a69f9af62cc06d7 | 8497ac2317f174eb229fb85ae66f1086ce0e0e4d | refs/heads/master | 2020-03-21T05:43:08.928315 | 2018-07-01T20:16:09 | 2018-07-01T20:16:09 | 138,175,840 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 396 | java | package reminder.daterepeat.util;
/*** added by dManageReminder
*/
public class Patterns {
public static final String TEXT_PATTERN =
"[^.!?\\s][^.!?]*(?:[.!?](?![']?\\s|$)[^.!?]*)*[.!?]?[']?(?=\\s|$)";
public static final String DATE_PATTERN =
"(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\d\\d";
public static final String HOUR_PATTERN = "([01]?[0-9]|2[0-3]):[0-5][0-9]";
} | [
"leomarcamargodesouza@gmail.com"
] | leomarcamargodesouza@gmail.com |
d91f831b0a53de3ae6904d067dd4da27aaa35ec2 | d31e9bc9b78f6ec36ec23779276e9365aa2b52e1 | /zhy-frame-test/zhy-frame-test-jmh/src/test/java/com/zhy/frame/test/jmh/test/SecondBenchmark.java | 6f2a99b9b9ea27e34dc00e1402e32ce7f0b2ff1d | [] | no_license | radtek/zhy-frame-parent | f5f04b1392f1429a079281336d266692645aa2f5 | 05d5a0bb64fec915e027078313163822d849476c | refs/heads/master | 2022-12-27T22:27:12.682705 | 2020-07-27T02:58:46 | 2020-07-27T02:58:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,827 | java | package com.zhy.frame.test.jmh.test;/**
* 描述:
* 包名:com.zhy.frame.test.jmh.test
* 版本信息: 版本1.0
* 日期:2020/5/21
* Copyright XXXXXX科技有限公司
*/
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
/**
* @describe:
* @author: lvmoney/XXXXXX科技有限公司
* @version:v1.0 2020/5/21 21:23
*/
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@State(Scope.Benchmark)
public class SecondBenchmark {
@Param({"10000", "100000", "1000000"})
private int length;
private int[] numbers;
private Calculator singleThreadCalc;
private Calculator multiThreadCalc;
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
.include(SecondBenchmark.class.getSimpleName())
.forks(2)
.warmupIterations(5)
.measurementIterations(5)
.build();
new Runner(opt).run();
}
@Benchmark
public long singleThreadBench() {
return singleThreadCalc.sum(numbers);
}
@Benchmark
public long multiThreadBench() {
return multiThreadCalc.sum(numbers);
}
@Setup
public void prepare() {
numbers = IntStream.rangeClosed(1, length).toArray();
singleThreadCalc = new SinglethreadCalculator();
multiThreadCalc = new MultithreadCalculator(Runtime.getRuntime().availableProcessors());
}
@TearDown
public void shutdown() {
singleThreadCalc.shutdown();
multiThreadCalc.shutdown();
}
}
| [
"xmangl1990728"
] | xmangl1990728 |
5150e6435a38f3ee5156875bb7363804d26f876c | cd50bc86e9330b126a93c85b98d6f46eeb421ca9 | /src/main/java/act/util/$$.java | 52110d8b74bb086c7d19eeb3355c2e3a949c0ee9 | [
"Apache-2.0",
"ISC",
"MIT"
] | permissive | d1jk/actframework | de0d6f580e7dbbf2ead01f77d72c190b48aaa154 | cb8d63af714246dafd7aed20ede651e0aaa48b22 | refs/heads/master | 2020-09-22T20:12:07.250163 | 2019-11-24T00:32:34 | 2019-11-24T00:32:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,790 | java | package act.util;
/*-
* #%L
* ACT Framework
* %%
* Copyright (C) 2014 - 2018 ActFramework
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import act.Act;
import act.data.*;
import com.alibaba.fastjson.JSON;
import org.joda.time.*;
import org.osgl.$;
import org.osgl.inject.BeanSpec;
import org.osgl.util.*;
import java.sql.Time;
import java.util.*;
/**
* An extension to osgl $ class
*/
public class $$ {
private static Set<Class> dateTimeTypes = $.cast(C.set(Date.class, java.sql.Date.class, DateTime.class, LocalDate.class, LocalTime.class, LocalDateTime.class, Time.class));
private static Map<Class, ValueObject.Codec> codecs = $.cast(C.Map(
DateTime.class, Act.getInstance(JodaDateTimeCodec.class),
LocalDateTime.class, Act.getInstance(JodaLocalDateTimeCodec.class),
LocalDate.class, Act.getInstance(JodaLocalDateCodec.class),
LocalTime.class, Act.getInstance(JodaLocalTimeCodec.class)
));
public static boolean isDateTimeType(Class<?> type) {
return dateTimeTypes.contains(type);
}
static {
StringUtils.evaluator = new $.Transformer<String, String>() {
@Override
public String transform(String s) {
return S.string(Act.appConfig().getIgnoreCase(s));
}
};
}
public static String toString(Object v, boolean directToString) {
if (directToString) {
ValueObject.Codec codec = codecs.get(v.getClass());
return null == codec ? v.toString() : codec.toString(v);
}
return JSON.toJSONString(v);
}
public static String toString(Object v) {
if (null == v) {
return "";
}
Class<?> c = v.getClass();
return toString(v, shouldUseToString(c));
}
public static boolean shouldUseToString(Class<?> type) {
return ($.isSimpleType(type) && !type.isArray()) || isDateTimeType(type);
}
public static String processStringSubstitution(String s) {
return StringUtils.processStringSubstitution(s);
}
public static String processStringSubstitution(String s, $.Func1<String, String> evaluator) {
return StringUtils.processStringSubstitution(s, evaluator);
}
}
| [
"greenlaw110@gmail.com"
] | greenlaw110@gmail.com |
12fcdee4e8573ba937edbeeb96ee8e55fd460b86 | 6ad215d36c1a1e2e14ec5dc2023cf43227134ab9 | /src/day53_Polymorphism/WebDriverTask/WebDriver.java | 7d0c08997e4f9d97332a35c4db57c468130b65f1 | [] | no_license | KseniiaMazanko/JavaProgramming_B23 | 839f3504b808bb0510c70f1ac041c0650d566b1d | ef3862ba8a40bae90545d1cfe3564ebc822ea4e5 | refs/heads/master | 2023-08-16T04:31:36.981801 | 2021-09-30T22:59:19 | 2021-09-30T22:59:19 | 387,605,760 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 436 | java | package day53_Polymorphism.WebDriverTask;
public interface WebDriver {
/*
1. Create an interface named WebDriver
abstract methods:
get(String url);
findElement(String locator);
getTitle();
quit();
*/
public abstract void get(String url);//public and abstract are keywords that given by default
public void findElement(String locator);
public void getTitle();
public void quit();
}
| [
"ksmazanko@gmail.com"
] | ksmazanko@gmail.com |
d93be510564216cb81c473d0c902f04f6303727f | 0ece1d19765c9e7b322972c427861ea4fad516bd | /imsdk/src/main/java/com/qunar/im/ui/presenter/IShowBuddyRequestPresenter.java | f3987e1451352d97b7206ac589a11e33d821e7fb | [
"MIT"
] | permissive | froyomu/imsdk-android | ef9c8308dcf8fe9e9983b384f6bbe0b0519c8036 | a800f75dc6653eeb932346f6c083f1c547ebd876 | refs/heads/master | 2020-04-11T06:42:15.067453 | 2019-09-25T05:32:32 | 2019-09-25T05:32:32 | 161,588,802 | 0 | 0 | MIT | 2018-12-13T05:33:02 | 2018-12-13T05:33:02 | null | UTF-8 | Java | false | false | 375 | java | package com.qunar.im.ui.presenter;
import com.qunar.im.ui.presenter.views.IAnswerForResultView;
/**
* Created by saber on 15-12-9.
*/
public interface IShowBuddyRequestPresenter {
void initFriendRequestPropmt();
void listBuddyRequests();
void deleteBuddyRequests();
void clearBuddyRequests();
void setAnswerForResultView(IAnswerForResultView view);
}
| [
"lihaibin.li@qunar.com"
] | lihaibin.li@qunar.com |
58860f6df08922ab9427c1e0abb43ae533e48672 | 6f60c52828a9e7251021babbe8454621ff2cd7ff | /app/src/main/java/com/htcompany/educationerpforgansu/workpart/activitys/MyLeaveApplyActivity.java | e8dd3a302c4272769efbb519f9a9ac8b48ea1395 | [] | no_license | liuhui-huatang/EducationERP | f193e41ec30491521b6ede08ef42f6f7e04447d3 | 894d27ef6ee13b817ade2e21c21b7794fb67cc70 | refs/heads/master | 2020-03-27T08:25:51.204410 | 2018-08-21T12:11:08 | 2018-08-21T12:11:08 | 146,253,621 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,725 | java | package com.htcompany.educationerpforgansu.workpart.activitys;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.htcompany.educationerpforgansu.R;
import com.htcompany.educationerpforgansu.commonpart.BaseActivity;
import com.htcompany.educationerpforgansu.commonpart.tools.ToastUtil;
import com.htcompany.educationerpforgansu.commonpart.views.WaitDialog;
import com.htcompany.educationerpforgansu.commonpart.views.xListView.XListView;
import com.htcompany.educationerpforgansu.internet.workgrzx.WokrpersonalInternet;
import com.htcompany.educationerpforgansu.internet.workgrzx.WokrpersonalPersener;
import com.htcompany.educationerpforgansu.workpart.adapters.MyleaveApplyAdapter;
import com.htcompany.educationerpforgansu.workpart.entities.MyLeaveApplyEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 请假申请
* Created wrb wrb on 2016/11/10.
*/
public class MyLeaveApplyActivity extends BaseActivity implements View.OnClickListener,XListView.IXListViewListener{
private TextView title,rightthree_btn_tv;
private RelativeLayout reback_btn,right_three_btn;
private XListView myleaveapply_lv;
private ImageView myleaveapply_wsj_img;
private MyleaveApplyAdapter myleaveApplyAdapter;
private List<MyLeaveApplyEntity> myLeaveApplyEntities;
//网络请求类
private WokrpersonalInternet wokrpersonalInternet;
private WokrpersonalPersener wokrpersonalPersener;
private WaitDialog waitDialog;
private int pageNum=1;//页数
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.myleaveapply_activity);
initDatas();
initViews();
initViewValues();
initOnclicEvents();
}
public void initDatas(){
myLeaveApplyEntities = new ArrayList<MyLeaveApplyEntity>();
wokrpersonalInternet = new WokrpersonalInternet(this,myHandler);
wokrpersonalPersener = new WokrpersonalPersener(this);
waitDialog = new WaitDialog(this,"");
waitDialog.show();
wokrpersonalInternet.getMyLeaveApplyList_Datas(String.valueOf(pageNum));
}
public void initViews(){
title = (TextView)this.findViewById(R.id.title);
reback_btn = (RelativeLayout)this.findViewById(R.id.reback_btn);
right_three_btn = (RelativeLayout)this.findViewById(R.id.right_three_btn);
rightthree_btn_tv = (TextView)this.findViewById(R.id.rightthree_btn_tv);
myleaveapply_wsj_img=(ImageView)this.findViewById(R.id.myleaveapply_wsj_img);
myleaveapply_lv = (XListView)this.findViewById(R.id.myleaveapply_lv);
myleaveapply_lv.setPullRefreshEnable(true);
myleaveapply_lv.setPullLoadEnable(false);
myleaveapply_lv.setXListViewListener(this);
myleaveApplyAdapter = new MyleaveApplyAdapter(this,myLeaveApplyEntities);
myleaveapply_lv.setAdapter(myleaveApplyAdapter);
}
public void initViewValues(){
title.setText("请假申请");
right_three_btn.setVisibility(View.VISIBLE);
rightthree_btn_tv.setText("申请");
}
public void initOnclicEvents(){
right_three_btn.setOnClickListener(this);
reback_btn.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.reback_btn:
this.finish();
break;
case R.id.right_three_btn:
Intent intent = new Intent(MyLeaveApplyActivity.this,MyLeaveApplyAddActivity.class);
startActivityForResult(intent,100);
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (resultCode){
case 100:
if(data!=null) {
pageNum=1;
wokrpersonalInternet.getMyLeaveApplyList_Datas(String.valueOf(pageNum));
}
break;
}
}
public Handler myHandler = new Handler(){
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
switch (msg.what){
case 400:
if(waitDialog!=null){
waitDialog.dismiss();
}
ToastUtil.showToast("连接超时",MyLeaveApplyActivity.this);
break;
case 200:
if(waitDialog!=null){
waitDialog.dismiss();
}
List<MyLeaveApplyEntity> datas = wokrpersonalPersener.parseMyLeaveApply_ListData((String)msg.obj);
if(datas!=null&&datas.size()>0){
setLVDatas(datas);
}else{
myleaveapply_lv.setPullLoadEnable(false);
stopListView();
if(myLeaveApplyEntities.size()==0){
myleaveapply_wsj_img.setVisibility(View.VISIBLE);
}
}
break;
case 300:
if(waitDialog!=null){
waitDialog.dismiss();
}
ToastUtil.showToast("数据异常",MyLeaveApplyActivity.this);
break;
}
}
};
/**
* 更新列表数据
* @param datas
*/
public void setLVDatas(List<MyLeaveApplyEntity> datas){
if(pageNum==1){
if(myLeaveApplyEntities.size()>0){
myLeaveApplyEntities.clear();
}
}
if(datas.size()>0){
myleaveapply_lv.setPullLoadEnable(true);
}
for(MyLeaveApplyEntity entity:datas){
myLeaveApplyEntities.add(entity);
}
myleaveApplyAdapter.notifyDataSetChanged();
stopListView();
}
@Override
public void onRefresh() {
pageNum=1;
wokrpersonalInternet.getMyLeaveApplyList_Datas(String.valueOf(pageNum));
}
@Override
public void onLoadMore() {
pageNum++;
wokrpersonalInternet.getMyLeaveApplyList_Datas(String.valueOf(pageNum));
}
/**
* 停止列表刷新
*/
public void stopListView() {
myleaveapply_lv.stopRefresh();
myleaveapply_lv.stopLoadMore();
myleaveapply_lv.setRefreshTime("刚刚");
}
}
| [
"liuhui@huatangjt.com"
] | liuhui@huatangjt.com |
2405331d12c267aad750d2314e4cfdfbdb5ab0ab | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/TIME-18b-3-20-Single_Objective_GGA-WeightedSum/org/joda/time/chrono/BasicChronology_ESTest.java | b5443c61f2bf66615e7eaa73d84d75a80ec1370d | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 557 | java | /*
* This file was automatically generated by EvoSuite
* Sat Jan 18 00:01:19 UTC 2020
*/
package org.joda.time.chrono;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class BasicChronology_ESTest extends BasicChronology_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
45322a733fdf0b841feb8cec01d6e9e01cda9064 | 9b01ffa3db998c4bca312fd28aa977f370c212e4 | /app/src/streamD/java/com/loki/singlemoduleapp/stub/SampleClass7894.java | 56d26d6345ac1099a7588085ff6996778fe6babf | [] | no_license | SergiiGrechukha/SingleModuleApp | 932488a197cb0936785caf0e73f592ceaa842f46 | b7fefea9f83fd55dbbb96b506c931cc530a4818a | refs/heads/master | 2022-05-13T17:15:21.445747 | 2017-07-30T09:55:36 | 2017-07-30T09:56:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 281 | java | package com.loki.singlemoduleapp.stub;
public class SampleClass7894 {
private SampleClass7895 sampleClass;
public SampleClass7894(){
sampleClass = new SampleClass7895();
}
public String getClassName() {
return sampleClass.getClassName();
}
} | [
"sergey.grechukha@gmail.com"
] | sergey.grechukha@gmail.com |
7fba9772cc30a69491f97b8814bbd3e82ecc97ff | 8e8c015a18eefc906e92e92dd2ccafa607165fbd | /api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/model/core/config/cloud/SpringCloudConfigurationProperties.java | 6100bb79ab476b934ea71cafb70f577eb3c71689 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-free-unknown"
] | permissive | hxiangli/cas | 6e26d2cc3d92d183f592382a214951c78f17f77f | 31aeeec9033b98685d52b34249b101f9d13ee6be | refs/heads/master | 2022-04-04T03:49:26.953386 | 2020-02-09T20:05:22 | 2020-02-09T20:05:22 | 239,459,364 | 1 | 0 | Apache-2.0 | 2020-02-10T08:12:22 | 2020-02-10T08:12:22 | null | UTF-8 | Java | false | false | 4,262 | java | package org.apereo.cas.configuration.model.core.config.cloud;
import org.apereo.cas.configuration.model.support.aws.BaseAmazonWebServicesProperties;
import org.apereo.cas.configuration.model.support.dynamodb.AbstractDynamoDbProperties;
import org.apereo.cas.configuration.support.RequiredProperty;
import org.apereo.cas.configuration.support.RequiresModule;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
/**
* This is {@link SpringCloudConfigurationProperties}. This class is only designed here
* to allow the configuration binding logic to recognize the settings. In actuality, the fields
* listed here are not used directly as they are directly accessed and fetched via the runtime
* environment to bootstrap cas settings in form of a property source locator, etc.
*
* @author Misagh Moayyed
* @since 5.3.0
*/
@Getter
@Setter
public class SpringCloudConfigurationProperties implements Serializable {
private static final long serialVersionUID = -2749293768878152908L;
/**
* Config config settings.
*/
private Cloud cloud = new Cloud();
@Getter
@Setter
public static class Cloud implements Serializable {
private static final long serialVersionUID = -6326706651416825269L;
/**
* MongoDb config settings.
*/
private MongoDb mongo = new MongoDb();
/**
* Jdbc config settings.
*/
private Jdbc jdbc = new Jdbc();
/**
* AWS config settings.
*/
private AmazonWebServicesConfiguration aws = new AmazonWebServicesConfiguration();
/**
* AWS DynamoDb config settings.
*/
private AmazonDynamoDb dynamoDb = new AmazonDynamoDb();
}
@RequiresModule(name = "cas-server-support-configuration-cloud-mongo")
@Getter
@Setter
public static class MongoDb implements Serializable {
private static final long serialVersionUID = -6509143371334754469L;
/**
* Mongodb URI.
*/
@RequiredProperty
private String uri;
}
@RequiresModule(name = "cas-server-support-configuration-cloud-jdbc")
@Getter
@Setter
public static class Jdbc implements Serializable {
private static final long serialVersionUID = -7575240387340025345L;
/**
* SQL statement.
*/
private String sql;
/**
* Database url.
*/
private String url;
/**
* Database user.
*/
private String user;
/**
* Database password.
*/
private String password;
/**
* Driver class name.
*/
private String driverClass;
}
@RequiresModule(name = "cas-server-support-aws")
@Getter
@Setter
public static class AmazonWebServicesConfiguration implements Serializable {
private static final long serialVersionUID = -124404249388429120L;
/**
* AWS secrets manager settings.
*/
private AmazonSecretsManager secretsManager = new AmazonSecretsManager();
/**
* AWS dynamo db settings.
*/
private AmazonDynamoDb dynamoDb = new AmazonDynamoDb();
/**
* AWS S3 settings.
*/
private AmazonS3 s3 = new AmazonS3();
}
@RequiresModule(name = "cas-server-support-configuration-cloud-aws-secretsmanager")
@Getter
@Setter
public static class AmazonSecretsManager extends BaseAmazonWebServicesProperties {
private static final long serialVersionUID = -124404249387429120L;
}
@RequiresModule(name = "cas-server-support-configuration-cloud-aws-s3")
@Getter
@Setter
public static class AmazonS3 extends BaseAmazonWebServicesProperties {
private static final long serialVersionUID = -124404249387429120L;
/**
* Bucket name that holds the settings.
*/
private String bucketName;
}
@RequiresModule(name = "cas-server-support-configuration-cloud-dynamodb")
@Getter
@Setter
public static class AmazonDynamoDb extends AbstractDynamoDbProperties {
private static final long serialVersionUID = -123404249388429120L;
}
}
| [
"mm1844@gmail.com"
] | mm1844@gmail.com |
0f60906daac73bcc2c6e2e76c4ca43bea3146d82 | d74a7ac4b88aa2cc3bb06cec898a462312ae2759 | /src/main/java/com/cczu/model/zdwxyssjc/service/MonitorEdmsummaryService.java | d1e1ee07ea4eedbb8b57c51e375368aa6dfb2171 | [] | no_license | wuyufei2019/test110 | 74dbfd15af2dfd72640032a8207f7ad5aa5da604 | 8a8621370eb92e6071f517dbcae9d483ccc4db36 | refs/heads/master | 2022-12-21T12:28:37.800274 | 2019-11-18T08:33:53 | 2019-11-18T08:33:53 | 222,402,348 | 0 | 0 | null | 2022-12-16T05:03:11 | 2019-11-18T08:45:49 | Java | UTF-8 | Java | false | false | 3,709 | java | package com.cczu.model.zdwxyssjc.service;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import com.cczu.model.dao.IBisQyjbxxDao;
import com.cczu.model.entity.BIS_EnterpriseEntity;
import com.cczu.model.zdwxyssjc.dao.MonitorEdmsummaryDao;
import com.cczu.model.zdwxyssjc.entity.Main_SignalEdmsummaryEntity;
import com.cczu.sys.comm.mapper.JsonMapper;
import com.cczu.sys.comm.utils.StringUtils;
/**
* 在岗人员实时汇总Service
*/
@Service("MonitorEdmsummaryService")
public class MonitorEdmsummaryService {
@Resource
private MonitorEdmsummaryDao monitorEdmsummaryDao;
@Resource
private IBisQyjbxxDao bisQyjbxxDao;
public void save(Main_SignalEdmsummaryEntity entity){
monitorEdmsummaryDao.save(entity);
}
public String add(HttpServletRequest request) {
String code = "200";// 返回码: 数据保存成功
String status = "success";
try {
String data = request.getParameter("data");
List<Map<String, Object>> dataList = JsonMapper.getInstance().fromJson(data, List.class);
if (dataList != null && dataList.size() > 0) {// 如果data是数组
for (Map<String, Object> dataMap : dataList) {
addInfo(dataMap);
}
} else {
Map<String, Object> dataMap = (Map<String, Object>) JsonMapper.fromJsonString(data, Map.class);
if (dataMap != null) {// 如果data是单条数据
addInfo(dataMap);
}
}
} catch (Exception e) {
code = "205";// 返回码: 系统异常
status = "fail";
}
Map<String, Object> result = new HashMap<>();
result.put("code", code);
result.put("status", status);
return JsonMapper.toJsonString(result);
}
/**
* 添加数据
* @param dataMap
*/
public void addInfo(Map<String, Object> dataMap) {
Long qyid = null;
String qyname = "";
String qycode = "";
if(!(dataMap.get("qyname") == null || dataMap.get("qyname").toString() == "")){
qyname = dataMap.get("qyname").toString();// 企业名称
Map<String, Object> map = new HashMap<>();
map.put("equalqynm", qyname);
List<BIS_EnterpriseEntity> list = bisQyjbxxDao.findAlllist(map);
if(list.size()>0){
qyid = list.get(0).getID();
}
}
if(qyid == null){
if(!(dataMap.get("qycode") == null || dataMap.get("qycode").toString() == "")){
qycode = dataMap.get("qycode").toString();// 企业代码
Map<String, Object> map = new HashMap<>();
map.put("equalqycode", qycode);
List<BIS_EnterpriseEntity> list = bisQyjbxxDao.findAlllist(map);
if(list.size()>0){
qyid = list.get(0).getID();
}
}
}
if(qyid != null){
String bmname = dataMap.get("bmname") == null || dataMap.get("bmname") == "" ? "" : dataMap.get("bmname").toString();// 部门名称
String ryzs = dataMap.get("ryzs") == null || dataMap.get("ryzs") == "" ? "" : dataMap.get("ryzs").toString();// 人员总数
String updatetime = dataMap.get("updatetime") == null || dataMap.get("updatetime") == "" ? "" : dataMap.get("updatetime").toString();// 更新时间
try {
Main_SignalEdmsummaryEntity entity = new Main_SignalEdmsummaryEntity();
entity.setQyid(qyid);
entity.setBmname(bmname);
entity.setRyzs(StringUtils.isBlank(ryzs) ? 0 : Integer.parseInt(ryzs));// 人员总数
if (StringUtils.isNotBlank(updatetime)) {
Long time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(updatetime).getTime();
entity.setUpdatetime(new Timestamp(time));
}
entity.setIsupload(0);
monitorEdmsummaryDao.save(entity);
} catch (Exception e) {
}
}
}
}
| [
"wuyufei2019@sina.com"
] | wuyufei2019@sina.com |
c0d71da3c8bfde34312419bf7229f1d410d6c06b | d75304765acdcf86ebd52785d90e19985408c1ce | /src/main/java/com/tale/service/impl/MetasServiceImpl.java | ecf21c30c52159747bfb69768669edd6be6f94dc | [
"MIT"
] | permissive | Vitojc/tale | abf11b62036c34730ebff00e2ea385d428c56f91 | cb2d20be7aa5e3fcea347d2daec5b617f890ebbe | refs/heads/master | 2021-01-21T05:13:35.307199 | 2017-02-25T17:14:15 | 2017-02-25T17:14:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,918 | java | package com.tale.service.impl;
import com.blade.ioc.annotation.Inject;
import com.blade.ioc.annotation.Service;
import com.blade.jdbc.ActiveRecord;
import com.blade.jdbc.core.Take;
import com.blade.kit.StringKit;
import com.tale.dto.MetaDto;
import com.tale.dto.Types;
import com.tale.exception.TipException;
import com.tale.model.Contents;
import com.tale.model.Metas;
import com.tale.model.Relationships;
import com.tale.service.MetasService;
import com.tale.utils.TaleUtils;
import java.util.List;
@Service
public class MetasServiceImpl implements MetasService {
@Inject
private ActiveRecord activeRecord;
@Override
public List<Metas> getMetas(String types) {
if (StringKit.isNotBlank(types)) {
return activeRecord.list(new Take(Metas.class).eq("type", types).orderby("sort desc, mid desc"));
}
return null;
}
@Override
public List<MetaDto> getMetaList(String types) {
if (StringKit.isNotBlank(types)) {
String sql = "select a.*, count(b.cid) as count from t_metas a left join `t_relationships` b on a.mid = b.mid " +
"where a.type = ? group by a.mid";
return activeRecord.list(MetaDto.class, sql, types);
}
return null;
}
@Override
public MetaDto getMeta(String type, String name) {
if (StringKit.isNotBlank(type) && StringKit.isNotBlank(name)) {
String sql = "select a.*, count(b.cid) as count from t_metas a left join `t_relationships` b on a.mid = b.mid " +
"where a.type = ? and a.name = ? group by a.mid";
return activeRecord.one(MetaDto.class, sql, type, name);
}
return null;
}
@Override
public void saveMetas(Integer cid, String names, String type) {
if (null == cid) {
throw new TipException("项目关联id不能为空");
}
if (StringKit.isNotBlank(names) && StringKit.isNotBlank(type)) {
String[] nameArr = StringKit.split(names, ",");
for (String name : nameArr) {
this.saveOrUpdate(cid, name, type);
}
}
}
private void saveOrUpdate(Integer cid, String name, String type) {
Metas metas = activeRecord.one(new Take(Metas.class).eq("name", name).eq("type", type));
int mid = 0;
if (null != metas) {
// Metas temp = new Metas();
// temp.setMid(metas.getMid());
// activeRecord.update(temp);
mid = metas.getMid();
} else {
metas = new Metas();
metas.setSlug(name);
metas.setName(name);
metas.setType(type);
Long mid_ = activeRecord.insert(metas);
mid = mid_.intValue();
}
if (mid != 0) {
int count = activeRecord.count(new Take(Relationships.class).eq("cid", cid).eq("mid", mid));
if (count == 0) {
Relationships relationships = new Relationships();
relationships.setCid(cid);
relationships.setMid(mid);
activeRecord.insert(relationships);
}
}
}
@Override
public void delete(int mid) {
Metas metas = activeRecord.byId(Metas.class, mid);
if (null != metas) {
String type = metas.getType();
String name = metas.getName();
activeRecord.delete(Metas.class, mid);
List<Relationships> rlist = activeRecord.list(new Take(Relationships.class).eq("mid", mid));
if (null != rlist) {
for (Relationships r : rlist) {
Contents contents = activeRecord.byId(Contents.class, r.getCid());
if (null != contents) {
Contents temp = new Contents();
temp.setCid(r.getCid());
if (type.equals(Types.CATEGORY)) {
temp.setCategories(reMeta(name, contents.getCategories()));
}
if (type.equals(Types.TAG)) {
temp.setTags(reMeta(name, contents.getTags()));
}
activeRecord.update(temp);
}
}
}
activeRecord.delete(new Take(Relationships.class).eq("mid", mid));
}
}
@Override
public void saveMeta(String type, String name, Integer mid) {
if (StringKit.isNotBlank(type) && StringKit.isNotBlank(name)) {
Metas metas = activeRecord.one(new Take(Metas.class).eq("type", type).eq("name", name));
if (null != metas) {
throw new TipException("已经存在该项");
} else {
if (null != mid) {
metas = new Metas();
metas.setMid(mid);
metas.setName(name);
activeRecord.update(metas);
} else {
metas = new Metas();
metas.setType(type);
metas.setName(name);
activeRecord.insert(metas);
}
}
}
}
@Override
public void saveMeta(Metas metas) {
if (null != metas) {
activeRecord.insert(metas);
}
}
@Override
public void update(Metas metas) {
if (null != metas && null != metas.getMid()) {
activeRecord.update(metas);
}
}
private String reMeta(String name, String metas) {
String[] ms = StringKit.split(metas, ",");
StringBuffer sbuf = new StringBuffer();
for (String m : ms) {
if (!name.equals(m)) {
sbuf.append(",").append(m);
}
}
if (sbuf.length() > 0) {
return sbuf.substring(1);
}
return "";
}
}
| [
"biezhi.me@gmail.com"
] | biezhi.me@gmail.com |
6f12a8dd72cd0de4d0616d43ee55f3f0797fb79c | a4110f29cc12c5e9ad3dc6d7d81cfe60b751398f | /src/com/Sts/DBTypes/StsType.java | b3d1bb22491444e8ccae1df47b8eef479f2f7def | [] | no_license | tlasseter/VolumePicker7 | dd70320c10d4bd105fdb238df19d504ddad5ae90 | 3baa5d1047893690cf987f7bda27b0e2dcf87e84 | refs/heads/master | 2021-05-31T05:32:34.880131 | 2016-03-23T22:37:43 | 2016-03-23T22:37:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 642 | java | package com.Sts.DBTypes;
/**
* <p>Title: S2S Development</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: S2S Systems LLC</p>
* @author unascribed
* @version 1.1
*/
import com.Sts.MVC.*;
public class StsType extends StsMainObject
{
protected StsColor stsColor;
public StsType()
{
}
public StsType(String name, StsColor color)
{
super(false);
setName(name);
stsColor = color;
addToModel();
}
public boolean initialize(StsModel model)
{
return true;
}
public StsColor getStsColor()
{
return stsColor;
}
}
| [
"t.lasseter@comcast.net"
] | t.lasseter@comcast.net |
2305ad292bdabeb355955a4744bae57a9f3ba0cf | 8e9659672e5ffd623a534a5dd6ebb224b4a6cb98 | /Core_Java_Practice/src/com/mkpits/java/basicjavaprograms/multi9th6.java | 960ea78896bb8378c020063ee3de84803bcddd4f | [] | no_license | MAYU75/MKPITS_Mayuri_Dhole_Java_Nov_2020 | 8ec4ea495aff68ff8d0ce0b23119576121409130 | 2ac59daf4c17293898b03013cd0c7d7ac0c75627 | refs/heads/main | 2023-06-25T18:01:52.514638 | 2021-07-25T16:14:21 | 2021-07-25T16:14:21 | 339,304,237 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 493 | java | //java program to print the output of multiplication of three numbers which will be entered by the user.
import java.util.*;
class multi9th6
{
public static void main(String[] args)
{
int num1,num2,num3,mul;
System.out.println("Enter the three numbers for multiplication: ");
Scanner scan = new Scanner(System.in);
num1= scan.nextInt();
num2= scan.nextInt();
num3= scan.nextInt();
mul=num1*num2*num3;
System.out.println("Multiplication of three numbers is " + mul);
}
} | [
"mayuridhole@gmail.com"
] | mayuridhole@gmail.com |
b0a6062fbf041d1e361ebbaa3ad2b7d3ef67a4fa | 9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3 | /cab.snapp.passenger.play_184.apk-decompiled/sources/com/webengage/sdk/android/actions/rules/a.java | 17118e7f8ae8abb53aa1de3e3c39f1d19010fe3f | [] | no_license | BaseMax/PopularAndroidSource | a395ccac5c0a7334d90c2594db8273aca39550ed | bcae15340907797a91d39f89b9d7266e0292a184 | refs/heads/master | 2020-08-05T08:19:34.146858 | 2019-10-06T20:06:31 | 2019-10-06T20:06:31 | 212,433,298 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,537 | java | package com.webengage.sdk.android.actions.rules;
import android.content.Context;
import com.adjust.sdk.Constants;
import com.webengage.sdk.android.WebEngage;
import com.webengage.sdk.android.actions.database.DataHolder;
import com.webengage.sdk.android.actions.database.f;
import com.webengage.sdk.android.actions.database.y;
import com.webengage.sdk.android.af;
import com.webengage.sdk.android.n;
import com.webengage.sdk.android.p;
import com.webengage.sdk.android.utils.a.b;
import com.webengage.sdk.android.utils.a.e;
import com.webengage.sdk.android.utils.a.f;
import com.webengage.sdk.android.utils.a.g;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
class a extends com.webengage.sdk.android.a {
/* renamed from: b reason: collision with root package name */
private Context f5419b = null;
private af c = null;
/* renamed from: com.webengage.sdk.android.actions.rules.a$1 reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
/* renamed from: a reason: collision with root package name */
static final /* synthetic */ int[] f5420a = new int[af.values().length];
/* JADX WARNING: Can't wrap try/catch for region: R(6:0|1|2|3|4|6) */
/* JADX WARNING: Code restructure failed: missing block: B:7:?, code lost:
return;
*/
/* JADX WARNING: Failed to process nested try/catch */
/* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0014 */
static {
/*
com.webengage.sdk.android.af[] r0 = com.webengage.sdk.android.af.values()
int r0 = r0.length
int[] r0 = new int[r0]
f5420a = r0
int[] r0 = f5420a // Catch:{ NoSuchFieldError -> 0x0014 }
com.webengage.sdk.android.af r1 = com.webengage.sdk.android.af.BOOT_UP // Catch:{ NoSuchFieldError -> 0x0014 }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0014 }
r2 = 1
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0014 }
L_0x0014:
int[] r0 = f5420a // Catch:{ NoSuchFieldError -> 0x001f }
com.webengage.sdk.android.af r1 = com.webengage.sdk.android.af.CONFIG_REFRESH // Catch:{ NoSuchFieldError -> 0x001f }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x001f }
r2 = 2
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x001f }
L_0x001f:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.webengage.sdk.android.actions.rules.a.AnonymousClass1.<clinit>():void");
}
}
a(Context context) {
super(context);
this.f5419b = context.getApplicationContext();
}
private void a(c cVar, Set<String> set) {
Set<String> a2 = cVar.a();
Set<String> b2 = b.a(this.f5419b).b();
b2.removeAll(a2);
b.a(this.f5419b).a(b2);
Set<String> e = cVar.e();
Map<String, Set<String>> a3 = y.a(this.f5419b).a();
if (a3 != null) {
for (Map.Entry next : a3.entrySet()) {
String str = (String) next.getKey();
Set<String> set2 = (Set) next.getValue();
set2.removeAll(e);
if (set2.size() > 0) {
for (String a4 : set2) {
DataHolder.get().a(str, a4, null);
}
}
}
}
Map<String, Set<String>> b3 = y.a(this.f5419b).b();
if (b3 != null) {
for (Map.Entry next2 : b3.entrySet()) {
String str2 = (String) next2.getKey();
Set<String> set3 = (Set) next2.getValue();
HashSet<String> hashSet = new HashSet<>();
for (String str3 : set3) {
int indexOf = str3.indexOf(91);
if (indexOf == -1) {
indexOf = str3.indexOf(95);
}
if (indexOf != -1) {
hashSet.add(str3.substring(0, indexOf));
}
}
hashSet.removeAll(set);
if (hashSet.size() > 0) {
for (String str4 : hashSet) {
for (String str5 : set3) {
if (str5.startsWith(str4)) {
DataHolder.get().a(str2, str5, (Object) null, f.SCOPES);
}
}
}
}
}
}
}
private void a(Map<String, Object> map, Map<String, Object> map2) {
e(map2);
if (map != null) {
ArrayList arrayList = new ArrayList(map.keySet());
if (map2 != null) {
arrayList.removeAll(map2.keySet());
}
if (!arrayList.isEmpty()) {
p.a(this.f5419b).a((List<String>) arrayList);
}
}
}
private void e(Map<String, Object> map) {
if (map != null) {
for (Map.Entry next : map.entrySet()) {
Map map2 = (Map) next.getValue();
if (map2 != null) {
p.a(this.f5419b).a(((Double) map2.get("lat")).doubleValue(), ((Double) map2.get(Constants.LONG)).doubleValue(), Float.parseFloat(map2.get("radius").toString()), (String) next.getKey(), WebEngage.get().getWebEngageConfig());
}
}
}
}
public Object a(Object obj) {
g gVar = (g) obj;
if (gVar.i()) {
int i = AnonymousClass1.f5420a[this.c.ordinal()];
if (i == 1) {
try {
new c(com.webengage.sdk.android.utils.f.a(gVar.e(), false)).a(h.a(), DataHolder.get());
e(DataHolder.get().C());
} catch (Exception e) {
d(e);
}
} else if (i == 2) {
try {
if (gVar.d() == 200) {
Map<String, Object> C = DataHolder.get().C();
c cVar = new c(com.webengage.sdk.android.utils.f.a(gVar.e(), false));
a(cVar, cVar.a(h.a(), DataHolder.get()));
com.webengage.sdk.android.utils.f.a(cVar.c(), this.f5419b);
a(C, DataHolder.get().C());
}
} catch (Exception e2) {
d(e2);
} catch (Throwable th) {
gVar.m();
throw th;
}
gVar.m();
}
return gVar;
}
gVar.n();
return null;
}
public Object a(Map<String, Object> map) {
String str = (String) map.get("config_url");
this.c = (af) map.get("topic");
int i = 2;
if (AnonymousClass1.f5420a[this.c.ordinal()] == 1) {
i = 4;
}
return new f.a(str, e.GET, this.f5419b).b(i).a().i();
}
public void b(Object obj) {
if (obj != null && af.CONFIG_REFRESH.equals(this.c) && ((g) obj).d() == 200) {
WebEngage.startService(n.a(af.FETCH_PROFILE, null, this.f5419b), this.f5419b);
WebEngage.startService(n.a(af.JOURNEY_CONTEXT, null, this.f5419b), this.f5419b);
}
}
}
| [
"MaxBaseCode@gmail.com"
] | MaxBaseCode@gmail.com |
c7e46fd6556867f8779546360ef2220161e8c06b | d8eba63b264175d2ab82f237d324b94e95467bc8 | /client/src/Class133.java | c51d687cf636c673cbb74b9dadf7c7d4253982bc | [] | no_license | DukeCharles/revision-718-client | 9eb164611d5ced1a3d35cf7ffeebc97582b4e7e5 | f3d100436bdfed1001063d0dad54aa80f0742c14 | refs/heads/main | 2023-06-19T08:38:17.328798 | 2021-07-21T02:32:47 | 2021-07-21T02:32:47 | 387,969,320 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,759 | java | /* Class133 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
public class Class133 {
static Class133 aClass133_1509;
static Class133 aClass133_1510 = new Class133();
static Class133 aClass133_1511 = new Class133();
public static Class243 aClass243_1512;
public int method1482(int i, int i_0_, int i_1_) {
try {
int i_2_ = (Class298_Sub40_Sub9.anInt9716 * -1111710645 > i_0_ ? -1111710645 * Class298_Sub40_Sub9.anInt9716 : i_0_);
if (this == aClass133_1510)
return 0;
if (aClass133_1509 == this)
return i_2_ - i;
if (aClass133_1511 == this)
return (i_2_ - i) / 2;
return 0;
}
catch (RuntimeException runtimeexception) {
throw Class346.method4175(runtimeexception, new StringBuilder().append("fj.f(").append(')').toString());
}
}
Class133() {
/* empty */
}
static {
aClass133_1509 = new Class133();
}
static final void method1483(Class403 class403, int i) {
try {
NPC class365_sub1_sub1_sub2_sub1 = ((NPC) class403.aClass365_Sub1_Sub1_Sub2_5242);
boolean bool = false;
NPCDefinitions class503 = class365_sub1_sub1_sub2_sub1.aClass503_10190;
if (class503.anIntArray6188 != null)
class503 = class503.method6240(Class128.aClass148_6331, 1885989341);
if (null != class503)
bool = class503.aBoolean6163;
class403.anIntArray5244[((class403.anInt5239 += -391880689) * 681479919 - 1)] = bool ? 1 : 0;
}
catch (RuntimeException runtimeexception) {
throw Class346.method4175(runtimeexception, new StringBuilder().append("fj.apz(").append(')').toString());
}
}
static final void method1484(Class403 class403, int i) {
try {
Class390 class390 = (class403.aBoolean5261 ? class403.aClass390_5247 : class403.aClass390_5246);
IComponentDefinition class105 = class390.aClass105_4168;
Class119 class119 = class390.aClass119_4167;
Class372_Sub3.method4602(class105, class119, class403, 1567634168);
}
catch (RuntimeException runtimeexception) {
throw Class346.method4175(runtimeexception, new StringBuilder().append("fj.hr(").append(')').toString());
}
}
static final void method1485(Class403 class403, byte i) {
try {
Class390 class390 = (class403.aBoolean5261 ? class403.aClass390_5247 : class403.aClass390_5246);
IComponentDefinition class105 = class390.aClass105_4168;
Class119 class119 = class390.aClass119_4167;
Class128.method1436(class105, class119, class403, -588058138);
}
catch (RuntimeException runtimeexception) {
throw Class346.method4175(runtimeexception, new StringBuilder().append("fj.hz(").append(')').toString());
}
}
static final void method1486(Class403 class403, byte i) {
try {
int i_3_ = (class403.anIntArray5244[((class403.anInt5239 -= -391880689) * 681479919)]);
int i_4_ = i_3_ >> 14 & 0x3fff;
int i_5_ = i_3_ & 0x3fff;
Class341 class341 = client.aClass283_8716.method2628(681479919);
i_4_ -= -1760580017 * class341.gameSceneBaseX;
if (i_4_ < 0)
i_4_ = 0;
else if (i_4_ >= client.aClass283_8716.method2629(-1870653657))
i_4_ = client.aClass283_8716.method2629(-2106000427);
i_5_ -= class341.gameSceneBaseY * 283514611;
if (i_5_ < 0)
i_5_ = 0;
else if (i_5_ >= client.aClass283_8716.method2630(787275205))
i_5_ = client.aClass283_8716.method2630(11403406);
client.anInt8753 = 672497503 * ((i_4_ << 9) + 256);
client.anInt8755 = 957476733 * ((i_5_ << 9) + 256);
Class298_Sub1.anInt7164 = -1469516446;
Class418.anInt5339 = -1001372047;
Class100.anInt1081 = 178575833;
}
catch (RuntimeException runtimeexception) {
throw Class346.method4175(runtimeexception, new StringBuilder().append("fj.agl(").append(')').toString());
}
}
}
| [
"charles.simon.morin@gmail.com"
] | charles.simon.morin@gmail.com |
f9c3c862e4355f8fa2b4b8bdafcfd1bf5a527c2d | f6beea8ab88dad733809e354ef9a39291e9b7874 | /com/planet_ink/coffee_mud/Locales/SaltWaterSurface.java | 676b67afa802e8600d684e255f1f7e7e021231c0 | [
"Apache-2.0"
] | permissive | bonnedav/CoffeeMud | c290f4d5a96f760af91f44502495a3dce3eea415 | f629f3e2e10955e47db47e66d65ae2883e6f9072 | refs/heads/master | 2020-04-01T12:13:11.943769 | 2018-10-11T02:50:45 | 2018-10-11T02:50:45 | 153,196,768 | 0 | 0 | Apache-2.0 | 2018-10-15T23:58:53 | 2018-10-15T23:58:53 | null | UTF-8 | Java | false | false | 2,509 | java | package com.planet_ink.coffee_mud.Locales;
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 2002-2018 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 SaltWaterSurface extends WaterSurface
{
@Override
public String ID()
{
return "SaltWaterSurface";
}
public SaltWaterSurface()
{
super();
liquidType = RawMaterial.RESOURCE_SALTWATER;
}
@Override
protected String UnderWaterLocaleID()
{
return "UnderSaltWaterGrid";
}
@Override
protected int UnderWaterDomainType()
{
return Room.DOMAIN_OUTDOORS_UNDERWATER;
}
@Override
protected boolean IsUnderWaterFatClass(Room thatSea)
{
return (thatSea instanceof UnderSaltWaterGrid)
|| (thatSea instanceof UnderSaltWaterThinGrid)
|| (thatSea instanceof UnderSaltWaterColumnGrid);
}
public static final List<Integer> roomResources = new Vector<Integer>(Arrays.asList(UnderSaltWater.resourceList));
static
{
roomResources.add(Integer.valueOf(RawMaterial.RESOURCE_SALMON));
roomResources.add(Integer.valueOf(RawMaterial.RESOURCE_FISH));
}
@Override
public List<Integer> resourceChoices()
{
return roomResources;
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
aefa73d9242f18649fa587631d7c2313a75a6125 | abf595a471f4d8bad2acb528f6a9530dc7a918f6 | /tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/StatsAggregatorHandle.java | c21655f2c0d32bd0ebad441475329c6d9947e7f8 | [] | no_license | VonRosenchild/java | 428f95655b6e08061f86d720afa9a1fa708f0354 | 83b7ba249d64e0a76bc848509d7e9d57a23c013b | refs/heads/master | 2020-08-09T13:47:03.223777 | 2019-10-06T17:46:24 | 2019-10-06T17:47:53 | 214,100,320 | 1 | 0 | null | 2019-10-10T06:07:31 | 2019-10-10T06:07:29 | null | UTF-8 | Java | false | false | 3,169 | java | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=======================================================================*/
// This class has been generated, DO NOT EDIT!
package org.tensorflow.op.data;
import org.tensorflow.Operand;
import org.tensorflow.Operation;
import org.tensorflow.OperationBuilder;
import org.tensorflow.Output;
import org.tensorflow.op.PrimitiveOp;
import org.tensorflow.op.Scope;
/**
* Creates a statistics manager resource.
*/
public final class StatsAggregatorHandle extends PrimitiveOp implements Operand<Object> {
/**
* Optional attributes for {@link org.tensorflow.op.data.StatsAggregatorHandle}
*/
public static class Options {
/**
* @param container
*/
public Options container(String container) {
this.container = container;
return this;
}
/**
* @param sharedName
*/
public Options sharedName(String sharedName) {
this.sharedName = sharedName;
return this;
}
private String container;
private String sharedName;
private Options() {
}
}
/**
* Factory method to create a class wrapping a new StatsAggregatorHandle operation.
*
* @param scope current scope
* @param options carries optional attributes values
* @return a new instance of StatsAggregatorHandle
*/
public static StatsAggregatorHandle create(Scope scope, Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("StatsAggregatorHandle", scope.makeOpName("StatsAggregatorHandle"));
opBuilder = scope.applyControlDependencies(opBuilder);
if (options != null) {
for (Options opts : options) {
if (opts.container != null) {
opBuilder.setAttr("container", opts.container);
}
if (opts.sharedName != null) {
opBuilder.setAttr("shared_name", opts.sharedName);
}
}
}
return new StatsAggregatorHandle(opBuilder.build());
}
/**
* @param container
*/
public static Options container(String container) {
return new Options().container(container);
}
/**
* @param sharedName
*/
public static Options sharedName(String sharedName) {
return new Options().sharedName(sharedName);
}
/**
*/
public Output<?> handle() {
return handle;
}
@Override
@SuppressWarnings("unchecked")
public Output<Object> asOutput() {
return (Output<Object>) handle;
}
private Output<?> handle;
private StatsAggregatorHandle(Operation operation) {
super(operation);
int outputIdx = 0;
handle = operation.output(outputIdx++);
}
}
| [
"samuel.audet@gmail.com"
] | samuel.audet@gmail.com |
603b98073373d6f4e0846a8ce07abed9f8df0264 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0259_public/src/java/module0259_public/a/IFoo3.java | a25871c26bd71acbafe691b631d683a8c254caaf | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 858 | java | package module0259_public.a;
import java.sql.*;
import java.util.logging.*;
import java.util.zip.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.management.Attribute
* @see javax.naming.directory.DirContext
* @see javax.net.ssl.ExtendedSSLSession
*/
@SuppressWarnings("all")
public interface IFoo3<R> extends module0259_public.a.IFoo2<R> {
javax.rmi.ssl.SslRMIClientSocketFactory f0 = null;
java.awt.datatransfer.DataFlavor f1 = null;
java.beans.beancontext.BeanContext f2 = null;
String getName();
void setName(String s);
R get();
void set(R e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
eecda0770e9bd5db27c162be56f9471e33a362c7 | 69ec2ce61fdb31b5f084bfbb13e378734c14c686 | /org.osgi.test.cases.framework/src/org/osgi/test/cases/framework/classpath/tb3/Reinstall.java | efbc65dea7aec344a949c99ee57e536920beb05f | [
"Apache-2.0"
] | permissive | henrykuijpers/osgi | f23750269f2817cb60e797bbafc29183e1bae272 | 063c29cb12eadaab59df75dfa967978c8052c4da | refs/heads/main | 2023-02-02T08:51:39.266433 | 2020-12-23T12:57:12 | 2020-12-23T12:57:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 678 | java | /**
* OSGi Test Suite Implementation. OSGi Confidential.
* (C) Copyright Ericsson Radio Systems AB. 2000.
* This source code is owned by Ericsson Radio Systems AB, and is being distributed to OSGi
* MEMBERS as MEMBER LICENSED MATERIALS under the terms of section 3.2 of the OSGi MEMBER AGREEMENT.
*/
package org.osgi.test.cases.framework.classpath.tb3;
import org.osgi.framework.*;
/**
* Bundle for the Reinstall test.
*
* @author Ericsson Radio Systems AB
*/
public class Reinstall implements BundleActivator {
/**
* Starts the bundle.
*/
public void start(BundleContext bc) {
}
/**
* Stops the bundle.
*/
public void stop(BundleContext bc) {
}
}
| [
"hargrave@us.ibm.com"
] | hargrave@us.ibm.com |
9a5213412798c656e678d5bc6560ab98e704a6af | dca8479e7af38ecd742ee2b3328a896702edfd3a | /victorvalley/src/com/bcits/bfm/util/CheckChildEntries.java | c5fa1fd33767688902cbba8dcaf5383b21d9af7e | [] | no_license | praveenkumar11nov/GitHub_VV | a0c1950333f163e08679af4e74cc0aeaca8e528d | f35199213ca10bbf5f0119d031f40374afd35650 | refs/heads/master | 2020-03-19T09:57:25.591863 | 2018-06-06T13:11:03 | 2018-06-06T13:11:03 | 136,330,639 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,738 | java | package com.bcits.bfm.util;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.HashSet;
import java.util.Set;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class CheckChildEntries
{
@Value("${datasource.driverClassName}")
private String driverClassName;
@Value("${datasource.url}")
private String url;
@Value("${datasource.username}")
private String username;
@Value("${datasource.password}")
private String password;
public Set<String> getChildEntries(String fieldName, int id, String parentClasses)
{
Set<String> entrySet = new HashSet<String>();
System.out.println("-------- Oracle JDBC Connection Testing ------");
try {
Class.forName(driverClassName);
} catch (ClassNotFoundException e) {
System.out.println("Where is your Oracle JDBC Driver?");
e.printStackTrace();
}
System.out.println("Oracle JDBC Driver Registered!");
Connection connection1 = null;
Statement stmt1 = null;
Statement stmt2 = null;
ResultSet rs1 = null;
ResultSet rs2 = null;
try {
connection1 = DriverManager.getConnection(
url, username,
password);
stmt1 = connection1.createStatement();
/*rs = stmt.executeQuery("SELECT DISTINCT a.table_name, "
+ " a.column_name, "
+ " a.constraint_name , "
+ " c.owner "
+ " FROM ALL_CONS_COLUMNS A, ALL_CONSTRAINTS C "
+ " where A.CONSTRAINT_NAME = C.CONSTRAINT_NAME "
+ " and C.CONSTRAINT_TYPE = 'R' "
+ " and c.owner like 'IREO_2' AND a.column_name='PERSON_ID' ORDER BY a.table_name");*/
rs1 = stmt1.executeQuery("SELECT DISTINCT a.table_name"
+ " FROM ALL_CONS_COLUMNS A, ALL_CONSTRAINTS C "
+ " where A.CONSTRAINT_NAME = C.CONSTRAINT_NAME "
+ " and C.CONSTRAINT_TYPE = 'R' "
+ " and c.owner like 'IREO_2' AND a.column_name='"+fieldName+"'");
while(rs1.next())
{
String className = rs1.getString("table_name");
stmt2 = connection1.createStatement();
rs2 = stmt2.executeQuery("SELECT "+fieldName+" FROM "+className+" WHERE "+fieldName+" = "+id);
while(rs2.next())
{
if(!(className.contains(parentClasses)))
entrySet.add(className);
}
}
return entrySet;
} catch (SQLException e) {
System.out.println("Connection Failed! Check output console");
e.printStackTrace();
}
finally
{
if (connection1 != null) {
System.out.println("You made it, take control your database now!");
} else {
System.out.println("Failed to make connection!");
}
}
return null;
}
}
| [
"praveen.shanukumar@gmail.com"
] | praveen.shanukumar@gmail.com |
121adab4db6726a1b0c095bb57801e92833e53c7 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/1/org/apache/commons/lang3/text/StrBuilder_setCharAt_325.java | 9f3e9464acfdc1e9cafba2aad44cc8aabb2b1c9b | [] | 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 | 4,358 | java |
org apach common lang3 text
build string constitu part provid flexibl power api
string buffer stringbuff
main differ string buffer stringbuff string builder stringbuild
subclass direct access charact arrai
addit method
append separ appendwithsepar add arrai valu separ
append pad appendpad add length pad charact
append fix length appendfixedlength add fix width field builder
char arrai tochararrai char getchar simpler wai rang charact arrai
delet delet string
replac search replac string
left string leftstr string rightstr mid string midstr substr except
builder string
size clear empti isempti collect style api method
view
token astoken intern buffer sourc str token strtoken
reader asread intern buffer sourc reader
writer aswrit writer write directli intern buffer
aim provid api mimic close string buffer stringbuff
addit method note edg case
invalid indic input alter individu method
biggest output text
'null' control properti link set null text setnulltext string
prior implement cloneabl implement
clone method onward longer
version
str builder strbuilder char sequenc charsequ append serializ builder string
set charact index
charat
delet char deletecharat
param index index set
param charact
enabl chain
index bound except indexoutofboundsexcept index invalid
str builder strbuilder set char setcharat index
index index length
string index bound except stringindexoutofboundsexcept index
buffer index
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
99fa97dc6d0366da2c6698a2485e41a769f21a28 | 6a516b3939751b7c4ee1859280569151124dd2c2 | /src/com/javarush/test/level08/lesson08/task02/Solution.java | 5f4d8ddc54070be5ef29ce25f488c2a85b370047 | [] | no_license | SirMatters/JavaRush-Solutions | 690d34b0680ca2f2b220ce3fce666937cb59050d | fe3592308428baac735fb3c443356b54e38a4f8d | refs/heads/master | 2020-12-24T11:45:45.233258 | 2018-04-14T18:50:25 | 2018-04-14T18:50:25 | 73,015,759 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,102 | java | package com.javarush.test.level08.lesson08.task02;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/* Удалить все числа больше 10
Создать множество чисел(Set<Integer>), занести туда 20 различных чисел.
Удалить из множества все числа больше 10.
*/
public class Solution
{
public static void main(String[] args) throws Exception
{
removeAllNumbersMoreThan10(createSet());
}
public static HashSet<Integer> createSet()
{
//напишите тут ваш код
HashSet<Integer> set = new HashSet<Integer>();
for (int i = 0; i <20; i++) {
set.add(i);
}
return set;
}
public static HashSet<Integer> removeAllNumbersMoreThan10(HashSet<Integer> set)
{
//напишите тут ваш код
Iterator<Integer> it = set.iterator();
while(it.hasNext()){
if (it.next()>10){
it.remove();
}
}
return set;
}
}
| [
"perov.krll@gmail.com"
] | perov.krll@gmail.com |
b902d049098825c908cf1c94e93c121779ca5d3f | 327d615dbf9e4dd902193b5cd7684dfd789a76b1 | /base_source_from_JADX/sources/com/google/android/datatransport/runtime/scheduling/persistence/SQLiteEventStore$$Lambda$5.java | fa8656cc805b5c641872529187d5e4ba54c6e312 | [] | no_license | dnosauro/singcie | e53ce4c124cfb311e0ffafd55b58c840d462e96f | 34d09c2e2b3497dd452246b76646b3571a18a100 | refs/heads/main | 2023-01-13T23:17:49.094499 | 2020-11-20T10:46:19 | 2020-11-20T10:46:19 | 314,513,307 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,238 | java | package com.google.android.datatransport.runtime.scheduling.persistence;
import android.database.sqlite.SQLiteDatabase;
import com.google.android.datatransport.runtime.EventInternal;
import com.google.android.datatransport.runtime.TransportContext;
import com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore;
final /* synthetic */ class SQLiteEventStore$$Lambda$5 implements SQLiteEventStore.Function {
private final SQLiteEventStore arg$1;
private final TransportContext arg$2;
private final EventInternal arg$3;
private SQLiteEventStore$$Lambda$5(SQLiteEventStore sQLiteEventStore, TransportContext transportContext, EventInternal eventInternal) {
this.arg$1 = sQLiteEventStore;
this.arg$2 = transportContext;
this.arg$3 = eventInternal;
}
public static SQLiteEventStore.Function lambdaFactory$(SQLiteEventStore sQLiteEventStore, TransportContext transportContext, EventInternal eventInternal) {
return new SQLiteEventStore$$Lambda$5(sQLiteEventStore, transportContext, eventInternal);
}
public Object apply(Object obj) {
return SQLiteEventStore.lambda$persist$1(this.arg$1, this.arg$2, this.arg$3, (SQLiteDatabase) obj);
}
}
| [
"dno_sauro@yahoo.it"
] | dno_sauro@yahoo.it |
b770611af73e056d995cd1496ecc86edd37912c6 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/34/34_7427c0d45f5a3abeaa4dab974151a30d9e274af1/AbstractListenerManager/34_7427c0d45f5a3abeaa4dab974151a30d9e274af1_AbstractListenerManager_t.java | 73f198a4bb1e8b9e64c4e227c71a5dc75ae69abc | [] | 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,894 | java | package sk.stuba.fiit.perconik.core.services.listeners;
import java.util.Set;
import sk.stuba.fiit.perconik.core.Listener;
import sk.stuba.fiit.perconik.core.Listeners;
import sk.stuba.fiit.perconik.core.Resource;
import sk.stuba.fiit.perconik.core.ResourceNotRegistredException;
import sk.stuba.fiit.perconik.core.resources.DefaultResources;
import sk.stuba.fiit.perconik.core.services.AbstractManager;
import sk.stuba.fiit.perconik.core.services.resources.ResourceManager;
/**
* An abstract implementation of {@link ListenerManager}. This class
* implements the listener registration mechanism based on the underlying
* {@link ResourceManager}.
*
* @author Pavol Zbell
* @since 1.0
*/
public abstract class AbstractListenerManager extends AbstractManager implements ListenerManager
{
// TODO add javadocs
/**
* Constructor for use by subclasses.
*/
protected AbstractListenerManager()
{
}
protected abstract ResourceManager manager();
private final <L extends Listener> Set<Resource<? super L>> registrables(final L listener)
{
Set<Resource<? super L>> resources = this.manager().registrables((Class<L>) listener.getClass());
for (Class<? extends Listener> type: Listeners.resolveTypes(listener))
{
if (this.manager().registrables(type).isEmpty())
{
throw new ResourceNotRegistredException("No registred resources for listener implementation " + listener.getClass().getName() + " as " + type.getName());
}
}
return resources;
}
public final <L extends Listener> void register(final L listener)
{
DefaultResources.registerTo(this.registrables(listener), listener);
}
public final <L extends Listener> void unregister(final L listener)
{
DefaultResources.unregisterFrom(this.registrables(listener), listener);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
4c94c209801ae2847093679e3994a98492e48bed | 0da879b67a5c3405c9c31346d49097b0ada7f356 | /servlet/src/main/java/com/bjpowernode/filter/OtherServlet.java | 3df7ae9c3cd21664d15224128756d5155b365e20 | [] | no_license | gouyan123/general | 093929dd612d202a2a7e7e12dac32bbe0ff6e85c | 73a33172909bb2b43570dac07c2ee08981a4ecfc | refs/heads/master | 2022-12-24T00:32:54.883108 | 2019-08-06T10:55:02 | 2019-08-06T10:55:02 | 116,359,144 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 627 | java | package com.bjpowernode.filter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class OtherServlet extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException{
System.out.println("执行OtherServlet");
}
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException{
this.doGet(req,resp);
}
}
| [
"2637178209@qq.com"
] | 2637178209@qq.com |
fa7637478ce9ef8299fe62744eb807b0169ea046 | afb17d9d97e4c93a4a5ab9db748f9091b1be61cf | /bestbuy-products/src/main/java/com/alvesjefs/products/dto/ProductsDTO.java | d6987edea745df357a0b4a8557a986836ff0c4a1 | [] | no_license | jefsAlves/best-buy | 759ddac7da1587e4021efc87906f09de5be0a980 | b6cfb88bde5e821ff5a3c48382f770b4c15f4be8 | refs/heads/main | 2023-03-01T04:40:31.828432 | 2021-02-04T11:31:48 | 2021-02-04T11:31:48 | 334,934,590 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 942 | java | package com.alvesjefs.products.dto;
import java.io.Serializable;
import com.alvesjefs.products.domain.Products;
public class ProductsDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private String name;
private String description;
public ProductsDTO() {
}
public ProductsDTO(Long id, String name, String description) {
this.id = id;
this.name = name;
this.description = description;
}
public ProductsDTO(Products products) {
id = products.getId();
name = products.getName();
description = products.getDescription();
}
public Long getId() {
return id;
}
public void setId(Long 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;
}
}
| [
"jeffersonalmeida16@outlook.com"
] | jeffersonalmeida16@outlook.com |
77920d1d930e8251843516465fbd8e418b1c1176 | 8b4bcc0e8ca6eafd6e5ff0f88d2b2e2dec921186 | /library/src/main/java/com/lxj/xpopup/animator/BlurAnimator.java | bee40ed3cc5cb9d1388bc503c6bb7f9ced40e343 | [
"Apache-2.0"
] | permissive | yhaiqi87/XPopup | 3721aa27e9f8aaaf98db4feaefe52df34d8066eb | 8c5a7586226ffc23455265c16cdd13bca09f2865 | refs/heads/master | 2022-12-14T16:33:43.523181 | 2020-09-23T13:21:54 | 2020-09-23T13:21:54 | 299,540,562 | 1 | 0 | Apache-2.0 | 2020-09-29T07:37:24 | 2020-09-29T07:37:23 | null | UTF-8 | Java | false | false | 2,586 | java | package com.lxj.xpopup.animator;
import android.animation.FloatEvaluator;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.drawable.BitmapDrawable;
import android.view.View;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.util.XPopupUtils;
/**
* Description: 背景Shadow动画器,负责执行半透明的渐入渐出动画
* Create by dance, at 2018/12/9
*/
public class BlurAnimator extends PopupAnimator {
private FloatEvaluator evaluate = new FloatEvaluator();
public BlurAnimator(View target) {
super(target);
}
public Bitmap decorBitmap;
public boolean hasShadowBg = false;
public BlurAnimator() {}
@Override
public void initAnimator() {
Bitmap blurBmp = XPopupUtils.renderScriptBlur(targetView.getContext(), decorBitmap, 25, true);
BitmapDrawable drawable = new BitmapDrawable(targetView.getResources(), blurBmp);
if(hasShadowBg) drawable.setColorFilter(XPopup.getShadowBgColor(), PorterDuff.Mode.SRC_OVER);
targetView.setBackground(drawable);
}
@Override
public void animateShow() {
// ValueAnimator animator = ValueAnimator.ofFloat(0,1);
// animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
// @Override
// public void onAnimationUpdate(ValueAnimator animation) {
// float fraction = animation.getAnimatedFraction();
// Bitmap blurBmp = ImageUtils.renderScriptBlur(decorBitmap, evaluate.evaluate(0f, 25f, fraction), false);
// targetView.setBackground(new BitmapDrawable(targetView.getResources(), blurBmp));
// }
// });
// animator.setInterpolator(new LinearInterpolator());
// animator.setDuration(XPopup.getAnimationDuration()).start();
}
@Override
public void animateDismiss() {
// ValueAnimator animator = ValueAnimator.ofFloat(1,0);
// animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
// @Override
// public void onAnimationUpdate(ValueAnimator animation) {
// float fraction = animation.getAnimatedFraction();
// Bitmap blurBmp = ImageUtils.renderScriptBlur(decorBitmap, evaluate.evaluate(0f, 25f, fraction), false);
// targetView.setBackground(new BitmapDrawable(targetView.getResources(), blurBmp));
// }
// });
// animator.setInterpolator(new LinearInterpolator());
// animator.setDuration(XPopup.getAnimationDuration()).start();
}
}
| [
"16167479@qq.com"
] | 16167479@qq.com |
0b4296e683b5d9d5e3e85f5071763b54fd68db5c | a5d1355228908daf110db93a8641f212f5e9fbb1 | /src/main/java/gov/va/oit/vistaevolution/mailman/ws/xmxapi/model/XMXAPIFwdMsgResponse.java | c0998eeb2180a98aab1c0669a0ace1941c9e13ba | [] | no_license | MillerTom/Evolution | 24d10c0cad9887fcfeee5266a69fa9d98df66334 | 448a3136fa2205c12f135a432f7912317195482a | refs/heads/master | 2016-08-12T16:56:18.896488 | 2016-01-01T01:53:03 | 2016-01-01T01:53:03 | 48,867,152 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,625 | java | /**
*
*/
package gov.va.oit.vistaevolution.mailman.ws.xmxapi.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* @author Leisa Martella
*
*/
/*
* XMWSOA FWDMSGM
*
* This RPC forward messages by message number.
*
* NOTE: Only the user or a surrogate can use this API.
*
*
* Input Parameters
*
* DUZ (Required) String - User's DUZ
* XMDUZ (Required) String -The user (DUZ or name) whose messages are to be forwarded.
* XMKZA (Required) List - Identifies messages, using a list array of
* message numbers (xmz) in the MESSAGE file (#3.9) (xmk must not be
* specified and ranges are not allowed):
*
* List array: ARRAY(1234567)=""
* ARRAY(9763213)=""
* XMTO (Required) List - Addressee or addressee array. If it is an array, it must be passed by reference
*
* User's DUZ, or enough of user's name for a positive ID. For example:
* 1301, "lastname,first", ARRAY(1301)="", or
* ARRAY("lastname,first")=""
* G.group name (enough for positive ID)
* S.server name (enough for positive ID)
* D.device name (enough for positive ID)
* Prefix the above (except devices and servers) by:
* I:-For "Information Only" recipient (cannot reply).
* For example:
* "I:1301" or
* "I:lastname,first"
* C:-For "copy" recipient (not expected to reply).
* For example:
* "C:1301" or
* "C:lastname,first"
* L@datetime:-For when (in future) to send to this recipient (datetime
* can be anything accepted by VA FileMan).
* For example:
* "L@25 DEC@0500:1301" or
* "L@1 JAN:lastname,first" or
* "L@2981225.05:1301"
* (Can combine IL@datetime: or CL@datetime:)
*
* To delete recipients, prefix the recipients' name with a minus sign ("-").
* For example:
* -1301 or
* "-lastname,first"
*
* To address any recipient (including users, groups, devices, and
* servers) at a remote site, just add the @site name.
* For example:
* recipient@site name
*
*
* XMINSTR (Optional) List - Array of special instructions:
*
* ("ADDR FLAGS") Special addressing instructions, any or all of the
* following:
* I-Do not Initialize (KILL) the ^TMP addressee global, because it already
* contains addressees for this message, as a result of a previous call to an
* API.
* R-Do not Restrict message addressing:
* Ignore "domain closed."
* Ignore "keys required for domain."
* Ignore "may not forward to domain."
* Ignore "may not forward priority mail to groups."
* Ignore "message length restrictions to remote addressees."
* X-Do not create the ^TMP addressee global, because addressees are only
* being checked for validity.
*
* ("FWD BY") String saying who forwarded the message. The default
* is user. This string is placed in the FORWARDED BY
* field (#8) in the RECIPIENT Multiple field in the
* MESSAGE file (#3.9). It must not be any real person, except for the
* Postmaster. The DUZ is not captured in FORWARDED BY field (#8) ,
* "FORWARDED BY (XMDUZ)" in the RECIPIENT Multiple field of the MESSAGE file
* (#3.9)
* VistA software.
*
* ("LATER") Date/time (any format understood by VA FileMan) on
* which to send this message. The default is now.
*
* ("SELF BSKT") Basket to deliver to,
* if sender is recipient. The default is the "IN" basket.
*
* ("SHARE BSKT")
* Basket to deliver to if SHARED,MAIL is recipient. The default is the "IN"
* basket.
*
* ("SHARE DATE") Date/time (any format understood by VA FileMan) to
* delete this message from SHARED,MAIL if SHARED,MAIL is the recipient.
*
* Returns (String):
* <number of messages> filtered or
* -1^[error text]
*
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class XMXAPIFwdMsgResponse {
@XmlElement(name = "results", required = true)
private String results;
/**
* Constructor from fields
* @param results
*/
public XMXAPIFwdMsgResponse(String results) {
this.setResults(results);
}
/**
* Default no arg constructor
*/
public XMXAPIFwdMsgResponse() {
this.setResults(null);
}
public String getResults() {
return this.results;
}
private void setResults(String results) {
this.results = results;
}
}
| [
"tom.a.miller@gmail.com"
] | tom.a.miller@gmail.com |
eacc3ceff213e27c22d258b83c35ca548ed3723d | 51aef8e206201568d04fb919bf54a3009c039dcf | /trunk/src/com/jmex/model/collada/schema/cg_int2x2.java | 58b001eec364f64a12793e122cc5e69963222c47 | [] | no_license | lihak/fairytale-soulfire-svn-to-git | 0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81 | a85eb3fc6f4edf30fef9201902fcdc108da248e4 | refs/heads/master | 2021-02-11T15:25:47.199953 | 2015-12-28T14:48:14 | 2015-12-28T14:48:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 681 | java | /**
* cg_int2x2.java
*
* This file was generated by XMLSpy 2007sp2 Enterprise Edition.
*
* YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
* OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
*
* Refer to the XMLSpy Documentation for further details.
* http://www.altova.com/xmlspy
*/
package com.jmex.model.collada.schema;
import com.jmex.xml.types.SchemaString;
public class cg_int2x2 extends cg_ListOfInt {
public cg_int2x2() {
super();
}
public cg_int2x2(String newValue) {
super(newValue);
validate();
}
public cg_int2x2(SchemaString newValue) {
super(newValue);
validate();
}
public void validate() {
}
}
| [
"you@example.com"
] | you@example.com |
47c245739989b4b23045e8cd7e6e6f5d3c6ab100 | e315c2bb2ea17cd8388a39aa0587e47cb417af0a | /src/tn/com/smartsoft/framework/presentation/view/action/model/expression/ActionModelContext.java | 7f565f887d17cf8cbbc5f10a5152ddcd97e8dbbb | [] | no_license | wissem007/badges | 000536a40e34e20592fe6e4cb2684d93604c44c9 | 2064bd07b52141cf3cff0892e628cc62b4f94fdc | refs/heads/master | 2020-12-26T14:06:11.693609 | 2020-01-31T23:40:07 | 2020-01-31T23:40:07 | 237,530,008 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 948 | java | package tn.com.smartsoft.framework.presentation.view.action.model.expression;
public interface ActionModelContext{
public Object getProperty(String property);
public abstract Object getValue(String property);
public abstract String getCustomValue(String property);
public abstract Object getLibelle(String libelleKey);
public abstract Object getUser(String property);
public abstract Object getOrganisme(String property);
public abstract Object getSociete(String property);
public abstract Object getViewLibelle(String windowId, String labelId);
public abstract Object getViewLibelle(String labelId);
public abstract Object getViewComponetProperty(String windowId, String componetId, String property);
public abstract Object getViewComponetProperty(String componetId);
public abstract Object getPropertyApplication(String property);
public abstract Object getPropertyLibelle(String propertyId);
public abstract Object getRandom();
} | [
"alouiwiss@gmail.com"
] | alouiwiss@gmail.com |
ae7ecbc72dcac935ea4adfc5f4760ef63ebe4be3 | bd9b1304678c4e81defb7c60d91727eedf8183a7 | /src/main/java/com/test/netty/lesson6/connection/Client.java | bb782655f5064c4b1218a814a447069c2c28e2a0 | [] | no_license | harrypottry/nettydemo | b1d89549ae44eab0826118c991360ba7a21758c6 | 0338386d62202c038f0394e02e843900e7c9569c | refs/heads/main | 2023-07-02T04:10:59.921611 | 2021-08-10T07:47:49 | 2021-08-10T07:47:49 | 382,038,402 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,809 | java | package com.test.netty.lesson6.connection;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
/**
*
*/
public class Client {
private static final String SERVER_HOST = "127.0.0.1";
public static void main(String[] args) {
new Client().start(Server.BEGIN_PORT, Server.N_PORT);
}
public void start(final int beginPort, int nPort) {
System.out.println("client starting....");
EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
final Bootstrap bootstrap = new Bootstrap();
bootstrap.group(eventLoopGroup);
bootstrap.channel(NioSocketChannel.class);
bootstrap.option(ChannelOption.SO_REUSEADDR, true);
bootstrap.handler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel ch) {
}
});
int index = 0;
int port;
while (!Thread.interrupted()) {
port = beginPort + index;
try {
ChannelFuture channelFuture = bootstrap.connect(SERVER_HOST, port);
channelFuture.addListener(new ChannelFutureListener() {
public void operationComplete(ChannelFuture future) throws Exception {
if (!future.isSuccess()) {
System.out.println("connect failed, exit!");
System.exit(0);
}
}
});
channelFuture.get();
} catch (Exception e) {
}
if (port == nPort) { index = 0; }else { index ++; }
}
}
}
| [
"zjy_dhls1993@163.com"
] | zjy_dhls1993@163.com |
9139ad6152be08f256d732e8a223cb6b52df4cee | 3a81339ee39494fbd0250df6abc6411f386907f9 | /src/main/java/act/route/UrlPath.java | 61a09794e0dd3a52247d5baa8007a50dcf2be752 | [
"Apache-2.0"
] | permissive | zhaoyancong/actframework | cafba5687d78bbf78e4834b46168b1bd73e2a193 | d910531793047a75e7067fcaacbf7caebe58132c | refs/heads/master | 2021-01-13T05:01:11.170769 | 2017-02-07T07:40:46 | 2017-02-07T07:40:46 | 81,185,396 | 1 | 0 | null | 2017-02-07T08:34:16 | 2017-02-07T08:34:16 | null | UTF-8 | Java | false | false | 1,820 | java | package act.route;
import org.osgl.util.C;
import org.osgl.util.S;
import java.util.List;
/**
* Encapsulate the logic to compare an incoming URL path with a route entry path.
* <p>
* Note we can't do simple String match as route entry path might contains the dynamic part
* </p>
*/
class UrlPath {
static final String DYNA_PART = "";
private List<String> parts = C.newList();
UrlPath(CharSequence path) {
String s = path.toString();
String[] sa = s.split("/");
for (String item: sa) {
if (S.notBlank(item)) {
if (item.startsWith("{") || item.contains(":")) {
item = DYNA_PART;
}
parts.add(item);
}
}
}
boolean matches(CharSequence path) {
return equals(new UrlPath(path));
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof UrlPath) {
UrlPath that = (UrlPath) obj;
if (parts.size() != that.parts.size()) {
return false;
}
for (int i = parts.size() - 1; i >= 0; --i) {
if (!matches(parts.get(i), that.parts.get(i))) {
return false;
}
}
return true;
}
return false;
}
private static boolean matches(CharSequence cs1, CharSequence cs2) {
if (DYNA_PART.equals(cs1)) {
return true;
}
int len = cs1.length();
if (len != cs2.length()) {
return false;
}
for (int i = len - 1; i >= 0; --i) {
if (cs1.charAt(i) != cs2.charAt(i)) {
return false;
}
}
return true;
}
}
| [
"greenlaw110@gmail.com"
] | greenlaw110@gmail.com |
702a7b757ac62b42298bb943018bf1841addbcb7 | f662526b79170f8eeee8a78840dd454b1ea8048c | /io/netty/handler/codec/http/HttpMessage.java | eaa3d3c3189243d62b4d64da4eae827e5326f781 | [] | no_license | jason920612/Minecraft | 5d3cd1eb90726efda60a61e8ff9e057059f9a484 | 5bd5fb4dac36e23a2c16576118da15c4890a2dff | refs/heads/master | 2023-01-12T17:04:25.208957 | 2020-11-26T08:51:21 | 2020-11-26T08:51:21 | 316,170,984 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 450 | java | package io.netty.handler.codec.http;
public interface HttpMessage extends HttpObject {
@Deprecated
HttpVersion getProtocolVersion();
HttpVersion protocolVersion();
HttpMessage setProtocolVersion(HttpVersion paramHttpVersion);
HttpHeaders headers();
}
/* Location: F:\dw\server.jar!\io\netty\handler\codec\http\HttpMessage.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"jasonya2206@gmail.com"
] | jasonya2206@gmail.com |
bb767a3ae8ebd45fecaef9bd4277976352c2e503 | 4ca781c1f036a74365b5998c4be457a9d83ff9f0 | /chat-websockets-master/src/main/java/com/tatsinktechnologic/chat/security/AccessTokenFilter.java | 000234f4f0d36a4302692c2db2aa6ac0fd9bfcbb | [
"MIT",
"Apache-2.0"
] | permissive | olivier741/services | 30d9214de548af3f1599ee661ad4e3bfcee3ee47 | c73d139240f8490d58c4847cb4bf37a83b6c91f7 | refs/heads/service-v1.0 | 2023-01-22T10:52:36.284033 | 2020-05-11T19:57:22 | 2020-05-11T19:57:22 | 235,608,783 | 0 | 1 | Apache-2.0 | 2023-01-11T19:51:46 | 2020-01-22T15:58:52 | Java | UTF-8 | Java | false | false | 2,467 | java | package com.tatsinktechnologic.chat.security;
import javax.inject.Inject;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.security.Principal;
import java.util.Optional;
/**
* Access token filter for the chat websocket. Requests without are valid access token are refused with a <code>403</code>.
*
* @author olivier.tatsinkou
*/
@WebFilter("/chat/*")
public class AccessTokenFilter implements Filter {
@Inject
private Authenticator authenticator;
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) servletRequest;
HttpServletResponse response = (HttpServletResponse) servletResponse;
String token = request.getParameter("access-token");
if (token == null || token.trim().isEmpty()) {
returnForbiddenError(response, "An access token is required to connect");
return;
}
Optional<String> optionalUsername = authenticator.getUsernameFromToken(token);
if (optionalUsername.isPresent()) {
filterChain.doFilter(new AuthenticatedRequest(request, optionalUsername.get()), servletResponse);
} else {
returnForbiddenError(response, "Invalid access token");
}
}
private void returnForbiddenError(HttpServletResponse response, String message) throws IOException {
response.sendError(HttpServletResponse.SC_FORBIDDEN, message);
}
@Override
public void destroy() {
}
/**
* Wrapper for a {@link HttpServletRequest} which decorates a {@link HttpServletRequest} by adding a {@link Principal} to it.
*
* @author cassiomolin
*/
private static class AuthenticatedRequest extends HttpServletRequestWrapper {
private String username;
public AuthenticatedRequest(HttpServletRequest request, String username) {
super(request);
this.username = username;
}
@Override
public Principal getUserPrincipal() {
return () -> username;
}
}
} | [
"oliviertatsink@gmail.com"
] | oliviertatsink@gmail.com |
d192e8e3efae98550e12547fe025ac43e4786bdb | b5d014bd9f518ab06b304dd46abb3f9bdbae2b06 | /LAPR2-2020-G038/src/main/java/ui/CreateTaskUI.java | bf4c65ef356107ed7bf83d0c3d2032705ba95d51 | [] | no_license | antoniodanielbf-isep/LAPR2-2020 | 1d8828904188a99bc62b7de084d53dcabef64f7d | ef378f8606944dee306d1b22d3468ffa89f6f6a3 | refs/heads/main | 2023-06-03T10:20:01.672566 | 2021-06-20T18:18:29 | 2021-06-20T18:18:29 | 378,711,592 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,514 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ui;
import autorization.model.SessaoUtilizador;
import backlog.RegistFreelancer_IO;
import backlog.RegistOfOrganization_IO;
import backlog.TaskList_IO;
import controller.CreateTaskController;
import controller.FacadeController;
import java.io.IOException;
import static java.lang.Double.parseDouble;
import static java.lang.Integer.parseInt;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
import model.NotFoundException;
import model.Platform;
import model.RegistFreelancer;
import model.TaskList;
/**
* FXML Controller class
*
* @author LAPR2-2020-G038
*/
public class CreateTaskUI implements Initializable {
@FXML
private TextField Id;
@FXML
private TextField briefDesc;
@FXML
private TextField timeDuration;
@FXML
private TextField costPerHour;
@FXML
private TextField taskCategory;
@FXML
private Button Back;
@FXML
private Button Add;
@FXML
private TextField Freelancer;
/**
* Initializes the controller class.
*/
CreateTaskController taskL = new CreateTaskController();
TaskList_IO IOtask = new TaskList_IO();
RegistFreelancer_IO IOfree = new RegistFreelancer_IO();
RegistFreelancer Rfree = new RegistFreelancer();
TaskList_IO IOTask = new TaskList_IO();
RegistOfOrganization_IO IOorg = new RegistOfOrganization_IO();
RegisterFreelancerUI regUI = new RegisterFreelancerUI();
FacadeController f = new FacadeController();
Platform p = new Platform();
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
@FXML
private void Back(ActionEvent event) throws IOException {
((Node) event.getSource()).getScene().getWindow().hide();
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/RegisterFreelancer.fxml"));
Parent root = loader.load();
RegisterFreelancerUI FreeUI = loader.getController();
Stage stage = new Stage();
stage.setScene(new Scene(root));
stage.show();
}
@FXML
private void Add(ActionEvent event) throws NotFoundException {
taskL.startProcessOfAddTask(IOorg.read().getOrganizationByEmailCollaborator(f.getFacade().getSessaoAtual().getEmailUtilizador()).getColab());
taskL.addNewTask(Id.getText().trim(), briefDesc.getText().trim(), Integer.parseInt(timeDuration.getText().trim()),Double.parseDouble(costPerHour.getText().trim()) , taskCategory.getText().trim());
System.out.println(IOfree.read());
taskL.getTask().setFreelancer(IOfree.read().getFreelancerbyName(Freelancer.getText().trim()));
System.out.println(taskL.getTask());
System.out.println(taskL.getTask());
IOtask.write(taskL.getTl());
}
public FacadeController GetFacade() {
return f;
}
public void associate(RegisterFreelancerUI regUI) {
this.regUI = regUI;
f = regUI.GetFacade();
System.out.println(f.getFacade().getSessaoAtual().getEmailUtilizador());
}
}
| [
"1190402@isep.ipp.pt"
] | 1190402@isep.ipp.pt |
b8f689c408b0975cb61fe4990e89b420f7c6ab03 | 0d29c639f4c2d5d816bad3648a05a5e4830fb84d | /src/com/ttxgps/zxing/core/DecodeHandler.java | 1bfa385adf9fb9f7dc325835ff89f28b6ccf5791 | [] | no_license | 1812507678/kkbapp | 150102702837cbdaca097f917901c75efc5c9783 | 90f8e86cabb9e67990ec4ce840f635bce228cc70 | refs/heads/master | 2021-01-19T04:16:26.508570 | 2016-06-29T06:37:45 | 2016-06-29T06:37:45 | 61,786,438 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,346 | java | /*
* Copyright (C) 2010 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ttxgps.zxing.core;
import android.graphics.Bitmap;
import com.google.zxing.BinaryBitmap;
import com.google.zxing.DecodeHintType;
import com.google.zxing.LuminanceSource;
import com.google.zxing.MultiFormatReader;
import com.google.zxing.PlanarYUVLuminanceSource;
import com.google.zxing.ReaderException;
import com.google.zxing.Result;
import com.google.zxing.common.HybridBinarizer;
import com.xtst.gps.R;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.util.Log;
import java.util.Map;
final class DecodeHandler extends Handler {
private static final String TAG = DecodeHandler.class.getSimpleName();
private final CaptureActivity activity;
private final MultiFormatReader multiFormatReader;
private boolean running = true;
DecodeHandler(CaptureActivity activity, Map<DecodeHintType, Object> hints) {
multiFormatReader = new MultiFormatReader();
multiFormatReader.setHints(hints);
this.activity = activity;
}
@Override
public void handleMessage(Message message) {
if (!running) {
return;
}
switch (message.what) {
case R.id.decode:
decode((byte[]) message.obj, message.arg1, message.arg2);
break;
case R.id.quit:
running = false;
Looper.myLooper().quit();
break;
}
}
/**
* Decode the data within the viewfinder rectangle, and time how long it
* took. For efficiency, reuse the same reader objects from one decode to
* the next.
*
* @param data
* The YUV preview frame.
* @param width
* The width of the preview frame.
* @param height
* The height of the preview frame.
*/
private void decode(byte[] data, int width, int height) {
long start = System.currentTimeMillis();
Result rawResult = null;
// PlanarYUVLuminanceSource source =
// activity.getCameraManager().buildLuminanceSource(data, width,
// height);
// ------------------------------------
byte[] rotatedData = new byte[data.length];
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++)
rotatedData[x * height + height - y - 1] = data[x + y * width];
}
int tmp = width; // Here we are swapping, that's the difference to #11
width = height;
height = tmp;
PlanarYUVLuminanceSource source = activity.getCameraManager()
.buildLuminanceSource(rotatedData, width, height);
// ------------------------------------
if (source != null) {
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
try {
rawResult = multiFormatReader.decodeWithState(bitmap);
} catch (ReaderException re) {
// continue
} finally {
multiFormatReader.reset();
}
}
Handler handler = activity.getHandler();
if (rawResult != null) {
// Don't log the barcode contents for security.
long end = System.currentTimeMillis();
Log.d(TAG, "Found barcode in " + (end - start) + " ms");
if (handler != null) {
Message message = Message.obtain(handler,
R.id.decode_succeeded, rawResult);
Bundle bundle = new Bundle();
Bitmap grayscaleBitmap = toBitmap(source,
source.renderCroppedGreyscaleBitmap());
bundle.putParcelable(DecodeThread.BARCODE_BITMAP,
grayscaleBitmap);
message.setData(bundle);
message.sendToTarget();
}
} else {
if (handler != null) {
Message message = Message.obtain(handler, R.id.decode_failed);
message.sendToTarget();
}
}
}
private static Bitmap toBitmap(LuminanceSource source, int[] pixels) {
int width = source.getWidth();
int height = source.getHeight();
Bitmap bitmap = Bitmap.createBitmap(width, height,
Bitmap.Config.ARGB_8888);
bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
return bitmap;
}
}
| [
"1812507678@qq.com"
] | 1812507678@qq.com |
5238bd502bdbcdfb7eca18d8c4b99aafccca40e7 | 2023f5cf238e31d3d99b5e36715d80fe7af727b8 | /src/main/java/org/pstcl/ea/entity/meterTxnEntity/DailyTransactionForRemovedMeters.java | aca70353cc578dd6bc63df23a7d280ac36e1cba2 | [] | no_license | pstcl/EA2_S_BOOT | 868fd05e590130f0cd2e1f79ada2dfeabb36d45e | 86f5b7280261e1a68802aa8cbe5b40b75bc29719 | refs/heads/master | 2021-06-17T03:11:07.333025 | 2019-08-25T05:36:09 | 2019-08-25T05:36:09 | 197,333,708 | 0 | 0 | null | 2021-04-26T19:20:46 | 2019-07-17T07:00:44 | Java | UTF-8 | Java | false | false | 573 | java | package org.pstcl.ea.entity.meterTxnEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
@Entity
@Table(name = "DAILY_TRANSACTION_REMOVED_METERS",uniqueConstraints={@UniqueConstraint(columnNames={"METER_ID", "transactionDate"})})
public class DailyTransactionForRemovedMeters extends DailyTransactionMappedSuper{
public DailyTransactionForRemovedMeters()
{
super();
}
public DailyTransactionForRemovedMeters(DailyTransaction superInstance) {
super(superInstance);
}
}
| [
"40257916+pstcl@users.noreply.github.com"
] | 40257916+pstcl@users.noreply.github.com |
c2c07ceaeb4be198ff60a25609deaddc2f3798d5 | 278703a79a4f76b31c44f1188c8f6dd13400b130 | /src/ReplitHomework/CarInsuranceQuote.java | a605e028f65463737c5ccdcfe4e60ba46b379ece | [] | no_license | Ardinaa/CytekSDET2 | 5394e972cc3b2f0511df4b4c5df76c5acd3130bf | a81d0b462d77622b04f108084c2703bc24118c53 | refs/heads/master | 2020-06-04T02:09:42.114164 | 2019-06-13T20:41:40 | 2019-06-13T20:41:40 | 191,828,646 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 647 | java | package ReplitHomework;
import java.util.Scanner;
public class CarInsuranceQuote {
public static void main(String[] args) {
// TODO Auto-generated method stub
double premium = 0;
int accidentsAmount = 0;
int daysDrivenToWorkOrSchool = 0;
int milesToWorkOrSchool = 0;
String vehicleOwnership = "";
String vehicleUsage = "";
String continuousInsurance = "";
String education = "";
String name = "";
String referenceNumber = "";
Scanner scan = new Scanner(System.in);
System.out.println("Welcome to the CountyFarm car insurance!");
//WRITE YOUR CODE HERE
}
}
| [
"email"
] | email |
b4597c48ed14b428814630f84db31f6286f4c0f8 | 657fbaeb623b5b20470183b4565bd810a999925b | /alm_unidad_medidaalm_elementowc.java | d71aa33528f47b1565f2a450bdd1f4a20c81bbe8 | [] | no_license | tianaba95/orionsgenexus | b9b5c84b170cbe125b06596578d68c401faf06f7 | 6607e8b555d76281eead512fa7127e40a8042567 | refs/heads/master | 2020-03-21T06:03:23.341285 | 2018-06-21T16:33:19 | 2018-06-21T16:33:19 | 138,195,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,281 | java | /*
File: ALM_UNIDAD_MEDIDAALM_ELEMENTOWC
Description: ALM_UNIDAD_MEDIDAALM_ELEMENTOWC
Author: GeneXus Java Generator version 15_0_4-113785
Generated on: June 14, 2018 14:10:36.50
Program type: Callable routine
Main DBMS: oracle7
*/
package com.orions2 ;
import com.orions2.*;
import com.genexus.*;
import com.genexus.db.*;
import com.genexus.webpanels.*;
import java.sql.*;
import com.genexus.search.*;
@javax.servlet.annotation.WebServlet(value ="/servlet/com.orions2.alm_unidad_medidaalm_elementowc")
public final class alm_unidad_medidaalm_elementowc extends GXWebObjectStub
{
protected void doExecute( com.genexus.internet.HttpContext context ) throws Exception
{
new alm_unidad_medidaalm_elementowc_impl(context).doExecute();
}
protected void init( com.genexus.internet.HttpContext context )
{
new alm_unidad_medidaalm_elementowc_impl(context);
}
public String getServletInfo( )
{
return "ALM_UNIDAD_MEDIDAALM_ELEMENTOWC";
}
protected boolean IntegratedSecurityEnabled( )
{
return false;
}
protected int IntegratedSecurityLevel( )
{
return 0;
}
protected String IntegratedSecurityPermissionPrefix( )
{
return "";
}
}
| [
"tatiana.barrios@takcolombia.com"
] | tatiana.barrios@takcolombia.com |
638ba9a084423c11e1aa09a7517806651f730445 | 80d090e762c638d07a65de58312708b01e67d278 | /src/test/java/test/enhancement/PreGetIdTest.java | 529f2da044a1e20d4f575bc14f52c3aac0a9a1ad | [
"Apache-2.0"
] | permissive | ajcamilo/ebean-agent | 4c5b781a1b19ad372bfffbd6f14492db0bb95b67 | f194eeef802dab6ff64f6eab8375ef99f3898e61 | refs/heads/master | 2021-01-23T12:22:06.225631 | 2017-06-26T16:58:42 | 2017-06-26T16:58:42 | 93,152,908 | 0 | 0 | null | 2017-06-02T10:01:06 | 2017-06-02T10:01:06 | null | UTF-8 | Java | false | false | 537 | java | package test.enhancement;
import io.ebean.bean.EntityBean;
import org.testng.annotations.Test;
import test.model.AMappedSuperChild;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
public class PreGetIdTest extends BaseTest {
@Test
public void test() {
AMappedSuperChild bean = new AMappedSuperChild();
EntityBean eb = (EntityBean)bean;
assertFalse(eb._ebean_getIntercept().isCalledGetId());
bean.getId();
assertTrue(eb._ebean_getIntercept().isCalledGetId());
}
}
| [
"robin.bygrave@gmail.com"
] | robin.bygrave@gmail.com |
c56710abc0495c45564ac00b4a50458b7af6b3fb | 23cc963092bb93e4b0b6531747a40bbcfaea20fb | /Server/src/main/java/ar/com/adriabe/model/constant/ACTION_TYPE.java | a317abbc92bf762bc942bde84dc55528e744053b | [] | no_license | MildoCentaur/billing | 819927d1695fde31b26451b4223fcf513d35e376 | 6c37bf3f476d326404cf70f4fd72740028eb3d01 | refs/heads/master | 2021-01-11T04:18:26.568172 | 2017-02-10T03:44:12 | 2017-02-10T03:44:12 | 71,210,731 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 936 | java | package ar.com.adriabe.model.constant;
public enum ACTION_TYPE {
CREATE("Crear",1),
READ("Consultar",2),
UPDATE("Modificar",3),
DELETE("Borrar",4),
PRINT("Imprimir",5);
private final String label; // in kilograms
private final int value; // in meters
ACTION_TYPE(String l, int v) {
this.label = l;
this.value = v;
}
/**
* @return the label
*/
public String getLabel() {
return label;
}
/**
* @return the value
*/
public int getValue() {
return value;
}
static public ACTION_TYPE getActionTypeFromString(String str){
str=str.toLowerCase();
if(str.equalsIgnoreCase("read") || str.equalsIgnoreCase("find") || str.equalsIgnoreCase("get")){
return READ;
}
if(str.equalsIgnoreCase("save")){
return CREATE;
}
if(str.equalsIgnoreCase("saveOrUpdate")){
return UPDATE;
}
if(str.equalsIgnoreCase("DELETE")){
return DELETE;
}
return null;
}
}
| [
"alejandro.mildiner@gmail.com"
] | alejandro.mildiner@gmail.com |
ca82f8519336e01ca73245c5efd40b24668f503a | 3fc7c3d4a697c418bad541b2ca0559b9fec03db7 | /TestResult/javasource/com/behance/sdk/files/ImageAlbum.java | 04fecd6c4419b4d4efc4dae045d0675267e612c7 | [] | no_license | songxingzai/APKAnalyserModules | 59a6014350341c186b7788366de076b14b8f5a7d | 47cf6538bc563e311de3acd3ea0deed8cdede87b | refs/heads/master | 2021-12-15T02:43:05.265839 | 2017-07-19T14:44:59 | 2017-07-19T14:44:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 598 | java | package com.behance.sdk.files;
import com.behance.sdk.project.modules.ImageModule;
import java.util.ArrayList;
import java.util.List;
public class ImageAlbum
{
private String albumName;
private List<ImageModule> images;
public ImageAlbum(String paramString)
{
albumName = paramString;
}
public void addImage(ImageModule paramImageModule)
{
if (images == null) {
images = new ArrayList();
}
images.add(paramImageModule);
}
public List<ImageModule> getImages()
{
return images;
}
public String getName()
{
return albumName;
}
}
| [
"leehdsniper@gmail.com"
] | leehdsniper@gmail.com |
15acd51cd27ae027fac85437b45c9023d457b7ee | c6b802a4f691d20bf0c50900ea31618818aff9b5 | /src/main/java/com/jianzixing/webapp/service/wechat/model/OAuthAccessTokenConfig.java | 48e027520e104b88049f4266f1454300ea75308e | [] | no_license | zzk2020/jianzixing-wechat | 9d8152f457e6999cc4c2700b0ffd5be7c93c34e4 | 1471069919d2c6c0505a1a8abeb3607b0d81c644 | refs/heads/master | 2022-03-21T14:28:51.670020 | 2019-09-09T03:45:49 | 2019-09-09T03:45:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 970 | java | package com.jianzixing.webapp.service.wechat.model;
public class OAuthAccessTokenConfig {
private String publicAccountCode;
/**
* 填写第一步获取的code参数
* 第一步跳转后微信url带入
*/
private String code;
private String state;
private String grantType = "authorization_code";
public String getPublicAccountCode() {
return publicAccountCode;
}
public void setPublicAccountCode(String publicAccountCode) {
this.publicAccountCode = publicAccountCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getGrantType() {
return grantType;
}
public void setGrantType(String grantType) {
this.grantType = grantType;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
}
| [
"yak1992@foxmail.com"
] | yak1992@foxmail.com |
cec6a918f01c469fd37b8016c4a290c1ed21f177 | 57d94e2a408f42163fee903e3bbbe19e38982b78 | /modules/basics/src/main/java/com/opengamma/strata/basics/index/IborIndex.java | 7f6bfbe15e6d9a75d468e22a4c182229af34be0f | [
"Apache-2.0"
] | permissive | NESO-NewSolutions/Strata | d645a8a843dd757c74c388fa15350481fc6e7a7e | 47c1cea2208e79b9d1073b29edad3d3dcb6a16f3 | refs/heads/master | 2021-01-15T08:58:34.032738 | 2016-01-12T15:49:59 | 2016-01-12T15:49:59 | 46,461,209 | 0 | 1 | null | 2015-11-19T02:11:40 | 2015-11-19T02:11:39 | null | UTF-8 | Java | false | false | 6,192 | java | /**
* Copyright (C) 2014 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.strata.basics.index;
import java.time.LocalDate;
import org.joda.convert.FromString;
import org.joda.convert.ToString;
import com.opengamma.strata.basics.date.DayCount;
import com.opengamma.strata.basics.date.DaysAdjustment;
import com.opengamma.strata.basics.date.HolidayCalendar;
import com.opengamma.strata.basics.date.Tenor;
import com.opengamma.strata.basics.date.TenorAdjustment;
import com.opengamma.strata.collect.ArgChecker;
import com.opengamma.strata.collect.named.ExtendedEnum;
import com.opengamma.strata.collect.named.Named;
/**
* An inter-bank lending rate index, such as Libor or Euribor.
* <p>
* An index represented by this class relates to inter-bank lending for periods
* from one day to one year. They are typically calculated and published as the
* trimmed arithmetic mean of estimated rates contributed by banks.
* <p>
* The index is defined by three dates.
* The fixing date is the date on which the index is to be observed.
* The effective date is the date on which the implied deposit starts.
* The maturity date is the date on which the implied deposit ends.
* <p>
* The most common implementations are provided in {@link IborIndices}.
* <p>
* All implementations of this interface must be immutable and thread-safe.
*/
public interface IborIndex
extends RateIndex, Named {
/**
* Obtains an instance from the specified unique name.
*
* @param uniqueName the unique name
* @return the index
* @throws IllegalArgumentException if the name is not known
*/
@FromString
public static IborIndex of(String uniqueName) {
ArgChecker.notNull(uniqueName, "uniqueName");
return extendedEnum().lookup(uniqueName);
}
/**
* Gets the extended enum helper.
* <p>
* This helper allows instances of the index to be looked up.
* It also provides the complete set of available instances.
*
* @return the extended enum helper
*/
public static ExtendedEnum<IborIndex> extendedEnum() {
return IborIndices.ENUM_LOOKUP;
}
//-------------------------------------------------------------------------
/**
* Gets the day count convention of the index.
*
* @return the day count convention
*/
public abstract DayCount getDayCount();
/**
* Gets the fixing calendar of the index.
* <p>
* The rate will be fixed on each business day in this calendar.
*
* @return the currency pair of the index
*/
public abstract HolidayCalendar getFixingCalendar();
/**
* Gets the tenor of the index.
*
* @return the tenor
*/
public abstract Tenor getTenor();
//-------------------------------------------------------------------------
/**
* Calculates the effective date from the fixing date.
* <p>
* The fixing date is the date on which the index is to be observed.
* The effective date is the date on which the implied deposit starts.
* <p>
* No error is thrown if the input date is not a valid fixing date.
* Instead, the fixing date is moved to the next valid fixing date and then processed.
*
* @param fixingDate the fixing date
* @return the effective date
*/
public abstract LocalDate calculateEffectiveFromFixing(LocalDate fixingDate);
/**
* Calculates the fixing date from the effective date.
* <p>
* The fixing date is the date on which the index is to be observed.
* The effective date is the date on which the implied deposit starts.
* <p>
* No error is thrown if the input date is not a valid effective date.
* Instead, the effective date is moved to the next valid effective date and then processed.
*
* @param effectiveDate the effective date
* @return the fixing date
*/
public abstract LocalDate calculateFixingFromEffective(LocalDate effectiveDate);
/**
* Calculates the maturity date from the effective date.
* <p>
* The effective date is the date on which the implied deposit starts.
* The maturity date is the date on which the implied deposit ends.
* <p>
* No error is thrown if the input date is not a valid effective date.
* Instead, the effective date is moved to the next valid effective date and then processed.
*
* @param effectiveDate the effective date
* @return the maturity date
*/
public abstract LocalDate calculateMaturityFromEffective(LocalDate effectiveDate);
//-----------------------------------------------------------------------
/**
* Gets the adjustment applied to the effective date to obtain the fixing date.
* <p>
* The fixing date is the date on which the index is to be observed.
* In most cases, the fixing date is 0 or 2 days before the effective date.
* This data structure allows the complex rules of some indices to be represented.
*
* @return the fixing date offset
*/
public abstract DaysAdjustment getFixingDateOffset();
/**
* Gets the adjustment applied to the fixing date to obtain the effective date.
* <p>
* The effective date is the start date of the indexed deposit.
* In most cases, the effective date is 0 or 2 days after the fixing date.
* This data structure allows the complex rules of some indices to be represented.
*
* @return the effective date offset
*/
public abstract DaysAdjustment getEffectiveDateOffset();
/**
* Gets the adjustment applied to the effective date to obtain the maturity date.
* <p>
* The maturity date is the end date of the indexed deposit and is relative to the effective date.
* This data structure allows the complex rules of some indices to be represented.
*
* @return the tenor date offset
*/
public abstract TenorAdjustment getMaturityDateOffset();
//-------------------------------------------------------------------------
/**
* Gets the name that uniquely identifies this index.
* <p>
* This name is used in serialization and can be parsed using {@link #of(String)}.
*
* @return the unique name
*/
@ToString
@Override
public abstract String getName();
}
| [
"stephen@opengamma.com"
] | stephen@opengamma.com |
15b21018067e37bfe8b9f32f874cf79d3c30dea5 | 7bc72575058e323e9424bc67310557fbff6ecb8f | /rest/src/main/java/org/elasticsearch/client/rest/RequestLogger.java | 8426f2b5652cda0139d54fc935d9a9ac97fcf246 | [] | no_license | jprante/elasticsearch-client | 1c3561f217c5893174c177ac40e0005ac32c7e40 | 6714a9c11cc1f902e1b9e741388c66a967e35c67 | refs/heads/master | 2023-08-14T18:39:09.909184 | 2018-11-28T08:56:04 | 2018-11-28T08:56:04 | 5,710,780 | 16 | 17 | null | 2016-02-06T08:15:37 | 2012-09-07T01:06:46 | Java | UTF-8 | Java | false | false | 7,188 | java | /*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.client.rest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.RequestLine;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.util.EntityUtils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* Helper class that exposes static methods to unify the way requests are logged.
* Includes trace logging to log complete requests and responses in curl format.
* Useful for debugging, manually sending logged requests via curl and checking their responses.
* Trace logging is a feature that all the language clients provide.
*/
public final class RequestLogger {
private static final Log tracer = LogFactory.getLog("tracer");
private RequestLogger() {
}
/**
* Logs a request that yielded a response
*/
public static void logResponse(Log logger, HttpUriRequest request, HttpHost host, HttpResponse httpResponse) {
if (logger.isDebugEnabled()) {
logger.debug("request [" + request.getMethod() + " " + host + getUri(request.getRequestLine()) +
"] returned [" + httpResponse.getStatusLine() + "]");
}
if (logger.isWarnEnabled()) {
Header[] warnings = httpResponse.getHeaders("Warning");
if (warnings != null && warnings.length > 0) {
logger.warn(buildWarningMessage(request, host, warnings));
}
}
if (tracer.isTraceEnabled()) {
String requestLine;
try {
requestLine = buildTraceRequest(request, host);
} catch(IOException e) {
requestLine = "";
tracer.trace("error while reading request for trace purposes", e);
}
String responseLine;
try {
responseLine = buildTraceResponse(httpResponse);
} catch(IOException e) {
responseLine = "";
tracer.trace("error while reading response for trace purposes", e);
}
tracer.trace(requestLine + '\n' + responseLine);
}
}
/**
* Logs a request that failed
*/
public static void logFailedRequest(Log logger, HttpUriRequest request, HttpHost host, Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("request [" + request.getMethod() + " " + host + getUri(request.getRequestLine()) + "] failed", e);
}
if (tracer.isTraceEnabled()) {
String traceRequest;
try {
traceRequest = buildTraceRequest(request, host);
} catch (IOException e1) {
tracer.trace("error while reading request for trace purposes", e);
traceRequest = "";
}
tracer.trace(traceRequest);
}
}
public static String buildWarningMessage(HttpUriRequest request, HttpHost host, Header[] warnings) {
StringBuilder message = new StringBuilder("request [").append(request.getMethod()).append(" ").append(host)
.append(getUri(request.getRequestLine())).append("] returned ").append(warnings.length).append(" warnings: ");
for (int i = 0; i < warnings.length; i++) {
if (i > 0) {
message.append(",");
}
message.append("[").append(warnings[i].getValue()).append("]");
}
return message.toString();
}
/**
* Creates curl output for given request
*/
public static String buildTraceRequest(HttpUriRequest request, HttpHost host) throws IOException {
String requestLine = "curl -iX " + request.getMethod() + " '" + host + getUri(request.getRequestLine()) + "'";
if (request instanceof HttpEntityEnclosingRequest) {
HttpEntityEnclosingRequest enclosingRequest = (HttpEntityEnclosingRequest) request;
if (enclosingRequest.getEntity() != null) {
requestLine += " -d '";
HttpEntity entity = enclosingRequest.getEntity();
if (entity.isRepeatable() == false) {
entity = new BufferedHttpEntity(enclosingRequest.getEntity());
enclosingRequest.setEntity(entity);
}
requestLine += EntityUtils.toString(entity, StandardCharsets.UTF_8) + "'";
}
}
return requestLine;
}
/**
* Creates curl output for given response
*/
public static String buildTraceResponse(HttpResponse httpResponse) throws IOException {
StringBuilder responseLine = new StringBuilder();
responseLine.append("# ").append(httpResponse.getStatusLine());
for (Header header : httpResponse.getAllHeaders()) {
responseLine.append("\n# ").append(header.getName()).append(": ").append(header.getValue());
}
responseLine.append("\n#");
HttpEntity entity = httpResponse.getEntity();
if (entity != null) {
if (entity.isRepeatable() == false) {
entity = new BufferedHttpEntity(entity);
}
httpResponse.setEntity(entity);
ContentType contentType = ContentType.get(entity);
Charset charset = StandardCharsets.UTF_8;
if (contentType != null && contentType.getCharset() != null) {
charset = contentType.getCharset();
}
try (BufferedReader reader = new BufferedReader(new InputStreamReader(entity.getContent(), charset))) {
String line;
while( (line = reader.readLine()) != null) {
responseLine.append("\n# ").append(line);
}
}
}
return responseLine.toString();
}
private static String getUri(RequestLine requestLine) {
if (requestLine.getUri().charAt(0) != '/') {
return "/" + requestLine.getUri();
}
return requestLine.getUri();
}
}
| [
"joergprante@gmail.com"
] | joergprante@gmail.com |
e7044a7b068badc9e51b4fb3baa2919efa9a379d | 5401bde84eeabde31b36f2cba825411cf419157b | /spring-angular-registration/src/main/java/com/wissensalt/test/sar/SpringAngularRegistrationApplication.java | 485ad8b6e25623bb5e5a1a0aac86de39f8917741 | [] | no_license | wissensalt/springboot-angular-registration | b3764bf53ed1d11eb2db8ad61fa725be0b19c314 | aa61f9fc5804073ad0723b5080fee17a18fd3137 | refs/heads/master | 2020-05-22T09:38:34.485320 | 2019-05-13T10:38:45 | 2019-05-13T10:38:45 | 186,294,784 | 9 | 15 | null | null | null | null | UTF-8 | Java | false | false | 757 | java | package com.wissensalt.test.sar;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/*@ComponentScan(basePackages = {
"com.wissensalt.test.sar.dao",
"com.wissensalt.test.sar.endpoint",
"com.wissensalt.test.sar.service",
"com.wissensalt.test.sar.mapper",
"com.wissensalt.test.sar.validation",
}, lazyInit = true)
@EntityScan(basePackages = {"com.wissensalt.test.sar.model"})
@EnableJpaRepositories(basePackages = {"com.wissensalt.test.sar.dao"})*/
@SpringBootApplication
public class SpringAngularRegistrationApplication {
public static void main(String[] args) {
SpringApplication.run(SpringAngularRegistrationApplication.class, args);
}
}
| [
"fauzi.knightmaster.achmad@gmail.com"
] | fauzi.knightmaster.achmad@gmail.com |
f7d0a0cb0d5c853d17311d66ed9e80ea6a4326f4 | 501989f313f923b069c9c1b06a507463ab946e2b | /src/com/jspgou/cms/action/admin/LoginAct.java | f3c8874206c9e8f3538907b957642dd3c2ba2347 | [] | no_license | xrogzu/shop | fded93f9dbc801ff983362fc10d33ad7a8c07fad | 17568c709f64323e2b0dce06f4bc3d600a8157f8 | refs/heads/master | 2021-04-12T08:48:48.082699 | 2017-07-24T06:11:52 | 2017-07-24T06:16:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,584 | java | package com.jspgou.cms.action.admin;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.jspgou.common.security.BadCredentialsException;
import com.jspgou.common.security.UsernameNotFoundException;
import com.jspgou.core.entity.Website;
import com.jspgou.core.security.UserNotInWebsiteException;
import com.jspgou.core.web.WebErrors;
import com.jspgou.cms.entity.ShopAdmin;
import com.jspgou.cms.service.LoginSvc;
import com.jspgou.cms.web.SiteUtils;
import com.jspgou.cms.web.threadvariable.AdminThread;
/**
* This class should preserve.
* @preserve
*/
@Controller
public class LoginAct {
private static final Logger log = LoggerFactory.getLogger(LoginAct.class);
@RequestMapping(value = "/index.do", method = RequestMethod.GET)
public String index(ModelMap model) {
ShopAdmin admin = AdminThread.get();
if (admin != null) {
model.addAttribute("admin", admin);
return "index";
} else {
return "login";
}
}
@RequestMapping(value = "/login.do", method = RequestMethod.GET)
public String input(HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
return "login";
}
@RequestMapping(value = "/login.do", method = RequestMethod.POST)
public String submit(String username, String password,HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
// Object error = request.getAttribute(DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
// if (error != null) {
// model.addAttribute("error", error);
// }
WebErrors errors = validateSubmit(username,request,response);
if (!errors.hasErrors()) {
Website web = SiteUtils.getWeb(request);
try {
loginSvc.adminLogin(request, response, web, username, password);
log.info("admin '{}' login success.", username);
return "redirect:index.do";
} catch (UsernameNotFoundException e) {
errors.addError(e.getMessage());
log.info(e.getMessage());
} catch (BadCredentialsException e) {
// if(!username.trim().equals("admin")||SiteUtils.getWeb(request).getGlobal().getErrorTimes()==0){
// AdminMap.addAdminMapVal(username);
// }
errors.addError(e.getMessage());
log.info(e.getMessage());
} catch (UserNotInWebsiteException e) {
errors.addError(e.getMessage());
log.info(e.getMessage());
}
}
// if(errors!=null){
// userMng.errorRemaing(username,request);
// }
errors.toModel(model);
return "login";
}
@RequestMapping("/logout.do")
public String logout(HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
loginSvc.logout(request, response);
return "redirect:index.do";
}
private WebErrors validateSubmit(String username,HttpServletRequest request,HttpServletResponse response) {
// System.out.println("7777");
WebErrors errors = WebErrors.create(request);
// Integer errCount=AdminMap.getAdminMapVal(username);
// if(errCount!=null&&errCount>=SiteUtils.getWeb(request).getGlobal().getErrorTimes()){
// errors.addError("你的账号被锁定!,"+SiteUtils.getWeb(request).getGlobal().getErrorInterval()+"分钟后,自动解锁");
// return errors;
// }
return errors;
}
@Autowired
private LoginSvc loginSvc;
// @Autowired
// private UserMng userMng;
}
| [
"he.tang@everydayratings.com"
] | he.tang@everydayratings.com |
4bb044165258bbe68fc47bdb20b5ad02e8589fee | 8a8b503260ac07593c36b1619e3387ff71b63602 | /savegame-editor/src/main/java/nl/paulinternet/gtasaveedit/view/Main.java | b28d67b3cc3849e54f6d7151c7ac3af658d35102 | [
"MIT"
] | permissive | CyberSys/gtasa-savegame-editor | 822a70136a4213f7321627ba837b7aa69e29e9a6 | 12162c4c1729354bfd88461e5fef882a53ba8664 | refs/heads/main | 2023-04-16T22:29:22.762043 | 2021-04-06T16:09:51 | 2021-04-06T16:09:51 | 369,689,417 | 0 | 0 | MIT | 2021-05-22T01:22:42 | 2021-05-22T01:22:42 | null | UTF-8 | Java | false | false | 3,087 | java | package nl.paulinternet.gtasaveedit.view;
import nl.paulinternet.gtasaveedit.view.updater.Updater;
import nl.paulinternet.gtasaveedit.view.window.AboutWindow;
import nl.paulinternet.gtasaveedit.view.window.ExceptionDialog;
import nl.paulinternet.gtasaveedit.view.window.MainWindow;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
private static final Logger log = LoggerFactory.getLogger(Main.class);
public static final boolean WINDOWS = System.getProperty("os.name").toLowerCase().startsWith("windows");
public static final boolean MAC = System.getProperty("os.name").toLowerCase().startsWith("mac");
public static final boolean LINUX = System.getProperty("os.name").toLowerCase().startsWith("linux");
public static void main(String[] args) {
try {
// OS X specific
if (MAC) {
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "GTA:SA Savegame Editor");
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("apple.awt.application.appearance", "system");
System.setProperty("apple.awt.application.name", "GTA:SA Savegame Editor");
Taskbar.getTaskbar().setIconImage(Images.readImage("icon-256.png"));
Desktop.getDesktop().setPreferencesHandler(pe -> MainWindow.getInstance().getTabbedPane().onShowPreferences());
Desktop.getDesktop().setAboutHandler(aboutEvent -> AboutWindow.get().setVisible(true));
}
// setup look and feel
try {
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("GTK+".equals(info.getName()) || "Windows".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
log.error("Unable to set theme!", ex);
}
// Set the icons
List<Image> images = new ArrayList<>(Arrays.asList(Images.readImage("icon-16.png"),
Images.readImage("icon-32.png"),
Images.readImage("icon-48.png")));
MainWindow.getInstance().setIconImages(images);
// Create GUI
GUICreator guiCreator = new GUICreator();
SwingUtilities.invokeAndWait(guiCreator);
SwingUtilities.invokeAndWait(guiCreator); // not a typo, it has to be invoked twice.
// Load images
Images.loadImages();
Updater.start();
} catch (Throwable e) {
e.printStackTrace();
new ExceptionDialog(e).setVisible(true);
}
}
}
| [
"lukas@k40s.net"
] | lukas@k40s.net |
16d34bbdccf9d7ee9db2f57ba8f2ef75bf37409d | 75ccb6dc4fdf0a8abca2b8575829ec4e68b5accc | /src/Book/FictionBook.java | 6a53cc847d8a51ae5824ab2b0f5f0763f7bef770 | [] | no_license | NguyenVanDat2010/Mo2_w2_Book | c61a292d7efa7bdaad7a07595ce93a801f374fea | ea781a365273d225e8f4a3583c5ff2fdfccba944 | refs/heads/master | 2022-06-11T03:11:57.619742 | 2020-05-08T04:10:28 | 2020-05-08T04:10:28 | 261,517,578 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 841 | java | package Book;
public class FictionBook extends Book{
private String category;
public FictionBook(){}
public FictionBook(String category) {
this.category = category;
}
public FictionBook(String name,double price,String category){
super(name, price);
this.category=category;
}
public FictionBook(String bookCode, String name, double price, String author, String category) {
super(bookCode, name, price, author);
this.category = category;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
@Override
public String toString(){
return "A book, There are name: "+super.getName()+", Price: "+super.getPrice()+" and Category: "+getCategory();
}
}
| [
"datdhvinh@gmail.com"
] | datdhvinh@gmail.com |
cad5e81ffb69148b8f73ef7583b86a3047b625b6 | 893bdc59bb8ff233ad4567182a04ff23a4ee13ae | /spring/spring3/SpringDev/src/com/rueggerllc/jdbc/JdbcAccountRepository.java | ec93f141c19b5261c52dc46e2e27a58d4afbdb27 | [] | no_license | rueggerc/rueggerllc-public | 33f5396f04a423a62f6c7e7124fa02c8f455c2c8 | a86950de18c1d5ec23aaf1051268f297b4bc4f78 | refs/heads/master | 2021-01-13T14:38:17.480642 | 2017-10-10T22:14:30 | 2017-10-10T22:14:30 | 76,731,748 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,441 | java | package com.rueggerllc.jdbc;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.apache.log4j.Logger;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import com.rueggerllc.jdbc.domain.Account;
public class JdbcAccountRepository {
private static Logger logger = Logger.getLogger(JdbcAccountRepository.class);
private JdbcTemplate jdbcTemplate;
public JdbcAccountRepository(DataSource dataSource) {
this.jdbcTemplate = new JdbcTemplate(dataSource);
}
public int getNumberOfAccounts() throws DataAccessException {
String sql = "select count(*) from account";
return jdbcTemplate.queryForInt(sql);
}
public int getHighStatusAccounts(int status) throws DataAccessException {
String sql = "select count(*) from account where status >= ?";
return jdbcTemplate.queryForInt(sql, status);
}
public Map getAccount(int accountId) throws DataAccessException {
String sql = "select * from account where id=?";
return jdbcTemplate.queryForMap(sql, accountId);
}
public List getAccounts() throws DataAccessException {
String sql = "select * from account";
return jdbcTemplate.queryForList(sql);
}
public Account getAccountObject(int id) throws DataAccessException {
return jdbcTemplate.queryForObject("select * from account where id =?", new AccountMapper(), id);
}
public List<Account> getAccountObjects() throws DataAccessException {
return jdbcTemplate.query("select * from account", new AccountMapper());
}
public int insertAccount(Account account) {
int accountId = this.getMaxAccountId() + 1;
logger.info("New Account ID=" + accountId);
return jdbcTemplate.update(
"insert into account(id,name,address,state,zip,create_date,status) " +
"values(?,?,?,?,?,?,?)",
accountId,
account.getName(),
account.getAddress(),
account.getState(),
account.getZip(),
account.getCreateDate(),
account.getStatus());
}
public int updateAccount(Account account) {
return jdbcTemplate.update(
"update account set name=?,address=?,state=?,zip=?,create_date=?,status=? where id=?",
account.getName(),
account.getAddress(),
account.getState(),
account.getZip(),
account.getCreateDate(),
account.getStatus(),
account.getId());
}
private int getMaxAccountId() {
String sql = "select max(id) from account";
return jdbcTemplate.queryForInt(sql);
}
}
| [
"chris.ruegger@gmail.com"
] | chris.ruegger@gmail.com |
b00fbf709275b36ae15db19e09a2a49aa247221c | b2854b4c00a0faf27cbe7655e89db8c3591418c9 | /material-elements/java/com/zeoflow/material/elements/transition/FitModeEvaluators.java | a4ddb15b41ce0a98ccf23776d830c0cd87d9f16b | [
"Apache-2.0"
] | permissive | pittayabuakhaw/material-elements | 1eddc95416944198a6aa34b913192735e48375dc | 28519b2375177afff39d64b9b816c40392f074bb | refs/heads/main | 2023-04-30T13:22:55.906142 | 2021-04-23T17:42:04 | 2021-04-23T17:42:04 | 363,487,347 | 0 | 0 | Apache-2.0 | 2021-05-01T19:24:55 | 2021-05-01T19:07:03 | null | UTF-8 | Java | false | false | 5,362 | java | /*
* Copyright 2020 ZeoFlow
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.zeoflow.material.elements.transition;
import android.graphics.RectF;
import com.zeoflow.material.elements.transition.MaterialContainerTransform.FitMode;
import static com.zeoflow.material.elements.transition.MaterialContainerTransform.FIT_MODE_AUTO;
import static com.zeoflow.material.elements.transition.MaterialContainerTransform.FIT_MODE_HEIGHT;
import static com.zeoflow.material.elements.transition.MaterialContainerTransform.FIT_MODE_WIDTH;
class FitModeEvaluators
{
private static final FitModeEvaluator WIDTH =
new FitModeEvaluator()
{
@Override
public FitModeResult evaluate(
float progress,
float scaleStartFraction,
float scaleEndFraction,
float startWidth,
float startHeight,
float endWidth,
float endHeight)
{
// Use same width for start/end views; calculate heights using respective aspect ratios.
float currentWidth =
TransitionUtils.lerp(startWidth, endWidth, scaleStartFraction, scaleEndFraction, progress);
float startScale = currentWidth / startWidth;
float endScale = currentWidth / endWidth;
float currentStartHeight = startHeight * startScale;
float currentEndHeight = endHeight * endScale;
return new FitModeResult(
startScale,
endScale,
currentWidth,
currentStartHeight,
currentWidth,
currentEndHeight);
}
@Override
public boolean shouldMaskStartBounds(FitModeResult fitModeResult)
{
return fitModeResult.currentStartHeight > fitModeResult.currentEndHeight;
}
@Override
public void applyMask(RectF maskBounds, float maskMultiplier, FitModeResult fitModeResult)
{
float currentHeightDiff =
Math.abs(fitModeResult.currentEndHeight - fitModeResult.currentStartHeight);
maskBounds.bottom -= currentHeightDiff * maskMultiplier;
}
};
private static final FitModeEvaluator HEIGHT =
new FitModeEvaluator()
{
@Override
public FitModeResult evaluate(
float progress,
float scaleStartFraction,
float scaleEndFraction,
float startWidth,
float startHeight,
float endWidth,
float endHeight)
{
// Use same height for start/end views; calculate widths using respective aspect ratios.
float currentHeight =
TransitionUtils.lerp(startHeight, endHeight, scaleStartFraction, scaleEndFraction, progress);
float startScale = currentHeight / startHeight;
float endScale = currentHeight / endHeight;
float currentStartWidth = startWidth * startScale;
float currentEndWidth = endWidth * endScale;
return new FitModeResult(
startScale,
endScale,
currentStartWidth,
currentHeight,
currentEndWidth,
currentHeight);
}
@Override
public boolean shouldMaskStartBounds(FitModeResult fitModeResult)
{
return fitModeResult.currentStartWidth > fitModeResult.currentEndWidth;
}
@Override
public void applyMask(RectF maskBounds, float maskMultiplier, FitModeResult fitModeResult)
{
float currentWidthDiff =
Math.abs(fitModeResult.currentEndWidth - fitModeResult.currentStartWidth);
maskBounds.left += currentWidthDiff / 2 * maskMultiplier;
maskBounds.right -= currentWidthDiff / 2 * maskMultiplier;
}
};
private FitModeEvaluators()
{
}
static FitModeEvaluator get(
@FitMode int fitMode, boolean entering, RectF startBounds, RectF endBounds)
{
switch (fitMode)
{
case FIT_MODE_AUTO:
return shouldAutoFitToWidth(entering, startBounds, endBounds) ? WIDTH : HEIGHT;
case FIT_MODE_WIDTH:
return WIDTH;
case FIT_MODE_HEIGHT:
return HEIGHT;
default:
throw new IllegalArgumentException("Invalid fit mode: " + fitMode);
}
}
private static boolean shouldAutoFitToWidth(
boolean entering, RectF startBounds, RectF endBounds)
{
float startWidth = startBounds.width();
float startHeight = startBounds.height();
float endWidth = endBounds.width();
float endHeight = endBounds.height();
float endHeightFitToWidth = endHeight * startWidth / endWidth;
float startHeightFitToWidth = startHeight * endWidth / startWidth;
return entering ? endHeightFitToWidth >= startHeight : startHeightFitToWidth >= endHeight;
}
}
| [
"grigor.teodor@gmail.com"
] | grigor.teodor@gmail.com |
ed8ebc71fdd3ad860d2b7409d2ca741a03939420 | ddec46506cbdee03b495b7bc287b14abab12c701 | /jdk1.8/src/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java | f9793432f952ffeff0be4c96243979da6ae74419 | [] | no_license | kvenLin/JDK-Source | f86737d3761102933c4b87730bca8928a5885287 | 1ff43b09f1056d91de97356be388d58c98ba1982 | refs/heads/master | 2023-08-10T11:26:59.051952 | 2023-07-20T06:48:45 | 2023-07-20T06:48:45 | 161,105,850 | 60 | 24 | null | 2022-06-17T02:19:27 | 2018-12-10T02:37:12 | Java | UTF-8 | Java | false | false | 3,546 | java | /*
* Copyright (c) 2007-2012, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 2001, 2002,2004 The Apache Software Foundation.
*
* 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.sun.org.apache.xerces.internal.impl.dv;
import java.util.Vector;
import com.sun.org.apache.xerces.internal.xs.XSAnnotation;
import com.sun.org.apache.xerces.internal.xs.XSObjectList;
import com.sun.org.apache.xerces.internal.impl.xs.util.XSObjectListImpl;
/**
* The class used to pass all facets to {@link XSSimpleType#applyFacets}.
*
* @xerces.internal
*
* @author Sandy Gao, IBM
*
*/
public class XSFacets {
/**
* value of length facet.
*/
public int length;
/**
* value of minLength facet.
*/
public int minLength;
/**
* value of maxLength facet.
*/
public int maxLength;
/**
* value of whiteSpace facet.
*/
public short whiteSpace;
/**
* value of totalDigits facet.
*/
public int totalDigits;
/**
* value of fractionDigits facet.
*/
public int fractionDigits;
/**
* string containing value of pattern facet, for multiple patterns values
* are ORed together.
*/
public String pattern;
/**
* Vector containing values of Enumeration facet, as String's.
*/
public Vector enumeration;
/**
* An array parallel to "Vector enumeration". It contains namespace context
* of each enumeration value. Elements of this vector are NamespaceContext
* objects.
*/
public Vector enumNSDecls;
/**
* value of maxInclusive facet.
*/
public String maxInclusive;
/**
* value of maxExclusive facet.
*/
public String maxExclusive;
/**
* value of minInclusive facet.
*/
public String minInclusive;
/**
* value of minExclusive facet.
*/
public String minExclusive;
public XSAnnotation lengthAnnotation;
public XSAnnotation minLengthAnnotation;
public XSAnnotation maxLengthAnnotation;
public XSAnnotation whiteSpaceAnnotation;
public XSAnnotation totalDigitsAnnotation;
public XSAnnotation fractionDigitsAnnotation;
public XSObjectListImpl patternAnnotations;
public XSObjectList enumAnnotations;
public XSAnnotation maxInclusiveAnnotation;
public XSAnnotation maxExclusiveAnnotation;
public XSAnnotation minInclusiveAnnotation;
public XSAnnotation minExclusiveAnnotation;
public void reset(){
lengthAnnotation = null;
minLengthAnnotation = null;
maxLengthAnnotation = null;
whiteSpaceAnnotation = null;
totalDigitsAnnotation = null;
fractionDigitsAnnotation = null;
patternAnnotations = null;
enumAnnotations = null;
maxInclusiveAnnotation = null;
maxExclusiveAnnotation = null;
minInclusiveAnnotation = null;
minExclusiveAnnotation = null;
}
}
| [
"1256233771@qq.com"
] | 1256233771@qq.com |
9b8e7ac407deea6ddd1f95e14863d60e97a8fc11 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/30/30_37ea2769a2209fe0f0c4bd109fd69b0c85138884/DefaultLifecycleFactory/30_37ea2769a2209fe0f0c4bd109fd69b0c85138884_DefaultLifecycleFactory_t.java | 216253f95a0bd94cc15a63d0443a8301e9253d30 | [] | 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,439 | java | package org.cotrix.lifecycle.impl;
import static org.cotrix.action.CodelistAction.*;
import static org.cotrix.common.Utils.*;
import static org.cotrix.lifecycle.impl.DefaultLifecycleStates.*;
import org.cotrix.action.Action;
import org.cotrix.lifecycle.Lifecycle;
import org.cotrix.lifecycle.LifecycleFactory;
import org.cotrix.lifecycle.State;
import com.googlecode.stateless4j.StateMachine;
/**
* Default {@link Lifecycle} factory.
* @author Fabio Simeoni
*/
public class DefaultLifecycleFactory implements LifecycleFactory {
private static final long serialVersionUID = 1L;
@Override
public String name() {
return LifecycleFactory.DEFAULT;
}
@Override
public Lifecycle create(String id) {
valid("resource identifier",id);
try {
return new S4JLifecycle(name(), id, machine(id));
} catch (Exception e) {
throw new RuntimeException("error creating lifecycle", e);
}
}
//helper
private StateMachine<State, Action> machine(String id) throws Exception {
StateMachine<State, Action> machine = new StateMachine<State, Action>(draft);
machine.Configure(draft)
.PermitReentry(VIEW.on(id))
.PermitReentry(EDIT.on(id))
.Permit(LOCK.on(id),locked)
.Permit(SEAL.on(id),sealed);
machine.Configure(locked)
.PermitReentry(VIEW.on(id))
.Permit(UNLOCK.on(id), draft);
return machine;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
10d931df88bcf204f398f713df5e3b96d0ac6d36 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project98/src/main/java/org/gradle/test/performance98_2/Production98_146.java | b6519f83ad43c8335748a0e1d670699ba9dbf3ea | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 305 | java | package org.gradle.test.performance98_2;
public class Production98_146 extends org.gradle.test.performance17_2.Production17_146 {
private final String property;
public Production98_146() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.