blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
4b0e17b73b8751e965e2111bd8fe507884ee4e8c
23639b38b8d6b3eb19330281aacebd97bd376e6e
/src/main/java/com/ieee19/bc/interop/pf/proxy/bitcoin/interfaces/IBitcoinService.java
4357ec9988040aa7c56e7509b401cb98a87e2d15
[ "Apache-2.0" ]
permissive
pf92/blockchain-interop
ccbe8193f4cc1232a21a15341986c0291b622bee
708aea9ac4cab946422571fa28dd4177dc0cf425
refs/heads/master
2020-05-15T11:28:19.393523
2019-04-19T08:19:41
2019-04-19T08:19:41
182,229,142
2
0
null
null
null
null
UTF-8
Java
false
false
1,501
java
package com.ieee19.bc.interop.pf.proxy.bitcoin.interfaces; import com.ieee19.bc.interop.pf.core.model.Block; import com.ieee19.bc.interop.pf.core.exception.DataWritingFailedException; import com.ieee19.bc.interop.pf.proxy.bitcoin.dto.blockcypher.FeePerKbInfo; import com.ieee19.bc.interop.pf.proxy.bitcoin.exception.BitcoinException; import java.io.IOException; import java.time.ZonedDateTime; import java.util.List; public interface IBitcoinService { /** * @return the current block height (block number) */ long getCurrentBlockHeight() throws BitcoinException; /** * @param blockNumber the number of the block to fetch * @return the block with the given <i>blockNumber</i> * @throws IOException */ Block getBlockByBlockNumber(long blockNumber) throws BitcoinException; /** * @return transaction fee info per KB. */ FeePerKbInfo getFeePerKbInfo() throws BitcoinException; /** * Returns all data that have been mined during <i>from</i> and <i>to</i>. * @param from start date * @param to end date * @return the data */ List<String> getData(ZonedDateTime from, ZonedDateTime to) throws BitcoinException; /** * Writes data to the Bitcoin blockchain * @param dataString the data to write * @param txFeesInSatoshi transaction fees in satoshis * @throws DataWritingFailedException */ void storeData(String dataString, long txFeesInSatoshi) throws BitcoinException; }
[ "aragon@a1.net" ]
aragon@a1.net
de5922467ec6ce5c7d0c58f0d24c1e7ef7b9a949
adf23b832fdb8729950240a722e6a58491fbdf36
/metaModell/src/model/ToString$Visitor.java
d689a631177e4ec03d5feb38bbd4313339559196
[]
no_license
TwoStone/hfp412-meta-model
267ed336ffd4a527cd1619ed72a26a679380f352
bdf7b4d24a99bc773358033f479b3b3692f0a3c6
refs/heads/master
2016-08-12T10:39:40.441134
2015-10-20T12:04:51
2015-10-20T12:04:51
44,603,541
1
0
null
null
null
null
ISO-8859-1
Java
false
false
19,468
java
package model; import java.util.Iterator; import model.visitor.MBooleanVisitor; import persistence.Anything; import persistence.PersistenceException; import persistence.PersistentAccount; import persistence.PersistentAccountManager; import persistence.PersistentAccountTypeManager; import persistence.PersistentActualParameter; import persistence.PersistentAddition; import persistence.PersistentAspectManager; import persistence.PersistentAssociation; import persistence.PersistentAssociationManager; import persistence.PersistentAvgStrategy; import persistence.PersistentCompUnit; import persistence.PersistentCompUnitType; import persistence.PersistentCompoundQuantity; import persistence.PersistentConversion; import persistence.PersistentDivision; import persistence.PersistentEnumValueManager; import persistence.PersistentEnumerationManager; import persistence.PersistentFormalParameter; import persistence.PersistentFractionManager; import persistence.PersistentFractionWrapper; import persistence.PersistentFunction; import persistence.PersistentFunctionManager; import persistence.PersistentHierarchy; import persistence.PersistentLessOrEqualComparison; import persistence.PersistentLink; import persistence.PersistentLinkManager; import persistence.PersistentMAccountType; import persistence.PersistentMAspect; import persistence.PersistentMAtomicType; import persistence.PersistentMEmptyTypeConjunction; import persistence.PersistentMEmptyTypeDisjunction; import persistence.PersistentMEnum; import persistence.PersistentMEnumValue; import persistence.PersistentMFalse; import persistence.PersistentMMeasurementType; import persistence.PersistentMMixedConjunction; import persistence.PersistentMMixedTypeDisjunction; import persistence.PersistentMNonEmptyAtomicTypeConjunction; import persistence.PersistentMNonEmptyDisjunctiveNormalForm; import persistence.PersistentMObject; import persistence.PersistentMObservation; import persistence.PersistentMObservationType; import persistence.PersistentMSingletonObject; import persistence.PersistentMTrue; import persistence.PersistentMaxStrategy; import persistence.PersistentMeasurement; import persistence.PersistentMeasurementTypeManager; import persistence.PersistentMessage; import persistence.PersistentMessageManager; import persistence.PersistentMinStrategy; import persistence.PersistentMultiplication; import persistence.PersistentName; import persistence.PersistentNameInstance; import persistence.PersistentNameScheme; import persistence.PersistentNameSchemeInstance; import persistence.PersistentNameSchemeManager; import persistence.PersistentObjectManager; import persistence.PersistentObsTypeManager; import persistence.PersistentObservationManager; import persistence.PersistentOperation; import persistence.PersistentOperationManager; import persistence.PersistentQuantity; import persistence.PersistentQuantityManager; import persistence.PersistentReference; import persistence.PersistentReferenceType; import persistence.PersistentServer; import persistence.PersistentSubtraction; import persistence.PersistentSumStrategy; import persistence.PersistentTypeManager; import persistence.PersistentUnit; import persistence.PersistentUnitType; import persistence.PersistentUnitTypeManager; import utils.Strings; import common.Fraction; import constants.TextConstants; public class ToString$Visitor extends model.visitor.ToString$Visitor { private static final boolean DEBUG_MODE_ON = true; private static final String DEBUG_PREFIX_NULL = "[null] "; private static final String APPENDIX_OF_PROXIES = "Proxi"; private String result; public ToString$Visitor() { } public synchronized String toString(final Anything anything) throws PersistenceException { result = null; anything.accept(this); if (result == null) { this.standardHandling(anything); } if (DEBUG_MODE_ON) { result = this.formatClassNameForDebug(anything) + result; } return result; } /** * Formatiert den Klassennamen des übergebenen Objekts für die Debug-Ausgabe. * * @param anything * Das zu formatierende Objekt * @return Für Debug-Ausgabe formatierter Klassenname */ private String formatClassNameForDebug(final Object anything) { if (anything == null) { return DEBUG_PREFIX_NULL; } String className = anything.getClass().getSimpleName(); if (className == null) { return DEBUG_PREFIX_NULL; } if (className.contains("Manager")) { return ""; } if (className.endsWith(APPENDIX_OF_PROXIES)) { className = className.substring(0, className.length() - APPENDIX_OF_PROXIES.length()); } return "[" + className + "] "; } @Override protected void standardHandling(final Anything anything) { result = anything.getClassId() + ";" + anything.getId(); } @Override public void handleMAtomicType(final PersistentMAtomicType mAtomicType) throws PersistenceException { result = mAtomicType.fetchName(); } @Override public void handleTypeManager(final PersistentTypeManager typeManager) throws PersistenceException { result = "Liste der Typen"; } @Override public void handleAspectManager(final PersistentAspectManager aspectManager) throws PersistenceException { result = "Liste der Aspekte"; } @Override public void handleMAspect(final PersistentMAspect mAspect) throws PersistenceException { result = mAspect.getName(); } @Override public void handleMFalse(final PersistentMFalse mFalse) throws PersistenceException { result = "false"; } @Override public void handleMTrue(final PersistentMTrue mTrue) throws PersistenceException { result = "true"; } @Override public void handleAssociationManager(final PersistentAssociationManager associationManager) throws PersistenceException { result = "Liste der Assoziationen"; } @Override public void handleHierarchy(final PersistentHierarchy hierarchy) throws PersistenceException { result = hierarchy.getName(); } @Override public void handleAssociation(final PersistentAssociation association) throws PersistenceException { result = association.getName() + " (" + association.getSource().fetchName() + ")"; } @Override public void handleQuantity(final PersistentQuantity quantity) throws PersistenceException { result = quantity.getAmount() + TextConstants.SPACE + quantity.getUnit().getName(); } @Override public void handleCompoundQuantity(final PersistentCompoundQuantity compoundQuantity) throws PersistenceException { String currentResult = TextConstants.CURLY_BRACKET_OPEN; final Iterator<PersistentQuantity> i = compoundQuantity.getParts().iterator(); while (i.hasNext()) { final PersistentQuantity q = i.next(); if (!i.hasNext()) { currentResult = currentResult + q.toString() + TextConstants.CURLY_BRACKET_CLOSED; } else { currentResult = currentResult + TextConstants.SPACE + q.toString() + TextConstants.SEMICOLON; } } result = currentResult; } @Override public void handleReferenceType(final PersistentReferenceType referenceType) throws PersistenceException { this.result = referenceType.getRef() + "^" + referenceType.getExponent(); } @Override public void handleQuantityManager(final PersistentQuantityManager quantityManager) throws PersistenceException { this.result = constants.TextConstants.LABEL_QUANTITY_MANAGER; } @Override public void handleUnitType(final PersistentUnitType unitType) throws PersistenceException { this.result = unitType.getName(); } @Override public void handleUnit(final PersistentUnit unit) throws PersistenceException { this.result = unit.getName() + " (" + unit.getType().getName() + ")"; } @Override public void handleServer(final PersistentServer server) throws PersistenceException { // TODO Auto-generated method stub } @Override public void handleReference(final PersistentReference reference) throws PersistenceException { this.result = reference.getRef() + "^" + reference.getExponent(); } @Override public void handleConversion(final PersistentConversion conversion) throws PersistenceException { final PersistentUnit defaultUnit = ((PersistentUnitType) conversion.getSource().getType()).getDefaultUnit(); if (defaultUnit == null) return; final Fraction m = conversion.getMyFunction().getFactor(); final Fraction b = conversion.getMyFunction().getConstant(); if (b.equals(Fraction.Null)) { this.result = "1 " + defaultUnit.getName() + " = " + m + " " + conversion.getSource().getName(); } else { this.result = "y " + defaultUnit.getName() + " = (" + m + "*x + " + b + ") " + conversion.getSource().getName(); } } @Override public void handleCompUnit(final PersistentCompUnit compUnit) throws PersistenceException { this.result = compUnit.getName() + " (" + compUnit.getType().getName() + ")"; } @Override public void handleCompUnitType(final PersistentCompUnitType compUnitType) throws PersistenceException { this.result = compUnitType.getName(); } @Override public void handleUnitTypeManager(final PersistentUnitTypeManager unitTypeManager) throws PersistenceException { this.result = constants.TextConstants.LABEL_UNIT_TYPE_MANAGER; } @Override public void handleFractionManager(final PersistentFractionManager fractionManager) throws PersistenceException { this.result = constants.TextConstants.LABEL_FRACTION_MANAGER; } @Override public void handleFunction(final PersistentFunction function) throws PersistenceException { this.result = "y = " + function.getFactor() + " * x + " + function.getConstant(); } @Override public void handleMAccountType(final PersistentMAccountType mAccountType) throws PersistenceException { this.result = mAccountType.getName(); } @Override public void handleMeasurement(final PersistentMeasurement measurement) throws PersistenceException { this.result = measurement.getQuantity().toString(); } @Override public void handleOperation(final PersistentOperation operation) throws PersistenceException { final StringBuilder parameterListe = new StringBuilder(); final Iterator<PersistentFormalParameter> iterator = operation.getParameters().iterator(); PersistentFormalParameter current = null; int count = 0; while (iterator.hasNext()) { if (count == 0) { parameterListe.append(", "); } current = iterator.next(); parameterListe.append(current.getName() + " : " + current.getOfType().toString()); count++; } result = operation.getName() + "(" + parameterListe.toString() + ") : " + operation.getTarget().toString(); } @Override public void handleAccount(final PersistentAccount account) throws PersistenceException { this.result = account.getName(); } @Override public void handleMMeasurementType(final PersistentMMeasurementType mMeasurementType) throws PersistenceException { this.result = mMeasurementType.getName(); } @Override public void handleFormalParameter(final PersistentFormalParameter formalParameter) throws PersistenceException { this.result = formalParameter.getName(); } @Override public void handleMessage(final PersistentMessage message) throws PersistenceException { final PersistentMessage internalMessage = message; message.getType().isStatic().accept(new MBooleanVisitor() { @Override public void handleMTrue(final PersistentMTrue mTrue) throws PersistenceException { result = ""; } @Override public void handleMFalse(final PersistentMFalse mFalse) throws PersistenceException { result = internalMessage.getSource().toString(); } }); result += "#" + message.getTarget().toString() + " " + message.getType().toString() + "("; final Iterator<PersistentActualParameter> it = message.getActualParameters().iterator(); // Sonderbehandlung fuer den Ersten if (it.hasNext()) { result += it.next(); } while (it.hasNext()) { result += ", " + it.next().toString(); } result += ")"; } @Override public void handleActualParameter(final PersistentActualParameter actualParameter) throws PersistenceException { this.result = actualParameter.getType().toString() + "=" + actualParameter.getValue().toString(); } @Override public void handleLink(final PersistentLink link) throws PersistenceException { this.result = link.getSource().toString() + "." + link.getType().getName() + ">>" + link.getTarget().toString(); } @Override public void handleMeasurementTypeManager(final PersistentMeasurementTypeManager measurementTypeManager) throws PersistenceException { this.result = constants.TextConstants.LABEL_MEASUREMENT_TYPE_MANAGER; } @Override public void handleAccountTypeManager(final PersistentAccountTypeManager accountTypeManager) throws PersistenceException { this.result = constants.TextConstants.LABEL_ACCOUNT_TYPE_MANAGER; } @Override public void handleAccountManager(final PersistentAccountManager accountManager) throws PersistenceException { this.result = constants.TextConstants.LABEL_ACCOUNT_MANAGER; } @Override public void handleMessageManager(final PersistentMessageManager messageManager) throws PersistenceException { this.result = "Liste der Nachrichten"; } @Override public void handleOperationManager(final PersistentOperationManager operationManager) throws PersistenceException { this.result = "Liste der Operationen"; } @Override public void handleLinkManager(final PersistentLinkManager linkManager) throws PersistenceException { this.result = "Liste der Links"; } @Override public void handleMObject(final PersistentMObject mObject) throws PersistenceException { result = String.valueOf(mObject.getId()); result += Strings.join(", ", mObject.getNames().iterator(), new Strings.ToStringStrategy<PersistentNameInstance>() { @Override public String getString(final PersistentNameInstance element) throws PersistenceException { return element.toString(true); } }); } @Override public void handleObjectManager(final PersistentObjectManager objectManager) throws PersistenceException { this.result = "Liste der Objekte"; } @Override public void handleNameSchemeInstance(final PersistentNameSchemeInstance nameSchemeInstance) throws PersistenceException { this.result = nameSchemeInstance.getName(); } @Override public void handleNameScheme(final PersistentNameScheme nameScheme) throws PersistenceException { this.result = nameScheme.getName(); } @Override public void handleNameInstance(final PersistentNameInstance nameInstance) throws PersistenceException { this.result = nameInstance.getNameScheme().getName() + "(" + nameInstance.getNameScheme().getType().getName() + ")"; } @Override public void handleNameSchemeManager(final PersistentNameSchemeManager nameSchemeManager) throws PersistenceException { this.result = "Liste der Namensschemata"; } @Override public void handleName(final PersistentName name) throws PersistenceException { this.result = name.getFromType().getName() + "->" + name.getNameScheme().getName(); } @Override public void handleFunctionManager(final PersistentFunctionManager functionManager) throws PersistenceException { // } @Override public void handleFractionWrapper(final PersistentFractionWrapper fractionWrapper) throws PersistenceException { this.result = fractionWrapper.getFraction().toString(); } @Override public void handleMSingletonObject(final PersistentMSingletonObject mSingletonObject) throws PersistenceException { this.result = " of " + mSingletonObject.getType().getName(); } @Override public void handleMinStrategy(final PersistentMinStrategy minStrategy) throws PersistenceException { this.result = "Minimum-Aggregations-Strategie"; } @Override public void handleAvgStrategy(final PersistentAvgStrategy avgStrategy) throws PersistenceException { this.result = "Arithmetisches-Mittel-Aggregations-Strategie"; } @Override public void handleSumStrategy(final PersistentSumStrategy sumStrategy) throws PersistenceException { this.result = "Summen-Aggregations-Strategie"; } @Override public void handleMaxStrategy(final PersistentMaxStrategy maxStrategy) throws PersistenceException { this.result = "Maximum-Aggregations-Strategie"; } @Override public void handleMEmptyTypeDisjunction(final PersistentMEmptyTypeDisjunction mEmptyTypeDisjunction) throws PersistenceException { result = mEmptyTypeDisjunction.fetchName(); } @Override public void handleMMixedConjunction(final PersistentMMixedConjunction mMixedConjunction) throws PersistenceException { result = mMixedConjunction.fetchName(); } @Override public void handleMEmptyTypeConjunction(final PersistentMEmptyTypeConjunction mEmptyTypeConjunction) throws PersistenceException { result = mEmptyTypeConjunction.fetchName(); } @Override public void handleMMixedTypeDisjunction(final PersistentMMixedTypeDisjunction mMixedTypeDisjunction) throws PersistenceException { result = mMixedTypeDisjunction.fetchName(); } @Override public void handleMNonEmptyAtomicTypeConjunction(final PersistentMNonEmptyAtomicTypeConjunction mNonEmptyAtomicTypeConjunction) throws PersistenceException { result = mNonEmptyAtomicTypeConjunction.fetchName(); } @Override public void handleMNonEmptyDisjunctiveNormalForm(final PersistentMNonEmptyDisjunctiveNormalForm mNonEmptyDisjunctiveNormalForm) throws PersistenceException { result = mNonEmptyDisjunctiveNormalForm.fetchName(); } @Override public void handleMultiplication(final PersistentMultiplication multiplication) throws PersistenceException { // TODO Auto-generated method stub } @Override public void handleSubtraction(final PersistentSubtraction subtraction) throws PersistenceException { // TODO Auto-generated method stub } @Override public void handleAddition(final PersistentAddition addition) throws PersistenceException { // TODO Auto-generated method stub } @Override public void handleDivision(final PersistentDivision division) throws PersistenceException { // TODO Auto-generated method stub } @Override public void handleMEnum(final PersistentMEnum mEnum) throws PersistenceException { result = mEnum.getName(); } @Override public void handleMObservationType(final PersistentMObservationType mObservationType) throws PersistenceException { result = mObservationType.getName(); } @Override public void handleMObservation(final PersistentMObservation mObservation) throws PersistenceException { result = mObservation.getName(); } @Override public void handleObservationManager(final PersistentObservationManager observationManager) throws PersistenceException { result = "Liste der Observationen"; } @Override public void handleMEnumValue(final PersistentMEnumValue mEnumValue) throws PersistenceException { result = mEnumValue.getName(); } @Override public void handleEnumerationManager(final PersistentEnumerationManager enumerationManager) throws PersistenceException { result = "Liste der Enumerationen"; } @Override public void handleEnumValueManager(final PersistentEnumValueManager enumValueManager) throws PersistenceException { result = "Liste der Enum-Werte"; } @Override public void handleObsTypeManager(final PersistentObsTypeManager obsTypeManager) throws PersistenceException { result = "Liste der Observationstypen"; } @Override public void handleLessOrEqualComparison(final PersistentLessOrEqualComparison lessOrEqualComparison) throws PersistenceException { // TODO Auto-generated method stub } }
[ "walter.niklas@gmail.com" ]
walter.niklas@gmail.com
2d8b2260b497fcae2d4649dadfd4d1774cdbe538
d73226d4cfb0d1a4609422c0753678777bee5eeb
/src/com/aof/webapp/action/party/EditPartyAction.java
98b77403123df783fa62835ba30f6e553db1737e
[]
no_license
Novthirteen/PMS
842132b8fd5d60e4b1b66716e741b4156b318959
65c8fd709bf6d88f80ee03341b9a7d950ace740f
refs/heads/master
2021-01-16T18:28:03.582398
2014-04-04T03:27:37
2014-04-04T03:28:55
18,425,558
0
1
null
null
null
null
UTF-8
Java
false
false
7,044
java
/* ==================================================================== * * Copyright (c) Atos Origin INFORMATION TECHNOLOGY All rights reserved. * * ==================================================================== * */ package com.aof.webapp.action.party; import java.sql.SQLException; import java.util.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.hibernate.*; import org.apache.log4j.Logger; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.util.MessageResources; import com.aof.webapp.action.ActionErrorLog; import com.aof.webapp.action.BaseAction; import com.aof.component.domain.party.*; import com.aof.core.persistence.hibernate.*; /** * @author xxp * @version 2003-7-2 * */ public class EditPartyAction extends BaseAction{ protected ActionErrors errors = new ActionErrors(); protected ActionErrorLog actionDebug = new ActionErrorLog(); public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) { // Extract attributes we will need ActionErrors errors = this.getActionErrors(request.getSession()); Logger log = Logger.getLogger(EditPartyAction.class.getName()); Locale locale = getLocale(request); MessageResources messages = getResources(); String action = request.getParameter("action"); log.info("action="+action); try{ String PartyId = request.getParameter("PartyId"); String description = request.getParameter("description"); String address = request.getParameter("address"); String postcode = request.getParameter("postcode"); String note = request.getParameter("note"); String role = request.getParameter("role"); String isSalesTeam = request.getParameter("isSalesTeam"); String SLParentpartyId = request.getParameter("SLParentpartyId"); String OldSLParentPartyId = request.getParameter("OldSLParentpartyId"); String LocParentpartyId = request.getParameter("LocParentpartyId"); String OldLocParentPartyId = request.getParameter("OldLocParentpartyId"); String CustPartyTypeId = "PARTY_GROUP"; if (address == null) address = ""; if (postcode == null) postcode = ""; if (note == null) note = ""; if (role == null) role = ""; if (SLParentpartyId == null) SLParentpartyId = "None"; if (LocParentpartyId == null) LocParentpartyId = "None"; if (isSalesTeam == null) { isSalesTeam = "N"; } log.info("============>"+description); net.sf.hibernate.Session hs = Hibernate2Session.currentSession(); Transaction tx = null; if(action == null) action = "view"; if(action.equals("view")){ log.info(action); Party CustParty = null; if (!((PartyId == null) || (PartyId.length() < 1))) CustParty = (Party)hs.load(Party.class,PartyId); request.setAttribute("CustParty",CustParty); return (mapping.findForward("view")); } if(action.equals("create")){ if ((PartyId == null) || (PartyId.length() < 1)) actionDebug.addGlobalError(errors,"error.context.required"); if ((description == null) || (description.length() < 1)) actionDebug.addGlobalError(errors,"error.context.required"); log.info(PartyId+description); if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput())); } try{ tx = hs.beginTransaction(); Party CustParty = new Party(); CustParty.setPartyId(PartyId); CustParty.setDescription(description); CustParty.setAddress(address); CustParty.setPostCode(postcode); CustParty.setNote(note); CustParty.setIsSales(isSalesTeam); PartyType CustPartyType = (PartyType)hs.load(PartyType.class,CustPartyTypeId); CustParty.setPartyType(CustPartyType); Set mset = CustParty.getPartyRoles(); if(mset==null){ mset = new HashSet(); } mset.add((RoleType)hs.load(RoleType.class,role)); CustParty.setPartyRoles(mset); hs.save(CustParty); tx.commit(); PartyServices ps = new PartyServices(); ps.updatePartyRelationshipByPartyId(hs, SLParentpartyId, PartyId,"GROUP_ROLLUP"); ps.updatePartyRelationshipByPartyId(hs, LocParentpartyId, PartyId,"LOCATION_ROLLUP"); request.setAttribute("CustParty",CustParty); log.info("go to >>>>>>>>>>>>>>>>. view forward"); }catch(Exception e){ e.printStackTrace(); } return (mapping.findForward("view")); } if(action.equals("update")){ if ((PartyId == null) || (PartyId.length() < 1)) actionDebug.addGlobalError(errors,"error.context.required"); if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput())); } tx = hs.beginTransaction(); Party CustParty = (Party)hs.load(Party.class,PartyId); CustParty.setDescription(description); CustParty.setAddress(address); CustParty.setPostCode(postcode); CustParty.setNote(note); CustParty.setIsSales(isSalesTeam); hs.update(CustParty); tx.commit(); PartyServices ps = new PartyServices(); ps.updatePartyRelationshipByPartyId(hs, SLParentpartyId, PartyId,"GROUP_ROLLUP"); ps.updatePartyRelationshipByPartyId(hs, LocParentpartyId, PartyId,"LOCATION_ROLLUP"); request.setAttribute("CustParty",CustParty); return (mapping.findForward("view")); } if(action.equals("delete")){ if ((PartyId == null) || (PartyId.length() < 1)) actionDebug.addGlobalError(errors,"error.context.required"); if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput())); } tx = hs.beginTransaction(); Party CustParty = (Party)hs.load(Party.class,PartyId); log.info("PartyId="+CustParty.getPartyId()); PartyServices ps = new PartyServices(); ps.updatePartyRelationshipByPartyId(hs, SLParentpartyId, PartyId,"GROUP_ROLLUP"); ps.updatePartyRelationshipByPartyId(hs, LocParentpartyId, PartyId,"LOCATION_ROLLUP"); hs.delete(CustParty); tx.commit(); return (mapping.findForward("list")); } if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput())); } return (mapping.findForward("view")); }catch(Exception e){ e.printStackTrace(); log.error(e.getMessage()); return (mapping.findForward("view")); }finally{ try { Hibernate2Session.closeSession(); } catch (HibernateException e1) { log.error(e1.getMessage()); e1.printStackTrace(); } catch (SQLException e1) { log.error(e1.getMessage()); e1.printStackTrace(); } } } }
[ "Novthirteen@gmail.com" ]
Novthirteen@gmail.com
b449ab3e2e498dbf806392f6fc88846c12ddd775
72cbd420d57f970a6bfbf9cf4dc62f662e6a0ebb
/plugin/core/src/com/perl5/lang/perl/idea/configuration/settings/sdk/wrappers/Perl5RealSdkWrapper.java
d90f435685bfaa7bad561509c9f80c9ab12793d1
[ "Apache-2.0" ]
permissive
xcodejoy/Perl5-IDEA
e36061de84cc1780ed76711190bb5ce4b05fa3f0
2179a9ab2e9006d4c5501a878f484293220046ac
refs/heads/master
2020-09-19T09:15:35.960543
2019-11-23T08:46:28
2019-11-23T08:46:28
224,215,081
1
0
NOASSERTION
2019-11-26T14:44:56
2019-11-26T14:44:55
null
UTF-8
Java
false
false
3,181
java
/* * Copyright 2015-2019 Alexandr Evstigneev * * 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.perl5.lang.perl.idea.configuration.settings.sdk.wrappers; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.projectRoots.SdkType; import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.ColoredListCellRenderer; import com.intellij.ui.SimpleTextAttributes; import com.perl5.lang.perl.idea.sdk.host.PerlHostData; import com.perl5.lang.perl.idea.sdk.versionManager.PerlVersionManagerData; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class Perl5RealSdkWrapper implements Perl5SdkWrapper { @NotNull private final Sdk mySdk; public Perl5RealSdkWrapper(@NotNull Sdk sdk) { mySdk = sdk; } @Override public void customizeRenderer(@NotNull ColoredListCellRenderer<Perl5SdkWrapper> renderer) { SdkType sdkType = (SdkType)mySdk.getSdkType(); renderer.setIcon(sdkType.getIcon()); appendSdkString(renderer, mySdk); } @NotNull public Sdk getSdk() { return mySdk; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Perl5RealSdkWrapper)) return false; Perl5RealSdkWrapper wrapper = (Perl5RealSdkWrapper)o; return getSdk().equals(wrapper.getSdk()); } @Override public int hashCode() { return getSdk().hashCode(); } @Override public String toString() { return "SDK: " + mySdk; } public static void appendSdkString(@NotNull ColoredListCellRenderer<Perl5SdkWrapper> renderer, @NotNull Sdk sdk) { PerlHostData hostData = PerlHostData.notNullFrom(sdk); renderPair(renderer, hostData.getPrimaryShortName(), hostData.getSecondaryShortName()); PerlVersionManagerData<?, ?> versionManagerData = PerlVersionManagerData.notNullFrom(sdk); renderPair(renderer, versionManagerData.getPrimaryShortName(), versionManagerData.getSecondaryShortName()); renderer.append(StringUtil.notNullize(sdk.getVersionString())); } private static void renderPair(@NotNull ColoredListCellRenderer<Perl5SdkWrapper> renderer, @NotNull String primary, @Nullable String secondary) { renderer.append(StringUtil.capitalize(primary)); if (secondary != null) { renderer.append(secondary, SimpleTextAttributes.GRAY_ATTRIBUTES); } renderer.append(", "); } @Contract("null->null;!null->!null") @Nullable public static Perl5RealSdkWrapper create(@Nullable Sdk sdk) { return sdk == null ? null : new Perl5RealSdkWrapper(sdk); } }
[ "hurricup@gmail.com" ]
hurricup@gmail.com
155f41a8adb47adf1fa621e42a1e28aa969f85cf
4125e8bcfa6a94d5c6e131e9cd7f9731155980a1
/java/Legacy/NewestSolver/hardware_connect.java
2bc0446f973e61b8ef8eacb30e971b4565aec0a9
[ "MIT", "Apache-2.0" ]
permissive
pseudodennis/connect4ever
c80897f18730b97b35369bcec060929efc4b0636
7b5fa5ebcdc83e955157e6d0fd492e42ed95a1b3
refs/heads/master
2021-04-15T18:42:58.733099
2018-05-07T05:43:57
2018-05-07T05:43:57
126,410,471
4
4
Apache-2.0
2018-05-06T18:26:24
2018-03-23T00:24:22
Java
UTF-8
Java
false
false
3,966
java
//package Legacy.hardware_connect; import com.fazecast.jSerialComm.SerialPort; import java.io.PrintWriter; import java.util.Scanner; /** * @author nospa * */ public class hardware_connect { static SerialPort portSel; static PrintWriter output; /** * */ static Scanner inputNum ; public static boolean Connect() //connects to and selects the serial port { Scanner keyboard = new Scanner(System.in); boolean isConnected = false; String comInput; boolean errorExit = false; do { System.out.println("Please select a communication port."); SerialPort[] portNames = SerialPort.getCommPorts(); for(int i = 0; i < portNames.length; i++) System.out.println(portNames[i].getSystemPortName()); // attempt to connect to the serial port comInput = keyboard.nextLine(); portSel = SerialPort.getCommPort(comInput); portSel.setComPortTimeouts(SerialPort.TIMEOUT_SCANNER, 0, 0); if(portSel.openPort()) { isConnected = true; inputNum = new Scanner(portSel.getInputStream()); // create a new thread for sending data to the arduino Thread thread = new Thread(){ @Override public void run() { // wait after connecting, so the bootloader can finish try {Thread.sleep(100); } catch(Exception e) {} } }; thread.start(); output = new PrintWriter(portSel.getOutputStream()); } else { // disconnect from the serial port portSel.closePort(); isConnected = false; } if(isConnected == false && !comInput.equals("exit")) { System.out.println("Error not connected\n\rtry again\n\r"); } else if (comInput.equals("exit")) { System.out.println("exiting"); errorExit = true; } else { System.out.println("connected"); } }while(isConnected == false && !comInput.equals("exit")); return (errorExit); } public static void starter (boolean humanStart) { int numStart = 33; if (humanStart == true) { numStart = 77; } output.println(); output.flush(); try {Thread.sleep(100); } catch(Exception e) {} try { Thread.sleep(5678); } catch(InterruptedException ex) { Thread.currentThread().interrupt(); } output.print(numStart); output.flush(); try {Thread.sleep(100); } catch(Exception e) {} System.out.println(numStart); } public static void sendNum (int num) // send number data to the serial port { // enter an infinite loop that sends text to the arduino output.print(num); output.flush(); try {Thread.sleep(100); } catch(Exception e) {} } public static int getNum () // get number data from the serial port { int num = 0; do { num = 0; try{num = Integer.parseInt(inputNum.nextLine());} catch(Exception e){} }while(num == 0); return (num); } public static void DisConnect() // disconnect from the serial port { output.print(50); output.flush(); try {Thread.sleep(100); } catch(Exception e) {} int exitNum = 0; do{ try {Thread.sleep(1); } catch(Exception e) {} try{exitNum = Integer.parseInt(inputNum.nextLine());} catch(Exception e){} }while(exitNum != 99); System.out.println("arduino stopped"); portSel.closePort(); System.out.println("disconnected"); } }
[ "pseudodennis.social@gmail.com" ]
pseudodennis.social@gmail.com
366b27dcb41a179d7aff4b41f4c696a751f2229d
656e22d276f54b652202858f9fa1978c8993a17c
/src/api/AdminMenu.java
d18c8158a2a0ed49cb1f73784a991125097f5ba2
[]
no_license
Indomie-glitch/Hotel-Reservation
d46ac8ad177f987f7533c9977868137e0fffedcf
0c6ce1390c65ec2d2717d010b5938aa62d6232f5
refs/heads/master
2023-05-10T07:45:26.795371
2021-06-10T13:37:46
2021-06-10T13:37:46
367,333,150
0
0
null
null
null
null
UTF-8
Java
false
false
4,015
java
package api; import model.Customer; import model.IRoom; import model.Room; import model.RoomType; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Scanner; public class AdminMenu { public void start() { boolean keepRunning = true; Scanner scanner = new Scanner(System.in); while (keepRunning) { try { System.out.println("____________________________________"); System.out.println("Admin Menu"); System.out.println("1. See all Customers"); System.out.println("2. See all Rooms"); System.out.println("3. See all Reservations"); System.out.println("4. Add a Room"); System.out.println("5. Back to Main Menu"); System.out.println("____________________________________"); int selection = Integer.parseInt(scanner.nextLine()); switch (selection) { case 1 -> { //Do SOMETHING Collection<Customer> customers = AdminResource.getInstance().getAllCustomer(); for (Customer customer : customers) { System.out.print("First Name " + customer.getFirstName() + " "); System.out.print("Last Name " + customer.getLastName() + " "); System.out.print("The Email " + customer.getEmail() + " || \n"); } } case 2 -> { System.out.println("All the Rooms"); Collection<IRoom> rooms = AdminResource.getInstance().getAllRoom(); for (IRoom room : rooms) { System.out.print("The Room Number " + room.getRoomNumber() + " "); System.out.print("The Price of the Room " + room.getRoomPrice() + " "); System.out.print("Double or Single " + room.getRoomType() + " || \n"); } } case 3 -> //Do SOMETHING System.out.println("See All Reservations"); case 4 -> { Room room = new Room(); System.out.println("Enter the Room Number"); String roomNumber = (scanner.nextLine()); room.setRoomNumber(roomNumber); System.out.println("Enter the Price \n $"); Double roomPrice = Double.parseDouble(scanner.nextLine()); room.setPrice(roomPrice); System.out.println("Enter the type of the room| \n 1 for Single \n 2 for double"); int roomType = Integer.parseInt(scanner.nextLine()); if (roomType == 1) { System.out.println("Single"); room.setType(RoomType.SINGLE); } else if (roomType == 2) { System.out.println("Double"); room.setType(RoomType.DOUBLE); } List<IRoom> rooms = new ArrayList<IRoom>(); rooms.add(room); AdminResource.getInstance().addRoom(rooms); } case 5 -> { System.out.println("Traveling to Main Menu"); keepRunning = false; } } //Back to main menu } catch (Exception e) { System.out.println("THERE IS AN ERROR... \n CALCULATING............. \n MISTAKE FOUND, YOU MUST HAVE DONE SOMETHING, FIX IT FAST BEFORE YOUR PC EXPLODES THEN IMPLODES"); e.printStackTrace(); } } } }
[ "darthaarnav@gmail.com" ]
darthaarnav@gmail.com
83e5815e49f2c42c0a5c2218c22b813c8a7e6656
4f4cd12cb6ee8fc86e5e932a602ac73dd057b411
/pester-samples/src/test/java/fr/vergne/pester/samples/T02_JavaBean.java
f254e2635b9a42d4c1494926b42171d268583648
[ "CC0-1.0" ]
permissive
matthieu-vergne/pester
6da5ad8fda9c2b9dfa381b764dbc46d078974a1a
851a3b1cc06fa950ab8801a7a82f031df005368f
refs/heads/master
2021-03-02T04:06:10.310505
2020-04-13T23:59:03
2020-04-13T23:59:03
245,837,168
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package fr.vergne.pester.samples; import java.io.Serializable; import fr.vergne.pester.PesterTest; import fr.vergne.pester.definition.DefinitionFactory; import fr.vergne.pester.definition.PojoDefinition; import fr.vergne.pester.samples.T02_JavaBean.Pojo; class T02_JavaBean implements PesterTest<Pojo> { @Override public PojoDefinition<Pojo> createPojoDefinition() { return new DefinitionFactory().fromBeanClass(Pojo.class); } @SuppressWarnings("serial") public static class Pojo implements Serializable { public Pojo() { // Default constructor, can be implicit } private Integer property1; public Integer getProperty1() {return property1;} public void setProperty1(Integer value) {property1 = value;} private Integer property2; public Integer getProperty2() {return property2;} public void setProperty2(Integer value) {property2 = value;} } }
[ "matthieu.vergne@gmail.com" ]
matthieu.vergne@gmail.com
4169d0014a06125526c45c38a15899b8c4ab1f80
d1587ff23f80b268719195cf094e69cf16707ad4
/hr-user/src/main/java/com/brazil/hruser/exceptions/BadRequestException.java
51e906c9e12ab59649d37ab9f58551c9d360bc8c
[]
no_license
eduardomingoranca/ms-human-resources-spring
6e09a26fba8e3ebb7bd846badfd62b1c3dee4dc4
b13dd2bf444584cce9ba1e9141032037b1b51f5d
refs/heads/main
2023-08-28T00:01:01.513303
2021-09-18T13:05:09
2021-09-18T13:05:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package com.brazil.hruser.exceptions; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(HttpStatus.BAD_REQUEST) public class BadRequestException extends RuntimeException { public BadRequestException(String message) { super(message); } }
[ "eduardomingoranca@gmail.com" ]
eduardomingoranca@gmail.com
78413e49964574f31ad4077dabbfd81297995b72
22f580c6ab811ce7d093a3668b4ff1b08dc72d04
/CucumberTest/src/test/java/CucumberTest/CucumberTest/Test1.java
5726a25995f4edc92732003c6b2367abf0df74ca
[]
no_license
snehasishdu/MyWork
34ed0558cd12c55b038f88df5ed373c7be9d6e13
5ffa5017146dae9fe9886a5979b12ff4c1bb968f
refs/heads/master
2021-01-19T15:55:43.072840
2018-01-16T04:56:57
2018-01-16T04:56:57
100,981,040
0
0
null
2018-01-18T05:27:11
2017-08-21T18:31:12
HTML
UTF-8
Java
false
false
294
java
package CucumberTest.CucumberTest; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.Assert; import org.testng.annotations.Test; public class Test1 { @Test public void method1() { System.out.println("Hello World !!"); } }
[ "snehasishdu@gmail.com" ]
snehasishdu@gmail.com
60e17a0bb464b2c0d3de252f16cc8752fe71ce26
5fb2edd24da3042e3def986666735412dabf6c40
/Android/SecChat/app/src/main/java/net/i2p/client/streaming/impl/SchedulerPreconnect.java
3f4855b96a20f696d3501a4af477cb12cbdb9398
[ "MIT" ]
permissive
RazuvaevDD/I2PSecChat
5b2796bd10f93d213bde90edf1c8d76d55881dbf
d26894c7849dadade8cc59c3ff390e20896f8dc5
refs/heads/release
2023-03-09T12:07:44.387095
2021-02-21T15:07:53
2021-02-21T15:07:53
315,027,754
1
6
MIT
2021-02-22T08:51:58
2020-11-22T12:04:56
Java
UTF-8
Java
false
false
1,646
java
package net.i2p.client.streaming.impl; import net.i2p.I2PAppContext; import net.i2p.util.Log; /** * <p>Scheduler used for locally created connections where we have not yet * sent the initial SYN packet.</p> * * <h2>Entry conditions:</h2><ul> * <li>Locally created</li> * <li>No packets sent or received</li> * </ul> * * <h2>Events:</h2><ul> * <li>Message flush (explicitly, through a full buffer, or stream closure)</li> * <li>Initial delay timeout (causing implicit flush of any data available)</li> * </ul> * * <h2>Next states:</h2> * <li>{@link SchedulerConnecting connecting} - after sending a packet</li> * </ul> */ class SchedulerPreconnect extends SchedulerImpl { public SchedulerPreconnect(I2PAppContext ctx) { super(ctx); } public boolean accept(Connection con) { return (con != null) && (con.getSendStreamId() <= 0) && (con.getLastSendId() < 0); } public void eventOccurred(Connection con) { if (con.getNextSendTime() < 0) con.setNextSendTime(_context.clock().now() + con.getOptions().getConnectDelay()); long timeTillSend = con.getNextSendTime() - _context.clock().now(); if (timeTillSend <= 0) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Send available for the SYN on " + con); con.sendAvailable(); con.setNextSendTime(-1); } else { if (_log.shouldLog(Log.DEBUG)) _log.debug("Wait " + timeTillSend + " before sending the SYN on " + con); reschedule(timeTillSend, con); } } }
[ "Razuvaev_DD@mail.ru" ]
Razuvaev_DD@mail.ru
81bd256604cfdc0ca60f2d9b893e587145f2aae9
1328303f5adc79c093e97788b198faff347c8069
/springannotation/src/test/java/com/ntuzy/test/IOTest_Property.java
c047f7ce4fd502a0affa06e305c8d26f26e00116
[]
no_license
IamZY/Spring
850bebaf851b34fac5dc5e38039894aee0a9ec69
0254ae7361e997f6bf3deef281cd9c464b0cb073
refs/heads/master
2022-12-12T12:20:42.520179
2020-07-15T03:50:59
2020-07-15T03:50:59
241,874,223
1
0
null
2022-12-09T01:14:46
2020-02-20T12:06:48
Java
UTF-8
Java
false
false
721
java
package com.ntuzy.test; import com.ntuzy.bean.Car; import com.ntuzy.bean.Person; import com.ntuzy.config.MainConfigOfLifeCycle; import com.ntuzy.config.MainConfig_Pro; import org.junit.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** * @Author IamZY * @create 2020/2/20 20:43 */ public class IOTest_Property { @Test public void test() { AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(MainConfig_Pro.class); Person person = (Person) annotationConfigApplicationContext.getBean("person"); System.out.println(person); annotationConfigApplicationContext.close(); } }
[ "562018301@qq.com" ]
562018301@qq.com
bed3d6694bf027c722e52fa51e93092ed931e47d
a46e033f66df3f32cdeb6651a63d1e5277f6b8bf
/src/com/se/mapping/Visit.java
04b269937f1e65365114534f22fa833a54bb9ab5
[]
no_license
MohamedGawad/Clinic-App
9c7333a3d93b5ab96828d1205926e9e2be2727e0
95951e9d3d2a132f64f5c53c999bab201332922f
refs/heads/master
2021-01-10T21:17:52.261313
2015-03-21T22:01:26
2015-03-31T03:14:52
32,651,695
0
0
null
null
null
null
UTF-8
Java
false
false
4,246
java
package com.se.mapping; // Generated Mar 21, 2015 7:24:01 PM by Hibernate Tools 3.6.0 import java.util.Date; import java.util.HashSet; import java.util.Set; /** * Visit generated by hbm2java */ public class Visit implements java.io.Serializable { private Integer id; private Patient patient; private String complaint; private String hpi; private String ph; private String ears; private String nose; private String pharynx; private String larynx; private String neckOtherareas; private String otherData; private String investigationDone; private String investigationRequest; private String treatment; private Date visitDate; private Set<Followup> followups = new HashSet<Followup>(0); public Visit() { } public Visit(Patient patient, String complaint, String hpi, String ph, String ears, String nose, String pharynx, String larynx, String neckOtherareas, String otherData, String investigationDone, String investigationRequest, String treatment) { this.patient = patient; this.complaint = complaint; this.hpi = hpi; this.ph = ph; this.ears = ears; this.nose = nose; this.pharynx = pharynx; this.larynx = larynx; this.neckOtherareas = neckOtherareas; this.otherData = otherData; this.investigationDone = investigationDone; this.investigationRequest = investigationRequest; this.treatment = treatment; } public Visit(Patient patient, String complaint, String hpi, String ph, String ears, String nose, String pharynx, String larynx, String neckOtherareas, String otherData, String investigationDone, String investigationRequest, String treatment, Set<Followup> followups) { this.patient = patient; this.complaint = complaint; this.hpi = hpi; this.ph = ph; this.ears = ears; this.nose = nose; this.pharynx = pharynx; this.larynx = larynx; this.neckOtherareas = neckOtherareas; this.otherData = otherData; this.investigationDone = investigationDone; this.investigationRequest = investigationRequest; this.treatment = treatment; this.followups = followups; } public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public Patient getPatient() { return this.patient; } public void setPatient(Patient patient) { this.patient = patient; } public String getComplaint() { return this.complaint; } public void setComplaint(String complaint) { this.complaint = complaint; } public String getHpi() { return this.hpi; } public void setHpi(String hpi) { this.hpi = hpi; } public String getPh() { return this.ph; } public void setPh(String ph) { this.ph = ph; } public String getEars() { return this.ears; } public void setEars(String ears) { this.ears = ears; } public String getNose() { return this.nose; } public void setNose(String nose) { this.nose = nose; } public String getPharynx() { return this.pharynx; } public void setPharynx(String pharynx) { this.pharynx = pharynx; } public String getLarynx() { return this.larynx; } public void setLarynx(String larynx) { this.larynx = larynx; } public String getNeckOtherareas() { return this.neckOtherareas; } public void setNeckOtherareas(String neckOtherareas) { this.neckOtherareas = neckOtherareas; } public String getOtherData() { return this.otherData; } public void setOtherData(String otherData) { this.otherData = otherData; } public String getInvestigationDone() { return this.investigationDone; } public void setInvestigationDone(String investigationDone) { this.investigationDone = investigationDone; } public String getInvestigationRequest() { return this.investigationRequest; } public void setInvestigationRequest(String investigationRequest) { this.investigationRequest = investigationRequest; } public String getTreatment() { return this.treatment; } public void setTreatment(String treatment) { this.treatment = treatment; } public Set<Followup> getFollowups() { return this.followups; } public void setFollowups(Set<Followup> followups) { this.followups = followups; } public Date getVisitDate() { return visitDate; } public void setVisitDate(Date visitDate) { this.visitDate = visitDate; } }
[ "Gawad@Mohamed" ]
Gawad@Mohamed
f2c69ea255914348c257f3fc464f2c7a4a7c9629
cc637e2f7ad19ceb7e23390c4fb2a04e2141aa5d
/acore/src/main/java/com/yl/core/utils/ImageManager.java
83ba51dd8933e97bfd9853ee76004e47f9ab32cb
[]
no_license
Redoteam/MVPEasyArms
a246890fc7e33d3868283c491e091029e1e8d723
89026d295ae1d486bf81800a43e79b185f6d87b6
refs/heads/master
2020-04-09T22:17:17.066717
2018-12-07T03:57:20
2018-12-07T03:57:20
160,624,426
0
0
null
null
null
null
UTF-8
Java
false
false
1,057
java
package com.yl.core.utils; import android.content.Context; import android.widget.ImageView; import com.yl.core.R; import com.yl.core.delegate.AppDelegate; import com.yl.core.factory.SingletonImageLoader; import com.yl.core.http.imageloader.ImageConfig; import com.yl.core.http.imageloader.ImageLoader; /** * Created by 寻水的鱼 on 2018/8/13. */ public class ImageManager { /** * 加载图片 * * @param context * @param config * @param <T> */ public static <T extends ImageConfig> void loadImage(Context context, T config) { ImageLoader imageLoader = SingletonImageLoader.getInstance().getImageLoader(); imageLoader.loadImage(context, config); } /** * 停止加载或清理缓存 * * @param context * @param config * @param <T> */ public static <T extends ImageConfig> void clear(Context context, T config) { ImageLoader imageLoader = SingletonImageLoader.getInstance().getImageLoader(); imageLoader.clear(context, config); } }
[ "18672989951@163.com" ]
18672989951@163.com
c665c62de8a0dcb6e59270b9a405749dd7582940
6fec1124ad5cae9e50429fae3fc501ae54abf82a
/EsExtends/src/it/engim/esExtends/CollectionBicy.java
84f170f09f3c38a346c07ab91ec3c0e63bfdf80c
[]
no_license
zeionut/workspace
5425ce5c8c01194b237b5ff5bb46b1118b227fdf
fd9625e683e649cc63d494573ab21e97d7f9762b
refs/heads/master
2021-01-10T01:42:49.905815
2016-04-08T11:22:53
2016-04-08T11:22:53
55,767,487
0
0
null
null
null
null
UTF-8
Java
false
false
1,216
java
package it.engim.esExtends; public class CollectionBicy { private Bicycle [] bicyList; public CollectionBicy(int i) { this.bicyList = new Bicycle[i]; } public Bicycle[] getBicyList() { return bicyList; } public void setBicyList(Bicycle[] bicyList) { this.bicyList = bicyList; } public boolean verifyExistedName(String name) { boolean verify = false; for (int i = 0; i < this.bicyList.length && !verify; i++) { if (name.equals(this.bicyList[i].getOwner().getName())) { verify = true; } } return verify; } public Bicycle findBicyFormName(String name) { boolean verify = false; Bicycle tempBicy = new Bicycle(); for (int i = 0; i < this.bicyList.length && !verify; i++) { if (name.equals(this.bicyList[i].getOwner().getName())) { tempBicy = this.bicyList[i]; verify = true; } } return tempBicy; } public boolean verifyBicy(String name) { boolean verify; Bicycle tempBicy = findBicyFormName(name); if (tempBicy instanceof ElectricBicycle) { verify = false; } else { verify = true; } return verify; } }
[ "filippococchia@hotmail.it" ]
filippococchia@hotmail.it
93fd906c26e4c17dde3853ac0b752ce74e01c13e
3d59c03c2688224293c75b3b182703947ecb03d2
/PhotoAlbum91/src/controller/UserController.java
ea97e8b03e96a2cd238249982c11c40a74c3ae8c
[]
no_license
omarkhalil06/Software-Methodology
9c709591258608bda824a4dc8ff9e81047ba7c3b
9e1542d1561b50cf2292e0057aa03cda6b1c6ff1
refs/heads/master
2021-01-18T12:33:30.662356
2016-09-21T04:11:07
2016-09-21T04:11:07
68,773,879
0
0
null
null
null
null
UTF-8
Java
false
false
9,137
java
package controller; import java.io.IOException; import java.util.List; import java.util.Optional; import app.PhotoAlbum; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Alert; import javafx.scene.control.Button; import javafx.scene.control.ButtonType; import javafx.scene.control.Label; import javafx.scene.control.ListCell; import javafx.scene.control.ListView; import javafx.scene.control.Alert.AlertType; import javafx.stage.Stage; import javafx.util.Callback; import model.Album; import model.BackEnd; import model.ResourceManager; import model.User; /** * The UserController class controls what a user wants to do with their albums and photos. * * @author Omar Khalil * @author Michelle Hwang */ public class UserController { @FXML private Button logoutBtn; @FXML private Button addBtn; @FXML private Button deleteBtn; @FXML private Button editBtn; @FXML private Button searchBtn; @FXML private Button openBtn; @FXML private Button saveBtn; @FXML protected ListView<Album> albumList; @FXML private Label albumName; @FXML private Label numPhotos; @FXML private Label oldestPhotoDate; @FXML private Label dateRange; @FXML private Label welcome; BackEnd backend; private PhotoAlbum photoAlbum; private User user; /** * Highlights album if clicked on. */ @FXML private void initialize() { albumList.setCellFactory(new Callback<ListView<Album>, ListCell<Album>>() { @Override public ListCell<Album> call(ListView<Album> param) { ListCell<Album> cell = new ListCell<Album>() { protected void updateItem(Album t, boolean bool) { super.updateItem(t, bool); if (t != null) { setText(t.getAlbumName()); } else { setText(""); } } }; return cell; } }); albumList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> showDetails(newValue)); } /** * Sets information for each corresponding label. * * @param album */ private void showDetails(Album album) { if (album != null) { if (album.getNumPhotos() == 0) { albumName.setText(album.getAlbumName()); numPhotos.setText(album.getNumPhotos() + ""); oldestPhotoDate.setText("-"); dateRange.setText(""); } else { albumName.setText(album.getAlbumName()); numPhotos.setText(album.getNumPhotos() + ""); oldestPhotoDate.setText(album.getOldest()); dateRange.setText(album.getOldest() + " to " + album.getNewest()); } } else { albumName.setText(""); numPhotos.setText(""); oldestPhotoDate.setText(""); dateRange.setText(""); } } /** * Saves the file. * * @throws IOException */ @FXML protected void save() throws IOException { try { ResourceManager.writeUsers(this.photoAlbum.getBackend(), "userfile"); } catch (Exception e) { //System.out.println("Could not save file: " + e.getMessage()); } } /** * Logouts the user and window changes to login screen. * * @param event * @throws IOException */ @FXML protected void logout(ActionEvent event) throws IOException { //System.out.println("In UserController: logout"); ((Node) event.getSource()).getScene().getWindow().hide(); FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/view/LoginScreen.fxml")); loader.load(); Parent p = loader.getRoot(); LoginScreenController controller = loader.getController(); controller.setPhotoAlbum(this.photoAlbum); Stage stage = new Stage(); stage.setScene(new Scene(p)); stage.setTitle("Photo App"); stage.show(); } /** * Deletes the selected album. */ @FXML protected void delete() { //System.out.println("In UserController: delete"); int item = albumList.getSelectionModel().getSelectedIndex(); if (item >= 0) { Alert alert = new Alert(AlertType.CONFIRMATION); alert.setTitle("Confirmation"); alert.setContentText("Click OK to delete this album."); Optional<ButtonType> click = alert.showAndWait(); if ((click.isPresent()) && (click.get() == ButtonType.OK)) { user.deleteAlbum(user.getAlbums().get(item)); albumList.getItems().remove(item); } } else { Alert alert = new Alert(AlertType.WARNING); alert.setTitle("Error"); alert.setHeaderText("No item selected"); alert.setContentText("Please select an album from the list to be deleted"); alert.showAndWait(); } } /** * Opens add album window. * * @param event * @throws IOException */ @FXML protected void add(ActionEvent event) throws IOException { //System.out.println("In UserController: add"); ((Node) event.getSource()).getScene().getWindow().hide(); FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/view/AddNewAlbumScreen.fxml")); loader.load(); Parent p = loader.getRoot(); AddNewAlbumController controller = loader.getController(); controller.setPhotoAlbum(this.photoAlbum); controller.setUser(user); Stage stage = new Stage(); stage.setScene(new Scene(p)); stage.setTitle("Add New Album"); stage.show(); } /** * Opens edit album window to rename album. * * @param event * @throws IOException */ @FXML protected void edit(ActionEvent event) throws IOException { //System.out.println("In UserController: edit"); int item = albumList.getSelectionModel().getSelectedIndex(); if (item >= 0) { ((Node) event.getSource()).getScene().getWindow().hide(); FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/view/EditAlbumScreen.fxml")); loader.load(); Parent p = loader.getRoot(); EditAlbumController controller = loader.getController(); controller.setPhotoAlbum(this.photoAlbum); controller.setUser(user); controller.setAlbum(user.getAlbums().get(item)); controller.setAlbumText(); Stage stage = new Stage(); stage.setScene(new Scene(p)); stage.setTitle("Edit Album"); stage.show(); } else { Alert alert = new Alert(AlertType.WARNING); alert.setTitle("Error"); alert.setHeaderText("No item selected"); alert.setContentText("Please select an album from the list to be edited"); alert.showAndWait(); } } /** * Opens album to view photos. * * @param event * @throws IOException */ @FXML protected void open(ActionEvent event) throws IOException { //System.out.println("In UserController: open"); int item = albumList.getSelectionModel().getSelectedIndex(); if (item >= 0) { ((Node) event.getSource()).getScene().getWindow().hide(); FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/view/AlbumScreen.fxml")); loader.load(); Parent p = loader.getRoot(); AlbumController controller = loader.getController(); controller.setPhotoAlbum(this.photoAlbum); controller.setUser(user); controller.setAlbum(user.getAlbums().get(item)); Stage stage = new Stage(); stage.setScene(new Scene(p)); controller.setPhotoList(); stage.setTitle("Album: " + user.getAlbums().get(item).getAlbumName()); stage.show(); } else { Alert alert = new Alert(AlertType.WARNING); alert.setTitle("Error"); alert.setHeaderText("No item selected"); alert.setContentText("Please select an album from the list to be edited"); alert.showAndWait(); } } /** * Opens search window. * * @param event * @throws IOException */ @FXML protected void search(ActionEvent event) throws IOException { //System.out.println("In UserController: search"); ((Node) event.getSource()).getScene().getWindow().hide(); FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/view/SearchScreen.fxml")); loader.load(); Parent p = loader.getRoot(); SearchController controller = loader.getController(); controller.setPhotoAlbum(this.photoAlbum); controller.setUser(this.user); Stage stage = new Stage(); stage.setScene(new Scene(p)); stage.setTitle("Search"); stage.show(); } /** * Sets album list on listview for the user to see. * * @param user */ public void setAlbumList(User user) { //System.out.println("In UserController: setAlbumList()"); List<Album> albums = user.getAlbums(); ObservableList<Album> list = FXCollections.observableArrayList(); for (Album a : albums) { //System.out.println(a); list.add(a); } albumList.setItems(list); albumList.getSelectionModel().select(0); } /** * Sets instance of PhotoAlbum. * * @param photoAlbum */ public void setPhotoAlbum(PhotoAlbum photoAlbum) { this.photoAlbum = photoAlbum; } /** * Sets value of user. * * @param user */ public void setUser(User user) { this.user = user; } /** * Sets value of welcome label. * * @param users */ public void setWelcome(User user) { welcome.setText("Welcome " + user.getUsername()); } }
[ "omarkhalil06@outlook.com" ]
omarkhalil06@outlook.com
714733e24567cdd01f8b9178b219eb511864a374
01315bb81f318bd5bb9991fe8ee374a6b49533b0
/src/main/java/com/kirak/repository/datajpa/BookingRepositoryImpl.java
eff1067f8df6acff7e585075a46d51254bc2d5ed
[ "MIT" ]
permissive
kkaun/simple_booking_service
2942f6a8da3cd705b33fa76000091e6f96c23f72
3c0a293f3a06225b281537be27045fdfdc924411
refs/heads/master
2021-01-22T08:28:26.202445
2018-07-09T16:43:09
2018-07-09T16:43:09
92,617,895
0
2
null
null
null
null
UTF-8
Java
false
false
2,187
java
package com.kirak.repository.datajpa; import com.kirak.model.Booking; import com.kirak.repository.BookingRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.List; /** * Created by Kir on 07.08.2017. */ @Transactional @Repository public class BookingRepositoryImpl implements BookingRepository { private static final Sort DATE_ADDED_SORT = new Sort(Sort.Direction.DESC, "dateAdded"); @Autowired private DataJpaBookingRepository bookingRepository; @Autowired private DataJpaUserRepository userRepository; @Override public Booking save(Booking booking) { if(!booking.isNew() && get(booking.getId()) == null){ return null; } return bookingRepository.save(booking); } @Override public Booking save(Booking booking, int userId) { if(!booking.isNew() && get(booking.getId(), userId) == null){ return null; } booking.setUser(userRepository.findOne(userId)); return bookingRepository.save(booking); } @Override public Booking get(Integer id) { return bookingRepository.findOne(id); } @Override public Booking get(int id, int userId) { Booking booking = bookingRepository.findOne(id); return booking != null && booking.getUser().getId() == userId ? booking : null; } @Override public List<Booking> getAll() { return bookingRepository.findAll(DATE_ADDED_SORT); } @Override public List<Booking> getAllByUserId(int userId) { return bookingRepository.getAllByUserId(userId); } @Override public List<Booking> getAllByHotelId(int hotelId) { return bookingRepository.getAllByHotelId(hotelId); } @Override public List<Booking> getAllBetweenCreatedDateTimes(LocalDateTime startDateTime, LocalDateTime endDateTime) { return bookingRepository.getAllBetweenCreatedDateTimes(startDateTime, endDateTime); } }
[ "nickulodeon@gmail.com" ]
nickulodeon@gmail.com
8c59a204d3eea3fa3170be868ec47916a38899ab
16850d0bfd3b9ec27a4127d50c4aec8da840f583
/app/src/main/java/com/newland/homecontrol/activity/StudyActivity.java
f8ff029add446386e457d2f74f5fd0cef54c4d0e
[]
no_license
Steven-Lion/HOMEControl2_init
cbccaac319974e7c27b3e7487bf2759ee0c0b554
ca40bd991ce8feffcb40d2f15efe75760723a4d5
refs/heads/master
2020-03-16T22:47:27.203109
2018-05-12T10:28:42
2018-05-12T10:28:42
133,052,589
0
0
null
null
null
null
UTF-8
Java
false
false
5,083
java
package com.newland.homecontrol.activity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.newland.homecontrol.bean.Global; import com.newland.homecontrol.R; import com.newland.homecontrol.utils.SharedPreferencesUtils; import com.nlecloud.nlecloudlibrary.api.ApiResponse; import com.nlecloud.nlecloudlibrary.core.ActionCallbackListener; import com.nlecloud.nlecloudlibrary.core.AppAction; import com.nlecloud.nlecloudlibrary.core.AppActionImpl; /** * 书房 */ public class StudyActivity extends Activity { private TextView tvTitle; private LinearLayout llbottomBackGround;//下部分背景 需要设置透明度 private RelativeLayout rlBackGround;//背景图片 private ImageView ivCurtain; private CheckBox cbStudy; private AppAction mAppAction; private SharedPreferencesUtils spUtils; private boolean isSave=false;//是否要保存灯的状态到SP中 @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_study); //初始化视图 initView(); //初始化监听 initCheckListenser(); } private void initView() { tvTitle = (TextView) findViewById(R.id.tvTitle); llbottomBackGround = (LinearLayout) findViewById(R.id.llbottomBackGround); rlBackGround = (RelativeLayout) findViewById(R.id.rlBackGround); cbStudy = (CheckBox) findViewById(R.id.cbStudy); llbottomBackGround.getBackground().setAlpha(220); tvTitle.setText("书房灯控"); mAppAction = new AppActionImpl(this); // 设置服务器地址 spUtils = SharedPreferencesUtils.getInstant(this); cbStudy.setChecked(spUtils.getStudy());//设置灯控开关初始状态 setLightBackground(spUtils.getStudy(),false);//设置书房灯的初始状态 if (spUtils.getISAutomatic()) {//是自动模式 隐藏下方按钮 llbottomBackGround.setVisibility(View.INVISIBLE); } else { llbottomBackGround.setVisibility(View.VISIBLE); } } /** * 开关灯状态监听 */ private void initCheckListenser() { //窗帘开关监听 cbStudy.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { if (spUtils.getIsSimulation()) { //如果是模拟,开关灯直接切换图片 setLightBackground(isChecked,true); } else { //如果不是模拟,去获取云平台上灯的开关状态 operateLight(isChecked); } } }); } /** * 模拟的时候设置灯的灯的状态(直接切换图片) */ private void setLightBackground(boolean check,boolean isSave) { if(isSave){ //存储当前卧室灯的开关状态 spUtils.setStudy(cbStudy.isChecked()); } if (check) { rlBackGround.setBackgroundResource(R.mipmap.pic_study); } else { rlBackGround.setBackgroundResource(R.mipmap.pic_study_close); } } /** * 通知设备开关 * * @param isChecked */ private void operateLight(final boolean isChecked) { mAppAction.onOff(Global.LIGHT_STUDY, isChecked, new ActionCallbackListener<ApiResponse<String>>() { @Override public void onSuccess(ApiResponse<String> data) { setLightBackground(isChecked,true);//进行开关灯图片替换 } @Override public void onFailure(String errorEven, String message) { Toast.makeText(StudyActivity.this, message, Toast.LENGTH_SHORT).show(); } }); } @Override protected void onDestroy() { //卧室界面activity结束时 发送广播 进行通知各卧室界面现在是处于哪个状态 Intent intent = new Intent("com.nangch.broadcasereceiver.MYRECEIVER"); intent.putExtra("check", "check"); //向广播接收器传递数据 sendBroadcast(intent);//发送check消息 通知灯光控制界面 改变灯光展示图片 super.onDestroy(); } /** * 点击事件 * @param view */ public void MyClick(View view) { switch (view.getId()) { case R.id.ivBack://返回 finish(); break; } } }
[ "823961237@qq.com" ]
823961237@qq.com
6da794cd6607e05a8238ca00b3d812c61aa50d36
0943ac0ad90002e3ae5207a94f9973a84077dda3
/app/src/main/java/com/hesham/fibonacci/fibonaccinumbers/GeneralDialogFragment.java
6dc9e422e4133c8565b01de97be3117a6829b837
[]
no_license
heshamfas/FibonacciNumbers
816a0052fa65c7f490b0b3293a32d0b572423daf
2695a55e54b081d7168ab777861ba347bfd2fb17
refs/heads/master
2021-01-02T08:34:14.159262
2014-09-07T19:59:56
2014-09-07T19:59:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
941
java
package com.hesham.fibonacci.fibonaccinumbers; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.content.Context; import android.os.Bundle; import android.view.View; /** * Created by Hesham on 8/11/2014. */ public class GeneralDialogFragment extends DialogFragment{ public GeneralDialogFragment() { } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { Bundle bundle = this.getArguments(); String title = bundle.getString("title"); String message = bundle.getString("message"); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity()); alertDialogBuilder.setTitle(title); alertDialogBuilder.setMessage(message); //null should be your on click listener alertDialogBuilder.setPositiveButton("OK", null); return alertDialogBuilder.create(); } }
[ "HeshamFas@live.com" ]
HeshamFas@live.com
f435a7d1b55db95601f9ef0df3b0adfbf1a2d50c
160a34361073a54d39ffa14fdae6ce3cbc7d6e6b
/src/main/java/com/alipay/api/domain/StandardCategoryInfo.java
5b44136dce789c219615269cdd95a0c7002cac93
[ "Apache-2.0" ]
permissive
appbootup/alipay-sdk-java-all
6a5e55629b9fc77e61ee82ea2c4cdab2091e0272
9ae311632a4053b8e5064b83f97cf1503a00147b
refs/heads/master
2020-05-01T09:45:44.940180
2019-03-15T09:52:14
2019-03-15T09:52:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,932
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 口碑标准后台类目 * * @author auto create * @since 1.0, 2017-06-06 11:40:51 */ public class StandardCategoryInfo extends AlipayObject { private static final long serialVersionUID = 7447165982567425265L; /** * 后台类目ID,类目信息的主键;商品类目ID,发布/修改商品的时候,需要填写商品所属的类目ID */ @ApiField("category_id") private String categoryId; /** * 是否为叶子类目,商品只能够发布在叶子类目下 */ @ApiField("is_leaf") private String isLeaf; /** * 类目名称 */ @ApiField("name") private String name; /** * 本类目的上一级类目ID,如果本类目是一级类目,上一级类目ID为空 */ @ApiField("parent_id") private String parentId; /** * 类目路径,递归父一级类目ID的列表,依次按照一级、二级、三级...顺序排列 */ @ApiField("path") private String path; /** * 类目所属一级类目的ID,若本类目是一级类目,值为本类目的ID */ @ApiField("root_id") private String rootId; public String getCategoryId() { return this.categoryId; } public void setCategoryId(String categoryId) { this.categoryId = categoryId; } public String getIsLeaf() { return this.isLeaf; } public void setIsLeaf(String isLeaf) { this.isLeaf = isLeaf; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getParentId() { return this.parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public String getPath() { return this.path; } public void setPath(String path) { this.path = path; } public String getRootId() { return this.rootId; } public void setRootId(String rootId) { this.rootId = rootId; } }
[ "liuqun.lq@alibaba-inc.com" ]
liuqun.lq@alibaba-inc.com
2bae16e3a285e4b5541f8094cda1fb6203e75cf2
4a14000f60919ca75d7a3200116f5b181f298806
/src/com/test/unit9/VerifierTest.java
d877e8d363a9aa067e17b39ef93913ce96ee1c56
[]
no_license
Gitrenzhijiang/JavaCoreDemo
5b0f19fea5116e1186c16bdab11c5f2aab4af5df
36bf1e9d41e977c941ee7d23a239ab71ffb3f94e
refs/heads/master
2020-04-23T15:32:55.923512
2019-02-18T11:13:05
2019-02-18T11:13:05
171,269,498
0
0
null
null
null
null
UTF-8
Java
false
false
1,235
java
package com.test.unit9; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.nio.file.Paths; /** * Java SecurityManager 测试实例 * @author REN * */ public class VerifierTest { public static void main(String[] args) throws Exception { System.setProperty("java.security.policy", "MyApp.policy"); SecurityManager sm = new SecurityManager(); System.setSecurityManager(sm); // 安装安全管理器 System.out.println(sm); File file = Paths.get("D://a/123.txt").toFile(); try ( PrintWriter pw = new PrintWriter( new OutputStreamWriter( new FileOutputStream(file, true))); ){ pw.append("hello,world"); } } static int fun() { int m = 1; int n; m = 1; n = 2; // 在n=2,的字节码变成m=2; int r = m + n; return r; } }
[ "781386910@qq.com" ]
781386910@qq.com
0ec1e1c1e842346ecd7ce3e8d0510f00c876d0c9
39f6016314a0dd0a4f765030e0111c8dc56a6087
/xiaoming-security-core/src/main/java/com/xiaoming/core/validate/code/ValidateCodeException.java
73c68cb5c0bf2d9de2c22eea23eef7ef6bcbd477
[]
no_license
TPxiaoming/spring-security
088aee722cef04ef441318ff6acc4abe494f01a7
84b0b7bb3d93fc03edcd7b7959376b9407a2b368
refs/heads/master
2020-05-09T14:10:26.609236
2019-06-13T09:31:01
2019-06-13T09:31:01
181,182,789
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.xiaoming.core.validate.code; import org.springframework.security.core.AuthenticationException; /** * 验证码异常 * AuthenticationException 抽象异常, 身份认证异常的基类 * @Author: xiaoming * @Date: 16:02 2019/5/27 */ public class ValidateCodeException extends AuthenticationException { private static final long serialVersionUID = 1850122820931656032L; public ValidateCodeException(String msg) { super(msg); } }
[ "3093403587@qq.com" ]
3093403587@qq.com
cef23af2baee0b6de5b619ab850babad33437447
ea26cbed5987b284b15a919c42b6d4dd04145809
/src/main/java/com/oop/mail/MailController.java
d97573121fd101b53eaced7bcea84e9e356eff9c
[]
no_license
petrostrak/airSense
94578697e6d23c39116969ffb6e99bd5a6038f31
4cca6719f2dc78c6f1ff06ba4b6f984930e333d5
refs/heads/master
2022-11-19T05:51:15.095382
2020-07-21T06:44:34
2020-07-21T06:44:34
269,696,214
0
0
null
null
null
null
UTF-8
Java
false
false
1,121
java
package com.oop.mail; import com.oop.entities.SensorLocation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; /** * * @author orestis */ @RestController public class MailController { @Autowired private MailService emailService; @RequestMapping(value = "/sendmail", method = RequestMethod.GET) public String sendMail() { // String from = "orestis.raspberry@gmail.com"; String subject = "Dickpics from your awesome springboot app"; String toAddresses = "orestispanago@gmail.com"; String body = "<html> <body><h1>Rendered HTML, plain text is for boootsam </h1> </body></html>"; emailService.sendMail(subject, toAddresses, body); return "mail sent"; } } // TODO check here for html paths: // https://stackoverflow.com/questions/37163553/sending-html-with-message-in-email-using-file-path
[ "pit.trak@gmail.com" ]
pit.trak@gmail.com
72b4be0b85b42e90a0e9f1acdb88507cf5ee79c7
3b1e641f51d9cb0c39804dd35e693f0586b7316b
/src/com/configuration/YamlConfiguration.java
809a0f02597c424001956d5b4ab3f6172f69dc32
[]
no_license
mohanr/Code-Generator
61dfd4ea1c6a59f14480e11eda9ffc172549142d
016dbd742b36bdf05c44772b096d76758c9c6887
refs/heads/master
2021-01-19T04:51:55.020174
2019-12-18T09:39:35
2019-12-18T09:39:35
61,132,831
0
0
null
null
null
null
UTF-8
Java
false
false
2,034
java
package com.configuration; import org.yaml.snakeyaml.TypeDescription; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Created by Mohan Radhakrishnan on 7/11/2016. */ public class YamlConfiguration { Yaml yaml = new Yaml(); Map<String, ArrayList> config; static TransformerRuleConfiguration rules; public static final String CONFIG_FILE = "D:\\IdeaProjects\\Antlr\\config.yml"; private YamlConfiguration(){ } public static TransformerRuleConfiguration getDefaultTransformerRuleConfiguration(){ Constructor constructor = new Constructor(TransformerRuleConfiguration.class); TypeDescription ruleDescription = new TypeDescription(TransformerRuleConfiguration.class); constructor.addTypeDescription( ruleDescription ); loadImports( ruleDescription ); loadOutputLocation( ruleDescription ); loadClassIdentifier(ruleDescription); Yaml yaml = new Yaml(constructor); try { rules = (TransformerRuleConfiguration) yaml.loadAs(new FileReader(CONFIG_FILE), TransformerRuleConfiguration.class); }catch( final FileNotFoundException fnfex ){ throw new Error(fnfex); } return rules; } private static void loadOutputLocation( TypeDescription ruleDescription ) { ruleDescription.putListPropertyType("outputDir", String.class); } private static void loadImports( TypeDescription ruleDescription ){ ruleDescription.putListPropertyType("oldImports", String.class); ruleDescription.putListPropertyType("newImports", String.class); } private static void loadClassIdentifier( TypeDescription ruleDescription ){ ruleDescription.putListPropertyType("classIdentifier ", String.class); } }
[ "476458@CTS.COM" ]
476458@CTS.COM
a81115beaa5950525dd4014d2f279d4d25111f6c
43d8520aecdad8ee7e4b1ac6b4e18bdf871de774
/src/com/comment/model/CommentDAO.java
322597e58d34901ca02f4ab7abc16cc15dea2d9f
[]
no_license
a5372268/MoviesHit
16f2862a40b1debc0ba4ae4def5ed56e98bbd1a6
26f20fe75510b2ecd80b3660b91801146f496a22
refs/heads/main
2023-05-25T04:47:08.688855
2021-06-11T11:38:33
2021-06-11T11:38:33
375,986,887
0
0
null
null
null
null
BIG5
Java
false
false
17,002
java
package com.comment.model; import java.sql.*; import java.util.*; import javax.naming.*; import javax.sql.DataSource; import com.movie.model.MovieVO; import jdbc.util.CompositeQuery.jdbcUtil_CompositeQuery_Comment; public class CommentDAO implements CommentDAO_interface{ private static DataSource ds = null; static { try { Context ctx = new InitialContext(); ds = (DataSource) ctx.lookup("java:comp/env/jdbc/CEA103G3"); } catch (NamingException e) { e.printStackTrace(); } } private static final String INSERT_STMT = "insert into COMMENT (MEMBER_NO,MOVIE_NO,CONTENT,STATUS) values (?, ?, ?, ?)"; private static final String UPDATE_STMT = "update COMMENT set CONTENT=?, MOVIE_NO=?, MODIFY_DT=default where COMMENT_NO = ?"; private static final String UPDATE_COMMENTSTATUS_OFF_STMT = "update COMMENT set STATUS=1 where COMMENT_NO = ?"; private static final String UPDATE_COMMENTSTATUS_ON_STMT = "update COMMENT set STATUS=0 where COMMENT_NO = ?"; private static final String DELETE_REPORTCOMMENTS = "delete from REPORT_COMMENT where COMMENT_NO = ?"; private static final String DELETE_COMMENT = "delete from COMMENT where COMMENT_NO = ?"; private static final String GET_ONE_STMT = "select * from COMMENT where COMMENT_NO = ?"; private static final String GET_ALL_STMT = "select * from COMMENT order by COMMENT_NO"; private static final String GET_MOVIE_COMMENT_STMT = "select * from COMMENT where MOVIE_NO = ? and STATUS = 0 order by CRT_DT desc"; // private static final String GET_MEMBER_COMMENT_STMT = // "select * from COMMENT where MEMBER_NO = ?"; private static final String GET_MOVIE_COMMENT_BY_MEM = "select * from COMMENT where MEMBER_NO = ?"; private static final String UPDATE_BY_COMMENTNO_STMT = "update COMMENT set CONTENT=? where COMMENT_NO = ?"; @Override public void insert(CommentVO commentVO) { Connection con = null; PreparedStatement pstmt = null; try { con = ds.getConnection(); pstmt = con.prepareStatement(INSERT_STMT); pstmt.setInt(1, commentVO.getMemberno()); pstmt.setInt(2, commentVO.getMovieno()); pstmt.setString(3, commentVO.getContent()); pstmt.setString(4, commentVO.getStatus()); pstmt.executeUpdate(); // Handle any SQL errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } } @Override public void update(CommentVO commentVO) { Connection con = null; PreparedStatement pstmt = null; try { con = ds.getConnection(); pstmt = con.prepareStatement(UPDATE_STMT); pstmt.setString(1, commentVO.getContent()); pstmt.setInt(2, commentVO.getMovieno()); pstmt.setInt(3, commentVO.getCommentno()); pstmt.executeUpdate(); // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } } @Override public void updateCommentStatusOff(CommentVO commentVO , Connection con) { PreparedStatement pstmt = null; try { pstmt = con.prepareStatement(UPDATE_COMMENTSTATUS_OFF_STMT); pstmt.setDouble(1, commentVO.getCommentno()); pstmt.executeUpdate(); // System.out.println("11"); // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } } } @Override public void updateCommentStatusOn(CommentVO commentVO , Connection con) { PreparedStatement pstmt = null; try { pstmt = con.prepareStatement(UPDATE_COMMENTSTATUS_ON_STMT); pstmt.setDouble(1, commentVO.getCommentno()); pstmt.executeUpdate(); // System.out.println("11"); // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } } } // @Override // public void delete(Integer commentno) { // // Connection con = null; // PreparedStatement pstmt = null; // // try { // // con = ds.getConnection(); // pstmt = con.prepareStatement(DELETE_STMT); // // pstmt.setInt(1, commentno); // // pstmt.executeUpdate(); // // // Handle any driver errors // } catch (SQLException se) { // throw new RuntimeException("A database error occured. " // + se.getMessage()); // // Clean up JDBC resources // } finally { // if (pstmt != null) { // try { // pstmt.close(); // } catch (SQLException se) { // se.printStackTrace(System.err); // } // } // if (con != null) { // try { // con.close(); // } catch (Exception e) { // e.printStackTrace(System.err); // } // } // } // // } @Override public void delete(Integer commentno) { int updateCount_ReportComments = 0; Connection con = null; PreparedStatement pstmt = null; try { con = ds.getConnection(); // 1●設定於 pstm.executeUpdate()之前 con.setAutoCommit(false); // 先刪除檢舉評論 pstmt = con.prepareStatement(DELETE_REPORTCOMMENTS); pstmt.setInt(1, commentno); updateCount_ReportComments = pstmt.executeUpdate(); // 再刪除評論 pstmt = con.prepareStatement(DELETE_COMMENT); pstmt.setInt(1, commentno); pstmt.executeUpdate(); // 2●設定於 pstm.executeUpdate()之後 con.commit(); con.setAutoCommit(true); System.out.println("刪除評論編號" + commentno + "時,共有檢舉評論" + updateCount_ReportComments + "則同時被刪除"); // Handle any SQL errors } catch (SQLException se) { if (con != null) { try { // 3●設定於當有exception發生時之catch區塊內 con.rollback(); } catch (SQLException excep) { throw new RuntimeException("rollback error occured. " + excep.getMessage()); } } throw new RuntimeException("A database error occured. " + se.getMessage()); } finally { if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } } @Override public CommentVO findByPrimaryKey(Integer commentno) { CommentVO commentVO = null; Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = ds.getConnection(); pstmt = con.prepareStatement(GET_ONE_STMT); pstmt.setInt(1, commentno); rs = pstmt.executeQuery(); while (rs.next()) { // commentVo 也稱為 Domain objects commentVO = new CommentVO(); commentVO.setCommentno(rs.getInt("COMMENT_NO")); commentVO.setMemberno(rs.getInt("MEMBER_NO")); commentVO.setMovieno(rs.getInt("MOVIE_NO")); commentVO.setContent(rs.getString("CONTENT")); commentVO.setCreatdate(rs.getTimestamp("CRT_DT")); commentVO.setModifydate(rs.getTimestamp("MODIFY_DT")); commentVO.setStatus(rs.getString("STATUS")); } // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (rs != null) { try { rs.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } return commentVO; } // @Override // public List<CommentVO> findByMemberNo(Integer memberno) { // List<CommentVO> list = new ArrayList<CommentVO>(); // CommentVO commentVO = null; // // Connection con = null; // PreparedStatement pstmt = null; // ResultSet rs = null; // // try { // // con = ds.getConnection(); // pstmt = con.prepareStatement(GET_MEMBER_COMMENT_STMT); // // pstmt.setInt(1, memberno); // // rs = pstmt.executeQuery(); // // while (rs.next()) { // // commentVo 也稱為 Domain objects // commentVO = new CommentVO(); // commentVO.setCommentno(rs.getInt("COMMENT_NO")); // commentVO.setMemberno(rs.getInt("MEMBER_NO")); // commentVO.setMovieno(rs.getInt("MOVIE_NO")); // commentVO.setContent(rs.getString("CONTENT")); // commentVO.setCreatdate(rs.getTimestamp("CRT_DT")); // commentVO.setModifydate(rs.getTimestamp("MODIFY_DT")); // commentVO.setStatus(rs.getString("STATUS")); // list.add(commentVO); // } // // // Handle any driver errors // } catch (SQLException se) { // throw new RuntimeException("A database error occured. " // + se.getMessage()); // // Clean up JDBC resources // } finally { // if (rs != null) { // try { // rs.close(); // } catch (SQLException se) { // se.printStackTrace(System.err); // } // } // if (pstmt != null) { // try { // pstmt.close(); // } catch (SQLException se) { // se.printStackTrace(System.err); // } // } // if (con != null) { // try { // con.close(); // } catch (Exception e) { // e.printStackTrace(System.err); // } // } // } // return list; // } @Override public List<CommentVO> getAll() { List<CommentVO> list = new ArrayList<CommentVO>(); CommentVO commentVO = null; Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = ds.getConnection(); pstmt = con.prepareStatement(GET_ALL_STMT); rs = pstmt.executeQuery(); while (rs.next()) { // commentVO 也稱為 Domain objects commentVO = new CommentVO(); commentVO.setCommentno(rs.getInt("COMMENT_NO")); commentVO.setMemberno(rs.getInt("MEMBER_NO")); commentVO.setMovieno(rs.getInt("MOVIE_NO")); commentVO.setContent(rs.getString("CONTENT")); commentVO.setCreatdate(rs.getTimestamp("CRT_DT")); commentVO.setModifydate(rs.getTimestamp("MODIFY_DT")); commentVO.setStatus(rs.getString("STATUS")); list.add(commentVO); // Store the row in the list } // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (rs != null) { try { rs.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } return list; } @Override public List<CommentVO> getAll(Map<String, String[]> map) { List<CommentVO> list = new ArrayList<CommentVO>(); CommentVO commentVO = null; Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = ds.getConnection(); String finalSQL = "select * from COMMENT " + jdbcUtil_CompositeQuery_Comment.get_WhereCondition(map) + "order by COMMENT_NO desc"; pstmt = con.prepareStatement(finalSQL); System.out.println("●●finalSQL(by DAO) = "+finalSQL); rs = pstmt.executeQuery(); while (rs.next()) { commentVO = new CommentVO(); commentVO.setCommentno(rs.getInt("COMMENT_NO")); commentVO.setMemberno(rs.getInt("MEMBER_NO")); commentVO.setMovieno(rs.getInt("MOVIE_NO")); commentVO.setContent(rs.getString("CONTENT")); commentVO.setCreatdate(rs.getTimestamp("CRT_DT")); commentVO.setModifydate(rs.getTimestamp("MODIFY_DT")); commentVO.setStatus(rs.getString("STATUS")); list.add(commentVO); // Store the row in the List } // Handle any SQL errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); } finally { if (rs != null) { try { rs.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } return list; } @Override public List<CommentVO> findByMovieNo(Integer movieno) { List<CommentVO> list = new ArrayList<CommentVO>(); CommentVO commentVO = null; Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = ds.getConnection(); pstmt = con.prepareStatement(GET_MOVIE_COMMENT_STMT); pstmt.setInt(1, movieno); rs = pstmt.executeQuery(); while (rs.next()) { // commentVo 也稱為 Domain objects commentVO = new CommentVO(); commentVO.setCommentno(rs.getInt("COMMENT_NO")); commentVO.setMemberno(rs.getInt("MEMBER_NO")); commentVO.setMovieno(rs.getInt("MOVIE_NO")); commentVO.setContent(rs.getString("CONTENT")); commentVO.setCreatdate(rs.getTimestamp("CRT_DT")); commentVO.setModifydate(rs.getTimestamp("MODIFY_DT")); commentVO.setStatus(rs.getString("STATUS")); list.add(commentVO); } // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (rs != null) { try { rs.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } return list; } @Override public List<CommentVO> findByMemberNo(Integer memberno) { List<CommentVO> list = new ArrayList<CommentVO>(); CommentVO commentVO = null; Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = ds.getConnection(); pstmt = con.prepareStatement(GET_MOVIE_COMMENT_BY_MEM); pstmt.setInt(1, memberno); rs = pstmt.executeQuery(); while (rs.next()) { // commentVo 也稱為 Domain objects commentVO = new CommentVO(); commentVO.setCommentno(rs.getInt("COMMENT_NO")); commentVO.setMemberno(rs.getInt("MEMBER_NO")); commentVO.setMovieno(rs.getInt("MOVIE_NO")); commentVO.setContent(rs.getString("CONTENT")); commentVO.setCreatdate(rs.getTimestamp("CRT_DT")); commentVO.setModifydate(rs.getTimestamp("MODIFY_DT")); commentVO.setStatus(rs.getString("STATUS")); list.add(commentVO); } // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (rs != null) { try { rs.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } return list; } @Override public void update_bycommentno(CommentVO commentVO) { Connection con = null; PreparedStatement pstmt = null; try { con = ds.getConnection(); pstmt = con.prepareStatement(UPDATE_BY_COMMENTNO_STMT); pstmt.setString(1, commentVO.getContent()); pstmt.setInt(2, commentVO.getCommentno()); pstmt.executeUpdate(); // Handle any driver errors } catch (SQLException se) { throw new RuntimeException("A database error occured. " + se.getMessage()); // Clean up JDBC resources } finally { if (pstmt != null) { try { pstmt.close(); } catch (SQLException se) { se.printStackTrace(System.err); } } if (con != null) { try { con.close(); } catch (Exception e) { e.printStackTrace(System.err); } } } } }
[ "a5372268@gmail.com" ]
a5372268@gmail.com
871d60ed2074fe208e933f51fea37e7ff61352c8
fe6ecbf29b0130662ae415d3b66af97af7094a70
/Code/Work/FF/Decomp/C_100472_akr.java
abc9b1393c1687fb7d97d9895742f17792dd2aa3
[]
no_license
joshuacoles/MineCraft-Patch-On-Launch-Client-old
272db752d5bc94b02bb14c012276c92047b0b0c4
28055c66ecf3d3236155521e988acc3b7f0b08e6
refs/heads/master
2016-09-05T21:03:36.361801
2012-11-17T07:42:26
2012-11-17T07:42:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,627
java
import java.util.Random; public class C_100472_akr extends C_100200_aiq { protected C_100472_akr(int var1) { super(var1, C_100664_afg.field_109027_q); this.field_106165_cl = 104; this.func_106008_a(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F); } public int func_106013_d() { return -1; } public boolean func_105994_c() { return false; } public boolean func_105977_b() { return false; } public void func_106007_a(C_100837_xo var1, int var2, int var3, int var4) { int var5 = var1.func_109357_g(var2, var3, var4) & 7; switch(var5) { case 1: default: this.func_106008_a(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F); break; case 2: this.func_106008_a(0.25F, 0.25F, 0.5F, 0.75F, 0.75F, 1.0F); break; case 3: this.func_106008_a(0.25F, 0.25F, 0.0F, 0.75F, 0.75F, 0.5F); break; case 4: this.func_106008_a(0.5F, 0.25F, 0.25F, 1.0F, 0.75F, 0.75F); break; case 5: this.func_106008_a(0.0F, 0.25F, 0.25F, 0.5F, 0.75F, 0.75F); } } public C_100412_amr func_106021_e(C_100873_xe var1, int var2, int var3, int var4) { this.func_106007_a(var1, var2, var3, var4); return super.func_106021_e(var1, var2, var3, var4); } public void func_106047_a(C_100873_xe var1, int var2, int var3, int var4, C_100595_ln var5) { int var6 = C_100650_jv.func_108910_c((double)(var5.field_103236_z * 4.0F / 360.0F) + 2.5D) & 3; var1.func_109488_c(var2, var3, var4, var6); } public C_100398_amm func_106326_a(C_100873_xe var1) { return new C_100415_amk(); } public int func_105979_a(C_100873_xe var1, int var2, int var3, int var4) { return C_100992_tt.field_110951_bQ.field_110891_cf; } public int func_106019_h(C_100873_xe var1, int var2, int var3, int var4) { C_100398_amm var5 = var1.func_109353_p(var2, var3, var4); return var5 != null && var5 instanceof C_100415_amk?((C_100415_amk)var5).func_102965_a():super.func_106019_h(var1, var2, var3, var4); } public int func_106004_b(int var1) { return var1; } public void func_105998_a(C_100873_xe var1, int var2, int var3, int var4, int var5, float var6, int var7) {} public void func_106060_a(C_100873_xe var1, int var2, int var3, int var4, int var5, C_101095_qg var6) { if(var6.field_103869_cf.field_111597_d) { var5 |= 8; var1.func_109488_c(var2, var3, var4, var5); } super.func_106060_a(var1, var2, var3, var4, var5, var6); } public void func_106041_a(C_100873_xe var1, int var2, int var3, int var4, int var5, int var6) { if(!var1.field_109557_J) { if((var6 & 8) == 0) { this.func_106042_a(var1, var2, var3, var4, new C_100994_tv(C_100992_tt.field_110951_bQ.field_110891_cf, 1, this.func_106019_h(var1, var2, var3, var4))); } super.func_106041_a(var1, var2, var3, var4, var5, var6); } } public int func_106043_a(int var1, Random var2, int var3) { return C_100992_tt.field_110951_bQ.field_110891_cf; } public void func_106348_a(C_100873_xe var1, int var2, int var3, int var4, C_100415_amk var5) { if(var5.func_102965_a() == 1 && var3 >= 2) { int var6 = C_100451_alf.field_106141_bf.field_106162_cm; int var7; C_100579_pa var8; int var9; for(var7 = -2; var7 <= 0; ++var7) { if(var1.func_109349_a(var2, var3 - 1, var4 + var7) == var6 && var1.func_109349_a(var2, var3 - 1, var4 + var7 + 1) == var6 && var1.func_109349_a(var2, var3 - 2, var4 + var7 + 1) == var6 && var1.func_109349_a(var2, var3 - 1, var4 + var7 + 2) == var6 && this.func_106349_d(var1, var2, var3, var4 + var7, 1) && this.func_106349_d(var1, var2, var3, var4 + var7 + 1, 1) && this.func_106349_d(var1, var2, var3, var4 + var7 + 2, 1)) { var1.func_109441_d(var2, var3, var4 + var7, 8); var1.func_109441_d(var2, var3, var4 + var7 + 1, 8); var1.func_109441_d(var2, var3, var4 + var7 + 2, 8); var1.func_109378_b(var2, var3, var4 + var7, 0); var1.func_109378_b(var2, var3, var4 + var7 + 1, 0); var1.func_109378_b(var2, var3, var4 + var7 + 2, 0); var1.func_109378_b(var2, var3 - 1, var4 + var7, 0); var1.func_109378_b(var2, var3 - 1, var4 + var7 + 1, 0); var1.func_109378_b(var2, var3 - 1, var4 + var7 + 2, 0); var1.func_109378_b(var2, var3 - 2, var4 + var7 + 1, 0); if(!var1.field_109557_J) { var8 = new C_100579_pa(var1); var8.func_103055_b((double)var2 + 0.5D, (double)var3 - 1.45D, (double)(var4 + var7) + 1.5D, 90.0F, 0.0F); var8.field_103469_aw = 90.0F; var8.func_103697_m(); var1.func_109513_d(var8); } for(var9 = 0; var9 < 120; ++var9) { var1.func_109428_a("snowballpoof", (double)var2 + var1.field_109577_u.nextDouble(), (double)(var3 - 2) + var1.field_109577_u.nextDouble() * 3.9D, (double)(var4 + var7 + 1) + var1.field_109577_u.nextDouble(), 0.0D, 0.0D, 0.0D); } var1.func_109409_f(var2, var3, var4 + var7, 0); var1.func_109409_f(var2, var3, var4 + var7 + 1, 0); var1.func_109409_f(var2, var3, var4 + var7 + 2, 0); var1.func_109409_f(var2, var3 - 1, var4 + var7, 0); var1.func_109409_f(var2, var3 - 1, var4 + var7 + 1, 0); var1.func_109409_f(var2, var3 - 1, var4 + var7 + 2, 0); var1.func_109409_f(var2, var3 - 2, var4 + var7 + 1, 0); return; } } for(var7 = -2; var7 <= 0; ++var7) { if(var1.func_109349_a(var2 + var7, var3 - 1, var4) == var6 && var1.func_109349_a(var2 + var7 + 1, var3 - 1, var4) == var6 && var1.func_109349_a(var2 + var7 + 1, var3 - 2, var4) == var6 && var1.func_109349_a(var2 + var7 + 2, var3 - 1, var4) == var6 && this.func_106349_d(var1, var2 + var7, var3, var4, 1) && this.func_106349_d(var1, var2 + var7 + 1, var3, var4, 1) && this.func_106349_d(var1, var2 + var7 + 2, var3, var4, 1)) { var1.func_109441_d(var2 + var7, var3, var4, 8); var1.func_109441_d(var2 + var7 + 1, var3, var4, 8); var1.func_109441_d(var2 + var7 + 2, var3, var4, 8); var1.func_109378_b(var2 + var7, var3, var4, 0); var1.func_109378_b(var2 + var7 + 1, var3, var4, 0); var1.func_109378_b(var2 + var7 + 2, var3, var4, 0); var1.func_109378_b(var2 + var7, var3 - 1, var4, 0); var1.func_109378_b(var2 + var7 + 1, var3 - 1, var4, 0); var1.func_109378_b(var2 + var7 + 2, var3 - 1, var4, 0); var1.func_109378_b(var2 + var7 + 1, var3 - 2, var4, 0); if(!var1.field_109557_J) { var8 = new C_100579_pa(var1); var8.func_103055_b((double)(var2 + var7) + 1.5D, (double)var3 - 1.45D, (double)var4 + 0.5D, 0.0F, 0.0F); var8.func_103697_m(); var1.func_109513_d(var8); } for(var9 = 0; var9 < 120; ++var9) { var1.func_109428_a("snowballpoof", (double)(var2 + var7 + 1) + var1.field_109577_u.nextDouble(), (double)(var3 - 2) + var1.field_109577_u.nextDouble() * 3.9D, (double)var4 + var1.field_109577_u.nextDouble(), 0.0D, 0.0D, 0.0D); } var1.func_109409_f(var2 + var7, var3, var4, 0); var1.func_109409_f(var2 + var7 + 1, var3, var4, 0); var1.func_109409_f(var2 + var7 + 2, var3, var4, 0); var1.func_109409_f(var2 + var7, var3 - 1, var4, 0); var1.func_109409_f(var2 + var7 + 1, var3 - 1, var4, 0); var1.func_109409_f(var2 + var7 + 2, var3 - 1, var4, 0); var1.func_109409_f(var2 + var7 + 1, var3 - 2, var4, 0); return; } } } } private boolean func_106349_d(C_100873_xe var1, int var2, int var3, int var4, int var5) { if(var1.func_109349_a(var2, var3, var4) != this.field_106162_cm) { return false; } else { C_100398_amm var6 = var1.func_109353_p(var2, var3, var4); return var6 != null && var6 instanceof C_100415_amk?((C_100415_amk)var6).func_102965_a() == var5:false; } } }
[ "josh@coles.to" ]
josh@coles.to
db163c4b1d8d381d73da7e1383e473fbeb2d24a4
8419df2ca4066a676d88f9760c6b4b5108729118
/CafeteriaBlackWhiteDecorator/src/main/java/br/edu/ifes/poo2/cafeteriablackwhitedecorator/cdp/CremeDeLaranja.java
351f987acb738f9dc61903f8cb379851cd465f91
[]
no_license
phoenixproject/poo2dp
0ef3c013c221babef7a335a70509098b5efd1dcc
cb96338f1e17355fd1ecc5c72558bf56d371d4f6
refs/heads/master
2021-01-10T06:18:08.518065
2015-11-24T17:37:50
2015-11-24T17:37:50
46,763,514
1
0
null
null
null
null
UTF-8
Java
false
false
513
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 br.edu.ifes.poo2.cafeteriablackwhitedecorator.cdp; /** * * @author 20101bsi0453 */ public class CremeDeLaranja extends AbstractComplemento { public CremeDeLaranja(Cafe cafe) { super(cafe); } @Override public Double getPreco(){ return cafeDecorado.getPreco() + 1.50; } }
[ "phoenixproject.erp@gmail.com" ]
phoenixproject.erp@gmail.com
31d5e5ed1fceb42500a18c4f203c30efe6eb2178
39ef3a7cc8c37214ea5167822365ec8daec0e702
/projecteuler/12-highly-divisible-triangular-number/Solution.java
2b883d5ac3d787b1efbf527bdb2e79b605f5c18a
[]
no_license
neppramod/problems_practice
75449062037282d65896d296f0e1832482869832
764d2e4470d87c66cd1223387b49d3df610bb2a1
refs/heads/master
2022-08-18T19:54:16.370710
2022-08-16T02:54:45
2022-08-16T02:54:45
59,494,037
2
0
null
2021-01-03T18:07:56
2016-05-23T15:26:56
Java
UTF-8
Java
false
false
1,825
java
import java.util.*; // Use arithmetic series summation public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = triangleNumberWithOverFiveHundredDivisors(); System.out.println(num); //System.out.println(divisors(28)); /* Lot of calculation 2162160 - 320 10767120 - 320 13857480 - 320 17907120 - 480 20991960 - 320 22582560 - 384 27561600 - 384 29610360 - 320 30728880 - 360 31240560 - 320 34283340 - 324 37191000 - 384 39209940 - 384 43809480 - 384 45158256 - 320 48024900 - 405 48565440 - 448 53411280 - 320 54752880 - 320 59192640 - 448 60769800 - 432 60935280 - 320 64292130 - 320 64701000 - 384 65431080 - 384 69390090 - 384 73150560 - 384 73926720 - 336 75897360 - 360 76576500 - 576 576 12375 */ } static int triangleNumberWithOverFiveHundredDivisors() { for (int i = 1; i <= 50000; i++) { int cur = i * (i + 1) / 2; int divisors = divisors(cur); if (divisors > 300) { System.out.println(cur + " - " + divisors); } if (divisors > 500) { System.out.println(divisors); return i; } } return 0; } static int divisors(int number) { int count = 0; for (int i = 1; i <= number; i++) { if (number % i == 0) { count++; } } return count; } }
[ "neppramod@gmail.com" ]
neppramod@gmail.com
013e61a23a29857a3d5eaf021a17c131044aa0b6
6757aa38d6eafd1707376e0afa4de6ab86d9e9af
/app/src/main/java/com/andrewnwalker/mousetimes_california/CountUpTimer.java
274f497a40df19b7270bedb4b9a9cd6236ea0163
[]
no_license
Andrew-Walker/Mouse-Times-California---Android
2b557d72e4110c2d1f8804fccdab018efb45ee21
9e0c03b4161dd12911150bef91c1a40f139daa1d
refs/heads/master
2020-09-20T19:46:28.717803
2016-04-03T01:01:00
2016-04-03T01:01:00
65,948,453
0
0
null
null
null
null
UTF-8
Java
false
false
1,027
java
package com.andrewnwalker.mousetimes_california; import android.os.Handler; import android.os.Message; import android.os.SystemClock; /** * Created by Andrew Walker on 13/02/2016. */ public abstract class CountUpTimer { abstract public void onTick(long elapsedTime); private static final int MSG = 1; private final long interval; private long base; public CountUpTimer(long interval) { this.interval = interval; } public void start() { base = SystemClock.elapsedRealtime(); handler.sendMessage(handler.obtainMessage(MSG)); } public void stop() { handler.removeMessages(MSG); } private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { synchronized (CountUpTimer.this) { long elapsedTime = SystemClock.elapsedRealtime() - base; onTick(elapsedTime); sendMessageDelayed(obtainMessage(MSG), interval); } } }; }
[ "andreww500@live.com" ]
andreww500@live.com
0d49e82fdb2b201f81a3869d172e4dec7d87a598
7a3c0a90c4f8039837de7c07c687150b5b8bc647
/src/main/java/com/ldh/permission/core/service/impl/AdminResourceServiceImpl.java
98ae321a527aafc88993ac8e7478e02a14e18474
[]
no_license
coder-ldh/permission
b3c84a9c1834ccf6a00d75ce3ac9b937ffd7397d
426a7ecbf90860a8d350c196c41a5be7898bd96b
refs/heads/master
2020-04-11T15:31:42.531787
2019-01-04T01:49:59
2019-01-04T01:49:59
161,894,332
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.ldh.permission.core.service.impl; import com.ldh.permission.core.model.AdminResource; import com.ldh.permission.core.mapper.AdminResourceMapper; import com.ldh.permission.core.service.AdminResourceService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 用户资源表 服务实现类 * </p> * * @author ldh * @since 2018-12-17 */ @Service public class AdminResourceServiceImpl extends ServiceImpl<AdminResourceMapper, AdminResource> implements AdminResourceService { }
[ "ldh@awallet.com" ]
ldh@awallet.com
1e8ce981c024a11988ee6e89ec2221b77322316a
4e41d8251e19228e8758f80448a0219988fd0c50
/src/TestaArraysObjetos.java
ca884d649b81c25239aaad363f994a19af5144b6
[]
no_license
JAlvesBruno/OrientacaoObjetos
bfeda220c697c7bceae6290ffa4efebce3ec88af
18cd6a15122e55d31c9abc82b4537cb915cf71f7
refs/heads/master
2020-03-25T22:17:12.512324
2018-08-09T23:40:26
2018-08-09T23:40:26
144,214,334
0
0
null
null
null
null
UTF-8
Java
false
false
789
java
public class TestaArraysObjetos { public static void main(String[] args) { Carro[] carros = new Carro[5]; Carro carro1 = new Carro("verde","HB20",120); // carro1.setCor("verde"); // carro1.setModelo("HB20"); // carro1.setVelocidadeMaxima(120); Carro carro2 = new Carro("branco", "BMW", 320); // carro2.setCor("branco"); // carro2.setModelo("BMW"); // carro2.setVelocidadeMaxima(320); carros[0] = carro1; carros[1] = carro2; carros[0].setCor("Preto"); System.out.println("Carro1: " + carros[0].getCor()); System.out.println("Carro2: " + carros[1].getCor()); for(Carro carro: carros) { System.out.println("Carro: " + carro.getModelo()); } } }
[ "bruno.ja@puccampinas.edu.br" ]
bruno.ja@puccampinas.edu.br
94c9dd33ace703c06c56040af4b42c65b860f1a7
e306ba2d2ff8ca1945291f011bef28deba026b80
/zhouchao/Exercise0425/src/cn/hfxt/entity/ZC.java
277712e09e86fa1920b4a1738c5e04cd54aef77e
[]
no_license
SunYongLi12/SunYL
e7a80d0e79c1d57d7a36ae54b90ae9b79faaba7f
634e88975c3d03d084a5d7b2a8c31238fcf563f5
refs/heads/master
2023-04-14T11:39:19.355638
2021-04-28T04:35:03
2021-04-28T04:35:03
362,008,601
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package cn.hfxt.entity; public class ZC { private int id; private String rank; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getRank() { return rank; } public void setRank(String rank) { this.rank = rank; } }
[ "goodMorning_pro@at.bdqn.com" ]
goodMorning_pro@at.bdqn.com
fde7b8a40d76dd294f8f72f5e407832d7ffff197
530fe1b3a654543334d5a9afbb2ea46b8544d6b0
/week-03/Day-03/src/Workshop10.java
62ae68137f775f44a244005451bb7f5ca56377c6
[]
no_license
greenfox-zerda-raptors/PappBeata
d58ea959f8588172df5ae9994a552a6af5bb7283
3a67b8eedeb7e1b0ff723429ea4faa5350fa8d80
refs/heads/master
2021-01-12T18:19:16.649526
2017-05-06T07:55:19
2017-05-06T07:55:19
71,363,242
0
1
null
null
null
null
UTF-8
Java
false
false
857
java
import java.util.Arrays; public class Workshop10{ public static void main(String[] args) { // Task 1: Create an array (jagged) which can contain the different shades of specified colors // in colors[0] store the shades of green: "lime", "forest green", "olive", "pale green", "spring green" // in colors[1] store the shades of red: "orange red", "red", "tomato" // in colors[2] store the shades of pink: "orchid", "violet", "pink", "hot pink" String colors[][]={{"lime", "forest green", "olive", "pale green", "spring green"}, {"orange red", "red", "tomato"}, {"orchid", "violet", "pink", "hot pink"}}; // Task 2: Print the values of the array to the console int i; for (i=0; i<3; i++) { System.out.print(Arrays.toString(colors[i]) + "\n"); } } }
[ "pappbeata@gmail.com" ]
pappbeata@gmail.com
7a9239e845c90489ff7daa80d0475b60fd380fd8
fea07f0dd2555f7b51e3cdd15e96812820499aea
/hedera-node/src/test/java/com/hedera/test/factories/accounts/MockFCMapFactory.java
0998e9636a9ef4f0c616de1580894e99c0911b27
[ "Apache-2.0" ]
permissive
Vinci-zZ/hedera-services
e663c3dc1aae8742d92b0031727861c5fb323c97
afa3afb5041a908a783fc0b91c61facc532a7463
refs/heads/master
2023-02-28T03:44:11.524812
2021-02-06T06:26:00
2021-02-06T06:26:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,295
java
package com.hedera.test.factories.accounts; /*- * ‌ * Hedera Services Node * ​ * Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC * ​ * 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. * ‍ */ import com.hedera.services.state.merkle.MerkleEntityId; import com.hedera.services.state.merkle.MerkleAccount; import com.swirlds.fcmap.FCMap; import static com.hedera.test.utils.IdUtils.asContract; import static org.mockito.BDDMockito.*; import static com.hedera.test.utils.IdUtils.asAccount; import static com.hedera.test.factories.accounts.MerkleAccountFactory.newAccount; import static com.hedera.test.factories.txns.SignedTxnFactory.*; public class MockFCMapFactory { public static final long NODE_BALANCE = 1_000_000_000L; public static final long GENESIS_BALANCE = 50_000_000_000_000L; private final FCMap mock = mock(FCMap.class); private MockFCMapFactory() {} public static MockFCMapFactory newAccounts() { return new MockFCMapFactory(); } public static MockFCMapFactory newAccountsWithDefaults() throws Exception { return newAccounts() .withAccount(DEFAULT_NODE_ID, newAccount().balance(NODE_BALANCE).get()) .withAccount(DEFAULT_PAYER_ID, newAccount().balance(GENESIS_BALANCE).accountKeys(DEFAULT_PAYER_KT).get()); } public MockFCMapFactory withAccount(String id, MerkleAccount meta) { MerkleEntityId account = MerkleEntityId.fromAccountId(asAccount(id)); given(mock.get(account)).willReturn(meta); return this; } public MockFCMapFactory withContract(String id, MerkleAccount meta) { MerkleEntityId contract = MerkleEntityId.fromContractId(asContract(id)); given(mock.get(contract)).willReturn(meta); return this; } public FCMap<MerkleEntityId, MerkleAccount> get() { return (FCMap<MerkleEntityId, MerkleAccount>)mock; } }
[ "michael.tinker@hedera.com" ]
michael.tinker@hedera.com
c86475448aaf7872564d12f3f8dc6c6fa2c49df8
45141bec96cd635707213dba449867a36d6da3b4
/Lab2/src/main/java/com/naofi/controllers/ManagerController.java
c59cfaffc289486fe445335d9e469f82e75ae492
[]
no_license
kubayof/databases
fbac65db9885337ea1067078e95a2905cbad63e9
ef28e552a5e38f78e239405c456c8f2710857bf0
refs/heads/master
2023-02-08T03:50:25.569543
2020-12-29T14:22:24
2020-12-29T14:22:24
291,979,282
0
0
null
null
null
null
UTF-8
Java
false
false
2,822
java
package com.naofi.controllers; import com.naofi.model.dao.interfaces.ManagerDAO; import com.naofi.model.entity.Manager; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; @Controller @RequestMapping("/managers") public class ManagerController { private final ManagerDAO dao; public ManagerController(ManagerDAO dao) { this.dao = dao; } @GetMapping("/id") @ResponseBody public Manager getById(@RequestParam Integer id) { Manager manager = dao.getById(id); if (manager == null) { throw new NullPointerException(); } return manager; } @GetMapping("/first_name") public String getByFirstName(@RequestParam("first_name") String firstName, Model model) { model.addAttribute("items", dao.getByFirstName(firstName)); return "list_info"; } @GetMapping("/last_name") public String getByLastName(@RequestParam("last_name") String lastName, Model model) { model.addAttribute("items", dao.getByLastName(lastName)); return "list_info"; } @GetMapping("/get_by") public String getBy(Manager manager, Model model) { model.addAttribute("items", dao.getBy(manager)); return "list_info"; } @GetMapping("/project_id") @ResponseBody public Manager getByProjectId(@RequestParam("project_id") Integer projectId) { Manager manager = dao.getByProjectId(projectId); if (manager == null) { throw new NullPointerException(); } return manager; } @GetMapping("/programmer_id") @ResponseBody public Manager getByProgrammerId(@RequestParam("programmer_id") Integer programmerId) { Manager manager = dao.getByProgrammerId(programmerId); if (manager == null) { throw new NullPointerException(); } return manager; } @PostMapping("/new") @ResponseBody public String createNew(Manager manager) { if (dao.save(manager) > 0) { return "Successfully inserted"; } else { return "Error while insert attempt"; } } @PostMapping("/update") @ResponseBody public String update(Manager manager) { if (dao.update(manager) > 0) { return "Updated successfully"; } else { return "Error while updating"; } } @PostMapping("/delete") @ResponseBody public String delete(@RequestParam("id") Integer id) { if (dao.deleteById(id) > 0) { return "Successfully deleted"; } else { return "Error during delete attempt"; } } }
[ "kubyof82@gmail.com" ]
kubyof82@gmail.com
ed2f8c4c8a983461208e173f2ca13673bb151d26
692e68c46eeb49c63523bb5198cb66386a5e5b4d
/app/src/main/java/com/example/primetech/contactproviderwithcursoradapter/MainActivity.java
329cff9ed5d9ff06c4443da06e78d81e1057aa9f
[]
no_license
fardin95/ContactProviderWithCursorAdapter
b07eb123f2275dcf35e037d91503192c20c8e2d7
8afabbae586e04f36f09bb3871857bf533e36ca0
refs/heads/master
2021-01-19T00:58:13.198752
2016-07-19T11:23:55
2016-07-19T11:23:55
63,677,384
0
0
null
null
null
null
UTF-8
Java
false
false
1,911
java
package com.example.primetech.contactproviderwithcursoradapter; import android.content.ContentResolver; import android.database.Cursor; import android.os.Bundle; import android.provider.ContactsContract; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.ListView; public class MainActivity extends AppCompatActivity { private android.widget.ListView listView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); this.listView = (ListView) findViewById(R.id.listView); ContentResolver contentResolver = getContentResolver(); // Contact data String columsToExtract[] = new String[]{ ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.PHOTO_THUMBNAIL_URI }; String whereClause = "((" + ContactsContract.Contacts.DISPLAY_NAME + " NOTNULL) AND (" + ContactsContract.Contacts.DISPLAY_NAME + " != '' ) AND (" + ContactsContract.Contacts.STARRED + "== 1))"; // sort by incresing id String sortOrder = ContactsContract.Contacts._ID + " ASC"; // query contats contentProvider Cursor cursor = contentResolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null); if (cursor!=null){ int i = 0; cursor.moveToFirst(); for ( i=0; i<cursor.getCount(); i++){ String string = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)); Log.e("nAME", string); cursor.moveToNext(); } } ContactInfoListAdapter contactInfoListAdapter = new ContactInfoListAdapter(this, R.layout.list_item, cursor, 1); listView.setAdapter(contactInfoListAdapter); } }
[ "out.sider.otto@gmail.com" ]
out.sider.otto@gmail.com
59dab06b4eab5e6e19e5c3d3b26604b4ed06e7bc
65bddbf6c9ecacafdea1ae6699887dcb02946cf3
/RetailMeNotM/src/test/java/com/retailmenot/tests/VerifyNumberofItem_Test.java
0e2d3c591e9ced05da33317cbf6d9bc6773bca36
[]
no_license
singh234/TestSWPrj
895da7346ba9ec04cf192aa57c094b1eccb17130
51c08853f510047d3035c7108e890599e994b904
refs/heads/master
2021-01-17T15:06:51.214498
2016-09-22T04:23:56
2016-09-22T04:23:56
68,880,102
0
0
null
2016-09-22T04:43:09
2016-09-22T03:14:18
Java
UTF-8
Java
false
false
2,556
java
package com.retailmenot.tests; import java.io.IOException; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.ie.InternetExplorerDriver; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import com.retailmenot.pages.DealsPage; import com.retailmenot.pages.HomePage; import com.retailmenot.util.Utility; import jxl.read.biff.BiffException; public class VerifyNumberofItem_Test { WebDriver driver; HomePage homePage; DealsPage dealsPage; Logger logger; @Parameters({"url","browserType"}) @BeforeClass public void launchBrowser(String url,String browserType){ if(browserType.equals("FF")) { driver = new FirefoxDriver(); System.out.println("New Branch to practice Github"); } else if(browserType.equals("IE")){ System.setProperty("webdriver.ie.driver", "IEDriverServer.exe"); driver = new InternetExplorerDriver(); } else{ System.setProperty("webdriver.chrome.driver", "chromedriver.exe"); driver = new ChromeDriver(); } driver.get(url); logger=Logger.getLogger("VerifyNumberofItem_Test"); PropertyConfigurator.configure("Log4j.properties"); logger.info("Browser Launched Successfully"); } @DataProvider(name="DP") public String[][] feedDP() throws BiffException, IOException{ String data[][] = Utility.readExcel("VerifyDealsInput.xls", "sanity"); return data; } @Parameters({"pageTitle"}) @Test public void verifyDealPageTitle(String pageTitle){ homePage = new HomePage(driver); dealsPage = homePage.browsetoDealPage(); boolean actualTitle = dealsPage.verifydealsPage(pageTitle); Assert.assertTrue(actualTitle); logger.info("Verify Deals Page Title is Passed"); } //@Parameters({"productCategory","dealsCount"}) @Test(dependsOnMethods={"verifyDealPageTitle"},dataProvider="DP") public void verifyDealsCount(String productCategory,String dealsCount ){ int actualCount = dealsPage.verifyDealsCount(productCategory); logger.info("Actual count of the products"+actualCount); int expectedCount = Integer.parseInt(dealsCount); Assert.assertEquals(actualCount, expectedCount); } }
[ "singh.234@gmail.com" ]
singh.234@gmail.com
1a9d91bf9e9c840f4aeb8c91507d0ba4dc4b0646
539b6808826b0af0e3ae0d3828961bc4cb7605ba
/Link_prediction/src/utils/interest.java
425172119914bd0ea997ab20debac487cb990d8e
[]
no_license
souravrevo/Link_prediction
3e436026f1a52c19a15d11cc7266f033b567d2b8
552b25b2bd89756cded3bec82cde749093ce07a0
refs/heads/master
2016-09-06T11:19:26.912941
2014-05-21T01:55:40
2014-05-21T01:55:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,809
java
package utils; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import java.sql.PreparedStatement; //Calculate interest_count column of auth_all_info table public class interest { public static void main(String []args){ String name = ""; String interest = ""; String interest_db = ""; String auth_id = ""; try{ //open connection and get matrix dimenxions String url = "jdbc:mysql://localhost/crawler"; Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection(url, "root", "root"); Statement stmt = con.createStatement(); Statement stmt1 = con.createStatement(); ResultSet rs = stmt .executeQuery("select * from auth_all_info"); ResultSet rs1 = null; PreparedStatement stmtp = null; while (rs.next()){ name = rs.getString(1); auth_id = rs.getString(2); interest = rs.getString(3).toLowerCase(); interest_db = " "+interest+" "; interest_db = interest_db.replace(" ", "%"); rs1 = stmt1 .executeQuery("select count(*) from paper_all_info where auth_id=\'"+auth_id+"\' and paper like \'"+interest_db+"\'"); while (rs1.next()){ stmtp = con.prepareStatement("UPDATE auth_all_info SET interest_count=? WHERE auth_id=\'"+auth_id+"\' and auth_interest=\'"+interest+"\'"); stmtp.setString(1,rs1.getString(1)); System.out.println(rs1.getString(1)); int ii = stmtp.executeUpdate(); } } rs.close(); rs1.close(); stmtp.close(); stmt.close(); stmt1.close(); con.close(); }catch (Exception e) { System.out.println("Exception caught"+e); } } }
[ "sourav.revo@gmail.com" ]
sourav.revo@gmail.com
04174ab64cfe9c7c40de3ee2179c44c9794f2296
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/DrJava/rev4989-5058/base-trunk-4989/src/edu/rice/cs/drjava/model/debug/DebugEventNotifier.java
ba8294b324138206e2f6f161d2febc545f535c13
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
4,801
java
package edu.rice.cs.drjava.model.debug; import edu.rice.cs.drjava.model.EventNotifier; import edu.rice.cs.drjava.model.OpenDefinitionsDocument; import java.awt.EventQueue; public class DebugEventNotifier extends EventNotifier<DebugListener> implements DebugListener { public void debuggerStarted() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).debuggerStarted(); } } finally { _lock.endRead(); } } public void debuggerShutdown() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).debuggerShutdown(); } } finally { _lock.endRead(); } } public void threadLocationUpdated(OpenDefinitionsDocument doc, int lineNumber, boolean shouldHighlight) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).threadLocationUpdated(doc, lineNumber, shouldHighlight); } } finally { _lock.endRead(); } } public void regionAdded(Breakpoint bp) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).regionAdded(bp); } } finally { _lock.endRead(); } } public void breakpointReached(Breakpoint bp) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).breakpointReached(bp); } } finally { _lock.endRead(); } } public void regionChanged(Breakpoint bp) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).regionChanged(bp); } } finally { _lock.endRead(); } } public void watchSet(DebugWatchData w) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).watchSet(w); } } finally { _lock.endRead(); } } public void watchRemoved(DebugWatchData w) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).watchRemoved(w); } } finally { _lock.endRead(); } } public void regionRemoved(Breakpoint bp) { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).regionRemoved(bp); } finally { _lock.endRead(); } } public void stepRequested() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).stepRequested(); } finally { _lock.endRead(); } } public void currThreadSuspended() { _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).currThreadSuspended(); } finally { _lock.endRead(); } } public void currThreadResumed() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).currThreadResumed(); } finally { _lock.endRead(); } } public void threadStarted() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).threadStarted(); } finally { _lock.endRead(); } } public void currThreadDied() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).currThreadDied(); } finally { _lock.endRead(); } } public void nonCurrThreadDied() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).nonCurrThreadDied(); } finally { _lock.endRead(); } } public void currThreadSet(DebugThreadData thread) { _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).currThreadSet(thread); } } finally { _lock.endRead(); } } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
477c1fa840b110e6a117d4c738f6ce0711b07028
199e420db803921633fe31f0aa9aeb0b5881b4a8
/app/src/main/java/com/example/movies_and_actors/adapters/AdapterSearch.java
8e35d0ed2a22b85f9697c7ca3f7fdfb20409a59a
[]
no_license
adrijanasavic/Movies_and_Actors
6d26b98d7e439c474f49437e36b7d98c4c529f0f
cfdb729d07d25a5041d81c43f6ff774f0669e211
refs/heads/master
2022-10-20T19:25:19.386002
2020-06-10T15:12:13
2020-06-10T15:12:13
270,801,180
0
0
null
null
null
null
UTF-8
Java
false
false
3,543
java
package com.example.movies_and_actors.adapters; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.example.movies_and_actors.R; import com.example.movies_and_actors.models.ResultsMovieItem; import java.util.List; import static com.example.movies_and_actors.net.MyServiceContract.IMAGEBASEURL; public class AdapterSearch extends RecyclerView.Adapter<AdapterSearch.MyViewHolder>{ private Context context; private List<ResultsMovieItem> searchItems; private OnItemClickListener listener; public String firstFour(String godina) { if (godina.length() > 4) { return godina.substring(0, 4); } else { return null; } } public AdapterSearch(Context context, List<ResultsMovieItem> searchItems, OnItemClickListener listener) { this.context = context; this.searchItems = searchItems; this.listener = listener; } @NonNull @Override public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()) .inflate(R.layout.recycler_prikaz, parent, false); return new MyViewHolder(view, listener); } @Override public void onBindViewHolder(@NonNull MyViewHolder holder, int position) { holder.imeFilma.setText(searchItems.get(position).getTitle()); try { holder.godinaFilma.setText(firstFour(searchItems.get(position).getReleaseDate())); } catch (NullPointerException e) { e.printStackTrace(); } // Picasso.with(context).load(searchItems.get(position).getPosterPath()).into(holder.slikaGlumca); Glide.with(holder.itemView) .load(IMAGEBASEURL + searchItems.get(position).getPosterPath()) .into(holder.slikaGlumca); } @Override public int getItemCount() { return searchItems.size(); } public ResultsMovieItem get(int position) { return searchItems.get(position); } public static class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private TextView imeFilma, godinaFilma; private ImageView slikaGlumca; private long lastClickTime = System.currentTimeMillis(); private static final long CLICK_TIME_INTERVAL = 1000; private OnItemClickListener vhListener; MyViewHolder(@NonNull View itemView, OnItemClickListener vhListener) { super(itemView); itemView.setClickable(true); itemView.setOnClickListener(this); slikaGlumca = itemView.findViewById(R.id.slikaGlumca); imeFilma = itemView.findViewById( R.id.imeGlumca); godinaFilma = itemView.findViewById((R.id.godinaFilma)); this.vhListener = vhListener; } @Override public void onClick(View v) { long now = System.currentTimeMillis(); if (now - lastClickTime < CLICK_TIME_INTERVAL){ return; } lastClickTime = now; vhListener.onSearchMovieClick(getAdapterPosition()); } } public interface OnItemClickListener { void onSearchMovieClick(int position); } }
[ "adrijana.jovicic@gmail.com" ]
adrijana.jovicic@gmail.com
b435b82fb43c05a4691fccb9c0f49035540bf905
69ac3fb006e10da40d17eaef5564080b20458267
/Mtravelplan_final/src/com/travel/plan/tripboard/vote/dao/TripVoteService.java
2d55cb60c9b351d9babbcc5fe8a299e73c576403
[]
no_license
skathal124/travel_helper
e46f42b7b3af192b8d1968a022e1fcc2e9c4fd6a
afb00141bb02a0588c2e849a77832311d3318087
refs/heads/master
2020-03-31T19:53:42.219577
2018-10-11T04:40:58
2018-10-11T04:40:58
152,516,730
0
0
null
2018-10-11T04:40:59
2018-10-11T02:08:25
JavaScript
UTF-8
Java
false
false
670
java
package com.travel.plan.tripboard.vote.dao; import java.util.List; import com.travel.plan.tripboard.help.PollBean; import com.travel.plan.tripboard.model.TripPoll; import com.travel.plan.tripboard.model.TripPollSub; import com.travel.plan.tripboard.model.TripVoter; public interface TripVoteService { void makePoll(PollBean pbean); List<TripPoll> getPollAllList(TripPoll poll); TripPoll getPoll(TripPoll poll); List<TripPollSub> getPollSubList(TripPoll poll); void polling(TripVoter voter); List<TripPoll> getMyPollList(TripPoll poll); void deleteTrip_Voter(int tpseq); void deleteTrip_PollSub(int tpseq); void deleteTrip_Poll(int tpseq); }
[ "skathal124@naver.com" ]
skathal124@naver.com
8f1aaf38fc066277248cc2ada1c29529c1b545fc
4fe45f0a4dd70b9f32c7a080d13725f56722e045
/pelit/kuutiopeli/src/cubegame/multiplayer/ClientWritingThread.java
abd22d523555714624b4161d9747a6cdd195bedb
[]
no_license
fergusq/vanhat-ohjelmani
b1233f2672591b5c95314482f6562a3f11cef55f
2b990a0e2aa92528fa89a048f102732b23ad8466
refs/heads/master
2021-01-01T20:41:42.293896
2015-04-12T13:53:23
2015-04-12T13:53:23
33,550,141
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
package cubegame.multiplayer; public class ClientWritingThread extends Thread { private NetClientHandler netHandler; public ClientWritingThread(NetClientHandler netClientHandler) { this.netHandler = netClientHandler; } @Override public void run() { synchronized (netHandler.threadSyncObject) { netHandler.writeThreads++; } try{ for(; netHandler.isRunning && !netHandler.isTerminating; netHandler.writePacket()) { } try { sleep(1L); }catch (InterruptedException ex){;} } finally{ netHandler.writeThreads--; } } }
[ "iikka@kaivos.org" ]
iikka@kaivos.org
96c89bb5c88cb32c9d296d8e603773942e192603
665110e99befea67ea7dcdd6939e313cff471654
/src/main/java/net/smert/frameworkgl/opengl/renderer/RendererGL3.java
1ffb76cfa1f212a3ac0cbb2829f33a4977abe0b5
[ "Apache-2.0" ]
permissive
kovertopz/Framework-GL
187cd6771c5ed0192da3564a22c6281956bb2ce2
1504f4746c80bf0667f62ecea2569f8d37a46184
refs/heads/master
2021-06-07T08:22:46.693230
2017-07-08T09:10:17
2017-07-08T09:10:17
24,876,706
10
1
null
null
null
null
UTF-8
Java
false
false
8,754
java
/** * Copyright 2012 Jason Sorensen (sorensenj@smert.net) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package net.smert.frameworkgl.opengl.renderer; import java.util.List; import net.smert.frameworkgl.Fw; import net.smert.frameworkgl.gameobjects.GameObject; import net.smert.frameworkgl.math.Transform4f; import net.smert.frameworkgl.math.Vector2f; import net.smert.frameworkgl.math.Vector3f; import net.smert.frameworkgl.opengl.GL; import net.smert.frameworkgl.opengl.camera.Camera; import net.smert.frameworkgl.opengl.renderable.AbstractRenderable; import net.smert.frameworkgl.opengl.renderable.Renderable; import net.smert.frameworkgl.opengl.renderable.gl3.DynamicVertexArrayObjectInterleavedGL3Renderable; import net.smert.frameworkgl.opengl.renderable.gl3.DynamicVertexArrayObjectNonInterleavedGL3Renderable; import net.smert.frameworkgl.opengl.renderable.gl3.VertexArrayObjectInterleavedGL3Renderable; import net.smert.frameworkgl.opengl.renderable.gl3.VertexArrayObjectNonInterleavedGL3Renderable; import net.smert.frameworkgl.opengl.shader.AbstractShader; import net.smert.frameworkgl.utils.Color; /** * * @author Jason Sorensen <sorensenj@smert.net> */ public class RendererGL3 extends AbstractRendererGL { public RendererGL3() { super(); } public AbstractRenderable createArrayRenderable() { return GL.rf3.createArrayRenderable(); } public AbstractRenderable createDisplayListRenderable() { return GL.rf3.createDisplayListRenderable(); } public DynamicVertexArrayObjectInterleavedGL3Renderable createDynamicInterleavedRenderable() { return GL.rf3.createDynamicInterleavedRenderable(); } public DynamicVertexArrayObjectNonInterleavedGL3Renderable createDynamicNonInterleavedRenderable() { return GL.rf3.createDynamicNonInterleavedRenderable(); } public AbstractRenderable createImmediateModeRenderable() { return GL.rf3.createImmediateModeRenderable(); } public VertexArrayObjectInterleavedGL3Renderable createInterleavedRenderable() { return GL.rf3.createInterleavedRenderable(); } public VertexArrayObjectNonInterleavedGL3Renderable createNonInterleavedRenderable() { return GL.rf3.createNonInterleavedRenderable(); } public void destroy() { } public void init() { } @Override public void color(float r, float g, float b, float a) { GL.o2.vertexAttrib(GL.defaultAttribLocations.getIndex("color"), r, g, b, a); } @Override public void disableTexture2D() { } @Override public void disableTexture3D() { } @Override public void disableTextureCubeMap() { } @Override public void enableTexture2D() { } @Override public void enableTexture3D() { } @Override public void enableTextureCubeMap() { } @Override public void popMatrix() { GL.matrixHelper.setModeModel(); GL.matrixHelper.pop(); } @Override public void pushMatrix() { GL.matrixHelper.setModeModel(); GL.matrixHelper.push(); } @Override public void render(AbstractRenderable renderable) { Renderable.shaderBindState.sendUniformMatrices(); renderable.render(); } @Override public void render(AbstractRenderable renderable, float x, float y, float z) { pushMatrix(); translate(x, y, z); render(renderable); popMatrix(); } @Override public void render(AbstractRenderable renderable, Transform4f transform) { pushMatrix(); GL.matrixHelper.load(transform); render(renderable); popMatrix(); } @Override public void render(AbstractRenderable renderable, Vector3f position) { pushMatrix(); translate(position); render(renderable); popMatrix(); } @Override public void render(GameObject gameObject) { pushMatrix(); GL.matrixHelper.load(gameObject.getWorldTransform()); Renderable.shaderBindState.sendUniformsOncePerGameObject(gameObject); render(gameObject.getRenderable()); popMatrix(); } @Override public void render(List<GameObject> gameObjects) { for (GameObject gameObject : gameObjects) { render(gameObject); } } @Override public void renderBlend(GameObject gameObject) { if (gameObject.getRenderableState().isOpaque()) { return; } GL.o1.enableBlending(); render(gameObject); GL.o1.disableBlending(); } @Override public void renderBlend(List<GameObject> gameObjects) { GL.o1.enableBlending(); for (GameObject gameObject : gameObjects) { if (gameObject.getRenderableState().isOpaque()) { continue; } render(gameObject); } GL.o1.disableBlending(); } @Override public void renderOpaque(GameObject gameObject) { if (!gameObject.getRenderableState().isOpaque()) { return; } render(gameObject); } @Override public void renderOpaque(List<GameObject> gameObjects) { for (GameObject gameObject : gameObjects) { if (!gameObject.getRenderableState().isOpaque()) { continue; } render(gameObject); } } @Override public void scale(float x, float y, float z) { GL.matrixHelper.setModeModel(); GL.matrixHelper.scale(x, y, z); } @Override public void scale(Vector3f scaling) { GL.matrixHelper.setModeModel(); GL.matrixHelper.scale(scaling.getX(), scaling.getY(), scaling.getZ()); } @Override public void set2DMode() { GL.matrixHelper.setModeProjection(); GL.matrixHelper.setOrthogonal(0f, Fw.config.getCurrentWidth(), 0f, Fw.config.getCurrentHeight(), -1f, 1f); GL.matrixHelper.setModeView(); GL.matrixHelper.loadIdentity(); GL.matrixHelper.setModeModel(); GL.matrixHelper.loadIdentity(); } @Override public void set2DMode(int width, int height) { GL.matrixHelper.setModeProjection(); GL.matrixHelper.setOrthogonal(0f, width, 0f, height, -1f, 1f); GL.matrixHelper.setModeView(); GL.matrixHelper.loadIdentity(); GL.matrixHelper.setModeModel(); GL.matrixHelper.loadIdentity(); } @Override public void setCamera(Camera camera) { camera.update(); GL.matrixHelper.setModeProjection(); GL.matrixHelper.load(camera.getProjectionMatrix()); GL.matrixHelper.setModeView(); GL.matrixHelper.load(camera.getViewMatrix()); GL.matrixHelper.setModeModel(); GL.matrixHelper.loadIdentity(); } @Override public void switchShader(AbstractShader shader) { Renderable.shaderBindState.switchShader(shader); } @Override public void translate(float x, float y, float z) { GL.matrixHelper.setModeModel(); GL.matrixHelper.translate(x, y, z); } @Override public void translate(Vector3f position) { GL.matrixHelper.setModeModel(); GL.matrixHelper.translate(position.getX(), position.getY(), position.getZ()); } @Override public void unbindShader() { Renderable.shaderBindState.unbindShader(); } @Override public void colorText(Color color) { color(color.getR(), color.getG(), color.getB(), color.getA()); } @Override public AbstractRenderable createGlyphRenderable() { return createInterleavedRenderable(); } @Override public float getTextDefaultX() { return textDefaultX; } @Override public float getTextDefaultY() { return textDefaultY; } @Override public Vector2f getTextPosition() { return textPosition; } @Override public void renderGlyph(AbstractRenderable renderable) { render(renderable); } @Override public void scaleText(float x, float y) { scale(x, y, 1f); } @Override public void translateText(float x, float y) { translate(x, y, 0f); } }
[ "git@smert.net" ]
git@smert.net
1448bb5e9788cd985aba65d7ebf5974cff92704e
48fbe64d3170950ba60b73615b01b06dde09fb89
/src/main/java/com/yura/repair/command/admin/AdminAllReviewsCommand.java
7c2245ea55612c6bbbf0fb9381f85736dd4190e5
[]
no_license
Gtm417/guitar-repair-service-servlet
4e5ca1ad04db34fa3b08ef6f6384576aa227a855
da6a9a847ec88b2298017ece6f8254445a2cfb7b
refs/heads/master
2022-04-06T14:45:13.014624
2020-02-21T07:48:55
2020-02-21T07:48:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
java
package com.yura.repair.command.admin; import com.yura.repair.command.Command; import com.yura.repair.dto.ReviewDto; import com.yura.repair.service.ReviewService; import com.yura.repair.util.PaginationUtility; import javax.servlet.http.HttpServletRequest; import java.util.List; import static com.yura.repair.constant.PageConstant.ADMIN_REVIEWS_PAGE; public class AdminAllReviewsCommand implements Command { private static final String ADMIN_REVIEWS_COMMAND = "/admin/reviews"; private final ReviewService reviewService; private final PaginationUtility pagination; public AdminAllReviewsCommand(ReviewService reviewService, PaginationUtility pagination) { this.reviewService = reviewService; this.pagination = pagination; } @Override public String execute(HttpServletRequest request) { int currentPage = pagination.getCurrentPage(request); int recordsPerPage = pagination.getRecordsPerPage(request); List<ReviewDto> reviews = reviewService.findAll(pagination.getOffset(currentPage, recordsPerPage), recordsPerPage); pagination.paginate(currentPage, recordsPerPage, reviewService.numberOfEntries(), reviews, ADMIN_REVIEWS_COMMAND, request); return ADMIN_REVIEWS_PAGE; } }
[ "yuriy.petrashenko7@gmail.com" ]
yuriy.petrashenko7@gmail.com
22d0151b123306f5e60fd181b940e806211b16f5
857a460a6c8335e099a83d2e7b671618a71b0464
/src/main/java/com/lb/game/controller/DigitalGamePlayController.java
89b1aa9c97ca68a46818803eba96b11f01274540
[]
no_license
zxcv1122BB/lb_n
bce2e7c456f4628d615b707f4931bc12c5feff52
9a0a3eb156bb94d66c9176de1e5d506fabecc50e
refs/heads/master
2022-07-10T01:18:47.642054
2019-08-26T14:55:01
2019-08-26T14:55:01
203,388,208
1
1
null
2022-06-29T17:35:23
2019-08-20T14:01:58
JavaScript
UTF-8
Java
false
false
4,821
java
package com.lb.game.controller; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; import com.lb.game.service.impl.GameTypeServiceImpl; import com.lb.sys.dao.DigitalGamePlayMapper; import com.lb.sys.tools.BaseController; import com.lb.sys.tools.PageUtils; import com.lb.sys.tools.ResponseUtils; import com.lb.sys.tools.StringUtil; @Controller @RestController @RequestMapping("/game") public class DigitalGamePlayController { @Autowired DigitalGamePlayMapper digital; @Autowired GameTypeServiceImpl gameType; @RequestMapping(method = RequestMethod.POST, value = "/getGameInfo") public ModelAndView getGameInfo(HttpServletRequest request) { // 获取参数 Map<String, Object> map = BaseController.jsonToMap(request); Integer id = map.containsKey("id")?Integer.valueOf(map.get("id").toString()) : null; Integer act_id = map.containsKey("act_id")?Integer.valueOf(map.get("act_id").toString()) : null; try { if(map.get("openno")!=null&&!"".equals(map.get("openno"))) { map.put("openno", map.get("openno").toString().trim().replace("-", "")); } // 调用查询方法 List<Map<String, Object>> all = new ArrayList<>(); if(!StringUtil.isBlank(map.get("pageIndex")) && !StringUtil.isBlank(map.get("pageNum")) && !StringUtil.isBlank(map.get("pageSize"))) { // 当前页 Integer pageIndex = Integer.valueOf(map.get("pageIndex").toString()) ; // 每一页数据条数 Integer pageNum = Integer.valueOf(map.get("pageNum").toString()); if (act_id==1) { all = digital.qryGameType(); }else if (act_id==2) { all = digital.qryGameGroup(id); } else if (act_id==3) { all = digital.qryGamePlayed(id); } PageUtils<Map<String, Object>> pageInfo = new PageUtils<>(pageIndex,pageNum,all); return ResponseUtils.jsonView(200, "获取数据成功",pageInfo); }else { if (act_id==1) { all = digital.qryGameType(); }else if (act_id==2) { all = digital.qryGameGroup(id); } else if (act_id==3) { all = digital.qryGamePlayed(id); } return ResponseUtils.jsonView(200, "获取数据成功",all); } } catch (Exception e) { e.printStackTrace(); return ResponseUtils.jsonView(201, "访问出现错误,请稍后再试",null) ; } } @RequestMapping(method = RequestMethod.POST, value = "/updateGameInfo") public ModelAndView updateGameInfo(HttpServletRequest request) { Map<String, Object> paramMap = BaseController.jsonToMap(request);//this.jsonToMap(request); int act_id = Integer.valueOf(paramMap.get("act_id").toString()); int id = Integer.valueOf(paramMap.get("id").toString()); if(paramMap.containsKey("status")) { paramMap.put("status",String.valueOf(paramMap.get("status").toString())); } //System.err.println("[参数]:"+paramMap.entrySet()); //Integer id = paramMap.containsKey("id")?Integer.valueOf(paramMap.get("id").toString()):null; try { int all = 0; if(act_id==0) { //all = digital.qryGameKind(id); }else if (act_id==1) { boolean batchCanada28Issue = false; if(41!=id) { /*基础配置数据,修改导致坍塌性Bug。故只开放 id=41,加拿大28的起始期数据修改权限。 */ paramMap.remove("current_issue"); paramMap.remove("start_time"); paramMap.remove("end_time"); all = digital.updateGameType(paramMap); }else { List<Map<String, Object>> qryGameType = digital.qryGameType(); boolean isUpdateIssue = !StringUtil.isBlank(paramMap.get("current_issue")) && StringUtil.isBlank(paramMap.get("start_time")) && !StringUtil.isBlank(paramMap.get("end_time")); if(isUpdateIssue)//需要重新生成 batchCanada28Issue = gameType.batchCanada28Issue(qryGameType,paramMap); if(batchCanada28Issue || !isUpdateIssue)//更新成功或者不需要更新 all = digital.updateGameType(paramMap); } }else if (act_id==2) { all = digital.updateGameGroup(paramMap); } else if (act_id==3) { if("0".equals(paramMap.get("status")+"")) { paramMap.put("status",2); } all = digital.updateGamePlayed(paramMap); } return ResponseUtils.jsonView( all == 1 ? 200 : 133, all == 1 ? "更新成功":"更新失败"); } catch (Exception e) { e.printStackTrace(); return ResponseUtils.jsonView(201, "更新失败,请稍后再试",e.getMessage()) ; } } }
[ "licaiyou@followme.com" ]
licaiyou@followme.com
ca6821a1c7fc67e8d841cd4358f3f5c444842273
e048cb9cd0a7d49bb284dcc3d9a0871713127c48
/leasing-company-parent/leasing-company-service/src/main/java/com/cloudkeeper/leasing/company/repository/AttendanceRepository.java
cb28675eb899e0de952e14535c5686ddb46a327a
[]
no_license
lzj1995822/GuSuCommunityApi
65b97a0c9f8bdeb608f887970f4d2e99d2306785
51348b26b9b0c0017dca807847695b3740aaf2e8
refs/heads/master
2020-04-23T19:18:18.348991
2019-04-28T02:56:21
2019-04-28T02:56:21
171,398,689
1
0
null
null
null
null
UTF-8
Java
false
false
253
java
package com.cloudkeeper.leasing.company.repository; import com.cloudkeeper.leasing.base.repository.BaseRepository; import com.cloudkeeper.leasing.company.domain.Attendance; public interface AttendanceRepository extends BaseRepository<Attendance> { }
[ "243485908@qq.com" ]
243485908@qq.com
cf1d4049197759a12add8762486d70713f6d201e
cf0b2e2fcd3838e470cb4c205dda8cc05ac11628
/hotils-inject/src/main/java/org/hotilsframework/inject/annotation/Inject.java
af51933cb27f2a0a61061c4c8f7aa4574924e21f
[]
no_license
hireny/hotils
b216b2991c7f3ad6447dbcc8433a9a771e8be1e3
0b59a3853d5e636a4a499cca8e7799d540ece62b
refs/heads/master
2021-09-10T02:05:54.275527
2021-08-26T14:44:08
2021-08-26T14:44:08
225,169,822
0
0
null
2020-10-13T20:59:23
2019-12-01T13:54:30
Java
UTF-8
Java
false
false
423
java
package org.hotilsframework.inject.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Inject注解,相当于Spring的@Autowired * @author hireny * @className Inject * @create 2020-04-01 20:15 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface Inject { }
[ "910502500@qq.com" ]
910502500@qq.com
cfd152655fdd852784983ef925814f4e28238ad4
44e7adc9a1c5c0a1116097ac99c2a51692d4c986
/aws-java-sdk-transcribe/src/main/java/com/amazonaws/services/transcribe/model/Transcript.java
3bded6d7e5fd7f59f8c4200b91a851ef81caf4e7
[ "Apache-2.0" ]
permissive
QiAnXinCodeSafe/aws-sdk-java
f93bc97c289984e41527ae5bba97bebd6554ddbe
8251e0a3d910da4f63f1b102b171a3abf212099e
refs/heads/master
2023-01-28T14:28:05.239019
2020-12-03T22:09:01
2020-12-03T22:09:01
318,460,751
1
0
Apache-2.0
2020-12-04T10:06:51
2020-12-04T09:05:03
null
UTF-8
Java
false
false
11,144
java
/* * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.transcribe.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * <p> * Identifies the location of a transcription. * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/Transcript" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Transcript implements Serializable, Cloneable, StructuredPojo { /** * <p> * The S3 object location of the transcript. * </p> * <p> * Use this URI to access the transcript. If you specified an S3 bucket in the <code>OutputBucketName</code> field * when you created the job, this is the URI of that bucket. If you chose to store the transcript in Amazon * Transcribe, this is a shareable URL that provides secure access to that location. * </p> */ private String transcriptFileUri; /** * <p> * The S3 object location of the redacted transcript. * </p> * <p> * Use this URI to access the redacted transcript. If you specified an S3 bucket in the * <code>OutputBucketName</code> field when you created the job, this is the URI of that bucket. If you chose to * store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that location. * </p> */ private String redactedTranscriptFileUri; /** * <p> * The S3 object location of the transcript. * </p> * <p> * Use this URI to access the transcript. If you specified an S3 bucket in the <code>OutputBucketName</code> field * when you created the job, this is the URI of that bucket. If you chose to store the transcript in Amazon * Transcribe, this is a shareable URL that provides secure access to that location. * </p> * * @param transcriptFileUri * The S3 object location of the transcript.</p> * <p> * Use this URI to access the transcript. If you specified an S3 bucket in the <code>OutputBucketName</code> * field when you created the job, this is the URI of that bucket. If you chose to store the transcript in * Amazon Transcribe, this is a shareable URL that provides secure access to that location. */ public void setTranscriptFileUri(String transcriptFileUri) { this.transcriptFileUri = transcriptFileUri; } /** * <p> * The S3 object location of the transcript. * </p> * <p> * Use this URI to access the transcript. If you specified an S3 bucket in the <code>OutputBucketName</code> field * when you created the job, this is the URI of that bucket. If you chose to store the transcript in Amazon * Transcribe, this is a shareable URL that provides secure access to that location. * </p> * * @return The S3 object location of the transcript.</p> * <p> * Use this URI to access the transcript. If you specified an S3 bucket in the <code>OutputBucketName</code> * field when you created the job, this is the URI of that bucket. If you chose to store the transcript in * Amazon Transcribe, this is a shareable URL that provides secure access to that location. */ public String getTranscriptFileUri() { return this.transcriptFileUri; } /** * <p> * The S3 object location of the transcript. * </p> * <p> * Use this URI to access the transcript. If you specified an S3 bucket in the <code>OutputBucketName</code> field * when you created the job, this is the URI of that bucket. If you chose to store the transcript in Amazon * Transcribe, this is a shareable URL that provides secure access to that location. * </p> * * @param transcriptFileUri * The S3 object location of the transcript.</p> * <p> * Use this URI to access the transcript. If you specified an S3 bucket in the <code>OutputBucketName</code> * field when you created the job, this is the URI of that bucket. If you chose to store the transcript in * Amazon Transcribe, this is a shareable URL that provides secure access to that location. * @return Returns a reference to this object so that method calls can be chained together. */ public Transcript withTranscriptFileUri(String transcriptFileUri) { setTranscriptFileUri(transcriptFileUri); return this; } /** * <p> * The S3 object location of the redacted transcript. * </p> * <p> * Use this URI to access the redacted transcript. If you specified an S3 bucket in the * <code>OutputBucketName</code> field when you created the job, this is the URI of that bucket. If you chose to * store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that location. * </p> * * @param redactedTranscriptFileUri * The S3 object location of the redacted transcript.</p> * <p> * Use this URI to access the redacted transcript. If you specified an S3 bucket in the * <code>OutputBucketName</code> field when you created the job, this is the URI of that bucket. If you chose * to store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that * location. */ public void setRedactedTranscriptFileUri(String redactedTranscriptFileUri) { this.redactedTranscriptFileUri = redactedTranscriptFileUri; } /** * <p> * The S3 object location of the redacted transcript. * </p> * <p> * Use this URI to access the redacted transcript. If you specified an S3 bucket in the * <code>OutputBucketName</code> field when you created the job, this is the URI of that bucket. If you chose to * store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that location. * </p> * * @return The S3 object location of the redacted transcript.</p> * <p> * Use this URI to access the redacted transcript. If you specified an S3 bucket in the * <code>OutputBucketName</code> field when you created the job, this is the URI of that bucket. If you * chose to store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access * to that location. */ public String getRedactedTranscriptFileUri() { return this.redactedTranscriptFileUri; } /** * <p> * The S3 object location of the redacted transcript. * </p> * <p> * Use this URI to access the redacted transcript. If you specified an S3 bucket in the * <code>OutputBucketName</code> field when you created the job, this is the URI of that bucket. If you chose to * store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that location. * </p> * * @param redactedTranscriptFileUri * The S3 object location of the redacted transcript.</p> * <p> * Use this URI to access the redacted transcript. If you specified an S3 bucket in the * <code>OutputBucketName</code> field when you created the job, this is the URI of that bucket. If you chose * to store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that * location. * @return Returns a reference to this object so that method calls can be chained together. */ public Transcript withRedactedTranscriptFileUri(String redactedTranscriptFileUri) { setRedactedTranscriptFileUri(redactedTranscriptFileUri); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTranscriptFileUri() != null) sb.append("TranscriptFileUri: ").append(getTranscriptFileUri()).append(","); if (getRedactedTranscriptFileUri() != null) sb.append("RedactedTranscriptFileUri: ").append(getRedactedTranscriptFileUri()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Transcript == false) return false; Transcript other = (Transcript) obj; if (other.getTranscriptFileUri() == null ^ this.getTranscriptFileUri() == null) return false; if (other.getTranscriptFileUri() != null && other.getTranscriptFileUri().equals(this.getTranscriptFileUri()) == false) return false; if (other.getRedactedTranscriptFileUri() == null ^ this.getRedactedTranscriptFileUri() == null) return false; if (other.getRedactedTranscriptFileUri() != null && other.getRedactedTranscriptFileUri().equals(this.getRedactedTranscriptFileUri()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTranscriptFileUri() == null) ? 0 : getTranscriptFileUri().hashCode()); hashCode = prime * hashCode + ((getRedactedTranscriptFileUri() == null) ? 0 : getRedactedTranscriptFileUri().hashCode()); return hashCode; } @Override public Transcript clone() { try { return (Transcript) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.transcribe.model.transform.TranscriptMarshaller.getInstance().marshall(this, protocolMarshaller); } }
[ "" ]
36b39bf7999dfcbb14c5e1d86dd6879b6b6844e0
63fbb8a46bd293e153d22b1f37acd0ac9b3c3491
/Samples/app/src/main/java/samples/linhtruong/com/app/memoryleak/LeakCase2.java
7e2effb30a9857d5192adc839600f61ff6848945
[]
no_license
trithucbkpro/Samples
2800e71ef29088aa486ca046f22e16b42700ad72
89af0f28504a192cdacdca578fcda9f221227e69
refs/heads/master
2021-01-19T22:41:30.950666
2019-09-19T14:54:23
2019-09-19T14:54:23
88,845,710
0
0
null
2017-04-20T09:21:23
2017-04-20T09:21:23
null
UTF-8
Java
false
false
1,771
java
package samples.linhtruong.com.app.memoryleak; import android.os.AsyncTask; import android.os.Bundle; import android.support.annotation.Nullable; import samples.linhtruong.com.app.R; import samples.linhtruong.com.base.BaseActivity; /** * Anonymous inner classes: i.e callback * * @author linhtruong * @date 2/20/17 - 14:28. * @organization VED */ public class LeakCase2 extends BaseActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); doTaskLeak(); doTask(); } /** * This is memory leak. * Since {@link LSingleton} is singleton, it will in the memory for the lifetime of the application. * The {@link LCallback} object is passed to this singleton and stored in mCallbackQueue variable. * So there is a reference to {@link LCallback} object from a static object in memory. * So the parent class of {@link LCallback} object wont be cleared if needed. */ private void doTaskLeak() { LSingleton.getInstance().doTask(new LCallback() { @Override public void onStart() { } @Override public void onCompleted() { } }); } /** * Avoid passing anonymous inner class object to static/singleton classes * which keep strong reference to it. * The solution is make it {@link java.lang.ref.WeakReference} */ private void doTask() { LSingleton.getInstance().doTask(new LCallback() { @Override public void onStart() { } @Override public void onCompleted() { } }); } }
[ "Linh@Truong.local" ]
Linh@Truong.local
ee965043a54a60580720db94317319c497fdd022
46203451280bd1477e5c033da5790a503efcead7
/src/main/java/subtask/SubTask.java
d4339cdad79046d7475ec7fe6941c5074e7d702b
[]
no_license
prakharrke/dailytasks_backend
0f68eda7dd63c8474b0b1e0c55d0392d1684ab7e
dca2b0ad3dd99f32e4eefeb84b8fc15fbea8d120
refs/heads/master
2022-06-23T16:46:20.893594
2019-06-13T05:26:41
2019-06-13T05:26:41
191,695,820
0
0
null
2022-05-20T21:00:34
2019-06-13T05:23:14
Java
UTF-8
Java
false
false
1,443
java
package subtask; import java.sql.SQLException; import model.DBCommunication; public class SubTask { String taskID; String subTaskID; String description; String timeSheet; char special; char approved = 'n'; char reviewed = 'n'; public String getTaskID() { return taskID; } public SubTask setTaskID(String taskID) { this.taskID = taskID; return this; } public String getSubTaskID() { return subTaskID; } public SubTask setSubTaskID(String subTaskID) { this.subTaskID = subTaskID; return this; } public String getDescription() { return description; } public SubTask setDescription(String description) { this.description = description; return this; } public String getTimeSheet() { return timeSheet; } public SubTask setTimeSheet(String timeSheet) { this.timeSheet = timeSheet; return this; } public char getSpecial() { return special; } public SubTask setSpecial(char special) { this.special = special; return this; } public char getApproved() { return approved; } public SubTask setApproved(char approved) { this.approved = approved; return this; } public char getReviewed() { return reviewed; } public SubTask setReviewed(char reviewed) { this.reviewed = reviewed; return this; } public void insertSubTask() throws ClassNotFoundException, SQLException { DBCommunication dbCommunication = new DBCommunication(); dbCommunication.insertSubTask(this); } }
[ "Prakhar.Dixit@1eq.com" ]
Prakhar.Dixit@1eq.com
324062de7589452802949cfe56cab85bbc7b8301
11431aa193e9026d84bcd0b5e8af1ce817f8dc0c
/PizzaProj/src/main/java/db2/juhh/PizzaProj/model/PizzaDetalhe.java
411ccfdb48e98bf6ad265c85b642b74b4b373414
[]
no_license
leoljunior/db2
4f23894980fa160d4682875dd00abd47b6e3071d
6dba5e0b00afa125f6e427c0e882876822f3adef
refs/heads/master
2023-06-05T09:16:10.701716
2021-06-28T15:00:10
2021-06-28T15:00:10
380,547,894
0
0
null
null
null
null
UTF-8
Java
false
false
1,091
java
package db2.juhh.PizzaProj.model; import java.io.Serializable; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity @Table(name = "pizzadetalhe") public class PizzaDetalhe implements Serializable { @Temporal(TemporalType.DATE) private Date data; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int numPedido; private int quantidade; private float preco; public Date getData() { return data; } public void setData(Date data) { this.data = data; } public int getNumPedido() { return numPedido; } public void setNumPedido(int numPedido) { this.numPedido = numPedido; } public int getQuantidade() { return quantidade; } public void setQuantidade(int quantidade) { this.quantidade = quantidade; } public float getPreco() { return preco; } public void setPreco(float preco) { this.preco = preco; } }
[ "juhhinx@gmail.com" ]
juhhinx@gmail.com
836db588d3ebbda95ec018e41034285b240c046e
e4d9c628519e51a49f822c06112604c0829ef5ae
/Backend/src/main/java/com/pokemon/pokemon/controller/interfaces/ITrainerController.java
f533346473506519765cc85d973916ef8c156c89
[]
no_license
juliagarlor/PokeTeam
fdb9b8da52558903146b703ed49085ce954f0ab4
40059e7c9e290cb8d68a0b8a91a0d9f2774aad0e
refs/heads/master
2023-05-12T06:45:52.519920
2021-06-06T16:46:17
2021-06-06T16:46:17
350,309,188
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package com.pokemon.pokemon.controller.interfaces; import com.pokemon.pokemon.utils.dtos.*; import org.springframework.web.bind.annotation.*; import java.util.*; public interface ITrainerController { List<Object> getNamesAndIds(); List<TrainerDTO> getTrainers(); TrainerDTO createTrainer(TrainerDTO trainerDTO); void removeTrainer(Long id); }
[ "julia.garcia.lorente@gmail.com" ]
julia.garcia.lorente@gmail.com
a5f5f7cb2d6280c82aa7090e7f7c87b8975fac06
a3841d9f3d125bfc4fb14b56438f9ffa7b270b1c
/src/test/java/com/hillel/lecture_4/Method.java
b0710f2c836c9e9bb2c4871129ac36269d673a34
[]
no_license
Dmitriy2509/home-work-task
346fa43941f0795d54adbeb46918b79d0f946862
00f8e4b631534fd9020c5735bb2209221ab2955e
refs/heads/master
2020-08-28T21:16:11.279256
2019-12-08T09:46:57
2019-12-08T09:46:57
217,823,419
0
0
null
2019-10-27T08:06:45
2019-10-27T08:06:45
null
UTF-8
Java
false
false
1,357
java
package com.hillel.lecture_4; public class Method { public static void main(String[] args) { /* double result = 25d+273.16; System.out.println("Celsius to Kelvin: "+ result);*/ celsiusToKelvin(10d); //metersToKilometers (); double kilometers = metersToKilometers(500d); distanceCompare(kilometers); if (kilometers>0.7){ System.out.println("Correct distance!"); }else if(kilometers<0.5){ System.out.println("Excellent distance!"); } else{ System.out.println("Bad distance!"); } System.out.println(kilometers); } public static void celsiusToKelvin(double celsius) { double result = celsius + 273.16; System.out.println("Celsius to Kelvin: "+ result); } public static double metersToKilometers (double meters){ double result = meters/1000d; System.out.println("Meters to kilometers: "+ result); return result; } public static String distanceCompare(double kilometers){ String message; if (kilometers>0.7){ message ="Correct distance!"; }else if(kilometers<0.5){ message="Excellent distance!"; } else{ message="Bad distance!"; } return message; } }
[ "sakovetsdmytryi@gmail.com" ]
sakovetsdmytryi@gmail.com
efac8b145513f277244c81c6cd8c5a56a017fc9c
eac648c76b9e7d9fcb6f8fb7d6717374c9914047
/Core/src/CoreClass.java
a28714d9d2d7eec210c922a7625596a979f93881
[]
no_license
KagamiMi/TPDiA2
fbddf3149e551a86814def9c3f9032cd178e611a
5ec5f681eb2eb1a092c4d93a0c313fd972d040c8
refs/heads/master
2020-03-21T21:34:05.819912
2018-07-22T18:00:44
2018-07-22T18:00:44
139,070,672
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
2,292
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import java.util.Date; public class CoreClass { static int portNumber = 7; public static void main(String args[]) throws ClassNotFoundException { try { ServerSocket ss = new ServerSocket(portNumber,10); System.out.println("created socket server "); while (true) { Socket cs = ss.accept(); System.out.println("Connected to new client"); ObjectInputStream is = new ObjectInputStream(cs.getInputStream()); new SocketHandler(is).start(); System.out.println("New thread running!"); } // za pomocą JPQL // mamy interwał czasowy t // tank measures zawiera "prawidłowe wartości" // obliczamy wartość końcową po interwale i porównujemy z wartością końcową z tank measures // dla każdego z tanków osobno! // // dla danego tanka w danej chwili czasu startowej, to samo będzie dla końcowego tylko z inną datą // double startFuelVolume = em.createQuery("SELECT t.fuelVolume from TankMeasures t WHERE t.tankId=:tankId AND t.date=:date").setParameter("tankId",tankId).setParameter("date",date).getSingleResult(); // // musimy uzwględnić sprzedaż (sales) w tym okresie czasu. // status - 1 odłożony, 0 podniesiony // literCounter - bieżący licznik transkacji (status 0) // totalCounter - końcowy licznik transakcji (status 1) // podczas 0 musimy zwracać uwagę na poprzedni stan aby odjąć dobrą wartość: literCounter - poprzedni_literCounter z pomiaru (może być ze statusu 1 gdy to pierwszy raz w serii), // podczas 1 jesli mamy totalCounter to odejmujemy ostatni literCounter ze statusem 0 // dopiero tą wartość możemy odjąć od wartości startowej // // przy dostawach paliwa podobny problem - po pierwsze w jakiej jednostce jest szybkośc tankowania?! // musimy sami na podstawie szybkości obliczyć czy paliwo zostało już wpompowane i ile i czy jest jeszcze co pompować } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "kagamimiyuki@gmail.com" ]
kagamimiyuki@gmail.com
4c6010e91efed5e8e8bdafb057126f0716157561
9fed869617e20d51db1f18b76530c8113d79740f
/src/main/java/com/revature/services/EmployeeService.java
9ef6e03b086ec47b77dbf5c355f8aad3d6423bca
[]
no_license
210614-JavaFS/project0-btoledo2
4668f48552e4d288a5ff27782ffc25530a9abcb2
220dfeed5f3dcdcb3d855edc0a51810041a4b16f
refs/heads/master
2023-06-16T13:32:37.305900
2021-07-14T05:34:21
2021-07-14T05:34:21
381,057,827
0
0
null
2021-07-14T05:30:47
2021-06-28T14:21:23
Java
UTF-8
Java
false
false
1,138
java
package com.revature.services; import java.util.List; import com.revature.models.Employee; import com.revature.repos.EmployeeDAO; import com.revature.repos.EmployeeImpl; public class EmployeeService { private static EmployeeDAO employeeDao = new EmployeeImpl(); public List<Employee> getAllEmployees(){ return employeeDao.findAll(); } public Employee getEmployee(int id) { return employeeDao.findEmployee(id); } public boolean showAccountBalance() { return employeeDao.showAccountBalance(); } public boolean showPersonalInfo() { return employeeDao.showPersonalInfo(); } public boolean customerAccountStatus() { return employeeDao.showAccountInfo(); } public boolean approveSaving(int id) { return employeeDao.approveSavingAccount(id); } public boolean approveChecking(int id) { return employeeDao.approveCheckingAccount(id); } public boolean denySaving(int id) { return employeeDao.denySavingAccount(id); } public boolean denyChecking(int id) { return employeeDao.denyCheckingAccount(id); } public boolean delete(int id){ return employeeDao.removeUSer(id); } }
[ "billytoledo1234@gmail.com" ]
billytoledo1234@gmail.com
833de32db82c5cd5597885efd81dbaeb94c21423
f2f0e98d242baf79fda5778328ae40a583582bdb
/400_xowa/src/gplx/xowa/xtns/mapSources/Map_math.java
85712a45c127a30e125172c7e67a7684d5434d31
[]
no_license
ATCARES/xowa
0ca09f7aa08f400713f9d298bc9843b96e000a0c
5957bd0cb0de1dbfafae1aef9055846713a5e521
refs/heads/master
2021-01-15T14:41:57.565426
2014-04-14T03:28:27
2014-04-14T03:28:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,151
java
/* XOWA: the XOWA Offline Wiki Application Copyright (C) 2012 gnosygnu@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package gplx.xowa.xtns.mapSources; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import org.junit.*; class Map_math {// REF.MW:MapSources_math.php private int word_idx_nsew; private double[] rv = new double[4]; private byte dir_id; private int prec; private int step; public double Dec() {return dec;} private double dec; public int Error() {return error;} private int error; public double Coord_dec() {return coord_dec;} private double coord_dec; public double Coord_deg() {return coord_deg;} private double coord_deg; public double Coord_min() {return coord_min;} private double coord_min; public double Coord_sec() {return coord_sec;} private double coord_sec; public byte[] Coord_dir_ns() {return coord_dir_ns;} private byte[] coord_dir_ns; public byte[] Coord_dir_ew() {return coord_dir_ew;} private byte[] coord_dir_ew; public boolean Ctor(byte[] input, int prec, byte[] dir, int until_step) { try { New_coord(input, dir, prec); if (until_step > 1 && error == 0) Set_coord(); } catch (Exception e) { Err_.Noop(e); error = -128; } return error == 0; } public void Fail(Xop_ctx ctx, byte[] src, Xot_invk self, ByteAryBfr bfr, byte[] pfunc_name) { byte[] self_src = ByteAry_.Mid(src, self.Src_bgn(), self.Src_end()); if (error != -1) // -1 indicates empty coord; don't log, b/c it.v: often omits; it.v:Sami; DATE:2014-03-02 ctx.App().Usr_dlg().Warn_many("", "", "mapSources failed: page=~{0} src=~{1} err=~{2}", String_.new_utf8_(ctx.Page().Ttl().Full_db()), String_.new_utf8_(self_src), error); bfr.Add(pfunc_name).Add(Bry_failed); return; } private static final byte[] Bry_failed = ByteAry_.new_ascii_(" failed."); private void New_coord(byte[] input, byte[] dir, int prec) { // REF.MW:newCoord this.error = 0; this.word_idx_nsew = -1; coord_dec = coord_deg = coord_min = coord_sec = 0; rv[0] = rv[1] = rv[2] = 0; rv[3] = 1; this.dir_id = Parse_dir(dir); this.prec = Parse_precision(prec); this.dec = 0; this.step = 0; Parse_input(input); } private void Set_coord() { // REF.MW:setCoord if (step > 1) return; if (prec < 9) dec = Math_.Round(dec, prec); int sign = dec < 0 ? -1 : 1; double angle = Math_.Abs_double(dec); double deg = Math_.Floor(angle); double min = (angle - deg) * 60; double sec = prec > 0 ? Math_.Round((min - Math_.Floor(min)) * 60, prec - 4) : Math_.Round((min - Math_.Floor(min)) * 60, 0) ; min = Math_.Floor(min); if (sec >= 60) { sec -= 60; min++; } if (prec < 3 && sec >= 30) min++; if (prec < 3) sec = 0; if (min >= 60) { min -= 60; deg++; } if (prec < 1 && min >= 30) { deg++; } if (prec < 1) min = 0; coord_dec = Math_.Round(dec, prec); coord_deg = deg * sign; coord_min = min; coord_sec = sec; if (sign > 0) { coord_dir_ns = Compass_N; coord_dir_ew = Compass_E; } else { coord_dir_ns = Compass_S; coord_dir_ew = Compass_W; } step = 2; } private static final byte[] Bry_deg = ByteAry_.new_utf8_("°"), Bry_quot = ByteAry_.new_ascii_("&quot;"); public byte[] Get_dms(byte[] plus, byte[] minus) { // REF.MW: getDMSString if (step < 2) Set_coord(); double deg = coord_deg; if ( dec < 0 && (ByteAry_.Len_gt_0(plus) || ByteAry_.Len_gt_0(minus))) { deg = Math_.Abs_double(deg); } tmp_bfr.Add_double(deg).Add(Bry_deg); if (prec > 0) tmp_bfr.Add_byte_space().Add_double(coord_min).Add_byte(Byte_ascii.Apos); if (prec > 2) tmp_bfr.Add_byte_space().Add_double(coord_sec).Add(Bry_quot); byte[] letter = null; if (dir_id == Dir_lat_id) letter = coord_dir_ns; if (dir_id == Dir_long_id) letter = coord_dir_ew; if (dec > 0 && ByteAry_.Len_gt_0(plus)) letter = plus; if (dec < 0 && ByteAry_.Len_gt_0(minus)) letter = minus; if (letter != null) tmp_bfr.Add_byte_space().Add(letter); return tmp_bfr.XtoAryAndClear(); } private void Parse_input(byte[] src) { // REF.MW: toDec src = Parse_input_normalize(tmp_bfr, src); if (src == null) {error = -1; return;} int src_len = src.length; int word_idx = -1, word_bgn = 0, words_len = 0; int i = 0; while (true) { boolean is_last = i == src_len; byte b = is_last ? Byte_ascii.Space : src[i]; switch (b) { case Byte_ascii.Space: Parse_input_word(rv, src, ++word_idx, word_bgn, i); ++words_len; i = Byte_ary_finder.Find_fwd_while_space_or_tab(src, i, src_len); word_bgn = i; break; } if (is_last) break; i++; } if (word_idx_nsew != -1 && word_idx_nsew != words_len - 1) {error = -10; return;} if (words_len < 1 || words_len > 4) {error = -2; return;} if (rv[0] >= 0) dec = (rv[0] + rv[1] / 60 + rv[2] / 3600 ) * rv[3]; else dec = (rv[0] - rv[1] / 60 - rv[2] / 3600 ) * rv[3]; this.step = 1; } private boolean Parse_input_word_is_compass(byte v) { switch (v) { case Byte_ascii.Ltr_N: case Byte_ascii.Ltr_E: case Byte_ascii.Ltr_S: case Byte_ascii.Ltr_W: return true; default: return false; } } private void Parse_input_word(double[] rv, byte[] input, int word_idx, int word_bgn, int word_end) { if (word_idx >= Input_units_len) return; byte unit_dlm = Input_units[word_idx]; int pos = Byte_ary_finder.Find_fwd(input, unit_dlm, word_bgn, word_end); if (pos != ByteAry_.NotFound) // remove dlms from end of bry; EX: "123'" -> "123" word_end = pos; if (!Parse_input_word_is_compass(input[word_bgn])) { // if ( is_numeric( $v ) ) { double word_val = ByteAry_.XtoDoubleByPosOr(input, word_bgn, word_end, Double_.NaN); if (word_val != Double_.NaN) { if (word_idx > 2) {error = -4; return;} switch (word_idx) { case 0: if (word_val <= -180 || word_val > 180) {error = -5; return;} rv[0] = word_val; break; case 1: if (word_val < 0 || word_val >= 60) {error = -6; return;} if (rv[0] != (int)(rv[0])) {error = -7; return;} rv[1] = word_val; break; case 2: if (word_val < 0 || word_val >= 60) {error = -8; return;} if (rv[1] != (int)(rv[1])) {error = -9; return;} rv[2] = word_val; break; } } else {error = -3; return;} } else { // 'NSEW' word_idx_nsew = word_idx; byte word_byte = input[word_bgn]; if (rv[0] < 0) {error = -11; return;} if (word_end - word_bgn != 1) {error = -3; return;} switch (dir_id) { case Dir_long_id: if (word_byte == Byte_ascii.Ltr_N || word_byte == Byte_ascii.Ltr_S) {error = -12; return;} break; case Dir_lat_id: if (word_byte == Byte_ascii.Ltr_E || word_byte == Byte_ascii.Ltr_W) {error = -12; return;} break; case Dir_unknown_id: if (word_byte == Byte_ascii.Ltr_N || word_byte == Byte_ascii.Ltr_S) this.dir_id = Dir_lat_id; else this.dir_id = Dir_long_id; break; } if (this.dir_id == Dir_lat_id) { double rv_0 = rv[0]; if (rv_0 < -90 || rv_0 > 90) {error = -13; return;} } if (word_byte == Byte_ascii.Ltr_S || word_byte == Byte_ascii.Ltr_W) rv[3] = -1; } } private static byte Parse_dir(byte[] dir) { if (ByteAry_.Len_eq_0(dir)) return Dir_unknown_id; Object dir_obj = Dir_trie.MatchAtCur(dir, 0, dir.length); return dir_obj == null ? Dir_unknown_id : ((ByteVal)dir_obj).Val(); } private static int Parse_precision(int val) { // REF.MW: MapSourcesMath.php|newCoord if (val > -1 && val < 10) return val; else if (val == -1) return 9; else return 4; } private ByteAryBfr tmp_bfr = ByteAryBfr.reset_(32); private static byte[] Parse_input_normalize(ByteAryBfr bfr, byte[] input) { int input_end = input.length; if (input_end == 0) return null; int i = 0; while (i < input_end) { byte b = input[i]; Object o = Input_trie.Match(b, input, i, input_end); if (o == null) { bfr.Add_byte(b); ++i; } else { byte tid = ((ByteVal)o).Val(); switch (tid) { case Input_tid_apos: bfr.Add_byte(Byte_ascii.Apos).Add_byte_space(); break; // EX: "'" -> "' " case Input_tid_quote: bfr.Add_byte(Byte_ascii.Quote).Add_byte_space(); break; // EX: '"' -> '" ' case Input_tid_dash: bfr.Add_byte(Byte_ascii.Dash); break; case Input_tid_space: bfr.Add_byte_space(); break; case Input_tid_degree: bfr.Add_byte(Byte_ascii.Slash); bfr.Add_byte_space(); break; // EX: "°" -> "° " case Input_tid_compass: bfr.Add_byte_space(); bfr.Add_byte(Byte_ascii.Case_upper(b)); break; // NOTE: always single-char ASCII; EX: N,E,S,W,n,e,s,w } i = Input_trie.Match_pos(); } } return bfr.XtoAryAndClearAndTrim(); } private static final byte Dir_unknown_id = 0, Dir_lat_id = 1, Dir_long_id = 2; public static final byte[] Dir_lat_bry = ByteAry_.new_ascii_("lat"), Dir_long_bry = ByteAry_.new_ascii_("long"); private static final ByteTrieMgr_slim Dir_trie = ByteTrieMgr_slim.ci_() .Add_bry_bval(Dir_lat_bry , Dir_lat_id) .Add_bry_bval(Dir_long_bry , Dir_long_id) ; private static final byte[] Compass_N = new byte[] {Byte_ascii.Ltr_N} , Compass_E = new byte[] {Byte_ascii.Ltr_E} , Compass_S = new byte[] {Byte_ascii.Ltr_S} , Compass_W = new byte[] {Byte_ascii.Ltr_W} ; private static final byte Input_tid_apos = 1, Input_tid_quote = 2, Input_tid_dash = 3, Input_tid_space = 4, Input_tid_degree = 5, Input_tid_compass = 6; private static final byte Input_byte_degree = Byte_ascii.Slash; // NOTE: ugly cheat to avoid using multi-byte char; note that all "/" are swapped out to " ", so any remaining "/" was added by the normalizer; EX: "123° 4/5" -> "123/ 4 5" private static final byte[] Input_units = new byte[] {Input_byte_degree, Byte_ascii.Apos, Byte_ascii.Quote, Byte_ascii.Space}; private static final int Input_units_len = Input_units.length; private static final byte[] Input_bry_degree = ByteAry_.new_utf8_("°"); private static final ByteTrieMgr_slim Input_trie = ByteTrieMgr_slim.cs_() .Add_str_byte("'" , Input_tid_apos) // NOTE: must add ' so that "'" -> "' " .Add_str_byte("‘" , Input_tid_apos) .Add_str_byte("’" , Input_tid_apos) .Add_str_byte("′" , Input_tid_apos) .Add_str_byte("\"" , Input_tid_quote) // NOTE: must add " so that '"' -> '" ' .Add_str_byte("''" , Input_tid_quote) .Add_str_byte("“" , Input_tid_quote) .Add_str_byte("”" , Input_tid_quote) .Add_str_byte("″" , Input_tid_quote) .Add_str_byte("-" , Input_tid_dash) .Add_str_byte("−" , Input_tid_dash) .Add_str_byte(" " , Input_tid_space) .Add_str_byte("_" , Input_tid_space) .Add_str_byte("/" , Input_tid_space) .Add_str_byte("\t" , Input_tid_space) .Add_str_byte("\n" , Input_tid_space) .Add_str_byte("\r" , Input_tid_space) .Add_bry_bval(Input_bry_degree , Input_tid_degree) .Add_str_byte("N" , Input_tid_compass) .Add_str_byte("S" , Input_tid_compass) .Add_str_byte("E" , Input_tid_compass) .Add_str_byte("W" , Input_tid_compass) .Add_str_byte("n" , Input_tid_compass) .Add_str_byte("s" , Input_tid_compass) .Add_str_byte("e" , Input_tid_compass) .Add_str_byte("w" , Input_tid_compass) ; public static final Map_math _ = new Map_math(); }
[ "gnosygnu@gmail.com" ]
gnosygnu@gmail.com
a0d8e0d3706162aad9ec319bc4516970aa55d674
a3742532e43ebf8ae09c2036dc817759fad5a6b4
/src/main/java/tests/maptests/primitive/HftcUpdateableMapTest.java
3b0071ddc6a9921141239bc8d726696b85e231a5
[]
no_license
zhudebin/maptest
2b98a50cdd21481b235f66a3d44294ea87efb2ea
5588e9c4e398cd1ae56cc326842bfd2b0e4e2b34
refs/heads/master
2021-01-17T05:50:47.743692
2016-06-03T06:36:48
2016-06-03T06:36:48
60,315,088
0
0
null
null
null
null
UTF-8
Java
false
false
814
java
package tests.maptests.primitive; import net.openhft.koloboke.collect.map.hash.HashIntIntMap; import net.openhft.koloboke.collect.map.hash.HashIntIntMaps; /** * Koloboke HashIntIntMaps.newImmutableMap test */ public class HftcUpdateableMapTest extends AbstractPrimPrimMapTest { private HashIntIntMap m_map; @Override public void setup(final int[] keys, float fillFactor) { super.setup( keys, fillFactor ); final HashIntIntMap map = HashIntIntMaps.newMutableMap(keys.length); for (int key : keys) map.put(key, key); m_map = HashIntIntMaps.newUpdatableMap( map ); } @Override public int runRandomTest() { int res = 0; for ( int i = 0; i < m_keys.length; ++i ) res = res ^ m_map.get( m_keys[ i ] ); return res; } }
[ "zdb_hn@163.com" ]
zdb_hn@163.com
70d81e89195ec6ad5edcfc1e919f18146de18f59
7dff6c11ca1d7b5fadf3eaff1ae865805ef5a14d
/Flyweight/app/src/main/java/demo/dhcc/com/flyweight/simple2/ConcreteFlyweight.java
7d35f10892420a229d41f8355e786adc4ba444c3
[]
no_license
heyangJob/Design-Pattern
85a1fc0ff7058db875ceaf065e1b803ed6227a1c
a7849247139a2a00103333d56de76783ab1fabbb
refs/heads/master
2020-03-23T12:01:08.143480
2018-08-22T09:21:50
2018-08-22T09:21:50
141,531,909
4
0
null
null
null
null
UTF-8
Java
false
false
589
java
package demo.dhcc.com.flyweight.simple2; /** * 享元角色的实现类 * * @author 512573717@qq.com * @created 2018/8/6 下午3:50. */ public class ConcreteFlyweight implements Flyweight { private String intrinsicState = null; public ConcreteFlyweight(String intrinsicState) { this.intrinsicState = intrinsicState; } @Override public void operation(String state) { // 内部状态 System.out.println("Intrinsic State = " + this.intrinsicState); // 外部状态 System.out.println("Extrinsic State = " + state); } }
[ "512573717@qq.com" ]
512573717@qq.com
ce2e677fb9df5c0ff521b3c9752780f7b3968e46
4946183930dd93dfa6d25f8d561b43aab823545c
/test/src/Singleton.java
ea5d1657e9cbc322b801758092b7211cb47a52d2
[]
no_license
chen-t7/code
f82d02b5ee2b5fbf7d691fd329ed5569bb0cb642
ce9a9ac2c5da170e8f33997814958b3f1706886d
refs/heads/master
2022-12-26T21:57:34.316622
2020-09-07T09:05:49
2020-09-07T09:05:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
559
java
//class Singleton { // private static Singleton instance=new Singleton(); // private Singleton(){} // public static Singleton getInstance(){ // return instance; // } //} class Singleton{ private static volatile Singleton instance=null; private Singleton(){} public static Singleton getInstance(){ if(instance==null){ synchronized (Singleton.class){ if(instance==null){ instance=new Singleton(); } } } return instance; } }
[ "2274828126@qq.com" ]
2274828126@qq.com
dc12ae9c10472fefe2270298b1646d8b90a2221d
d2045b375576f99415c1ee3298dec7d1330711aa
/meuprograma.java
612dd5e41015f417e90c9eaa1464751c00e098a9
[]
no_license
Alexandresteves/Java-projects
75f5e0754db202c1ebb4a890319e703d0aab5511
76158ae39acf4c2605595b167419abb5d803bee1
refs/heads/master
2021-04-15T16:33:10.144950
2018-03-25T23:22:13
2018-03-25T23:22:13
126,748,597
0
0
null
null
null
null
ISO-8859-1
Java
false
false
115
java
public class Meuprograma { public static void main(String[] args) { System.out.println("Aplicação Java"); } }
[ "alexandre_ae@hotmail.com" ]
alexandre_ae@hotmail.com
eda5eb3b022aaca023a5c27f40149b54efed37b3
866e04d6eccb39f21f83e8e7399b128931090b91
/lunch/src/main/java/com/example/recipe/lunch/LunchRecipeApplication.java
43e6028e1768f42d6b03e630e02800696b0d8b68
[]
no_license
chathuran/lunch-app
1fa169cd5cced7c2f847086026de79c161979587
b33dec876a91cd1af84c60a326ea34c553153428
refs/heads/master
2022-12-19T12:26:12.147965
2020-09-28T15:17:43
2020-09-28T15:17:43
298,964,269
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
package com.example.recipe.lunch; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class LunchRecipeApplication { public static void main(String[] args) { SpringApplication.run(LunchRecipeApplication.class, args); } }
[ "071@erangaDC" ]
071@erangaDC
2865885b1cd6d8c68877f0c21ae74c7bd5205d3e
2ddbe278a618adf859430ee875888aaec971d73b
/factory/src/FactoeyMethod/Apple.java
2f9ae75c6925f73b54feabdf674c466be6f0f585
[]
no_license
tanzikun/IdeaProjects
6733695e46bf80c692069a1b02853d981c4ae65b
8ff788b242e565d3cff0ae97515e64cb3478a7db
refs/heads/master
2022-12-02T06:20:50.124198
2019-08-06T14:39:54
2019-08-06T14:39:54
200,869,608
0
0
null
2022-11-16T12:22:43
2019-08-06T14:38:20
Java
UTF-8
Java
false
false
167
java
package FactoeyMethod; public class Apple implements Fruit { /** * 采集 */ public void get(){ System.out.println("采集苹果"); } }
[ "574836588@qq.com" ]
574836588@qq.com
4e3ec35ea4fd4650cee60ee51e794822de363214
2905ab13085cf90fa3ff02eabb635ffb80421121
/ivanhoe/src/edu/virginia/speclab/ivanhoe/shared/message/DeleteDocumentMsg.java
e7b6a485985c03f238ec0e43fcf2e6bd7d3b37ce
[]
no_license
waynegraham/ivanhoe
8474eccd2eb05e30d16eef9ad4425e71fca65b12
dfe05439f7e75298a4b38313d5fe904998dbda42
refs/heads/master
2020-05-31T00:45:22.000842
2010-03-23T15:28:59
2010-03-23T15:28:59
32,215,670
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
/* * Created on Mar 22, 2004 * * To change the template for this generated file go to * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments */ package edu.virginia.speclab.ivanhoe.shared.message; import edu.virginia.speclab.ivanhoe.shared.data.DocumentInfo; /** * @author lfoster * * To change the template for this generated type comment go to * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments */ public class DeleteDocumentMsg extends Message { private DocumentInfo docInfo; public DeleteDocumentMsg(DocumentInfo delDocInfo) { super(MessageType.DELETE_DOCUMENT); this.docInfo = delDocInfo; } public DocumentInfo getInfo() { return this.docInfo; } }
[ "nicklaiacona@c161d011-2726-0410-8d5a-8f576c7000fa" ]
nicklaiacona@c161d011-2726-0410-8d5a-8f576c7000fa
d0031958994f0c808cab10fe5e27530a91d5de76
61dea18460df6f2bc1fe19af8bfa6e0809406885
/ecmoban/src/main/java/com/ecjia/view/adapter/DataBindingAdapter.java
1e1eaff9d779f3bfec13591f934059bac174fd52
[]
no_license
hackerlc/SJQ_ECSHOP_MJ_NEW
a006261856124671bceaf92d1f65d4905dc35078
2c8ac3f2464c4536c079ac067ec761adcd9c267e
refs/heads/master
2021-08-31T11:01:29.247522
2017-12-21T03:55:09
2017-12-21T03:55:09
114,960,406
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.ecjia.view.adapter; import android.databinding.BindingAdapter; import android.widget.ImageView; import com.ecjia.util.ImageLoaderForLV; /** * SJQ_ECSHOP_MJ_NEW * Created by YichenZ on 2017/2/22 13:32. */ public class DataBindingAdapter { @BindingAdapter("android:src") public static void setImageUrl(ImageView view, String url){ ImageLoaderForLV.getInstance(view.getContext()).setImageRes(view, url); } }
[ "812405389@qq.com" ]
812405389@qq.com
b7aa8d6e188213be481718594362d5a472dc1b61
b146af64dd81bc05ed8b9a4db18dd51a965ae0b5
/src/rs/ac/bg/etf/pp1/ast/AstLetop.java
54fae17ffc7c0fb0c8c0f1c5cc83fad2bddb452c
[ "MIT" ]
permissive
Edvvin/MicroJavaCompiler
07cf9b6dab83dabfe654762a5448db82cbef1e86
5ff2ee830c8214b9f54494f16fdcd19344f5135d
refs/heads/master
2023-06-08T07:49:02.599846
2021-06-16T14:57:37
2021-06-16T14:57:37
343,233,059
0
0
null
null
null
null
UTF-8
Java
false
false
748
java
// generated with ast extension for cup // version 0.8 // 16/5/2021 15:11:18 package rs.ac.bg.etf.pp1.ast; public class AstLetop extends Relop { public AstLetop () { } public void accept(Visitor visitor) { visitor.visit(this); } public void childrenAccept(Visitor visitor) { } public void traverseTopDown(Visitor visitor) { accept(visitor); } public void traverseBottomUp(Visitor visitor) { accept(visitor); } public String toString(String tab) { StringBuffer buffer=new StringBuffer(); buffer.append(tab); buffer.append("AstLetop(\n"); buffer.append(tab); buffer.append(") [AstLetop]"); return buffer.toString(); } }
[ "edvvin@mail.com" ]
edvvin@mail.com
975f723bdbe59b219bad977a917e465fe6333281
7216e4d3e4522b9fe0148fc4c1560e4e79286357
/idp-authn-impl-socialuser/src/test/java/fi/okm/mpass/idp/authn/impl/ExtractSocialPrincipalsFromSubjectTest.java
0f850c4bab07ff2420a756ab4303f2986b3591d7
[ "MIT" ]
permissive
haltu/eca-auth-proxy
a374c1ec530e36b924a46278959e4313ee65f3c3
31cdcd36b419d5067fe265399b2680e38bdb527a
refs/heads/master
2021-01-17T05:20:06.028510
2015-12-14T14:57:36
2015-12-14T14:57:36
48,229,777
0
1
null
null
null
null
UTF-8
Java
false
false
5,426
java
/* * The MIT License * Copyright (c) 2015 CSC - IT Center for Science, http://www.csc.fi * * 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. */ package fi.okm.mpass.idp.authn.impl; import org.testng.Assert; import net.shibboleth.idp.authn.AuthnEventIds; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import net.shibboleth.idp.authn.context.AuthenticationContext; import net.shibboleth.idp.authn.context.ExternalAuthenticationContext; import net.shibboleth.idp.authn.impl.PopulateAuthenticationContextTest; import javax.security.auth.Subject; import org.springframework.webflow.execution.Event; import net.shibboleth.idp.profile.ActionTestingSupport; import net.shibboleth.utilities.java.support.component.ComponentInitializationException; import org.springframework.mock.web.MockHttpServletRequest; import fi.okm.mpass.idp.authn.context.SocialUserContext; import fi.okm.mpass.idp.authn.principal.SocialUserPrincipal; import fi.okm.mpass.idp.authn.principal.SocialUserPrincipal.Types; /** {@link ExtractSocialPrincipalsFromSubject} unit test. */ public class ExtractSocialPrincipalsFromSubjectTest extends PopulateAuthenticationContextTest { private ExtractSocialPrincipalsFromSubject action; @BeforeMethod public void setUp() throws Exception { super.setUp(); action = new ExtractSocialPrincipalsFromSubject(); } @Test public void testNoServlet() throws Exception { action.initialize(); final Event event = action.execute(src); ActionTestingSupport.assertEvent(event, AuthnEventIds.NO_CREDENTIALS); } @Test public void testIdentity() throws Exception { Subject subject = new Subject(); SocialUserPrincipal socialUserPrincipalProviderId = new SocialUserPrincipal( Types.providerId, "providerId"); subject.getPrincipals().add(socialUserPrincipalProviderId); SocialUserPrincipal socialUserPrincipalDisplayName = new SocialUserPrincipal( Types.displayName, "displayName"); subject.getPrincipals().add(socialUserPrincipalDisplayName); SocialUserPrincipal socialUserPrincipalEmail = new SocialUserPrincipal( Types.email, "email"); subject.getPrincipals().add(socialUserPrincipalEmail); SocialUserPrincipal socialUserPrincipalFirstName = new SocialUserPrincipal( Types.firstName, "firstName"); subject.getPrincipals().add(socialUserPrincipalFirstName); SocialUserPrincipal socialUserPrincipalLastName = new SocialUserPrincipal( Types.lastName, "lastName"); subject.getPrincipals().add(socialUserPrincipalLastName); SocialUserPrincipal socialUserPrincipalUserId = new SocialUserPrincipal( Types.userId, "userId"); subject.getPrincipals().add(socialUserPrincipalUserId); SocialUserPrincipal socialUserPrincipalUS = new SocialUserPrincipal( "unsupported", "unsupported"); subject.getPrincipals().add(socialUserPrincipalUS); SocialUserContext suCtx = initContexts(subject); Assert.assertNotNull(suCtx); Assert.assertEquals(suCtx.getProviderId(), "providerId"); Assert.assertEquals(suCtx.getDisplayName(), "displayName"); Assert.assertEquals(suCtx.getEmail(), "email"); Assert.assertEquals(suCtx.getFirstName(), "firstName"); Assert.assertEquals(suCtx.getLastName(), "lastName"); Assert.assertEquals(suCtx.getUserId(), "userId"); } private SocialUserContext initContexts(Subject subject) throws ComponentInitializationException { MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest(); action.setHttpServletRequest(mockHttpServletRequest); action.initialize(); final AuthenticationContext ac = prc.getSubcontext( AuthenticationContext.class, false); ExternalAuthenticationContext externalAuthenticationContext = new ExternalAuthenticationContext(); externalAuthenticationContext.setSubject(subject); ac.addSubcontext(externalAuthenticationContext); final Event event = action.execute(src); ActionTestingSupport.assertProceedEvent(event); return (SocialUserContext) ac.getSubcontext(SocialUserContext.class, false); } }
[ "janne.lauros@gmail.com" ]
janne.lauros@gmail.com
35698160e29652501fef334dbd7f4b08f1be6295
7c7c660e45be16b60f74d5cc5daa3f7c71fe45d4
/ecolls-j/src/main/java/xyz/cofe/collection/UnionMap.java
de0b4865ef02c6f6acbfd00a85a86efc46fc74e3
[ "MIT" ]
permissive
gochaorg/cofe.xyz-next
9f160e6726d5af9d6efd5eda8b86b381c9d62824
02cb327222d113fd53e773bd61c3a0aeef24b9b2
refs/heads/master
2022-11-27T05:52:42.549697
2022-10-15T22:13:51
2022-10-15T22:13:51
200,032,063
0
0
MIT
2022-11-15T23:42:12
2019-08-01T10:45:09
Java
UTF-8
Java
false
false
9,113
java
/* * The MIT License * * Copyright 2014 Kamnev Georgiy (nt.gocha@gmail.com). * * Данная лицензия разрешает, безвозмездно, лицам, получившим копию данного программного * обеспечения и сопутствующей документации (в дальнейшем именуемыми "Программное Обеспечение"), * использовать Программное Обеспечение без ограничений, включая неограниченное право на * использование, копирование, изменение, объединение, публикацию, распространение, сублицензирование * и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется * данное Программное Обеспечение, при соблюдении следующих условий: * * Вышеупомянутый копирайт и данные условия должны быть включены во все копии * или значимые части данного Программного Обеспечения. * * ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ ЛЮБОГО ВИДА ГАРАНТИЙ, * ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОЙ ПРИГОДНОСТИ, * СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И НЕНАРУШЕНИЯ ПРАВ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ * ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ * ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ, ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ * ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ * ИЛИ ИНЫМИ ДЕЙСТВИЯМИ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ. */ package xyz.cofe.collection; import xyz.cofe.iter.ArrayIterable; import java.util.Collection; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; /** * Карта для записи в несколько других карт и чтение из указанной * @author gocha */ public class UnionMap<K,V> implements Map<K, V>{ //<editor-fold defaultstate="collapsed" desc="log Функции"> private static void logFine(String message,Object ... args){ Logger.getLogger(UnionMap.class.getName()).log(Level.FINE, message, args); } private static void logFiner(String message,Object ... args){ Logger.getLogger(UnionMap.class.getName()).log(Level.FINER, message, args); } private static void logInfo(String message,Object ... args){ Logger.getLogger(UnionMap.class.getName()).log(Level.INFO, message, args); } private static void logWarning(String message,Object ... args){ Logger.getLogger(UnionMap.class.getName()).log(Level.WARNING, message, args); } private static void logSevere(String message,Object ... args){ Logger.getLogger(UnionMap.class.getName()).log(Level.SEVERE, message, args); } private static void logException(Throwable ex){ Logger.getLogger(UnionMap.class.getName()).log(Level.SEVERE, null, ex); } //</editor-fold> protected Map<K,V> readMap = null; protected Iterable<Map> writeMaps = null; /** * Возвращает карту из которой произодит чтение * @return карта для чтения */ public Map<K, V> getReadMap() { return readMap; } /** * Указывает карту из которой произодит чтение * @param readMap карта для чтения */ public void setReadMap(Map<K, V> readMap) { this.readMap = readMap; } /** * Возвращает карты в которые производит запись * @return карты для записи */ public Iterable<Map> getWriteMaps() { return writeMaps; } /** * Указывет карты в которые производит запись * @param writeMaps карты для записи */ public void setWriteMaps(Iterable<Map> writeMaps) { this.writeMaps = writeMaps; } /** * Указывет карты в которые производит запись * @param maps карты для записи */ public void setWriteMaps(Map ... maps){ this.writeMaps = new ArrayIterable<>(maps); } /** * Возвращает размер карты * @return размер карты */ @Override public int size() { if( readMap==null )return 0; return readMap.size(); } /** * Проверяет что карта пустая * @return true - нет элементов */ @Override public boolean isEmpty() { if( readMap==null )return true; return readMap.isEmpty(); } /** * Проверяет наличие ключа в карте * @param key ключ * @return true - есть в карте */ @Override public boolean containsKey(Object key) { if( readMap==null )return false; return readMap.containsKey(key); } /** * ПРоверяет наличие значения в карте * @param value значение * @return true - есть значение */ @Override public boolean containsValue(Object value) { if( readMap==null )return false; return readMap.containsValue(value); } /** * Возвращает значение по ключу * @param key ключ * @return значение */ @Override public V get(Object key) { if( readMap==null )return null; return readMap.get(key); } /** * Устанавливает ключ/значение * @param key ключ * @param value значние * @return предыдущее (последнее) значение */ @Override public V put(K key, V value) { V r = null; if( writeMaps!=null ){ for( Map<K,V> m : writeMaps ){ if( m!=null ){ r = m.put(key, value); } } } return r; } /** * Удаляет ключ/значение * @param key ключ * @return предыдущее значение */ @Override public V remove(Object key) { V r = null; if( writeMaps!=null ){ for( Map<K,V> m : writeMaps ){ if( m!=null ){ r = m.remove(key); } } } return r; } /** * Добавляет значения * @param ms значения */ @Override public void putAll(Map<? extends K, ? extends V> ms) { if( writeMaps!=null ){ for( Map<K,V> m : writeMaps ){ if( m!=null ){ m.putAll(ms); } } } } /** * Удялет все значения */ @Override public void clear() { if( writeMaps!=null ){ for( Map<K,V> m : writeMaps ){ if( m!=null ){ m.clear(); } } } } /** * Возвращает все ключи карты * @return ключи */ @Override public Set<K> keySet() { if( readMap==null )return new HashSet<K>(); return readMap.keySet(); } /** * Возвращает значения карты * @return значения */ @Override public Collection<V> values() { if( readMap==null )return new HashSet<V>(); return readMap.values(); } /** * Возвращает пары ключ/значние * @return пары ключ/значние */ @Override public Set<Entry<K, V>> entrySet() { if( readMap==null )return new HashSet<Entry<K, V>>(); return readMap.entrySet(); } }
[ "nt.gocha@gmail.com" ]
nt.gocha@gmail.com
5facd01330232c9652f77e30664e02204ea84c95
65572044f62b9d8d08c8d19fca13b9b728d23862
/coisini-ms/coisini-admin-server/src/main/java/com/coisini/admin/entity/SysRole.java
1c3a77808267cfb1850df1efcdbf515d89a3373d
[]
no_license
Maggieq8324/coisini-cloud
76a75fb93f3889f536d3fa12cc39166025b37429
1fbf59597428d4acda740883fd3366704b516235
refs/heads/main
2023-06-20T16:05:48.856207
2021-07-23T07:05:14
2021-07-23T07:05:14
388,693,926
3
1
null
null
null
null
UTF-8
Java
false
false
503
java
package com.coisini.admin.entity; public class SysRole extends BaseModel { private String name; private String remark; private Byte delFlag; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public Byte getDelFlag() { return delFlag; } public void setDelFlag(Byte delFlag) { this.delFlag = delFlag; } }
[ "maggieq8324@gmail.com" ]
maggieq8324@gmail.com
79f84cd14810ca1173599262e6307d953331daf5
9f3ef32725b29ce770af806f0c8312af0fa51b27
/src/main/java/com/gy/yb/Observer.java
bb5b1d9aaa8b82079be1f17d35660496108e5977
[]
no_license
SeekingPlumBlossoms/observer
8457a86d2b0f2ba776c9f55db4226783fb0032d1
b5827cb49e575cc65489a8860029367f058d040c
refs/heads/master
2020-03-25T04:33:00.845147
2018-08-04T01:20:33
2018-08-04T01:20:33
143,400,693
0
0
null
null
null
null
UTF-8
Java
false
false
106
java
package com.gy.yb; public interface Observer { public void update(WeatherSubject weatherSubject); }
[ "17611281125@163.com" ]
17611281125@163.com
49054fc1e6444977c225869fc526fade88a74044
02ec61624a19f1582e2ca1b4fb9d25e2b19e843f
/android/app/src/main/java/com/tevinjeffrey/njitct/utils/AndroidMainThread.java
07efabe4de10a8a0a75e0e4a7ec6c220d6e7c288
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
tevjef/NJIT-Course-Tracker
0c45a5b95f2d06e2b6ab92844c84784774b3b639
549e299ac10bb6fd504bfd2554c2506a12c57d3c
refs/heads/master
2021-01-10T03:00:14.363189
2016-02-03T08:57:33
2016-02-03T08:57:33
50,632,308
6
0
null
null
null
null
UTF-8
Java
false
false
244
java
package com.tevinjeffrey.njitct.utils; import java.lang.annotation.Retention; import javax.inject.Qualifier; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Qualifier @Retention(RUNTIME) public @interface AndroidMainThread { }
[ "mastermindtj94@gmail.com" ]
mastermindtj94@gmail.com
61dbc5f1c4683ed6ad2faae8438527ca56253fa8
3ee9187e459512f33ff1c4231e9edfb321380d08
/src/main/java/org/spongepowered/common/event/tracking/context/transaction/effect/RemoveTileEntityFromChunkEffect.java
cc118789df8e64b3807ea415793000e80c329b5a
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SpongePowered/Sponge
37ef5f6c77cdbbdb007d6e68f4c5a1be0e56441e
5d39e239d8de5e746efdb82725854ee1f57a34a5
refs/heads/api-10
2023-08-17T05:53:40.685621
2023-06-17T21:01:13
2023-06-17T21:01:13
33,791,453
171
97
MIT
2023-09-12T11:49:33
2015-04-11T20:38:48
Java
UTF-8
Java
false
false
2,578
java
/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * 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. */ package org.spongepowered.common.event.tracking.context.transaction.effect; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import org.spongepowered.common.event.tracking.context.transaction.pipeline.BlockPipeline; import org.spongepowered.common.event.tracking.context.transaction.pipeline.PipelineCursor; import org.spongepowered.common.world.SpongeBlockChangeFlag; public final class RemoveTileEntityFromChunkEffect implements ProcessingSideEffect { private static final class Holder { static final RemoveTileEntityFromChunkEffect INSTANCE = new RemoveTileEntityFromChunkEffect(); } public static RemoveTileEntityFromChunkEffect getInstance() { return RemoveTileEntityFromChunkEffect.Holder.INSTANCE; } RemoveTileEntityFromChunkEffect() {} @Override public EffectResult processSideEffect(final BlockPipeline pipeline, final PipelineCursor oldState, final BlockState newState, final SpongeBlockChangeFlag flag, final int limit ) { final BlockEntity tileEntity = oldState.tileEntity; if (tileEntity == null) { return EffectResult.NULL_RETURN; } pipeline.getAffectedChunk().removeBlockEntity(oldState.pos); return EffectResult.NULL_RETURN; } }
[ "gabizou@me.com" ]
gabizou@me.com
f13a8531f399af51f015e1496a7a39ecb716d637
66b167fac9fe9648efc460640d4b0c9e27ebc017
/src/BusinessLayer/Tiles/Player/Ability/MageAbility.java
be1bb971dea3b34f1b0dad8fac6995e445a4cbc5
[]
no_license
hk772/OOP3_Dungeons_and_Dragons
ea7d2388686332838dc469d4027441952bb8300e
7138cb512cd081b052a4074879ada4a8eacf558e
refs/heads/master
2023-08-09T07:07:49.486129
2021-08-10T12:11:08
2021-08-10T12:11:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package BusinessLayer.Tiles.Player.Ability; public class MageAbility extends AbilityIMP { private int cost; public MageAbility(String name, String poolName, int pool, int cost) { super(name, poolName, pool); this.cost = cost; } @Override public boolean isAvailable() { return amount >= cost; } @Override public void onTick() { throw new IllegalArgumentException("cant use"); } @Override public void use() { super.use(); amount -= cost; } }
[ "hagaik@post.bgu.ac.il" ]
hagaik@post.bgu.ac.il
deab7b06caaf45c6d77b57dd3a9bf69559496e60
d2cb1f4f186238ed3075c2748552e9325763a1cb
/methods_all/nonstatic_methods/javax_crypto_CipherInputStream_notify.java
f351c064b66ea6d98fb7d9ba27422a795b116f6a
[]
no_license
Adabot1/data
9e5c64021261bf181b51b4141aab2e2877b9054a
352b77eaebd8efdb4d343b642c71cdbfec35054e
refs/heads/master
2020-05-16T14:22:19.491115
2019-05-25T04:35:00
2019-05-25T04:35:00
183,001,929
4
0
null
null
null
null
UTF-8
Java
false
false
165
java
class javax_crypto_CipherInputStream_notify{ public static void function() {javax.crypto.CipherInputStream obj = new javax.crypto.CipherInputStream();obj.notify();}}
[ "peter2008.ok@163.com" ]
peter2008.ok@163.com
2ea3c39a66aca59c33ab7b72916de543d8092451
5bab3f49607b66c77457a49c9d395628d4f45ca3
/jibx/examples/codegen/gen/src/org/opentravel/ota/CancelInfoRSType.java
8ccd16a16351397f0369d53d58324d47dc80d576
[]
no_license
zwijze/journallines
8ee37a559b1c1fe2070fa14b56e3957396a83a5e
973ab3228740b7e810af5f746da7abf556abaaaa
refs/heads/master
2020-04-06T07:53:20.251060
2016-08-29T19:38:29
2016-08-29T19:38:29
65,633,068
0
0
null
null
null
null
UTF-8
Java
false
false
2,643
java
package org.opentravel.ota; import java.util.ArrayList; import java.util.List; /** * May contain rules associated with canceling a reservation as well as the supplier's cancellation number. * * Schema fragment(s) for this class: * <pre> * &lt;xs:complexType xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="CancelInfoRSType"> * &lt;xs:sequence> * &lt;xs:element name="CancelRules" minOccurs="0"> * &lt;!-- Reference to inner class CancelRules --> * &lt;/xs:element> * &lt;xs:element type="ns:UniqueID_Type" name="UniqueID" minOccurs="0"/> * &lt;/xs:sequence> * &lt;/xs:complexType> * </pre> */ public class CancelInfoRSType { private CancelRules cancelRules; private UniqueIDType uniqueID; /** * Get the 'CancelRules' element value. * * @return value */ public CancelRules getCancelRules() { return cancelRules; } /** * Set the 'CancelRules' element value. * * @param cancelRules */ public void setCancelRules(CancelRules cancelRules) { this.cancelRules = cancelRules; } /** * Get the 'UniqueID' element value. Contains the supplier's cancellation number. * * @return value */ public UniqueIDType getUniqueID() { return uniqueID; } /** * Set the 'UniqueID' element value. Contains the supplier's cancellation number. * * @param uniqueID */ public void setUniqueID(UniqueIDType uniqueID) { this.uniqueID = uniqueID; } /** * Schema fragment(s) for this class: * <pre> * &lt;xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="CancelRules" minOccurs="0"> * &lt;xs:complexType> * &lt;xs:sequence> * &lt;xs:element type="ns:CancelRuleType" name="CancelRule" maxOccurs="unbounded"/> * &lt;/xs:sequence> * &lt;/xs:complexType> * &lt;/xs:element> * </pre> */ public static class CancelRules { private List<CancelRuleType> cancelRuleList = new ArrayList<CancelRuleType>(); /** * Get the list of 'CancelRule' element items. * * @return list */ public List<CancelRuleType> getCancelRuleList() { return cancelRuleList; } /** * Set the list of 'CancelRule' element items. * * @param list */ public void setCancelRuleList(List<CancelRuleType> list) { cancelRuleList = list; } } }
[ "frank.zwijze@gmail.com" ]
frank.zwijze@gmail.com
1eb15406f7d64a2c6e802d1ba5db455e21488087
9452e1992b36fac0414de9856cefa67f95e984de
/sacamos-server/src/main/java/main.java
997199a0eb926073cc52daf40233e3ce71a64e0d
[]
no_license
randyquaye/randyquaye
81a899c0735b82f63b3d9f91694116f8fa2dfd85
258be6d776d5bc3a1d76028daecd2b4cd59b0a1b
refs/heads/main
2023-05-18T11:33:15.485728
2021-06-09T22:05:07
2021-06-09T22:05:07
352,344,688
0
0
null
null
null
null
UTF-8
Java
false
false
9,198
java
import com.google.auth.oauth2.GoogleCredentials; import com.google.cloud.storage.Blob; import com.google.cloud.storage.Bucket; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; import com.google.firebase.cloud.StorageClient; import com.google.firebase.database.*; import java.io.*; import java.util.ArrayList; import java.util.Scanner; import java.util.logging.Level; import java.util.logging.Logger; import static org.apache.http.protocol.HTTP.UTF_8; public class main { public static void main(String[] args) { try { FileInputStream serviceAccount; serviceAccount = new FileInputStream("C:\\Users\\Randy Quaye\\IdeaProjects\\sacamos-server\\src\\serviceAccountKey.json"); FirebaseOptions options = new FirebaseOptions.Builder() .setCredentials(GoogleCredentials.fromStream(serviceAccount)) .setDatabaseUrl("https://finalyear-7d906.firebaseio.com") .setStorageBucket("finalyear-7d906.appspot.com") .build(); FirebaseApp.initializeApp(options); } catch (IOException ex) { Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex); System.exit(1); } // As an admin, the app has access to read and write all data, regardless of Security Rules DatabaseReference database = FirebaseDatabase.getInstance().getReference(); //Start Listeners cableListener(database); bundleListener(database); Scanner scanner = new Scanner(System.in); while (!scanner.nextLine().equals("Quit")) {} } /**************CABLE PROCESSING*******************/ public static void cableListener(DatabaseReference database){ DatabaseReference cablesRef = database.child("Cyl_cables"); // Attach a listener to read and process the data at our cables reference cablesRef.orderByChild("status").equalTo(1).addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot snapshot, String previousChildName) { CylindricalCable c = snapshot.child("cable_spec").getValue(CylindricalCable.class); System.out.println(c.getName()); c.setID(snapshot.getKey()); writeCableSpecFile(c); cablesRef.child(c.getID()).child("status").setValueAsync(buildCable(c.getID())); } @Override public void onChildChanged(DataSnapshot snapshot, String previousChildName) { } @Override public void onChildRemoved(DataSnapshot snapshot) { } @Override public void onChildMoved(DataSnapshot snapshot, String previousChildName) { } @Override public void onCancelled(DatabaseError error) { } }); } public static void writeCableSpecFile(CylindricalCable c) { //TODO : Sort out the params and remove default zeros from Ao and Bo String spec_data = "# MOD_cable_lib_dir \r\n" + "../MOD/CABLE/\r\n" + "Cylindrical\r\n" + "1 #number of conductors \r\n" + "3 #number of parameters \r\n" + String.valueOf(c.getC_Radius()) + " # parameter 1: conductor radius\r\n" + String.valueOf(c.getD_Radius()) + " # parameter 2: dielectric radius\r\n" + String.valueOf(c.getC_conductivity()) + " # parameter 3: conductivity\r\n" + "1 \t\t\t# number of frequency dependent parameters\r\n" + "# Dielectric relative permittivity model follows\r\n" + String.valueOf(c.getNormalisation()) + " # w normalisation constant\r\n" + 0 + " # a order, a coefficients follow below\r\n" + String.valueOf(c.getAc()) + "\r\n" + 0 + " # b order, b coefficients follow below\r\n" + String.valueOf(c.getBc()); //Create file; String file_path = "C:/Users/Randy Quaye/Documents/SACAMOS/MOD/CABLE/"; String file = file_path + c.getID() + ".cable_spec"; try { BufferedWriter writer = new BufferedWriter(new FileWriter(file)); writer.write(spec_data); writer.close(); } catch (IOException e) { e.printStackTrace(); } } public static int buildCable(String filename) { String filepath = "\""+"C:\\Users\\Randy Quaye\\Documents\\SACAMOS\\MOD\\CABLE\\"+ filename + "\""; String cmd1 = "cd C:/Users/Randy Quaye/Documents/SACAMOS/BIN"; String cmd2 = "cable_model_builder.exe "+filepath; ProcessBuilder builder = new ProcessBuilder( "cmd.exe", "/c", cmd1 + "&& "+cmd2); builder.redirectErrorStream(true); Process p = null; try { p = builder.start(); BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream())); String line,strLine=""; while ((line = r.readLine()) != null) strLine = line; if(strLine.equals("cable_model_builder:Finished_Correctly")){ //Write cable status to 4 return 4; } else{ return -1;} } catch (IOException e) { e.printStackTrace(); return -1; } } /**************BUNDLE PROCESSING*******************/ public static void bundleListener(DatabaseReference database){ DatabaseReference bundleRef = database.child("Bundles"); bundleRef.orderByChild("status").equalTo(1).addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(DataSnapshot snapshot, String previousChildName) { Bundle b = snapshot.child("bundle_spec").getValue(Bundle.class); System.out.println(b.getBundleName()); b.setBundleID(snapshot.getKey()); writeBundleSpecFile(b); bundleRef.child(b.getBundleID()).child("status").setValueAsync(buildBundle(b.getBundleID())); } @Override public void onChildChanged(DataSnapshot snapshot, String previousChildName) { } @Override public void onChildRemoved(DataSnapshot snapshot) { } @Override public void onChildMoved(DataSnapshot snapshot, String previousChildName) { } @Override public void onCancelled(DatabaseError error) { } }); } public static void writeBundleSpecFile(Bundle b){ String data = "#MOD_cable_lib_dir\r\n" + "../MOD/CABLE/\r\n" + "#MOD_cable_lib_dir\r\n" + "../MOD/BUNDLE/\r\n" + b.getNumber_of_params() +" #Number of cables in bundle, cable list follows\r\n"; ArrayList<BundleComponent> bC = b.getComponents(); for(int i = 0;i<b.getNumber_of_params();i++){ data = data + bC.get(i).getCableID()+"\r\n" + bC.get(i).getX_param()+"\t"+ bC.get(i).getY_param()+"\t"+ bC.get(i).getRot_param()+"\r\n"; } data = data +"no_ground_plane\r\n"+ "no_laplace"; //Create file; String file_path = "C:/Users/Randy Quaye/Documents/SACAMOS/MOD/BUNDLE/"; String file = file_path + b.getBundleID() + ".bundle_spec"; try { BufferedWriter writer = new BufferedWriter(new FileWriter(file)); writer.write(data); writer.close(); } catch (IOException e) { e.printStackTrace(); } } public static int buildBundle(String filename) { String filepath = "\""+"C:\\Users\\Randy Quaye\\Documents\\SACAMOS\\MOD\\BUNDLE\\"+ filename + "\""; String cmd1 = "cd C:/Users/Randy Quaye/Documents/SACAMOS/BIN"; String cmd2 = "cable_bundle_model_builder.exe "+filepath; ProcessBuilder builder = new ProcessBuilder( "cmd.exe", "/c", cmd1 + "&& "+cmd2); builder.redirectErrorStream(true); Process p = null; try { p = builder.start(); BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream())); String line,strLine=""; while ((line = r.readLine()) != null) strLine = line; if(strLine.equals("cable_bundle_model_builder:Finished_Correctly")){ //Write cable status to 4 return 4; } else{ return -1;} } catch (IOException e) { e.printStackTrace(); return -1; } } }
[ "randyquaye@Randys-MacBook-Pro.local" ]
randyquaye@Randys-MacBook-Pro.local
d64ed7927fee679883a9d1e23d2ccc998c53ce05
ada0c9168deedece91162b5c2a3908c61626caaa
/src/telas/NotaSaida/ListaProdutoSaidaBeanTableModel.java
4e4e5f895cf408fc871dbd9ca8c363c751882462
[]
no_license
julioizidoro/jgdynamic
52464107c48c43708eb91637ee82dad7d321bc89
11735a498712f902409688d30963a79a7c990c9d
refs/heads/master
2020-04-12T01:33:54.980169
2019-04-25T18:54:38
2019-04-25T18:54:38
30,019,734
0
0
null
null
null
null
UTF-8
Java
false
false
3,160
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package telas.NotaSaida; import Regras.Formatacao; import java.util.List; import javax.swing.table.AbstractTableModel; /** * * @author wolverine */ public class ListaProdutoSaidaBeanTableModel extends AbstractTableModel{ private List<NotaSaidaProdutoBean> listaProdutoBean; private String[] colunas ={"Código", "Descrição", "Unidade", "NCM", "CEST", "Quantidade", "Valor Unitário", "Valor Total", "Valor Desconto", "Valor Outros" ,"Situação"}; public ListaProdutoSaidaBeanTableModel(List<NotaSaidaProdutoBean> listaProdutoBean) { this.listaProdutoBean = listaProdutoBean; } public int getRowCount() { return listaProdutoBean.size(); } public int getColumnCount() { return colunas.length; } public Object getValueAt(int rowIndex, int columnIndex) { if (columnIndex==0){ return listaProdutoBean.get(rowIndex).getProduto().getReferencia(); }else if (columnIndex==1){ return listaProdutoBean.get(rowIndex).getProduto().getDescricao(); }else if (columnIndex==2){ return listaProdutoBean.get(rowIndex).getProduto().getUnidade(); }else if (columnIndex==3){ return listaProdutoBean.get(rowIndex).getProduto().getNcm(); }else if (columnIndex==4){ return listaProdutoBean.get(rowIndex).getProduto().getCest(); }else if (columnIndex==5){ return Formatacao.foramtarQuantidade(listaProdutoBean.get(rowIndex).getQuantidade()); }else if (columnIndex==6){ return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValorUnitario()); }else if (columnIndex==7){ return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValortotal()); }else if (columnIndex==8){ return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValorDesconto()); }else if (columnIndex==9){ return Formatacao.foramtarDoubleString(listaProdutoBean.get(rowIndex).getValoracessorios()); }else return listaProdutoBean.get(rowIndex).getSituacao(); } @Override public String getColumnName(int column) { return colunas[column]; } @Override public Class<?> getColumnClass(int columnIndex) { if (columnIndex==0){ return Integer.class; } else if (columnIndex==1){ return String.class; }else if (columnIndex==2){ return String.class; }else if (columnIndex==3){ return String.class; }else if (columnIndex==4){ return String.class; }else if (columnIndex==5){ return String.class; }else if (columnIndex==6){ return String.class; }else if (columnIndex==7){ return String.class; }else if (columnIndex==8){ return String.class; }else return String.class; } }
[ "jizidoro@globo.com" ]
jizidoro@globo.com
a171abad5bdaf7027b677b7f1f0813db3450003f
42b1be27b8a196865620c3a84592f62fc5661fe1
/cloud-provider-payment-8001/src/main/java/cn/zzf/spring/cloud/payment/mapper/PaymentMapper.java
c1032f2d31645e568725a130c73ba5fd98960d10
[]
no_license
ZGAOF/spring-cloud-2020
d6e4b1d96e1c51ac3ed5a47e4f7b04690bc8968f
b5588c65ee444043e7200efb4bb9384b1e5f7eac
refs/heads/master
2023-01-11T09:50:21.413305
2020-11-18T04:15:33
2020-11-18T04:15:33
313,794,524
0
0
null
null
null
null
UTF-8
Java
false
false
251
java
package cn.zzf.spring.cloud.payment.mapper; import cn.zzf.spring.cloud.entity.Payment; import org.apache.ibatis.annotations.Mapper; @Mapper public interface PaymentMapper { int create(Payment payment); Payment selectPaymentById(Long id); }
[ "1520061084@qq.com" ]
1520061084@qq.com
1f1834034ea578d4b1bf821112c645eb723f4359
b1a102037f6a6e82285097f006bab55d58679936
/app/src/main/java/io/github/mcvlaga/sunshine/MainActivity.java
38b199317e3d5210b55265bb648b5b61ca75f34f
[]
no_license
McVlaga/sunshine
c246081f50b1b705ed6c3e1ebb3e22cc74c03559
33a3cf03690952214740c23fded8aea0fea44f38
refs/heads/master
2021-01-10T16:16:59.098247
2016-01-15T08:27:37
2016-01-15T08:27:37
45,015,157
1
0
null
null
null
null
UTF-8
Java
false
false
2,197
java
package io.github.mcvlaga.sunshine; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { Intent intent = new Intent(this, SettingsActivity.class); startActivity(intent); return true; } else if (id == R.id.action_location) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); String zipCode = preferences.getString(getResources().getString(R.string.pref_zipcode_key), getResources().getString(R.string.pref_zipcode_stcharles)); String address = "http://maps.google.co.in/maps?q=" + zipCode; Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(address)); // Verify that the intent will resolve to an activity if (intent.resolveActivity(getPackageManager()) != null) { startActivity(intent); } } return super.onOptionsItemSelected(item); } }
[ "ata.benzona94@hotmail.com" ]
ata.benzona94@hotmail.com
60ed6412241139ef8f597159cd66b1efe778ec9f
d9ea42be39a8078db52e09274d8013998011d8e1
/xc-auth/xc-auth-api/src/main/java/com/chenyu/cloud/auth/dto/UserPasswordDto.java
519b888917687583c225a1bd9b72a76f06e41244
[]
no_license
cyuaa/xc-cloud
3cb9ab0576c8db2372dc96b0348a16c2a7c24321
511a7e090bd501ebac7b197b71f8110f44d97c04
refs/heads/master
2023-04-20T05:22:44.480231
2021-05-13T09:13:31
2021-05-13T09:13:31
357,454,955
0
0
null
null
null
null
UTF-8
Java
false
false
722
java
package com.chenyu.cloud.auth.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.Setter; import javax.validation.constraints.NotEmpty; /** * 修改用户名密码参数 * Created by JackyChen on 2021/4/28. */ @Getter @Setter public class UserPasswordDto { @ApiModelProperty(value = "用户名", required = true) @NotEmpty(message = "用户名不能为空") private String username; @ApiModelProperty(value = "旧密码", required = true) @NotEmpty(message = "旧密码不能为空") private String oldPassword; @ApiModelProperty(value = "新密码", required = true) @NotEmpty(message = "新密码不能为空") private String newPassword; }
[ "275518941@qq.com" ]
275518941@qq.com
e80c276c25c136fde3c3880191ef7b5b1f8eee0a
f538a4f3bcf7a2c9c93c155141777065157947c8
/spliffy-server/src/main/java/org/spliffy/server/web/sharing/SharesFolder.java
57e33554d00f1516b5e6ba4911325e6f1eeb69a1
[]
no_license
nabilshams/spliffy
d638ce63f1610d455087dcbe0e5f22e9a08c3192
3ad26f0f9e9c9fe68d30303a2f8c818c00a97af3
refs/heads/master
2021-01-17T22:18:30.396874
2012-04-27T12:11:06
2012-04-27T12:11:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,376
java
package org.spliffy.server.web.sharing; import com.bradmcevoy.http.CollectionResource; import com.bradmcevoy.http.Resource; import com.bradmcevoy.http.exceptions.BadRequestException; import com.bradmcevoy.http.exceptions.NotAuthorizedException; import com.ettrema.http.acl.Principal; import java.util.Date; import java.util.List; import java.util.Map; import java.util.UUID; import org.spliffy.server.db.BaseEntity; import org.spliffy.server.db.Link; import org.spliffy.server.db.SessionManager; import org.spliffy.server.db.User; import org.spliffy.server.web.AbstractResource; import org.spliffy.server.web.Services; import org.spliffy.server.web.SpliffyCollectionResource; /** * * @author brad */ public class SharesFolder extends AbstractResource implements CollectionResource{ private final String name; private final SpliffyCollectionResource parent; public SharesFolder(String name, SpliffyCollectionResource parent) { super(parent.getServices()); this.name = name; this.parent = parent; } @Override public boolean isDir() { return false; } @Override public SpliffyCollectionResource getParent() { return parent; } @Override public BaseEntity getOwner() { return null; } @Override public void addPrivs(List<Priviledge> list, User user) { } @Override public String getName() { return name; } @Override public Date getModifiedDate() { return null; } @Override public Date getCreateDate() { return null; } @Override public Resource child(String childName) throws NotAuthorizedException, BadRequestException { UUID id; try { id = UUID.fromString(childName); } catch (Exception e) { return null; // not a UUID } Link link = Link.get(id, SessionManager.session()); if( link == null) { return null; } return new ShareResource(link, parent); } @Override public List<? extends Resource> getChildren() throws NotAuthorizedException, BadRequestException { throw new UnsupportedOperationException("Not supported yet."); } @Override public Map<Principal, List<Priviledge>> getAccessControlList() { return null; } }
[ "brad@mcevoysoftware.co.nz" ]
brad@mcevoysoftware.co.nz
30333302a2e99e12ee212fea827f4e5ffdb66ffd
9f8e15acd808f605db4da6d9c316fea8a8ddc1d4
/Servlets and Jsp/Lab 3 - forward/src/main/java/iti/gov/hadeer/SendRedirect.java
5345212e133f2d6aadc52e2a2c2b6b7f885b719b
[]
no_license
hadeerelnaggar/ITI-Web-Javaee-Labs
f73ba5023ec35d60af49caa61986984a64e5e058
750b24ff35b620b17b572d78d1bcd16d1dbdb8a5
refs/heads/master
2023-04-14T04:41:23.378794
2021-05-10T14:03:55
2021-05-10T14:03:55
366,055,531
0
0
null
null
null
null
UTF-8
Java
false
false
1,542
java
package iti.gov.hadeer; import jakarta.servlet.*; import java.io.*; import jakarta.servlet.http.*; import java.util.*; import java.sql.*; import java.sql.Connection; import java.sql.SQLException; import javax.naming.*; import javax.sql.*; import javax.sql.DataSource; public class SendRedirect extends HttpServlet{ public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<body>"); RequestDispatcher rd = request.getRequestDispatcher("login"); rd.include(request, response); } public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{ PrintWriter out = response.getWriter(); String userName = request.getParameter("userName"); String password = request.getParameter("password"); if(!userName.equals("") && !password.equals("")){ System.out.println("not null"); //response.sendRedirect("welcome?userName=" + userName + "&password=" + password); RequestDispatcher rd = request.getRequestDispatcher("welcome"); request.setAttribute("userName",userName); request.setAttribute("password",password); rd.forward(request, response); } else { System.out.println("null"); out.println("<html>"); out.println("<body>"); out.println("<h3 style=\"color: red\">Login Failed, please try again</h3>"); RequestDispatcher rd = request.getRequestDispatcher("login"); rd.include(request, response); } } }
[ "hadeerelnaggar@hotmail.com" ]
hadeerelnaggar@hotmail.com
524faebb173e39c8c07fb42007ff5655e806c916
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/quests/Q00365_DevilsLegacy/Q00365_DevilsLegacy.java
55ad11451bf2356d015dbc384494c77d085a61e3
[]
no_license
BETAJIb/ikol
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
f3709ea10be2d155b0bf1dee487f53c723f570cf
refs/heads/master
2021-01-05T10:37:17.831153
2019-12-24T22:23:02
2019-12-24T22:23:02
240,993,482
0
0
null
null
null
null
UTF-8
Java
false
false
6,058
java
/* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 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 quests.Q00365_DevilsLegacy; import java.util.HashMap; import java.util.Map; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.SkillHolder; import org.l2jmobius.gameserver.model.itemcontainer.Inventory; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; /** * Devil's Legacy (365) * @author Adry_85 */ public class Q00365_DevilsLegacy extends Quest { // NPCs private static final int COLLOB = 30092; private static final int RANDOLF = 30095; // Item private static final int PIRATES_TREASURE_CHEST = 5873; // Rewards private static final int ENCHANT_WEAPON_C = 951; private static final int ENCHANT_ARMOR_C = 952; private static final int ENCHANT_WEAPON_D = 955; private static final int ENCHANT_ARMOR_D = 956; private static final int THREAD = 1868; private static final int ANIMAL_BONE = 1872; private static final int COKES = 1879; private static final int STEEL = 1880; private static final int COARSE_BONE_POWDER = 1881; private static final int LEATHER = 1882; private static final int CORD = 1884; // Misc private static final int MIN_LEVEL = 39; // Skill private static SkillHolder POISON = new SkillHolder(4035, 2); // Mobs private static final Map<Integer, Double> MOBS = new HashMap<>(); static { MOBS.put(20836, 0.47); // pirates_zombie MOBS.put(20845, 0.40); // pirates_zombie_captain MOBS.put(21629, 0.40); // pirates_zombie_captain_1 MOBS.put(21630, 0.40); // pirates_zombie_captain_2 } public Q00365_DevilsLegacy() { super(365); addStartNpc(RANDOLF); addTalkId(RANDOLF, COLLOB); addKillId(MOBS.keySet()); registerQuestItems(PIRATES_TREASURE_CHEST); } @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { final QuestState qs = getQuestState(player, false); String htmltext = null; if (qs == null) { return htmltext; } switch (event) { case "30095-02.htm": { qs.startQuest(); qs.setMemoState(1); htmltext = event; break; } case "30095-05.html": { qs.exitQuest(true, true); htmltext = event; break; } case "30095-06.html": { htmltext = event; break; } case "REWARD": { if (!qs.isMemoState(1)) { htmltext = "30092-04.html"; } else if (!hasQuestItems(player, PIRATES_TREASURE_CHEST)) { htmltext = "30092-02.html"; } else if (player.getAdena() < 600) { htmltext = "30092-03.html"; } else { final int itemId; final int chance; if (getRandom(100) < 80) { chance = getRandom(100); if (chance < 1) { itemId = ENCHANT_WEAPON_D; } else if (chance < 4) { itemId = ENCHANT_ARMOR_D; } else if (chance < 36) { itemId = THREAD; } else if (chance < 68) { itemId = CORD; } else { itemId = ANIMAL_BONE; } htmltext = "30092-05.html"; } else { chance = getRandom(1000); if (chance < 10) { itemId = ENCHANT_WEAPON_C; } else if (chance < 40) { itemId = ENCHANT_ARMOR_C; } else if (chance < 60) { itemId = ENCHANT_WEAPON_D; } else if (chance < 260) { itemId = ENCHANT_ARMOR_D; } else if (chance < 445) { itemId = COKES; } else if (chance < 630) { itemId = STEEL; } else if (chance < 815) { itemId = LEATHER; } else { itemId = COARSE_BONE_POWDER; } npc.setTarget(player); npc.doCast(POISON.getSkill()); npc.setCurrentMp(npc.getMaxMp()); qs.setMemoState(2); htmltext = "30092-06.html"; } takeItems(player, PIRATES_TREASURE_CHEST, 1); takeItems(player, Inventory.ADENA_ID, 600); rewardItems(player, itemId, 1); } break; } } return htmltext; } @Override public String onKill(Npc npc, PlayerInstance player, boolean isSummon) { final QuestState qs = getRandomPartyMemberState(player, -1, 3, npc); if (qs != null) { giveItemRandomly(qs.getPlayer(), npc, PIRATES_TREASURE_CHEST, 1, 0, MOBS.get(npc.getId()), true); } return super.onKill(npc, player, isSummon); } @Override public String onTalk(Npc npc, PlayerInstance player) { final QuestState qs = getQuestState(player, true); String htmltext = getNoQuestMsg(player); switch (npc.getId()) { case RANDOLF: { if (qs.isCreated()) { htmltext = ((player.getLevel() >= MIN_LEVEL) ? "30095-01.htm" : "30095-03.html"); } else if (qs.isStarted()) { if (hasQuestItems(player, PIRATES_TREASURE_CHEST)) { final long chestCount = getQuestItemsCount(player, PIRATES_TREASURE_CHEST); giveAdena(player, (chestCount * 400) + 19800, true); takeItems(player, PIRATES_TREASURE_CHEST, -1); htmltext = "30095-04.html"; } else { htmltext = "30095-07.html"; } } break; } case COLLOB: { if (qs.isStarted()) { htmltext = (qs.isMemoState(1) ? "30092-01.html" : "30092-07.html"); } break; } } return htmltext; } }
[ "mobius@cyber-wizard.com" ]
mobius@cyber-wizard.com
5075447ab477c5d1a867cc92dca7563b01083c6b
11833e305deb826dca0c55ca9a0e731fee8f76f7
/src/com/appbegin/MainService.java
1bf90dbf1d731927d0682470804d5fe4950dee3a
[]
no_license
RAGHAVNAIDU/MYTELE
f211c05c24e81785eac74d70e48422384f31f8fd
c0b422e76a303438be1487fbfeb3d6e2979092fa
refs/heads/master
2016-09-06T05:12:33.468393
2012-07-03T05:25:25
2012-07-03T05:25:25
38,572,696
0
0
null
null
null
null
UTF-8
Java
false
false
17,260
java
package com.appbegin; import java.io.IOException; import com.ibm.mqtt.IMqttClient; import com.ibm.mqtt.MqttClient; import com.ibm.mqtt.MqttException; import com.ibm.mqtt.MqttPersistence; import com.ibm.mqtt.MqttPersistenceException; import com.ibm.mqtt.MqttSimpleCallback; import android.app.AlarmManager; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.IBinder; import android.util.Log; /* * PushService that does all of the work. * Most of the logic is borrowed from KeepAliveService. * http://code.google.com/p/android-random/source/browse/trunk/TestKeepAlive/src/org/devtcg/demo/keepalive/KeepAliveService.java?r=219 */ public class MainService extends Service { // this is the log tag public static final String TAG = "MainPushService"; // the IP address, where your MQTT broker is running. private static final String MQTT_HOST = "push.appbegin.com"; // the port at which the broker is running. private static int MQTT_BROKER_PORT_NUM = 1883; // Let's not use the MQTT persistence. private static MqttPersistence MQTT_PERSISTENCE = null; // We don't need to remember any state between the connections, so we use a clean start. private static boolean MQTT_CLEAN_START = true; // Let's set the internal keep alive for MQTT to 15 mins. I haven't tested this value much. It could probably be increased. private static short MQTT_KEEP_ALIVE = 60 * 15; // Set quality of services to 0 (at most once delivery), since we don't want push notifications // arrive more than once. However, this means that some messages might get lost (delivery is not guaranteed) private static int[] MQTT_QUALITIES_OF_SERVICE = { 0 } ; private static int MQTT_QUALITY_OF_SERVICE = 0; // The broker should not retain any messages. private static boolean MQTT_RETAINED_PUBLISH = false; // MQTT client ID, which is given the broker. In this example, I also use this for the topic header. // You can use this to run push notifications for multiple apps with one MQTT broker. public static String MQTT_CLIENT_ID = "appbegin"; // These are the actions for the service (name are descriptive enough) private static final String ACTION_START = MQTT_CLIENT_ID + ".START"; private static final String ACTION_STOP = MQTT_CLIENT_ID + ".STOP"; private static final String ACTION_KEEPALIVE = MQTT_CLIENT_ID + ".KEEP_ALIVE"; private static final String ACTION_RECONNECT = MQTT_CLIENT_ID + ".RECONNECT"; // Connection log for the push service. Good for debugging. private ConnectionLog mLog; // Connectivity manager to determining, when the phone loses connection private ConnectivityManager mConnMan; // Notification manager to displaying arrived push notifications private NotificationManager mNotifMan; // Whether or not the service has been started. private boolean mStarted; // This the application level keep-alive interval, that is used by the AlarmManager // to keep the connection active, even when the device goes to sleep. private static final long KEEP_ALIVE_INTERVAL = 1000 * 60 * 28; // Retry intervals, when the connection is lost. private static final long INITIAL_RETRY_INTERVAL = 1000 * 10; private static final long MAXIMUM_RETRY_INTERVAL = 1000 * 60 * 30; // Preferences instance private SharedPreferences mPrefs; // We store in the preferences, whether or not the service has been started public static final String PREF_STARTED = "isStarted"; // We also store the deviceID (target) public static final String PREF_DEVICE_ID = "deviceID"; // We store the last retry interval public static final String PREF_RETRY = "retryInterval"; // Notification title public static String NOTIF_TITLE = "Appbegin Push Demo"; // Notification id private static final int NOTIF_CONNECTED = 0; // This is the instance of an MQTT connection. private MQTTConnection mConnection; private long mStartTime; public static String deviceID ; public static void setDeviceID(String id) { deviceID = id; } // Static method to start the service public static void actionStart(Context ctx) { Intent i = new Intent(ctx, MainService.class); i.setAction(ACTION_START); ctx.startService(i); } // Static method to stop the service public static void actionStop(Context ctx) { Intent i = new Intent(ctx, MainService.class); i.setAction(ACTION_STOP); ctx.startService(i); } // Static method to send a keep alive message public static void actionPing(Context ctx) { Intent i = new Intent(ctx, MainService.class); i.setAction(ACTION_KEEPALIVE); ctx.startService(i); } @Override public void onCreate() { super.onCreate(); log("Creating service"); mStartTime = System.currentTimeMillis(); try { mLog = new ConnectionLog(); Log.i(TAG, "Opened log at " + mLog.getPath()); } catch (IOException e) { Log.e(TAG, "Failed to open log", e); } // Get instances of preferences, connectivity manager and notification manager mPrefs = getSharedPreferences(TAG, MODE_PRIVATE); mConnMan = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE); mNotifMan = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); /* If our process was reaped by the system for any reason we need * to restore our state with merely a call to onCreate. We record * the last "started" value and restore it here if necessary. */ handleCrashedService(); } // This method does any necessary clean-up need in case the server has been destroyed by the system // and then restarted private void handleCrashedService() { if (wasStarted() == true) { log("Handling crashed service..."); // stop the keep alives stopKeepAlives(); // Do a clean start start(); } } @Override public void onDestroy() { log("Service destroyed (started=" + mStarted + ")"); // Stop the services, if it has been started if (mStarted == true) { stop(); } try { if (mLog != null) mLog.close(); } catch (IOException e) {} } @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); log("Service started with intent=" + intent); // Do an appropriate action based on the intent. if (intent.getAction().equals(ACTION_STOP) == true) { stop(); stopSelf(); } else if (intent.getAction().equals(ACTION_START) == true) { start(); } else if (intent.getAction().equals(ACTION_KEEPALIVE) == true) { keepAlive(); } else if (intent.getAction().equals(ACTION_RECONNECT) == true) { if (isNetworkAvailable()) { reconnectIfNecessary(); } } } @Override public IBinder onBind(Intent intent) { return null; } // log helper function private void log(String message) { log(message, null); } private void log(String message, Throwable e) { if (e != null) { Log.e(TAG, message, e); } else { Log.i(TAG, message); } if (mLog != null) { try { mLog.println(message); } catch (IOException ex) {} } } // Reads whether or not the service has been started from the preferences private boolean wasStarted() { return mPrefs.getBoolean(PREF_STARTED, false); } // Sets whether or not the services has been started in the preferences. private void setStarted(boolean started) { mPrefs.edit().putBoolean(PREF_STARTED, started).commit(); mStarted = started; } private synchronized void start() { log("Starting service..."); // Do nothing, if the service is already running. if (mStarted == true) { Log.w(TAG, "Attempt to start connection that is already active"); return; } // Establish an MQTT connection connect(); // Register a connectivity listener registerReceiver(mConnectivityChanged, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); } private synchronized void stop() { // Do nothing, if the service is not running. if (mStarted == false) { Log.w(TAG, "Attempt to stop connection not active."); return; } // Save stopped state in the preferences setStarted(false); // Remove the connectivity receiver unregisterReceiver(mConnectivityChanged); // Any existing reconnect timers should be removed, since we explicitly stopping the service. cancelReconnect(); // Destroy the MQTT connection if there is one if (mConnection != null) { mConnection.disconnect(); mConnection = null; } } // private synchronized void connect() { log("Connecting..."); // fetch the device ID from the preferences. //String deviceID = mPrefs.getString(PREF_DEVICE_ID, null); // Create a new connection only if the device id is not NULL if (deviceID == null) { log("Device ID not found."); } else { try { mConnection = new MQTTConnection(MQTT_HOST, deviceID); } catch (MqttException e) { // Schedule a reconnect, if we failed to connect log("MqttException: " + (e.getMessage() != null ? e.getMessage() : "NULL")); if (isNetworkAvailable()) { scheduleReconnect(mStartTime); } } setStarted(true); } } private synchronized void keepAlive() { try { // Send a keep alive, if there is a connection. if (mStarted == true && mConnection != null) { mConnection.sendKeepAlive(); } } catch (MqttException e) { log("MqttException: " + (e.getMessage() != null? e.getMessage(): "NULL"), e); mConnection.disconnect(); mConnection = null; cancelReconnect(); } } // Schedule application level keep-alives using the AlarmManager private void startKeepAlives() { Intent i = new Intent(); i.setClass(this, MainService.class); i.setAction(ACTION_KEEPALIVE); PendingIntent pi = PendingIntent.getService(this, 0, i, 0); AlarmManager alarmMgr = (AlarmManager)getSystemService(ALARM_SERVICE); alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + KEEP_ALIVE_INTERVAL, KEEP_ALIVE_INTERVAL, pi); } // Remove all scheduled keep alives private void stopKeepAlives() { Intent i = new Intent(); i.setClass(this, MainService.class); i.setAction(ACTION_KEEPALIVE); PendingIntent pi = PendingIntent.getService(this, 0, i, 0); AlarmManager alarmMgr = (AlarmManager)getSystemService(ALARM_SERVICE); alarmMgr.cancel(pi); } // We schedule a reconnect based on the starttime of the service public void scheduleReconnect(long startTime) { // the last keep-alive interval long interval = mPrefs.getLong(PREF_RETRY, INITIAL_RETRY_INTERVAL); // Calculate the elapsed time since the start long now = System.currentTimeMillis(); long elapsed = now - startTime; // Set an appropriate interval based on the elapsed time since start if (elapsed < interval) { interval = Math.min(interval * 4, MAXIMUM_RETRY_INTERVAL); } else { interval = INITIAL_RETRY_INTERVAL; } log("Rescheduling connection in " + interval + "ms."); // Save the new internval mPrefs.edit().putLong(PREF_RETRY, interval).commit(); // Schedule a reconnect using the alarm manager. Intent i = new Intent(); i.setClass(this, MainService.class); i.setAction(ACTION_RECONNECT); PendingIntent pi = PendingIntent.getService(this, 0, i, 0); AlarmManager alarmMgr = (AlarmManager)getSystemService(ALARM_SERVICE); alarmMgr.set(AlarmManager.RTC_WAKEUP, now + interval, pi); } // Remove the scheduled reconnect public void cancelReconnect() { Intent i = new Intent(); i.setClass(this, MainService.class); i.setAction(ACTION_RECONNECT); PendingIntent pi = PendingIntent.getService(this, 0, i, 0); AlarmManager alarmMgr = (AlarmManager)getSystemService(ALARM_SERVICE); alarmMgr.cancel(pi); } private synchronized void reconnectIfNecessary() { if (mStarted == true && mConnection == null) { log("Reconnecting..."); connect(); } } // This receiver listeners for network changes and updates the MQTT connection // accordingly private BroadcastReceiver mConnectivityChanged = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // Get network info NetworkInfo info = (NetworkInfo)intent.getParcelableExtra (ConnectivityManager.EXTRA_NETWORK_INFO); // Is there connectivity? boolean hasConnectivity = (info != null && info.isConnected()) ? true : false; log("Connectivity changed: connected=" + hasConnectivity); if (hasConnectivity) { reconnectIfNecessary(); } else if (mConnection != null) { // if there no connectivity, make sure MQTT connection is destroyed mConnection.disconnect(); cancelReconnect(); mConnection = null; } } }; // Display the topbar notification private void showNotification(String text) { Notification n = new Notification(); n.flags |= Notification.FLAG_SHOW_LIGHTS; n.flags |= Notification.FLAG_AUTO_CANCEL; n.defaults = Notification.DEFAULT_ALL; n.icon = com.appbegin.R.drawable.icon; n.when = System.currentTimeMillis(); // Simply open the parent activity PendingIntent pi = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0); // Change the name of the notification here n.setLatestEventInfo(this, NOTIF_TITLE, text, pi); mNotifMan.notify(NOTIF_CONNECTED, n); } // Check if we are online private boolean isNetworkAvailable() { NetworkInfo info = mConnMan.getActiveNetworkInfo(); if (info == null) { return false; } return info.isConnected(); } // This inner class is a wrapper on top of MQTT client. private class MQTTConnection implements MqttSimpleCallback { IMqttClient mqttClient = null; // Creates a new connection given the broker address and initial topic public MQTTConnection(String brokerHostName, String initTopic) throws MqttException { // Create connection spec String mqttConnSpec = "tcp://" + brokerHostName + "@" + MQTT_BROKER_PORT_NUM; // Create the client and connect mqttClient = MqttClient.createMqttClient(mqttConnSpec, MQTT_PERSISTENCE); String clientID = MQTT_CLIENT_ID + "/" + mPrefs.getString(PREF_DEVICE_ID, ""); mqttClient.connect(clientID, MQTT_CLEAN_START, MQTT_KEEP_ALIVE); // register this client app has being able to receive messages mqttClient.registerSimpleHandler(this); // Subscribe to an initial topic, which is combination of client ID and device ID. initTopic = MQTT_CLIENT_ID + "/" + initTopic; subscribeToTopic(initTopic); log("Connection established to " + brokerHostName + " on topic " + initTopic); // Save start time mStartTime = System.currentTimeMillis(); // Star the keep-alives startKeepAlives(); } // Disconnect public void disconnect() { try { stopKeepAlives(); mqttClient.disconnect(); } catch (MqttPersistenceException e) { log("MqttException" + (e.getMessage() != null? e.getMessage():" NULL"), e); } } /* * Send a request to the message broker to be sent messages published with * the specified topic name. Wildcards are allowed. */ private void subscribeToTopic(String topicName) throws MqttException { if ((mqttClient == null) || (mqttClient.isConnected() == false)) { // quick sanity check - don't try and subscribe if we don't have // a connection log("Connection error" + "No connection"); } else { String[] topics = { topicName }; mqttClient.subscribe(topics, MQTT_QUALITIES_OF_SERVICE); } } /* * Sends a message to the message broker, requesting that it be published * to the specified topic. */ private void publishToTopic(String topicName, String message) throws MqttException { if ((mqttClient == null) || (mqttClient.isConnected() == false)) { // quick sanity check - don't try and publish if we don't have // a connection log("No connection to public to"); } else { mqttClient.publish(topicName, message.getBytes(), MQTT_QUALITY_OF_SERVICE, MQTT_RETAINED_PUBLISH); } } /* * Called if the application loses it's connection to the message broker. */ public void connectionLost() throws Exception { log("Loss of connection" + "connection downed"); stopKeepAlives(); // null itself mConnection = null; if (isNetworkAvailable() == true) { reconnectIfNecessary(); } } /* * Called when we receive a message from the message broker. */ public void publishArrived(String topicName, byte[] payload, int qos, boolean retained) { // Show a notification String s = new String(payload); showNotification(s); log("Got message: " + s); } public void sendKeepAlive() throws MqttException { log("Sending keep alive"); // publish to a keep-alive topic publishToTopic(MQTT_CLIENT_ID + "/keepalive", mPrefs.getString(PREF_DEVICE_ID, "")); } } }
[ "cnxiaoma@gmail.com" ]
cnxiaoma@gmail.com
248d0669eb57f7d67771e38f45d95f9e13911fd3
aed9a76e700affb78211a89db311fc88191ba9da
/js相关/SampleAndroidProject/src/com/phonegap/sample/MainActivity.java
b2db9723186dd4822df99e5e8bbb06d25f5856fd
[]
no_license
laiqurufeng/jidiao
52bd95707285c6bc81064237b3c33969081125ef
f934c6beaed3718269fa80915491afe2cfd96ff7
refs/heads/master
2021-01-23T19:13:12.108304
2016-03-30T02:58:57
2016-03-30T02:58:57
40,657,295
1
0
null
null
null
null
UTF-8
Java
false
false
2,404
java
package com.phonegap.sample; import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; import android.util.AttributeSet; import android.util.Log; import android.view.MenuItem; import android.view.View; import android.webkit.WebView; import com.splunk.mint.Mint; import com.splunk.mint.MintJavascript; import com.splunk.mint.MintWebView; import com.splunk.mint.MintWebViewClient; public class MainActivity extends Activity { public final static String TAG = "hope"; private WebView mWebView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { WebView.setWebContentsDebuggingEnabled(true); } Mint.initAndStartSession(this, "f091edc8"); setContentView(R.layout.main_webview); } @Override protected void onStart() { super.onStart(); mWebView = (WebView) findViewById(R.id.wv_demo); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.setWebViewClient(new NBSWebViewClient(this, null)); // MintJavascript mintJavascript = new MintJavascript(this, mWebView); // NBSJavascript javascript = new NBSJavascript(this, mWebView); CritterJSInterface javascript = new CritterJSInterface(); mWebView.addJavascriptInterface(javascript, "_crttr"); // // UTester.instrumentWebViewNew(this, mWebView); // instrumentWebView(this, mWebView); // mWebView.getSettings().setJavaScriptEnabled(true); // super.loadUrl("file:///android_asset/www/index.html"); mWebView.loadUrl("file:///android_asset/www/index.html"); // mWebView.loadUrl("http://www.sina.com.cn/"); // try{ // Thread.sleep(1500); // //Thread.sleep(1500); // }catch (InterruptedException in){ // Log.e(MainActivity.TAG, "sleep"); // } // // instrumentWebView(this, mWebView); } @Override protected void onResume() { super.onResume(); try{ Thread.sleep(1500); //Thread.sleep(1500); }catch (InterruptedException in){ Log.e(MainActivity.TAG, "sleep"); } // UTester.instrumentWebView(this, mWebView); // instrumentWebView(this, mWebView); } }
[ "3124692@163.com" ]
3124692@163.com
d7c7d2e764510f5ece7c09f0ab92afd4cd12f20d
d6e937c0526d90d41d22b2e31bd05da290447f2c
/src/main/java/com/biblioteca/exception/InvalidItemException.java
afbc0e5e56256910abd50765b1761dd896b08153
[]
no_license
prachi-kr/biblioteca
4f166da96caaa6d66a624bda7484774c2bb7c1e8
ee08f5921b011e421a87157ee6037e74a7504c57
refs/heads/master
2021-09-16T09:17:00.955460
2018-06-18T18:17:49
2018-06-18T18:17:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
220
java
package com.biblioteca.exception; public class InvalidItemException extends RuntimeException { public InvalidItemException(String bookId) { super("Item id - " + bookId + ", is an invalid BookId"); } }
[ "prachigpt18@yahoo.com" ]
prachigpt18@yahoo.com
353e4d80b1aa7bd9c1d296cea36ea03c88dc4672
ea4a4a70ca7e7396053d90d52c0c141d86b3ec16
/src/main/java/com/loniks/letsgo/domain/TicketEntity.java
1e524a1b562d488a20e8695bdd03d2a06b470de8
[ "Apache-2.0" ]
permissive
Loniks/LetsGo
97d19a2d073c53406a98759f2865463928b3193e
9a8f6906c2c641ce40f7727d8958aa0c09c82087
refs/heads/master
2023-04-30T14:11:24.109150
2020-11-25T19:50:12
2020-11-25T19:50:12
79,941,686
0
1
Apache-2.0
2023-04-17T20:58:18
2017-01-24T18:39:29
JavaScript
UTF-8
Java
false
false
820
java
package com.loniks.letsgo.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; import javax.persistence.*; /** * @author Bondar Dmytro */ @Data @Entity @Table(name = "tickets") @AllArgsConstructor @NoArgsConstructor public class TicketEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name="status") @Enumerated(EnumType.STRING) private TicketStatus status; @ManyToOne @OnDelete(action = OnDeleteAction.CASCADE) @JoinColumn(name = "owner") private VisitorEntity owner; @ManyToOne @OnDelete(action = OnDeleteAction.CASCADE) @JoinColumn(name = "event") private EventEntity event; }
[ "work.bondar@gmail.com" ]
work.bondar@gmail.com
bcef0e11db3261ab0b886ebd91962c4e5c8a8547
a75d31d3a2466bc92233f7494adf503a79de05ce
/src/main/java/org/mifos/ussd/MifosUssdApplication.java
428ffc29439a56cb7f44330a034d5909b29231a5
[]
no_license
openMF/ussd-app
b5ad71a92e2014c97713091188ac3b8907dad192
9fc6b8e44b0212cd01355aecc45db7821cab22e1
refs/heads/master
2022-07-12T14:42:23.932699
2020-07-12T15:55:44
2020-07-12T15:55:44
78,035,460
5
16
null
2020-05-15T02:24:27
2017-01-04T17:02:51
Java
UTF-8
Java
false
false
325
java
package org.mifos.ussd; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MifosUssdApplication { public static void main(String[] args) { SpringApplication.run(MifosUssdApplication.class, args); } }
[ "antony.omeri@dtone.com" ]
antony.omeri@dtone.com
eb7fe368cd48b3f710d462b06d2548c75c4af325
fb723603cce3fd93a7ae7bcf0a94839cddea331c
/src/uo/ri/ui/admin/action/ListMechanicsAction.java
05f71a9dc09fb9a390e7fcd6468dbe24beb08f3f
[]
no_license
robertofd1995/RI-JDBC
43c1db0698b7a1922115bc236d49ba8e82882b31
8130d6e62493f92607ec070cad9388c10d0cd255
refs/heads/master
2020-04-15T23:15:12.350614
2016-06-27T03:59:28
2016-06-27T03:59:28
61,814,905
0
0
null
null
null
null
UTF-8
Java
false
false
939
java
package uo.ri.ui.admin.action; import java.util.List; import java.util.Map; import uo.ri.business.AdminService; import uo.ri.common.BusinessException; import uo.ri.conf.ServicesFactory; import alb.util.console.Console; import alb.util.menu.Action; public class ListMechanicsAction implements Action { @Override public void execute() throws BusinessException { Console.println("\nListado de mecánicos\n"); AdminService adminService=ServicesFactory.getAdminService(); List<Map<String,Object>> lista=adminService.listMechanic(); for (int i = 0; i < lista.size(); i++) { long id=(long)lista.get(i).get("id"); String nombre=(String)lista.get(i).get("nombre"); String apellido=(String)lista.get(i).get("apellido"); StringBuilder str=new StringBuilder(); str.append(id+","); str.append(nombre+","); str.append(apellido+"\n"); System.out.println(str.toString()); } } }
[ "robertofd1995@gmail.com" ]
robertofd1995@gmail.com
ba76695a649be616b1337912febc162ab96e53d8
f860e709ba232caffe4f8f77bfa9d7c91822df3b
/src/java/controller/Hanggiuacontroller.java
d10ca2986957b2fecf1d3bae50c3463cdfdb1f0f
[]
no_license
theanhhp/asm_Front-End-Frameworks
cbde4ce82ef31687ded57eac94400d4c5747d3da
2ef548530c7fc186ede20f4797e65b91a57f500b
refs/heads/master
2020-06-06T07:13:16.459868
2019-06-19T06:52:53
2019-06-19T06:52:53
192,674,682
0
0
null
null
null
null
UTF-8
Java
false
false
3,980
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 controller; import entity.Hanggiua; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; /** * * @author trant */ @Transactional @Controller @RequestMapping("/Hanggiua") public class Hanggiuacontroller { @Autowired SessionFactory factory; @RequestMapping() public String index(ModelMap model) { model.addAttribute("Hanggiua", new Hanggiua()); model.addAttribute("Hanggiuas", getHanggiua()); return "Hanggiua"; } @RequestMapping(params = "btnInsert") public String insert(ModelMap model, @ModelAttribute("Hanggiua") Hanggiua Hanggiua , Integer id) { Session session = factory.openSession(); Transaction t = session.beginTransaction(); try { if (id < 8) { session.save(Hanggiua); t.commit(); model.addAttribute("message", "Thêm mới thành công !"); } else { t.rollback(); model.addAttribute("message", "Thêm mới thất bại !"); } } catch (Exception e) { e.printStackTrace(); } finally { session.close(); } model.addAttribute("Hanggiuas", getHanggiua()); return "Hanggiua"; } @RequestMapping(params = "btnUpdate") public String update(ModelMap model, @ModelAttribute("Hanggiua") Hanggiua Hanggiua) { Session session = factory.openSession(); Transaction t = session.beginTransaction(); try { session.update(Hanggiua); t.commit(); model.addAttribute("message", "Cập nhật thành công !"); } catch (Exception e) { t.rollback(); model.addAttribute("message", "Cập nhật thành công !"); } finally { session.close(); } model.addAttribute("Hanggiuas", getHanggiua()); return "Hanggiua"; } @RequestMapping(params = "btnDelete") public String delete(ModelMap model, Hanggiua Hanggiua) { Session session = factory.openSession(); Transaction t = session.beginTransaction(); try { session.delete(Hanggiua); t.commit(); model.addAttribute("message", "Xóa thành công !"); } catch (Exception e) { t.rollback(); model.addAttribute("message", "Xóa thất bại !"); } finally { session.close(); } model.addAttribute("Hanggiua", new Hanggiua()); model.addAttribute("Hanggiuas", getHanggiua()); return "Hanggiua"; } @RequestMapping("{id}") public String edit(ModelMap model, @PathVariable("id") Integer id) { Session session = factory.openSession(); Hanggiua Hanggiua = (Hanggiua) session.get(Hanggiua.class, id); model.addAttribute("Hanggiua", Hanggiua); model.addAttribute("Hanggiuas", getHanggiua()); return "Hanggiua"; } @ModelAttribute("Hanggiuas") @SuppressWarnings("unchecked") public List<Hanggiua> getHanggiua() { Session session = factory.openSession(); String hql = "FROM Hanggiua"; Query query = session.createQuery(hql); List<Hanggiua> list = query.list(); return list; } }
[ "=" ]
=
8c3d3c567dfb2f651179f1f1a82527b8cb92971f
be55285edbca96a3cdcf1c945e4363aa8455f15e
/src/main/java/co/iay/leetcode/Tester/Easy/TestConvertANumberToHexadecimal.java
06757bef013489ac21f4150987ce040560c776e8
[]
no_license
liaoaoyang/LeetCode
03ce3ddfdf55968f719c857bc9f42f0cdd40e20f
338f8137c3223b4f1d73b9b96f85637ea54975f9
refs/heads/master
2021-01-16T23:41:42.275307
2019-04-25T00:05:16
2019-04-25T00:05:16
55,667,787
1
0
null
null
null
null
UTF-8
Java
false
false
1,323
java
package co.iay.leetcode.Tester.Easy; import co.iay.leetcode.Easy.ConvertANumberToHexadecimal; import org.junit.Assert; import org.junit.Test; /** * Created by ng on 16/10/1. */ public class TestConvertANumberToHexadecimal { private ConvertANumberToHexadecimal c = new ConvertANumberToHexadecimal(); @Test public void testTestConvertANumberToHexadecimalCase1() { Assert.assertEquals("1", c.toHex(1)); } @Test public void testTestConvertANumberToHexadecimalCase2() { Assert.assertEquals("a", c.toHex(10)); } @Test public void testTestConvertANumberToHexadecimalCase3() { Assert.assertEquals("b", c.toHex(11)); } @Test public void testTestConvertANumberToHexadecimalCase4() { Assert.assertEquals("1a", c.toHex(26)); } @Test public void testTestConvertANumberToHexadecimalCase5() { Assert.assertEquals("ffffffff", c.toHex(-1)); } @Test public void testTestConvertANumberToHexadecimalCase6() { Assert.assertEquals("fffffffe", c.toHex(-2)); } @Test public void testTestConvertANumberToHexadecimalCase7() { Assert.assertEquals("10", c.toHex(16)); } @Test public void testTestConvertANumberToHexadecimalCase8() { Assert.assertEquals("0", c.toHex(0)); } }
[ "liaoaoyang@gmail.com" ]
liaoaoyang@gmail.com
e71b1c51f6bb29fe3d0ccf3770cd659451a554ef
334b8028bc22989212da33159a8434227f30cb1b
/src/salary/org/jsoft/salary/dao/impl/SalaryDAO.java
822caa90455708db3180995d077fc2d3aeb43a45
[]
no_license
dongyating/personnel19
0be434650c53e5516f53fa90d1975fa65bb505a7
e863421f37c93b7db66fd09d1457db049db533b0
refs/heads/master
2021-05-28T20:50:53.230134
2015-03-18T19:29:00
2015-03-18T19:29:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,673
java
package org.jsoft.salary.dao.impl; import java.util.ArrayList; import java.util.List; import org.jsoft.comm.dao.impl.BaseDAO; import org.jsoft.comm.vo.Bak; import org.jsoft.comm.vo.DeptJobRel; import org.jsoft.comm.vo.PageDivid; import org.jsoft.comm.vo.Salary; import org.jsoft.salary.dao.ISalaryDAO; public class SalaryDAO extends BaseDAO<Object> implements ISalaryDAO { @Override public Salary querySalary(String salaryId) { String hql = "from Salary where salaryId = " + salaryId; List<Object> list = find(hql); Salary salary = (Salary) list.get(0); return salary; } @Override public void updateSalary(Salary salary) { update(salary); } @Override public DeptJobRel queryDeptJobRel(String jobid, String deptid) { // TODO Auto-generated method stub String hql = "from DeptJobRel where department.departmentId=? and job.jobId=? "; List<Object> paraments = new ArrayList<Object>(); paraments.add(jobid); paraments.add(deptid); List<Object> list = find(hql, paraments); DeptJobRel d = (DeptJobRel) list.get(0); return d; } @Override public int AllCount() { String hql = "select count(*) From DeptJobRel where isDelete=?"; List<Object> paraments = new ArrayList<Object>(); paraments.add(0); int a = Integer.parseInt(count(hql, paraments) + ""); return a; // TODO Auto-generated method stub } public int AllCount2() { String hql = "select count(*) From DeptJobRel where isDelete=? and salary is null"; List<Object> paraments = new ArrayList<Object>(); paraments.add(0); int a = Integer.parseInt(count(hql, paraments) + ""); System.out.println("我要输出总页数了 a A AA A A "); System.out.println(a); return a; } @Override public List<DeptJobRel> queryAll(PageDivid pageDivid) { BaseDAO<DeptJobRel> base = new BaseDAO<DeptJobRel>(); String hql = "From DeptJobRel where isDelete=? and salary is not null"; List<Object> paraments = new ArrayList<Object>(); paraments.add(0); List<DeptJobRel> baks = base.find(hql, paraments, pageDivid); return baks; } @Override public void saveSalary(Salary salary) { save(salary); // TODO Auto-generated method stub } @Override public DeptJobRel queryDeptJobRelbyId(String DeptJobRelId) { // TODO Auto-generated method stub String hql = "from DeptJobRel where deptJobRelId =" + DeptJobRelId; return (DeptJobRel) (find(hql).get(0)); } public static void main(String[] args) { SalaryDAO sa = new SalaryDAO(); DeptJobRel d = sa.queryDeptJobRelbyId("2"); System.out.println(d.getJob().getJobName()); } }
[ "franksnolf@hotmail.com" ]
franksnolf@hotmail.com
3436ceb4860bd032e99ee5b899a041adf7b86d22
a3c11f233154c78fdd71aaa958dd6dffce281019
/src/com/company/MyRunnable.java
3d3982b29837cb1b13ac73a72d056b1acd65e05d
[]
no_license
matheusmig/MyFirstJavaCode
3662914d4fd7913e83ee3666414206e679333242
88c9df255728a3b8b6f6ba22aedf176774c6f49f
refs/heads/master
2021-09-04T10:25:10.431742
2018-01-18T00:58:35
2018-01-18T00:58:35
112,982,704
0
0
null
null
null
null
UTF-8
Java
false
false
433
java
package com.company; /** * Created by mmignoni on 2017-11-09. * * Implementa thread através de "implements Runanble" */ public class MyRunnable implements Runnable { String strName; //Nome da thread MyRunnable(String strName) { this.strName = strName; } public void run() { for(int x = 0; x < 100; x = x + 1) { System.out.println("I'm "+this.strName+" Thread"); } } }
[ "matheus.mignoni@gmail.com" ]
matheus.mignoni@gmail.com
7e759d99f192e2c98e02ad7a89eec546e813cfd7
44e082b233a2e44212422514fa9225cf1b6358d2
/GPROG_oldPruefungen/src/_glProg_2016_NT2_GrA/Reihe.java
040cc9cb2dfc92ed8637fa858ddda6af0f028a8e
[]
no_license
fhbgraceb/VerbundA-SS20
b3af20000e1a4b6efe768156ad415dbf67e16be0
7e672445bb785386af2ff65d3526f89c67882a71
refs/heads/master
2022-12-28T05:56:20.158197
2020-10-10T23:20:18
2020-10-10T23:20:18
238,525,365
0
0
null
null
null
null
UTF-8
Java
false
false
724
java
package _glProg_2016_NT2_GrA; public class Reihe { public static void main(String[] args) { final double grenze = -3.0; double summe; double glied; int zaehler; int nenner; summe = 0; zaehler = 1; nenner = 2; do { glied = ((double)zaehler) / nenner; if ((zaehler % 5 == 1) || (zaehler % 5 == 2) || (zaehler % 5 == 3)) { summe -= glied; } else { summe += glied; } System.out.println(zaehler + " / " + nenner + " = " + glied + " - " + summe); if (summe >= grenze) { nenner += zaehler; zaehler++; } } while (summe >= grenze); System.out.println("Bei Glied Nr. " + zaehler + " ist die Summe zum ersten Mal kleiner als " + grenze + "."); } }
[ "fhb190776@fh-vie.ac.at" ]
fhb190776@fh-vie.ac.at
6f59c3318468b3bd47b391f07b8c7e924aa1c205
612efa8a2d20a844b6126119783d6add8d235972
/src/main/java/com/situ/market/order/domain/Order.java
038d08bad239bc2e8f62dbc3787e993eea6072c0
[]
no_license
java-code-cpu/market
937156ace48955c660b70aba7f635c45f8204eb4
faaef7b80efbc76ca314d4644edfe8d2d46c0838
refs/heads/master
2022-12-21T11:08:50.787731
2020-01-06T02:38:13
2020-01-06T02:38:13
232,007,317
1
0
null
2022-12-15T23:33:52
2020-01-06T02:18:28
Java
UTF-8
Java
false
false
1,287
java
package com.situ.market.order.domain; import java.math.BigDecimal; import org.apache.ibatis.type.Alias; import com.situ.market.base.BaseClass; @Alias("Order") public class Order extends BaseClass { private static final long serialVersionUID = 1L; private Long userRowId; //用户ID 关联用户表的ID private BigDecimal allMoney; // 总价格 private String addressId; //收获地址ID private Integer orderState; //订单状态 1:已付款 2:未付款 3:退单 private Integer payMothed; //支付方法 1:微信 2:支付宝 public Long getUserRowId() { return userRowId; } public void setUserRowId(Long userRowId) { this.userRowId = userRowId; } public BigDecimal getAllMoney() { return allMoney; } public void setAllMoney(BigDecimal allMoney) { this.allMoney = allMoney; } public String getAddressId() { return addressId; } public void setAddressId(String addressId) { this.addressId = addressId; } public Integer getOrderState() { return orderState; } public void setOderState(Integer orderState) { this.orderState = orderState; } public Integer getPayMothed() { return payMothed; } public void setPayMothed(Integer payMothed) { this.payMothed = payMothed; } }
[ "xtx@DESKTOP-2A8NOQS.lan" ]
xtx@DESKTOP-2A8NOQS.lan
c86c16e0fab5a90c7ed90823435051d1b2a5c100
8341549a002086aa2ef3c9294a5f15bfec219199
/message/src/main/java/com/ydzb/message/service/ISmsLogService.java
05a731e2e9b39ae5b35daaa2b2fa5a6de64991e8
[]
no_license
songziyang/ydzb
2498204b9ee3d8e101a64ee7e366d8115514908c
e8483e26efab94a110821a7612fbaee3b08e66d5
refs/heads/master
2021-01-19T22:41:01.600194
2017-04-20T09:20:24
2017-04-20T09:20:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
188
java
package com.ydzb.message.service; import com.ydzb.core.service.IBaseService; import com.ydzb.sms.entity.SmsLog; public interface ISmsLogService extends IBaseService<SmsLog, Long> { }
[ "447587850@qq.com" ]
447587850@qq.com
216962b5e0b19acf163151bf718a7ad1bafe5c4f
41076deea9f13f7c16682f607d9a30a3b46a4bc2
/NoemiLabant/src/main/java/persoane/Hash.java
b9019aa4145e928086533c30a40810353efcda8c
[]
no_license
Noemi-Labant/JavaLearning
dbc1c9a837831ab25aa6ece803787eacf550d97b
1ff40cbc74f313b3994592d117c5decdd72530f3
refs/heads/main
2023-01-30T12:30:17.390239
2020-12-12T08:52:03
2020-12-12T08:52:03
309,957,425
0
0
null
null
null
null
UTF-8
Java
false
false
1,789
java
package persoane; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; public class Hash { public static void main(String[] args) { Map<Persoana, List<Hobby>> persoane = new HashMap<>(); Address address1 = new Address("Carpati nr. 254", "Romania"); Address address2 = new Address("Salcamilor nr. 3", "Germany"); Address address3 = new Address("Caprioarei nr. 10", "Italy"); List<Address> addresses1 = new LinkedList<>(); addresses1.add(address1); addresses1.add(address2); List<Address> addresses2 = new LinkedList<>(); addresses2.add(address1); addresses2.add(address3); Hobby hobby1 = new Hobby("skiing", 3, addresses1); Hobby hobby2 = new Hobby("golfing", 5, addresses2); List<Hobby> hobbies1 = new LinkedList<>(); hobbies1.add(hobby1); hobbies1.add(hobby2); List<Hobby> hobbies2 = new LinkedList<>(); hobbies2.add(hobby1); Persoana persoana1 = new Persoana("Cristiano", 34); Persoana persoana2 = new Persoana("Tarzan", 80); persoane.put(persoana1, hobbies1); persoane.put(persoana2, hobbies2); for (Map.Entry<Persoana, List<Hobby>> entry: persoane.entrySet()) { Persoana pers1 = entry.getKey(); List<Hobby> hobbiesList1 = entry.getValue(); System.out.println("Person name: " + pers1.getNume()); for (Hobby hobby: hobbiesList1) { System.out.println("Hobby name: " + hobby.getHobbyName()); for (Address address: hobby.getAddresses()) { System.out.println("Address country: " + address.getTara()); } } } } }
[ "labancz.noemi@yahoo.com" ]
labancz.noemi@yahoo.com
f6a47bdd6d944aa73e929f0ad8b8565065e69839
e9affefd4e89b3c7e2064fee8833d7838c0e0abc
/aws-java-sdk-chimesdkmediapipelines/src/main/java/com/amazonaws/services/chimesdkmediapipelines/model/ThrottledClientException.java
05e2a1f9f91d2c44eb15f6220fc6d102e324ad5b
[ "Apache-2.0" ]
permissive
aws/aws-sdk-java
2c6199b12b47345b5d3c50e425dabba56e279190
bab987ab604575f41a76864f755f49386e3264b4
refs/heads/master
2023-08-29T10:49:07.379135
2023-08-28T21:05:55
2023-08-28T21:05:55
574,877
3,695
3,092
Apache-2.0
2023-09-13T23:35:28
2010-03-22T23:34:58
null
UTF-8
Java
false
false
3,546
java
/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.chimesdkmediapipelines.model; import javax.annotation.Generated; /** * <p> * The client exceeded its request rate limit. * </p> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ThrottledClientException extends com.amazonaws.services.chimesdkmediapipelines.model.AmazonChimeSDKMediaPipelinesException { private static final long serialVersionUID = 1L; private String code; /** * <p> * The request ID associated with the call responsible for the exception. * </p> */ private String requestId; /** * Constructs a new ThrottledClientException with the specified error message. * * @param message * Describes the error encountered. */ public ThrottledClientException(String message) { super(message); } /** * @param code * @see ErrorCode */ @com.fasterxml.jackson.annotation.JsonProperty("Code") public void setCode(String code) { this.code = code; } /** * @return * @see ErrorCode */ @com.fasterxml.jackson.annotation.JsonProperty("Code") public String getCode() { return this.code; } /** * @param code * @return Returns a reference to this object so that method calls can be chained together. * @see ErrorCode */ public ThrottledClientException withCode(String code) { setCode(code); return this; } /** * @param code * @return Returns a reference to this object so that method calls can be chained together. * @see ErrorCode */ public ThrottledClientException withCode(ErrorCode code) { this.code = code.toString(); return this; } /** * <p> * The request ID associated with the call responsible for the exception. * </p> * * @param requestId * The request ID associated with the call responsible for the exception. */ @com.fasterxml.jackson.annotation.JsonProperty("RequestId") public void setRequestId(String requestId) { this.requestId = requestId; } /** * <p> * The request ID associated with the call responsible for the exception. * </p> * * @return The request ID associated with the call responsible for the exception. */ @com.fasterxml.jackson.annotation.JsonProperty("RequestId") public String getRequestId() { return this.requestId; } /** * <p> * The request ID associated with the call responsible for the exception. * </p> * * @param requestId * The request ID associated with the call responsible for the exception. * @return Returns a reference to this object so that method calls can be chained together. */ public ThrottledClientException withRequestId(String requestId) { setRequestId(requestId); return this; } }
[ "" ]
fdcf4e5227a2666fd72fd8d6129758b87a0f533d
51d05106ddd3494f0b6098cc97653ffac4896b70
/motorMain/src/main/java/test/ZipTest.java
f345810ab39c709aa0e1ed5ac3523b2fc1067e7a
[]
no_license
cyf120209/motor
f6ed18d334abba370f5794d20a0328f0f56188de
c3f2a0c83439e5447c77bb0966744654d849d899
refs/heads/master
2021-09-22T14:33:26.528610
2018-08-30T08:26:46
2018-08-30T08:26:46
103,228,108
2
0
null
null
null
null
UTF-8
Java
false
false
3,121
java
package test; import java.io.*; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipInputStream; public class ZipTest { public static void main(String[] args) { ZipTest zipTest = new ZipTest(); zipTest.readZip(); } /** * 读取zip文件内容 */ private void readZip() { File fil = new File("D:\\Android\\Android.zip"); ZipInputStream zipIn = null; try { zipIn = new ZipInputStream(new FileInputStream(fil)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } ZipEntry zipEn = null; /** * 需要读取zip文件项的内容时,需要ZipFile类的对象的getInputStream方法取得该项的内容, * 然后传递给InputStreamReader的构造方法创建InputStreamReader对象, * 最后使用此InputStreamReader对象创建BufferedReader实例 * 至此已把zip文件项的内容读出到缓存中,可以遍历其内容 */ ZipFile zfil = null; try { zfil = new ZipFile("D:\\Android\\Android.zip"); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { while ((zipEn = zipIn.getNextEntry()) != null) { if (!zipEn.isDirectory()) { // 判断此zip项是否为目录 System.out.println(zipEn.getName() + ":\t"); /** * 把是文件的zip项读出缓存, * zfil.getInputStream(zipEn):返回输入流读取指定zip文件条目的内容 zfil:new * ZipFile();供阅读的zip文件 zipEn:zip文件中的某一项 */ // BufferedReader buff = new BufferedReader( // new InputStreamReader(zfil.getInputStream(zipEn))); // String str; // while ((str = buff.readLine()) != null) { // System.out.println("\t" + str); // } // buff.close(); long size = zipEn.getSize(); byte[] b = new byte[(int) size]; InputStream is = zfil.getInputStream(zipEn); BufferedInputStream bis = new BufferedInputStream(is); while (bis.available()>0){ bis.read(b); } String s = new String(b); System.out.println("\t"+s); bis.close(); } zipIn.closeEntry();// 关闭当前打开的项 } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { zfil.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
[ "2445940439@qq.com" ]
2445940439@qq.com
5406d98c6b134cf3bfd8f94afe9891ca661222a9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_07b90692d7708c480911010589e0ce4fc203329a/RemoveRegionDialog/1_07b90692d7708c480911010589e0ce4fc203329a_RemoveRegionDialog_s.java
d3afb8bfff43fd1f06186dd5d20c8b98c874908f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,001
java
package org.dawb.workbench.plotting.system.dialog; import org.dawb.common.ui.plot.region.IRegion; import org.dawb.workbench.plotting.system.swtxy.RegionArea; import org.dawb.workbench.plotting.system.swtxy.XYRegionGraph; import org.dawb.workbench.plotting.system.swtxy.selection.AbstractSelectionRegion; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; /**The dialog for removing annotation. * @author Xihui Chen * @author Kay Kasemir layout tweaks */ public class RemoveRegionDialog extends Dialog { private XYRegionGraph xyGraph; private Combo regionCombo; private AbstractSelectionRegion removedRegion; public RemoveRegionDialog(Shell parentShell, XYRegionGraph xyGraph) { super(parentShell); this.xyGraph = xyGraph; // Allow resize setShellStyle(getShellStyle() | SWT.RESIZE); } @Override protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText("Remove Region"); } @Override protected Control createDialogArea(Composite parent) { final Composite parent_composite = (Composite) super.createDialogArea(parent); final Composite composite = new Composite(parent_composite, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); composite.setLayout(new GridLayout(1, false)); final Label removeLabel = new Label(composite, SWT.None); removeLabel.setLayoutData(new GridData()); if(((RegionArea)xyGraph.getPlotArea()).getRegionMap().size() > 0){ removeLabel.setText("Select the region to be removed: "); regionCombo = new Combo(composite, SWT.DROP_DOWN); regionCombo.setLayoutData(new GridData(SWT.FILL, 0, true, false)); final RegionArea regArea = (RegionArea)xyGraph.getPlotArea(); for (String name : regArea.getRegionMap().keySet()) { final AbstractSelectionRegion region = regArea.getRegion(name); regionCombo.add(region.getName()); } regionCombo.select(0); }else{ removeLabel.setText("There are no selection regions on the graph."); } return parent_composite; } @Override protected void okPressed() { if(regionCombo != null) { final int index = regionCombo.getSelectionIndex(); removedRegion = ((RegionArea)xyGraph.getPlotArea()).getRegions().get(index); } super.okPressed(); } /** * @return the annotation to be removed. */ public AbstractSelectionRegion getRegion() { return removedRegion; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ccce4f6c8d2e40f02d4f7675df9d55567d479c2e
a5d1355228908daf110db93a8641f212f5e9fbb1
/src/main/java/gov/va/oit/vistaevolution/mailman/ws/xma2r/model/AbstractXMA2RRequest.java
a65798700486e46b145933091f4b4b70398cf3a0
[]
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
3,737
java
package gov.va.oit.vistaevolution.mailman.ws.xma2r.model; import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; /** * @author Tom Miller<tom.miller@dbitpro.com> * */ public abstract class AbstractXMA2RRequest { /** * duz: * * (optional) User's DUZ. If DUZ is not defined, it defaults to the * Postmaster. This is who is really sending the message. * * xmduz: * * (required) User's DUZ or FREE TEXT. This is from whom the message will * appear to be. If it is not defined, it defaults to DUZ. (If DUZ is not * defined, it defaults to Postmaster.) If it is FREE TEXT, it must not be * more than 70 characters. * * xmsub: * * (required) Subject of the message, It should be from 3 to 65 characters * in length. * * xmtext : * * (required) The name of the array (in open format) containing the text of * the message. The array itself may be a local or a global variable, and it * must be in a format acceptable to VA FileMan WORD-PROCESSING fields. * * xmz : * * (required) Message IEN in the MESSAGE file (#3.9) * * xmstrip : * * (optional) String containing characters that should be removed from the * answer text. Default is none. */ @XmlElement(required = false) protected String duz; @XmlElement(required = true) protected String xmduz; @XmlElement(required = true) protected String xmsub; @XmlElementWrapper(name = "text") @XmlElement(name = "entry", required = true) protected List<String> xmtext; @XmlElement(required = true) protected String xmz; @XmlElement(required = false) protected String xmstrip; /** * Default Empty Constructor */ public AbstractXMA2RRequest() { super(); } /** * * Parameterised Constructor * * @param duz * @param xmduz * @param xmsub * @param xmtext * @param xmz * @param xmstrip */ public AbstractXMA2RRequest(String duz, String xmduz, String xmsub, List<String> xmtext, String xmz, String xmstrip) { super(); this.duz = duz; this.xmduz = xmduz; this.xmsub = xmsub; this.xmtext = xmtext; this.xmz = xmz; this.xmstrip = xmstrip; } /** * Mandatory Parameters Constructor * * @param xmduz * @param xmsub * @param xmtext * @param xmz */ public AbstractXMA2RRequest(String xmduz, String xmsub, List<String> xmtext, String xmz) { super(); this.xmduz = xmduz; this.xmsub = xmsub; this.xmtext = xmtext; this.xmz = xmz; } /** * @return the duz */ public String getDuz() { return duz; } /** * @param duz * the duz to set */ protected void setDuz(String duz) { this.duz = duz; } /** * @return the xmduz */ public String getXmduz() { return xmduz; } /** * @param xmduz * the xmduz to set */ protected void setXmduz(String xmduz) { this.xmduz = xmduz; } /** * @return the xmsub */ public String getXmsub() { return xmsub; } /** * @param xmsub * the xmsub to set */ protected void setXmsub(String xmsub) { this.xmsub = xmsub; } /** * @return the xmtext */ public List<String> getXmtext() { return xmtext; } /** * @param xmtext * the xmtext to set */ protected void setXmtext(List<String> xmtext) { this.xmtext = xmtext; } /** * @return the xmz */ public String getXmz() { return xmz; } /** * @param xmz * the xmz to set */ protected void setXmz(String xmz) { this.xmz = xmz; } /** * @return the xmstrip */ public String getXmstrip() { return xmstrip; } /** * @param xmstrip * the xmstrip to set */ protected void setXmstrip(String xmstrip) { this.xmstrip = xmstrip; } }
[ "tom.a.miller@gmail.com" ]
tom.a.miller@gmail.com
2799206d575c6c5e0010e4a3d080d5ddd608742f
9254e7279570ac8ef687c416a79bb472146e9b35
/r-kvstore-20150101/src/main/java/com/aliyun/r_kvstore20150101/models/CreateTairInstanceRequest.java
615c6abdc5ed31501450493f1c0fd6ad74fe7230
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,729
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.r_kvstore20150101.models; import com.aliyun.tea.*; public class CreateTairInstanceRequest extends TeaModel { @NameInMap("SecurityToken") public String securityToken; @NameInMap("OwnerId") public Long ownerId; @NameInMap("ResourceOwnerAccount") public String resourceOwnerAccount; @NameInMap("ResourceOwnerId") public Long resourceOwnerId; @NameInMap("OwnerAccount") public String ownerAccount; @NameInMap("RegionId") public String regionId; @NameInMap("InstanceName") public String instanceName; @NameInMap("Password") public String password; @NameInMap("InstanceClass") public String instanceClass; @NameInMap("ZoneId") public String zoneId; @NameInMap("ChargeType") public String chargeType; @NameInMap("VpcId") public String vpcId; @NameInMap("VSwitchId") public String vSwitchId; @NameInMap("Period") public Integer period; @NameInMap("BusinessInfo") public String businessInfo; @NameInMap("CouponNo") public String couponNo; @NameInMap("SrcDBInstanceId") public String srcDBInstanceId; @NameInMap("BackupId") public String backupId; @NameInMap("PrivateIpAddress") public String privateIpAddress; @NameInMap("AutoUseCoupon") public String autoUseCoupon; @NameInMap("AutoRenew") public String autoRenew; @NameInMap("AutoRenewPeriod") public String autoRenewPeriod; @NameInMap("AutoPay") public Boolean autoPay; @NameInMap("ClientToken") public String clientToken; @NameInMap("StorageType") public String storageType; @NameInMap("Storage") public Integer storage; @NameInMap("ShardType") public String shardType; @NameInMap("ShardCount") public Integer shardCount; @NameInMap("EngineVersion") public String engineVersion; @NameInMap("InstanceType") public String instanceType; public static CreateTairInstanceRequest build(java.util.Map<String, ?> map) throws Exception { CreateTairInstanceRequest self = new CreateTairInstanceRequest(); return TeaModel.build(map, self); } public CreateTairInstanceRequest setSecurityToken(String securityToken) { this.securityToken = securityToken; return this; } public String getSecurityToken() { return this.securityToken; } public CreateTairInstanceRequest setOwnerId(Long ownerId) { this.ownerId = ownerId; return this; } public Long getOwnerId() { return this.ownerId; } public CreateTairInstanceRequest setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; return this; } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public CreateTairInstanceRequest setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; return this; } public Long getResourceOwnerId() { return this.resourceOwnerId; } public CreateTairInstanceRequest setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; return this; } public String getOwnerAccount() { return this.ownerAccount; } public CreateTairInstanceRequest setRegionId(String regionId) { this.regionId = regionId; return this; } public String getRegionId() { return this.regionId; } public CreateTairInstanceRequest setInstanceName(String instanceName) { this.instanceName = instanceName; return this; } public String getInstanceName() { return this.instanceName; } public CreateTairInstanceRequest setPassword(String password) { this.password = password; return this; } public String getPassword() { return this.password; } public CreateTairInstanceRequest setInstanceClass(String instanceClass) { this.instanceClass = instanceClass; return this; } public String getInstanceClass() { return this.instanceClass; } public CreateTairInstanceRequest setZoneId(String zoneId) { this.zoneId = zoneId; return this; } public String getZoneId() { return this.zoneId; } public CreateTairInstanceRequest setChargeType(String chargeType) { this.chargeType = chargeType; return this; } public String getChargeType() { return this.chargeType; } public CreateTairInstanceRequest setVpcId(String vpcId) { this.vpcId = vpcId; return this; } public String getVpcId() { return this.vpcId; } public CreateTairInstanceRequest setVSwitchId(String vSwitchId) { this.vSwitchId = vSwitchId; return this; } public String getVSwitchId() { return this.vSwitchId; } public CreateTairInstanceRequest setPeriod(Integer period) { this.period = period; return this; } public Integer getPeriod() { return this.period; } public CreateTairInstanceRequest setBusinessInfo(String businessInfo) { this.businessInfo = businessInfo; return this; } public String getBusinessInfo() { return this.businessInfo; } public CreateTairInstanceRequest setCouponNo(String couponNo) { this.couponNo = couponNo; return this; } public String getCouponNo() { return this.couponNo; } public CreateTairInstanceRequest setSrcDBInstanceId(String srcDBInstanceId) { this.srcDBInstanceId = srcDBInstanceId; return this; } public String getSrcDBInstanceId() { return this.srcDBInstanceId; } public CreateTairInstanceRequest setBackupId(String backupId) { this.backupId = backupId; return this; } public String getBackupId() { return this.backupId; } public CreateTairInstanceRequest setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; return this; } public String getPrivateIpAddress() { return this.privateIpAddress; } public CreateTairInstanceRequest setAutoUseCoupon(String autoUseCoupon) { this.autoUseCoupon = autoUseCoupon; return this; } public String getAutoUseCoupon() { return this.autoUseCoupon; } public CreateTairInstanceRequest setAutoRenew(String autoRenew) { this.autoRenew = autoRenew; return this; } public String getAutoRenew() { return this.autoRenew; } public CreateTairInstanceRequest setAutoRenewPeriod(String autoRenewPeriod) { this.autoRenewPeriod = autoRenewPeriod; return this; } public String getAutoRenewPeriod() { return this.autoRenewPeriod; } public CreateTairInstanceRequest setAutoPay(Boolean autoPay) { this.autoPay = autoPay; return this; } public Boolean getAutoPay() { return this.autoPay; } public CreateTairInstanceRequest setClientToken(String clientToken) { this.clientToken = clientToken; return this; } public String getClientToken() { return this.clientToken; } public CreateTairInstanceRequest setStorageType(String storageType) { this.storageType = storageType; return this; } public String getStorageType() { return this.storageType; } public CreateTairInstanceRequest setStorage(Integer storage) { this.storage = storage; return this; } public Integer getStorage() { return this.storage; } public CreateTairInstanceRequest setShardType(String shardType) { this.shardType = shardType; return this; } public String getShardType() { return this.shardType; } public CreateTairInstanceRequest setShardCount(Integer shardCount) { this.shardCount = shardCount; return this; } public Integer getShardCount() { return this.shardCount; } public CreateTairInstanceRequest setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; return this; } public String getEngineVersion() { return this.engineVersion; } public CreateTairInstanceRequest setInstanceType(String instanceType) { this.instanceType = instanceType; return this; } public String getInstanceType() { return this.instanceType; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com