blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 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
689M
⌀ | 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 131
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 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c9f7d37b97cf7a24fa64e886a14c3ecee01782bc | 37b54d02732608418e5064d824969bd6af093a69 | /BFS/src/BFS4.java | 311d726268df20d3e30d1ea75db97fb8dad4507a | [] | no_license | JadenCCW/algorithm | d48dc37bd4f74cfadbd285906efd71a7b6db3e74 | 72d76a2e58b15c633166b180ca1a58dc256bcc0c | refs/heads/master | 2020-06-06T15:22:49.852200 | 2019-06-27T17:49:13 | 2019-06-27T17:49:13 | 192,776,261 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,079 | java | //1697
import java.util.*;
import java.io.*;
public class BFS4 {
static Scanner in;
static int a[], n, m;
static Queue<Integer> q;
public static void main(String[] args) {
init();
solve();
}
public static void init() {
in = new Scanner(System.in);
n = in.nextInt();
m = in.nextInt();
a = new int[50];
q = new LinkedList<Integer>();
a[n] = 1;
}
public static void solve() {
bfs(n);
//System.out.println(Arrays.toString(a));
}
public static void bfs(int x) {
int ans = 0;
q.add(x);
while(!q.isEmpty()) {
x = q.poll();
//System.out.println(q);
if(x==m) {
ans = a[x]-1;
break;
}
int nx = 0;
nx = x + 1;
//System.out.println(nx);
if(nx>=0&&nx<=49&&a[nx]==0) {
a[nx] = a[x]+1;
q.add(nx);
}
nx = x - 1;
if(nx>=0&&nx<=49&&a[nx]==0) {
a[nx] = a[x]+1;
q.add(nx);
}
nx = x * 2;
if(nx>=0&&nx<=49&&a[nx]==0) {
a[nx] = a[x]+1;
q.add(nx);
}
}
System.out.println(ans);
}
}
| [
"goku7@DESKTOP-3T9BRKB"
] | goku7@DESKTOP-3T9BRKB |
dc559aa05dbf310e5e9181b1a36964150c817054 | c7c7c0df36104921847948a9e5478532811d99c8 | /src/ifc4javatoolbox/ifc4/IfcPlateType.java | 3f1dd1d0e8ff41b0b539573fda176816d2c73518 | [] | no_license | puneetarora2000/buildingrules | c57b63a2a3328cd458249ceb6eacb4a5dcf05c06 | 829a739360165fd395f12be511c702f53676df73 | refs/heads/master | 2020-04-17T17:07:38.978972 | 2016-12-21T06:23:58 | 2016-12-21T06:23:58 | 66,047,861 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,903 | java | /* Generated By: IFC Tools Project EXPRESS TO JAVA COMPILER: Do not edit this file!! */
package ifc4javatoolbox.ifc4;
/**
* This is a default implementation of the entity IfcPlateType<br><br>
*<br><br>
* Copyright: CC BY-NC-SA 3.0 DE (cc) 2013 Eike Tauscher and Michael Theiler<br><br>
* The whole package including this class is licensed under<br>
* <a rel='license' href='http://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.en/'>
* Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Germany</a>.<br><br>
* If you are using the package or parts of it in any commercial way, a commercial license is required.
* Visit <a href='http://www.ifctoolsproject.com'>http://www.ifctoolsproject.com</a> for more information
* or contact us directly: <a href='mailto:[email protected]'>[email protected]</a><br>
*/
public class IfcPlateType extends IfcBuildingElementType implements ClassInterface
{
private static final String[] nonInverseAttributes = new String[]{"IfcGloballyUniqueId","IfcOwnerHistory","IfcLabel","IfcText","IfcIdentifier","SET<IfcPropertySetDefinition>","LIST<IfcRepresentationMap>","IfcLabel","IfcLabel","IfcPlateTypeEnum"};
private java.util.ArrayList<CloneableObject> stepParameter = null;
private java.util.HashSet<ObjectChangeListener> listenerList = null;
protected int stepLineNumber;
/** PredefinedType is an DEMANDED attribute - may not be null**/
protected IfcPlateTypeEnum PredefinedType;
/**
* The default constructor.
**/
public IfcPlateType(){}
/**
* Constructs a new IfcPlateType object using the given parameters.
*
* @param GlobalId DEMANDED parameter of type IfcGloballyUniqueId - may not be null.
* @param OwnerHistory OPTIONAL parameter of type IfcOwnerHistory
* @param Name OPTIONAL parameter of type IfcLabel
* @param Description OPTIONAL parameter of type IfcText
* @param ApplicableOccurrence OPTIONAL parameter of type IfcIdentifier
* @param HasPropertySets OPTIONAL parameter of type SET<IfcPropertySetDefinition>
* @param RepresentationMaps OPTIONAL parameter of type LIST<IfcRepresentationMap>
* @param Tag OPTIONAL parameter of type IfcLabel
* @param ElementType OPTIONAL parameter of type IfcLabel
* @param PredefinedType DEMANDED parameter of type IfcPlateTypeEnum - may not be null.
**/
public IfcPlateType(IfcGloballyUniqueId GlobalId, IfcOwnerHistory OwnerHistory, IfcLabel Name, IfcText Description, IfcIdentifier ApplicableOccurrence, SET<IfcPropertySetDefinition> HasPropertySets, LIST<IfcRepresentationMap> RepresentationMaps, IfcLabel Tag, IfcLabel ElementType, IfcPlateTypeEnum PredefinedType)
{
this.GlobalId = GlobalId;
this.OwnerHistory = OwnerHistory;
this.Name = Name;
this.Description = Description;
this.ApplicableOccurrence = ApplicableOccurrence;
this.HasPropertySets = HasPropertySets;
this.RepresentationMaps = RepresentationMaps;
this.Tag = Tag;
this.ElementType = ElementType;
this.PredefinedType = PredefinedType;
resolveInverses();
}
/**
* This method initializes the IfcPlateType object using the given parameters.
*
* @param GlobalId DEMANDED parameter of type IfcGloballyUniqueId - may not be null.
* @param OwnerHistory OPTIONAL parameter of type IfcOwnerHistory
* @param Name OPTIONAL parameter of type IfcLabel
* @param Description OPTIONAL parameter of type IfcText
* @param ApplicableOccurrence OPTIONAL parameter of type IfcIdentifier
* @param HasPropertySets OPTIONAL parameter of type SET<IfcPropertySetDefinition>
* @param RepresentationMaps OPTIONAL parameter of type LIST<IfcRepresentationMap>
* @param Tag OPTIONAL parameter of type IfcLabel
* @param ElementType OPTIONAL parameter of type IfcLabel
* @param PredefinedType DEMANDED parameter of type IfcPlateTypeEnum - may not be null.
**/
public void setParameters(IfcGloballyUniqueId GlobalId, IfcOwnerHistory OwnerHistory, IfcLabel Name, IfcText Description, IfcIdentifier ApplicableOccurrence, SET<IfcPropertySetDefinition> HasPropertySets, LIST<IfcRepresentationMap> RepresentationMaps, IfcLabel Tag, IfcLabel ElementType, IfcPlateTypeEnum PredefinedType)
{
this.GlobalId = GlobalId;
this.OwnerHistory = OwnerHistory;
this.Name = Name;
this.Description = Description;
this.ApplicableOccurrence = ApplicableOccurrence;
this.HasPropertySets = HasPropertySets;
this.RepresentationMaps = RepresentationMaps;
this.Tag = Tag;
this.ElementType = ElementType;
this.PredefinedType = PredefinedType;
resolveInverses();
}
/**
* This method is used internally and should NOT be used for own purposes.
**/
@SuppressWarnings("unchecked")
void initialize(java.util.ArrayList<CloneableObject> parameters)
{
this.GlobalId = (IfcGloballyUniqueId) parameters.get(0);
this.OwnerHistory = (IfcOwnerHistory) parameters.get(1);
this.Name = (IfcLabel) parameters.get(2);
this.Description = (IfcText) parameters.get(3);
this.ApplicableOccurrence = (IfcIdentifier) parameters.get(4);
this.HasPropertySets = (SET<IfcPropertySetDefinition>) parameters.get(5);
this.RepresentationMaps = (LIST<IfcRepresentationMap>) parameters.get(6);
this.Tag = (IfcLabel) parameters.get(7);
this.ElementType = (IfcLabel) parameters.get(8);
this.PredefinedType = (IfcPlateTypeEnum) parameters.get(9);
resolveInverses();
}
/**
* This method is used internally and should NOT be used for own purposes.
**/
void destruct()
{
super.destruct();
listenerList = null;
}
private void resolveInverses()
{
if(HasPropertySets != null)
{
for(IfcPropertySetDefinition HasPropertySets$ : HasPropertySets)
{
if(HasPropertySets$.DefinesType_Inverse == null)
{
HasPropertySets$.DefinesType_Inverse = new SET<IfcTypeObject>();
}
HasPropertySets$.DefinesType_Inverse.add(this);
}
}
}
/**
* This method is used internally and should NOT be used for own purposes.
**/
String[] getNonInverseAttributeTypes()
{
return IfcPlateType.nonInverseAttributes; }
/**
* This method is used internally and should NOT be used for own purposes.
**/
private java.util.HashSet<String> getRedefinedDerivedAttributeTypes()
{
java.util.HashSet<String> redefinedDerivedAttributes = new java.util.HashSet<String>();
return redefinedDerivedAttributes; }
/**
* This method returns the object IFC STEP representation. This method is called by the IfcModel object to write IFC STEP files.
*
* @return the IFC STEP representation of this object
**/
public String getStepLine()
{
String stepString = new String("#"+this.stepLineNumber+"= ");
stepString = stepString.concat("IFCPLATETYPE(");
if(getRedefinedDerivedAttributeTypes().contains("GlobalId")) stepString = stepString.concat("*,");
else{
if(this.GlobalId != null) stepString = stepString.concat(((RootInterface)this.GlobalId).getStepParameter(IfcGloballyUniqueId.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("OwnerHistory")) stepString = stepString.concat("*,");
else{
if(this.OwnerHistory != null) stepString = stepString.concat(((RootInterface)this.OwnerHistory).getStepParameter(IfcOwnerHistory.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("Name")) stepString = stepString.concat("*,");
else{
if(this.Name != null) stepString = stepString.concat(((RootInterface)this.Name).getStepParameter(IfcLabel.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("Description")) stepString = stepString.concat("*,");
else{
if(this.Description != null) stepString = stepString.concat(((RootInterface)this.Description).getStepParameter(IfcText.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("ApplicableOccurrence")) stepString = stepString.concat("*,");
else{
if(this.ApplicableOccurrence != null) stepString = stepString.concat(((RootInterface)this.ApplicableOccurrence).getStepParameter(IfcIdentifier.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("HasPropertySets")) stepString = stepString.concat("*,");
else{
if(this.HasPropertySets != null) stepString = stepString.concat(((RootInterface)this.HasPropertySets).getStepParameter(IfcPropertySetDefinition.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("RepresentationMaps")) stepString = stepString.concat("*,");
else{
if(this.RepresentationMaps != null) stepString = stepString.concat(((RootInterface)this.RepresentationMaps).getStepParameter(IfcRepresentationMap.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("Tag")) stepString = stepString.concat("*,");
else{
if(this.Tag != null) stepString = stepString.concat(((RootInterface)this.Tag).getStepParameter(IfcLabel.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("ElementType")) stepString = stepString.concat("*,");
else{
if(this.ElementType != null) stepString = stepString.concat(((RootInterface)this.ElementType).getStepParameter(IfcLabel.class.isInterface())+",");
else stepString = stepString.concat("$,");
}
if(getRedefinedDerivedAttributeTypes().contains("PredefinedType")) stepString = stepString.concat("*);");
else{
if(this.PredefinedType != null) stepString = stepString.concat(((RootInterface)this.PredefinedType).getStepParameter(IfcPlateTypeEnum.class.isInterface())+");");
else stepString = stepString.concat("$);");
}
return stepString;
}
/**
* This method is used internally and should NOT be used for own purposes.
**/
public String getStepParameter(boolean isSelectType)
{
return "#" + this.stepLineNumber;
}
/**
* This method returns the line number within a IFC STEP representation. This method is called from other objects, where this one is referenced.
*
* @return the STEP line number
**/
public int getStepLineNumber()
{
return this.stepLineNumber;
}
/**
* This method is used internally and should NOT be used for own purposes.
**/
void setStepLineNumber(int number)
{
this.stepLineNumber = number;
}
/**
* This method sets the PredefinedType attribute to the given value.
*
* @param PredefinedType OPTIONAL value to set
**/
public void setPredefinedType(IfcPlateTypeEnum PredefinedType)
{
this.PredefinedType = PredefinedType;
fireChangeEvent();
}
/**
* This method returns the value of the PredefinedType attribute.
*
* @return the value of PredefinedType
/**/
public IfcPlateTypeEnum getPredefinedType()
{
return this.PredefinedType;
}
/**
* This method is used internally and should NOT be used for own purposes.
**/
void setStepParameter(java.util.ArrayList<CloneableObject> parameter)
{
this.stepParameter = parameter;
}
/**
* This method is used internally and should NOT be used for own purposes.
**/
java.util.ArrayList<CloneableObject> getStepParameter()
{
return this.stepParameter;
}
/**
* This method registers an ObjectChangeListener to this object. An event is fired whenever one of its values was changed.
*
*@param listener the listener to register
**/
public void addObjectChangeListener(ObjectChangeListener listener)
{
if (listenerList == null) listenerList = new java.util.HashSet<ObjectChangeListener>(1,1);
listenerList.add(listener);
}
/**
* This method unregisters an ObjectChangeListener from this object.
*
*@param listener the listener to unregister
**/
public void removeObjectChangeListener(ObjectChangeListener listener)
{
if (listenerList == null) return;
listenerList.remove(listener);
if (listenerList.size()==0) listenerList = null;
}
/**
* This method removes all currently registered ObjectChangeListeners from this object.
**/
public void removeAllObjectChangeListeners()
{
listenerList = null;
}
protected void fireChangeEvent()
{
if(listenerList == null) return;
for(ObjectChangeListener listener : listenerList)
listener.ifcModelObjectChange(this);
}
/**
* This method clones the object (deep cloning).
*
* @return the cloned object
**/
@SuppressWarnings("unchecked")
public Object clone()
{
IfcPlateType ifcPlateType = new IfcPlateType();
if(this.GlobalId != null)
ifcPlateType.setGlobalId((IfcGloballyUniqueId)this.GlobalId.clone());
if(this.OwnerHistory != null)
ifcPlateType.setOwnerHistory((IfcOwnerHistory)this.OwnerHistory.clone());
if(this.Name != null)
ifcPlateType.setName((IfcLabel)this.Name.clone());
if(this.Description != null)
ifcPlateType.setDescription((IfcText)this.Description.clone());
if(this.ApplicableOccurrence != null)
ifcPlateType.setApplicableOccurrence((IfcIdentifier)this.ApplicableOccurrence.clone());
if(this.HasPropertySets != null)
ifcPlateType.setHasPropertySets((SET<IfcPropertySetDefinition>)this.HasPropertySets.clone());
if(this.RepresentationMaps != null)
ifcPlateType.setRepresentationMaps((LIST<IfcRepresentationMap>)this.RepresentationMaps.clone());
if(this.Tag != null)
ifcPlateType.setTag((IfcLabel)this.Tag.clone());
if(this.ElementType != null)
ifcPlateType.setElementType((IfcLabel)this.ElementType.clone());
if(this.PredefinedType != null)
ifcPlateType.setPredefinedType((IfcPlateTypeEnum)this.PredefinedType.clone());
return ifcPlateType;
}
/**
* This method copys the object as shallow copy (all referenced objects are remaining).
*
* @return the cloned object
**/
public Object shallowCopy()
{
IfcPlateType ifcPlateType = new IfcPlateType();
if(this.GlobalId != null)
ifcPlateType.setGlobalId(this.GlobalId);
if(this.OwnerHistory != null)
ifcPlateType.setOwnerHistory(this.OwnerHistory);
if(this.Name != null)
ifcPlateType.setName(this.Name);
if(this.Description != null)
ifcPlateType.setDescription(this.Description);
if(this.ApplicableOccurrence != null)
ifcPlateType.setApplicableOccurrence(this.ApplicableOccurrence);
if(this.HasPropertySets != null)
ifcPlateType.setHasPropertySets(this.HasPropertySets);
if(this.RepresentationMaps != null)
ifcPlateType.setRepresentationMaps(this.RepresentationMaps);
if(this.Tag != null)
ifcPlateType.setTag(this.Tag);
if(this.ElementType != null)
ifcPlateType.setElementType(this.ElementType);
if(this.PredefinedType != null)
ifcPlateType.setPredefinedType(this.PredefinedType);
return ifcPlateType;
}
/**
* This method returns the objects standard description.
*
* @return the standard description
**/
public String toString()
{
return "#"+ this.getStepLineNumber() + " " + this.getClass().getSimpleName();
}
}
| [
"[email protected]"
] | |
1e252cf5545c93e63a878d1e2944477fd0a0e0a6 | 5832504c187692c3410ab0754d647af1d191bec2 | /bin/ext-commerce/solrfacetsearch/testsrc/de/hybris/platform/solrfacetsearch/indexer/impl/XMLExporterTest.java | 5e9f1e6f5fe46da04d28fcbb93d57bc8a1c0bad4 | [] | no_license | ramamohan/Hybris_TEST | d8505769885edc66ed85831def9e2b9f93bf33a6 | 820654707f194feb785483f9bf9851a1381af9d0 | refs/heads/master | 2021-12-09T05:35:58.257789 | 2016-04-28T23:42:26 | 2016-04-28T23:42:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,171 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.solrfacetsearch.indexer.impl;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.when;
import de.hybris.platform.solrfacetsearch.config.IndexConfig;
import de.hybris.platform.solrfacetsearch.indexer.exceptions.ExporterException;
import de.hybris.platform.testframework.HybrisJUnit4Test;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
*
*/
public class XMLExporterTest extends HybrisJUnit4Test
{
private XMLExporter xmlExporter;
@Mock
private IndexConfig mockIndexConfig;
/**
*
*/
@Before
public void setUp() throws Exception
{
MockitoAnnotations.initMocks(this);
xmlExporter = new XMLExporter();
}
@Test
public void testGetExportDirEmptyPath()
{
when(mockIndexConfig.getExportPath()).thenReturn("");
try
{
xmlExporter.getExportDirPath(mockIndexConfig);
}
catch (final ExporterException e)
{
fail("Should apply fallback value : hybris temp dir");
}
}
@Test
public void testGetExportDirNullPath()
{
when(mockIndexConfig.getExportPath()).thenReturn(null);
try
{
xmlExporter.getExportDirPath(mockIndexConfig);
}
catch (final ExporterException e)
{
fail("Should apply fallback value : hybris temp dir");
}
}
@Test
public void testGetExportDirPath()
{
final String configPath = "test123";
String exportPath = "";
when(mockIndexConfig.getExportPath()).thenReturn(configPath);
try
{
exportPath = xmlExporter.getExportDirPath(mockIndexConfig);
}
catch (final ExporterException e)
{
fail("Should use configured path");
}
Assert.assertEquals(configPath, exportPath);
}
}
| [
"[email protected]"
] | |
1b634b70ee156b3f3266bd18425e4cf112f3e76a | 31a087f2bb963fbd806d58a0f3b5dc7688e5a18e | /src/main/java/com/usa/state/gov/his/controller/SsnRestController.java | 9803ce873f4ff33cf0873eaf3472632ba4edfae9 | [] | no_license | abdulubed/HealthInsurence | 253991dd5f9e02ccffd2a0955a80db3017e65626 | 4167f26cc6c6bcf0b3aba69fb630f2ecac80b0b8 | refs/heads/master | 2020-06-21T23:09:45.647612 | 2019-07-18T12:26:21 | 2019-07-18T12:26:21 | 197,574,621 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 839 | java | package com.usa.state.gov.his.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.usa.state.gov.his.service.HisServiceImpl;
@RestController
@RequestMapping("/restValidation")
public class SsnRestController {
@Autowired
private HisServiceImpl ssaServiceImpl;
/*@GetMapping(value = "/state")
public String getStatesById(@RequestHeader("ssnNumber") Long ssnNumber) {
String stateName = ssaServiceImpl.getStateNameById(ssnNumber);
System.out.println(stateName);
// return Response.status(200).entity(stateName).build();
return stateName;
}*/
}
| [
"[email protected]"
] | |
f6a67bfdde2dc5fac46d026dd5abda821eebe171 | 0a9444afc6d359f3589006b362ca3b2827fdd4a1 | /Strzelanka/View/Obiekt.java | 884e7b1f9b077869e74dd1180c498a5e7a5d69c1 | [
"MIT"
] | permissive | WezSieTato/StrzelankaPROZ | 75e7d573a8c9d3784abde10364e257594465c026 | 42d76606197e81d28dbc65e92584c4a82d6fa9f8 | refs/heads/master | 2020-06-05T02:42:29.967961 | 2013-10-12T11:23:21 | 2013-10-12T11:23:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 691 | java | package View;
import Wspolrzedne.*;
import java.awt.Point;
/**
* klasa ktora bedzie posrednikiem miedzy modelowym obiektem na mapie, a tym przedstawionym w View
*/
public class Obiekt {
private int ID;
private int x;
private int y;
public Obiekt(int a, float b, float c){
ID = a;
x = (int)b;
y = (int)c;
}
public Obiekt(int a, Punkt b){
ID = a;
x = (int)b.x;
y = (int)b.y;
}
public Obiekt(int a, Point b){
ID = a;
x = b.x;
y = b.y;
}
public int getID(){
return ID;
}
public int getX(){
return x;
}
public int getY(){
return y;
}
@Override
public String toString() {
return "Obiekt [ID=" + ID + ", x=" + x + ", y=" + y + "]";
}
}
| [
"[email protected]"
] | |
f5d8e72d8923c76e75474c5a581f5fc0e8ffa16a | 81a7d95369bb3594e4190060482ed4d20ee35a6a | /src/java/org/jivesoftware/spark/UserManager.java | e013cdff9538e2b4fc7b520abd7fd274f4fd8a9d | [
"Apache-2.0"
] | permissive | zhangzijian86/Spark | aa8d911122ea20efcccfb468204d5434071103e9 | 98b45c042f301132e35301cf51b78ddc72d7b430 | refs/heads/master | 2021-01-01T03:46:16.062518 | 2016-06-01T09:36:16 | 2016-06-01T09:36:16 | 59,023,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,679 | java | /**
* $RCSfile: ,v $
* $Revision: $
* $Date: $
*
* Copyright (C) 2004-2011 Jive Software. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.spark;
import org.jivesoftware.resource.Res;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.muc.Occupant;
import org.jivesoftware.smackx.packet.VCard;
import org.jivesoftware.spark.component.JContactItemField;
import org.jivesoftware.spark.ui.ChatRoom;
import org.jivesoftware.spark.ui.ContactGroup;
import org.jivesoftware.spark.ui.ContactItem;
import org.jivesoftware.spark.ui.ContactList;
import org.jivesoftware.spark.ui.rooms.GroupChatRoom;
import org.jivesoftware.spark.util.ModelUtil;
import org.jivesoftware.spark.util.SwingTimerTask;
import org.jivesoftware.spark.util.TaskEngine;
import org.jivesoftware.spark.util.log.Log;
import org.jivesoftware.sparkimpl.profile.VCardManager;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TimerTask;
/**
* Handles all users in the agent application. Each user or chatting user can be referenced from the User
* Manager. You would use the UserManager to get visitors in a chat room or secondary agents.
*/
public class UserManager {
private Map<JFrame,Component> parents = new HashMap<JFrame,Component>();
public UserManager() {
}
public String getNickname() {
final VCardManager vCardManager = SparkManager.getVCardManager();
VCard vcard = vCardManager.getVCard();
if (vcard == null) {
return SparkManager.getSessionManager().getUsername();
}
else {
String nickname = vcard.getNickName();
if (ModelUtil.hasLength(nickname)) {
return nickname;
}
else {
String firstName = vcard.getFirstName();
if (ModelUtil.hasLength(firstName)) {
return firstName;
}
}
}
// Default to node if nothing.
String username = SparkManager.getSessionManager().getUsername();
username = StringUtils.unescapeNode(username);
return username;
}
/**
* Return a Collection of all user jids found in the specified room.
*
* @param room the name of the chatroom
* @param fullJID set to true if you wish to have the full jid with resource, otherwise false
* for the bare jid.
* @return a Collection of jids found in the room.
*/
public Collection<String> getUserJidsInRoom(String room, boolean fullJID) {
return new ArrayList<String>();
}
/**
* Checks to see if the user is an owner of the specified room.
*
* @param groupChatRoom the group chat room.
* @param nickname the user's nickname.
* @return true if the user is an owner.
*/
public boolean isOwner(GroupChatRoom groupChatRoom, String nickname) {
Occupant occupant = getOccupant(groupChatRoom, nickname);
if (occupant != null) {
String affiliation = occupant.getAffiliation();
if ("owner".equals(affiliation)) {
return true;
}
}
return false;
}
/**
* Checks to see if the Occupant is the owner of the room.
*
* @param occupant the occupant of a room.
* @return true if the user is an owner.
*/
public boolean isOwner(Occupant occupant) {
if (occupant != null) {
String affiliation = occupant.getAffiliation();
if ("owner".equals(affiliation)) {
return true;
}
}
return false;
}
/**
* Checks if the Occupant is a Member in this Room<br>
* <b>admins and owners are also members!!!</b>
* @param occupant
* @return true if member, else false
*/
public boolean isMember(Occupant occupant) {
if (occupant != null) {
String affiliation = occupant.getAffiliation();
if ("member".equals(affiliation) || affiliation.equals("owner")
|| affiliation.equals("admin")) {
return true;
}
}
return false;
}
/**
* Checks to see if the Occupant is a moderator.
*
* @param groupChatRoom the group chat room.
* @param nickname the nickname of the user.
* @return true if the user is a moderator.
*/
public boolean isModerator(GroupChatRoom groupChatRoom, String nickname) {
Occupant occupant = getOccupant(groupChatRoom, nickname);
if (occupant != null) {
String role = occupant.getRole();
if ("moderator".equals(role)) {
return true;
}
}
return false;
}
/**
* Checks to see if the Occupant is a moderator.
*
* @param occupant the Occupant of a room.
* @return true if the user is a moderator.
*/
public boolean isModerator(Occupant occupant) {
if (occupant != null) {
String role = occupant.getRole();
if ("moderator".equals(role)) {
return true;
}
}
return false;
}
/**
* Checks to see if the user is either an owner or admin of a room.
*
* @param groupChatRoom the group chat room.
* @param nickname the user's nickname.
* @return true if the user is either an owner or admin of the room.
*/
public boolean isOwnerOrAdmin(GroupChatRoom groupChatRoom, String nickname) {
Occupant occupant = getOccupant(groupChatRoom, nickname);
if (occupant != null) {
String affiliation = occupant.getAffiliation();
if ("owner".equals(affiliation) || "admin".equals(affiliation)) {
return true;
}
}
return false;
}
/**
* Checks to see if the user is either an owner or admin of the given room.
*
* @param occupant the <code>Occupant</code> to check.
* @return true if the user is either an owner or admin of the room.
*/
public boolean isOwnerOrAdmin(Occupant occupant) {
if (occupant != null) {
String affiliation = occupant.getAffiliation();
if ("owner".equals(affiliation) || "admin".equals(affiliation)) {
return true;
}
}
return false;
}
/**
* Returns the occupant of the room identified by their nickname.
*
* @param groupChatRoom the GroupChatRoom.
* @param nickname the users nickname.
* @return the Occupant found.
*/
public Occupant getOccupant(GroupChatRoom groupChatRoom, String nickname) {
String userJID = groupChatRoom.getRoomname() + "/" + nickname;
Occupant occ = null;
try {
occ = groupChatRoom.getMultiUserChat().getOccupant(userJID);
}
catch (Exception e) {
Log.error(e);
}
return occ;
}
/**
* Checks the nickname of a user in a room and determines if they are an
* administrator of the room.
*
* @param groupChatRoom the GroupChatRoom.
* @param nickname the nickname of the user. Note: In MultiUserChats, users nicknames
* are defined by the resource([email protected]/derek) would have
* derek as a nickname.
* @return true if the user is an admin.
*/
public boolean isAdmin(GroupChatRoom groupChatRoom, String nickname) {
Occupant occupant = getOccupant(groupChatRoom, nickname);
if (occupant != null) {
String affiliation = occupant.getAffiliation();
if ("admin".equals(affiliation)) {
return true;
}
}
return false;
}
public boolean hasVoice(GroupChatRoom groupChatRoom, String nickname) {
Occupant occupant = getOccupant(groupChatRoom, nickname);
if (occupant != null) {
String role = occupant.getRole();
if ("visitor".equals(role)) {
return false;
}
}
return true;
}
/**
* Returns a Collection of all <code>ChatUsers</code> in a ChatRoom.
*
* @param chatRoom the ChatRoom to inspect.
* @return the Collection of all ChatUsers.
* @see <code>ChatUser</code>
*/
public Collection<String> getAllParticipantsInRoom(ChatRoom chatRoom) {
return new ArrayList<String>();
}
public String getUserNicknameFromJID(String jid) {
ContactList contactList = SparkManager.getWorkspace().getContactList();
ContactItem item = contactList.getContactItemByJID(jid);
if (item != null) {
return item.getDisplayName();
}
return unescapeJID(jid);
}
/**
* Escapes a complete JID by examing the Node itself and escaping
* when neccessary.
*
* @param jid the users JID
* @return the escaped JID.
*/
public static String escapeJID(String jid) {
if (jid == null) {
return null;
}
final StringBuilder builder = new StringBuilder();
String node = StringUtils.parseName(jid);
String restOfJID = jid.substring(node.length());
builder.append(StringUtils.escapeNode(node));
builder.append(restOfJID);
return builder.toString();
}
/**
* Unescapes a complete JID by examing the node itself and unescaping when necessary.
*
* @param jid the users jid.
* @return the unescaped JID.
*/
public static String unescapeJID(String jid) {
if (jid == null) {
return null;
}
final StringBuilder builder = new StringBuilder();
String node = StringUtils.parseName(jid);
String restOfJID = jid.substring(node.length());
builder.append(StringUtils.unescapeNode(node));
builder.append(restOfJID);
return builder.toString();
}
/**
* Returns the full jid w/ resource of a user by their display name
* in the ContactList.
*
* @param displayName the displayed name of the user.
* @return the full jid w/ resource of the user.
*/
public String getJIDFromDisplayName(String displayName) {
ContactList contactList = SparkManager.getWorkspace().getContactList();
ContactItem item = contactList.getContactItemByDisplayName(displayName);
if (item != null) {
return getFullJID(item.getJID());
}
return null;
}
/**
* Returns the full jid (with resource) based on the user's jid.
*
* @param jid the users bare jid.
* @return the full jid with resource.
*/
public String getFullJID(String jid) {
Presence presence = PresenceManager.getPresence(jid);
return presence.getFrom();
}
public void searchContacts(String contact, final JFrame parent) {
if (parents.get(parent) == null && parent.getGlassPane() !=null) {
parents.put(parent, parent.getGlassPane());
}
// Make sure we are using the default glass pane
final Component glassPane = parents.get(parent);
parent.setGlassPane(glassPane);
final Map<String, ContactItem> contactMap = new HashMap<String, ContactItem>();
final List<ContactItem> contacts = new ArrayList<ContactItem>();
final ContactList contactList = SparkManager.getWorkspace().getContactList();
for (ContactGroup contactGroup : contactList.getContactGroups()) {
contactGroup.clearSelection();
for (ContactItem contactItem : contactGroup.getContactItems()) {
if (!contactMap.containsKey(contactItem.getJID())) {
contacts.add(contactItem);
contactMap.put(contactItem.getJID(), contactItem);
}
}
}
// Sort
Collections.sort(contacts, itemComparator);
final JContactItemField contactField = new JContactItemField(new ArrayList<ContactItem>(contacts));
JPanel layoutPanel = new JPanel();
layoutPanel.setLayout(new GridBagLayout());
JLabel enterLabel = new JLabel(Res.getString("label.contact.to.find"));
enterLabel.setFont(new Font("dialog", Font.BOLD, 10));
layoutPanel.add(enterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0));
layoutPanel.add(contactField, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 50, 0));
layoutPanel.setBorder(BorderFactory.createBevelBorder(0));
contactField.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent keyEvent) {
if (keyEvent.getKeyChar() == KeyEvent.VK_ENTER) {
if (ModelUtil.hasLength(contactField.getText())) {
ContactItem item = contactMap.get(contactField.getText());
if (item == null) {
item = contactField.getSelectedContactItem();
}
if (item != null) {
parent.setGlassPane(glassPane);
parent.getGlassPane().setVisible(false);
contactField.dispose();
SparkManager.getChatManager().activateChat(item.getJID(), item.getDisplayName());
}
}
}
else if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) {
parent.setGlassPane(glassPane);
parent.getGlassPane().setVisible(false);
contactField.dispose();
}
}
});
contactField.getList().addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if(SwingUtilities.isRightMouseButton(e))
{
contactField.setSelectetIndex(e);
ContactItem item = contactField.getSelectedContactItem();
MouseEvent exx = new MouseEvent((Component) e.getSource(),e.getID(), e.getWhen(),e.getModifiers(),e.getX()+20, e.getY(), e.getClickCount(), false);
SparkManager.getContactList().setSelectedUser(item.getJID());
SparkManager.getContactList().showPopup(contactField.getPopup(),exx,item);
}
if (e.getClickCount() == 2) {
if (ModelUtil.hasLength(contactField.getText())) {
ContactItem item = contactMap.get(contactField.getText());
if (item == null) {
item = contactField.getSelectedContactItem();
}
if (item != null) {
parent.setGlassPane(glassPane);
parent.getGlassPane().setVisible(false);
contactField.dispose();
SparkManager.getChatManager().activateChat(item.getJID(), item.getDisplayName());
}
}
}
}
});
final JPanel mainPanel = new JPanel(new BorderLayout());
mainPanel.setLayout(new GridBagLayout());
mainPanel.add(layoutPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 200, 0));
mainPanel.setOpaque(false);
contactField.setText(contact);
parent.setGlassPane(mainPanel);
parent.getGlassPane().setVisible(true);
contactField.focus();
mainPanel.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent mouseEvent) {
parent.setGlassPane(glassPane);
parent.getGlassPane().setVisible(false);
contactField.dispose();
}
});
parent.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent windowEvent) {
parent.setGlassPane(glassPane);
parent.getGlassPane().setVisible(false);
contactField.dispose();
parent.removeWindowListener(this);
}
public void windowDeactivated(final WindowEvent windowEvent) {
TimerTask task = new SwingTimerTask() {
public void doRun() {
if (contactField.canClose()) {
windowClosing(windowEvent);
}
}
};
TaskEngine.getInstance().schedule(task, 250);
}
});
}
/**
* Returns the correct JID based on the number of resources signed in.
*
* @param jid the users jid.
* @return the valid jid to use.
*/
public static String getValidJID(String jid) {
Roster roster = SparkManager.getConnection().getRoster();
Iterator<Presence> presences = roster.getPresences(jid);
int count = 0;
Presence p = null;
if (presences.hasNext()) {
p = presences.next();
count++;
}
if (count == 1 && p != null) {
return p.getFrom();
}
else {
return jid;
}
}
/**
* Sorts ContactItems.
*/
final Comparator<ContactItem> itemComparator = new Comparator<ContactItem>() {
public int compare(ContactItem item1, ContactItem item2) {
return item1.getDisplayName().toLowerCase().compareTo(item2.getDisplayName().toLowerCase());
}
};
}
| [
"[email protected]"
] | |
0f6f1dde402ee37bc90cdbf47a8c08e7081b1e1b | 0a8dda4268c68bdd36a12c897e8745bd5f41d8ae | /PageRank/PageRankMapper.java | fa4e3d735f44af2b702d096d1371f32733f7aecd | [] | no_license | suruSharma/Realtime-and-Big-Data-Analytics_NYU | 863b5c9d44dd583850eecb5a7dd72e4c7d55ed73 | 793775845af114082571a2c337b16a0b24b01a18 | refs/heads/master | 2021-01-18T09:01:14.897700 | 2015-09-21T02:07:51 | 2015-09-21T02:07:51 | 32,812,629 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,119 | java | package pageRank;
import java.io.IOException;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
/**
* @author Suruchi Sharma
* N15950208
* [email protected]
*
*/
public class PageRankMapper extends Mapper<LongWritable, Text, Text, Text> {
/*
* (non-Javadoc)
*
* @see org.apache.hadoop.mapreduce.Mapper#map(KEYIN, VALUEIN,
* org.apache.hadoop.mapreduce.Mapper.Context)
*/
public void map(LongWritable key, Text value, Context context)
throws IOException, InterruptedException {
String line = value.toString();
String[] split = line.split(" ");
int length = split.length;
String source = split[0];
String outLinks = "";
float defaultPageRank = Float.parseFloat(split[length-1]);
int numOfOutLinks = length - 2;
float actualContribution = defaultPageRank / numOfOutLinks;
for (int i = 1; i < length - 1; i++) {
outLinks += split[i] + " ";
context.write(new Text(split[i]), new Text(source + ","
+ actualContribution));
}
context.write(new Text(source), new Text(outLinks));
}
}
| [
"[email protected]"
] | |
69749887d7e48915d4cdccfb8e51e46ded7dffda | f0c8eb22449d567e8a215e84fbe68e4e8c5a0893 | /plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/InsnList.java | add51071709b8a7aea4bde21b73f760e70c8e368 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | apache/tapestry-5 | 6c8c9d5f1f28abe03f424b21b1ff96af9955f76d | b5bda40756c5e946901d18694a094f023ba6d2b5 | refs/heads/master | 2023-08-28T16:05:10.291603 | 2023-07-13T17:25:04 | 2023-07-13T17:25:04 | 4,416,959 | 89 | 103 | Apache-2.0 | 2023-09-14T11:59:30 | 2012-05-23T07:00:11 | Java | UTF-8 | Java | false | false | 19,164 | java | // ASM: a very small and fast Java bytecode manipulation framework
// Copyright (c) 2000-2011 INRIA, France Telecom
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holders nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
package org.apache.tapestry5.internal.plastic.asm.tree;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.apache.tapestry5.internal.plastic.asm.MethodVisitor;
/**
* A doubly linked list of {@link AbstractInsnNode} objects. <i>This implementation is not thread
* safe</i>.
*/
public class InsnList implements Iterable<AbstractInsnNode> {
/** The number of instructions in this list. */
private int size;
/** The first instruction in this list. May be {@literal null}. */
private AbstractInsnNode firstInsn;
/** The last instruction in this list. May be {@literal null}. */
private AbstractInsnNode lastInsn;
/**
* A cache of the instructions of this list. This cache is used to improve the performance of the
* {@link #get} method.
*/
AbstractInsnNode[] cache;
/**
* Returns the number of instructions in this list.
*
* @return the number of instructions in this list.
*/
public int size() {
return size;
}
/**
* Returns the first instruction in this list.
*
* @return the first instruction in this list, or {@literal null} if the list is empty.
*/
public AbstractInsnNode getFirst() {
return firstInsn;
}
/**
* Returns the last instruction in this list.
*
* @return the last instruction in this list, or {@literal null} if the list is empty.
*/
public AbstractInsnNode getLast() {
return lastInsn;
}
/**
* Returns the instruction whose index is given. This method builds a cache of the instructions in
* this list to avoid scanning the whole list each time it is called. Once the cache is built,
* this method runs in constant time. This cache is invalidated by all the methods that modify the
* list.
*
* @param index the index of the instruction that must be returned.
* @return the instruction whose index is given.
* @throws IndexOutOfBoundsException if (index < 0 || index >= size()).
*/
public AbstractInsnNode get(final int index) {
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException();
}
if (cache == null) {
cache = toArray();
}
return cache[index];
}
/**
* Returns {@literal true} if the given instruction belongs to this list. This method always scans
* the instructions of this list until it finds the given instruction or reaches the end of the
* list.
*
* @param insnNode an instruction.
* @return {@literal true} if the given instruction belongs to this list.
*/
public boolean contains(final AbstractInsnNode insnNode) {
AbstractInsnNode currentInsn = firstInsn;
while (currentInsn != null && currentInsn != insnNode) {
currentInsn = currentInsn.nextInsn;
}
return currentInsn != null;
}
/**
* Returns the index of the given instruction in this list. This method builds a cache of the
* instruction indexes to avoid scanning the whole list each time it is called. Once the cache is
* built, this method run in constant time. The cache is invalidated by all the methods that
* modify the list.
*
* @param insnNode an instruction <i>of this list</i>.
* @return the index of the given instruction in this list. <i>The result of this method is
* undefined if the given instruction does not belong to this list</i>. Use {@link #contains }
* to test if an instruction belongs to an instruction list or not.
*/
public int indexOf(final AbstractInsnNode insnNode) {
if (cache == null) {
cache = toArray();
}
return insnNode.index;
}
/**
* Makes the given visitor visit all the instructions in this list.
*
* @param methodVisitor the method visitor that must visit the instructions.
*/
public void accept(final MethodVisitor methodVisitor) {
AbstractInsnNode currentInsn = firstInsn;
while (currentInsn != null) {
currentInsn.accept(methodVisitor);
currentInsn = currentInsn.nextInsn;
}
}
/**
* Returns an iterator over the instructions in this list.
*
* @return an iterator over the instructions in this list.
*/
@Override
public ListIterator<AbstractInsnNode> iterator() {
return iterator(0);
}
/**
* Returns an iterator over the instructions in this list.
*
* @param index index of instruction for the iterator to start at.
* @return an iterator over the instructions in this list.
*/
@SuppressWarnings("unchecked")
public ListIterator<AbstractInsnNode> iterator(final int index) {
return new InsnListIterator(index);
}
/**
* Returns an array containing all the instructions in this list.
*
* @return an array containing all the instructions in this list.
*/
public AbstractInsnNode[] toArray() {
int currentInsnIndex = 0;
AbstractInsnNode currentInsn = firstInsn;
AbstractInsnNode[] insnNodeArray = new AbstractInsnNode[size];
while (currentInsn != null) {
insnNodeArray[currentInsnIndex] = currentInsn;
currentInsn.index = currentInsnIndex++;
currentInsn = currentInsn.nextInsn;
}
return insnNodeArray;
}
/**
* Replaces an instruction of this list with another instruction.
*
* @param oldInsnNode an instruction <i>of this list</i>.
* @param newInsnNode another instruction, <i>which must not belong to any {@link InsnList}</i>.
*/
public void set(final AbstractInsnNode oldInsnNode, final AbstractInsnNode newInsnNode) {
AbstractInsnNode nextInsn = oldInsnNode.nextInsn;
newInsnNode.nextInsn = nextInsn;
if (nextInsn != null) {
nextInsn.previousInsn = newInsnNode;
} else {
lastInsn = newInsnNode;
}
AbstractInsnNode previousInsn = oldInsnNode.previousInsn;
newInsnNode.previousInsn = previousInsn;
if (previousInsn != null) {
previousInsn.nextInsn = newInsnNode;
} else {
firstInsn = newInsnNode;
}
if (cache != null) {
int index = oldInsnNode.index;
cache[index] = newInsnNode;
newInsnNode.index = index;
} else {
newInsnNode.index = 0; // newInsnNode now belongs to an InsnList.
}
oldInsnNode.index = -1; // oldInsnNode no longer belongs to an InsnList.
oldInsnNode.previousInsn = null;
oldInsnNode.nextInsn = null;
}
/**
* Adds the given instruction to the end of this list.
*
* @param insnNode an instruction, <i>which must not belong to any {@link InsnList}</i>.
*/
public void add(final AbstractInsnNode insnNode) {
++size;
if (lastInsn == null) {
firstInsn = insnNode;
lastInsn = insnNode;
} else {
lastInsn.nextInsn = insnNode;
insnNode.previousInsn = lastInsn;
}
lastInsn = insnNode;
cache = null;
insnNode.index = 0; // insnNode now belongs to an InsnList.
}
/**
* Adds the given instructions to the end of this list.
*
* @param insnList an instruction list, which is cleared during the process. This list must be
* different from 'this'.
*/
public void add(final InsnList insnList) {
if (insnList.size == 0) {
return;
}
size += insnList.size;
if (lastInsn == null) {
firstInsn = insnList.firstInsn;
lastInsn = insnList.lastInsn;
} else {
AbstractInsnNode firstInsnListElement = insnList.firstInsn;
lastInsn.nextInsn = firstInsnListElement;
firstInsnListElement.previousInsn = lastInsn;
lastInsn = insnList.lastInsn;
}
cache = null;
insnList.removeAll(false);
}
/**
* Inserts the given instruction at the beginning of this list.
*
* @param insnNode an instruction, <i>which must not belong to any {@link InsnList}</i>.
*/
public void insert(final AbstractInsnNode insnNode) {
++size;
if (firstInsn == null) {
firstInsn = insnNode;
lastInsn = insnNode;
} else {
firstInsn.previousInsn = insnNode;
insnNode.nextInsn = firstInsn;
}
firstInsn = insnNode;
cache = null;
insnNode.index = 0; // insnNode now belongs to an InsnList.
}
/**
* Inserts the given instructions at the beginning of this list.
*
* @param insnList an instruction list, which is cleared during the process. This list must be
* different from 'this'.
*/
public void insert(final InsnList insnList) {
if (insnList.size == 0) {
return;
}
size += insnList.size;
if (firstInsn == null) {
firstInsn = insnList.firstInsn;
lastInsn = insnList.lastInsn;
} else {
AbstractInsnNode lastInsnListElement = insnList.lastInsn;
firstInsn.previousInsn = lastInsnListElement;
lastInsnListElement.nextInsn = firstInsn;
firstInsn = insnList.firstInsn;
}
cache = null;
insnList.removeAll(false);
}
/**
* Inserts the given instruction after the specified instruction.
*
* @param previousInsn an instruction <i>of this list</i> after which insnNode must be inserted.
* @param insnNode the instruction to be inserted, <i>which must not belong to any {@link
* InsnList}</i>.
*/
public void insert(final AbstractInsnNode previousInsn, final AbstractInsnNode insnNode) {
++size;
AbstractInsnNode nextInsn = previousInsn.nextInsn;
if (nextInsn == null) {
lastInsn = insnNode;
} else {
nextInsn.previousInsn = insnNode;
}
previousInsn.nextInsn = insnNode;
insnNode.nextInsn = nextInsn;
insnNode.previousInsn = previousInsn;
cache = null;
insnNode.index = 0; // insnNode now belongs to an InsnList.
}
/**
* Inserts the given instructions after the specified instruction.
*
* @param previousInsn an instruction <i>of this list</i> after which the instructions must be
* inserted.
* @param insnList the instruction list to be inserted, which is cleared during the process. This
* list must be different from 'this'.
*/
public void insert(final AbstractInsnNode previousInsn, final InsnList insnList) {
if (insnList.size == 0) {
return;
}
size += insnList.size;
AbstractInsnNode firstInsnListElement = insnList.firstInsn;
AbstractInsnNode lastInsnListElement = insnList.lastInsn;
AbstractInsnNode nextInsn = previousInsn.nextInsn;
if (nextInsn == null) {
lastInsn = lastInsnListElement;
} else {
nextInsn.previousInsn = lastInsnListElement;
}
previousInsn.nextInsn = firstInsnListElement;
lastInsnListElement.nextInsn = nextInsn;
firstInsnListElement.previousInsn = previousInsn;
cache = null;
insnList.removeAll(false);
}
/**
* Inserts the given instruction before the specified instruction.
*
* @param nextInsn an instruction <i>of this list</i> before which insnNode must be inserted.
* @param insnNode the instruction to be inserted, <i>which must not belong to any {@link
* InsnList}</i>.
*/
public void insertBefore(final AbstractInsnNode nextInsn, final AbstractInsnNode insnNode) {
++size;
AbstractInsnNode previousInsn = nextInsn.previousInsn;
if (previousInsn == null) {
firstInsn = insnNode;
} else {
previousInsn.nextInsn = insnNode;
}
nextInsn.previousInsn = insnNode;
insnNode.nextInsn = nextInsn;
insnNode.previousInsn = previousInsn;
cache = null;
insnNode.index = 0; // insnNode now belongs to an InsnList.
}
/**
* Inserts the given instructions before the specified instruction.
*
* @param nextInsn an instruction <i>of this list</i> before which the instructions must be
* inserted.
* @param insnList the instruction list to be inserted, which is cleared during the process. This
* list must be different from 'this'.
*/
public void insertBefore(final AbstractInsnNode nextInsn, final InsnList insnList) {
if (insnList.size == 0) {
return;
}
size += insnList.size;
AbstractInsnNode firstInsnListElement = insnList.firstInsn;
AbstractInsnNode lastInsnListElement = insnList.lastInsn;
AbstractInsnNode previousInsn = nextInsn.previousInsn;
if (previousInsn == null) {
firstInsn = firstInsnListElement;
} else {
previousInsn.nextInsn = firstInsnListElement;
}
nextInsn.previousInsn = lastInsnListElement;
lastInsnListElement.nextInsn = nextInsn;
firstInsnListElement.previousInsn = previousInsn;
cache = null;
insnList.removeAll(false);
}
/**
* Removes the given instruction from this list.
*
* @param insnNode the instruction <i>of this list</i> that must be removed.
*/
public void remove(final AbstractInsnNode insnNode) {
--size;
AbstractInsnNode nextInsn = insnNode.nextInsn;
AbstractInsnNode previousInsn = insnNode.previousInsn;
if (nextInsn == null) {
if (previousInsn == null) {
firstInsn = null;
lastInsn = null;
} else {
previousInsn.nextInsn = null;
lastInsn = previousInsn;
}
} else {
if (previousInsn == null) {
firstInsn = nextInsn;
nextInsn.previousInsn = null;
} else {
previousInsn.nextInsn = nextInsn;
nextInsn.previousInsn = previousInsn;
}
}
cache = null;
insnNode.index = -1; // insnNode no longer belongs to an InsnList.
insnNode.previousInsn = null;
insnNode.nextInsn = null;
}
/**
* Removes all the instructions of this list.
*
* @param mark if the instructions must be marked as no longer belonging to any {@link InsnList}.
*/
void removeAll(final boolean mark) {
if (mark) {
AbstractInsnNode currentInsn = firstInsn;
while (currentInsn != null) {
AbstractInsnNode next = currentInsn.nextInsn;
currentInsn.index = -1; // currentInsn no longer belongs to an InsnList.
currentInsn.previousInsn = null;
currentInsn.nextInsn = null;
currentInsn = next;
}
}
size = 0;
firstInsn = null;
lastInsn = null;
cache = null;
}
/** Removes all the instructions of this list. */
public void clear() {
removeAll(false);
}
/**
* Resets all the labels in the instruction list. This method should be called before reusing an
* instruction list between several <code>ClassWriter</code>s.
*/
public void resetLabels() {
AbstractInsnNode currentInsn = firstInsn;
while (currentInsn != null) {
if (currentInsn instanceof LabelNode) {
((LabelNode) currentInsn).resetLabel();
}
currentInsn = currentInsn.nextInsn;
}
}
// Note: this class is not generified because it would create bridges.
@SuppressWarnings("rawtypes")
private final class InsnListIterator implements ListIterator {
AbstractInsnNode nextInsn;
AbstractInsnNode previousInsn;
AbstractInsnNode remove;
InsnListIterator(final int index) {
if (index < 0 || index > size()) {
throw new IndexOutOfBoundsException();
} else if (index == size()) {
nextInsn = null;
previousInsn = getLast();
} else {
AbstractInsnNode currentInsn = getFirst();
for (int i = 0; i < index; i++) {
currentInsn = currentInsn.nextInsn;
}
nextInsn = currentInsn;
previousInsn = currentInsn.previousInsn;
}
}
@Override
public boolean hasNext() {
return nextInsn != null;
}
@Override
public Object next() {
if (nextInsn == null) {
throw new NoSuchElementException();
}
AbstractInsnNode result = nextInsn;
previousInsn = result;
nextInsn = result.nextInsn;
remove = result;
return result;
}
@Override
public void remove() {
if (remove != null) {
if (remove == nextInsn) {
nextInsn = nextInsn.nextInsn;
} else {
previousInsn = previousInsn.previousInsn;
}
InsnList.this.remove(remove);
remove = null;
} else {
throw new IllegalStateException();
}
}
@Override
public boolean hasPrevious() {
return previousInsn != null;
}
@Override
public Object previous() {
if (previousInsn == null) {
throw new NoSuchElementException();
}
AbstractInsnNode result = previousInsn;
nextInsn = result;
previousInsn = result.previousInsn;
remove = result;
return result;
}
@Override
public int nextIndex() {
if (nextInsn == null) {
return size();
}
if (cache == null) {
cache = toArray();
}
return nextInsn.index;
}
@Override
public int previousIndex() {
if (previousInsn == null) {
return -1;
}
if (cache == null) {
cache = toArray();
}
return previousInsn.index;
}
@Override
public void add(final Object o) {
if (nextInsn != null) {
InsnList.this.insertBefore(nextInsn, (AbstractInsnNode) o);
} else if (previousInsn != null) {
InsnList.this.insert(previousInsn, (AbstractInsnNode) o);
} else {
InsnList.this.add((AbstractInsnNode) o);
}
previousInsn = (AbstractInsnNode) o;
remove = null;
}
@Override
public void set(final Object o) {
if (remove != null) {
InsnList.this.set(remove, (AbstractInsnNode) o);
if (remove == previousInsn) {
previousInsn = (AbstractInsnNode) o;
} else {
nextInsn = (AbstractInsnNode) o;
}
} else {
throw new IllegalStateException();
}
}
}
}
| [
"[email protected]"
] | |
cb52e6834c580639e7d88d5dab315c9e68496ae0 | 895c7417c18354d3bc8b458bf7a8a79b6caf8509 | /src/main/java/work_with_string/first_level/TwoChar.java | 1ed69bda4432b2827bcecd31a2f28fe38988a42f | [] | no_license | J-Bykova/coding | 8f6d1bebafd6fc60ab42c9e99e499660878e1938 | e261f541ae18585e917a36d2f242cbaa87eaf9c4 | refs/heads/master | 2022-12-19T09:08:27.210666 | 2020-09-20T11:05:54 | 2020-09-20T11:05:54 | 255,756,140 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 273 | java | package work_with_string.first_level;
public class TwoChar {
static String twoChar(String str, int index) {
if (index > 0 && index <= str.length() - 2) {
return str.substring(index, index + 2);
}
return str.substring(0, 2);
}
}
| [
"[email protected]"
] | |
f741f85f4bef250105886443ea941c20b5a2b634 | a49f4b9402cfea765fe1659bb00f701f9af1522c | /accentis-gui/src/main/java/ca/msbsoftware/accentis/gui/views/TransferTransactionEditorTab.java | 244116dd860cb4ad088f8a1a5042f769336b0f7e | [] | no_license | marcboudreau/accentis-java | c3928c628b2b2a9190be220a50d54aa7bc94f408 | 2ecb62f571a5cec59a52960aa8cf85a91e2e4865 | refs/heads/master | 2021-05-29T12:57:03.354418 | 2015-04-02T02:39:17 | 2015-04-02T02:39:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,240 | java | package ca.msbsoftware.accentis.gui.views;
import static java.awt.GridBagConstraints.CENTER;
import static java.awt.GridBagConstraints.HORIZONTAL;
import static java.awt.GridBagConstraints.NONE;
import static java.awt.GridBagConstraints.WEST;
import java.awt.GridBagConstraints;
import javax.swing.JLabel;
import ca.msbsoftware.accentis.persistence.PersistenceManager;
import ca.msbsoftware.accentis.persistence.pojos.Account;
import ca.msbsoftware.accentis.persistence.pojos.Individual;
import ca.msbsoftware.accentis.persistence.pojos.Transaction;
import ca.msbsoftware.accentis.gui.GUIApplication;
import ca.msbsoftware.accentis.gui.InsetsConstants;
import ca.msbsoftware.accentis.gui.Resources;
import ca.msbsoftware.accentis.gui.models.PojoComboBoxModel;
import ca.msbsoftware.accentis.gui.transactions.TransferTransactionAdapter;
import ca.msbsoftware.accentis.persistence.listeners.IPersistenceManagerListener;
@SuppressWarnings("serial")
public class TransferTransactionEditorTab extends AbstractTransactionEditorTab implements IPersistenceManagerListener {
private TransferTransactionAdapter adaptedTransaction;
public TransferTransactionEditorTab(TransactionEditorComponent editor) {
super(editor);
GUIApplication.getInstance().addPersistenceManagerListener(this);
}
@Override
protected void createContent() {
/*
* Adding components as they appear in the layout from left to right, top to bottom.
*/
add(new JLabel(Resources.getInstance().getString("transactioneditor.from.caption")), new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, WEST, NONE, //$NON-NLS-1$
InsetsConstants.FIVE_ON_LEFT_INSETS, 0, 0));
add(getFromAccountComboBox(), new GridBagConstraints(3, 0, 2, 1, 1.0, 0.0, CENTER, HORIZONTAL, InsetsConstants.FIVE_ON_LEFT_INSETS, 0, 0));
add(new JLabel(Resources.getInstance().getString("transactioneditor.date.caption")), new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0, WEST, NONE, //$NON-NLS-1$
InsetsConstants.FIVE_ON_LEFT_INSETS, 0, 0));
add(getDateField(), new GridBagConstraints(6, 0, 1, 1, 0.0, 0.0, CENTER, NONE, InsetsConstants.FIVE_ON_LEFT_INSETS, 0, 0));
add(new JLabel(Resources.getInstance().getString("transactioneditor.reference.caption")), new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, WEST, NONE, //$NON-NLS-1$
InsetsConstants.FIVE_ON_TOP_INSETS, 0, 0));
add(getReferenceField(), new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, CENTER, NONE, InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(new JLabel(Resources.getInstance().getString("transactioneditor.to.caption")), new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, WEST, NONE, //$NON-NLS-1$
InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(getToAccountComboBox(), new GridBagConstraints(3, 1, 2, 1, 1.0, 0.0, CENTER, HORIZONTAL, InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(new JLabel(Resources.getInstance().getString("transactioneditor.amount.caption")), new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0, WEST, NONE, //$NON-NLS-1$
InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(getAmountField(), new GridBagConstraints(6, 1, 1, 1, 0.0, 0.0, CENTER, NONE, InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(new JLabel(Resources.getInstance().getString("transactioneditor.individual.caption")), new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, WEST, NONE, //$NON-NLS-1$
InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(getIndividualComboBox(), new GridBagConstraints(3, 2, 2, 1, 1.0, 0.0, CENTER, HORIZONTAL, InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(new JLabel(Resources.getInstance().getString("transactioneditor.description.caption")), new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, WEST, NONE, //$NON-NLS-1$
InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
add(getDescriptionField(), new GridBagConstraints(3, 3, 2, 1, 1.0, 0.0, CENTER, HORIZONTAL, InsetsConstants.FIVE_ON_TOP_AND_LEFT_INSETS, 0, 0));
}
@Override
void setTransaction(Transaction transaction) {
adaptedTransaction = new TransferTransactionAdapter(transaction, getTransactionEditor().getAccount());
getReferenceField().setText(adaptedTransaction.getReference());
getFromAccountComboBox().setSelectedItem(adaptedTransaction.getFromAccount());
getToAccountComboBox().setSelectedItem(adaptedTransaction.getToAccount());
getIndividualComboBox().setSelectedItem(adaptedTransaction.getIndividual());
getDescriptionField().setText(adaptedTransaction.getDescription());
getDateField().setValue(adaptedTransaction.getDate());
getAmountField().setValue(adaptedTransaction.getAmount());
}
@Override
protected void commitChanges() {
assert null != adaptedTransaction : "null Transaction encountered in TransferTransactionEditorView commitChanges"; //$NON-NLS-1$
adaptedTransaction.setAmount(getAmountField().getBigDecimalValue());
adaptedTransaction.setDate(getDateField().getDateValue());
adaptedTransaction.setDescription(getDescriptionField().getText());
adaptedTransaction.setFromAccount((Account) getFromAccountComboBox().getSelectedItem());
adaptedTransaction.setIndividual((Individual) getIndividualComboBox().getSelectedItem());
adaptedTransaction.setReference(getReferenceField().getText());
adaptedTransaction.setToAccount((Account) getToAccountComboBox().getSelectedItem());
adaptedTransaction.saveTransaction();
}
@Override
public void persistenceManagerChanged(PersistenceManager persistenceManager) {
if (null != persistenceManager) {
((PojoComboBoxModel<Account>) getFromAccountComboBox().getModel()).reload(PersistenceManager.EMPTY_PARAMETER_MAP);
((PojoComboBoxModel<Account>) getToAccountComboBox().getModel()).reload(PersistenceManager.EMPTY_PARAMETER_MAP);
((PojoComboBoxModel<Individual>) getIndividualComboBox().getModel()).reload(PersistenceManager.EMPTY_PARAMETER_MAP);
}
}
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
getReferenceField().setEnabled(enabled);
getFromAccountComboBox().setEnabled(enabled);
getToAccountComboBox().setEnabled(enabled);
getIndividualComboBox().setEnabled(enabled);
getDescriptionField().setEnabled(enabled);
getDateField().setEnabled(enabled);
getAmountField().setEnabled(enabled);
}
}
| [
"[email protected]"
] | |
1819ead06c334aad51816142c72a350088abb665 | 30472cec0dbe044d52b029530051ab404701687f | /src/main/java/com/sforce/soap/tooling/metadata/ProfileUserPermission.java | 68c89128bcd6a5f6c3e20ca4b4c2b5caf1c77e47 | [
"BSD-3-Clause"
] | permissive | madmax983/ApexLink | f8e9dcf8f697ed4e34ddcac353c13bec707f3670 | 30c989ce2c0098097bfaf586b87b733853913155 | refs/heads/master | 2020-05-07T16:03:15.046972 | 2019-04-08T21:08:06 | 2019-04-08T21:08:06 | 180,655,963 | 1 | 0 | null | 2019-04-10T20:08:30 | 2019-04-10T20:08:30 | null | UTF-8 | Java | false | false | 6,020 | java | package com.sforce.soap.tooling.metadata;
/**
* This is a generated class for the SObject Enterprise API.
* Do not edit this file, as your changes will be lost.
*/
public class ProfileUserPermission implements com.sforce.ws.bind.XMLizable {
/**
* Constructor
*/
public ProfileUserPermission() {}
/* Cache the typeInfo instead of declaring static fields throughout*/
private transient java.util.Map<String, com.sforce.ws.bind.TypeInfo> typeInfoCache = new java.util.HashMap<String, com.sforce.ws.bind.TypeInfo>();
private com.sforce.ws.bind.TypeInfo _lookupTypeInfo(String fieldName, String namespace, String name, String typeNS, String type, int minOcc, int maxOcc, boolean elementForm) {
com.sforce.ws.bind.TypeInfo typeInfo = typeInfoCache.get(fieldName);
if (typeInfo == null) {
typeInfo = new com.sforce.ws.bind.TypeInfo(namespace, name, typeNS, type, minOcc, maxOcc, elementForm);
typeInfoCache.put(fieldName, typeInfo);
}
return typeInfo;
}
/**
* element : enabled of type {http://www.w3.org/2001/XMLSchema}boolean
* java type: boolean
*/
private boolean enabled__is_set = false;
private boolean enabled;
public boolean getEnabled() {
return enabled;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
enabled__is_set = true;
}
protected void setEnabled(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
__in.peekTag();
if (__typeMapper.verifyElement(__in, _lookupTypeInfo("enabled", "urn:metadata.tooling.soap.sforce.com","enabled","http://www.w3.org/2001/XMLSchema","boolean",1,1,true))) {
setEnabled(__typeMapper.readBoolean(__in, _lookupTypeInfo("enabled", "urn:metadata.tooling.soap.sforce.com","enabled","http://www.w3.org/2001/XMLSchema","boolean",1,1,true), boolean.class));
}
}
private void writeFieldEnabled(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
__typeMapper.writeObject(__out, _lookupTypeInfo("enabled", "urn:metadata.tooling.soap.sforce.com","enabled","http://www.w3.org/2001/XMLSchema","boolean",1,1,true), enabled, enabled__is_set);
}
/**
* element : name of type {http://www.w3.org/2001/XMLSchema}string
* java type: java.lang.String
*/
private boolean name__is_set = false;
private java.lang.String name;
public java.lang.String getName() {
return name;
}
public void setName(java.lang.String name) {
this.name = name;
name__is_set = true;
}
protected void setName(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
__in.peekTag();
if (__typeMapper.verifyElement(__in, _lookupTypeInfo("name", "urn:metadata.tooling.soap.sforce.com","name","http://www.w3.org/2001/XMLSchema","string",1,1,true))) {
setName(__typeMapper.readString(__in, _lookupTypeInfo("name", "urn:metadata.tooling.soap.sforce.com","name","http://www.w3.org/2001/XMLSchema","string",1,1,true), java.lang.String.class));
}
}
private void writeFieldName(com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
__typeMapper.writeObject(__out, _lookupTypeInfo("name", "urn:metadata.tooling.soap.sforce.com","name","http://www.w3.org/2001/XMLSchema","string",1,1,true), name, name__is_set);
}
/**
*/
@Override
public void write(javax.xml.namespace.QName __element,
com.sforce.ws.parser.XmlOutputStream __out, com.sforce.ws.bind.TypeMapper __typeMapper)
throws java.io.IOException {
__out.writeStartTag(__element.getNamespaceURI(), __element.getLocalPart());
writeFields(__out, __typeMapper);
__out.writeEndTag(__element.getNamespaceURI(), __element.getLocalPart());
}
protected void writeFields(com.sforce.ws.parser.XmlOutputStream __out,
com.sforce.ws.bind.TypeMapper __typeMapper)
throws java.io.IOException {
writeFields1(__out, __typeMapper);
}
@Override
public void load(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
__typeMapper.consumeStartTag(__in);
loadFields(__in, __typeMapper);
__typeMapper.consumeEndTag(__in);
}
protected void loadFields(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
loadFields1(__in, __typeMapper);
}
@Override
public String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append("[ProfileUserPermission ");
toString1(sb);
sb.append("]\n");
return sb.toString();
}
private void toStringHelper(StringBuilder sb, String name, Object value) {
sb.append(' ').append(name).append("='").append(com.sforce.ws.util.Verbose.toString(value)).append("'\n");
}
private void writeFields1(com.sforce.ws.parser.XmlOutputStream __out,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException {
writeFieldEnabled(__out, __typeMapper);
writeFieldName(__out, __typeMapper);
}
private void loadFields1(com.sforce.ws.parser.XmlInputStream __in,
com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException {
setEnabled(__in, __typeMapper);
setName(__in, __typeMapper);
}
private void toString1(StringBuilder sb) {
toStringHelper(sb, "enabled", enabled);
toStringHelper(sb, "name", name);
}
}
| [
"[email protected]"
] | |
9e2dbd6d7240682b86c581b9512c5c3901575151 | 8101c2e8a2b16257ce3434043465612f201aebf3 | /src/main/java/com/example/fieldforce/repositories/StreetRepo.java | 232ad4fc41ff778b9fbade0a0188658a5ec39a27 | [] | no_license | raviknkumar/fieldforce | 5ceff49ad1d5f5aa04eb4f66ca551bee70023dbc | fedb523d34f101ff80fd2aed2ac47ed0fd4a81ac | refs/heads/main | 2023-01-30T15:23:38.012965 | 2020-12-16T09:28:09 | 2020-12-16T09:28:09 | 321,270,948 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 225 | java | package com.example.fieldforce.repositories;
import com.example.fieldforce.entity.Street;
import org.springframework.data.jpa.repository.JpaRepository;
public interface StreetRepo extends JpaRepository<Street, Integer> {
}
| [
"[email protected]"
] | |
be019ece88bf170adb42c64daeacba667504fa61 | b398d9d19fb8b18c1822930a7cf0f2bb0b0c3840 | /gmp-top/src/main/java/edu/gemini/gmp/top/osgi/TopImplFactory.java | 94b77ec1134992697d6fccf267dedc3050670126 | [
"BSD-2-Clause"
] | permissive | framos-gemini/gmp | a9642be9fc12abbafe684125ca0d0bf1b0ad5e73 | 811826574676ec5247d48ebebec6cc6ea95a37b9 | refs/heads/master | 2023-08-18T00:53:17.583839 | 2023-07-19T15:04:19 | 2023-07-19T15:04:19 | 358,715,116 | 0 | 0 | NOASSERTION | 2023-09-13T18:59:25 | 2021-04-16T20:42:53 | Java | UTF-8 | Java | false | false | 2,190 | java | package edu.gemini.gmp.top.osgi;
import com.google.common.collect.Maps;
import edu.gemini.gmp.top.Top;
import edu.gemini.gmp.top.TopImpl;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.cm.ManagedServiceFactory;
import java.util.Dictionary;
import java.util.Hashtable;
import java.util.Map;
import java.util.logging.Logger;
public class TopImplFactory implements ManagedServiceFactory {
private final static String EPICS_TOP = "epicsTop";
private final static String GIAPI_TOP = "giapiTop";
private static final Logger LOG = Logger.getLogger(Top.class.getName());
private final Map<String, ServiceRegistration<Top>> existingServices = Maps.newHashMap();
private final BundleContext context;
public TopImplFactory(BundleContext context) {
this.context = context;
}
public String getName() {
return "Top factory";
}
public void updated(String pid, Dictionary<String, ?> properties) {
if (checkProperties(properties)) {
Top provider = createService(properties);
ServiceRegistration<Top> serviceRegistration = context.registerService(Top.class, provider, new Hashtable<String, Object>());
existingServices.put(pid, serviceRegistration);
} else {
LOG.warning("Cannot build top without the required properties");
}
}
private TopImpl createService(Dictionary<String, ?> properties) {
String epicsTop = properties.get(EPICS_TOP).toString();
String giapiTop = properties.get(GIAPI_TOP).toString();
LOG.info("Build GMP top with epicsTop: " + epicsTop + " and giapiTop: " + giapiTop);
return new TopImpl(epicsTop, giapiTop);
}
private boolean checkProperties(Dictionary<String, ?> properties) {
return properties.get(EPICS_TOP) != null && properties.get(GIAPI_TOP) != null;
}
public void deleted(String pid) {
if (existingServices.containsKey(pid)) {
ServiceRegistration<Top> serviceRef = existingServices.get(pid);
serviceRef.unregister();
existingServices.remove(pid);
}
}
}
| [
"cquiroz@ee6ba543-07f8-4773-b02c-01d50e9d00ba"
] | cquiroz@ee6ba543-07f8-4773-b02c-01d50e9d00ba |
71a3255f51ca7c75a71fe8739596a51b19cbcf95 | 0a3218cf77f6eac99bae8cbef15f82715672d0db | /0_CrawlingBugReport-FIN/src/ver5/struct/C_Parser.java | 0a364461caed0055137f7692cb6c8eab6a1a68e8 | [] | no_license | Horeng/BugReportCrawler | 9260649448ed2a6353aa6bc01ab9b914564d6f65 | 887024cb3c7cabbf19b75d79070ec08282a2821e | refs/heads/master | 2021-01-22T17:29:06.632907 | 2017-03-14T05:22:40 | 2017-03-14T05:22:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 16,516 | java | package ver5.struct;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
//import java.io.File;
//import java.util.Scanner;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import com.github.javaparser.JavaParser;
import com.github.javaparser.ast.CompilationUnit;
import common.Property;
//import java.util.*;
public class C_Parser {
private String url;
private int id[];
private ArrayList<Integer> dupList = new ArrayList<Integer>();
private B_DB db;
static String attachUrl = "https://bugs.eclipse.org/bugs/attachment.cgi?id=";
HashMap<Integer, String> severityList = new HashMap<Integer,String>();
C_Parser(String url) throws Exception
{
System.out.println("---Parser Created...");
this.url=url;
db = new B_DB();
}
public void parse() throws Exception
{
String targetSince = Property.getInstance().getTargetSince();
String targetUntil = Property.getInstance().getTargetUntil();
String targetResolution = Property.getInstance().getTargetResolution();
//search setting
String url = "";
if(A_Main.project.equals("SWT") || A_Main.project.equals("UI")){
url = "https://bugs.eclipse.org/bugs/buglist.cgi?chfieldfrom="+targetSince+"&chfieldto="+targetUntil+"&component="+A_Main.project
+"&limit=0&order=bug_status%2Cpriority%2Cassigned_to%2Cbug_id&product=platform&query_format=advanced&resolution="+targetResolution;
}else if(A_Main.project.equals("JDT")){
url = "https://bugs.eclipse.org/bugs/buglist.cgi?chfieldfrom="+targetSince+"&chfieldto="+targetUntil+"&component=ui"
+"&limit=0&order=bug_status%2Cpriority%2Cassigned_to%2Cbug_id&query_format=advanced&resolution="+targetResolution+"&product="+A_Main.project;
}else
url = "https://bugs.eclipse.org/bugs/buglist.cgi?chfieldfrom="+targetSince+"&chfieldto="+targetUntil+"&"
+"limit=0&order=bug_status%2Cpriority%2Cassigned_to%2Cbug_id&query_format=advanced&resolution="+targetResolution+"&product="+A_Main.project;
System.out.println(url);
Document doc = Jsoup.connect(url).maxBodySize(0).timeout(100000).get();
System.out.println("GET SUCCESS");
//normal major critical blocker enhancement minor trivial
String countBug = doc.select("div#bugzilla-body span.bz_result_count").text();
for(int i=0;i<countBug.length();i++){
if(countBug.charAt(i)==' ')
{
countBug = countBug.substring(0, i);
break;
}
}
System.out.println(countBug);
id = new int[Integer.parseInt(countBug)];
// Normal~Trivial = every severity
// Get Every Duplicate BugID
getID(doc,"normal");
getID(doc,"major");
getID(doc,"critical");
getID(doc,"blocker");
getID(doc,"enhancement");
getID(doc,"minor");
getID(doc,"trivial");
//Number Of COMMIT
for(int i=0;i<id.length;i++)
{
if(parse(id[i]))
System.out.println(i +":" + id[i] +" ORIGINAL LIST FINISH");
}
//dupList = db.getDupID();
for(int i=0;i<dupList.size();i++)
{
if(parse(dupList.get(i)))
System.out.println(i +":" + dupList.get(i)+" DUP LIST FINISH // "+dupList.size());
}
//dupList = db.getBugID();
//System.out.println(dupList.size());
new E_Commiter(id,dupList,db);
}
private void getID(Document doc, String str) throws Exception
{
String selectStr = "div#bugzilla-body table.bz_buglist tbody .bz_bugitem.bz_"+str+ " td.first-child.bz_id_column a";
String IDs = doc.select(selectStr).text(); // = show_bug.cgi?id=...
//System.out.println(IDs);
int w=0;
for(w=0;w<id.length;w++)
if(id[w]==0)
break;
System.out.print(w);;
for(int i=w;i<10000;)
{
if(IDs.length()<1) break;
int j;
String tmpID = null;
for(j=0;j<10;j++)
{
char c;
if(IDs.length()<j+1) break;
c = IDs.charAt(j);
if(c==' ')
{
tmpID = IDs.substring(0, j);
IDs=IDs.substring(j+1);
id[i]=Integer.parseInt(tmpID);
i++;
severityList.put(Integer.parseInt(tmpID), str);
break;
}
}
if(!IDs.contains(" "))
{
id[i]=Integer.parseInt(IDs);
severityList.put(Integer.parseInt(tmpID), str);
break;
}
}
for(w=0;w<id.length;w++)
if(id[w]==0)break;
System.out.println(" " + str + " " + w);
}
String contents = "";
public boolean parse(int bugID) throws Exception
{
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar calendar1; Calendar calendar2;
calendar1 = Calendar.getInstance();
calendar2 = Calendar.getInstance();
try{
Document doc = Jsoup.connect(url+bugID).timeout(5000).get();
String prdName = doc.select("td#field_container_product").text();
String compName = doc.select("td#field_container_component").text();
Elements table = doc.select("td#bz_show_bug_column_1 table");
Element tr = table.select("tr").get(5);
String prodVersion =tr.select("td").text();
String bugDates = doc.select("td#bz_show_bug_column_2 tr td").text();
String openDate = bugDates.substring(0,16)+":00";
String bugAut = doc.select("td#bz_show_bug_column_2 .vcard").text();
int k = bugDates.indexOf("(History)");
String modifiedDate = bugDates.substring(k-21,k-5)+":00";
String bugStatus="";
if(doc.select("span#static_bug_status").text().contains("bug")){
bugStatus = doc.select("span#static_bug_status").text().split(" of bug ")[0];
}
else
bugStatus = doc.select("span#static_bug_status").text();
String severity = severityList.get(bugID);
String bugSum = doc.select("*#short_desc_nonedit_display").text();
String bugDes = doc.select("div#c0 .bz_comment_text").text();
String thresholdDate = openDate;
int count = 0;
int j = 0;
for(j=1;;j++)
{
String bugCommentN = "c"+j;
String query = "div#"+bugCommentN+" .vcard";
String bugCommentAut = doc.select(query).text();
if(bugCommentAut.equals(""))
break;
query = "div#"+bugCommentN+" .bz_comment_text";
String bugCommentText = doc.select(query).text();
try
{
if(bugCommentText.length()>99999)
{
System.out.println("CUT BUG REPORT");
bugCommentText=bugCommentText.substring(0, 9999);
}
}
catch(Exception e){ System.out.println("TOO BIG COMMENT");}
query = "div#"+bugCommentN+" .bz_comment_time";
String bugCommentTime = doc.select(query).text();
if(bugAut.equals(bugCommentAut)){
thresholdDate = bugCommentTime.substring(0, 19)+":00";
}else
count++;
db.insertComment(bugID, bugCommentTime.substring(0, 19), bugCommentText.replace("'","."), bugCommentAut.replace("'","."));
}
// MISOO Stack Trace Regular Expression
String stackTrace ="";
String tracePattern = "(([a-zA-Z0-9_\\-$]*\\.)*[a-zA-Z_<][a-zA-Z0-9_\\-$>]*" +
"[a-zA-Z_<(][a-zA-Z0-9_\\-$>);/\\[]*" +
"\\(([a-zA-Z_][a-zA-Z0-9_\\-]*\\.java:[0-9]*|[a-zA-Z_][a-zA-Z0-9_\\-]*\\.java\\((?i)inlined compiled code\\)|[a-zA-Z_][a-zA-Z0-9_\\-]*\\.java\\((?i)compiled code\\)|(?i)native method|(?i)unknown source)\\))";
Pattern r = Pattern.compile(tracePattern);
Matcher m = r.matcher(bugDes);
while (m.find()) {
String group = m.group();
stackTrace = stackTrace+"\n"+group;
bugDes.replace(group, "");
}
String[] temp = bugDes.split("}");
// Misoo Source Coe Regular Expression
/* String sourcePattern = "\\s*(public|private)\\s+class\\s+(\\w+)\\s+((extends\\s+\\w+)|(implements\\s+\\w+( ,\\w+)*))?\\s*\\{";
sourcePattern = sourcePattern + "}";
r = Pattern.compile(sourcePattern);
m = r.matcher(bugDes);
String sourceCode = "";
while(m.find()){
String group = m.group();
System.out.println(group);
sourceCode =sourceCode +" "+group;
bugDes.replace(group, "");
}
System.out.println(sourceCode);
//sourcePattern = "\\{([^()]|(?R))*\\}";
//sourcePattern = "(\\{([^{}]|())*\\})";
sourcePattern = "$\\{(.*)\\}";
r = Pattern.compile(sourcePattern);
m = r.matcher(bugDes);
while(m.find()){
String group = m.group();
sourceCode =sourceCode +" "+group;
bugDes.replace(group, "");
}
System.out.println(sourceCode);
// Wrong Regular Expression
sourcePattern = "^(?![\\s]*\\r?\\n|import|package|[\\s]*}\\r?\\n|[\\s]*\\|[\\s]*\\*|[\\s]*\\*).*\\r?\\n";
r = Pattern.compile(sourcePattern);
m = r.matcher(bugDes);
sourceCode = sourceCode="\n";
while(m.find()){
String group = m.group();
sourceCode =sourceCode +" "+group;
bugDes.replace(group, "");
}
System.out.println(sourceCode);*/
// MISOO STRUCTURE DATA
String reproduct = "";
String observed = "";
String expected ="";
if(Property.getInstance().getTargetStruct()){
if(! ((bugDes.contains("repro") || bugDes.contains("REPRO") || bugDes.contains("Repro") ||bugDes.contains("step") || bugDes.contains("STEP") || bugDes.contains("Step") ||
(bugDes.contains("1.") && bugDes.contains("2.")))
&& (bugDes.contains("EXPECT") || bugDes.contains("expect") || bugDes.contains("Expect") || bugDes.contains("want"))
&& (bugDes.contains("OBSERV") || bugDes.contains("observ") || bugDes.contains("Observ") || bugDes.contains("Actual") || bugDes.contains("actual") || bugDes.contains("ACTUAL")))){
//&& (bugDes.contains("result") || bugDes.contains("Result") || bugDes.contains("RESULT")))){
//System.out.println(bugDes);
System.err.println(bugID+" DOESNOT HAVE STRUCT INFO.");
return false;
}
}
int repStartIndex = -1;
int obsStartIndex = -1;
int expStartIndex = -1;
if(bugDes.contains("step"))
repStartIndex = bugDes.indexOf("step");
else if(bugDes.contains("STEP"))
repStartIndex = bugDes.indexOf("STEP");
else if(bugDes.contains("Step"))
repStartIndex = bugDes.indexOf("Step");
else if(bugDes.contains("repro"))
repStartIndex = bugDes.indexOf("repro");
else if(bugDes.contains("REPRO"))
repStartIndex = bugDes.indexOf("REPRO");
else if(bugDes.contains("Repro"))
repStartIndex = bugDes.indexOf("Repro");
else if(bugDes.contains("1.") && bugDes.contains("2. "))
repStartIndex = bugDes.indexOf("1. ");
if(bugDes.contains("OBSERV"))
obsStartIndex = bugDes.indexOf("OBSERV");
else if(bugDes.contains("observ"))
obsStartIndex = bugDes.indexOf("observ");
else if(bugDes.contains("Observ"))
obsStartIndex = bugDes.indexOf("Observ");
else if(bugDes.contains("Actual"))
obsStartIndex = bugDes.indexOf("Actual");
else if(bugDes.contains("actual"))
obsStartIndex = bugDes.indexOf("actual");
else obsStartIndex = bugDes.indexOf("ACTUAL");
if(bugDes.contains("EXPECT"))
expStartIndex = bugDes.indexOf("EXPECT");
else if(bugDes.contains("expect"))
expStartIndex = bugDes.indexOf("expect");
else if(bugDes.contains("Expect"))
expStartIndex = bugDes.indexOf("Expect");
else
expStartIndex = bugDes.indexOf("want");
int repEndIndex = repStartIndex;
int obsEndIndex = obsStartIndex;
int expEndIndex = expStartIndex;
if(repEndIndex > obsEndIndex){
if(repEndIndex > expEndIndex){
repEndIndex = bugDes.length()-1;
if(obsEndIndex > expEndIndex){
obsEndIndex = repStartIndex-1;
expEndIndex = obsStartIndex-1;
}else{
expEndIndex = repStartIndex-1;
obsEndIndex = expStartIndex-1;
}
}else {
expEndIndex = bugDes.length()-1;
repEndIndex = expStartIndex-1;
obsEndIndex = repStartIndex-1;
}
}else if (obsEndIndex > expEndIndex){
if(obsEndIndex > repEndIndex){
obsEndIndex = bugDes.length()-1;
if(expEndIndex > repEndIndex){
expEndIndex = obsStartIndex-1;
repEndIndex = expStartIndex-1;
}else{
expEndIndex = repStartIndex-1;
repEndIndex = obsStartIndex-1;
}
}else{
repEndIndex = bugDes.length()-1;
obsEndIndex = repStartIndex-1;
expEndIndex = obsStartIndex-1;
}
}else if (expEndIndex > obsEndIndex){
if(expEndIndex > repEndIndex){
expEndIndex = bugDes.length()-1;
if(obsEndIndex > repEndIndex){
repEndIndex = obsStartIndex-1;
obsEndIndex = expStartIndex-1;
}else{
obsEndIndex = repStartIndex-1;
repEndIndex = expStartIndex-1;
}
}else{
repEndIndex = bugDes.length()-1;
obsEndIndex = expStartIndex-1;
expEndIndex = repStartIndex-1;
}
}
if(bugDes.length()>99999)bugDes=bugDes.substring(0, 9999);
//MISOO GET HISTORY NUMBER
Document doc3 = Jsoup.connect("https://bugs.eclipse.org/bugs/show_activity.cgi?id="+bugID).maxBodySize(0).timeout(0).get();
Elements historyList = doc3.select("div#bugzilla-body table tbody tr");
System.out.println(j+" "+historyList.size());
if(contents.equals(bugDes))
return false;
else{
db.insertBugReport(bugID, prdName, compName,prodVersion, bugAut.replace("'","."), openDate, modifiedDate, bugStatus, severity, bugSum.replace("'","."), bugDes.replace("'","."),
bugDes.substring(repStartIndex,repEndIndex).replace("'", "."), bugDes.substring(obsStartIndex,obsEndIndex).replace("'", "."),
bugDes.substring(expStartIndex,expEndIndex).replace("'", "."),"",stackTrace,"","",j,historyList.size()-1);
contents = bugDes;
if(doc.select("span#static_bug_status").text().contains("bug")){
String dupID = doc.select("span#static_bug_status").text().split(" of bug ")[1];
if(!dupList.contains(Integer.parseInt(dupID)))
dupList.add(Integer.parseInt(dupID));
if(Property.getInstance().getTargetResolution().equals("DUPLICATE"))
db.insertDuplicate(bugID,Integer.parseInt(dupID));
}
}
//System.out.println(openDate+" "+thresholdDate);
Elements attachments = doc.select("a[href][title]");
for(j = 1;j<10; j++){
String bugAttachN = "a"+j;
String date = "";
String data = doc.select("table#attachment_table").text();
if(data.equals("Attachments Add an attachment (proposed patch, testcase, etc.)"))
break;
data = data.replace(" ", "");
String type = doc.select("table#attachment_table tr#"+bugAttachN+" td span").text();
//System.out.println(type);
if(type.contains(","))
type = type.split(",")[1].replace(")","");
if(type.contains("text") || type.contains("patch")) {
int attID = -1;
String attach = "";
try{
date = doc.select("table#attachment_table tr#"+bugAttachN+" td span a").text();
Date thresDate = format.parse(thresholdDate);
String attDate = date.substring(0,16)+":00:00";
Date attachDate = format.parse(attDate);
calendar1.setTime(thresDate);
calendar2.setTime(attachDate);
System.out.println(attDate+" "+thresholdDate);
if(calendar2.getTimeInMillis() > calendar1.getTimeInMillis())
break;
attach = doc.select("table#attachment_table tr#"+bugAttachN+" td a").attr("href").split("id=")[1];
Document doc2 = Jsoup.connect(attachUrl+attach).maxBodySize(0).timeout(10000).get();
String contents = doc2.select("body").text();
type = type.split(" ")[1];
//System.out.println(bugID+" "+type+" "+attach+" "+contents);
db.insertAttachment(bugID, Integer.parseInt(attach), type, contents);
}catch(Exception e){
e.printStackTrace();
break;
}
}
}
}
catch(Exception e){
e.printStackTrace();
}
return true;
}
public void quit() throws Exception
{
db.exit();
}
}
| [
"[email protected]"
] | |
e59a3e6109b9d095f66866a5ac0795927ab413b3 | bb77413d7ac493d309cb5a5ca4cf9798b98f54ab | /src/main/java/com/dubbowork/qrz/hashtest/ConsistentHashingWithoutVirtualNode.java | 8cfae36cb530f24199a0537e5a5ca0d7b7123567 | [] | no_license | krystal-my/dubbo-die | 4535ed75218b2a68b43ecb5058fd3c84fa0bc8b1 | 88ef91a8a37b48bf73f83dedd6ea5ce3d522110b | refs/heads/master | 2021-10-21T13:57:28.101502 | 2019-03-04T10:02:45 | 2019-03-04T10:02:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,539 | java | package com.dubbowork.qrz.hashtest;
import java.util.SortedMap;
import java.util.TreeMap;
/**
* @author 邱润泽 不带节点的一致性hash算法
*/
public class ConsistentHashingWithoutVirtualNode {
/**
* 9 * 待添加入Hash环的服务器列表
* 10
*/
private static String[] servers = {"192.168.0.0:111", "192.168.0.1:111", "192.168.0.2:111",
"192.168.0.3:111", "192.168.0.4:111"};
/**
* key表示服务器的hash值,value表示服务器的名称
*/
private static SortedMap<Integer, String> sortedMap =
new TreeMap<Integer, String>();
/**
* 程序初始化,将所有的服务器放入sortedMap中
*/
static {
for (int i = 0; i < servers.length; i++) {
int hash = getHash(servers[i]);
System.out.println("[" + servers[i] + "]加入集合中, 其Hash值为" + hash);
sortedMap.put(hash, servers[i]);
}
System.out.println();
}
/**
* 使用FNV1_32_HASH算法计算服务器的Hash值,这里不使用重写hashCode的方法,最终效果没区别
*/
private static int getHash(String str) {
final int p = 16777619;
int hash = (int) 2166136261L;
for (int i = 0; i < str.length(); i++) {
hash = (hash ^ str.charAt(i)) * p;
}
hash += hash << 13;
hash ^= hash >> 7;
hash += hash << 3;
hash ^= hash >> 17;
hash += hash << 5;
// 如果算出来的值为负数则取其绝对值
if (hash < 0) {
hash = Math.abs(hash);
}
return hash;
}
/**
* 得到应当路由到的结点
*/
private static String getServer(String node) {
// 得到带路由的结点的Hash值
int hash = getHash(node);// 得到大于该Hash值的所有Map
SortedMap<Integer, String> subMap =
sortedMap.tailMap(hash);
// 第一个Key就是顺时针过去离node最近的那个结点
Integer i = subMap.firstKey();
// 返回对应的服务器名称
return subMap.get(i);
}
public static void main(String[] args) {
String[] nodes = {"127.0.0.1:1111", "221.226.0.1:2222", "10.211.0.1:3333"};
for (int i = 0; i < nodes.length; i++) {
System.out.println("[" + nodes[i] + "]的hash值为" +
getHash(nodes[i]) + ", 被路由到结点[" + getServer(nodes[i]) + "]");
}
}
}
| [
"[email protected]"
] | |
9581219bc9d2bc6e5666165bcb12ec069dfb5b2a | 36a81d77ca1508fb758bba9f636b408b9f1c88d5 | /src/main/java/com/xhk/lab/rmodel/NewsGetResponse.java | 2a167c0e2b9ecb8b23cded664bfec21044ce4f4c | [] | no_license | Turtle54321/lab | d2f3e7d386e1c99016be38812579be40e498f61b | e132d153001f4ca58cc7635ad6e1f8d26f84b121 | refs/heads/master | 2021-04-09T17:03:38.769228 | 2018-06-19T03:06:34 | 2018-06-19T03:06:34 | 125,689,769 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 537 | java | package com.xhk.lab.rmodel;
import com.xhk.lab.model.News;
import java.util.List;
/**
* create by xhk on 2018/4/30
*/
public class NewsGetResponse {
private List<News> newsList;
private Integer totalNum;
public List<News> getNewsList() {
return newsList;
}
public void setNewsList(List<News> newsList) {
this.newsList = newsList;
}
public Integer getTotalNum() {
return totalNum;
}
public void setTotalNum(Integer totalNum) {
this.totalNum = totalNum;
}
}
| [
"[email protected]"
] | |
554c7502f27841fbb34487a515e36fef1fdf0089 | 1b2685ff6a251c85e38b6701f2540a30eba96322 | /src/main/java/com/liangxunwang/unimanager/util/push/IOSPushNotificationToAll.java | e15cbfbfe1d20b40155033c0e83b6ceb72ef6e5e | [] | no_license | eryiyi/HuiminJsManager | 6284edb145c13f7c54c4af7d868aa1015d04beea | 65ed166e5e910bc8b6db0953d47fb705317aff3b | refs/heads/master | 2021-06-28T17:14:50.647917 | 2017-09-18T04:01:35 | 2017-09-18T04:01:35 | 101,830,920 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,759 | java | package com.liangxunwang.unimanager.util.push;
import com.baidu.yun.core.log.YunLogEvent;
import com.baidu.yun.core.log.YunLogHandler;
import com.baidu.yun.push.auth.PushKeyPair;
import com.baidu.yun.push.client.BaiduPushClient;
import com.baidu.yun.push.constants.BaiduPushConstants;
import com.baidu.yun.push.exception.PushClientException;
import com.baidu.yun.push.exception.PushServerException;
import com.baidu.yun.push.model.PushMsgToAllRequest;
import com.baidu.yun.push.model.PushMsgToAllResponse;
import net.sf.json.JSONObject;
public class IOSPushNotificationToAll {
public static void main(String[] args)
throws PushClientException,PushServerException {
// 1. get apiKey and secretKey from developer console
String apiKey = "xxxxxxxxxxxxxxxxxxxx";
String secretKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxx";
PushKeyPair pair = new PushKeyPair(apiKey, secretKey);
// 2. build a BaidupushClient object to access released interfaces
BaiduPushClient pushClient = new BaiduPushClient(pair,
BaiduPushConstants.CHANNEL_REST_URL);
// 3. register a YunLogHandler to get detail interacting information
// in this request.
pushClient.setChannelLogHandler(new YunLogHandler() {
@Override
public void onHandle(YunLogEvent event) {
System.out.println(event.getMessage());
}
});
try {
// 4. specify request arguments
// 创建IOS通知
JSONObject notification = new JSONObject();
JSONObject jsonAPS = new JSONObject();
jsonAPS.put("alert", "Hello Baidu Push");
jsonAPS.put("sound", "ttt"); // 设置通知铃声样式,例如"ttt",用户自定义。
notification.put("aps", jsonAPS);
notification.put("key1", "value1");
notification.put("key2", "value2");
PushMsgToAllRequest request = new PushMsgToAllRequest()
.addMsgExpires(new Integer(3600)).addMessageType(1)
.addMessage(notification.toString())
.addSendTime(System.currentTimeMillis() / 1000 + 120) // 设置定时推送时间,必需超过当前时间一分钟,单位秒.实例2分钟后推送
.addDepolyStatus(2).addDeviceType(4);
// 5. http request
PushMsgToAllResponse response = pushClient.pushMsgToAll(request);
// Http请求结果解析打印
System.out.println("msgId: " + response.getMsgId() + ",sendTime: "
+ response.getSendTime() + ",timerId: "
+ response.getTimerId());
} catch (PushClientException e) {
if (BaiduPushConstants.ERROROPTTYPE) {
throw e;
} else {
e.printStackTrace();
}
} catch (PushServerException e) {
if (BaiduPushConstants.ERROROPTTYPE) {
throw e;
} else {
System.out.println(String.format(
"requestId: %d, errorCode: %d, errorMessage: %s",
e.getRequestId(), e.getErrorCode(), e.getErrorMsg()));
}
}
}
}
| [
"[email protected]"
] | |
b713802cf52a40159cca33cf1c71f39a54630541 | 1b076127f8a662217e031d00fb29f99081a7bd1c | /src/llistaCua/NodeCharCua.java | 24846b268c20ebc09fb3855c9054ec0043d1f01c | [] | no_license | GIFO14/PracticingJava | ad592d543fe3b0bb07920e5a9dc787bc8838b551 | ea0a683c8b1ff0d2ebb7b66056011f9f09cb0c1f | refs/heads/master | 2020-03-27T21:56:17.303544 | 2018-09-05T12:09:26 | 2018-09-05T12:09:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 94 | java | package llistaCua;
public class NodeCharCua {
int informacio;
NodeCharCua seguent;
}
| [
"[email protected]"
] | |
66401426742276148b8226a49c44f2086a7f2290 | d5ff551774b9426e4299e2ad369f5fd54d77b28e | /src/main/java/eu/erasmuswithoutpaper/rsaaes/Utils.java | 83e962b8070cd34477e722ad99dff7978f808ad8 | [] | no_license | erasmus-without-paper/ewp-rsa-aes-java | 32d7a47a66bfb1ebb854159f285f717596cda0d3 | 1570e42368ccbea93fe829d9b6d9be2770c2a327 | refs/heads/master | 2021-08-29T18:12:57.892660 | 2017-12-14T15:04:07 | 2017-12-14T15:04:07 | 113,998,406 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,462 | java | package eu.erasmuswithoutpaper.rsaaes;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
class Utils {
private static final char[] HEX_CHARS = "0123456789abcdef".toCharArray();
private static final byte[] LF = new byte[] { 0x0A };
static String addLineBreaks(String str, int lineLength) {
StringBuilder sb = new StringBuilder();
int offset = 0;
while (true) {
int nextOffset = offset + lineLength;
if (nextOffset < str.length()) {
sb.append(str.substring(offset, nextOffset));
sb.append('\n');
offset = nextOffset;
} else {
sb.append(str.substring(offset));
break;
}
}
return sb.toString();
}
static byte[] b64decode(String encoded) {
return Base64.getMimeDecoder().decode(encoded);
}
static String b64encode(byte[] data) {
return Base64.getMimeEncoder(76, LF).encodeToString(data);
}
static byte[] getBinarySha256Fingerprint(byte[] data) {
try {
return MessageDigest.getInstance("SHA-256").digest(data);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
}
static String hexEncode(byte[] data) {
char[] chars = new char[2 * data.length];
for (int i = 0; i < data.length; ++i) {
chars[2 * i] = HEX_CHARS[(data[i] & 0xF0) >>> 4];
chars[2 * i + 1] = HEX_CHARS[data[i] & 0x0F];
}
return new String(chars);
}
}
| [
"[email protected]"
] | |
f5f0d466a278b4ce3d0e646beed334c057dcb083 | 8b09c340934288ca6d5ba198c44270d2dafa941e | /src/com/gvr/gsaApp/GSAApplication.java | 5a417fbbdb134e54656a2b5d50140892b7dd7886 | [] | no_license | ochavan9/GSA | 96d992d5eeaff8ac84371d5e80741e3b3c125598 | c809a89ab38b6aad9dae7da3f2a12a7a7a17dc86 | refs/heads/master | 2020-05-02T14:13:16.398675 | 2019-04-01T09:22:09 | 2019-04-01T09:22:09 | 178,004,064 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,967 | java | package com.gvr.gsaApp;
import com.gvr.gsaApp.organisation.OrganisationManager;
import com.gvr.gsaApp.site.Site;
import com.gvr.gsaApp.site.SiteManager;
import com.gvr.gsaApp.utils.BinarySerializer;
import com.gvr.gsaApp.utils.NameComparator;
import com.gvr.gsaApp.utils.XMLSerializer;
import java.util.Collections;
import com.gvr.gsaApp.device.Device;
import com.gvr.gsaApp.device.DeviceManager;
import com.gvr.gsaApp.organisation.Organisation;
public class GSAApplication {
public static void main(String[] args) {
OrganisationManager organisationManager = OrganisationManager.getInstance();
SiteManager siteManager = SiteManager.getInstance();
DeviceManager deviceManager = DeviceManager.getInstance();
final int bpclId = 1;
Organisation bpcl = new Organisation(bpclId, "BPCL");
organisationManager.addOrganisation(bpcl);
//Add 50 sites to BPCL
for(int siteId = 100; siteId <= 149 ; ++siteId) {
String siteName = "BKC_" + siteId;
Site site = new Site(siteId, siteName, "Mumbai", bpclId);
organisationManager.addSiteToOrganisation(bpclId, site);
//Add 10 devices on each site
for (int i=1, devId = siteId*10; i <= 10; ++i, ++devId) {
String deviceName = "CRIND_" + devId;
Device device = new Device(devId, deviceName, "Gilbarco", "00000000", "Offline", "M7", siteId);
siteManager.addDeviceToSite(siteId, device);
}
}
final int hpclId = 2;
Organisation hpcl = new Organisation(hpclId,"HPCL");
organisationManager.addOrganisation(hpcl);
//Add 50 sites to HPCL
for(int siteId = 249 ; siteId >= 200 ; --siteId) {
String siteName = "BKC_" + siteId;
Site site = new Site(siteId, siteName, "Mumbai", hpclId);
organisationManager.addSiteToOrganisation(hpclId, site);
//Add 10 devices on each site
for (int i=1, devId = siteId*10; i <= 10; ++i, ++devId) {
String deviceName = "CRIND_" + devId;
Device device = new Device(devId, deviceName, "Gilbarco", "00000000", "Offline", "M7", siteId);
siteManager.addDeviceToSite(siteId, device);
}
}
//deviceManager.removeDeviceById(3);
System.out.println("Devices in Organisation:\n" +organisationManager.getDevicesInOrganisation(hpclId));
//organisationManager.sortSites(hpclId);
Collections.sort(organisationManager.getSitesInOrganisation(hpclId), new NameComparator());
System.out.println("Sites in Organisation:\n"+organisationManager.getSitesInOrganisation(hpclId));
BinarySerializer binarySerializer = new BinarySerializer();
binarySerializer.writeObjectToBinaryFile(organisationManager.getOrganisationById(hpclId));
Organisation hpclOrg = (Organisation)binarySerializer.readObjectFromBinaryFile();
System.out.println(hpclOrg);
XMLSerializer xmlSerializer = new XMLSerializer();
xmlSerializer.writeObjectToXMLFile(organisationManager.getOrganisationById(bpclId));
Organisation bpclOrg = (Organisation)xmlSerializer.readObjectFromXMLFile();
System.out.println(bpclOrg);
}
} | [
"[email protected]"
] | |
9ab10455dbd65904522555d91f248c7819e907e4 | f4d739b7f4206ece786724e2a72a3257ee0bc501 | /src/plantuml-asl/src/net/sourceforge/plantuml/graphic/FontStyle.java | 7f29a408357908322232b5cddf9fe2f590092f46 | [
"Apache-2.0"
] | permissive | mercurio123/umldoclet | 2cf809ef2043480d5591275c4b8f7d54ae96dabb | fbd5206dd120afcde0efbaf1d69c979903b016ae | refs/heads/master | 2023-08-22T00:16:14.001525 | 2021-08-22T13:33:01 | 2021-08-22T13:33:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,135 | java | /* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2020, Arnaud Roques
*
* Project Info: https://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* https://plantuml.com/patreon (only 1$ per month!)
* https://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* 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.
*
*
* Original Author: Arnaud Roques
*/
package net.sourceforge.plantuml.graphic;
import java.awt.Font;
import java.util.EnumSet;
import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
public enum FontStyle {
PLAIN, ITALIC, BOLD, UNDERLINE, STRIKE, WAVE, BACKCOLOR;
public UFont mutateFont(UFont font) {
if (this == PLAIN) {
return font.withStyle(Font.PLAIN);
}
if (this == ITALIC) {
return font.withStyle(font.getStyle() | Font.ITALIC);
}
if (this == BOLD) {
return font.withStyle(font.getStyle() | Font.BOLD);
}
return font;
}
public String getActivationPattern() {
if (this == PLAIN) {
return "\\<[pP][lL][aA][iI][nN]\\>";
}
if (this == ITALIC) {
return "\\<[iI]\\>";
}
if (this == BOLD) {
return "\\<[bB]\\>";
}
if (this == UNDERLINE) {
return "\\<[uU](?::(#[0-9a-fA-F]{6}|\\w+))?\\>";
}
if (this == WAVE) {
return "\\<[wW](?::(#[0-9a-fA-F]{6}|\\w+))?\\>";
}
if (this == BACKCOLOR) {
// return "\\<[bB][aA][cC][kK](?::(#[0-9a-fA-F]{6}|\\w+))?\\>";
return "\\<[bB][aA][cC][kK](?::(#?\\w+(?:[-\\\\|/]#?\\w+)?))?\\>";
}
if (this == STRIKE) {
return "\\<(?:s|S|strike|STRIKE|del|DEL)(?::(#[0-9a-fA-F]{6}|\\w+))?\\>";
}
return null;
}
public boolean canHaveExtendedColor() {
if (this == UNDERLINE) {
return true;
}
if (this == WAVE) {
return true;
}
if (this == BACKCOLOR) {
return true;
}
if (this == STRIKE) {
return true;
}
return false;
}
public String getCreoleSyntax() {
if (this == ITALIC) {
return "//";
}
if (this == BOLD) {
return "\\*\\*";
}
if (this == UNDERLINE) {
return "__";
}
if (this == WAVE) {
return "~~";
}
if (this == STRIKE) {
return "--";
}
throw new UnsupportedOperationException();
}
public HColor getExtendedColor(String s) {
final Matcher2 m = MyPattern.cmpile(getActivationPattern()).matcher(s);
if (m.find() == false || m.groupCount() != 1) {
return null;
}
final String color = m.group(1);
if (color == null) {
return null;
}
return HColorSet.instance().getColorOrWhite(color);
}
public String getDeactivationPattern() {
if (this == PLAIN) {
return "\\</[pP][lL][aA][iI][nN]\\>";
}
if (this == ITALIC) {
return "\\</[iI]\\>";
}
if (this == BOLD) {
return "\\</[bB]\\>";
}
if (this == UNDERLINE) {
return "\\</[uU]\\>";
}
if (this == WAVE) {
return "\\</[wW]\\>";
}
if (this == BACKCOLOR) {
return "\\</[bB][aA][cC][kK]\\>";
}
if (this == STRIKE) {
return "\\</(?:s|S|strike|STRIKE|del|DEL)\\>";
}
return null;
}
public static FontStyle getStyle(String line) {
for (FontStyle style : EnumSet.allOf(FontStyle.class)) {
if (line.matches(style.getActivationPattern()) || line.matches(style.getDeactivationPattern())) {
return style;
}
}
throw new IllegalArgumentException(line);
}
}
| [
"[email protected]"
] | |
41399b3a58733f0611c78bee5733ee8cbaec19eb | ded32021a6a16ff63d4a3b8b136ef7f9dc350277 | /client/src/test/java/org/sid/ApplicationFrontEndApplicationTests.java | 46cbe598efb46c8b2f351519d9ad2d2d2d1d867f | [] | no_license | omarelouahdani/Kafka | e03b1187054b4655e9e023ee4ec3807af0010ff1 | 9d84f24d224d8f74ffb74be91dd48ea4a40c0180 | refs/heads/main | 2023-03-02T21:44:25.722705 | 2021-02-12T12:50:20 | 2021-02-12T12:50:20 | 338,317,217 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 212 | java | package org.sid;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ApplicationFrontEndApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
a8ff76b4b2e2d356b82e19872f03099726143a67 | 40e562d9403231687a182c6603a82a10c764cd20 | /src/main/java/pl/psk/salesManager/repository/OrderRepository.java | 41acdecf6e87733dcca896afa5992ce17b1fa1a4 | [] | no_license | Orlando3011/SalesManager | e81669e8e4f3a65d55a5bd7ff3f320df3abf2288 | 1b8e8d51926249c04ae7fb7c5611dd0c9c712abe | refs/heads/master | 2021-06-30T05:53:38.581754 | 2020-06-01T16:00:24 | 2020-06-01T16:00:24 | 231,756,772 | 0 | 0 | null | 2021-06-07T18:44:49 | 2020-01-04T12:08:41 | HTML | UTF-8 | Java | false | false | 419 | java | package pl.psk.salesManager.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import pl.psk.salesManager.model.Client;
import pl.psk.salesManager.model.Order;
import java.util.List;
@Repository
public interface OrderRepository extends JpaRepository<Order, Integer> {
List<Order> findByClient(Client client);
Order findById(int id);
}
| [
"[email protected]"
] | |
a2e95463dbcf344136ac229ae448283d1514843d | 806e846f31d9e2bec6b128896b5295ff224b3e45 | /frs/src/main/java/com/cg/frs/exception/TicketIdNotFoundException.java | 77db32aea993302e26b4185ee44949d7b1cd8788 | [] | no_license | vsinghan/SpringBootWithJpa | 30d91be999b241ff7ce05a06ae78a6f28a5c1c4f | f3c10635253e9c2ff52677e598ab71c45244a467 | refs/heads/master | 2022-01-04T15:00:57.740894 | 2019-07-20T13:08:08 | 2019-07-20T13:08:08 | 197,931,285 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 445 | java | package com.cg.frs.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(HttpStatus.NOT_FOUND)
public class TicketIdNotFoundException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
public TicketIdNotFoundException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
}
| [
"[email protected]"
] | |
30e58361734f6fe2af12250bdefed736222189da | d19616209be9908434ad4359b1b6f68ee6aeb81a | /org.asd.silver.ui.rap/src/org/asd/silver/ui/rap/StandaloneRwtEnvironment.java | 3bfceb96557734791c917dde6ac44100c3fab8a0 | [] | no_license | Inferior/Silver | 4035778cbb15a8984c7d8a54ab9bc77071b2a9e8 | 05ce36273057912cf5d53265596060b77db055bd | refs/heads/master | 2016-09-06T08:08:20.108406 | 2014-10-29T19:41:12 | 2014-10-29T19:41:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 340 | java | package org.asd.silver.ui.rap;
import org.asd.silver.client.ClientSession;
import org.eclipse.scout.rt.ui.rap.AbstractStandaloneRwtEnvironment;
public class StandaloneRwtEnvironment extends AbstractStandaloneRwtEnvironment {
public StandaloneRwtEnvironment() {
super(Activator.getDefault().getBundle(), ClientSession.class);
}
}
| [
"[email protected]"
] | |
6bbed6cbd55aac8459054d802c6cf90071171393 | 1352d30d2ede9603604b6ab487e21994e6a83ccf | /src/main/java/com/testServices/restapi/restfulhandson/RestfulHandsonApplication.java | b204cf8a417293d8f69cc6274b3f10fe692e683c | [] | no_license | pdha/RHGitHub | 59fe6d22a0e118b0020d58ac7673947b57bb5a00 | fe63cefefb3baec539c55d4dfebc43adfbac563f | refs/heads/master | 2020-05-07T10:44:46.145083 | 2019-04-09T18:46:27 | 2019-04-09T18:46:27 | 180,430,412 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package com.testServices.restapi.restfulhandson;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class RestfulHandsonApplication {
public static void main(String[] args) {
SpringApplication.run(RestfulHandsonApplication.class, args);
}
}
| [
"[email protected]"
] | |
52cc46b146c1504ab4c3a24c78ded6d8b80fcb33 | f6b7a1f2c5e1162bf04abe033db41aa06cbbf77c | /src/main/java/jtech/shopzone/model/dal/bean/ProductsCategory.java | ee62b08aafe0a28ec0b19b920952ec62c1849004 | [] | no_license | DinaGhounem/ShopZone | 7c567de921708cd550fe1618c52338a1fe8eb21f | bd92185d5bb19ffa9d8651303a990a7bebdb9798 | refs/heads/master | 2021-09-10T10:10:02.759150 | 2018-03-24T13:24:03 | 2018-03-24T13:24:03 | 125,365,469 | 0 | 0 | null | 2018-03-15T12:40:58 | 2018-03-15T12:40:58 | null | UTF-8 | Java | false | false | 1,246 | java | package jtech.shopzone.model.dal.bean;
// Generated Mar 16, 2018 2:19:44 PM by Hibernate Tools 4.3.1
import java.util.HashSet;
import java.util.Set;
/**
* ProductsCategory generated by hbm2java
*/
public class ProductsCategory implements java.io.Serializable {
private Integer categoryId;
private String categoryName;
private Set productsInfos = new HashSet(0);
public ProductsCategory() {
}
public ProductsCategory(String categoryName) {
this.categoryName = categoryName;
}
public ProductsCategory(String categoryName, Set productsInfos) {
this.categoryName = categoryName;
this.productsInfos = productsInfos;
}
public Integer getCategoryId() {
return this.categoryId;
}
public void setCategoryId(Integer categoryId) {
this.categoryId = categoryId;
}
public String getCategoryName() {
return this.categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public Set getProductsInfos() {
return this.productsInfos;
}
public void setProductsInfos(Set productsInfos) {
this.productsInfos = productsInfos;
}
}
| [
"[email protected]"
] | |
9c7253b82e543b31e03a3a7f2db4bc57b7d54239 | 8f5639c52ce19df9d3d818a62c46f211f7364872 | /src/main/java/com/xero/models/accounting/Payment.java | 120720a1a1d9ba814e4bb34dacaa438aa0a57c4e | [
"MIT"
] | permissive | hieuxit/Xero-Java | a44cd4264d6adc35590ff8efc4fa34135fb7cef9 | 05ed952ebe427b33f88a2df1271688ac3eb7ad0a | refs/heads/master | 2021-07-13T17:38:38.122587 | 2019-12-03T23:53:19 | 2019-12-03T23:53:19 | 227,332,554 | 0 | 0 | MIT | 2019-12-11T09:58:00 | 2019-12-11T09:57:59 | null | UTF-8 | Java | false | false | 19,483 | java | /*
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.xero.models.accounting;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xero.models.accounting.Account;
import com.xero.models.accounting.CreditNote;
import com.xero.models.accounting.Invoice;
import com.xero.models.accounting.Overpayment;
import com.xero.models.accounting.Prepayment;
import com.xero.models.accounting.ValidationError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
/**
* Payment
*/
public class Payment {
@JsonProperty("Invoice")
private Invoice invoice = null;
@JsonProperty("CreditNote")
private CreditNote creditNote = null;
@JsonProperty("Prepayment")
private Prepayment prepayment = null;
@JsonProperty("Overpayment")
private Overpayment overpayment = null;
@JsonProperty("InvoiceNumber")
private String invoiceNumber;
@JsonProperty("CreditNoteNumber")
private String creditNoteNumber;
@JsonProperty("Account")
private Account account = null;
@JsonProperty("Code")
private String code;
@JsonDeserialize(using = com.xero.api.CustomDateDeserializer.class)
@JsonProperty("Date")
private LocalDate date;
@JsonProperty("CurrencyRate")
private Double currencyRate;
@JsonProperty("Amount")
private Double amount;
@JsonProperty("Reference")
private String reference;
@JsonProperty("IsReconciled")
private Boolean isReconciled;
/**
* The status of the payment.
*/
public enum StatusEnum {
AUTHORISED("AUTHORISED"),
DELETED("DELETED");
private String value;
StatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@JsonProperty("Status")
private StatusEnum status;
/**
* See Payment Types.
*/
public enum PaymentTypeEnum {
ACCRECPAYMENT("ACCRECPAYMENT"),
ACCPAYPAYMENT("ACCPAYPAYMENT"),
ARCREDITPAYMENT("ARCREDITPAYMENT"),
APCREDITPAYMENT("APCREDITPAYMENT"),
AROVERPAYMENTPAYMENT("AROVERPAYMENTPAYMENT"),
ARPREPAYMENTPAYMENT("ARPREPAYMENTPAYMENT"),
APPREPAYMENTPAYMENT("APPREPAYMENTPAYMENT"),
APOVERPAYMENTPAYMENT("APOVERPAYMENTPAYMENT");
private String value;
PaymentTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static PaymentTypeEnum fromValue(String value) {
for (PaymentTypeEnum b : PaymentTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
@JsonProperty("PaymentType")
private PaymentTypeEnum paymentType;
@JsonDeserialize(using = com.xero.api.CustomOffsetDateTimeDeserializer.class)
@JsonProperty("UpdatedDateUTC")
private OffsetDateTime updatedDateUTC;
@JsonProperty("PaymentID")
private UUID paymentID;
@JsonProperty("BankAccountNumber")
private String bankAccountNumber;
@JsonProperty("Particulars")
private String particulars;
@JsonProperty("Details")
private String details;
@JsonProperty("HasAccount")
private Boolean hasAccount;
@JsonProperty("HasValidationErrors")
private Boolean hasValidationErrors;
@JsonProperty("ValidationErrors")
private List<ValidationError> validationErrors = new ArrayList<ValidationError>();
public Payment invoice(Invoice invoice) {
this.invoice = invoice;
return this;
}
/**
* Get invoice
* @return invoice
**/
@ApiModelProperty(value = "")
public Invoice getInvoice() {
return invoice;
}
public void setInvoice(Invoice invoice) {
this.invoice = invoice;
}
public Payment creditNote(CreditNote creditNote) {
this.creditNote = creditNote;
return this;
}
/**
* Get creditNote
* @return creditNote
**/
@ApiModelProperty(value = "")
public CreditNote getCreditNote() {
return creditNote;
}
public void setCreditNote(CreditNote creditNote) {
this.creditNote = creditNote;
}
public Payment prepayment(Prepayment prepayment) {
this.prepayment = prepayment;
return this;
}
/**
* Get prepayment
* @return prepayment
**/
@ApiModelProperty(value = "")
public Prepayment getPrepayment() {
return prepayment;
}
public void setPrepayment(Prepayment prepayment) {
this.prepayment = prepayment;
}
public Payment overpayment(Overpayment overpayment) {
this.overpayment = overpayment;
return this;
}
/**
* Get overpayment
* @return overpayment
**/
@ApiModelProperty(value = "")
public Overpayment getOverpayment() {
return overpayment;
}
public void setOverpayment(Overpayment overpayment) {
this.overpayment = overpayment;
}
public Payment invoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
return this;
}
/**
* Number of invoice or credit note you are applying payment to e.g.INV-4003
* @return invoiceNumber
**/
@ApiModelProperty(value = "Number of invoice or credit note you are applying payment to e.g.INV-4003")
public String getInvoiceNumber() {
return invoiceNumber;
}
public void setInvoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}
public Payment creditNoteNumber(String creditNoteNumber) {
this.creditNoteNumber = creditNoteNumber;
return this;
}
/**
* Number of invoice or credit note you are applying payment to e.g. INV-4003
* @return creditNoteNumber
**/
@ApiModelProperty(value = "Number of invoice or credit note you are applying payment to e.g. INV-4003")
public String getCreditNoteNumber() {
return creditNoteNumber;
}
public void setCreditNoteNumber(String creditNoteNumber) {
this.creditNoteNumber = creditNoteNumber;
}
public Payment account(Account account) {
this.account = account;
return this;
}
/**
* Get account
* @return account
**/
@ApiModelProperty(value = "")
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
public Payment code(String code) {
this.code = code;
return this;
}
/**
* Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)
* @return code
**/
@ApiModelProperty(value = "Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)")
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Payment date(LocalDate date) {
this.date = date;
return this;
}
/**
* Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
* @return date
**/
@ApiModelProperty(value = "Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06")
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public Payment currencyRate(Double currencyRate) {
this.currencyRate = currencyRate;
return this;
}
/**
* Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500
* @return currencyRate
**/
@ApiModelProperty(value = "Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500")
public Double getCurrencyRate() {
return currencyRate;
}
public void setCurrencyRate(Double currencyRate) {
this.currencyRate = currencyRate;
}
public Payment amount(Double amount) {
this.amount = amount;
return this;
}
/**
* The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00
* @return amount
**/
@ApiModelProperty(value = "The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00")
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
public Payment reference(String reference) {
this.reference = reference;
return this;
}
/**
* An optional description for the payment e.g. Direct Debit
* @return reference
**/
@ApiModelProperty(value = "An optional description for the payment e.g. Direct Debit")
public String getReference() {
return reference;
}
public void setReference(String reference) {
this.reference = reference;
}
public Payment isReconciled(Boolean isReconciled) {
this.isReconciled = isReconciled;
return this;
}
/**
* An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using PUT, or whether a payment has been reconciled when using GET
* @return isReconciled
**/
@ApiModelProperty(value = "An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using PUT, or whether a payment has been reconciled when using GET")
public Boolean getIsReconciled() {
return isReconciled;
}
public void setIsReconciled(Boolean isReconciled) {
this.isReconciled = isReconciled;
}
public Payment status(StatusEnum status) {
this.status = status;
return this;
}
/**
* The status of the payment.
* @return status
**/
@ApiModelProperty(value = "The status of the payment.")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
* See Payment Types.
* @return paymentType
**/
@ApiModelProperty(value = "See Payment Types.")
public PaymentTypeEnum getPaymentType() {
return paymentType;
}
/**
* UTC timestamp of last update to the payment
* @return updatedDateUTC
**/
@ApiModelProperty(value = "UTC timestamp of last update to the payment")
public OffsetDateTime getUpdatedDateUTC() {
return updatedDateUTC;
}
public Payment paymentID(UUID paymentID) {
this.paymentID = paymentID;
return this;
}
/**
* The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
* @return paymentID
**/
@ApiModelProperty(value = "The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9")
public UUID getPaymentID() {
return paymentID;
}
public void setPaymentID(UUID paymentID) {
this.paymentID = paymentID;
}
public Payment bankAccountNumber(String bankAccountNumber) {
this.bankAccountNumber = bankAccountNumber;
return this;
}
/**
* The suppliers bank account number the payment is being made to
* @return bankAccountNumber
**/
@ApiModelProperty(value = "The suppliers bank account number the payment is being made to")
public String getBankAccountNumber() {
return bankAccountNumber;
}
public void setBankAccountNumber(String bankAccountNumber) {
this.bankAccountNumber = bankAccountNumber;
}
public Payment particulars(String particulars) {
this.particulars = particulars;
return this;
}
/**
* The suppliers bank account number the payment is being made to
* @return particulars
**/
@ApiModelProperty(value = "The suppliers bank account number the payment is being made to")
public String getParticulars() {
return particulars;
}
public void setParticulars(String particulars) {
this.particulars = particulars;
}
public Payment details(String details) {
this.details = details;
return this;
}
/**
* The information to appear on the supplier's bank account
* @return details
**/
@ApiModelProperty(value = "The information to appear on the supplier's bank account")
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
public Payment hasAccount(Boolean hasAccount) {
this.hasAccount = hasAccount;
return this;
}
/**
* A boolean to indicate if a contact has an validation errors
* @return hasAccount
**/
@ApiModelProperty(value = "A boolean to indicate if a contact has an validation errors")
public Boolean getHasAccount() {
return hasAccount;
}
public void setHasAccount(Boolean hasAccount) {
this.hasAccount = hasAccount;
}
public Payment hasValidationErrors(Boolean hasValidationErrors) {
this.hasValidationErrors = hasValidationErrors;
return this;
}
/**
* A boolean to indicate if a contact has an validation errors
* @return hasValidationErrors
**/
@ApiModelProperty(value = "A boolean to indicate if a contact has an validation errors")
public Boolean getHasValidationErrors() {
return hasValidationErrors;
}
public void setHasValidationErrors(Boolean hasValidationErrors) {
this.hasValidationErrors = hasValidationErrors;
}
public Payment validationErrors(List<ValidationError> validationErrors) {
this.validationErrors = validationErrors;
return this;
}
public Payment addValidationErrorsItem(ValidationError validationErrorsItem) {
if (this.validationErrors == null) {
this.validationErrors = new ArrayList<ValidationError>();
}
this.validationErrors.add(validationErrorsItem);
return this;
}
/**
* Displays array of validation error messages from the API
* @return validationErrors
**/
@ApiModelProperty(value = "Displays array of validation error messages from the API")
public List<ValidationError> getValidationErrors() {
return validationErrors;
}
public void setValidationErrors(List<ValidationError> validationErrors) {
this.validationErrors = validationErrors;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Payment payment = (Payment) o;
return Objects.equals(this.invoice, payment.invoice) &&
Objects.equals(this.creditNote, payment.creditNote) &&
Objects.equals(this.prepayment, payment.prepayment) &&
Objects.equals(this.overpayment, payment.overpayment) &&
Objects.equals(this.invoiceNumber, payment.invoiceNumber) &&
Objects.equals(this.creditNoteNumber, payment.creditNoteNumber) &&
Objects.equals(this.account, payment.account) &&
Objects.equals(this.code, payment.code) &&
Objects.equals(this.date, payment.date) &&
Objects.equals(this.currencyRate, payment.currencyRate) &&
Objects.equals(this.amount, payment.amount) &&
Objects.equals(this.reference, payment.reference) &&
Objects.equals(this.isReconciled, payment.isReconciled) &&
Objects.equals(this.status, payment.status) &&
Objects.equals(this.paymentType, payment.paymentType) &&
Objects.equals(this.updatedDateUTC, payment.updatedDateUTC) &&
Objects.equals(this.paymentID, payment.paymentID) &&
Objects.equals(this.bankAccountNumber, payment.bankAccountNumber) &&
Objects.equals(this.particulars, payment.particulars) &&
Objects.equals(this.details, payment.details) &&
Objects.equals(this.hasAccount, payment.hasAccount) &&
Objects.equals(this.hasValidationErrors, payment.hasValidationErrors) &&
Objects.equals(this.validationErrors, payment.validationErrors);
}
@Override
public int hashCode() {
return Objects.hash(invoice, creditNote, prepayment, overpayment, invoiceNumber, creditNoteNumber, account, code, date, currencyRate, amount, reference, isReconciled, status, paymentType, updatedDateUTC, paymentID, bankAccountNumber, particulars, details, hasAccount, hasValidationErrors, validationErrors);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Payment {\n");
sb.append(" invoice: ").append(toIndentedString(invoice)).append("\n");
sb.append(" creditNote: ").append(toIndentedString(creditNote)).append("\n");
sb.append(" prepayment: ").append(toIndentedString(prepayment)).append("\n");
sb.append(" overpayment: ").append(toIndentedString(overpayment)).append("\n");
sb.append(" invoiceNumber: ").append(toIndentedString(invoiceNumber)).append("\n");
sb.append(" creditNoteNumber: ").append(toIndentedString(creditNoteNumber)).append("\n");
sb.append(" account: ").append(toIndentedString(account)).append("\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" currencyRate: ").append(toIndentedString(currencyRate)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
sb.append(" isReconciled: ").append(toIndentedString(isReconciled)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n");
sb.append(" updatedDateUTC: ").append(toIndentedString(updatedDateUTC)).append("\n");
sb.append(" paymentID: ").append(toIndentedString(paymentID)).append("\n");
sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n");
sb.append(" particulars: ").append(toIndentedString(particulars)).append("\n");
sb.append(" details: ").append(toIndentedString(details)).append("\n");
sb.append(" hasAccount: ").append(toIndentedString(hasAccount)).append("\n");
sb.append(" hasValidationErrors: ").append(toIndentedString(hasValidationErrors)).append("\n");
sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"[email protected]"
] | |
2542971116d1b911a83ea99ad9f86063efe37b37 | 0c39e0704636e32499eaf269ea193adb4f4e107a | /src/test/java/com/devgd/mq/analyzer/MessageSenderTest.java | a2b610c93c88de70022a05338909a5509801aeed | [
"Apache-2.0"
] | permissive | MelonClone/melon_clone_analyze | 9a0fb60bde72e687f0b4b1d8bd56b976b1475979 | 7a794045d0b4540b874c73dd50ee14fd0295cf15 | refs/heads/master | 2022-11-18T11:44:33.429057 | 2020-07-16T01:32:18 | 2020-07-16T01:32:18 | 276,767,808 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 447 | java | package com.devgd.mq.analyzer;
import com.devgd.mq.analyzer.domain.rabbitmq.api.MessageSender;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MessageSenderTest {
@Autowired
private MessageSender messageSender;
@Test
public void testSendMsg() {
messageSender.sendTo("foo.bar.#", "MYMESSAGE");
}
} | [
"[email protected]"
] | |
82971e42c5e20be32553c331121d6bb6bf2c22d7 | 8738f1849d736ad2a04ef8bc9a569acedd1890e0 | /src/main/java/yte/intern/etkinlikYonetimSistemi/repositories/RoleRepository.java | c8461765d2bad567d07b329f7d5d3e0d96d0dca9 | [] | no_license | ahmethalac/event-management-system | 6a780c6a1f0f7d066f11d78831a0f5b3358feb0e | 17ee5e42c02ae29e203a8b2bdb9da34fa87af919 | refs/heads/master | 2022-12-06T17:46:02.326972 | 2020-08-07T12:33:03 | 2020-08-07T12:33:03 | 285,820,063 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 375 | java | package yte.intern.etkinlikYonetimSistemi.repositories;
import org.springframework.data.jpa.repository.JpaRepository;
import yte.intern.etkinlikYonetimSistemi.entities.ERole;
import yte.intern.etkinlikYonetimSistemi.entities.Role;
import java.util.Optional;
public interface RoleRepository extends JpaRepository<Role, Long> {
Optional<Role> findByName(ERole name);
}
| [
"[email protected]"
] | |
67d7caeb123d7aa4797d49523ff035fda8b37fbe | fc4794584eb76acc8ad9b58d7d6d05953647c62f | /src/main/java/intro_to_java/PrimeNumber.java | e1f6266acab0081b3389e7f0ecee02058c5ead34 | [] | no_license | messer82/tema | fc28271528a308c0f35b889e9f4ab21e213d5c33 | ab343561020ca894636a274763bf89e3e3e2fca9 | refs/heads/master | 2022-06-19T22:22:54.050368 | 2020-05-07T09:14:06 | 2020-05-07T09:14:06 | 224,696,233 | 0 | 0 | null | 2020-05-07T09:14:14 | 2019-11-28T16:55:09 | Java | UTF-8 | Java | false | false | 725 | java | package intro_to_java;
import java.util.Scanner;
//Display all the prime numbers lower than a given number
public class PrimeNumber {
private static boolean isPrime(int number) {
for (int i = 2; i < number; i++) {
if (number % i == 0)
return false;
}
return true;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Please input the number: ");
int number = scanner.nextInt();
for (int i = 2; i < number; i++) {
if (isPrime(i)) {
System.out.println("The prime numbers smaller than " + number + " are: " + i);
}
}
}
}
| [
"[email protected]"
] | |
b07764c83c86856b117743e1fde67625b5da6ba5 | 2cb11d4a7de7107c8c83956f49fa0f8918767259 | /misc/src/main/java/yb/ecp/fast/infra/helper/LongJsonSerializer.java | d99218f6530d653491e4fe7539925d28c5e4052b | [] | no_license | daweifly1/ufast-starter-parent | 0c7b072f46126db248427a81a4b384f183e97dd6 | 8bc6e804c139f844a4118aaa307b74ceeac62f52 | refs/heads/master | 2022-07-05T14:13:36.418739 | 2019-11-29T06:10:39 | 2019-11-29T06:10:39 | 160,307,026 | 0 | 0 | null | 2022-06-29T17:11:38 | 2018-12-04T06:02:56 | Java | UTF-8 | Java | false | false | 824 | java | /* */ package yb.ecp.fast.infra.helper;
/* */
/* */ import com.fasterxml.jackson.core.JsonGenerator;
/* */ import com.fasterxml.jackson.core.JsonProcessingException;
/* */ import com.fasterxml.jackson.databind.JsonSerializer;
/* */ import com.fasterxml.jackson.databind.SerializerProvider;
/* */ import java.io.IOException;
/* */
/* */ public class LongJsonSerializer
/* */ extends JsonSerializer<Long>
/* */ {
/* */ public void serialize(Long value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
/* */ throws IOException, JsonProcessingException
/* */ {
/* 15 */ String text = value == null ? null : String.valueOf(value);
/* 16 */ if (text != null) {
/* 17 */ jsonGenerator.writeString(text);
/* */ }
/* */ }
/* */ }
| [
"chendawei"
] | chendawei |
52ba01868c29bd49495e2345721fbaeb3137bec6 | cd290c7a2821289385539e4f9a2bf5cb4f43ddfe | /eclipse-workspace/homework10/src/main/java/test/Test.java | 07cc107fdaf62f0a16fb5b7102ef797156dacaef | [] | no_license | chenjian-520/dxc-project-- | acda619712b92d4442b62538f3b46b8d423f270f | f4c721a4f57558e4654bf7e29e605bd1298eb6f2 | refs/heads/master | 2020-05-25T04:24:52.784577 | 2019-05-20T11:41:23 | 2019-05-20T11:41:23 | 187,624,920 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,200 | java | package test;
import java.io.IOException;
import java.io.Reader;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import mapper.UserMapper;
import service.UserService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationContext.xml")
public class Test {
/*@org.junit.Test
public void test() throws IOException{
Reader reader = Resources.getResourceAsReader("mybatis.xml");
SqlSessionFactory ssf = new SqlSessionFactoryBuilder().build(reader);
SqlSession session = ssf.openSession(true);
UserMapper mapper = session.getMapper(UserMapper.class);
System.out.println(mapper.queryAll());
session.close();
}*/
@Autowired
UserService userservice;
@Autowired
UserMapper sss;
@org.junit.Test
public void test(){
System.out.println(userservice.queryAll());
}
}
| [
"[email protected]"
] | |
d753ee1050ff9738ff9a402bd9189135ed3799fa | 7c2577274bad51004d6498117f1be0690002a2fe | /Rush Hour/src/Vehicule.java | a2e7af8f4162bdcf92885e3e4457d699dd8087a0 | [] | no_license | AlexisMalamas/RushHour | f8fa567cf70b992bb4ed8120ba415c73e35f53fc | b07792a32733f03f6085aad4cd789b7150ad7773 | refs/heads/master | 2021-08-07T13:52:55.317773 | 2017-11-08T08:14:23 | 2017-11-08T08:14:23 | 109,946,840 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,734 | java | import java.awt.Color;
public class Vehicule{
private String nom;
private int taille;
private int posMarqueur; // pour gurobi
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public int getTaille() {
return taille;
}
public void setTaille(int taille) {
this.taille = taille;
}
public int getPosMarqueur() {
return posMarqueur;
}
public void setPosMarqueur(int marqueur) {
this.posMarqueur = marqueur;
}
public Color getColor() {
return color;
}
public void setColor(Color color) {
this.color = color;
}
public int getDirectionDeplacement() {
return directionDeplacement;
}
public void setDirectionDeplacement(int directionDeplacement) {
this.directionDeplacement = directionDeplacement;
}
Color color;
int directionDeplacement; // 0 horizontale et 1 verticale
public Vehicule(String nom, Color color, int directionDeplacement, int marqueur) {
this.nom = nom;
if(nom.startsWith("c") || nom.startsWith("g"))
this.taille=2;
else
this.taille=3;
this.color = color;
this.directionDeplacement = directionDeplacement;
this.posMarqueur = marqueur;
}
public Vehicule(Vehicule v)
{
this.nom = v.nom;
this.taille = v.taille;
this.color = v.color;
this.directionDeplacement = v.directionDeplacement;
}
public String toString()
{
return "Vehicule "+this.nom+ "-- Deplacement: "+ this.directionDeplacement+ " "+ this.color+" posMarqueur: "+this.posMarqueur;
}
} | [
"[email protected]"
] | |
4c67190dfe0e0693bdb41123e0c8ed963d9bc98f | 417b1a3d473fa7e4e39ba8f92225c8a96130436c | /app/src/main/java/com/example/ciber_000/myapplication/IniciarSesion.java | bd7eea426b06b17f15fd472351f03e4c43f8d628 | [] | no_license | hernanolmedo/MementoAndroid | e19d913bd5d62d9e84f64e488969bd0e892a4123 | df0e4d30597a55e7347f4271ef70688dab6cd398 | refs/heads/master | 2021-01-10T10:43:24.304239 | 2015-09-29T18:52:47 | 2015-09-29T18:52:47 | 36,994,696 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,380 | java | package com.example.ciber_000.myapplication;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class IniciarSesion extends Activity {
EditText txtUsuario,txtClave;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
txtUsuario=(EditText)findViewById(R.id.txtUsuario);
txtClave=(EditText)findViewById(R.id.txtClave);
registrarButton();
ingresarButton();
}
private void registrarButton(){
Button regButton=(Button)findViewById(R.id.registrar);
regButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(IniciarSesion.this, Registro.class));
}
}
);
}
private void ingresarButton(){
Button regButton=(Button)findViewById(R.id.ingresar);
regButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MyTask task = new MyTask();
task.execute("http://localhost:8080/tdb-java-master/inicio/" + txtUsuario.getText().toString() + "/" + txtClave.getText().toString());
}
}
);
}
private class MyTask extends AsyncTask<String, Void, String> {
@Override
protected String doInBackground(String... params) {
HttpManager hm=new HttpManager();
return hm.getData(params[0]);
}
@Override
protected void onPostExecute(String result) {
Intent intent = new Intent(IniciarSesion.this, Menu.class);
Bundle b = new Bundle();
b.putString("msj", result);
intent.putExtras(b);
startActivity(intent);
finish();
}
}
}
| [
"[email protected]"
] | |
e7602966335c096e4fdb185e8e7fb86cb7d39a62 | c29f28c3328c47089447265b23c2fc1df53944b4 | /app/src/androidTest/java/com/michalpomiecko/faceproject/ExampleInstrumentedTest.java | bb68b05f8d5d2f510004076aa5e24a2face43bf8 | [] | no_license | ivellious/FaceProject | 5a3c96a505f6f15d5ac0cd76cc8c46e97f06ca76 | a0bcea7681c3a9fe0cff5bc2c7cbf4eb498712c0 | refs/heads/master | 2021-08-30T21:17:24.021978 | 2017-12-19T12:56:49 | 2017-12-19T12:56:49 | 110,157,368 | 0 | 3 | null | 2017-12-11T12:05:47 | 2017-11-09T19:29:53 | Java | UTF-8 | Java | false | false | 764 | java | package com.michalpomiecko.faceproject;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.michalpomiecko.faceproject", appContext.getPackageName());
}
}
| [
"[email protected]"
] | |
cefeb51dedecafb003514127bd0997668af9f964 | 622259e01d8555d552ddeba045fafe6624d80312 | /edu.harvard.i2b2.eclipse.plugins.ontology/src/edu/harvard/i2b2/eclipse/plugins/ontology/ws/CRCServiceDriver.java | 71cee7f49bf38ef51b21457d5b47b5a009fb913b | [] | no_license | kmullins/i2b2-workbench-old | 93c8e7a3ec7fc70b68c4ce0ae9f2f2c5101f5774 | 8144b0b62924fa8a0e4076bf9672033bdff3b1ff | refs/heads/master | 2021-05-30T01:06:11.258874 | 2015-11-05T18:00:58 | 2015-11-05T18:00:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,693 | java | /*
* Copyright (c) 2006-2015 Massachusetts General Hospital
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the i2b2 Software License v2.1
* which accompanies this distribution.
*
* Contributors:
* Lori Phillips
* Raj Kuttan
*/
package edu.harvard.i2b2.eclipse.plugins.ontology.ws;
import java.io.StringReader;
import java.net.SocketTimeoutException;
import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.harvard.i2b2.eclipse.UserInfoBean;
import edu.harvard.i2b2.eclipse.plugins.ontology.util.MessageUtil;
import edu.harvard.i2b2.ontclient.datavo.psm.query.AnalysisDefinitionRequestType;
import edu.harvard.i2b2.ontclient.datavo.psm.query.AnalysisPluginMetadataRequestType;
import edu.harvard.i2b2.ontclient.datavo.psm.query.MasterDeleteRequestType;
import edu.harvard.i2b2.ontclient.datavo.psm.query.QueryMasterType;
import edu.harvard.i2b2.ontclient.datavo.psm.query.QueryResultInstanceType;
import edu.harvard.i2b2.ontclient.datavo.psm.query.ResultRequestType;
import edu.harvard.i2b2.common.exception.I2B2Exception;
public class CRCServiceDriver {
public static final String THIS_CLASS_NAME = CRCServiceDriver.class.getName();
private static Log log = LogFactory.getLog(THIS_CLASS_NAME);
private static String serviceURL = UserInfoBean.getInstance().getCellDataUrl("crc");
private static String serviceMethod = UserInfoBean.getInstance().getCellDataMethod("crc").toUpperCase();
private static EndpointReference soapEPR = new EndpointReference(serviceURL);
private static EndpointReference crcEPR = new EndpointReference(
serviceURL + "request");
public static OMElement getVersion() {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace("http://axisversion.sample/xsd", "tns");
OMElement method = fac.createOMElement("getVersion", omNs);
return method;
}
/**
* Function to send getChildrenCount request to CRC web service
*
* @param String containing name of parentNode we wish to get data for
* @return A String containing the CRC web service response
*/
public static String getChildrenCount(String parentNode) throws Exception{
String response = null;
try {
GetPsmRequestMessage reqMsg = new GetPsmRequestMessage();
AnalysisDefinitionRequestType analysisData = reqMsg.getAnalysisDefinitionRequestType(parentNode);
String getCountRequestString = reqMsg.doBuildXML(analysisData);
// log.info(getCountRequestString);
if(serviceMethod.equals("SOAP")) {
// response = sendSOAP(getCountRequestString, "http://rpdr.partners.org/GetChildren", "GetChildren", type );
}
else {
response = sendREST(crcEPR, getCountRequestString);
}
} catch(SocketTimeoutException e){
log.info("Got timeout interrupt");
throw e;
} catch (AxisFault e) {
log.error(e.getMessage());
//throw new AxisFault(e);
} catch (Exception e) {
log.error(e.getMessage());
throw new Exception(e);
}
return response;
}
/**
* Function to send deleteQueryMaster request to CRC web service
*
* @param QueryMasterType containing the query master we want to delete
* @return A String containing the CRC web service response
*/
public static String deleteQueryMaster(QueryMasterType master) throws Exception{
String response = null;
try {
GetPsmRequestMessage reqMsg = new GetPsmRequestMessage();
MasterDeleteRequestType masterDelete = reqMsg.getMasterDeleteRequestType(master);
String deleteMasterRequestString = reqMsg.doBuildXML(masterDelete);
if(serviceMethod.equals("SOAP")) {
// response = sendSOAP(deleteMasterRequestString, "http://rpdr.partners.org/GetChildren", "GetChildren", type );
}
else {
response = sendREST(crcEPR, deleteMasterRequestString);
}
} catch (AxisFault e) {
log.error(e.getMessage());
//throw new AxisFault(e);
} catch (Exception e) {
log.error(e.getMessage());
throw new Exception(e);
}
return response;
}
/**
* Function to send getChildrenCount request to CRC web service
*
* @param QueryResultInstanceType containing resultInstance we wish to get data for
* @return A String containing the CRC web service response
*/
public static String getChildrenCount(QueryResultInstanceType resultInstance) throws Exception{
String response = null;
try {
GetPsmRequestMessage reqMsg = new GetPsmRequestMessage();
ResultRequestType resultData = reqMsg.getResultRequestType(resultInstance);
String getCountRequestString = reqMsg.doBuildXML(resultData);
// log.info(getCountRequestString);
if(serviceMethod.equals("SOAP")) {
// response = sendSOAP(getChildrenRequestString, "http://rpdr.partners.org/GetChildren", "GetChildren", type );
}
else {
response = sendREST(crcEPR, getCountRequestString);
}
} catch(SocketTimeoutException e){
log.info("Got timeout interrupt");
throw e;
} catch (AxisFault e) {
log.error(e.getMessage());
//throw new AxisFault(e);
} catch (Exception e) {
log.error(e.getMessage());
throw new Exception(e);
}
return response;
}
/**
* Function to send getAnalysisPluginsMetadata request to CRC web service
*
* @return A String containing the CRC web service response
*/
public static String getAnalysisPlugins() throws Exception{
String response = null;
try {
GetPsmRequestMessage reqMsg = new GetPsmRequestMessage();
AnalysisPluginMetadataRequestType request = reqMsg.getAnalysisPluginMetadataRequestType();
String requestString = reqMsg.doBuildXML(request);
// log.info(requestString);
if(serviceMethod.equals("SOAP")) {
// response = sendSOAP(getChildrenRequestString, "http://rpdr.partners.org/GetChildren", "GetChildren", type );
}
else {
response = sendREST(crcEPR, requestString);
}
} catch(SocketTimeoutException e){
log.info("Got timeout interrupt");
throw e;
} catch (AxisFault e) {
log.error(e.getMessage());
//throw new AxisFault(e);
} catch (Exception e) {
log.error(e.getMessage());
throw new Exception(e);
}
// log.info(response);
return response;
}
/**
* Function to convert CRC request to OMElement
*
* @param requestVdo String requestVdo to send to CRC web service
* @return An OMElement containing the Ont CRC service requestVdo
*/
public static OMElement getCrcPayLoad(String requestVdo) throws Exception {
OMElement lineItem = null;
try {
StringReader strReader = new StringReader(requestVdo);
XMLInputFactory xif = XMLInputFactory.newInstance();
XMLStreamReader reader = xif.createXMLStreamReader(strReader);
StAXOMBuilder builder = new StAXOMBuilder(reader);
lineItem = builder.getDocumentElement();
} catch (FactoryConfigurationError e) {
log.error(e.getMessage());
throw new Exception(e);
}
return lineItem;
}
public static String sendREST(EndpointReference restEPR, String requestString) throws Exception{
if(UserInfoBean.getInstance().getCellDataUrl("crc") == null){
throw new I2B2Exception("Data Repository cell (CRC) not configured in PM");
}
OMElement getCrc = getCrcPayLoad(requestString);
// if(type != null){
// if(type.equals("ONT"))
// MessageUtil.getInstance().setNavRequest("URL: " + restEPR + "\n" + getOnt.toString());
// else
// MessageUtil.getInstance().setFindRequest("URL: " + restEPR + "\n" + getOnt.toString());
// }
MessageUtil.getInstance().setNavRequest("URL: " + crcEPR + "\n" + getCrc.toString());
Options options = new Options();
log.debug(restEPR.toString());
options.setTo(restEPR);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(185000));
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,new Integer(185000));
ServiceClient sender = OntServiceClient.getServiceClient();
sender.setOptions(options);
OMElement result = sender.sendReceive(getCrc);
String response = result.toString();
MessageUtil.getInstance().setNavResponse("URL: " + crcEPR + "\n" + response);
// if(type != null){
// if(type.equals("ONT"))
// MessageUtil.getInstance().setNavResponse("URL: " + restEPR + "\n" + response);
// else
// MessageUtil.getInstance().setFindResponse("URL: " + restEPR + "\n" + response);
// }
return response;
}
/* public static String sendSOAP(String requestString, String action, String operation, String type) throws Exception{
ServiceClient sender = OntServiceClient.getServiceClient();
OperationClient operationClient = sender
.createClient(ServiceClient.ANON_OUT_IN_OP);
// creating message context
MessageContext outMsgCtx = new MessageContext();
// assigning message context's option object into instance variable
Options opts = outMsgCtx.getOptions();
// setting properties into option
log.debug(soapEPR);
opts.setTo(soapEPR);
opts.setAction(action);
opts.setTimeOutInMilliSeconds(180000);
log.debug(requestString);
SOAPEnvelope envelope = null;
try {
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
envelope = fac.getDefaultEnvelope();
OMNamespace omNs = fac.createOMNamespace(
"http://rpdr.partners.org/",
"rpdr");
// creating the SOAP payload
OMElement method = fac.createOMElement(operation, omNs);
OMElement value = fac.createOMElement("RequestXmlString", omNs);
value.setText(requestString);
method.addChild(value);
envelope.getBody().addChild(method);
}
catch (FactoryConfigurationError e) {
log.error(e.getMessage());
throw new Exception(e);
}
outMsgCtx.setEnvelope(envelope);
// used to be envelope.getBody().getFirstElement().toString()
if(type != null){
String request = envelope.toString();
String formattedRequest = XMLUtil.StrFindAndReplace("<", "<", request);
if (type.equals("ONT")){
MessageUtil.getInstance().setNavRequest("URL: " + soapEPR + "\n" + formattedRequest);
}
else {
MessageUtil.getInstance().setFindRequest("URL: " + soapEPR + "\n" + formattedRequest);
}
}
operationClient.addMessageContext(outMsgCtx);
operationClient.execute(true);
MessageContext inMsgtCtx = operationClient.getMessageContext("In");
SOAPEnvelope responseEnv = inMsgtCtx.getEnvelope();
OMElement soapResponse = responseEnv.getBody().getFirstElement();
if(type != null){
if(type.equals("ONT")){
String formattedResponse = XMLUtil.StrFindAndReplace("<", "<", responseEnv.toString());
String indentedResponse = XMLUtil.convertDOMToString(XMLUtil.convertStringToDOM(formattedResponse) );
MessageUtil.getInstance().setNavResponse("URL: " + soapEPR + "\n" + indentedResponse);
}else{
String formattedResponse = XMLUtil.StrFindAndReplace("<", "<", responseEnv.toString());
String indentedResponse = XMLUtil.convertDOMToString(XMLUtil.convertStringToDOM(formattedResponse) );
MessageUtil.getInstance().setFindResponse("URL: " + soapEPR + "\n" + indentedResponse);
}
}
// System.out.println("Sresponse: "+ soapResponse.toString());
OMElement soapResult = soapResponse.getFirstElement();
// System.out.println("Sresult: "+ soapResult.toString());
String i2b2Response = soapResult.getText();
log.debug(i2b2Response);
return i2b2Response;
}*/
}
| [
"[email protected]"
] | |
eca2a7bb7ba898beec3a92f30894d102332a7d09 | ed8117d56283a3910c60184f1d2daa23318d56cf | /hedwig-jdesignpattern/src/main/java/io/hedwig/dp/creational/prototype/Adams.java | f75b64bce6d7cd66f58f60c585e95cbe037a4891 | [] | no_license | simonpatrick/all-about-designpattern | 5753b477b3c965a3f6018e254f4d3aceaefb821a | 76075ed367bb0f52e4365de769ba2f26708c9a75 | refs/heads/master | 2021-04-26T16:43:14.524432 | 2016-02-03T01:22:40 | 2016-02-03T01:22:40 | 44,903,106 | 1 | 1 | null | 2023-03-20T11:50:52 | 2015-10-25T09:05:52 | Java | UTF-8 | Java | false | false | 175 | java | package io.hedwig.dp.creational.prototype;
public abstract class Adams extends Prototype {
@Override
public abstract Adams clone() throws CloneNotSupportedException;
} | [
"[email protected]"
] | |
5ba54293a32dff7a573eb237fd05c43197bec797 | 1a8bed788239b5ed784539f820fc0117e5f89ddc | /src/main/java/com/readboy/ssm/serviceImpl/SimpleDepositExpireDetailServiceImpl.java | ffe97fab6bbce0c83b745f716edd0198c2b550f9 | [] | no_license | jlf1997/bank_pm | 9cfbc3d63d8d0db782491f31539b102bbb17f043 | ce301773e11d451045bfacd53d0bd762316cc634 | refs/heads/master | 2020-03-29T22:14:05.261212 | 2019-04-29T08:17:06 | 2019-04-29T08:17:06 | 150,410,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,058 | java | package com.readboy.ssm.serviceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.readboy.ssm.mapper.SimpleDepositExpireDetailMapper;
import com.readboy.ssm.po.PageOption;
import com.readboy.ssm.po.SimpleDepositExpireDetail;
import com.readboy.ssm.service.SimpleDepositExpireDetailService;
public class SimpleDepositExpireDetailServiceImpl implements SimpleDepositExpireDetailService{
@Autowired
SimpleDepositExpireDetailMapper simpleDepositExpireDetailMapper;
@Override
public List<SimpleDepositExpireDetail> findDepositExpireDetail(
String tzrgh, String ksrq , String dqrq) throws Exception {
// TODO Auto-generated method stub
return simpleDepositExpireDetailMapper.findDepositExpireDetail(tzrgh,ksrq,dqrq);
}
@Override
public Integer findDataCountByCond(String tzrgh, String ksrq, String dqrq)
throws Exception {
// TODO Auto-generated method stub
Integer num = simpleDepositExpireDetailMapper.findDataCountByCond(tzrgh, ksrq, dqrq);
return num != null ? num : 0;
}
}
| [
"[email protected]"
] | |
435cadbf27689d99c76a918217b11eac15b0cf26 | a5383f4791b96834388bf1f41d179d1b55de17ab | /usestatic.java | 2a8f5257195041a0c13e1388372cf8f76c53bca2 | [] | no_license | clutchtutor/java-1 | eaa67d921a1a679b5b377b0d86316c5887cbbe13 | 045e85a157082b568657c584d1b98830e7cc286a | refs/heads/master | 2016-09-06T17:03:49.820779 | 2014-08-15T12:27:57 | 2014-08-15T12:27:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 310 | java | class usestatic
{
static int a;
static int b;
static void meth(int x)
{
a=10;
System.out.println("x: "+x);
System.out.println("a: "+a);
System.out.println("b: "+b);
}
static
{
System.out.println("This will initialise b");
b=a*4;
}
public static void main(String args[])
{
meth(42);
}
} | [
"[email protected]"
] | |
995b31a2761fa24b21a58d2d46ac19c484a50512 | 9b4ffc7dd99198ff5049914a44a7301fa3eabdab | /test/level15/lesson04/task03/Solution.java | 7e62170c94599615fd3019aabfc234d6994c1474 | [] | no_license | cac7usman/javarush | 9c72d0bbf6e695e405e65fbd3ab134fe1f078c1f | 9406da13e2ba194e19b7adfc27ff47234ef97cff | refs/heads/master | 2021-01-01T05:13:45.901033 | 2016-05-11T07:36:21 | 2016-05-11T07:36:21 | 58,228,892 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 516 | java | package com.javarush.test.level15.lesson04.task03;
/* ООП - Перегрузка - убираем лишнее
1. Подумайте, какая из реализаций метода print будет вызвана.
2. Удалите все лишние реализации метода print.
*/
public class Solution {
public static void main(String[] args) {
print(1);
}
public static void print(long l) {
System.out.println("Я буду Java прогером!");
}
}
| [
"[email protected]"
] | |
81c097d5914e12c8123d2f9ada114b94d29f686b | 913c643732ef95af1095d2347b16c41c95447d96 | /src/erando/controllers/ListeRandonneeController.java | 43987b8152d5b08afda2c873c7dbab276473a89d | [] | no_license | GingfreeX/E-RandoDesktop | b63853cd3aace5a56b02a436e0ddd4b4d3d21172 | cf0e1a105fa2b7eea7555ac20ad4d2a6de81f765 | refs/heads/master | 2021-01-20T08:53:55.653842 | 2017-05-14T21:16:48 | 2017-05-14T21:16:48 | 90,196,025 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,235 | 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 erando.controllers;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXComboBox;
import com.jfoenix.controls.JFXDatePicker;
import com.jfoenix.controls.JFXDrawer;
import com.jfoenix.controls.JFXHamburger;
import com.jfoenix.controls.JFXTextField;
import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition;
import erando.controllers.Randonne;
import erando.services.impl.RandonneService;
import java.io.IOException;
import java.net.URL;
import java.sql.Date;
import java.time.Duration;
import java.util.List;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import org.controlsfx.control.Notifications;
/**
* FXML Controller class
*
* @author amrouche
*/
public class ListeRandonneeController extends Application implements Initializable {
/**
* Initializes the controller class.
*/
@FXML
private JFXDrawer drawer;
@FXML
private JFXHamburger hamburger;
@FXML
private TableView<Randonne> tbRando;
@FXML
private TableColumn<?, ?> cltitre;
@FXML
private TableColumn<?, ?> cldestination;
@FXML
private TableColumn<?, ?> cldate;
@FXML
private TableColumn<?, ?> clnbrdeplaces;
public static List<Randonne> groupes;
private final ObservableList<Randonne> ListGroupes = FXCollections.observableArrayList();
RandonneService rando = new RandonneService();
int id ;
String titre ;
String description ;
String destination ;
double prix ;
String image ;
int nbrplace ;
String depart ;
int ageminimale ;
String transport;
String plan ;
Date date ;
String type ;
int niveau ;
@FXML
private JFXTextField txtitre;
@FXML
private JFXTextField txdescription;
@FXML
private JFXTextField txdestination;
@FXML
private JFXTextField txprix;
@FXML
private JFXTextField tximage;
@FXML
private JFXTextField txplaces;
@FXML
private JFXTextField txdepart;
@FXML
private JFXTextField txageminimale;
@FXML
private JFXTextField txtransport;
@FXML
private JFXTextField txplan;
@FXML
private JFXButton btnmodifier;
@FXML
private JFXButton btnsupprimer;
@FXML
private JFXDatePicker ddate;
@FXML
private JFXComboBox<String> cbtype;
@FXML
private JFXComboBox<Integer> cbniveau;
@FXML
private JFXTextField txid;
@FXML
void modifierAction(ActionEvent event) throws IOException {
titre=txtitre.getText();
description=txdescription.getText();
destination=txdestination.getText();
prix=Double.parseDouble(txprix.getText());
image=tximage.getText();
nbrplace=Integer.parseInt(txplaces.getText());
depart=txdepart.getText();
ageminimale=Integer.parseInt(txageminimale.getText());
transport=txtransport.getText();
plan=txplan.getText();
date=Date.valueOf(ddate.getValue());
type=cbtype.getSelectionModel().getSelectedItem();
id=Integer.parseInt(txid.getText());
niveau =cbniveau.getSelectionModel().getSelectedItem();
Randonne rando=new Randonne(id,titre, destination, date, prix, ageminimale, description, 1, transport, type, plan, destination, nbrplace, depart, niveau);
RandonneService serv1=new RandonneService();
serv1.update(rando);
/************************************/
Notifications notificationBuilder = Notifications.create()
.title("sucess")
.text("randonne modifier")
.graphic(null)
.position(Pos.BOTTOM_RIGHT)
.onAction(new EventHandler<ActionEvent>(){
@Override
public void handle(ActionEvent event){
System.out.println("Demande refusée");
}
});
notificationBuilder.darkStyle();
notificationBuilder.showConfirm();
/************************************/
Parent creerGroupe = FXMLLoader.load(getClass().getResource("listeRandonnee.fxml"));
Scene sceneAffichage = new Scene(creerGroupe);
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
stage.setScene(sceneAffichage);
stage.show();
}
@FXML
void supprimerAction(ActionEvent event) throws IOException {
id =Integer.parseInt(txid.getText());
RandonneService rando1= new RandonneService();
rando1.delete(id);
Parent creerGroupe = FXMLLoader.load(getClass().getResource("listeRandonnee.fxml"));
Scene sceneAffichage = new Scene(creerGroupe);
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
stage.setScene(sceneAffichage);
stage.show();
}
void setcelltable(){
cltitre.setCellValueFactory(new PropertyValueFactory<>("Titre"));
cldestination.setCellValueFactory(new PropertyValueFactory<>("Destination"));
cldate.setCellValueFactory(new PropertyValueFactory<>("Date"));
clnbrdeplaces.setCellValueFactory(new PropertyValueFactory<>("NbrePlace"));
groupes = rando.getAll();
for (Randonne gr : groupes) {
ListGroupes.add(gr);
// System.out.println(gr.getId_demande());
// System.out.println(gr.getUser().getId());
}
tbRando.setItems(ListGroupes);
}
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
cbtype.setItems(FXCollections.observableArrayList("camping","caving"));
cbniveau.setItems(FXCollections.observableArrayList(1,2,3,4,5,6,7,8,9));
setcelltable();
setCellValueFromTableToText();
txid.setVisible(false);
StackPane box = null;
try {
box = FXMLLoader.load(getClass().getResource("SidePanelContent.fxml"));
} catch (IOException ex) {
Logger.getLogger(AjoutRandonneeController.class.getName()).log(Level.SEVERE, null, ex);
}
//AnchorPane box = FXMLLoader.load(getClass().getResource("menuRando.fxml"));
drawer.setSidePane(box);
HamburgerBackArrowBasicTransition burgerTask2 = new HamburgerBackArrowBasicTransition(hamburger);
burgerTask2.setRate(-1);
hamburger.addEventHandler(MouseEvent.MOUSE_PRESSED, (e)-> {
burgerTask2.setRate(burgerTask2.getRate()*-1);
burgerTask2.play();
if(drawer.isShown()){
drawer.close();
}
else {
drawer.open();
}
});
}
private void setCellValueFromTableToText() {
tbRando.setOnMouseClicked(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
Randonne gr = tbRando.getItems().get(tbRando.getSelectionModel().getSelectedIndex());
txtitre.setText(gr.getTitre());
txdescription.setText(gr.getDescription());
txdestination.setText(gr.getDestination());
txdepart.setText(gr.getPointDepart());
txplaces.setText(Integer.toString(gr.getNbrePlace()));
txplan.setText(gr.getPlan());
txtransport.setText(gr.getMoyenTransport());
txageminimale.setText(Integer.toString(gr.getAgeMin()));
txprix.setText(Double.toString(gr.getPrix()));
ddate.setValue(gr.getDate().toLocalDate());
cbniveau.getSelectionModel().select(gr.getNiveau());
cbtype.getSelectionModel().select(gr.getType());
txid.setText(Integer.toString(gr.getId()));
}
});
}
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("listeRandonnee.fxml"));
Scene scene = new Scene(root);
// scene.getStylesheets().add(getClass().getResource("../images/theme.css").toExternalForm());
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
| [
"[email protected]"
] | |
b387ff13eff1c35a020a825ac53bcf1dde11afa9 | 6f869bbc3c51893ba11d15786e40d2bc1c49c58d | /src/test/java/tests/checkout/test013CheckOrderWithEmptyEmail.java | 08aad9241fd003752595fe096c9b201bacc4a0fa | [] | no_license | DivisionBell2/Java-Selenide | 7bf1d6c9ec7e3a97f92d545cab96df3f4463ba60 | fbc2af3051457329a842ae8fc8370cd7a8048d73 | refs/heads/master | 2021-01-03T15:14:44.564142 | 2020-02-12T22:34:51 | 2020-02-12T22:34:51 | 240,127,428 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,171 | java | package tests.checkout;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import logic.TextGenerator;
import logic.driver.DesktopDriver;
import logic.pages.CheckoutPage;
import logic.pages.MainPage;
import logic.pages.ProductPage;
public class test013CheckOrderWithEmptyEmail implements DesktopDriver, TextGenerator {
private MainPage mainPage;
private ProductPage productPage;
private CheckoutPage checkoutPage;
@BeforeMethod
void setUp() {
mainPage = new MainPage();
productPage = new ProductPage();
checkoutPage = new CheckoutPage();
}
@Test(description = "I check error displayed with empty email")
void test() {
mainPage
.selectRandomProduct()
;
productPage
.clickCheckoutBtn()
;
checkoutPage
.enterEmail("")
.enterPhone(generatePhone())
.selectAllCheckboxes()
.clickContinueButton()
.waitForErrorMessageInput("Заполните все поля правильно")
;
}
}
| [
"[email protected]"
] | |
f9064cf73a36ce910f2c53f6d06a7129d7fa3ec1 | 6bb2ab8be9dac87f17f432cc5b1f3c352dfbaada | /Projects/ZombieShooterCompatibility/src/com/base/engine/Game.java | f67c037016bf5ca36aaa72714970b2eda0eb2f60 | [] | no_license | Prottoy634/Java | 845202e13427d4a2ff85942b5b0976facf8a6d6c | 4b35c384a0276ecfd93a82d3aca6ed028687be7e | refs/heads/master | 2021-01-22T03:50:03.075898 | 2017-05-26T05:30:19 | 2017-05-26T05:30:19 | 92,408,698 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 840 | java | package com.base.engine;
public class Game
{
private static Level level;
private static boolean isRunning;
private static int levelNum = 0;
public Game()
{
loadNextLevel();
}
public void input()
{
level.input();
}
public void update()
{
if(isRunning)
level.update();
}
public void render()
{
if(isRunning)
level.render();
}
public static void loadNextLevel()
{
levelNum++;
level = new Level("level" + levelNum + ".png","WallCeiling11.png");//"WolfCollection.png"); //"WallCeiling"+levelNum+".png");
Transform.setProjection(70, Window.getWidth(), Window.getHeight(), 0.01f, 1000f);
Transform.setCamera(level.getPlayer().getCamera());
isRunning = true;
}
public static Level getLevel()
{
return level;
}
public static void setIsRunning(boolean value)
{
isRunning = value;
}
}
| [
"[email protected]"
] | |
4544bbc11bdf6e9019215563f425d653aaa174c8 | 29345337bf86edc938f3b5652702d551bfc3f11a | /core/src/main/java/com/alibaba/alink/operator/common/aps/checkpoint/ApsAkCheckpoint.java | 44e38b0ed09787d67256b5dd6ad90974835d79a1 | [
"Apache-2.0"
] | permissive | vacaly/Alink | 32b71ac4572ae3509d343e3d1ff31a4da2321b6d | edb543ee05260a1dd314b11384d918fa1622d9c1 | refs/heads/master | 2023-07-21T03:29:07.612507 | 2023-07-12T12:41:31 | 2023-07-12T12:41:31 | 283,079,072 | 0 | 0 | Apache-2.0 | 2020-07-28T02:46:14 | 2020-07-28T02:46:13 | null | UTF-8 | Java | false | false | 1,119 | java | package com.alibaba.alink.operator.common.aps.checkpoint;
import org.apache.flink.ml.api.misc.param.Params;
import com.alibaba.alink.common.io.filesystem.BaseFileSystem;
import com.alibaba.alink.common.io.filesystem.FilePath;
import com.alibaba.alink.operator.batch.BatchOperator;
import com.alibaba.alink.operator.batch.sink.AkSinkBatchOp;
import com.alibaba.alink.operator.batch.source.AkSourceBatchOp;
import com.alibaba.alink.operator.common.aps.ApsCheckpoint;
public final class ApsAkCheckpoint extends ApsCheckpoint {
private final BaseFileSystem <?> fileSystem;
public ApsAkCheckpoint(BaseFileSystem <?> fileSystem) {
this.fileSystem = fileSystem;
}
@Override
public void write(BatchOperator <?> operator, String identity, Long mlEnvId, Params params) {
operator.link(
new AkSinkBatchOp()
.setFilePath(new FilePath(identity, fileSystem))
.setMLEnvironmentId(mlEnvId)
);
}
@Override
public BatchOperator <?> read(String identity, Long mlEnvId, Params params) {
return new AkSourceBatchOp()
.setFilePath(new FilePath(identity, fileSystem))
.setMLEnvironmentId(mlEnvId);
}
}
| [
"[email protected]"
] | |
45fcd1b7cafd793cf86024bb95f10013d293f973 | a58de11c8bcd65dbbadae9795f094b93dbde9876 | /app/src/main/java/cn/edu/xjtu/se/bookgamma/pretend/have_next_child/group/want_woman_by_day/early_year/See_great_company_to_thing.java | 505294173bf8e4bb38d80dc7e76c8f916badf213 | [] | no_license | XJGamma/BookGamma | 977710c4aabe55a49e8dde1ae1d8c4ae7c2971b8 | c1bf5a7f70f704316c92da91dc03ef8925b2f5b7 | refs/heads/master | 2020-04-06T07:10:29.345080 | 2016-08-30T16:56:25 | 2016-08-30T16:56:25 | 61,119,004 | 1 | 1 | null | 2016-08-30T16:56:26 | 2016-06-14T11:56:44 | Java | UTF-8 | Java | false | false | 543 | java |
package cn.edu.xjtu.se.bookgamma.pretend.have_next_child.group.want_woman_by_day.early_year;
public class See_great_company_to_thing {
private int come_time_for_thing;
private int hand;
public See_great_company_to_thing() {
come_time_for_thing = 2856;
hand = 1130;
}
public void have_right_day_after_new_time() {
week_and_thing();
System.out.println("early_group" + come_time_for_thing);
}
private void week_and_thing() {
System.out.println("few_woman" + hand);
}
}
| [
"[email protected]"
] | |
9b6526ff47c2943fc46e95b3c33fd7b51b01203f | be76ec4d0ea3cdfd65e9e73993ba160f3fec4557 | /app/src/main/java/com/example/rsingh7/androidtesttheatro/MainActivity.java | 194d14e2e4738c6658251f8db84aece4c483a632 | [] | no_license | rahulsingh0089/AndroidTestTheatro | aaf4cb2d80523f5d1f015968af20efa973e92cc5 | bf34009eaa4b91440f6867035e5976965aef9387 | refs/heads/master | 2020-03-26T06:04:42.925006 | 2018-08-13T17:49:40 | 2018-08-13T17:49:40 | 144,588,622 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,275 | java | package com.example.rsingh7.androidtesttheatro;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
EditText etMovieName;
Button btSearchMovie;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
etMovieName = findViewById(R.id.etMovieName);
btSearchMovie = findViewById(R.id.btSearchMovie);
btSearchMovie.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String movieName = etMovieName.getText().toString();
if(!movieName.equals("") ) {
Intent intent = new Intent(MainActivity.this, MovieList.class);
intent.putExtra("movieName", movieName);
startActivity(intent);
}else{
Toast.makeText(MainActivity.this,"Please enter movie name",Toast.LENGTH_LONG).show();
}
}
});
}
}
| [
"[email protected]"
] | |
defe8ef2168ad87861350acd1cb1a39d1c71e1c4 | 08562426b6f0523515a93c468e04c1633a845a67 | /betoproj/module1/src/main/java/com/beto/mockito/CreateStudentResponse.java | 24f150c2fa208e4e01cec17f44ee355ff624b5d1 | [] | no_license | BETO-AlarmTILT/zbetoexp | 1cbc5fef98f1356957382f3a82c3ebd3182efaef | 4e0c4c4f38f12d6e522380691358429186ff9926 | refs/heads/master | 2022-12-23T04:08:26.134833 | 2020-01-22T09:05:03 | 2020-01-22T09:05:03 | 182,753,215 | 0 | 0 | null | 2022-12-10T05:20:37 | 2019-04-22T10:35:24 | Java | UTF-8 | Java | false | false | 544 | java | package com.beto.mockito;
public class CreateStudentResponse {
private final String errorMessage;
private final Student student;
public CreateStudentResponse(String errorMessage,
Student student) {
this.errorMessage = errorMessage;
this.student = student;
}
public boolean isSuccess() {
return null == errorMessage;
}
public String getErrorMessage() {
return errorMessage;
}
public Student getStudent() {
return student;
}
}
| [
"[email protected]"
] | |
7ca5c9b682cfc319c2f508b5fdb0d8c8e7b4e314 | c9a6fe9e79dcfcedcbdaa3d553137018deee1ed7 | /MedicalCrypto/MedicalCrypto-ejb/src/java/beans/facades/medical/TreatmentFacadeLocal.java | 87e667c55d96e5b82a14f54dbf4f489c66529961 | [] | no_license | hpbaotho/medical | d416206823882fe6ccde46b69665a199dbc271b2 | 56b72d7c2dfe183665a4f0ac58f812aad60c90c7 | refs/heads/master | 2021-01-10T10:08:32.262407 | 2008-09-01T15:01:45 | 2008-09-01T15:01:45 | 49,556,637 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 519 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package beans.facades.medical;
import entities.medical.Treatment;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author Piotrek
*/
@Local
public interface TreatmentFacadeLocal {
void create(Treatment treatment);
void edit(Treatment treatment);
void remove(Treatment treatment);
Treatment find(Object id);
List<Treatment> findAll();
void refresh(Treatment toRefresh);
}
| [
"[email protected]"
] | |
93604f0fc8afad425e7194b3ea1d61155c0c0208 | bedd7efaf864c9cbbe4f95d05c0506e3696eedf4 | /src/main/java/in/eko/service/service/CallbackService.java | 56ff870d7d0ad73f1705dacda03b2543ca1a6da5 | [] | no_license | ashutosh-aanand/eps-payments-banking-service-integration-template | a67f1dc08c4fbb318919c29d5ecdee5ef5362f4c | c12340c95cc9a6668b0174e4581daebda9331f72 | refs/heads/master | 2022-12-02T20:08:11.802293 | 2020-08-13T20:21:06 | 2020-08-13T20:21:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,395 | java | package in.eko.service.service;
import java.util.List;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.glassfish.jersey.client.ClientProperties;
import org.jboss.logging.Logger;
import in.eko.service.hibernate.HibernateDataAccess;
import in.eko.service.model.TransactionBO;
import in.eko.service.persistence.TransactionPersistence;
import in.eko.service.responseView.TransactionResponseView;
import in.eko.service.util.helper.ConfigurationConstant;
import in.eko.service.util.helper.StartupCache;
import in.eko.service.util.helper.TransactionConstant;
import in.eko.service.util.helper.WebInstanceConstants;
public class CallbackService implements Runnable {
private static Logger logger = Logger.getLogger(CallbackService.class);
List<TransactionResponseView> callbackTransactionList;
public CallbackService(List<TransactionResponseView> callbacklist) {
super();
this.callbackTransactionList = callbacklist;
}
public CallbackService() {
super();
}
public boolean postCallbackRequest(TransactionResponseView request) {
logger.info("Inside Post callbackrequest of CallbackService class ..");
boolean result = false;
try {
Client client = ClientBuilder.newClient();
client.property(ClientProperties.CONNECT_TIMEOUT, 4000);
client.property(ClientProperties.READ_TIMEOUT, 4000);
WebTarget baseTarget = client
.target(StartupCache.getInstance().getConfigByKey(getUniqueKey(ConfigurationConstant.CALL_BACK_URL, WebInstanceConstants.GLOBAL))
.getConfigValue() + "/" + request.getEkoTrxnId() + "/update");
Response res = baseTarget.request(MediaType.APPLICATION_JSON).post(Entity.json(request));
if (res.getStatus() == Status.OK.getStatusCode()) {
result = true;
}
logger.info("Callback response " + res.getStatus());
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
public void notifySimplibank(List<TransactionResponseView> callbacklist) {
logger.info("Inside notify simplibank block of CallbackService class...");
callbacklist.forEach(request -> {
boolean res = postCallbackRequest(request);
if (res) {
try {
startTransaction();
TransactionBO transaction = TransactionPersistence.getInstance().getTransactionByEkoTrxnId(request.getEkoTrxnId());
if (transaction != null) {
transaction.setCallbackStatus(TransactionConstant.CALLBACK_SUCCESS);
transaction.save();
HibernateDataAccess.commitTransaction();
}
} catch (Exception e) {
e.printStackTrace();
rollBackTransaction();
} finally {
HibernateDataAccess.closeSessionTL();
}
}
});
}
public String getUniqueKey(String key, Integer source) {
return key + "_" + source;
}
@Override
public void run() {
logger.info("Inside run method of CallbackService....");
notifySimplibank(this.callbackTransactionList);
}
public void startTransaction() {
HibernateDataAccess.getSessionTL();
HibernateDataAccess.startTransaction();
}
public void rollBackTransaction() {
HibernateDataAccess.rollbackTransaction();
HibernateDataAccess.closeSessionTL();
HibernateDataAccess.getSessionTL();
HibernateDataAccess.startTransaction();
}
}
| [
"[email protected]"
] | |
5ce5c05cdee219c85a4388f6c13df7350e52f72d | 78dcbce34c0fe334b60d625ef935b435272c7410 | /src/main/java/com/demo/model/Signals.java | 80de8b512f88bf9ef2be95169097aefb7fda97a3 | [] | no_license | gankuizhi/huilv | ea0ffe1c2c08568093cd483e98954df1a44e9123 | 05092f1b1cee7d2574d826c5d5967f3dab7aada0 | refs/heads/master | 2023-01-20T00:00:58.311914 | 2020-11-19T02:06:51 | 2020-11-19T02:06:51 | 314,105,155 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,366 | java | package com.demo.model;
import java.util.Date;
public class Signals {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column signals.style
*
* @mbg.generated
*/
private String style;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column signals.information
*
* @mbg.generated
*/
private String information;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column signals.price
*
* @mbg.generated
*/
private Date price;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column signals.status
*
* @mbg.generated
*/
private Integer status;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column signals.style
*
* @return the value of signals.style
*
* @mbg.generated
*/
public String getStyle() {
return style;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column signals.style
*
* @param style the value for signals.style
*
* @mbg.generated
*/
public void setStyle(String style) {
this.style = style == null ? null : style.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column signals.information
*
* @return the value of signals.information
*
* @mbg.generated
*/
public String getInformation() {
return information;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column signals.information
*
* @param information the value for signals.information
*
* @mbg.generated
*/
public void setInformation(String information) {
this.information = information == null ? null : information.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column signals.price
*
* @return the value of signals.price
*
* @mbg.generated
*/
public Date getPrice() {
return price;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column signals.price
*
* @param price the value for signals.price
*
* @mbg.generated
*/
public void setPrice(Date price) {
this.price = price;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column signals.status
*
* @return the value of signals.status
*
* @mbg.generated
*/
public Integer getStatus() {
return status;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column signals.status
*
* @param status the value for signals.status
*
* @mbg.generated
*/
public void setStatus(Integer status) {
this.status = status;
}
} | [
"[email protected]"
] | |
11b058ac1c7d11146ab50803195799570827eaa9 | 34888ac78a739b669855bff60c280714c23258bf | /api/src/main/java/com/chenzhigao/repository/Term.java | 0b068a107959356ce9716f1186aa92868904f01a | [] | no_license | chenzhigao/course | 73685245436fcc71d73bde8a39bf0e9ca8b0ee8a | 59dfbe6aa13fcc51352136935dd1e72ae89d2fc8 | refs/heads/master | 2020-04-07T15:43:31.266828 | 2018-11-28T09:20:59 | 2018-11-28T09:20:59 | 158,498,378 | 0 | 0 | null | 2018-11-28T09:21:00 | 2018-11-21T05:59:34 | HTML | UTF-8 | Java | false | false | 853 | java | package com.chenzhigao.repository;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Term {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
public Term(Long id, String name) {
this.id = id;
this.name = name;
}
public Term() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "Term{" +
"id=" + id +
", name='" + name + '\'' +
'}';
}
}
| [
"[email protected]"
] | |
9eda234ce270dd785f3ff66a526199c8bb930e30 | 867bb3414c183bc19cf985bb6d3c55f53bfc4bfd | /member/src/main/java/com/cjcx/member/framework/controller/AdminSupport.java | 3d84eae9707574aa44b76810654612073b5d4dc6 | [] | no_license | easonstudy/cloud-dev | 49d02fa513df3c92c5ed03cec61844d10890b80b | fe898cbfb746232fe199e83969b89cb83e85dfaf | refs/heads/master | 2020-03-29T05:39:36.279494 | 2018-10-22T10:55:14 | 2018-10-22T10:55:32 | 136,574,935 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,469 | java | package com.cjcx.member.framework.controller;
import com.cjcx.member.dto.StaffDto;
import com.cjcx.member.entity.Staff;
import com.cjcx.member.framework.web.PageParams;
import com.cjcx.member.service.ILoginService;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.util.WebUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.Map;
public abstract class AdminSupport {
public static final String PARAM_PAGE_NUM = "pageNum";
public static final String PARAM_PAGE_SIZE = "pageSize";
protected HttpServletRequest request;
protected HttpServletResponse response;
protected HttpSession session;
@Autowired
ILoginService loginService;
@ModelAttribute
public void setReqAndRes(HttpServletRequest request, HttpServletResponse response) {
this.request = request;
this.response = response;
this.session = request.getSession();
}
public String getAuthorizationToken() {
return request.getHeader("Authorization");
}
public Staff getStaff() {
String token = getAuthorizationToken();
StaffDto staff = loginService.getUserByToken(token);
return staff;
}
/**
* 是否开启分页
*/
protected void enabledPaging() {
PageParams params = getPageParams(request);
if (params.isEnabled()) {
PageHelper.startPage(params.getPageNum(), params.getPageSize());
}
}
protected PageParams getPageParams(HttpServletRequest request) {
Map<String, Object> filters = WebUtils.getParametersStartingWith(request, "");
PageParams page = new PageParams();
if (filters != null) {
String pageNum = String.valueOf(filters.get(PARAM_PAGE_NUM));
if (StringUtils.isNumeric(pageNum)) {
page.setPageNum(Integer.parseInt(pageNum));
page.setEnabled(true);
}
String pageSize = String.valueOf(filters.get(PARAM_PAGE_SIZE));
if (StringUtils.isNumeric(pageSize)) {
page.setPageSize(Integer.parseInt(pageSize));
page.setEnabled(true);
}
}
return page;
}
}
| [
"11"
] | 11 |
a2fc979aabaa38ed1c8d779585107868a69cec0b | af5524cb789a8ac35551918706d1088710025e6c | /src/com/dmdirc/addons/systray/PopupCommand.java | 751370abd5c0ae6e1158ad67dbca12faeeb69a40 | [] | no_license | fbthrift/client | 04073c931d8391b5f72a51f52e41a31abaaf3093 | 707800fedb1deec1e5a3765ee4e73bb95ff3ba3b | refs/heads/master | 2022-05-25T11:49:18.831108 | 2019-03-14T07:21:13 | 2019-03-14T07:21:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,103 | java | /*
* Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
*
* 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 com.dmdirc.addons.systray;
import com.dmdirc.Server;
import com.dmdirc.commandparser.CommandArguments;
import com.dmdirc.commandparser.CommandManager;
import com.dmdirc.commandparser.commands.ServerCommand;
import com.dmdirc.ui.interfaces.InputWindow;
/**
* The /popup command allows the user to show a popup message from the system
* tray icon.
* @author chris
*/
public final class PopupCommand extends ServerCommand {
/** The SystrayPlugin that we belong to. */
private final SystrayPlugin parent;
/**
* Creates a new instance of PopupCommand.
* @param newParent The plugin that this command belongs to
*/
public PopupCommand(final SystrayPlugin newParent) {
super();
this.parent = newParent;
CommandManager.registerCommand(this);
}
/**
* Used to show a notification using this plugin.
*
* @param title Title of dialog if applicable
* @param message Message to show
* @return True if the notification was shown.
*/
public boolean showPopup(final String title, final String message) {
parent.notify(title, message);
return true;
}
/** {@inheritDoc} */
@Override
public void execute(final InputWindow origin, final Server server,
final boolean isSilent, final CommandArguments args) {
showPopup("DMDirc", args.getArgumentsAsString());
}
/** {@inheritDoc} */
@Override
public String getName() {
return "popup";
}
/** {@inheritDoc} */
@Override
public boolean showInHelp() {
return true;
}
/** {@inheritDoc} */
@Override
public String getHelp() {
return "popup <message> - shows the message as a system tray popup";
}
/** Unregisters this command from the CommandManager. */
public void unregister() {
CommandManager.unregisterCommand(this);
}
}
| [
"[email protected]"
] | |
4417be5c23a142811564bd865917252ed04cb525 | 131d5485e56c8de5c4d306560e31247fc5dbe755 | /src/main/java/com/zipcodewilmington/froilansfarm/farm/things/livingthings/creatures/people/AnimalFeeder.java | 37125888fccd8072c6c092ef750f462bf430b974 | [] | no_license | EricBarnaba/CR-MesoLabs-Interfaces-FarmerFroilan | 0904c1037ef5756c114f54619367a689bb145492 | 8e35aa9faf928729cc30edb5ab1ae8cfa833a18c | refs/heads/master | 2021-01-25T10:06:10.691909 | 2018-03-04T03:35:14 | 2018-03-04T03:35:14 | 123,338,373 | 0 | 0 | null | 2018-02-28T20:25:35 | 2018-02-28T20:25:34 | null | UTF-8 | Java | false | false | 478 | java | package com.zipcodewilmington.froilansfarm.farm.things.livingthings.creatures.people;
import com.zipcodewilmington.froilansfarm.farm.buildings.ChickenCoop;
import com.zipcodewilmington.froilansfarm.farm.buildings.Stable;
import com.zipcodewilmington.froilansfarm.farm.buildings.WareHouse;
public interface AnimalFeeder {
void feedChickens (ChickenCoop targetCoop, WareHouse wareHouseToFeedFrom);
void feedHorses (Stable targetStable, WareHouse wareHouseToFeedFrom);
}
| [
"[email protected]"
] | |
db6d41093ca6a4d5e1927e709cfd81dacb827480 | 49927dfad5ad094d32ed9a380da490a02f4241ff | /command/remote/CeilingFanOffCommand.java | 3926b9e0aab7f57d76908293af57a070c14d4a02 | [
"MIT"
] | permissive | miguelalba-old/HFDP | 46bcd8c0eef4567ee9371bd9597ada73f56084d0 | 4ea46c78669cb37d942d88ba625deae2e1488752 | refs/heads/master | 2020-12-31T02:49:44.272471 | 2015-06-02T15:58:40 | 2015-06-02T15:58:40 | 34,756,887 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 248 | java | package command.remote;
public class CeilingFanOffCommand implements Command {
CeilingFan ceilingFan;
public CeilingFanOffCommand(CeilingFan ceilingFan) {
this.ceilingFan = ceilingFan;
}
public void execute() {
ceilingFan.off();
}
}
| [
"[email protected]"
] | |
c4d6b5e22dac2011f0714d6fa92997f9212adfee | 3d186d472d6b448340b23856395926e27787ba74 | /SathishProjects/J2ee/StoreManagement/src/main/java/com/sunsat/sathish/j2ee/store/dao/service/impl/OrderItemDaoServiceImpl.java | 1b1dfc066b095caa8b5ef080aab5b61b668b0171 | [] | no_license | SunSat/Projects | b49e3dbe09bfe8601726c78c83bf7bc6b28a6907 | b873de7e2cda87e377aa575e11062d9b4f3c773e | refs/heads/master | 2022-12-20T19:39:30.886457 | 2020-07-02T13:59:34 | 2020-07-02T13:59:34 | 106,909,820 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,981 | java | package com.sunsat.sathish.j2ee.store.dao.service.impl;
import com.sunsat.sathish.j2ee.store.dao.manager.DaoManager;
import com.sunsat.sathish.j2ee.store.dao.model.OrderItemDaoModel;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
/**
* Created by sathishkumar_su on 1/13/2018.
*/
public class OrderItemDaoServiceImpl extends BaseDaoServiceImpl {
public int delete(OrderItemDaoModel model) throws SQLException {
String sql = "delete from order_item where id=?";
PreparedStatement delSt = null;
int deleteCount = 0 ;
Connection con = DaoManager.getConnection();
try {
con.setAutoCommit(false);
delSt = con.prepareStatement(sql);
delSt.setInt(1, model.getId());
deleteCount = delSt.executeUpdate();
con.commit();
con.setAutoCommit(true);
}finally {
if(delSt != null) {
delSt.close();
}
}
return deleteCount;
}
public int add(OrderItemDaoModel model) throws SQLException {
String sql = "insert into order_item (id,orderid,itemid,quantity,each_item_cost,total_cost) " +
"values (?,?,?,?,?,?)";
PreparedStatement insertSt = null;
int maxId = getMaxId("order_item","id");
Connection con = DaoManager.getConnection();
try {
con.setAutoCommit(false);
insertSt = con.prepareStatement(sql);
insertSt.setInt(1, maxId);
insertSt.setInt(2, model.getOrderId());
insertSt.setInt(3, model.getItemId());
insertSt.setInt(4, model.getQuantity());
insertSt.setFloat(5, model.getEachItemCost());
insertSt.setFloat(6, model.getTotalCost());
insertSt.execute();
con.commit();
con.setAutoCommit(true);
} finally {
if(null != insertSt)
insertSt.close();
}
return maxId;
}
public int update(OrderItemDaoModel model) throws SQLException {
String sql = "update order_item set orderid=?, itemid=?, quantity=?, each_item_cost=?, total_cost=? where userid=?";
PreparedStatement updateSt = null;
int updateCount = 0;
Connection con = DaoManager.getConnection();
try {
con.setAutoCommit(false);
updateSt = con.prepareStatement(sql);
updateSt.setInt(1, model.getOrderId());
updateSt.setInt(2, model.getItemId());
updateSt.setInt(3, model.getQuantity());
updateSt.setFloat(4, model.getEachItemCost());
updateSt.setFloat(5, model.getTotalCost());
updateSt.setInt(6,model.getId());
updateCount = updateSt.executeUpdate();
con.commit();
con.setAutoCommit(true);
}finally {
if(updateSt != null) {
updateSt.close();
}
}
return updateCount;
}
public List<OrderItemDaoModel> getByName(String name) throws SQLException {
return null;
}
public OrderItemDaoModel getById(int id) throws SQLException {
String sql = "select * from order_item where id = ?";
PreparedStatement getState = null;
ResultSet rs = null;
Connection con = null;
OrderItemDaoModel model = new OrderItemDaoModel();
try {
con = DaoManager.getConnection();
getState = con.prepareStatement(sql);
getState.setInt(1, id);
rs = getState.executeQuery();
while(rs.next()) {
model.setId(rs.getInt("id"));
model.setOrderId(rs.getInt("userid"));
model.setItemId(rs.getInt("itemid"));
model.setQuantity(rs.getInt("quantity"));
model.setEachItemCost(rs.getFloat("each_item_cost"));
model.setTotalCost(rs.getFloat("total_cost"));
}
}finally {
if(getState != null) {
getState.close();
}
if(rs!= null){
rs.close();
}
}
return model;
}
public List<OrderItemDaoModel> getAllByName(String objName) throws SQLException{
return null;
}
public List<OrderItemDaoModel> getAllItemByOrderId(int orderId) throws SQLException {
String sql = "select * from order_item where orderid = ?";
PreparedStatement getState = null;
ResultSet rs = null;
Connection con = null;
List<OrderItemDaoModel> listOfItemByOrderId = new ArrayList<>();
try {
con = DaoManager.getConnection();
getState = con.prepareStatement(sql);
getState.setInt(1, orderId);
rs = getState.executeQuery();
while(rs.next()) {
OrderItemDaoModel model = new OrderItemDaoModel();
model.setId(rs.getInt("id"));
model.setOrderId(rs.getInt("userid"));
model.setItemId(rs.getInt("itemid"));
model.setQuantity(rs.getInt("quantity"));
model.setEachItemCost(rs.getFloat("each_item_cost"));
model.setTotalCost(rs.getFloat("total_cost"));
listOfItemByOrderId.add(model);
}
}finally {
if(getState != null) {
getState.close();
}
if(rs!= null){
rs.close();
}
}
return listOfItemByOrderId;
}
public List<OrderItemDaoModel> getAllOrdersByItemId(int itemId) throws SQLException {
String sql = "select * from order_item where itemid = ?";
PreparedStatement getState = null;
ResultSet rs = null;
Connection con = null;
List<OrderItemDaoModel> listOfOrdersByItemId = new ArrayList<>();
try {
con = DaoManager.getConnection();
getState = con.prepareStatement(sql);
getState.setInt(1, itemId);
rs = getState.executeQuery();
while(rs.next()) {
OrderItemDaoModel model = new OrderItemDaoModel();
model.setId(rs.getInt("id"));
model.setOrderId(rs.getInt("userid"));
model.setItemId(rs.getInt("itemid"));
model.setQuantity(rs.getInt("quantity"));
model.setEachItemCost(rs.getFloat("each_item_cost"));
model.setTotalCost(rs.getFloat("total_cost"));
listOfOrdersByItemId.add(model);
}
}finally {
if(getState != null) {
getState.close();
}
if(rs!= null){
rs.close();
}
}
return listOfOrdersByItemId;
}
public static void main(String[] args) {
}
}
| [
"[email protected]"
] | |
ed980d3c73821868c8fc3aa7b8f7552cae1ae45b | 5692e8f63746eefea6e78b2ebe1f72e7a8c5efb6 | /webui/chatClient/Source/net/papayachat/chatservice/ChatClient.java | 8dec2f2df6b842f424009eaf3111ed10415f76c2 | [
"Apache-2.0"
] | permissive | bodaodev-billydai/ChatLearner | f88168765a66fa81a03408f106c28d853b623d02 | 739d7236388dea027e037a77b66813f6f3d29276 | refs/heads/master | 2021-06-29T02:29:15.310977 | 2017-09-17T20:08:49 | 2017-09-17T20:08:49 | 105,568,343 | 1 | 0 | null | 2017-10-02T18:17:16 | 2017-10-02T18:17:16 | null | UTF-8 | Java | false | false | 1,839 | java | /*=============================================================================
* Copyright 2017 Bo Shao. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
==============================================================================*/
package net.papayachat.chatservice;
import java.math.BigInteger;
import java.util.Map;
import javax.xml.ws.BindingProvider;
import com.sun.xml.ws.client.BindingProviderProperties;
public class ChatClient {
private final ChatServicePortType cPort;
/**
* serviceAddress example: http://papayachat.net:8080/ChatService
*/
public ChatClient(String serviceAddress, int timeout) {
ChatService cServ = new ChatService();
this.cPort = cServ.getChatServicePort();
Map<String, Object> ctxt = ((BindingProvider)cPort).getRequestContext();
ctxt.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceAddress);
ctxt.put(BindingProviderProperties.CONNECT_TIMEOUT, timeout*1000);
ctxt.put(BindingProviderProperties.REQUEST_TIMEOUT, timeout*1000);
}
public String getReply(String question) throws Exception {
ObjectFactory of = new ObjectFactory();
ParamsTypes params = of.createParamsTypes();
params.setSessionId(BigInteger.valueOf(1l));
params.setQuestion(question);
SessionSentence resp = cPort.reply(params);
return resp.getSentence();
}
} | [
"[email protected]"
] | |
458aae415e6d8e9ba35c3afe0faee037626a3826 | 5caddf4da02c6d56ae42f4c3e974fed2118ce347 | /src/main/java/seedu/resireg/logic/commands/ToggleCommandResult.java | 99475996f6a1a1f316e9be4085a01e4603b03e2c | [
"MIT"
] | permissive | JingYenLoh/tp | 3b575f0ccc5930513be7968a6d1290c4a7317b7f | bf59e3c373a1e1dbe3a848ad21f84e31918c3169 | refs/heads/master | 2022-12-30T16:27:02.073983 | 2020-10-14T15:45:33 | 2020-10-14T15:57:25 | 294,945,668 | 0 | 0 | NOASSERTION | 2020-09-12T13:07:11 | 2020-09-12T13:07:10 | null | UTF-8 | Java | false | false | 932 | java | package seedu.resireg.logic.commands;
import seedu.resireg.ui.MainWindow;
// @@author CornCobs-reused
// Reused from
// https://github.com/AY1920S2-CS2103-W15-2/
// with minor modifications
public class ToggleCommandResult extends CommandResult {
private final TabView tabView;
/**
* Constructs a {@code ToggleCommandResult} with the specified {@code feedbackToUser},
* that will toggle the UI to the given TabView.
*/
public ToggleCommandResult(String feedbackToUser, TabView tabView) {
super(feedbackToUser);
this.tabView = tabView;
}
@Override
public void displayResult(MainWindow mainWindow) {
mainWindow.handleToggle(tabView);
}
@Override
public boolean equals(Object other) {
return super.equals(other)
&& other instanceof ToggleCommandResult
&& tabView == ((ToggleCommandResult) other).tabView;
}
}
| [
"[email protected]"
] | |
1050441cd2a1d31cb0ba914fd8da6e9efa8c423d | 8f73b8e00a6af87ecc1d894196ce46fc96bfe9bc | /Observer/src/headfirst/observer/weather/Observer.java | c76b18adf6ab92ba196ba7944e9cf0a4afb71531 | [] | no_license | TRM79-Temp/Patterns | d9175e093e718bdfc91682ec264d33d847668a42 | e50e4b45448b33bbf964799c4f78d3c025aa2540 | refs/heads/master | 2021-01-22T11:15:44.413455 | 2017-06-01T15:28:08 | 2017-06-01T15:28:08 | 92,674,751 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 178 | java | package headfirst.observer.weather;
/**
* Created by Roman on 26.05.2017.
*/
public interface Observer {
public void update(float temp, float humidity, float pressure);
}
| [
"[email protected]"
] | |
0d0c8fdc2f4a575fd0a3a107726f6caee02c7cd8 | 115fc7bbb60d915632bba730063560f78df63461 | /rsf-core/src/main/java/net/hasor/libs/com/caucho/hessian/io/HessianSerializerInput.java | c2451c17c90346d1d47f142881cb971c299fecf0 | [] | no_license | richardy2012/rsf | 63ef4fd82485bea3c345fd80a250deb7c62659d5 | 9f2571c63046649dc18ede49d6bab87036e07680 | refs/heads/master | 2021-01-22T01:51:30.098854 | 2016-04-13T12:59:52 | 2016-04-13T12:59:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,848 | java | /*
* Copyright (c) 2001-2004 Caucho Technology, Inc. All rights reserved.
*
* The Apache Software License, Version 1.1
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Caucho Technology (http://www.caucho.com/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "Burlap", "Resin", and "Caucho" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* [email protected].
*
* 5. Products derived from this software may not be called "Resin"
* nor may "Resin" appear in their names without prior written
* permission of Caucho Technology.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Scott Ferguson
*/
package net.hasor.libs.com.caucho.hessian.io;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Input stream for Hessian requests, deserializing objects using the
* java.io.Serialization protocol.
*
* <p>HessianSerializerInput is unbuffered, so any client needs to provide
* its own buffering.
*
* <h3>Serialization</h3>
*
* <pre>
* InputStream is = new FileInputStream("test.xml");
* HessianOutput in = new HessianSerializerOutput(is);
*
* Object obj = in.readObject();
* is.close();
* </pre>
*
* <h3>Parsing a Hessian reply</h3>
*
* <pre>
* InputStream is = ...; // from http connection
* HessianInput in = new HessianSerializerInput(is);
* String value;
*
* in.startReply(); // read reply header
* value = in.readString(); // read string value
* in.completeReply(); // read reply footer
* </pre>
*/
@SuppressWarnings("unused")
public class HessianSerializerInput extends Hessian2Input {
/**
* Creates a new Hessian input stream, initialized with an
* underlying input stream.
*
* @param is the underlying input stream.
*/
public HessianSerializerInput(InputStream is) {
super(is);
}
/**
* Creates an uninitialized Hessian input stream.
*/
public HessianSerializerInput() {
super(null);
}
/**
* Reads an object from the input stream. cl is known not to be
* a Map.
*/
protected Object readObjectImpl(Class<?> cl) throws IOException {
try {
Object obj = cl.newInstance();
if (_refs == null)
_refs = new ArrayList<Object>();
_refs.add(obj);
HashMap<String, Field> fieldMap = getFieldMap(cl);
int code = read();
for (; code >= 0 && code != 'z'; code = read()) {
unread();
Object key = readObject();
Field field = (Field) fieldMap.get(key);
if (field != null) {
Object value = readObject(field.getType());
field.set(obj, value);
} else {
Object value = readObject();
}
}
if (code != 'z')
throw expect("map", code);
// if there's a readResolve method, call it
try {
Method method = cl.getMethod("readResolve", new Class[0]);
return method.invoke(obj, new Object[0]);
} catch (Exception e) {}
return obj;
} catch (IOException e) {
throw e;
} catch (Exception e) {
throw new IOExceptionWrapper(e);
}
}
/**
* Creates a map of the classes fields.
*/
protected HashMap<String, Field> getFieldMap(Class<?> cl) {
HashMap<String, Field> fieldMap = new HashMap<String, Field>();
for (; cl != null; cl = cl.getSuperclass()) {
Field[] fields = cl.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
if (Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers())) {
continue;
}
// XXX: could parameterize the handler to only deal with public
field.setAccessible(true);
fieldMap.put(field.getName(), field);
}
}
return fieldMap;
}
} | [
"[email protected]"
] | |
5509dc04c4a69e23c55efb81e7fe606391a9c773 | ce20041f5d965d7436e51ead2f58f014c76c9332 | /src/main/java/net/ugorji/oxygen/web/WebLocal.java | bab3979587745be9480708ea7242db7871cc75c1 | [
"MIT"
] | permissive | ugorji/java-web | bdb4531d73be21ff2171bc4b98781bf0aaffe673 | 4ae8432b84a2737705c2dde13739cddcf5aba6f4 | refs/heads/master | 2020-05-15T08:44:36.778982 | 2019-05-06T07:44:49 | 2019-05-06T07:44:49 | 182,164,807 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,210 | java | /* <<< COPYRIGHT START >>>
* Copyright 2006-Present OxygenSoftwareLibrary.com
* Licensed under the GNU Lesser General Public License.
* http://www.gnu.org/licenses/lgpl.html
*
* @author: Ugorji Nwoke
* <<< COPYRIGHT END >>>
*/
package net.ugorji.oxygen.web;
import java.util.Properties;
import net.ugorji.oxygen.util.I18n;
import net.ugorji.oxygen.util.OxyLocal;
/**
* This uses ThreadLocals to keep track of variables that are relevant within the context of a
* request/response thread of execution.
*
* @author ugorjid
*/
public class WebLocal {
public static void setI18n(I18n o) {
OxyLocal.set(I18n.class, o);
}
public static void setWebInteractionContext(WebInteractionContext o) {
OxyLocal.set(WebInteractionContext.class, o);
}
public static void setViewContext(ViewContext o) {
OxyLocal.set(ViewContext.class, o);
}
public static void setTemplateHandler(TemplateHandler o) {
OxyLocal.set(TemplateHandler.class, o);
}
public static void setProperties(Properties o) {
OxyLocal.set(Properties.class, o);
}
public static void setWebUserSession(WebUserSession o) {
OxyLocal.set(WebUserSession.class, o);
}
public static void setWebContainerEngine(WebContainerEngine o) {
OxyLocal.set(WebContainerEngine.class, o);
}
public static WebInteractionContext getWebInteractionContext() {
return (WebInteractionContext) OxyLocal.get(WebInteractionContext.class);
}
public static ViewContext getViewContext() {
return (ViewContext) OxyLocal.get(ViewContext.class);
}
public static TemplateHandler getTemplateHandler() {
return (TemplateHandler) OxyLocal.get(TemplateHandler.class);
}
public static I18n getI18n() {
return (I18n) OxyLocal.get(I18n.class);
}
public static Properties getProperties() {
return (Properties) OxyLocal.get(Properties.class);
}
public static WebUserSession getWebUserSession() {
return (WebUserSession) OxyLocal.get(WebUserSession.class);
}
public static WebContainerEngine getWebContainerEngine() {
return (WebContainerEngine) OxyLocal.get(WebContainerEngine.class);
}
}
| [
"[email protected]"
] | |
0ee424e9a57056719a7bd58235f2946aada7b949 | 21c2f55b571a4a43da0bb56396fce4202bce3306 | /src/generated/java/Murmur/_ServerCallbackOperations.java | f4954e82f72c27014b407cd0226c249e0b761012 | [] | no_license | Tiim/telegram_mumble_bot | 33c4729158db89aadf98dfbcc4bf6a14c9141ee3 | fb4d373595fbdafd7eda2668ab703a70157fa6b7 | refs/heads/master | 2021-01-10T19:50:51.597343 | 2016-01-04T06:48:43 | 2016-01-04T06:48:43 | 39,690,708 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,271 | java | // **********************************************************************
//
// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.4.2
//
// <auto-generated>
//
// Generated from file `_ServerCallbackOperations.java'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package Murmur;
/**
* Callback interface for servers. You can supply an implementation of this to receive notification
* messages from the server.
* If an added callback ever throws an exception or goes away, it will be automatically removed.
* Please note that all callbacks are done asynchronously; murmur does not wait for the callback to
* complete before continuing processing.
* Note that callbacks are removed when a server is stopped, so you should have a callback for
* {@link MetaCallback.started} which calls {@link Server.addCallback}.
* @see MetaCallback
* @see Server.addCallback
**/
public interface _ServerCallbackOperations
{
/**
* Called when a user connects to the server.
* @param state State of connected user.
* @param __current The Current object for the invocation.
**/
void userConnected(User state, Ice.Current __current);
/**
* Called when a user disconnects from the server. The user has already been removed, so you can no longer use methods like {@link Server.getState}
* to retrieve the user's state.
* @param state State of disconnected user.
* @param __current The Current object for the invocation.
**/
void userDisconnected(User state, Ice.Current __current);
/**
* Called when a user state changes. This is called if the user moves, is renamed, is muted, deafened etc.
* @param state New state of user.
* @param __current The Current object for the invocation.
**/
void userStateChanged(User state, Ice.Current __current);
/**
* Called when user writes a text message
* @param state the User sending the message
* @param message the TextMessage the user has sent
* @param __current The Current object for the invocation.
**/
void userTextMessage(User state, TextMessage message, Ice.Current __current);
/**
* Called when a new channel is created.
* @param state State of new channel.
* @param __current The Current object for the invocation.
**/
void channelCreated(Channel state, Ice.Current __current);
/**
* Called when a channel is removed. The channel has already been removed, you can no longer use methods like {@link Server.getChannelState}
* @param state State of removed channel.
* @param __current The Current object for the invocation.
**/
void channelRemoved(Channel state, Ice.Current __current);
/**
* Called when a new channel state changes. This is called if the channel is moved, renamed or if new links are added.
* @param state New state of channel.
* @param __current The Current object for the invocation.
**/
void channelStateChanged(Channel state, Ice.Current __current);
}
| [
"[email protected]"
] | |
da3d57c048d5cf9ef7e97fea1d35f07514e9c16b | 07189492251fe29b5643bbb2b6dee33d8b386a23 | /src/main/java/org/example/shoppingcart/models/data/Category.java | 6bf33eb099bcdc2420a5926ba595245bcbfdc6ea | [] | no_license | ClaireProvot/Java---Shopping-Cart | 69715d9624bdeca792f3c20dc484c09244909d88 | 4c956d354b93312d70b34d803640d0af2f2429fc | refs/heads/master | 2023-02-24T13:26:30.228304 | 2021-01-29T10:56:11 | 2021-01-29T10:56:11 | 314,180,474 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 460 | java | package org.example.shoppingcart.models.data;
import lombok.Data;
import javax.persistence.*;
import javax.validation.constraints.Size;
@Entity
@Table(name="categories")
@Data
public class Category {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
@Column(name = "id")
private int id;
@Size(min=2, message="Name must be at least 2 characters long")
private String name;
private String slug;
private int sorting;
}
| [
"[email protected]"
] | |
cf8bab673436483e8b0184fd76182f1af17d6f45 | e50e395fc24b6314ddff0757231fda8c3ecd758a | /src/main/java/com/jqmkj/roadtrip/dao/SysKeywordDao.java | 72b6d958a18fcedbc9539debd1caf7c4fe03c9b0 | [] | no_license | arafat5549/finalssm | 6fb6c4cd2fbfdb9c7b46c9aaf680d0186bd27b47 | bd6ce895531204a2342bcb16b4d381e8a7c1d350 | refs/heads/master | 2020-12-30T14:20:41.483617 | 2019-03-13T07:16:18 | 2019-03-13T07:16:18 | 91,313,157 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 801 | java | package com.jqmkj.roadtrip.dao;
import com.jqmkj.roadtrip.base.BaseMapper;
import com.jqmkj.roadtrip.entity.SysKeyword;
public interface SysKeywordDao extends BaseMapper<SysKeyword> {
/** START 以下为自己编写的代码区域 一般是多表之间的联合查询 START **/
/** END 以下为自己编写的代码区域 一般是多表之间的联合查询 END **/
int deleteByPrimaryKey(Long id);
SysKeyword selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(SysKeyword record);
int updateByPrimaryKey(SysKeyword record);
int deleteLogicByIds(int deleteFlag, Integer[] ids);
int batchInsert(java.util.List<SysKeyword> list);
int batchInsertSelective(java.util.List<SysKeyword> list, SysKeyword.Column ... selective);
} | [
"[email protected]"
] | |
87a983f6d80cb97b3e661860ee00800728bdf467 | cc30050224e022f4cc4197b57db3b5777d3b7291 | /platforms/android/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java | 4ad49dba4c0a4525b75dc772c6ae7340c3cc7619 | [] | no_license | Bandana-K/DailyWishes | 42bd2db31e2309ca5ea86919c36c8f96e5d462ad | 6f368125c5f55df67f1072e7aa93d70785e840e0 | refs/heads/master | 2022-03-02T18:08:50.413568 | 2019-09-07T16:46:58 | 2019-09-07T16:46:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 95,566 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.appcompat;
public final class R {
public static final class anim {
public static final int abc_fade_in = 0x7f010000;
public static final int abc_fade_out = 0x7f010001;
public static final int abc_grow_fade_in_from_bottom = 0x7f010002;
public static final int abc_popup_enter = 0x7f010003;
public static final int abc_popup_exit = 0x7f010004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f010005;
public static final int abc_slide_in_bottom = 0x7f010006;
public static final int abc_slide_in_top = 0x7f010007;
public static final int abc_slide_out_bottom = 0x7f010008;
public static final int abc_slide_out_top = 0x7f010009;
}
public static final class attr {
public static final int actionBarDivider = 0x7f020000;
public static final int actionBarItemBackground = 0x7f020001;
public static final int actionBarPopupTheme = 0x7f020002;
public static final int actionBarSize = 0x7f020003;
public static final int actionBarSplitStyle = 0x7f020004;
public static final int actionBarStyle = 0x7f020005;
public static final int actionBarTabBarStyle = 0x7f020006;
public static final int actionBarTabStyle = 0x7f020007;
public static final int actionBarTabTextStyle = 0x7f020008;
public static final int actionBarTheme = 0x7f020009;
public static final int actionBarWidgetTheme = 0x7f02000a;
public static final int actionButtonStyle = 0x7f02000b;
public static final int actionDropDownStyle = 0x7f02000c;
public static final int actionLayout = 0x7f02000d;
public static final int actionMenuTextAppearance = 0x7f02000e;
public static final int actionMenuTextColor = 0x7f02000f;
public static final int actionModeBackground = 0x7f020010;
public static final int actionModeCloseButtonStyle = 0x7f020011;
public static final int actionModeCloseDrawable = 0x7f020012;
public static final int actionModeCopyDrawable = 0x7f020013;
public static final int actionModeCutDrawable = 0x7f020014;
public static final int actionModeFindDrawable = 0x7f020015;
public static final int actionModePasteDrawable = 0x7f020016;
public static final int actionModePopupWindowStyle = 0x7f020017;
public static final int actionModeSelectAllDrawable = 0x7f020018;
public static final int actionModeShareDrawable = 0x7f020019;
public static final int actionModeSplitBackground = 0x7f02001a;
public static final int actionModeStyle = 0x7f02001b;
public static final int actionModeWebSearchDrawable = 0x7f02001c;
public static final int actionOverflowButtonStyle = 0x7f02001d;
public static final int actionOverflowMenuStyle = 0x7f02001e;
public static final int actionProviderClass = 0x7f02001f;
public static final int actionViewClass = 0x7f020020;
public static final int activityChooserViewStyle = 0x7f020021;
public static final int alertDialogButtonGroupStyle = 0x7f020022;
public static final int alertDialogCenterButtons = 0x7f020023;
public static final int alertDialogStyle = 0x7f020024;
public static final int alertDialogTheme = 0x7f020025;
public static final int allowStacking = 0x7f020026;
public static final int arrowHeadLength = 0x7f020027;
public static final int arrowShaftLength = 0x7f020028;
public static final int autoCompleteTextViewStyle = 0x7f020029;
public static final int background = 0x7f02002a;
public static final int backgroundSplit = 0x7f02002b;
public static final int backgroundStacked = 0x7f02002c;
public static final int backgroundTint = 0x7f02002d;
public static final int backgroundTintMode = 0x7f02002e;
public static final int barLength = 0x7f02002f;
public static final int borderlessButtonStyle = 0x7f020030;
public static final int buttonBarButtonStyle = 0x7f020031;
public static final int buttonBarNegativeButtonStyle = 0x7f020032;
public static final int buttonBarNeutralButtonStyle = 0x7f020033;
public static final int buttonBarPositiveButtonStyle = 0x7f020034;
public static final int buttonBarStyle = 0x7f020035;
public static final int buttonPanelSideLayout = 0x7f020036;
public static final int buttonStyle = 0x7f020037;
public static final int buttonStyleSmall = 0x7f020038;
public static final int buttonTint = 0x7f020039;
public static final int buttonTintMode = 0x7f02003a;
public static final int checkboxStyle = 0x7f02003b;
public static final int checkedTextViewStyle = 0x7f02003c;
public static final int closeIcon = 0x7f02003d;
public static final int closeItemLayout = 0x7f02003e;
public static final int collapseContentDescription = 0x7f02003f;
public static final int collapseIcon = 0x7f020040;
public static final int color = 0x7f020041;
public static final int colorAccent = 0x7f020042;
public static final int colorButtonNormal = 0x7f020043;
public static final int colorControlActivated = 0x7f020044;
public static final int colorControlHighlight = 0x7f020045;
public static final int colorControlNormal = 0x7f020046;
public static final int colorPrimary = 0x7f020047;
public static final int colorPrimaryDark = 0x7f020048;
public static final int colorSwitchThumbNormal = 0x7f020049;
public static final int commitIcon = 0x7f02004a;
public static final int contentInsetEnd = 0x7f02004b;
public static final int contentInsetLeft = 0x7f02004c;
public static final int contentInsetRight = 0x7f02004d;
public static final int contentInsetStart = 0x7f02004e;
public static final int controlBackground = 0x7f02004f;
public static final int customNavigationLayout = 0x7f020050;
public static final int defaultQueryHint = 0x7f020051;
public static final int dialogPreferredPadding = 0x7f020052;
public static final int dialogTheme = 0x7f020053;
public static final int displayOptions = 0x7f020054;
public static final int divider = 0x7f020055;
public static final int dividerHorizontal = 0x7f020056;
public static final int dividerPadding = 0x7f020057;
public static final int dividerVertical = 0x7f020058;
public static final int drawableSize = 0x7f020059;
public static final int drawerArrowStyle = 0x7f02005a;
public static final int dropDownListViewStyle = 0x7f02005b;
public static final int dropdownListPreferredItemHeight = 0x7f02005c;
public static final int editTextBackground = 0x7f02005d;
public static final int editTextColor = 0x7f02005e;
public static final int editTextStyle = 0x7f02005f;
public static final int elevation = 0x7f020060;
public static final int expandActivityOverflowButtonDrawable = 0x7f020061;
public static final int gapBetweenBars = 0x7f02006b;
public static final int goIcon = 0x7f02006c;
public static final int height = 0x7f02006d;
public static final int hideOnContentScroll = 0x7f02006e;
public static final int homeAsUpIndicator = 0x7f02006f;
public static final int homeLayout = 0x7f020070;
public static final int icon = 0x7f020071;
public static final int iconifiedByDefault = 0x7f020072;
public static final int imageButtonStyle = 0x7f020073;
public static final int indeterminateProgressStyle = 0x7f020074;
public static final int initialActivityCount = 0x7f020075;
public static final int isLightTheme = 0x7f020076;
public static final int itemPadding = 0x7f020077;
public static final int layout = 0x7f020078;
public static final int listChoiceBackgroundIndicator = 0x7f020079;
public static final int listDividerAlertDialog = 0x7f02007a;
public static final int listItemLayout = 0x7f02007b;
public static final int listLayout = 0x7f02007c;
public static final int listPopupWindowStyle = 0x7f02007d;
public static final int listPreferredItemHeight = 0x7f02007e;
public static final int listPreferredItemHeightLarge = 0x7f02007f;
public static final int listPreferredItemHeightSmall = 0x7f020080;
public static final int listPreferredItemPaddingLeft = 0x7f020081;
public static final int listPreferredItemPaddingRight = 0x7f020082;
public static final int logo = 0x7f020083;
public static final int logoDescription = 0x7f020084;
public static final int maxButtonHeight = 0x7f020085;
public static final int measureWithLargestChild = 0x7f020086;
public static final int multiChoiceItemLayout = 0x7f020087;
public static final int navigationContentDescription = 0x7f020088;
public static final int navigationIcon = 0x7f020089;
public static final int navigationMode = 0x7f02008a;
public static final int overlapAnchor = 0x7f02008b;
public static final int paddingEnd = 0x7f02008c;
public static final int paddingStart = 0x7f02008d;
public static final int panelBackground = 0x7f02008e;
public static final int panelMenuListTheme = 0x7f02008f;
public static final int panelMenuListWidth = 0x7f020090;
public static final int popupMenuStyle = 0x7f020091;
public static final int popupTheme = 0x7f020092;
public static final int popupWindowStyle = 0x7f020093;
public static final int preserveIconSpacing = 0x7f020094;
public static final int progressBarPadding = 0x7f020095;
public static final int progressBarStyle = 0x7f020096;
public static final int queryBackground = 0x7f020097;
public static final int queryHint = 0x7f020098;
public static final int radioButtonStyle = 0x7f020099;
public static final int ratingBarStyle = 0x7f02009a;
public static final int ratingBarStyleIndicator = 0x7f02009b;
public static final int ratingBarStyleSmall = 0x7f02009c;
public static final int searchHintIcon = 0x7f02009d;
public static final int searchIcon = 0x7f02009e;
public static final int searchViewStyle = 0x7f02009f;
public static final int seekBarStyle = 0x7f0200a0;
public static final int selectableItemBackground = 0x7f0200a1;
public static final int selectableItemBackgroundBorderless = 0x7f0200a2;
public static final int showAsAction = 0x7f0200a3;
public static final int showDividers = 0x7f0200a4;
public static final int showText = 0x7f0200a5;
public static final int singleChoiceItemLayout = 0x7f0200a6;
public static final int spinBars = 0x7f0200a7;
public static final int spinnerDropDownItemStyle = 0x7f0200a8;
public static final int spinnerStyle = 0x7f0200a9;
public static final int splitTrack = 0x7f0200aa;
public static final int srcCompat = 0x7f0200ab;
public static final int state_above_anchor = 0x7f0200ac;
public static final int submitBackground = 0x7f0200ad;
public static final int subtitle = 0x7f0200ae;
public static final int subtitleTextAppearance = 0x7f0200af;
public static final int subtitleTextColor = 0x7f0200b0;
public static final int subtitleTextStyle = 0x7f0200b1;
public static final int suggestionRowLayout = 0x7f0200b2;
public static final int switchMinWidth = 0x7f0200b3;
public static final int switchPadding = 0x7f0200b4;
public static final int switchStyle = 0x7f0200b5;
public static final int switchTextAppearance = 0x7f0200b6;
public static final int textAllCaps = 0x7f0200b7;
public static final int textAppearanceLargePopupMenu = 0x7f0200b8;
public static final int textAppearanceListItem = 0x7f0200b9;
public static final int textAppearanceListItemSmall = 0x7f0200ba;
public static final int textAppearanceSearchResultSubtitle = 0x7f0200bb;
public static final int textAppearanceSearchResultTitle = 0x7f0200bc;
public static final int textAppearanceSmallPopupMenu = 0x7f0200bd;
public static final int textColorAlertDialogListItem = 0x7f0200be;
public static final int textColorSearchUrl = 0x7f0200bf;
public static final int theme = 0x7f0200c0;
public static final int thickness = 0x7f0200c1;
public static final int thumbTextPadding = 0x7f0200c2;
public static final int title = 0x7f0200c3;
public static final int titleMarginBottom = 0x7f0200c4;
public static final int titleMarginEnd = 0x7f0200c5;
public static final int titleMarginStart = 0x7f0200c6;
public static final int titleMarginTop = 0x7f0200c7;
public static final int titleMargins = 0x7f0200c8;
public static final int titleTextAppearance = 0x7f0200c9;
public static final int titleTextColor = 0x7f0200ca;
public static final int titleTextStyle = 0x7f0200cb;
public static final int toolbarNavigationButtonStyle = 0x7f0200cc;
public static final int toolbarStyle = 0x7f0200cd;
public static final int track = 0x7f0200ce;
public static final int voiceIcon = 0x7f0200cf;
public static final int windowActionBar = 0x7f0200d0;
public static final int windowActionBarOverlay = 0x7f0200d1;
public static final int windowActionModeOverlay = 0x7f0200d2;
public static final int windowFixedHeightMajor = 0x7f0200d3;
public static final int windowFixedHeightMinor = 0x7f0200d4;
public static final int windowFixedWidthMajor = 0x7f0200d5;
public static final int windowFixedWidthMinor = 0x7f0200d6;
public static final int windowMinWidthMajor = 0x7f0200d7;
public static final int windowMinWidthMinor = 0x7f0200d8;
public static final int windowNoTitle = 0x7f0200d9;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs = 0x7f030000;
public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f030001;
public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f030002;
public static final int abc_allow_stacked_button_bar = 0x7f030003;
public static final int abc_config_actionMenuItemAllCaps = 0x7f030004;
public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f030005;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f030006;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f030007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f040000;
public static final int abc_background_cache_hint_selector_material_light = 0x7f040001;
public static final int abc_color_highlight_material = 0x7f040002;
public static final int abc_input_method_navigation_guard = 0x7f040003;
public static final int abc_primary_text_disable_only_material_dark = 0x7f040004;
public static final int abc_primary_text_disable_only_material_light = 0x7f040005;
public static final int abc_primary_text_material_dark = 0x7f040006;
public static final int abc_primary_text_material_light = 0x7f040007;
public static final int abc_search_url_text = 0x7f040008;
public static final int abc_search_url_text_normal = 0x7f040009;
public static final int abc_search_url_text_pressed = 0x7f04000a;
public static final int abc_search_url_text_selected = 0x7f04000b;
public static final int abc_secondary_text_material_dark = 0x7f04000c;
public static final int abc_secondary_text_material_light = 0x7f04000d;
public static final int accent_material_dark = 0x7f04000e;
public static final int accent_material_light = 0x7f04000f;
public static final int background_floating_material_dark = 0x7f040010;
public static final int background_floating_material_light = 0x7f040011;
public static final int background_material_dark = 0x7f040012;
public static final int background_material_light = 0x7f040013;
public static final int bright_foreground_disabled_material_dark = 0x7f040014;
public static final int bright_foreground_disabled_material_light = 0x7f040015;
public static final int bright_foreground_inverse_material_dark = 0x7f040016;
public static final int bright_foreground_inverse_material_light = 0x7f040017;
public static final int bright_foreground_material_dark = 0x7f040018;
public static final int bright_foreground_material_light = 0x7f040019;
public static final int button_material_dark = 0x7f04001a;
public static final int button_material_light = 0x7f04001b;
public static final int dim_foreground_disabled_material_dark = 0x7f04001c;
public static final int dim_foreground_disabled_material_light = 0x7f04001d;
public static final int dim_foreground_material_dark = 0x7f04001e;
public static final int dim_foreground_material_light = 0x7f04001f;
public static final int foreground_material_dark = 0x7f040020;
public static final int foreground_material_light = 0x7f040021;
public static final int highlighted_text_material_dark = 0x7f040022;
public static final int highlighted_text_material_light = 0x7f040023;
public static final int hint_foreground_material_dark = 0x7f040024;
public static final int hint_foreground_material_light = 0x7f040025;
public static final int material_blue_grey_800 = 0x7f040026;
public static final int material_blue_grey_900 = 0x7f040027;
public static final int material_blue_grey_950 = 0x7f040028;
public static final int material_deep_teal_200 = 0x7f040029;
public static final int material_deep_teal_500 = 0x7f04002a;
public static final int material_grey_100 = 0x7f04002b;
public static final int material_grey_300 = 0x7f04002c;
public static final int material_grey_50 = 0x7f04002d;
public static final int material_grey_600 = 0x7f04002e;
public static final int material_grey_800 = 0x7f04002f;
public static final int material_grey_850 = 0x7f040030;
public static final int material_grey_900 = 0x7f040031;
public static final int primary_dark_material_dark = 0x7f040035;
public static final int primary_dark_material_light = 0x7f040036;
public static final int primary_material_dark = 0x7f040037;
public static final int primary_material_light = 0x7f040038;
public static final int primary_text_default_material_dark = 0x7f040039;
public static final int primary_text_default_material_light = 0x7f04003a;
public static final int primary_text_disabled_material_dark = 0x7f04003b;
public static final int primary_text_disabled_material_light = 0x7f04003c;
public static final int ripple_material_dark = 0x7f04003d;
public static final int ripple_material_light = 0x7f04003e;
public static final int secondary_text_default_material_dark = 0x7f04003f;
public static final int secondary_text_default_material_light = 0x7f040040;
public static final int secondary_text_disabled_material_dark = 0x7f040041;
public static final int secondary_text_disabled_material_light = 0x7f040042;
public static final int switch_thumb_disabled_material_dark = 0x7f040043;
public static final int switch_thumb_disabled_material_light = 0x7f040044;
public static final int switch_thumb_material_dark = 0x7f040045;
public static final int switch_thumb_material_light = 0x7f040046;
public static final int switch_thumb_normal_material_dark = 0x7f040047;
public static final int switch_thumb_normal_material_light = 0x7f040048;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f050000;
public static final int abc_action_bar_default_height_material = 0x7f050001;
public static final int abc_action_bar_default_padding_end_material = 0x7f050002;
public static final int abc_action_bar_default_padding_start_material = 0x7f050003;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f050004;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f050005;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f050006;
public static final int abc_action_bar_progress_bar_size = 0x7f050007;
public static final int abc_action_bar_stacked_max_height = 0x7f050008;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f050009;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f05000a;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f05000b;
public static final int abc_action_button_min_height_material = 0x7f05000c;
public static final int abc_action_button_min_width_material = 0x7f05000d;
public static final int abc_action_button_min_width_overflow_material = 0x7f05000e;
public static final int abc_alert_dialog_button_bar_height = 0x7f05000f;
public static final int abc_button_inset_horizontal_material = 0x7f050010;
public static final int abc_button_inset_vertical_material = 0x7f050011;
public static final int abc_button_padding_horizontal_material = 0x7f050012;
public static final int abc_button_padding_vertical_material = 0x7f050013;
public static final int abc_config_prefDialogWidth = 0x7f050014;
public static final int abc_control_corner_material = 0x7f050015;
public static final int abc_control_inset_material = 0x7f050016;
public static final int abc_control_padding_material = 0x7f050017;
public static final int abc_dialog_fixed_height_major = 0x7f050018;
public static final int abc_dialog_fixed_height_minor = 0x7f050019;
public static final int abc_dialog_fixed_width_major = 0x7f05001a;
public static final int abc_dialog_fixed_width_minor = 0x7f05001b;
public static final int abc_dialog_list_padding_vertical_material = 0x7f05001c;
public static final int abc_dialog_min_width_major = 0x7f05001d;
public static final int abc_dialog_min_width_minor = 0x7f05001e;
public static final int abc_dialog_padding_material = 0x7f05001f;
public static final int abc_dialog_padding_top_material = 0x7f050020;
public static final int abc_disabled_alpha_material_dark = 0x7f050021;
public static final int abc_disabled_alpha_material_light = 0x7f050022;
public static final int abc_dropdownitem_icon_width = 0x7f050023;
public static final int abc_dropdownitem_text_padding_left = 0x7f050024;
public static final int abc_dropdownitem_text_padding_right = 0x7f050025;
public static final int abc_edit_text_inset_bottom_material = 0x7f050026;
public static final int abc_edit_text_inset_horizontal_material = 0x7f050027;
public static final int abc_edit_text_inset_top_material = 0x7f050028;
public static final int abc_floating_window_z = 0x7f050029;
public static final int abc_list_item_padding_horizontal_material = 0x7f05002a;
public static final int abc_panel_menu_list_width = 0x7f05002b;
public static final int abc_search_view_preferred_width = 0x7f05002c;
public static final int abc_search_view_text_min_width = 0x7f05002d;
public static final int abc_seekbar_track_background_height_material = 0x7f05002e;
public static final int abc_seekbar_track_progress_height_material = 0x7f05002f;
public static final int abc_select_dialog_padding_start_material = 0x7f050030;
public static final int abc_switch_padding = 0x7f050031;
public static final int abc_text_size_body_1_material = 0x7f050032;
public static final int abc_text_size_body_2_material = 0x7f050033;
public static final int abc_text_size_button_material = 0x7f050034;
public static final int abc_text_size_caption_material = 0x7f050035;
public static final int abc_text_size_display_1_material = 0x7f050036;
public static final int abc_text_size_display_2_material = 0x7f050037;
public static final int abc_text_size_display_3_material = 0x7f050038;
public static final int abc_text_size_display_4_material = 0x7f050039;
public static final int abc_text_size_headline_material = 0x7f05003a;
public static final int abc_text_size_large_material = 0x7f05003b;
public static final int abc_text_size_medium_material = 0x7f05003c;
public static final int abc_text_size_menu_material = 0x7f05003d;
public static final int abc_text_size_small_material = 0x7f05003e;
public static final int abc_text_size_subhead_material = 0x7f05003f;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f050040;
public static final int abc_text_size_title_material = 0x7f050041;
public static final int abc_text_size_title_material_toolbar = 0x7f050042;
public static final int disabled_alpha_material_dark = 0x7f050048;
public static final int disabled_alpha_material_light = 0x7f050049;
public static final int highlight_alpha_material_colored = 0x7f05004a;
public static final int highlight_alpha_material_dark = 0x7f05004b;
public static final int highlight_alpha_material_light = 0x7f05004c;
public static final int notification_large_icon_height = 0x7f050051;
public static final int notification_large_icon_width = 0x7f050052;
public static final int notification_subtext_size = 0x7f050059;
}
public static final class drawable {
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f060000;
public static final int abc_action_bar_item_background_material = 0x7f060001;
public static final int abc_btn_borderless_material = 0x7f060002;
public static final int abc_btn_check_material = 0x7f060003;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f060004;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f060005;
public static final int abc_btn_colored_material = 0x7f060006;
public static final int abc_btn_default_mtrl_shape = 0x7f060007;
public static final int abc_btn_radio_material = 0x7f060008;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f060009;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f06000a;
public static final int abc_btn_rating_star_off_mtrl_alpha = 0x7f06000b;
public static final int abc_btn_rating_star_on_mtrl_alpha = 0x7f06000c;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f06000d;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f06000e;
public static final int abc_cab_background_internal_bg = 0x7f06000f;
public static final int abc_cab_background_top_material = 0x7f060010;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f060011;
public static final int abc_control_background_material = 0x7f060012;
public static final int abc_dialog_material_background_dark = 0x7f060013;
public static final int abc_dialog_material_background_light = 0x7f060014;
public static final int abc_edit_text_material = 0x7f060015;
public static final int abc_ic_ab_back_mtrl_am_alpha = 0x7f060016;
public static final int abc_ic_clear_mtrl_alpha = 0x7f060017;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f060018;
public static final int abc_ic_go_search_api_mtrl_alpha = 0x7f060019;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f06001a;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f06001b;
public static final int abc_ic_menu_moreoverflow_mtrl_alpha = 0x7f06001c;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f06001d;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f06001e;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f06001f;
public static final int abc_ic_search_api_mtrl_alpha = 0x7f060020;
public static final int abc_ic_star_black_16dp = 0x7f060021;
public static final int abc_ic_star_black_36dp = 0x7f060022;
public static final int abc_ic_star_half_black_16dp = 0x7f060023;
public static final int abc_ic_star_half_black_36dp = 0x7f060024;
public static final int abc_ic_voice_search_api_mtrl_alpha = 0x7f060025;
public static final int abc_item_background_holo_dark = 0x7f060026;
public static final int abc_item_background_holo_light = 0x7f060027;
public static final int abc_list_divider_mtrl_alpha = 0x7f060028;
public static final int abc_list_focused_holo = 0x7f060029;
public static final int abc_list_longpressed_holo = 0x7f06002a;
public static final int abc_list_pressed_holo_dark = 0x7f06002b;
public static final int abc_list_pressed_holo_light = 0x7f06002c;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f06002d;
public static final int abc_list_selector_background_transition_holo_light = 0x7f06002e;
public static final int abc_list_selector_disabled_holo_dark = 0x7f06002f;
public static final int abc_list_selector_disabled_holo_light = 0x7f060030;
public static final int abc_list_selector_holo_dark = 0x7f060031;
public static final int abc_list_selector_holo_light = 0x7f060032;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f060033;
public static final int abc_popup_background_mtrl_mult = 0x7f060034;
public static final int abc_ratingbar_full_material = 0x7f060035;
public static final int abc_ratingbar_indicator_material = 0x7f060036;
public static final int abc_ratingbar_small_material = 0x7f060037;
public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f060038;
public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f060039;
public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f06003a;
public static final int abc_scrubber_primary_mtrl_alpha = 0x7f06003b;
public static final int abc_scrubber_track_mtrl_alpha = 0x7f06003c;
public static final int abc_seekbar_thumb_material = 0x7f06003d;
public static final int abc_seekbar_track_material = 0x7f06003e;
public static final int abc_spinner_mtrl_am_alpha = 0x7f06003f;
public static final int abc_spinner_textfield_background_material = 0x7f060040;
public static final int abc_switch_thumb_material = 0x7f060041;
public static final int abc_switch_track_mtrl_alpha = 0x7f060042;
public static final int abc_tab_indicator_material = 0x7f060043;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f060044;
public static final int abc_text_cursor_material = 0x7f060045;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f060046;
public static final int abc_textfield_default_mtrl_alpha = 0x7f060047;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f060048;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f060049;
public static final int abc_textfield_search_material = 0x7f06004a;
public static final int notification_template_icon_bg = 0x7f06005b;
}
public static final class id {
public static final int action0 = 0x7f070000;
public static final int action_bar = 0x7f070001;
public static final int action_bar_activity_content = 0x7f070002;
public static final int action_bar_container = 0x7f070003;
public static final int action_bar_root = 0x7f070004;
public static final int action_bar_spinner = 0x7f070005;
public static final int action_bar_subtitle = 0x7f070006;
public static final int action_bar_title = 0x7f070007;
public static final int action_context_bar = 0x7f070009;
public static final int action_divider = 0x7f07000a;
public static final int action_menu_divider = 0x7f07000c;
public static final int action_menu_presenter = 0x7f07000d;
public static final int action_mode_bar = 0x7f07000e;
public static final int action_mode_bar_stub = 0x7f07000f;
public static final int action_mode_close_button = 0x7f070010;
public static final int activity_chooser_view_content = 0x7f070017;
public static final int alertTitle = 0x7f070018;
public static final int always = 0x7f070019;
public static final int beginning = 0x7f07001b;
public static final int buttonPanel = 0x7f07001d;
public static final int cancel_action = 0x7f07001e;
public static final int checkbox = 0x7f07001f;
public static final int chronometer = 0x7f070020;
public static final int collapseActionView = 0x7f070021;
public static final int contentPanel = 0x7f070022;
public static final int custom = 0x7f070023;
public static final int customPanel = 0x7f070024;
public static final int decor_content_parent = 0x7f070025;
public static final int default_activity_button = 0x7f070026;
public static final int disableHome = 0x7f070027;
public static final int edit_query = 0x7f070028;
public static final int end = 0x7f070029;
public static final int end_padder = 0x7f07002a;
public static final int expand_activities_button = 0x7f07002b;
public static final int expanded_menu = 0x7f07002c;
public static final int home = 0x7f07002f;
public static final int homeAsUp = 0x7f070030;
public static final int icon = 0x7f070031;
public static final int ifRoom = 0x7f070033;
public static final int image = 0x7f070034;
public static final int info = 0x7f070035;
public static final int line1 = 0x7f070037;
public static final int line3 = 0x7f070038;
public static final int listMode = 0x7f070039;
public static final int list_item = 0x7f07003a;
public static final int media_actions = 0x7f07003b;
public static final int middle = 0x7f07003c;
public static final int multiply = 0x7f07003d;
public static final int never = 0x7f07003e;
public static final int none = 0x7f07003f;
public static final int normal = 0x7f070040;
public static final int parentPanel = 0x7f070044;
public static final int progress_circular = 0x7f070045;
public static final int progress_horizontal = 0x7f070046;
public static final int radio = 0x7f070047;
public static final int screen = 0x7f07004a;
public static final int scrollIndicatorDown = 0x7f07004b;
public static final int scrollIndicatorUp = 0x7f07004c;
public static final int scrollView = 0x7f07004d;
public static final int search_badge = 0x7f07004e;
public static final int search_bar = 0x7f07004f;
public static final int search_button = 0x7f070050;
public static final int search_close_btn = 0x7f070051;
public static final int search_edit_frame = 0x7f070052;
public static final int search_go_btn = 0x7f070053;
public static final int search_mag_icon = 0x7f070054;
public static final int search_plate = 0x7f070055;
public static final int search_src_text = 0x7f070056;
public static final int search_voice_btn = 0x7f070057;
public static final int select_dialog_listview = 0x7f070058;
public static final int shortcut = 0x7f070059;
public static final int showCustom = 0x7f07005a;
public static final int showHome = 0x7f07005b;
public static final int showTitle = 0x7f07005c;
public static final int spacer = 0x7f07005d;
public static final int split_action_bar = 0x7f07005e;
public static final int src_atop = 0x7f07005f;
public static final int src_in = 0x7f070060;
public static final int src_over = 0x7f070061;
public static final int status_bar_latest_event_content = 0x7f070062;
public static final int submit_area = 0x7f070063;
public static final int tabMode = 0x7f070064;
public static final int text = 0x7f070065;
public static final int text2 = 0x7f070066;
public static final int textSpacerNoButtons = 0x7f070067;
public static final int time = 0x7f070068;
public static final int title = 0x7f070069;
public static final int title_template = 0x7f07006a;
public static final int topPanel = 0x7f07006b;
public static final int up = 0x7f07006c;
public static final int useLogo = 0x7f07006d;
public static final int withText = 0x7f07006e;
public static final int wrap_content = 0x7f07006f;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f080000;
public static final int abc_config_activityShortDur = 0x7f080001;
public static final int abc_max_action_buttons = 0x7f080002;
public static final int cancel_button_image_alpha = 0x7f080003;
public static final int status_bar_notification_info_maxnum = 0x7f080004;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f090000;
public static final int abc_action_bar_up_container = 0x7f090001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f090002;
public static final int abc_action_menu_item_layout = 0x7f090003;
public static final int abc_action_menu_layout = 0x7f090004;
public static final int abc_action_mode_bar = 0x7f090005;
public static final int abc_action_mode_close_item_material = 0x7f090006;
public static final int abc_activity_chooser_view = 0x7f090007;
public static final int abc_activity_chooser_view_list_item = 0x7f090008;
public static final int abc_alert_dialog_button_bar_material = 0x7f090009;
public static final int abc_alert_dialog_material = 0x7f09000a;
public static final int abc_dialog_title_material = 0x7f09000b;
public static final int abc_expanded_menu_layout = 0x7f09000c;
public static final int abc_list_menu_item_checkbox = 0x7f09000d;
public static final int abc_list_menu_item_icon = 0x7f09000e;
public static final int abc_list_menu_item_layout = 0x7f09000f;
public static final int abc_list_menu_item_radio = 0x7f090010;
public static final int abc_popup_menu_item_layout = 0x7f090011;
public static final int abc_screen_content_include = 0x7f090012;
public static final int abc_screen_simple = 0x7f090013;
public static final int abc_screen_simple_overlay_action_mode = 0x7f090014;
public static final int abc_screen_toolbar = 0x7f090015;
public static final int abc_search_dropdown_item_icons_2line = 0x7f090016;
public static final int abc_search_view = 0x7f090017;
public static final int abc_select_dialog_material = 0x7f090018;
public static final int notification_media_action = 0x7f09001f;
public static final int notification_media_cancel_action = 0x7f090020;
public static final int notification_template_big_media = 0x7f090021;
public static final int notification_template_big_media_narrow = 0x7f090023;
public static final int notification_template_lines = 0x7f090027;
public static final int notification_template_media = 0x7f090029;
public static final int notification_template_part_chronometer = 0x7f09002b;
public static final int notification_template_part_time = 0x7f09002c;
public static final int select_dialog_item_material = 0x7f09002d;
public static final int select_dialog_multichoice_material = 0x7f09002e;
public static final int select_dialog_singlechoice_material = 0x7f09002f;
public static final int support_simple_spinner_dropdown_item = 0x7f090030;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f0b0000;
public static final int abc_action_bar_home_description_format = 0x7f0b0001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f0b0002;
public static final int abc_action_bar_up_description = 0x7f0b0003;
public static final int abc_action_menu_overflow_description = 0x7f0b0004;
public static final int abc_action_mode_done = 0x7f0b0005;
public static final int abc_activity_chooser_view_see_all = 0x7f0b0006;
public static final int abc_activitychooserview_choose_application = 0x7f0b0007;
public static final int abc_capital_off = 0x7f0b0008;
public static final int abc_capital_on = 0x7f0b0009;
public static final int abc_search_hint = 0x7f0b000a;
public static final int abc_searchview_description_clear = 0x7f0b000b;
public static final int abc_searchview_description_query = 0x7f0b000c;
public static final int abc_searchview_description_search = 0x7f0b000d;
public static final int abc_searchview_description_submit = 0x7f0b000e;
public static final int abc_searchview_description_voice = 0x7f0b000f;
public static final int abc_shareactionprovider_share_with = 0x7f0b0010;
public static final int abc_shareactionprovider_share_with_application = 0x7f0b0011;
public static final int abc_toolbar_collapse_description = 0x7f0b0012;
public static final int status_bar_notification_info_overflow = 0x7f0b001e;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0c0000;
public static final int AlertDialog_AppCompat_Light = 0x7f0c0001;
public static final int Animation_AppCompat_Dialog = 0x7f0c0002;
public static final int Animation_AppCompat_DropDownUp = 0x7f0c0003;
public static final int Base_AlertDialog_AppCompat = 0x7f0c0004;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f0c0005;
public static final int Base_Animation_AppCompat_Dialog = 0x7f0c0006;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0c0007;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0c0009;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f0c0008;
public static final int Base_TextAppearance_AppCompat = 0x7f0c000a;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0c000b;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0c000c;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f0c000d;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0c000e;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0c000f;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0c0010;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0c0011;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0c0012;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0c0013;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0c0014;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f0c0015;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0c0016;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c0017;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c0018;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0c0019;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0c001a;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0c001b;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0c001c;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c001d;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0c001e;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f0c001f;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0c0020;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0c0021;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c0022;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f0c0023;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0c0024;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c0025;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c0026;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c0027;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c0028;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c0029;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c002a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c002b;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0c002c;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c002d;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c002e;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c002f;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c0030;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0c0031;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c0032;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c0033;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c0034;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c0035;
public static final int Base_ThemeOverlay_AppCompat = 0x7f0c0044;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0c0045;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0c0046;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c0047;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0c0048;
public static final int Base_Theme_AppCompat = 0x7f0c0036;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0c0037;
public static final int Base_Theme_AppCompat_Dialog = 0x7f0c0038;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0c003c;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0c0039;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0c003a;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0c003b;
public static final int Base_Theme_AppCompat_Light = 0x7f0c003d;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0c003e;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0c003f;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c0043;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0c0040;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0c0041;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c0042;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f0c0049;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f0c004a;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f0c004b;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f0c004c;
public static final int Base_V21_Theme_AppCompat = 0x7f0c004d;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0c004e;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f0c004f;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0c0050;
public static final int Base_V22_Theme_AppCompat = 0x7f0c0051;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f0c0052;
public static final int Base_V23_Theme_AppCompat = 0x7f0c0053;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f0c0054;
public static final int Base_V7_Theme_AppCompat = 0x7f0c0055;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0c0056;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0c0057;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0c0058;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0059;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0c005a;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0c005b;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0c005c;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0c005d;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0c005e;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0c005f;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f0c0060;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0061;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0c0062;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0c0063;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0c0064;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0065;
public static final int Base_Widget_AppCompat_Button = 0x7f0c0066;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0c006c;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c006d;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0c0067;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0c0068;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c0069;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0c006a;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f0c006b;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c006e;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c006f;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0c0070;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0c0071;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0c0072;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0c0073;
public static final int Base_Widget_AppCompat_EditText = 0x7f0c0074;
public static final int Base_Widget_AppCompat_ImageButton = 0x7f0c0075;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0c0076;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c0077;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c0078;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c0079;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c007a;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c007b;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0c007c;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c007d;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0c007e;
public static final int Base_Widget_AppCompat_ListView = 0x7f0c007f;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0c0080;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0c0081;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0c0082;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0083;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0c0084;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0c0085;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c0086;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f0c0087;
public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0c0088;
public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0c0089;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0c008a;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0c008b;
public static final int Base_Widget_AppCompat_SeekBar = 0x7f0c008c;
public static final int Base_Widget_AppCompat_Spinner = 0x7f0c008d;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0c008e;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0c008f;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0c0090;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c0091;
public static final int Platform_AppCompat = 0x7f0c0093;
public static final int Platform_AppCompat_Light = 0x7f0c0094;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f0c0095;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0c0096;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0c0097;
public static final int Platform_V11_AppCompat = 0x7f0c0098;
public static final int Platform_V11_AppCompat_Light = 0x7f0c0099;
public static final int Platform_V14_AppCompat = 0x7f0c009a;
public static final int Platform_V14_AppCompat_Light = 0x7f0c009b;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f0c009c;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0c009d;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0c009e;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0c009f;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0c00a0;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0c00a1;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0c00a2;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0c00a8;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0c00a3;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0c00a4;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0c00a5;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0c00a6;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0c00a7;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0c00a9;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0c00aa;
public static final int TextAppearance_AppCompat = 0x7f0c00ab;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0c00ac;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0c00ad;
public static final int TextAppearance_AppCompat_Button = 0x7f0c00ae;
public static final int TextAppearance_AppCompat_Caption = 0x7f0c00af;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0c00b0;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0c00b1;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0c00b2;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0c00b3;
public static final int TextAppearance_AppCompat_Headline = 0x7f0c00b4;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0c00b5;
public static final int TextAppearance_AppCompat_Large = 0x7f0c00b6;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0c00b7;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0c00b8;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0c00b9;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c00ba;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c00bb;
public static final int TextAppearance_AppCompat_Medium = 0x7f0c00bc;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0c00bd;
public static final int TextAppearance_AppCompat_Menu = 0x7f0c00be;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c00bf;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0c00c0;
public static final int TextAppearance_AppCompat_Small = 0x7f0c00c1;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0c00c2;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0c00c3;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c00c4;
public static final int TextAppearance_AppCompat_Title = 0x7f0c00c5;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0c00c6;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c00c7;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c00c8;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c00c9;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c00ca;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c00cb;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c00cc;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0c00cd;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c00ce;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0c00cf;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0c00d0;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c00d1;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c00d2;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c00d3;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c00d4;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0c00d5;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c00d6;
public static final int TextAppearance_StatusBar_EventContent = 0x7f0c00e1;
public static final int TextAppearance_StatusBar_EventContent_Info = 0x7f0c00e2;
public static final int TextAppearance_StatusBar_EventContent_Line2 = 0x7f0c00e3;
public static final int TextAppearance_StatusBar_EventContent_Time = 0x7f0c00e4;
public static final int TextAppearance_StatusBar_EventContent_Title = 0x7f0c00e5;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c00e6;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c00e7;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c00e8;
public static final int ThemeOverlay_AppCompat = 0x7f0c00fe;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0c00ff;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0c0100;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c0101;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0c0102;
public static final int Theme_AppCompat = 0x7f0c00e9;
public static final int Theme_AppCompat_CompactMenu = 0x7f0c00ea;
public static final int Theme_AppCompat_DayNight = 0x7f0c00eb;
public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0c00ec;
public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0c00ed;
public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0c00f0;
public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0c00ee;
public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0c00ef;
public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0c00f1;
public static final int Theme_AppCompat_Dialog = 0x7f0c00f2;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0c00f5;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0c00f3;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0c00f4;
public static final int Theme_AppCompat_Light = 0x7f0c00f6;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0c00f7;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0c00f8;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c00fb;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0c00f9;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c00fa;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0c00fc;
public static final int Theme_AppCompat_NoActionBar = 0x7f0c00fd;
public static final int Widget_AppCompat_ActionBar = 0x7f0c0103;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0c0104;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0c0105;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0c0106;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0c0107;
public static final int Widget_AppCompat_ActionButton = 0x7f0c0108;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0109;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0c010a;
public static final int Widget_AppCompat_ActionMode = 0x7f0c010b;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f0c010c;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0c010d;
public static final int Widget_AppCompat_Button = 0x7f0c010e;
public static final int Widget_AppCompat_ButtonBar = 0x7f0c0114;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c0115;
public static final int Widget_AppCompat_Button_Borderless = 0x7f0c010f;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0c0110;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c0111;
public static final int Widget_AppCompat_Button_Colored = 0x7f0c0112;
public static final int Widget_AppCompat_Button_Small = 0x7f0c0113;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c0116;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c0117;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0c0118;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0c0119;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0c011a;
public static final int Widget_AppCompat_EditText = 0x7f0c011b;
public static final int Widget_AppCompat_ImageButton = 0x7f0c011c;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f0c011d;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c011e;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0c011f;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c0120;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0c0121;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c0122;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c0123;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0124;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0c0125;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f0c0126;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0c0127;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0c0128;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0c0129;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0c012a;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0c012b;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0c012c;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0c012d;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0c012e;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0c012f;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c0130;
public static final int Widget_AppCompat_Light_SearchView = 0x7f0c0131;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0c0132;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f0c0133;
public static final int Widget_AppCompat_ListView = 0x7f0c0134;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f0c0135;
public static final int Widget_AppCompat_ListView_Menu = 0x7f0c0136;
public static final int Widget_AppCompat_PopupMenu = 0x7f0c0137;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0138;
public static final int Widget_AppCompat_PopupWindow = 0x7f0c0139;
public static final int Widget_AppCompat_ProgressBar = 0x7f0c013a;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c013b;
public static final int Widget_AppCompat_RatingBar = 0x7f0c013c;
public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0c013d;
public static final int Widget_AppCompat_RatingBar_Small = 0x7f0c013e;
public static final int Widget_AppCompat_SearchView = 0x7f0c013f;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0c0140;
public static final int Widget_AppCompat_SeekBar = 0x7f0c0141;
public static final int Widget_AppCompat_Spinner = 0x7f0c0142;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0c0143;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0c0144;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0c0145;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0c0146;
public static final int Widget_AppCompat_Toolbar = 0x7f0c0147;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c0148;
}
public static final class styleable {
public static final int[] ActionBar = { 0x7f02002a, 0x7f02002b, 0x7f02002c, 0x7f02004b, 0x7f02004c, 0x7f02004d, 0x7f02004e, 0x7f020050, 0x7f020054, 0x7f020055, 0x7f020060, 0x7f02006d, 0x7f02006e, 0x7f02006f, 0x7f020070, 0x7f020071, 0x7f020074, 0x7f020077, 0x7f020083, 0x7f02008a, 0x7f020092, 0x7f020095, 0x7f020096, 0x7f0200ae, 0x7f0200b1, 0x7f0200c3, 0x7f0200cb };
public static final int ActionBar_background = 0;
public static final int ActionBar_backgroundSplit = 1;
public static final int ActionBar_backgroundStacked = 2;
public static final int ActionBar_contentInsetEnd = 3;
public static final int ActionBar_contentInsetLeft = 4;
public static final int ActionBar_contentInsetRight = 5;
public static final int ActionBar_contentInsetStart = 6;
public static final int ActionBar_customNavigationLayout = 7;
public static final int ActionBar_displayOptions = 8;
public static final int ActionBar_divider = 9;
public static final int ActionBar_elevation = 10;
public static final int ActionBar_height = 11;
public static final int ActionBar_hideOnContentScroll = 12;
public static final int ActionBar_homeAsUpIndicator = 13;
public static final int ActionBar_homeLayout = 14;
public static final int ActionBar_icon = 15;
public static final int ActionBar_indeterminateProgressStyle = 16;
public static final int ActionBar_itemPadding = 17;
public static final int ActionBar_logo = 18;
public static final int ActionBar_navigationMode = 19;
public static final int ActionBar_popupTheme = 20;
public static final int ActionBar_progressBarPadding = 21;
public static final int ActionBar_progressBarStyle = 22;
public static final int ActionBar_subtitle = 23;
public static final int ActionBar_subtitleTextStyle = 24;
public static final int ActionBar_title = 25;
public static final int ActionBar_titleTextStyle = 26;
public static final int[] ActionBarLayout = { 0x010100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int[] ActionMenuItemView = { 0x0101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMenuView = { };
public static final int[] ActionMode = { 0x7f02002a, 0x7f02002b, 0x7f02003e, 0x7f02006d, 0x7f0200b1, 0x7f0200cb };
public static final int ActionMode_background = 0;
public static final int ActionMode_backgroundSplit = 1;
public static final int ActionMode_closeItemLayout = 2;
public static final int ActionMode_height = 3;
public static final int ActionMode_subtitleTextStyle = 4;
public static final int ActionMode_titleTextStyle = 5;
public static final int[] ActivityChooserView = { 0x7f020061, 0x7f020075 };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
public static final int ActivityChooserView_initialActivityCount = 1;
public static final int[] AlertDialog = { 0x010100f2, 0x7f020036, 0x7f02007b, 0x7f02007c, 0x7f020087, 0x7f0200a6 };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonPanelSideLayout = 1;
public static final int AlertDialog_listItemLayout = 2;
public static final int AlertDialog_listLayout = 3;
public static final int AlertDialog_multiChoiceItemLayout = 4;
public static final int AlertDialog_singleChoiceItemLayout = 5;
public static final int[] AppCompatImageView = { 0x01010119, 0x7f0200ab };
public static final int AppCompatImageView_android_src = 0;
public static final int AppCompatImageView_srcCompat = 1;
public static final int[] AppCompatTextView = { 0x01010034, 0x7f0200b7 };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_textAllCaps = 1;
public static final int[] AppCompatTheme = { 0x01010057, 0x010100ae, 0x7f020000, 0x7f020001, 0x7f020002, 0x7f020003, 0x7f020004, 0x7f020005, 0x7f020006, 0x7f020007, 0x7f020008, 0x7f020009, 0x7f02000a, 0x7f02000b, 0x7f02000c, 0x7f02000e, 0x7f02000f, 0x7f020010, 0x7f020011, 0x7f020012, 0x7f020013, 0x7f020014, 0x7f020015, 0x7f020016, 0x7f020017, 0x7f020018, 0x7f020019, 0x7f02001a, 0x7f02001b, 0x7f02001c, 0x7f02001d, 0x7f02001e, 0x7f020021, 0x7f020022, 0x7f020023, 0x7f020024, 0x7f020025, 0x7f020029, 0x7f020030, 0x7f020031, 0x7f020032, 0x7f020033, 0x7f020034, 0x7f020035, 0x7f020037, 0x7f020038, 0x7f02003b, 0x7f02003c, 0x7f020042, 0x7f020043, 0x7f020044, 0x7f020045, 0x7f020046, 0x7f020047, 0x7f020048, 0x7f020049, 0x7f02004f, 0x7f020052, 0x7f020053, 0x7f020056, 0x7f020058, 0x7f02005b, 0x7f02005c, 0x7f02005d, 0x7f02005e, 0x7f02005f, 0x7f02006f, 0x7f020073, 0x7f020079, 0x7f02007a, 0x7f02007d, 0x7f02007e, 0x7f02007f, 0x7f020080, 0x7f020081, 0x7f020082, 0x7f02008e, 0x7f02008f, 0x7f020090, 0x7f020091, 0x7f020093, 0x7f020099, 0x7f02009a, 0x7f02009b, 0x7f02009c, 0x7f02009f, 0x7f0200a0, 0x7f0200a1, 0x7f0200a2, 0x7f0200a8, 0x7f0200a9, 0x7f0200b5, 0x7f0200b8, 0x7f0200b9, 0x7f0200ba, 0x7f0200bb, 0x7f0200bc, 0x7f0200bd, 0x7f0200be, 0x7f0200bf, 0x7f0200cc, 0x7f0200cd, 0x7f0200d0, 0x7f0200d1, 0x7f0200d2, 0x7f0200d3, 0x7f0200d4, 0x7f0200d5, 0x7f0200d6, 0x7f0200d7, 0x7f0200d8, 0x7f0200d9 };
public static final int AppCompatTheme_android_windowIsFloating = 0;
public static final int AppCompatTheme_android_windowAnimationStyle = 1;
public static final int AppCompatTheme_actionBarDivider = 2;
public static final int AppCompatTheme_actionBarItemBackground = 3;
public static final int AppCompatTheme_actionBarPopupTheme = 4;
public static final int AppCompatTheme_actionBarSize = 5;
public static final int AppCompatTheme_actionBarSplitStyle = 6;
public static final int AppCompatTheme_actionBarStyle = 7;
public static final int AppCompatTheme_actionBarTabBarStyle = 8;
public static final int AppCompatTheme_actionBarTabStyle = 9;
public static final int AppCompatTheme_actionBarTabTextStyle = 10;
public static final int AppCompatTheme_actionBarTheme = 11;
public static final int AppCompatTheme_actionBarWidgetTheme = 12;
public static final int AppCompatTheme_actionButtonStyle = 13;
public static final int AppCompatTheme_actionDropDownStyle = 14;
public static final int AppCompatTheme_actionMenuTextAppearance = 15;
public static final int AppCompatTheme_actionMenuTextColor = 16;
public static final int AppCompatTheme_actionModeBackground = 17;
public static final int AppCompatTheme_actionModeCloseButtonStyle = 18;
public static final int AppCompatTheme_actionModeCloseDrawable = 19;
public static final int AppCompatTheme_actionModeCopyDrawable = 20;
public static final int AppCompatTheme_actionModeCutDrawable = 21;
public static final int AppCompatTheme_actionModeFindDrawable = 22;
public static final int AppCompatTheme_actionModePasteDrawable = 23;
public static final int AppCompatTheme_actionModePopupWindowStyle = 24;
public static final int AppCompatTheme_actionModeSelectAllDrawable = 25;
public static final int AppCompatTheme_actionModeShareDrawable = 26;
public static final int AppCompatTheme_actionModeSplitBackground = 27;
public static final int AppCompatTheme_actionModeStyle = 28;
public static final int AppCompatTheme_actionModeWebSearchDrawable = 29;
public static final int AppCompatTheme_actionOverflowButtonStyle = 30;
public static final int AppCompatTheme_actionOverflowMenuStyle = 31;
public static final int AppCompatTheme_activityChooserViewStyle = 32;
public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33;
public static final int AppCompatTheme_alertDialogCenterButtons = 34;
public static final int AppCompatTheme_alertDialogStyle = 35;
public static final int AppCompatTheme_alertDialogTheme = 36;
public static final int AppCompatTheme_autoCompleteTextViewStyle = 37;
public static final int AppCompatTheme_borderlessButtonStyle = 38;
public static final int AppCompatTheme_buttonBarButtonStyle = 39;
public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40;
public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41;
public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42;
public static final int AppCompatTheme_buttonBarStyle = 43;
public static final int AppCompatTheme_buttonStyle = 44;
public static final int AppCompatTheme_buttonStyleSmall = 45;
public static final int AppCompatTheme_checkboxStyle = 46;
public static final int AppCompatTheme_checkedTextViewStyle = 47;
public static final int AppCompatTheme_colorAccent = 48;
public static final int AppCompatTheme_colorButtonNormal = 49;
public static final int AppCompatTheme_colorControlActivated = 50;
public static final int AppCompatTheme_colorControlHighlight = 51;
public static final int AppCompatTheme_colorControlNormal = 52;
public static final int AppCompatTheme_colorPrimary = 53;
public static final int AppCompatTheme_colorPrimaryDark = 54;
public static final int AppCompatTheme_colorSwitchThumbNormal = 55;
public static final int AppCompatTheme_controlBackground = 56;
public static final int AppCompatTheme_dialogPreferredPadding = 57;
public static final int AppCompatTheme_dialogTheme = 58;
public static final int AppCompatTheme_dividerHorizontal = 59;
public static final int AppCompatTheme_dividerVertical = 60;
public static final int AppCompatTheme_dropDownListViewStyle = 61;
public static final int AppCompatTheme_dropdownListPreferredItemHeight = 62;
public static final int AppCompatTheme_editTextBackground = 63;
public static final int AppCompatTheme_editTextColor = 64;
public static final int AppCompatTheme_editTextStyle = 65;
public static final int AppCompatTheme_homeAsUpIndicator = 66;
public static final int AppCompatTheme_imageButtonStyle = 67;
public static final int AppCompatTheme_listChoiceBackgroundIndicator = 68;
public static final int AppCompatTheme_listDividerAlertDialog = 69;
public static final int AppCompatTheme_listPopupWindowStyle = 70;
public static final int AppCompatTheme_listPreferredItemHeight = 71;
public static final int AppCompatTheme_listPreferredItemHeightLarge = 72;
public static final int AppCompatTheme_listPreferredItemHeightSmall = 73;
public static final int AppCompatTheme_listPreferredItemPaddingLeft = 74;
public static final int AppCompatTheme_listPreferredItemPaddingRight = 75;
public static final int AppCompatTheme_panelBackground = 76;
public static final int AppCompatTheme_panelMenuListTheme = 77;
public static final int AppCompatTheme_panelMenuListWidth = 78;
public static final int AppCompatTheme_popupMenuStyle = 79;
public static final int AppCompatTheme_popupWindowStyle = 80;
public static final int AppCompatTheme_radioButtonStyle = 81;
public static final int AppCompatTheme_ratingBarStyle = 82;
public static final int AppCompatTheme_ratingBarStyleIndicator = 83;
public static final int AppCompatTheme_ratingBarStyleSmall = 84;
public static final int AppCompatTheme_searchViewStyle = 85;
public static final int AppCompatTheme_seekBarStyle = 86;
public static final int AppCompatTheme_selectableItemBackground = 87;
public static final int AppCompatTheme_selectableItemBackgroundBorderless = 88;
public static final int AppCompatTheme_spinnerDropDownItemStyle = 89;
public static final int AppCompatTheme_spinnerStyle = 90;
public static final int AppCompatTheme_switchStyle = 91;
public static final int AppCompatTheme_textAppearanceLargePopupMenu = 92;
public static final int AppCompatTheme_textAppearanceListItem = 93;
public static final int AppCompatTheme_textAppearanceListItemSmall = 94;
public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 95;
public static final int AppCompatTheme_textAppearanceSearchResultTitle = 96;
public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 97;
public static final int AppCompatTheme_textColorAlertDialogListItem = 98;
public static final int AppCompatTheme_textColorSearchUrl = 99;
public static final int AppCompatTheme_toolbarNavigationButtonStyle = 100;
public static final int AppCompatTheme_toolbarStyle = 101;
public static final int AppCompatTheme_windowActionBar = 102;
public static final int AppCompatTheme_windowActionBarOverlay = 103;
public static final int AppCompatTheme_windowActionModeOverlay = 104;
public static final int AppCompatTheme_windowFixedHeightMajor = 105;
public static final int AppCompatTheme_windowFixedHeightMinor = 106;
public static final int AppCompatTheme_windowFixedWidthMajor = 107;
public static final int AppCompatTheme_windowFixedWidthMinor = 108;
public static final int AppCompatTheme_windowMinWidthMajor = 109;
public static final int AppCompatTheme_windowMinWidthMinor = 110;
public static final int AppCompatTheme_windowNoTitle = 111;
public static final int[] ButtonBarLayout = { 0x7f020026 };
public static final int ButtonBarLayout_allowStacking = 0;
public static final int[] CompoundButton = { 0x01010107, 0x7f020039, 0x7f02003a };
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] DrawerArrowToggle = { 0x7f020027, 0x7f020028, 0x7f02002f, 0x7f020041, 0x7f020059, 0x7f02006b, 0x7f0200a7, 0x7f0200c1 };
public static final int DrawerArrowToggle_arrowHeadLength = 0;
public static final int DrawerArrowToggle_arrowShaftLength = 1;
public static final int DrawerArrowToggle_barLength = 2;
public static final int DrawerArrowToggle_color = 3;
public static final int DrawerArrowToggle_drawableSize = 4;
public static final int DrawerArrowToggle_gapBetweenBars = 5;
public static final int DrawerArrowToggle_spinBars = 6;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f020055, 0x7f020057, 0x7f020086, 0x7f0200a4 };
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 6;
public static final int LinearLayoutCompat_measureWithLargestChild = 7;
public static final int LinearLayoutCompat_showDividers = 8;
public static final int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_visible = 2;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f02000d, 0x7f02001f, 0x7f020020, 0x7f0200a3 };
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_actionLayout = 13;
public static final int MenuItem_actionProviderClass = 14;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_showAsAction = 16;
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f020094 };
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_preserveIconSpacing = 7;
public static final int[] PopupWindow = { 0x01010176, 0x7f02008b };
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 1;
public static final int[] PopupWindowBackgroundState = { 0x7f0200ac };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f02003d, 0x7f02004a, 0x7f020051, 0x7f02006c, 0x7f020072, 0x7f020078, 0x7f020097, 0x7f020098, 0x7f02009d, 0x7f02009e, 0x7f0200ad, 0x7f0200b2, 0x7f0200cf };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_closeIcon = 4;
public static final int SearchView_commitIcon = 5;
public static final int SearchView_defaultQueryHint = 6;
public static final int SearchView_goIcon = 7;
public static final int SearchView_iconifiedByDefault = 8;
public static final int SearchView_layout = 9;
public static final int SearchView_queryBackground = 10;
public static final int SearchView_queryHint = 11;
public static final int SearchView_searchHintIcon = 12;
public static final int SearchView_searchIcon = 13;
public static final int SearchView_submitBackground = 14;
public static final int SearchView_suggestionRowLayout = 15;
public static final int SearchView_voiceIcon = 16;
public static final int[] Spinner = { 0x010100b2, 0x01010176, 0x0101017b, 0x01010262, 0x7f020092 };
public static final int Spinner_android_entries = 0;
public static final int Spinner_android_popupBackground = 1;
public static final int Spinner_android_prompt = 2;
public static final int Spinner_android_dropDownWidth = 3;
public static final int Spinner_popupTheme = 4;
public static final int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f0200a5, 0x7f0200aa, 0x7f0200b3, 0x7f0200b4, 0x7f0200b6, 0x7f0200c2, 0x7f0200ce };
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 3;
public static final int SwitchCompat_splitTrack = 4;
public static final int SwitchCompat_switchMinWidth = 5;
public static final int SwitchCompat_switchPadding = 6;
public static final int SwitchCompat_switchTextAppearance = 7;
public static final int SwitchCompat_thumbTextPadding = 8;
public static final int SwitchCompat_track = 9;
public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f0200b7 };
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_shadowColor = 4;
public static final int TextAppearance_android_shadowDx = 5;
public static final int TextAppearance_android_shadowDy = 6;
public static final int TextAppearance_android_shadowRadius = 7;
public static final int TextAppearance_textAllCaps = 8;
public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f02003f, 0x7f020040, 0x7f02004b, 0x7f02004c, 0x7f02004d, 0x7f02004e, 0x7f020083, 0x7f020084, 0x7f020085, 0x7f020088, 0x7f020089, 0x7f020092, 0x7f0200ae, 0x7f0200af, 0x7f0200b0, 0x7f0200c3, 0x7f0200c4, 0x7f0200c5, 0x7f0200c6, 0x7f0200c7, 0x7f0200c8, 0x7f0200c9, 0x7f0200ca };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_collapseContentDescription = 2;
public static final int Toolbar_collapseIcon = 3;
public static final int Toolbar_contentInsetEnd = 4;
public static final int Toolbar_contentInsetLeft = 5;
public static final int Toolbar_contentInsetRight = 6;
public static final int Toolbar_contentInsetStart = 7;
public static final int Toolbar_logo = 8;
public static final int Toolbar_logoDescription = 9;
public static final int Toolbar_maxButtonHeight = 10;
public static final int Toolbar_navigationContentDescription = 11;
public static final int Toolbar_navigationIcon = 12;
public static final int Toolbar_popupTheme = 13;
public static final int Toolbar_subtitle = 14;
public static final int Toolbar_subtitleTextAppearance = 15;
public static final int Toolbar_subtitleTextColor = 16;
public static final int Toolbar_title = 17;
public static final int Toolbar_titleMarginBottom = 18;
public static final int Toolbar_titleMarginEnd = 19;
public static final int Toolbar_titleMarginStart = 20;
public static final int Toolbar_titleMarginTop = 21;
public static final int Toolbar_titleMargins = 22;
public static final int Toolbar_titleTextAppearance = 23;
public static final int Toolbar_titleTextColor = 24;
public static final int[] View = { 0x01010000, 0x010100da, 0x7f02008c, 0x7f02008d, 0x7f0200c0 };
public static final int View_android_theme = 0;
public static final int View_android_focusable = 1;
public static final int View_paddingEnd = 2;
public static final int View_paddingStart = 3;
public static final int View_theme = 4;
public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f02002d, 0x7f02002e };
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_layout = 1;
public static final int ViewStubCompat_android_inflatedId = 2;
}
}
| [
"[email protected]"
] | |
cd89964fbc5cdcd29ed7e68c7af9622ba464a710 | b45523b27603b7ec2521f7618870ba4a43aa2168 | /trunk/src/main/java/com/leweiyou/tools/xml/DomConvert.java | 503cea3504fd760ffe37f7a3ec472486af06bbd7 | [] | no_license | zhangweican/cs-tools | f0aafae8e458cb96626a57dce95698f97854e0d4 | 770331fc4279597774dbbf93a14845ab6226637b | refs/heads/master | 2022-08-10T11:59:14.159902 | 2019-06-25T08:42:05 | 2019-06-25T08:42:05 | 55,766,588 | 0 | 0 | null | 2022-06-29T19:43:17 | 2016-04-08T09:18:10 | Java | UTF-8 | Java | false | false | 970 | java | package com.leweiyou.tools.xml;
import java.io.IOException;
import org.jdom.JDOMException;
import org.jdom.input.DOMBuilder;
import org.jdom.output.DOMOutputter;
public class DomConvert {
/**
* org.w3c.dom.Document 对象转换为 org.jdom.Document对象
* @param domDoc
* @return
* @throws JDOMException
* @throws IOException
*/
public static org.jdom.Document dom2jdom(org.w3c.dom.Document domDoc)
throws JDOMException, IOException {
// Create new DOMBuilder, using default parser
DOMBuilder builder = new DOMBuilder();
org.jdom.Document jdomDoc = builder.build(domDoc);
return jdomDoc;
}
/**
* org.jdom.Document对象 转换为org.w3c.dom.Document对象
* @param jdomDoc
* @return
* @throws Exception
*/
public static org.w3c.dom.Document jdom2dom(org.jdom.Document jdomDoc)
throws Exception {
DOMOutputter outputter = new DOMOutputter();
return outputter.output(jdomDoc);
}
}
| [
"[email protected]"
] | |
75ee12c2938abfeb12f2caa86b9c3765f9615607 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.qqlite/classes.jar/com/tencent/msf/service/protocol/serverconfig/ProxyIpList.java | af956b0111b0131c940b05968eb0b2fdc15871cd | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 1,365 | java | package com.tencent.msf.service.protocol.serverconfig;
import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;
import java.util.ArrayList;
public final class ProxyIpList
extends JceStruct
{
static ArrayList cache_vIplist;
public long uService_type = 0L;
public ArrayList vIplist = null;
public ProxyIpList() {}
public ProxyIpList(long paramLong, ArrayList paramArrayList)
{
this.uService_type = paramLong;
this.vIplist = paramArrayList;
}
public void readFrom(JceInputStream paramJceInputStream)
{
this.uService_type = paramJceInputStream.read(this.uService_type, 0, true);
if (cache_vIplist == null)
{
cache_vIplist = new ArrayList();
ProxyIpInfo localProxyIpInfo = new ProxyIpInfo();
cache_vIplist.add(localProxyIpInfo);
}
this.vIplist = ((ArrayList)paramJceInputStream.read(cache_vIplist, 1, true));
}
public void writeTo(JceOutputStream paramJceOutputStream)
{
paramJceOutputStream.write(this.uService_type, 0);
paramJceOutputStream.write(this.vIplist, 1);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\classes.jar
* Qualified Name: com.tencent.msf.service.protocol.serverconfig.ProxyIpList
* JD-Core Version: 0.7.0.1
*/ | [
"[email protected]"
] | |
723b92a740f2284c388a262d245e67476dac084c | 73f08c134d9e08d9f3a29d32f2fb3cdfb5091c8e | /src/cn/swpu/crm/utils/UploadUtils.java | 6036191c2367a1e359f117b3fc3562d0f7108261 | [] | no_license | mrblankspace/crm | 3c18445629baca3a9e719b544b969e834cf4b5cd | ad6a05a0dcd04ae1e93cbfa06137d75d28e31548 | refs/heads/master | 2020-03-21T18:16:25.617428 | 2018-08-02T13:35:03 | 2018-08-02T13:35:03 | 138,881,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 716 | java | package cn.swpu.crm.utils;
import java.util.UUID;
/**
*
* @author zhangbo
*
*/
public class UploadUtils {
/**
* 解决文件重复问题
*/
public static String getUuidFileName(String filename){
int index = filename.lastIndexOf(".");
String extions = filename.substring(index);
return UUID.randomUUID().toString()+extions;
}
/**
* 目录分离
*/
public static String getPath(String uuidFileName){
int code1 = uuidFileName.hashCode();
int d1 = code1 & 0xf;
int code2 = code1>>>4;
int d2 = code2 &0xf;
return "/"+d1+"/"+d2;
}
public static void main(String[] args) {
System.out.println(UUID.randomUUID().toString().hashCode());
}
}
| [
"[email protected]"
] | |
f11f0242cf166d05d321488feca4ab76630564f1 | 2f2e9384000ce6263270528d6db92b7dc2384462 | /src/main/java/com/mmall/pojo/Category.java | 4c191bd2188259d35e64b4881f3b333d07b2447d | [
"Apache-2.0"
] | permissive | breezezqf/Java-DemoMall | 57ea3cf73976a9678c82f7872a0d72e77478c788 | c9bc40cbad2d85a4c82fcb0550feb4b9b725722a | refs/heads/master | 2022-12-22T19:34:47.438850 | 2019-10-22T15:56:07 | 2019-10-22T15:56:07 | 216,028,959 | 0 | 0 | Apache-2.0 | 2022-12-16T03:07:06 | 2019-10-18T13:21:28 | Java | UTF-8 | Java | false | false | 2,136 | java | package com.mmall.pojo;
import java.util.Date;
public class Category {
private Integer id;
private Integer parentId;
private String name;
private Boolean status;
private Integer sortOrder;
private Date createTime;
private Date updateTime;
public Category(Integer id, Integer parentId, String name, Boolean status, Integer sortOrder, Date createTime, Date updateTime) {
this.id = id;
this.parentId = parentId;
this.name = name;
this.status = status;
this.sortOrder = sortOrder;
this.createTime = createTime;
this.updateTime = updateTime;
}
public Category() {
super();
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
public Integer getSortOrder() {
return sortOrder;
}
public void setSortOrder(Integer sortOrder) {
this.sortOrder = sortOrder;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Category category = (Category) o;
return !(id != null ? id.equals(category.id) : category.id == null);
}
@Override
public int hashCode() {
return id != null ? id.hashCode() : 0;
}
} | [
"[email protected]"
] | |
69bd4b09894bbce4de755e762d6210af0f570505 | 6a0c1a3bc631954402480fe67067e61e3a62f7b1 | /src/com/kotenkov/programming_with_class/the_simplest_class_and_object/task_7/Triangle.java | f53b4267adebde773018d98ddc9a40381a4ebc5e | [] | no_license | babushkaj/epamtraining | f0da4f8f5a05353f884b4dfadd5a0dfa2a259940 | 8ad3233ce09b60aa8e959d5ec94ce04608adcbbd | refs/heads/master | 2020-07-07T00:12:52.593672 | 2019-08-19T15:04:35 | 2019-08-19T15:04:35 | 193,384,005 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,984 | java | package com.kotenkov.programming_with_class.the_simplest_class_and_object.task_7;
// Описать класс, представляющий треугольник. Предусмотреть методы для создания объектов,
// вычисления площади, периметра и точки пересечения медиан.
public class Triangle {
private double sideAB;
private double sideBC;
private double sideCA;
private double angleA;
private double angleB;
private double angleC;
private Triangle() {
}
public static Triangle createByTwoSidesAndAngle(double sideAB, double sideCA, double angleA){
if(angleA >= 180) {
angleA = 60;
sideCA = sideAB;
}
double sideBC = Math.sqrt(Math.pow(sideAB,2) + Math.pow(sideCA,2) -
2*sideAB*sideCA*Math.cos(angleA*Math.PI/180));
double angleB = (Math.asin((Math.sin(angleA*Math.PI/180)*sideCA)/sideBC)*180)/Math.PI;
double angleC = 180 - angleA - angleB;
Triangle t = new Triangle();
t.sideAB = sideAB;
t.sideBC = sideBC;
t.sideCA = sideCA;
t.angleA = angleA;
t.angleB = angleB;
t.angleC = angleC;
return t;
}
public static Triangle createBySideAndTwoAngles(double sideAB, double angleA, double angleB){
if(angleA + angleB >= 180){
angleA = 60;
angleB = 60;
}
double angleC = 180 - angleA - angleB;
double sideBC = (sideAB*Math.sin(angleA*Math.PI/180))/Math.sin(angleC*Math.PI/180);
double sideCA = (sideAB*Math.sin(angleB*Math.PI/180))/Math.sin(angleC*Math.PI/180);
Triangle t = new Triangle();
t.sideAB = sideAB;
t.sideBC = sideBC;
t.sideCA = sideCA;
t.angleA = angleA;
t.angleB = angleB;
t.angleC = angleC;
return t;
}
public static Triangle createByThreeSides(double sideAB, double sideBC, double sideCA){
if(!(sideAB + sideBC > sideCA && sideBC + sideCA > sideAB && sideAB + sideCA > sideBC)){
sideBC = sideAB;
sideCA = sideAB;
}
double angleC = Math.acos((Math.pow(sideBC,2) + Math.pow(sideCA,2) - Math.pow(sideAB,2))/
(2*sideBC*sideCA))*180/Math.PI;
double angleA = Math.asin((sideBC*Math.sin(angleC*Math.PI/180))/sideAB)*180/Math.PI;
double angleB = 180 - angleA - angleC;
Triangle t = new Triangle();
t.sideAB = sideAB;
t.sideBC = sideBC;
t.sideCA = sideCA;
t.angleA = angleA;
t.angleB = angleB;
t.angleC = angleC;
return t;
}
public double calculatePerimeter(){
return sideAB + sideBC + sideCA;
}
public double calculateArea(){
return (sideAB*sideCA*Math.sin(angleA*Math.PI/180))/2;
}
public void findTheMedianIntersectionPoint(){
double mAB = Math.sqrt(2*Math.pow(sideBC,2) + 2*Math.pow(sideCA,2) - Math.pow(sideAB,2))/2;
double mBC = Math.sqrt(2*Math.pow(sideAB,2) + 2*Math.pow(sideCA,2) - Math.pow(sideBC,2))/2;
double mCA = Math.sqrt(2*Math.pow(sideBC,2) + 2*Math.pow(sideAB,2) - Math.pow(sideCA,2))/2;
System.out.println("Точка пересечения медиан треугольника находится\n" +
"на расстоянии " + mBC*2/3 + " от вершины A,\n" +
"на расстоянии " + mCA*2/3 + " от вершины B,\n" +
"на расстоянии " + mAB*2/3 + " от вершины C.");
}
@Override
public String toString() {
return "sideAB = " + sideAB +
", sideBC = " + sideBC +
", sideCA = " + sideCA +
", angleA = " + angleA +
", angleB = " + angleB +
", angleC = " + angleC;
}
}
| [
"[email protected]"
] | |
da808ee264efec0dce03c68919715c15b78278d3 | c325dc61d545c46051cc4167f7c18a2a14423a21 | /app/src/main/java/com/ning/architecturedemo/manager/Token.java | ebe652f0224506fabd2933857cb3e884150a824d | [] | no_license | ningnim/architectureDemo | 1330acb8a107bba0dff330c308c71283a299fdc0 | 765512cec2e1127ab15baa25c1b6df5dae676f46 | refs/heads/master | 2022-04-11T17:39:46.386922 | 2020-03-30T13:58:10 | 2020-03-30T13:58:10 | 250,219,858 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 309 | java | package com.ning.architecturedemo.manager;
/**
* Created by chenning on 2020/3/30
*/
public class Token {
// 包名
private static final String PACKAGE_NAME = "com.ning.architecturedemo.model.";
// 具体Model
public static final String API_USER_DATA = PACKAGE_NAME + "UserDataModel";
} | [
"[email protected]"
] | |
158273f8790d8bd729d6607fd82f3a6fe1b4e8bb | cd6914001ad30cf1b5148f4befe8eecc2ce0a15b | /lession_8_thread/src/androidTest/java/com/skymxc/demo/lession_8_thread/ApplicationTest.java | ee0e4d35545ed33199308824af9decda74d4aa6f | [] | no_license | skymxc/ytzl | ef1c69b691c425f8e6e4e37e3b6cc6c15d9b5d17 | c62c68466ebbb08bc3def280f68f9a18c1b29dff | refs/heads/master | 2021-06-05T20:27:54.794747 | 2016-11-16T11:05:56 | 2016-11-16T11:05:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 363 | java | package com.skymxc.demo.lession_8_thread;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | [
"[email protected]"
] | |
1a8fa72396ea81e8504639e3614621245cf157e0 | cdf24481251400310548d308c49911f85b6f6fba | /app/src/main/java/com/skr/myproject/customview/CustomView.java | 3fa213abc956f894cecfcef25d929bab4c55a9dc | [] | no_license | AIFrozen7/Other | 3cc57eaac66a03fd60caf746c7db388ae54792ca | 6d188386e3f8442ba6cc237b4a5d0a4cf8fe5d13 | refs/heads/master | 2020-04-22T14:38:57.886982 | 2019-01-18T02:19:55 | 2019-01-18T02:19:55 | 170,450,966 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,299 | java | package com.skr.myproject.customview;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.Toast;
import com.skr.myproject.R;
import com.skr.myproject.adapter.MyShopCartAdapter;
import com.skr.myproject.adapter.MyShopCartItmeAdapter;
import com.skr.myproject.adapter.MyShopCartItmeAdapter$ViewHolder_ViewBinding;
import com.skr.myproject.bean.ShopCartBean;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class CustomView extends RelativeLayout {
@BindView(R.id.custom_del)
ImageView customDel;
@BindView(R.id.custom_edit_text)
EditText customEditText;
@BindView(R.id.custom_add)
ImageView customAdd;
private OnAddOrDelClickListener clickListener;
private MyShopCartItmeAdapter myShopCartItemAdapter;
private CallBackListener call1BackListener;
private List<ShopCartBean.DataBean.ListBean> list = new ArrayList<>();
private int position;
int num = 0;
public void setCallBackListener(CallBackListener callBackListener) {
this.call1BackListener = callBackListener;
}
public void setClickListener(OnAddOrDelClickListener clickListener) {
this.clickListener = clickListener;
}
public CustomView(Context context) {
super(context);
}
public CustomView(Context context, AttributeSet attrs) {
super(context, attrs);
View view = View.inflate(context, R.layout.custom_layout, null);
ButterKnife.bind(this, view);
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.edit_shopcart);
String num = typedArray.getString(R.styleable.edit_shopcart_num);
typedArray.recycle();
customEditText.setText(num);
addView(view);
}
public CustomView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public CustomView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public void setData(MyShopCartItmeAdapter myShopCartItemAdapter, List<ShopCartBean.DataBean.ListBean> list, int i) {
this.myShopCartItemAdapter = myShopCartItemAdapter;
this.list = list;
position = i;
num = list.get(i).getNum();
customEditText.setText(num + "");
}
@OnClick({R.id.custom_del, R.id.custom_add})
public void onViewClicked(View view) {
String string = customEditText.getText().toString();
switch (view.getId()) {
case R.id.custom_del:
if (string.length() > 0) {
clickListener.onDelClick(view);
call1BackListener.mycallBack();
myShopCartItemAdapter.notifyItemChanged(position);
} else {
mToast();
}
break;
case R.id.custom_add:
if (string.length() > 0) {
clickListener.onAddClick(view);
call1BackListener.mycallBack();
myShopCartItemAdapter.notifyItemChanged(position);
} else {
mToast();
}
break;
}
}
public void setNumber(int num) {
if (num > 0) {
customEditText.setText(num + "");
} else {
toast();
}
}
public int getNumber() {
String numStr = customEditText.getText().toString().trim();
num = Integer.valueOf(numStr);
return num;
}
private void toast() {
Toast.makeText(getContext(), "不能为0", Toast.LENGTH_SHORT).show();
}
private void mToast() {
Toast.makeText(getContext(), "不能为空", Toast.LENGTH_SHORT).show();
}
public interface OnAddOrDelClickListener {
void onAddClick(View view);
void onDelClick(View view);
}
public interface CallBackListener {
void mycallBack();
}
}
| [
"[email protected]"
] | |
d33f4b45aad923b4139803cae874a0698df0138d | 8c76c212d0e8d9d205d395f641ff31ae8cd4219e | /updatebot-core/src/main/java/io/jenkins/updatebot/commands/Status.java | 83e7f4e40d27b5f49d1aec1ee247961b68581ecf | [
"Apache-2.0"
] | permissive | jenkins-x/updatebot | 6b4a65f93e8350f6f075cbef1a7d9f1e4d589d50 | fbf290f2b56c71cf6a07429971d72e7ad5056ccb | refs/heads/master | 2021-05-11T11:13:17.208909 | 2021-04-08T11:30:35 | 2021-04-08T11:30:35 | 118,122,741 | 43 | 26 | Apache-2.0 | 2020-10-26T18:02:10 | 2018-01-19T12:28:59 | Java | UTF-8 | Java | false | false | 908 | java | /*
* Copyright 2016 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version
* 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package io.jenkins.updatebot.commands;
/**
*/
public enum Status {
PENDING("Pending"), COMPLETE("Complete"), FAILED("Failed");
private final String name;
Status(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
| [
"[email protected]"
] | |
214c21147e495fd4dc8bb2b1fff1cdaaa06fefaf | ab9ff9e03b6ed708aa3979e350db7c1e03bb43ea | /src/ProgrammingWithClasses_4/aggregationandcomposition/Task_1/Word.java | ece880a2038da2465e924dcd1577ef9acfa40faf | [] | no_license | Grimiri/epamTasks | 797b56e22b181a3d79419b7e5067cc48d276ef9a | 1ffac73c3bc966fc08935e9f475be7dcdd318fde | refs/heads/master | 2020-12-05T01:02:56.697832 | 2020-01-31T23:18:08 | 2020-01-31T23:18:08 | 231,958,759 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 375 | java | package ProgrammingWithClasses_4.aggregationandcomposition.Task_1;
public class Word {
private String word;
Word(String word) {
this.word = word;
}
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
@Override
public String toString() {
return word;
}
}
| [
"[email protected]"
] | |
9a2a3f9f9f087dca95dd373a890eb49f585e2541 | 4616d3b9982df08ff2726266d3a57f80f37348bc | /sdk/java/src/main/java/com/pulumi/cloudflare/outputs/AccessApplicationSaasAppCustomAttributeSource.java | 628afc67dc8dd51adebf6569699b9974defe5b39 | [
"Apache-2.0",
"MPL-2.0"
] | permissive | pulumi/pulumi-cloudflare | 20a9f102d27371f2bbb10a87b12d841f714717bf | 48fac9000501bc68c3d73726c26432d29ab659df | refs/heads/master | 2023-08-31T14:18:51.131391 | 2023-08-31T05:37:54 | 2023-08-31T05:37:54 | 173,785,925 | 67 | 11 | Apache-2.0 | 2023-09-07T00:02:49 | 2019-03-04T17:00:06 | Java | UTF-8 | Java | false | false | 1,557 | java | // *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.cloudflare.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
@CustomType
public final class AccessApplicationSaasAppCustomAttributeSource {
/**
* @return Friendly name of the Access Application.
*
*/
private String name;
private AccessApplicationSaasAppCustomAttributeSource() {}
/**
* @return Friendly name of the Access Application.
*
*/
public String name() {
return this.name;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AccessApplicationSaasAppCustomAttributeSource defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String name;
public Builder() {}
public Builder(AccessApplicationSaasAppCustomAttributeSource defaults) {
Objects.requireNonNull(defaults);
this.name = defaults.name;
}
@CustomType.Setter
public Builder name(String name) {
this.name = Objects.requireNonNull(name);
return this;
}
public AccessApplicationSaasAppCustomAttributeSource build() {
final var o = new AccessApplicationSaasAppCustomAttributeSource();
o.name = name;
return o;
}
}
}
| [
"[email protected]"
] | |
340452178511c061765d90636a2fc2406db45790 | 89f04d1c200c569aecbf3f99e9870facdfa28c07 | /src/main/java/com/quora/interceptor/LoginRequiredInteceptor.java | 97160e623ed9569cefa8fd7221fdc7d67ba05cf7 | [] | no_license | leon-zhu/Quora | d367783dba22a56f0dd41931a440ce75cef64d91 | 5099c354fd16c930fb3f65aa72c8caee71bf0d88 | refs/heads/master | 2020-03-13T02:58:11.072424 | 2018-05-20T09:32:30 | 2018-05-20T09:32:30 | 130,935,005 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,300 | java | package com.quora.interceptor;
import com.quora.module.HostHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* description here
*
* @author: leon
* @date: 2018/5/1 21:58
* @version: 1.0
*/
@Component
public class LoginRequiredInteceptor implements HandlerInterceptor {
@Autowired
private HostHolder hostHolder;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
if (hostHolder.getUser() == null) {
response.sendRedirect("/reglogin?next=" + request.getRequestURI());
}
return true;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable ModelAndView modelAndView) throws Exception {
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable Exception ex) throws Exception {
}
}
| [
"[email protected]"
] | |
73b4cbe7a1b5ed7387722d9faad64fa3b8c40835 | f6b72b95c94b07abf68bf7b5f241c5ed10524b9e | /src/main/java/com/shortner/security/JwtAuthenticationEntryPoint.java | 2c68475f74eac576e112979776b700d8c8baca33 | [] | no_license | espkishore98/Url-Shortner- | 9306f8fdb59ce4e5d3291058963fed894864e7c7 | f35b8ff78ee03bb33faf684c676c8ce0ecd45eb7 | refs/heads/main | 2023-03-14T16:16:19.005080 | 2021-04-01T19:13:13 | 2021-04-01T19:13:13 | 307,911,005 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,107 | java | package com.shortner.security;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.stereotype.Component;
@Component
public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint {
private static final Logger log = LoggerFactory.getLogger(JwtAuthenticationEntryPoint.class);
@Override
public void commence(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse,
AuthenticationException e) throws IOException, ServletException {
log.error("Responding with unauthorized error. Message - {}", e.getMessage());
httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED,
"Sorry, You're not authorized to access this resource.");
}
}
| [
"[email protected]"
] | |
8c3bce258e7c36785837a56fb13c8dd818d8b5ae | 77f3f5e1d9c8d6560bb4697b57c28c14404b55aa | /erpwelll/erpwell/trunk/SourceCode/Client/com.graly.erp.inv/src/com/graly/erp/inv/adjust/in/AdjustInLotSection.java | 57417bbc58d569439e492a52182d58e9539f2763 | [
"Apache-2.0"
] | permissive | liulong02/ERPL | b1871a1836c8e25af6a18d184b2f68f1b1bfdc5e | c8db598a3f762b357ae986050066098ce62bed44 | refs/heads/master | 2020-03-21T22:26:06.459293 | 2018-06-30T14:55:48 | 2018-06-30T14:55:48 | 139,126,269 | 0 | 0 | null | 2018-06-29T13:59:15 | 2018-06-29T08:57:20 | null | GB18030 | Java | false | false | 19,072 | java | package com.graly.erp.inv.adjust.in;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.log4j.Logger;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import com.graly.erp.base.model.Material;
import com.graly.erp.inv.barcode.LotDialog;
import com.graly.erp.inv.barcode.LotMasterSection;
import com.graly.erp.inv.client.INVManager;
import com.graly.erp.inv.lotprint.LotPrintDialog;
import com.graly.erp.inv.model.MovementIn;
import com.graly.erp.inv.model.MovementLine;
import com.graly.erp.inv.model.MovementLineLot;
import com.graly.erp.inv.model.Warehouse;
import com.graly.framework.activeentity.client.ADManager;
import com.graly.framework.activeentity.model.ADBase;
import com.graly.framework.activeentity.model.ADTable;
import com.graly.framework.base.ui.util.Env;
import com.graly.framework.base.ui.util.Message;
import com.graly.framework.base.ui.util.SWTResourceCache;
import com.graly.framework.base.ui.util.UI;
import com.graly.framework.runtime.Framework;
import com.graly.framework.runtime.exceptionhandler.ExceptionHandlerManager;
import com.graly.mes.wip.model.Lot;
public class AdjustInLotSection extends LotMasterSection {
private static final Logger logger = Logger.getLogger(AdjustInLotSection.class);
protected MovementLine movementInLine;
protected MovementIn in;
protected List<ADBase> selectedItems = new ArrayList<ADBase>();
protected ToolItem itemPrint;
private List<MovementLineLot> lineLots;
protected boolean isView = false;
private MovementLineLot selectedLineLot;
protected MovementIn.InType inType;
public AdjustInLotSection(ADTable adTable, LotDialog parentDialog) {
super(adTable, parentDialog);
}
public AdjustInLotSection(ADTable adTable, MovementIn in,
MovementLine movementInLine) {
super(adTable);
this.in = in;
this.movementInLine = movementInLine;
}
public AdjustInLotSection(ADTable adTable, MovementIn in,
MovementLine movementInLine, List<MovementLine> lines, boolean isView) {
this(adTable, in, movementInLine);
this.lines = lines;
this.isView = isView;
}
public void createContents(IManagedForm form, Composite parent) {
super.createContents(form, parent, Section.DESCRIPTION | Section.TITLE_BAR);
setEnableByStatus();
}
protected void setEnableByStatus() {
// 若以关联进入查看或审核后,则各控件不可用
if(isView || (in != null && MovementIn.STATUS_APPROVED.equals(in.getDocStatus()))) {
setEnable(false);
setPrintEnable(true);
((AdjustInLotTableManager)lotManager).setCanEdit(false);
}
// else if(in != null && MovementIn.STATUS_DRAFTED.equals(in.getDocStatus())) {
// ((AdjustInLotTableManager)lotManager).setCanEdit(true);
// }
}
public void createToolBar(Section section) {
ToolBar tBar = new ToolBar(section, SWT.FLAT | SWT.HORIZONTAL);
createToolItemSave(tBar);
new ToolItem(tBar, SWT.SEPARATOR);
createToolItemDelete(tBar);
new ToolItem(tBar, SWT.SEPARATOR);
createToolItemPrint(tBar);
section.setTextClient(tBar);
}
protected void createTableViewer(Composite client, FormToolkit toolkit) {
lotManager = new AdjustInLotTableManager(adTable);
viewer = (TableViewer)lotManager.createViewer(client, toolkit);
lotManager.updateView(viewer);
}
protected void createToolItemPrint(ToolBar tBar) {
itemPrint = new ToolItem(tBar, SWT.PUSH);
itemPrint.setText(Message.getString("common.print"));
itemPrint.setImage(SWTResourceCache.getImage("print"));
itemPrint.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
printAdapter();
}
});
}
// 重载addLot(), 实现将lot转化为movementLineLot
protected void addLot() {
String lotId = txtLotId.getText();
try {
if(lotId != null && !"".equals(lotId)) {
INVManager invManager = Framework.getService(INVManager.class);
lot = invManager.getLotByLotId(Env.getOrgRrn(), lotId);
if(lot == null || lot.getMaterialRrn() == null
|| Lot.LOTTYPE_MATERIAL.equals(lot.getLotType())) {
if(lot == null) {
// 判断是否为MATERIAL类型物料
String whereClause = " materialId = '" + lotId + "' ";
ADManager adManager = Framework.getService(ADManager.class);
List<Material> list = adManager.getEntityList(Env.getOrgRrn(), Material.class,
Env.getMaxResult(), whereClause, null);
Material material = null;
if(list != null && list.size() > 0)
material = list.get(0);
if(material == null || !Lot.LOTTYPE_MATERIAL.equals(material.getLotType())) {
txtLotId.setForeground(SWTResourceCache.getColor("Red"));
UI.showError(Message.getString("inv.lotnotexist"));
return;
}
lot = new Lot();
lot.setMaterialId(material.getMaterialId());
lot.setMaterialName(material.getName());
lot.setMaterialRrn(material.getObjectRrn());
lot.setPosition(Lot.POSITION_GEN);
lot.setLotType(Lot.LOTTYPE_MATERIAL);
}
MovementLine l = this.isContainsLot(lot);
if(l == null) {
return;
}
InQtySetupDialog inQtyDialog = new InQtySetupDialog(UI.getActiveShell(),
null, lot, null);
int openId = inQtyDialog.open();
if(openId == Dialog.OK) {
MovementLineLot lineLot = pareseMovementLineLot(l, inQtyDialog.getInputQty(), lot);
addLineLotToTable(lineLot);
}
}
else if(validLot(lot)) {
// 如果l不为null,表示lot所对应的物料在lines中或与inLine对应的物料一致
MovementLine l = this.isContainsLot(lot);
if(l == null) {
return;
}
// MovementLineLot lineLot = null;
// lineLot = pareseMovementLineLot(l, lot.getQtyCurrent(), lot);
// addLineLotToTable(lineLot);
InQtySetupDialog inQtyDialog = new InQtySetupDialog(UI.getActiveShell(),
null, lot, null);
int openId = inQtyDialog.open();
if(openId == Dialog.OK) {
MovementLineLot lineLot = pareseMovementLineLot(l, inQtyDialog.getInputQty(), lot);
addLineLotToTable(lineLot);
}
}
}
} catch(Exception e) {
txtLotId.setForeground(SWTResourceCache.getColor("Red"));
logger.error("Error at LotMasterSection :addLot() ", e);
ExceptionHandlerManager.asyncHandleException(e);
} finally {
txtLotId.selectAll();
}
}
protected void addLineLotToTable(MovementLineLot lineLot) {
getLineLots().add(lineLot);
refresh();
setDoOprationsTrue();
}
protected MovementLine isContainsLot(Lot lot) {
MovementLine l = null;
if(movementInLine != null && movementInLine.getMaterialRrn().equals(lot.getMaterialRrn()))
return movementInLine;
if(lines != null && lines.size() > 0) {
// 根据物料找到lot对应的line, 并验证出库物料是否含有该lot对应的物料
boolean flag = false;
for(MovementLine line : lines) {
if(line.getMaterialRrn().equals(lot.getMaterialRrn())) {
l = line;
return l;
}
}
if(!flag) {
UI.showError(String.format(Message.getString("inv.material_by_lot_isnot_exist_inlines"),
lot.getLotId(), lot.getMaterialId()));
return l;
}
}
return l;
}
// 验证lot对应的物料必须在lines中, 并且lot不能在IQC, GEN和WIP上并且是未使用的
protected boolean validLot(Lot lot) {
if(isContainsInLineLots(lot)) {
UI.showError(String.format(Message.getString("wip.lot_list_contains_lot"), lot.getLotId()));
return false;
}
boolean flag = false;
if(lines != null && lines.size() > 0) {
for(MovementLine line : lines) {
if(line.getMaterialRrn().equals(lot.getMaterialRrn())) {
flag = true;
break;
}
}
}
if(!flag) {
UI.showError(String.format(Message.getString("inv.material_by_lot_isnot_exist_inlines"),
lot.getLotId(), lot.getMaterialId()));
return false;
}
//调整入库不判断批次位置
// if (!(Lot.POSITION_IQC.equals(lot.getPosition()) ||
// Lot.POSITION_GEN.equals(lot.getPosition()) || Lot.POSITION_WIP.equals(lot.getPosition()))) {
// UI.showError(String.format(Message.getString("inv.lot_already_in"), lot.getLotId()));
// return false;
// } else {
// if (lot.getIsUsed()) {
// UI.showError(String.format(Message.getString("wip.lot_is_used"), lot.getLotId()));
// return false;
// }
// }
return true;
}
// 入库时同一批次为Batch类型时也不能再次入库,因为入库不存在分批入库
protected boolean isContainsInLineLots(Lot lot) {
for(MovementLineLot lineLot : getLineLots()) {
if(lot.getObjectRrn().equals(lineLot.getLotRrn()))
return true;
}
return false;
}
protected void saveAdapter() {
try {
if(lines != null && lines.size() > 0) {
if(validateAll()) {
INVManager invManager = Framework.getService(INVManager.class);
in = invManager.saveMovementInLine(in, lines, MovementIn.InType.ADIN, Env.getUserRrn());
UI.showInfo(Message.getString("common.save_successed"));
((AdjustInLotTableManager)lotManager).setCanEdit(false);
this.setIsSaved(true);
this.setEnable(false);
setPrintEnable(true);
}
}
} catch (Exception e) {
logger.error("GenerateLotSection saveAdapter(): error!");
ExceptionHandlerManager.asyncHandleException(e);
}
}
protected MovementLineLot pareseMovementLineLot(MovementLine line, BigDecimal outQty, Lot lot) {
Date now = Env.getSysDate();
MovementLineLot inLineLot = new MovementLineLot();
inLineLot.setOrgRrn(Env.getOrgRrn());
inLineLot.setIsActive(true);
inLineLot.setCreated(now);
inLineLot.setCreatedBy(Env.getUserRrn());
inLineLot.setUpdated(now);
inLineLot.setUpdatedBy(Env.getUserRrn());
if(in != null) {
inLineLot.setMovementRrn(in.getObjectRrn());
inLineLot.setMovementId(in.getDocId());
}
inLineLot.setMovementLineRrn(line.getObjectRrn());
inLineLot.setLotRrn(lot.getObjectRrn());
inLineLot.setLotId(lot.getLotId());
inLineLot.setMaterialRrn(lot.getMaterialRrn());
inLineLot.setMaterialId(lot.getMaterialId());
inLineLot.setMaterialName(lot.getMaterialName());
// 将用户输入的出库数量设置到outLineLot.qtyMovement中
inLineLot.setQtyMovement(outQty);
return inLineLot;
}
// 将MovementLineLot改为Lot
protected void printAdapter() {
try {
this.lineLots = (List<MovementLineLot>)viewer.getInput();
if(lineLots != null && lineLots.size() != 0) {
List<Lot> lots = new ArrayList<Lot>();
for(MovementLineLot lineLot : lineLots) {
Lot lot = new Lot();
lot.setObjectRrn(lineLot.getLotRrn());
lot.setLotId(lineLot.getLotId());
lots.add(lot);
if(selectedLineLot != null) {
if(lot.getLotId() != null && selectedLineLot.getLotId().equals(lot.getLotId())) {
this.selectLot = lot;
}
}
}
LotPrintDialog printDialog = new LotPrintDialog(lots, this.selectLot);
printDialog.open();
}
} catch(Exception e) {
ExceptionHandlerManager.asyncHandleException(e);
}
}
public void refresh() {
if(lotManager != null && viewer != null) {
lotManager.setInput(getLineLots());
lotManager.updateView(viewer);
createSectionDesc(section);
}
}
// 验证各个入库物料的入库数量是否等于对应的批次数量之和
protected boolean validateAll() {
if(lines == null || lines.size() == 0)
return false;
BigDecimal total = null;
List<MovementLineLot> mLineLots = null;
for(MovementLine line : lines) {
if(Lot.LOTTYPE_MATERIAL.equals(line.getLotType()))
continue;
total = BigDecimal.ZERO;
mLineLots = getLineLotsByMaterial(line.getMaterialRrn());
for(MovementLineLot lineLot : mLineLots) {
if(lineLot.getLotId() == null || "".equals(lineLot.getLotId().trim())) {
UI.showError(Message.getString("inv.invalid_lotId"));
return false;
}
total = total.add(lineLot.getQtyMovement());
}
if(total.compareTo(line.getQtyMovement()) == 0) {
line.setMovementLots(mLineLots);
continue;
} else {
UI.showError(String.format(Message.getString("inv.lot_qtyTotal_isnot_equals_inQty"),
total.toString(), line.getQtyMovement().toString(), line.getMaterialId()));
return false;
}
}
return true;
}
// protected boolean validateAll(int other) {
// if(lines == null || lines.size() == 0)
// return false;
// Set<Material> materials = new LinkedHashSet<Material>();
// for(MovementLine line : lines) {
// if(!materials.contains(line.getMaterialRrn())) {
// materials.add(line.getMaterial());
// }
// }
// BigDecimal lineQtyTotal = null, total = null;
// List<MovementLineLot> mLineLots = null;
// for(Material m : materials) {
// if(Lot.LOTTYPE_MATERIAL.equals(m.getLotType()))
// continue;
// lineQtyTotal = getLineMoveInQtyByMaterial(m.getObjectRrn()); //得到某物料的入库总数
// total = BigDecimal.ZERO;
// mLineLots = getLineLotsByMaterial(m.getObjectRrn());
// for(MovementLineLot lineLot : mLineLots) {
// if(lineLot.getLotId() == null || "".equals(lineLot.getLotId().trim())) {
// UI.showError(Message.getString("inv.invalid_lotId"));
// return false;
// }
// total = total.add(lineLot.getQtyMovement());
// }
// if(total.compareTo(lineQtyTotal) == 0) {
// continue;
// } else {
// UI.showError(String.format(Message.getString("inv.lot_qtyTotal_isnot_equals_inQty"),
// total.toString(), String.valueOf(lineQtyTotal.doubleValue()), m.getMaterialId()));
// return false;
// }
// }
// return true;
// }
//
// protected void setLineLotForMovementLine() {
// Set<Long> mObjRrns = new LinkedHashSet<Long>();
// for(MovementLine line : lines) {
// if(!mObjRrns.contains(line.getMaterialRrn())) {
// mObjRrns.add(line.getMaterialRrn());
// }
// }
// List<MovementLine> ls = null;
// List<MovementLineLot> lls = null;
// for(Long materialRrn : mObjRrns) {
// ls = new ArrayList<MovementLine>();
// for(MovementLine line : lines) {
// if(materialRrn.equals(line.getMaterialRrn()))
// ls.add(line);
// }
// lls = getLineLotsByMaterial(materialRrn);
//
// BigDecimal total = null;
// List<MovementLineLot> tempLineLots = null;
// for(MovementLine tempLine : ls) {
// total = BigDecimal.ZERO;
// tempLineLots = new ArrayList<MovementLineLot>();
// for(MovementLineLot lineLot : lls) {
// if(tempLine.getQtyMovement().compareTo(total.add(lineLot.getQtyMovement())) >= 0) {
// tempLineLots.add(lineLot);
// total = total.add(lineLot.getQtyMovement());
// }
// if(total.compareTo(tempLine.getQtyMovement()) == 0) {
// tempLine.setMovementLots(tempLineLots);
// lls.removeAll(tempLineLots);
// break;
// }
// }
// }
// }
// }
@Override
protected void deleteAdapter() {
try {
TableItem[] items = viewer.getTable().getSelection();
if (items != null && items.length > 0){
TableItem item = items[0];
Object obj = item.getData();
if(obj instanceof MovementLineLot) {
boolean confirmDelete = UI.showConfirm(Message
.getString("common.confirm_delete"));
if (confirmDelete) {
delete((MovementLineLot)obj);
}
}
}
} catch (Exception e1) {
ExceptionHandlerManager.asyncHandleException(e1);
return;
}
}
protected void delete(MovementLineLot lineLot) {
getLineLots().remove(lineLot);
refresh();
setDoOprationsTrue();
}
private List<MovementLineLot> getLineLotsByMaterial(Long materialRrn) {
List<MovementLineLot> ls = new ArrayList<MovementLineLot>();
for(MovementLineLot linelot : getLineLots()) {
if(linelot.getMaterialRrn().equals(materialRrn))
ls.add(linelot);
}
return ls;
}
private BigDecimal getLineMoveInQtyByMaterial(Long materialRrn) {
BigDecimal total = BigDecimal.ZERO;
if(lines != null) {
for(MovementLine line : lines) {
if(line.getMaterialRrn().equals(materialRrn))
total = total.add(line.getQtyMovement());
}
}
return total;
}
protected void initTableContent() {
List<ADBase> list = null;
try {
ADManager manager = Framework.getService(ADManager.class);
list = manager.getEntityList(Env.getOrgRrn(), adTable.getObjectRrn(),
Env.getMaxResult(), getWhereClause(), getOrderByClause());
List<MovementLineLot> l = new ArrayList<MovementLineLot>();
for(ADBase ab : list) {
MovementLineLot lineLot = (MovementLineLot)ab;
l.add(lineLot);
}
setLineLots(l);
refresh();
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
protected Warehouse getOutWarehouse() {
if(in == null || in.getWarehouseRrn() == null)
return null;
Warehouse wh = new Warehouse();
wh.setObjectRrn(in.getWarehouseRrn());
return wh;
}
protected MovementIn.InType getInType() {
return inType;
}
protected String getWhereClause() {
StringBuffer whereClause = new StringBuffer("");
// if(this.movementInLine != null) {
// whereClause.append(" movementLineRrn = '");
// whereClause.append(this.movementInLine.getObjectRrn());
// whereClause.append("' ");
// } else
if(lines != null && lines.size() > 0){
whereClause.append(" movementLineRrn IN (");
for(MovementLine line : lines) {
whereClause.append("'");
whereClause.append(line.getObjectRrn());
whereClause.append("', ");
}
int length = whereClause.length();
whereClause = whereClause.delete(length - 2, length);
whereClause.append(")");
}
if(!"".equals(whereClause.toString())) {
return whereClause.toString();
}
return " 1 <> 1 ";
}
@SuppressWarnings("unchecked")
public void refresh(Lot newLot) {
List<Lot> listLot = (List<Lot>) viewer.getInput() == null ?
new ArrayList<Lot>() : (List<Lot>) viewer.getInput();
if (newLot != null) {
listLot.add(newLot);
}
}
protected void setMovementLineSelect(Object obj) {
if (obj instanceof MovementLineLot) {
selectedLineLot = (MovementLineLot) obj;
} else {
selectedLineLot = null;
}
}
protected void setPrintEnable(boolean enabled) {
itemPrint.setEnabled(enabled);
}
protected void setEnable(boolean enabled) {
itemSave.setEnabled(enabled);
itemDelete.setEnabled(enabled);
}
public List<MovementLineLot> getLineLots() {
if(lineLots == null) {
lineLots = new ArrayList<MovementLineLot>();
}
return lineLots;
}
public void setLineLots(List<MovementLineLot> lineLots) {
this.lineLots = lineLots;
}
public MovementIn getMovementIn() {
return in;
}
public void setInType(MovementIn.InType inType) {
this.inType = inType;
}
}
| [
"[email protected]"
] | |
97b33886723d849fb8e99637f61cfd50f3f841dc | d7c03adbc05e04841a0971c9427aa773f104e201 | /src/ast/Expression.java | 6a2dbad7431ac5009b0cc19e5c63c8bf8a5112d7 | [] | no_license | 20ChaituR/compilers | 788de09ed2037667bed8259e2536b53942ecbd3b | 7529084550fa9a943a1ea25a54b517a47858b495 | refs/heads/master | 2022-07-06T01:50:09.330954 | 2020-05-11T20:16:24 | 2020-05-11T20:16:24 | 236,628,085 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 818 | java | package ast;
import codegen.Emitter;
import environment.Environment;
/**
* The Expression class in an abstract class which
* represents any simple arithmetic expression, and
* its value can be found by using the eval() method.
*
* @author Chaitanya Ravuri
* @version March 25, 2020
*/
public abstract class Expression
{
/**
* This methods finds the value of the expression,
* using the variables in the environment.
*
* @param env the environment for the variables
* @return the value of the expression
*/
public abstract int eval(Environment env);
/**
* This method compiles the expression, writing out
* the MIPS code using given Emitter.
*
* @param e the emitter for the generated code
*/
public abstract void compile(Emitter e);
}
| [
"[email protected]"
] | |
459be13baf020cab72aa122daf4ef9f16e19ff49 | 9fd04086254e3fb61aa91af91701caded306350e | /app/src/main/java/com/hopefound/testdemo/SurveyActivity.java | fa17d5c2ab3d06cdfd8afed31b56c27f313adf63 | [] | no_license | hbwangzhen/TestDemo | 53e7ed2b9a41b40069e5573312fda15f88e9645e | fefd530dc8a6460ad8d966360665d28b69b394d9 | refs/heads/master | 2020-03-14T22:34:38.858156 | 2018-05-02T09:02:52 | 2018-05-02T09:02:56 | 131,824,120 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,684 | java | package com.hopefound.testdemo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.PagerSnapHelper;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.hopefound.testdemo.Adapter.Question;
import com.hopefound.testdemo.entity.SurveyData;
import com.hopefound.testdemo.gen.GreenDaoManager;
import com.hopefound.testdemo.gen.SurveyDataDao;
import com.hopefound.testdemo.surveyNextView.NextView;
import java.util.ArrayList;
import java.util.List;
public class SurveyActivity extends AppCompatActivity {
private NextView nextView;
private int progress = 0;
private boolean isAnswer;
private RecyclerView recyclerView;
private List<SurveyData> surveyDataList;
private Question adpter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_survey);
recyclerView = findViewById(R.id.recyclerview);
nextView = findViewById(R.id.nextview);
nextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!isAnswer){
((NextView) view).setIsClick(true);
isAnswer = true;
recyclerView.scrollToPosition(1);
progress+=10;
if (progress<=360) {
((NextView) view).setProgress(progress);
}
}else {
((NextView) view).setIsClick(false);
isAnswer = false;
}
}
});
surveyDataList = new ArrayList<>();
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this) {
@Override
public boolean canScrollHorizontally() {
return false;
}
};
linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
recyclerView.setLayoutManager(linearLayoutManager);
adpter = new Question(this,surveyDataList);
recyclerView.setAdapter(adpter);
PagerSnapHelper snapHelper = new PagerSnapHelper();
snapHelper.attachToRecyclerView(recyclerView);
getSurveyData();
}
/**
* 在数据库中查找数据
*/
private void getSurveyData() {
SurveyDataDao surveyDate = GreenDaoManager.getIstance().getNewSession().getSurveyDataDao();
surveyDataList.addAll(surveyDate.loadAll());
adpter.notifyDataSetChanged();
}
}
| [
"[email protected]"
] | |
71ca55e99b944a0e0a5f786e4ea0a4b0e0403488 | 9c2403a4586456fda6e9819100c2aaa80cc3ac5c | /app/src/test/java/com/ryanspore/ryansporeheadspace/FloorConfigurationPresenterTest.java | 00e4c8a38c11e3e5da96439fb3fdc9829e5716de | [] | no_license | ry4n1m3/HeadspaceChallenge | bc6eea8955b6fdb02756e2ec51ddb410625ea995 | 5270e5cafec9c1f16ba9cec9e0138af1591c2f60 | refs/heads/master | 2021-01-22T10:40:25.740939 | 2017-02-15T19:41:27 | 2017-02-15T19:41:27 | 82,026,294 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,022 | java | package com.ryanspore.ryansporeheadspace;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class FloorConfigurationPresenterTest {
private TestViewDelegate testViewDelegate;
private FloorConfigurationPresenter subject;
private TestCompletionDelegate testCompletionDelegate;
@Before
public void setUp() throws Exception {
testViewDelegate = new TestViewDelegate();
testCompletionDelegate = new TestCompletionDelegate();
subject = new FloorConfigurationPresenter(testViewDelegate);
subject.setFloorConfigurationDelegate(testCompletionDelegate);
}
@Test
public void onSubmitClicked_informsDelegateOfFloorCount() throws Exception {
subject.onSubmitClicked("5");
assertEquals(5, testCompletionDelegate.floorCount.intValue());
}
@Test
public void onFloorCountChanged_withEmptyInput_disablesSubmitButton() throws Exception {
subject.onFloorCountChanged("");
assertEquals(false, testViewDelegate.enabled);
}
@Test
public void onFloorCountChanged_withNonNumericInput_disablesSubmitButton() throws Exception {
subject.onFloorCountChanged("cat");
assertEquals(false, testViewDelegate.enabled);
}
@Test
public void onFloorCountChanged_withNumericInput_enablesSubmitButton() throws Exception {
subject.onFloorCountChanged("12");
assertEquals(true, testViewDelegate.enabled);
}
private static class TestViewDelegate implements FloorConfigurationPresenter.Delegate {
Boolean enabled = null;
@Override
public void setSubmitButtonEnabled(boolean enabled) {
this.enabled = enabled;
}
}
private static class TestCompletionDelegate implements FloorConfigurationView.Delegate {
Integer floorCount = null;
@Override
public void floorConfigurationComplete(int floorCount) {
this.floorCount = floorCount;
}
}
} | [
"[email protected]"
] | |
a0f657c60475fcaeed5ee4018b266b413d3a570e | 3e841df54db35520c10a1f99c5d7da2d64a32529 | /gateway-provider-security-jwt/src/test/java/org/apache/knox/gateway/provider/federation/TestFilterConfig.java | a44c3595387bffb8c68ff32838849e9d4808ff25 | [
"LicenseRef-scancode-unknown",
"Apache-2.0",
"BSD-3-Clause",
"bzip2-1.0.6",
"Zlib",
"LicenseRef-scancode-proprietary-license",
"ANTLR-PD",
"EPL-1.0",
"CDDL-1.0",
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-jdbm-1.00"
] | permissive | apache/knox | 8f10ee4f0f5c2a7e3c1e2f26f938ee41a9083abb | 69a1a71644e5740c82e8ef45de250229945d2340 | refs/heads/master | 2023-09-03T12:54:40.198515 | 2023-08-31T15:30:04 | 2023-08-31T15:30:04 | 17,310,686 | 183 | 270 | Apache-2.0 | 2023-09-13T19:50:45 | 2014-03-01T08:00:06 | Java | UTF-8 | Java | false | false | 2,186 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.knox.gateway.provider.federation;
import org.apache.knox.gateway.services.GatewayServices;
import org.easymock.EasyMock;
import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
import java.util.Enumeration;
import java.util.Properties;
public class TestFilterConfig implements FilterConfig {
public static final String TOPOLOGY_NAME_PROP = "test-topology-name";
Properties props;
public TestFilterConfig() {
this.props = new Properties();
}
public TestFilterConfig(Properties props) {
this.props = props;
}
@Override
public String getFilterName() {
return null;
}
@Override
public ServletContext getServletContext() {
String topologyName = props.getProperty(TOPOLOGY_NAME_PROP);
if (topologyName == null) {
topologyName = "jwt-test-topology";
}
ServletContext context = EasyMock.createNiceMock(ServletContext.class);
EasyMock.expect(context.getAttribute(GatewayServices.GATEWAY_CLUSTER_ATTRIBUTE)).andReturn(topologyName).anyTimes();
EasyMock.replay(context);
return context;
}
@Override
public String getInitParameter(String name) {
return props.getProperty(name, null);
}
@Override
public Enumeration<String> getInitParameterNames() {
return null;
}
}
| [
"[email protected]"
] | |
1c840a6cf0ef1cb84ba04cac1fc0c40834ecb7c3 | 2f2e219256453689a9fc3105b143cc7e97e25db2 | /test/telran/cars/RentCompanyStatisticsTests.java | 1d48a5042dbaf9829984be56cacfde91ed97b5a9 | [] | no_license | Sndolgov/RentCompany | b810a03ba8dcc4b2c2dea1e32c0378f95c5aa694 | b029dcb17cd4eacb1f43291795c7f734abfcecc2 | refs/heads/master | 2020-04-07T16:59:35.864717 | 2018-12-16T10:44:54 | 2018-12-16T10:44:54 | 158,551,970 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,234 | java | package telran.cars;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import telran.cars.dto.*;
import telran.cars.service.IRentCompany;
import telran.cars.service.RentCompanyEmbedded;
import static org.junit.Assert.*;
public class RentCompanyStatisticsTests {
IRentCompany rentCompany;
@Before
public void setUp() throws Exception {
rentCompany = new RentCompanyEmbedded();
setUpStatistics();
}
@Test
public void ModelsTest() {
int gasTank = 50;
int price = 50;
ModelDto model_1 = new ModelDto("modelName_2",
gasTank, "company_1", "country_1",
price);
ModelDto model_2 = new ModelDto("modelName_3",
gasTank, "company_1", "country_1", price);
assertEquals(CarsReturnCode.OK, rentCompany.addModel(model_1));
assertEquals(CarsReturnCode.MODEL_EXISTS, rentCompany.addModel(model_1));
assertEquals(CarsReturnCode.OK, rentCompany.addModel(model_2));
assertEquals(null, rentCompany.getModel("NotExistingModel"));
assertEquals(model_1, rentCompany.getModel("modelName_2"));
}
@Test
public void DriversTest() {
DriverDto driver = new DriverDto(1231l, "name1", 1970, "phone1");
assertEquals(CarsReturnCode.OK, rentCompany.addDriver(driver));
assertEquals(CarsReturnCode.DRIVER_EXISTS, rentCompany.addDriver(driver));
}
private void setUpStatistics() {
String modelName_zap = "A965";
String modelName_mers = "s221";
String modelName_bmv = "X5";
createModels(modelName_zap, modelName_mers, modelName_bmv);
createCars(modelName_zap, modelName_mers, modelName_bmv);
createDrivers();
rentReturn();
}
private void rentReturn() {
rentCompany.rentCar("z123-1", 54562545,
LocalDate.of(2010, 5, 12), 15);
rentCompany.returnCar("z123-1",
LocalDate.of(2010, 5, 27), 15, 10);
rentCompany.rentCar("z123-3",
54562545, LocalDate.of(2014, 8, 3),
25);
rentCompany.returnCar("z123-3",
LocalDate.of(2014, 8, 27), 100, 19);
rentCompany.rentCar("m324-2",
54562545, LocalDate.of(2017, 12, 27), 4);
rentCompany.returnCar("m324-2",
LocalDate.of(2017, 12, 30), 5, 0);
// --------------------------------------------------------------------------------------------------------------------------
rentCompany.rentCar("b566", 12354789,
LocalDate.of(2012, 4, 1), 25);
rentCompany.returnCar("b566",
LocalDate.of(2012, 4, 26), 75, 10);
rentCompany.rentCar("m324-1", 12354789,
LocalDate.of(2015, 7, 7), 15);
rentCompany.returnCar("m324-1",
LocalDate.of(2015, 7, 22), 100, 5);
// --------------------------------------------------------------------------------------------------------------------------
rentCompany.rentCar("z123-2", 78978979, LocalDate.of(2011, 7, 3), 150);
rentCompany.returnCar("z123-2", LocalDate.of(2011, 12, 4), 100, 5);
rentCompany.rentCar("m324-1", 78978979, LocalDate.of(2012, 2, 15), 92);
rentCompany.returnCar("m324-1", LocalDate.of(2012, 2, 15).plus(92, ChronoUnit.DAYS), 69, 29);
rentCompany.rentCar("b566", 78978979, LocalDate.of(2018, 1, 1), 350);
}
private void createDrivers() {
DriverDto petya = new DriverDto(78978979, "Petya", 1988, "+97253555555");
DriverDto moshe = new DriverDto(12354789, "Moshe", 1978, "+97254325233");
DriverDto ivan = new DriverDto(54562545, "Ivan", 1999, "+972844748748");
rentCompany.addDriver(petya);
rentCompany.addDriver(moshe);
rentCompany.addDriver(ivan);
}
private void createCars(String modelName_zap, String modelName_mers, String modelName_bmv) {
CarDto zap1 = new CarDto("z123-1", "white", modelName_zap);
CarDto zap2 = new CarDto("z123-2", "red", modelName_zap);
CarDto zap3 = new CarDto("z123-3", "yellow", modelName_zap);
CarDto mercedes1 = new CarDto("m324-1", "black", modelName_mers);
CarDto mercedes2 = new CarDto("m324-2", "green", modelName_mers);
CarDto bmw1 = new CarDto("b566", "blue", modelName_bmv);
rentCompany.addCar(zap1);
rentCompany.addCar(zap2);
rentCompany.addCar(zap3);
rentCompany.addCar(mercedes1);
rentCompany.addCar(mercedes2);
rentCompany.addCar(bmw1);
}
private void createModels(String modelName_zap, String modelName_mers, String modelName_bmv) {
ModelDto zap = new ModelDto(modelName_zap, 40, "ZAZ", "Russia", 35);
ModelDto mers = new ModelDto(modelName_mers, 60, "Mercedes", "Germany", 65);
ModelDto bmw = new ModelDto(modelName_bmv, 80, "BMW", "Germany", 100);
rentCompany.addModel(zap);
rentCompany.addModel(mers);
rentCompany.addModel(bmw);
}
@Test
public void getAllModelNamesTest() {
assertEquals(3, rentCompany.getAllModelNames().size());
assertEquals("A965", rentCompany.getAllModelNames().get(0));
assertEquals("A965", rentCompany.getAllModelNames().get(0));
List<String> modelList = rentCompany.getAllModelNames();
assertEquals(modelList, rentCompany.getAllModelNames());
}
@Test
public void getModelProfitTest() {
assertEquals(6650, rentCompany.getModelProfit("A965"));
assertEquals(7215, rentCompany.getModelProfit("s221"));
assertEquals(37500, rentCompany.getModelProfit("X5"));
}
@Test
public void getMostPopularModelNamesTests() {
assertEquals(2, rentCompany.getMostPopularModelNames().size());
assertEquals("A965", rentCompany.getMostPopularModelNames().get(0));
assertEquals("s221", rentCompany.getMostPopularModelNames().get(1));
}
@Test
public void getMostProfitModelNamesTest() {
assertEquals(1, rentCompany.getMostProfitModelNames().size());
assertEquals("X5", rentCompany.getMostProfitModelNames().get(0));
System.out.println(rentCompany.getMostProfitModelNames());
}
} | [
"[email protected]"
] | |
b3f7f6e7426be3b8efbfe79393a9074ec15a6dc6 | 67c912cc06fb261bd201bc383d5c2a7f8f750343 | /UserProvdier01/src/main/java/com/offcn/controller/UserController.java | 79630fd59e02e56edfcf26e57a660a9a8cd9569a | [] | no_license | xuexi007/dockercompose | bb9662b770990efa398c14da8308158e35191cc6 | 387434d046f8c5c29fd6750c9a9e58cfc4f567d3 | refs/heads/master | 2020-04-26T03:41:50.336776 | 2019-03-01T09:56:53 | 2019-03-01T09:56:53 | 173,275,952 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,287 | java | package com.offcn.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.offcn.po.User;
import com.offcn.service.UserService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@RestController
@RequestMapping("/user")
@RefreshScope
public class UserController {
@Autowired
UserService userService;
@Value("${ProviderVersion}")
private String ProviderVersion;
/***
* 获取全部用户信息
*
* @return
*/
@GetMapping("/getall")
@ApiOperation(value = "获取全部用户信息", notes = "获取全部用户信息")
public Map<String,Object> getUsers() {
Map<String,Object> map=new HashMap<>();
List<User> list = userService.getUserList();
map.put("list", list);
map.put("ProviderVersion", ProviderVersion);
try {
//让主线程随机睡眠0--6000毫秒,模拟发生熔断
Thread.sleep(new Random().nextInt(100));
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return map;
}
/***
* 保存新增用户接口
*
* @param user
* @return
*/
@PostMapping("/save")
@ApiOperation(value = "保存新增用户接口", notes = "调用创建用户需要传递json格式User信息")
@ApiImplicitParam(name = "user", value = "用户json对象", required = true, dataType = "User")
public String createUser(@RequestBody User user) {
try {
userService.createUser(user);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "error";
}
return "success";
}
/***
* 获取指定id用户信息
*
* @param id
* @return
*/
@GetMapping("/get/{id}")
@ApiOperation(value = "获取指定id用户信息", notes = "传递用户id")
@ApiImplicitParam(name = "id", value = "用户id", required = true, dataType = "Long")
public User findUser(@PathVariable("id") Long id) {
User user =null;
try {
user= userService.getUser(id);
System.out.println("返回user:"+user);
} catch (Exception e) {
//e.printStackTrace();
System.out.println("数据查询失败:");
return user;
}
return user;
}
/***
* 编辑指定id用户信息
*
* @param user
* @param id
* @return
*/
@PutMapping("/update/{id}")
@ApiOperation(value = "编辑指定id用户信息", notes = "传递用户id")
@ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "用户id", required = true, dataType = "Long"),
@ApiImplicitParam(name = "user", value = "用户json对象", required = true, dataType = "User")
})
public String editUser(@RequestBody User user, @PathVariable("id") Long id) {
try {
userService.updateUser(user.getId(), user);
} catch (Exception e) {
e.printStackTrace();
return "error";
}
return "success";
}
/***
* 删除指定id用户
*
* @param id
* @return
*/
@ApiOperation(value = "删除指定id用户信息", notes = "传递用户id")
@ApiImplicitParam(name = "id", value = "用户id", required = true, dataType = "Long")
@DeleteMapping("/delete/{id}")
public String deleteUser(@PathVariable("id") Long id) {
try {
userService.deleteUser(id);
} catch (Exception e) {
e.printStackTrace();
return "error";
}
return "success";
}
/***
* 获取服务名称
*
* @return
*/
@GetMapping("/getversion")
@ApiOperation(value = "获取服务名称及版本信息", notes = "获取服务名称及版本信息")
public String getVersion() {
return "用户服务UserProvdier001:0.01V";
}
}
| [
"[email protected]"
] | |
422066a36eef0bf3d5510d6119596dc10e38c395 | ddd2f325533815f3e474a4ee675c69896f676a9f | /src/com/mini_colombia/parser/Parser.java | 535ca45ddaba6f1d6d78a0568533be78b9ea5d8a | [] | no_license | alejorodriguez80805/MColombia | 45eb47026eea993908cd28f11db691d0a65e5e70 | bf0e6a42d6a1b1b8816831c07635eb946c47b949 | refs/heads/master | 2021-01-13T02:22:23.645097 | 2012-08-14T19:50:13 | 2012-08-14T19:50:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,415 | java | package com.mini_colombia.parser;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;
import android.util.Log;
public class Parser
{
static InputStream is = null;
static JSONObject jObj = null;
static String json = "";
// constructor
public Parser()
{
}
public JSONObject getJSONFromUrl(String url)
{
// Making HTTP request
try
{
// defaultHttpClient
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(url);
HttpResponse httpResponse = httpClient.execute(httpGet);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
}
catch (UnsupportedEncodingException e)
{
e.printStackTrace();
}
catch (ClientProtocolException e)
{
e.printStackTrace();
}
catch (IOException e)
{
Log.d("Exception", e.getMessage());
e.printStackTrace();
}
try
{
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "iso-8859-1"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null)
{
sb.append(line );
}
is.close();
json = sb.toString();
}
catch (Exception e)
{
Log.e("Buffer Error", "Error converting result " + e.toString());
}
// try parse the string to a JSON object
try {
jObj = new JSONObject(json);
}
catch (JSONException e)
{
Log.e("JSON Parser", "Error parsing data " + e.toString());
}
// return JSON String
return jObj;
}
}
| [
"[email protected]"
] | |
a38ed3270fc99f24cfd8741671ea1ae4d40c6653 | 0bec8481299d8104739510831e200a42119f489f | /src/main/java/com/pakie/hospital_app/employee/EmployeeController.java | fd7d1bf8c1cfe84958234fcb3fe616f3f1bfd0ac | [] | no_license | Pakie/hospital_app | 10f127a23abeb5b3402e96c770adf714dc18fa8e | e1d91fe5ab7472f966ff5c245234f831031f5459 | refs/heads/master | 2023-08-18T23:15:39.416846 | 2021-09-26T20:24:25 | 2021-09-26T20:24:25 | 405,154,900 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,824 | java | package com.pakie.hospital_app.employee;
import com.pakie.hospital_app.department.DepartmentService;
import com.pakie.hospital_app.employment.EmploymentPositionService;
import com.pakie.hospital_app.employment.EmploymentTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@Controller
public class EmployeeController {
@Autowired
EmployeeService employeeService;
@Autowired
DepartmentService departmentService;
@Autowired
EmploymentTypeService employmentTypeService;
@Autowired
EmploymentPositionService employmentPositionService;
//List Employees
@GetMapping("/employees")
//public String getEmployees(){
public String getEmployees(Model model) {
model.addAttribute("employees", employeeService.getAllEmployees());
return "employees/employees";
}
@GetMapping("/add-employee")
public String addEmployee(Model model){
Employee employee = new Employee();
model.addAttribute("employee", employee);
model.addAttribute("departments", departmentService.getAllDepartments());
model.addAttribute("employmentPositions", employmentPositionService.getAllEmploymentPositions());
model.addAttribute("employmentTypes", employmentTypeService.getAllEmploymentTypes());
return "employees/add_employee";
}
@PostMapping("/saveEmployee")
public String saveEmployee(@ModelAttribute("employee") Employee employee){
employeeService.saveEmployee(employee);
return "redirect:/employees";
}
@GetMapping("/update-employee/{id}")
public String updateEmployee(@PathVariable(value = "id") Long id, Model model){
//Get Employee from employeeService
Employee employee = employeeService.getEmployeeById(id);
//Set employee as an attribute to pre-populate the form
model.addAttribute("employee", employee);
model.addAttribute("departments", departmentService.getAllDepartments());
model.addAttribute("employmentPositions", employmentPositionService.getAllEmploymentPositions());
model.addAttribute("employmentTypes", employmentTypeService.getAllEmploymentTypes());
return "employees/update_employee";
}
@GetMapping("/delete-employee/{id}")
public String deleteEmployee(@PathVariable(value = "id") Long id, Model model) {
//Call a Delete Method
this.employeeService.deleteEmployeeById(id);
return "redirect:/employees";
}
}
| [
"[email protected]"
] | |
8e94d90103a224bb9edf90cdddff6e97243bffa3 | ce82bf93a7039ebf2ff0444c0624f6a7eb988382 | /boot-minio/src/main/java/persion/bleg/minio/my/MyS3Escaper.java | 3d87abe33379134426a7707a42000d2c787e1621 | [] | no_license | shiyuquan/docker-demo | 8176645965bc4058e1449c2273714f4b25646c7f | d9dabcb22e7f5f67254e39942a249ca6ad944d45 | refs/heads/master | 2021-09-16T16:23:41.144362 | 2021-03-31T08:47:02 | 2021-03-31T08:47:02 | 227,069,405 | 1 | 1 | null | 2021-08-02T17:24:37 | 2019-12-10T08:43:58 | Java | UTF-8 | Java | false | false | 1,888 | java | package persion.bleg.minio.my;
import com.google.common.escape.Escaper;
import com.google.common.net.UrlEscapers;
/**
* @author shiyuquan
* @since 2020/4/22 10:14 上午
*/
public class MyS3Escaper {
private static final Escaper ESCAPER = UrlEscapers.urlPathSegmentEscaper();
/** Returns S3 encoded string. */
public static String encode(String str) {
if (str == null) {
return "";
}
return ESCAPER
.escape(str)
.replaceAll("\\!", "%21")
.replaceAll("\\$", "%24")
.replaceAll("\\&", "%26")
.replaceAll("\\'", "%27")
.replaceAll("\\(", "%28")
.replaceAll("\\)", "%29")
.replaceAll("\\*", "%2A")
.replaceAll("\\+", "%2B")
.replaceAll("\\,", "%2C")
.replaceAll("\\/", "%2F")
.replaceAll("\\:", "%3A")
.replaceAll("\\;", "%3B")
.replaceAll("\\=", "%3D")
.replaceAll("\\@", "%40")
.replaceAll("\\[", "%5B")
.replaceAll("\\]", "%5D");
}
/** Returns S3 encoded string of given path where multiple '/' are trimmed. */
public static String encodePath(String path) {
StringBuffer encodedPathBuf = new StringBuffer();
for (String pathSegment : path.split("/")) {
if (!pathSegment.isEmpty()) {
if (encodedPathBuf.length() > 0) {
encodedPathBuf.append("/");
}
encodedPathBuf.append(MyS3Escaper.encode(pathSegment));
}
}
if (path.startsWith("/")) {
encodedPathBuf.insert(0, "/");
}
if (path.endsWith("/")) {
encodedPathBuf.append("/");
}
return encodedPathBuf.toString();
}
}
| [
"[email protected]"
] | |
6eec6656709cf88346764f99c6a2fe47fbd3c6db | 694727d0cbd68732cd2973ed1b5ef9669d949d30 | /consultans_sales/src/main/java/consultan/vanke/com/bean/DataChatBean.java | 1e624aa3dea90bf8456d143876c0436295bb2ee0 | [
"Apache-2.0"
] | permissive | JianhuaWan/Android-wan | fdfc1725d1eff878cd584f43f04b61274097b973 | cf6c8d9682d3e88b576c6f98815964762c16b2dd | refs/heads/master | 2023-03-14T04:18:47.300010 | 2021-03-04T08:07:06 | 2021-03-04T08:07:06 | 344,388,368 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 435 | java | package consultan.vanke.com.bean;
import java.util.List;
public class DataChatBean {
private List<String> colors;
private float value;
public List<String> getColors() {
return colors;
}
public void setColors(List<String> colors) {
this.colors = colors;
}
public float getValue() {
return value;
}
public void setValue(float value) {
this.value = value;
}
}
| [
"[email protected]"
] | |
0ed329aa85fc51e3401086018a1141c8b7809ec8 | 7fc79e197f59410c72ce4f54966cacb9aa9dbe48 | /hrms/hrms/src/main/java/kodlamaio/hrms/business/abstracts/UserService.java | 14c41dfdce6378386761418c7f25731e9d004259 | [] | no_license | HILALOZTEMEL/HRMS | 3029c6e2fd33aa851aa2a15d196455fa6e1e0c98 | e8879d69c9efeb01f4e74815ff45147f29dca900 | refs/heads/main | 2023-06-20T07:23:33.287940 | 2021-06-02T15:13:19 | 2021-06-02T15:13:19 | 372,173,530 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 316 | java | package kodlamaio.hrms.business.abstracts;
import kodlamaio.hrms.core.entities.User;
import kodlamaio.hrms.core.utilities.results.DataResult;
import kodlamaio.hrms.core.utilities.results.Result;
public interface UserService {
Result add(User user);
DataResult<User> findByEmail(String email);
}
| [
"[email protected]"
] | |
7a45e928e5e5dc4e18b462c309e9b1f08cf29c45 | 1e7738cdfe0adac2f8a3f476d9a4b2719dc247a9 | /src/main/java/com/SavelevAlexander/javacore/Chapter07/StringDemo2.java | 4dc0542daa85d8d602ffe2513284756ce5728b7c | [] | no_license | RnDAskella/JavaCore | a82b7cab0b37dcca3213c77f8612239678827395 | 347dff01208231c16f2075eed993986fd4b45f3f | refs/heads/master | 2022-04-23T23:46:06.534842 | 2020-04-23T10:33:36 | 2020-04-23T10:33:36 | 258,170,798 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 777 | java | package main.java.com.SavelevAlexander.javacore.Chapter07;
public class StringDemo2 {
public static void main(String[] args) {
String strOb1 = "Первая строка";
String strOb2 = "Вторая строка";
String strOb3 = strOb1;
System.out.println("Длина строки strOb1: " + strOb1.length());
System.out.println("Символ по индексу 3 в строке strOb1: " + strOb1.charAt(3));
if (strOb1.equals(strOb2))
System.out.println("strOb1 == strOb2");
else
System.out.println("strOb1 != strOb2");
if (strOb1.equals(strOb3))
System.out.println("strOb1 == strOb3");
else
System.out.println("strOb1 != strOb3");
}
}
| [
"[email protected]"
] | |
a508a2de871c7b909a98362c3037044ef97be857 | ee70429cd330f94b6d509646e8edd8d0873c945d | /hw4/Exercise1.java | e8f9989b6a298595c87bb41fd8e35895e8c555fe | [] | no_license | michaeltangelo/java-101 | 15e98f47859a38167fa771978a64b9cdf2fae003 | c9fd3f3135152c8bc65785edf0e660aeb2d0da68 | refs/heads/master | 2021-01-10T06:31:35.158721 | 2015-12-08T13:14:50 | 2015-12-08T13:14:50 | 45,325,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 755 | java | import java.util.Scanner;
public class Exercise1 {
public static void main(String[] args) {
// 7.2 (Reverse the numbers entered) Write a program that reads ten integers and dis-
// plays them in the reverse of the order in which they were read.
// declaring and initializing scanner
Scanner sc = new Scanner(System.in);
// creating int array of 10 ints
int[] ints = new int[10];
// filling array with user input
for (int i = 0; i < 10; i++) {
System.out.printf("Enter number %d: \n", i+1);
ints[i] = sc.nextInt();
}
// prints reverse of array
System.out.println("Printing Reverse: ");
for (int i = ints.length-1; i >= 0; i--) {
System.out.print(ints[i] + " ");
}
System.out.println();
sc.close();
}
} | [
"[email protected]"
] | |
8b7f599e697a75c2b5505de0adeaa338e593d21e | 1b69725948e8a617636fedf6c719feacaab6ce01 | /ShopXX/src/main/java/net/shop/service/ReceiverService.java | f6c88039f67c86857f503b71fa9070adc892a982 | [] | no_license | yezhen125240/yezhen.github.io | a50bb04a78b5bae52eecf2a230da7a68f594451e | 1585e64677896aa6105941e1f0811fd6da97aa43 | refs/heads/master | 2021-05-10T16:18:29.248446 | 2018-02-01T06:20:40 | 2018-02-01T06:20:40 | 118,574,371 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 834 | java | /*
* Support: http://www.shopxx.net
* License: http://www.shopxx.net/license
*/
package net.shop.service;
import net.shop.Page;
import net.shop.Pageable;
import net.shop.entity.Member;
import net.shop.entity.Receiver;
/**
* Service - 收货地址
*
* @author SHOP++ Team
* @version 4.0
*/
public interface ReceiverService extends BaseService<Receiver, Long> {
/**
* 查找默认收货地址
*
* @param member
* 会员
* @return 默认收货地址,若不存在则返回最新收货地址
*/
Receiver findDefault(Member member);
/**
* 查找收货地址分页
*
* @param member
* 会员
* @param pageable
* 分页信息
* @return 收货地址分页
*/
Page<Receiver> findPage(Member member, Pageable pageable);
} | [
"[email protected]"
] | |
9527af645cdda97a61c4f42b6a138e60dfc9d075 | 352e91957b9e79e090113aed1c6b5057805178f2 | /src/main/java/it/fvaleri/clrs3e/data/basic/MaxHeap.java | a8c287ff9996ac6fe3c9fa74799fe39a8546d634 | [
"Apache-2.0"
] | permissive | alex-levin/clrs3e | 3167b551186d29fe6fee96163cb7a29d8ed22741 | 6e26cd492e58e5346349cbc08434ccff25d9ebf0 | refs/heads/master | 2020-08-04T11:54:14.038627 | 2019-02-27T13:56:41 | 2019-06-08T09:12:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 809 | java | package it.fvaleri.clrs3e.data.basic;
/**
* Binary max heap.
*
* @author fvaleri
*/
public class MaxHeap extends BinaryHeap {
public MaxHeap(int[] keys) {
super(keys);
}
@Override
public void heapify(int i) {
int largest = i;
int l = left(i);
int r = right(i);
if (l < size && keys[l] > keys[i]) {
largest = l;
}
if (r < size && keys[r] > keys[largest]) {
largest = r;
}
if (largest != i) {
swap(keys, i, largest);
heapify(largest);
}
}
@Override
protected void buildHeap() {
// (n/2)..n are all leaves
for (int i = (size / 2) - 1; i >= 0; i--) {
heapify(i);
}
}
}
| [
"fvaleri@localhost"
] | fvaleri@localhost |
a92be50ecf493ab728e4797b908ecaed1bcb1885 | 12a99ab3fe76e5c7c05609c0e76d1855bd051bbb | /src/main/java/com/alipay/api/domain/AlipayUserCustIdentifyActivity.java | 8da9be35bcd70d45350c2ca960f91997c678b82f | [
"Apache-2.0"
] | permissive | WindLee05-17/alipay-sdk-java-all | ce2415cfab2416d2e0ae67c625b6a000231a8cfc | 19ccb203268316b346ead9c36ff8aa5f1eac6c77 | refs/heads/master | 2022-11-30T18:42:42.077288 | 2020-08-17T05:57:47 | 2020-08-17T05:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,087 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* alipay.user.customer.identify接口专用结果对象,维护接口查询结果中的活动信息
*
* @author auto create
* @since 1.0, 2020-06-12 15:37:26
*/
public class AlipayUserCustIdentifyActivity extends AlipayObject {
private static final long serialVersionUID = 1672922325878127334L;
/**
* 活动扩展信息,预留字段。例如通过连接引导参加运营活动,包含活动链接(或者参与方式)及活动信息。
*/
@ApiField("activity_info")
private String activityInfo;
/**
* 活动名称
*/
@ApiField("activity_name")
private String activityName;
public String getActivityInfo() {
return this.activityInfo;
}
public void setActivityInfo(String activityInfo) {
this.activityInfo = activityInfo;
}
public String getActivityName() {
return this.activityName;
}
public void setActivityName(String activityName) {
this.activityName = activityName;
}
}
| [
"[email protected]"
] | |
a4b89703590641ec91e5e850084ee3586263113e | 3885354f417ee0c10fe943d6d35e7c0318b834ec | /src/main/java/com/qfedu/sport/util/DateUtil.java | 00c9f8a97f6f9bedb580fc4f739d1519dc8dc9d5 | [] | no_license | w514071646/Sport | 3082a4de8176e65acdd1da7b9d8005c7e5590ff3 | 1eed5c6be27b47bf687edd8714ead800909c86bd | refs/heads/master | 2020-04-09T12:02:06.551524 | 2018-12-20T07:43:54 | 2018-12-20T07:43:54 | 160,333,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 893 | java | package com.qfedu.sport.util;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
*@Author feri
*@Date Created in 2018/7/24 23:02
*/
public class DateUtil {
/**
* 用来计算发送两次验证码之间的间隔 ()
* @param d1
* @param d2
* @return
*/
public static long getBetweenSecond(Date d1 , Date d2 ){
return Math.abs((d1.getTime() - d2.getTime())/1000) ;
}
/**
* 得到一天的最后一秒钟
*
*/
public static Date endOfDay() {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
return calendar.getTime();
}
public static String getDate(){
return new SimpleDateFormat("yyyy-MM-dd").format(new Date());
}
}
| [
"gaoyue123"
] | gaoyue123 |
2d34891f37b2210df19aa63695d863c56e534721 | cca2f990ff5f9719455f641d42044a16efc6eebb | /src/commonSens/environment/LocationOfInterest.java | a71cbc851d54b7e25e0f81767b3c2618cc9ea4db | [] | no_license | jarleso/commonsens | 38b9ba9be6b1e1874969cf0856e820621f5febbd | 7690d30bd7db83e973f50b9854f1fbc937e1ed16 | refs/heads/master | 2020-05-30T11:04:48.903452 | 2011-06-28T07:46:29 | 2011-06-28T07:46:29 | 32,252,951 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,188 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package environment;
import com.seisw.util.geom.Poly;
import java.awt.Polygon;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import sensing.Capability;
import sensing.Sensor;
/**
*
* @author jarleso
*/
public class LocationOfInterest {
String name;
protected Shape shape;
ArrayList<Capability> capabilities;
private Poly model;
private double error = 1;
// This can not be used for anything else than showing in papers.
HashMap<String, Sensor> isec;
HashMap<String, Sensor> noIsec;
public LocationOfInterest() {
setupLoI();
}
public LocationOfInterest(String name) {
this.name = name;
setupLoI();
}
public LocationOfInterest(LocationOfInterest loi) {
if(loi != null) {
this.name = loi.getName();
this.shape = new Shape(loi.getShape());
setupLoI();
for(Capability tmpCap : loi.getCapabilities()) {
this.addCapability(tmpCap);
}
Iterator<String> it = loi.isec.keySet().iterator();
while(it.hasNext()) {
String key = it.next();
Sensor tmpS = loi.isec.get(key);
isec.put(key, tmpS);
}
it = loi.noIsec.keySet().iterator();
while(it.hasNext()) {
String key = it.next();
Sensor tmpS = loi.noIsec.get(key);
noIsec.put(key, tmpS);
}
} else {
setupLoI();
}
}
public void addCapability(Capability tmpCap) {
capabilities.add(tmpCap);
}
public void setShape(Shape shape) {
this.shape = shape;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public String getObject() {
String ret = "";
ret += "capabilities " + capabilities.size() + " ";
for(Capability cap : capabilities) {
ret += cap.getObject();
}
ret += "shape " + shape.getObject();
ret += "name " + name + " ";
return ret;
}
public Shape getShape() {
return shape;
}
public ArrayList<Capability> getCapabilities() {
return capabilities;
}
public void setLoIApprox(Poly intersection) {
this.model = intersection;
}
public Polygon getModel() {
Polygon retPolygon = new Polygon();
if(model != null) {
for(int i = 0; i < model.getNumPoints(); i++) {
retPolygon.addPoint(Math.round((float)model.getX(i)),
Math.round((float)model.getY(i)));
}
return retPolygon;
}
return null;
}
/**
* Only for showing in papers.
*
* @param d
*/
public void setError(double d) {
this.error = 1 - d;
//System.err.println("Error set to " + error + " for " + this.getName());
}
public double getError() {
return error;
}
// public void setSensorsCoveringOutsideIntersection(ArrayList<PhysicalSensor> sensorsCoveringOutsideIntersection) {
//
// this.noIsec = sensorsCoveringOutsideIntersection;
// }
// public ArrayList<PhysicalSensor> getSensorsCoveringOutsideIntersection() {
// return noIsec;
// }
// public ArrayList<PhysicalSensor> getSensorsCoveringOutsideIntersection(Capability cap) {
//
// ArrayList<PhysicalSensor> retArray = new ArrayList<PhysicalSensor>();
//
// for(PhysicalSensor tmpSens : noIsec) {
//
// if(tmpSens.getIsCapabilityProvided(cap.getName())) {
// retArray.add(tmpSens);
// }
// }
//
// return retArray;
// }
// public void setSensorsCoveringThis(ArrayList<PhysicalSensor> actualSensors) {
//
// isec = actualSensors;
// }
// public ArrayList<PhysicalSensor> getSensorsCoveringThis(Capability cap) {
//
// ArrayList<PhysicalSensor> retArray = new ArrayList<PhysicalSensor>();
//
// for(PhysicalSensor tmpSens : isec) {
//
// if(tmpSens.getIsCapabilityProvided(cap.getName())) {
// retArray.add(tmpSens);
// }
// }
//
// return retArray;
// }
// public ArrayList<PhysicalSensor> getSensorsCoveringThis() {
//
// return isec;
// }
public void setIsec(ArrayList<Sensor> ec) {
for(Sensor tmpTS : ec) {
isec.put(tmpTS.getName(), tmpTS);
}
}
public HashMap<String, Sensor> getIsec() {
return isec;
}
public void setNoIsec(ArrayList<Sensor> ec) {
for(Sensor tmpTS : ec) {
noIsec.put(tmpTS.getName(), tmpTS);
}
}
public HashMap<String, Sensor> getNoIsec() {
return noIsec;
}
private void setupLoI() {
capabilities = new ArrayList<Capability>();
isec = new HashMap<String, Sensor>();
noIsec = new HashMap<String, Sensor>();
}
}
| [
"[email protected]@862c8320-5fd8-1234-b6f8-ea05f42d74cd"
] | [email protected]@862c8320-5fd8-1234-b6f8-ea05f42d74cd |
3958d7180ed85960dda586afe431e49d6e47c888 | b5e612f43f95821e553c6231275902b7c926ed81 | /app/src/main/java/com/example/logindemo/MainActivity.java | d180c8bd0bcb56aa5a477b78fd9e0d04907011ce | [] | no_license | StarryNightWZC/Instagram-like-android-app | 31ff1ce72a82d3ab9eead07dd54145fe1057a2ee | cd4aa90e096f6194e2ef280e30c88a145eb2f9c8 | refs/heads/master | 2022-04-26T03:34:54.490780 | 2020-04-28T02:24:58 | 2020-04-28T02:24:58 | 259,231,304 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,746 | java | package com.example.logindemo;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.android.material.textfield.TextInputLayout;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
public class MainActivity extends AppCompatActivity {
private TextInputLayout inputEmail;
private TextInputLayout inputPassword;
private ProgressBar progressBar;
private FirebaseAuth mAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// set the view now
setContentView(R.layout.activity_main);
inputEmail = findViewById(R.id.email);
inputPassword = findViewById(R.id.password);
progressBar = findViewById(R.id.progressBar);
// Initialize Firebase Auth
mAuth = FirebaseAuth.getInstance();
}
private boolean validateEmail() {
String email = inputEmail.getEditText().getText().toString().trim();
if (email.isEmpty()) {
inputEmail.setError("Field can't be empty");
return false;
} else {
inputEmail.setError(null);
return true;
}
}
private boolean validatePassword() {
String password = inputPassword.getEditText().getText().toString().trim();
if (password.isEmpty()) {
inputPassword.setError("Field can't be empty");
return false;
} else {
inputPassword.setError(null);
return true;
}
}
@Override
public void onStart() {
super.onStart();
// if user logged in, go to sign-in screen
if (mAuth.getCurrentUser() != null) {
startActivity(new Intent(this, SignedInActivity.class));
finish();
}
}
@Override
protected void onResume() {
super.onResume();
progressBar.setVisibility(View.GONE);
}
public void loginButtonClicked(View view) {
if (!validateEmail() | !validatePassword()) {
return;
}
String email = inputEmail.getEditText().getText().toString();
String password = inputPassword.getEditText().getText().toString();
progressBar.setVisibility(View.VISIBLE);
//authenticate user
mAuth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(MainActivity.this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
progressBar.setVisibility(View.GONE);
if (!task.isSuccessful()) {
Toast.makeText(MainActivity.this, "Authentication failed." + task.getException(),
Toast.LENGTH_LONG).show();
Log.e("MyTag", task.getException().toString());
} else {
Intent intent = new Intent(MainActivity.this, SignedInActivity.class);
startActivity(intent);
finish();
}
}
});
}
public void signupButtonClicked(View view) {
startActivity(new Intent(this, RegisterActivity.class));
}
}
| [
"[email protected]"
] | |
abcc009e58f3577377ddfca755f767c15a9deb34 | af2159cdfacd7596ee651cb1e4aed0004f474095 | /test/src/main/java/api/features/MemberFeat.java | 2305ec2f0a0a314757c70a0aa7f9c7b42e1b7a44 | [] | no_license | LisonGallos/JEE_Master2 | 8ffbbcffe4bc2a1739879640e403af7c66925d8d | ce1643dcf4fae999a87524a64e27eb3e9c3bd0a5 | refs/heads/master | 2020-05-04T14:11:05.062815 | 2015-01-08T20:20:55 | 2015-01-08T20:20:55 | 28,810,111 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 299 | java | package api.features;
import api.model.Member;
public interface MemberFeat {
// Members features
public Member createMember(String firstName, String lastName, String email, String password);
public boolean memberExists(String email);
public boolean auth(String email, String password);
}
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.