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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
69a293bf01d2660870870a490ba678ecdcc7ba1c | bb494ef22c8f6ddc62592ee2685f08332e4f36c0 | /class_programs/src/day2/interfacevehicle.java | fa31a92fc2ce2026ff975d6b4850526490f4e229 | [] | no_license | prarthana181k/testProject | 7fcd75d61ee5e735ab83d76a4b40b87759a90955 | 13197fe64366be48237e87f746c0740e951326ff | refs/heads/master | 2023-03-17T23:51:04.211060 | 2021-03-19T01:40:49 | 2021-03-19T01:40:49 | 347,852,600 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 586 | java | package day2;
interface vehicle{
abstract void no_of_wheels();
}
class car implements vehicle{
@Override
public void no_of_wheels() {
// TODO Auto-generated method stub
System.out.println("no of wheels= 4");
}
}
class bike implements vehicle{
@Override
public void no_of_wheels() {
// TODO Auto-generated method stub
System.out.println("no of wheels= 2");
}
}
public class interfacevehicle {
public static void main(String[] args) {
// TODO Auto-generated method stub
bike b=new bike();
b.no_of_wheels();
}
}
| [
"[email protected]"
] | |
6f23d93f6909d5eb197205eb83885619ec4775ca | 48da35b7e418927d5b594378045ab67ba78e48c4 | /src/com/huawei/cloud/servicestage/intellij/AppBasicConfigStep.java | 2085a6e5606fc12b98f8778f334ea9144103ff45 | [] | no_license | yi5637/servicestage-idea-plugin | fd2655e01964acc1744ae58c37f8935e1b6af010 | 9d418944edf47a50504e74ba1c069e269c9916d5 | refs/heads/master | 2020-05-19T16:19:34.888669 | 2019-05-06T13:25:42 | 2019-05-06T13:25:42 | 185,104,479 | 0 | 0 | null | 2019-05-06T01:40:05 | 2019-05-06T01:40:05 | null | UTF-8 | Java | false | false | 726 | java | package com.huawei.cloud.servicestage.intellij;
import com.intellij.ui.wizard.WizardNavigationState;
import com.intellij.ui.wizard.WizardStep;
import javax.swing.*;
public class AppBasicConfigStep extends WizardStep<ServiceStageConfigWizardModel> {
private final ServiceStageConfigWizardModel model;
private JPanel rootPanel;
private JTextField appIdInput;
private JButton resetAppIdButton;
public AppBasicConfigStep(final String title, final ServiceStageConfigWizardModel model) {
super(title, null);
this.model = model;
}
@Override
public JComponent prepare(WizardNavigationState wizardNavigationState) {
rootPanel.revalidate();
return rootPanel;
}
}
| [
"[email protected]"
] | |
9aa89f17d1f0f69fbe3e19dfd93c8112984dba2e | 463f8827892d4ce2f44a4a598b1da836ce540d03 | /ParserTest/src/org/htmlparser/tests/scannersTests/AllTests.java | 38ef44291d36120f102ad28a958efb826539610c | [] | no_license | 619471854/lqy | 78298405297a6d8f0e05c4547ee986ed5fde18ef | 9a9f21de293e08941e1f9193e346ef077da7f8a6 | refs/heads/master | 2020-04-15T15:50:05.956851 | 2018-04-02T09:19:27 | 2018-04-02T09:19:27 | 55,116,793 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,844 | java | // HTMLParser Library $Name: $ - A java-based parser for HTML
// http://sourceforge.org/projects/htmlparser
// Copyright (C) 2004 Somik Raha
//
// Revision Control Information
//
// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/scannersTests/AllTests.java,v $
// $Author: derrickoswald $
// $Date: 2004/01/02 16:24:56 $
// $Revision: 1.55 $
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
package org.htmlparser.tests.scannersTests;
import junit.framework.TestSuite;
import org.htmlparser.tests.ParserTestCase;
public class AllTests extends ParserTestCase
{
static
{
System.setProperty ("org.htmlparser.tests.scannersTests.AllTests", "AllTests");
}
public AllTests(String name) {
super(name);
}
public static TestSuite suite() {
TestSuite suite = new TestSuite("Scanner Tests");
suite.addTestSuite(TagScannerTest.class);
suite.addTestSuite(ScriptScannerTest.class);
suite.addTestSuite(JspScannerTest.class);
suite.addTestSuite(CompositeTagScannerTest.class);
suite.addTestSuite(XmlEndTagScanningTest.class);
return suite;
}
}
| [
"[email protected]"
] | |
fc225d1ef1aa0e49164b718a4748958ee665e136 | e318e0a07ebc4ac4285cc3468fc770d027ffcb64 | /src/com/deepak/hibernate/entity/Files.java | 805879a37282321953623ae9361ca07514d92bad | [] | no_license | deepak001ahirwar/ImageFileHandler_Project | 1b7cff3f47b280c3857f6c7d19176a2ff51cfdd0 | a0901008f9fb8a2ec76e5f84e93615c808c571a3 | refs/heads/master | 2022-11-20T13:18:36.655056 | 2020-07-22T07:29:01 | 2020-07-22T07:29:01 | 281,593,909 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,535 | java | package com.deepak.hibernate.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity(name="files")
@Table(name="files")
public class Files {
@Id
@Column(name="id")
int id;
@Column(name="file_name")
String fileName;
@Column(name="label")
String label;
@Column(name="caption")
String caption;
public Files() {
}
public Files(int id, String fileName, String label, String caption) {
super();
this.id = id;
this.fileName = fileName;
this.label = label;
this.caption = caption;
}
public Files(int id, String label, String caption) {
super();
this.id = id;
this.label = label;
this.caption = caption;
}
public Files(String fileName) {
super();
this.fileName = fileName;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getCaption() {
return caption;
}
public void setCaption(String caption) {
this.caption = caption;
}
@Override
public String toString() {
return "Files [id=" + id + ", fileName=" + fileName + ", label=" + label + ", caption=" + caption + "]";
}
}
| [
"[email protected]"
] | |
7895355492b0f2def5eaf59966aebe2373da065f | ced5b53b85ffd09305a74d24730a51a6ad50b32f | /src/main/java/Resource.java | 775789da7d70deac7bf2602862107a33a84ec5d1 | [] | no_license | drdamour/jackson-serializer-fun | b7ec5209c01333091a23031d7b8459ff15e65911 | 53cafa902de7b9d7cf97ff4b0952ad7bd69454e2 | refs/heads/master | 2021-01-02T23:13:01.362847 | 2015-09-04T23:35:29 | 2015-09-04T23:35:29 | 41,923,563 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 32 | java |
public interface Resource {
}
| [
"[email protected]"
] | |
db7639807444503ca98f96ea6650df8422df8325 | 47e01cdb2ac5ef541a994ea93b682a39487fd443 | /src/_ws/jaxws/wsdl/My.java | 7a290ac665852d6b85c4cb1e2110a0cb94f5ca74 | [] | no_license | zzyy/thinking | af1124623a624b0502006779acfbb9f970a861d9 | f5d7ced62fa1ff1b7716de51a51daaa4975ed346 | refs/heads/master | 2016-09-05T20:02:39.410479 | 2014-03-27T06:04:07 | 2014-03-27T06:04:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | package _ws.jaxws.wsdl;
import javax.jws.WebService;
@WebService(endpointInterface="_ws.jaxws.wsdl.MyService",name = "MyService",
targetNamespace = "http://www.example.org/MyService/",
wsdlLocation="_ws/jaxws/wsdl/MyService.wsdl")
public class My implements MyService {
@Override
public int add(int a, int b) {
System.out.println("a+b");
return a+b;
}
}
| [
"[email protected]"
] | |
d294ee5bf38efe8a2c41437c6f30ec2b5e732c8d | 8c9858e1ab039ea538df24e4853023686504733a | /Module04/caseStudy4/src/main/java/com/example/demo/repository/ServiceRepo.java | b5f5e67283aa45f2247b1695a8ecbf6c87b559b9 | [] | no_license | tranhoangsangc1120g1/module4_gradle | 40f62899cbfce8b3073ee46d9d15a743be7aa8a9 | adde49deafd7f555ab95cd4dd4de21c514aaeaad | refs/heads/master | 2023-04-09T12:13:00.656588 | 2021-04-21T08:34:42 | 2021-04-21T08:34:42 | 352,111,475 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 211 | java | package com.example.demo.repository;
import com.example.demo.model.Service;
import org.springframework.data.jpa.repository.JpaRepository;
public interface ServiceRepo extends JpaRepository<Service,String> {
}
| [
"[email protected]"
] | |
44705f8e793f0566c6e6d8f11adea7d4ef4b4c0d | 07858cda0ed4e8172414c7e4cd153d97f9afb48c | /admin/src/main/java/com/ckstack/ckpush/service/plymind/impl/AppointmentServiceImpl.java | 6c582d44a5eea3c1084be12aa83b2a832da20911 | [] | no_license | kodaji/doitfive | 701cb54dc524f2081ed1f24bdcd2463fa83f6eb9 | 79b26931aa546f115d6a1d39f1459aa523d1bad5 | refs/heads/master | 2021-01-19T05:31:48.203045 | 2016-07-11T05:35:52 | 2016-07-11T05:35:52 | 63,039,468 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,992 | java | package com.ckstack.ckpush.service.plymind.impl;
import com.ckstack.ckpush.common.MDV;
import com.ckstack.ckpush.dao.plymind.ApplicationDao;
import com.ckstack.ckpush.dao.plymind.AppointmentDao;
import com.ckstack.ckpush.dao.plymind.HolidayDao;
import com.ckstack.ckpush.dao.plymind.ProductDao;
import com.ckstack.ckpush.dao.user.MemberDao;
import com.ckstack.ckpush.domain.plymind.AppointmentEntity;
import com.ckstack.ckpush.domain.plymind.HolidayEntity;
import com.ckstack.ckpush.domain.plymind.ProductEntity;
import com.ckstack.ckpush.domain.user.MemberEntity;
import com.ckstack.ckpush.service.plymind.AppointmentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by wypark on 16. 1. 19.
*/
@Service
@Transactional(value = "transactionManager")
public class AppointmentServiceImpl implements AppointmentService {
private final static Logger LOG = LoggerFactory.getLogger(AppointmentServiceImpl.class);
@Autowired
private MemberDao memberDao;
@Autowired
private ProductDao productDao;
@Autowired
private ApplicationDao applicationDao;
@Autowired
private AppointmentDao appointmentDao;
@Autowired
private HolidayDao holidayDao;
/**
* 예약 정보를 등록한다.
*/
@Override
public int add(AppointmentEntity appointmentEntity) {
int result = 0;
result = appointmentDao.add(appointmentEntity);
result = applicationDao.statusProgress(appointmentEntity.getApplication_srl(), MDV.NUSE);
return result;
}
/**
* 해당 고객의 결제내역 총 갯수를 조회한다.
*/
@Transactional(readOnly = true)
@Override
public long countAppointment(long member_srl, long advisor_srl, List<Integer> application_statues) {
long appointmentCount = appointmentDao.countAppointment(member_srl, advisor_srl, application_statues, null, null, null);
return appointmentCount;
}
/**
* 해당 고객의 결제내역 중 검색 총 갯수를 조회한다.
*/
@Transactional(readOnly = true)
@Override
public long countSearchAppointment(long member_srl, long advisor_srl, List<Integer> application_statues, Map<String, String> searchFilter) {
String title = null;
String user_name = null;
String advisor_name = null;
if(searchFilter.containsKey("user_name")) user_name = searchFilter.get("user_name");
if(searchFilter.containsKey("title")) title = searchFilter.get("title");
if(searchFilter.containsKey("advisor_name")) advisor_name = searchFilter.get("advisor_name");
List<Long> advisor_srls = new ArrayList<Long>();
if(advisor_name != null && advisor_name != "") {
List<MemberEntity> memberEntities = memberDao.getMemberListByGroup(MDV.NUSE, null, null, null, advisor_name, MDV.NUSE, MDV.NUSE, MDV.NUSE, null, MDV.NUSE, MDV.NUSE);
for(MemberEntity memberEntity : memberEntities) {
advisor_srls.add(memberEntity.getMember_srl());
}
if(memberEntities.size() == 0) {
advisor_srls.add((long)MDV.NUSE);
}
}
List<Long> product_srls = new ArrayList<Long>();
if(title != null && title != "") {
List<ProductEntity> productEntities = productDao.getProductList(MDV.NUSE, title);
for(ProductEntity productEntity : productEntities) {
product_srls.add(productEntity.getProduct_srl());
}
if(productEntities.size() == 0) {
product_srls.add((long)MDV.NUSE);
}
}
long appointmentSearchCount = appointmentDao.countAppointment(member_srl, advisor_srl, application_statues, user_name, advisor_srls, product_srls);
return appointmentSearchCount;
}
/**
* 해당 고객의 결제내역을 조회한다.
*/
@Transactional(readOnly = true)
@Override
public List<AppointmentEntity> getAppointmentList(long member_srl,
long advisor_srl,
List<Integer> application_statues,
Map<String, String> searchFilter,
Map<String, String> sortValue,
int offset,
int limit) {
String title = null;
String user_name = null;
String advisor_name = null;
if(searchFilter.containsKey("user_name")) user_name = searchFilter.get("user_name");
if(searchFilter.containsKey("title")) title = searchFilter.get("title");
if(searchFilter.containsKey("advisor_name")) advisor_name = searchFilter.get("advisor_name");
List<Long> advisor_srls = new ArrayList<Long>();
if(advisor_name != null && advisor_name != "") {
List<MemberEntity> memberEntities = memberDao.getMemberListByGroup(MDV.NUSE, null, null, null, advisor_name, MDV.NUSE, MDV.NUSE, MDV.NUSE, null, MDV.NUSE, MDV.NUSE);
for(MemberEntity memberEntity : memberEntities) {
advisor_srls.add(memberEntity.getMember_srl());
}
if(memberEntities.size() == 0) {
advisor_srls.add((long)MDV.NUSE);
}
}
List<Long> product_srls = new ArrayList<Long>();
if(title != null && title != "") {
List<ProductEntity> productEntities = productDao.getProductList(MDV.NUSE, title);
for(ProductEntity productEntity : productEntities) {
product_srls.add(productEntity.getProduct_srl());
}
if(productEntities.size() == 0) {
product_srls.add((long)MDV.NUSE);
}
}
Map<String, String> sortMap = new HashMap<String, String>();
if(sortValue.containsKey("title")) {
sortMap.put("product_srl", sortValue.get("title"));
} else if(sortValue.containsKey("advisor_name")) {
sortMap.put("advisor_srl", sortValue.get("advisor_name"));
} else {
sortMap = sortValue;
}
List<AppointmentEntity> appointmentEntities = appointmentDao.getAppointmentList(member_srl, advisor_srl, application_statues, user_name, advisor_srls, product_srls, sortMap, offset, limit);
return appointmentEntities;
}
@Override
public int change(AppointmentEntity appointmentEntity) {
int result = appointmentDao.change(appointmentEntity);
return result;
}
@Override
public int changeStatus(long appointment_srl, int appointment_status) {
int result = appointmentDao.changeStatus(appointment_srl, appointment_status);
return result;
}
@Transactional(readOnly = true)
@Override
public List<AppointmentEntity> getAppointmentList(long member_srl) {
List<AppointmentEntity> appointmentEntities = appointmentDao.getAppointmentList(member_srl);
return appointmentEntities;
}
@Transactional(readOnly = true)
@Override
public AppointmentEntity getAppointmentBySrl(long appointment_srl) {
AppointmentEntity appointmentEntity = appointmentDao.getAppointmentBySrl(appointment_srl);
return appointmentEntity;
}
@Transactional(readOnly = true)
@Override
public List<AppointmentEntity> getAppointmentCheckList(long advisor_srl, String yearMonth) {
List<AppointmentEntity> appointmentEntities = appointmentDao.getAppointmentCheckList(advisor_srl, yearMonth);
List<Long> member_srls = new ArrayList<>();
member_srls.add(Long.valueOf(0));
member_srls.add(advisor_srl);
List<HolidayEntity> holidayEntities = holidayDao.getHolidayList(null, null, MDV.NONE, MDV.NONE);
List<HolidayEntity> advisorHolidayEntities = holidayDao.getAdvisorHolidayList(advisor_srl, null, null, null, MDV.NONE, MDV.NONE);
String[] array_time = {"9", "10", "11", "12", "14", "15", "16", "17", "18", "19", "20", "21"};
for(HolidayEntity holidayEntity : holidayEntities) {
for (int i=0; i<array_time.length; i++) {
AppointmentEntity appointmentEntity = new AppointmentEntity();
appointmentEntity.setAppointment_srl(MDV.NONE);
appointmentEntity.setMember_srl(MDV.NONE);
appointmentEntity.setAdvisor_srl(MDV.NONE);
appointmentEntity.setAppointment_date(holidayEntity.getHoliday_date());
appointmentEntity.setAppointment_time(array_time[i]);
appointmentEntity.setAppointment_status(MDV.NONE);
appointmentEntity.setC_date(MDV.NONE);
appointmentEntity.setU_date(MDV.NONE);
appointmentEntities.add(appointmentEntity);
}
}
for(HolidayEntity holidayEntity : advisorHolidayEntities) {
AppointmentEntity appointmentEntity = new AppointmentEntity();
appointmentEntity.setAppointment_srl(MDV.NONE);
appointmentEntity.setMember_srl(MDV.NONE);
appointmentEntity.setAdvisor_srl(MDV.NONE);
appointmentEntity.setAppointment_date(holidayEntity.getHoliday_date());
appointmentEntity.setAppointment_time(holidayEntity.getHoliday_time());
appointmentEntity.setAppointment_status(MDV.NONE);
appointmentEntity.setC_date(MDV.NONE);
appointmentEntity.setU_date(MDV.NONE);
appointmentEntities.add(appointmentEntity);
}
return appointmentEntities;
}
}
| [
"[email protected]"
] | |
e2e82780af51354635c6f2427a5d01fc3bdebdb8 | d58fdd61a0de45264f3327d97a00822acedcb0d0 | /ProgettoViaggiProf/src/it/appviaggi/business/ConfiguratorePacchettoViaggio.java | 661925da3b15ffa605a557011c3ad12203a50849 | [
"MIT"
] | permissive | matteolia/itsrizzoli2k17 | dcc62d3068941fce38b07372fc1beb9db074b812 | c1629fb98c29488cdcc8b3442e049181fda089ec | refs/heads/master | 2020-03-20T14:41:48.970130 | 2018-02-14T09:43:06 | 2018-02-14T09:43:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,181 | java | package it.appviaggi.business;
import java.util.ArrayList;
import java.util.Date;
import javax.persistence.EntityManager;
import it.appviaggi.model.Luogo;
import it.appviaggi.model.MezzoDiTrasporto;
import it.appviaggi.model.PacchettoViaggio;
import it.appviaggi.model.Pernottamento;
import it.appviaggi.model.Struttura;
import it.appviaggi.model.Tappa;
import it.appviaggi.model.TipoCamera;
import it.appviaggi.model.TipoSoggiorno;
import it.appviaggi.model.TitoloDiViaggio;
import it.appviaggi.model.Tragitto;
public class ConfiguratorePacchettoViaggio {
public PacchettoViaggio creaPacchettoViaggio(Date dataPartenza, Date dataArrivo, Luogo partenza,
Luogo arrivo, int numeroPersone) {
EntityManager em = JPAUtility.em();
em.getTransaction().begin();
PacchettoViaggio pv = new PacchettoViaggio();
em.persist(pv);
pv.setPartenza(partenza);
pv.setArrivo(arrivo);
pv.setTappe(new ArrayList<>());
Tappa inizio = new Tappa();
inizio.setPacchettoViaggio(pv);
Tragitto tragitto = new Tragitto();
tragitto.setDataPartenza(dataPartenza);
inizio.setTragitto(tragitto);
pv.getTappe().add(inizio);
pv.setNumeroPersone(numeroPersone);
Tragitto rientro = new Tragitto();
rientro.setDataArrivo(dataArrivo);
pv.setViaggioDiRientro(rientro);
pv.setCompletato(false);
pv.setAnnullato(false);
pv.setPagato(false);
em.getTransaction().commit();
return pv;
}
public Pernottamento aggiungiPernottamentoATappa(Tappa tappa, Struttura struttura, Date dataArrivo, Date dataPartenza, int numeroPersone,
TipoCamera tipoCamera, TipoSoggiorno tipoSoggiorno) {
EntityManager em = JPAUtility.em();
em.getTransaction().begin();
Pernottamento p = new Pernottamento();
p.setDataArrivo(dataArrivo);
p.setDataPartenza(dataPartenza);
p.setNumeroPersone(numeroPersone);
p.setStruttura(struttura);
p.setTipoCamera(tipoCamera);
p.setTipoSoggiorno(tipoSoggiorno);
tappa.setPernottamento(p);
em.getTransaction().commit();
return p;
}
public Tragitto aggiungiTragittoATappa(Tappa tappa, Date dataPartenza, Date dataArrivo, Luogo luogoPartenza, Luogo luogoArrivo,
MezzoDiTrasporto mezzoDiTrasporto, String compagnia, String codiceBiglietto, double prezzo) {
EntityManager em = JPAUtility.em();
em.getTransaction().begin();
Tragitto t = new Tragitto();
TitoloDiViaggio titoloDiViaggio = new TitoloDiViaggio();
titoloDiViaggio.setCodiceTitolo(codiceBiglietto);
titoloDiViaggio.setCompagnia(compagnia);
titoloDiViaggio.setMezzoDiTrasporto(mezzoDiTrasporto);
titoloDiViaggio.setPrezzo(prezzo);
t.setTitoloDiViaggio(titoloDiViaggio);
t.setDataArrivo(dataArrivo);
t.setDataPartenza(dataPartenza);
t.setLuogoArrivo(luogoArrivo);
t.setLuogoPartenza(luogoPartenza);
tappa.setTragitto(t);
em.getTransaction().commit();
return t;
}
public Tappa aggiungiNuovaTappa(Tappa tappaPrecedente) {
Tappa t = new Tappa();
t.setPacchettoViaggio(tappaPrecedente.getPacchettoViaggio());
tappaPrecedente.getPacchettoViaggio().getTappe().add(t);
return t;
}
}
| [
"[email protected]"
] | |
2dc0212ed31d6acdf0184f34dc778cc9c434d32e | ec93cf3b7b34e1b39de781930b71e39b6718cb00 | /PocketHockey4/src/con_util/ConnectionUtilities.java | 7bc07f6b8d3ae0aa0fa1c968264daa871d6fe6ac | [] | no_license | Double-O/Network-based-game-pocket-Hockey | 5341addffa5217120ae92979e5a74a64242f661a | b2b14f53109ebd05737e1d28a0ebd3fead2108c0 | refs/heads/master | 2022-04-01T23:27:35.200764 | 2020-02-11T17:48:02 | 2020-02-11T17:48:02 | 58,925,262 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,658 | java | package con_util;
/**
* Created by Dhruboo on 6/6/2016.
*/
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
public class ConnectionUtilities {
public Socket sc;
public ObjectInputStream ois;
public ObjectOutputStream oos;
public ConnectionUtilities(String host, int port){
//System.out.println("CLient connection completed");
try {
sc=new Socket(host,port);
oos=new ObjectOutputStream(sc.getOutputStream());
ois=new ObjectInputStream(sc.getInputStream());
}
catch(Exception e)
{
System.out.println("client connection jhamela");
}
}
public ConnectionUtilities(Socket socket){
//System.out.println(" Server Connection Completed");
try {
sc=socket;
oos=new ObjectOutputStream(sc.getOutputStream());
ois=new ObjectInputStream(sc.getInputStream());
}
catch(Exception e)
{
System.out.println("server connection jhamela");
}
}
public void write(Object o){
try {
oos.writeObject(o);
} catch (IOException e) {
System.out.println("writing error");
}
}
public Object read(){
try {
Object o=ois.readObject();
return o;
} catch(Exception e){
System.out.println("reading error");
}
return null;
}
}
| [
"[email protected]"
] | |
b18559e1341bac942d0e29d562d9dd9d5133aef8 | 78aac0ccca34e63b61fde08f0d88e1bed89d36ef | /boomi/src/boomi/gdw/EventReason.java | 68adddf67d235e20b0dea5a47ed1f8643dccef71 | [] | no_license | woniu2681/ceosoftcenters | e8dfeb22677a832dfd2e6862283c02cc000cfbe5 | defdf5f1e84a0617dbe5f2cddb8386959c62aed6 | refs/heads/master | 2021-01-10T02:22:14.857824 | 2016-03-15T13:50:29 | 2016-03-15T13:50:29 | 49,714,925 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,582 | java | package boomi.gdw;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.TreeMap;
public class EventReason {
public static void main(String[] args) throws Exception {
TreeMap<String, String> previousTreeMap = new TreeMap<String, String>();
String PIPE = "|";
int KEY_INDEX = 0;
for (int i = 0; i < 2; i++) {
InputStream is = new FileInputStream("src/boomi/gdw/EventReason" + i + ".txt");
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = reader.readLine()) != null) {
String[] strArr = line.split("\\" + PIPE, -1);
if (strArr != null && strArr.length > KEY_INDEX + 1) {
String key = strArr[KEY_INDEX];
if (i == 0) {
previousTreeMap.put(key, line);
} else if (i == 1) {
String previousStr = previousTreeMap.get(key);
String currentStr = line;
if (previousStr != null && !previousStr.isEmpty()) {
if (!currentStr.equals(previousStr)) {
InputStream os = new ByteArrayInputStream(currentStr.getBytes("UTF-8"));
System.out.println(currentStr);
}
} else {
InputStream os = new ByteArrayInputStream(currentStr.getBytes("UTF-8"));
System.out.println(currentStr);
}
}
}
}
}
}
}
| [
"[email protected]"
] | |
2e403d93dcb528e5fd248f669416391b0df445dc | f2dcdd26842bb2d40808dfc5379d586d8b772f4a | /src/main/java/com/autentia/tutorial/rest/openapidefintion/OpenAPIDefinitionResource.java | 6e19d4fcff75c6a5e4dfd3517f575ff903825d54 | [] | no_license | javierislas800/TestSwagger2.0 | d1e042d3c16a03a3496ddcd0ab403359d15f767f | 6722ac277fb6ca1ca72c4703c963acecb2a2000b | refs/heads/master | 2022-01-10T18:35:13.378637 | 2019-05-09T15:13:51 | 2019-05-09T15:13:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,174 | java | package com.autentia.tutorial.rest.openapidefintion;
import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.info.License;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.servers.Server;
import io.swagger.v3.oas.annotations.servers.ServerVariable;
import io.swagger.v3.oas.annotations.tags.Tag;
/**
* OpenAPIDefinition Example
*/
@OpenAPIDefinition(
info = @Info(
title = "Pet Resource Example",
version = "2.0",
description = "API Definition",
termsOfService = "Terms of service",
license = @License(name = "Apache 2.0", url = "http://foo.bar"),
contact = @Contact(url = "http://gigantic-server.com", name = "Fred", email = "[email protected]")
),
tags = {
@Tag(name = "Tag 1", description = "desc 1", externalDocs = @ExternalDocumentation(description = "docs desc")),
@Tag(name = "Tag 2", description = "desc 2", externalDocs = @ExternalDocumentation(description = "docs desc 2")),
@Tag(name = "Tag 3")
},
externalDocs = @ExternalDocumentation(description = "definition docs desc"),
security = {
@SecurityRequirement(name = "req 1", scopes = {"a", "b"}),
@SecurityRequirement(name = "req 2", scopes = {"b", "c"})
},
servers = {
@Server(
description = "server 1",
url = "http://localhost:7001/TestSwagger2.0",
variables = {
@ServerVariable(name = "var1", description = "var 1", defaultValue = "1", allowableValues = {"1", "2"}),
@ServerVariable(name = "var2", description = "var 2", defaultValue = "1", allowableValues = {"1", "2"})
})
}
)
public class OpenAPIDefinitionResource {
}
| [
"[email protected]"
] | |
80001476d949efa29e78a35885044a04498730f8 | 95e2375d75ffab2a524a8f4c7dd689b5b54569ed | /Java/Offer/Solution28.java | 998387d6bdc5cf854afebbdfe20ea920b5f2a8d1 | [] | no_license | wufans/EverydayAlgorithms | c0bd561e6bd1aaa930bdf698e50d06e337e9dcf1 | e85277c83b904db365d828e51d89b7398e399a8a | refs/heads/master | 2020-03-23T03:04:35.827120 | 2019-08-08T03:17:17 | 2019-08-08T03:17:17 | 141,008,260 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 845 | java | /**
* @Author: WuFan
* @Date: 2019/3/4 11:04
*/
package offer;
/*
* 对称的二叉树
* 请实现一个函数,用来判断一颗二叉树是不是对称的。注意,如果一个二叉树同此二叉树的镜像是同样的,定义其为对称的。
*/
public class Solution28 {
boolean isSymmetrical(TreeNode pRoot){
if(pRoot == null){
return true;
}
return isduicheng(pRoot.left,pRoot.right);
}
private boolean isduicheng(TreeNode t1, TreeNode t2){
if(t1 == null && t2 == null){
return true;
}
if(t1 != null && t2 != null) {
if (t1.val != t2.val) {
return false;
}else{
return isduicheng(t1.left,t2.right) && isduicheng(t1.right,t2.left);
}
}
return false;
}
}
| [
"[email protected]"
] | |
329e2a97a1bef4443876be7c6c1c67ce97fde876 | 0b7d185feb54d2d421b3eae462859971745ee103 | /pace-base/src/main/java/com/pace/base/view/PafAlignment.java | 7d92ae266c84c63de1fc47aaf8c9189077fe490e | [] | no_license | alanfarkas/test-pace-server | b61462a2c48a989fd1015428e890d760feccd224 | 334a21210956409f8c8d1e48588a74c4c04fbd7c | refs/heads/master | 2021-01-01T05:43:14.449086 | 2013-06-27T17:15:48 | 2013-06-27T17:15:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,408 | java | /**
* @(#) PafAlignment.java
*/
package com.pace.base.view;
public class PafAlignment implements Cloneable {
public static final String LEFT = "Left";
public static final String RIGHT = "Right";
public static final String FULL = "Full";
public static final String CENTER = "Center";
private String value = LEFT;
public PafAlignment() {}
public void setValue(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
protected Object clone() throws CloneNotSupportedException {
// TODO Auto-generated method stub
return super.clone();
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PafAlignment other = (PafAlignment) obj;
if (value == null) {
if (other.value != null)
return false;
} else if (!value.equals(other.value))
return false;
return true;
}
}
| [
"jwatkins@53513f66-9fe0-4f4b-a901-10d5c8ad6cc7"
] | jwatkins@53513f66-9fe0-4f4b-a901-10d5c8ad6cc7 |
b982204a8f9db887faa010bd8cbc0cf4403affa3 | a7410ba4e2ed20e36a441023b91db3ca23832f81 | /src/controller/MainDisplay.java | 4d750d5faae06a02ae829cdbe30a19493b371f18 | [] | no_license | markvticzon/ThesisBabylonClient | 38a811502c263435a573533ad2d0b9abd6dd8993 | ebfdffa0be8f58847702d56e62df726bd2d8d148 | refs/heads/master | 2020-03-10T13:45:38.725564 | 2018-04-12T07:30:13 | 2018-04-12T07:30:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,431 | java | package controller;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class MainDisplay {
private JFrame frame;
private JTextField InputAreaHidden;
public String rFInput;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MainDisplay window = new MainDisplay();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public MainDisplay() {
initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 720, 576);
frame.setAlwaysOnTop(true);
frame.setUndecorated(true);
//frame.setExtendedState(Frame.MAXIMIZED_BOTH);
//frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
InputAreaHidden = new JTextField();
InputAreaHidden.setBounds(0, 0, 200, 50);
frame.getContentPane().add(InputAreaHidden);
InputAreaHidden.setColumns(10);
//=======================TestBar
JPanel panelDisplay = new PinInput();
panelDisplay.setBounds(0, 0, 720, 576);
frame.getContentPane().add(panelDisplay);
frame.setVisible(true);
}
}
| [
"[email protected]"
] | |
b62963e55010e025d3b0eb64d84daaf097a6491b | e4f191e3c5e94bc0b4cad06eb7c770c3bba6c800 | /seminar4/src/ro/ase/cts/cts/prototype/clase/Restaurant.java | eb25d7ee4c614c65b0fef835c66159480d8f6c30 | [] | no_license | anarmn/CTS | 2a826ee0fc0b9e689eeed5ade3953963a694aa0c | 453255999b6865e28543443902a054668fe76a51 | refs/heads/main | 2023-05-10T00:13:45.595507 | 2021-06-05T10:34:36 | 2021-06-05T10:34:36 | 342,821,528 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,352 | java | package ro.ase.cts.cts.prototype.clase;
public class Restaurant {
private String nume;
private int nrAngajati;
private float cifraAfaceri;
private static Restaurant restaurant = null;
public static synchronized Restaurant getInstance(String nume, int nrAngajati, float cifraAfaceri){
if (restaurant==null){
restaurant = new Restaurant(nume, nrAngajati, cifraAfaceri);
}
return restaurant;
}
private Restaurant(String nume, int nrAngajati, float cifraAfaceri) {
this.nume = nume;
this.nrAngajati = nrAngajati;
this.cifraAfaceri = cifraAfaceri;
}
private Restaurant() {
nume = "";
nrAngajati=0;
cifraAfaceri=0;
}
public void setNume(String nume) {
this.nume = nume;
}
public void setNrAngajati(int nrAngajati) {
this.nrAngajati = nrAngajati;
}
public void setCifraAfaceri(float cifraAfaceri) {
this.cifraAfaceri = cifraAfaceri;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("Restaurant{");
sb.append("nume='").append(nume).append('\'');
sb.append(", nrAngajati=").append(nrAngajati);
sb.append(", cifraAfaceri=").append(cifraAfaceri);
sb.append('}');
return sb.toString();
}
}
| [
"[email protected]"
] | |
4445cacd9c72dbdb8332735a42f3de5524c5b706 | a938bdc1a6d3e1078d971c290052b932ce63df9c | /app/build/generated/source/r/debug/android/support/v7/appcompat/R.java | edd617be82691f688d2011c154bba19c5fe58c4e | [] | no_license | dnivanthaka/mqtt-android-client-demo | beb2127abc855e628554d910ec63faa3b83ae18f | 90cd208086684acd64cac362be36e9f13e1f3502 | refs/heads/master | 2021-01-10T13:00:55.146958 | 2016-03-22T13:08:49 | 2016-03-22T13:08:49 | 54,332,330 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 85,159 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool 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 = 0x7f050000;
public static final int abc_fade_out = 0x7f050001;
public static final int abc_grow_fade_in_from_bottom = 0x7f050002;
public static final int abc_popup_enter = 0x7f050003;
public static final int abc_popup_exit = 0x7f050004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f050005;
public static final int abc_slide_in_bottom = 0x7f050006;
public static final int abc_slide_in_top = 0x7f050007;
public static final int abc_slide_out_bottom = 0x7f050008;
public static final int abc_slide_out_top = 0x7f050009;
}
public static final class attr {
public static final int actionBarDivider = 0x7f0100a5;
public static final int actionBarItemBackground = 0x7f0100a6;
public static final int actionBarPopupTheme = 0x7f01009f;
public static final int actionBarSize = 0x7f0100a4;
public static final int actionBarSplitStyle = 0x7f0100a1;
public static final int actionBarStyle = 0x7f0100a0;
public static final int actionBarTabBarStyle = 0x7f01009b;
public static final int actionBarTabStyle = 0x7f01009a;
public static final int actionBarTabTextStyle = 0x7f01009c;
public static final int actionBarTheme = 0x7f0100a2;
public static final int actionBarWidgetTheme = 0x7f0100a3;
public static final int actionButtonStyle = 0x7f0100bf;
public static final int actionDropDownStyle = 0x7f0100bb;
public static final int actionLayout = 0x7f010051;
public static final int actionMenuTextAppearance = 0x7f0100a7;
public static final int actionMenuTextColor = 0x7f0100a8;
public static final int actionModeBackground = 0x7f0100ab;
public static final int actionModeCloseButtonStyle = 0x7f0100aa;
public static final int actionModeCloseDrawable = 0x7f0100ad;
public static final int actionModeCopyDrawable = 0x7f0100af;
public static final int actionModeCutDrawable = 0x7f0100ae;
public static final int actionModeFindDrawable = 0x7f0100b3;
public static final int actionModePasteDrawable = 0x7f0100b0;
public static final int actionModePopupWindowStyle = 0x7f0100b5;
public static final int actionModeSelectAllDrawable = 0x7f0100b1;
public static final int actionModeShareDrawable = 0x7f0100b2;
public static final int actionModeSplitBackground = 0x7f0100ac;
public static final int actionModeStyle = 0x7f0100a9;
public static final int actionModeWebSearchDrawable = 0x7f0100b4;
public static final int actionOverflowButtonStyle = 0x7f01009d;
public static final int actionOverflowMenuStyle = 0x7f01009e;
public static final int actionProviderClass = 0x7f010053;
public static final int actionViewClass = 0x7f010052;
public static final int activityChooserViewStyle = 0x7f0100c7;
public static final int alertDialogButtonGroupStyle = 0x7f0100ea;
public static final int alertDialogCenterButtons = 0x7f0100eb;
public static final int alertDialogStyle = 0x7f0100e9;
public static final int alertDialogTheme = 0x7f0100ec;
public static final int allowStacking = 0x7f010028;
public static final int arrowHeadLength = 0x7f010044;
public static final int arrowShaftLength = 0x7f010045;
public static final int autoCompleteTextViewStyle = 0x7f0100f1;
public static final int background = 0x7f01000c;
public static final int backgroundSplit = 0x7f01000e;
public static final int backgroundStacked = 0x7f01000d;
public static final int backgroundTint = 0x7f01010e;
public static final int backgroundTintMode = 0x7f01010f;
public static final int barLength = 0x7f010046;
public static final int borderlessButtonStyle = 0x7f0100c4;
public static final int buttonBarButtonStyle = 0x7f0100c1;
public static final int buttonBarNegativeButtonStyle = 0x7f0100ef;
public static final int buttonBarNeutralButtonStyle = 0x7f0100f0;
public static final int buttonBarPositiveButtonStyle = 0x7f0100ee;
public static final int buttonBarStyle = 0x7f0100c0;
public static final int buttonPanelSideLayout = 0x7f01001f;
public static final int buttonStyle = 0x7f0100f2;
public static final int buttonStyleSmall = 0x7f0100f3;
public static final int buttonTint = 0x7f010038;
public static final int buttonTintMode = 0x7f010039;
public static final int checkboxStyle = 0x7f0100f4;
public static final int checkedTextViewStyle = 0x7f0100f5;
public static final int closeIcon = 0x7f010067;
public static final int closeItemLayout = 0x7f01001c;
public static final int collapseContentDescription = 0x7f010105;
public static final int collapseIcon = 0x7f010104;
public static final int color = 0x7f010040;
public static final int colorAccent = 0x7f0100e2;
public static final int colorButtonNormal = 0x7f0100e6;
public static final int colorControlActivated = 0x7f0100e4;
public static final int colorControlHighlight = 0x7f0100e5;
public static final int colorControlNormal = 0x7f0100e3;
public static final int colorPrimary = 0x7f0100e0;
public static final int colorPrimaryDark = 0x7f0100e1;
public static final int colorSwitchThumbNormal = 0x7f0100e7;
public static final int commitIcon = 0x7f01006c;
public static final int contentInsetEnd = 0x7f010017;
public static final int contentInsetLeft = 0x7f010018;
public static final int contentInsetRight = 0x7f010019;
public static final int contentInsetStart = 0x7f010016;
public static final int controlBackground = 0x7f0100e8;
public static final int customNavigationLayout = 0x7f01000f;
public static final int defaultQueryHint = 0x7f010066;
public static final int dialogPreferredPadding = 0x7f0100b9;
public static final int dialogTheme = 0x7f0100b8;
public static final int displayOptions = 0x7f010005;
public static final int divider = 0x7f01000b;
public static final int dividerHorizontal = 0x7f0100c6;
public static final int dividerPadding = 0x7f01004f;
public static final int dividerVertical = 0x7f0100c5;
public static final int drawableSize = 0x7f010042;
public static final int drawerArrowStyle = 0x7f010000;
public static final int dropDownListViewStyle = 0x7f0100d8;
public static final int dropdownListPreferredItemHeight = 0x7f0100bc;
public static final int editTextBackground = 0x7f0100cd;
public static final int editTextColor = 0x7f0100cc;
public static final int editTextStyle = 0x7f0100f6;
public static final int elevation = 0x7f01001a;
public static final int expandActivityOverflowButtonDrawable = 0x7f01001e;
public static final int gapBetweenBars = 0x7f010043;
public static final int goIcon = 0x7f010068;
public static final int height = 0x7f010001;
public static final int hideOnContentScroll = 0x7f010015;
public static final int homeAsUpIndicator = 0x7f0100be;
public static final int homeLayout = 0x7f010010;
public static final int icon = 0x7f010009;
public static final int iconifiedByDefault = 0x7f010064;
public static final int imageButtonStyle = 0x7f0100ce;
public static final int indeterminateProgressStyle = 0x7f010012;
public static final int initialActivityCount = 0x7f01001d;
public static final int isLightTheme = 0x7f010002;
public static final int itemPadding = 0x7f010014;
public static final int layout = 0x7f010063;
public static final int listChoiceBackgroundIndicator = 0x7f0100df;
public static final int listDividerAlertDialog = 0x7f0100ba;
public static final int listItemLayout = 0x7f010023;
public static final int listLayout = 0x7f010020;
public static final int listPopupWindowStyle = 0x7f0100d9;
public static final int listPreferredItemHeight = 0x7f0100d3;
public static final int listPreferredItemHeightLarge = 0x7f0100d5;
public static final int listPreferredItemHeightSmall = 0x7f0100d4;
public static final int listPreferredItemPaddingLeft = 0x7f0100d6;
public static final int listPreferredItemPaddingRight = 0x7f0100d7;
public static final int logo = 0x7f01000a;
public static final int logoDescription = 0x7f010108;
public static final int maxButtonHeight = 0x7f010103;
public static final int measureWithLargestChild = 0x7f01004d;
public static final int multiChoiceItemLayout = 0x7f010021;
public static final int navigationContentDescription = 0x7f010107;
public static final int navigationIcon = 0x7f010106;
public static final int navigationMode = 0x7f010004;
public static final int overlapAnchor = 0x7f01005b;
public static final int paddingEnd = 0x7f01010c;
public static final int paddingStart = 0x7f01010b;
public static final int panelBackground = 0x7f0100dc;
public static final int panelMenuListTheme = 0x7f0100de;
public static final int panelMenuListWidth = 0x7f0100dd;
public static final int popupMenuStyle = 0x7f0100ca;
public static final int popupTheme = 0x7f01001b;
public static final int popupWindowStyle = 0x7f0100cb;
public static final int preserveIconSpacing = 0x7f010054;
public static final int progressBarPadding = 0x7f010013;
public static final int progressBarStyle = 0x7f010011;
public static final int queryBackground = 0x7f01006e;
public static final int queryHint = 0x7f010065;
public static final int radioButtonStyle = 0x7f0100f7;
public static final int ratingBarStyle = 0x7f0100f8;
public static final int searchHintIcon = 0x7f01006a;
public static final int searchIcon = 0x7f010069;
public static final int searchViewStyle = 0x7f0100d2;
public static final int seekBarStyle = 0x7f0100f9;
public static final int selectableItemBackground = 0x7f0100c2;
public static final int selectableItemBackgroundBorderless = 0x7f0100c3;
public static final int showAsAction = 0x7f010050;
public static final int showDividers = 0x7f01004e;
public static final int showText = 0x7f010077;
public static final int singleChoiceItemLayout = 0x7f010022;
public static final int spinBars = 0x7f010041;
public static final int spinnerDropDownItemStyle = 0x7f0100bd;
public static final int spinnerStyle = 0x7f0100fa;
public static final int splitTrack = 0x7f010076;
public static final int state_above_anchor = 0x7f01005c;
public static final int submitBackground = 0x7f01006f;
public static final int subtitle = 0x7f010006;
public static final int subtitleTextAppearance = 0x7f0100fd;
public static final int subtitleTextColor = 0x7f01010a;
public static final int subtitleTextStyle = 0x7f010008;
public static final int suggestionRowLayout = 0x7f01006d;
public static final int switchMinWidth = 0x7f010074;
public static final int switchPadding = 0x7f010075;
public static final int switchStyle = 0x7f0100fb;
public static final int switchTextAppearance = 0x7f010073;
public static final int textAllCaps = 0x7f010027;
public static final int textAppearanceLargePopupMenu = 0x7f0100b6;
public static final int textAppearanceListItem = 0x7f0100da;
public static final int textAppearanceListItemSmall = 0x7f0100db;
public static final int textAppearanceSearchResultSubtitle = 0x7f0100d0;
public static final int textAppearanceSearchResultTitle = 0x7f0100cf;
public static final int textAppearanceSmallPopupMenu = 0x7f0100b7;
public static final int textColorAlertDialogListItem = 0x7f0100ed;
public static final int textColorSearchUrl = 0x7f0100d1;
public static final int theme = 0x7f01010d;
public static final int thickness = 0x7f010047;
public static final int thumbTextPadding = 0x7f010072;
public static final int title = 0x7f010003;
public static final int titleMarginBottom = 0x7f010102;
public static final int titleMarginEnd = 0x7f010100;
public static final int titleMarginStart = 0x7f0100ff;
public static final int titleMarginTop = 0x7f010101;
public static final int titleMargins = 0x7f0100fe;
public static final int titleTextAppearance = 0x7f0100fc;
public static final int titleTextColor = 0x7f010109;
public static final int titleTextStyle = 0x7f010007;
public static final int toolbarNavigationButtonStyle = 0x7f0100c9;
public static final int toolbarStyle = 0x7f0100c8;
public static final int track = 0x7f010071;
public static final int voiceIcon = 0x7f01006b;
public static final int windowActionBar = 0x7f010090;
public static final int windowActionBarOverlay = 0x7f010092;
public static final int windowActionModeOverlay = 0x7f010093;
public static final int windowFixedHeightMajor = 0x7f010097;
public static final int windowFixedHeightMinor = 0x7f010095;
public static final int windowFixedWidthMajor = 0x7f010094;
public static final int windowFixedWidthMinor = 0x7f010096;
public static final int windowMinWidthMajor = 0x7f010098;
public static final int windowMinWidthMinor = 0x7f010099;
public static final int windowNoTitle = 0x7f010091;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs = 0x7f070003;
public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f070001;
public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f070004;
public static final int abc_allow_stacked_button_bar = 0x7f070000;
public static final int abc_config_actionMenuItemAllCaps = 0x7f070005;
public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f070002;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f070006;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f070007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f0b0046;
public static final int abc_background_cache_hint_selector_material_light = 0x7f0b0047;
public static final int abc_color_highlight_material = 0x7f0b0048;
public static final int abc_input_method_navigation_guard = 0x7f0b0000;
public static final int abc_primary_text_disable_only_material_dark = 0x7f0b0049;
public static final int abc_primary_text_disable_only_material_light = 0x7f0b004a;
public static final int abc_primary_text_material_dark = 0x7f0b004b;
public static final int abc_primary_text_material_light = 0x7f0b004c;
public static final int abc_search_url_text = 0x7f0b004d;
public static final int abc_search_url_text_normal = 0x7f0b0001;
public static final int abc_search_url_text_pressed = 0x7f0b0002;
public static final int abc_search_url_text_selected = 0x7f0b0003;
public static final int abc_secondary_text_material_dark = 0x7f0b004e;
public static final int abc_secondary_text_material_light = 0x7f0b004f;
public static final int accent_material_dark = 0x7f0b0004;
public static final int accent_material_light = 0x7f0b0005;
public static final int background_floating_material_dark = 0x7f0b0006;
public static final int background_floating_material_light = 0x7f0b0007;
public static final int background_material_dark = 0x7f0b0008;
public static final int background_material_light = 0x7f0b0009;
public static final int bright_foreground_disabled_material_dark = 0x7f0b000a;
public static final int bright_foreground_disabled_material_light = 0x7f0b000b;
public static final int bright_foreground_inverse_material_dark = 0x7f0b000c;
public static final int bright_foreground_inverse_material_light = 0x7f0b000d;
public static final int bright_foreground_material_dark = 0x7f0b000e;
public static final int bright_foreground_material_light = 0x7f0b000f;
public static final int button_material_dark = 0x7f0b0010;
public static final int button_material_light = 0x7f0b0011;
public static final int dim_foreground_disabled_material_dark = 0x7f0b001e;
public static final int dim_foreground_disabled_material_light = 0x7f0b001f;
public static final int dim_foreground_material_dark = 0x7f0b0020;
public static final int dim_foreground_material_light = 0x7f0b0021;
public static final int foreground_material_dark = 0x7f0b0022;
public static final int foreground_material_light = 0x7f0b0023;
public static final int highlighted_text_material_dark = 0x7f0b0024;
public static final int highlighted_text_material_light = 0x7f0b0025;
public static final int hint_foreground_material_dark = 0x7f0b0026;
public static final int hint_foreground_material_light = 0x7f0b0027;
public static final int material_blue_grey_800 = 0x7f0b0028;
public static final int material_blue_grey_900 = 0x7f0b0029;
public static final int material_blue_grey_950 = 0x7f0b002a;
public static final int material_deep_teal_200 = 0x7f0b002b;
public static final int material_deep_teal_500 = 0x7f0b002c;
public static final int material_grey_100 = 0x7f0b002d;
public static final int material_grey_300 = 0x7f0b002e;
public static final int material_grey_50 = 0x7f0b002f;
public static final int material_grey_600 = 0x7f0b0030;
public static final int material_grey_800 = 0x7f0b0031;
public static final int material_grey_850 = 0x7f0b0032;
public static final int material_grey_900 = 0x7f0b0033;
public static final int primary_dark_material_dark = 0x7f0b0034;
public static final int primary_dark_material_light = 0x7f0b0035;
public static final int primary_material_dark = 0x7f0b0036;
public static final int primary_material_light = 0x7f0b0037;
public static final int primary_text_default_material_dark = 0x7f0b0038;
public static final int primary_text_default_material_light = 0x7f0b0039;
public static final int primary_text_disabled_material_dark = 0x7f0b003a;
public static final int primary_text_disabled_material_light = 0x7f0b003b;
public static final int ripple_material_dark = 0x7f0b003c;
public static final int ripple_material_light = 0x7f0b003d;
public static final int secondary_text_default_material_dark = 0x7f0b003e;
public static final int secondary_text_default_material_light = 0x7f0b003f;
public static final int secondary_text_disabled_material_dark = 0x7f0b0040;
public static final int secondary_text_disabled_material_light = 0x7f0b0041;
public static final int switch_thumb_disabled_material_dark = 0x7f0b0042;
public static final int switch_thumb_disabled_material_light = 0x7f0b0043;
public static final int switch_thumb_material_dark = 0x7f0b0050;
public static final int switch_thumb_material_light = 0x7f0b0051;
public static final int switch_thumb_normal_material_dark = 0x7f0b0044;
public static final int switch_thumb_normal_material_light = 0x7f0b0045;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f08000d;
public static final int abc_action_bar_default_height_material = 0x7f080001;
public static final int abc_action_bar_default_padding_end_material = 0x7f08000e;
public static final int abc_action_bar_default_padding_start_material = 0x7f08000f;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f08001a;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f08001b;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f08001c;
public static final int abc_action_bar_progress_bar_size = 0x7f080002;
public static final int abc_action_bar_stacked_max_height = 0x7f08001d;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f08001e;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f08001f;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f080020;
public static final int abc_action_button_min_height_material = 0x7f080021;
public static final int abc_action_button_min_width_material = 0x7f080022;
public static final int abc_action_button_min_width_overflow_material = 0x7f080023;
public static final int abc_alert_dialog_button_bar_height = 0x7f080000;
public static final int abc_button_inset_horizontal_material = 0x7f080024;
public static final int abc_button_inset_vertical_material = 0x7f080025;
public static final int abc_button_padding_horizontal_material = 0x7f080026;
public static final int abc_button_padding_vertical_material = 0x7f080027;
public static final int abc_config_prefDialogWidth = 0x7f080005;
public static final int abc_control_corner_material = 0x7f080028;
public static final int abc_control_inset_material = 0x7f080029;
public static final int abc_control_padding_material = 0x7f08002a;
public static final int abc_dialog_fixed_height_major = 0x7f080006;
public static final int abc_dialog_fixed_height_minor = 0x7f080007;
public static final int abc_dialog_fixed_width_major = 0x7f080008;
public static final int abc_dialog_fixed_width_minor = 0x7f080009;
public static final int abc_dialog_list_padding_vertical_material = 0x7f08002b;
public static final int abc_dialog_min_width_major = 0x7f08000a;
public static final int abc_dialog_min_width_minor = 0x7f08000b;
public static final int abc_dialog_padding_material = 0x7f08002c;
public static final int abc_dialog_padding_top_material = 0x7f08002d;
public static final int abc_disabled_alpha_material_dark = 0x7f08002e;
public static final int abc_disabled_alpha_material_light = 0x7f08002f;
public static final int abc_dropdownitem_icon_width = 0x7f080030;
public static final int abc_dropdownitem_text_padding_left = 0x7f080031;
public static final int abc_dropdownitem_text_padding_right = 0x7f080032;
public static final int abc_edit_text_inset_bottom_material = 0x7f080033;
public static final int abc_edit_text_inset_horizontal_material = 0x7f080034;
public static final int abc_edit_text_inset_top_material = 0x7f080035;
public static final int abc_floating_window_z = 0x7f080036;
public static final int abc_list_item_padding_horizontal_material = 0x7f080037;
public static final int abc_panel_menu_list_width = 0x7f080038;
public static final int abc_search_view_preferred_width = 0x7f080039;
public static final int abc_search_view_text_min_width = 0x7f08000c;
public static final int abc_seekbar_track_background_height_material = 0x7f08003a;
public static final int abc_seekbar_track_progress_height_material = 0x7f08003b;
public static final int abc_select_dialog_padding_start_material = 0x7f08003c;
public static final int abc_switch_padding = 0x7f080017;
public static final int abc_text_size_body_1_material = 0x7f08003d;
public static final int abc_text_size_body_2_material = 0x7f08003e;
public static final int abc_text_size_button_material = 0x7f08003f;
public static final int abc_text_size_caption_material = 0x7f080040;
public static final int abc_text_size_display_1_material = 0x7f080041;
public static final int abc_text_size_display_2_material = 0x7f080042;
public static final int abc_text_size_display_3_material = 0x7f080043;
public static final int abc_text_size_display_4_material = 0x7f080044;
public static final int abc_text_size_headline_material = 0x7f080045;
public static final int abc_text_size_large_material = 0x7f080046;
public static final int abc_text_size_medium_material = 0x7f080047;
public static final int abc_text_size_menu_material = 0x7f080048;
public static final int abc_text_size_small_material = 0x7f080049;
public static final int abc_text_size_subhead_material = 0x7f08004a;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f080003;
public static final int abc_text_size_title_material = 0x7f08004b;
public static final int abc_text_size_title_material_toolbar = 0x7f080004;
public static final int disabled_alpha_material_dark = 0x7f080061;
public static final int disabled_alpha_material_light = 0x7f080062;
public static final int highlight_alpha_material_colored = 0x7f080064;
public static final int highlight_alpha_material_dark = 0x7f080065;
public static final int highlight_alpha_material_light = 0x7f080066;
public static final int notification_large_icon_height = 0x7f080068;
public static final int notification_large_icon_width = 0x7f080069;
public static final int notification_subtext_size = 0x7f08006a;
}
public static final class drawable {
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f020000;
public static final int abc_action_bar_item_background_material = 0x7f020001;
public static final int abc_btn_borderless_material = 0x7f020002;
public static final int abc_btn_check_material = 0x7f020003;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f020004;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f020005;
public static final int abc_btn_colored_material = 0x7f020006;
public static final int abc_btn_default_mtrl_shape = 0x7f020007;
public static final int abc_btn_radio_material = 0x7f020008;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f020009;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f02000a;
public static final int abc_btn_rating_star_off_mtrl_alpha = 0x7f02000b;
public static final int abc_btn_rating_star_on_mtrl_alpha = 0x7f02000c;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f02000d;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f02000e;
public static final int abc_cab_background_internal_bg = 0x7f02000f;
public static final int abc_cab_background_top_material = 0x7f020010;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f020011;
public static final int abc_control_background_material = 0x7f020012;
public static final int abc_dialog_material_background_dark = 0x7f020013;
public static final int abc_dialog_material_background_light = 0x7f020014;
public static final int abc_edit_text_material = 0x7f020015;
public static final int abc_ic_ab_back_mtrl_am_alpha = 0x7f020016;
public static final int abc_ic_clear_mtrl_alpha = 0x7f020017;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f020018;
public static final int abc_ic_go_search_api_mtrl_alpha = 0x7f020019;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f02001a;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f02001b;
public static final int abc_ic_menu_moreoverflow_mtrl_alpha = 0x7f02001c;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f02001d;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f02001e;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f02001f;
public static final int abc_ic_search_api_mtrl_alpha = 0x7f020020;
public static final int abc_ic_voice_search_api_mtrl_alpha = 0x7f020021;
public static final int abc_item_background_holo_dark = 0x7f020022;
public static final int abc_item_background_holo_light = 0x7f020023;
public static final int abc_list_divider_mtrl_alpha = 0x7f020024;
public static final int abc_list_focused_holo = 0x7f020025;
public static final int abc_list_longpressed_holo = 0x7f020026;
public static final int abc_list_pressed_holo_dark = 0x7f020027;
public static final int abc_list_pressed_holo_light = 0x7f020028;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f020029;
public static final int abc_list_selector_background_transition_holo_light = 0x7f02002a;
public static final int abc_list_selector_disabled_holo_dark = 0x7f02002b;
public static final int abc_list_selector_disabled_holo_light = 0x7f02002c;
public static final int abc_list_selector_holo_dark = 0x7f02002d;
public static final int abc_list_selector_holo_light = 0x7f02002e;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f02002f;
public static final int abc_popup_background_mtrl_mult = 0x7f020030;
public static final int abc_ratingbar_full_material = 0x7f020031;
public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f020032;
public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f020033;
public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f020034;
public static final int abc_scrubber_primary_mtrl_alpha = 0x7f020035;
public static final int abc_scrubber_track_mtrl_alpha = 0x7f020036;
public static final int abc_seekbar_thumb_material = 0x7f020037;
public static final int abc_seekbar_track_material = 0x7f020038;
public static final int abc_spinner_mtrl_am_alpha = 0x7f020039;
public static final int abc_spinner_textfield_background_material = 0x7f02003a;
public static final int abc_switch_thumb_material = 0x7f02003b;
public static final int abc_switch_track_mtrl_alpha = 0x7f02003c;
public static final int abc_tab_indicator_material = 0x7f02003d;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f02003e;
public static final int abc_text_cursor_material = 0x7f02003f;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f020040;
public static final int abc_textfield_default_mtrl_alpha = 0x7f020041;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f020042;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f020043;
public static final int abc_textfield_search_material = 0x7f020044;
public static final int notification_template_icon_bg = 0x7f020047;
}
public static final class id {
public static final int action0 = 0x7f0c0074;
public static final int action_bar = 0x7f0c005a;
public static final int action_bar_activity_content = 0x7f0c0000;
public static final int action_bar_container = 0x7f0c0059;
public static final int action_bar_root = 0x7f0c0055;
public static final int action_bar_spinner = 0x7f0c0001;
public static final int action_bar_subtitle = 0x7f0c003b;
public static final int action_bar_title = 0x7f0c003a;
public static final int action_context_bar = 0x7f0c005b;
public static final int action_divider = 0x7f0c0078;
public static final int action_menu_divider = 0x7f0c0002;
public static final int action_menu_presenter = 0x7f0c0003;
public static final int action_mode_bar = 0x7f0c0057;
public static final int action_mode_bar_stub = 0x7f0c0056;
public static final int action_mode_close_button = 0x7f0c003c;
public static final int activity_chooser_view_content = 0x7f0c003d;
public static final int alertTitle = 0x7f0c0049;
public static final int always = 0x7f0c0032;
public static final int beginning = 0x7f0c0030;
public static final int buttonPanel = 0x7f0c0044;
public static final int cancel_action = 0x7f0c0075;
public static final int checkbox = 0x7f0c0052;
public static final int chronometer = 0x7f0c007b;
public static final int collapseActionView = 0x7f0c0033;
public static final int contentPanel = 0x7f0c004a;
public static final int custom = 0x7f0c0050;
public static final int customPanel = 0x7f0c004f;
public static final int decor_content_parent = 0x7f0c0058;
public static final int default_activity_button = 0x7f0c0040;
public static final int disableHome = 0x7f0c000e;
public static final int edit_query = 0x7f0c005c;
public static final int end = 0x7f0c0020;
public static final int end_padder = 0x7f0c0080;
public static final int expand_activities_button = 0x7f0c003e;
public static final int expanded_menu = 0x7f0c0051;
public static final int home = 0x7f0c0004;
public static final int homeAsUp = 0x7f0c000f;
public static final int icon = 0x7f0c0042;
public static final int ifRoom = 0x7f0c0034;
public static final int image = 0x7f0c003f;
public static final int info = 0x7f0c007f;
public static final int line1 = 0x7f0c0079;
public static final int line3 = 0x7f0c007d;
public static final int listMode = 0x7f0c000b;
public static final int list_item = 0x7f0c0041;
public static final int media_actions = 0x7f0c0077;
public static final int middle = 0x7f0c0031;
public static final int multiply = 0x7f0c0026;
public static final int never = 0x7f0c0035;
public static final int none = 0x7f0c0010;
public static final int normal = 0x7f0c000c;
public static final int parentPanel = 0x7f0c0046;
public static final int progress_circular = 0x7f0c0006;
public static final int progress_horizontal = 0x7f0c0007;
public static final int radio = 0x7f0c0054;
public static final int screen = 0x7f0c0027;
public static final int scrollIndicatorDown = 0x7f0c004e;
public static final int scrollIndicatorUp = 0x7f0c004b;
public static final int scrollView = 0x7f0c004c;
public static final int search_badge = 0x7f0c005e;
public static final int search_bar = 0x7f0c005d;
public static final int search_button = 0x7f0c005f;
public static final int search_close_btn = 0x7f0c0064;
public static final int search_edit_frame = 0x7f0c0060;
public static final int search_go_btn = 0x7f0c0066;
public static final int search_mag_icon = 0x7f0c0061;
public static final int search_plate = 0x7f0c0062;
public static final int search_src_text = 0x7f0c0063;
public static final int search_voice_btn = 0x7f0c0067;
public static final int select_dialog_listview = 0x7f0c0068;
public static final int shortcut = 0x7f0c0053;
public static final int showCustom = 0x7f0c0011;
public static final int showHome = 0x7f0c0012;
public static final int showTitle = 0x7f0c0013;
public static final int spacer = 0x7f0c0045;
public static final int split_action_bar = 0x7f0c0008;
public static final int src_atop = 0x7f0c0028;
public static final int src_in = 0x7f0c0029;
public static final int src_over = 0x7f0c002a;
public static final int status_bar_latest_event_content = 0x7f0c0076;
public static final int submit_area = 0x7f0c0065;
public static final int tabMode = 0x7f0c000d;
public static final int text = 0x7f0c007e;
public static final int text2 = 0x7f0c007c;
public static final int textSpacerNoButtons = 0x7f0c004d;
public static final int time = 0x7f0c007a;
public static final int title = 0x7f0c0043;
public static final int title_template = 0x7f0c0048;
public static final int topPanel = 0x7f0c0047;
public static final int up = 0x7f0c0009;
public static final int useLogo = 0x7f0c0014;
public static final int withText = 0x7f0c0036;
public static final int wrap_content = 0x7f0c0039;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f0a0002;
public static final int abc_config_activityShortDur = 0x7f0a0003;
public static final int abc_max_action_buttons = 0x7f0a0000;
public static final int cancel_button_image_alpha = 0x7f0a0004;
public static final int status_bar_notification_info_maxnum = 0x7f0a0005;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f040000;
public static final int abc_action_bar_up_container = 0x7f040001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f040002;
public static final int abc_action_menu_item_layout = 0x7f040003;
public static final int abc_action_menu_layout = 0x7f040004;
public static final int abc_action_mode_bar = 0x7f040005;
public static final int abc_action_mode_close_item_material = 0x7f040006;
public static final int abc_activity_chooser_view = 0x7f040007;
public static final int abc_activity_chooser_view_list_item = 0x7f040008;
public static final int abc_alert_dialog_button_bar_material = 0x7f040009;
public static final int abc_alert_dialog_material = 0x7f04000a;
public static final int abc_dialog_title_material = 0x7f04000b;
public static final int abc_expanded_menu_layout = 0x7f04000c;
public static final int abc_list_menu_item_checkbox = 0x7f04000d;
public static final int abc_list_menu_item_icon = 0x7f04000e;
public static final int abc_list_menu_item_layout = 0x7f04000f;
public static final int abc_list_menu_item_radio = 0x7f040010;
public static final int abc_popup_menu_item_layout = 0x7f040011;
public static final int abc_screen_content_include = 0x7f040012;
public static final int abc_screen_simple = 0x7f040013;
public static final int abc_screen_simple_overlay_action_mode = 0x7f040014;
public static final int abc_screen_toolbar = 0x7f040015;
public static final int abc_search_dropdown_item_icons_2line = 0x7f040016;
public static final int abc_search_view = 0x7f040017;
public static final int abc_select_dialog_material = 0x7f040018;
public static final int notification_media_action = 0x7f040026;
public static final int notification_media_cancel_action = 0x7f040027;
public static final int notification_template_big_media = 0x7f040028;
public static final int notification_template_big_media_narrow = 0x7f040029;
public static final int notification_template_lines = 0x7f04002a;
public static final int notification_template_media = 0x7f04002b;
public static final int notification_template_part_chronometer = 0x7f04002c;
public static final int notification_template_part_time = 0x7f04002d;
public static final int select_dialog_item_material = 0x7f04002e;
public static final int select_dialog_multichoice_material = 0x7f04002f;
public static final int select_dialog_singlechoice_material = 0x7f040030;
public static final int support_simple_spinner_dropdown_item = 0x7f040031;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f060000;
public static final int abc_action_bar_home_description_format = 0x7f060001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f060002;
public static final int abc_action_bar_up_description = 0x7f060003;
public static final int abc_action_menu_overflow_description = 0x7f060004;
public static final int abc_action_mode_done = 0x7f060005;
public static final int abc_activity_chooser_view_see_all = 0x7f060006;
public static final int abc_activitychooserview_choose_application = 0x7f060007;
public static final int abc_capital_off = 0x7f060008;
public static final int abc_capital_on = 0x7f060009;
public static final int abc_search_hint = 0x7f06000a;
public static final int abc_searchview_description_clear = 0x7f06000b;
public static final int abc_searchview_description_query = 0x7f06000c;
public static final int abc_searchview_description_search = 0x7f06000d;
public static final int abc_searchview_description_submit = 0x7f06000e;
public static final int abc_searchview_description_voice = 0x7f06000f;
public static final int abc_shareactionprovider_share_with = 0x7f060010;
public static final int abc_shareactionprovider_share_with_application = 0x7f060011;
public static final int abc_toolbar_collapse_description = 0x7f060012;
public static final int status_bar_notification_info_overflow = 0x7f060013;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f09007f;
public static final int AlertDialog_AppCompat_Light = 0x7f090080;
public static final int Animation_AppCompat_Dialog = 0x7f090081;
public static final int Animation_AppCompat_DropDownUp = 0x7f090082;
public static final int Base_AlertDialog_AppCompat = 0x7f090086;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f090087;
public static final int Base_Animation_AppCompat_Dialog = 0x7f090088;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f090089;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f09008b;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f09008a;
public static final int Base_TextAppearance_AppCompat = 0x7f090031;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f090032;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f090033;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f09001a;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f090034;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f090035;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f090036;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f090037;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f090038;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f090039;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f090005;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f09003a;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f090006;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f09003b;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f09003c;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f09003d;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f090007;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f09003e;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f09008c;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f09003f;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f090040;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f090041;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f090008;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f090042;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f090009;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f090043;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f09000a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f090044;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f090045;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f090046;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f090047;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f090048;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f090049;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f09004a;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f09004b;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f09007b;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f09008d;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f09004c;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f09004d;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f09004e;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f09004f;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f09008e;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f090050;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f090051;
public static final int Base_ThemeOverlay_AppCompat = 0x7f090097;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f090098;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f090099;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f09009a;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f09009b;
public static final int Base_Theme_AppCompat = 0x7f090052;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f09008f;
public static final int Base_Theme_AppCompat_Dialog = 0x7f09000b;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f090002;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f090090;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f090091;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f090092;
public static final int Base_Theme_AppCompat_Light = 0x7f090053;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f090093;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f09000c;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f090003;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f090094;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f090095;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f090096;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f09000d;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f09000e;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f090016;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f090017;
public static final int Base_V21_Theme_AppCompat = 0x7f090054;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f090055;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f090056;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f090057;
public static final int Base_V22_Theme_AppCompat = 0x7f090079;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f09007a;
public static final int Base_V23_Theme_AppCompat = 0x7f09007c;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f09007d;
public static final int Base_V7_Theme_AppCompat = 0x7f09009c;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f09009d;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f09009e;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f09009f;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0900a0;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0900a1;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0900a2;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0900a3;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0900a4;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f090058;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f090059;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f09005a;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f09005b;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f09005c;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0900a5;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0900a6;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f090018;
public static final int Base_Widget_AppCompat_Button = 0x7f09005d;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f090061;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0900a8;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f09005e;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f09005f;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0900a7;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f09007e;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f090060;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f090062;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f090063;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0900a9;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f090000;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0900aa;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f090064;
public static final int Base_Widget_AppCompat_EditText = 0x7f090019;
public static final int Base_Widget_AppCompat_ImageButton = 0x7f090065;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0900ab;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0900ac;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0900ad;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f090066;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f090067;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f090068;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f090069;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f09006a;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f09006b;
public static final int Base_Widget_AppCompat_ListView = 0x7f09006c;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f09006d;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f09006e;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f09006f;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f090070;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0900ae;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f09000f;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f090010;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f090071;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0900af;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0900b0;
public static final int Base_Widget_AppCompat_SeekBar = 0x7f090072;
public static final int Base_Widget_AppCompat_Spinner = 0x7f090073;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f090004;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f090074;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0900b1;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f090075;
public static final int Platform_AppCompat = 0x7f090011;
public static final int Platform_AppCompat_Light = 0x7f090012;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f090076;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f090077;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f090078;
public static final int Platform_V11_AppCompat = 0x7f090013;
public static final int Platform_V11_AppCompat_Light = 0x7f090014;
public static final int Platform_V14_AppCompat = 0x7f09001b;
public static final int Platform_V14_AppCompat_Light = 0x7f09001c;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f090015;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f090022;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f090023;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f090024;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f090025;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f090026;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f090027;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f09002d;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f090028;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f090029;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f09002a;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f09002b;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f09002c;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f09002e;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f09002f;
public static final int TextAppearance_AppCompat = 0x7f0900b3;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0900b4;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0900b5;
public static final int TextAppearance_AppCompat_Button = 0x7f0900b6;
public static final int TextAppearance_AppCompat_Caption = 0x7f0900b7;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0900b8;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0900b9;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0900ba;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0900bb;
public static final int TextAppearance_AppCompat_Headline = 0x7f0900bc;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0900bd;
public static final int TextAppearance_AppCompat_Large = 0x7f0900be;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0900bf;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0900c0;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0900c1;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0900c2;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0900c3;
public static final int TextAppearance_AppCompat_Medium = 0x7f0900c4;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0900c5;
public static final int TextAppearance_AppCompat_Menu = 0x7f0900c6;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0900c7;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0900c8;
public static final int TextAppearance_AppCompat_Small = 0x7f0900c9;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0900ca;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0900cb;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0900cc;
public static final int TextAppearance_AppCompat_Title = 0x7f0900cd;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0900ce;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0900cf;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0900d0;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0900d1;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0900d2;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0900d3;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0900d4;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0900d5;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0900d6;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0900d7;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0900d8;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0900d9;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0900da;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0900db;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0900dc;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0900dd;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0900de;
public static final int TextAppearance_StatusBar_EventContent = 0x7f09001d;
public static final int TextAppearance_StatusBar_EventContent_Info = 0x7f09001e;
public static final int TextAppearance_StatusBar_EventContent_Line2 = 0x7f09001f;
public static final int TextAppearance_StatusBar_EventContent_Time = 0x7f090020;
public static final int TextAppearance_StatusBar_EventContent_Title = 0x7f090021;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0900e6;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0900e7;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0900e8;
public static final int ThemeOverlay_AppCompat = 0x7f0900f7;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0900f8;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0900f9;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0900fa;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0900fb;
public static final int Theme_AppCompat = 0x7f0900e9;
public static final int Theme_AppCompat_CompactMenu = 0x7f0900ea;
public static final int Theme_AppCompat_Dialog = 0x7f0900eb;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0900ee;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0900ec;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0900ed;
public static final int Theme_AppCompat_Light = 0x7f0900ef;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0900f0;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0900f1;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0900f4;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0900f2;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0900f3;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0900f5;
public static final int Theme_AppCompat_NoActionBar = 0x7f0900f6;
public static final int Widget_AppCompat_ActionBar = 0x7f0900fc;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0900fd;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0900fe;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0900ff;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f090100;
public static final int Widget_AppCompat_ActionButton = 0x7f090101;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f090102;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f090103;
public static final int Widget_AppCompat_ActionMode = 0x7f090104;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f090105;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f090106;
public static final int Widget_AppCompat_Button = 0x7f090107;
public static final int Widget_AppCompat_ButtonBar = 0x7f09010d;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f09010e;
public static final int Widget_AppCompat_Button_Borderless = 0x7f090108;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f090109;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f09010a;
public static final int Widget_AppCompat_Button_Colored = 0x7f09010b;
public static final int Widget_AppCompat_Button_Small = 0x7f09010c;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f09010f;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f090110;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f090111;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f090112;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f090113;
public static final int Widget_AppCompat_EditText = 0x7f090114;
public static final int Widget_AppCompat_ImageButton = 0x7f090115;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f090116;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f090117;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f090118;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f090119;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f09011a;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f09011b;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f09011c;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f09011d;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f09011e;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f09011f;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f090120;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f090121;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f090122;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f090123;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f090124;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f090125;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f090126;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f090127;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f090128;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f090129;
public static final int Widget_AppCompat_Light_SearchView = 0x7f09012a;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f09012b;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f09012c;
public static final int Widget_AppCompat_ListView = 0x7f09012d;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f09012e;
public static final int Widget_AppCompat_ListView_Menu = 0x7f09012f;
public static final int Widget_AppCompat_PopupMenu = 0x7f090130;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f090131;
public static final int Widget_AppCompat_PopupWindow = 0x7f090132;
public static final int Widget_AppCompat_ProgressBar = 0x7f090133;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f090134;
public static final int Widget_AppCompat_RatingBar = 0x7f090135;
public static final int Widget_AppCompat_SearchView = 0x7f090136;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f090137;
public static final int Widget_AppCompat_SeekBar = 0x7f090138;
public static final int Widget_AppCompat_Spinner = 0x7f090139;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f09013a;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f09013b;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f09013c;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f09013d;
public static final int Widget_AppCompat_Toolbar = 0x7f09013e;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f09013f;
}
public static final class styleable {
public static final int[] ActionBar = { 0x7f010001, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f0100be };
public static final int[] ActionBarLayout = { 0x010100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int ActionBar_background = 10;
public static final int ActionBar_backgroundSplit = 12;
public static final int ActionBar_backgroundStacked = 11;
public static final int ActionBar_contentInsetEnd = 21;
public static final int ActionBar_contentInsetLeft = 22;
public static final int ActionBar_contentInsetRight = 23;
public static final int ActionBar_contentInsetStart = 20;
public static final int ActionBar_customNavigationLayout = 13;
public static final int ActionBar_displayOptions = 3;
public static final int ActionBar_divider = 9;
public static final int ActionBar_elevation = 24;
public static final int ActionBar_height = 0;
public static final int ActionBar_hideOnContentScroll = 19;
public static final int ActionBar_homeAsUpIndicator = 26;
public static final int ActionBar_homeLayout = 14;
public static final int ActionBar_icon = 7;
public static final int ActionBar_indeterminateProgressStyle = 16;
public static final int ActionBar_itemPadding = 18;
public static final int ActionBar_logo = 8;
public static final int ActionBar_navigationMode = 2;
public static final int ActionBar_popupTheme = 25;
public static final int ActionBar_progressBarPadding = 17;
public static final int ActionBar_progressBarStyle = 15;
public static final int ActionBar_subtitle = 4;
public static final int ActionBar_subtitleTextStyle = 6;
public static final int ActionBar_title = 1;
public static final int ActionBar_titleTextStyle = 5;
public static final int[] ActionMenuItemView = { 0x0101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMenuView = { };
public static final int[] ActionMode = { 0x7f010001, 0x7f010007, 0x7f010008, 0x7f01000c, 0x7f01000e, 0x7f01001c };
public static final int ActionMode_background = 3;
public static final int ActionMode_backgroundSplit = 4;
public static final int ActionMode_closeItemLayout = 5;
public static final int ActionMode_height = 0;
public static final int ActionMode_subtitleTextStyle = 2;
public static final int ActionMode_titleTextStyle = 1;
public static final int[] ActivityChooserView = { 0x7f01001d, 0x7f01001e };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
public static final int ActivityChooserView_initialActivityCount = 0;
public static final int[] AlertDialog = { 0x010100f2, 0x7f01001f, 0x7f010020, 0x7f010021, 0x7f010022, 0x7f010023 };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonPanelSideLayout = 1;
public static final int AlertDialog_listItemLayout = 5;
public static final int AlertDialog_listLayout = 2;
public static final int AlertDialog_multiChoiceItemLayout = 3;
public static final int AlertDialog_singleChoiceItemLayout = 4;
public static final int[] AppCompatTextView = { 0x01010034, 0x7f010027 };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_textAllCaps = 1;
public static final int[] ButtonBarLayout = { 0x7f010028 };
public static final int ButtonBarLayout_allowStacking = 0;
public static final int[] CompoundButton = { 0x01010107, 0x7f010038, 0x7f010039 };
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 = { 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047 };
public static final int DrawerArrowToggle_arrowHeadLength = 4;
public static final int DrawerArrowToggle_arrowShaftLength = 5;
public static final int DrawerArrowToggle_barLength = 6;
public static final int DrawerArrowToggle_color = 0;
public static final int DrawerArrowToggle_drawableSize = 2;
public static final int DrawerArrowToggle_gapBetweenBars = 3;
public static final int DrawerArrowToggle_spinBars = 1;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f01000b, 0x7f01004d, 0x7f01004e, 0x7f01004f };
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_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 8;
public static final int LinearLayoutCompat_measureWithLargestChild = 6;
public static final int LinearLayoutCompat_showDividers = 7;
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_checkableBehavior = 5;
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_visible = 2;
public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010050, 0x7f010051, 0x7f010052, 0x7f010053 };
public static final int MenuItem_actionLayout = 14;
public static final int MenuItem_actionProviderClass = 16;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_onClick = 12;
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_visible = 4;
public static final int MenuItem_showAsAction = 13;
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f010054 };
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_preserveIconSpacing = 7;
public static final int[] PopupWindow = { 0x01010176, 0x7f01005b };
public static final int[] PopupWindowBackgroundState = { 0x7f01005c };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 1;
public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f010063, 0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067, 0x7f010068, 0x7f010069, 0x7f01006a, 0x7f01006b, 0x7f01006c, 0x7f01006d, 0x7f01006e, 0x7f01006f };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_closeIcon = 8;
public static final int SearchView_commitIcon = 13;
public static final int SearchView_defaultQueryHint = 7;
public static final int SearchView_goIcon = 9;
public static final int SearchView_iconifiedByDefault = 5;
public static final int SearchView_layout = 4;
public static final int SearchView_queryBackground = 15;
public static final int SearchView_queryHint = 6;
public static final int SearchView_searchHintIcon = 11;
public static final int SearchView_searchIcon = 10;
public static final int SearchView_submitBackground = 16;
public static final int SearchView_suggestionRowLayout = 14;
public static final int SearchView_voiceIcon = 12;
public static final int[] Spinner = { 0x01010176, 0x0101017b, 0x01010262, 0x7f01001b };
public static final int Spinner_android_dropDownWidth = 2;
public static final int Spinner_android_popupBackground = 0;
public static final int Spinner_android_prompt = 1;
public static final int Spinner_popupTheme = 3;
public static final int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f010071, 0x7f010072, 0x7f010073, 0x7f010074, 0x7f010075, 0x7f010076, 0x7f010077 };
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 9;
public static final int SwitchCompat_splitTrack = 8;
public static final int SwitchCompat_switchMinWidth = 6;
public static final int SwitchCompat_switchPadding = 7;
public static final int SwitchCompat_switchTextAppearance = 5;
public static final int SwitchCompat_thumbTextPadding = 4;
public static final int SwitchCompat_track = 3;
public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f010027 };
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_android_textColor = 3;
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_textAllCaps = 8;
public static final int[] Theme = { 0x01010057, 0x010100ae, 0x7f010090, 0x7f010091, 0x7f010092, 0x7f010093, 0x7f010094, 0x7f010095, 0x7f010096, 0x7f010097, 0x7f010098, 0x7f010099, 0x7f01009a, 0x7f01009b, 0x7f01009c, 0x7f01009d, 0x7f01009e, 0x7f01009f, 0x7f0100a0, 0x7f0100a1, 0x7f0100a2, 0x7f0100a3, 0x7f0100a4, 0x7f0100a5, 0x7f0100a6, 0x7f0100a7, 0x7f0100a8, 0x7f0100a9, 0x7f0100aa, 0x7f0100ab, 0x7f0100ac, 0x7f0100ad, 0x7f0100ae, 0x7f0100af, 0x7f0100b0, 0x7f0100b1, 0x7f0100b2, 0x7f0100b3, 0x7f0100b4, 0x7f0100b5, 0x7f0100b6, 0x7f0100b7, 0x7f0100b8, 0x7f0100b9, 0x7f0100ba, 0x7f0100bb, 0x7f0100bc, 0x7f0100bd, 0x7f0100be, 0x7f0100bf, 0x7f0100c0, 0x7f0100c1, 0x7f0100c2, 0x7f0100c3, 0x7f0100c4, 0x7f0100c5, 0x7f0100c6, 0x7f0100c7, 0x7f0100c8, 0x7f0100c9, 0x7f0100ca, 0x7f0100cb, 0x7f0100cc, 0x7f0100cd, 0x7f0100ce, 0x7f0100cf, 0x7f0100d0, 0x7f0100d1, 0x7f0100d2, 0x7f0100d3, 0x7f0100d4, 0x7f0100d5, 0x7f0100d6, 0x7f0100d7, 0x7f0100d8, 0x7f0100d9, 0x7f0100da, 0x7f0100db, 0x7f0100dc, 0x7f0100dd, 0x7f0100de, 0x7f0100df, 0x7f0100e0, 0x7f0100e1, 0x7f0100e2, 0x7f0100e3, 0x7f0100e4, 0x7f0100e5, 0x7f0100e6, 0x7f0100e7, 0x7f0100e8, 0x7f0100e9, 0x7f0100ea, 0x7f0100eb, 0x7f0100ec, 0x7f0100ed, 0x7f0100ee, 0x7f0100ef, 0x7f0100f0, 0x7f0100f1, 0x7f0100f2, 0x7f0100f3, 0x7f0100f4, 0x7f0100f5, 0x7f0100f6, 0x7f0100f7, 0x7f0100f8, 0x7f0100f9, 0x7f0100fa, 0x7f0100fb };
public static final int Theme_actionBarDivider = 23;
public static final int Theme_actionBarItemBackground = 24;
public static final int Theme_actionBarPopupTheme = 17;
public static final int Theme_actionBarSize = 22;
public static final int Theme_actionBarSplitStyle = 19;
public static final int Theme_actionBarStyle = 18;
public static final int Theme_actionBarTabBarStyle = 13;
public static final int Theme_actionBarTabStyle = 12;
public static final int Theme_actionBarTabTextStyle = 14;
public static final int Theme_actionBarTheme = 20;
public static final int Theme_actionBarWidgetTheme = 21;
public static final int Theme_actionButtonStyle = 49;
public static final int Theme_actionDropDownStyle = 45;
public static final int Theme_actionMenuTextAppearance = 25;
public static final int Theme_actionMenuTextColor = 26;
public static final int Theme_actionModeBackground = 29;
public static final int Theme_actionModeCloseButtonStyle = 28;
public static final int Theme_actionModeCloseDrawable = 31;
public static final int Theme_actionModeCopyDrawable = 33;
public static final int Theme_actionModeCutDrawable = 32;
public static final int Theme_actionModeFindDrawable = 37;
public static final int Theme_actionModePasteDrawable = 34;
public static final int Theme_actionModePopupWindowStyle = 39;
public static final int Theme_actionModeSelectAllDrawable = 35;
public static final int Theme_actionModeShareDrawable = 36;
public static final int Theme_actionModeSplitBackground = 30;
public static final int Theme_actionModeStyle = 27;
public static final int Theme_actionModeWebSearchDrawable = 38;
public static final int Theme_actionOverflowButtonStyle = 15;
public static final int Theme_actionOverflowMenuStyle = 16;
public static final int Theme_activityChooserViewStyle = 57;
public static final int Theme_alertDialogButtonGroupStyle = 92;
public static final int Theme_alertDialogCenterButtons = 93;
public static final int Theme_alertDialogStyle = 91;
public static final int Theme_alertDialogTheme = 94;
public static final int Theme_android_windowAnimationStyle = 1;
public static final int Theme_android_windowIsFloating = 0;
public static final int Theme_autoCompleteTextViewStyle = 99;
public static final int Theme_borderlessButtonStyle = 54;
public static final int Theme_buttonBarButtonStyle = 51;
public static final int Theme_buttonBarNegativeButtonStyle = 97;
public static final int Theme_buttonBarNeutralButtonStyle = 98;
public static final int Theme_buttonBarPositiveButtonStyle = 96;
public static final int Theme_buttonBarStyle = 50;
public static final int Theme_buttonStyle = 100;
public static final int Theme_buttonStyleSmall = 101;
public static final int Theme_checkboxStyle = 102;
public static final int Theme_checkedTextViewStyle = 103;
public static final int Theme_colorAccent = 84;
public static final int Theme_colorButtonNormal = 88;
public static final int Theme_colorControlActivated = 86;
public static final int Theme_colorControlHighlight = 87;
public static final int Theme_colorControlNormal = 85;
public static final int Theme_colorPrimary = 82;
public static final int Theme_colorPrimaryDark = 83;
public static final int Theme_colorSwitchThumbNormal = 89;
public static final int Theme_controlBackground = 90;
public static final int Theme_dialogPreferredPadding = 43;
public static final int Theme_dialogTheme = 42;
public static final int Theme_dividerHorizontal = 56;
public static final int Theme_dividerVertical = 55;
public static final int Theme_dropDownListViewStyle = 74;
public static final int Theme_dropdownListPreferredItemHeight = 46;
public static final int Theme_editTextBackground = 63;
public static final int Theme_editTextColor = 62;
public static final int Theme_editTextStyle = 104;
public static final int Theme_homeAsUpIndicator = 48;
public static final int Theme_imageButtonStyle = 64;
public static final int Theme_listChoiceBackgroundIndicator = 81;
public static final int Theme_listDividerAlertDialog = 44;
public static final int Theme_listPopupWindowStyle = 75;
public static final int Theme_listPreferredItemHeight = 69;
public static final int Theme_listPreferredItemHeightLarge = 71;
public static final int Theme_listPreferredItemHeightSmall = 70;
public static final int Theme_listPreferredItemPaddingLeft = 72;
public static final int Theme_listPreferredItemPaddingRight = 73;
public static final int Theme_panelBackground = 78;
public static final int Theme_panelMenuListTheme = 80;
public static final int Theme_panelMenuListWidth = 79;
public static final int Theme_popupMenuStyle = 60;
public static final int Theme_popupWindowStyle = 61;
public static final int Theme_radioButtonStyle = 105;
public static final int Theme_ratingBarStyle = 106;
public static final int Theme_searchViewStyle = 68;
public static final int Theme_seekBarStyle = 107;
public static final int Theme_selectableItemBackground = 52;
public static final int Theme_selectableItemBackgroundBorderless = 53;
public static final int Theme_spinnerDropDownItemStyle = 47;
public static final int Theme_spinnerStyle = 108;
public static final int Theme_switchStyle = 109;
public static final int Theme_textAppearanceLargePopupMenu = 40;
public static final int Theme_textAppearanceListItem = 76;
public static final int Theme_textAppearanceListItemSmall = 77;
public static final int Theme_textAppearanceSearchResultSubtitle = 66;
public static final int Theme_textAppearanceSearchResultTitle = 65;
public static final int Theme_textAppearanceSmallPopupMenu = 41;
public static final int Theme_textColorAlertDialogListItem = 95;
public static final int Theme_textColorSearchUrl = 67;
public static final int Theme_toolbarNavigationButtonStyle = 59;
public static final int Theme_toolbarStyle = 58;
public static final int Theme_windowActionBar = 2;
public static final int Theme_windowActionBarOverlay = 4;
public static final int Theme_windowActionModeOverlay = 5;
public static final int Theme_windowFixedHeightMajor = 9;
public static final int Theme_windowFixedHeightMinor = 7;
public static final int Theme_windowFixedWidthMajor = 6;
public static final int Theme_windowFixedWidthMinor = 8;
public static final int Theme_windowMinWidthMajor = 10;
public static final int Theme_windowMinWidthMinor = 11;
public static final int Theme_windowNoTitle = 3;
public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f010003, 0x7f010006, 0x7f01000a, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001b, 0x7f0100fc, 0x7f0100fd, 0x7f0100fe, 0x7f0100ff, 0x7f010100, 0x7f010101, 0x7f010102, 0x7f010103, 0x7f010104, 0x7f010105, 0x7f010106, 0x7f010107, 0x7f010108, 0x7f010109, 0x7f01010a };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_collapseContentDescription = 19;
public static final int Toolbar_collapseIcon = 18;
public static final int Toolbar_contentInsetEnd = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 5;
public static final int Toolbar_logo = 4;
public static final int Toolbar_logoDescription = 22;
public static final int Toolbar_maxButtonHeight = 17;
public static final int Toolbar_navigationContentDescription = 21;
public static final int Toolbar_navigationIcon = 20;
public static final int Toolbar_popupTheme = 9;
public static final int Toolbar_subtitle = 3;
public static final int Toolbar_subtitleTextAppearance = 11;
public static final int Toolbar_subtitleTextColor = 24;
public static final int Toolbar_title = 2;
public static final int Toolbar_titleMarginBottom = 16;
public static final int Toolbar_titleMarginEnd = 14;
public static final int Toolbar_titleMarginStart = 13;
public static final int Toolbar_titleMarginTop = 15;
public static final int Toolbar_titleMargins = 12;
public static final int Toolbar_titleTextAppearance = 10;
public static final int Toolbar_titleTextColor = 23;
public static final int[] View = { 0x01010000, 0x010100da, 0x7f01010b, 0x7f01010c, 0x7f01010d };
public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f01010e, 0x7f01010f };
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_inflatedId = 2;
public static final int ViewStubCompat_android_layout = 1;
public static final int View_android_focusable = 1;
public static final int View_android_theme = 0;
public static final int View_paddingEnd = 3;
public static final int View_paddingStart = 2;
public static final int View_theme = 4;
}
}
| [
"[email protected]"
] | |
a9c4920475e38c74ddd14d6d3b44b97a36628796 | e63c6c2689b0865a9e0b485a05e9eb7deae059f9 | /src/main/java/com/my/jasuil/TestDTO.java | a757c3b6cc1e2d2f40ff88927f20a12178d9bc9e | [] | no_license | jasuil/simple-web | 102ce5995a608ccd3b86018084dbdfe3a2203be0 | 1ee4b61829e54bb21bbc8aa670e4d9b99dbaf647 | refs/heads/master | 2023-01-23T21:46:46.176192 | 2020-12-05T14:23:45 | 2020-12-05T14:23:45 | 314,779,629 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 197 | java | package com.my.jasuil;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class TestDTO implements Serializable {
String body;
List<Integer> idList;
}
| [
"[email protected]"
] | |
cd9a3d67ca3df522ccc60f94b407deda049da44d | df5445f3e18234a630d6e24209d1109c971b1eb0 | /app/src/main/java/com/lk/myproject/toast/ToastUtils.java | 19c0bccba9f3ee97543e3a589c07062da4739428 | [] | no_license | lkang08/MyProject | 87127abb6c41e96553e60c81cf5d9b7ebb1dae13 | 99f4f53e8b0b11400b6193b9ea2de33d847f7e02 | refs/heads/master | 2023-04-08T03:33:48.891897 | 2022-10-26T06:45:12 | 2022-10-26T06:45:12 | 160,916,515 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,826 | java | package com.lk.myproject.toast;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;
import java.lang.reflect.Field;
public class ToastUtils {
private static Field sField_TN;
private static Field sField_TN_Handler;
static {
try {
sField_TN = Toast.class.getDeclaredField("mTN");
sField_TN.setAccessible(true);
sField_TN_Handler = sField_TN.getType().getDeclaredField("mHandler");
sField_TN_Handler.setAccessible(true);
} catch (Exception e) {
}
}
private static void hook(Toast toast) {
try {
Object tn = sField_TN.get(toast);
Handler preHandler = (Handler) sField_TN_Handler.get(tn);
sField_TN_Handler.set(tn, new SafelyHandlerWarpper(preHandler));
} catch (Exception e) {
}
}
public static void showToast(Context context, CharSequence cs, int length) {
Toast toast = Toast.makeText(context, cs, length);
if (checkIfNeedToHack()) {
hook(toast);
}
toast.show();
}
private static boolean checkIfNeedToHack() {
return Build.VERSION.SDK_INT == Build.VERSION_CODES.N_MR1;
}
private static class SafelyHandlerWarpper extends Handler {
private Handler impl;
public SafelyHandlerWarpper(Handler impl) {
this.impl = impl;
}
@Override
public void dispatchMessage(Message msg) {
try {
super.dispatchMessage(msg);
} catch (Exception e) {
}
}
@Override
public void handleMessage(Message msg) {
impl.handleMessage(msg);//需要委托给原Handler执行
}
}
}
| [
"[email protected]"
] | |
10d1be7bbe34cfb68094b4ff535defc9d1b96eb7 | a5d3828507c5abe452c2755183705b76906c5c11 | /day2-eureka-other-service-CB/src/test/java/com/example/demo/Day2EurekaOtherServiceApplicationTests.java | 36cb4790ac529c1de4281e45beddeb1e9d053a6f | [] | no_license | javed97alam/RESTAPI | 95ec61bdaa5fdc6738ed603a09c39adaf98ba2f3 | c6c55caab7a36b70c01e6160a2998d4c75071e17 | refs/heads/master | 2022-09-04T22:12:34.026299 | 2020-05-26T04:49:00 | 2020-05-26T04:49:00 | 266,944,532 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | package com.example.demo;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class Day2EurekaOtherServiceApplicationTests {
@Test
void contextLoads() {
}
}
| [
"[email protected]"
] | |
74e064f07ed21b2df0786d5d906daab64a0e885d | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/JacksonDatabind-103/com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer/BBC-F0-opt-80/7/com/fasterxml/jackson/databind/deser/std/StdKeyDeserializer_ESTest.java | 5071c0bf88b3f2333a0b24b5734d2ad4b03d9c92 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 43,209 | java | /*
* This file was automatically generated by EvoSuite
* Wed Oct 13 14:45:56 GMT 2021
*/
package com.fasterxml.jackson.databind.deser.std;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.filter.FilteringParserDelegate;
import com.fasterxml.jackson.core.filter.TokenFilter;
import com.fasterxml.jackson.core.io.IOContext;
import com.fasterxml.jackson.core.json.UTF8StreamJsonParser;
import com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer;
import com.fasterxml.jackson.core.util.BufferRecycler;
import com.fasterxml.jackson.databind.AnnotationIntrospector;
import com.fasterxml.jackson.databind.DeserializationConfig;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.InjectableValues;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.cfg.BaseSettings;
import com.fasterxml.jackson.databind.cfg.ConfigOverrides;
import com.fasterxml.jackson.databind.cfg.DeserializerFactoryConfig;
import com.fasterxml.jackson.databind.deser.BeanDeserializerFactory;
import com.fasterxml.jackson.databind.deser.DefaultDeserializationContext;
import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer;
import com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer;
import com.fasterxml.jackson.databind.deser.std.UUIDDeserializer;
import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
import com.fasterxml.jackson.databind.introspect.BasicBeanDescription;
import com.fasterxml.jackson.databind.introspect.ClassIntrospector;
import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver;
import com.fasterxml.jackson.databind.jsontype.SubtypeResolver;
import com.fasterxml.jackson.databind.jsontype.TypeIdResolver;
import com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver;
import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider;
import com.fasterxml.jackson.databind.util.EnumResolver;
import com.fasterxml.jackson.databind.util.RootNameLookup;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URI;
import java.net.URL;
import java.nio.CharBuffer;
import java.sql.ClientInfoStatus;
import java.sql.SQLWarning;
import java.time.DayOfWeek;
import java.time.chrono.ChronoLocalDate;
import java.util.Calendar;
import java.util.Currency;
import java.util.Date;
import java.util.Locale;
import java.util.UUID;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.evosuite.runtime.mock.java.util.MockCalendar;
import org.evosuite.runtime.mock.java.util.MockGregorianCalendar;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class StdKeyDeserializer_ESTest extends StdKeyDeserializer_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
Class<Integer> class0 = Integer.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(1142, class0);
Class<?> class1 = stdKeyDeserializer0.getKeyClass();
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class1);
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Object object0 = stdKeyDeserializer_StringKD0.deserializeKey("N|7D$92$9}u", defaultDeserializationContext_Impl0);
assertEquals("N|7D$92$9}u", object0);
}
@Test(timeout = 4000)
public void test01() throws Throwable {
Class<MockCalendar> class0 = MockCalendar.class;
FromStringDeserializer.Std fromStringDeserializer_Std0 = new FromStringDeserializer.Std(class0, 9);
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(9, class0, fromStringDeserializer_Std0);
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test02() throws Throwable {
Class<Boolean> class0 = Boolean.TYPE;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer((-3690), class0);
Class<?> class1 = stdKeyDeserializer0.getKeyClass();
assertEquals(1041, class1.getModifiers());
}
@Test(timeout = 4000)
public void test03() throws Throwable {
Class<ChronoLocalDate> class0 = ChronoLocalDate.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
Class<?> class1 = stdKeyDeserializer_StringKD0.getKeyClass();
assertEquals("interface java.time.chrono.ChronoLocalDate", class1.toString());
assertNotNull(class1);
}
@Test(timeout = 4000)
public void test04() throws Throwable {
Class<DayOfWeek> class0 = DayOfWeek.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
Class<?> class1 = stdKeyDeserializer_StringKD0.getKeyClass();
assertNotNull(class1);
assertEquals(16401, class1.getModifiers());
}
@Test(timeout = 4000)
public void test05() throws Throwable {
Class<Locale> class0 = Locale.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(15, class0);
long long0 = stdKeyDeserializer0._parseLong("3");
assertEquals(3L, long0);
}
@Test(timeout = 4000)
public void test06() throws Throwable {
Class<Short> class0 = Short.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
int int0 = stdKeyDeserializer0._parseInt("+0000");
assertEquals(0, int0);
}
@Test(timeout = 4000)
public void test07() throws Throwable {
Class<Long> class0 = Long.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer((-2930), class0);
int int0 = stdKeyDeserializer0._parseInt("8");
assertEquals(8, int0);
}
@Test(timeout = 4000)
public void test08() throws Throwable {
Class<MockGregorianCalendar> class0 = MockGregorianCalendar.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(17, class0);
double double0 = stdKeyDeserializer0._parseDouble("0");
assertEquals(0.0, double0, 0.01);
}
@Test(timeout = 4000)
public void test09() throws Throwable {
Class<MockCalendar> class0 = MockCalendar.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
double double0 = stdKeyDeserializer_StringKD0._parseDouble("8");
assertEquals(8.0, double0, 0.01);
}
@Test(timeout = 4000)
public void test10() throws Throwable {
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Class<MockCalendar> class0 = MockCalendar.class;
FromStringDeserializer<BasicBeanDescription> fromStringDeserializer0 = (FromStringDeserializer<BasicBeanDescription>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer());
doReturn((Object) null).when(fromStringDeserializer0)._deserialize(anyString() , any(com.fasterxml.jackson.databind.DeserializationContext.class));
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(9, class0, fromStringDeserializer0);
Object object0 = stdKeyDeserializer0._parse("np'$M{{MmK#", defaultDeserializationContext_Impl0);
assertNull(object0);
}
@Test(timeout = 4000)
public void test11() throws Throwable {
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Class<URI> class0 = URI.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
URI uRI0 = (URI)stdKeyDeserializer0._parse("", defaultDeserializationContext_Impl0);
assertEquals((-1), uRI0.getPort());
}
@Test(timeout = 4000)
public void test12() throws Throwable {
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Class<Double> class0 = Double.class;
UUIDDeserializer uUIDDeserializer0 = new UUIDDeserializer();
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(1993, class0, uUIDDeserializer0);
StdSubtypeResolver stdSubtypeResolver0 = new StdSubtypeResolver();
SimpleMixInResolver simpleMixInResolver0 = new SimpleMixInResolver((ClassIntrospector.MixInResolver) null);
RootNameLookup rootNameLookup0 = new RootNameLookup();
ConfigOverrides configOverrides0 = new ConfigOverrides();
DeserializationConfig deserializationConfig0 = new DeserializationConfig((BaseSettings) null, stdSubtypeResolver0, simpleMixInResolver0, rootNameLookup0, configOverrides0);
InjectableValues.Std injectableValues_Std0 = new InjectableValues.Std();
DefaultDeserializationContext defaultDeserializationContext0 = defaultDeserializationContext_Impl0.createInstance(deserializationConfig0, (JsonParser) null, injectableValues_Std0);
// try {
stdKeyDeserializer0.deserializeKey("(was ", defaultDeserializationContext0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// //
// // Cannot deserialize Map key of type `java.lang.Double` from String \"(was \": not a valid representation, problem: (org.evosuite.runtime.mock.java.lang.MockIllegalStateException) Internal error: unknown key type class java.lang.Double
// //
// verifyException("com.fasterxml.jackson.databind.exc.InvalidFormatException", e);
// }
}
@Test(timeout = 4000)
public void test13() throws Throwable {
Class<TypeIdResolver> class0 = TypeIdResolver.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer((-1465), class0);
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
RootNameLookup rootNameLookup0 = new RootNameLookup();
ConfigOverrides configOverrides0 = new ConfigOverrides();
DeserializationConfig deserializationConfig0 = new DeserializationConfig((BaseSettings) null, (SubtypeResolver) null, (SimpleMixInResolver) null, rootNameLookup0, configOverrides0);
BufferRecycler bufferRecycler0 = new BufferRecycler();
IOContext iOContext0 = new IOContext(bufferRecycler0, stdKeyDeserializer0, false);
byte[] byteArray0 = new byte[6];
ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);
JsonFactory jsonFactory0 = new JsonFactory();
ObjectMapper objectMapper0 = new ObjectMapper(jsonFactory0, (DefaultSerializerProvider) null, defaultDeserializationContext_Impl0);
ByteQuadsCanonicalizer byteQuadsCanonicalizer0 = ByteQuadsCanonicalizer.createRoot();
UTF8StreamJsonParser uTF8StreamJsonParser0 = new UTF8StreamJsonParser(iOContext0, 12, byteArrayInputStream0, objectMapper0, byteQuadsCanonicalizer0, byteArray0, (-1465), (-1624887227), false);
TokenFilter tokenFilter0 = TokenFilter.INCLUDE_ALL;
FilteringParserDelegate filteringParserDelegate0 = new FilteringParserDelegate(uTF8StreamJsonParser0, tokenFilter0, true, true);
InjectableValues.Std injectableValues_Std0 = new InjectableValues.Std();
DefaultDeserializationContext defaultDeserializationContext0 = defaultDeserializationContext_Impl0.createInstance(deserializationConfig0, filteringParserDelegate0, injectableValues_Std0);
JsonMappingException jsonMappingException0 = defaultDeserializationContext_Impl0.weirdKeyException(class0, "e;la![e7pIx", (String) null);
SQLWarning sQLWarning0 = new SQLWarning("JSON", jsonMappingException0);
// try {
stdKeyDeserializer0._weirdKey(defaultDeserializationContext0, (String) null, sQLWarning0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// //
// // Cannot deserialize Map key of type `com.fasterxml.jackson.databind.jsontype.TypeIdResolver` from String [N/A]: problem: JSON
// // at [Source: UNKNOWN; line: 1, column: 0]
// //
// verifyException("com.fasterxml.jackson.databind.exc.InvalidFormatException", e);
// }
}
@Test(timeout = 4000)
public void test14() throws Throwable {
Class<Double> class0 = Double.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(0, class0);
// try {
stdKeyDeserializer0._parseInt("fDqfXjQf");
// fail("Expecting exception: NumberFormatException");
// } catch(NumberFormatException e) {
// //
// // For input string: \"fDqfXjQf\"
// //
// verifyException("java.lang.NumberFormatException", e);
// }
}
@Test(timeout = 4000)
public void test15() throws Throwable {
Class<Currency> class0 = Currency.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
// Undeclared exception!
// try {
stdKeyDeserializer0._parseDouble((String) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// }
}
@Test(timeout = 4000)
public void test16() throws Throwable {
Class<Boolean> class0 = Boolean.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
StdSubtypeResolver stdSubtypeResolver0 = new StdSubtypeResolver();
SimpleMixInResolver simpleMixInResolver0 = new SimpleMixInResolver((ClassIntrospector.MixInResolver) null);
RootNameLookup rootNameLookup0 = new RootNameLookup();
ConfigOverrides configOverrides0 = new ConfigOverrides();
DeserializationConfig deserializationConfig0 = new DeserializationConfig((BaseSettings) null, stdSubtypeResolver0, simpleMixInResolver0, rootNameLookup0, configOverrides0);
InjectableValues.Std injectableValues_Std0 = new InjectableValues.Std();
DefaultDeserializationContext defaultDeserializationContext0 = defaultDeserializationContext_Impl0.createInstance(deserializationConfig0, (JsonParser) null, injectableValues_Std0);
// try {
stdKeyDeserializer0._parse("Missing method (broken JDK (de)serialization?)", defaultDeserializationContext0);
// fail("Expecting exception: IOException");
// } catch(IOException e) {
// //
// // Cannot deserialize Map key of type `java.lang.Boolean` from String \"Missing method (broken JDK (de)serialization?)\": value not 'true' or 'false'
// //
// verifyException("com.fasterxml.jackson.databind.exc.InvalidFormatException", e);
// }
}
@Test(timeout = 4000)
public void test17() throws Throwable {
Class<Object> class0 = Object.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
assertEquals(13, StdKeyDeserializer.TYPE_URI);
}
@Test(timeout = 4000)
public void test18() throws Throwable {
Class<String> class0 = String.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
assertEquals(17, StdKeyDeserializer.TYPE_BYTE_ARRAY);
}
@Test(timeout = 4000)
public void test19() throws Throwable {
Class<ClientInfoStatus> class0 = ClientInfoStatus.class;
AnnotationIntrospector annotationIntrospector0 = AnnotationIntrospector.nopInstance();
EnumResolver enumResolver0 = EnumResolver.constructUnsafeUsingToString(class0, annotationIntrospector0);
StdKeyDeserializer.EnumKD stdKeyDeserializer_EnumKD0 = new StdKeyDeserializer.EnumKD(enumResolver0, (AnnotatedMethod) null);
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer_EnumKD0.deserializeKey("#5Pa\"5mcwj+@", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test20() throws Throwable {
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Class<UUID> class0 = UUID.class;
StdKeyDeserializer.DelegatingKD stdKeyDeserializer_DelegatingKD0 = new StdKeyDeserializer.DelegatingKD(class0, (JsonDeserializer<?>) null);
Object object0 = stdKeyDeserializer_DelegatingKD0.deserializeKey((String) null, defaultDeserializationContext_Impl0);
assertNull(object0);
}
@Test(timeout = 4000)
public void test21() throws Throwable {
Class<MockCalendar> class0 = MockCalendar.class;
StdKeyDeserializer.DelegatingKD stdKeyDeserializer_DelegatingKD0 = new StdKeyDeserializer.DelegatingKD(class0, (JsonDeserializer<?>) null);
// Undeclared exception!
// try {
stdKeyDeserializer_DelegatingKD0.deserializeKey("", (DeserializationContext) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$DelegatingKD", e);
// }
}
@Test(timeout = 4000)
public void test22() throws Throwable {
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Class<Character> class0 = Character.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("(was ", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test23() throws Throwable {
Class<Byte> class0 = Byte.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
// try {
stdKeyDeserializer0._parse("448", (DeserializationContext) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test24() throws Throwable {
Class<Boolean> class0 = Boolean.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Object object0 = stdKeyDeserializer0.deserializeKey("true", defaultDeserializationContext_Impl0);
assertEquals(true, object0);
}
@Test(timeout = 4000)
public void test25() throws Throwable {
Class<CharBuffer> class0 = CharBuffer.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// try {
stdKeyDeserializer_StringKD0._parse("USE_ANNOTATIONS", defaultDeserializationContext_Impl0);
// fail("Expecting exception: IllegalStateException");
// } catch(IllegalStateException e) {
// //
// // Internal error: unknown key type class java.nio.CharBuffer
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test26() throws Throwable {
Class<MockGregorianCalendar> class0 = MockGregorianCalendar.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(17, class0);
// try {
stdKeyDeserializer0._parse("~", (DeserializationContext) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test27() throws Throwable {
Class<Boolean> class0 = Boolean.class;
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(15, class0, (FromStringDeserializer<?>) null);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("true", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test28() throws Throwable {
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Class<Integer> class0 = Integer.class;
FromStringDeserializer<String> fromStringDeserializer0 = (FromStringDeserializer<String>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer());
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(13, class0, fromStringDeserializer0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("T &x'GuvuFp_|", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test29() throws Throwable {
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Class<UUID> class0 = UUID.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
UUID uUID0 = (UUID)stdKeyDeserializer0.deserializeKey("ec*h<EEKkOW%,AG", defaultDeserializationContext_Impl0);
assertEquals(16793600L, uUID0.getMostSignificantBits());
}
@Test(timeout = 4000)
public void test30() throws Throwable {
Class<URL> class0 = URL.class;
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(10, class0, (FromStringDeserializer<?>) null);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringKD", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test31() throws Throwable {
Class<Locale> class0 = Locale.class;
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
FromStringDeserializer<Byte> fromStringDeserializer0 = (FromStringDeserializer<Byte>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer());
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(7, class0, fromStringDeserializer0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("jyRV@lGv|G7id$O!N", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test32() throws Throwable {
Class<Boolean> class0 = Boolean.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
Object object0 = stdKeyDeserializer0.deserializeKey("false", (DeserializationContext) null);
assertEquals(false, object0);
}
@Test(timeout = 4000)
public void test33() throws Throwable {
Class<MockCalendar> class0 = MockCalendar.class;
FromStringDeserializer<BasicBeanDescription> fromStringDeserializer0 = (FromStringDeserializer<BasicBeanDescription>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer());
doReturn((Object) null).when(fromStringDeserializer0)._deserialize(anyString() , any(com.fasterxml.jackson.databind.DeserializationContext.class));
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(9, class0, fromStringDeserializer0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("com.fasterxml.jackson.databind.deser.std.TokenBufferDeserializer", (DeserializationContext) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test34() throws Throwable {
Class<ClientInfoStatus> class0 = ClientInfoStatus.class;
FromStringDeserializer<JsonDeserializer<UUID>> fromStringDeserializer0 = (FromStringDeserializer<JsonDeserializer<UUID>>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer());
doReturn((Object) null).when(fromStringDeserializer0)._deserialize(anyString() , any(com.fasterxml.jackson.databind.DeserializationContext.class));
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(9, class0, fromStringDeserializer0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("LONG", (DeserializationContext) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test35() throws Throwable {
Class<Integer> class0 = Integer.class;
StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(1142, class0);
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
Object object0 = stdKeyDeserializer0.deserializeKey((String) null, defaultDeserializationContext_Impl0);
assertNull(object0);
}
@Test(timeout = 4000)
public void test36() throws Throwable {
Class<Currency> class0 = Currency.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("SP'iAb_HQ[\"^", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test37() throws Throwable {
Class<Locale> class0 = Locale.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
long long0 = stdKeyDeserializer0._parseLong("+0000");
assertEquals(0L, long0);
}
@Test(timeout = 4000)
public void test38() throws Throwable {
Class<URL> class0 = URL.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// try {
stdKeyDeserializer0._parse("false", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test39() throws Throwable {
Class<Double> class0 = Double.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("$Xc=zxDz2BE8iO;-]e", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test40() throws Throwable {
Class<Float> class0 = Float.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertEquals(6, StdKeyDeserializer.TYPE_LONG);
}
@Test(timeout = 4000)
public void test41() throws Throwable {
Class<Short> class0 = Short.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertNotNull(stdKeyDeserializer0);
Object object0 = stdKeyDeserializer0.deserializeKey("48", (DeserializationContext) null);
assertNotNull(object0);
assertEquals((short)48, object0);
}
@Test(timeout = 4000)
public void test42() throws Throwable {
Class<Character> class0 = Character.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertNotNull(stdKeyDeserializer0);
Object object0 = stdKeyDeserializer0.deserializeKey("8", (DeserializationContext) null);
assertEquals('8', object0);
assertNotNull(object0);
}
@Test(timeout = 4000)
public void test43() throws Throwable {
Class<Byte> class0 = Byte.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertNotNull(stdKeyDeserializer0);
Object object0 = stdKeyDeserializer0.deserializeKey("48", (DeserializationContext) null);
assertEquals((byte)48, object0);
}
@Test(timeout = 4000)
public void test44() throws Throwable {
Class<CharBuffer> class0 = CharBuffer.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertNull(stdKeyDeserializer0);
}
@Test(timeout = 4000)
public void test45() throws Throwable {
Class<Calendar> class0 = Calendar.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance;
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("alue not 'true' or alse'", defaultDeserializationContext_Impl0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.DeserializationContext", e);
// }
}
@Test(timeout = 4000)
public void test46() throws Throwable {
Class<Date> class0 = Date.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertEquals(13, StdKeyDeserializer.TYPE_URI);
}
@Test(timeout = 4000)
public void test47() throws Throwable {
Class<Long> class0 = Long.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
// Undeclared exception!
// try {
stdKeyDeserializer0.deserializeKey("/r+N#Bl5ulA", (DeserializationContext) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test48() throws Throwable {
Class<Object> class0 = Object.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertEquals(6, StdKeyDeserializer.TYPE_LONG);
}
@Test(timeout = 4000)
public void test49() throws Throwable {
Class<String> class0 = String.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
assertEquals(3, StdKeyDeserializer.TYPE_SHORT);
}
@Test(timeout = 4000)
public void test50() throws Throwable {
StdKeyDeserializer.StringFactoryKeyDeserializer stdKeyDeserializer_StringFactoryKeyDeserializer0 = null;
// try {
stdKeyDeserializer_StringFactoryKeyDeserializer0 = new StdKeyDeserializer.StringFactoryKeyDeserializer((Method) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringFactoryKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test51() throws Throwable {
StdKeyDeserializer.StringCtorKeyDeserializer stdKeyDeserializer_StringCtorKeyDeserializer0 = null;
// try {
stdKeyDeserializer_StringCtorKeyDeserializer0 = new StdKeyDeserializer.StringCtorKeyDeserializer((Constructor<?>) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringCtorKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test52() throws Throwable {
Class<Boolean> class0 = Boolean.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
// try {
stdKeyDeserializer0._parseDouble("Ow|)&-Zxt?%_u");
// fail("Expecting exception: NumberFormatException");
// } catch(NumberFormatException e) {
// }
}
@Test(timeout = 4000)
public void test53() throws Throwable {
Class<Integer> class0 = Integer.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
// try {
stdKeyDeserializer_StringKD0._parseLong("known type ids = ");
// fail("Expecting exception: NumberFormatException");
// } catch(NumberFormatException e) {
// //
// // For input string: \"known type ids = \"
// //
// verifyException("java.lang.NumberFormatException", e);
// }
}
@Test(timeout = 4000)
public void test54() throws Throwable {
Class<Integer> class0 = Integer.class;
StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0);
// try {
stdKeyDeserializer0._parse("not one of values excepted for Enum class: %s", (DeserializationContext) null);
// fail("Expecting exception: NumberFormatException");
// } catch(NumberFormatException e) {
// //
// // For input string: \"not one of values excepted for Enum class: %s\"
// //
// verifyException("java.lang.NumberFormatException", e);
// }
}
@Test(timeout = 4000)
public void test55() throws Throwable {
Class<Locale> class0 = Locale.class;
StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0);
DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig();
BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0);
DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0);
// Undeclared exception!
// try {
stdKeyDeserializer_StringKD0._weirdKey(defaultDeserializationContext_Impl0, "G ^2r7iv(|lu", (Exception) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e);
// }
}
@Test(timeout = 4000)
public void test56() throws Throwable {
Class<Integer> class0 = Integer.class;
JsonDeserializer<Double> jsonDeserializer0 = (JsonDeserializer<Double>) mock(JsonDeserializer.class, new ViolatedAssumptionAnswer());
StdKeyDeserializer.DelegatingKD stdKeyDeserializer_DelegatingKD0 = new StdKeyDeserializer.DelegatingKD(class0, jsonDeserializer0);
Class<?> class1 = stdKeyDeserializer_DelegatingKD0.getKeyClass();
assertFalse(class1.isPrimitive());
}
}
| [
"[email protected]"
] | |
d010a1e07dff328e8d677dd89179896024c1c0f3 | c6aa4489dca8d2c7bf0e6763cc4db97e5bee2f6a | /app/src/test/java/fiveguys/com/wishcraftapp/ExampleUnitTest.java | 661b5601887b9354e8cff159d835d3bff04294e8 | [] | no_license | danmenjivar/wishcraft | 90c557a5678b270fe6a410182bd8b94187502868 | dc85de9a6e474e5da6ea6d07883ed39d08892b1c | refs/heads/master | 2022-01-15T06:06:05.403427 | 2019-05-04T16:21:30 | 2019-05-04T16:21:30 | 173,834,763 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | package fiveguys.com.wishcraftapp;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"[email protected]"
] | |
3ee2be11497d9f692dbc213b948c2a314f91ba22 | d4cb159a3425fe150f6cdf8a1936602ce9557426 | /app/src/main/java/polinema/ac/id/starterchapter05/activities/PraktikumActivity.java | 83091eab31516ae6ce9388a17f60c33c6923968d | [] | no_license | wahidhidayat/2019-mobile05 | 6eaeadfa58ce0655b04b0bd4eb786e5fafa3593b | 4fc72a520c569e76af5bdf0dcef4d7f5a549ff81 | refs/heads/master | 2020-07-31T14:18:50.455319 | 2019-10-02T16:53:15 | 2019-10-02T16:53:15 | 210,631,664 | 0 | 0 | null | 2019-09-24T15:11:35 | 2019-09-24T15:06:08 | null | UTF-8 | Java | false | false | 2,172 | java | package polinema.ac.id.starterchapter05.activities;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction;
import polinema.ac.id.starterchapter05.R;
import polinema.ac.id.starterchapter05.fragments.DipsFragment;
import polinema.ac.id.starterchapter05.fragments.HandstandFragment;
import polinema.ac.id.starterchapter05.fragments.PushupsFragment;
public class PraktikumActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_praktikum);
}
public void handleClickPushupsFragment(View view) {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.setCustomAnimations(R.anim.enter_from_left, R.anim.exit_from_left, R.anim.enter_from_left, R.anim.exit_from_right);
fragmentTransaction.replace(R.id.dynamic_fragment_placeholder,new PushupsFragment(),"RED_FRAGMENT");
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
}
public void handleClickDips(View view) {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.setCustomAnimations(R.anim.enter_from_left, R.anim.exit_from_left, R.anim.enter_from_left, R.anim.exit_from_right);
fragmentTransaction.replace(R.id.dynamic_fragment_placeholder,new DipsFragment(),"RED_FRAGMENT");
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
}
public void handleClickHandstand(View view) {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.setCustomAnimations(R.anim.enter_from_left, R.anim.exit_from_left, R.anim.enter_from_left, R.anim.exit_from_right);
fragmentTransaction.replace(R.id.dynamic_fragment_placeholder,new HandstandFragment(),"RED_FRAGMENT");
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
}
}
| [
"[email protected]"
] | |
d9f21a58581a964ff052a58cd7132382ba8a7cda | facf457a8b5379b86fb539d4d55bbf880f6d4820 | /app/src/main/java/com/example/gcrea/User.java | e834944e624a18ec3e501692eaf28ce119363596 | [] | no_license | ECLegend10/GCREA | 450b2a39d2d2cca577d69a85f4b208d9d5277082 | f82be6b44b1f003f054460ab5e7b03ede09a9751 | refs/heads/main | 2023-02-01T18:44:33.795468 | 2020-12-17T16:15:35 | 2020-12-17T16:15:35 | 322,347,097 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,818 | java | package com.example.gcrea;
import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;
public class User implements Parcelable {
private int id;
private String name;
private String idNo;
private String role;
private String position;
private String course;
private String email;
private String contactNo;
private String dateJoined;
private int points;
private Bitmap profilePic;
public User(String name, String idNo, String role, String position, String course, String email, String contactNo, String dateJoined, int points, Bitmap profilePic) {
this.id = 0;
this.name = name;
this.idNo = idNo;
this.role = role;
this.position = position;
this.course = course;
this.email = email;
this.contactNo = contactNo;
this.dateJoined = dateJoined;
this.points = points;
this.profilePic = profilePic;
}
protected User(Parcel in) {
id = in.readInt();
name = in.readString();
idNo = in.readString();
role = in.readString();
position = in.readString();
course = in.readString();
email = in.readString();
contactNo = in.readString();
dateJoined = in.readString();
points = in.readInt();
//profilePic = in.readParcelable(Bitmap.class.getClassLoader());
}
public static final Creator<User> CREATOR = new Creator<User>() {
@Override
public User createFromParcel(Parcel in) {
return new User(in);
}
@Override
public User[] newArray(int size) {
return new User[size];
}
};
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getCourse() {
return course;
}
public void setCourse(String course) {
this.course = course;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getContactNo() {
return contactNo;
}
public void setContactNo(String contactNo) {
this.contactNo = contactNo;
}
public String getDateJoined() {
return dateJoined;
}
public void setDateJoined(String dateJoined) {
this.dateJoined = dateJoined;
}
public int getPoints() {
return points;
}
public void setPoints(int points) {
this.points = points;
}
public Bitmap getProfilePic() {
return profilePic;
}
public void setProfilePic(Bitmap profilePic) {
this.profilePic = profilePic;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(id);
parcel.writeString(name);
parcel.writeString(idNo);
parcel.writeString(role);
parcel.writeString(position);
parcel.writeString(course);
parcel.writeString(email);
parcel.writeString(contactNo);
parcel.writeString(dateJoined);
parcel.writeInt(points);
//parcel.writeParcelable(profilePic, i);
}
}
| [
"[email protected]"
] | |
e78854051e4b6c9a67df1640777a926619fa988b | a3a6d183f4181d840e284cbc875d923eefd2c101 | /tool/bundles/org.openetcs.pror.tracing.sysml/src/org/openetcs/pror/tracing/sysml/PapyrusHandler.java | a57efdff660c09bb34446fe899062ed2e1aa6db5 | [] | no_license | hendrickhan/toolchain | 67963e7da33b5830867eab472698684b9ea06bd3 | 2b5f03446082ad310239d8f6d5e680bf748c832c | refs/heads/master | 2021-04-30T06:08:59.233858 | 2016-01-03T21:24:15 | 2016-01-03T21:24:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,104 | java | /**
* Copyright 2014 Formal Mind GmbH & CEA list
*
* Licensed under the European Union Public Licence (EUPL), Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://joinup.ec.europa.eu/software/page/eupl/licence-eupl
*
* 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.
*
* Contributors:
* Michael Jastram, formal Mind Gmbh - initial API and implementation
* Patrick Tessier, CEA list - SysML & Papyrus proxy action
* Matthieu Perin, CEA list - SysML & Papyrus proxy action
*/
package org.openetcs.pror.tracing.sysml;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
import org.eclipse.rmf.reqif10.SpecObject;
import org.eclipse.rmf.reqif10.SpecRelation;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
import org.openetcs.pror.tracing.util.ProxyListener;
public class PapyrusHandler implements ProxyListener {
protected static final String PROXY_PACKAGE_NAME = "ProxyRequirement";
String PREFIX_MESSAGE = "SysML Proxy code :";
public void proxyCreatedFor(final SpecObject requirement, final SpecRelation trace,
EObject element) {
//test inputs correctness
if (requirement == null){
System.out.println(PREFIX_MESSAGE+"Incorrect given requirement");
return;
//no action taken
}
if (trace == null) {
System.out.println(PREFIX_MESSAGE+"Incorrect given relation");
return;
// no action taken
}
if (!(element instanceof Element)) {
System.out.println(PREFIX_MESSAGE+"Incorrect given element");
return;
// no action taken
}
final Element UmlElement = (Element)element;
TransactionalEditingDomain tempDomain = null;
try {
tempDomain = ServiceUtilsForEObject.getInstance().getTransactionalEditingDomain(UmlElement);
} catch (ServiceException e) {
System.err.println(e);
}
//test for the domain
if (null == tempDomain){
System.out.println(PREFIX_MESSAGE+"Editing Domain is null");
return;
//no action taken
}
final TransactionalEditingDomain domain = tempDomain;
//open a command do allow undo of all command in one undo
RecordingCommand CompleteCMD = new RecordingCommand(domain) {
protected void doExecute() {
//get top package
org.eclipse.uml2.uml.Package topPackage = UmlElement.getNearestPackage();
while (topPackage.getOwner() instanceof Package){
topPackage = (Package)topPackage.getOwner();
//recursively take nearest package until reaching the top
}
final org.eclipse.uml2.uml.Package finalTopPackage = topPackage;
//test the presence of the "ProxyRequirement" Package
Package proxyPackage = (Package)topPackage.getPackagedElement(PROXY_PACKAGE_NAME);
//test if already present, if not need creation
if (proxyPackage == null){
//means that the package have to be created
RecordingCommand PackCMD = new RecordingCommand(domain) {
@Override
protected void doExecute() {
org.eclipse.uml2.uml.Package tempPackage = UMLFactory.eINSTANCE.createPackage();
tempPackage.setName(PROXY_PACKAGE_NAME);
finalTopPackage.getPackagedElements().add(tempPackage);
}
};
domain.getCommandStack().execute(PackCMD);
}
final Package finalProxyPackage = (Package)topPackage.getPackagedElement(PROXY_PACKAGE_NAME);
RecordingCommand ReqCMD = new RequirementCreateCommand(domain, finalProxyPackage, requirement.getIdentifier(), requirement.getDesc());
domain.getCommandStack().execute(ReqCMD);
org.eclipse.uml2.uml.Class proxyreq = (org.eclipse.uml2.uml.Class)finalProxyPackage.getPackagedElement(requirement.getIdentifier());
RecordingCommand SatCMD = new SatisfyCreateCommand(domain, (NamedElement)UmlElement, (NamedElement)proxyreq, trace.getIdentifier());
domain.getCommandStack().execute(SatCMD);
System.out.println("Link between");
System.out.println(" Requirement: " + requirement);
System.out.println(" via: " + trace);
System.out.println(" UML Element : " + UmlElement);
System.out.println("Proxy Req ID: " + requirement.getIdentifier());
System.out.println("Proxy Req Text: " + requirement.getDesc());
System.out.println("Proxy Satisfy Link ID: " + trace.getIdentifier());
}
};
//execute the complete command
domain.getCommandStack().execute(CompleteCMD);
}
}
| [
"[email protected]"
] | |
1e2245dbc07fee21697c7018062f4703a2993074 | 589814bd475bd9816c6c1ea8f53d65337b7edc83 | /yien_mall_web/src/main/java/com/zsl/web/config/scheduler/AutowiringSpringBeanJobFactory.java | 3c790da562dabc242b1d6a567ee87296e23c02b0 | [] | no_license | zslzxy/gradution | d45f3b2f6911fd6e34bc5a6a7e787255789d081e | 9ae89efc1c3c3709026094cd58ad564af6925418 | refs/heads/master | 2020-04-23T08:03:53.270951 | 2019-02-16T16:30:06 | 2019-02-16T16:30:06 | 171,024,944 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 907 | java | package com.zsl.web.config.scheduler;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
public final class AutowiringSpringBeanJobFactory extends SpringBeanJobFactory implements ApplicationContextAware {
private transient AutowireCapableBeanFactory autowireCapablebeanFactory;
@Override public void setApplicationContext(final ApplicationContext context) {
autowireCapablebeanFactory = context.getAutowireCapableBeanFactory();
}
@Override protected Object createJobInstance(final TriggerFiredBundle bundle) throws Exception {
final Object job = super.createJobInstance(bundle);
autowireCapablebeanFactory.autowireBean(job);
return job;
}
} | [
"[email protected]"
] | |
9bd2e08b09e3715f0af4292d1a13447d75c2d1e9 | a25d293377b996535c946eeafb94c6c9c6054c99 | /src/main/java/com/hutool/HotoolTest2.java | 5ed2de18bf9c1d70fa5d93fbc578d4e31b70667f | [
"Apache-2.0"
] | permissive | bowen0801/java8demo | 431e24c04b5fd5971294a823a8a1b089031bc95e | a2f9c019abb6a88da7290a55fb369a597fcd9ab4 | refs/heads/master | 2023-07-25T21:06:21.976560 | 2023-07-19T02:53:35 | 2023-07-19T02:53:35 | 192,446,253 | 0 | 0 | Apache-2.0 | 2023-02-17T02:11:08 | 2019-06-18T01:54:11 | Java | UTF-8 | Java | false | false | 110 | java | package com.hutool;
public class HotoolTest2 {
public static void main(String[] args) {
}
}
| [
"[email protected]"
] | |
95cbc78b59bb8fa17f39969aaed302c60159acfc | 64b1c7a00a01790a70a3c1a44175c2f474c4dca5 | /app/src/main/java/ykk/cb/com/zcws/basics/StockPos_DialogActivity.java | 607622f6cf809a7a9c422ec58a74b728311f0f52 | [] | no_license | Consheng/zcws | 89622e64d5ee2c8ecc1b9cb0c011ff97a1ad8130 | 45774b88d0f81d4800c4f4c3a4b4b5c2dca1e942 | refs/heads/master | 2023-07-13T02:46:17.579716 | 2021-08-23T02:40:43 | 2021-08-23T02:40:43 | 397,836,231 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,627 | java | package ykk.cb.com.zcws.basics;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.FormBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import ykk.cb.com.zcws.R;
import ykk.cb.com.zcws.basics.adapter.StockPos_DialogAdapter;
import ykk.cb.com.zcws.bean.StockPosition;
import ykk.cb.com.zcws.comm.BaseDialogActivity;
import ykk.cb.com.zcws.util.JsonUtil;
import ykk.cb.com.zcws.util.basehelper.BaseRecyclerAdapter;
import ykk.cb.com.zcws.util.xrecyclerview.XRecyclerView;
/**
* 选择库位dialog
*/
public class StockPos_DialogActivity extends BaseDialogActivity implements XRecyclerView.LoadingListener {
@BindView(R.id.btn_close)
Button btnClose;
@BindView(R.id.xRecyclerView)
XRecyclerView xRecyclerView;
@BindView(R.id.et_search)
EditText etSearch;
@BindView(R.id.btn_search)
Button btnSearch;
private StockPos_DialogActivity context = this;
private static final int SUCC1 = 200, UNSUCC1 = 501;
private List<StockPosition> listDatas = new ArrayList<>();
private StockPos_DialogAdapter mAdapter;
private OkHttpClient okHttpClient = new OkHttpClient();
private int fspGroupId; // 仓位组id
private int limit = 1;
private boolean isRefresh, isLoadMore, isNextPage;
private String accountType; // 账号类型(DS:电商,SC:生产)
// 消息处理
private MyHandler mHandler = new MyHandler(this);
private static class MyHandler extends Handler {
private final WeakReference<StockPos_DialogActivity> mActivity;
public MyHandler(StockPos_DialogActivity activity) {
mActivity = new WeakReference<StockPos_DialogActivity>(activity);
}
public void handleMessage(Message msg) {
StockPos_DialogActivity m = mActivity.get();
if (m != null) {
m.hideLoadDialog();
switch (msg.what) {
case SUCC1: // 成功
List<StockPosition> list = JsonUtil.strToList2((String) msg.obj, StockPosition.class);
m.listDatas.addAll(list);
m.mAdapter.notifyDataSetChanged();
if (m.isRefresh) {
m.xRecyclerView.refreshComplete(true);
} else if (m.isLoadMore) {
m.xRecyclerView.loadMoreComplete(true);
}
m.xRecyclerView.setLoadingMoreEnabled(m.isNextPage);
break;
case UNSUCC1: // 数据加载失败!
m.mAdapter.notifyDataSetChanged();
m.toasts("抱歉,没有加载到数据!");
break;
}
}
}
}
@Override
public int setLayoutResID() {
return R.layout.ab_stock_pos_dialog;
}
@Override
public void initView() {
xRecyclerView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
xRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mAdapter = new StockPos_DialogAdapter(context, listDatas);
xRecyclerView.setAdapter(mAdapter);
xRecyclerView.setLoadingListener(context);
xRecyclerView.setPullRefreshEnabled(false); // 上啦刷新禁用
xRecyclerView.setLoadingMoreEnabled(false); // 不显示下拉刷新的view
mAdapter.setOnItemClickListener(new BaseRecyclerAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseRecyclerAdapter adapter, BaseRecyclerAdapter.RecyclerHolder holder, View view, int pos) {
StockPosition m = listDatas.get(pos-1);
Intent intent = new Intent();
intent.putExtra("obj", m);
context.setResult(RESULT_OK, intent);
context.finish();
}
});
}
@Override
public void initData() {
bundle();
initLoadDatas();
}
private void bundle() {
Bundle bundle = context.getIntent().getExtras();
if (bundle != null) {
fspGroupId = bundle.getInt("fspGroupId");
accountType = bundle.getString("accountType");
}
}
// 监听事件
@OnClick({R.id.btn_close, R.id.btn_search})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.btn_close:
closeHandler(mHandler);
context.finish();
break;
case R.id.btn_search:
initLoadDatas();
break;
}
}
private void initLoadDatas() {
limit = 1;
listDatas.clear();
run_okhttpDatas();
}
/**
* 通过okhttp加载数据
*/
private void run_okhttpDatas() {
showLoadDialog("加载中...",false);
String mUrl = getURL("stockPosition/findStockPositionListByParam");
FormBody formBody = new FormBody.Builder()
.add("fnumberOrName", getValues(etSearch).trim())
.add("fspGroupId", String.valueOf(fspGroupId))
.add("accountType", isNULL2(accountType, "ZH"))
.add("limit", String.valueOf(limit))
.add("pageSize", "30")
.build();
Request request = new Request.Builder()
.addHeader("cookie", getSession())
.url(mUrl)
.post(formBody)
.build();
Call call = okHttpClient.newCall(request);
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
mHandler.sendEmptyMessage(UNSUCC1);
}
@Override
public void onResponse(Call call, Response response) throws IOException {
ResponseBody body = response.body();
String result = body.string();
if (!JsonUtil.isSuccess(result)) {
mHandler.sendEmptyMessage(UNSUCC1);
return;
}
isNextPage = JsonUtil.isNextPage(result);
Message msg = mHandler.obtainMessage(SUCC1, result);
Log.e("StockPos_DialogActivity --> onResponse", result);
mHandler.sendMessage(msg);
}
});
}
@Override
public void onRefresh() {
isRefresh = true;
isLoadMore = false;
initLoadDatas();
}
@Override
public void onLoadMore() {
isRefresh = false;
isLoadMore = true;
limit += 1;
run_okhttpDatas();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
closeHandler(mHandler);
context.finish();
}
return false;
}
@Override
protected void onDestroy() {
closeHandler(mHandler);
super.onDestroy();
}
}
| [
"[email protected]"
] | |
196779d2dade9a264d6cee94a049c36f39926de7 | 0a94e4bb6bdf5c54ebba25cecafa72215266843a | /4.JavaCollections/src/com/javarush/task/task34/task3404/Solution.java | b9abfc8c1d1cc206ba12b792f2e4c76c43a9d9fa | [] | no_license | Senat77/JavaRush | 8d8fb6e59375656a545825585118febd2e1637f4 | 68dc0139da96617ebcad967331dcd24f9875d8ee | refs/heads/master | 2020-05-19T18:50:31.534629 | 2018-09-25T14:00:31 | 2018-09-25T14:00:31 | 185,160,609 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,329 | java | package com.javarush.task.task34.task3404;
/*
Рекурсия для мат. выражения
На вход подается строка - математическое выражение.
Выражение включает целые и дробные числа, скобки (), пробелы, знак отрицания -, возведение в степень ^, sin(x),
cos(x), tan(x)
Для sin(x), cos(x), tan(x) выражение внутри скобок считать градусами, например, cos(3 + 19*3)=0.5
Степень задается так: a^(1+3) и так a^4, что эквивалентно a*a*a*a.
С помощью рекурсии вычислить выражение и количество математических операций. Вывести через пробел результат в консоль.
Результат выводить с точностью до двух знаков, для 0.33333 вывести 0.33, использовать стандартный принцип округления.
Знак отрицания перед числом также считать математической операцией.
Не создавай в классе Solution дополнительные поля.
Не пиши косвенную рекурсию.
Пример, состоящий из операций sin * - + * +:
sin(2*(-5+1.5*4)+28)
Результат:
0.5 6
Пример, состоящий из операций tan ^:
tan(2025 ^ 0.5)
Результат:
1 2
Требования:
1. В классе Solution не должны быть созданы дополнительные поля.
2. Метод recursion должен выводить на экран результат вычисления заданного выражения (пример в условии).
3. Метод recursion не должен быть статическим.
*/
public class Solution
{
public static void main(String[] args)
{
Solution solution = new Solution();
solution.recursion("sin(2*(-5+1.5*4)+28)", 0); //expected output 0.5 6
}
public void recursion(final String expression, int countOperation)
{
//implement
}
public Solution()
{
//don't delete
}
}
| [
"[email protected]"
] | |
71ff84cc0cb57358c62b0839b2881e9bebbf1bce | 6d4dffb95cae2f430c7f492c640df64256aea21a | /eclipse-workspace/oop1/src/oop1/SecondDegreeEquation.java | 222b1a9d8afab56bab48a83e13f4691e87ad86d2 | [] | no_license | fonqhoanq/OOP_graph_algorithms | 0243167e3eafc48c15e15ab4261015573584a51b | 43ee12c5f9fff2d6a5c68eabfe6e405a99e6cc4e | refs/heads/master | 2023-07-17T22:38:43.040660 | 2021-08-24T02:12:36 | 2021-08-24T02:12:36 | 399,302,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 720 | java | package oop1;
public class SecondDegreeEquation {
private int a,b,c;
private int delta;
public int getA() {
return this.a;
}
public int getB() {
return this.b;
}
public int getC() {
return this.c;
}
public void setA(int a) {
this.a = a;
}
public void setB(int b) {
this.b = b;
}
public void setC(int c) {
this.c = c;
}
public String resolve() {
delta = b*b - 4*a*c ;
if (delta == 0) {
return ("phuong trinh co nghiem kep : " + (double) -b/(2*a));
}
else if (delta < 0 ) {
return ("phuong trinh vo nghiem");
}
else {
return ("phuong trinh co hai nghiem phan biet :" +(double) (b*(-1) + Math.sqrt(delta))/2*a + "va" + (double) (b*(-1) - Math.sqrt(delta))/2*a );
}
}
}
| [
"[email protected]"
] | |
d5ea3b314a408b1d0284a712dcf452e731c48488 | 4265158cc0df314ee3829e8cce08bc91db6d19b9 | /ProiectIPB7/back-end/model/scheduling/Timetable.java | b9a7beb2a0d09c2a7ec57bb1826767327098be24 | [] | no_license | andreia7fedeles/ProiectIPB7 | 5a46dabbbc93ab066e812f7b9f4cb5a21edab223 | e795c84ae16b4ca5f4a7894dc3cceb80ef7c8668 | refs/heads/master | 2021-01-20T15:44:21.260317 | 2017-05-09T16:12:18 | 2017-05-09T16:12:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 836 | java | package model.scheduling;
import model.scheduling.Hearing;
import java.util.Vector;
public class Timetable {
private Vector<Hearing> hearings;
// TODO Add any other necessary data members(might be complete, need to consult)
public Timetable() {
this.hearings = new Vector<>();
}
public Timetable(Vector<Hearing> hearings) {
this.hearings = hearings;
}
// TODO Add any other necessary constructors(might be complete, need to consult)
// TODO Add any other necessary methods(might be complete, need to consult)
public Vector<Hearing> getHearings() {
return hearings;
}
public void setHearings(Vector<Hearing> hearings) {
this.hearings = hearings;
}
// TODO Add any other necessary data members(might be complete, need to consult)
}
| [
"[email protected]"
] | |
f55d43b474eb3348cccd1c237607a0243ef73ec0 | e40139ea43efd993d5add4f2a947cb07c61d229c | /src/main/java/com/b2w/starwarsapi/configurations/SwaggerConfiguration.java | c2f0f33e01dfaa9c9b646fd72355a51fbe5a0d5b | [] | no_license | marcusleandro/starwarsapi | 2ed8cc981b2b3f46c1ca292eb25053ed040182dc | db43b4d515d1534fd537b878f2b8d28436713bfe | refs/heads/master | 2022-07-08T20:32:55.385630 | 2022-07-05T18:03:31 | 2022-07-05T18:03:31 | 227,148,480 | 0 | 0 | null | 2022-07-05T18:03:32 | 2019-12-10T15:01:45 | Java | UTF-8 | Java | false | false | 1,694 | java | package com.b2w.starwarsapi.configurations;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class SwaggerConfiguration {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.b2w.starwarsapi")) // melhorar aqui, tirar essa string do pacote!
.paths(PathSelectors.any())
.build()
.apiInfo(info());
}
private ApiInfo info() {
return new ApiInfoBuilder().title("Star Wars API")
.description("Star Wars API project using Java, Spring boot and MongoDB")
.contact(new Contact("Marcus Santos", "https://github.com/marcusleandro/",
"[email protected]"))
.version("1.0.0")
.license("Apache License Version 2.0")
.licenseUrl("https://www.apache.org/licenses/LICENSE-2.0\"")
.build();
}
}
| [
"[email protected]"
] | |
45b45cf608dd0d4caa4954ee09e91f0af155d8e5 | 92e04ad0c726ec84ef491c18447b383978360be9 | /SewMatchMaker/src/com/stfx/cli/sew/domain/impl/ServiceRepositoryManager.java | c86e71f1401ca5a4fbd2b1b8daefd1e29da047a3 | [] | no_license | x2013ici/Sew | 167d74c670dddda268645e85a4808281f8e53c1c | af667d6246a92db12295daf1b332fae7f470f8ec | refs/heads/master | 2021-01-10T01:16:46.883929 | 2015-09-25T03:55:26 | 2015-09-25T03:55:26 | 43,106,867 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 27,885 | java | package com.stfx.cli.sew.domain.impl;
import java.util.ArrayList;
import com.stfx.cli.sew.datamodels.OwlsService;
import com.stfx.cli.sew.datamodels.OwlsServiceFile;
import com.stfx.cli.sew.datamodels.OwlsServiceList;
public class ServiceRepositoryManager {
/**
* Owl-s Service File Type
* Service: 1
* Profile: 2
* QosProfile:3
* Process:4
* Grounding: 5
* WsdlGrounding:6
*/
public static final int Service = 1;
public static final int Profile = 2;
public static final int QosProfile = 3;
public static final int Process = 4;
public static final int Grounding = 5;
public static final int WsdlGrounding =6;
public static volatile ServiceRepositoryManager serviceRepositoryManager = null;
public static ServiceRepositoryManager createServiceRepositoryManagerInstance(){
if(serviceRepositoryManager ==null){
synchronized(ServiceRepositoryManager.class){
serviceRepositoryManager = new ServiceRepositoryManager();
}
}
return serviceRepositoryManager;
}
/**
* Service Id: 5
*/
public static OwlsService getSerapeService(){
OwlsService owlsService = null;
ArrayList<OwlsServiceFile> owlsSerapeServiceFileList = new ArrayList<OwlsServiceFile>();
try
{
/**
* Service Section
* SerapeService.owl application/rdf+xml http://test.biocomalert.com/docs/services/serape/SerapeService.owl http://test.biocomalert.com/docs/services/serape/SerapeService.owl
*/
OwlsServiceFile owlsSerapeService = new OwlsServiceFile();
owlsSerapeService.setServiceFileName("SerapeService.owl");
owlsSerapeService.setMimeType("application/rdf+xml");
owlsSerapeService.setWebUrl("http://test.biocomalert.com/docs/services/serape/SerapeService.owl");
owlsSerapeService.setPhysicalPath("http://test.biocomalert.com/docs/services/serape/SerapeService.owl");
owlsSerapeService.setServiceFileType(Service);
owlsSerapeServiceFileList.add(owlsSerapeService);
/**
* Profile Section
* SerapeProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/serape/SerapeProfile.owl http://test.biocomalert.com/docs/services/serape/SerapeProfile.owl 1
*/
OwlsServiceFile owlsSerapeProfile = new OwlsServiceFile();
owlsSerapeProfile.setServiceFileName("SerapeProfile.owl");
owlsSerapeProfile.setMimeType("application/rdf+xml");
owlsSerapeProfile.setWebUrl("http://test.biocomalert.com/docs/services/serape/SerapeProfile.owl");
owlsSerapeProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/serape/SerapeProfile.owl");
owlsSerapeProfile.setServiceFileType(Profile);
owlsSerapeServiceFileList.add(owlsSerapeProfile);
/**
* QosProfile Section
* SerapeQosProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/serape/SerapeQosProfile.owl http://test.biocomalert.com/docs/services/serape/SerapeQosProfile.owl
*/
OwlsServiceFile owlsSerapeQosProfile = new OwlsServiceFile();
owlsSerapeQosProfile.setServiceFileName("SerapeQosProfile.owl");
owlsSerapeQosProfile.setMimeType("application/rdf+xml");
owlsSerapeQosProfile.setWebUrl("http://test.biocomalert.com/docs/services/serape/SerapeQosProfile.owl");
owlsSerapeQosProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/serape/SerapeQosProfile.owl");
owlsSerapeQosProfile.setServiceFileType(QosProfile);
owlsSerapeServiceFileList.add(owlsSerapeQosProfile);
/**
* Process Section
* SerapeProcess.owl application/rdf+xml http://test.biocomalert.com/docs/services/serape/SerapeProcess.owl http://test.biocomalert.com/docs/services/serape/SerapeProcess.owl 1
*/
OwlsServiceFile owlsSerapeProcess = new OwlsServiceFile();
owlsSerapeProcess.setServiceFileName("SerapeProcess.owl");
owlsSerapeProcess.setMimeType("application/rdf+xml");
owlsSerapeProcess.setWebUrl("http://test.biocomalert.com/docs/services/serape/SerapeProcess.owl");
owlsSerapeProcess.setPhysicalPath("http://test.biocomalert.com/docs/services/serape/SerapeProcess.owl");
owlsSerapeService.setServiceFileType(Process);
owlsSerapeServiceFileList.add(owlsSerapeProcess);
/**
* Grounding Section
* SerapeGrounding.owl application/rdf+xml http://test.biocomalert.com/docs/services/serape/SerapeGrounding.owl http://test.biocomalert.com/docs/services/serape/SerapeGrounding.owl
*/
OwlsServiceFile owlsSerapeGrounding = new OwlsServiceFile();
owlsSerapeGrounding.setServiceFileName("SerapeGrounding.owl");
owlsSerapeGrounding.setMimeType("application/rdf+xml");
owlsSerapeGrounding.setWebUrl("http://test.biocomalert.com/docs/services/serape/SerapeGrounding.owl");
owlsSerapeGrounding.setPhysicalPath("http://test.biocomalert.com/docs/services/serape/SerapeGrounding.owl");
owlsSerapeGrounding.setServiceFileType(Grounding);
owlsSerapeServiceFileList.add(owlsSerapeGrounding);
/**
* Grounding Wsdl Section
* SerapeGrounding.wsdl application/wsdl+xml http://test.biocomalert.com/docs/services/serape/SerapeGrounding.wsdl http://test.biocomalert.com/docs/services/serape/SerapeGrounding.wsdl
*/
OwlsServiceFile owlsSerapeGroundingwsdl = new OwlsServiceFile();
owlsSerapeGroundingwsdl.setServiceFileName("SerapeGrounding.wsdl");
owlsSerapeGroundingwsdl.setMimeType("application/wsdl+xml");
owlsSerapeGroundingwsdl.setWebUrl("http://test.biocomalert.com/docs/services/serape/SerapeGrounding.wsdl");
owlsSerapeGroundingwsdl.setPhysicalPath("http://test.biocomalert.com/docs/services/serape/SerapeGrounding.wsdl");
owlsSerapeGroundingwsdl.setServiceFileType(WsdlGrounding);
owlsSerapeServiceFileList.add(owlsSerapeGroundingwsdl);
owlsService = new OwlsService();
owlsService.setId(5);
owlsService.setServiceName("Serape Service");
owlsService.setServiceProvider("St. Francis Xavier University");
owlsService.setServiceDescription("This service provide option to search Gmax drug based on patient physical condition");
owlsService.setRootServiceUrl("http://test.biocomalert.com/docs/services/serape/SerapeService.owl");
owlsService.setOwlsServiceList(owlsSerapeServiceFileList);
}
catch(Exception ex){
ex.printStackTrace();
}
return owlsService;
}
/**
* Service Id: 4
* @return
*/
public static OwlsService getNapaService(){
OwlsService owlsService = null;
ArrayList<OwlsServiceFile> owlsNapaServiceFileList = new ArrayList<OwlsServiceFile>();
try
{
/**
* Service Section
* NapaService.owl application/rdf+xml http://test.biocomalert.com/docs/services/napa/NapaService.owl http://test.biocomalert.com/docs/services/napa/NapaService.owl
*/
OwlsServiceFile owlsNapaService = new OwlsServiceFile();
owlsNapaService.setServiceFileName("NapaService.owl");
owlsNapaService.setMimeType("application/rdf+xml");
owlsNapaService.setWebUrl("http://test.biocomalert.com/docs/services/napa/NapaService.owl");
owlsNapaService.setPhysicalPath("http://test.biocomalert.com/docs/services/napa/NapaService.owl");
owlsNapaService.setServiceFileType(Service);
owlsNapaServiceFileList.add(owlsNapaService);
/**
* Profile Section
* NapaProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/napa/NapaProfile.owl http://test.biocomalert.com/docs/services/napa/NapaProfile.owl
*/
OwlsServiceFile owlsNapaProfile = new OwlsServiceFile();
owlsNapaProfile.setServiceFileName("NapaProfile.owl");
owlsNapaProfile.setMimeType("application/rdf+xml");
owlsNapaProfile.setWebUrl("http://test.biocomalert.com/docs/services/napa/NapaProfile.owl");
owlsNapaProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/napa/NapaProfile.owl");
owlsNapaProfile.setServiceFileType(Profile);
owlsNapaServiceFileList.add(owlsNapaProfile);
/**
* QosProfile Section
* NapaQosProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/napa/NapaQosProfile.owl http://test.biocomalert.com/docs/services/napa/NapaQosProfile.owl
*/
OwlsServiceFile owlsNapaQosProfile = new OwlsServiceFile();
owlsNapaQosProfile.setServiceFileName("NapaQosProfile.owl");
owlsNapaQosProfile.setMimeType("application/rdf+xml");
owlsNapaQosProfile.setWebUrl("http://test.biocomalert.com/docs/services/napa/NapaQosProfile.owl");
owlsNapaQosProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/napa/NapaQosProfile.owl");
owlsNapaQosProfile.setServiceFileType(QosProfile);
owlsNapaServiceFileList.add(owlsNapaQosProfile);
/**
* Process Section
* NapaProcess.owl application/rdf+xml http://test.biocomalert.com/docs/services/napa/NapaProcess.owl http://test.biocomalert.com/docs/services/napa/NapaProcess.owl
*/
OwlsServiceFile owlsNapaProcess = new OwlsServiceFile();
owlsNapaProcess.setServiceFileName("NapaProcess.owl");
owlsNapaProcess.setMimeType("application/rdf+xml");
owlsNapaProcess.setWebUrl("http://test.biocomalert.com/docs/services/napa/NapaProcess.owl");
owlsNapaProcess.setPhysicalPath("http://test.biocomalert.com/docs/services/napa/NapaProcess.owl");
owlsNapaProcess.setServiceFileType(Process);
owlsNapaServiceFileList.add(owlsNapaProcess);
/**
* Grounding Section
* NapaGrounding.owl application/rdf+xml http://test.biocomalert.com/docs/services/napa/NapaGrounding.owl http://test.biocomalert.com/docs/services/napa/NapaGrounding.owl
*/
OwlsServiceFile owlsNapaGrounding = new OwlsServiceFile();
owlsNapaGrounding.setServiceFileName("NapaGrounding.owl");
owlsNapaGrounding.setMimeType("application/rdf+xml");
owlsNapaGrounding.setWebUrl("http://test.biocomalert.com/docs/services/napa/NapaGrounding.owl");
owlsNapaGrounding.setPhysicalPath("http://test.biocomalert.com/docs/services/napa/NapaGrounding.owl");
owlsNapaGrounding.setServiceFileType(Grounding);
owlsNapaServiceFileList.add(owlsNapaGrounding);
/**
* Grounding Wsdl Section
* NapaGrounding.wsdl application/wsdl+xml http://test.biocomalert.com/docs/services/napa/NapaGrounding.wsdl http://test.biocomalert.com/docs/services/napa/NapaGrounding.wsdl
*/
OwlsServiceFile owlsNapaGroundingwsdl = new OwlsServiceFile();
owlsNapaGroundingwsdl.setServiceFileName("NapaGrounding.wsdl");
owlsNapaGroundingwsdl.setMimeType("application/wsdl+xml");
owlsNapaGroundingwsdl.setWebUrl("http://test.biocomalert.com/docs/services/napa/NapaGrounding.wsdl");
owlsNapaGroundingwsdl.setPhysicalPath("http://test.biocomalert.com/docs/services/napa/NapaGrounding.wsdl");
owlsNapaGroundingwsdl.setServiceFileType(WsdlGrounding);
owlsNapaServiceFileList.add(owlsNapaGroundingwsdl);
owlsService = new OwlsService();
owlsService.setId(4);
owlsService.setServiceName("Napa Service");
owlsService.setServiceProvider("St. Francis Xavier University");
owlsService.setServiceDescription("This service provide option to search Napa drug based on patient physical condition");
owlsService.setRootServiceUrl("http://test.biocomalert.com/docs/services/napa/NapaService.owl");
owlsService.setOwlsServiceList(owlsNapaServiceFileList);
}
catch(Exception ex){
ex.printStackTrace();
}
return owlsService;
}
/**
* Service Id: 3
* @return
*/
public static OwlsService getGmaxService(){
OwlsService owlsService = null;
ArrayList<OwlsServiceFile> owlsGmaxServiceFileList = new ArrayList<OwlsServiceFile>();
try
{
/**
* Service Section
* GmaxService.owl application/rdf+xml http://test.biocomalert.com/docs/services/gmax/GmaxService.owl http://test.biocomalert.com/docs/services/gmax/GmaxService.owl
*/
OwlsServiceFile owlsGmaxService = new OwlsServiceFile();
owlsGmaxService.setServiceFileName("GmaxService.owl");
owlsGmaxService.setMimeType("application/rdf+xml");
owlsGmaxService.setWebUrl("http://test.biocomalert.com/docs/services/gmax/GmaxService.owl");
owlsGmaxService.setPhysicalPath("http://test.biocomalert.com/docs/services/gmax/GmaxService.owl");
owlsGmaxService.setServiceFileType(Service);
owlsGmaxServiceFileList.add(owlsGmaxService);
/**
* Profile Section
* GmaxProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/gmax/GmaxProfile.owl http://test.biocomalert.com/docs/services/gmax/GmaxProfile.owl
*/
OwlsServiceFile owlsGmaxProfile = new OwlsServiceFile();
owlsGmaxProfile.setServiceFileName("GmaxProfile.owl");
owlsGmaxProfile.setMimeType("application/rdf+xml");
owlsGmaxProfile.setWebUrl("http://test.biocomalert.com/docs/services/gmax/GmaxProfile.owl");
owlsGmaxProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/gmax/GmaxProfile.owl");
owlsGmaxProfile.setServiceFileType(Profile);
owlsGmaxServiceFileList.add(owlsGmaxProfile);
/**
* QosProfile Section
* GmaxQosProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/gmax/GmaxQosProfile.owl http://test.biocomalert.com/docs/services/gmax/GmaxQosProfile.owl
*/
OwlsServiceFile owlsGmaxQosProfile = new OwlsServiceFile();
owlsGmaxQosProfile.setServiceFileName("GmaxQosProfile.owl");
owlsGmaxQosProfile.setMimeType("application/rdf+xml");
owlsGmaxQosProfile.setWebUrl("http://test.biocomalert.com/docs/services/gmax/GmaxQosProfile.owl");
owlsGmaxQosProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/gmax/GmaxQosProfile.owl");
owlsGmaxQosProfile.setServiceFileType(QosProfile);
owlsGmaxServiceFileList.add(owlsGmaxQosProfile);
/**
* Process Section
* GmaxProcess.owl application/rdf+xml http://test.biocomalert.com/docs/services/gmax/GmaxProcess.owl http://test.biocomalert.com/docs/services/gmax/GmaxProcess.owl
*/
OwlsServiceFile owlsGmaxProcess = new OwlsServiceFile();
owlsGmaxProcess.setServiceFileName("GmaxProcess.owl");
owlsGmaxProcess.setMimeType("application/rdf+xml");
owlsGmaxProcess.setWebUrl("http://test.biocomalert.com/docs/services/gmax/GmaxProcess.owl");
owlsGmaxProcess.setPhysicalPath("http://test.biocomalert.com/docs/services/gmax/GmaxProcess.owl");
owlsGmaxProcess.setServiceFileType(Process);
owlsGmaxServiceFileList.add(owlsGmaxProcess);
/**
* Grounding Section
* GmaxGrounding.owl application/rdf+xml http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.owl http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.owl
*/
OwlsServiceFile owlsGmaxGrounding = new OwlsServiceFile();
owlsGmaxGrounding.setServiceFileName("GmaxGrounding.owl");
owlsGmaxGrounding.setMimeType("application/rdf+xml");
owlsGmaxGrounding.setWebUrl("http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.owl");
owlsGmaxGrounding.setPhysicalPath("http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.owl");
owlsGmaxGrounding.setServiceFileType(Grounding);
owlsGmaxServiceFileList.add(owlsGmaxGrounding);
/**
* Grounding Wsdl Section
* GmaxGrounding.wsdl application/wsdl+xml http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.wsdl http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.wsdl
*/
OwlsServiceFile owlsGmaxGroundingwsdl = new OwlsServiceFile();
owlsGmaxGroundingwsdl.setServiceFileName("GmaxGrounding.wsdl");
owlsGmaxGroundingwsdl.setMimeType("application/wsdl+xml");
owlsGmaxGroundingwsdl.setWebUrl("http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.wsdl");
owlsGmaxGroundingwsdl.setPhysicalPath("http://test.biocomalert.com/docs/services/gmax/GmaxGrounding.wsdl");
owlsGmaxGroundingwsdl.setServiceFileType(WsdlGrounding);
owlsGmaxServiceFileList.add(owlsGmaxGroundingwsdl);
owlsService = new OwlsService();
owlsService.setId(3);
owlsService.setServiceName("Gmax Service");
owlsService.setServiceProvider("St. Francis Xavier University");
owlsService.setServiceDescription("This service provide option to search Gmax drug based on patient physical condition");
owlsService.setRootServiceUrl("http://test.biocomalert.com/docs/services/gmax/GmaxService.owl");
owlsService.setOwlsServiceList(owlsGmaxServiceFileList);
}
catch(Exception ex){
ex.printStackTrace();
}
return owlsService;
}
/**
* Service Id: 2
* @return
*/
public static OwlsService getAmbroxService(){
OwlsService owlsService = null;
ArrayList<OwlsServiceFile> owlsAmrboxServiceFileList = new ArrayList<OwlsServiceFile>();
try
{
/**
* Service Section
* AmbroxService.owl application/rdf+xml http://test.biocomalert.com/docs/services/ambrox/AmbroxService.owl http://test.biocomalert.com/docs/services/ambrox/AmbroxService.owl
*/
OwlsServiceFile owlsAmbroxService = new OwlsServiceFile();
owlsAmbroxService.setServiceFileName("AmbroxService.owl");
owlsAmbroxService.setMimeType("application/rdf+xml");
owlsAmbroxService.setWebUrl("http://test.biocomalert.com/docs/services/ambrox/AmbroxService.owl");
owlsAmbroxService.setPhysicalPath("http://test.biocomalert.com/docs/services/ambrox/AmbroxService.owl");
owlsAmbroxService.setServiceFileType(Service);
owlsAmrboxServiceFileList.add(owlsAmbroxService);
/**
* Profile Section
* AmbroxProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/ambrox/AmbroxProfile.owl http://test.biocomalert.com/docs/services/ambrox/AmbroxProfile.owl
*/
OwlsServiceFile owlsAmbroxProfile = new OwlsServiceFile();
owlsAmbroxProfile.setServiceFileName("AmbroxProfile.owl");
owlsAmbroxProfile.setMimeType("application/rdf+xml");
owlsAmbroxProfile.setWebUrl("http://test.biocomalert.com/docs/services/ambrox/AmbroxProfile.owl");
owlsAmbroxProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/ambrox/AmbroxProfile.owl");
owlsAmbroxProfile.setServiceFileType(Profile);
owlsAmrboxServiceFileList.add(owlsAmbroxProfile);
/**
* QosProfile Section
* AmbroxQosProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/ambrox/AmbroxQosProfile.owl http://test.biocomalert.com/docs/services/ambrox/AmbroxQosProfile.owl 1
*/
OwlsServiceFile owlsAmbroxQosProfile = new OwlsServiceFile();
owlsAmbroxQosProfile.setServiceFileName("AmbroxQosProfile.owl");
owlsAmbroxQosProfile.setMimeType("application/rdf+xml");
owlsAmbroxQosProfile.setWebUrl("http://test.biocomalert.com/docs/services/ambrox/AmbroxQosProfile.owl");
owlsAmbroxQosProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/ambrox/AmbroxQosProfile.owl");
owlsAmbroxQosProfile.setServiceFileType(QosProfile);
owlsAmrboxServiceFileList.add(owlsAmbroxQosProfile);
/**
* Process Section
* AmbroxProcess.owl application/rdf+xml http://test.biocomalert.com/docs/services/ambrox/AmbroxProcess.owl http://test.biocomalert.com/docs/services/ambrox/AmbroxProcess.owl
*/
OwlsServiceFile owlsAmbroxProcess = new OwlsServiceFile();
owlsAmbroxProcess.setServiceFileName("AmbroxProcess.owl");
owlsAmbroxProcess.setMimeType("application/rdf+xml");
owlsAmbroxProcess.setWebUrl("http://test.biocomalert.com/docs/services/ambrox/AmbroxProcess.owl");
owlsAmbroxProcess.setPhysicalPath("http://test.biocomalert.com/docs/services/ambrox/AmbroxProcess.owl");
owlsAmbroxProcess.setServiceFileType(Process);
owlsAmrboxServiceFileList.add(owlsAmbroxProcess);
/**
* Grounding Section
* AmbroxGrounding.owl application/rdf+xml http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.owl http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.owl
*/
OwlsServiceFile owlsAmbroxGrounding = new OwlsServiceFile();
owlsAmbroxGrounding.setServiceFileName("AmbroxGrounding.owl");
owlsAmbroxGrounding.setMimeType("application/rdf+xml");
owlsAmbroxGrounding.setWebUrl("http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.owl");
owlsAmbroxGrounding.setPhysicalPath("http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.owl");
owlsAmbroxGrounding.setServiceFileType(Grounding);
owlsAmrboxServiceFileList.add(owlsAmbroxGrounding);
/**
* Grounding Wsdl Section
* AmbroxGrounding.wsdl application/wsdl+xml http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.wsdl http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.wsdl
*/
OwlsServiceFile owlsAmbroxGroundingwsdl = new OwlsServiceFile();
owlsAmbroxGroundingwsdl.setServiceFileName("AmbroxGrounding.wsdl");
owlsAmbroxGroundingwsdl.setMimeType("application/wsdl+xml");
owlsAmbroxGroundingwsdl.setWebUrl("http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.wsdl");
owlsAmbroxGroundingwsdl.setPhysicalPath("http://test.biocomalert.com/docs/services/ambrox/AmbroxGrounding.wsdl");
owlsAmbroxGroundingwsdl.setServiceFileType(WsdlGrounding);
owlsAmrboxServiceFileList.add(owlsAmbroxGroundingwsdl);
owlsService = new OwlsService();
owlsService.setId(2);
owlsService.setServiceName("Ambrox Service");
owlsService.setServiceProvider("Center for Logic and Information");
owlsService.setServiceDescription("This service provide option to search Ambrox drug based on patient physical condition");
owlsService.setRootServiceUrl("http://test.biocomalert.com/docs/services/ambrox/AmbroxService.owl");
owlsService.setOwlsServiceList(owlsAmrboxServiceFileList);
}
catch(Exception ex){
ex.printStackTrace();
}
return owlsService;
}
/**
* Service Id: 1
* @return
*/
public static OwlsService getCef3Service(){
OwlsService owlsService = null;
ArrayList<OwlsServiceFile> owlsCef3ServiceFileList = new ArrayList<OwlsServiceFile>();
try
{
/**
* Service Section
* Cef3Service.owl application/rdf+xml http://test.biocomalert.com/docs/services/cef3/Cef3Service.owl http://test.biocomalert.com/docs/services/cef3/Cef3Service.owl
*/
OwlsServiceFile owlsCef3Service = new OwlsServiceFile();
owlsCef3Service.setServiceFileName("Cef3Service.owl");
owlsCef3Service.setMimeType("application/rdf+xml");
owlsCef3Service.setWebUrl("http://test.biocomalert.com/docs/services/cef3/Cef3Service.owl");
owlsCef3Service.setPhysicalPath("http://test.biocomalert.com/docs/services/cef3/Cef3Service.owl");
owlsCef3Service.setServiceFileType(Service);
owlsCef3ServiceFileList.add(owlsCef3Service);
/**
* Profile Section
* Cef3Profile.owl application/rdf+xml http://test.biocomalert.com/docs/services/cef3/Cef3Profile.owl http://test.biocomalert.com/docs/services/cef3/Cef3Profile.owl
*/
OwlsServiceFile owlsCef3Profile = new OwlsServiceFile();
owlsCef3Profile.setServiceFileName("Cef3Profile.owl");
owlsCef3Profile.setMimeType("application/rdf+xml");
owlsCef3Profile.setWebUrl("http://test.biocomalert.com/docs/services/cef3/Cef3Profile.owl");
owlsCef3Profile.setPhysicalPath("http://test.biocomalert.com/docs/services/cef3/Cef3Profile.owl");
owlsCef3Profile.setServiceFileType(Profile);
owlsCef3ServiceFileList.add(owlsCef3Profile);
/**
* QosProfile Section
* Cef3QosProfile.owl application/rdf+xml http://test.biocomalert.com/docs/services/cef3/Cef3QosProfile.owl http://test.biocomalert.com/docs/services/cef3/Cef3QosProfile.owl
*/
OwlsServiceFile owlsCef3QosProfile = new OwlsServiceFile();
owlsCef3QosProfile.setServiceFileName("Cef3QosProfile.owl");
owlsCef3QosProfile.setMimeType("application/rdf+xml");
owlsCef3QosProfile.setWebUrl("http://test.biocomalert.com/docs/services/cef3/Cef3QosProfile.owl");
owlsCef3QosProfile.setPhysicalPath("http://test.biocomalert.com/docs/services/cef3/Cef3QosProfile.owl");
owlsCef3QosProfile.setServiceFileType(QosProfile);
owlsCef3ServiceFileList.add(owlsCef3QosProfile);
/**
* Process Section
* Cef3Process.owl application/rdf+xml http://test.biocomalert.com/docs/services/cef3/Cef3Process.owl http://test.biocomalert.com/docs/services/cef3/Cef3Process.owl
*/
OwlsServiceFile owlsCef3Process = new OwlsServiceFile();
owlsCef3Process.setServiceFileName("Cef3Process.owl");
owlsCef3Process.setMimeType("application/rdf+xml");
owlsCef3Process.setWebUrl("http://test.biocomalert.com/docs/services/cef3/Cef3Process.owl");
owlsCef3Process.setPhysicalPath("http://test.biocomalert.com/docs/services/cef3/Cef3Process.owl");
owlsCef3Process.setServiceFileType(Process);
owlsCef3ServiceFileList.add(owlsCef3Process);
/**
* Grounding Section
* Cef3Grounding.owl application/rdf+xml http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.owl http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.owl
*/
OwlsServiceFile owlsCef3Grounding = new OwlsServiceFile();
owlsCef3Grounding.setServiceFileName("Cef3Process.owl");
owlsCef3Grounding.setMimeType("application/rdf+xml");
owlsCef3Grounding.setWebUrl("http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.owl");
owlsCef3Grounding.setPhysicalPath("http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.owl");
owlsCef3Grounding.setServiceFileType(Grounding);
owlsCef3ServiceFileList.add(owlsCef3Grounding);
/**
* Grounding Wsdl Section
* Cef3Grounding.wsdl application/wsdl+xml http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.wsdl http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.wsdl
*/
OwlsServiceFile owlsCef3Groundingwsdl = new OwlsServiceFile();
owlsCef3Groundingwsdl.setServiceFileName("Cef3Grounding.wsdl");
owlsCef3Groundingwsdl.setMimeType("application/wsdl+xml");
owlsCef3Groundingwsdl.setWebUrl("http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.wsdl");
owlsCef3Groundingwsdl.setPhysicalPath("http://test.biocomalert.com/docs/services/cef3/Cef3Grounding.wsdl");
owlsCef3Groundingwsdl.setServiceFileType(WsdlGrounding);
owlsCef3ServiceFileList.add(owlsCef3Groundingwsdl);
owlsService = new OwlsService();
owlsService.setId(1);
owlsService.setServiceName("Cef3 Service");
owlsService.setServiceProvider("Center for Logic and Information");
owlsService.setServiceDescription("This service provide option to search Cef3Serape drug based on patient physical condition");
owlsService.setRootServiceUrl("http://test.biocomalert.com/docs/services/cef3/Cef3Service.owl");
owlsService.setOwlsServiceList(owlsCef3ServiceFileList);
}
catch(Exception ex){
ex.printStackTrace();
}
return owlsService;
}
public static OwlsServiceList PopulateOwlsServiceList(){
ArrayList<OwlsService> owlsServiceList = new ArrayList<OwlsService>();
OwlsServiceList owlsServiceListResponse = new OwlsServiceList();
try
{
/**
* Cer3 Service
*/
OwlsService owlsCef3Service = ServiceRepositoryManager.getCef3Service();
if(owlsCef3Service !=null){
owlsServiceList.add(owlsCef3Service);
}
/**
* Ambrox Service
*/
OwlsService owlsAmbroxService = ServiceRepositoryManager.getAmbroxService();
if(owlsAmbroxService !=null){
owlsServiceList.add(owlsAmbroxService);
}
/**
* Gmax Service
*/
OwlsService owlsGmaxService = ServiceRepositoryManager.getGmaxService();
if(owlsGmaxService != null){
owlsServiceList.add(owlsGmaxService);
}
/**
* Napa Service
*/
OwlsService owlsNapaService = ServiceRepositoryManager.getNapaService();
if(owlsNapaService != null){
owlsServiceList.add(owlsNapaService);
}
/**
* Serape Service
*/
OwlsService owlsSerapeService = ServiceRepositoryManager.getSerapeService();
if(owlsSerapeService !=null){
owlsServiceList.add(owlsSerapeService);
}
owlsServiceListResponse.setIsResult(1);
owlsServiceListResponse.setIsOperationSuccessfull(1);
owlsServiceListResponse.setOwlsServiceList(owlsServiceList);
}
catch(Exception ex){
ex.printStackTrace();
}
return owlsServiceListResponse;
}
}
| [
"[email protected]"
] | |
2bf7072b9e9d4cd3667b270a8faa4bed94400237 | dd25ae5a6e94ad7a45b9c866d3b402718b7f9e3d | /java-springboot-tutorial/demo/src/main/java/com/example/demo/student/StudentController.java | 10ad9f61f1e0d7638a35faae23532a0f64acd172 | [
"MIT"
] | permissive | JonathanGzzBen/java-study | ebf7e26804be70a047548fae4d35d9bed3acff4f | 524907f2773c815843f479fe7aa2fc0b2ce295a5 | refs/heads/main | 2023-09-02T17:30:54.667618 | 2021-11-19T23:39:20 | 2021-11-19T23:39:20 | 412,128,824 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,562 | java | package com.example.demo.student;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(path = "api/v1/students")
public class StudentController {
private final StudentService studentService;
@Autowired
public StudentController(StudentService studentService) {
this.studentService = studentService;
}
@GetMapping
public List<Student> getStudents() {
return studentService.getStudents();
}
@PostMapping
public void registerNewStudent(@RequestBody Student student) {
studentService.addNewStudent(student);
}
@DeleteMapping(path = "{studentId}")
public void deleteStudent(@PathVariable("studentId") Long studentId) {
studentService.deleteStudent(studentId);
}
@PutMapping(path = "{studentId}")
public void updateStudent(@PathVariable("studentId") Long studentId, @RequestParam(required = false) String name,
@RequestParam(required = false) String email) {
studentService.updateStudent(studentId, name, email);
}
}
| [
"[email protected]"
] | |
89189fa550d4b75fac9dae27fa150f4aa1061a63 | 45488af157fca681577869db4b4ca26b7f1a4827 | /status-computation/java/src/test/java/TestIO/TimetableReader.java | 4c256fedd2bd6be429eb89ac5d87a81bb423c0d9 | [] | no_license | pkoro/ar-compute-engine | 6f9e40c84844adfcf9b0b8f3c0e77354bc557ff7 | 92c3c52e9f8da74fe3951607e8170b4ba1ed2a9f | refs/heads/master | 2021-01-15T21:53:59.420865 | 2015-07-17T13:20:35 | 2015-07-17T13:20:35 | 29,354,913 | 0 | 0 | null | 2015-01-16T15:44:20 | 2015-01-16T15:44:20 | null | UTF-8 | Java | false | false | 1,599 | java | package TestIO;
import java.io.IOException;
import java.util.Map;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonPrimitive;
import utils.State;
public class TimetableReader {
private static State strToState(String st) throws IOException {
if (st.equals("OK")) return State.OK;
else if (st.equals("WARNING")) return State.WARNING;
else if (st.equals("UNKNOWN")) return State.UNKNOWN;
else if (st.equals("MISSING")) return State.MISSING;
else if (st.equals("CRITICAL")) return State.CRITICAL;
else if (st.equals("DOWNTIME")) return State.DOWNTIME;
throw new IOException("Unrecognized state");
}
public static State[] fromJson( String jStr) throws IOException {
JsonParser parser = new JsonParser();
JsonObject job = parser.parse(jStr).getAsJsonObject();
for(Map.Entry<String, JsonElement> entry : job.entrySet()) {
JsonArray arr = entry.getValue().getAsJsonArray();
//Get size of timeline
int size = arr.size();
State[] timeline = new State[size];
for (int i=0; i<size; i++) {
timeline[i] = strToState(arr.get(i).getAsString());
}
return timeline;
}
return null;
}
public static JsonObject toJson(State[] tbl, String lbl) throws IOException {
JsonObject job = new JsonObject();
JsonArray arr = new JsonArray();
for (int i=0;i<tbl.length;i++) {
arr.add(new JsonPrimitive(tbl[i].toString()));
System.out.println(tbl[i].toString());
}
job.add(lbl, arr);
return job;
}
}
| [
"[email protected]"
] | |
7f5de30c06b91bca9eca2115d742c5ae1d0bc049 | 746572ba552f7d52e8b5a0e752a1d6eb899842b9 | /JDK8Source/src/main/java/com/sun/org/apache/xpath/internal/operations/Mod.java | bf5a1aa9db1859488430bfffa8e62ded6fae62b7 | [] | no_license | lobinary/Lobinary | fde035d3ce6780a20a5a808b5d4357604ed70054 | 8de466228bf893b72c7771e153607674b6024709 | refs/heads/master | 2022-02-27T05:02:04.208763 | 2022-01-20T07:01:28 | 2022-01-20T07:01:28 | 26,812,634 | 7 | 5 | null | null | null | null | UTF-8 | Java | false | false | 2,974 | java | /***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <p>
* 版权所有1999-2004 Apache软件基金会。
*
* 根据Apache许可证2.0版("许可证")授权;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。
*
*/
/*
* $Id: Mod.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $
* <p>
* $ Id:Mod.java,v 1.2.4.1 2005/09/14 21:31:45 jeffsuttor Exp $
*
*/
package com.sun.org.apache.xpath.internal.operations;
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.objects.XNumber;
import com.sun.org.apache.xpath.internal.objects.XObject;
/**
* The 'mod' operation expression executer.
* <p>
* 'mod'操作表达式执行器。
*
*/
public class Mod extends Operation
{
static final long serialVersionUID = 5009471154238918201L;
/**
* Apply the operation to two operands, and return the result.
*
*
* <p>
* 将操作应用于两个操作数,并返回结果。
*
*
* @param left non-null reference to the evaluated left operand.
* @param right non-null reference to the evaluated right operand.
*
* @return non-null reference to the XObject that represents the result of the operation.
*
* @throws javax.xml.transform.TransformerException
*/
public XObject operate(XObject left, XObject right)
throws javax.xml.transform.TransformerException
{
return new XNumber(left.num() % right.num());
}
/**
* Evaluate this operation directly to a double.
*
* <p>
* 直接将此操作评估为double。
*
* @param xctxt The runtime execution context.
*
* @return The result of the operation as a double.
*
* @throws javax.xml.transform.TransformerException
*/
public double num(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
return (m_left.num(xctxt) % m_right.num(xctxt));
}
}
| [
"[email protected]"
] | |
085cc111549a9350a40026a520588b5047dacfbd | 2ebc9528389faf1551574a8d6203cbe338a72221 | /zf/src/main/java/com/chinazhoufan/admin/modules/bas/service/FileDirService.java | b990b412fff75398f8a0ce22408fa50a92791b97 | [
"Apache-2.0"
] | permissive | flypig5211/zf-admin | 237a7299a5dc65e33701df2aeca50fd4b2107e21 | dbf36f42e2d6a2f3162d4856e9daa8152ee1d56e | refs/heads/master | 2022-02-27T00:14:12.904808 | 2017-12-06T10:01:15 | 2017-12-06T10:01:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,845 | java | /**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.chinazhoufan.admin.modules.bas.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.chinazhoufan.admin.common.persistence.Page;
import com.chinazhoufan.admin.common.service.TreeService;
import com.chinazhoufan.admin.modules.bas.dao.FileDirDao;
import com.chinazhoufan.admin.modules.bas.entity.FileDir;
/**
* 文件目录Service
* @Date 2016年10月26日 下午2:59:03
*/
@Service
@Transactional(readOnly = true)
public class FileDirService extends TreeService<FileDirDao, FileDir> {
@Transactional(readOnly = false)
public void save(FileDir entity) {
super.save(entity);
}
@Override
public FileDir get(String id) {
return super.get(id);
}
@Override
public FileDir get(FileDir entity) {
return super.get(entity);
}
@Override
public List<FileDir> findList(FileDir entity) {
return super.findList(entity);
}
@Override
public Page<FileDir> findPage(Page<FileDir> page, FileDir entity) {
return super.findPage(page, entity);
}
@Transactional(readOnly = false)
public void delete(FileDir entity) {
super.delete(entity);
}
public List<FileDir> findAll() {
return super.findList(new FileDir());
}
public List<FileDir> findPublicList() {
FileDir fileDir = new FileDir();
fileDir.setType(FileDir.TYPE_PUBLIC);
return super.findList(fileDir);
}
@Transactional(readOnly = false)
public void updateType(FileDir entity) {
dao.updateType(entity);
}
public boolean getUniqueByCode(String code) {
int c = dao.getUniqueByCode(code);
return c == 0 ? true : false;
}
public FileDir findFileDirByCode(String code){
return dao.findFileDirByCode(code);
}
}
| [
"[email protected]"
] | |
164efb9bfbdffedfff7d4ead1aaaac5ed1bebca4 | df94ae5e7ab678344569ccd6468a0c930e7a505b | /BookstorePOS/src/main/java/com/bustomi/bookstorepos/entity/master/KategoriBuku.java | 169db41df2a6c0c5de69e626c5486eafe701f25b | [] | no_license | untoms/KMM_Project | 491b8e6c0503cb428e36d994259dc5a61fc01a7d | e6a04194303c22559ce6aa08a0460f9e41ead601 | refs/heads/master | 2020-05-30T18:07:39.835904 | 2015-08-22T15:32:37 | 2015-08-22T15:32:37 | 21,937,961 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,243 | java | /*
* Dikembangkan untuk keperluan proyek Magang D3 TI UNS tahun 2014.
* [email protected]
* Bustomi Raharjo | M3112150 | D3 TI-C FMIPA UNS 2012 \^_^v
*/
package com.bustomi.bookstorepos.entity.master;
import com.bustomi.bookstorepos.entity.SimpleEntity;
import java.util.Collections;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
*
* @author PacuL
*/
@javax.persistence.Entity
@Table (name = "Kategori_Buku")
public class KategoriBuku extends SimpleEntity<Integer>{
@Id
@GeneratedValue (strategy = GenerationType.AUTO)
@Column (name = "id")
private Integer id;
@OneToMany (mappedBy = "kategoriBuku")
private List<Buku> daftarBuku;
public List<Buku> getDaftarBuku() {
return Collections.unmodifiableList(daftarBuku);
}
public void setDaftarBuku(List<Buku> daftarBuku) {
this.daftarBuku = daftarBuku;
}
@Override
public Integer getId() {
return id;
}
@Override
public void setId(Integer id) {
this.id = id;
}
}
| [
"[email protected]"
] | |
11047ee87cb3897d4672babd0da99ff38a0eb24e | 5ca1beea9336b535104453e479ac4196857e1887 | /aTalk/src/main/java/org/atalk/impl/androidtray/NotificationHelper.java | 9826edccc61575320359c7e4567566de3c2e90c0 | [
"Apache-2.0"
] | permissive | unoffices/atalk-android | 0016cd0374b5fca2e9d056f14de9019015507f73 | 32e4e6e198fbc32a5ed3ebb1745713cfaa67a177 | refs/heads/master | 2021-01-06T16:23:02.249485 | 2020-02-13T23:59:51 | 2020-02-13T23:59:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,673 | java | /*
* aTalk, android VoIP and Instant Messaging client
* Copyright 2014 Eng Chong Meng
*
* 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.atalk.impl.androidtray;
import android.annotation.TargetApi;
import android.app.*;
import android.content.*;
import android.graphics.Color;
import android.os.Build;
import android.provider.Settings;
import org.atalk.android.R;
import org.atalk.android.plugin.notificationwiring.AndroidNotifications;
import java.util.List;
import androidx.annotation.RequiresApi;
/**
* Helper class to manage notification channels, and create notifications.
*
* @author Eng Chong Meng
*/
public class NotificationHelper extends ContextWrapper
{
private NotificationManager manager;
/**
* Registers notification channels, which can be used later by individual notifications.
*
* @param ctx The application context
*/
public NotificationHelper(Context ctx)
{
super(ctx);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// Delete any unused channel IDs
deleteObsoletedChannelIds();
NotificationChannel nMessage = new NotificationChannel(AndroidNotifications.MESSAGE_GROUP,
getString(R.string.noti_channel_MESSAGE_GROUP), NotificationManager.IMPORTANCE_LOW);
// nMessage.setLightColor(Color.BLUE);
nMessage.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
// nMessage.setAllowBubbles(true);
getManager().createNotificationChannel(nMessage);
NotificationChannel nFile = new NotificationChannel(AndroidNotifications.FILE_GROUP,
getString(R.string.noti_channel_FILE_GROUP), NotificationManager.IMPORTANCE_LOW);
// nFile.setLightColor(Color.GREEN);
nFile.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
getManager().createNotificationChannel(nFile);
NotificationChannel nCall = new NotificationChannel(AndroidNotifications.CALL_GROUP,
getString(R.string.noti_channel_CALL_GROUP), NotificationManager.IMPORTANCE_LOW);
// nCall.setLightColor(Color.CYAN);
nCall.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
getManager().createNotificationChannel(nCall);
NotificationChannel nMissCall = new NotificationChannel(AndroidNotifications.MISSED_CALL,
getString(R.string.noti_channel_MISSED_CALL), NotificationManager.IMPORTANCE_LOW);
nMissCall.setLightColor(Color.RED);
nMissCall.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
getManager().createNotificationChannel(nMissCall);
NotificationChannel nDefault = new NotificationChannel(AndroidNotifications.DEFAULT_GROUP,
getString(R.string.noti_channel_DEFAULT_GROUP), NotificationManager.IMPORTANCE_LOW);
// nDefault.setLightColor(Color.WHITE);
nDefault.setShowBadge(false);
nDefault.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
getManager().createNotificationChannel(nDefault);
}
}
@TargetApi(Build.VERSION_CODES.O)
private void deleteObsoletedChannelIds()
{
List<NotificationChannel> channelGroups = getManager().getNotificationChannels();
for (NotificationChannel nc : channelGroups) {
if (!AndroidNotifications.notificationIds.contains(nc.getId())) {
getManager().deleteNotificationChannel(nc.getId());
}
}
}
/*
* Send a notification.
*
* @param id The ID of the notification
* @param notification The notification object
*/
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
public void notify(int id, Notification.Builder notification)
{
getManager().notify(id, notification.build());
}
/**
* Get the notification manager.
*
* Utility method as this helper works with it a lot.
*
* @return The system service NotificationManager
*/
private NotificationManager getManager()
{
if (manager == null) {
manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
}
return manager;
}
/**
* Send Intent to load system Notification Settings for this app.
*/
@RequiresApi(api = Build.VERSION_CODES.O)
public void goToNotificationSettings()
{
Intent i = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
i.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
startActivity(i);
}
/**
* Send intent to load system Notification Settings UI for a particular channel.
*
* @param channel Name of channel to configure
*/
@TargetApi(Build.VERSION_CODES.O)
public void goToNotificationSettings(String channel)
{
Intent i = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
i.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
i.putExtra(Settings.EXTRA_CHANNEL_ID, channel);
startActivity(i);
}
}
| [
"[email protected]"
] | |
92b5d829302583dd90f3de69847bc44a1e75d007 | f766baf255197dd4c1561ae6858a67ad23dcda68 | /app/src/main/java/com/tencent/mm/protocal/c/aio.java | 56a57990ca3102bfc4c41c98c0fd93abe1f97c31 | [] | no_license | jianghan200/wxsrc6.6.7 | d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849 | eb6c56587cfca596f8c7095b0854cbbc78254178 | refs/heads/master | 2020-03-19T23:40:49.532494 | 2018-06-12T06:00:50 | 2018-06-12T06:00:50 | 137,015,278 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,094 | java | package com.tencent.mm.protocal.c;
import java.util.LinkedList;
public final class aio
extends bhd
{
public int hbE;
public LinkedList<bub> rLq = new LinkedList();
protected final int a(int paramInt, Object... paramVarArgs)
{
if (paramInt == 0)
{
paramVarArgs = (f.a.a.c.a)paramVarArgs[0];
if (this.shX != null)
{
paramVarArgs.fV(1, this.shX.boi());
this.shX.a(paramVarArgs);
}
paramVarArgs.fT(2, this.hbE);
paramVarArgs.d(3, 8, this.rLq);
return 0;
}
if (paramInt == 1) {
if (this.shX == null) {
break label441;
}
}
label441:
for (paramInt = f.a.a.a.fS(1, this.shX.boi()) + 0;; paramInt = 0)
{
return paramInt + f.a.a.a.fQ(2, this.hbE) + f.a.a.a.c(3, 8, this.rLq);
if (paramInt == 2)
{
paramVarArgs = (byte[])paramVarArgs[0];
this.rLq.clear();
paramVarArgs = new f.a.a.a.a(paramVarArgs, unknownTagHandler);
for (paramInt = bhd.a(paramVarArgs); paramInt > 0; paramInt = bhd.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.cJS();
}
}
break;
}
if (paramInt == 3)
{
Object localObject1 = (f.a.a.a.a)paramVarArgs[0];
aio localaio = (aio)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
Object localObject2;
boolean bool;
switch (paramInt)
{
default:
return -1;
case 1:
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new fk();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((fk)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhd.a((f.a.a.a.a)localObject2))) {}
localaio.shX = ((fk)localObject1);
paramInt += 1;
}
case 2:
localaio.hbE = ((f.a.a.a.a)localObject1).vHC.rY();
return 0;
}
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
int i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new bub();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((bub)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhd.a((f.a.a.a.a)localObject2))) {}
localaio.rLq.add(localObject1);
paramInt += 1;
}
break;
}
return -1;
}
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes4-dex2jar.jar!/com/tencent/mm/protocal/c/aio.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"[email protected]"
] | |
63eba2e5ee8a074d3b83a573830b03d0e2e22d4f | f87ff5efce2f0cc01ba53fa780adf05554829c39 | /Person/src/Robot.java | 9734668f4213a78d79041a93a5cc8d867cc8f998 | [] | no_license | nato01/test | dae9bb8a1eb43e16348df837df31228058e6b12c | 2e8088d6519049e6588fc065a415cca8cd03c83d | refs/heads/master | 2023-08-24T14:36:38.920608 | 2019-11-01T00:42:14 | 2019-11-01T00:42:14 | 209,443,863 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 269 | java |
public class Robot {
public String name =null;
public void talk(){
System.out.println(this.name+"が話す");}
public void walk(){
System.out.println(this.name+"が歩く");}
public void run(){
System.out.println(this.name+"が走る");}
}
| [
"[email protected]"
] | |
1f7e0343aa09df95a4e35332fb9b2c8bca52ac3a | dac6d678929364c708c199ed94689d82c46e1cfc | /src/test/java/com/lottery/web/web/rest/TestUtil.java | 37e5a0e6a79d7f52d41bef4dfdffea3f10ce2846 | [] | no_license | BulkSecurityGeneratorProject/lottery | a023d353d5d0f4c72680a0203d17199ac791623d | 5543143527d16bf13493b3e44a111e62f287f467 | refs/heads/master | 2022-12-22T21:12:56.159137 | 2019-04-08T00:02:30 | 2019-04-08T00:02:30 | 296,648,517 | 0 | 0 | null | 2020-09-18T14:44:18 | 2020-09-18T14:44:18 | null | UTF-8 | Java | false | false | 5,143 | java | package com.lottery.web.web.rest;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeDiagnosingMatcher;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.format.support.DefaultFormattingConversionService;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.MediaType;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.time.ZonedDateTime;
import java.time.format.DateTimeParseException;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Utility class for testing REST controllers.
*/
public class TestUtil {
/** MediaType for JSON UTF8 */
public static final MediaType APPLICATION_JSON_UTF8 = new MediaType(
MediaType.APPLICATION_JSON.getType(),
MediaType.APPLICATION_JSON.getSubtype(), StandardCharsets.UTF_8);
/**
* Convert an object to JSON byte array.
*
* @param object
* the object to convert
* @return the JSON byte array
* @throws IOException
*/
public static byte[] convertObjectToJsonBytes(Object object)
throws IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
JavaTimeModule module = new JavaTimeModule();
mapper.registerModule(module);
return mapper.writeValueAsBytes(object);
}
/**
* Create a byte array with a specific size filled with specified data.
*
* @param size the size of the byte array
* @param data the data to put in the byte array
* @return the JSON byte array
*/
public static byte[] createByteArray(int size, String data) {
byte[] byteArray = new byte[size];
for (int i = 0; i < size; i++) {
byteArray[i] = Byte.parseByte(data, 2);
}
return byteArray;
}
/**
* A matcher that tests that the examined string represents the same instant as the reference datetime.
*/
public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher<String> {
private final ZonedDateTime date;
public ZonedDateTimeMatcher(ZonedDateTime date) {
this.date = date;
}
@Override
protected boolean matchesSafely(String item, Description mismatchDescription) {
try {
if (!date.isEqual(ZonedDateTime.parse(item))) {
mismatchDescription.appendText("was ").appendValue(item);
return false;
}
return true;
} catch (DateTimeParseException e) {
mismatchDescription.appendText("was ").appendValue(item)
.appendText(", which could not be parsed as a ZonedDateTime");
return false;
}
}
@Override
public void describeTo(Description description) {
description.appendText("a String representing the same Instant as ").appendValue(date);
}
}
/**
* Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime
* @param date the reference datetime against which the examined string is checked
*/
public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) {
return new ZonedDateTimeMatcher(date);
}
/**
* Verifies the equals/hashcode contract on the domain object.
*/
public static <T> void equalsVerifier(Class<T> clazz) throws Exception {
T domainObject1 = clazz.getConstructor().newInstance();
assertThat(domainObject1.toString()).isNotNull();
assertThat(domainObject1).isEqualTo(domainObject1);
assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode());
// Test with an instance of another class
Object testOtherObject = new Object();
assertThat(domainObject1).isNotEqualTo(testOtherObject);
assertThat(domainObject1).isNotEqualTo(null);
// Test with an instance of the same class
T domainObject2 = clazz.getConstructor().newInstance();
assertThat(domainObject1).isNotEqualTo(domainObject2);
// HashCodes are equals because the objects are not persisted yet
assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode());
}
/**
* Create a FormattingConversionService which use ISO date format, instead of the localized one.
* @return the FormattingConversionService
*/
public static FormattingConversionService createFormattingConversionService() {
DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
registrar.setUseIsoFormat(true);
registrar.registerFormatters(dfcs);
return dfcs;
}
}
| [
"[email protected]"
] | |
71ebb465252ea3b828264945d3ef6e0cf35763da | cc595e498faef14b5838c2dfa5cfadeff112868b | /.svn/pristine/71/71ebb465252ea3b828264945d3ef6e0cf35763da.svn-base | eab6fb7023d442124ff6e2e530d24ee2dc736b43 | [] | no_license | meiyang1990/vfsso | e990b95e59d38304692c370017577a6fb1de6249 | c97ebc1a410bbf497bfbdcadbe06e55cb5125c29 | refs/heads/master | 2021-01-10T07:33:50.462449 | 2016-02-25T06:19:41 | 2016-02-25T06:19:41 | 52,501,922 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 856 | /**
* Copyright 2014 netfinworks.com, Inc. All rights reserved.
*/
package com.netfinworks.vfsso.client.provider;
import com.netfinworks.rest.render.FrameDataProvider;
import com.netfinworks.vfsso.client.authapi.VfSsoUser;
import com.netfinworks.vfsso.client.common.SsoApiConfig;
import com.netfinworks.vfsso.client.common.VfSsoClientConfig;
/**
* <p>登出Url提供者</p>
* @author huipeng
* @version $Id: LoginUrlProvider.java, v 0.1 Jun 18, 2014 4:11:38 PM knico Exp $
*/
public class LogoutUrlProvider implements FrameDataProvider {
/* (non-Javadoc)
* @see com.netfinworks.rest.render.FrameDataProvider#provide()
*/
@Override
public Object provide() {
SsoApiConfig config = VfSsoClientConfig.getDefaultApiConfig();
return config != null ? config.buildLogoutUrl(VfSsoUser.getCurrentToken()) : "";
}
}
| [
"[email protected]"
] | ||
5815425d663ba510539300f9b682f9d60e5d4c84 | 616fe63b455e7cbc33107a4109b3dc2c81274366 | /BaseGameUtils/src/main/java/com/google/example/games/basegameutils/BaseGameActivity.java | a213b4452f3ff9a84263bceae886bde927f6bb1b | [] | no_license | oZBo/ColorMasterNew | dbcad32f3c1310509780a8c03125bbb30089bb31 | 71db965616beddca86c6e5f9e655ca34ed277ff2 | refs/heads/master | 2021-03-25T13:58:23.626149 | 2016-06-03T13:08:37 | 2016-06-03T13:08:37 | 39,776,328 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,132 | java | /*
* Copyright (C) 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.example.games.basegameutils;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import com.google.android.gms.common.api.GoogleApiClient;
/**
* Example base class for games. This implementation takes care of setting up
* the API client object and managing its lifecycle. Subclasses only need to
* override the @link{#onSignInSucceeded} and @link{#onSignInFailed} abstract
* methods. To initiate the sign-in flow when the user clicks the sign-in
* button, subclasses should call @link{#beginUserInitiatedSignIn}. By default,
* this class only instantiates the GoogleApiClient object. If the PlusClient or
* AppStateClient objects are also wanted, call the BaseGameActivity(int)
* constructor and specify the requested clients. For example, to request
* PlusClient and GamesClient, use BaseGameActivity(CLIENT_GAMES | CLIENT_PLUS).
* To request all available clients, use BaseGameActivity(CLIENT_ALL).
* Alternatively, you can also specify the requested clients via
* @link{#setRequestedClients}, but you must do so before @link{#onCreate}
* gets called, otherwise the call will have no effect.
*
* @author Bruno Oliveira (Google)
*/
public abstract class BaseGameActivity extends FragmentActivity implements
GameHelper.GameHelperListener {
// The game helper object. This class is mainly a wrapper around this object.
protected GameHelper mHelper;
// We expose these constants here because we don't want users of this class
// to have to know about GameHelper at all.
public static final int CLIENT_GAMES = GameHelper.CLIENT_GAMES;
public static final int CLIENT_APPSTATE = GameHelper.CLIENT_APPSTATE;
public static final int CLIENT_PLUS = GameHelper.CLIENT_PLUS;
public static final int CLIENT_ALL = GameHelper.CLIENT_ALL;
public static final int ACTIVITY_CODE_SHOW_LEADERBOARD = 500;
// Requested clients. By default, that's just the games client.
protected int mRequestedClients = CLIENT_GAMES;
private final static String TAG = "BaseGameActivity";
protected boolean mDebugLog = false;
/** Constructs a BaseGameActivity with default client (GamesClient). */
protected BaseGameActivity() {
super();
}
/**
* Constructs a BaseGameActivity with the requested clients.
* @param requestedClients The requested clients (a combination of CLIENT_GAMES,
* CLIENT_PLUS and CLIENT_APPSTATE).
*/
protected BaseGameActivity(int requestedClients) {
super();
setRequestedClients(requestedClients);
}
/**
* Sets the requested clients. The preferred way to set the requested clients is
* via the constructor, but this method is available if for some reason your code
* cannot do this in the constructor. This must be called before onCreate or getGameHelper()
* in order to have any effect. If called after onCreate()/getGameHelper(), this method
* is a no-op.
*
* @param requestedClients A combination of the flags CLIENT_GAMES, CLIENT_PLUS
* and CLIENT_APPSTATE, or CLIENT_ALL to request all available clients.
*/
protected void setRequestedClients(int requestedClients) {
mRequestedClients = requestedClients;
}
public GameHelper getGameHelper() {
if (mHelper == null) {
mHelper = new GameHelper(this, mRequestedClients);
mHelper.enableDebugLog(mDebugLog);
}
return mHelper;
}
@Override
protected void onCreate(Bundle b) {
super.onCreate(b);
if (mHelper == null) {
getGameHelper();
}
mHelper.setup(this);
}
@Override
protected void onStart() {
super.onStart();
mHelper.onStart(this);
}
@Override
protected void onStop() {
super.onStop();
mHelper.onStop();
}
@Override
protected void onActivityResult(int request, int response, Intent data) {
super.onActivityResult(request, response, data);
mHelper.onActivityResult(request, response, data);
}
protected GoogleApiClient getApiClient() {
return mHelper.getApiClient();
}
protected boolean isSignedIn() {
return mHelper.isSignedIn();
}
protected void beginUserInitiatedSignIn() {
mHelper.beginUserInitiatedSignIn();
}
protected void signOut() {
mHelper.signOut();
}
protected void showAlert(String message) {
mHelper.makeSimpleDialog(message).show();
}
protected void showAlert(String title, String message) {
mHelper.makeSimpleDialog(title, message).show();
}
protected void enableDebugLog(boolean enabled) {
mDebugLog = true;
if (mHelper != null) {
mHelper.enableDebugLog(enabled);
}
}
@Deprecated
protected void enableDebugLog(boolean enabled, String tag) {
Log.w(TAG, "BaseGameActivity.enabledDebugLog(bool,String) is " +
"deprecated. Use enableDebugLog(boolean)");
enableDebugLog(enabled);
}
protected String getInvitationId() {
return mHelper.getInvitationId();
}
protected void reconnectClient() {
mHelper.reconnectClient();
}
protected boolean hasSignInError() {
return mHelper.hasSignInError();
}
protected GameHelper.SignInFailureReason getSignInError() {
return mHelper.getSignInError();
}
}
| [
"[email protected]"
] | |
2456aad4944d7d5ed0243c1316de4ecc52326fa7 | 025adb2ab546d56258b3189737815d02af0c337d | /Java/SpringJDBC2/src/com/newsx/service/NewServiceImpl.java | b07d02ba2a8672e85ecb2d0ee088ce025ea37062 | [] | no_license | pseemakurthi/Java | 0d945524044ce9ee0d742761f1f39c97174db395 | 4863c00db5dda31f954f296547d350bdfceac338 | refs/heads/master | 2021-01-10T04:40:29.783322 | 2015-10-14T18:42:23 | 2015-10-14T18:42:23 | 44,268,600 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 874 | java | package com.newsx.service;
import java.util.List;
import org.springframework.jdbc.core.JdbcTemplate;
import com.newsx.DAO.NewsDAO;
import com.newsx.Domain.News;
import com.newsx.Domain.News2;
public class NewServiceImpl implements NewService{
private NewsDAO newsDAO;
public NewsDAO getNewsDAO() {
return newsDAO;
}
public void setNewsDAO(NewsDAO newsDAO) {
this.newsDAO = newsDAO;
}
@Override
public void printNews() {
// TODO Auto-generated method stub
newsDAO.printNews();
}
@Override
public List<News> getAllNews() {
// TODO Auto-generated method stub
return newsDAO.getAllNews();
}
@Override
public List<News2> getAllDefaultNews() {
// TODO Auto-generated method stub
return newsDAO.getDefaultNews();
}
@Override
public void saveNews(News news) {
// TODO Auto-generated method stub
newsDAO.persistNews(news);
}
}
| [
"[email protected]"
] | |
f576762d799314d177ef9c62e2ce39864cd29360 | 4f0a67217dd8c6eaeb7657af2ccbeda5220a3025 | /java/Pascal's Triangle II.java | 0d54287499ad9ff3926597d0023c91ec8cb11a1c | [] | no_license | RudyGuo/leetcode | 97c6392307246518641b6e1d4abc9941d109c430 | 2f98dd792f0a1eb2184c48d9331f6fe133f5b900 | refs/heads/master | 2016-09-06T07:18:27.115573 | 2015-05-10T14:16:21 | 2015-05-10T14:16:21 | 23,830,653 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 506 | java | /*
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
*/
public class Solution {
public List<Integer> getRow(int rowIndex) {
List<Integer> list = new ArrayList<>();
for(int i=0;i<rowIndex+1;i++){
for(int j=i-1;j>0;j--){
int element = list.get(j)+list.get(j-1);
list.set(j, element);
}
list.add(1);
}
return list;
}
}
| [
"[email protected]"
] | |
eda6ce96e7e0be343c40d24314af6dbf2117e31a | 1c71c9cde60e506e992dd6613a6b25c8edecfe6f | /src/main/java/kg/megacom/restaurantservice/database/OrderDetailsRepository.java | e9d1e425fa02b85477841f02e732b3fd1d747f30 | [] | no_license | jaabars/restaurant-service | 855063dce426faefc44bff943ed97e7c47379302 | 3abed1002dde5a67bcaa47705055dc6293e19fa0 | refs/heads/master | 2022-08-29T16:38:20.176435 | 2020-05-28T09:27:29 | 2020-05-28T09:27:29 | 263,010,444 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 323 | java | package kg.megacom.restaurantservice.database;
import kg.megacom.restaurantservice.model.entity.OrderDetails;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface OrderDetailsRepository extends JpaRepository<OrderDetails, Long> {
}
| [
"[email protected]"
] | |
f1f97acedc1472936f344e81b998a89ee2d28d68 | 65752b49ed0ed04444e7c207f1681de7fb2f6e9f | /app/src/main/java/tw/org/iii/rightnow/Live2D/framework/L2DMotionManager.java | afb169957835d1f3a6bfcca0dba82f83c8da6e1b | [] | no_license | levinvic/RightNow | dccfdf665aa9c9d0db3b311b4f6c3c9da7f8d56a | 1472dc4ef80915351b9807ad8f48c128c0d7491d | refs/heads/master | 2021-01-20T10:23:50.585571 | 2017-08-30T08:16:10 | 2017-08-30T08:16:10 | 101,632,519 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,545 | java | /**
*
* You can modify and use this source freely
* only for the development of application related Live2D.
*
* (c) Live2D Inc. All rights reserved.
*/
package tw.org.iii.rightnow.Live2D.framework;
import jp.live2d.ALive2DModel;
import jp.live2d.motion.AMotion;
import jp.live2d.motion.MotionQueueManager;
/*
* L2DMotionManagerは、優先度(priority)を指定してモーションの再生を管理するためのクラスです。
*
* 主に親クラスのMotionQueueManager(標準のLive2Dライブラリ)に不足する以下の機能を補います。
*
* 1.割り込みの制御
*
* 親クラスMotionQueueManagerでは、startMotionを呼び出すと新しいモーションが割り込みで
* スタートし既存のモーションは終了します。(前後のモーションは滑らかに繋がります)
*
* L2DMotionManagerではセリフ等の割り込まれたくないモーションの場合に、割り込みを防ぐ仕組みを
* 提供します。priority が同じ場合は、割り込みが発生せずに新しいモーションを無視します。
*
*
* 2.音声のロードとの連携
*
* タップなどのイベントが発生した際に、音声のロードが完了しておらずモーションを即時開始すると
* ズレてしまう場合があります。そのようなケースのために、次フレーム以降で再生することを予約する
* 仕組みを提供します。
*
*
*
*/
public class L2DMotionManager extends MotionQueueManager{
// メインモーションの優先度
// 標準設定 0:再生してない 1:アイドリング(割り込んで良い) 2:通常(基本割り込みなし) 3:強制で開始
private int currentPriority;// 現在再生中のモーションの優先度
private int reservePriority;// 再生予定のモーションの優先度。再生中は0になる。モーションファイルを別スレッドで読み込むときの機能。
/*
* 再生中のモーションの優先度
* @return
*/
public int getCurrentPriority()
{
return currentPriority;
}
/*
* 予約中のモーションの優先度
* @return
*/
public int getReservePriority()
{
return reservePriority;
}
/*
* 次に再生したいモーションのpriorityを渡して、再生予約できる状況か判断する
*
*
* @param priority
* @return
*/
public boolean reserveMotion(int priority)
{
if( reservePriority >= priority)
{
return false;// 再生予約がある(別スレッドで準備している)
}
if( currentPriority >= priority ){
return false;// 再生中のモーションがある
}
reservePriority=priority;// モーション再生が非同期の場合は優先度を先に設定して予約しておく
return true;
}
/*
* モーションを予約する
* @param val
*/
public void setReservePriority(int val)
{
reservePriority = val;
}
@Override
public boolean updateParam(ALive2DModel model)
{
boolean updated=super.updateParam(model);
if(isFinished()){
currentPriority=0;// 再生中モーションの優先度を解除
}
return updated;
}
public int startMotionPrio(AMotion motion,int priority)
{
if(priority==reservePriority)
{
reservePriority=0;// 予約を解除
}
currentPriority=priority;// 再生中モーションの優先度を設定
return super.startMotion(motion, false);// 第二引数はモーションデータを自動で削除するかどうか。Javaでは関係なし
}
}
| [
"[email protected]"
] | |
a20d6d8e284f7f9a5641f93ab3d31c5c4901adc0 | e72a7cf5a959e80e80fa92d94b8f99a8f4cf9543 | /src/main/java/edu/ecit/bean/MsgContent.java | 5e75c0474b40a5c27b6efbfc26d0b4c0095f80b8 | [] | no_license | 1098298479/hrsystem | 58b4ce9fc2a3b0c79574cf59987cf0a0532515f3 | d45fb4b6890dbf37d6d69081dcffb34d0198831b | refs/heads/master | 2022-07-08T14:27:05.332318 | 2019-08-12T15:31:44 | 2019-08-12T15:31:44 | 201,790,655 | 0 | 0 | null | 2022-06-29T17:34:13 | 2019-08-11T16:46:59 | Java | UTF-8 | Java | false | false | 854 | java | package edu.ecit.bean;
import java.io.Serializable;
import java.util.Date;
public class MsgContent implements Serializable{
//消息ID
private Long id;
//信息
private String message;
//标题
private String title;
//创建时间
private Date createDate;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
}
| [
"[email protected]"
] | |
87d7a62ff9799d5591db561a63a187abd245b253 | 7fc4a7cf96045784aae088ffc08c0288f98a3754 | /office/src/main/java/jp/kenichi/jna/tlb/office/MsoWizardMsgType.java | 8dbd39adc3992f6507344af9ec99516261725c65 | [
"MIT"
] | permissive | ken1ma/jna-tlb-access-2010 | afaa6d1612de43bfa0709f1af16789ab2647ce29 | b469b2f15b5f3f17d05d578a25e3a8211b05a83b | refs/heads/master | 2020-03-13T18:57:11.724825 | 2018-04-27T05:11:56 | 2018-05-01T07:55:02 | 131,245,017 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 630 | java |
package jp.kenichi.jna.tlb.office;
import com.sun.jna.platform.win32.COM.util.IComEnum;
public enum MsoWizardMsgType implements IComEnum {
/**
* (1)
*/
msoWizardMsgLocalStateOn(1),
/**
* (2)
*/
msoWizardMsgLocalStateOff(2),
/**
* (3)
*/
msoWizardMsgShowHelp(3),
/**
* (4)
*/
msoWizardMsgSuspending(4),
/**
* (5)
*/
msoWizardMsgResuming(5),
;
private MsoWizardMsgType(long value) {
this.value = value;
}
private long value;
public long getValue() {
return this.value;
}
} | [
""
] | |
010e7d9a3c9db9a94311b952fb8584bdba7706a0 | 7ec4d249e6d633695ec86d1e7a9b5c71e4387ca7 | /app/src/main/java/com/ram/sharedpreferancelogin/MainActivity.java | 83557487bdf61460d6b8c8dcd6979ee4dfdc6e4a | [] | no_license | ram743128/Shared-Preference | bcb266e9820747765548c7eb5af9272c13b47625 | f4df1dd7c96f82e6e6253afca7f87ffa2d2e9446 | refs/heads/master | 2021-01-16T19:11:43.958183 | 2017-08-13T04:33:54 | 2017-08-13T04:33:54 | 100,153,887 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,333 | java | package com.ram.sharedpreferancelogin;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
public class MainActivity extends AppCompatActivity {
private EditText mName;
private EditText mPassword;
private SharedPreferences mSp;
private SharedPreferences.Editor mEdit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mName = (EditText)findViewById(R.id.Name_et);
mPassword = (EditText)findViewById(R.id.password_et);
mSp = getSharedPreferences(Constant.PREF_NAME,MODE_APPEND);
mEdit = mSp.edit();//calling the edit method of shared referance istance.
}
public void Login(View view) {
Intent intent=new Intent(MainActivity.this,HomePageActivity.class);
mEdit.putString(Constant.NAME,mName.getText().toString());
mEdit.putString(Constant.PASSWORD,mPassword.getText().toString());
mEdit.apply();
startActivity(intent);
}
@Override
protected void onRestart() {
super.onRestart();
mName.setText("");
mPassword.setText("");
}
}
| [
"[email protected]"
] | |
672f94df7d7360cdc6d321963f370e32bd3edd3a | 06be228a15645f3c3465618a83a6a9129542cf5a | /Main2Activity.java | 3df0029c5a95a40b7c4cb27a40d1038e5ab12594 | [] | no_license | Trevott/Fizu-2 | 0b7746ffbdd1839d08edbdec45e9700425961a13 | 9e36d65de64ebf56a65c76d932bea172e02e7382 | refs/heads/master | 2022-07-30T17:14:37.933837 | 2020-05-22T17:47:52 | 2020-05-22T17:47:52 | 266,172,468 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 38,103 | java | package com.trevott.fizu;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import android.app.DatePickerDialog;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.database.sqlite.SQLiteException;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import java.text.DateFormat;
import java.util.Calendar;
public class Main2Activity extends Fragment {
private EditText workStart, workEnd, overtimeStart, overtimeEnd;
private TextView dateText, workDayText, dayOffText, sickPayText, feastDayText, addText, resultText;
private int year, month, day;
private String dayName;
private String választottTípus = "Munkanap"; //selected item when start the app
private String dateString;
private int háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék, szövegSzínePiros, szövegSzíneZöld, szövegSzíneKék;
private int gombSzínePiros, gombSzíneZöld, gombSzíneKék;
private SetTheme téma;
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.activity_main2, container, false);
téma = new SetTheme();
//initialize the correct color of background, words and buttons
háttérSzínePiros = téma.getHáttérSzínePiros();
háttérSzíneZöld = téma.getHáttérSzíneZöld();
háttérSzíneKék = téma.getHáttérSzíneKék();
szövegSzínePiros = téma.getSzövegSzínePiros();
szövegSzíneZöld = téma.getSzövegSzíneZöld();
szövegSzíneKék = téma.getSzövegSzíneKék();
gombSzínePiros = téma.getGombSzínePiros();
gombSzíneZöld = téma.getGombSzíneZöld();
gombSzíneKék = téma.getGombSzíneKék();
root.setBackgroundColor(Color.rgb(háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék));
MainActivity.toolbar.setBackgroundColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
MainActivity.navigationView.setItemTextColor(ColorStateList.valueOf(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék)));
MainActivity.navigationView.setItemIconTintList(ColorStateList.valueOf(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék)));
MainActivity.navigationView.setBackgroundColor(Color.rgb(háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék));
workStart = root.findViewById(R.id.editKezdés);
workEnd = root.findViewById(R.id.editVége);
overtimeStart = root.findViewById(R.id.editKezdésTúlóra);
overtimeEnd = root.findViewById(R.id.editVégeTúlóra);
dateText = root.findViewById(R.id.textDátum);
workDayText = root.findViewById(R.id.textMunkanap);
dayOffText = root.findViewById(R.id.textSzabadság);
sickPayText =root.findViewById(R.id.textTáppénz);
feastDayText = root.findViewById(R.id.textFizetettÜnnep);
addText = root.findViewById(R.id.textHozzáadás);
resultText = root.findViewById(R.id.textEredmény);
//set the correct color of backround, words and buttons
addText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
dateText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
workStart.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
workStart.setHintTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
workEnd.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
workEnd.setHintTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
overtimeStart.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
overtimeStart.setHintTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
overtimeEnd.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
overtimeEnd.setHintTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
TextView textEgy = root.findViewById(R.id.textOne);
textEgy.setTextColor(Color.rgb(szövegSzínePiros, szövegSzíneZöld, szövegSzíneKék));
TextView textMunkaidő = root.findViewById(R.id.textMunkaidő);
textMunkaidő.setTextColor(Color.rgb(szövegSzínePiros, szövegSzíneZöld, szövegSzíneKék));
TextView textTúlóra = root.findViewById(R.id.textTúlóra);
textTúlóra.setTextColor(Color.rgb(szövegSzínePiros, szövegSzíneZöld, szövegSzíneKék));
TextView elsőKötőjel = root.findViewById(R.id.firstHyphen);
elsőKötőjel.setTextColor(Color.rgb(szövegSzínePiros, szövegSzíneZöld, szövegSzíneKék));
TextView másodikKötőjel = root.findViewById(R.id.secondHyphen);
másodikKötőjel.setTextColor(Color.rgb(szövegSzínePiros, szövegSzíneZöld, szövegSzíneKék));
workDayText.setTextColor(Color.rgb(háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék));
dayOffText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
sickPayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
feastDayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
//set date text
final Calendar calendar = Calendar.getInstance();
year = calendar.get(Calendar.YEAR);
month = calendar.get(Calendar.MONTH);
day = calendar.get(Calendar.DAY_OF_MONTH);
//write the actual salary on the main page
resultText.setTextColor(Color.rgb(szövegSzínePiros, szövegSzíneZöld, szövegSzíneKék));
resultText.setText("Ez évi szabadságok eddig: " + String.valueOf(MainActivity.controller.getSzabiszám(year)) +
"\n\nE havi fizetés eddig: " + String.valueOf(MainActivity.controller.getHaviFizu(year, month)) + " Ft");
dateString = DateFormat.getDateInstance(DateFormat.FULL).format(calendar.getTime());
dateText.setText(dateString);
dayName = setDayName(dateString);
//set day type selector's color
workDayText.setBackgroundColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék)); //first step
workDayText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//set background color on this text green
workDayText.setBackgroundColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
//set text color white
workDayText.setTextColor(Color.rgb(háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék));
//set background color on all other texts white
dayOffText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
sickPayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
feastDayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
dayOffText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
sickPayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
feastDayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
választottTípus = "Munkanap";
}
});
dayOffText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//set background color on this text green
dayOffText.setBackgroundColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
//set text color white
dayOffText.setTextColor(Color.rgb(háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék));
//set background color on all other texts white
workDayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
sickPayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
feastDayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
workDayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
sickPayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
feastDayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
választottTípus = "Szabadság";
}
});
sickPayText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//set background color on this text green
sickPayText.setBackgroundColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
//set text color white
sickPayText.setTextColor(Color.rgb(háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék));
//set background color on all other texts white
workDayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
dayOffText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
feastDayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
workDayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
dayOffText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
feastDayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
választottTípus = "Táppénz";
}
});
feastDayText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//set background color on this text green
feastDayText.setBackgroundColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
//set text color white
feastDayText.setTextColor(Color.rgb(háttérSzínePiros, háttérSzíneZöld, háttérSzíneKék));
//set background color on all other texts white
workDayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
dayOffText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
sickPayText.setBackgroundColor(Color.rgb(háttérSzínePiros,háttérSzíneZöld,háttérSzíneKék));
workDayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
dayOffText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
sickPayText.setTextColor(Color.rgb(gombSzínePiros, gombSzíneZöld, gombSzíneKék));
választottTípus = "Fizetett ünnep";
}
});
//set date selector
dateText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
DatePickerDialog dialog = new DatePickerDialog(getActivity(),
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker datePicker, int year1, int month1, int day1) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, year1);
calendar.set(Calendar.MONTH, month1);
calendar.set(Calendar.DAY_OF_MONTH, day1);
dateString = DateFormat.getDateInstance(DateFormat.FULL).format(calendar.getTime());
year = year1;
month = month1;
day = day1;
//get the name of the day
dayName = setDayName(dateString);
dateText.setText(dateString);
}
}, year, month, day);
dialog.show();
}
});
addText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
double munkaKezd = 0.0;
double munkaVég = 0.0;
double túlóraKezd = 0.0;
double túlóraVég = 0.0;
double fizetés = 0.0;
double munkaÓra = 0.0;
try {
double órabér = Double.parseDouble(MainActivity.controller.getÓrabér());
double munkaviszony = Double.parseDouble(MainActivity.controller.getMunkaviszony());
double hétköznapiPótlék = Double.parseDouble(MainActivity.controller.getHétköznapiPótlék());
int hétköznapiPótlékKezdete = Integer.parseInt(MainActivity.controller.getHétköznapiKezd());
int hétköznapiPótlékVége = Integer.parseInt(MainActivity.controller.getHétköznapiVég());
int szombatiPótlékKezdete = Integer.parseInt(MainActivity.controller.getSzombatiKezd());
double szombatiPótlék = Double.parseDouble(MainActivity.controller.getSzombatiPótlék());
int vasárnapiPótlékKezdete = Integer.parseInt(MainActivity.controller.getVasárnapiKezd());
double vasárnapiPótlék = Double.parseDouble(MainActivity.controller.getVasárnapiPótlék());
double hétköznapiTúlóra = Double.parseDouble(MainActivity.controller.getHétköznapiTúlóra());
double szombatiTúlóra = Double.parseDouble(MainActivity.controller.getSzombatiTúlóra());
double vasárnapiTúlóra = Double.parseDouble(MainActivity.controller.getVasárnapiTúlóra());
int munkahelyTávolsága = Integer.parseInt(MainActivity.controller.getMunkahelyTávolsága());
int útiköltségTámogatás = Integer.parseInt(MainActivity.controller.getÚtiköltség());
//külön kezeljük a munkanap időpontjainak és a túlóra időpontjainak megadásához köthető kivételeket, mert nem minden esetben akar megadni az ember túlórát
try {
if (választottTípus.equals("Munkanap")) {
munkaKezd = Double.parseDouble(workStart.getText().toString()); //ebben a négy sorban a leheséges hibákat a legfontosabb kezelni, ezért ezeknek a kezelésére szolgál
munkaVég = Double.parseDouble(workEnd.getText().toString()); //a fő try ciklus
}
if (munkaVég < munkaKezd) {
throw new Exception("Hoppá!");
}
try {
túlóraKezd = Double.parseDouble(overtimeStart.getText().toString());
túlóraVég = Double.parseDouble(overtimeEnd.getText().toString());
} catch (Exception e) {
túlóraKezd = 0;
túlóraVég = 0;
}
try {
//kiszámoljuk az adott nap óráit, behívjuk az órabért az adatbázisból és ennek a segítségével kiszámoljuk a naphoz tartozó fizetést is, ezután ezen iformációkat is
//hozzáadjuk a munkanap adatbázisunkhoz
//azért szorzok minden értéket ezerrel, hogy a felhasználó megadhasson tört számokat is
//kezdetben 0.01-es szorzással próbálkoztam, de ekkor rendkívűl hosszú tört számokat kaptam egész számok helyett
//viszont a 0.001 lecserélése 1000-re megoldotta ezt a problémát, de így az insert_munkanap meghívásánál kell osztanom őket 1000-el
//az adott munkanap fizetésének kiszámolása, később ezt adjuk hozzá az adatbázishoz *********************************************************************************************
if (választottTípus.equals("Szabadság") || választottTípus.equals("Fizetett ünnep")) {
//ha szabi vagy fiz ünnep, vagy táápénz van kijelölve, akkor nem jó ha be van írva a munka kezd és vég
//mert talán ekkor nem jó nap típust válszott véletlen a felhasználó
fizetés = munkaviszony * órabér;
} else if (választottTípus.equals("Táppénz")) {
fizetés = munkaviszony * órabér * 0.65;
} else if (választottTípus.equals("Munkanap") && (dayName.equals("Hétfő") || dayName.equals("Kedd") || dayName.equals("Szerda") || dayName.equals("Csütörtök"))) {
//először az éjféltől a reggeli pótlékos időszak végéig tartó időszakra vonatkozó fizetést számoljuk ki, mert később a regeli időpontot +24-el fogjuk korrigálni
for (double i = munkaKezd * 1000 + 1; i <= munkaVég * 1000; i++) {
if (i <= hétköznapiPótlékVége * 1000) {
fizetés = fizetés + órabér * (hétköznapiPótlék / 100);
}
}
//korrigáljuk az éjfél utáni időpontokat a munkanap a pótlékok és a túlóra esetében is (de túlóránál figyelni kell arra is, hogy ha éjfél után kezdődik a túlóra
//akkor a kezdő és a vég pontját is korrigáljuk +24-el, és ha így a túlóra értékei a műszak értékein kívül esnek, akkor baj van
if (munkaKezd >= munkaVég) {
munkaVég = munkaVég + 24;
}
if (hétköznapiPótlékKezdete >= hétköznapiPótlékVége) {
hétköznapiPótlékVége = hétköznapiPótlékVége +24;
}
if (túlóraKezd != 0 || túlóraVég != 0) {
if (túlóraKezd < munkaKezd) {
túlóraKezd = túlóraKezd +24;
}
if (túlóraKezd > túlóraVég) {
túlóraVég = túlóraVég +24;
}
if (túlóraVég > munkaVég || túlóraKezd < munkaKezd || túlóraKezd > túlóraVég) { //ha a felhasználó a túlórát nem a munkaidőn belül adja meg és stb...
throw new Exception();
}
}
for (double i = munkaKezd * 1000 + 1; i <= munkaVég * 1000; i++) {
fizetés = fizetés + órabér;
munkaÓra++;
//pótlékok
if (i > hétköznapiPótlékKezdete * 1000 && i <= hétköznapiPótlékVége * 1000) {
fizetés = fizetés + órabér * (hétköznapiPótlék / 100);
}
//túlóra
if (i > túlóraKezd * 1000 && i <= túlóraVég * 1000) {
fizetés = fizetés + órabér * (hétköznapiTúlóra / 100);
}
}
//korrigálás minden naptípus esetén, kivéve szabi, táppénz, fiz ünnep
fizetés = fizetés / 1000;
//az esetleges útiköltség támogatás hozzáadása
fizetés = fizetés + (munkahelyTávolsága * 2 * útiköltségTámogatás);
} else if (választottTípus.equals("Munkanap") && dayName.equals("Péntek")) {
//először az éjféltől a reggeli pótlékos időszak végéig tartó időszakra vonatkozó fizetést számoljuk ki, mert később a regeli időpontot +24-el fogjuk korrigálni
for (double i = munkaKezd * 1000 + 1; i <= munkaVég * 1000; i++) {
if (i <= hétköznapiPótlékVége * 1000) {
fizetés = fizetés + órabér * (hétköznapiPótlék / 100);
}
}
//korrigáljuk az éjfél utáni időpontokat a munkanap a pótlékok és a túlóra esetében is (de túlóránál figyelni kell arra is, hogy ha éjfél után kezdődik a túlóra
//akkor a kezdő és a vég pontját is korrigáljuk +24-el, és ha így a túlóra értékei a műszak értékein kívül esnek, akkor baj van
if (munkaVég <= munkaKezd) {
munkaVég = munkaVég + 24;
}
if (hétköznapiPótlékKezdete >= hétköznapiPótlékVége) {
hétköznapiPótlékVége = hétköznapiPótlékVége +24;
}
if (túlóraKezd != 0 || túlóraVég != 0) {
if (túlóraKezd < munkaKezd) {
túlóraKezd = túlóraKezd +24;
}
if (túlóraKezd > túlóraVég) {
túlóraVég = túlóraVég +24;
}
}
for (double i = munkaKezd * 1000 + 1; i <= munkaVég * 1000; i++) {
//síma órabér és óraszám számolása
fizetés = fizetés + órabér;
munkaÓra++;
//pótlék hozzáadása, de éjfélig a hétközi jár utána pedig esetleg a szombati
if (i <= 24000 && i > hétköznapiPótlékKezdete * 1000 && i <= hétköznapiPótlékVége * 1000) {
fizetés = fizetés + órabér * (hétköznapiPótlék / 100);
}
if (i > 24000 && i > szombatiPótlékKezdete * 1000) {
fizetés = fizetés + órabér * (szombatiPótlék / 100);
}
//túlóra
if (i > túlóraKezd * 1000 && i <= túlóraVég * 1000) {
if (i <= 24000) {
fizetés = fizetés + órabér * (hétköznapiTúlóra / 100);
} else if (i > 24000) {
fizetés = fizetés + órabér * (szombatiTúlóra / 100);
}
}
}
//korrigálás minden naptípus esetén, kivéve szabi, táppénz, fiz ünnep
fizetés = fizetés / 1000;
//az esetleges útiköltség támogatás hozzáadása
fizetés = fizetés + (munkahelyTávolsága * 2 * útiköltségTámogatás);
} else if (választottTípus.equals("Munkanap") && dayName.equals("Szombat")) {
if (munkaVég <= munkaKezd) {
munkaVég = munkaVég + 24;
}
if (túlóraKezd != 0 || túlóraVég != 0) {
if (túlóraKezd < munkaKezd) {
túlóraKezd = túlóraKezd +24;
}
if (túlóraKezd > túlóraVég) {
túlóraVég = túlóraVég +24;
}
}
for (double i = munkaKezd * 1000 + 1; i <= munkaVég * 1000; i++) {
//síma órabér és óraszám számolása
fizetés = fizetés + órabér;
munkaÓra++;
//pótlék hozzáadása, de éjfélig a szombati jár utána pedig esetleg a vasárnapi
if (i <= 24000 && i > szombatiPótlékKezdete * 1000) {
fizetés = fizetés + órabér * (szombatiPótlék / 100);
}
if (i > 24000 && i > vasárnapiPótlékKezdete * 1000) {
fizetés = fizetés + órabér * (vasárnapiPótlék / 100);
}
//túlóra
if (i > túlóraKezd * 1000 && i <= túlóraVég * 1000) {
if (i <= 24000) {
fizetés = fizetés + órabér * (szombatiTúlóra / 100);
} else if (i > 24000) {
fizetés = fizetés + órabér * (vasárnapiTúlóra / 100);
}
}
}
//korrigálás minden naptípus esetén, kivéve szabi, táppénz, fiz ünnep
fizetés = fizetés / 1000;
//az esetleges útiköltség támogatás hozzáadása
fizetés = fizetés + (munkahelyTávolsága * 2 * útiköltségTámogatás);
} else if (választottTípus.equals("Munkanap") && dayName.equals("Vasárnap")) {
if (munkaVég <= munkaKezd) {
munkaVég = munkaVég + 24;
}
if (hétköznapiPótlékKezdete >= hétköznapiPótlékVége) {
hétköznapiPótlékVége = hétköznapiPótlékVége +24;
}
if (túlóraKezd != 0 || túlóraVég != 0) {
if (túlóraKezd < munkaKezd) {
túlóraKezd = túlóraKezd +24;
}
if (túlóraKezd > túlóraVég) {
túlóraVég = túlóraVég +24;
}
}
for (double i = munkaKezd * 1000 + 1; i <= munkaVég * 1000; i++) {
//síma órabér és óraszám számolása
fizetés = fizetés + órabér;
munkaÓra++;
//pótlék hozzáadása, de éjfélig a hétközi jár utána pedig esetleg a szombati
if (i <= 24000 && i > vasárnapiPótlékKezdete * 1000) {
fizetés = fizetés + órabér * (vasárnapiPótlék / 100);
}
if (i > 24000 && i > hétköznapiPótlékKezdete * 1000 && i <= hétköznapiPótlékVége * 1000) {
fizetés = fizetés + órabér * (hétköznapiPótlék / 100);
}
//túlóra
if (i > túlóraKezd * 1000 && i <= túlóraVég * 1000) {
if (i <= 24000) {
fizetés = fizetés + órabér * (vasárnapiTúlóra / 100);
} else if (i > 24000) {
fizetés = fizetés + órabér * (hétköznapiTúlóra / 100);
}
}
}
//korrigálás minden naptípus esetén, kivéve szabi, táppénz, fiz ünnep
fizetés = fizetés / 1000;
//az esetleges útiköltség támogatás hozzáadása
fizetés = fizetés + (munkahelyTávolsága * 2 * útiköltségTámogatás);
}
//visszaállítjuk a munkanap befejező és a túlóra befejező időpontjait az eredetire, hogy a listában majd ezt lássa a felhasználó
if (munkaVég > 24) {
munkaVég = munkaVég - 24;
}
if (túlóraVég > 24) {
túlóraVég = túlóraVég - 24;
}
//tovább konvertáljuk az időpiontokat az időformátumnak megfelelően 12.5 helyett szebben mutat a 12:30
String szépMunkaKezd = időpontFormázó(munkaKezd);
String szépMunkaVég = időpontFormázó(munkaVég);
String szépTúlóraKezd = időpontFormázó(túlóraKezd);
String szépTúlóraVég = időpontFormázó(túlóraVég);
MainActivity.controller.insert_munkanap(0, year, month + 1, day, dayName, választottTípus, szépMunkaKezd, szépMunkaVég, szépTúlóraKezd, szépTúlóraVég,
String.valueOf(fizetés), String.valueOf(munkaÓra / 1000));
Toast.makeText(getActivity(), "Munkanap sikeresen hozzáadva.", Toast.LENGTH_LONG).show();
} catch (SQLiteException e) {
Toast.makeText(getActivity(), "Adatbázis már létezik.", Toast.LENGTH_LONG).show();
}
} catch (Exception e) {
Toast.makeText(getActivity(), "Hiba a bevitt adatokban! Ellenőrizd őket!", Toast.LENGTH_LONG).show();
}
} catch (Exception e) {
Toast.makeText(getActivity(), "Első alkalommal a pótlékok és egyéb opciók elmentése szükséges!", Toast.LENGTH_LONG).show();
}
//a gomb lenyomásakor frissíteni kell a fizetés kijelzésére szolgáló textet
resultText.setText("Ez évi szabadságok eddig: " + MainActivity.controller.getSzabiszám(year) +
"\n\nE havi fizetés eddig: " + MainActivity.controller.getHaviFizu(year, month) + " Ft");
}
});
return root;
}
private String setDayName(String dátumStringje) {
//a dateString utolsó karakterei az adott napnak a neve, ezt kell kinyernem, hogy később hozzá tudjam adni az adatbázishoz
int hossz = dátumStringje.length();
String dayNameHun = String.valueOf(dateString.charAt(hossz-7));
dayNameHun = dayNameHun + String.valueOf(dateString.charAt(hossz-6));
dayNameHun = dayNameHun + String.valueOf(dateString.charAt(hossz-5));
dayNameHun = dayNameHun + String.valueOf(dateString.charAt(hossz-4));
dayNameHun = dayNameHun + String.valueOf(dateString.charAt(hossz-3));
dayNameHun = dayNameHun + String.valueOf(dateString.charAt(hossz-2));
dayNameHun = dayNameHun + String.valueOf(dateString.charAt(hossz-1));
//angol eset kezelése:
String dayNameEn = String.valueOf(dateString.charAt(0));
dayNameEn = dayNameEn + String.valueOf(dateString.charAt(1));
dayNameEn = dayNameEn + String.valueOf(dateString.charAt(2));
dayNameEn = dayNameEn + String.valueOf(dateString.charAt(3));
dayNameEn = dayNameEn + String.valueOf(dateString.charAt(4));
dayNameEn = dayNameEn + String.valueOf(dateString.charAt(5));
dayNameEn = dayNameEn + String.valueOf(dateString.charAt(6));
if (dayNameHun.equals(", hétfő") || dayNameEn.equals("Monday,")) {
return "Hétfő";
}
else if(dayNameHun.equals("., kedd") || dayNameEn.equals("Tuesday")) {
return "Kedd";
}
else if(dayNameHun.equals(" szerda") || dayNameEn.equals("Wednesd")) {
return "Szerda";
}
else if(dayNameHun.equals("ütörtök") || dayNameEn.equals("Thursda")) {
return "Csütörtök";
}
else if(dayNameHun.equals(" péntek") || dayNameEn.equals("Friday,")) {
return "Péntek";
}
else if(dayNameHun.equals("szombat") || dayNameEn.equals("Saturda")) {
return "Szombat";
}
else if(dayNameHun.equals("asárnap") || dayNameEn.equals("Sunday,")) {
return "Vasárnap";
}
else {
return "Kedd";
}
}
private String időpontFormázó(double időpont) {
//az oszály feladata, hogy a felhasználó által megadott időpontokat (melyek double típusúak nem pedig idő formátumúak), alakítsa át a munkanap listában szépen mutató
//idő formátummá
String időpontString = String.valueOf(időpont);
String újIdőpont = "";
//az időpontStringet egy új stringgé alakítjuk karakterről-karakterre azért, hogy a stringben lévő pontot kettősponttá alakítsuk (így szebb lesz a munkanaplista)
int hossz = időpontString.length();
for (int i = 0; i < hossz; i++) {
try {
int utolsóSzám = Integer.parseInt(String.valueOf(időpontString.charAt(i)));
int utolsóElőttiSzám = 999;
try {
utolsóElőttiSzám = Integer.parseInt(String.valueOf(időpontString.charAt(i - 1)));
} catch (Exception ex) {
}
//át kell alakítani a perceket pl 0.5-ről 30-ra
if (i > 1) {
if (utolsóSzám == 5 && utolsóElőttiSzám == 2) {
újIdőpont = újIdőpont + "15";
} else if (utolsóSzám == 5 && utolsóElőttiSzám == 7) {
újIdőpont = újIdőpont + "45";
} else if (utolsóSzám == 0 && utolsóElőttiSzám == 0) {
újIdőpont = újIdőpont + "00";
} else if (utolsóSzám == 5) {
újIdőpont = újIdőpont + "30";
}
} else {
//de ha az i kisebb mint 1 akkkor még tuti az óráknál tartunk még
újIdőpont = újIdőpont + String.valueOf(időpontString.charAt(i));
}
} catch (Exception e) {
if (String.valueOf(időpontString.charAt(i)).equals(".")) {
újIdőpont = újIdőpont + ":";
}
}
}
//ha kettőspont az újIdőpontunk vége, akkor a felhasználó csak egy egész számot adott meg pl:12 ekkor szebb ha 12:00 jelenik meg a munkanaplistában
int stringHossza = újIdőpont.length() - 1;
if (String.valueOf(újIdőpont.charAt(stringHossza)).equals(":")) {
újIdőpont = újIdőpont + "00";
}
return újIdőpont;
}
}
| [
"[email protected]"
] | |
091ca35e6469e5c254c564427a69e6337a0ed5c8 | 72498f748af7158be95647bcb62c04560d47d087 | /LinkedListNode.java | c183f15112c503b12e45633c46014cba6ef733d8 | [] | no_license | BBK-PiJ-2016-02/cw-ds | d07d27bd41ce6d10bb53d2a40deb494b2d472ff4 | ca39109990b66be3699b63985bbd877d3c51848e | refs/heads/master | 2021-01-13T16:40:29.051944 | 2017-03-06T15:59:54 | 2017-03-06T15:59:54 | 78,181,245 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 391 | java | public class LinkedListNode {
private Object value;
private LinkedListNode next;
public LinkedListNode(Object value) {
setValue(value);
}
public LinkedListNode getNext() {
return this.next;
}
public void setNext(LinkedListNode next) {
this.next = next;
}
public Object getValue() {
return this.value;
}
public void setValue(Object value) {
this.value = value;
}
}
| [
"[email protected]"
] | |
eeaffeb442aa43a57d29ab3cb427ab9d8a1ce8eb | 0907c886f81331111e4e116ff0c274f47be71805 | /sources/com/tappx/a/s.java | d6713336e7bd1ad8b2b0c71f952addeac7443c5c | [
"MIT"
] | permissive | Minionguyjpro/Ghostly-Skills | 18756dcdf351032c9af31ec08fdbd02db8f3f991 | d1a1fb2498aec461da09deb3ef8d98083542baaf | refs/heads/Android-OS | 2022-07-27T19:58:16.442419 | 2022-04-15T07:49:53 | 2022-04-15T07:49:53 | 415,272,874 | 2 | 0 | MIT | 2021-12-21T10:23:50 | 2021-10-09T10:12:36 | Java | UTF-8 | Java | false | false | 2,288 | java | package com.tappx.a;
import android.net.Uri;
import com.tappx.a.a0;
import com.tappx.a.d0;
import com.tappx.a.f0;
import java.io.UnsupportedEncodingException;
import java.util.Map;
public class s extends d0<y1> {
private static final String i = f.b("7lAm3cGZz4MMRzfjNT4s5w");
private final String f;
private final x g;
private final String h;
public static class a {
/* renamed from: a reason: collision with root package name */
private final x f571a;
public a(x xVar) {
this.f571a = xVar;
}
/* access modifiers changed from: package-private */
public s a(String str, String str2, f0.b<y1> bVar, f0.a aVar) {
return new s(this.f571a, str, str2, bVar, aVar);
}
}
s(x xVar, String str, String str2, f0.b<y1> bVar, f0.a aVar) {
super(bVar, aVar);
this.g = xVar;
this.f = str + n.d();
this.h = str2;
a(false);
a(new g0(10000, 1, 1.0f));
}
public byte[] a() {
String str = this.h;
if (str == null) {
return null;
}
try {
return str.getBytes("utf-8");
} catch (UnsupportedEncodingException unused) {
j0.d("mcDfyrZIyDh7srkDi3vhYS4jCqm7NCw5DOnMQ6j4pn8", new Object[0]);
return null;
}
}
public Map<String, String> c() {
return h();
}
public d0.a d() {
return d0.a.POST;
}
public String g() {
Uri.Builder buildUpon = Uri.parse(this.f).buildUpon();
buildUpon.appendQueryParameter(i, String.valueOf(System.currentTimeMillis() / 1000));
return buildUpon.build().toString();
}
/* access modifiers changed from: protected */
public f0<y1> a(c0 c0Var) {
try {
j0.d("zEfD4hGYqgGlREP0sIIg/hstxJ7mtJesC+XfeD//U5A", String.valueOf(c0Var.c), this.f);
w1 a2 = this.g.a(c0Var);
if (a2.f()) {
return f0.a(new a0(a0.a.NO_FILL));
}
u1 u1Var = a2.b().get(0);
if (u1Var instanceof y1) {
return f0.a((y1) u1Var);
}
throw new c2();
} catch (c2 unused) {
return f0.a(new a0(a0.a.PARSE_ERROR));
}
}
}
| [
"[email protected]"
] | |
e719eac4eeed8c893f74683e481a9e768ce6ec46 | 33d0f48b9c9712fd1e43240c3356e2ea5beb81d6 | /kie-dmn/kie-dmn-feel-gwt/src/main/java/org/kie/dmn/feel/parser/feel11/FEELErrorHandler.java | fd691ad341647e130e95592e99745773d362471b | [
"Apache-2.0"
] | permissive | AlohaChina/drools | 2372d2744c16e0b8399dc44136d3ebc15b96a639 | 5aabfa42093ae514745285c745617ab620eb7057 | refs/heads/master | 2023-01-24T18:26:43.649068 | 2023-01-15T11:06:57 | 2023-01-15T11:06:57 | 244,274,389 | 0 | 0 | Apache-2.0 | 2020-03-02T03:47:10 | 2020-03-02T03:47:09 | null | UTF-8 | Java | false | false | 1,063 | java | /*
* Copyright 2021 Red Hat, Inc. and/or its affiliates.
*
* 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.kie.dmn.feel.parser.feel11;
import org.antlr.v4.runtime.DefaultErrorStrategy;
import org.antlr.v4.runtime.FailedPredicateException;
import org.antlr.v4.runtime.Parser;
public class FEELErrorHandler extends DefaultErrorStrategy {
@Override
protected void reportFailedPredicate(final Parser recognizer,
final FailedPredicateException e) {
// Do not do anything.
}
}
| [
"[email protected]"
] | |
a576ab5811fcafd95d2538467f76d39140fdb9b5 | b25a27459845d18085d818c566cade4d518ddea0 | /aether-util/src/test/java/org/sonatype/aether/util/NodeBuilder.java | 3408e115722b6c6863bb72342d006a24b117e722 | [] | no_license | jdcasey/sonatype-aether | 331c38d81cdd6cb7030e24ae2df54c3e18c2623f | 47db72f6182557745d6e9f2c99886c7f7acfcaf0 | refs/heads/master | 2021-01-18T12:35:20.944032 | 2010-08-02T14:52:58 | 2010-08-02T14:52:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,934 | java | package org.sonatype.aether.util;
/*
* Copyright (c) 2010 Sonatype, Inc. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
*/
import java.util.ArrayList;
import java.util.List;
import org.sonatype.aether.Artifact;
import org.sonatype.aether.DefaultArtifact;
import org.sonatype.aether.Dependency;
import org.sonatype.aether.DependencyNode;
import org.sonatype.aether.util.graph.DefaultDependencyNode;
/**
* @author Benjamin Bentmann
*/
class NodeBuilder
{
private String groupId = "test";
private String artifactId = "";
private String version = "0.1";
private String ext = "jar";
private String classifier = "";
private String scope = "compile";
private boolean optional = false;
private String context;
private DependencyNode parent;
private List<Artifact> relocations = new ArrayList<Artifact>();
public NodeBuilder artifactId( String artifactId )
{
this.artifactId = artifactId;
return this;
}
public NodeBuilder scope( String scope )
{
this.scope = scope;
return this;
}
public NodeBuilder parent( DependencyNode parent )
{
this.parent = parent;
return this;
}
public NodeBuilder context( String context )
{
this.context = context;
return this;
}
public NodeBuilder reloc( String artifactId )
{
Artifact relocation = new DefaultArtifact( groupId, artifactId, classifier, ext, version );
relocations.add( relocation );
return this;
}
public NodeBuilder reloc( String groupId, String artifactId, String version )
{
Artifact relocation = new DefaultArtifact( groupId, artifactId, classifier, ext, version );
relocations.add( relocation );
return this;
}
public DependencyNode build()
{
Dependency dependency = null;
if ( artifactId != null && artifactId.length() > 0 )
{
Artifact artifact = new DefaultArtifact( groupId, artifactId, classifier, ext, version );
dependency = new Dependency( artifact, scope, optional );
}
DefaultDependencyNode node = new DefaultDependencyNode( dependency, parent );
node.setContext( context );
node.setRelocations( relocations );
return node;
}
}
| [
"[email protected]"
] | |
c01723b931a72b0898ceb3ec758be938a72e6764 | 6d08fec6b4e30ee253fb87f7928620c716f27404 | /Amazing_Snake/app/src/main/java/com/example/hahaha/amazing_snake/WelcomeActivity.java | 65948f99716f901cc7ba30283d47fdeda6f7ccc2 | [] | no_license | u5656487/RetroGame | 180e50480196183ad80008efc4893136e29777eb | 36bb7a0ceb4df948a9949d5d72f758b615626875 | refs/heads/master | 2020-03-22T21:11:46.869539 | 2018-07-12T06:03:58 | 2018-07-12T06:03:58 | 140,665,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,071 | java | package com.example.hahaha.amazing_snake;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
/**
* created by Wei XING
*/
/**
* This is a welcome page (fulfill the introduction page for the first time to start)
*/
public class WelcomeActivity extends AppCompatActivity implements Runnable{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);
//start a delay thread
new Thread(this).start();
}
public void playGame(View view) {
Log.d("main","button clicked");
run();
}
@Override
public void run() {
try{
/**
* delay 0.5s
*/
Thread.sleep(500);
// if exits, open it, otherwise, create new Preferences
SharedPreferences preferences= getSharedPreferences("count", 0);
// fetch the data
int count = preferences.getInt("count", 0);
/**
* if the user is not the first time to use, branch to the level page;
* otherwise branch to the guide page
*/
if (count == 0) {
Intent intent1 = new Intent();
intent1.setClass(WelcomeActivity.this, GuideActivity.class);
startActivity(intent1);
} else {
Intent intent2 = new Intent();
intent2.setClass(WelcomeActivity.this, GuideActivity.class); // should be LevelActivity here
startActivity(intent2);
}
finish();
//instantiate the object of Editor
SharedPreferences.Editor editor = preferences.edit();
//store data
editor.putInt("count", 1);
//commit change
editor.commit();
} catch (InterruptedException e) {
}
}
}
| [
"[email protected]"
] | |
36a44468270ff5815ab72589ecb2f14e47a05d86 | 70a328ec5b2631c3fd7eda484d64e50e49b7a764 | /app/src/main/java/com/example/ramesh/kotlinbasics/SwitchCase.java | 447496b956e101c791cd39a545478f03e64b5602 | [] | no_license | vaishali51/KotlinApp | b72be7fb5dd4d084a2a0db0b1f864f662f503e25 | 7d6d9348092fd92fea69e1752fc567e425398749 | refs/heads/master | 2020-04-02T23:20:23.530673 | 2018-10-26T16:52:32 | 2018-10-26T16:52:32 | 154,864,224 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 658 | java | package com.example.ramesh.kotlinbasics;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by hp on 9/1/2017.
*/
public class SwitchCase extends android.support.v4.app.Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.switch_case, container, false);
((MainActivity)getActivity()).setActionBarTitle("Java vs Kotlin");
return v;
}
}
| [
"[email protected]"
] | |
91775d1fb13d54379a0f65f0f5d40176305b4690 | 91f79d104c70e0038d39f0689df226ead2b8fdd0 | /src/com/inhuasoft/shsclient/Screens/CopyOfScreenLogin.java | c6e10b9a26bea9cdc5a80794113b289ea57a578b | [] | no_license | 371816210/SHClient | c748c0dea43568bb1676fb9ae2afeefd772c66c7 | a1a59ce6c8829a31acb11960489a2bab8cfd6148 | refs/heads/master | 2021-01-19T11:43:37.366413 | 2014-06-27T12:25:33 | 2014-06-27T12:25:33 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 55,041 | java | /* Copyright (C) 2010-2011, Mamadou Diop.
* Copyright (C) 2011, Doubango Telecom.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org>
*
* This file is part of imsdroid Project (http://code.google.com/p/imsdroid)
*
* imsdroid is free software: you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* imsdroid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package com.inhuasoft.shsclient.Screens;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import com.inhuasoft.shsclient.CustomDialog;
import com.inhuasoft.shsclient.Engine;
import com.inhuasoft.shsclient.IMSDroid;
import com.inhuasoft.shsclient.Main;
import com.inhuasoft.shsclient.Services.IScreenService;
import com.inhuasoft.shsclient.Utils.MD5;
import com.inhuasoft.shsclient.Utils.RegexUtils;
import com.inhuasoft.shsclient.Utils.SipAdminUtils;
import com.inhuasoft.shsclient.R;
import com.inhuasoft.shsclient.R.drawable;
import com.inhuasoft.shsclient.R.id;
import com.inhuasoft.shsclient.R.layout;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.CookieStore;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.AbstractHttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.doubango.ngn.events.NgnEventArgs;
import org.doubango.ngn.events.NgnRegistrationEventArgs;
import org.doubango.ngn.media.NgnMediaType;
import org.doubango.ngn.services.INgnConfigurationService;
import org.doubango.ngn.services.INgnSipService;
import org.doubango.ngn.sip.NgnAVSession;
import org.doubango.ngn.sip.NgnSipSession.ConnectionState;
import org.doubango.ngn.utils.NgnConfigurationEntry;
import org.doubango.ngn.utils.NgnPredicate;
import org.doubango.ngn.utils.NgnStringUtils;
import org.doubango.tinyWRAP.MsrpCallback;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import android.R.integer;
import android.app.Activity;
import android.app.ActivityGroup;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.media.AudioManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.util.Xml;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
public class CopyOfScreenLogin extends BaseScreen implements OnClickListener {
private static String TAG = CopyOfScreenLogin.class.getCanonicalName();
private final INgnConfigurationService mConfigurationService;
private final INgnSipService mSipService;
Button btnSubmit;
EditText editUserName, editPassword, editRePassword;
TextView txtMsginfo;
CheckBox chkMsginfo;
private static final int Admin_Login_Action = 0X06;
private static final int Admin_Login_Fail = 0X07;
private static final int Admin_Login_Success = 0X08;
private static final int Sip_Add_User_Action = 0X09;
private static final int Sip_Add_User_Fail = 0X10;
private static final int Sip_Add_User_Success = 0X11;
private static final int Sip_Add_Device_Action = 0X12;
private static final int Sip_Add_Device_Fail = 0X13;
private static final int Sip_Add_Device_Success = 0X14;
private static final int Device_Reg_Action = 0X15;
private static final int Device_Reg_Success = 0X16;
private static final int Device_Reg_Fail = 0X17;
private static final int User_Reg_Action = 0X18;
private static final int User_Reg_Success = 0X019;
private static final int User_Reg_Fail = 0X20;
private static final int Bind_User_Device_Action = 0X21;
private static final int Bind_User_Device_Success = 0X22;
private static final int Bind_User_Device_Fail = 0X23;
private static final int GetUserByDevice_Action = 0x24;
private static final int GetUserByDevice_Success = 0x25;
private static final int GetUserByDevice_Fail = 0x26;
private static final int Show_Reg_UI = 0x27;
private static final int Show_Login_UI = 0x28;
private static final int StartMain = 0x29;
private static final int User_Login_Action = 0x30;
private static final int User_Login_Success = 0x31;
private static final int User_Login_Fail = 0x32;
public CopyOfScreenLogin() {
super(SCREEN_TYPE.SCREENLOGIN, TAG);
// Sets main activity (should be done before starting services)
mConfigurationService = ((Engine) Engine.getInstance())
.getConfigurationService();
mSipService = getEngine().getSipService();
}
private void SetSystemInfo() {
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_IMPU,"sip:"+getDeviceNo()+"@115.28.9.71");
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_IMPI, getDeviceNo());
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_DISPLAY_NAME, getDeviceNo());
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_PASSWORD, getDeviceNo());
//注册成功,写入配置信息
mConfigurationService.putBoolean(NgnConfigurationEntry.DEVICE_REG, true);
//登录成功,写入配置信息
mConfigurationService.putBoolean(NgnConfigurationEntry.DEVICE_LOGIN, true);
mConfigurationService.putString(NgnConfigurationEntry.USERNAME,editUserName.getText().toString());
mConfigurationService.putString(NgnConfigurationEntry.USER_PASSWORD,editPassword.getText().toString());
mConfigurationService.putString(NgnConfigurationEntry.NETWORK_PCSCF_DISCOVERY,NgnConfigurationEntry.DEFAULT_NETWORK_PCSCF_DISCOVERY);
mConfigurationService.putString(NgnConfigurationEntry.NETWORK_PCSCF_HOST,NgnConfigurationEntry.DEFAULT_NETWORK_PCSCF_HOST);
mConfigurationService.putInt(NgnConfigurationEntry.NETWORK_PCSCF_PORT,NgnConfigurationEntry.DEFAULT_NETWORK_PCSCF_PORT);
mConfigurationService.putString(NgnConfigurationEntry.NETWORK_TRANSPORT,NgnConfigurationEntry.DEFAULT_NETWORK_TRANSPORT);
mConfigurationService.putBoolean(NgnConfigurationEntry.NETWORK_USE_WIFI,true);
mConfigurationService.putBoolean(NgnConfigurationEntry.NETWORK_USE_3G,true);
mConfigurationService.putString(NgnConfigurationEntry.NETWORK_IP_VERSION,
"ipv4");
mConfigurationService.putString(NgnConfigurationEntry.Devices_SIP_NUMBER,"sip:"+editUserName.getText().toString()+"@115.28.9.71" );
if(!mConfigurationService.commit()){
Log.e(TAG, "Failed to Commit() configuration");
}
}
private void StartMain() {
if(mScreenService != null )
{
try {
SetSystemInfo();
//mSipService.register(ScreenLogin.this);
//Thread.sleep(1000);
//mScreenService.show(ScreenNetwork.class);
mScreenService.show(ScreenHome.class);
finish();
} catch (Exception e) {
// TODO: handle exception
}
}
}
private Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
// TODO Auto-generated method stub
switch (msg.what) {
case Admin_Login_Action:
SipAdminLoginThread thread_admin_login = new SipAdminLoginThread();
thread_admin_login.start();
break;
case Admin_Login_Fail:
int admin_login_errorcode = msg.arg1;
final AlertDialog admin_login_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred, the error code is "
+ admin_login_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
admin_login_dialog.show();
break;
case Admin_Login_Success:
Message sip_add_user_message = mHandler
.obtainMessage(Sip_Add_User_Action);
sip_add_user_message.sendToTarget();
break;
case Sip_Add_User_Action:
SipAddUserThread thread_add_user = new SipAddUserThread();
thread_add_user.start();
break;
case Sip_Add_User_Fail:
int sip_add_user_errorcode = msg.arg1;
if (sip_add_user_errorcode == 106) {
final AlertDialog sip_add_user_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The user name has been registered! the return code is "
+ sip_add_user_errorcode, "OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface dialog,
int which) {
ResetInput();
}
}, null, null);
sip_add_user_dialog.show();
} else {
final AlertDialog sip_add_user_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred, the error code is "
+ sip_add_user_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
sip_add_user_dialog.show();
}
break;
case Sip_Add_User_Success:
Message sip_add_device_message = mHandler
.obtainMessage(Sip_Add_Device_Action);
sip_add_device_message.sendToTarget();
break;
case Sip_Add_Device_Action:
SipAddDeviceThread thread_add_device = new SipAddDeviceThread();
thread_add_device.start();
break;
case Sip_Add_Device_Fail:
int sip_add_device_errorcode = msg.arg1;
if (sip_add_device_errorcode == 206) {
final AlertDialog sip_add_device_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The device has been registered! the return code is "
+ sip_add_device_errorcode, "OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
sip_add_device_dialog.show();
} else {
final AlertDialog sip_add_device_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred, the error code is "
+ sip_add_device_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
sip_add_device_dialog.show();
}
break;
case Sip_Add_Device_Success:
Message user_reg_message = mHandler
.obtainMessage(User_Reg_Action);
user_reg_message.sendToTarget();
break;
case Device_Reg_Action:
DeviceRegThread thread_device_reg = new DeviceRegThread();
thread_device_reg.start();
break;
case Device_Reg_Success:
Message bind_user_device_message = mHandler
.obtainMessage(Bind_User_Device_Action);
bind_user_device_message.sendToTarget();
break;
case Device_Reg_Fail:
int device_reg_errorcode = msg.arg1;
if (device_reg_errorcode == 505) {
final AlertDialog device_reg_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The device has been registered! the return code is "
+ device_reg_errorcode, "OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
// ScreenLogin.this.finish();
// enter login window
ResetInput();
}
}, null, null);
device_reg_dialog.show();
} else {
final AlertDialog device_reg_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred, the error code is "
+ device_reg_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
device_reg_dialog.show();
}
break;
case User_Reg_Action:
UserRegThread thread_user_reg = new UserRegThread();
thread_user_reg.start();
break;
case User_Reg_Success:
Message device_reg_message = mHandler
.obtainMessage(Device_Reg_Action);
device_reg_message.sendToTarget();
break;
case User_Reg_Fail:
int user_reg_errorcode = msg.arg1;
if (user_reg_errorcode == 605) {
final AlertDialog user_reg_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
"The user name has been registered! the return code is "
+ user_reg_errorcode, "OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
ResetInput();
}
}, null, null);
user_reg_dialog.show();
} else {
final AlertDialog user_reg_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred,the error code is "
+ user_reg_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
user_reg_dialog.show();
}
break;
case Bind_User_Device_Action:
BindUserDeviceThread thread_bind_user_device = new BindUserDeviceThread();
thread_bind_user_device.start();
break;
case Bind_User_Device_Success:
SetSystemInfo();
StartMain();
break;
case Bind_User_Device_Fail:
int bind_user_device_errorcode = msg.arg1;
final AlertDialog bind_user_device_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred,the error code is "
+ bind_user_device_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
bind_user_device_dialog.show();
break;
case GetUserByDevice_Action:
GetUserByDeviceThread thread_get_user_by_device = new GetUserByDeviceThread();
thread_get_user_by_device.start();
break;
case GetUserByDevice_Fail:
int get_user_by_device_errorcode = msg.arg1;
final AlertDialog get_user_by_device_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred,the error code is "
+ get_user_by_device_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
get_user_by_device_dialog.show();
break;
case GetUserByDevice_Success:
break;
case Show_Reg_UI:
SetRegUI();
break;
case Show_Login_UI:
SetLoginUI();
break;
case StartMain:
StartMain();
break;
case User_Login_Action:
UserLoginThread thread_user_login = new UserLoginThread();
thread_user_login.start();
break;
case User_Login_Success:
mConfigurationService.putBoolean(NgnConfigurationEntry.DEVICE_LOGIN, true);
if(!mConfigurationService.commit()){
Log.e(TAG, "Failed to Commit() configuration");
}
StartMain();
break;
case User_Login_Fail:
int user_login_fail_errorcode = msg.arg1;
if(user_login_fail_errorcode == 802)
{
final AlertDialog user_login_fail_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The user name or password is not correct. ", "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
user_login_fail_dialog.show();
}
else
{
final AlertDialog user_login_fail_dialog = CustomDialog
.create(CopyOfScreenLogin.this, R.drawable.exit_48, null,
" A error has occurred,the error code is "
+ user_login_fail_errorcode, "exit",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
//ScreenLogin.this.finish();
ResetInput();
}
}, null, null);
user_login_fail_dialog.show();
}
break;
default:
super.handleMessage(msg);// 这里最好对不需要或者不关心的消息抛给父类,避免丢失消息
break;
}
}
};
public static String getDeviceNo() {
return Build.SERIAL;
}
public static String getValByTagName(Document doc, String tagName) {
NodeList list = doc.getElementsByTagName(tagName);
if (list.getLength() > 0) {
Node node = list.item(0);
Node valNode = node.getFirstChild();
if (valNode != null) {
String val = valNode.getNodeValue();
return val;
}
}
return null;
}
public static String ParserXml(String xml, String nodeName) {
String returnStr = null;
ByteArrayInputStream tInputStringStream = null;
try {
if (xml != null && !xml.trim().equals("")) {
tInputStringStream = new ByteArrayInputStream(xml.getBytes());
}
} catch (Exception e) {
return null;
}
XmlPullParser parser = Xml.newPullParser();
try {
parser.setInput(tInputStringStream, "UTF-8");
int eventType = parser.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
switch (eventType) {
case XmlPullParser.START_TAG:// 开始元素事件
String name = parser.getName();
if (name.equalsIgnoreCase(nodeName)) {
returnStr = parser.nextText();
}
break;
}
eventType = parser.next();
}
tInputStringStream.close();
// return persons;
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
return returnStr;
}
class SipAdminLoginThread extends Thread {
public void run() {
String login_ok = "8010210925-35110-444-10984-4122-322463124";
String httpUrl = "http://sip.inhuasoft.cn/login.php";
HttpPost request = new HttpPost(httpUrl);
HttpClient httpClient = new DefaultHttpClient();
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("name", "admin"));
params.add(new BasicNameValuePair("password", "admin"));
HttpResponse response;
try {
HttpEntity entity = new UrlEncodedFormEntity(params, "UTF-8");
request.setEntity(entity);
response = httpClient.execute(request);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String str = EntityUtils.toString(response.getEntity());
String strmd5 = MD5.getMD5(str);
System.out.println("response:" + strmd5);
if (strmd5.equals(login_ok)) {
System.out.println("sip admin web login success");
Message message = mHandler
.obtainMessage(Admin_Login_Success);
message.arg1 = 300;
message.sendToTarget();
CookieStore cookies = ((AbstractHttpClient) httpClient)
.getCookieStore();
IMSDroid appCookie = ((IMSDroid) CopyOfScreenLogin.this
.getApplication());
// ((AbstractHttpClient)
// httpClient).setCookieStore(cookies);
appCookie.setCookie(cookies);
// Toast.makeText(getApplicationContext(),
// " login success ", Toast.LENGTH_SHORT).show();
} else {
System.out.println("sip admin web login fail ");
Message message = mHandler
.obtainMessage(Admin_Login_Fail);
message.arg1 = 301;
message.sendToTarget();
// sip_admin_login_flag = false;
// Toast.makeText(getApplicationContext(),
// " login fail ", Toast.LENGTH_SHORT).show();
}
} else {
System.out.println("sip admin web reponse fail");
Message message = mHandler.obtainMessage(Admin_Login_Fail);
message.arg1 = 302;
message.sendToTarget();
}
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(Admin_Login_Fail);
message.arg1 = 303;
message.sendToTarget();
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(Admin_Login_Fail);
message.arg1 = 304;
message.sendToTarget();
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(Admin_Login_Fail);
message.arg1 = 305;
message.sendToTarget();
e.printStackTrace();
}
}
}
class SipAddUserThread extends Thread {
public void run() {
String httpUrl = "http://sip.inhuasoft.cn/tools/users/user_management/user_management.php?action=add_verify&id=";
HttpPost request = new HttpPost(httpUrl);
HttpClient httpClient = new DefaultHttpClient();
List<NameValuePair> params = new ArrayList<NameValuePair>();
System.out.println("=================username:"
+ editUserName.getText());
params.add(new BasicNameValuePair("uname", editUserName.getText()
.toString()));
params.add(new BasicNameValuePair("email", editUserName.getText()
.toString() + "@inhuasoft.cn"));
params.add(new BasicNameValuePair("alias", editUserName.getText()
.toString()));
params.add(new BasicNameValuePair("domain", "115.28.9.71"));
params.add(new BasicNameValuePair("alias_type", "dbaliases"));
params.add(new BasicNameValuePair("passwd", editPassword.getText()
.toString()));
params.add(new BasicNameValuePair("confirm_passwd", editPassword
.getText().toString()));
HttpResponse response;
IMSDroid appCookie = ((IMSDroid) CopyOfScreenLogin.this.getApplication());
((AbstractHttpClient) httpClient).setCookieStore(appCookie
.getCookie());
try {
HttpEntity entity = new UrlEncodedFormEntity(params, "UTF-8");
request.setEntity(entity);
response = httpClient.execute(request);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String str = EntityUtils.toString(response.getEntity());
String strmd5 = MD5.getMD5(str);
if (str.contains("is already a valid user")) {
// sip_add_user = true;
Message message = mHandler
.obtainMessage(Sip_Add_User_Fail);
message.arg1 = 106;
message.sendToTarget();
System.out
.println("=================is already a valid user");
} else if (str.contains("New User added!")) {
Message message = mHandler
.obtainMessage(Sip_Add_User_Success);
message.arg1 = 101;
message.sendToTarget();
System.out.println("New User added!");
// sip_add_user = true;
} else {
System.out.println("add user fail ");
// sip_add_user = false;
Message message = mHandler
.obtainMessage(Sip_Add_User_Fail);
message.arg1 = 105;
message.sendToTarget();
}
// System.out.println(" login in add user");
} else {
System.out.println("add user fail ");
// sip_add_user = false;
Message message = mHandler.obtainMessage(Sip_Add_User_Fail);
message.arg1 = 102;
message.sendToTarget();
}
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Message message = mHandler.obtainMessage(Sip_Add_User_Fail);
message.arg1 = 102;
message.sendToTarget();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Message message = mHandler.obtainMessage(Sip_Add_User_Fail);
message.arg1 = 103;
message.sendToTarget();
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Message message = mHandler.obtainMessage(Sip_Add_User_Fail);
message.arg1 = 104;
message.sendToTarget();
}
}
}
class SipAddDeviceThread extends Thread {
public void run() {
String httpUrl = "http://sip.inhuasoft.cn/tools/users/user_management/user_management.php?action=add_verify&id=";
HttpPost request = new HttpPost(httpUrl);
HttpClient httpClient = new DefaultHttpClient();
List<NameValuePair> params = new ArrayList<NameValuePair>();
System.out.println("==========device=======username:"
+ getDeviceNo());
params.add(new BasicNameValuePair("uname", getDeviceNo()));
params.add(new BasicNameValuePair("email", getDeviceNo()
+ "@inhuasoft.cn"));
params.add(new BasicNameValuePair("alias", getDeviceNo()));
params.add(new BasicNameValuePair("domain", "115.28.9.71"));
params.add(new BasicNameValuePair("alias_type", "dbaliases"));
params.add(new BasicNameValuePair("passwd", getDeviceNo()));
params.add(new BasicNameValuePair("confirm_passwd", getDeviceNo()));
HttpResponse response;
IMSDroid appCookie = ((IMSDroid) CopyOfScreenLogin.this.getApplication());
((AbstractHttpClient) httpClient).setCookieStore(appCookie
.getCookie());
try {
HttpEntity entity = new UrlEncodedFormEntity(params, "UTF-8");
request.setEntity(entity);
response = httpClient.execute(request);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String str = EntityUtils.toString(response.getEntity());
String strmd5 = MD5.getMD5(str);
if (str.contains("is already a valid user")) {
// sip_add_user = true;
Message message = mHandler
.obtainMessage(Sip_Add_Device_Fail);
message.arg1 = 206;
message.sendToTarget();
System.out
.println("=================is already a valid user");
return;
} else if (str.contains("New User added!")) {
Message message = mHandler
.obtainMessage(Sip_Add_Device_Success);
message.arg1 = 201;
message.sendToTarget();
System.out.println("New device added!");
return;
// sip_add_user = true;
} else {
System.out.println("add user fail ");
// sip_add_user = false;
Message message = mHandler
.obtainMessage(Sip_Add_Device_Fail);
message.arg1 = 207;
message.sendToTarget();
return;
}
// System.out.println(" login in add user");
} else {
System.out.println("add user fail ");
// sip_add_user = false;
Message message = mHandler
.obtainMessage(Sip_Add_Device_Fail);
message.arg1 = 202;
message.sendToTarget();
return;
}
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Message message = mHandler.obtainMessage(Sip_Add_Device_Fail);
message.arg1 = 203;
message.sendToTarget();
return;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Message message = mHandler.obtainMessage(Sip_Add_Device_Fail);
message.arg1 = 204;
message.sendToTarget();
return;
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Message message = mHandler.obtainMessage(Sip_Add_Device_Fail);
message.arg1 = 205;
message.sendToTarget();
return;
}
}
}
class UserRegThread extends Thread {
public void run() {
String RequestUrl = "http://ota.inhuasoft.cn/SHS_WS/ShsService.asmx?op=UserRegist";
URL url = null;
try {
url = new URL(RequestUrl);
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(User_Reg_Fail);
message.arg1 = 601;
message.sendToTarget();
e1.printStackTrace();
}
String envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+ "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">"
+ "<soap12:Header>"
+ "<MySoapHeader xmlns=\"http://tempuri.org/\">"
+ "<UserName>SysAdmin</UserName>"
+ "<PassWord>SysAdminSysAdmin</PassWord>"
+ "</MySoapHeader>" + "</soap12:Header>" + "<soap12:Body>"
+ "<UserRegist xmlns=\"http://tempuri.org/\">"
+ "<userName>" + editUserName.getText() + "</userName>"
+ "<passWord>" + editPassword.getText() + "</passWord>"
+ "<Mobile></Mobile>" + "<Email></Email>"
+ "<SipAccount>sip:" + editUserName.getText()
+ "@115.28.9.71</SipAccount>" + "<SipPwd>"
+ editPassword.getText() + "</SipPwd>" + "</UserRegist>"
+ "</soap12:Body>" + "</soap12:Envelope>";
HttpURLConnection httpConnection = null;
OutputStream output = null;
InputStream input = null;
try {
httpConnection = (HttpURLConnection) url.openConnection();
httpConnection.setRequestMethod("POST");
httpConnection.setRequestProperty("Content-Length",
String.valueOf(envelope.length()));
httpConnection.setRequestProperty("Content-Type",
"text/xml; charset=utf-8");
httpConnection.setDoOutput(true);
httpConnection.setDoInput(true);
output = httpConnection.getOutputStream();
output.write(envelope.getBytes());
output.flush();
input = httpConnection.getInputStream();
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document dom = builder.parse(input);
String returncode = getValByTagName(dom, "UserRegistResult");// 返回码
if ("-2".equals(returncode)) {
Message message = mHandler.obtainMessage(User_Reg_Fail);
message.arg1 = 602;
message.sendToTarget();
} else if ("0".equals(returncode)) {
Message message = mHandler.obtainMessage(User_Reg_Fail);
message.arg1 = 603;
message.sendToTarget();
} else if ("1".equals(returncode)) {
Message message = mHandler.obtainMessage(User_Reg_Success);
message.arg1 = 600;
message.sendToTarget();
} else if ("2".equals(returncode)) {
Message message = mHandler.obtainMessage(User_Reg_Fail);
message.arg1 = 605;
message.sendToTarget();
} else {
Message message = mHandler.obtainMessage(User_Reg_Fail);
message.arg1 = 604;
message.sendToTarget();
}
System.out
.println("=======UserRegThread======= return code is "
+ returncode);
} catch (Exception ex) {
Log.d(TAG, "-->getResponseString:catch" + ex.getMessage());
Message message = mHandler.obtainMessage(User_Reg_Fail);
message.arg1 = 606;
message.sendToTarget();
} finally {
try {
output.close();
input.close();
httpConnection.disconnect();
} catch (Exception e) {
Log.d(TAG, "-->getResponseString:finally" + e.getMessage());
Message message = mHandler.obtainMessage(User_Reg_Fail);
message.arg1 = 607;
message.sendToTarget();
}
}
}
}
class DeviceRegThread extends Thread {
public void run() {
String RequestUrl = "http://ota.inhuasoft.cn/SHS_WS/ShsService.asmx?op=DeviceRegist";
URL url = null;
try {
url = new URL(RequestUrl);
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(Device_Reg_Fail);
message.arg1 = 501;
message.sendToTarget();
e1.printStackTrace();
}
String envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+ "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">"
+ "<soap12:Header>"
+ "<MySoapHeader xmlns=\"http://tempuri.org/\">"
+ "<UserName>SysAdmin</UserName>"
+ "<PassWord>SysAdminSysAdmin</PassWord>"
+ "</MySoapHeader>" + "</soap12:Header>" + "<soap12:Body>"
+ "<DeviceRegist xmlns=\"http://tempuri.org/\">"
+ "<DeviceNo>" + getDeviceNo() + "</DeviceNo>"
+ "<SipAccount>sip:" + getDeviceNo()
+ "@115.28.9.71</SipAccount>" + "<SipPwd>" + getDeviceNo()
+ "</SipPwd>" + "</DeviceRegist>" + "</soap12:Body>"
+ "</soap12:Envelope>";
HttpURLConnection httpConnection = null;
OutputStream output = null;
InputStream input = null;
try {
httpConnection = (HttpURLConnection) url.openConnection();
httpConnection.setRequestMethod("POST");
httpConnection.setRequestProperty("Content-Length",
String.valueOf(envelope.length()));
httpConnection.setRequestProperty("Content-Type",
"text/xml; charset=utf-8");
httpConnection.setDoOutput(true);
httpConnection.setDoInput(true);
output = httpConnection.getOutputStream();
output.write(envelope.getBytes());
output.flush();
input = httpConnection.getInputStream();
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document dom = builder.parse(input);
String returncode = getValByTagName(dom, "DeviceRegistResult");// 返回码
System.out
.println("=======DeviceRegThread======= return code is "
+ returncode);
if ("-2".equals(returncode)) {
Message message = mHandler.obtainMessage(Device_Reg_Fail);
message.arg1 = 502;
message.sendToTarget();
} else if ("0".equals(returncode)) {
Message message = mHandler.obtainMessage(Device_Reg_Fail);
message.arg1 = 503;
message.sendToTarget();
} else if ("1".equals(returncode)) {
Message message = mHandler
.obtainMessage(Device_Reg_Success);
message.arg1 = 500;
message.sendToTarget();
} else if ("2".equals(returncode)) {
Message message = mHandler.obtainMessage(Device_Reg_Fail);
message.arg1 = 505;
message.sendToTarget();
} else {
Message message = mHandler.obtainMessage(Device_Reg_Fail);
message.arg1 = 504;
message.sendToTarget();
}
} catch (Exception ex) {
Log.d(TAG, "-->getResponseString:catch" + ex.getMessage());
Message message = mHandler.obtainMessage(Device_Reg_Fail);
message.arg1 = 506;
message.sendToTarget();
} finally {
try {
output.close();
input.close();
httpConnection.disconnect();
} catch (Exception e) {
Log.d(TAG, "-->getResponseString:finally" + e.getMessage());
Message message = mHandler.obtainMessage(Device_Reg_Fail);
message.arg1 = 507;
message.sendToTarget();
}
}
}
}
class BindUserDeviceThread extends Thread {
public void run() {
String RequestUrl = "http://ota.inhuasoft.cn/SHS_WS/ShsService.asmx?op=BindUserDevice";
URL url = null;
try {
url = new URL(RequestUrl);
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(Bind_User_Device_Fail);
message.arg1 = 401;
message.sendToTarget();
e1.printStackTrace();
}
String envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+ "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">"
+ "<soap12:Header>"
+ "<MySoapHeader xmlns=\"http://tempuri.org/\">"
+ "<UserName>SysAdmin</UserName>"
+ "<PassWord>SysAdminSysAdmin</PassWord>"
+ "</MySoapHeader>" + "</soap12:Header>" + "<soap12:Body>"
+ "<BindUserDevice xmlns=\"http://tempuri.org/\">"
+ "<UserName>" + editUserName.getText() + "</UserName>"
+ "<DeviceNo>" + getDeviceNo() + "</DeviceNo>"
+ "</BindUserDevice>" + "</soap12:Body>"
+ "</soap12:Envelope>";
HttpURLConnection httpConnection = null;
OutputStream output = null;
InputStream input = null;
try {
httpConnection = (HttpURLConnection) url.openConnection();
httpConnection.setRequestMethod("POST");
httpConnection.setRequestProperty("Content-Length",
String.valueOf(envelope.length()));
httpConnection.setRequestProperty("Content-Type",
"text/xml; charset=utf-8");
httpConnection.setDoOutput(true);
httpConnection.setDoInput(true);
output = httpConnection.getOutputStream();
output.write(envelope.getBytes());
output.flush();
input = httpConnection.getInputStream();
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document dom = builder.parse(input);
String returncode = getValByTagName(dom, "BindUserDeviceResult");// 返回码
System.out
.println("======BindUserDeviceThread======== return code is "
+ returncode);
if ("-2".equals(returncode)) {
Message message = mHandler
.obtainMessage(Bind_User_Device_Fail);
message.arg1 = 402;
message.sendToTarget();
} else if ("0".equals(returncode)) {
Message message = mHandler
.obtainMessage(Bind_User_Device_Fail);
message.arg1 = 403;
message.sendToTarget();
} else if ("1".equals(returncode)) {
Message message = mHandler
.obtainMessage(Bind_User_Device_Success);
message.arg1 = 400;
message.sendToTarget();
} else if ("2".equals(returncode)) {
Message message = mHandler
.obtainMessage(Bind_User_Device_Fail);
message.arg1 = 405;
message.sendToTarget();
} else {
Message message = mHandler
.obtainMessage(Bind_User_Device_Fail);
message.arg1 = 404;
message.sendToTarget();
}
} catch (Exception ex) {
Log.d(TAG, "-->getResponseString:catch" + ex.getMessage());
Message message = mHandler.obtainMessage(Bind_User_Device_Fail);
message.arg1 = 406;
message.sendToTarget();
} finally {
try {
output.close();
input.close();
httpConnection.disconnect();
} catch (Exception e) {
Log.d(TAG, "-->getResponseString:finally" + e.getMessage());
Message message = mHandler
.obtainMessage(Bind_User_Device_Fail);
message.arg1 = 407;
message.sendToTarget();
}
}
}
}
class GetUserByDeviceThread extends Thread {
public void run() {
String RequestUrl = "http://ota.inhuasoft.cn/SHS_WS/ShsService.asmx?op=GetUserByDevice";
URL url = null;
try {
url = new URL(RequestUrl);
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(GetUserByDevice_Fail);
message.arg1 = 701;
message.sendToTarget();
e1.printStackTrace();
}
String envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+ "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">"
+ "<soap12:Header>"
+ "<MySoapHeader xmlns=\"http://tempuri.org/\">"
+ "<UserName>SysAdmin</UserName>"
+ "<PassWord>SysAdminSysAdmin</PassWord>"
+ "</MySoapHeader>" + "</soap12:Header>" + "<soap12:Body>"
+ "<GetUserByDevice xmlns=\"http://tempuri.org/\">"
+ "<DeviceNo>" + getDeviceNo() + "</DeviceNo>"
+ "</GetUserByDevice>" + "</soap12:Body>"
+ "</soap12:Envelope>";
HttpURLConnection httpConnection = null;
OutputStream output = null;
InputStream input = null;
try {
httpConnection = (HttpURLConnection) url.openConnection();
httpConnection.setRequestMethod("POST");
httpConnection.setRequestProperty("Content-Length",
String.valueOf(envelope.length()));
httpConnection.setRequestProperty("Content-Type",
"text/xml; charset=utf-8");
httpConnection.setDoOutput(true);
httpConnection.setDoInput(true);
output = httpConnection.getOutputStream();
output.write(envelope.getBytes());
output.flush();
input = httpConnection.getInputStream();
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document dom = builder.parse(input);
String returncode = getValByTagName(dom,
"GetUserByDeviceResult");// 返回码
System.out
.println("======GetUserByDeviceResult======== return code is "
+ returncode);
if ("-2".equals(returncode)) {
Message message = mHandler
.obtainMessage(GetUserByDevice_Fail);
message.arg1 = 702;
message.sendToTarget();
} else {
String username = ParserXml(returncode, "UserName");
if (username != null) {//设备已经注册
mConfigurationService.putBoolean(NgnConfigurationEntry.DEVICE_REG, true);
mConfigurationService.putString(NgnConfigurationEntry.USERNAME, editUserName.getText().toString());
mConfigurationService.putString(NgnConfigurationEntry.USER_PASSWORD, editPassword.getText().toString());
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_IMPU,"sip:"+getDeviceNo()+"@115.28.9.71");
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_IMPI, getDeviceNo());
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_DISPLAY_NAME, getDeviceNo());
mConfigurationService.putString(NgnConfigurationEntry.IDENTITY_PASSWORD, getDeviceNo());
if(!mConfigurationService.commit()){
Log.e(TAG, "Failed to Commit() configuration");
}
if(!mConfigurationService.getBoolean(NgnConfigurationEntry.DEVICE_LOGIN, NgnConfigurationEntry.DEFAULT_DEVICE_LOGIN))
{
//没有登录,则显示登录界面
//SetLoginUI();
Message message = mHandler.obtainMessage(Show_Login_UI);
message.sendToTarget();
}
else {
Message message = mHandler.obtainMessage(StartMain);
message.sendToTarget();
}
}
else {
// 设备没有注册,显示登陆界面
//SetRegUI();
Message message = mHandler.obtainMessage(Show_Reg_UI);
message.sendToTarget();
}
}
} catch (Exception ex) {
Log.d(TAG, "-->getResponseString:catch" + ex.getMessage());
Message message = mHandler.obtainMessage(GetUserByDevice_Fail);
message.arg1 = 706;
message.sendToTarget();
} finally {
try {
output.close();
input.close();
httpConnection.disconnect();
} catch (Exception e) {
Log.d(TAG, "-->getResponseString:finally" + e.getMessage());
Message message = mHandler
.obtainMessage(GetUserByDevice_Fail);
message.arg1 = 707;
message.sendToTarget();
}
}
}
}
class UserLoginThread extends Thread {
public void run() {
String RequestUrl = "http://ota.inhuasoft.cn/SHS_WS/ShsService.asmx?op=GetUserByDevice";
URL url = null;
try {
url = new URL(RequestUrl);
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
Message message = mHandler.obtainMessage(GetUserByDevice_Fail);
message.arg1 = 701;
message.sendToTarget();
e1.printStackTrace();
}
String envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+ "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">"
+ "<soap12:Header>"
+ "<MySoapHeader xmlns=\"http://tempuri.org/\">"
+ "<UserName>"+editUserName.getText().toString()+"</UserName>"
+ "<PassWord>"+editPassword.getText().toString()+"</PassWord>"
+ "</MySoapHeader>" + "</soap12:Header>" + "<soap12:Body>"
+ "<GetUserByDevice xmlns=\"http://tempuri.org/\">"
+ "<DeviceNo>" + getDeviceNo() + "</DeviceNo>"
+ "</GetUserByDevice>" + "</soap12:Body>"
+ "</soap12:Envelope>";
HttpURLConnection httpConnection = null;
OutputStream output = null;
InputStream input = null;
try {
httpConnection = (HttpURLConnection) url.openConnection();
httpConnection.setRequestMethod("POST");
httpConnection.setRequestProperty("Content-Length",
String.valueOf(envelope.length()));
httpConnection.setRequestProperty("Content-Type",
"text/xml; charset=utf-8");
httpConnection.setDoOutput(true);
httpConnection.setDoInput(true);
output = httpConnection.getOutputStream();
output.write(envelope.getBytes());
output.flush();
input = httpConnection.getInputStream();
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document dom = builder.parse(input);
String returncode = getValByTagName(dom,
"GetUserByDeviceResult");// 返回码
System.out
.println("======GetUserByDeviceResult======== return code is "
+ returncode);
if ("-2".equals(returncode)) {
Message message = mHandler.obtainMessage(User_Login_Fail);
message.arg1 = 802;
message.sendToTarget();
}
else
{
String username = ParserXml(returncode, "UserName");
if (editUserName.getText().toString().equals(username)) {
Message message = mHandler.obtainMessage(User_Login_Success);
message.sendToTarget();
}
else {
Message message = mHandler.obtainMessage(User_Login_Fail);
message.arg1 = 808;
message.sendToTarget();
}
}
} catch (Exception ex) {
Log.d(TAG, "-->getResponseString:catch" + ex.getMessage());
Message message = mHandler.obtainMessage(User_Login_Fail);
message.arg1 = 806;
message.sendToTarget();
} finally {
try {
output.close();
input.close();
httpConnection.disconnect();
} catch (Exception e) {
Log.d(TAG, "-->getResponseString:finally" + e.getMessage());
Message message = mHandler
.obtainMessage(User_Login_Fail);
message.arg1 = 807;
message.sendToTarget();
}
}
}
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.screen_box_login);
btnSubmit = (Button) findViewById(R.id.btnsubmit);
btnSubmit.setOnClickListener(this);
editUserName = (EditText) findViewById(R.id.edit_username);
editPassword = (EditText) findViewById(R.id.edit_password);
editRePassword = (EditText) findViewById(R.id.edit_checkpassword);
txtMsginfo = (TextView)findViewById(R.id.txt_msginfo);
chkMsginfo =(CheckBox)findViewById(R.id.chk_msginfo);
if (!mConfigurationService.getBoolean(NgnConfigurationEntry.DEVICE_REG,
NgnConfigurationEntry.DEFAULT_DEVICE_REG)) {
Message message = mHandler.obtainMessage(GetUserByDevice_Action);
message.sendToTarget();
}else if(mConfigurationService.getBoolean(NgnConfigurationEntry.DEVICE_REG,
NgnConfigurationEntry.DEFAULT_DEVICE_REG) && !mConfigurationService.getBoolean(NgnConfigurationEntry.DEVICE_LOGIN,
NgnConfigurationEntry.DEFAULT_DEVICE_LOGIN))
{
Message message = mHandler.obtainMessage(Show_Login_UI);
message.sendToTarget();
}
}
@Override
protected void onDestroy() {
/*
* if(mSipBroadCastRecv != null){ unregisterReceiver(mSipBroadCastRecv);
* mSipBroadCastRecv = null; }
*/
super.onDestroy();
}
private void ResetInput() {
editUserName.setText("");
editPassword.setText("");
editRePassword.setText("");
}
public void SetRegUI()
{
editRePassword.setVisibility(View.VISIBLE);
txtMsginfo.setVisibility(View.VISIBLE);
chkMsginfo.setVisibility(View.VISIBLE);
btnSubmit.setText("Sign Up");
}
public void SetLoginUI()
{
editRePassword.setVisibility(View.GONE);
txtMsginfo.setVisibility(View.GONE);
chkMsginfo.setVisibility(View.GONE);
btnSubmit.setText("Sign In");
}
private boolean ValidateRegInput() {
if (!RegexUtils.checkUserName(editUserName.getText().toString())) {
final AlertDialog username_error_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The username is 4-16 any combination of characters ",
"OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}, null, null);
username_error_dialog.show();
ResetInput();
return false;
}
if (!RegexUtils.checkPassWord(editPassword.getText().toString())) {
final AlertDialog password_error_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The password is 6-16 any combination of characters ",
"OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}, null, null);
password_error_dialog.show();
editPassword.setText("");
editRePassword.setText("");
return false;
}
if (!editPassword.getText().toString()
.equals(editRePassword.getText().toString())) {
final AlertDialog repassword_error_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The password and confirm password must be the same",
"OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}, null, null);
repassword_error_dialog.show();
editPassword.setText("");
editRePassword.setText("");
return false;
}
return true;
}
private boolean ValidateLoginInput() {
if (!RegexUtils.checkUserName(editUserName.getText().toString())) {
final AlertDialog username_error_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The username is 4-16 any combination of characters ",
"OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}, null, null);
username_error_dialog.show();
ResetInput();
return false;
}
if (!RegexUtils.checkPassWord(editPassword.getText().toString())) {
final AlertDialog password_error_dialog = CustomDialog.create(
CopyOfScreenLogin.this, R.drawable.exit_48, null,
" The password is 6-16 any combination of characters ",
"OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}, null, null);
password_error_dialog.show();
editPassword.setText("");
return false;
}
return true;
}
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
if (arg0.getId() == R.id.btnsubmit) {
if (!mConfigurationService.getBoolean(NgnConfigurationEntry.DEVICE_REG,
NgnConfigurationEntry.DEFAULT_DEVICE_REG)) {
if (ValidateRegInput()) {
Message message = mHandler.obtainMessage(Admin_Login_Action);
message.sendToTarget();
}
} else if(mConfigurationService.getBoolean(NgnConfigurationEntry.DEVICE_REG,
NgnConfigurationEntry.DEFAULT_DEVICE_REG) && !mConfigurationService.getBoolean(NgnConfigurationEntry.DEVICE_LOGIN,
NgnConfigurationEntry.DEFAULT_DEVICE_LOGIN))
{
if (ValidateLoginInput()) {
Message message = mHandler.obtainMessage(User_Login_Action);
message.sendToTarget();
}
}
}
}
@Override
protected void onResume() {
super.onResume();
final Engine engine = getEngine();
final Thread thread = new Thread(new Runnable(){
@Override
public void run() {
if(!engine.isStarted()){
Log.d(TAG, "Starts the engine from the splash screen");
engine.start();
}
}
});
thread.setPriority(Thread.MAX_PRIORITY);
thread.start();
}
}
| [
"[email protected]"
] | |
ebefc88a3f91a63180feb6d1a665d91bec40d8c5 | b3517a861c3fd62830e2b939527c7b7f3d16c638 | /app/src/main/java/com/akropon/game_rescollect/game/miningPart/EffectManager.java | 5830ebab67c5ad69244076664c6b09a76a459dc0 | [] | no_license | akropon/Game_ResCollect | 37490534e0076a67e063b205f431af3f94a19f82 | 3efb15c8758cf8296d3f853c5da396384461cc2b | refs/heads/master | 2021-04-27T00:24:49.600696 | 2018-03-04T16:52:04 | 2018-03-04T16:52:04 | 123,808,540 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,219 | java | package com.akropon.game_rescollect.game.miningPart;
import com.akropon.game_rescollect.management.Constants;
import com.akropon.game_rescollect.management.ResourceManager;
import com.akropon.game_rescollect.management.ScreenManager;
import org.andengine.entity.sprite.Sprite;
/**
* Created by akropon on 17.09.2017.
*/
public class EffectManager {
CrystalScene crystalScene;
boolean freeze_isFreezed;
float freeze_time_left;
Sprite freeze_screen_sprite;
float charge_current;
int charge_max;
float charge_chargingPerSecond;
public EffectManager(CrystalScene crystalScene) {
this.crystalScene = crystalScene;
freeze_screen_sprite = new Sprite(0,0, ResourceManager.rGame_freeze_screen_pict, ResourceManager.vbom);
freeze_screen_sprite.setWidth(ScreenManager.getScreenWidth());
freeze_screen_sprite.setHeight(ScreenManager.getMiningScreenHeight());
freeze_screen_sprite.setZIndex(Constants.GAME_ZINDEX_EFFECT_FREEZE);
freeze_isFreezed = false;
charge_max = 10;
charge_current = 10;
charge_chargingPerSecond = 2;
}
public void onUpdate(float pTimeElapsed) {
if (freeze_isFreezed) {
freeze_time_left -= pTimeElapsed;
if (freeze_time_left <= 0) { // defrosted
freeze_isFreezed = false;
if (freeze_screen_sprite.getParent() != null)
freeze_screen_sprite.detachSelf();
}
}
charge_current += pTimeElapsed*charge_chargingPerSecond;
if (charge_current > charge_max)
charge_current = charge_max;
}
public boolean isFreezed() {
return freeze_isFreezed;
}
public void setFreezed(float seconds) {
freeze_time_left = seconds;
freeze_isFreezed = true;
if (freeze_screen_sprite.getParent() == null) {
crystalScene.attachChild(freeze_screen_sprite);
crystalScene.sortChildren();
}
}
public float getCharge_current() {
return charge_current;
}
public int getCharge_max() {
return charge_max;
}
public float getCharge_chargingPerSecond() {
return charge_chargingPerSecond;
}
public void setCharge_current(float charge_current) {
this.charge_current = charge_current;
}
public void setCharge_max(int charge_max) {
this.charge_max = charge_max;
}
public void setCharge_chargingPerSecond(float charge_chargingPerSecond) {
this.charge_chargingPerSecond = charge_chargingPerSecond;
}
public boolean charge_containsEnergy(float neededEnergy) {
return neededEnergy <= charge_current;
}
public boolean charge_tryToSpendEnergy(float energy) {
if (charge_containsEnergy(energy)) {
charge_current -= energy;
return true;
} else
return false;
}
public float charge_getRelative() {
return charge_current / charge_max;
}
public void dispose() {
// TODO
}
}
| [
"[email protected]"
] | |
2d775230d66fd2ee017c52bace6dccd9e018b086 | 7c955929fbc1d86b733bb1f835ae2bb771fcd397 | /.settings/HLH/HLH_new/src/main/java/openaxes/qa/po/ForgotPassword.java | 30eae8a784211b35186742988d5300858fadd472 | [] | no_license | Shubhamqa2132/trialtask | 7d6c81d624336bf461359c18b61dbe4322080337 | 2aa7be4419f5d7ace9dc8b9e5366d6c14a3217b3 | refs/heads/master | 2020-03-29T05:54:56.559072 | 2018-09-20T12:50:57 | 2018-09-20T12:50:57 | 149,601,332 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,371 | java | /**
*
*/
package testproject.qa.po;
import testproject.qa.utils.WaitTime;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.Assert;
import org.testng.Reporter;
/**
* @author shubham
*
*/
public class ForgotPassword extends BasePage {
private WebDriver driver;
@FindBy(xpath = "//input[@name='user']")
private WebElement userName;
@FindBy(xpath = "//button[contains(text(), 'Request Password Reset')]")
private WebElement requestPasswordReset;
@FindBy(xpath = "//div[@class='panel-heading']")
private WebElement resetPasswordPageHeader;
@FindBy(xpath = "//input[@name='NewPassword']")
private WebElement newPassword;
@FindBy(xpath = "//input[@name='ConfirmPassword']")
private WebElement confirmPassword;
@FindBy(xpath = "//button[contains(text(), 'Change Password')]")
private WebElement changePasswordButton;
public ForgotPassword(WebDriver driver) {
super(driver);
this.driver = driver;
PageFactory.initElements(driver, this);
}
public void clickRequestPasswordReset(){
requestPasswordReset.click();
Reporter.log("<br>requestingResetLink");
}
public void enterUserName(String str)
{
userName.sendKeys(str);
Reporter.log("<br>enterUserName", true);
}
public void verifyResetPassword()
{
String header=resetPasswordPageHeader.getText();
Assert.assertEquals(header, "Resetting Password Shubham", "Header text did not match");
Reporter.log("<br>resetPasswordPageOpened", true);
}
public void enterNewPassword()
{
newPassword.sendKeys("test@123");
}
public void enterConfirmPassword()
{
confirmPassword.sendKeys("test@123");
}
public void clickChangePassword()
{
changePasswordButton.click();
Reporter.log("<br>clickingChangePassword", true);
}
/*
public void enterPassword(String str)
{
password.sendKeys(str);
Reporter.log("<br>enterPassword", true);
}
public DashboardPage clickLoginBtn() {
loginButton.click();
Reporter.log("<br>clickLogin", true);
return new DashboardPage(driver);
}
*/
@Override
public ForgotPassword waitForPage() {
//this.waitForBlueLine(WaitTime.MEDIUM_TO);
return this;
}
}
| [
"[email protected]"
] | |
8aeeed25d92cd45690f7329a3599db16db50a29b | 13bd3705755ade6ec68f5877ada14708df5c75bc | /src/Chess/Pieces/King.java | cdf1e96e6840600ab8ce492fa921a33161007be3 | [] | no_license | FNastro/chess-system-java | 73f0284ae67a7ff1f10afb2144c6533401ad247b | bb12f19bddcb84e2067f9c02ccbb4e6708791b90 | refs/heads/master | 2022-09-24T03:08:24.151629 | 2020-06-01T16:20:10 | 2020-06-01T16:20:10 | 263,991,060 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,469 | java | package Chess.Pieces;
import BoardGame.Board;
import BoardGame.Position;
import Chess.ChessMatch;
import Chess.ChessPiece;
import Chess.Color;
public class King extends ChessPiece {
private ChessMatch chessMatch;
public King(Board board, Color color, ChessMatch chessMatch) {
super(board, color);
this.chessMatch = chessMatch;
}
@Override
public String toString() {
return "K";
}
private boolean canMove(Position position) {
ChessPiece p = (ChessPiece)getBoard().piece(position);
return p == null || p.getColor() != getColor();
}
private boolean testRookCastling(Position position) {
ChessPiece p = (ChessPiece)getBoard().piece(position);
return p != null && p instanceof Rook && p.getColor() == getColor() && p.getMoveCount() == 0;
}
@Override
public boolean[][] possibleMoves() {
boolean[][] mat = new boolean[getBoard().getRow()][getBoard().getColumns()];
Position p = new Position(0,0);
// above
p.setValues(position.getRow() - 1, position.getColumn());
if(getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// below
p.setValues(position.getRow() + 1, position.getColumn());
if (getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// left
p.setValues(position.getRow(), position.getColumn() - 1);
if (getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// right
p.setValues(position.getRow(), position.getColumn() + 1);
if (getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// northwest
p.setValues(position.getRow() - 1, position.getColumn() - 1);
if (getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// northeast
p.setValues(position.getRow() - 1, position.getColumn() + 1);
if (getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// south-west
p.setValues(position.getRow() + 1, position.getColumn() - 1);
if (getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// south-east
p.setValues(position.getRow() + 1, position.getColumn() + 1);
if (getBoard().positionExist(p) && canMove(p)) {
mat[p.getRow()][p.getColumn()] = true;
}
// #specialmove castling
if(getMoveCount() == 0 && !chessMatch.getCheck() ) {
// #specialmove castling kingside rook
Position posT1 = new Position(position.getRow(), position.getColumn() + 3);
if(testRookCastling(posT1)) {
Position p1 = new Position(position.getRow(), position.getColumn() + 1);
Position p2 = new Position(position.getRow(), position.getColumn() + 2);
if(getBoard().piece(p1) == null && getBoard().piece(p2) == null ) {
mat[position.getRow()][position.getColumn() + 2] = true;
}
}
// #specialmove castling queenside rook
Position posT2 = new Position(position.getRow(), position.getColumn() - 4);
if(testRookCastling(posT2)) {
Position p1 = new Position(position.getRow(), position.getColumn() - 1);
Position p2 = new Position(position.getRow(), position.getColumn() - 2);
Position p3 = new Position(position.getRow(), position.getColumn() - 3);
if(getBoard().piece(p1) == null && getBoard().piece(p2) == null && getBoard().piece(p3) == null) {
mat[position.getRow()][position.getColumn() - 2] = true;
}
}
}
return mat;
}
}
| [
"[email protected]"
] | |
a6d4e183c0302e1b3b4a5673bce571a0c68b31b2 | b91dbe8b27ad1c869a0409e92d0126caea57a2b9 | /app/src/main/java/com/maverick/imodel/IHistoryModel.java | a7f8684b29153dd4f8f58382f2f712cd250e1530 | [] | no_license | li8607/maverick | 3c88f22fc9fbe796eeb5526e0469bf8fefc3ba80 | 0a1f2aea16cc42aa4e599ed93729225a8a7016c5 | refs/heads/master | 2021-01-22T05:43:52.614982 | 2018-12-17T07:11:10 | 2018-12-17T07:11:10 | 92,491,242 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 797 | java | package com.maverick.imodel;
import java.util.List;
import cntv.greendaolibrary.dbbean.History;
/**
* Created by limingfei on 2017/9/27.
*/
public interface IHistoryModel {
List<History> getHistory();
List<History> getBeautyHistory();
List<History> getJokeHistory();
List<History> getTextHistory();
List<History> getImgHistory();
List<History> getGifHistory();
List<History> getTodayHistory();
List<History> getSevenDaysHistory();
List<History> getEarlierHistory();
boolean insertHistoryDB(History history);
boolean deleteHistoryDB(History history);
boolean deleteHistoryDBList(List<History> history);
boolean deleteHistoryDBAll();
boolean containsHistoryDB(History history);
History getHistoryDB(History history);
}
| [
"[email protected]"
] | |
014a14bd9484ba4b4f1389160aad35861749ffda | bda207b0ef0ef57e1f01f6e0c94575c813002a1b | /src/main/java/com/barber/model/Factura.java | 9811db1733cac6482af7370170c44928489e0661 | [] | no_license | Maurocreew/UrbanBarberShop | db9aadfacaaae6676d9f68fad87d987e4c5b26f9 | 65cab0f4943b23876627662b83df63b652986089 | refs/heads/master | 2023-08-15T16:04:46.982279 | 2021-09-11T16:02:06 | 2021-09-11T16:02:06 | 405,416,785 | 0 | 0 | null | 2021-09-11T15:39:13 | 2021-09-11T15:39:13 | null | UTF-8 | Java | false | false | 3,453 | 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 com.barber.model;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author juan
*/
@Entity
@Table(name = "factura")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Factura.findAll", query = "SELECT f FROM Factura f"),
@NamedQuery(name = "Factura.findByIdFactura", query = "SELECT f FROM Factura f WHERE f.idFactura = :idFactura"),
@NamedQuery(name = "Factura.findByCosto", query = "SELECT f FROM Factura f WHERE f.costo = :costo")})
public class Factura implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id_factura")
private Integer idFactura;
// @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
@Column(name = "costo")
private Float costo;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "facturaIdFactura")
private List<Calificacion> calificacionList;
@JoinColumn(name = "cita_id_cita", referencedColumnName = "id_cita")
@ManyToOne(optional = false)
private Cita citaIdCita;
public Factura() {
}
public Factura(Integer idFactura) {
this.idFactura = idFactura;
}
public Integer getIdFactura() {
return idFactura;
}
public void setIdFactura(Integer idFactura) {
this.idFactura = idFactura;
}
public Float getCosto() {
return costo;
}
public void setCosto(Float costo) {
this.costo = costo;
}
@XmlTransient
public List<Calificacion> getCalificacionList() {
return calificacionList;
}
public void setCalificacionList(List<Calificacion> calificacionList) {
this.calificacionList = calificacionList;
}
public Cita getCitaIdCita() {
return citaIdCita;
}
public void setCitaIdCita(Cita citaIdCita) {
this.citaIdCita = citaIdCita;
}
@Override
public int hashCode() {
int hash = 0;
hash += (idFactura != null ? idFactura.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Factura)) {
return false;
}
Factura other = (Factura) object;
if ((this.idFactura == null && other.idFactura != null) || (this.idFactura != null && !this.idFactura.equals(other.idFactura))) {
return false;
}
return true;
}
@Override
public String toString() {
return ""+idFactura;
}
}
| [
"[email protected]"
] | |
b61af8829467a4fad1e68583da1409ae96164a1f | e179ee0eb10824bfbb1e341b4ad781cdf4f77066 | /app/src/main/java/com/cs316/smoresmemes/CODES.java | 8cc16c8500ac7462afd5415dc9452f47e4d0e69d | [] | no_license | Sebmansigh/SmoresMemes | 1bc164b027ae1a804548647d06913277c2f105a1 | abc3cbba8e8b8d2cde9b90e23d7d522f3c7d850a | refs/heads/master | 2021-09-08T02:05:01.410968 | 2018-03-05T21:03:03 | 2018-03-05T21:03:03 | 119,442,427 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 574 | java | package com.cs316.smoresmemes;
final class CODES {
static final int PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 1;
static final int PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE = 2;
static final int GET_CAMERA_BASE_IMAGE = 100;
static final int GET_LOCAL_BASE_IMAGE = 200;
static final int GET_LOCAL_FULL_MEME = 201;
static final int GET_DATABASE_BASE_IMAGE = 300;
static final String FETCH_METHOD = "com.cs316.smoresmemes.FETCHMETHOD";
static final String FETCH_RESULT = "com.cs316.smoresmemes.FETCHRESULT";
private CODES() {
}
}
| [
"[email protected]"
] | |
d0777c389976f9437a16297ce589352c96995eb6 | 86c65d7c6dff1cf9408e1833d673a040e68445e0 | /Week5/HelloHibernateAnnotation/src/main/java/Main.java | 8955b36c989ebb5a71e06813f4af5e46ebfa5785 | [] | no_license | JanieTran/SCHOOL_SpringMVC | f743a908137dcb8beee56a3fecea162c355d98d4 | a0554c2cf62d5b0b8570e87c73bdfda013d41655 | refs/heads/master | 2020-03-24T23:29:58.085624 | 2019-02-08T09:36:29 | 2019-02-08T09:36:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,001 | java |
import rmit.config.AppConfig;
import rmit.entity.Lecturer;
import rmit.entity.School;
import rmit.service.PersonService;
import rmit.entity.Person;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
* Created by CoT on 10/13/17.
*/
public class Main {
public static void main(String[] args){
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
PersonService personService = (PersonService) context.getBean("personService");
Person person = new Person();
person.setName("Hien");
personService.savePerson(person);
// Create entity named Lecturer: id, name
Lecturer lecturer = new Lecturer();
lecturer.setName("Thanh");
// Entity Relation
School sst = new School();
sst.setName("SST");
// personService.saveSchool(sst);
lecturer.setSchool(sst);
personService.saveLecturer(lecturer);
}
}
| [
"[email protected]"
] | |
e33f7cb1398ceeedfa5535f667af4ec2d617c56b | 1042400c3b35724867160646da90c40c39cdbd43 | /app/src/main/java/pe/acex/comercias/actividad/PendienteValoracion.java | b55b52fc909499ce5f3104c98e5ec4a0e358bb07 | [] | no_license | edwardInf/Comercias | 0b4e3f016d81fdb69f653fbd7de93b7906bb6df0 | f729f07c346da230de3ee49346120d158ae9c889 | refs/heads/master | 2020-11-30T18:18:46.920931 | 2019-12-30T06:40:28 | 2019-12-30T06:40:28 | 230,450,880 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 951 | java | package pe.acex.comercias.actividad;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.os.Bundle;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import pe.acex.comercias.R;
public class PendienteValoracion extends AppCompatActivity {
Unbinder unbinder;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pendiente_valoracion);
unbinder = ButterKnife.bind(this);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_pendienteValoracion);
toolbar.setTitle("");
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
@Override
public boolean onSupportNavigateUp() {
onBackPressed();
return true;
}
}
| [
"[email protected]"
] | |
86e595e41e61576858a3b406738d6b7362ce2bb4 | 930633f5518ee5cf216b60f12c386eea06382712 | /test/QuakeSortInPlaceTest.java | 3cbe9ebac75015e3249fb6b0dc8dc4213a47e821 | [] | no_license | dasje/SearchingEarthquakeData | cd2342e9a4fdd1ad3722504b7054d22058f280b2 | 714a15fb63709c119adf220c799206f1dee9473d | refs/heads/master | 2023-07-26T16:24:44.244980 | 2021-09-07T15:18:29 | 2021-09-07T15:18:29 | 383,116,936 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 820 | java | import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import static org.junit.jupiter.api.Assertions.*;
class QuakeSortInPlaceTest {
@Test
void testSortTest() {
QuakeSortInPlace.testSort();
}
@Test
void getLargestDepthTest() {
EarthQuakeParser parser = new EarthQuakeParser();
//String source = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.atom";
String source = "data/nov20quakedatasmall.atom";
//String source = "data/nov20quakedata.atom";
ArrayList<QuakeEntry> list = parser.read(source);
/*for (QuakeEntry qe: list) {
System.out.println(qe);
}*/
System.out.println("read data for "+list.size()+" quakes");
int x = QuakeSortInPlace.getLargestDepth(list, 50);
}
} | [
"[email protected]"
] | |
85d2d25e1fae51e987143fd730eb9c845dd0fa6e | 51e359543bc6f273c79eb91de5398c1b8b1364fc | /Evidenicia.business/src/main/java/projectSI/business/AuthenticationService.java | 5c5d970f8c4f7b129dce2206fb5ac41e7dba794e | [] | no_license | mato-213/Evidenicia | 4b4f8833341e89e30709c5a9a934a69a2a1fba55 | fc8fc84a9afb37f5f49c97eddd032f4244928004 | refs/heads/master | 2020-04-02T20:24:29.252320 | 2016-08-09T20:08:18 | 2016-08-09T20:08:18 | 65,317,779 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 525 | java | package projectSI.business;
import javax.ejb.Stateless;
import javax.inject.Inject;
import projectSI.persistence.dao.PersonDAO;
import projectSI.persistence.entities.Person;
/**
* Class for authentication services
* @author Nikola
*
*/
@Stateless
public class AuthenticationService {
@Inject
private PersonDAO personDAO;
public Person authenticateUser(Integer userNumber, String password) {
if(userNumber == null) return null;
Person person = personDAO.getPersonByLadapId(userNumber);
return person;
}
}
| [
"Mato@Mato-PC"
] | Mato@Mato-PC |
575a413babfdbc0dfe60ed1bc4d250673134dd8a | c435c5e1e778f6d1f5e147adf3db75738f8ebc78 | /Dynamic_Hashing/src/dynamic_hasing/TreeNode.java | 7440a9f01f870207d4a6b52fac93246e2a4ed338 | [] | no_license | ekaratarakis/File-Data-Structures-Java-App-that-performs-Dynamic-Hashin | e69da28476bfb3a1af147b91a22f8de87bb62409 | b636cb56fd7a44ccbdbed17d6c4821bedadc9704 | refs/heads/master | 2020-04-29T15:30:40.950927 | 2019-03-18T11:01:59 | 2019-03-18T11:01:59 | 176,230,634 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,024 | java | package dynamic_hasing;
public class TreeNode
{
private static int empty = -200;
private int key1;
private int key2;
private int level;
private TreeNode left;
private TreeNode right;
public TreeNode() // Constructor of the class TreeNode
{
this.key1 = empty;
this.key2 = empty;
this.level = empty;
this.left = null;
this.right = null;
}
public boolean isLeaf() // Method for checking for leaves
{
boolean exists = true;
if((this.getLeft() != null) && (this.getRight() != null))
{
exists = false;
}
return exists;
}
public boolean isEmpty() // Method for checking if a node is empty
{
boolean emptyNode = false;
if((this.getKey1() == empty) && (this.getKey2() == empty))
{
emptyNode = true;
}
return emptyNode;
}
public boolean FullNode() // Method for checking if a node is full
{
boolean fullnode = false;
if((this.getKey1() != empty) && (this.getKey2() != empty))
{
fullnode = true;
}
return fullnode;
}
public void printNode() // Method for printing nodes
{
System.out.println("Key1:\n"+ getKey1());
System.out.println("Key2:\n"+ getKey2());
System.out.println("Level\n:"+ getLevel());
}
////////////////////////////SETTERS - GETTERS ////////////////////////////
public static int getEmpty() {
return empty;
}
public static void setEmpty(int empty) {
TreeNode.empty = empty;
}
public int getKey1() {
return key1;
}
public void setKey1(int key1) {
this.key1 = key1;
}
public int getKey2() {
return key2;
}
public void setKey2(int key2) {
this.key2 = key2;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public TreeNode getLeft() {
return left;
}
public void setLeft(TreeNode left) {
this.left = left;
}
public TreeNode getRight() {
return right;
}
public void setRight(TreeNode right) {
this.right = right;
}
}
| [
"[email protected]"
] | |
69f78ae4f4db6ef3f075972ace083b16bd1701b5 | 488da7d47ce97eaef5c0cbfc6e8807eeceb43276 | /src/main/java/by/epamtc/homework/array/onedimentional/Task1.java | 09305242f83a321fdc4e4df3a78e9853b7d5d26c | [] | no_license | dmitrycyber/task03_epam | 9260479d2a5214201dd1b7214d4c0abf24d71a23 | 660e1d6f7e1cb5ca0a730e2200eb269e86b8f779 | refs/heads/master | 2022-11-17T19:57:48.498417 | 2020-07-07T21:19:32 | 2020-07-07T21:19:32 | 276,562,204 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 588 | java | package by.epamtc.homework.array.onedimentional;
public class Task1 {
public static void main(String[] args) {
int[] array = {10007, 3, 1, 5, 8, 6, 4, 10, 2345, 45, 1};
System.out.println(calcMaxSumAdjacentElements(array));
}
private static int calcMaxSumAdjacentElements(int[] array) {
int tempMaxSum = array[0] + array[1];
for (int i = 2; i < array.length - 1; i++) {
if (tempMaxSum < array[i] + array[i + 1]) {
tempMaxSum = array[i] + array[i + 1];
}
}
return tempMaxSum;
}
}
| [
"[email protected]"
] | |
538e56a529e5aa8ed9822b10666a9aca80f70f7a | e4c888cde3768f8a57e3cf623d55d0f9f2fcf911 | /MyDevicePhoto/src/com/device/photo/MyDevicePhotoActivity.java | da06fa8dfe9453ec18763138bb9be885b005de0b | [] | no_license | reid1834/Android | 7e4bfa5c91dcf962d2372721417c8131338421e7 | 6bfb3c78148af23b507e46e817d10430cf0bb1b9 | refs/heads/master | 2021-01-19T15:32:31.879087 | 2018-03-28T07:57:22 | 2018-03-28T07:57:22 | 23,210,493 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 5,939 | java | package com.device.photo;
import android.app.Dialog;
import android.content.ContentResolver;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v4.widget.SimpleCursorAdapter;
import android.support.v4.widget.SimpleCursorAdapter.ViewBinder;
/**
* Android实现获取本机中所有图片
* @Description: Android实现获取本机中所有图片
* @FileName: MyDevicePhotoActivity.java
* @Package com.device.photo
* @Author Hanyonglu
* @Date 2012-5-10 下午04:43:55
* @Version V1.0
*/
public class MyDevicePhotoActivity extends FragmentActivity implements LoaderCallbacks<Cursor>{
private Bitmap bitmap = null;
private byte[] mContent = null;
private ListView listView = null;
private SimpleCursorAdapter simpleCursorAdapter = null;
private static final String[] STORE_IMAGES = {
MediaStore.Images.Media.DISPLAY_NAME,
MediaStore.Images.Media.LATITUDE,
MediaStore.Images.Media.LONGITUDE,
MediaStore.Images.Media._ID
};
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
listView = (ListView)findViewById(android.R.id.list);
simpleCursorAdapter = new SimpleCursorAdapter(
this,
R.layout.simple_list_item,
null,
STORE_IMAGES,
new int[] { R.id.item_title, R.id.item_value},
0
);
simpleCursorAdapter.setViewBinder(new ImageLocationBinder());
listView.setAdapter(simpleCursorAdapter);
// 注意此处是getSupportLoaderManager(),而不是getLoaderManager()方法。
getSupportLoaderManager().initLoader(0, null, this);
// 单击显示图片
listView.setOnItemClickListener(new ShowItemImageOnClickListener());
}
@Override
public Loader<Cursor> onCreateLoader(int arg0, Bundle arg1) {
// TODO Auto-generated method stub
// 为了查看信息,需要用到CursorLoader。
CursorLoader cursorLoader = new CursorLoader(
this,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
STORE_IMAGES,
null,
null,
null);
return cursorLoader;
}
@Override
public void onLoaderReset(Loader<Cursor> arg0) {
// TODO Auto-generated method stub
simpleCursorAdapter.swapCursor(null);
}
@Override
public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) {
// TODO Auto-generated method stub
// 使用swapCursor()方法,以使旧的游标不被关闭.
simpleCursorAdapter.swapCursor(cursor);
Log.d("liyang", "listView size: " + listView.getCount());
}
// 将图片的位置绑定到视图
private class ImageLocationBinder implements ViewBinder{
@Override
public boolean setViewValue(View view, Cursor cursor, int arg2) {
// TODO Auto-generated method stub
if (arg2 == 1) {
// 图片经度和纬度
double latitude = cursor.getDouble(arg2);
double longitude = cursor.getDouble(arg2 + 1);
if (latitude == 0.0 && longitude == 0.0) {
((TextView)view).setText("位置:未知");
} else {
((TextView)view).setText("位置:" + latitude + ", " + longitude);
}
// 需要注意:在使用ViewBinder绑定数据时,必须返回真;否则,SimpleCursorAdapter将会用自己的方式绑定数据。
return true;
} else {
return false;
}
}
}
// 单击项显示图片事件监听器
private class ShowItemImageOnClickListener implements OnItemClickListener{
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
// TODO Auto-generated method stub
final Dialog dialog = new Dialog(MyDevicePhotoActivity.this);
// 以对话框形式显示图片
dialog.setContentView(R.layout.image_show);
dialog.setTitle("图片显示");
ImageView ivImageShow = (ImageView) dialog.findViewById(R.id.ivImageShow);
Button btnClose = (Button) dialog.findViewById(R.id.btnClose);
btnClose.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
// 释放资源
if(bitmap != null){
bitmap.recycle();
}
}
});
Uri uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI.buildUpon().
appendPath(Long.toString(id)).build();
FileUtil file = new FileUtil();
ContentResolver resolver = getContentResolver();
// 从Uri中读取图片资源
try {
mContent = file.readInputStream(resolver.openInputStream(Uri.parse(uri.toString())));
bitmap = file.getBitmapFromBytes(mContent, null);
ivImageShow.setImageBitmap(bitmap);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
dialog.show();
}
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
if(bitmap != null){
bitmap.recycle();
}
}
} | [
"[email protected]"
] | |
5ba3db7a27734c63c7593371797b40903fe78fdf | b5c4bcf54aeb2bcb4f6d8b389eb5894a35d34e97 | /javanet/staxutils/EmptyNamespaceContext.java | 8174cdd05965d68cea395f854300a6058a2340fd | [] | no_license | mulderbaba/webservices-osgi | d233daf266c12e102a6e7a2b795d8f43c0dbddfb | 7090b58bd4cdf5fab4af14d54cb20bb45c074de2 | refs/heads/master | 2021-06-02T00:34:49.408686 | 2017-07-27T12:39:42 | 2017-07-27T12:39:42 | 98,534,028 | 2 | 2 | null | 2021-02-03T19:27:23 | 2017-07-27T12:37:43 | Java | UTF-8 | Java | false | false | 2,923 | java | /*
* $Id: EmptyNamespaceContext.java,v 1.2 2004/07/08 14:29:42 cniles Exp $
*
* Copyright (c) 2004, Christian Niles, unit12.net
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Christian Niles, Unit12, 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 javanet.staxutils;
import java.util.Collections;
import java.util.Iterator;
import javax.xml.namespace.NamespaceContext;
/**
* {@link ExtendedNamespaceContext} that contains no namespaces.
*
* @author Christian Niles
* @version $Revision: 1.2 $
*/
public final class EmptyNamespaceContext
implements
ExtendedNamespaceContext,
StaticNamespaceContext {
public static final EmptyNamespaceContext INSTANCE = new EmptyNamespaceContext();
public static final NamespaceContext getInstance() {
return INSTANCE;
}
public String getNamespaceURI(String prefix) {
return null;
}
public String getPrefix(String nsURI) {
return null;
}
public Iterator getPrefixes(String nsURI) {
return Collections.EMPTY_SET.iterator();
}
public NamespaceContext getParent() {
return null;
}
public boolean isPrefixDeclared(String prefix) {
return false;
}
public Iterator getPrefixes() {
return Collections.EMPTY_LIST.iterator();
}
public Iterator getDeclaredPrefixes() {
return Collections.EMPTY_LIST.iterator();
}
} | [
"[email protected]"
] | |
39a752fcf0fe1289b0647f49b65ef6811085aae6 | 103af98e7463479dc429d9e156f76f9e7f84839f | /disruptor-queue/src/main/java/com/arkdex/springinaction/disruptorqueue/workhandler/TickerConsumer.java | ef735943d922dc8764214a08cb57229a1c2633af | [
"MIT"
] | permissive | liuhaidong/spring-in-action | e9c5db24dd4791e9320764dbfcd11d4f0a353489 | b9f7290c526659914a65dc5afbd0d67d476f6213 | refs/heads/master | 2022-11-25T20:42:57.116692 | 2021-10-03T23:28:05 | 2021-10-03T23:28:05 | 239,497,728 | 0 | 0 | MIT | 2022-11-16T10:58:17 | 2020-02-10T11:39:49 | JavaScript | UTF-8 | Java | false | false | 398 | java | package com.arkdex.springinaction.disruptorqueue.workhandler;
import com.arkdex.springinaction.disruptorqueue.Ticker;
import com.lmax.disruptor.WorkHandler;
public class TickerConsumer implements WorkHandler<Ticker> {
@Override
public void onEvent(Ticker longEvent) throws Exception {
System.out.println(Thread.currentThread().getName() + "date: " + longEvent.getDate());
}
}
| [
"[email protected]"
] | |
e88f0d1d825b8f9ef71df8d7ca09bfa86ffef30f | 2cf209b6d7100a254c95111769e62de20f6246ee | /Biblioteca/source/biblioteca/mundo/Libro.java | 3881ba2373e1e7437e9882cde42b43d74f969b86 | [] | no_license | cdherreram/javacourse | 09f21feb59343d27a37ddeab770f9e3b700db140 | 8f3de007401650d749f734326a726cd20efd1e32 | refs/heads/master | 2023-03-30T02:56:45.093248 | 2021-04-06T03:48:45 | 2021-04-06T03:48:45 | 321,517,221 | 0 | 1 | null | null | null | null | ISO-8859-1 | Java | false | false | 2,866 | java | package biblioteca.mundo;
/**
* Clase que modela un libro
* @author Cristian David Herrera
*
*/
public class Libro {
public enum Categoria{
FANTASIA, AVENTURA, POLICIACA, DISTOPICA, SIN_DETERMINAR
}
//---------------
// Atributos
//---------------
private int id;
private String nombre;
private int numPrestamos;
private int numPaginas;
private float peso;
private Fecha fechaLlegada;
private Categoria categoria; //Enumeraciones.
//----------------------
//Constructor
//---------------------
// Overloading - Sobrecarga
public Libro ( int id, String nombre ) {
this.id = id;
this.nombre = nombre;
this.numPrestamos = 0;
this.numPaginas = 300;
this.peso = 100;
//Cómo adicionar fecha:
//1.
Fecha fecha1 = new Fecha(1,1,2000);
this.fechaLlegada = fecha1;
//2.
//this.fechaLlegada = new Fecha(1,1,2000);
this.categoria = Categoria.SIN_DETERMINAR;
}
// Libro ( int, String, int)
public Libro( int id, String nombre, int numPaginas) {
this.id = id;
this.nombre = nombre;
this.numPaginas = numPaginas;
this.numPrestamos = 0;
this.peso = 300;
Fecha fecha1 = new Fecha(1,1,2000);
this.fechaLlegada = fecha1;
this.categoria = Categoria.SIN_DETERMINAR;
}
public Libro(int id, String nombre, int numPrestamos, int numPaginas, float peso, Fecha fechaLlegada,
Categoria categoria) {
this.id = id;
this.nombre = nombre;
this.numPrestamos = numPrestamos;
this.numPaginas = numPaginas;
this.peso = peso;
this.fechaLlegada = fechaLlegada;
this.categoria = categoria;
}
//-----------------
//Métodos
//-----------------
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public int getNumPrestamos() {
return numPrestamos;
}
public void setNumPrestamos(int numPrestamos) {
this.numPrestamos = numPrestamos;
}
public int getNumPaginas() {
return numPaginas;
}
public void setNumPaginas(int numPaginas) {
this.numPaginas = numPaginas;
}
public float getPeso() {
return peso;
}
public void setPeso(float peso) {
this.peso = peso;
}
public Fecha getFechaLlegada() {
return fechaLlegada;
}
public void setFechaLlegada(Fecha fechaLlegada) {
this.fechaLlegada = fechaLlegada;
}
public Categoria getCategoria() {
return categoria;
}
public void setCategoria(Categoria categoria) {
this.categoria = categoria;
}
/**
* Método que aumenta la cantidad de préstamos del libro en 1.
*/
public void agregarPrestamo() {
//TODO: Completar este método.
//numPrestamos = numPrestamos + 1;
numPrestamos++;
}
}
| [
"[email protected]"
] | |
65d622b44263deb44c1299dbeb9789a084864cbc | d58493e6eb090585c5dc7526a40005fa197a98ca | /safer/src/com/jat/safer/adapter/MainAdapter.java | 2abc53a8870ab9f980000e0fdb0d3b057c0dc3fa | [] | no_license | jat-chun/safer | c05aa4e57314756e2db1de473de1d58ab8064dc7 | ae5463b4d1a0624d6a40ff4b0de1ac513dd370cc | refs/heads/master | 2021-01-01T06:32:48.160755 | 2015-02-13T15:22:10 | 2015-02-13T15:22:10 | 30,761,320 | 0 | 1 | null | null | null | null | GB18030 | Java | false | false | 2,796 | java | package com.jat.safer.adapter;
import android.content.Context;
import android.content.SharedPreferences;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.TextView;
import com.jat.safer.R;
import com.jat.safer.biz.SaferPreference;
public class MainAdapter extends BaseAdapter implements ListAdapter {
private SharedPreferences sp;
private Context context;
private LayoutInflater inflater;
public MainAdapter(Context context){
this.context = context;
inflater = LayoutInflater.from(context);
sp = context.getSharedPreferences("config", Context.MODE_PRIVATE);
}
private String[] nameArray = new String[]{"手机防盗","通讯卫士","软件管理","任务管理",
"流量管理","手机杀毒","系统优化","高级工具","设置中心"};
private int[] imageArray = new int[]{R.drawable.widget01,R.drawable.widget02,R.drawable.widget03
,R.drawable.widget04,R.drawable.widget05,R.drawable.widget06,
R.drawable.widget07,R.drawable.widget08,R.drawable.widget09};
@Override
public int getCount() {
// TODO Auto-generated method stub
return nameArray.length;
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public View getView(int position, View arg1, ViewGroup arg2) {
//代码创建layout,将空间添加进去,也可以另外创建layout布局文件,再把控件放置进去
// LinearLayout view = new LinearLayout(context);
// view.setGravity(Gravity.CENTER);
// view.setPadding(0, 10, 0, 10);
// view.setOrientation(LinearLayout.VERTICAL);
//
// ImageView iv = new ImageView(context);
// iv.setImageResource(imageArray[position]);
// iv.setLayoutParams(new LinearLayout.LayoutParams(50, 50));
// view.addView(iv);
//
//
// TextView tv = new TextView(context);
// tv.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
// tv.setText(nameArray[position]);
// tv.setTextColor(0xffc0c0c0);
// tv.setTextSize(16);
// view.addView(tv);
View view = inflater.inflate(R.layout.main_item, null);
ImageView iv_main = (ImageView) view.findViewById(R.id.iv_main);
TextView tv_main = (TextView) view.findViewById(R.id.tv_main);
iv_main.setImageResource(imageArray[position]);
if(position == 0){
String name = sp.getString("name", nameArray[position]);
if("".equals(name)){
name = nameArray[position];
}
tv_main.setText(name);
}else{
tv_main.setText(nameArray[position]);
}
return view;
}
}
| [
"[email protected]"
] | |
b8846a2152a6c4431c7b7bfebef9afd703758be7 | 487ff2ecfd31430c718b78fcd5a6eb089011110e | /src/com/problems/Fibonacci.java | d97b062854d3ac7cb3d738828f0a0dab037ae679 | [] | no_license | IbrahimAyad94/Algorithm | 24d16af8acac60fcfcdc9c3586d5992f67be0980 | 093875446164df2c5659edefe4757e83d7a2d8ca | refs/heads/master | 2023-08-25T21:58:13.517093 | 2021-10-17T08:23:18 | 2021-10-17T08:23:18 | 418,064,160 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 455 | java | package com.problems;
import com.utils.Print;
/**
* @author Ibrahim Shehta
*/
public class Fibonacci {
public static void main(String[] args) {
// TODO Auto-generated method stub
int res = fibonannciByRecurstion(6);
Print.printSingleValue(res, "Fibonacci");
}
public static int fibonannciByRecurstion(int num) {
if (num == 1|| num == 2) return 1;
return fibonannciByRecurstion(num -1 ) + fibonannciByRecurstion(num - 2);
}
}
| [
"[email protected]"
] | |
6f3b6bf71404f9b9c7ae4ebf8e84660d9354bec7 | 975004042fca0166ff4034827dc0a9f7df690397 | /trunk/ProjetoFinalPizzaria/src/pizzaria/visao/JDCnsCliente.java | bb27558c82da9c33ec524eab9bf0ce100c9ca0fc | [] | no_license | BGCX067/faetec-projeto-final-pizzaria-svn-to-git | 94c7bf9b986a9c54ddd100bf6448bfbfbf2506fc | c0b940620765f7164e11416f8b2990edcfef2b3c | refs/heads/master | 2016-09-01T08:56:18.086905 | 2015-12-28T14:21:06 | 2015-12-28T14:21:06 | 48,834,055 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,116 | java | package pizzaria.visao;
// import controle.GerarRelatorio;
import javax.swing.JOptionPane;
import pizzaria.modelo.Cliente;
import pizzaria.modelo.TabelaCliente;
import pizzaria.modeloDao.ClienteDAO;
public class JDCnsCliente extends javax.swing.JDialog {
/** Creates new form JDCnsPessoa */
private TabelaCliente tblCliente = new TabelaCliente();
private ClienteDAO clientedao;
private Cliente cliente = null;
public JDCnsCliente(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
getRootPane().setDefaultButton(btBusca);
// Inicializa padrões da tabela
jtbdados.setModel(tblCliente);
clientedao = new ClienteDAO();
setTamColunas();
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jpTitulo = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jpOpcao = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jtNome = new javax.swing.JTextField();
btBusca = new javax.swing.JButton();
jpResultado = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
jtbdados = new javax.swing.JTable();
jpBotoes = new javax.swing.JPanel();
btOk = new javax.swing.JButton();
btVoltar = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Consulta de Clientes");
jpTitulo.setBackground(new java.awt.Color(204, 0, 0));
jpTitulo.setBorder(javax.swing.BorderFactory.createMatteBorder(3, 3, 3, 3, new java.awt.Color(153, 0, 0)));
jLabel1.setFont(new java.awt.Font("Arial", 1, 22)); // NOI18N
jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jLabel1.setText("Consulta de Clientes");
javax.swing.GroupLayout jpTituloLayout = new javax.swing.GroupLayout(jpTitulo);
jpTitulo.setLayout(jpTituloLayout);
jpTituloLayout.setHorizontalGroup(
jpTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jpTituloLayout.createSequentialGroup()
.addGap(21, 21, 21)
.addComponent(jLabel1)
.addContainerGap(344, Short.MAX_VALUE))
);
jpTituloLayout.setVerticalGroup(
jpTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpTituloLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE)
.addContainerGap())
);
jLabel2.setText("Nome");
btBusca.setText("Buscar");
btBusca.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btBuscaActionPerformed(evt);
}
});
javax.swing.GroupLayout jpOpcaoLayout = new javax.swing.GroupLayout(jpOpcao);
jpOpcao.setLayout(jpOpcaoLayout);
jpOpcaoLayout.setHorizontalGroup(
jpOpcaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jpOpcaoLayout.createSequentialGroup()
.addContainerGap()
.addGroup(jpOpcaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jpOpcaoLayout.createSequentialGroup()
.addComponent(jtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 304, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btBusca, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel2))
.addContainerGap(165, Short.MAX_VALUE))
);
jpOpcaoLayout.setVerticalGroup(
jpOpcaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jpOpcaoLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jpOpcaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btBusca))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jpResultado.setBorder(javax.swing.BorderFactory.createTitledBorder("Resultados"));
jtbdados.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null}
},
new String [] {
"ID", "Nome"
}
) {
Class[] types = new Class [] {
java.lang.Integer.class, java.lang.String.class
};
boolean[] canEdit = new boolean [] {
false, false
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
jScrollPane1.setViewportView(jtbdados);
javax.swing.GroupLayout jpResultadoLayout = new javax.swing.GroupLayout(jpResultado);
jpResultado.setLayout(jpResultadoLayout);
jpResultadoLayout.setHorizontalGroup(
jpResultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE)
);
jpResultadoLayout.setVerticalGroup(
jpResultadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)
);
btOk.setText("OK");
btOk.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btOkActionPerformed(evt);
}
});
btVoltar.setText("Voltar");
btVoltar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btVoltarActionPerformed(evt);
}
});
javax.swing.GroupLayout jpBotoesLayout = new javax.swing.GroupLayout(jpBotoes);
jpBotoes.setLayout(jpBotoesLayout);
jpBotoesLayout.setHorizontalGroup(
jpBotoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jpBotoesLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btOk, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btVoltar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(371, Short.MAX_VALUE))
);
jpBotoesLayout.setVerticalGroup(
jpBotoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jpBotoesLayout.createSequentialGroup()
.addContainerGap()
.addGroup(jpBotoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btOk)
.addComponent(btVoltar))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jpTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(jpOpcao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addComponent(jpResultado, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(jpBotoes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jpTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jpOpcao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
.addComponent(jpResultado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jpBotoes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18))
);
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
setBounds((screenSize.width-589)/2, (screenSize.height-449)/2, 589, 449);
}// </editor-fold>//GEN-END:initComponents
private void btBuscaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btBuscaActionPerformed
try {
clientedao.selecionarPorNome(jtNome.getText());
tblCliente.setResultados(clientedao.getLista());
jtbdados.setRowSelectionInterval(0,0);
setTamColunas();
} catch (Exception e) {
JOptionPane.showMessageDialog(this,"ERRO: "+e.getMessage(), "ERRO", JOptionPane.ERROR_MESSAGE);
}
}//GEN-LAST:event_btBuscaActionPerformed
private void btOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btOkActionPerformed
if (jtbdados.getSelectedRow()>=0){
this.cliente = tblCliente.getCliente(jtbdados.getSelectedRow());
this.setVisible(false);
}
}//GEN-LAST:event_btOkActionPerformed
private void btVoltarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btVoltarActionPerformed
cliente = null;
setVisible(false);
}//GEN-LAST:event_btVoltarActionPerformed
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
JDCnsCliente dialog = new JDCnsCliente(new javax.swing.JFrame(), true);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
}
});
}
private void setTamColunas(){
for (int i=0; i < jtbdados.getColumnCount();i++){
jtbdados.getColumnModel().getColumn(i).setMinWidth(tblCliente.getColumnSize(i));
}
jtbdados.getTableHeader().setResizingAllowed(false);
jtbdados.getTableHeader().setReorderingAllowed(false);
}
public Cliente exibeConsulta() {
this.setModal(true);
this.setVisible(true);
return this.cliente;
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btBusca;
private javax.swing.JButton btOk;
private javax.swing.JButton btVoltar;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JPanel jpBotoes;
private javax.swing.JPanel jpOpcao;
private javax.swing.JPanel jpResultado;
private javax.swing.JPanel jpTitulo;
private javax.swing.JTextField jtNome;
private javax.swing.JTable jtbdados;
// End of variables declaration//GEN-END:variables
}
| [
"[email protected]"
] | |
bed9e0788710f1c2b85739e0a2aa554ed43dda3f | 6202d5ccd62b2ff205abcae86a1b065c7173229c | /MobileAppMultimedia/app/src/main/java/com/android/musicplayertemplate/MusicService.java | e0a1a926008077c6d38fef45dc8ac53ecf920cf9 | [] | no_license | anuvhab/CS473MDP | af64ada8cd14ae7a349fc368889191b8311747c9 | f645c57115a94fcd840eae2b4380cb2f3afb17b4 | refs/heads/master | 2020-03-09T11:59:30.798214 | 2018-04-17T01:33:42 | 2018-04-17T01:33:42 | 128,774,688 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,549 | java | package com.android.musicplayertemplate;
import android.annotation.TargetApi;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.session.MediaController;
import android.media.session.MediaSession;
import android.media.session.MediaSessionManager;
import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
import android.os.PowerManager;
import android.provider.MediaStore;
import android.support.annotation.RequiresApi;
import java.io.IOException;
import java.util.ArrayList;
public class MusicService extends Service implements MediaPlayer.OnPreparedListener, MediaPlayer.OnErrorListener {
private MediaPlayer mPlayer = null;
private ArrayList<Songs> mSongs;
private int mSongPosition;
private IBinder musicBind = new MusicBinder();
private MediaSession mediaSession;
private MediaSessionManager mediaSessionManager;
private MediaController mController;
public static final String ACTION_PLAY = "action_play";
public static final String ACTION_PAUSE = "action_pause";
public static final String ACTION_NEXT = "action_next";
public static final String ACTION_PREVIOUS = "action_previous";
private int duration;
private MediaPlayer mediaPlayer;
public MusicService() {
}
@Override
public void onCreate() {
super.onCreate();
mSongPosition = 0;
mPlayer = new MediaPlayer();
// mPlayer=
initMusicPlayer();
}
public void initMusicPlayer() {
mPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);
mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mPlayer.setOnPreparedListener(this);
mPlayer.setOnErrorListener(this);
}
@Override
public IBinder onBind(Intent intent) {
// TODO: Return the communication channel to the service.
return musicBind;
}
@Override
public boolean onError(MediaPlayer mediaPlayer, int i, int i1) {
return false;
}
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
mPlayer.start();
duration = mediaPlayer.getDuration();
this.mediaPlayer=mediaPlayer;
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onUnbind(Intent intent) {
mPlayer.stop();
mPlayer.release();
mediaSession.release();
return false;
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void handleIntent(Intent intent) {
if (intent == null || intent.getAction() == null) {
return;
}
String action = intent.getAction();
if (action.equalsIgnoreCase(ACTION_PLAY)) {
mController.getTransportControls().play();
} else if (action.equalsIgnoreCase(ACTION_PAUSE)) {
mController.getTransportControls().pause();
} else if (action.equalsIgnoreCase(ACTION_NEXT)) {
mController.getTransportControls().skipToNext();
} else {
mController.getTransportControls().skipToPrevious();
}
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@RequiresApi(api = Build.VERSION_CODES.KITKAT_WATCH)
private Notification.Action genereateAction(int icon, String title, String intentAction) {
Intent intent = new Intent(getApplicationContext(), MusicService.class);
intent.setAction(intentAction);
PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);
mediaSession.setSessionActivity(pendingIntent);
return new Notification.Action.Builder(icon, title, pendingIntent).build();
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void buildNotification(Notification.Action action) {
Notification.MediaStyle style = new Notification.MediaStyle();
Intent intent = new Intent(getApplicationContext(), MusicService.class);
intent.setAction(ACTION_PAUSE);
PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 1, intent, 0);
Notification.Builder builder = new Notification.Builder(this)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentText("Lock Screen Media Example")
.setContentText("Artist Namse")
.setDeleteIntent(pendingIntent)
.setStyle(style);
builder.addAction(genereateAction(R.drawable.ic_action_skipprevious, "Previous", ACTION_PREVIOUS));
builder.addAction(genereateAction(R.drawable.ic_action_skipnext, "Next", ACTION_NEXT));
builder.addAction(action);
builder.addAction(genereateAction(R.drawable.ic_action_play, "Play", ACTION_PLAY));
builder.addAction(genereateAction(R.drawable.ic_action_pause, "Pause", ACTION_PAUSE));
style.setShowActionsInCompactView(0, 1, 2, 4);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(1, builder.build());
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (mediaSessionManager == null) {
initMediaSession();
}
handleIntent(intent);
return super.onStartCommand(intent, flags, startId);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void initMediaSession() {
mediaSession = new MediaSession(getApplicationContext(), "Exampl player session");
mediaSession.setFlags(MediaSession.FLAG_HANDLES_MEDIA_BUTTONS | MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS);
mController = new MediaController(getApplicationContext(), mediaSession.getSessionToken());
mediaSession.setCallback(new MediaSession.Callback() {
@Override
public void onPlay() {
super.onPlay();
buildNotification(genereateAction(R.drawable.ic_action_play, "Play", ACTION_PLAY));
}
@Override
public void onPause() {
super.onPause();
buildNotification(genereateAction(R.drawable.ic_action_pause, "Pause", ACTION_PAUSE));
}
@Override
public void onSkipToNext() {
super.onSkipToNext();
buildNotification(genereateAction(R.drawable.ic_action_skipnext, "Next", ACTION_NEXT));
}
@Override
public void onSkipToPrevious() {
super.onSkipToPrevious();
buildNotification(genereateAction(R.drawable.ic_action_skipprevious, "Previous", ACTION_PREVIOUS));
}
@Override
public void onStop() {
super.onStop();
}
});
}
public void playSong() {
mPlayer.reset();
Songs playSong = mSongs.get(mSongPosition);
long curreSog = playSong.getmSongID();
Uri trackUri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, curreSog);
try {
mPlayer.setDataSource(getApplicationContext(), trackUri);
} catch (IOException e) {
e.printStackTrace();
}
mPlayer.prepareAsync();
}
public class MusicBinder extends Binder {
MusicService getService() {
return MusicService.this;
}
}
public void setmSongs(int songIndex) {
mSongPosition = songIndex;
}
public void setList(ArrayList<Songs> theSongs) {
mSongs = theSongs;
}
public MediaPlayer getMediaPlayer() {
return mPlayer;
}
public int getDuration() {
return duration;
}
public int getCurrentDuration() {
return mediaPlayer.getCurrentPosition();
}
@Override
public void onDestroy() {
NotificationManager notificationManager = (NotificationManager) getApplication().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(1);
Intent intent = new Intent(getApplicationContext(), MusicService.class);
stopService(intent);
super.onDestroy();
}
}
| [
"[email protected]"
] | |
ac15b523f4add9116b374df59be76a289fa11247 | 3a6f00b87343e60e24f586dae176bdf010b5dcae | /sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java | 8158209ebd4bf27a98b5f787c142b65db896139f | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"CC0-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later"
] | permissive | RaviTella/azure-sdk-for-java | 4c3267ea7a3ef17ffef89621c8add0a8b7dc72cb | d82d70fde49071ee2cefb4a69621c680dfafc793 | refs/heads/main | 2022-04-26T21:11:08.604986 | 2022-04-11T07:03:32 | 2022-04-11T07:03:32 | 394,745,792 | 0 | 0 | MIT | 2021-09-13T15:03:34 | 2021-08-10T18:25:18 | Java | UTF-8 | Java | false | false | 3,444 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.videoanalyzer.models;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
/** Resource collection API of PrivateLinkResources. */
public interface PrivateLinkResources {
/**
* Get list of group IDs for video analyzer account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The Video Analyzer account name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of group IDs for video analyzer account.
*/
PrivateLinkResourceListResult list(String resourceGroupName, String accountName);
/**
* Get list of group IDs for video analyzer account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The Video Analyzer account name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return list of group IDs for video analyzer account.
*/
Response<PrivateLinkResourceListResult> listWithResponse(
String resourceGroupName, String accountName, Context context);
/**
* Get group ID for video analyzer account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The Video Analyzer account name.
* @param name Name of the private link resource (Group ID).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return group ID for video analyzer account.
*/
PrivateLinkResource get(String resourceGroupName, String accountName, String name);
/**
* Get group ID for video analyzer account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The Video Analyzer account name.
* @param name Name of the private link resource (Group ID).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return group ID for video analyzer account.
*/
Response<PrivateLinkResource> getWithResponse(
String resourceGroupName, String accountName, String name, Context context);
}
| [
"[email protected]"
] | |
970ba6f563c004969b5f3012ce0d4d6c70429fe9 | 374262f8ec2050850fe3caac93dd1a29befbf950 | /aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/CreateInstanceSnapshotRequest.java | 619915372f335d531ffec76f5a114f75ccb3eaf6 | [
"Apache-2.0"
] | permissive | kdheerendra/aws-sdk-java | 454ea7f92a3229d264ae9d34a678ca46b9253dcd | 36bb9b750d04dc5871d6191bce101540c858986a | refs/heads/master | 2021-04-28T22:01:51.477984 | 2016-12-31T19:33:43 | 2016-12-31T19:33:43 | 77,733,717 | 0 | 0 | null | 2016-12-31T09:21:30 | 2016-12-31T09:21:29 | null | UTF-8 | Java | false | false | 5,246 | java | /*
* Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.lightsail.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateInstanceSnapshot"/>AWS API
* Documentation</a>
*/
public class CreateInstanceSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* The name for your new snapshot.
* </p>
*/
private String instanceSnapshotName;
/**
* <p>
* The Lightsail instance on which to base your snapshot.
* </p>
*/
private String instanceName;
/**
* <p>
* The name for your new snapshot.
* </p>
*
* @param instanceSnapshotName
* The name for your new snapshot.
*/
public void setInstanceSnapshotName(String instanceSnapshotName) {
this.instanceSnapshotName = instanceSnapshotName;
}
/**
* <p>
* The name for your new snapshot.
* </p>
*
* @return The name for your new snapshot.
*/
public String getInstanceSnapshotName() {
return this.instanceSnapshotName;
}
/**
* <p>
* The name for your new snapshot.
* </p>
*
* @param instanceSnapshotName
* The name for your new snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceSnapshotRequest withInstanceSnapshotName(String instanceSnapshotName) {
setInstanceSnapshotName(instanceSnapshotName);
return this;
}
/**
* <p>
* The Lightsail instance on which to base your snapshot.
* </p>
*
* @param instanceName
* The Lightsail instance on which to base your snapshot.
*/
public void setInstanceName(String instanceName) {
this.instanceName = instanceName;
}
/**
* <p>
* The Lightsail instance on which to base your snapshot.
* </p>
*
* @return The Lightsail instance on which to base your snapshot.
*/
public String getInstanceName() {
return this.instanceName;
}
/**
* <p>
* The Lightsail instance on which to base your snapshot.
* </p>
*
* @param instanceName
* The Lightsail instance on which to base your snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateInstanceSnapshotRequest withInstanceName(String instanceName) {
setInstanceName(instanceName);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getInstanceSnapshotName() != null)
sb.append("InstanceSnapshotName: ").append(getInstanceSnapshotName()).append(",");
if (getInstanceName() != null)
sb.append("InstanceName: ").append(getInstanceName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateInstanceSnapshotRequest == false)
return false;
CreateInstanceSnapshotRequest other = (CreateInstanceSnapshotRequest) obj;
if (other.getInstanceSnapshotName() == null ^ this.getInstanceSnapshotName() == null)
return false;
if (other.getInstanceSnapshotName() != null && other.getInstanceSnapshotName().equals(this.getInstanceSnapshotName()) == false)
return false;
if (other.getInstanceName() == null ^ this.getInstanceName() == null)
return false;
if (other.getInstanceName() != null && other.getInstanceName().equals(this.getInstanceName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInstanceSnapshotName() == null) ? 0 : getInstanceSnapshotName().hashCode());
hashCode = prime * hashCode + ((getInstanceName() == null) ? 0 : getInstanceName().hashCode());
return hashCode;
}
@Override
public CreateInstanceSnapshotRequest clone() {
return (CreateInstanceSnapshotRequest) super.clone();
}
}
| [
""
] | |
e56cf0aeafb6f1acc9c1228a2c38065f0a2c196b | 5d02c1a4cfe015842a311dbf0898246ac917b74b | /src/main/java/lombok/stablefeatures/notnull/NotNullWithLombok.java | 324f73c489fe253ceed47e9ae2193fbf3b8a17f8 | [] | no_license | shivam4tek/lombokAdvanced | 95fdd383031de4e5ff7b19a46d9327e25d72bda8 | f581261b88d6298f80e05dfcd12563543f2a177c | refs/heads/master | 2022-12-08T05:42:14.025215 | 2020-09-06T01:59:18 | 2020-09-06T01:59:18 | 292,743,260 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 254 | java | package lombok.stablefeatures.notnull;
import lombok.Data;
import lombok.NonNull;
@Data
public class NotNullWithLombok extends Parent{
String name;
public NotNullWithLombok(@NonNull SamplePojo var) {
super(123);
this.name = var.getName();
}
} | [
"[email protected]"
] | |
d37521b705c3be2b50c6a1f59cfb5ba88990c299 | 2a7adee4691d987f8e042aed9432f9a5c247cc76 | /app/src/main/java/com/androidapp/test/mybank/data/remote/TransactionalService.java | 2ed3850d83c3c8a377bf46669c554ffbe575cd9a | [] | no_license | jalvarezcaicedo/MyBank | cab938eedf4ce908d961452dd09d5d471802cce7 | 2ff4b306f82c3429ec02a345e62ba047bfc9282a | refs/heads/master | 2021-08-23T17:17:27.973665 | 2017-12-05T21:20:23 | 2017-12-05T21:20:23 | 113,130,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,654 | java | package com.androidapp.test.mybank.data.remote;
import com.androidapp.test.mybank.MyBankApplication;
import com.androidapp.test.mybank.R;
import com.androidapp.test.mybank.data.model.customerinfo.CustomerInformationResponse;
import com.androidapp.test.mybank.data.model.customerinfo.CustomerProductResponse;
import com.androidapp.test.mybank.data.model.login.Login;
import com.androidapp.test.mybank.data.model.signup.SignUpRequest;
import com.androidapp.test.mybank.data.model.signup.SignUpResponse;
import com.androidapp.test.mybank.data.model.transaction.TransactionRequest;
import com.androidapp.test.mybank.data.model.transaction.TransactionResponse;
import com.androidapp.test.mybank.util.Constants;
import com.androidapp.test.mybank.util.SingletonSharedPreference;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
import io.reactivex.Observable;
import okhttp3.CertificatePinner;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Url;
public class TransactionalService {
public static RetrofitInterface newTransactionalService() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException, KeyManagementException {
Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
CertificatePinner certificatePinner = new CertificatePinner.Builder()
.add("localhost", "sha256/URRP0/Bw8F3eMJ5Sn6m/C+aYOEK97e82x+l0cjXVRzM=")
.build();
CertificateFactory cf = CertificateFactory.getInstance("X.509");
Certificate ca;
try (InputStream caInput = new BufferedInputStream(MyBankApplication.getContext().getResources().openRawResource(R.raw.mybank_client))) {
ca = cf.generateCertificate(caInput);
}
String keyStoreType = KeyStore.getDefaultType();
KeyStore keyStore = KeyStore.getInstance(keyStoreType);
keyStore.load(null, null);
keyStore.setCertificateEntry("ca", ca);
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init(keyStore);
TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) {
throw new IllegalStateException("Unexpected default trust managers:" + Arrays.toString(trustManagers));
}
X509TrustManager trustManager = (X509TrustManager) trustManagers[0];
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, new TrustManager[]{trustManager}, null);
SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.sslSocketFactory(sslSocketFactory, trustManager)
.certificatePinner(certificatePinner)
.hostnameVerifier((s, sslSession) -> {
HostnameVerifier hv = HttpsURLConnection.getDefaultHostnameVerifier();
return hv.verify("localhost", sslSession);
})
.addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
.addNetworkInterceptor(new AddHeaderInterceptor())
.connectTimeout(120, TimeUnit.SECONDS)
.writeTimeout(120, TimeUnit.SECONDS)
.readTimeout(120, TimeUnit.SECONDS).build();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://" + SingletonSharedPreference.getInstance().getSharedPrefs().getString(Constants.SERVER, Constants.DEFAULT_SERVER) + ":4443/")
.addConverterFactory(GsonConverterFactory.create(gson))
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.client(okHttpClient)
.build();
return retrofit.create(RetrofitInterface.class);
}
public interface RetrofitInterface {
@POST("/login")
Observable<Response<Void>> loginCall(@Body Login login);
@POST("/api/1.0/customer/sign-up")
Observable<Response<SignUpResponse>> signUpCall(@Body SignUpRequest signUpRequest);
@GET
Observable<Response<CustomerInformationResponse>> customerByIdCall(@Url String url, @Header("Authorization") String authorization);
@GET
Observable<Response<List<CustomerProductResponse>>> customerProductsCall(@Url String url);
@GET
Observable<Response<CustomerProductResponse>> customerProductInfoCall(@Url String url, @Header("Authorization") String authorization);
@GET
Observable<Response<List<TransactionResponse>>> lastTransactionsCall(@Url String url, @Header("Authorization") String authorization);
@POST("/api/1.0/transaction/save")
Observable<Response<TransactionResponse>> saveTransactionCall(@Header("Authorization") String authorization, @Body TransactionRequest transactionRequest);
}
public static class AddHeaderInterceptor implements Interceptor {
AddHeaderInterceptor() {
}
@Override
public okhttp3.Response intercept(Chain chain) throws IOException {
Request.Builder builder = chain.request().newBuilder();
builder.addHeader("Authorization", SingletonSharedPreference.getInstance().getSharedPrefs().getString(Constants.AUTHORIZATION_HEADER, ""));
return chain.proceed(builder.build());
}
}
}
| [
"[email protected]"
] | |
d8724fae49d00f8272cd9d6575c10490a5960185 | aca457909ef8c4eb989ba23919de508c490b074a | /DialerJADXDecompile/defpackage/qb.java | 75fcfe5927f69e9d58384a1a3732ac935b688490 | [] | no_license | KHikami/ProjectFiCallingDeciphered | bfccc1e1ba5680d32a4337746de4b525f1911969 | cc92bf6d4cad16559a2ecbc592503d37a182dee3 | refs/heads/master | 2021-01-12T17:50:59.643861 | 2016-12-08T01:20:34 | 2016-12-08T01:23:04 | 71,650,754 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,892 | java | package defpackage;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
/* compiled from: PG */
/* renamed from: qb */
public abstract class qb {
static int a;
private static boolean b;
public abstract View a(int i);
public abstract pl a();
public abstract void a(Configuration configuration);
public abstract void a(Bundle bundle);
public abstract void a(View view);
public abstract void a(View view, LayoutParams layoutParams);
public abstract void a(CharSequence charSequence);
public abstract MenuInflater b();
public abstract void b(int i);
public abstract void b(Bundle bundle);
public abstract void b(View view, LayoutParams layoutParams);
public abstract void c();
public abstract boolean c(int i);
public abstract void d();
public abstract void e();
public abstract void f();
public abstract void g();
public abstract void h();
public abstract boolean i();
static {
a = -1;
b = false;
}
public static qb a(Activity activity, qa qaVar) {
return qb.a(activity, activity.getWindow(), qaVar);
}
static qb a(Context context, Window window, qa qaVar) {
int i = VERSION.SDK_INT;
if (buf.c()) {
return new qe(context, window, qaVar);
}
if (i >= 23) {
return new qj(context, window, qaVar);
}
if (i >= 14) {
return new qh(context, window, qaVar);
}
if (i >= 11) {
return new qg(context, window, qaVar);
}
return new ql(context, window, qaVar);
}
qb() {
}
}
| [
"[email protected]"
] | |
179d86f744ede46813fa0eac0711178283fdbab3 | eb05ff4ec6d2a26c744fba49920ca8221733f670 | /src/main/java/bgu/spl/mics/application/messages/TickBroadcast.java | 8e15bd390d55299546b8b498778dbea156c0a31a | [] | no_license | tallitman/Mult-Threading-Store-MicroService-based-Project | 0cdf9ca634714dd0b1bbe3ed4f1014d0cb2fa7b9 | 5a9d3aaaebd19805f614fb148537e88819e0eedc | refs/heads/master | 2021-10-14T09:46:47.904208 | 2019-02-04T09:06:44 | 2019-02-04T09:06:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 824 | java | package bgu.spl.mics.application.messages;
import bgu.spl.mics.Broadcast;
/**
* TickBroadcast is a boradcast send to each micreservice in uot application
* the Tick broadcast reprsent to current tick and the program duration
*/
public class TickBroadcast implements Broadcast {
private int fCurrentTick;
private int fDuration;
public TickBroadcast(int currentTick,int duration) {
fCurrentTick = currentTick;
fDuration=duration;
}
/**
* Retrieves the current time tick
* <p>
* @return an integer representing the current tick
*/
public int getCurrentTick() {
return fCurrentTick;
}
/**
* Retrieves the program duration time
* <p>
* @return an integer representing the program duration
*/
public int getDuration() {
return fDuration;
}
} | [
"[email protected]"
] | |
f6838a3ac0a028b63f3bd4f035b9060dcc66991c | cc752c677dbf3166d1c197c7e56427352ab48d28 | /src/test/java/david/be/operational_v2/application/api/DeliveryRequestHandlerTest.java | 7b7ef91223d8f53920ece17fe4c3b72cb8b5310d | [] | no_license | davidmatei/operational | 2ed643fe0274d95b01aa4871713b065231904d72 | b0b510c8e4a69ff7858cc73fbe4e1a23c52058bd | refs/heads/master | 2022-12-30T20:02:05.518928 | 2020-10-19T13:40:40 | 2020-10-19T13:40:40 | 304,696,296 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,009 | java | package david.be.operational_v2.application.api;
import david.be.operational_v2.application.domain.DeliveryRequest;
import david.be.operational_v2.application.infrastructure.DeliveryRequestRepositoryStub;
import david.be.operational_v2.application.port.secondary.DeliveryRequestRepository;
import david.be.operational_v2.infrastructure.DeliveryRequestEvent;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class DeliveryRequestHandlerTest {
@Test
void calculatePriceForPrivateCustomer() {
//given
double basePrice = 10;
double weightFactor = 5;
DeliveryRequestRepository deliveryRequestRepository = new DeliveryRequestRepositoryStub();
DeliveryRequestHandler deliveryRequestHandler = new DeliveryRequestHandler(deliveryRequestRepository);
//when
deliveryRequestHandler.handle(deliveryRequestEvent(2.0));
//then
// basisprijs + gewicht * gewichtsFactor
//10 + 2 * 5 = 20
DeliveryRequest deliveryRequest = deliveryRequestRepository.find(1);
assertEquals(20, deliveryRequest.getPrice());
}
@Test
void calculatePriceForPrivateCustomer2() {
//given
double basePrice = 10;
double weightFactor = 5;
DeliveryRequestRepository deliveryRequestRepository = new DeliveryRequestRepositoryStub();
DeliveryRequestHandler deliveryRequestHandler = new DeliveryRequestHandler(deliveryRequestRepository);
//when
deliveryRequestHandler.handle(deliveryRequestEvent(4.0));
//then
// basisprijs + gewicht * gewichtsFactor
//10 + 2 * 5 = 20
DeliveryRequest deliveryRequest = deliveryRequestRepository.find(1);
assertEquals(30, deliveryRequest.getPrice());
}
private DeliveryRequestEvent deliveryRequestEvent(double weight) {
return new DeliveryRequestEvent(2.0, 2.0, 2.0, weight,
"Mercatorstraat", "124", "2", "2018", "Belgium", 1);
}
} | [
"[email protected]"
] | |
079344b3de3c9e1336a833f5d914813945f8b79c | 0e4bd35b193cb412b8ae96e07356a8819c998360 | /app/src/test/java/com/YiDian/RainBow/ExampleUnitTest.java | 7e238d0afe399f001361ee1dcdac311e156e7281 | [] | no_license | hexin5213578/RainBow | 127f743cfeb89a3c4b68cbb3ab8f7498ad9751df | 0a4ce0e68c1be17f19b14e0d9363e3da9d74fcd8 | refs/heads/master | 2023-03-31T05:50:08.627554 | 2021-04-09T09:23:06 | 2021-04-09T09:23:06 | 301,272,155 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 379 | java | package com.YiDian.RainBow;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"[email protected]"
] | |
4b82adf4247f947f6c7a92d9aac4ea94f00b134a | 08a4a206a364b7e736936f831d362c96dda2cd8d | /src/Sortings/QuickSort.java | 9ee6cd639e5b0992ae05e5624eb10c994bc2f8cb | [] | no_license | anshul1710/Data-Structures | 1289c4e0f577c2d277ac347045f6f1e31f703ce6 | 55323b9d75729ef79865f328fca938c02e1ad0bf | refs/heads/master | 2020-08-24T21:09:29.213287 | 2019-10-22T20:41:19 | 2019-10-22T20:41:19 | 216,905,936 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,072 | java | package Sortings;
public class QuickSort {
public static int partition(int[]arr,int low,int high)
{
int pivot = arr[high];
int i = (low-1);
for (int j=low; j<high; j++)
{
if (arr[j] < pivot)
{
i++;
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
}
int temp = arr[i+1];
arr[i+1] = arr[high];
arr[high] = temp;
return i+1;
}
public static void quick(int[] arr,int low,int high)
{
if(low<high)
{
int p=partition(arr,low,high);
quick(arr,low,p-1);
quick(arr,p+1,high);
}
}
public static int[] sort(int [] arr)
{
int low=0;
int high=arr.length-1;
quick(arr,low,high);
return arr;
}
public static void main(String[] args)
{
int arr[]={10,20,70,50,90,60,80};
arr=sort(arr);
for(int i=0;i<arr.length;i++)
{
System.out.println(arr[i]+" ");
}
}
}
| [
"[email protected]"
] | |
bac1aadb60c66efcb8185b9f50b034512d5fe07f | 575c74231f19358c2c7d5f8e41fc5a3251ad3f57 | /gmall-admin-web/src/main/java/com/atguigu/gmall/admin/oss/OssController.java | 0c7396587773bc1b04439ae33cc50ae0705d55c6 | [] | no_license | Ryujung/gmall | bcf9b87e0bc4bea0b5166ef9f66374d63077ccfe | ef8b133e3e709239ddfc87e3814d4e4098dc73f1 | refs/heads/master | 2022-07-04T01:14:40.200020 | 2020-09-23T00:52:24 | 2020-09-23T00:52:24 | 241,570,828 | 0 | 0 | null | 2022-06-21T02:49:46 | 2020-02-19T08:32:52 | Java | UTF-8 | Java | false | false | 1,157 | java | package com.atguigu.gmall.admin.oss;
import com.atguigu.gmall.admin.oss.component.OssComponent;
import com.atguigu.gmall.to.CommonResult;
import com.atguigu.gmall.to.OssPolicyResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
/**
* Oss相关操作接口
*
* 阿里云上传:
* 前端页面form表单,文档上传,-->后台收到流后ossClient.upload到阿里云OSS系统
*/
@CrossOrigin
@Controller
@Api(tags = "OssController",description = "Oss管理")
@RequestMapping("/aliyun/oss")
public class OssController {
@Resource
private OssComponent ossComponent;
@ApiOperation(value = "oss上传签名生成")
@GetMapping(value = "/policy")
@ResponseBody
public Object policy() {
OssPolicyResult result = ossComponent.policy();
return new CommonResult().success(result);
}
}
| [
"[email protected]"
] | |
59f38ca6ef694306911a5b819da8e3ac627fdfdf | 0e87e32fb92c5080e76257d94c04b2ec05b023fe | /src/test/java/org/compass/annotations/test/converter/enum1/B.java | e48d7dda91abd713d755bd5008a5308fa5a0fc86 | [
"Apache-2.0"
] | permissive | molindo/elastic-compass | 7216e4f69bc75bbfcd91c3b7a43a2cc48453f2c5 | dd8c19e48efd9f620a92e07f7b35fefae556b9fc | refs/heads/master | 2016-09-06T15:09:45.331273 | 2011-05-09T09:51:33 | 2011-05-09T09:51:33 | 1,649,609 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 187 | java | package org.compass.annotations.test.converter.enum1;
/**
* @author kimchy
*/
public interface B {
public enum Type {
Note, Call, Meeting, Organisation, Attachment
}
}
| [
"[email protected]"
] | |
bb7a225e419abde2c6bf2deae5f346fa9e90a328 | 4029b10eb1ed2f2f09d99717219a5d52f174f336 | /SpringBootBrowserGame/src/main/java/com/game/app/entity/parent/package-info.java | f4886924100f1054ec4325765a44d99976a5b708 | [] | no_license | FranciscoNadal1/SpringBootBrowserGame | 58f016cccde24af795c85d2db3c9c16f4b5554d5 | dffc7fa3d807069723108fe74e1df980c8f2bd2f | refs/heads/master | 2023-04-06T05:51:26.527109 | 2021-04-06T21:29:47 | 2021-04-06T21:29:47 | 351,237,578 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 35 | java | package com.game.app.entity.parent; | [
"[email protected]"
] | |
18a71fdf687a8602ee5caa0d18f694aa47116b39 | b597197df6eb340bb4ab3f62d18eca65a67a7574 | /src/main/java/org/doit/easyvalidation/annotations/Size.java | 30d7cb4338072fc425fb3b1100a65f5e6265c2cd | [] | no_license | xcerox/EasyValidation | c366b8b9477f29cfdebe47c15d66613c8436c597 | bd65bccd8755b033c2a9daaeb56007f9ffbd7bed | refs/heads/master | 2021-01-19T09:52:35.061540 | 2017-06-26T22:11:59 | 2017-06-26T22:11:59 | 82,150,001 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 639 | java | package org.doit.easyvalidation.annotations;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import org.doit.easyvalidation.consts.Empty;
import org.doit.easyvalidation.interfaces.impl.SizeValidator;
@Documented
@Retention(RUNTIME)
@Target(METHOD)
@Validation(value = SizeValidator.class, id = "DOIT@SIZE_VALIDATOR")
public @interface Size {
@Property
public int min() default Empty.INTEGER;
@Property
public int max() default Empty.INTEGER;
}
| [
"[email protected]"
] | |
05fbdbc9b33aa11fa457e6325a21dc6990e3c720 | 0cb9c1c3ea7c74fcdc412cdad84957b3b92473f0 | /src/cn6/iterator/Client.java | 4c28fecea66ee941bbd70afd9e9c9c5042b6375d | [] | no_license | plusyou13/java_demo | 1c96dd4238ee50fb6325a25a417fd230b9560cff | 1d16ac9c5c5b94494a0962dcd2c7f0d08e46000f | refs/heads/master | 2022-11-17T06:49:24.818635 | 2020-07-17T07:01:15 | 2020-07-17T07:01:15 | 275,190,730 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 529 | java | package cn6.iterator;
import java.util.ArrayList;
import java.util.List;
public class Client {
public static void main(String[] args) {
// TODO Auto-generated method stub
//´´½¨Ñ§Ôº
List<College> collegeList = new ArrayList<College>();
ComputerCollege computerCollege = new ComputerCollege();
InfoCollege infoCollege = new InfoCollege();
collegeList.add(computerCollege);
//collegeList.add(infoCollege);
OutPutImpl outPutImpl = new OutPutImpl(collegeList);
outPutImpl.printCollege();
}
}
| [
"[email protected]"
] | |
fbf691587339ee6bc53996289be08969de55001f | 40c3f9b957119e5d85a679629d83876b2e6c7742 | /decorator/src/main/java/com/cardinal/decorator/beverage/Decaf.java | 0d1b4e2cbc591e1014fa47d83bf292faf0cb0f11 | [] | no_license | darkestpriest/patterns | 3a2c9e850578c82ff05ce980b7f7f2801221722f | c94faf1ba7f8ff2ace7b3bb4a77ece73754a0772 | refs/heads/master | 2021-01-01T16:31:26.124113 | 2017-07-24T19:53:04 | 2017-07-24T19:53:04 | 97,848,071 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 313 | java | package com.cardinal.decorator.beverage;
import com.cardinal.decorator.interfaces.Beverage;
/**
* Created by maperez on 20/7/2017.
*/
public class Decaf extends Beverage {
public Decaf() {
description = "Decaf Coffee";
}
@Override
public double cost() {
return 2.89;
}
}
| [
"[email protected]"
] | |
0625d607e1b35adb4285a199a3beffc8a1850702 | 13ec8885a7f7b6e360f7d4d7be8538109f5e6019 | /src/Interface_Employee/leave.java | d7d8b58b7c72cdee5baeee35311571932a4b311e | [] | no_license | LakshithaW/Furniture-shop-management-system | 28c7c6e3695622711d8023e8912efdbd1585bcb3 | 75515e11d1cabb474e1073a2c6e814432eece3bd | refs/heads/master | 2023-02-25T14:05:05.360972 | 2021-01-29T05:55:27 | 2021-01-29T05:55:27 | 334,045,779 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,456 | 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 Interface_Employee;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import mycode.DBconnect;
public class leave extends javax.swing.JFrame {
Connection conn=null;
PreparedStatement pst=null;
ResultSet rs=null;
/**
* Creates new form leave
*/
public leave() {
initComponents();
conn=DBconnect.connect();
comboload();
}
public boolean validator(){
if(jComboBox1.getSelectedItem().toString().equals("Select"))
{
JOptionPane.showMessageDialog(null,"Select Employee ID");
return false;
}
return true;
}
public void comboload(){
jComboBox1.removeAllItems();
jComboBox1.addItem("Select");
try{
String sql= "select empid from employee";
pst =conn.prepareStatement(sql);
rs=pst.executeQuery();
while(rs.next()){
jComboBox1.addItem(rs.getString(1));
}
}catch(SQLException ex)
{
System.out.println(ex);
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox();
jLabel4 = new javax.swing.JLabel();
jButton3 = new javax.swing.JButton();
jTextField1 = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 24)); // NOI18N
jLabel1.setText("Employee Leave Details");
jButton2.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N
jButton2.setText("Back");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel3.setText("Employee ID ");
jComboBox1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select" }));
jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel4.setText("Leave Days");
jButton3.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N
jButton3.setText("Submit");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jTextField1KeyReleased(evt);
}
});
jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel5.setText("amount");
jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jTextField2KeyReleased(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(127, 127, 127)
.addComponent(jLabel3))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(134, 134, 134)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(86, 86, 86)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jComboBox1, 0, 117, Short.MAX_VALUE)
.addComponent(jTextField1)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(43, 43, 43)
.addComponent(jButton2)
.addGap(83, 83, 83)
.addComponent(jLabel1))
.addGroup(layout.createSequentialGroup()
.addGap(87, 87, 87)
.addComponent(jLabel2))
.addGroup(layout.createSequentialGroup()
.addGap(250, 250, 250)
.addComponent(jButton3)))
.addContainerGap(167, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(40, 40, 40)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton2)
.addComponent(jLabel1))
.addGap(69, 69, 69)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addGap(18, 18, 18)
.addComponent(jLabel3))
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(jLabel4)
.addGap(14, 14, 14))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(68, 68, 68)
.addComponent(jButton3)
.addContainerGap(45, Short.MAX_VALUE))
);
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
public void reset(){
jComboBox1.setSelectedItem("Select");
jTextField1.setText("");
jTextField2.setText("");
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
mainEmployees x = new mainEmployees();
x.setVisible(true);
this.dispose();
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
boolean check = validator();
if (check == true)
{
int days=Integer.parseInt(jTextField1.getText());
double amount=Double.parseDouble(jTextField2.getText());
String insert= "INSERT INTO `leaveEmp`( `empid`, `nodays`,amount) VALUES ("+jComboBox1.getSelectedItem().toString()+","+jTextField1.getText()+","+amount*days+")";
try {
pst=conn.prepareStatement(insert);
pst.execute();
} catch (SQLException ex) {
System.out.println(ex);
}
reset();
}
}//GEN-LAST:event_jButton3ActionPerformed
private void jTextField1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyReleased
// TODO add your handling code here:
String x =jTextField1.getText();
for(int i =0; i<x.length(); i++){
char c = x.charAt(i);
if(Character.isDigit(c))
{
}
else if(Character.isLetter(c))
{
JOptionPane.showMessageDialog(null, "This field cannot have letters", "Error",0);
jTextField1.setText("");
break;
}
}
}//GEN-LAST:event_jTextField1KeyReleased
private void jTextField2KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField2KeyReleased
// TODO add your handling code here:
String x =jTextField2.getText();
for(int i =0; i<x.length(); i++){
char c = x.charAt(i);
if(Character.isDigit(c))
{
}
else if(Character.isLetter(c))
{
JOptionPane.showMessageDialog(null, "This field cannot have letters", "Error",0);
jTextField2.setText("");
break;
}
}
}//GEN-LAST:event_jTextField2KeyReleased
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(leave.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(leave.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(leave.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(leave.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new leave().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration//GEN-END:variables
}
| [
"[email protected]"
] | |
0f69f321e85920eec029a92d5bffc3bfb209e438 | f8602b556175080fd6958873bc1195488d4810de | /src/by/epamtc/exercise1/unit/CalculationLogics.java | ea066eef0b0d3d6a13342bedf59423826d26922a | [] | no_license | VoloshchukD/epam_task1 | 1753d46f6f0f2e93b71f11530d13992d73bd5f8e | 63aa92cdd5d3a135e30ea92e4498df0d8b193978 | refs/heads/master | 2023-04-14T06:14:23.372748 | 2021-04-29T09:10:40 | 2021-04-29T09:10:40 | 350,843,389 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 286 | java | package by.epamtc.exercise1.unit;
public class CalculationLogics {
public static int calculateLastSquaredDigit(int number) {
int lastDigitOfNumber = number % 10;
int squaredNumber = (int) Math.pow(lastDigitOfNumber, 2);
return squaredNumber % 10;
}
}
| [
"[email protected]"
] | |
d5737158cbe17c265643b88303ded8a00d31776d | 63ed10871dfa83c093da67ab793ebf6a7444c478 | /project2/ProbusPresto/app/src/main/java/dev/malikkurosaki/probuspresto/LayoutFragment1.java | ba2c2971e00985fd919191ed156fb4c9c514fee6 | [] | no_license | malikkurosaki/wadah | 49824f2dd142c2d43bfe672fecad7bbf7e8bdade | c16470f7651e1730c40d5e40a440e499e93f406b | refs/heads/master | 2020-07-01T17:53:36.406543 | 2019-08-08T11:38:31 | 2019-08-08T11:38:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,072 | java | package dev.malikkurosaki.probuspresto;
import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageManager;
import android.media.Image;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class LayoutFragment1 extends Fragment {
private Context context;
private Activity activity;
private View view;
private Toolbar toolbar;
private RecyclerView recyclerHome;
private LinearLayout blurContainer;
private ImageView gambarNya;
private DatabaseReference db;
public LayoutFragment1 newInstance(){
return new LayoutFragment1();
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.layout_fragment1,container,false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
this.view = view;
this.context = view.getContext();
this.activity = (Activity)context;
db = FirebaseDatabase.getInstance().getReference();
toolbar = view.findViewById(R.id.toolbar);
recyclerHome = view.findViewById(R.id.recyclerHome);
blurContainer = view.findViewById(R.id.blurContainer);
gambarNya = view.findViewById(R.id.gambarNya);
List<Map<String,Object>> list = new ArrayList<>();
Map<String,Object> map = new HashMap<>();
map.put("nama","balado");
list.add(map);
AdapterRecyclerView1 adapterRecyclerView1 = new AdapterRecyclerView1(context,list);
recyclerHome.setLayoutManager(new LinearLayoutManager(context));
recyclerHome.setAdapter(adapterRecyclerView1);
((MainActivity)activity).setSupportActionBar(toolbar);
//toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.icon_menu));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//((MainActivity)activity).drawerLayout.openDrawer(Gravity.START);
}
});
}
}
| [
"[email protected]"
] | |
5051a99b84c3b222df243977b4448e93132c4dba | 11854ba2b6b92c5ddaea7298b3e41b7c935a64b1 | /benchmark_functions/devel/src/es/udc/gii/common/eaf/benchmark/real_param/multimodal/SixHumpCamelBackObjectiveFunction.java | 9d0a50bf186d59ca9f37622b3178eb7d0433dc25 | [] | no_license | failiz/JEAF | c42d2181ff60310d089b88772e29433800273cf8 | 112584484dab01b5722420b15cdbe530d5973ad0 | refs/heads/master | 2021-06-20T22:21:46.903548 | 2021-06-09T07:10:49 | 2021-06-09T07:10:49 | 217,526,830 | 0 | 1 | null | 2019-10-25T12:16:27 | 2019-10-25T12:16:27 | null | UTF-8 | Java | false | false | 1,847 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package es.udc.gii.common.eaf.benchmark.real_param.multimodal;
import es.udc.gii.common.eaf.benchmark.BenchmarkObjectiveFunction;
/**
*
* @author Grupo Integrado de Ingeniería (<a href="www.gii.udc.es">www.gii.udc.es</a>)
*/
public class SixHumpCamelBackObjectiveFunction extends BenchmarkObjectiveFunction {
@Override
public double evaluate(double[] values) {
double fitness = 0.0;
double x0, x1;
x0 = values[0];
x1 = values[1];
x0 = 1.9*x0;
x1 = 1.1*x1;
fitness = 4.0 * x0 * x0 - 2.1 * x0 * x0 * x0 * x0 + (1.0 / 3.0) * x0 * x0 * x0 * x0 * x0 * x0 +
x0 * x1 - 4.0 * x1 * x1 + 4.0 * x1 * x1 * x1 * x1;
return fitness + 1.0316284534898776;
}
@Override
public void reset() {
//throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public double[][] getOptimum(int dim) {
double[][] optimum = new double[3][dim];
double x_1, x_2;
//Transformar a [-1.0, 1.0]
x_1 = (-Math.PI - 2.5)/7.5;
x_2 = 12.275/7.5 - 1.0;
optimum[0] = new double[dim];
optimum[0][0] = x_1;
optimum[0][1] = x_2;
//Transformar a [-1.0, 1.0]
x_1 = (Math.PI - 2.5)/7.5;
x_2 = 2.275/7.5 - 1.0;
optimum[1] = new double[dim];
optimum[1][0] = x_1;
optimum[1][1] = x_2;
//Transformar a [-1.0, 1.0]
x_1 = (3.0*Math.PI - 2.5)/7.5;
x_2 = 2.475/7.5 - 1.0;
optimum[2] = new double[dim];
optimum[2][0] = x_1;
optimum[2][1] = x_2;
return optimum;
}
@Override
public int getDimension() {
return 2;
}
}
| [
"[email protected]"
] | |
5521be82e05a0ad64a3cffb8e6168fb7996d98d4 | 8a07b9e8d892332391585c6288bb89ab21912ffd | /src/main/java/S350.java | 877cfe214d7c797731b0c1934ebd9641ade5d266 | [] | no_license | xiao2shiqi/leetcode | 8038e1efb90308130da011517a22df8abaf5d43f | 17361af605cf1ef63baa1b69a48f83a8460f61ab | refs/heads/master | 2021-11-19T02:33:09.704344 | 2021-08-15T22:38:09 | 2021-08-15T22:38:09 | 186,146,860 | 10 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,469 | java | import java.util.*;
/**
* LC#350: 两个数组的交集 II
* Link:https://leetcode-cn.com/problems/intersection-of-two-arrays-ii/
* 思路1:将数组放进 hash 桶中记数,取出当 count > 1 则为数组的交集,最终重定义数组范围
* 思路2:排序 + 双指针遍历,遍历两个数组,如果元素相等则加入结果集,如果元素不相等则较小的元素右移一位,直到数组遍历结束,时间复杂度 log n,空间复杂度O(1)
* 思路3:直接使用 Java List 容器实现 (时间,空间效率都很低)
* @author Phoenix on 2021/6/26.
*/
public class S350 {
public int[] intersect(int[] nums1, int[] nums2) {
List<Integer> list1 = new ArrayList<>();
for (int num : nums1) {
list1.add(num);
}
List<Integer> list2 = new ArrayList<>();
for (int num : nums2) {
if (list1.contains(num)) {
list2.add(num);
// 从 list1 除去已匹配的数值
list1.remove(Integer.valueOf(num));
}
}
int[] res = new int[list2.size()];
int i = 0;
for (int num : list2) {
res[i++] = num;
}
return res;
}
public static void main(String[] args) {
int[] nums1 = {1, 2, 2, 1};
int[] nums2 = {2, 2};
int[] ints = new S350().intersect(nums1, nums2);
System.out.println(Arrays.toString(ints));
}
} | [
"[email protected]"
] | |
61c5d3df274cb794cf8b6b9b24f97201f6331bef | 9b9d7d5f0689c2b5255757bc529c2b2e7804f1d4 | /src/main/java/projekti/DevelopmentSecurityConfiguration.java | cd50ccf9146a3a59c65787f73fb4ff359356f3b6 | [] | no_license | TommiON/SpringApp | b022557863d0999d9ec93178568d16317796775f | 1af0d3068920de8ed5eaf6a8fddbb439755b89e8 | refs/heads/master | 2020-06-10T21:36:49.844044 | 2019-06-25T17:58:32 | 2019-06-25T17:58:32 | 193,757,660 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,757 | java | package projekti;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
@Configuration
@EnableWebSecurity
public class DevelopmentSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Autowired
private UserDetailsService userDetailsService;
/*
@Override
public void configure(WebSecurity sec) throws Exception {
// Pyyntöjä ei tarkasteta, jos tästä rivistä kommentit veke
// sec.ignoring().antMatchers("/**");
}
*/
@Override
protected void configure(HttpSecurity sec) throws Exception {
sec.authorizeRequests()
.antMatchers("/index.html").permitAll()
.antMatchers("/tervetuloa").permitAll()
.antMatchers("/rekisteroidy").permitAll()
.anyRequest().authenticated().and()
.formLogin().permitAll().and()
.formLogin().defaultSuccessUrl("/kayttajat").and()
.logout().permitAll();
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
}
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
/*
@Bean
@Override
public UserDetailsService userDetailsService() {
UserDetails kayttaja = User.withDefaultPasswordEncoder()
.username("testi")
.password("salasana")
.authorities("USER")
.build();
InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
manager.createUser(kayttaja);
return manager;
}
*/
}
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.