blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
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
listlengths
1
1
author_id
stringlengths
0
313
143918b7bb4994656f7a69e80a859188d73207ce
384711580298c82939264fefe3e0807984ef6ff2
/src/manager/com/ticket/pojo/MemberLevel.java
bc1b5839df8d776349d586576e0bfc8ca83f183d
[]
no_license
guoyu07/ticket
3d3ac6e7f74cee900df52ab89100b47da345d24e
beb0207df5a81be1e44d3cdbac0b69b2d2f30f95
refs/heads/master
2020-03-17T09:49:22.333539
2017-11-29T06:47:06
2017-11-29T06:47:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,779
java
package com.ticket.pojo; import java.io.Serializable; import java.util.UUID; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.UniqueConstraint; /** * 会员等级 * @ClassName: MemberLevel * @Description: 会员等级表 * @author HiSay * @date 2015-10-14 16:38:05 * */ @Entity @Table(name="ticket_MemberLevel",uniqueConstraints={@UniqueConstraint(columnNames = {"id"})}) public class MemberLevel implements Serializable { /** * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) */ private static final long serialVersionUID = 1L; /** * 主键 */ @Id private String id = UUID.randomUUID().toString(); /** * 实体状态 */ @Embedded private CommonEntity status = new CommonEntity(); /** * 等级名称 */ @Column private String name = null; /** * 所需积分 */ @Column private String needScore = null; /** * 等级描述 */ @Column private String descript = null; public String getId() { return id; } public void setId(String id) { this.id = id; } public CommonEntity getStatus() { return status; } public void setStatus(CommonEntity status) { this.status = status; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getNeedScore() { return needScore; } public void setNeedScore(String needScore) { this.needScore = needScore; } public String getDescript() { return descript; } public void setDescript(String descript) { this.descript = descript; } }
[ "tuyou17@lenovo.com" ]
tuyou17@lenovo.com
dca57242318bc7f14a49926ea5111a71de7e3b69
3bc62f2a6d32df436e99507fa315938bc16652b1
/struts2/src/main/java/com/intellij/struts2/gotosymbol/package-info.java
2013b2bcf71f6653f545e7eb07add80dd4c2521c
[ "Apache-2.0" ]
permissive
JetBrains/intellij-obsolete-plugins
7abf3f10603e7fe42b9982b49171de839870e535
3e388a1f9ae5195dc538df0d3008841c61f11aef
refs/heads/master
2023-09-04T05:22:46.470136
2023-06-11T16:42:37
2023-06-11T16:42:37
184,035,533
19
29
Apache-2.0
2023-07-30T14:23:05
2019-04-29T08:54:54
Java
UTF-8
Java
false
false
670
java
/* * Copyright 2011 The authors * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * IDE "Go To..." functionality. */ package com.intellij.struts2.gotosymbol;
[ "yuriy.artamonov@jetbrains.com" ]
yuriy.artamonov@jetbrains.com
1ff17968955aab214e44ef1565ce3ddc8d6ceff0
0abfc80a2e317f98b95f71c7db444257c26a2777
/src/main/java/uk/dioxic/grib/cli/mixin/RollingForecastMixin.java
4e7034e8c965d17161cdeed058bdee4ede661ab2
[]
no_license
dioxic/mongo-grib
cefb82406c424885f1c20c55870339bafc806777
4f87d8f31f648b2e83afaafc91c6bffd8d238aa1
refs/heads/master
2022-11-14T11:22:55.536217
2020-07-03T12:43:17
2020-07-03T12:43:17
276,897,442
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
package uk.dioxic.grib.cli.mixin; import lombok.Getter; import picocli.CommandLine.Option; import java.time.LocalTime; public class RollingForecastMixin extends FlattenedForecastMixin { @Getter @Option(names = {"--deadline"}, description = "rolling forecast deadline (default: ${DEFAULT-VALUE})", defaultValue = "02:00:00", paramLabel = "arg") private LocalTime deadline; }
[ "dioxic@gmail.com" ]
dioxic@gmail.com
2ef6b6f2eb61b91984779467c1e48495b76b0710
662c95e4f3e30be84c29320b500164916738fed2
/src/test/java/io/github/bonigarcia/test/basic/FirefoxJupiterTest.java
014494b46adc37cb8440b54f79517afe0a9229c9
[ "Apache-2.0" ]
permissive
thc202/selenium-jupiter
b23b6a5ca2f75dc623274151377927a91d726dfc
7c79a48197547cd92a5ad7062e7a45bb2d24c321
refs/heads/master
2020-04-05T12:30:41.176936
2018-12-21T10:36:15
2018-12-21T10:36:15
156,873,688
0
0
Apache-2.0
2018-11-09T14:32:20
2018-11-09T14:32:20
null
UTF-8
Java
false
false
1,979
java
/* * (C) Copyright 2017 Boni Garcia (http://bonigarcia.github.io/) * * 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 io.github.bonigarcia.test.basic; // tag::snippet-in-doc[] import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.MatcherAssert.assertThat; // end::snippet-in-doc[] import org.junit.jupiter.api.Disabled; // tag::snippet-in-doc[] import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.firefox.FirefoxDriver; import io.github.bonigarcia.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class FirefoxJupiterTest { @Test public void testWithOneFirefox(FirefoxDriver driver) { driver.get("https://bonigarcia.github.io/selenium-jupiter/"); assertThat(driver.getTitle(), containsString("JUnit 5 extension for Selenium")); } // end::snippet-in-doc[] @Disabled("Redudant test for Travis CI suite") // tag::snippet-in-doc[] @Test public void testWithTwoFirefoxs(FirefoxDriver driver1, FirefoxDriver driver2) { driver1.get("http://www.seleniumhq.org/"); driver2.get("http://junit.org/junit5/"); assertThat(driver1.getTitle(), startsWith("Selenium")); assertThat(driver2.getTitle(), equalTo("JUnit 5")); } } // end::snippet-in-doc[]
[ "bgarcia@gsyc.es" ]
bgarcia@gsyc.es
59847ad4d073be5f522a358b0081bdf0c9bcbe25
80a7ad707f9f6c89d805b146fe4625e54b3aee2f
/src/study/_2017_/export/CreateSimpleExcelToDisk.java
a1c9d0aa0043304e1d8a199aaa2f606a1518cdd4
[]
no_license
JeffreyHL/StudyHome
967f72c3fc447eb21e11bd0c3672432219c3ba2c
73d2e191de607c2d220da58f529aa366d348b021
refs/heads/master
2020-05-21T23:54:12.322682
2017-05-16T07:38:13
2017-05-16T07:38:13
60,759,863
0
0
null
null
null
null
UTF-8
Java
false
false
2,880
java
package study._2017_.export; import java.io.FileOutputStream; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; public class CreateSimpleExcelToDisk { /** * @功能:手工构建一个简单格式的Excel */ private static List<Student> getStudent() throws Exception { List list = new ArrayList(); SimpleDateFormat df = new SimpleDateFormat("yyyy-mm-dd"); Student user1 = new Student(1, "张三", 16, df.parse("1997-03-12")); Student user2 = new Student(2, "李四", 17, df.parse("1996-08-12")); Student user3 = new Student(3, "王五", 26, df.parse("1985-11-12")); list.add(user1); list.add(user2); list.add(user3); return list; } public static void main(String[] args) throws Exception { // 第一步,创建一个webbook,对应一个Excel文件 HSSFWorkbook wb = new HSSFWorkbook(); // 第二步,在webbook中添加一个sheet,对应Excel文件中的sheet HSSFSheet sheet = wb.createSheet("学生表一"); // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制short HSSFRow row = sheet.createRow((int) 0); // 第四步,创建单元格,并设置值表头 设置表头居中 HSSFCellStyle style = wb.createCellStyle(); style.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 创建一个居中格式 HSSFCell cell = row.createCell((short) 0); cell.setCellValue("学号"); cell.setCellStyle(style); cell = row.createCell((short) 1); cell.setCellValue("姓名"); cell.setCellStyle(style); cell = row.createCell((short) 2); cell.setCellValue("年龄"); cell.setCellStyle(style); cell = row.createCell((short) 3); cell.setCellValue("生日"); cell.setCellStyle(style); // 第五步,写入实体数据 实际应用中这些数据从数据库得到, List list = CreateSimpleExcelToDisk.getStudent(); for (int i = 0; i < list.size(); i++) { row = sheet.createRow((int) i + 1); Student stu = (Student) list.get(i); // 第四步,创建单元格,并设置值 row.createCell((short) 0).setCellValue((double) stu.getId()); row.createCell((short) 1).setCellValue(stu.getName()); row.createCell((short) 2).setCellValue((double) stu.getAge()); cell = row.createCell((short) 3); cell.setCellValue(new SimpleDateFormat("yyyy-mm-dd").format(stu.getBirth())); } // 第六步,将文件存到指定位置 try { FileOutputStream fout = new FileOutputStream("E:/students.xls"); wb.write(fout); fout.close(); } catch (Exception e) { e.printStackTrace(); } } }
[ "huleiandjeffrey@sina.com" ]
huleiandjeffrey@sina.com
e52ca388bd86edf77bbf345b86cbbdfd37cabdd1
a186e88167f7a60bfcaf4113ad3489b99c490b1c
/codigo-fonte/servico/src/main/java/br/gov/mpog/gestaoriscos/SistemaApplication.java
d7fbb5807341fcdf10cde909d7d6cb9e1f4c7bd8
[]
no_license
josegfl/agatha
5825eabfd819aa4c8f4d0ae8d517bd4db739eab8
bea871db60c64a93cedb828c83efb265d0dd05ee
refs/heads/master
2020-04-12T00:05:10.274820
2018-12-19T13:53:13
2018-12-19T13:53:13
162,188,337
0
0
null
null
null
null
UTF-8
Java
false
false
2,676
java
package br.gov.mpog.gestaoriscos; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.embedded.FilterRegistrationBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.boot.orm.jpa.EntityScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @EntityScan(basePackageClasses = {SistemaApplication.class, Jsr310JpaConverters.class}, basePackages = "br.gov.mpog") @ComponentScan(basePackages = {"br.gov.mpog"}) @EnableConfigurationProperties @EnableAutoConfiguration @SpringBootApplication @EnableWebSecurity @EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true) @EnableScheduling public class SistemaApplication extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { return builder.sources(SistemaApplication.class); } public static void main(String[] args) { SpringApplication.run(SistemaApplication.class, args); } @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**").allowedOrigins("*").allowedMethods("PUT", "DELETE", "POST", "GET"); } }; } @Bean public FilterRegistrationBean oauth2ClientFilterRegistration(OAuth2ClientContextFilter filter) { FilterRegistrationBean registration = new FilterRegistrationBean(); registration.setFilter(filter); registration.setOrder(-100); return registration; } }
[ "jose.geraldo@cgu.gov.br" ]
jose.geraldo@cgu.gov.br
016108a96769efacdf22106c205d9109c63adc41
f0568343ecd32379a6a2d598bda93fa419847584
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201306/LineItemCreativeAssociationOperationErrorReason.java
6cc36cc2fb216b89b16054cd5e7b8b1ffc6442cf
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
1,675
java
package com.google.api.ads.dfp.jaxws.v201306; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LineItemCreativeAssociationOperationError.Reason. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="LineItemCreativeAssociationOperationError.Reason"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="NOT_ALLOWED"/> * &lt;enumeration value="NOT_APPLICABLE"/> * &lt;enumeration value="CANNOT_ACTIVATE_INVALID_CREATIVE"/> * &lt;enumeration value="UNKNOWN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "LineItemCreativeAssociationOperationError.Reason") @XmlEnum public enum LineItemCreativeAssociationOperationErrorReason { /** * * The operation is not allowed due to permissions * * */ NOT_ALLOWED, /** * * The operation is not applicable to the current state * * */ NOT_APPLICABLE, /** * * Cannot activate an invalid creative * * */ CANNOT_ACTIVATE_INVALID_CREATIVE, /** * * The value returned if the actual value is not exposed by the requested API version. * * */ UNKNOWN; public String value() { return name(); } public static LineItemCreativeAssociationOperationErrorReason fromValue(String v) { return valueOf(v); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
1587c878644a01f967a12d17d6b160aad5a65e52
ae22315e0fe4de9ec7e5629af92aa8aa44d13440
/src/designchallenge2/item/LegacyEventConverter.java
e5de89eeea113165829089f902d97e858144f69c
[]
no_license
luigirivera/SWDESPA-DC-2
dc9d35cb78eaf6a585cd636f099a6dc5299f747d
60f25fed47664bf4afe512268e40eaaec2ab9095
refs/heads/master
2020-04-04T18:47:22.577619
2018-03-13T13:39:03
2018-03-13T13:39:03
156,178,908
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
package designchallenge2.item; import java.util.ArrayList; import java.util.List; import designchallenge1.CalendarColor; import designchallenge1.CalendarEvent; public class LegacyEventConverter { public static designchallenge1.CalendarEvent convert(CalendarItem item){ designchallenge1.CalendarEvent legacyEvent = new CalendarEvent(); legacyEvent.setName(item.getName()); if(item instanceof designchallenge2.item.CalendarEvent) legacyEvent.setColor(CalendarColor.BLUE); else legacyEvent.setColor(CalendarColor.GREEN); return legacyEvent; } public static List<designchallenge1.CalendarEvent> convert(List<CalendarItem> items){ List<designchallenge1.CalendarEvent> legacyEvents = new ArrayList<designchallenge1.CalendarEvent>(); for (CalendarItem item : items) { legacyEvents.add(LegacyEventConverter.convert(item)); } return legacyEvents; } }
[ "luis_lopez@dlsu.edu.ph" ]
luis_lopez@dlsu.edu.ph
0059318e98c7fab4b454a8ccc0f534481acdd139
f70b5b540899ce4adcff9e9afecc1d1f565442c6
/freedom/src/org/freedom/layout/nf/NF061.java
f3b59529713be0425e59f9ab48c6a0900f0f8f12
[]
no_license
BR-ERP/freedom
cbe40af81beb85b0552bfb3a072ca8e3c35369b0
a02a3e52b446e1efd0932f5349f54c24482dc27b
refs/heads/master
2021-01-21T04:35:12.829321
2016-08-03T21:08:00
2016-08-03T21:08:00
30,047,515
7
12
null
2016-08-03T21:08:00
2015-01-29T23:57:28
Java
ISO-8859-1
Java
false
false
18,871
java
/** * @version 22/05/2006 <BR> * @author Setpoint Informática Ltda./Alex Rodrigues <BR> * * Projeto: Freedom <BR> * Pacote: layout <BR> * Classe: * @(#)NFIswara.java <BR> * * Este arquivo é parte do sistema Freedom-ERP, o Freedom-ERP é um software livre; você pode redistribui-lo e/ou <BR> * modifica-lo dentro dos termos da Licença Pública Geral GNU como publicada pela Fundação do Software Livre (FSF); <BR> * na versão 2 da Licença, ou (na sua opnião) qualquer versão. <BR> * Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; <BR> * sem uma garantia implicita de ADEQUAÇÂO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. <BR> * Veja a Licença Pública Geral GNU para maiores detalhes. <BR> * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este programa, se não, <BR> * de acordo com os termos da LPG-PC <BR> * <BR> * * Layout da nota fiscal para a empresa Iswara Ltda. */ package org.freedom.layout.nf; import java.math.BigDecimal; import java.util.Vector; import org.freedom.infra.functions.StringFunctions; import org.freedom.library.business.component.NF; import org.freedom.library.component.ImprimeOS; import org.freedom.library.component.Layout; import org.freedom.library.functions.Funcoes; public class NF061 extends Layout { public boolean imprimir( NF nf, ImprimeOS imp ) { boolean retorno = super.imprimir( nf, imp ); boolean complementar = false; boolean bFat = true; boolean bNat = true; boolean bjatem = false; boolean bvlriss = true; final int MAXLINE = 42; final int MAXPROD = 12; int iNumNota = 0; int iItImp = 0; int iProdImp = 0; int iContaFrete = 0; int iLinPag = imp.verifLinPag( "NF" ); int sizeObs = 0; int indexObs = 0; int indexSigla = 0; int indexServ = 0; String sCodfisc = null; String sSigla = null; String sTemp = null; String sDescFisc = ""; String sObsVenda = ""; String[] sValsCli = new String[ 4 ]; String[] sNat = new String[ 2 ]; String[] sVencs = new String[ 9 ]; String[] sVals = new String[ 9 ]; String[] sDuplics = new String[ 9 ]; Vector<?> vObsVenda = new Vector<Object>(); Vector<String> vClfisc = new Vector<String>(); Vector<String> vSigla = new Vector<String>(); Vector<?> vDescServ = new Vector<Object>(); Vector<Object[]> vServico = new Vector<Object[]>(); try { if ( cab.next() ) { iNumNota = cab.getInt( NF.C_DOC ); sObsVenda = cab.getString( NF.C_OBSPED ).replace( "\n", "" ); } complementar = "CO".equals( cab.getString( NF.C_TIPOMOV ) ); for ( int i = 0; i < 9; i++ ) { if ( bFat ) { if ( parc.next() ) { sDuplics[ i ] = StringFunctions.strZero( String.valueOf( iNumNota ), 6 ) + " / " + parc.getInt( NF.C_NPARCITREC ); sVencs[ i ] = ( parc.getDate( NF.C_DTVENCTO ) != null ? Funcoes.dateToStrDate( parc.getDate( NF.C_DTVENCTO ) ) : "" ); sVals[ i ] = Funcoes.strDecimalToStrCurrency( 12, 2, String.valueOf( parc.getFloat( NF.C_VLRPARC ) ) ); } else { bFat = false; sDuplics[ i ] = ""; sVencs[ i ] = ""; sVals[ i ] = ""; } } else { bFat = false; sVencs[ i ] = ""; sVals[ i ] = ""; } } imp.limpaPags(); vClfisc.addElement( "" ); while ( itens.next() ) { if ( bNat ) { sNat[ 0 ] = Funcoes.copy( itens.getString( NF.C_DESCNAT ).trim(), 32 ); sNat[ 1 ] = Funcoes.setMascara( itens.getString( NF.C_CODNAT ), "#.###" ); bNat = false; } if ( adic.next() ) { sValsCli[ 0 ] = !adic.getString( NF.C_CPFEMITAUX ).equals( "" ) ? adic.getString( NF.C_CPFEMITAUX ) : cab.getString( NF.C_CPFEMIT ); sValsCli[ 1 ] = !adic.getString( NF.C_NOMEEMITAUX ).equals( "" ) ? adic.getString( NF.C_NOMEEMITAUX ) : cab.getString( NF.C_RAZEMIT ); sValsCli[ 2 ] = !adic.getString( NF.C_CIDEMITAUX ).equals( "" ) ? adic.getString( NF.C_CIDEMITAUX ) : cab.getString( NF.C_CIDEMIT ); sValsCli[ 3 ] = !adic.getString( NF.C_UFEMITAUX ).equals( "" ) ? adic.getString( NF.C_UFEMITAUX ) : cab.getString( NF.C_UFEMIT ); } else { sValsCli[ 0 ] = cab.getString( NF.C_CPFEMIT ); sValsCli[ 1 ] = cab.getString( NF.C_RAZEMIT ); sValsCli[ 2 ] = cab.getString( NF.C_CIDEMIT ); sValsCli[ 3 ] = cab.getString( NF.C_UFEMIT ); } if ( imp.pRow() == 0 ) { // Imprime cabeçalho da nota imp.pulaLinha( 2, imp.comprimido() ); if ( nf.getTipoNF() == NF.TPNF_ENTRADA ) { imp.say( 99, "X" ); } else { imp.say( 87, "X" ); } // imp.say( 128, StringFunctions.strZero( String.valueOf( iNumNota ), 6 ) ); imp.pulaLinha( 4, imp.comprimido() ); imp.say( 6, sNat[ 0 ] ); imp.say( 42, sNat[ 1 ] ); imp.pulaLinha( 3, imp.comprimido() ); imp.say( 6, sValsCli[ 1 ] ); imp.say( 88, !sValsCli[ 0 ].equals( "" ) ? Funcoes.setMascara( sValsCli[ 0 ], "###.###.###-##" ) : Funcoes.setMascara( cab.getString( NF.C_CNPJEMIT ), "##.###.###/####-##" ) ); imp.say( 123, ( cab.getDate( NF.C_DTEMITPED ) != null ? Funcoes.dateToStrDate( cab.getDate( NF.C_DTEMITPED ) ) : "" ) ); imp.pulaLinha( 2, imp.comprimido() ); imp.say( 6, Funcoes.copy( cab.getString( NF.C_ENDEMIT ), 0, 50 ).trim() + ", " + Funcoes.copy( cab.getString( NF.C_NUMEMIT ), 0, 6 ).trim() + " - " + Funcoes.copy( cab.getString( NF.C_COMPLEMIT ), 0, 9 ).trim() ); imp.say( 72, Funcoes.copy( cab.getString( NF.C_BAIREMIT ), 0, 23 ) ); imp.say( 103, Funcoes.setMascara( cab.getString( NF.C_CEPEMIT ), "#####-###" ) ); if ( !itens.getString( NF.C_IMPDTSAIDA ).equals( "N" ) ) { imp.say( 123, ( cab.getDate( NF.C_DTSAIDA ) != null ? Funcoes.dateToStrDate( cab.getDate( NF.C_DTSAIDA ) ) : "" ) ); } imp.pulaLinha( 2, imp.comprimido() ); imp.say( 6, sValsCli[ 2 ] ); imp.say( 42, ( !cab.getString( NF.C_DDDEMIT ).equals( "" ) ? "(" + cab.getString( NF.C_DDDEMIT ) + ")" : "" ) + ( !cab.getString( NF.C_FONEEMIT ).equals( "" ) ? Funcoes.setMascara( cab.getString( NF.C_FONEEMIT ).trim(), "####-####" ) : "" ).trim() ); imp.say( 78, sValsCli[ 3 ] ); imp.say( 95, !cab.getString( NF.C_RGEMIT ).equals( "" ) ? cab.getString( NF.C_RGEMIT ) : cab.getString( NF.C_INSCEMIT ) ); // Fim do cabeçalho // Imprime dados da fatura imp.pulaLinha( 3, imp.comprimido() ); // imp.say( 6, sDuplics[ 0 ] ); imp.say( 20, sVals[ 0 ] ); imp.say( 46, sVencs[ 0 ] ); // imp.say( 50, sDuplics[ 1 ] ); imp.say( 63, sVals[ 1 ] ); imp.say( 85, sVencs[ 1 ] ); // imp.say( 94, sDuplics[ 2 ] ); imp.say( 99, sVals[ 2 ] ); imp.say( 122, sVencs[ 2 ] ); imp.pulaLinha( 1, imp.comprimido() ); // imp.say( 4, sDuplics[ 3 ] ); imp.say( 20, sVals[ 3 ] ); imp.say( 46, sVencs[ 3 ] ); // imp.say( 50, sDuplics[ 4 ] ); imp.say( 63, sVals[ 4 ] ); imp.say( 85, sVencs[ 4 ] ); // imp.say( 94, sDuplics[ 5 ] ); imp.say( 99, sVals[ 5 ] ); imp.say( 122, sVencs[ 5 ] ); imp.pulaLinha( 1, imp.comprimido() ); // imp.say( 4, sDuplics[ 6 ] ); imp.say( 20, sVals[ 6 ] ); imp.say( 46, sVencs[ 6 ] ); // imp.say( 50, sDuplics[ 7 ] ); imp.say( 63, sVals[ 7 ] ); imp.say( 85, sVencs[ 7 ] ); // imp.say( 94, sDuplics[ 8 ] ); imp.say( 99, sVals[ 8 ] ); imp.say( 122, sVencs[ 8 ] ); // imp.pulaLinha( 0, imp.comprimido() ); // Fim dos dados da fatura } // Monta a menssagem fiscal ... sTemp = itens.getString( NF.C_DESCFISC ).trim(); if ( sDescFisc.indexOf( sTemp ) == -1 ) { sDescFisc += sTemp; } sTemp = itens.getString( NF.C_DESCFISC2 ).trim(); if ( sDescFisc.indexOf( sTemp ) == -1 ) { sDescFisc += sTemp; } // Fim da menssagem fiscal ... // Definição da sigla para a classificação fiscal sCodfisc = itens.getString( NF.C_CODFISC ); if ( !sCodfisc.equals( "" ) ) { for ( int i = 0; i < vClfisc.size(); i++ ) { if ( vClfisc.elementAt( i ) != null ) { if ( sCodfisc.equals( vClfisc.elementAt( i ) ) ) { bjatem = true; sSigla = String.valueOf( (char) ( 64 + i ) ); } else { bjatem = false; } } } if ( !bjatem ) { vClfisc.addElement( sCodfisc ); sSigla = String.valueOf( (char) ( 63 + vClfisc.size() ) ); vSigla.addElement( sSigla + " = " + sCodfisc ); } } // Fim da classificação fiscal // Imprime os dados do item no corpo da nota if ( !"S".equals( itens.getString( NF.C_TIPOPROD ) ) ) { imp.pulaLinha( 2, imp.comprimido() ); if ( complementar ) { imp.say( 17, Funcoes.copy( itens.getString( NF.C_OBSITPED ).trim(), 48 ) ); } else { imp.say( 4, itens.getString( NF.C_REFPROD ) ); imp.say( 12, Funcoes.copy( itens.getString( NF.C_DESCPROD ).trim(), 48 ) ); // imp.say( 68, sSigla ); imp.say( 75, Funcoes.copy( itens.getString( NF.C_ORIGFISC ), 0, 1 ) + Funcoes.copy( itens.getString( NF.C_CODTRATTRIB ), 0, 2 ) ); imp.say( 83, Funcoes.copy( itens.getString( NF.C_CODUNID ), 4 ) ); imp.say( 86, Funcoes.strDecimalToStrCurrency( 8, 2, String.valueOf( itens.getFloat( NF.C_QTDITPED ) ) ) ); imp.say( 96, Funcoes.strDecimalToStrCurrency( 10, 2, String.valueOf( itens.getFloat( NF.C_VLRPRODITPED ) / itens.getFloat( NF.C_QTDITPED ) ) ) ); imp.say( 116, Funcoes.strDecimalToStrCurrency( 10, 2, String.valueOf( itens.getFloat( NF.C_VLRPRODITPED ) ) ) ); imp.say( 133, ( (int) itens.getFloat( NF.C_PERCICMSITPED ) ) + "%" ); // imp.say( 125, ( (int) itens.getFloat( NF.C_PERCIPIITPED ) ) + "%" ); // imp.say( 130, Funcoes.strDecimalToStrCurrency( 6, 2, String.valueOf( itens.getFloat( NF.C_VLRIPIITPED ) ) ) ); } iProdImp++; } else { // guarda serviço; vServico.addElement( new Object[] { "".equals( itens.getString( NF.C_OBSITPED ).trim() ) ? itens.getString( NF.C_DESCPROD ) : itens.getString( NF.C_OBSITPED ).trim(), new BigDecimal( itens.getFloat( NF.C_QTDITPED ) ), new BigDecimal( itens.getFloat( NF.C_VLRLIQITPED ) ), new BigDecimal( itens.getFloat( NF.C_VLRISSITPED ) ) } ); } iItImp++; // Fim da impressão do item if ( ( iItImp == itens.getInt( NF.C_CONTAITENS ) ) || ( iProdImp == MAXPROD ) || ( imp.pRow() == MAXLINE ) ) { if ( iItImp == itens.getInt( NF.C_CONTAITENS ) ) { /* * if ( cab.getFloat( NF.C_VLRDESCITPED ) > 0.0f ) { // Imprime o desconto imp.pulaLinha( 1, imp.comprimido() ); imp.say( 8, "Valor do desconto : " + Funcoes.strDecimalToStrCurrency( 9, 2, String.valueOf( cab.getFloat( NF.C_VLRDESCITPED ) ) ) ); } */ if ( vServico.size() > 0 && indexServ < vServico.size() ) { imp.pulaLinha( 30 - imp.pRow(), imp.comprimido() ); } else { imp.pulaLinha( MAXLINE - imp.pRow(), imp.comprimido() ); } } // Imprime serviço // System.out.println("Tam vServico" +vServico.size()); if ( vServico.size() > 0 ) { for ( int row = 0; row < 11; row++ ) { imp.pulaLinha( 1, imp.comprimido() ); if ( indexServ < vServico.size() ) { vDescServ = Funcoes.strToVectorSilabas( ( (String) vServico.get( indexServ )[ 0 ] ).trim(), 80 ); for ( int i = 0; i < vDescServ.size(); i++ ) { imp.say( 4, (String) vDescServ.elementAt( i ) ); if ( i == 0 ) { imp.say( 87, Funcoes.strDecimalToStrCurrency( 8, 2, String.valueOf( (BigDecimal) vServico.get( indexServ )[ 1 ] ) ) ); imp.say( 100, Funcoes.strDecimalToStrCurrency( 12, 2, String.valueOf( (BigDecimal) vServico.get( indexServ )[ 2 ] ) ) ); } if ( bvlriss && row == 6 ) { imp.say( 120, Funcoes.strDecimalToStrCurrency( 15, 2, String.valueOf( cab.getFloat( NF.C_VLRISS ) ) ) ); bvlriss = false; } if ( i < ( vDescServ.size() - 1 ) ) { imp.pulaLinha( 1, imp.comprimido() ); } if ( ( i > 0 ) && ( i == vDescServ.size() - 1 ) ) { row += vDescServ.size() - 1; } } indexServ++; } if ( bvlriss && row == 6 ) { imp.say( 120, Funcoes.strDecimalToStrCurrency( 15, 2, String.valueOf( cab.getFloat( NF.C_VLRISS ) ) ) ); bvlriss = false; } } imp.say( 120, Funcoes.strDecimalToStrCurrency( 15, 2, String.valueOf( cab.getFloat( NF.C_BASEISS ) ) ) ); } imp.pulaLinha( 1, "" ); // Imprime totais if ( iContaFrete == 0 ) { frete.next(); iContaFrete++; } if ( iItImp == itens.getInt( NF.C_CONTAITENS ) ) { // imp.pulaLinha( 40 - imp.pRow(), imp.comprimido() ); imp.say( 4, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( cab.getFloat( NF.C_VLRBASEICMSPED ) ) ) ); imp.say( 20, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( cab.getFloat( NF.C_VLRICMSPED ) ) ) ); BigDecimal baseiss = cab.getBigDecimal( NF.C_BASEISS ); BigDecimal vlrprodped = cab.getBigDecimal( NF.C_VLRPRODPED ); BigDecimal vlrprod = vlrprodped.subtract( baseiss ); if ( !complementar ) { imp.say( 114, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( vlrprod ) ) ); } imp.pulaLinha( 2, imp.comprimido() ); if ( !complementar ) { imp.say( 4, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( frete.getFloat( NF.C_VLRFRETEPED ) ) ) ); imp.say( 58, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( cab.getFloat( NF.C_VLRADICPED ) ) ) ); imp.say( 85, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( cab.getFloat( NF.C_VLRIPIPED ) ) ) ); } if ( nf.getTipoNF() == NF.TPNF_ENTRADA ) { imp.say( 114, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( cab.getFloat( NF.C_VLRLIQPED ) + cab.getFloat( NF.C_VLRADICPED ) ) ) ); } else { if ( !complementar ) { imp.say( 114, Funcoes.strDecimalToStrCurrency( 20, 2, String.valueOf( cab.getFloat( NF.C_VLRLIQPED ) ) ) ); } iItImp = 0; } } else { imp.pulaLinha( 47 - imp.pRow(), imp.comprimido() ); imp.say( 4, "********************" ); imp.say( 32, "********************" ); imp.say( 114, "********************" ); imp.pulaLinha( 2, imp.comprimido() ); imp.say( 4, "********************" ); imp.say( 58, "********************" ); imp.say( 87, "********************" ); imp.say( 114, "********************" ); } // Fim da impressão dos totais // Imprime informações do frete imp.pulaLinha( 3, imp.comprimido() ); if ( !complementar ) { imp.say( 6, frete.getString( NF.C_RAZTRANSP ) ); imp.say( 81, "C".equals( frete.getString( NF.C_TIPOFRETE ) ) ? "1" : "2" ); imp.say( 91, frete.getString( NF.C_PLACAFRETE ) ); imp.say( 105, frete.getString( NF.C_UFFRETE ) ); if ( "C".equals( frete.getString( NF.C_TIPOTRANSP ) ) ) { imp.say( 114, Funcoes.setMascara( cab.getString( NF.C_CNPJEMIT ), "##.###.###/####-##" ) ); } else { if ( "".equals( frete.getString( NF.C_CNPJTRANSP ) ) ) { imp.say( 114, Funcoes.setMascara( frete.getString( NF.C_CPFTRANSP ), "###.###.###-##" ) ); } else { imp.say( 114, Funcoes.setMascara( frete.getString( NF.C_CNPJTRANSP ), "##.###.###/####-##" ) ); } } imp.pulaLinha( 2, imp.comprimido() ); imp.say( 6, frete.getString( NF.C_ENDTRANSP ).trim() + ", " + frete.getInt( NF.C_NUMTRANSP ) ); imp.say( 70, frete.getString( NF.C_CIDTRANSP ) ); imp.say( 105, frete.getString( NF.C_UFTRANSP ) ); if ( frete.getString( NF.C_TIPOTRANSP ).equals( "C" ) ) { imp.say( 113, cab.getString( NF.C_INSCEMIT ) ); } else { imp.say( 113, frete.getString( NF.C_INSCTRANSP ) ); } imp.pulaLinha( 2, imp.comprimido() ); imp.say( 6, Funcoes.strDecimalToStrCurrency( 12, 2, String.valueOf( frete.getString( NF.C_QTDFRETE ) ) ) ); imp.say( 25, Funcoes.copy( frete.getString( NF.C_ESPFRETE ), 27 ) ); imp.say( 49, Funcoes.copy( frete.getString( NF.C_MARCAFRETE ), 22 ) ); imp.say( 76, Funcoes.copy( frete.getString( NF.C_CONHECFRETEPED ), 20 ) ); imp.say( 95, Funcoes.strDecimalToStrCurrency( 10, 2, String.valueOf( frete.getFloat( NF.C_PESOBRUTO ) ) ) ); imp.say( 119, Funcoes.strDecimalToStrCurrency( 10, 2, String.valueOf( frete.getFloat( NF.C_PESOLIQ ) ) ) ); imp.pulaLinha( 1, imp.comprimido() ); } // Fim da impressão do frete // Imprime observação e classificações fiscais if ( complementar ) { vObsVenda = Funcoes.strToVectorSilabas( sObsVenda, 40 ); imp.pulaLinha( 5, imp.comprimido() ); } else { vObsVenda = Funcoes.strToVectorSilabas( ( sDescFisc.length() > 0 ? sDescFisc + "\n" : "" ) + sObsVenda, 40 ); } sizeObs = vSigla.size(); sizeObs = vObsVenda.size() > sizeObs ? vObsVenda.size() : sizeObs; int aux = 0; for ( int i = 0; i < 7; i++ ) { if ( aux < sizeObs ) { imp.pulaLinha( 2, imp.comprimido() ); /* * if ( vSigla.size() > 0 && indexSigla < vSigla.size() && !complementar ) { imp.say( 6, vSigla.elementAt( indexSigla++ ) ); } */ if ( vObsVenda.size() > 0 && indexObs < vObsVenda.size() ) { imp.say( 4, Funcoes.copy( (String) vObsVenda.elementAt( indexObs++ ), 60 ) ); } } else { imp.pulaLinha( 1, imp.comprimido() ); } } // Fim da observação // Imprime canhoto imp.pulaLinha( 4, imp.comprimido() ); // imp.say( 128, StringFunctions.strZero( String.valueOf( iNumNota ), 6 ) ); imp.pulaLinha( iLinPag - imp.pRow(), imp.comprimido() ); imp.setPrc( 0, 0 ); imp.incPags(); } } imp.fechaGravacao(); retorno = true; } catch ( Exception err ) { Funcoes.mensagemErro( null, "Erro ao montar nota \n" + err.getMessage() ); err.printStackTrace(); } finally { sValsCli = null; sNat = null; sVencs = null; sVals = null; System.gc(); } return retorno; } }
[ "anderson.sanchez@70d8741f-8852-0410-9fc6-e1294b66f7bf" ]
anderson.sanchez@70d8741f-8852-0410-9fc6-e1294b66f7bf
d05efb8bd4b19af5087b12467107ec552e0fb253
2cc4db1383309d72a2fde2801c39e6523bc07df7
/04_NumbersStringsAndDates/homework_4.3/GeometryCalculator/src/main/java/GeometryCalculator.java
2747c491e2d639dbb8b796044bb11ea8c828ed94
[]
no_license
Gleb4ever/JavaSkillBox
f0e2379cf48e48643e87507412cb61ed2e572dec
d578c47ba3c28f59575d594bcd88bf97114322a8
refs/heads/main
2023-04-10T15:29:01.855925
2021-03-29T08:56:49
2021-03-29T08:56:49
352,572,322
0
0
null
null
null
null
UTF-8
Java
false
false
1,197
java
public class GeometryCalculator { double p = (a + b + c) / 2; // метод должен использовать абсолютное значение radius public static double getCircleSquare(double radius) { return Math.PI * Math.abs(radius) * Math.abs(radius); } // метод должен использовать абсолютное значение radius public static double getSphereVolume(double radius) { return (4.0 / 3.0 ) * Math.PI * Math.abs(radius) * Math.abs(radius) * Math.abs(radius); } public static boolean isTrianglePossible(double a, double b, double c) { return a + b > c && a + c > b && b + c > a ; } // перед расчетом площади рекомендуется проверить возможен ли такой треугольник // методом isTrianglePossible, если невозможен вернуть -1.0 public static double getTriangleSquare(double a, double b, double c) { if (isTrianglePossible(a, b, c)){ return Math.sqrt(p * (p - a) * (p - b) * (p - c)); } else { return -1.0; } } }
[ "noreply@github.com" ]
Gleb4ever.noreply@github.com
d920c5718d840b9490579c3d16a623519234e945
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
/Variant Programs/4-2/14/Distributors.java
fb02a86465bf2ab9c36e16426c107a4ac84e1766
[ "MIT" ]
permissive
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
42e4c2061c3f8da0dfce760e168bb9715063645f
a42ced1d5a92963207e3565860cac0946312e1b3
refs/heads/master
2020-08-09T08:10:08.888384
2019-11-25T01:14:23
2019-11-25T01:14:23
214,041,532
0
0
null
null
null
null
UTF-8
Java
false
false
1,485
java
import java.util.*; public class Distributors { private ArrayDeque<Compiler> systems; private int contrLitigate; private LinkedList<Mechanisms> DMethod; private LinkedList<Mechanisms> HoursProcedures; public Distributors() { this.systems = new ArrayDeque<>(); Compiler xing = new EtdDeveloper(); this.systems.addLast(xing); } public void fixCryptographyMechanism(LinkedList<Mechanisms> serve) { this.contrLitigate = serve.size(); this.DMethod = serve; } public void doWakingTechniques(LinkedList<Mechanisms> proces) { this.contrLitigate = proces.size(); this.HoursProcedures = proces; } public void endureRetailer() { this.tallyConfiguration(new EtdDeveloper(), this.DMethod, "LRU"); this.tallyConfiguration(new EtdDeveloper(), this.HoursProcedures, "CLOCK"); } private void tallyConfiguration( Compiler synchronization, LinkedList<Mechanisms> formerMethod, String replaceable) { synchronization.kickoffSpooler(replaceable); Collections.sort(formerMethod); while (!formerMethod.isEmpty()) { synchronization.inpouringSystem(formerMethod.removeFirst()); } while (synchronization.goIsMoving()) { if (synchronization.fixAchievedMechanismsProportions() == contrLitigate) { synchronization.stoppageController(replaceable); } else { synchronization.primedTopicalMark(synchronization.takeTopicalMark() + 1); synchronization.nsoTic(); } } } }
[ "hayden.cheers@me.com" ]
hayden.cheers@me.com
8b946b3219a9c09d83b5466baea46a20efc8899a
e0783e71b096393c4c50756ef6254873ca440592
/src/main/java/com/alan/demo/config/DatabaseConfiguration.java
d3489aaf3d4ce678ba281f1eb207e7abceca8b03
[]
no_license
Corneyeski/demoJhipster
2492f260407b87fc96bb3e7d57d04469de053762
0a758ee4a65776f50777c937d501e331ecd62ac2
refs/heads/master
2022-12-23T03:27:29.033317
2020-01-29T18:25:14
2020-01-29T18:25:14
237,052,778
0
0
null
2022-12-16T04:43:40
2020-01-29T18:24:58
Java
UTF-8
Java
false
false
772
java
package com.alan.demo.config; import io.github.jhipster.config.JHipsterConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableJpaRepositories("com.alan.demo.repository") @EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") @EnableTransactionManagement public class DatabaseConfiguration { private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f3dd89304ca18aab97a03c8e222a3a66e899a2bd
816c2e253c5a706f884b0ed344f95ca3bec42ee3
/sijitu/src/servlets/view/ProfileCivitas.java
d225878ff91a5bca36482a787f757fd288e5f2f5
[]
no_license
fsetiaw/test
2862a9e2efb33189fda94006d29de45dac9817fd
cf56b33c2300c270cff57e7663923a2324cd8163
refs/heads/master
2020-07-15T04:42:46.087411
2019-08-31T02:45:15
2019-08-31T02:45:15
205,480,726
0
0
null
null
null
null
UTF-8
Java
false
false
19,714
java
package servlets.view; import java.io.IOException; import java.io.PrintWriter; import beans.folder.FolderManagement; import beans.folder.file.*; //import beans.dbase.SearchDb; import beans.dbase.mhs.SearchDbInfoMhs; import beans.dbase.mhs.UpdateDbInfoMhs; import beans.dbase.mhs.pindah_prodi.UpdateDbInfoMhsPp; import beans.dbase.trnlp.UpdateDbTrnlp; import beans.dbase.Beasiswa.SearchDbBeasiswa; import beans.dbase.dosen.SearchDbDsn; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.tomcat.jdbc.pool.DataSource; import java.sql.Connection; import java.util.Vector; import java.util.ListIterator; import java.util.StringTokenizer; import beans.login.InitSessionUsr; import beans.setting.Constants; import beans.tools.AddHocFunction; import beans.tools.Checker; import beans.tools.PathFinder; /** * Servlet implementation class DataCivitas */ @WebServlet("/DataCivitas") public class ProfileCivitas extends HttpServlet { private static final long serialVersionUID = 1L; Connection con; DataSource ds; /** * @see HttpServlet#HttpServlet() */ // public ProfileCivitas() { // super(); // TODO Auto-generated constructor stub // } public void init(ServletConfig config) throws ServletException { super.init(config); /* Context initContext = null; Context envContext = null; try { // Look up the JNDI data source only once at init time initContext = new InitialContext(); envContext = (Context)initContext.lookup("java:/comp/env"); ds = (DataSource)envContext.lookup("jdbc"+beans.setting.Constants.getDbschema()); envContext.close(); initContext.close(); if(ds==null) { throw new ServletException("missing data source"); } } catch (NamingException e) { e.printStackTrace(); } */ } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub //System.out.println("masuk profile civits"); response.setContentType("text/html"); PrintWriter out = response.getWriter(); HttpSession session = request.getSession(true); InitSessionUsr isu = (InitSessionUsr)session.getAttribute("validUsr"); String url_ff = ""; //if(isu==null) { // response.sendRedirect( Constants.getRootWeb()+"/ErrorPage/noUserSession.html"); //} //else { String thsms_reg = Checker.getThsmsHeregistrasi(); String objId = request.getParameter("id_obj"); String nmm = request.getParameter("nmm"); String npm = request.getParameter("npm"); String kdpst = request.getParameter("kdpst"); String obj_lvl = request.getParameter("obj_lvl"); String cmd = request.getParameter("cmd"); String submit = request.getParameter("submit"); String malaikat = request.getParameter("malaikat"); if(malaikat==null || Checker.isStringNullOrEmpty(malaikat)) { malaikat = (String)session.getAttribute("status_malaikat"); } //System.out.println("11profileCivitas "+objId+" "+npm+" "+nmm+" "+obj_lvl+" isu npm = "+isu.getNpm()+" cmd="+cmd); /* * DI dashHomeMhs fungsi ini dipanggil lagi (buat make sure kalo??) */ String status_akhir_mahasiswa = AddHocFunction.getAndSyncStmhsBetweenTrlsmAndMsmhs(kdpst, npm); //System.out.println("status_akhir_mahasiswa22="+status_akhir_mahasiswa); session.setAttribute("status_akhir_mahasiswa", status_akhir_mahasiswa); //status mahasiswa bukan status user yg login session.setAttribute("status_malaikat", malaikat); //isu.isu boolean ada_akses_vop = false; boolean ada_akses_insDataDosen = false; boolean ada_akses_viewDataDosen = false; /* * boleh liat data bila dia boleh liat profile atau fungsi khusus lainya spt: * 1.insDataDosen // bukan view- kalo viewDataDosen harusnya scopenya sama dengan s * * -default scope yg dipake adalah vop, bila usr memilik akses untuk keduanya * penambahan tipe-command, harus sync dengan di fungsi * isu.tryGetInfo(norut,Integer.valueOf(obj_lvl).intValue(),npm,"vop",kdpst); */ if(isu.isUsrAllowTo("vop", npm, obj_lvl)) { ada_akses_vop = true; } if(isu.isUsrAllowTo("insDataDosen", npm, obj_lvl)) { ada_akses_insDataDosen = true; } if(isu.isUsrAllowTo("allowViewDataDosen", npm, obj_lvl)) { ada_akses_viewDataDosen = true; } //System.out.println("ada_akses_vop ="+ada_akses_vop); //System.out.println("ada_akses_insDataDosen ="+ada_akses_insDataDosen); /* * 2baris dibawah ini updated ma proses diatas */ //if(norut>0) { // if(ada_akses_vop||ada_akses_insDataDosen||ada_akses_viewDataDosen) { int norut=0; Vector v = null; if(ada_akses_vop) { norut = isu.isAllowTo("vop"); v = isu.tryGetInfo(norut,Integer.valueOf(obj_lvl).intValue(),npm,"vop",kdpst); } else if(ada_akses_insDataDosen){ norut = isu.isAllowTo("insDataDosen"); v = isu.tryGetInfo(norut,Integer.valueOf(obj_lvl).intValue(),npm,"insDataDosen",kdpst); } else if(ada_akses_viewDataDosen){ norut = isu.isAllowTo("allowViewDataDosen"); v = isu.tryGetInfo(norut,Integer.valueOf(obj_lvl).intValue(),npm,"allowViewDataDosen",kdpst); } FolderManagement folder = new FolderManagement(isu.getDbSchema(),kdpst,npm); folder.cekAndCreateFolderIfNotExist(); // Vector v = isu.tryGetInfo(norut,Integer.valueOf(obj_lvl).intValue(),npm,"vop",kdpst); //System.out.println("v--size="+v.size()); if(v.size()==0) { //System.out.println("masuk no vop"); String target = Constants.getRootWeb()+"/ErrorPage/NoDataFound.jsp"; //System.out.println(target); String uri = request.getRequestURI(); //System.out.println(uri); url_ff = PathFinder.getPath(uri, target); // -- request.getRequestDispatcher(url_ff).forward(request,response); } else { //System.out.println("masuk vop or ins dosen"); //update ada di 2 tmp = ProfileCivitas.java && HistoryBakCivitas.java //if(submit!=null && submit.equalsIgnoreCase("merge")) { if(submit!=null && submit.equalsIgnoreCase("gabung")) { //System.out.println("nerging"); String mergeToNpm = ""+request.getParameter("mergeToNpm"); if(mergeToNpm==null || Checker.isStringNullOrEmpty(mergeToNpm)) { //System.out.println("NO NPM VALUE TO MERGE TO"); } else { UpdateDbInfoMhs udb = new UpdateDbInfoMhs(isu.getNpm()); udb.mergeDataCivitas(npm, mergeToNpm); } url_ff="get.notifications"; } else if(submit!=null && submit.equalsIgnoreCase("GANTI ANGKATAN")) { //System.out.println("nerging"); String moveToSmawl = ""+request.getParameter("moveToSmawl"); if(moveToSmawl==null || Checker.isStringNullOrEmpty(moveToSmawl)) { //System.out.println("NO NPM VALUE TO MERGE TO"); } else { UpdateDbInfoMhs udb = new UpdateDbInfoMhs(isu.getNpm()); //String nu udb.pindahAngkatan(npm, moveToSmawl); } url_ff="get.notifications"; } else if(submit!=null && submit.equalsIgnoreCase("PINDAH PRODI")) { //System.out.println("nerging"); boolean sukses = false; String moveToKdpst = ""+request.getParameter("moveToKdpst"); //System.out.println("moveToKdpst="+moveToKdpst); if(moveToKdpst==null || Checker.isStringNullOrEmpty(moveToKdpst)) { //ignore target kdpst null } else { SearchDbInfoMhs sdm = new SearchDbInfoMhs(isu.getNpm()); Vector v_civ_ext = sdm.getDataProfileCivitasAndExtMhs(npm); if(v_civ_ext!=null && v_civ_ext.size()>0) { ListIterator li = v_civ_ext.listIterator(); String nmmhs=null,tplhr=null,tglhr=null,smawl=null; int i=0; String info_civitas_tabel = (String)li.next(); StringTokenizer st = new StringTokenizer(info_civitas_tabel,"`"); //System.out.println("info_civitas_tabel="+info_civitas_tabel); while(st.hasMoreTokens()) { i++; String tkn = st.nextToken(); if(i==8) { nmmhs=new String(tkn); } else if(i==10) { tplhr=new String(tkn); } else if(i==11) { tglhr=new String(tkn); } else if(i==14) { smawl=new String(tkn); } } if(smawl.equalsIgnoreCase(thsms_reg)) { //yang diproses hanya mhs malaikat baru diinput UpdateDbInfoMhsPp udp = new UpdateDbInfoMhsPp(isu.getNpm()); sukses = udp.pindahProdiMhsBaruDaftar(v_civ_ext, moveToKdpst); } } } url_ff="transit.jsp?sukses="+sukses; } else { //System.out.println("bener kesini"); ListIterator li = v.listIterator(); String v_obj_lvl=(String)li.next(); request.setAttribute("v_obj_lvl", v_obj_lvl); String v_id_kotaku=(String)li.next(); request.setAttribute("v_id_kotaku", v_id_kotaku); String v_id_obj=(String)li.next(); request.setAttribute("v_id_obj", v_id_obj); String v_kdpti=(String)li.next(); request.setAttribute("v_kdpti", v_kdpti); String v_kdjen=(String)li.next(); request.setAttribute("v_kdjen", v_kdjen); String v_kdpst=(String)li.next(); request.setAttribute("v_kdpst", v_kdpst); String v_npmhs=(String)li.next(); request.setAttribute("v_npmhs", v_npmhs); String v_nimhs=(String)li.next(); request.setAttribute("v_nimhs", v_nimhs); String v_nmmhs=(String)li.next(); request.setAttribute("v_nmmhs", v_nmmhs); String v_shift=(String)li.next(); request.setAttribute("v_shift", v_shift); String v_tplhr=(String)li.next(); request.setAttribute("v_tplhr", v_tplhr); String v_tglhr=(String)li.next(); request.setAttribute("v_tglhr", v_tglhr); String v_kdjek=(String)li.next(); request.setAttribute("v_kdjek", v_kdjek); String v_tahun=(String)li.next(); request.setAttribute("v_tahun", v_tahun); String v_smawl=(String)li.next(); request.setAttribute("v_smawl", v_smawl); String v_btstu=(String)li.next(); request.setAttribute("v_btstu", v_btstu); String v_assma=(String)li.next(); request.setAttribute("v_assma", v_assma); String v_tgmsk=(String)li.next(); request.setAttribute("v_tgmsk", v_tgmsk); String v_tglls=(String)li.next(); request.setAttribute("v_tglls", v_tglls); String v_stmhs=(String)li.next(); request.setAttribute("v_stmhs", v_stmhs); String v_stpid=(String)li.next(); request.setAttribute("v_stpid", v_stpid); String v_sksdi=(String)li.next(); request.setAttribute("v_sksdi", v_sksdi); String v_asnim=(String)li.next(); request.setAttribute("v_asnim", v_asnim); String v_aspti=(String)li.next(); request.setAttribute("v_aspti", v_aspti); String v_asjen=(String)li.next(); request.setAttribute("v_asjen", v_asjen); String v_aspst=(String)li.next(); request.setAttribute("v_aspst", v_aspst); String v_bistu=(String)li.next(); request.setAttribute("v_bistu", v_bistu); String v_peksb=(String)li.next(); request.setAttribute("v_peksb", v_peksb); String v_nmpek=(String)li.next(); request.setAttribute("v_nmpek", v_nmpek); String v_ptpek=(String)li.next(); request.setAttribute("v_ptpek", v_ptpek); String v_pspek=(String)li.next(); request.setAttribute("v_pspek", v_pspek); String v_noprm=(String)li.next(); request.setAttribute("v_noprm", v_noprm); String v_nokp1=(String)li.next(); request.setAttribute("v_nokp1", v_nokp1); String v_nokp2=(String)li.next(); request.setAttribute("v_nokp2", v_nokp2); String v_nokp3=(String)li.next(); request.setAttribute("v_nokp3", v_nokp3); String v_nokp4=(String)li.next(); request.setAttribute("v_nokp4", v_nokp4); String v_sttus=(String)li.next(); request.setAttribute("v_sttus", v_sttus); String v_email=(String)li.next(); request.setAttribute("v_email", v_email); String v_nohpe=(String)li.next(); request.setAttribute("v_nohpe", v_nohpe); String v_almrm=(String)li.next(); request.setAttribute("v_almrm", v_almrm); String v_kotrm=(String)li.next(); request.setAttribute("v_kotrm", v_kotrm); String v_posrm=(String)li.next(); request.setAttribute("v_posrm", v_posrm); String v_telrm=(String)li.next(); request.setAttribute("v_telrm", v_telrm); String v_almkt=(String)li.next(); request.setAttribute("v_almkt", v_almkt); String v_kotkt=(String)li.next(); request.setAttribute("v_kotkt", v_kotkt); String v_poskt=(String)li.next(); request.setAttribute("v_poskt", v_poskt); String v_telkt=(String)li.next(); request.setAttribute("v_telkt", v_telkt); String v_jbtkt=(String)li.next(); request.setAttribute("v_jbtkt", v_jbtkt); String v_bidkt=(String)li.next(); request.setAttribute("v_bidkt", v_bidkt); String v_jenkt=(String)li.next(); request.setAttribute("v_jenkt", v_jenkt); String v_nmmsp=(String)li.next(); request.setAttribute("v_nmmsp", v_nmmsp); String v_almsp=(String)li.next(); request.setAttribute("v_almsp", v_almsp); String v_possp=(String)li.next(); request.setAttribute("v_possp", v_possp); String v_kotsp=(String)li.next(); request.setAttribute("v_kotsp", v_kotsp); String v_negsp=(String)li.next(); request.setAttribute("v_negsp", v_negsp); String v_telsp=(String)li.next(); request.setAttribute("v_telsp", v_telsp); String v_neglh=(String)li.next(); request.setAttribute("v_neglh", v_neglh); String v_agama=(String)li.next(); request.setAttribute("v_agama", v_agama); request.setAttribute("v_profile", v); request.setAttribute("atr_name", "atr_val"); //update sksdi jika mhs pindahan if(!Checker.isStringNullOrEmpty(v_stpid) && v_stpid.equalsIgnoreCase("P")) { UpdateDbTrnlp udt = new UpdateDbTrnlp(); udt.hitungDanUpdateSksdi(v_npmhs); } // tambahan 1 = get list kurikulum dan selected String listKurAndSelected = request.getParameter("listKurAndSelected"); if(listKurAndSelected==null) { SearchDbInfoMhs sdb = new SearchDbInfoMhs(isu.getNpm()); Vector vListAndSelectedKurikulum = sdb.gotListAndSelectedKurikulum(v_kdpst,v_npmhs,v_smawl); ListIterator litmp = vListAndSelectedKurikulum.listIterator(); while(litmp.hasNext()) { listKurAndSelected = listKurAndSelected+litmp.next()+"__"; } listKurAndSelected = listKurAndSelected.replace("null",""); } //System.out.println("listKurAndSelected="+listKurAndSelected); //request.setAttribute("vListAndSelectedKurikulum", vListAndSelectedKurikulum); String target=""; if(cmd!=null && cmd.equalsIgnoreCase("edit")) { // get list obj SearchDbInfoMhs sdb = new SearchDbInfoMhs(isu.getNpm()); String listObj = sdb.getListTipeObj(); String curPa = ""+sdb.getInfoPA(v_kdpst, v_npmhs); SearchDbDsn sdd = new SearchDbDsn(isu.getNpm()); // //System.out.println("curPacurPa="+curPa); //String kdpst_dosen = "00011"; //kapan2 harus di centralizd //Vector v_list_dosen = sdd.getListKaprodi(Constants.getKdpstDosen()); Vector v_list_dosen = sdd.getListDosenAktif(); session.setAttribute("vListDsn", v_list_dosen); request.setAttribute("listTipeObj", listObj); request.setAttribute("curPa", curPa); target = Constants.getRootWeb()+"/InnerFrame/Edit/editProfile.jsp"; String uri = request.getRequestURI(); url_ff = PathFinder.getPath(uri, target); // --request.getRequestDispatcher(url_ff+"?targetPage=editProfile&listKurAndSelected="+listKurAndSelected).forward(request,response); url_ff = url_ff+"?targetPage=editProfile&listKurAndSelected="+listKurAndSelected; } else if(cmd!=null && cmd.equalsIgnoreCase("dashboard")) { //System.out.println("sampe dashboard"); target = Constants.getRootWeb()+"/InnerFrame/dashHomeMhs.jsp"; String uri = request.getRequestURI(); url_ff = PathFinder.getPath(uri, target); //System.out.println("sampe dashboard1"); // --request.getRequestDispatcher(url_ff+"?targetPage=dashHomePage").forward(request,response); url_ff = url_ff+"?targetPage=dashHomePage"; } else if(cmd!=null && (cmd.equalsIgnoreCase("viewProfile") || cmd.equalsIgnoreCase("updated"))) { SearchDbInfoMhs sdb = new SearchDbInfoMhs(isu.getNpm()); String curPa = ""+sdb.getInfoPA(v_kdpst, v_npmhs); request.setAttribute("curPa", curPa); SearchDbBeasiswa sdbe = new SearchDbBeasiswa(isu.getNpm()); Vector vHisBea = sdbe.getHistBeasiswa(kdpst, npm); session.setAttribute("vHisBea", vHisBea); target = Constants.getRootWeb()+"/InnerFrame/profile.jsp"; String uri = request.getRequestURI(); url_ff = PathFinder.getPath(uri, target); // --request.getRequestDispatcher(url_ff+"?atMenu=dataPribadi&targetPage=profile&listKurAndSelected="+listKurAndSelected).forward(request,response); url_ff = url_ff+"?atMenu=dataPribadi&targetPage=profile&listKurAndSelected="+listKurAndSelected; } /* else if(cmd!=null && cmd.equalsIgnoreCase("editProfileKeu")) { // get list obj SearchDbInfoMhs sdb = new SearchDbInfoMhs(isu.getNpm()); String listObj = sdb.getListTipeObj(); String curPa = ""+sdb.getInfoPA(v_kdpst, v_npmhs); SearchDbDsn sdd = new SearchDbDsn(isu.getNpm()); //System.out.println("curPacurPa="+curPa); //String kdpst_dosen = "00011"; //kapan2 harus di centralizd //Vector v_list_dosen = sdd.getListKaprodi(Constants.getKdpstDosen()); Vector v_list_dosen = sdd.getListDosenAktif(); session.setAttribute("vListDsn", v_list_dosen); request.setAttribute("listTipeObj", listObj); request.setAttribute("curPa", curPa); target = Constants.getRootWeb()+"/InnerFrame/Edit/editProfileKeu.jsp"; String uri = request.getRequestURI(); String url_ff = PathFinder.getPath(uri, target); request.getRequestDispatcher(url_ff+"?targetPage=editProfile&listKurAndSelected="+listKurAndSelected).forward(request,response); } */ //String uri = request.getRequestURI(); //String url_ff = PathFinder.getPath(uri, target); //request.getRequestDispatcher(url_ff).forward(request,response); //request.getRequestDispatcher("profile.jsp").forward(request,response); } } } else { String target = Constants.getRootWeb()+"/ErrorPage/authorization.jsp"; String uri = request.getRequestURI(); url_ff = PathFinder.getPath(uri, target); //--request.getRequestDispatcher(url_ff).forward(request,response); } //} //System.out.println("url_ff="+url_ff); if(isu==null) { response.sendRedirect( Constants.getRootWeb()+"/ErrorPage/noUserSession.html"); } else { request.getRequestDispatcher(url_ff).forward(request,response); } } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request,response); } }
[ "fsetiaw@gmail.com" ]
fsetiaw@gmail.com
e7746e26b852978fc34629fd3b97057c41d07695
ed2b8781fb768d587a0cd4bc9e623941cb6f2cb0
/src/main/java/com/example/spring_first/constants/ResponseStatusCode.java
068d4fd31cca4560e7401b48f4fa67fd4988f1e4
[]
no_license
OverlordA/spring_first
c1a145e81d99d898d82b19ba8fa5f6a4e488d70e
5070a9a6df02f87a9fe06cf3f9273b73a144b13f
refs/heads/master
2020-11-26T00:22:13.367408
2020-02-05T11:40:55
2020-02-05T11:40:55
228,904,764
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package com.example.spring_first.constants; public class ResponseStatusCode { public static final int CODE_SUCCESS = 100; public static final int AUTH_FAILURE = 102; public static final int INVALID_DATA = 103; }
[ "antonkotik0@gmail.com" ]
antonkotik0@gmail.com
755ae37c3b91f18631b1cf2c355816467228419e
c09986b4fd1fa9fd7223aaaa5d3c21417285a6f4
/src/main/java/com/codeXie/service/EmployeeService.java
5488ac62f31a3d8fbdaa7a53028304031a5c0b53
[]
no_license
bigWhiteXie/MyErp
cf4d1bfeafc4a01a278144e7385020f62b67a486
f0bcfe95bb6022e88ef94f238ecaed24df49710b
refs/heads/master
2023-08-25T16:58:23.658658
2021-10-17T10:05:36
2021-10-17T10:05:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
828
java
package com.codeXie.service; import com.codeXie.pojo.EmpCondition; import com.codeXie.pojo.Employee; import com.codeXie.utils.PageBean; import java.util.List; public interface EmployeeService { /** * 用于员工登录 * @param ename 用户名 * @param pwd 密码 * @return */ public Employee selectOne(String ename,String pwd); /** * 添加员工 * @param employee * @return */ public int addEmp(Employee employee); /** * 分页查询 * @param condition 分页查询条件 * @return */ public PageBean<Employee> selectPage(EmpCondition condition); List<Employee> selectManager(); Employee selectUpdate(String empid); int updateEmp(Employee employee); int delEmp(String empid); int resetPwd(String empid); }
[ "codeXie@163.com" ]
codeXie@163.com
ead70ad2d558d7c366f8363c8f931c758de01281
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/com/google/zxing/oned/UPCEANExtensionSupport.java
dcc9f249e4ce480348986361bd6e7560383c6f0e
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
1,007
java
package com.google.zxing.oned; import com.google.zxing.NotFoundException; import com.google.zxing.ReaderException; import com.google.zxing.Result; import com.google.zxing.common.BitArray; final class UPCEANExtensionSupport { private static final int[] EXTENSION_START_PATTERN = {1, 1, 2}; private final UPCEANExtension5Support fiveSupport = new UPCEANExtension5Support(); private final UPCEANExtension2Support twoSupport = new UPCEANExtension2Support(); UPCEANExtensionSupport() { } /* access modifiers changed from: 0000 */ public Result decodeRow(int i, BitArray bitArray, int i2) throws NotFoundException { int[] findGuardPattern = UPCEANReader.findGuardPattern(bitArray, i2, false, EXTENSION_START_PATTERN); try { return this.fiveSupport.decodeRow(i, bitArray, findGuardPattern); } catch (ReaderException unused) { return this.twoSupport.decodeRow(i, bitArray, findGuardPattern); } } }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
04225f816bbc0754bcab4a68c45c31f3837ab145
2c8086593a1c2caea805cd07ebbdbf7a388ec49e
/src/com/github/xsavikx/android/screencast/ui/explorer/LazyMutableTreeNode.java
ff51e610c20efc4ce63190b1caf73ea252e23b8c
[ "Apache-2.0" ]
permissive
upwell/AndroidScreencast
c0da6042f50729c26d16bebaa9127163837950ca
22f8901aa497b44334b1bf13a255c9bff0c3bfb2
refs/heads/master
2021-01-18T04:59:03.161058
2015-03-29T19:09:29
2015-03-29T19:09:29
37,296,045
0
0
null
2015-06-12T01:46:29
2015-06-12T01:46:29
null
UTF-8
Java
false
false
873
java
package com.github.xsavikx.android.screencast.ui.explorer; import javax.swing.tree.DefaultMutableTreeNode; public abstract class LazyMutableTreeNode extends DefaultMutableTreeNode { /** * */ private static final long serialVersionUID = -6383034137965603498L; protected boolean _loaded = false; public LazyMutableTreeNode() { super(); } public LazyMutableTreeNode(Object userObject) { super(userObject); } public LazyMutableTreeNode(Object userObject, boolean allowsChildren) { super(userObject, allowsChildren); } public void clear() { removeAllChildren(); _loaded = false; } @Override public int getChildCount() { synchronized (this) { if (!_loaded) { _loaded = true; initChildren(); } } return super.getChildCount(); } protected abstract void initChildren(); public boolean isLoaded() { return _loaded; } }
[ "savik.ne@gmail.com" ]
savik.ne@gmail.com
bacbccb3db6c6e83f087dec32383e91b9884a80b
5f583eab767965ecf904b225620c45ae0d9f6442
/app/src/main/java/com/example/db/User.java
15434edf3d445f0fad1f6aa13f754e99e4b7023d
[]
no_license
rmanenti/android.example.crud
5a9d35684e9ff611f243d03966950195eb9bf0af
6aae3e94f4d3a531374229ab4b33594a864ec6a4
refs/heads/master
2020-12-24T19:28:44.038176
2016-05-21T12:46:41
2016-05-21T12:47:12
59,358,531
0
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
package com.example.db; /** * Created by Administrador on 14/05/2016. */ public class User { private int user_id; private String name; private String phone; private String address; public User() {} public User(String name, String address, String phone) { super(); this.name = name; this.address = address; this.phone = phone; } public int getUser_id() { return user_id; } public void setUser_id(int user_id) { this.user_id = user_id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } @Override public String toString() { return name + " - " + address + " - " + phone; } }
[ "cygnusx1" ]
cygnusx1
2edbfc3fbc78769d2ad489af67071cac4642b139
b69e7bc993e7a1ae2ede0c318ab305ea9a3a7948
/src/main/java/com/portfolio/assigner/validator/CustomerRecordValidator.java
820691ea0f2ada20f7704ecc97a014253defb12c
[]
no_license
Ramanuj/portfolio-assigner
454d9909b4038e6a99fe2833683ac03e044006da
43f597ce17c6a5e6cec330b30d3c461f94670472
refs/heads/master
2021-01-06T14:33:52.713544
2020-02-18T13:29:03
2020-02-18T13:29:03
241,362,364
0
0
null
null
null
null
UTF-8
Java
false
false
2,025
java
package com.portfolio.assigner.validator; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import org.springframework.util.StringUtils; import com.portfolio.assigner.common.AppConstants; import com.portfolio.assigner.exceptions.InvalidDateFormatException; /** * This will validate the customer input record * * @author Ramanuj * */ public class CustomerRecordValidator { /** * This method will validate if all the required fields are present. * * @param firstName * @param lastName * @param dateOfBirth * @param asset * @return String */ public String validateAllRequiredInputs(String firstName, String lastName, String dateOfBirth, String asset) { String validationMessage = null; if (StringUtils.isEmpty(firstName)) { return AppConstants.ERR_MSG_FIRST_NAME_NOT_PRESENT; } else if (StringUtils.isEmpty(lastName)) { return AppConstants.ERR_MSG_LAST_NAME_NOT_PRESENT; } else if (StringUtils.isEmpty(dateOfBirth)) { return AppConstants.ERR_MSG_DATE_OF_BIRTH_NOT_PRESENT; } else if (StringUtils.isEmpty(asset)) { return AppConstants.ASSET_NOT_PRESENT; } return validationMessage; } /** * Validate date of birth. <br> * If the date of birth * * @param dateOfBirth * @return LocalDates * @throws InvalidDateFormatException */ public LocalDate dateOfBirth(String dateOfBirth) throws InvalidDateFormatException { DateTimeFormatter formatter = DateTimeFormatter.ofPattern(AppConstants.ACCEPTABLE_DATEFORMAT); try { return LocalDate.parse(dateOfBirth, formatter); } catch (Exception e) { throw new InvalidDateFormatException("Date passed is in invalid format, Excepted date format ddMMyyyy", e); } } /** * Validate assets. <br> * If the asset can not be parsed as double then throw a NumberFormatException * * @return Double */ public Double asset(String asset) { try { return Double.valueOf(asset); } catch (Exception e) { throw new NumberFormatException("Asset value is invalid"); } } }
[ "ramanuj.srivastava21@gmail.com" ]
ramanuj.srivastava21@gmail.com
9b9fecde8ec90ff319c42d95267af24d07ba4901
b5b2d94455615114a688f640e9906a29377c0383
/ghost_starter/app/src/main/java/com/google/engedu/ghost/FastDictionary.java
840e44e8c0d5c89a3f2a790c76c352d1af8aa81f
[ "Apache-2.0" ]
permissive
ms3001/androidwithgoogle
1b67e1dd138ef3658467cefef96f0eb28ac645ce
635b6195bb0689072fa2ed6fb42f745c3f0e21ae
refs/heads/master
2021-01-11T21:56:11.160409
2017-01-25T23:01:46
2017-01-25T23:01:46
78,880,137
0
0
null
null
null
null
UTF-8
Java
false
false
1,644
java
/* Copyright 2016 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.engedu.ghost; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class FastDictionary implements GhostDictionary { private TrieNode root; public FastDictionary(InputStream wordListStream) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(wordListStream)); root = new TrieNode(); String line = null; while((line = in.readLine()) != null) { String word = line.trim(); if (word.length() >= MIN_WORD_LENGTH) root.add(line.trim()); } System.out.println(root); } @Override public boolean isWord(String word) { return root.isWord(word); } @Override public String getAnyWordStartingWith(String prefix) { return root.getAnyWordStartingWith(prefix); } @Override public String getGoodWordStartingWith(String prefix) { return root.getGoodWordStartingWith(prefix); } }
[ "manyusharma96@gmail.com" ]
manyusharma96@gmail.com
56f648a2911ec47b6d54f23afe48609a82008576
d42c000dbfb74ffcdec45f9aa26162d36fe672b5
/app/src/main/java/com/hya/appstore/common/http/CommonParamsInterceptor.java
179c01be2b8d90bf6f055c4afb205a68e343e98e
[]
no_license
czhya/AppStore
8dfeee36ef70e5a5ffff10adb82ba2d716d1f62e
1276fb2d0cddf41aa8863e8201737f45dac52935
refs/heads/master
2021-07-20T17:53:59.044341
2017-10-29T10:32:42
2017-10-29T10:32:42
105,605,332
1
0
null
null
null
null
UTF-8
Java
false
false
5,283
java
package com.hya.appstore.common.http; import android.content.Context; import android.text.TextUtils; import com.google.gson.Gson; import com.hya.appstore.common.Constant; import com.hya.appstore.common.util.ACache; import com.hya.appstore.common.util.DensityUtil; import com.hya.appstore.common.util.DeviceUtils; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Set; import okhttp3.FormBody; import okhttp3.HttpUrl; import okhttp3.Interceptor; import okhttp3.MediaType; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okio.Buffer; /** * * @author hya * @date 2017/10/25 */ public class CommonParamsInterceptor implements Interceptor { private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); private Context mContext; private Gson mGson; public CommonParamsInterceptor(Gson mGson, Context mContext) { this.mGson = mGson; this.mContext = mContext; } @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); try { String method = request.method(); HashMap<String, Object> commonParamsMap = new HashMap<>(); String imei = DeviceUtils.getIMEI(mContext); if (imei != null && imei.startsWith("000000")) { imei = "5284047f4ffb4e04824a2fd1d1f0cd62"; } commonParamsMap.put(Constant.IMEI, imei); commonParamsMap.put(Constant.MODEL, DeviceUtils.getModel()); commonParamsMap.put(Constant.LANGUAGE, DeviceUtils.getLanguage()); commonParamsMap.put(Constant.os, DeviceUtils.getBuildVersionIncremental()); commonParamsMap.put(Constant.RESOLUTION, DensityUtil.getScreenW(mContext) + "*" + DensityUtil.getScreenH(mContext)); commonParamsMap.put(Constant.SDK, DeviceUtils.getBuildVersionSDK() + ""); commonParamsMap.put(Constant.DENSITY_SCALE_FACTOR, mContext.getResources().getDisplayMetrics().density + ""); String token = ACache.get(mContext).getAsString(Constant.TOKEN); commonParamsMap.put(Constant.TOKEN,token==null?"":token); if ("GET".equals(method)) { HttpUrl httpUrl = request.url(); HashMap<String, Object> rootMap = new HashMap<>(); Set<String> params = httpUrl.queryParameterNames(); for (String key : params) { if (Constant.PARAM.equals(key)) { String oldParamsJson = httpUrl.queryParameter(Constant.PARAM); if (oldParamsJson != null) { HashMap<String, Object> p = mGson.fromJson(oldParamsJson, HashMap.class); // 原始参数 if (p != null) { for (Map.Entry<String, Object> entry : p.entrySet()) { rootMap.put(entry.getKey(), entry.getValue()); } } } else { rootMap.put(key, httpUrl.queryParameter(key)); } } } rootMap.put("publicParams", commonParamsMap); String newJsonParams = mGson.toJson(rootMap); String url = httpUrl.toString(); int index = url.indexOf("?"); if (index > 0) { url = url.substring(0, index); } url = url + "?" + Constant.PARAM + "=" + newJsonParams; request = request.newBuilder().url(url).build(); } else if ("POST".equals(method)) { RequestBody requestBody = request.body(); HashMap<String, Object> rootMap = new HashMap<>(); if (requestBody instanceof FormBody) { for (int i = 0; i < ((FormBody) requestBody).size(); i++) { rootMap.put(((FormBody) requestBody).encodedName(i), ((FormBody) requestBody).encodedValue(i)); } } else { Buffer buffer = new Buffer(); requestBody.writeTo(buffer); String oldJsonParams = buffer.readUtf8(); if (!TextUtils.isEmpty(oldJsonParams)) { rootMap = mGson.fromJson(oldJsonParams, HashMap.class); // 原始参数 if (rootMap != null) { rootMap.put("publicParams", commonParamsMap); // 重新组装 String newJsonParams = mGson.toJson(rootMap); // {"page":0,"publicParams":{"imei":'xxxxx',"sdk":14,.....}} request = request.newBuilder().post(RequestBody.create(JSON, newJsonParams)).build(); } } } } }catch (Exception e){ e.printStackTrace(); } return chain.proceed(request); } }
[ "hya_cz@163.com" ]
hya_cz@163.com
8036dd3c2165d1c4c44f6ea59496dd25aeed3c1f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-8281-2-11-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/web/EditAction_ESTest_scaffolding.java
57b033f21536a5e6cae49419b1a4cc22d5b6680b
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Jan 19 02:31:07 UTC 2020 */ package com.xpn.xwiki.web; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class EditAction_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
8f172f23ba4484ad35d95773249e62f596d2738e
248228f52ec893d2867cddca010e1ce99f387de3
/src/main/java/org/pz/platypus/exceptions/StopExecutionException.java
92fbc81d00d4ea1fcd18601f3cb2cfc48eb0fb35
[]
no_license
codehaus/platypus
c01ebf1fd9852b3479e68432f53680d206c3747a
9f30d979329f7b3246b676c8ec98cc70bee46e9b
refs/heads/master
2023-07-20T00:34:56.833224
2011-04-30T07:44:02
2011-04-30T07:44:02
36,342,419
0
0
null
null
null
null
UTF-8
Java
false
false
590
java
/*** * Platypus: Page Layout and Typesetting Software (free at platypus.pz.org) * * Platypus is (c) Copyright 2006-09 Pacific Data Works LLC. All Rights Reserved. * Licensed under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) */ package org.pz.platypus.exceptions; /** * Exception used for stopping exception after processing of certain Command Line Options * * @author atul khot */ public class StopExecutionException extends RuntimeException { public StopExecutionException(String errMsg) { super(errMsg); } }
[ "binstock@dee37da4-d874-0410-bba0-bb64538a29bc" ]
binstock@dee37da4-d874-0410-bba0-bb64538a29bc
83977f7ccfdb9d59c263f751e9ce5322f057ded6
1746dcf9a8932971ec1beb40426164c06df8d6c5
/DomainModel/src/main/java/ru/swimmasters/domain/SwimMastersClub.java
e533535e80157e9a2f406d3fa2cedd68786bbdbf
[]
no_license
dedmajor/swimming
2df78dbabb7fe1b58ad242125cd3e753e128e264
0d5d88444f82fd1d8832948e9a6b1018859b7738
refs/heads/master
2021-01-01T20:06:34.006239
2011-12-07T07:23:01
2011-12-07T07:23:01
681,833
0
0
null
null
null
null
UTF-8
Java
false
false
1,806
java
package ru.swimmasters.domain; import javax.persistence.Entity; import javax.persistence.Id; /** * In the meet sub tree, this element contains information about a club, * including athletes and relays with their entries and/or results. * * TODO: In the record list sub tree, the element contains information * about the club or nation of record holders. * * User: dedmajor * Date: 3/7/11 */ @Entity public class SwimMastersClub implements Club { // LEN (14 fields): //String type; // club, national relayTeam, regional relayTeam, unattached ClubType type = ClubType.CLUB; /** * The official club code given by the national federation. * Only official club codes should be used here! */ //String code; /** * The full name of the club or the relayTeam. * Required field. */ String name; /** * The club name in english. * XML: name.en */ String englishName; /** * This value can be used to distinguish different teams of the same club * in a meet entries or results file. * (This object not used in CLUB objects, which appear in the record list sub tree.) */ //Integer number; //String shortName; //String englishShortName; //String nation; // enum /** * The code of the regional or local swimming committee. * Only official codes should be used here! */ //String region; //Athletes athletes; //Contact contact; //Officials officials; //RelayTeams relays; //Long swrid; // SwimMasters (5 fields): @Id Integer id; // Integer cityId; /** * Required for creating aggregate result tables. */ // Integer akvspCode; @Override public String getName() { return name; } }
[ "dedmajor@gmail.com" ]
dedmajor@gmail.com
2db54dcb1cc857a9d4f6db1658fdf79370aef634
15940274bebe3d807401a98c40906edc527f45bc
/test/src/stu/str/SubString.java
96565a7f33dbe22df46c40fe8ffd0eda453f73fd
[]
no_license
Paynesix/JavaStudyResource
b908736c50a4831b92a74e0ff9b5d497e3a139e7
bff094a95d71c8c3912c7f634ca08b9e912c5559
refs/heads/master
2020-03-19T11:53:31.527278
2018-09-03T06:59:21
2018-09-03T06:59:21
136,483,046
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
package stu.str; public class SubString { /** * @param args */ public static void main(String[] args) { // String str = "2017-08-08"; // System.out.println(str.substring(0,4)); // System.out.println(str.substring(5,7)); // System.out.print(str.substring(8,10)); String s = " === === === === == 1, 2,3,4,,,,5 ========== === = == = = == = == = "; System.out.println(subStringSpecilChar(s, "=")); } /** * 去除字符串的两端特殊字符 * @param s * @param x * @return */ private static String subStringSpecilChar(String s, String x) { while(s.trim().indexOf(x) == 0) s = s.substring(1); s = s.trim(); while(s.trim().lastIndexOf(x) == s.trim().length()-1) s = s.substring(0, s.lastIndexOf(x)); return s.trim(); } }
[ "PayneSix@163.com" ]
PayneSix@163.com
c87395e0957ab7829c54efc17933579b56153bd0
b75e2f9e49bb16f2a8aec6179c93ea651aca9836
/SelMay2017/src/main/java/leaftaps/Lead/CreateLead.java
1285392e5970ae066f51557decde2766506b02c1
[]
no_license
VENKI31/SelMay17
4574230211c272c8233cc342c82fba8e68a6faae
d354411463f056e949b0d3756f52206085be39d4
refs/heads/master
2021-01-19T12:42:32.534154
2017-07-15T20:15:35
2017-07-15T20:15:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,082
java
package leaftaps.Lead; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import wrappers.LeafTapsWrapper; public class CreateLead extends LeafTapsWrapper{ @Test(dataProvider="fetchData") /*(groups={"smoke"})*/ public void createLead(String FN,String LN,String CN) throws Exception{ clickByLink("Leads"); clickByLink("Create Lead"); enterById("createLeadForm_companyName",CN); enterById("createLeadForm_firstName", FN); enterById("createLeadForm_lastName", LN); /*enterById("createLeadForm_primaryEmail", "gopinath@testleaf.com"); enterById("createLeadForm_primaryPhoneNumber", "9597704568");*/ clickByName("submitButton"); } @DataProvider(name="fetchData") public static String[][] getData() { String[][] data = new String[2][3]; data[0][0] = "Gopi"; data[0][1] = "J"; data[0][2] = "Facebook"; data[1][0] = "Lokesh"; data[1][1] = "T"; data[1][2] = "LinkedIn"; return data; } }
[ "gopinath@testleaf.com" ]
gopinath@testleaf.com
79bda94e928aea3a925af312fb54725e891713c5
9df871d9b293f5d79fcad4132b57de07cbb1aac6
/Contas/src/br/com/fiap/contas/main/TestaBanco.java
a1ae4e9c5183bbd0f71f36b4c5530e3a4ac4ff6b
[]
no_license
renanfmendes/meusCodigosJava
c231fc20caaf7ca59c4ae96e1e3c3bb3ccaab0de
00963f9e8e427c842fcae3d70310e26447f483ca
refs/heads/master
2020-08-04T17:22:05.795127
2019-11-13T01:48:38
2019-11-13T01:48:38
212,216,550
0
0
null
null
null
null
UTF-8
Java
false
false
525
java
package br.com.fiap.contas.main; import br.com.fiap.contas.modelo.Banco; import br.com.fiap.contas.modelo.ContaCorrente; public class TestaBanco { public static void main(String[] args) { Banco banco = new Banco("RenanBank", 001); for (int i = 0; i < 3; i++) { ContaCorrente conta = new ContaCorrente(); conta.setNomeTitular("Titular " + i); conta.setNuAgencia(String.valueOf(i)); conta.setNuConta(i); conta.deposita(i * 1000); banco.adiciona(conta); } banco.mostraContas(); } }
[ "rmendes@cielo.com.br" ]
rmendes@cielo.com.br
c5d60199fdf47c63c553c2f9ac7866c087936da3
a2dd077429a45ea96b309154197b741eb1863086
/src/test/java/controllers/PokemonTypeControllerTest.java
8d68e20363c49be015351fbfb471c4f9dbc0a233
[]
no_license
ALTEA-2018/tp-handcraft-Debaerdm
f6a5ca8f32f50affae88f3625c712da1a05356c9
5eafdf0b81915b6c81fc7e4c1371ff30cd42def5
refs/heads/master
2020-04-16T13:29:39.952206
2019-02-25T13:12:25
2019-02-25T13:12:25
165,629,803
0
0
null
null
null
null
UTF-8
Java
false
false
3,323
java
package controllers; import annotations.Controller; import annotations.RequestMapping; import beans.PokemonType; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import repositories.PokemonTypeRepository; import java.io.IOException; import java.util.Map; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; class PokemonTypeControllerTest { @InjectMocks PokemonTypeController controller; @Mock PokemonTypeRepository pokemonRepository; @BeforeEach void init(){ MockitoAnnotations.initMocks(this); } @Test void getPokemon_shouldRequireAParameter(){ var exception = assertThrows(IllegalArgumentException.class, () -> controller.getPokemon(null)); assertEquals("parameters should not be empty", exception.getMessage()); } @Test void getPokemon_shouldRequireAKnownParameter(){ var parameters = Map.of("test", new String[]{"25"}); var exception = assertThrows(IllegalArgumentException.class, () -> controller.getPokemon(parameters)); assertEquals("unknown parameter", exception.getMessage()); } @Test void getPokemon_withAnIdParameter_shouldReturnAPokemon() throws IOException { var objectMapper = new ObjectMapper(); var pikachu = new PokemonType(); pikachu.setId(25); pikachu.setName("pikachu"); when(pokemonRepository.findPokemonById(25)).thenReturn(pikachu); var parameters = Map.of("id", new String[]{"25"}); var json = controller.getPokemon(parameters); PokemonType pokemon = objectMapper.readValue(json, PokemonType.class); assertNotNull(pokemon); assertEquals(25, pokemon.getId()); assertEquals("pikachu", pokemon.getName()); } @Test void getPokemon_withANameParameter_shouldReturnAPokemon() throws IOException { var objectMapper = new ObjectMapper(); var zapdos = new PokemonType(); zapdos.setId(145); zapdos.setName("zapdos"); when(pokemonRepository.findPokemonByName("zapdos")).thenReturn(zapdos); var parameters = Map.of("name", new String[]{"zapdos"}); var json = controller.getPokemon(parameters); PokemonType pokemon = objectMapper.readValue(json, PokemonType.class); assertNotNull(pokemon); assertEquals(145, pokemon.getId()); assertEquals("zapdos", pokemon.getName()); } @Test void pokemonTypeController_shouldBeAnnotated(){ var controllerAnnotation = PokemonTypeController.class.getAnnotation(Controller.class); assertNotNull(controllerAnnotation); } @Test void getPokemon_shouldBeAnnotated() throws NoSuchMethodException { var getPokemonMethod = PokemonTypeController.class.getDeclaredMethod("getPokemon", Map.class); var requestMappingAnnotation = getPokemonMethod.getAnnotation(RequestMapping.class); assertNotNull(requestMappingAnnotation); assertEquals("/pokemon", requestMappingAnnotation.uri()); } }
[ "mathieu.debaerdemaeker@gmail.com" ]
mathieu.debaerdemaeker@gmail.com
c3d30ea8748476d216f0ec0d728b491a072b1ae8
59d82240d21edf615aeebde5df315a603ad16bae
/src/main/java/com/caisin/wuxiaworld/JsoupUtil.java
4bab9add172a250244cd05ad1ee3f4d2ed038d78
[]
no_license
Caisin/spider
36d5f8b3790a22aa9c12d5f3aaad93de3a416911
a32fbffa23cc4ca229fdb3700cf78e4701a7da52
refs/heads/master
2023-01-24T06:04:33.203519
2020-11-22T16:00:09
2020-11-22T16:00:09
315,033,637
0
0
null
null
null
null
UTF-8
Java
false
false
744
java
package com.caisin.wuxiaworld; import org.jsoup.Connection; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import java.io.IOException; public class JsoupUtil { public static Connection getConnection(String url) { return Jsoup.connect(url) .header("user-agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36").timeout(5000); } public static Document getDocument(String url) throws IOException { return Jsoup.connect(url) .header("user-agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36") .timeout(10000).get(); } }
[ "kaixing622@qq.com" ]
kaixing622@qq.com
06a68fe40f0f0d661790cdd3e87b9b4f7a462089
5fa3fab60e95a1538d35464bbc4fb3c68b3d2200
/common/service_base/src/main/java/com/atguigu/servicebase/exceptionhandler/GlobalExceptionHandler.java
bb8a8b8f0385aa7277f184c87c0ec51203d729cf
[]
no_license
TimTiian/guli_parent
0282de739b25c32b46eb16aa2d917928e4cc6ee1
a78034bdd65d9a6f907a720d7df2d1d122ce4d88
refs/heads/master
2022-12-22T00:58:10.819179
2020-09-18T23:06:39
2020-09-18T23:06:39
293,046,819
0
0
null
null
null
null
UTF-8
Java
false
false
1,190
java
package com.atguigu.servicebase.exceptionhandler; import com.atguigu.commonutils.R; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; @ControllerAdvice @Slf4j public class GlobalExceptionHandler { //指定出现什么异常执行这个方法 @ExceptionHandler(Exception.class) @ResponseBody //为了返回数据 public R error(Exception e){ e.printStackTrace(); return R.error().message("执行了全局异常处理.."); } //特定异常 @ExceptionHandler(ArithmeticException.class) @ResponseBody //为了返回数据 public R error(ArithmeticException e){ e.printStackTrace(); return R.error().message("执行了ArithmeticException异常处理.."); } //自定义异常 @ExceptionHandler(GuliException.class) @ResponseBody //为了返回数据 public R error(GuliException e){ log.error(e.getMessage()); e.printStackTrace(); return R.error().code(e.getCode()).message(e.getMsg()); } }
[ "tianchliang@126.com" ]
tianchliang@126.com
3e2f79ef42c0878288e90b59375c4dc801cd94bd
e5498dcb0bd42444f2d5d55bbe20892cdc28a0e3
/src/com/sforce/soap/_2006/_08/apex/CodeCoverageWarning.java
7d7d3d4ed7fba682d3ead055fdc2d24750025dfa
[]
no_license
wabbott/SFDC-RunTests
c84fbcb39acae543aa09d920186563416904ef24
85f4266ab07ff9bddacedf4b37eae21b9b2abbfd
refs/heads/master
2020-03-29T12:29:22.907513
2011-07-28T15:14:09
2011-07-28T15:14:09
2,118,484
1
0
null
null
null
null
UTF-8
Java
false
false
6,913
java
/** * CodeCoverageWarning.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.sforce.soap._2006._08.apex; public class CodeCoverageWarning implements java.io.Serializable { private java.lang.String id; private java.lang.String message; private java.lang.String name; private java.lang.String namespace; public CodeCoverageWarning() { } public CodeCoverageWarning( java.lang.String id, java.lang.String message, java.lang.String name, java.lang.String namespace) { this.id = id; this.message = message; this.name = name; this.namespace = namespace; } /** * Gets the id value for this CodeCoverageWarning. * * @return id */ public java.lang.String getId() { return id; } /** * Sets the id value for this CodeCoverageWarning. * * @param id */ public void setId(java.lang.String id) { this.id = id; } /** * Gets the message value for this CodeCoverageWarning. * * @return message */ public java.lang.String getMessage() { return message; } /** * Sets the message value for this CodeCoverageWarning. * * @param message */ public void setMessage(java.lang.String message) { this.message = message; } /** * Gets the name value for this CodeCoverageWarning. * * @return name */ public java.lang.String getName() { return name; } /** * Sets the name value for this CodeCoverageWarning. * * @param name */ public void setName(java.lang.String name) { this.name = name; } /** * Gets the namespace value for this CodeCoverageWarning. * * @return namespace */ public java.lang.String getNamespace() { return namespace; } /** * Sets the namespace value for this CodeCoverageWarning. * * @param namespace */ public void setNamespace(java.lang.String namespace) { this.namespace = namespace; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof CodeCoverageWarning)) return false; CodeCoverageWarning other = (CodeCoverageWarning) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.id==null && other.getId()==null) || (this.id!=null && this.id.equals(other.getId()))) && ((this.message==null && other.getMessage()==null) || (this.message!=null && this.message.equals(other.getMessage()))) && ((this.name==null && other.getName()==null) || (this.name!=null && this.name.equals(other.getName()))) && ((this.namespace==null && other.getNamespace()==null) || (this.namespace!=null && this.namespace.equals(other.getNamespace()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getId() != null) { _hashCode += getId().hashCode(); } if (getMessage() != null) { _hashCode += getMessage().hashCode(); } if (getName() != null) { _hashCode += getName().hashCode(); } if (getNamespace() != null) { _hashCode += getNamespace().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(CodeCoverageWarning.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "CodeCoverageWarning")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("id"); elemField.setXmlName(new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "id")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("message"); elemField.setXmlName(new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "message")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("name"); elemField.setXmlName(new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "name")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(true); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("namespace"); elemField.setXmlName(new javax.xml.namespace.QName("http://soap.sforce.com/2006/08/apex", "namespace")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(true); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "wayne@heyabbott.net" ]
wayne@heyabbott.net
94bda6a7c1ee91ca4ed162907e16f271235ce8b7
c40efb977101232d91e99af0b78778bad3e0950a
/game_server/src/com/hifun/soul/gameserver/mars/battle/MarsPVPBattleCallback.java
d570a1ce7d4679117e4d094f8714daccce0966e2
[]
no_license
cietwwl/server
2bca79a17be6d5e6fee65e57d0df1fc753fb35e3
d18804f8c182eaa2509666aec10a2212ababc13c
refs/heads/master
2020-06-14T15:12:16.679591
2014-11-19T14:48:04
2014-11-19T14:48:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,563
java
package com.hifun.soul.gameserver.mars.battle; import com.hifun.soul.common.LogReasons.HonourLogReason; import com.hifun.soul.common.constants.LangConstants; import com.hifun.soul.gameserver.battle.BattleType; import com.hifun.soul.gameserver.battle.IBattleUnit; import com.hifun.soul.gameserver.battle.callback.ClientGameSceneType; import com.hifun.soul.gameserver.battle.callback.PVPBattleCallback; import com.hifun.soul.gameserver.battle.msg.GCExitBattle; import com.hifun.soul.gameserver.battle.msg.GCJoinBattleRequest; import com.hifun.soul.gameserver.common.GameServerAssist; import com.hifun.soul.gameserver.human.Human; import com.hifun.soul.gameserver.mars.template.MarsBattleRewardTemplate; public class MarsPVPBattleCallback extends PVPBattleCallback { private Human human; private int roomType; private int multiple; private boolean isAgree; public MarsPVPBattleCallback(Human challenger, int roomType, int multiple) { super(challenger); this.human = challenger; this.roomType = roomType; this.multiple = multiple; } @Override public void onChallengerWin(Human challenger, IBattleUnit beChallenged) { // 我方胜利,对方接受失败奖励 if (isAgree) { Human beChallHuman = GameServerAssist.getGameWorld() .getSceneHumanManager() .getHumanByGuid(beChallenged.getUnitGuid()); if (beChallHuman != null && beChallHuman.getHumanMarsManager() .getRemainAcceptRewardNum() > 0) { MarsBattleRewardTemplate template = GameServerAssist .getMarsTemplateManager().getMarsBattleRewardTemplate( beChallHuman.getLevel()); int rewardHonor = template.getAcceptLoseHonor(); beChallHuman.addArenaHonor(rewardHonor, true, HonourLogReason.MARS, ""); // 更改接受挑战奖励次数 beChallHuman.setMarsAcceptRewardNum(beChallHuman .getMarsAcceptRewardNum() + 1); } } human.getHumanMarsManager().killCallBack(roomType, true, multiple); } @Override public void onChallengerLose(Human challenger, IBattleUnit beChallenged) { // 我方失败,对方接受胜利奖励 if (isAgree) { Human beChallHuman = GameServerAssist.getGameWorld() .getSceneHumanManager() .getHumanByGuid(beChallenged.getUnitGuid()); if (beChallHuman != null) { MarsBattleRewardTemplate template = GameServerAssist .getMarsTemplateManager().getMarsBattleRewardTemplate( beChallHuman.getLevel()); int rewardHonor = template.getAcceptWinHonor(); beChallHuman.addArenaHonor(rewardHonor, true, HonourLogReason.MARS, ""); // 更改接受挑战奖励次数 beChallHuman.setMarsAcceptRewardNum(beChallHuman .getMarsAcceptRewardNum() + 1); } } human.getHumanMarsManager().killCallBack(roomType, false, multiple); } @Override public BattleType getBattleType() { return BattleType.PVP_MARS_BATTLE; } @Override protected void setExitToSceneType(GCExitBattle exitBattle) { exitBattle.setGameSceneType(ClientGameSceneType.MARS_VIEW.getIndex()); } @Override public void beforeBattleStart(Human challenger, IBattleUnit beChallenged) { } @Override public void sendJoinBattleRequest(Human beChallenge) { GCJoinBattleRequest requestBattle = new GCJoinBattleRequest(); requestBattle.setChallengerGuid(challenger.getHumanGuid()); requestBattle.setChallengerName(challenger.getName()); requestBattle.setContent(GameServerAssist.getSysLangService().read( LangConstants.MARS_BATTLE)); beChallenge.sendMessage(requestBattle); } public void setIsAgree(boolean isAgree) { this.isAgree = isAgree; } }
[ "magicstoneljg@163.com" ]
magicstoneljg@163.com
1b3122d2eaeb247779f0365134697dcf5dfd7eb3
72367a32b26a439770f024a5a1dbe5bd0a1aa505
/getting-started-with-cucumber-selenium/src/test/java/com/softhinkers/pages/FooterPage.java
7da988b69fff16100a8f0f663aaddd492d076d56
[]
no_license
SwatiMaurya08/getting-started-with-automated-tests
1d945500bbe3d34b6d16e008227ad29463738b45
0ba1db10706a1b3b36d6dafd9e5f5493804aa66b
refs/heads/main
2023-03-23T08:59:45.588235
2021-03-17T11:19:42
2021-03-17T11:19:42
303,742,880
0
0
null
null
null
null
UTF-8
Java
false
false
650
java
package com.softhinkers.pages; import com.softhinkers.common.BaseTest; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; /** * @author Swati Maurya * @company Softhinkers * @package com.softhinkers.pages * @date 1/6/2021 */ public class FooterPage { private final String footerXpath = "//p/b"; public FooterPage(WebDriver driver){ PageFactory.initElements(driver,this); } @FindBy(xpath = footerXpath) WebElement footer; public String getFooter(){ return footer.getText(); } }
[ "swatimaurya704@gmail.com" ]
swatimaurya704@gmail.com
367820ad9508906142b426a6c15dfb53ac74b77d
4cd87b74f3c87c6aea4785d721cb97949535ab0e
/src/test/java/com/talk2amareswaran/projects/samlapp/SamlappApplicationTests.java
68cd19699828bc55d5f04b73cffaae06eacc70f9
[]
no_license
delbert-inmind/SAML_OKTA_test
4ea1d86b890dc9c7bcaf6efe0cf51e02dc2428bc
c5aeca9e678ed97bf9e2dc1782975f510f4ac984
refs/heads/master
2023-01-06T14:56:03.702239
2020-11-03T01:53:26
2020-11-03T01:53:26
309,542,590
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
package com.talk2amareswaran.projects.samlapp; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SamlappApplicationTests { @Test public void contextLoads() { } }
[ "delbert.felix@inmindcloud.com" ]
delbert.felix@inmindcloud.com
429d0aacf61e493efc1e18ae48846ff1013da524
ec861757329fe88a7da428049da9a4c10ab3004e
/src/decorator/Demo.java
b61fcbee617210d44a7b52997717585b4318207b
[]
no_license
Arokia-Bhavya/DesignPattern
ddd4cee595d2de022dbab1e308107402c9511f73
51f5b93e91427377eb1d1889338e9a9c6bcbfb37
refs/heads/main
2023-08-11T05:17:16.504862
2021-09-15T03:04:21
2021-09-15T03:04:21
405,314,487
0
0
null
null
null
null
UTF-8
Java
false
false
319
java
package decorator; public class Demo { public static void main(String[] args) { Report report=new PortfolioReport(new BasicReport()); report.stitchContents(); Report PortfolioPerfomanceReport=new PerformanceReport(new PortfolioReport(new BasicReport())); PortfolioPerfomanceReport.stitchContents(); } }
[ "arokia.bhavya@gmail.com" ]
arokia.bhavya@gmail.com
8b831869cd2d50e5745a5e8371d9936b9139e47c
dd45aadaf83c72c1122f3e9059c025a225403ad1
/atrs-web/src/main/java/jp/co/ntt/atrs/app/c0/IMemberForm.java
bf4f8a828b27a10ae944b4a959c70229ff7c1468
[]
no_license
uki-tanaka/atrs-thymeleaf
45d910101b6809572a12bc2cfc525658f48c3707
f896ae23ea39e798a5dc6da7d49c50dbfb735031
refs/heads/master
2023-01-08T16:25:59.018422
2020-11-09T04:10:19
2020-11-09T04:10:19
263,537,332
0
1
null
2020-05-13T05:50:04
2020-05-13T05:50:04
null
UTF-8
Java
false
false
2,324
java
/* * Copyright(c) 2015 NTT Corporation. * * 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 jp.co.ntt.atrs.app.c0; import java.util.Date; /** * 会員情報フォームインタフェース。 * 共通入力値チェック、共通Bean変換処理で使用するメソッドを定義する。 * * @author NTT 電電花子 * @see MemberValidator#validate(Object, org.springframework.validation.Errors) * @see MemberHelper#toMember(IMemberForm) */ public interface IMemberForm { /** * 生年月日を取得する。 * * @return 生年月日 */ Date getDateOfBirth(); /** * 電話番号1を取得する。 * * @return 電話番号1 */ String getTel1(); /** * 電話番号2を取得する。 * * @return 電話番号2 */ String getTel2(); /** * 電話番号3を取得する。 * * @return 電話番号3 */ String getTel3(); /** * 郵便番号1を取得する。 * * @return 郵便番号1 */ String getZipCode1(); /** * 郵便番号2を取得する。 * * @return 郵便番号2 */ String getZipCode2(); /** * Eメールを取得する。 * * @return Eメール */ String getMail(); /** * Eメール再入力を取得する。 * * @return Eメール再入力 */ String getReEnterMail(); /** * クレジットカード有効期限(月)を取得する。 * * @return クレジットカード有効期限(月) */ String getCreditMonth(); /** * クレジットカード有効期限(年)を取得する。 * * @return クレジットカード有効期限(年) */ String getCreditYear(); }
[ "macchinetta.fw@gmail.com" ]
macchinetta.fw@gmail.com
8b0061be71dec836c3790cbf6dfd8b957acef4f0
6e498099b6858eae14bf3959255be9ea1856f862
/src/com/facebook/buck/core/artifact/SourceArtifactImpl.java
dc26918419edc29093952095a907bdabca8ac485
[ "Apache-2.0" ]
permissive
Bonnie1312/buck
2dcfb0791637db675b495b3d27e75998a7a77797
3cf76f426b1d2ab11b9b3d43fd574818e525c3da
refs/heads/master
2020-06-11T13:29:48.660073
2019-06-26T19:59:32
2019-06-26T21:06:24
193,979,660
2
0
Apache-2.0
2019-09-22T07:23:56
2019-06-26T21:24:33
Java
UTF-8
Java
false
false
1,368
java
/* * Copyright 2019-present Facebook, 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.facebook.buck.core.artifact; import com.facebook.buck.core.sourcepath.PathSourcePath; import javax.annotation.Nullable; import org.immutables.value.Value; /** An artifact representing a source file */ @Value.Immutable(builder = false, copy = false, prehash = true) public abstract class SourceArtifactImpl extends AbstractArtifact implements SourceArtifact, BoundArtifact { @Override public final boolean isBound() { return true; } /** @return the path to the source file */ @Override @Value.Parameter public abstract PathSourcePath getSourcePath(); @Nullable @Override public SourceArtifact asSource() { return this; } @Nullable @Override public BuildArtifact asBuildArtifact() { return null; } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
0b2a03088613ab2a41cb15954c3c2a7a51cd65d7
5a035467b938b9b3bf5186a7124f032797968a5c
/src/com/cafe24/paint/shape/Triangle.java
0666b07cb1a7e54d05f6d62101e487a07e7973e2
[]
no_license
Googleok/Java-oop
ae650b8ddbeb6899736bda7c019c24e0935586a3
4a5209e588824b7042344bb32d3d3d8a6a47a186
refs/heads/master
2020-05-21T05:38:03.295351
2019-05-21T00:05:46
2019-05-21T00:05:46
185,926,527
0
0
null
null
null
null
UTF-8
Java
false
false
389
java
package com.cafe24.paint.shape; public class Triangle extends Shape{ private int x1; private int x2; private int x3; private int y1; private int y2; private int y3; @Override public void draw() { System.out.println("삼각형을 그렸습니다."); } @Override public float calcArea() { // TODO Auto-generated method stub return 0.0f; } }
[ "qkrwhddjr3@gmail.com" ]
qkrwhddjr3@gmail.com
be1a3094e560afea805e6516d538bc02397a31f5
c696802e374fbc1f517070cd07ee03016dba65b5
/app/build/generated/source/r/debug/android/support/v7/recyclerview/R.java
53cb80045cfb539f9f5e1b6c3fcbafb8b5254ef3
[]
no_license
gmanchanda31/108hackathon
0cd00b287b7b6c4b78d7788d48123979c83d2b2a
314d1ea55264722b116cf6b63296f4188a6a8b7d
refs/heads/master
2020-06-15T15:03:53.766379
2017-05-28T07:12:37
2017-05-28T07:12:37
75,285,208
0
0
null
null
null
null
UTF-8
Java
false
false
1,421
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.recyclerview; public final class R { public static final class attr { public static final int layoutManager = 0x7f010144; public static final int reverseLayout = 0x7f010146; public static final int spanCount = 0x7f010145; public static final int stackFromEnd = 0x7f010147; } public static final class dimen { public static final int item_touch_helper_max_drag_scroll_per_frame = 0x7f0900a0; public static final int item_touch_helper_swipe_escape_max_velocity = 0x7f0900a1; public static final int item_touch_helper_swipe_escape_velocity = 0x7f0900a2; } public static final class id { public static final int item_touch_helper_previous_elevation = 0x7f0f0013; } public static final class styleable { public static final int[] RecyclerView = { 0x010100c4, 0x010100f1, 0x7f010144, 0x7f010145, 0x7f010146, 0x7f010147 }; public static final int RecyclerView_android_descendantFocusability = 1; public static final int RecyclerView_android_orientation = 0; public static final int RecyclerView_layoutManager = 2; public static final int RecyclerView_reverseLayout = 4; public static final int RecyclerView_spanCount = 3; public static final int RecyclerView_stackFromEnd = 5; } }
[ "gouravmanchanda28@gmail.com" ]
gouravmanchanda28@gmail.com
ad8af38448962e6e8b88e8ac36d21242a275d819
df034666b447e0c2fdb3794a180d7dd9cd871a5a
/src/main/java/dev/kurt/services/EmployeeService.java
109253cc1839986283e68f6a71bb3341c8d3ce21
[]
no_license
kurtdnyc/ers
81a7c73334bcc9877397a7f387ce0d7f0ebbb0ba
54de86e70d09b3659e4a0a70a6975ab5812473ef
refs/heads/main
2022-12-23T02:24:49.034982
2020-10-08T03:24:20
2020-10-08T03:24:20
302,215,051
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
package dev.kurt.services; import java.util.List; import dev.kurt.entities.Employee; import dev.kurt.entities.Manager; import dev.kurt.entities.Reimbursement; public interface EmployeeService { Employee createEmployee(Employee employee); Employee getEmployeeById(int id); Employee getEmployeeByLogin(String user, String pass); List<Employee> getAllEmployees(); List<Employee> getEmployeesByManager(Manager manager); Employee updateEmployee(Employee employee); Employee addReimbursementToEmployee(Employee employee, Reimbursement reimbursement); boolean deleteEmployee(Employee employee); }
[ "kurtmdawiec@gmail.com" ]
kurtmdawiec@gmail.com
b18a7f452f31f849ec85a87413e04eac2524cc8f
a226f679ad838986485a31d59385a650eb1c026e
/src/main/java/com/red/thread/UserInfoThread.java
69e0dbb2e0602635f946cf771b1ef1311e3b3ce3
[]
no_license
TongMajestic/my-code
f1065009c2bc1e0d8538750f2aa04109d645351f
edf55c7ef8c077e848457ea4ff4d7e6a42dfc265
refs/heads/master
2021-01-19T05:03:27.415608
2017-05-19T01:57:56
2017-05-19T01:57:56
86,780,121
0
0
null
2017-03-31T05:08:26
2017-03-31T05:08:26
null
UTF-8
Java
false
false
1,244
java
package com.red.thread; import com.red.util.DataUtil; import com.red.util.OperUtil; import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; public class UserInfoThread { ScheduledExecutorService schedule = Executors.newSingleThreadScheduledExecutor(); private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public void execute() { //延迟10秒执行,每60分钟执行一次 schedule.scheduleAtFixedRate(new Runnable() { @Override public void run() { try { String userId = DataUtil.USER_TOKEN.get(0); String token = DataUtil.USER_TOKEN.get(1); int amount = OperUtil.getUserInfo(userId, token); System.out.println(sdf.format(new Date()) + " " + userId + " has money: " + amount / 1000); } catch (Exception e) { System.out.println(" UserResidualExecutor error !"); e.printStackTrace(); } } }, 10, 60 * 60, TimeUnit.SECONDS); } }
[ "838103910@qq.com" ]
838103910@qq.com
333532b6cd3a687ab1fb27fac2f40db9ebff1a8d
818ec7f3d2df094d8133ce72c1d4e39b6b7beeed
/app/src/main/java/com/flys/dao/service/MyAuthInterceptor.java
04a2ca805cb0ff122544e84b84572596e02cbe4e
[ "MIT" ]
permissive
amadoubakari/G-Learning
d6afc3ecf45dce48d3567086019b9a539f512da9
3e5d50732d450ec49fabb86d7058d94f047b79a3
refs/heads/master
2021-12-04T15:44:19.381659
2021-11-22T05:35:42
2021-11-22T05:35:42
216,851,351
2
0
null
null
null
null
UTF-8
Java
false
false
1,355
java
package com.flys.dao.service; import org.androidannotations.annotations.EBean; import org.springframework.http.HttpAuthentication; import org.springframework.http.HttpBasicAuthentication; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpRequest; import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.ClientHttpResponse; import java.io.IOException; @EBean(scope = EBean.Scope.Singleton) public class MyAuthInterceptor implements ClientHttpRequestInterceptor { // utilisateur private String user; // mot de passe private String mdp; public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { // entêtes HTTP de la requête HTTP interceptée HttpHeaders headers = request.getHeaders(); // l'entête HTTP d'authentification basique HttpAuthentication auth = new HttpBasicAuthentication(user, mdp); // ajout aux entêtes HTTP headers.setAuthorization(auth); // on continue le cycle de vie de la requête HTTP return execution.execute(request, body); } // éléments de l'authentification public void setUser(String user, String mdp) { this.user = user; this.mdp = mdp; } }
[ "amadou_bakari@yahoo.fr" ]
amadou_bakari@yahoo.fr
646dca5079c732605f1863bb363cd8df6e6f32d8
ce3c2867390ad938e8a19033f756bcde4feec537
/produban-util/src/main/java/com/produban/util/JsonUtil.java
d03731452f5f2af9c9893a376f77ff9beca65a2d
[]
no_license
guillermoortiz/akamai
f6e0e4569ff271c99603fb60bca85c6623b9ebe3
9b140c90dba4276ac8aff7565996de8ab0525deb
refs/heads/master
2020-04-13T03:30:02.939550
2015-05-07T10:55:20
2015-05-07T10:55:20
30,352,152
1
0
null
null
null
null
UTF-8
Java
false
false
1,662
java
package com.produban.util; import java.io.ByteArrayInputStream; import java.io.IOException; import org.apache.log4j.Logger; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.ObjectWriter; import com.produban.util.exception.ProdubanException; /** * Utility class for JSON purpouses. */ public final class JsonUtil { private static final Logger LOG = Logger.getLogger(JsonUtil.class); /** * Constructor class. */ private JsonUtil() { } /** * Instance of Jackson class to parse and format objects to JSON. */ private static ObjectMapper om = new ObjectMapper(); /** * Decode an object from his JSON representation. * * @param <T> * Class of the Object to parse. * * @param aObject * byte[] with the JSON representation of the object. * @param clazz * Class of the object represented. * @return Object Object decoded. */ public static <T> T read(final byte[] aObject, final Class<T> clazz) { T oObject; try { ByteArrayInputStream bis = new ByteArrayInputStream(aObject); oObject = om.readValue(bis, clazz); LOG.debug("Object read"); } catch (IOException ex) { throw new ProdubanException("Error transforming Json to object", ex); } return oObject; } public static String write(final Object aObject) { String json; try { ObjectWriter ow = new ObjectMapper().writer() .withDefaultPrettyPrinter(); json = ow.writeValueAsString(aObject); LOG.debug("Object parsed, json is: " + json); } catch (IOException ex) { throw new ProdubanException("Error transforming object to String", ex); } return json; } }
[ "guillermo.ortiz.fdez@gmail.com" ]
guillermo.ortiz.fdez@gmail.com
e1e23db098c1fe4391f43517f5294af35c1d70a7
2ad48d386ecad30b1248ee6441aad958abf64009
/zz.utils/src/zz/utils/properties/SimpleProperty.java
348a5e0a8e2fffe6f5e6da368ca609fe831c09b3
[]
no_license
Bhlowe/tod
77b64d770974e941e316dd501444a2a4dcbad730
6f54415c667e14a0df6bb7035650de310afcc616
refs/heads/master
2020-03-15T13:18:13.472873
2018-05-09T03:22:26
2018-05-09T03:22:26
132,163,302
0
0
null
null
null
null
UTF-8
Java
false
false
1,886
java
/* * Created on Nov 15, 2004 */ package zz.utils.properties; import java.util.Set; /** * Default implementation of {@link zz.utils.properties.IProperty} for simple values. * @author gpothier */ public class SimpleProperty<T> extends AbstractProperty<T> implements IProperty<T> { /** * The actual value of the property */ private T itsValue; public SimpleProperty() { } public SimpleProperty(T aValue) { itsValue = aValue; } /** * Standard getter for this property. */ public T get() { return get0(); } /** * Internal getter for the property. */ protected final T get0() { addToDeps(); return itsValue; } /** * Indicates if two values are equal. */ protected boolean equalValues(T aValue1, T aValue2) { return aValue1 == aValue2; } /** * Sets the property's value without firing listeners. */ protected final T set0(T aValue) { return set0(aValue, true); } /** * Internal setter for the property. * It first checks if a veto rejects the new value. If not, it * sets the current value and fires notifications. * @param aValue The new value of the property. */ protected final T set0(T aValue, boolean aNotify) { if (aNotify) { T theOldValue = get0(); if (equalValues(theOldValue, aValue)) return aValue; Object theCanChange = canChangeProperty(theOldValue, aValue); if (theCanChange == REJECT) return theOldValue; if (theCanChange != ACCEPT) { aValue = (T) theCanChange; if (equalValues(theOldValue, aValue)) return aValue; } // if (itsValue != null) ObservationCenter.getInstance().unregisterListener(itsValue, this); itsValue = aValue; // if (itsValue != null) ObservationCenter.getInstance().registerListener(itsValue, this); firePropertyChanged(theOldValue, aValue); } else { itsValue = aValue; } return itsValue; } }
[ "bhlowe@gmail.com" ]
bhlowe@gmail.com
9bd9dd8e1c37caa9ef4c99d98192f7602607f7f3
2b42d557602aa5ed6f1c74f95b7c4cb63b3c2fae
/Q27.java
f4acbd0c2696811d58257ed7255e727a620cda7f
[]
no_license
ugur716/assigment10
364b507d372c7a66cc87f20993158ac85bba65c5
f184346a0ade6e9c38d600cf34c199ff15c89d4b
refs/heads/main
2023-04-13T12:19:08.723743
2021-04-29T00:31:33
2021-04-29T00:31:33
362,638,795
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package assigment10; public class Q27 { public static void main(String[] args) { String word = "Certified Wooden Spoon"; String cover = "o"; System.out.println(coverString(word, cover)); } public static String coverString(String word, String cover) { String result = ""; int counter = 0; for (int i = 0; i <= word.length() - cover.length(); i++) { if (word.substring(i, i + cover.length()).equals(cover)) { result += word.replace(word.substring(i, i + cover.length()), "[" + cover + "]"); counter++; break; } } if (counter == 0) { result = "[" + word + "]"; } return result; } }
[ "noreply@github.com" ]
ugur716.noreply@github.com
401eaebc31f84e656b6c9720aa00a9c81fdbf41b
d531fc55b08a0cd0f71ff9b831cfcc50d26d4e15
/gen/main/java/org/hl7/fhir/NamingSystemIdentifierType.java
f28466de2820e63bef96057fb36d12f87aa3c2ce
[]
no_license
threadedblue/fhir.emf
f2abc3d0ccce6dcd5372874bf1664113d77d3fad
82231e9ce9ec559013b9dc242766b0f5b4efde13
refs/heads/master
2021-12-04T08:42:31.542708
2021-08-31T14:55:13
2021-08-31T14:55:13
104,352,691
0
0
null
null
null
null
UTF-8
Java
false
false
2,604
java
/** */ package org.hl7.fhir; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Naming System Identifier Type</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * Identifies the style of unique identifier used to identify a namespace. * If the element is present, it must have either a @value, an @id, or extensions * <!-- end-model-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.hl7.fhir.NamingSystemIdentifierType#getValue <em>Value</em>}</li> * </ul> * * @see org.hl7.fhir.FhirPackage#getNamingSystemIdentifierType() * @model extendedMetaData="name='NamingSystemIdentifierType' kind='elementOnly'" * @generated */ public interface NamingSystemIdentifierType extends Element { /** * Returns the value of the '<em><b>Value</b></em>' attribute. * The literals are from the enumeration {@link org.hl7.fhir.NamingSystemIdentifierTypeList}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Value</em>' attribute. * @see org.hl7.fhir.NamingSystemIdentifierTypeList * @see #isSetValue() * @see #unsetValue() * @see #setValue(NamingSystemIdentifierTypeList) * @see org.hl7.fhir.FhirPackage#getNamingSystemIdentifierType_Value() * @model unsettable="true" * extendedMetaData="kind='attribute' name='value'" * @generated */ NamingSystemIdentifierTypeList getValue(); /** * Sets the value of the '{@link org.hl7.fhir.NamingSystemIdentifierType#getValue <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Value</em>' attribute. * @see org.hl7.fhir.NamingSystemIdentifierTypeList * @see #isSetValue() * @see #unsetValue() * @see #getValue() * @generated */ void setValue(NamingSystemIdentifierTypeList value); /** * Unsets the value of the '{@link org.hl7.fhir.NamingSystemIdentifierType#getValue <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetValue() * @see #getValue() * @see #setValue(NamingSystemIdentifierTypeList) * @generated */ void unsetValue(); /** * Returns whether the value of the '{@link org.hl7.fhir.NamingSystemIdentifierType#getValue <em>Value</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Value</em>' attribute is set. * @see #unsetValue() * @see #getValue() * @see #setValue(NamingSystemIdentifierTypeList) * @generated */ boolean isSetValue(); } // NamingSystemIdentifierType
[ "roberts_geoffry@bah.com" ]
roberts_geoffry@bah.com
2bf44ce9bda9f23aabb8eace2a23643ea9060a40
07866509ed072ded5d735f629023bf18bcec4e4b
/src/main/java/site/luoyu/SessionUtil.java
3a81dc8b0c3d5878800dcf1a96f3c940b0b125a4
[]
no_license
LuoYuWuSheng/Hibernate-Learn
83e1bd00cefcf546b87da3f56767fa60b7bbea82
8558f444d41d1a2eb04f52b70d27d313280bbc67
refs/heads/master
2021-01-11T04:12:24.501269
2017-08-01T00:48:29
2017-08-01T00:48:29
71,207,568
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
package site.luoyu; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistry; import org.hibernate.service.ServiceRegistryBuilder; /** * Computer user xd * Created by 张洋 on 2017/1/18. */ public class SessionUtil { private static final SessionFactory ourSessionFactory; private static final ServiceRegistry serviceRegistry; static { try { Configuration configuration = new Configuration(); configuration.configure(); serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry(); ourSessionFactory = configuration.buildSessionFactory(serviceRegistry); } catch (Throwable ex) { throw new ExceptionInInitializerError(ex); } } public static Session getSession() throws HibernateException { return ourSessionFactory.openSession(); } }
[ "z_y_ang@163.com" ]
z_y_ang@163.com
9f2b729b796c9394056df33ab58caf9bd778f830
3545c76b1751b7c9273f6e4a04f6278f736310f2
/src/main/java/antlrparsers/c/CListener.java
1fcba18126e71bac0401bb6c744bdcc87c340cfb
[]
no_license
pombredanne/plagiarism-detector-2
cfcc7c7dda2b887ecd9c6b1dfcf33cedd90964c4
d6363ea14b116cc057417547c27267a9ccd623dd
refs/heads/master
2022-02-13T05:47:44.512346
2019-03-31T02:08:03
2019-03-31T02:08:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
30,734
java
package antlrparsers.c; // Generated from C.g4 by ANTLR 4.6 import org.antlr.v4.runtime.tree.ParseTreeListener; /** * This interface defines a complete listener for a parse tree produced by * {@link CParser}. */ public interface CListener extends ParseTreeListener { /** * Enter a parse tree produced by {@link CParser#primaryExpression}. * @param ctx the parse tree */ void enterPrimaryExpression(CParser.PrimaryExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#primaryExpression}. * @param ctx the parse tree */ void exitPrimaryExpression(CParser.PrimaryExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#genericSelection}. * @param ctx the parse tree */ void enterGenericSelection(CParser.GenericSelectionContext ctx); /** * Exit a parse tree produced by {@link CParser#genericSelection}. * @param ctx the parse tree */ void exitGenericSelection(CParser.GenericSelectionContext ctx); /** * Enter a parse tree produced by {@link CParser#genericAssocList}. * @param ctx the parse tree */ void enterGenericAssocList(CParser.GenericAssocListContext ctx); /** * Exit a parse tree produced by {@link CParser#genericAssocList}. * @param ctx the parse tree */ void exitGenericAssocList(CParser.GenericAssocListContext ctx); /** * Enter a parse tree produced by {@link CParser#genericAssociation}. * @param ctx the parse tree */ void enterGenericAssociation(CParser.GenericAssociationContext ctx); /** * Exit a parse tree produced by {@link CParser#genericAssociation}. * @param ctx the parse tree */ void exitGenericAssociation(CParser.GenericAssociationContext ctx); /** * Enter a parse tree produced by {@link CParser#postfixExpression}. * @param ctx the parse tree */ void enterPostfixExpression(CParser.PostfixExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#postfixExpression}. * @param ctx the parse tree */ void exitPostfixExpression(CParser.PostfixExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#argumentExpressionList}. * @param ctx the parse tree */ void enterArgumentExpressionList(CParser.ArgumentExpressionListContext ctx); /** * Exit a parse tree produced by {@link CParser#argumentExpressionList}. * @param ctx the parse tree */ void exitArgumentExpressionList(CParser.ArgumentExpressionListContext ctx); /** * Enter a parse tree produced by {@link CParser#unaryExpression}. * @param ctx the parse tree */ void enterUnaryExpression(CParser.UnaryExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#unaryExpression}. * @param ctx the parse tree */ void exitUnaryExpression(CParser.UnaryExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#unaryOperator}. * @param ctx the parse tree */ void enterUnaryOperator(CParser.UnaryOperatorContext ctx); /** * Exit a parse tree produced by {@link CParser#unaryOperator}. * @param ctx the parse tree */ void exitUnaryOperator(CParser.UnaryOperatorContext ctx); /** * Enter a parse tree produced by {@link CParser#castExpression}. * @param ctx the parse tree */ void enterCastExpression(CParser.CastExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#castExpression}. * @param ctx the parse tree */ void exitCastExpression(CParser.CastExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#multiplicativeExpression}. * @param ctx the parse tree */ void enterMultiplicativeExpression(CParser.MultiplicativeExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#multiplicativeExpression}. * @param ctx the parse tree */ void exitMultiplicativeExpression(CParser.MultiplicativeExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#additiveExpression}. * @param ctx the parse tree */ void enterAdditiveExpression(CParser.AdditiveExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#additiveExpression}. * @param ctx the parse tree */ void exitAdditiveExpression(CParser.AdditiveExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#shiftExpression}. * @param ctx the parse tree */ void enterShiftExpression(CParser.ShiftExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#shiftExpression}. * @param ctx the parse tree */ void exitShiftExpression(CParser.ShiftExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#relationalExpression}. * @param ctx the parse tree */ void enterRelationalExpression(CParser.RelationalExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#relationalExpression}. * @param ctx the parse tree */ void exitRelationalExpression(CParser.RelationalExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#equalityExpression}. * @param ctx the parse tree */ void enterEqualityExpression(CParser.EqualityExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#equalityExpression}. * @param ctx the parse tree */ void exitEqualityExpression(CParser.EqualityExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#andExpression}. * @param ctx the parse tree */ void enterAndExpression(CParser.AndExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#andExpression}. * @param ctx the parse tree */ void exitAndExpression(CParser.AndExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#exclusiveOrExpression}. * @param ctx the parse tree */ void enterExclusiveOrExpression(CParser.ExclusiveOrExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#exclusiveOrExpression}. * @param ctx the parse tree */ void exitExclusiveOrExpression(CParser.ExclusiveOrExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#inclusiveOrExpression}. * @param ctx the parse tree */ void enterInclusiveOrExpression(CParser.InclusiveOrExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#inclusiveOrExpression}. * @param ctx the parse tree */ void exitInclusiveOrExpression(CParser.InclusiveOrExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#logicalAndExpression}. * @param ctx the parse tree */ void enterLogicalAndExpression(CParser.LogicalAndExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#logicalAndExpression}. * @param ctx the parse tree */ void exitLogicalAndExpression(CParser.LogicalAndExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#logicalOrExpression}. * @param ctx the parse tree */ void enterLogicalOrExpression(CParser.LogicalOrExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#logicalOrExpression}. * @param ctx the parse tree */ void exitLogicalOrExpression(CParser.LogicalOrExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#conditionalExpression}. * @param ctx the parse tree */ void enterConditionalExpression(CParser.ConditionalExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#conditionalExpression}. * @param ctx the parse tree */ void exitConditionalExpression(CParser.ConditionalExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#assignmentExpression}. * @param ctx the parse tree */ void enterAssignmentExpression(CParser.AssignmentExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#assignmentExpression}. * @param ctx the parse tree */ void exitAssignmentExpression(CParser.AssignmentExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#assignmentOperator}. * @param ctx the parse tree */ void enterAssignmentOperator(CParser.AssignmentOperatorContext ctx); /** * Exit a parse tree produced by {@link CParser#assignmentOperator}. * @param ctx the parse tree */ void exitAssignmentOperator(CParser.AssignmentOperatorContext ctx); /** * Enter a parse tree produced by {@link CParser#expression}. * @param ctx the parse tree */ void enterExpression(CParser.ExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#expression}. * @param ctx the parse tree */ void exitExpression(CParser.ExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#constantExpression}. * @param ctx the parse tree */ void enterConstantExpression(CParser.ConstantExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#constantExpression}. * @param ctx the parse tree */ void exitConstantExpression(CParser.ConstantExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#declaration}. * @param ctx the parse tree */ void enterDeclaration(CParser.DeclarationContext ctx); /** * Exit a parse tree produced by {@link CParser#declaration}. * @param ctx the parse tree */ void exitDeclaration(CParser.DeclarationContext ctx); /** * Enter a parse tree produced by {@link CParser#declarationSpecifiers}. * @param ctx the parse tree */ void enterDeclarationSpecifiers(CParser.DeclarationSpecifiersContext ctx); /** * Exit a parse tree produced by {@link CParser#declarationSpecifiers}. * @param ctx the parse tree */ void exitDeclarationSpecifiers(CParser.DeclarationSpecifiersContext ctx); /** * Enter a parse tree produced by {@link CParser#declarationSpecifiers2}. * @param ctx the parse tree */ void enterDeclarationSpecifiers2(CParser.DeclarationSpecifiers2Context ctx); /** * Exit a parse tree produced by {@link CParser#declarationSpecifiers2}. * @param ctx the parse tree */ void exitDeclarationSpecifiers2(CParser.DeclarationSpecifiers2Context ctx); /** * Enter a parse tree produced by {@link CParser#declarationSpecifier}. * @param ctx the parse tree */ void enterDeclarationSpecifier(CParser.DeclarationSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#declarationSpecifier}. * @param ctx the parse tree */ void exitDeclarationSpecifier(CParser.DeclarationSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#initDeclaratorList}. * @param ctx the parse tree */ void enterInitDeclaratorList(CParser.InitDeclaratorListContext ctx); /** * Exit a parse tree produced by {@link CParser#initDeclaratorList}. * @param ctx the parse tree */ void exitInitDeclaratorList(CParser.InitDeclaratorListContext ctx); /** * Enter a parse tree produced by {@link CParser#initDeclarator}. * @param ctx the parse tree */ void enterInitDeclarator(CParser.InitDeclaratorContext ctx); /** * Exit a parse tree produced by {@link CParser#initDeclarator}. * @param ctx the parse tree */ void exitInitDeclarator(CParser.InitDeclaratorContext ctx); /** * Enter a parse tree produced by {@link CParser#storageClassSpecifier}. * @param ctx the parse tree */ void enterStorageClassSpecifier(CParser.StorageClassSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#storageClassSpecifier}. * @param ctx the parse tree */ void exitStorageClassSpecifier(CParser.StorageClassSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#typeSpecifier}. * @param ctx the parse tree */ void enterTypeSpecifier(CParser.TypeSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#typeSpecifier}. * @param ctx the parse tree */ void exitTypeSpecifier(CParser.TypeSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#structOrUnionSpecifier}. * @param ctx the parse tree */ void enterStructOrUnionSpecifier(CParser.StructOrUnionSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#structOrUnionSpecifier}. * @param ctx the parse tree */ void exitStructOrUnionSpecifier(CParser.StructOrUnionSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#structOrUnion}. * @param ctx the parse tree */ void enterStructOrUnion(CParser.StructOrUnionContext ctx); /** * Exit a parse tree produced by {@link CParser#structOrUnion}. * @param ctx the parse tree */ void exitStructOrUnion(CParser.StructOrUnionContext ctx); /** * Enter a parse tree produced by {@link CParser#structDeclarationList}. * @param ctx the parse tree */ void enterStructDeclarationList(CParser.StructDeclarationListContext ctx); /** * Exit a parse tree produced by {@link CParser#structDeclarationList}. * @param ctx the parse tree */ void exitStructDeclarationList(CParser.StructDeclarationListContext ctx); /** * Enter a parse tree produced by {@link CParser#structDeclaration}. * @param ctx the parse tree */ void enterStructDeclaration(CParser.StructDeclarationContext ctx); /** * Exit a parse tree produced by {@link CParser#structDeclaration}. * @param ctx the parse tree */ void exitStructDeclaration(CParser.StructDeclarationContext ctx); /** * Enter a parse tree produced by {@link CParser#specifierQualifierList}. * @param ctx the parse tree */ void enterSpecifierQualifierList(CParser.SpecifierQualifierListContext ctx); /** * Exit a parse tree produced by {@link CParser#specifierQualifierList}. * @param ctx the parse tree */ void exitSpecifierQualifierList(CParser.SpecifierQualifierListContext ctx); /** * Enter a parse tree produced by {@link CParser#structDeclaratorList}. * @param ctx the parse tree */ void enterStructDeclaratorList(CParser.StructDeclaratorListContext ctx); /** * Exit a parse tree produced by {@link CParser#structDeclaratorList}. * @param ctx the parse tree */ void exitStructDeclaratorList(CParser.StructDeclaratorListContext ctx); /** * Enter a parse tree produced by {@link CParser#structDeclarator}. * @param ctx the parse tree */ void enterStructDeclarator(CParser.StructDeclaratorContext ctx); /** * Exit a parse tree produced by {@link CParser#structDeclarator}. * @param ctx the parse tree */ void exitStructDeclarator(CParser.StructDeclaratorContext ctx); /** * Enter a parse tree produced by {@link CParser#enumSpecifier}. * @param ctx the parse tree */ void enterEnumSpecifier(CParser.EnumSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#enumSpecifier}. * @param ctx the parse tree */ void exitEnumSpecifier(CParser.EnumSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#enumeratorList}. * @param ctx the parse tree */ void enterEnumeratorList(CParser.EnumeratorListContext ctx); /** * Exit a parse tree produced by {@link CParser#enumeratorList}. * @param ctx the parse tree */ void exitEnumeratorList(CParser.EnumeratorListContext ctx); /** * Enter a parse tree produced by {@link CParser#enumerator}. * @param ctx the parse tree */ void enterEnumerator(CParser.EnumeratorContext ctx); /** * Exit a parse tree produced by {@link CParser#enumerator}. * @param ctx the parse tree */ void exitEnumerator(CParser.EnumeratorContext ctx); /** * Enter a parse tree produced by {@link CParser#enumerationConstant}. * @param ctx the parse tree */ void enterEnumerationConstant(CParser.EnumerationConstantContext ctx); /** * Exit a parse tree produced by {@link CParser#enumerationConstant}. * @param ctx the parse tree */ void exitEnumerationConstant(CParser.EnumerationConstantContext ctx); /** * Enter a parse tree produced by {@link CParser#atomicTypeSpecifier}. * @param ctx the parse tree */ void enterAtomicTypeSpecifier(CParser.AtomicTypeSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#atomicTypeSpecifier}. * @param ctx the parse tree */ void exitAtomicTypeSpecifier(CParser.AtomicTypeSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#typeQualifier}. * @param ctx the parse tree */ void enterTypeQualifier(CParser.TypeQualifierContext ctx); /** * Exit a parse tree produced by {@link CParser#typeQualifier}. * @param ctx the parse tree */ void exitTypeQualifier(CParser.TypeQualifierContext ctx); /** * Enter a parse tree produced by {@link CParser#functionSpecifier}. * @param ctx the parse tree */ void enterFunctionSpecifier(CParser.FunctionSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#functionSpecifier}. * @param ctx the parse tree */ void exitFunctionSpecifier(CParser.FunctionSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#alignmentSpecifier}. * @param ctx the parse tree */ void enterAlignmentSpecifier(CParser.AlignmentSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#alignmentSpecifier}. * @param ctx the parse tree */ void exitAlignmentSpecifier(CParser.AlignmentSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#declarator}. * @param ctx the parse tree */ void enterDeclarator(CParser.DeclaratorContext ctx); /** * Exit a parse tree produced by {@link CParser#declarator}. * @param ctx the parse tree */ void exitDeclarator(CParser.DeclaratorContext ctx); /** * Enter a parse tree produced by {@link CParser#directDeclarator}. * @param ctx the parse tree */ void enterDirectDeclarator(CParser.DirectDeclaratorContext ctx); /** * Exit a parse tree produced by {@link CParser#directDeclarator}. * @param ctx the parse tree */ void exitDirectDeclarator(CParser.DirectDeclaratorContext ctx); /** * Enter a parse tree produced by {@link CParser#gccDeclaratorExtension}. * @param ctx the parse tree */ void enterGccDeclaratorExtension(CParser.GccDeclaratorExtensionContext ctx); /** * Exit a parse tree produced by {@link CParser#gccDeclaratorExtension}. * @param ctx the parse tree */ void exitGccDeclaratorExtension(CParser.GccDeclaratorExtensionContext ctx); /** * Enter a parse tree produced by {@link CParser#gccAttributeSpecifier}. * @param ctx the parse tree */ void enterGccAttributeSpecifier(CParser.GccAttributeSpecifierContext ctx); /** * Exit a parse tree produced by {@link CParser#gccAttributeSpecifier}. * @param ctx the parse tree */ void exitGccAttributeSpecifier(CParser.GccAttributeSpecifierContext ctx); /** * Enter a parse tree produced by {@link CParser#gccAttributeList}. * @param ctx the parse tree */ void enterGccAttributeList(CParser.GccAttributeListContext ctx); /** * Exit a parse tree produced by {@link CParser#gccAttributeList}. * @param ctx the parse tree */ void exitGccAttributeList(CParser.GccAttributeListContext ctx); /** * Enter a parse tree produced by {@link CParser#gccAttribute}. * @param ctx the parse tree */ void enterGccAttribute(CParser.GccAttributeContext ctx); /** * Exit a parse tree produced by {@link CParser#gccAttribute}. * @param ctx the parse tree */ void exitGccAttribute(CParser.GccAttributeContext ctx); /** * Enter a parse tree produced by {@link CParser#nestedParenthesesBlock}. * @param ctx the parse tree */ void enterNestedParenthesesBlock(CParser.NestedParenthesesBlockContext ctx); /** * Exit a parse tree produced by {@link CParser#nestedParenthesesBlock}. * @param ctx the parse tree */ void exitNestedParenthesesBlock(CParser.NestedParenthesesBlockContext ctx); /** * Enter a parse tree produced by {@link CParser#pointer}. * @param ctx the parse tree */ void enterPointer(CParser.PointerContext ctx); /** * Exit a parse tree produced by {@link CParser#pointer}. * @param ctx the parse tree */ void exitPointer(CParser.PointerContext ctx); /** * Enter a parse tree produced by {@link CParser#typeQualifierList}. * @param ctx the parse tree */ void enterTypeQualifierList(CParser.TypeQualifierListContext ctx); /** * Exit a parse tree produced by {@link CParser#typeQualifierList}. * @param ctx the parse tree */ void exitTypeQualifierList(CParser.TypeQualifierListContext ctx); /** * Enter a parse tree produced by {@link CParser#parameterTypeList}. * @param ctx the parse tree */ void enterParameterTypeList(CParser.ParameterTypeListContext ctx); /** * Exit a parse tree produced by {@link CParser#parameterTypeList}. * @param ctx the parse tree */ void exitParameterTypeList(CParser.ParameterTypeListContext ctx); /** * Enter a parse tree produced by {@link CParser#parameterList}. * @param ctx the parse tree */ void enterParameterList(CParser.ParameterListContext ctx); /** * Exit a parse tree produced by {@link CParser#parameterList}. * @param ctx the parse tree */ void exitParameterList(CParser.ParameterListContext ctx); /** * Enter a parse tree produced by {@link CParser#parameterDeclaration}. * @param ctx the parse tree */ void enterParameterDeclaration(CParser.ParameterDeclarationContext ctx); /** * Exit a parse tree produced by {@link CParser#parameterDeclaration}. * @param ctx the parse tree */ void exitParameterDeclaration(CParser.ParameterDeclarationContext ctx); /** * Enter a parse tree produced by {@link CParser#identifierList}. * @param ctx the parse tree */ void enterIdentifierList(CParser.IdentifierListContext ctx); /** * Exit a parse tree produced by {@link CParser#identifierList}. * @param ctx the parse tree */ void exitIdentifierList(CParser.IdentifierListContext ctx); /** * Enter a parse tree produced by {@link CParser#typeName}. * @param ctx the parse tree */ void enterTypeName(CParser.TypeNameContext ctx); /** * Exit a parse tree produced by {@link CParser#typeName}. * @param ctx the parse tree */ void exitTypeName(CParser.TypeNameContext ctx); /** * Enter a parse tree produced by {@link CParser#abstractDeclarator}. * @param ctx the parse tree */ void enterAbstractDeclarator(CParser.AbstractDeclaratorContext ctx); /** * Exit a parse tree produced by {@link CParser#abstractDeclarator}. * @param ctx the parse tree */ void exitAbstractDeclarator(CParser.AbstractDeclaratorContext ctx); /** * Enter a parse tree produced by {@link CParser#directAbstractDeclarator}. * @param ctx the parse tree */ void enterDirectAbstractDeclarator(CParser.DirectAbstractDeclaratorContext ctx); /** * Exit a parse tree produced by {@link CParser#directAbstractDeclarator}. * @param ctx the parse tree */ void exitDirectAbstractDeclarator(CParser.DirectAbstractDeclaratorContext ctx); /** * Enter a parse tree produced by {@link CParser#typedefName}. * @param ctx the parse tree */ void enterTypedefName(CParser.TypedefNameContext ctx); /** * Exit a parse tree produced by {@link CParser#typedefName}. * @param ctx the parse tree */ void exitTypedefName(CParser.TypedefNameContext ctx); /** * Enter a parse tree produced by {@link CParser#initializer}. * @param ctx the parse tree */ void enterInitializer(CParser.InitializerContext ctx); /** * Exit a parse tree produced by {@link CParser#initializer}. * @param ctx the parse tree */ void exitInitializer(CParser.InitializerContext ctx); /** * Enter a parse tree produced by {@link CParser#initializerList}. * @param ctx the parse tree */ void enterInitializerList(CParser.InitializerListContext ctx); /** * Exit a parse tree produced by {@link CParser#initializerList}. * @param ctx the parse tree */ void exitInitializerList(CParser.InitializerListContext ctx); /** * Enter a parse tree produced by {@link CParser#designation}. * @param ctx the parse tree */ void enterDesignation(CParser.DesignationContext ctx); /** * Exit a parse tree produced by {@link CParser#designation}. * @param ctx the parse tree */ void exitDesignation(CParser.DesignationContext ctx); /** * Enter a parse tree produced by {@link CParser#designatorList}. * @param ctx the parse tree */ void enterDesignatorList(CParser.DesignatorListContext ctx); /** * Exit a parse tree produced by {@link CParser#designatorList}. * @param ctx the parse tree */ void exitDesignatorList(CParser.DesignatorListContext ctx); /** * Enter a parse tree produced by {@link CParser#designator}. * @param ctx the parse tree */ void enterDesignator(CParser.DesignatorContext ctx); /** * Exit a parse tree produced by {@link CParser#designator}. * @param ctx the parse tree */ void exitDesignator(CParser.DesignatorContext ctx); /** * Enter a parse tree produced by {@link CParser#staticAssertDeclaration}. * @param ctx the parse tree */ void enterStaticAssertDeclaration(CParser.StaticAssertDeclarationContext ctx); /** * Exit a parse tree produced by {@link CParser#staticAssertDeclaration}. * @param ctx the parse tree */ void exitStaticAssertDeclaration(CParser.StaticAssertDeclarationContext ctx); /** * Enter a parse tree produced by {@link CParser#statement}. * @param ctx the parse tree */ void enterStatement(CParser.StatementContext ctx); /** * Exit a parse tree produced by {@link CParser#statement}. * @param ctx the parse tree */ void exitStatement(CParser.StatementContext ctx); /** * Enter a parse tree produced by {@link CParser#labeledStatement}. * @param ctx the parse tree */ void enterLabeledStatement(CParser.LabeledStatementContext ctx); /** * Exit a parse tree produced by {@link CParser#labeledStatement}. * @param ctx the parse tree */ void exitLabeledStatement(CParser.LabeledStatementContext ctx); /** * Enter a parse tree produced by {@link CParser#compoundStatement}. * @param ctx the parse tree */ void enterCompoundStatement(CParser.CompoundStatementContext ctx); /** * Exit a parse tree produced by {@link CParser#compoundStatement}. * @param ctx the parse tree */ void exitCompoundStatement(CParser.CompoundStatementContext ctx); /** * Enter a parse tree produced by {@link CParser#blockItemList}. * @param ctx the parse tree */ void enterBlockItemList(CParser.BlockItemListContext ctx); /** * Exit a parse tree produced by {@link CParser#blockItemList}. * @param ctx the parse tree */ void exitBlockItemList(CParser.BlockItemListContext ctx); /** * Enter a parse tree produced by {@link CParser#blockItem}. * @param ctx the parse tree */ void enterBlockItem(CParser.BlockItemContext ctx); /** * Exit a parse tree produced by {@link CParser#blockItem}. * @param ctx the parse tree */ void exitBlockItem(CParser.BlockItemContext ctx); /** * Enter a parse tree produced by {@link CParser#expressionStatement}. * @param ctx the parse tree */ void enterExpressionStatement(CParser.ExpressionStatementContext ctx); /** * Exit a parse tree produced by {@link CParser#expressionStatement}. * @param ctx the parse tree */ void exitExpressionStatement(CParser.ExpressionStatementContext ctx); /** * Enter a parse tree produced by {@link CParser#selectionStatement}. * @param ctx the parse tree */ void enterSelectionStatement(CParser.SelectionStatementContext ctx); /** * Exit a parse tree produced by {@link CParser#selectionStatement}. * @param ctx the parse tree */ void exitSelectionStatement(CParser.SelectionStatementContext ctx); /** * Enter a parse tree produced by {@link CParser#iterationStatement}. * @param ctx the parse tree */ void enterIterationStatement(CParser.IterationStatementContext ctx); /** * Exit a parse tree produced by {@link CParser#iterationStatement}. * @param ctx the parse tree */ void exitIterationStatement(CParser.IterationStatementContext ctx); /** * Enter a parse tree produced by {@link CParser#forCondition}. * @param ctx the parse tree */ void enterForCondition(CParser.ForConditionContext ctx); /** * Exit a parse tree produced by {@link CParser#forCondition}. * @param ctx the parse tree */ void exitForCondition(CParser.ForConditionContext ctx); /** * Enter a parse tree produced by {@link CParser#forDeclaration}. * @param ctx the parse tree */ void enterForDeclaration(CParser.ForDeclarationContext ctx); /** * Exit a parse tree produced by {@link CParser#forDeclaration}. * @param ctx the parse tree */ void exitForDeclaration(CParser.ForDeclarationContext ctx); /** * Enter a parse tree produced by {@link CParser#forExpression}. * @param ctx the parse tree */ void enterForExpression(CParser.ForExpressionContext ctx); /** * Exit a parse tree produced by {@link CParser#forExpression}. * @param ctx the parse tree */ void exitForExpression(CParser.ForExpressionContext ctx); /** * Enter a parse tree produced by {@link CParser#jumpStatement}. * @param ctx the parse tree */ void enterJumpStatement(CParser.JumpStatementContext ctx); /** * Exit a parse tree produced by {@link CParser#jumpStatement}. * @param ctx the parse tree */ void exitJumpStatement(CParser.JumpStatementContext ctx); /** * Enter a parse tree produced by {@link CParser#compilationUnit}. * @param ctx the parse tree */ void enterCompilationUnit(CParser.CompilationUnitContext ctx); /** * Exit a parse tree produced by {@link CParser#compilationUnit}. * @param ctx the parse tree */ void exitCompilationUnit(CParser.CompilationUnitContext ctx); /** * Enter a parse tree produced by {@link CParser#translationUnit}. * @param ctx the parse tree */ void enterTranslationUnit(CParser.TranslationUnitContext ctx); /** * Exit a parse tree produced by {@link CParser#translationUnit}. * @param ctx the parse tree */ void exitTranslationUnit(CParser.TranslationUnitContext ctx); /** * Enter a parse tree produced by {@link CParser#externalDeclaration}. * @param ctx the parse tree */ void enterExternalDeclaration(CParser.ExternalDeclarationContext ctx); /** * Exit a parse tree produced by {@link CParser#externalDeclaration}. * @param ctx the parse tree */ void exitExternalDeclaration(CParser.ExternalDeclarationContext ctx); /** * Enter a parse tree produced by {@link CParser#functionDefinition}. * @param ctx the parse tree */ void enterFunctionDefinition(CParser.FunctionDefinitionContext ctx); /** * Exit a parse tree produced by {@link CParser#functionDefinition}. * @param ctx the parse tree */ void exitFunctionDefinition(CParser.FunctionDefinitionContext ctx); /** * Enter a parse tree produced by {@link CParser#declarationList}. * @param ctx the parse tree */ void enterDeclarationList(CParser.DeclarationListContext ctx); /** * Exit a parse tree produced by {@link CParser#declarationList}. * @param ctx the parse tree */ void exitDeclarationList(CParser.DeclarationListContext ctx); }
[ "lawtonnichols@gmail.com" ]
lawtonnichols@gmail.com
ba92260ce9984cdbe5dd95d2d3878409d2966202
51a3c303e6a708d6adbfec382dbd8a7744dd19e1
/visitor/src/main/java/com/example/visitor/BuyBasket.java
f1b59de6afe33d94cbdab6509727e49dccf6dbbe
[]
no_license
sunxr/DesignPatternLearn
7791d819c5c7cbcbcfbcfd415eb4c19f065224d9
aa265ebba1873bd111ef01cf578a1cb8ecb82a03
refs/heads/main
2023-08-05T02:38:17.577572
2021-09-14T09:13:51
2021-09-14T09:13:51
403,631,937
0
0
null
null
null
null
UTF-8
Java
false
false
514
java
package com.example.visitor; import java.util.ArrayList; import java.util.Iterator; public class BuyBasket { private ArrayList<Product> list = new ArrayList<>(); public void accept(Visitor visitor) { Iterator i = list.iterator(); while (i.hasNext()) { ((Product)i.next()).accept(visitor); } } public void addProduct(Product product) { list.add(product); } public void removeProduct(Product product) { list.remove(product); } }
[ "969406418@qq.com" ]
969406418@qq.com
6425bc1753fe834da99d1b26d7529dbea2f5c504
c258451d72ee40d1be955c424d7cc9d383fa2a71
/main/src/main/java/au/com/openbiz/trading/persistent/portfolio/Portfolio.java
133ce6a44d52409e1f8f29c879b82fc3d00d6fe3
[]
no_license
kaffeebrauer/trading-system-aid
86c0c156143ab663d505e60ac3d92148fe106013
7d0497a3dce2a3e8b71a245fb2499f30cc7db89a
refs/heads/master
2016-09-05T08:57:17.950939
2008-09-03T07:00:02
2008-09-03T07:00:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,047
java
package au.com.openbiz.trading.persistent.portfolio; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import org.apache.commons.lang.builder.ToStringBuilder; import au.com.openbiz.trading.persistent.currency.Currency; import au.com.openbiz.trading.persistent.security.Security; import au.com.openbiz.trading.persistent.shareholding.ShareHolding; @Entity public class Portfolio implements Serializable { private static final long serialVersionUID = 1L; private Integer id; private String name; private String description; private Currency currency; private Set<Security> securities = new HashSet<Security>(); private Set<ShareHolding> shareHoldings = new HashSet<ShareHolding>(); public Portfolio() {} public Portfolio(Integer id) { this.id = id; } @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="id") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name="name", nullable=false, unique=true, length=50) public String getName() { return name; } public void setName(String name) { this.name = name; } @Column(name="description", nullable=true, length=250) public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @ManyToOne(fetch=FetchType.EAGER, optional=false) @JoinColumn(name="currency_id", nullable=false) public Currency getCurrency() { return currency; } public void setCurrency(Currency currency) { this.currency = currency; } public String toString() { return new ToStringBuilder(this) .append("id", this.id) .append("name", this.name) .append("description", this.description) .append("currency", this.currency.getCode()) .toString(); } @OneToMany(fetch=FetchType.EAGER) @JoinColumn(name="portfolio_fk", nullable=true) public Set<Security> getSecurities() { return new HashSet<Security>(securities); } protected void setSecurities(Set<Security> securities) { this.securities = securities; } public void addSecurity(Security security) { securities.add(security); } public void removeSecurity(Security security) { securities.remove(security); } @OneToMany(fetch=FetchType.EAGER) @JoinColumn(name="portfolio_fk", nullable=true) public Set<ShareHolding> getShareHoldings() { return new HashSet<ShareHolding>(shareHoldings); } protected void setShareHoldings(Set<ShareHolding> shareHoldings) { this.shareHoldings = shareHoldings; } public void addShareHolding(ShareHolding shareHolding) { shareHoldings.add(shareHolding); } public void removeShareHolding(ShareHolding shareHolding) { shareHoldings.remove(shareHolding); } }
[ "pablo.iorio@d5631109-3d50-0410-ae09-e34be2fb6b1f" ]
pablo.iorio@d5631109-3d50-0410-ae09-e34be2fb6b1f
80a3b63e345448f6ca3b1a627aa4091d9c2b8f6c
31c62a1772ed0622eaef13a2b0b81e5d49adff74
/src/main/java/com/drajer/sof/utils/FhirHttpHeaderInterceptor.java
315842df65c854d644f0d4b452d6ed172bbe89e5
[ "Apache-2.0" ]
permissive
drajer-health/eCRNow
5a1aa41fbd719df50e181b982fafa27059f2573a
f5b0ba447ebc927f58d98c6ef21dc4ad65b1137f
refs/heads/master
2023-08-18T08:00:15.780334
2023-08-08T06:00:08
2023-08-08T06:00:08
253,489,476
30
39
Apache-2.0
2023-09-12T16:14:32
2020-04-06T12:22:54
Java
UTF-8
Java
false
false
1,602
java
package com.drajer.sof.utils; import java.util.Random; public class FhirHttpHeaderInterceptor extends HttpHeaderInterceptor { private static final int RANDOM_NUM_WIDTH = 5; private static final String RANDOM_NUM_FORMAT = "%0" + RANDOM_NUM_WIDTH + "d"; private static final int RANDOM_NUM_BASE = (int) Math.round(Math.pow(10, RANDOM_NUM_WIDTH) - 1); private String xReqId; private String randomNum; private int pageNum = 1; private int retryCount; private void updateValue() { setValue(String.format("%s-%sp%dr%d", xReqId, randomNum, pageNum, retryCount)); } public void setXReqId(final String xReqId) { this.xReqId = xReqId; updateValue(); } public String getXReqId() { return this.xReqId; } public String newRandomNum() { this.randomNum = String.format(RANDOM_NUM_FORMAT, new Random().nextInt(RANDOM_NUM_BASE)); updateValue(); return this.randomNum; } public void setPageNum(final int pageNum) { this.pageNum = pageNum; updateValue(); } public int incrementPageNum() { this.pageNum++; updateValue(); return this.pageNum; } public void setRetryCount(final int retryCount) { this.retryCount = retryCount; updateValue(); } public void reset() { this.pageNum = 1; this.retryCount = 0; newRandomNum(); } public FhirHttpHeaderInterceptor(String requestId) { super("X-Request-ID", requestId); if (requestId == null) { requestId = java.util.UUID.randomUUID().toString(); } this.xReqId = requestId; this.randomNum = newRandomNum(); updateValue(); } }
[ "noreply@github.cerner.com" ]
noreply@github.cerner.com
e0ba09913590d51944d4f9f0b28fcb23c4acb9ab
c7bc0e9b9b097bd992e21bfdc07f8731664c2de6
/app/src/test/java/pocketwiki/pocketwiki/com/pocketwiki2/ExampleUnitTest.java
97c316fb223ade1a2aa8234c86d340899aaf22e5
[]
no_license
josh5794/PocketWiki2
312aea446ab90fffe734f3d55569dc67869617c7
513a333404378a38bd9ca960f0de06adaf7e716e
refs/heads/master
2021-01-01T03:44:57.519657
2016-05-05T21:10:27
2016-05-05T21:10:27
57,227,713
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package pocketwiki.pocketwiki.com.pocketwiki2; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "chinmay@chinmay-300E4C-300E5C-300E7C.(none)" ]
chinmay@chinmay-300E4C-300E5C-300E7C.(none)
97c43cfa930178887714e3e54e784bc17a67cd9c
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/viber/voip/model/entity/CallEntity.java
36c39533f2be88b1208d454472c5fd300ed04074
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
9,387
java
package com.viber.voip.model.entity; import android.content.ContentValues; import android.database.Cursor; import android.os.Parcel; import android.os.Parcelable.Creator; import com.viber.voip.calls.a.a.a.a; import com.viber.voip.flatbuffers.b.a; import com.viber.voip.flatbuffers.b.c; import com.viber.voip.flatbuffers.b.e; import com.viber.voip.flatbuffers.model.conference.ConferenceInfo; import com.viber.voip.messages.orm.creator.Creator; import com.viber.voip.model.Call; public class CallEntity extends b implements Call { public static final Parcelable.Creator<CallEntity> CREATOR = new Parcelable.Creator() { public CallEntity a(Parcel paramAnonymousParcel) { return new CallEntity(paramAnonymousParcel, null); } public CallEntity[] a(int paramAnonymousInt) { return new CallEntity[paramAnonymousInt]; } }; public static final a.a ENTITY_CREATOR = new a.a() { public CallEntity a() { return new CallEntity(); } public com.viber.voip.model.d createInstance(Cursor paramAnonymousCursor) { return createInstance(paramAnonymousCursor, 0); } public com.viber.voip.model.d createInstance(Cursor paramAnonymousCursor, int paramAnonymousInt) { return a(a(), paramAnonymousCursor, paramAnonymousInt); } }; private long aggregatedHash; private String canonizedNumber; private ConferenceInfo conferenceInfo; private long date; private long duration; private int endReason; private boolean looked; private String memberId; private long nativeCallId; private String number; private String rawConferenceInfo; private int startReason; private long token; private int type; private boolean viberCall; private int viberCallType; public CallEntity() { } private CallEntity(Parcel paramParcel) { this.id = paramParcel.readLong(); this.nativeCallId = paramParcel.readLong(); this.number = paramParcel.readString(); this.canonizedNumber = paramParcel.readString(); this.aggregatedHash = paramParcel.readLong(); this.date = paramParcel.readLong(); this.duration = paramParcel.readLong(); this.token = paramParcel.readLong(); this.type = paramParcel.readInt(); this.startReason = paramParcel.readInt(); this.endReason = paramParcel.readInt(); int j; if (paramParcel.readInt() == i) { j = i; this.looked = j; if (paramParcel.readInt() != i) break label144; } while (true) { this.viberCall = i; this.viberCallType = paramParcel.readInt(); this.rawConferenceInfo = paramParcel.readString(); return; j = 0; break; label144: i = 0; } } public CallEntity(String paramString1, long paramLong1, boolean paramBoolean1, int paramInt1, boolean paramBoolean2, int paramInt2, int paramInt3, String paramString2, long paramLong2, long paramLong3, int paramInt4, String paramString3) { this(paramString1, paramLong1, paramBoolean1, paramInt1, paramBoolean2, paramString2, paramLong2, paramLong3, paramInt4, paramString3); this.startReason = paramInt2; this.endReason = paramInt3; } private CallEntity(String paramString1, long paramLong1, boolean paramBoolean1, int paramInt1, boolean paramBoolean2, String paramString2, long paramLong2, long paramLong3, int paramInt2, String paramString3) { this.nativeCallId = -1L; this.number = paramString2; this.date = paramLong2; this.duration = paramLong3; this.type = paramInt2; this.looked = paramBoolean2; this.viberCall = paramBoolean1; this.viberCallType = paramInt1; this.token = paramLong1; this.canonizedNumber = paramString1; this.rawConferenceInfo = paramString3; } public int describeContents() { return 0; } public long getAggregatedHash() { return this.aggregatedHash; } public String getCanonizedNumber() { return this.canonizedNumber; } public ConferenceInfo getConferenceInfo() { if (this.conferenceInfo == null) this.conferenceInfo = ((ConferenceInfo)e.c().a().a(this.rawConferenceInfo)); return this.conferenceInfo; } public ContentValues getContentValues() { return ENTITY_CREATOR.getContentValues(this); } public Creator getCreator() { return ENTITY_CREATOR; } public long getDate() { return this.date; } public long getDuration() { return this.duration; } public int getEndReason() { return this.endReason; } public String getMemberId() { return this.memberId; } public long getNativeCallId() { return this.nativeCallId; } public String getNumber() { return this.number; } public String getRawConferenceInfo() { return this.rawConferenceInfo; } public int getStartReason() { return this.startReason; } public long getToken() { return this.token; } public int getType() { return this.type; } public int getViberCallType() { return this.viberCallType; } public boolean hasConferenceInfo() { return !c.a(this.rawConferenceInfo); } public boolean isAnswerredOnAnotherDevice() { return this.endReason == 10; } public boolean isIncoming() { return this.type == 1; } public boolean isLooked() { return this.looked; } public boolean isMissed() { return this.type == 3; } public boolean isOutgoing() { return this.type == 2; } public boolean isPrivateNumber() { return "private_number".equals(this.number); } public boolean isTransferredIn() { return this.startReason == 1; } public boolean isTypeViberGroup() { return this.viberCallType == 6; } public boolean isTypeViberOut() { return this.viberCallType == 2; } public boolean isTypeViberVideo() { return this.viberCallType == 4; } public boolean isTypeVln() { return this.viberCallType == 5; } public boolean isViberCall() { return this.viberCall; } public void setAggregatedHash(long paramLong) { this.aggregatedHash = paramLong; } public void setCanonizedNumber(String paramString) { this.canonizedNumber = paramString; } public void setDate(long paramLong) { this.date = paramLong; } public void setDuration(long paramLong) { this.duration = paramLong; } public void setEndReason(int paramInt) { this.endReason = paramInt; } public void setLooked(boolean paramBoolean) { this.looked = paramBoolean; } public void setMemberId(String paramString) { this.memberId = paramString; } public void setNativeCallId(long paramLong) { this.nativeCallId = paramLong; } public void setNumber(String paramString) { this.number = paramString; } public void setRawConferenceInfo(String paramString) { this.rawConferenceInfo = paramString; } public void setStartReason(int paramInt) { this.startReason = paramInt; } public void setToken(long paramLong) { this.token = paramLong; } public void setType(int paramInt) { this.type = paramInt; } public void setViberCall(boolean paramBoolean) { this.viberCall = paramBoolean; } public void setViberCallType(int paramInt) { this.viberCallType = paramInt; } public String toString() { return "CallEntity [nativeCallId=" + this.nativeCallId + ", number=" + this.number + ", canonizedNumber=" + this.canonizedNumber + ", memberId=" + this.memberId + ", aggregatedHash=" + this.aggregatedHash + ", date=" + this.date + ", duration=" + this.duration + ", token=" + this.token + ", type=" + this.type + ", startReason=" + this.startReason + ", endReason=" + this.endReason + ", viberCallType=" + this.viberCallType + ", looked=" + this.looked + ", viberCall=" + this.viberCall + ", id=" + this.id + "]"; } public void writeToParcel(Parcel paramParcel, int paramInt) { int i = 1; paramParcel.writeLong(this.id); paramParcel.writeLong(this.nativeCallId); paramParcel.writeString(this.number); paramParcel.writeString(this.canonizedNumber); paramParcel.writeLong(this.aggregatedHash); paramParcel.writeLong(this.date); paramParcel.writeLong(this.duration); paramParcel.writeLong(this.token); paramParcel.writeInt(this.type); paramParcel.writeInt(this.startReason); paramParcel.writeInt(this.endReason); int j; if (this.looked) { j = i; paramParcel.writeInt(j); if (!this.viberCall) break label141; } while (true) { paramParcel.writeInt(i); paramParcel.writeInt(this.viberCallType); paramParcel.writeString(this.rawConferenceInfo); return; j = 0; break; label141: i = 0; } } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar * Qualified Name: com.viber.voip.model.entity.CallEntity * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
48d6badd0a0e4f4af862f2d3c30c2eaa4e6129a4
ce54f54f1c85e41a4280c21ce68c8e2d539cd131
/spring-zuul-member/src/main/java/org/crazyit/cloud/MemberApp.java
76af7f1977feb14d0fae72c22f26a2bb03745003
[]
no_license
ycgeyks/spring-cloud-zuul-3
511380810f6c40b5dba3399503f0a7e273c81808
a9977e09dfcba060d460c98aeb27bb4edb0f472a
refs/heads/master
2023-07-21T15:00:18.295199
2021-09-07T16:48:28
2021-09-07T16:48:28
404,054,227
0
0
null
null
null
null
UTF-8
Java
false
false
418
java
package org.crazyit.cloud; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @SpringBootApplication @EnableEurekaClient public class MemberApp { public static void main(String[] args) { new SpringApplicationBuilder(MemberApp.class).web(true).run(args); } }
[ "84768331@qq.com" ]
84768331@qq.com
b518c70b610da9d509c3754508e2dcf1f7146d9b
a6239c2cd5f7b2f6b9320e27818b688d18e68d85
/src/main/java/quizweb/domain/servrice/impl/FindOrResisterUserServiceimpl.java
aac8a141daa47a06b2eb55352f5821e591be0740
[]
no_license
Mizuide/quizweb
7e8734586dfdb7f9ee11cbfe40ef07c39d6c7a8b
41dcada877e236c1b73ee3592338e831a0ef731b
refs/heads/master
2023-08-31T01:21:37.965675
2021-10-25T16:38:18
2021-10-25T16:38:18
345,691,982
0
0
null
null
null
null
UTF-8
Java
false
false
1,098
java
package quizweb.domain.servrice.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import quizweb.app.authentic.entity.TwitterUser; import quizweb.domain.repository.entity.User; import quizweb.domain.repository.mapper.UserMapper; import quizweb.domain.servrice.FindOrResisterUserService; @Service public class FindOrResisterUserServiceimpl implements FindOrResisterUserService { @Autowired public FindOrResisterUserServiceimpl(UserMapper userMapper){ this.userMapper=userMapper; } UserMapper userMapper; @Override public User findOrResisterUserByTwitteUser(TwitterUser twitterUser) { User user = userMapper.find(twitterUser.getUserId()); if(user == null){ user = new User(); user.setId(twitterUser.getUserId()); user.setName(twitterUser.getUsername()); user.setImageUrl(twitterUser.getImageUrl()); userMapper.insert(user); } return user; } }
[ "waterexit1120@gmail.com" ]
waterexit1120@gmail.com
9522ac7279b7fcf7534722a4b4f5f6268dc2d577
596db21e4111ed249178701cdeb46cbbc9ff8feb
/1 ArraysandStrings/1 isUnique.java
048062ac03e824e57e5b1e2118bfe49e45a4d42b
[ "MIT" ]
permissive
JayakrishnaThota/CTCI
83981f416915baecf54ec3086ee5e94b87c93654
47b6b4dae99c50e5ef62bb09d1be35b2e121b549
refs/heads/master
2021-09-08T02:12:50.167964
2018-03-05T20:58:35
2018-03-05T20:58:35
111,362,019
1
0
null
null
null
null
UTF-8
Java
false
false
440
java
import java.util.*; public class test { public boolean isUnique(String s){ boolean[] map = new boolean[128]; for(int i=0;i<s.length();i++){ int ascii = (int)s.charAt(i); if(map[ascii]) return false; map[ascii] = true; } return true; } public static void main(String[] args){ Scanner in = new Scanner(System.in); String input = in.nextLine(); test t = new test(); System.out.println(t.isUnique(input)); } }
[ "noreply@github.com" ]
JayakrishnaThota.noreply@github.com
d43c851de5f6268429c9594e50123fbd42d6ca91
5ed0e932b8cc2a89d659f2317b8e71285a208ee0
/src/Producer.java
01e5d2f6cb82722fff32df9a11a6b44b41cea510
[]
no_license
Automatic476/Racing-Threads
c04a147f9c85661f96972f214f347c17ffae2dc0
b3f971d4082859d0f811eeff65dedfc9d40e8d97
refs/heads/main
2023-01-03T19:13:34.934090
2020-10-29T13:20:44
2020-10-29T13:20:44
302,653,473
0
0
null
null
null
null
UTF-8
Java
false
false
719
java
/** * Defines the Producer (Thread) class * Produces an integer and deposits in cubbyhole * (From Campione, Lesson 15) * * @author andrianoff * @version 8 March 2018 */ public class Producer extends Thread { private CubbyHole box; private int id; /** * Creates a Producer thread * @param c the shared box (CubbyHole) where data is deposited * @param n id of Producer */ public Producer(CubbyHole c, int n) { super("Producer(" + n + ")"); box = c; id = n; } /** * Deposits 10 values into box and displays values deposited. */ public void run() { for (int i = 0; i < 10; i++) { box.put(i); System.out.println("Producer #" + id + " put: " + i); } } }
[ "jasongz11@gmail.com" ]
jasongz11@gmail.com
5c5391ea3103a88928f616038e57882423887ec0
853a80687826ab931c47a2632b23825eb8f75475
/src/bkap/dao/RoomDao.java
ce3e64e1cd01f10147c3d4b73cff360969d49c86
[]
no_license
Hung289/java-project
1becce8cd02c45b5c59967869c7977f46dcb6be2
68b1fdd69e5be9572ce6d3ad64c44a21ab42bf7e
refs/heads/main
2023-02-11T12:17:34.368438
2021-01-05T17:29:22
2021-01-05T17:29:22
322,456,200
0
0
null
null
null
null
UTF-8
Java
false
false
889
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 bkap.dao; import bkap.entity.Room; import java.sql.ResultSet; import java.util.List; /** * * @author Sammy Guergachi <sguergachi at gmail.com> */ public interface RoomDao { public int insert(Room room); public List<Room> getAllRooms(); public int update(Room room); public int delete(int id); public Room getRoomById(int id); public List<Room> searchByID(String fieldwhere, String keyword); public List<Room> searchByName(String fieldwhere, String keyword); public List<Room> searchByCateRoom(Object id); public List<Room> searchByStatus(Object id); public List<Room> searchByCateStatusPrice(int cateId, int status, float priceMin, float priceMax); }
[ "nthung2896@gmail.com" ]
nthung2896@gmail.com
1d9e0adf8f77075cc749fb8834b101091f555033
b8d4005ea74fd578c9a6c29db0f0d945c64b9069
/v10-JavaFX-Insurance-V2/src/modelgenerator/CustomerGenerator.java
48243d1dd094457ef6538333919b730aa4a88756
[]
no_license
AkifAydin/bai2_pm2
6df0036802c7ff1daba6cc7565d22ec063ea7a07
422b70b940766e977f947006b509df6293db0e1a
refs/heads/master
2023-07-11T22:47:05.659031
2021-06-09T08:14:47
2021-06-09T08:14:47
399,146,423
1
0
null
null
null
null
UTF-8
Java
false
false
1,805
java
package modelgenerator; import model.Customer; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.stream.Collectors; import java.util.stream.IntStream; public class CustomerGenerator { private static final String[] FIRSTNAMES ={"Tom","Grobi","Anna","Lisa","Tim","Dana","Aura","Bruno","Struppi","Lotta"} ; private static final String[] SURNAMES = {"Eins","Zwei","Drei","Vier","Fuenf","Sechs","Sieben","Acht","Neun","Zehn"} ; private static final String[] STREETS = {"Grundstrasse", "Hohenzollernring","Diebsteich","Armgartstrasse", "Bremer Strasse", "Berliner Tor", "Steindamm", "Friedensallee", "Stresemannstrasse","Finkenau"}; private static final String[] ZIPCODES = {"20257", "22763", "22761", "22087", "21073", "20099", "20099", "22767", "22769", "22081"}; private static final int MAXHOUSENUMBER = 120; private static final String AREA = "Hamburg"; private static int nextCustomerId; public static int getNextCustomerId() { return nextCustomerId++; } public static List<Customer> generate(int number){ Random rand = RandomUtil.getRandom(); var firstNamesLength = FIRSTNAMES.length; var surNamesLength = SURNAMES.length; return new ArrayList<>(IntStream.range(1,number).mapToObj(i-> new Customer(getNextCustomerId(),FIRSTNAMES[rand.nextInt(firstNamesLength)], SURNAMES[rand.nextInt(surNamesLength)], createAddress(rand))).collect(Collectors.toSet())); } private static String createAddress(Random rand) { var streetsLength = STREETS.length; var index = rand.nextInt(streetsLength); return String.format("%s %s, %s %s", STREETS[index], rand.nextInt(MAXHOUSENUMBER)+1,ZIPCODES[index],AREA); } }
[ "birgit.wendholt@haw-hamburg.de" ]
birgit.wendholt@haw-hamburg.de
1ac23247abbd35994ab33d28ffc15d9af75f1511
fe7c6ccb491b4203a42f956a67a43c236dc75f11
/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/annotations/PolygonTest.java
cd87f71b27e718d64bb6d2542ba75eecbc91ce4e
[ "Apache-2.0", "BSD-2-Clause" ]
permissive
luyufanzhi/win_mapbox
f571fef859bb39927b6590df606ea37f3eef9d73
4e024cbd35237e4994b65adb61b265bebed41ea9
refs/heads/master
2023-04-14T20:45:09.734962
2020-05-19T11:18:27
2020-05-19T11:18:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,715
java
package com.mapbox.mapboxsdk.testapp.annotations; import android.graphics.Color; import com.mapbox.mapboxsdk.annotations.Polygon; import com.mapbox.mapboxsdk.annotations.PolygonOptions; import com.mapbox.mapboxsdk.geometry.LatLng; import com.mapbox.mapboxsdk.testapp.activity.EspressoTest; import org.junit.Ignore; import org.junit.Test; import static com.mapbox.mapboxsdk.testapp.action.MapboxMapAction.invoke; import static org.junit.Assert.assertEquals; public class PolygonTest extends EspressoTest { @Test @Ignore public void addPolygonTest() { validateTestSetup(); invoke(mapboxMap, (uiController, mapboxMap) -> { LatLng latLngOne = new LatLng(); LatLng latLngTwo = new LatLng(1, 0); LatLng latLngThree = new LatLng(1, 1); assertEquals("Polygons should be empty", 0, mapboxMap.getPolygons().size()); final PolygonOptions options = new PolygonOptions(); options.strokeColor(Color.BLUE); options.fillColor(Color.RED); options.add(latLngOne); options.add(latLngTwo); options.add(latLngThree); Polygon polygon = mapboxMap.addPolygon(options); assertEquals("Polygons should be 1", 1, mapboxMap.getPolygons().size()); assertEquals("Polygon id should be 0", 0, polygon.getId()); assertEquals("Polygon points size should match", 3, polygon.getPoints().size()); assertEquals("Polygon stroke color should match", Color.BLUE, polygon.getStrokeColor()); assertEquals("Polygon target should match", Color.RED, polygon.getFillColor()); mapboxMap.clear(); assertEquals("Polygons should be empty", 0, mapboxMap.getPolygons().size()); }); } }
[ "machfe@126.com" ]
machfe@126.com
b72b8ca97dfcf7abee070955fc5c7e351284fe4a
a619afea5969211b7d6294b3685f7d3ea24bf1e9
/app/src/main/java/com/dongua/simpleosc/db/DetailUserBeanDao.java
9b1ee4227330847552268cbaa658e67a601e3dd9
[]
no_license
walterhua88/SimpleOSC
6c292af132dc739bf0e662223be69c8a42638cbf
4b5bed23f91314cd3ad7fa7f9cdf8f1dccf572ad
refs/heads/master
2020-07-11T08:55:32.199745
2018-05-22T13:12:47
2018-05-22T13:12:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,764
java
package com.dongua.simpleosc.db; import android.database.Cursor; import android.database.sqlite.SQLiteStatement; import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.Property; import org.greenrobot.greendao.internal.DaoConfig; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseStatement; import java.util.List; import com.dongua.simpleosc.bean.DetailUserBean; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table "DETAIL_USER_BEAN". */ public class DetailUserBeanDao extends AbstractDao<DetailUserBean, Long> { public static final String TABLENAME = "DETAIL_USER_BEAN"; /** * Properties of entity DetailUserBean.<br/> * Can be used for QueryBuilder and for referencing column names. */ public static class Properties { public final static Property DbID = new Property(0, Long.class, "dbID", true, "_id"); public final static Property Uid = new Property(1, int.class, "uid", false, "UID"); public final static Property Name = new Property(2, String.class, "name", false, "NAME"); public final static Property Gender = new Property(3, int.class, "gender", false, "GENDER"); public final static Property Portrait = new Property(4, String.class, "portrait", false, "PORTRAIT"); public final static Property City = new Property(5, String.class, "city", false, "CITY"); public final static Property Province = new Property(6, String.class, "province", false, "PROVINCE"); public final static Property Expertise = new Property(7, String.class, "expertise", false, "EXPERTISE"); public final static Property Platforms = new Property(8, String.class, "platforms", false, "PLATFORMS"); public final static Property JoinTime = new Property(9, String.class, "joinTime", false, "JOIN_TIME"); public final static Property LastLoginTime = new Property(10, String.class, "lastLoginTime", false, "LAST_LOGIN_TIME"); public final static Property FavoriteCount = new Property(11, int.class, "favoriteCount", false, "FAVORITE_COUNT"); public final static Property FollowersCount = new Property(12, int.class, "followersCount", false, "FOLLOWERS_COUNT"); public final static Property FansCount = new Property(13, int.class, "fansCount", false, "FANS_COUNT"); } private final StringConverter expertiseConverter = new StringConverter(); private final StringConverter platformsConverter = new StringConverter(); public DetailUserBeanDao(DaoConfig config) { super(config); } public DetailUserBeanDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } /** Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { String constraint = ifNotExists? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"DETAIL_USER_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: dbID "\"UID\" INTEGER NOT NULL UNIQUE ," + // 1: uid "\"NAME\" TEXT," + // 2: name "\"GENDER\" INTEGER NOT NULL ," + // 3: gender "\"PORTRAIT\" TEXT," + // 4: portrait "\"CITY\" TEXT," + // 5: city "\"PROVINCE\" TEXT," + // 6: province "\"EXPERTISE\" TEXT," + // 7: expertise "\"PLATFORMS\" TEXT," + // 8: platforms "\"JOIN_TIME\" TEXT," + // 9: joinTime "\"LAST_LOGIN_TIME\" TEXT," + // 10: lastLoginTime "\"FAVORITE_COUNT\" INTEGER NOT NULL ," + // 11: favoriteCount "\"FOLLOWERS_COUNT\" INTEGER NOT NULL ," + // 12: followersCount "\"FANS_COUNT\" INTEGER NOT NULL );"); // 13: fansCount } /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"DETAIL_USER_BEAN\""; db.execSQL(sql); } @Override protected final void bindValues(DatabaseStatement stmt, DetailUserBean entity) { stmt.clearBindings(); Long dbID = entity.getDbID(); if (dbID != null) { stmt.bindLong(1, dbID); } stmt.bindLong(2, entity.getUid()); String name = entity.getName(); if (name != null) { stmt.bindString(3, name); } stmt.bindLong(4, entity.getGender()); String portrait = entity.getPortrait(); if (portrait != null) { stmt.bindString(5, portrait); } String city = entity.getCity(); if (city != null) { stmt.bindString(6, city); } String province = entity.getProvince(); if (province != null) { stmt.bindString(7, province); } List expertise = entity.getExpertise(); if (expertise != null) { stmt.bindString(8, expertiseConverter.convertToDatabaseValue(expertise)); } List platforms = entity.getPlatforms(); if (platforms != null) { stmt.bindString(9, platformsConverter.convertToDatabaseValue(platforms)); } String joinTime = entity.getJoinTime(); if (joinTime != null) { stmt.bindString(10, joinTime); } String lastLoginTime = entity.getLastLoginTime(); if (lastLoginTime != null) { stmt.bindString(11, lastLoginTime); } stmt.bindLong(12, entity.getFavoriteCount()); stmt.bindLong(13, entity.getFollowersCount()); stmt.bindLong(14, entity.getFansCount()); } @Override protected final void bindValues(SQLiteStatement stmt, DetailUserBean entity) { stmt.clearBindings(); Long dbID = entity.getDbID(); if (dbID != null) { stmt.bindLong(1, dbID); } stmt.bindLong(2, entity.getUid()); String name = entity.getName(); if (name != null) { stmt.bindString(3, name); } stmt.bindLong(4, entity.getGender()); String portrait = entity.getPortrait(); if (portrait != null) { stmt.bindString(5, portrait); } String city = entity.getCity(); if (city != null) { stmt.bindString(6, city); } String province = entity.getProvince(); if (province != null) { stmt.bindString(7, province); } List expertise = entity.getExpertise(); if (expertise != null) { stmt.bindString(8, expertiseConverter.convertToDatabaseValue(expertise)); } List platforms = entity.getPlatforms(); if (platforms != null) { stmt.bindString(9, platformsConverter.convertToDatabaseValue(platforms)); } String joinTime = entity.getJoinTime(); if (joinTime != null) { stmt.bindString(10, joinTime); } String lastLoginTime = entity.getLastLoginTime(); if (lastLoginTime != null) { stmt.bindString(11, lastLoginTime); } stmt.bindLong(12, entity.getFavoriteCount()); stmt.bindLong(13, entity.getFollowersCount()); stmt.bindLong(14, entity.getFansCount()); } @Override public Long readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); } @Override public DetailUserBean readEntity(Cursor cursor, int offset) { DetailUserBean entity = new DetailUserBean( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // dbID cursor.getInt(offset + 1), // uid cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // name cursor.getInt(offset + 3), // gender cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // portrait cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // city cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // province cursor.isNull(offset + 7) ? null : expertiseConverter.convertToEntityProperty(cursor.getString(offset + 7)), // expertise cursor.isNull(offset + 8) ? null : platformsConverter.convertToEntityProperty(cursor.getString(offset + 8)), // platforms cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // joinTime cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // lastLoginTime cursor.getInt(offset + 11), // favoriteCount cursor.getInt(offset + 12), // followersCount cursor.getInt(offset + 13) // fansCount ); return entity; } @Override public void readEntity(Cursor cursor, DetailUserBean entity, int offset) { entity.setDbID(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setUid(cursor.getInt(offset + 1)); entity.setName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setGender(cursor.getInt(offset + 3)); entity.setPortrait(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setCity(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setProvince(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); entity.setExpertise(cursor.isNull(offset + 7) ? null : expertiseConverter.convertToEntityProperty(cursor.getString(offset + 7))); entity.setPlatforms(cursor.isNull(offset + 8) ? null : platformsConverter.convertToEntityProperty(cursor.getString(offset + 8))); entity.setJoinTime(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setLastLoginTime(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setFavoriteCount(cursor.getInt(offset + 11)); entity.setFollowersCount(cursor.getInt(offset + 12)); entity.setFansCount(cursor.getInt(offset + 13)); } @Override protected final Long updateKeyAfterInsert(DetailUserBean entity, long rowId) { entity.setDbID(rowId); return rowId; } @Override public Long getKey(DetailUserBean entity) { if(entity != null) { return entity.getDbID(); } else { return null; } } @Override public boolean hasKey(DetailUserBean entity) { return entity.getDbID() != null; } @Override protected final boolean isEntityUpdateable() { return true; } }
[ "a549295838@163.com" ]
a549295838@163.com
92020cbfbaf27fa71a8fda0cf9088ddfcce43886
5c55e6607c0b1e67a43f94427e599d3a0c9dd3b5
/app/src/main/java/com/example/a1505197/contactlist/Utils/Init.java
1ef148fc7a238b84af86d376670a2672993631c5
[]
no_license
Ashutosh181094/ContactList
bd234b80832e1a0d9925116501c3be563137635f
e427c2995eb24b592af0c9744c35a09701771ae5
refs/heads/master
2021-08-30T11:18:09.006813
2017-12-17T17:36:21
2017-12-17T17:36:21
114,555,998
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package com.example.a1505197.contactlist.Utils; import android.Manifest; /** * Created by 1505197 on 9/22/2017. */ public class Init { public Init() { } public static final String[] PERMISSIONS={ Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA}; public static final String[] PHONE_PERMISSION={Manifest.permission.CALL_PHONE}; public static final int CAMERA_REQUEST_CODE=5; public static final int PICKFILE_REQUEST_CODE=8; }
[ "ashutoshrai181094@gmail.com" ]
ashutoshrai181094@gmail.com
3f8f76b45912d24430304585a81c6e9c8e8a9aa8
4d956d377eb465098c9de697fea9847d985a69d3
/src/main/java/io/jboot/core/http/JbootHttpKit.java
5adcaad9f74e79cf195059e902c6e446b746e009
[ "Apache-2.0" ]
permissive
chenyongze/jboot
587be9d852a0aee1ce1a45a7a7d9e5bf05946a85
d35ea46f2ec666bdfaeca0c87da6f5e06d63871d
refs/heads/master
2020-04-05T17:38:05.679639
2018-11-01T08:49:04
2018-11-01T08:49:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,411
java
/** * Copyright (c) 2015-2018, Michael Yang 杨福海 (fuhai999@gmail.com). * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.jboot.core.http; import io.jboot.Jboot; import java.util.Map; /** * 功能更强大的http工具类 * 1、支持 http get post 操作 * 2、支持文件下载 和 文件上传 * 3、支持自定义https文件证书(可以用在类似调用支付相关接口等) */ public class JbootHttpKit { /** * http get操作 * * @param url * @return */ public static String httpGet(String url) { return httpGet(url, null); } /** * http get操作 * * @param url * @param paras * @return */ public static String httpGet(String url, Map<String, Object> paras) { return httpGet(url, paras, null); } /** * 发送可以配置headers 的 http请求 * * @param url * @param paras * @param headers * @return */ public static String httpGet(String url, Map<String, Object> paras, Map<String, String> headers) { JbootHttpRequest request = JbootHttpRequest.create(url, paras, JbootHttpRequest.METHOD_GET); request.addHeaders(headers); JbootHttpResponse response = Jboot.me().getHttp().handle(request); return response.isError() ? null : response.getContent(); } /** * http post 操作 * * @param url * @return */ public static String httpPost(String url) { return httpPost(url, null, null, null); } /** * http post 操作 * * @param url * @return */ public static String httpPost(String url, String postData) { return httpPost(url, null, null, postData); } /** * Http post 操作 * * @param url * @param paras post的参数,可以是文件 * @return */ public static String httpPost(String url, Map<String, Object> paras) { return httpPost(url, paras, null, null); } /** * Http post 操作 * * @param url * @param paras * @param postData * @return */ public static String httpPost(String url, Map<String, Object> paras, String postData) { return httpPost(url, paras, null, postData); } /** * Http post 操作 * * @param url * @param paras * @param headers * @param postData * @return */ public static String httpPost(String url, Map<String, Object> paras, Map<String, String> headers, String postData) { JbootHttpRequest request = JbootHttpRequest.create(url, paras, JbootHttpRequest.METHOD_POST); request.setPostContent(postData); request.addHeaders(headers); JbootHttpResponse response = Jboot.me().getHttp().handle(request); return response.isError() ? null : response.getContent(); } }
[ "fuhai999@gmail.com" ]
fuhai999@gmail.com
fe0681819fa421c35d6e460fefc69fe38c1982dc
717376f6a8fcc1bde8dd53a61619af32680e51e6
/Second_HW/src/Number_to_Text.java
aba656788ff99f553d5a5aabc9af1f4c6bfbaeee
[]
no_license
ganchevdimitarg/TechModul
0e363dfaad50a76bac6465c87740ded586314a4a
87a9442e97131d8bbf01807819be645ba9205ba6
refs/heads/master
2022-07-28T20:52:15.354055
2021-05-05T20:53:43
2021-05-05T20:53:43
230,667,443
0
0
null
2021-05-05T20:53:44
2019-12-28T21:08:39
Java
UTF-8
Java
false
false
995
java
import java.util.Scanner; public class Number_to_Text { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int num = Integer.parseInt(scanner.nextLine()); if (num == 0) { System.out.println("zero"); } else if (num == 1) { System.out.println("one"); } else if (num == 2) { System.out.println("two"); } else if (num == 3) { System.out.println("three"); } else if (num == 4) { System.out.println("four"); } else if (num == 5) { System.out.println("five"); } else if (num == 6) { System.out.println("six"); } else if (num == 7) { System.out.println("seven"); } else if (num == 8){ System.out.println("eight"); } else if (num==9) { System.out.println("nine"); } else { System.out.println("number too big"); } } }
[ "ganchevdimitargeorgiev" ]
ganchevdimitargeorgiev
e184666b48f0b68111af02c0fa8175ec155c3f03
eea14c59107662198f71fd57ea16a5823701728c
/src/main/java/handler/AuthHandle.java
2b867f6ab67cb9c94d6f5d6b61621c9e36458546
[]
no_license
dyingstraw/iotServer
c565aaa8a667ef180efb7c4b19749a1fc75e6efe
f6e4134562865a64c646a6261c334a25268a2736
refs/heads/master
2022-07-02T01:49:40.511125
2019-08-07T15:02:13
2019-08-07T15:02:13
191,007,891
3
0
null
2022-06-21T01:21:49
2019-06-09T13:09:43
JavaScript
UTF-8
Java
false
false
4,269
java
package handler; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import lombok.extern.slf4j.Slf4j; import model.dto.AuthDTO; import model.dto.RespDto; import model.message.Message; import model.message.MessageType; import service.AuthService; import service.BlanceService; import service.RunTimeStatusService; import service.impl.RunTimeStatusServiceImpl; import util.ConfigUtil; import util.ZookeeperUtil; /** * @program: netty_study * @description: * @author: dyingstraw * @create: 2019-06-08 16:28 **/ @Slf4j public class AuthHandle extends ChannelInboundHandlerAdapter { AuthService authService = AuthService.getInstance(); private static RunTimeStatusService runTimeStatusService = RunTimeStatusServiceImpl.getINSTANCE(); BlanceService blanceService = BlanceService.getInstance(); @Override public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception { log.info("AuthHandle"); // 鉴权 if (AuthDTO.class.isInstance(msg)) { /*先判断负载是否均衡,如果本机服务可以直接接受设备连接,则认证成功, * 如果本机不接受此设备,则下发给设备重新认证的命令 * * */ log.info("{}",ZookeeperUtil.getChildren()); if (ZookeeperUtil.getChildren()!=null && ZookeeperUtil.getChildren().size()>1){ log.info("负载均衡:{}",ZookeeperUtil.getChildren()); /** 选取最适合的服务的地址,下发给设备,让设备重新认证**/ String best = runTimeStatusService.judgeBestServer(); // TODOne: 2019/6/30 如果得出结论,最佳负载服务就是本地,不做处理 if (best.equals(ConfigUtil.get("app.name"))){ // 直接本地认证 authService.auth((AuthDTO) msg,ctx,this); } ctx.writeAndFlush(new Message<String>(MessageType.REDIRECT.getKey(),best)).addListener( new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { ctx.close(); } } ); return; } // 单继状态下,直接认证 authService.auth((AuthDTO) msg,ctx,this); // // 如果设备服务只有一台,或者当机只剩下1台服务,则开始认证 // if (authService.isExit((AuthDTO) msg, true)) { // ctx.pipeline().remove(this); // ChannelFuture f = ctx.writeAndFlush(Message.success()); // f.addListener(new ChannelFutureListener() { // @Override // public void operationComplete(ChannelFuture future) throws Exception { // log.info("认证成功"); // } // }); // } else { // log.info("auth failed"); // ChannelFuture f = ctx.writeAndFlush(Message.failed()); // f.addListener(new ChannelFutureListener() { // @Override // public void operationComplete(ChannelFuture future) throws Exception { // log.info("认证失败"); // ctx.close(); // } // }); // } } else { Message<RespDto> message = new Message(); message.setCmd((int) 0); message.setVersion((int) 0); message.setData(RespDto.FAILED("还未认证")); ChannelFuture f = ctx.writeAndFlush(Message.failed("unAuth")); f.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { log.info("还未认证"); ctx.close(); } }); } } }
[ "1083608577@qq.com" ]
1083608577@qq.com
4b47909c44ddf36f7227dbc783d0b449e09fc289
928d6bb1b87059e1fcaa609f991c58bd80c28f9f
/micro-admin/src/main/java/com/easymicro/admin/modular/system/warpper/DeptWarpper.java
312de3b2a6421415514d42645ef70c37dfb120b7
[ "Apache-2.0" ]
permissive
wyk152/callers_visitors
64c6b2540e737aa42fbb2784f2a81697fc5fa92f
6d4b51e05793496d41725837a582f7b26e0d8de1
refs/heads/master
2020-05-22T03:29:36.988747
2019-05-12T05:11:29
2019-05-12T05:11:29
186,213,479
0
0
null
null
null
null
UTF-8
Java
false
false
778
java
package com.easymicro.admin.modular.system.warpper; import com.easymicro.admin.core.common.constant.factory.ConstantFactory; import com.easymicro.core.base.warpper.BaseControllerWarpper; import com.easymicro.core.util.ToolUtil; import java.util.Map; /** * 部门列表的包装 * * @author fengshuonan * @date 2017年4月25日 18:10:31 */ public class DeptWarpper extends BaseControllerWarpper { public DeptWarpper(Object list) { super(list); } @Override public void warpTheMap(Map<String, Object> map) { Long pid = (Long) map.get("pid"); if (ToolUtil.isEmpty(pid) || pid.equals(0)) { map.put("pName", "--"); } else { map.put("pName", ConstantFactory.me().getDeptName(pid)); } } }
[ "1023510862@qq.com" ]
1023510862@qq.com
0002f658a59e9291f07785c7d6a087393ef60479
f715d02806067fdab790e2c44c0b5338c59257b3
/TQC.plus.JAVA6/JPA601/JP06_3/JPD06_3.java
c5c991fb1f57881547b4c8ecc61a367d4c94aa39
[]
no_license
r39508177/tqc_plus_sample
42b8108e3506ce0577d88d0e20eb4e316d9dd86a
0f5aa5453c6044657fc93f29cdb04f67e42b2b40
refs/heads/master
2022-10-06T08:40:09.743347
2020-06-09T09:30:33
2020-06-09T09:30:33
null
0
0
null
null
null
null
BIG5
Java
false
false
1,479
java
package JPA601.JP06_3; class Unit{ int cost ; Unit(){ cost = 0; } public int getCost() {return cost;} } class Engine extends Unit { Engine(int i){ if(i==1600) cost=20000; else cost= 25000; } } class Aircond extends Unit{ Aircond(String s ) { if(s.equals("Auto")) cost = 12000; else cost = 10000; } } class Sound extends Unit{ Sound(){cost = 2000;} } abstract class Car{ Engine e; Aircond a; Car(int i,String s){ e = new Engine(i); a = new Aircond(s); } public abstract double cost(); public double price(){ return cost() *1.2; } } class LuxCar extends Car{ public LuxCar(int i ,String s ) {super(i,s);} public double cost() {return e.getCost()+a.getCost()+10000;} } //建立一個超級豪華車款 class SLuxCar extends Car{ public SLuxCar(int i ,String s ) //原本的引擎和空調 {super(i,s);} Sound sc = new Sound(); public double cost() {return e.getCost()+a.getCost()+10000+sc.getCost();} public String expensive (LuxCar lc) { if(lc.price()<price()) return "YES"; else return "no"; } } public class JPD06_3 { public static void main(String args[]) { SLuxCar llc = new SLuxCar(2000,"Auto"); System.out.println("SLux cost: " + llc.cost()); System.out.println("SLux price: " + llc.price()); LuxCar lc = new LuxCar(2000,"Auto"); System.out.println("Is llc more expensive than lc? " + llc.expensive(lc)); } }
[ "12020667+rangewang@users.noreply.github.com" ]
12020667+rangewang@users.noreply.github.com
db1e82f5b779b9926cd6df02e244f716e76ed19e
23d7c60da848f49c74d28d9db50c582d1f7497e6
/src/main/java/dev/riac/trapcount/report/trapcountreport/domain/report/repository/MemberRepository.java
d3b3bcf126ebaa48eff7e43451bce6545efdc757
[ "Apache-2.0" ]
permissive
rzaragozasolis/trapcount-report-api
7faacb51c2dff21fe69ddf5edd407c4a442d5a73
7ff4793c0ac94229f7485bdd070e779d126d24bd
refs/heads/master
2023-05-02T11:08:32.787810
2021-05-12T05:12:45
2021-05-12T05:12:45
366,593,835
0
0
Apache-2.0
2021-05-12T05:12:45
2021-05-12T04:40:17
null
UTF-8
Java
false
false
518
java
package dev.riac.trapcount.report.trapcountreport.domain.report.repository; import dev.riac.trapcount.report.trapcountreport.domain.report.entity.MermberEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; public interface MemberRepository extends JpaRepository<MermberEntity, Long> { @Query(value = "select t.memberemail from member t WHERE t.memberkey = ?1", nativeQuery = true) String getMemberEmailFromMemberKey(Long memberKey); }
[ "ricardo.zaragoza@riac.dev" ]
ricardo.zaragoza@riac.dev
fbc52dffc7df91c3798b2d7e7affb8578c6a1b9a
d4e03976878eb6bb3a24588af146de39ca78f822
/src/main/java/com/orbitz/vending/dto/Money.java
14b61d4e8659d427ca6eddc112e579607072dc4f
[]
no_license
yogi4/VendingSystem
bfdbc23caea2d246f8a912f40bf2e676bf5926be
06fe9dfe357ee1f166df892bc496639a636489d4
refs/heads/master
2021-01-25T07:35:20.529315
2013-11-25T16:42:19
2013-11-25T16:42:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,238
java
package com.orbitz.vending.dto; /** * Created with IntelliJ IDEA. * User: bazinga * Date: 11/23/13 * Time: 2:44 PM * Money data transfer object * The assumptions are that this is in USD but this class can be used to * suit global currencies incase Orbitz wants to expand their TestProcess to * different currency zones * This can be a currency note or a coin */ public class Money { /* Boolean to check if the value is Valid currency */ private boolean isValidCurrency; /* Actual currency value can be a bill or a coin */ private double value = 0.0; /** * Retrieves currency value * @return double value */ public double getValue() { return value; } /** * Sets currency value * @param value double */ public void setValue(double value) { this.value = value; } /** * Retrieves if currency is valid * @return boolean - true if valid */ public boolean isValidCurrency() { return isValidCurrency; } /** * Sets if the currency is valid * @param validCurrency boolean */ public void setValidCurrency(boolean validCurrency) { isValidCurrency = validCurrency; } }
[ "yogi@yogi4.com" ]
yogi@yogi4.com
2ad06551874c146ddb882d43e44df78235be9085
c23206da271b91b4fa656bba7e38614cb02c9a46
/src/service/MainFrm.java
1d818b1e235f505ee1e3230114d8d9b92a0a083d
[]
no_license
z514402862/server
0d34f81289893bcc9963db87c71b28a6762f7810
61850577174e58f9f753d57f9658d33155bedd34
refs/heads/master
2021-01-10T01:10:24.900964
2016-03-10T06:45:04
2016-03-10T06:45:04
53,562,382
0
0
null
null
null
null
UTF-8
Java
false
false
3,067
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 service; /** * * @author zzl */ public class MainFrm extends javax.swing.JFrame { /** * Creates new form JFrame */ public MainFrm() { initComponents(); } /** * 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() { setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents /** * @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(MainFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(MainFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(MainFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(MainFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { GameServer gs = new GameServer(); Thread gameThread = new Thread(gs); gameThread.start(); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables }
[ "514402862@qq.com" ]
514402862@qq.com
0b9f09f322c2ceddf03ff1b802cf71690dbefaa1
7d60ddbc92e5c5a59e9195ab66d51fb136e2f2b5
/src/gui/BashTask.java
c10703ff8db90727e6e84ac97deffbdcdd58871c
[]
no_license
hpt09/ForcedCensor
91aa46617c2c19305c0d62482b6a4fc886707959
25b41951baac47925c82cf7bc216679dd51d2f7a
refs/heads/master
2022-03-16T20:12:09.193345
2019-10-24T09:04:11
2019-10-24T09:04:11
195,957,556
0
0
null
null
null
null
UTF-8
Java
false
false
1,351
java
package gui; import javafx.concurrent.Task; import java.io.BufferedReader; import java.io.InputStreamReader; public class BashTask extends Task { private String command; public BashTask(String c){ this.command = c; } @Override protected Object call() throws Exception { try { //creates the command and executes it System.out.println(command); ProcessBuilder pb = new ProcessBuilder("bash", "-c", command); Process process = pb.start(); BufferedReader stdout = new BufferedReader(new InputStreamReader(process.getInputStream())); BufferedReader stderr = new BufferedReader(new InputStreamReader(process.getErrorStream())); int exitStatus = process.waitFor(); //if it passes or fails, print out the error/ success statement if (exitStatus == 0) { String line; while ((line = stdout.readLine()) != null) { System.out.println(line); } } else { String line; while ((line = stderr.readLine()) != null) { System.err.println(line); } } } catch (Exception f) { f.printStackTrace(); } return null; } }
[ "hpt09@live.com" ]
hpt09@live.com
5640e1c6e5ad2cbf7960f59c31e6d310e1dfb7c5
042c57ac526ebedd144e91c5de8702927417ccc0
/chapter10/src/main/java/com/wll/test/hfjsp/chapter10/controller/TestIfServlet.java
79342709250837158c1bcb82408ea805adc57a51
[]
no_license
wlily/head-first-jsp
10981bfe4fb5953b33a9a7c07ece882ca4892498
dd11e8ae35783e055a561aad7a1556d18dcd326f
refs/heads/master
2020-12-02T07:42:26.751192
2017-07-09T22:41:35
2017-07-09T22:41:35
96,715,571
0
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
package com.wll.test.hfjsp.chapter10.controller; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Created by wll on 11/19/15. */ public class TestIfServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { List comments = new ArrayList(); comments.add("This site is cool!"); comments.add("This site is stupid!"); comments.add("This site is good!"); req.setAttribute("commentList", comments); RequestDispatcher view = req.getRequestDispatcher("testIf.jsp"); view.forward(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } }
[ "op_violet@126.com" ]
op_violet@126.com
3cf1ee33c155ab22d353943a8e87ed3a75710977
860925e9f438ce77b89d42210334b2db41bf3f9a
/SyProject/src/com/sy/integration/iv/InvInvoiceReportUse.java
1f2e722194c37be9fd1a3ed97e032976c1a19207
[]
no_license
fm1995/TapWater
5aa19de2dabdaa015c3f9e8f317e27e6fa412f37
3bff1c5338bfa33ac7bd88b97fbeb7ce78d168c1
refs/heads/master
2021-01-10T11:39:39.850935
2017-11-30T11:37:17
2017-11-30T11:37:17
46,406,271
1
1
null
null
null
null
GB18030
Java
false
false
2,580
java
package com.sy.integration.iv; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.sy.entity.SyEmp; import com.sy.integration.iv.param.KeyCount; import com.sy.integration.iv.param.ReportUseParam; import com.sy.projectUtils.ValueVerify; import com.sy.service.iv.*; import com.sy.service.sy.SyEmpService; //发票使用情况查询 @Repository public class InvInvoiceReportUse { @Autowired private IvIninvoiceService ivIninvoiceService; @Autowired private IvInvoiceService ivInvoiceService; @Autowired private SyEmpService syEmpService; public SyEmpService getSyEmpService() { return syEmpService; } public void setSyEmpService(SyEmpService syEmpService) { this.syEmpService = syEmpService; } public IvIninvoiceService getIvIninvoiceService() { return ivIninvoiceService; } public void setIvIninvoiceService(IvIninvoiceService ivIninvoiceService) { this.ivIninvoiceService = ivIninvoiceService; } public IvInvoiceService getIvInvoiceService() { return ivInvoiceService; } public void setIvInvoiceService(IvInvoiceService ivInvoiceService) { this.ivInvoiceService = ivInvoiceService; } // 去jsp时带的数据 public List<SyEmp> toJsp() { return getSyEmpService().selIvEmp(); } //发票多条件情况查询 public List<KeyCount> whereAll(ReportUseParam rup) { List<KeyCount> list=new ArrayList<KeyCount>(); if(rup.getStartNo()!=""&&rup.getStartNo()!=null) list.add(new KeyCount("开始编号", rup.getStartNo())); if(rup.getEndNo()!=""&&rup.getEndNo()!=null) list.add(new KeyCount("结束编号", rup.getEndNo())); if(rup.getUseDateStart()!="") list.add(new KeyCount("开始时间", rup.getUseDateStart())); if(rup.getUseDateEnd()!="") list.add(new KeyCount("结束时间", rup.getUseDateEnd())); list.add(new KeyCount("合计张数", ValueVerify.isnull(ivInvoiceService.selIvCount(rup).getClass(), ivInvoiceService.selIvCount(rup)))); list.add(new KeyCount("作废张数", ValueVerify.isnull(ivInvoiceService.selInvalidCount(rup).getClass(), ivInvoiceService.selInvalidCount(rup)))); list.add(new KeyCount("使用张数",ValueVerify.isnull(ivInvoiceService.selUsedCount(rup).getClass(), ivInvoiceService.selUsedCount(rup)))); list.add(new KeyCount("合计金额", ValueVerify.isnull(ivInvoiceService.selInvalidCount(rup).getClass(), ivInvoiceService.selInSumMoney(rup))+".00元")); return list; } }
[ "1025587160@qq.com" ]
1025587160@qq.com
37458003522ee5330cfce5bb78de3e6472b0a0df
74caac266b4722956c754e80aea703d652c281ad
/app/src/test/java/android/text/TextUtils.java
2e3d223f0bb908d2d90a7b03deac86523a3c2367
[]
no_license
sargas/sors
169c426dba27c5548c1cb35bfc59e8026ec39aef
7b2febfd14be6ca1f01566ed1b5f1137fd564851
refs/heads/master
2020-11-27T06:06:44.570519
2019-12-23T02:57:22
2019-12-23T02:57:22
229,331,960
0
0
null
null
null
null
UTF-8
Java
false
false
1,302
java
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.text; @SuppressWarnings("ALL") public class TextUtils { /** * Returns whether the given CharSequence contains only digits. * * This is a copy of the code in Android Open Source Project * due to the issue described in * http://sangsoonam.github.io/2018/12/02/is-textutils-isempty-evil.html */ public static boolean isDigitsOnly(CharSequence str) { final int len = str.length(); for (int cp, i = 0; i < len; i += Character.charCount(cp)) { cp = Character.codePointAt(str, i); if (!Character.isDigit(cp)) { return false; } } return true; } }
[ "joe@neoturbine.net" ]
joe@neoturbine.net
76ba9a852e21a4bf20a5d401a3c8097344a2fbcf
9799b017bb5cff651a971787ac1b0aca42c810bb
/_210226_a/src/_2_MethodEx02.java
1895c7da9274bd99d708fac10d6181a6f187338b
[]
no_license
jykim3097/java-basics
0551c38102aefeec7bddc2b4dfbc7dd557b56992
0b0f8997384f02ccc0fc4313ebf4acee4e42ea83
refs/heads/main
2023-06-28T16:52:59.117745
2021-08-06T10:04:43
2021-08-06T10:04:43
393,330,981
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
java
public class _2_MethodEx02 { public static void main(String[] args) { /* * 매개변수(parameter) * 1. 매개변수는 메서드 호출 시 실행에 필요한 값을 전달하는 매개체 * 2. 매개변수를 몇 개 받을 지는 메서드를 선언할 때 결정한다. * */ System.out.println(calSum(10)); System.out.println(calSum(100)); System.out.println(calSum(50)); System.out.println(calSum2(10, 20)); System.out.println(strPlus2(2,5,"abc")); } static int calSum(int end) { int sum = 0; for(int i=1; i<=end; i++) { sum +=i; } return sum; } static int calSum2 (int start, int end) { int sum = 0; for(int i= start; i <= end; i++) { sum += i; } return sum; } //정수 2개, 문자열 1개를 매개변수로 전달받는 calSum3() //기능 - 두 정수 사이의 차 만큼 문자열을 붙인 결과를 반환 static String strPlus2(int a, int b, String str) { int min, max=0; if(a>b) { max = a; min = b; } else { max = b; min = a; } String result = ""; for(int i=min; i<= max; i++) { result += str; } return result; } }
[ "jykim3097@gmail.com" ]
jykim3097@gmail.com
02f228b8bbad380267d042bf6fd7852860357a15
0e490a11c2959b9f3d72d484fa893f0b7aff838c
/Spider/src/publicGUI/gameJPanel/snake/KeepOnFile.java
e7471b2d3586e7ce44074ad31429bd1fd623e2bf
[]
no_license
ricozhou/Spider
1bfac456d9fd129c78f9caf3cae6849ab77a9982
ccd91d4a0c4a860fee1d8f8014003180adbf066c
refs/heads/master
2021-05-01T17:53:14.838989
2018-02-10T09:24:14
2018-02-10T09:24:14
120,997,821
1
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
package publicGUI.gameJPanel.snake; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; import javax.swing.ImageIcon; //处理数据存储类 public class KeepOnFile { // 简单保存到txt文件 public void keepScoreOnFile(int score, int maxScore) { FileOutputStream fos = null; // 分数够大才存储 if (score > maxScore) { try { fos = new FileOutputStream("gameFile/MaxSnakeScore.txt"); PrintStream ps = new PrintStream(fos); ps.print(score); } catch (Exception e) { e.printStackTrace(); } finally { try { fos.close(); } catch (IOException e) { e.printStackTrace(); } } } } // 读取保存的分数 public int getTxtScore() { FileInputStream fis = null; int is = 0; try { fis = new FileInputStream("gameFile/MaxSnakeScore.txt"); byte[] b = new byte[100]; int has = fis.read(b); String stringScore = new String(b, 0, has); is = Integer.valueOf(stringScore); } catch (Exception e) { e.printStackTrace(); } finally { try { fis.close(); } catch (IOException e) { e.printStackTrace(); } } return is; } }
[ "2320095772@qq.com" ]
2320095772@qq.com
c8d3ccfbec3c48648c4088b06ed498c95c00de66
6764661c8ffeb8e23df8a89b1dcc84dad3d244db
/src/main/java/com/yjx/MyShiro/dao/UserDao.java
c708e0e4277143904df9c5a42c476156f02f4c8d
[]
no_license
XiaoLin-King/MyShiro
d001bf134da4c8a07464e90a3db3b04d374a8bff
4cec69702967f20b08df09046359815f355115f2
refs/heads/master
2022-07-02T08:47:12.786184
2020-01-03T07:22:30
2020-01-03T07:22:30
231,537,858
0
0
null
2022-06-17T02:47:12
2020-01-03T07:40:16
Java
UTF-8
Java
false
false
136
java
package com.yjx.MyShiro.dao; import com.yjx.MyShiro.entity.User; public interface UserDao { public User login(String username); }
[ "yjx_166@163.com" ]
yjx_166@163.com
9f4cb97868383d3e7bd5c3b11c51a088b19e320e
35ef5a09b3a0b0456917ce7a554ccdb78496ef05
/app/src/main/java/ru/vasic2000/vk_info/MainActivity.java
6391dbdd4e4250e3a71e02aa14727c4c3551bb48
[]
no_license
Vasic2000/VK_info
067b314a9c67702d3fbc589a00dca29dc6051b2c
1414befa6281b34928f602dcb099a57004863a69
refs/heads/master
2021-11-11T17:51:07.855486
2021-10-29T12:21:18
2021-10-29T12:21:18
206,402,602
0
0
null
null
null
null
UTF-8
Java
false
false
3,603
java
package ru.vasic2000.vk_info; import androidx.appcompat.app.AppCompatActivity; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.TextView; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.net.URL; import static ru.vasic2000.vk_info.utils.NetworkUtils.generateURL; import static ru.vasic2000.vk_info.utils.NetworkUtils.getResponseFromURL; public class MainActivity extends AppCompatActivity { private EditText searchField; private Button searchButton; private TextView result; private TextView errorMessage; private ProgressBar loadIndicator; private void showResult() { result.setVisibility(View.VISIBLE); errorMessage.setVisibility(View.INVISIBLE); } private void showError() { result.setVisibility(View.INVISIBLE); errorMessage.setVisibility(View.VISIBLE); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); searchField = findViewById(R.id.et_search_field); searchButton = findViewById(R.id.b_VK_Search); result = findViewById(R.id.tv_result); errorMessage = findViewById(R.id.tv_error_message); loadIndicator = findViewById(R.id.pb_loading_indicator); View.OnClickListener onClickListener = new View.OnClickListener() { @Override public void onClick(View view) { URL generatedURL = generateURL(searchField.getText().toString()); new VKQuerryTask().execute(generatedURL); } }; searchButton.setOnClickListener(onClickListener); } class VKQuerryTask extends AsyncTask<URL, Void, String>{ @Override protected void onPreExecute() { loadIndicator.setVisibility(View.VISIBLE); } @Override protected String doInBackground(URL... urls) { String response = null; try { response = getResponseFromURL(urls[0]); } catch (IOException e) { e.printStackTrace(); } return response; } @Override protected void onPostExecute(String response) { String firstName; String lastName; String resulting; StringBuilder res = new StringBuilder(); if(response != null && !response.equals("")) { try { JSONObject jsonResponse = new JSONObject(response); JSONArray jsonArray = jsonResponse.getJSONArray("response"); for(int i = 0; i < jsonArray.length(); i++) { JSONObject userInfo = jsonArray.getJSONObject(i); firstName = userInfo.getString("first_name"); lastName = userInfo.getString("last_name"); res.append("Имя: " + firstName + "\nФамилия: " + lastName + "\n\n"); } } catch (JSONException e) { e.printStackTrace(); } resulting = res.toString(); result.setText(resulting); showResult(); } else { showError(); } loadIndicator.setVisibility(View.INVISIBLE); } } }
[ "vasic2000@yandex.ru" ]
vasic2000@yandex.ru
fcbcda4a4ae34dadb5feec012bdd306bb58f5f04
f30f66ed6b63f5f693a45c7b51f63a7014e94f3c
/app/src/main/java/com/example/mstdnResponseEntities/Poll.java
3ddda24744e6acf0e4bbfa9af51dfb51d21f8bb1
[]
no_license
xeasonx/mstdnpublic
85b9030f0d14f63ec7a97699bf94c4b60be7fbcf
27b6518d5149871ed461de3277ada07cbd84ead6
refs/heads/master
2023-07-26T05:24:02.611286
2021-09-08T09:14:34
2021-09-08T09:14:34
388,747,139
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
package com.example.mstdnResponseEntities; public class Poll extends Entity { public Poll(String jsonString) { super(jsonString); } public String id; public String expires_at; public boolean expired; public boolean multiple; public int votes_count; public int voters_count; public boolean voted; public int[] own_votes; public PollOption options; public Emoji[] emojis; public static class PollOption { public String title; public int votes_count; } }
[ "zi.li@longjingtech.com" ]
zi.li@longjingtech.com
08d126a1a6ceaba22cc0e2a50a4214d89b497283
f77d04f1e0f64a6a5e720ce24b65b1ccb3c546d2
/zyj-hec-master/zyj-hec/src/main/java/com/hand/hec/exp/service/IExpMoExpPolicyAsgnComService.java
54e1aee710e5863413f7a9f84b7fc84f4fa1ba6a
[]
no_license
floodboad/zyj-hssp
3139a4e73ec599730a67360cd04aa34bc9eaf611
dc0ef445935fa48b7a6e86522ec64da0042dc0f3
refs/heads/master
2023-05-27T21:28:01.290266
2020-01-03T06:21:59
2020-01-03T06:29:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,309
java
package com.hand.hec.exp.service; import com.hand.hap.core.IRequest; import com.hand.hap.core.ProxySelf; import com.hand.hap.system.service.IBaseService; import com.hand.hec.exp.dto.ExpMoExpPolicyAsgnCom; import java.util.List; /** * <p> * 政策标准关联管理公司Service * </p> * * @author xiuxian.wu 2019/01/19 25:25 */ public interface IExpMoExpPolicyAsgnComService extends IBaseService<ExpMoExpPolicyAsgnCom>, ProxySelf<IExpMoExpPolicyAsgnComService> { /** * 查找分配给政策标准的管理公司 * * @param condition 查找条件 * @param pageNum * @param pageSize * @param request * @return 返回剩余管理公司信息 * @author xiuxian.wu 2019/02/20 15:14 */ List<ExpMoExpPolicyAsgnCom> queryCompanyByExpensePolicyId(IRequest request, ExpMoExpPolicyAsgnCom condition, int pageNum, int pageSize); /** * 查找剩余可以分配给政策标准的管理公司 * * @param condition 查找条件 * @param pageNum * @param pageSize * @param request * @return 返回剩余管理公司信息 * @author xiuxian.wu 2019/02/20 15:14 */ List<ExpMoExpPolicyAsgnCom> queryRemainingCompanyByExpensePolicyId(IRequest request, ExpMoExpPolicyAsgnCom condition, int pageNum, int pageSize); }
[ "1961187382@qq.com" ]
1961187382@qq.com
283cf2f448ce48f8b6303834b3d48571df38c85c
354e2c91f85f5417815b2e56e44ee26001d1cb85
/app/src/main/java/com/zhongyaogang/fragment/CentreFragment.java
1949639031f52ab0e133025682d7523f49419aa8
[]
no_license
shanlinxiaolieren/zhongyaogang
305b81e6e02450aa41701fbb4dd83eef329d06a2
573a77ed90a3ffda07d449c533395d0ba37503be
refs/heads/master
2021-01-19T18:18:13.274949
2017-09-18T00:37:46
2017-09-18T01:34:44
101,121,472
1
0
null
null
null
null
UTF-8
Java
false
false
5,931
java
package com.zhongyaogang.fragment; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.zhongyaogang.R; import com.zhongyaogang.activity.AddressActivity; import com.zhongyaogang.activity.ChangePasswordActivity; import com.zhongyaogang.activity.GeRenXingXiActivity; import com.zhongyaogang.activity.OrderActivity; import com.zhongyaogang.activity.ShengQingShoppingActivity; import com.zhongyaogang.activity.ShoppingCartActivity; import com.zhongyaogang.activity.WoDeFaBuActivity; import com.zhongyaogang.activity.WoDeXiaoXiActivity; public class CentreFragment extends Fragment implements OnClickListener{ private RelativeLayout relativelayout_denglu; private RelativeLayout relativelayout_address; private RelativeLayout relativelayout_shopping; private RelativeLayout relativelayout_wodefabu; private RelativeLayout relativelayout_changepassword; private RelativeLayout relativelayout_shengqingshopping; private LinearLayout linearlayout_quanbu; private LinearLayout linearlayout_daifukuan; private LinearLayout linearlayout_daifahua; private LinearLayout linearlayout_shouhuo; private ImageView wodezhongxin_xingxi; private TextView textview_usernamephone; private TextView textview_username; private String username; private String usernamephone; private SharedPreferences sp; /** * 处理fragment重复叠加的问题 * @param outState */ @Override public void onSaveInstanceState(Bundle outState) { //super.onSaveInstanceState(outState);// } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view =inflater.inflate(R.layout.wodezhongxin, container, false); initView(view); return view; } private void initView(View view) { textview_username=(TextView) view.findViewById(R.id.textView_username); textview_usernamephone=(TextView) view.findViewById(R.id.textview_usernamephone); relativelayout_denglu=(RelativeLayout) view.findViewById(R.id.relativelayout_denglu); relativelayout_address=(RelativeLayout) view.findViewById(R.id.relativelayout_address); relativelayout_shopping=(RelativeLayout) view.findViewById(R.id.relativelayout_shopping); relativelayout_wodefabu=(RelativeLayout) view.findViewById(R.id.relativelayout_wodefabu); relativelayout_changepassword=(RelativeLayout) view.findViewById(R.id.relativelayout_changepassword); relativelayout_shengqingshopping=(RelativeLayout) view.findViewById(R.id.relativelayout_shengqingshopping); wodezhongxin_xingxi=(ImageView) view.findViewById(R.id.wodezhongxin_xingxi); linearlayout_quanbu=(LinearLayout) view.findViewById(R.id.linearlayout_quanbu); linearlayout_daifukuan=(LinearLayout) view.findViewById(R.id.linearlayout_daifukuan); linearlayout_daifahua=(LinearLayout) view.findViewById(R.id.linearlayout_daifahua); linearlayout_shouhuo=(LinearLayout) view.findViewById(R.id.linearlayout_shouhuo); relativelayout_denglu.setOnClickListener(this); linearlayout_quanbu.setOnClickListener(this); linearlayout_daifukuan.setOnClickListener(this); linearlayout_daifahua.setOnClickListener(this); linearlayout_shouhuo.setOnClickListener(this); relativelayout_address.setOnClickListener(this); relativelayout_wodefabu.setOnClickListener(this); relativelayout_shopping.setOnClickListener(this); relativelayout_changepassword.setOnClickListener(this); relativelayout_shengqingshopping.setOnClickListener(this); wodezhongxin_xingxi.setOnClickListener(this); sp = getActivity().getSharedPreferences("config", 0); // username=getActivity().getIntent().getStringExtra("username"); // usernamephone=getActivity().getIntent().getStringExtra("usernamephone"); username=sp.getString("username", ""); usernamephone=sp.getString("usernamephone", ""); textview_username.setText(username); textview_usernamephone.setText(usernamephone); } @SuppressWarnings("unused") private void startOrderActivity(Class<?> clazz, int currentTab) { Intent intent = new Intent(getActivity(), clazz); intent.putExtra("data", currentTab); startActivity(intent); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.relativelayout_shopping: startActivity(new Intent(getActivity(), ShoppingCartActivity.class)); break; case R.id.relativelayout_address: Intent i=new Intent(getActivity(),AddressActivity.class); i.putExtra("tag","0"); startActivity(i); break; case R.id.wodezhongxin_xingxi: startActivity(new Intent(getActivity(), WoDeXiaoXiActivity.class)); break; case R.id.relativelayout_wodefabu: startActivity(new Intent(getActivity(), WoDeFaBuActivity.class)); break; case R.id.relativelayout_changepassword: Intent intent=new Intent(getActivity(),ChangePasswordActivity.class); intent.putExtra("username", username); intent.putExtra("usernamephone", usernamephone); startActivity(intent); break; case R.id.relativelayout_denglu: startActivity(new Intent(getActivity(), GeRenXingXiActivity.class)); break; case R.id.relativelayout_shengqingshopping: startActivity(new Intent(getActivity(), ShengQingShoppingActivity.class)); break; case R.id.linearlayout_quanbu: startOrderActivity(OrderActivity.class, 0); break; case R.id.linearlayout_daifukuan: startOrderActivity(OrderActivity.class, 1); break; case R.id.linearlayout_daifahua: startOrderActivity(OrderActivity.class, 2); break; case R.id.linearlayout_shouhuo: startOrderActivity(OrderActivity.class, 3); break; } } }
[ "782941853@qq.com" ]
782941853@qq.com
f2370968a8be40da1ce0d6b2d14bf67590586b0f
76467b9fabd8d976fcbe7039ba010747fa86cd40
/app/build/generated/source/r/release/com/onesignal/R.java
1f04ed1bdb5693dd59e455b5ac431feb3089741a
[]
no_license
cmFodWx5YWRhdjEyMTA5/Police_exam
c23665d67a75575a3fcaa1a71fef7b539b43493a
974aeae7579aed28062c5d4ad2888e6c193aa2a7
refs/heads/master
2020-06-24T15:53:58.600773
2019-04-11T06:39:16
2019-04-11T06:39:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
20,610
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package com.onesignal; public final class R { public static final class attr { public static final int adSize = 0x7f010044; public static final int adSizes = 0x7f010045; public static final int adUnitId = 0x7f010046; public static final int buttonSize = 0x7f01018d; public static final int circleCrop = 0x7f010159; public static final int colorScheme = 0x7f01018e; public static final int coordinatorLayoutStyle = 0x7f010009; public static final int font = 0x7f01014c; public static final int fontProviderAuthority = 0x7f010145; public static final int fontProviderCerts = 0x7f010148; public static final int fontProviderFetchStrategy = 0x7f010149; public static final int fontProviderFetchTimeout = 0x7f01014a; public static final int fontProviderPackage = 0x7f010146; public static final int fontProviderQuery = 0x7f010147; public static final int fontStyle = 0x7f01014b; public static final int fontWeight = 0x7f01014d; public static final int imageAspectRatio = 0x7f010158; public static final int imageAspectRatioAdjust = 0x7f010157; public static final int keylines = 0x7f01012b; public static final int layout_anchor = 0x7f01012e; public static final int layout_anchorGravity = 0x7f010130; public static final int layout_behavior = 0x7f01012d; public static final int layout_dodgeInsetEdges = 0x7f010132; public static final int layout_insetEdge = 0x7f010131; public static final int layout_keyline = 0x7f01012f; public static final int scopeUris = 0x7f01018f; public static final int statusBarBackground = 0x7f01012c; } public static final class bool { public static final int abc_action_bar_embed_tabs = 0x7f0d0000; } public static final class color { public static final int browser_actions_bg_grey = 0x7f0f0016; public static final int browser_actions_divider_color = 0x7f0f0017; public static final int browser_actions_text_color = 0x7f0f0018; public static final int browser_actions_title_color = 0x7f0f0019; public static final int common_google_signin_btn_text_dark = 0x7f0f008d; public static final int common_google_signin_btn_text_dark_default = 0x7f0f0023; public static final int common_google_signin_btn_text_dark_disabled = 0x7f0f0024; public static final int common_google_signin_btn_text_dark_focused = 0x7f0f0025; public static final int common_google_signin_btn_text_dark_pressed = 0x7f0f0026; public static final int common_google_signin_btn_text_light = 0x7f0f008e; public static final int common_google_signin_btn_text_light_default = 0x7f0f0027; public static final int common_google_signin_btn_text_light_disabled = 0x7f0f0028; public static final int common_google_signin_btn_text_light_focused = 0x7f0f0029; public static final int common_google_signin_btn_text_light_pressed = 0x7f0f002a; public static final int common_google_signin_btn_tint = 0x7f0f008f; public static final int notification_action_color_filter = 0x7f0f0000; public static final int notification_icon_bg_color = 0x7f0f005a; public static final int notification_material_background_media_default_color = 0x7f0f005b; public static final int primary_text_default_material_dark = 0x7f0f0061; public static final int ripple_material_light = 0x7f0f0067; public static final int secondary_text_default_material_dark = 0x7f0f0068; public static final int secondary_text_default_material_light = 0x7f0f0069; } public static final class dimen { public static final int browser_actions_context_menu_max_width = 0x7f0b005b; public static final int browser_actions_context_menu_min_padding = 0x7f0b005c; public static final int compat_button_inset_horizontal_material = 0x7f0b0060; public static final int compat_button_inset_vertical_material = 0x7f0b0061; public static final int compat_button_padding_horizontal_material = 0x7f0b0062; public static final int compat_button_padding_vertical_material = 0x7f0b0063; public static final int compat_control_corner_material = 0x7f0b0064; public static final int notification_action_icon_size = 0x7f0b00ce; public static final int notification_action_text_size = 0x7f0b00cf; public static final int notification_big_circle_margin = 0x7f0b00d0; public static final int notification_content_margin_start = 0x7f0b001a; public static final int notification_large_icon_height = 0x7f0b00d1; public static final int notification_large_icon_width = 0x7f0b00d2; public static final int notification_main_column_padding_top = 0x7f0b001b; public static final int notification_media_narrow_margin = 0x7f0b001c; public static final int notification_right_icon_size = 0x7f0b00d3; public static final int notification_right_side_padding_top = 0x7f0b0018; public static final int notification_small_icon_background_padding = 0x7f0b00d4; public static final int notification_small_icon_size_as_large = 0x7f0b00d5; public static final int notification_subtext_size = 0x7f0b00d6; public static final int notification_top_pad = 0x7f0b00d7; public static final int notification_top_pad_large_text = 0x7f0b00d8; } public static final class drawable { public static final int common_full_open_on_phone = 0x7f020060; public static final int common_google_signin_btn_icon_dark = 0x7f020061; public static final int common_google_signin_btn_icon_dark_focused = 0x7f020062; public static final int common_google_signin_btn_icon_dark_normal = 0x7f020063; public static final int common_google_signin_btn_icon_dark_normal_background = 0x7f020064; public static final int common_google_signin_btn_icon_disabled = 0x7f020065; public static final int common_google_signin_btn_icon_light = 0x7f020066; public static final int common_google_signin_btn_icon_light_focused = 0x7f020067; public static final int common_google_signin_btn_icon_light_normal = 0x7f020068; public static final int common_google_signin_btn_icon_light_normal_background = 0x7f020069; public static final int common_google_signin_btn_text_dark = 0x7f02006a; public static final int common_google_signin_btn_text_dark_focused = 0x7f02006b; public static final int common_google_signin_btn_text_dark_normal = 0x7f02006c; public static final int common_google_signin_btn_text_dark_normal_background = 0x7f02006d; public static final int common_google_signin_btn_text_disabled = 0x7f02006e; public static final int common_google_signin_btn_text_light = 0x7f02006f; public static final int common_google_signin_btn_text_light_focused = 0x7f020070; public static final int common_google_signin_btn_text_light_normal = 0x7f020071; public static final int common_google_signin_btn_text_light_normal_background = 0x7f020072; public static final int googleg_disabled_color_18 = 0x7f02007c; public static final int googleg_standard_color_18 = 0x7f02007d; public static final int ic_os_notification_fallback_white_24dp = 0x7f02008e; public static final int notification_action_background = 0x7f02009e; public static final int notification_bg = 0x7f02009f; public static final int notification_bg_low = 0x7f0200a0; public static final int notification_bg_low_normal = 0x7f0200a1; public static final int notification_bg_low_pressed = 0x7f0200a2; public static final int notification_bg_normal = 0x7f0200a3; public static final int notification_bg_normal_pressed = 0x7f0200a4; public static final int notification_icon_background = 0x7f0200a5; public static final int notification_template_icon_bg = 0x7f0200c3; public static final int notification_template_icon_low_bg = 0x7f0200c4; public static final int notification_tile_bg = 0x7f0200a6; public static final int notify_panel_notification_icon_bg = 0x7f0200a7; } public static final class id { public static final int action0 = 0x7f1100e5; public static final int action_container = 0x7f1100e2; public static final int action_divider = 0x7f1100e9; public static final int action_image = 0x7f1100e3; public static final int action_text = 0x7f1100e4; public static final int actions = 0x7f1100f2; public static final int adjust_height = 0x7f110058; public static final int adjust_width = 0x7f110059; public static final int async = 0x7f110052; public static final int auto = 0x7f11003e; public static final int blocking = 0x7f110053; public static final int bottom = 0x7f110042; public static final int browser_actions_header_text = 0x7f1100bb; public static final int browser_actions_menu_item_icon = 0x7f1100bd; public static final int browser_actions_menu_item_text = 0x7f1100be; public static final int browser_actions_menu_items = 0x7f1100bc; public static final int browser_actions_menu_view = 0x7f1100ba; public static final int button = 0x7f1100a6; public static final int cancel_action = 0x7f1100e6; public static final int center = 0x7f11003c; public static final int chronometer = 0x7f1100ee; public static final int dark = 0x7f110069; public static final int end = 0x7f11003d; public static final int end_padder = 0x7f1100f4; public static final int forever = 0x7f110054; public static final int icon = 0x7f110078; public static final int icon_group = 0x7f1100f3; public static final int icon_only = 0x7f110066; public static final int info = 0x7f1100ef; public static final int italic = 0x7f110055; public static final int left = 0x7f110046; public static final int light = 0x7f11006a; public static final int line1 = 0x7f110007; public static final int line3 = 0x7f110008; public static final int media_actions = 0x7f1100e8; public static final int none = 0x7f110029; public static final int normal = 0x7f110025; public static final int notification_background = 0x7f1100f0; public static final int notification_main_column = 0x7f1100eb; public static final int notification_main_column_container = 0x7f1100ea; public static final int os_bgimage_notif_bgimage = 0x7f110110; public static final int os_bgimage_notif_bgimage_align_layout = 0x7f11010f; public static final int os_bgimage_notif_bgimage_right_aligned = 0x7f110111; public static final int os_bgimage_notif_body = 0x7f110113; public static final int os_bgimage_notif_title = 0x7f110112; public static final int radio = 0x7f11008e; public static final int right = 0x7f110047; public static final int right_icon = 0x7f1100f1; public static final int right_side = 0x7f1100ec; public static final int standard = 0x7f110067; public static final int start = 0x7f110048; public static final int status_bar_latest_event_content = 0x7f1100e7; public static final int tag_transition_group = 0x7f110014; public static final int text = 0x7f110017; public static final int text1 = 0x7f1100db; public static final int text2 = 0x7f110018; public static final int time = 0x7f1100ed; public static final int title = 0x7f11001c; public static final int toolbar = 0x7f1100a8; public static final int top = 0x7f110049; public static final int wide = 0x7f110068; public static final int wrap_content = 0x7f11003b; } public static final class integer { public static final int cancel_button_image_alpha = 0x7f0e0005; public static final int google_play_services_version = 0x7f0e0008; public static final int status_bar_notification_info_maxnum = 0x7f0e000f; } public static final class layout { public static final int browser_actions_context_menu_page = 0x7f040022; public static final int browser_actions_context_menu_row = 0x7f040023; public static final int notification_action = 0x7f04003d; public static final int notification_action_tombstone = 0x7f04003e; public static final int notification_media_action = 0x7f04003f; public static final int notification_media_cancel_action = 0x7f040040; public static final int notification_template_big_media = 0x7f040041; public static final int notification_template_big_media_custom = 0x7f040042; public static final int notification_template_big_media_narrow = 0x7f040043; public static final int notification_template_big_media_narrow_custom = 0x7f040044; public static final int notification_template_custom_big = 0x7f040045; public static final int notification_template_icon_group = 0x7f040046; public static final int notification_template_lines_media = 0x7f040047; public static final int notification_template_media = 0x7f040048; public static final int notification_template_media_custom = 0x7f040049; public static final int notification_template_part_chronometer = 0x7f04004a; public static final int notification_template_part_time = 0x7f04004b; public static final int onesignal_bgimage_notif_layout = 0x7f04004d; } public static final class raw { public static final int consumer_onesignal_keep = 0x7f090000; } public static final class string { public static final int common_google_play_services_enable_button = 0x7f0a001b; public static final int common_google_play_services_enable_text = 0x7f0a001c; public static final int common_google_play_services_enable_title = 0x7f0a001d; public static final int common_google_play_services_install_button = 0x7f0a001e; public static final int common_google_play_services_install_text = 0x7f0a001f; public static final int common_google_play_services_install_title = 0x7f0a0020; public static final int common_google_play_services_notification_channel_name = 0x7f0a0021; public static final int common_google_play_services_notification_ticker = 0x7f0a0022; public static final int common_google_play_services_unknown_issue = 0x7f0a0023; public static final int common_google_play_services_unsupported_text = 0x7f0a0024; public static final int common_google_play_services_update_button = 0x7f0a0025; public static final int common_google_play_services_update_text = 0x7f0a0026; public static final int common_google_play_services_update_title = 0x7f0a0027; public static final int common_google_play_services_updating_text = 0x7f0a0028; public static final int common_google_play_services_wear_update_text = 0x7f0a0029; public static final int common_open_on_phone = 0x7f0a002a; public static final int common_signin_button_text = 0x7f0a002b; public static final int common_signin_button_text_long = 0x7f0a002c; public static final int fcm_fallback_notification_channel_label = 0x7f0a002d; public static final int gcm_fallback_notification_channel_label = 0x7f0a002e; public static final int s1 = 0x7f0a002f; public static final int s2 = 0x7f0a0030; public static final int s3 = 0x7f0a0031; public static final int s4 = 0x7f0a0032; public static final int s5 = 0x7f0a0033; public static final int s6 = 0x7f0a0034; public static final int s7 = 0x7f0a0035; public static final int status_bar_notification_info_overflow = 0x7f0a0037; } public static final class style { public static final int TextAppearance_Compat_Notification = 0x7f0c007d; public static final int TextAppearance_Compat_Notification_Info = 0x7f0c007e; public static final int TextAppearance_Compat_Notification_Info_Media = 0x7f0c007f; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c0136; public static final int TextAppearance_Compat_Notification_Line2_Media = 0x7f0c0137; public static final int TextAppearance_Compat_Notification_Media = 0x7f0c0080; public static final int TextAppearance_Compat_Notification_Time = 0x7f0c0081; public static final int TextAppearance_Compat_Notification_Time_Media = 0x7f0c0082; public static final int TextAppearance_Compat_Notification_Title = 0x7f0c0083; public static final int TextAppearance_Compat_Notification_Title_Media = 0x7f0c0084; public static final int Theme_AppInvite_Preview = 0x7f0c015c; public static final int Theme_AppInvite_Preview_Base = 0x7f0c000e; public static final int Theme_IAPTheme = 0x7f0c0163; public static final int Widget_Compat_NotificationActionContainer = 0x7f0c0089; public static final int Widget_Compat_NotificationActionText = 0x7f0c008a; public static final int Widget_Support_CoordinatorLayout = 0x7f0c0201; } public static final class styleable { public static final int[] AdsAttrs = { 0x7f010044, 0x7f010045, 0x7f010046 }; public static final int AdsAttrs_adSize = 0; public static final int AdsAttrs_adSizes = 1; public static final int AdsAttrs_adUnitId = 2; public static final int[] CoordinatorLayout = { 0x7f01012b, 0x7f01012c }; public static final int[] CoordinatorLayout_Layout = { 0x010100b3, 0x7f01012d, 0x7f01012e, 0x7f01012f, 0x7f010130, 0x7f010131, 0x7f010132 }; public static final int CoordinatorLayout_Layout_android_layout_gravity = 0; public static final int CoordinatorLayout_Layout_layout_anchor = 2; public static final int CoordinatorLayout_Layout_layout_anchorGravity = 4; public static final int CoordinatorLayout_Layout_layout_behavior = 1; public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 6; public static final int CoordinatorLayout_Layout_layout_insetEdge = 5; public static final int CoordinatorLayout_Layout_layout_keyline = 3; public static final int CoordinatorLayout_keylines = 0; public static final int CoordinatorLayout_statusBarBackground = 1; public static final int[] FontFamily = { 0x7f010145, 0x7f010146, 0x7f010147, 0x7f010148, 0x7f010149, 0x7f01014a }; public static final int[] FontFamilyFont = { 0x01010532, 0x01010533, 0x0101053f, 0x0101056f, 0x01010570, 0x7f01014b, 0x7f01014c, 0x7f01014d, 0x7f01014e, 0x7f01014f }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_font = 6; public static final int FontFamilyFont_fontStyle = 5; public static final int FontFamilyFont_fontWeight = 7; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 3; public static final int FontFamily_fontProviderFetchStrategy = 4; public static final int FontFamily_fontProviderFetchTimeout = 5; public static final int FontFamily_fontProviderPackage = 1; public static final int FontFamily_fontProviderQuery = 2; public static final int[] LoadingImageView = { 0x7f010157, 0x7f010158, 0x7f010159 }; public static final int LoadingImageView_circleCrop = 2; public static final int LoadingImageView_imageAspectRatio = 1; public static final int LoadingImageView_imageAspectRatioAdjust = 0; public static final int[] SignInButton = { 0x7f01018d, 0x7f01018e, 0x7f01018f }; public static final int SignInButton_buttonSize = 0; public static final int SignInButton_colorScheme = 1; public static final int SignInButton_scopeUris = 2; } }
[ "Sravi.gtech@gmail.com" ]
Sravi.gtech@gmail.com
8b6f30b0f4492814c70c91732e2c6a0c38a9341d
9b537c88e78b82f58e04171d6d68ace7a2b66ab7
/integration-test/src/main/java/com/sequenceiq/it/cloudbreak/action/v4/util/CheckRightRawAction.java
2fecf3338f3a106e1008ec86e9be8c2be9cd0323
[ "LicenseRef-scancode-warranty-disclaimer", "ANTLR-PD", "CDDL-1.0", "bzip2-1.0.6", "Zlib", "BSD-3-Clause", "MIT", "EPL-1.0", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-jdbm-1.00", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
stoty/cloudbreak
10d9eea4961e43533088467f9ff58221abaf0f1b
a8afecf96a02d2ccdb8abf9c329f8269c7b4264d
refs/heads/master
2022-03-12T03:39:52.991951
2022-01-26T15:23:41
2022-01-26T15:23:41
224,849,359
0
0
Apache-2.0
2019-11-29T12:23:00
2019-11-29T12:23:00
null
UTF-8
Java
false
false
1,083
java
package com.sequenceiq.it.cloudbreak.action.v4.util; import javax.ws.rs.client.Entity; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.sequenceiq.it.cloudbreak.CloudbreakClient; import com.sequenceiq.it.cloudbreak.action.Action; import com.sequenceiq.it.cloudbreak.context.TestContext; import com.sequenceiq.it.cloudbreak.dto.RawCloudbreakTestDto; public class CheckRightRawAction implements Action<RawCloudbreakTestDto, CloudbreakClient> { private static final Logger LOGGER = LoggerFactory.getLogger(CheckRightRawAction.class); @Override public RawCloudbreakTestDto action(TestContext testContext, RawCloudbreakTestDto testDto, CloudbreakClient cloudbreakClient) throws Exception { Response response = cloudbreakClient.getRawClient().path("v4/utils/check_right").request() .post(Entity.entity(testDto.getRequestJson(), MediaType.APPLICATION_JSON_TYPE)); testDto.setResponse(response.readEntity(String.class)); return testDto; } }
[ "laci.nardai@gmail.com" ]
laci.nardai@gmail.com
6f176e8b1903829b242044e4398ca807d173f9a1
0981040a1e600734006ad3b2f6d0fc079d7ffc00
/src/main/java/com/jiayaxing/web/config/shiro/RolesAuthorizationFilter.java
366013c0d049b7de264bd6ef97aab33bf20cb18b
[ "Apache-2.0" ]
permissive
jiayaxing/web
5625d76774ec19aa3318f0623d976adc18891100
63f480107581e2cb729af30277a9c1ba727a0765
refs/heads/master
2020-03-21T15:33:53.891825
2018-08-26T06:24:20
2018-08-26T06:24:20
138,720,005
0
0
null
null
null
null
UTF-8
Java
false
false
888
java
package com.jiayaxing.web.config.shiro; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.apache.shiro.subject.Subject; import org.apache.shiro.web.filter.authz.AuthorizationFilter; public class RolesAuthorizationFilter extends AuthorizationFilter{ @Override protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception { Subject subject = getSubject(request, response); String[] rolesArray = (String[]) mappedValue; if (rolesArray == null || rolesArray.length == 0) { //没有角色限制,有权限访问 return true; } for (int i = 0; i < rolesArray.length; i++) { if (subject.hasRole(rolesArray[i])) { //若当前用户是rolesArray中的任何一个,则有权限访问 return true; } } return false; } }
[ "904133395@qq.com" ]
904133395@qq.com
12628b8524a3043edae30a1fc70182383cf21f49
cc54f05d10bb77f0df4425e442ce9a8741a63e2b
/barghos-structs/src/main/java/org/barghos/structs/simpletree/TreeEvaluation.java
d0b012a5df994c216f138eb7635f95967427ae07
[ "MIT" ]
permissive
picatrix1899/barghos-old
85a01388eaf4fa23e0de6b39cde8c6c62675e778
9c848eb6d057e21500b2ad99e9222fde850e988a
refs/heads/master
2022-11-26T16:47:51.210833
2020-08-03T21:30:17
2020-08-03T21:30:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,209
java
/* MIT License Copyright (c) 2019 picatrix1899 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.barghos.structs.simpletree; public interface TreeEvaluation<E> { boolean eval(E data); }
[ "FlorianZilkenat@gmx.de" ]
FlorianZilkenat@gmx.de
90ef6e1aab5408bf5e06ea18a7d20acfcfe41b96
83c62de257ac87fb05ed74398d25a3829b3d20ba
/src/jungle/CongoJungleBuilder.java
d2cecad9060d836f83594fc6a377b5c79ebd9fc5
[]
no_license
miguelfagundez/Jungle
4cd11014634b86783b0fb78680fcf4a1e01f0fb0
afb368433253e6abbd5b29165345b1781673f423
refs/heads/master
2020-12-08T18:15:13.049180
2020-01-10T13:53:18
2020-01-10T13:53:18
232,921,240
0
0
null
null
null
null
UTF-8
Java
false
false
1,017
java
package jungle; import animal.Animal; import animal.Monkey; import animal.Snake; import animal.Tiger; /** * CongoJungleBuilder class. * It will construct a jungle (Congo). * @author Miguel Fagundez * @since 01/09/2020 * @version 1.2 */ public class CongoJungleBuilder implements JungleBuilder { /* * Jungle Member * */ private Jungle jungle; /* * Constructor * */ public CongoJungleBuilder() { this.jungle = new Jungle("Congo"); } @Override public void buildTigers() { Animal tiger = new Tiger(); jungle.addNewTiger(tiger); } @Override public void buildMonkeys() { Animal monkey = new Monkey(); jungle.addNewMonkey(monkey); monkey = new Monkey(); jungle.addNewMonkey(monkey); } @Override public void buildSnakes() { Animal snake = new Snake(); jungle.addNewSnake(snake); } @Override public Jungle getJungle() { return this.jungle; } }
[ "fagundezdev@gmail.com" ]
fagundezdev@gmail.com
9845f0fd00419acf2bf293a95feff61bf5e97d68
fc1ca9fba459cd435d64d6c5a1ba1010babd9885
/mujavaHome/result/SpeedControl/traditional_mutants/void_enableControl()/LOI_5/SpeedControl.java
45700a22071e246e754c85af199466458465e1d7
[]
no_license
xiaokeliu666/StateMachineTesting_CruiseControl
24c93abf10b154ed71a9c6f9ad32aa4b7656f198
c62358df18a1ebfbbd6edb3ef5d257ade46052d2
refs/heads/master
2020-12-15T04:09:05.786109
2020-01-20T00:27:27
2020-01-20T00:27:27
234,988,572
0
0
null
null
null
null
UTF-8
Java
false
false
1,702
java
// This is a mutant program. // Author : ysma package simulate; import simulate.CarSimulator; class SpeedControl implements java.lang.Runnable { static final int DISABLED = 0; static final int ENABLED = 1; private int state = DISABLED; private int setSpeed = 0; private java.lang.Thread speedController; private simulate.CarSimulator cs; SpeedControl( simulate.CarSimulator cs ) { this.cs = cs; } synchronized void recordSpeed() { setSpeed = cs.getSpeed(); } synchronized void clearSpeed() { if (state == DISABLED) { setSpeed = 0; } } synchronized void enableControl() { if (state == ~DISABLED) { speedController = new java.lang.Thread( this ); speedController.start(); state = ENABLED; } } synchronized void disableControl() { if (state == ENABLED) { state = DISABLED; } } public void run() { try { while (state == ENABLED) { if (state == ENABLED) { synchronized (this) { double error = (float) (setSpeed - cs.getSpeed()) / 6.0; double steady = (double) setSpeed / 12.0; cs.setThrottle( steady + error ); } } Thread.sleep( 500 ); } } catch ( java.lang.InterruptedException e ) { } speedController = null; } public int getState() { return state; } public int getCruiseSpeed() { return setSpeed; } }
[ "xliu294@uottawa.ca" ]
xliu294@uottawa.ca
e8903f6a82ee26a3398884b5467f1a96000cd595
ae5fecc20656a5e008673a1a9ec0f15250b7fa93
/SevenSort/src/SevenSort/InsertSort/BinInsertSort.java
1f14e2fac19b59b5349ac0fd15129875d368c87c
[]
no_license
MM104613/java
455d438b96906b5384aaf06427096f6f0280dcf2
721d246546fa5642c24d2d4d3532ce8d35b54128
refs/heads/master
2020-05-17T14:56:35.632955
2019-09-14T11:43:55
2019-09-14T11:43:55
183,778,357
0
0
null
null
null
null
UTF-8
Java
false
false
805
java
package SevenSort.InsertSort; //二分排序 public class BinInsertSort { public static void BinInsert(int arr[]){ int n = arr.length; if(n <= 1){ return; }else{ int low,mid,high,j; for(int i = 1;i < n;i++){ int values = arr[i];//未排序第一个数 low = 0; high = i-1; while(low <= high){ mid = (low + high)/2; if(arr[mid] < values){ low = mid+1; }else { high = mid - 1; } } for(j = i-1; j >high;j--){ arr[j+1] = arr[j]; } arr[j+1] = values; } } } }
[ "624244368@qq.com" ]
624244368@qq.com
1c0f2d2e4bac63a47f5d74eb9dcfd060bc21ba9e
0a4b7636cd35e54ae5a908c6fddb7802fbd43335
/src/ide/control/GrooveCompletionProvider.java
7ede4c7456ab36b2d44889bcb91dde671ed82847
[]
no_license
suppressf0rce/groove
000f1c418786127012274c67d7659e0b341edf2a
1d4641c419106184c7b746d22c7ac5d45b249479
refs/heads/master
2021-09-14T11:10:12.105554
2018-05-12T13:26:16
2018-05-12T13:26:16
115,052,203
0
0
null
null
null
null
UTF-8
Java
false
false
3,694
java
package ide.control; import org.fife.ui.autocomplete.BasicCompletion; import org.fife.ui.autocomplete.DefaultCompletionProvider; import org.fife.ui.autocomplete.ShorthandCompletion; public class GrooveCompletionProvider extends DefaultCompletionProvider { public GrooveCompletionProvider() { this.addCompletion(new BasicCompletion(this, "void")); this.addCompletion(new BasicCompletion(this, "boolean")); this.addCompletion(new BasicCompletion(this, "int")); this.addCompletion(new BasicCompletion(this, "long")); this.addCompletion(new BasicCompletion(this, "float")); this.addCompletion(new BasicCompletion(this, "double")); this.addCompletion(new BasicCompletion(this, "char")); this.addCompletion(new BasicCompletion(this, "string")); this.addCompletion(new BasicCompletion(this, "package")); this.addCompletion(new BasicCompletion(this, "import")); this.addCompletion(new BasicCompletion(this, "let")); this.addCompletion(new BasicCompletion(this, "be")); this.addCompletion(new BasicCompletion(this, "function")); this.addCompletion(new BasicCompletion(this, "class")); this.addCompletion(new BasicCompletion(this, "interface")); this.addCompletion(new BasicCompletion(this, "enum")); this.addCompletion(new BasicCompletion(this, "extends")); this.addCompletion(new BasicCompletion(this, "implements")); this.addCompletion(new BasicCompletion(this, "true")); this.addCompletion(new BasicCompletion(this, "false")); this.addCompletion(new BasicCompletion(this, "private")); this.addCompletion(new BasicCompletion(this, "public")); this.addCompletion(new BasicCompletion(this, "protected")); this.addCompletion(new BasicCompletion(this, "abstract")); this.addCompletion(new BasicCompletion(this, "static")); this.addCompletion(new BasicCompletion(this, "final")); this.addCompletion(new BasicCompletion(this, "super")); this.addCompletion(new BasicCompletion(this, "break")); this.addCompletion(new BasicCompletion(this, "continue")); this.addCompletion(new BasicCompletion(this, "return")); this.addCompletion(new BasicCompletion(this, "if")); this.addCompletion(new BasicCompletion(this, "else")); this.addCompletion(new BasicCompletion(this, "switch")); this.addCompletion(new BasicCompletion(this, "case")); this.addCompletion(new BasicCompletion(this, "default")); this.addCompletion(new BasicCompletion(this, "while")); this.addCompletion(new BasicCompletion(this, "for")); this.addCompletion(new BasicCompletion(this, "do")); this.addCompletion(new BasicCompletion(this, "try")); this.addCompletion(new BasicCompletion(this, "catch")); this.addCompletion(new BasicCompletion(this, "throw")); this.addCompletion(new BasicCompletion(this, "throws")); this.addCompletion(new BasicCompletion(this, "new")); this.addCompletion(new BasicCompletion(this, "this")); this.addCompletion(new BasicCompletion(this, "end")); this.addCompletion(new BasicCompletion(this, "and")); this.addCompletion(new BasicCompletion(this, "or")); this.addCompletion(new BasicCompletion(this, "is")); this.addCompletion(new BasicCompletion(this, "not")); ShorthandCompletion main = new ShorthandCompletion(this, "main", "let function main() be void:\n\nend"); main.setSummary("Groove mandatory main function:\n\n\nlet function main() be void:\n\nend"); this.addCompletion(main); } }
[ "suppressforce@gmail.com" ]
suppressforce@gmail.com
57764fcf8d0d71e1276605d2d9a9d089caf046ac
08c5c697ff54cd96b88ccfb53d9a9a20d2edd4fd
/src/main/java/wjh/graduationproject/entity/UserEntity.java
e2f192be42982e7183349b3b7058c135482e1af5
[]
no_license
wangjianghe/studyProject
da8108747f88c5591bd966548d9f339b6582669c
2bfe7c60f470e6a7327440ef4e790aca15538705
refs/heads/master
2022-07-22T11:08:22.849415
2019-06-13T13:31:22
2019-06-13T13:46:02
191,764,929
0
0
null
2020-07-01T23:27:21
2019-06-13T13:06:57
JavaScript
UTF-8
Java
false
false
2,502
java
package wjh.graduationproject.entity; import java.util.Arrays; import java.util.Date; /** * Created by Administrator on 2019/4/7. */ public class UserEntity { private String id; private String userName; private String password; private String email; private int status; private Date sessionTime; /** * 0 管理员 1 普通用户 */ private int types; private Object[] otherData; public UserEntity() { } public UserEntity(String id, String userName, String password, String email, int status, Date sessionTime, int types, Object[] otherData) { this.id = id; this.userName = userName; this.password = password; this.email = email; this.status = status; this.sessionTime = sessionTime; this.types = types; this.otherData = otherData; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public int getTypes() { return types; } public void setTypes(int types) { this.types = types; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Date getSessionTime() { return sessionTime; } public void setSessionTime(Date sessionTime) { this.sessionTime = sessionTime; } public Object[] getOtherData() { return otherData; } public void setOtherData(Object[] otherData) { this.otherData = otherData; } @Override public String toString() { return "UserEntity{" + "id='" + id + '\'' + ", userName='" + userName + '\'' + ", password='" + password + '\'' + ", email='" + email + '\'' + ", status=" + status + ", sessionTime=" + sessionTime + ", types=" + types + ", otherData=" + Arrays.toString(otherData) + '}'; } }
[ "1026451892@qq.com" ]
1026451892@qq.com
43d81d1f59dd2afe2d1aa9ac6c6ede1b50bf678d
404bca26f71abefbee9a583c2d986f8edd834570
/SOA-WebServices/Sample-Projects/Web-Services/DynamicCall-Client/src/DynamicClient.java
1580a6394da078501fae35e4ac8fe1b85a9d52ee
[]
no_license
XI1361-NitinShinde/Xebia-Training
74c1354b5dfb174d5919579e000a3385f2380422
eb81897853f8096aeaeddd748e2055cf9b6fafea
refs/heads/master
2022-03-22T13:49:05.403000
2019-11-28T18:33:30
2019-11-28T18:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,747
java
import java.net.MalformedURLException; import java.rmi.RemoteException; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.encoding.XMLType; import org.apache.axis.utils.Options; import javax.xml.rpc.ParameterMode; import javax.xml.rpc.ServiceException; //This program looks into the url and dynamically invokes the speciffied opeartions //No need for proxy interface or Stub classes on client side public class DynamicClient { public static void main(String[] args) throws RemoteException, ServiceException, MalformedURLException { String endpoint = "http://localhost:8090/FirstService/services/Account"; String method = "getAccountName"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint) ); call.setOperationName(method); call.addParameter( "acNo", XMLType.XSD_INT, ParameterMode.IN ); call.setReturnType( XMLType.XSD_STRING ); //Default return type ? //Above call paarms should be specified if you want to get //other than string as return type Object result = call.invoke( new Object [] {7689});//number as param System.out.println("Received result in Dy call client for name : " + result); call.clearOperation(); call.setOperationName("readAccountBalance"); call.addParameter( "acNo", XMLType.XSD_STRING, ParameterMode.IN ); call.setReturnType( XMLType.XSD_INT ); result = call.invoke( new Object [] {"UserName"}); System.out.println("Received result in Dy call client for balance : " + result); } }
[ "nshinde@xebia.com" ]
nshinde@xebia.com
acd286eb041d0ffa6ca3987b5b3ec104c6a70f4c
fd9933ee7ae49786f74b81af4a43f2ed04e12444
/2017-04-21/Shapes.java
5aaf766c9e9630443f18c14ee9584d70f171dcb0
[]
no_license
rhaydar/WebDevelopmentCourse
18648d465e3e5a1cba5f58be712f7803ac4c061e
fd56d4d1fed035d280fb318e10683a8b49891196
refs/heads/master
2021-01-19T22:07:56.103027
2017-05-23T13:31:56
2017-05-23T13:31:56
88,753,904
0
0
null
null
null
null
UTF-8
Java
false
false
1,192
java
class TwoDShape { double width; double height; void showDim() { System.out.println("Width: " + width + ", Height: " + height); } } class Triangle extends TwoDShape { String style; double area() { return width*height/2; } void showStyle() { System.out.println("The style is " + style); } } class Rectangle extends TwoDShape { boolean isSquare() { if (width == height) { return true; } else { return false; } } double area() { return width*height; } } class Shapes { public static void main(String[] args) { Triangle t1 = new Triangle(); t1.width = 10.0; t1.height = 13.5; t1.style = "filled"; System.out.println("Info on t1:"); t1.showDim(); t1.showStyle(); System.out.println(t1.area()); System.out.println(); System.out.println("Info on twoD:"); TwoDShape twoD = new TwoDShape(); twoD.width = 5; twoD.height = 4; twoD.showDim(); System.out.println(); System.out.println("Info on r1:"); Rectangle r1 = new Rectangle(); r1.width = 3; r1.height = 8; System.out.println(r1.isSquare()); System.out.println(r1.area()); System.out.println(); } }
[ "rhaydar8@gmail.com" ]
rhaydar8@gmail.com
5ae37e48e601f6f4e34da9a39985644652048510
ea4cf5e3992a491ed879f8e45641608cedf69f1f
/ShortUrlCore/src/main/java/com/youshusoft/util/Base64Util.java
8a0c842904d17092fc9526a0ef03bb5bd7937f3a
[]
no_license
ganxiaomao/ShortUrl
ec2c604f3b58d43f83862fc1275bb73a151a5e10
4682e6cbe2685a6c1ffb1c900d8229d855b2ba65
refs/heads/master
2020-03-19T09:41:54.785599
2016-03-02T15:06:15
2016-03-02T15:06:15
null
0
0
null
null
null
null
GB18030
Java
false
false
572
java
package com.youshusoft.util; import org.apache.commons.codec.binary.Base64; public class Base64Util { /** * BASE64字符串转为二进制数据 * @param bytes * @return */ public static byte[] decode(String str) { return Base64.decodeBase64(str.getBytes()); } /** * 二进制数据编码为BASE64字符串 * * @param bytes * @return * @throws Exception */ public static String encode(final byte[] bytes) { return new String(Base64.encodeBase64(bytes)); } }
[ "youshusoft@gmail.com" ]
youshusoft@gmail.com
3ec955c1adae99b304a1cbf86fcc3703f32a61df
39a7a56a6684c83c51524a1f17bd6051d5bc767c
/src/main/java/my/code/repository/custom/view/EstimateCheckBox.java
3e4e97c7b8555d6f93aca34baf288f2f0a4b3cd1
[]
no_license
djh2717/myToolRepository
00541fa80619eeee850f2464a532fba07a759ab2
b8bae60f5c9c8e8559dcac73ec264ed7023c896b
refs/heads/master
2021-07-17T07:15:33.427741
2018-11-27T14:25:23
2018-11-27T14:25:23
141,550,480
1
0
null
null
null
null
UTF-8
Java
false
false
3,227
java
package my.code.repository.custom.view; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.RectF; import androidx.appcompat.widget.AppCompatCheckBox; import android.util.AttributeSet; import android.view.MotionEvent; import my.demo.one.R; /** * A score component,implement by AppCompatCheckBox,direct use in xml. * Usually use the five same this. * notice: Must set the mLocation,mScoreBoolean and other estimateCheckBox. * * @author djh */ public class EstimateCheckBox extends AppCompatCheckBox { /** * This location in the estimateCheckBoxes. */ public int location; public boolean[] scoreBoolean; /** * Other estimateCheckBox,usually is five. */ public EstimateCheckBox[] estimateCheckBoxes; private RectF mRectF; private Paint mPaint; private Bitmap mCheckBitmap; private Bitmap mNotCheckBitmap; public EstimateCheckBox(Context context, AttributeSet attrs) { super(context, attrs); mCheckBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.grade2); mNotCheckBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.grade); mPaint = new Paint(); mPaint.setDither(true); mPaint.setAntiAlias(true); mRectF = new RectF(); } @Override protected void onDraw(Canvas canvas) { mRectF.top = 0; mRectF.left = 0; mRectF.right = getMeasuredWidth(); mRectF.bottom = getMeasuredHeight(); if (isChecked()) { canvas.drawBitmap(mCheckBitmap, null, mRectF, mPaint); } else { canvas.drawBitmap(mNotCheckBitmap, null, mRectF, mPaint); } } @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent event) { if (estimateCheckBoxes != null && scoreBoolean != null && estimateCheckBoxes.length == scoreBoolean.length) { switch (event.getAction()) { case MotionEvent.ACTION_UP: //Can not set your mLocation as true,otherwise after //trigger onCheck it again become false. for (int j = 0; j < location; j++) { scoreBoolean[j] = true; } for (int j = location; j < scoreBoolean.length; j++) { scoreBoolean[j] = false; } //According to the scoreBoolean values,set the estimateCheckBox state. for (int j = 0; j < scoreBoolean.length; j++) { estimateCheckBoxes[j].setChecked(scoreBoolean[j]); } //After set checked,set you location boolean as true. scoreBoolean[location] = true; break; default: break; } } else { throw new RuntimeException("EstimateCheckBox is not work correct"); } return super.onTouchEvent(event); } }
[ "1544579459@qq.com" ]
1544579459@qq.com
53e8e89cf41136e9de3c76aa8cf461aa6efa1a90
387bcac4cebd74a30c3b6459864346be98101fec
/app/src/main/java/club/quan9/hailstonerobot/AboutActivity.java
db8ab2260b45929e35047d336c5ccac3986494ce
[]
no_license
ws752499660/HailstoneRobot
29554950a97d3726b2396325c56d628041b887b0
23d4ef7a64a02cb2768c62e43e4bfd2487873a8d
refs/heads/master
2020-03-16T17:51:30.637802
2019-06-27T15:18:38
2019-06-27T15:18:38
132,849,753
1
1
null
null
null
null
UTF-8
Java
false
false
344
java
package club.quan9.hailstonerobot; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); } }
[ "ws752499660@foxmail.com" ]
ws752499660@foxmail.com
6e7b4fe55b14948f659548d9205d5e8ceade3ca3
398c6c6bb6546c9384a83e5d465eef5b5dda3591
/app/src/main/java/com/oxoo/spagreen/models/CommonModels.java
d638da62187a5b5713eac83f41d05db35b1bd5b6
[]
no_license
Testing-Repos/Source
66dbfac9aec74e6cd48121ca7291e7a8ee004f73
ae3b3ab317ab3a05a619e43f2ead6c6eed1b0d1f
refs/heads/master
2020-07-01T03:02:29.466146
2019-07-13T05:19:41
2019-08-07T10:21:22
201,026,365
0
0
null
null
null
null
UTF-8
Java
false
false
2,909
java
package com.oxoo.spagreen.models; import android.graphics.drawable.Drawable; import java.util.ArrayList; import java.util.List; public class CommonModels { public String id; public int image; public String imageUrl; public Drawable imageDrw; public String title; public String brief; public String stremURL; public String videoType; public String serverType; public List<EpiModel> listEpi=new ArrayList<>(); public String subtitleURL; public List<SubtitleModel> listSub = new ArrayList<>(); public List<SubtitleModel> getListSub() { return listSub; } public void setListSub(List<SubtitleModel> listSub) { this.listSub = listSub; } //-----tv item------------ String tvName,posterUrl; //ArrayList<EpiModel> epiModels; public String getSubtitleURL() { return subtitleURL; } public void setSubtitleURL(String subtitleURL) { this.subtitleURL = subtitleURL; } public List<EpiModel> getListEpi() { return listEpi; } public void setListEpi(List<EpiModel> listEpi) { this.listEpi = listEpi; } public String getVideoType() { return videoType; } public void setVideoType(String videoType) { this.videoType = videoType; } public String getServerType() { return serverType; } public void setServerType(String serverType) { this.serverType = serverType; } public String getStremURL() { return stremURL; } public void setStremURL(String stremURL) { this.stremURL = stremURL; } public String getTvName() { return tvName; } public void setTvName(String tvName) { this.tvName = tvName; } public String getPosterUrl() { return posterUrl; } public void setPosterUrl(String posterUrl) { this.posterUrl = posterUrl; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public String getId() { return id; } public void setId(String id) { this.id = id; } public int getImage() { return image; } public void setImage(int image) { this.image = image; } public Drawable getImageDrw() { return imageDrw; } public void setImageDrw(Drawable imageDrw) { this.imageDrw = imageDrw; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getBrief() { return brief; } public void setBrief(String brief) { this.brief = brief; } }
[ "abhirajsinghofficial@gmail.com" ]
abhirajsinghofficial@gmail.com
5747c49aa34e457fa5cd2239fc7cedd9cbaaa4da
160a34361073a54d39ffa14fdae6ce3cbc7d6e6b
/src/main/java/com/alipay/api/request/AlipayOpenServicemarketYcstestQueryRequest.java
e554dda730e250c253f2c39c0f21da502b6b32e9
[ "Apache-2.0" ]
permissive
appbootup/alipay-sdk-java-all
6a5e55629b9fc77e61ee82ea2c4cdab2091e0272
9ae311632a4053b8e5064b83f97cf1503a00147b
refs/heads/master
2020-05-01T09:45:44.940180
2019-03-15T09:52:14
2019-03-15T09:52:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,039
java
package com.alipay.api.request; import com.alipay.api.domain.AlipayOpenServicemarketYcstestQueryModel; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.AlipayOpenServicemarketYcstestQueryResponse; import com.alipay.api.AlipayObject; /** * ALIPAY API: alipay.open.servicemarket.ycstest.query request * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayOpenServicemarketYcstestQueryRequest implements AlipayRequest<AlipayOpenServicemarketYcstestQueryResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 时劼的测试api */ private String bizContent; public void setBizContent(String bizContent) { this.bizContent = bizContent; } public String getBizContent() { return this.bizContent; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; private String returnUrl; private boolean needEncrypt=true; private AlipayObject bizModel=null; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getReturnUrl() { return this.returnUrl; } public void setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "alipay.open.servicemarket.ycstest.query"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("biz_content", this.bizContent); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<AlipayOpenServicemarketYcstestQueryResponse> getResponseClass() { return AlipayOpenServicemarketYcstestQueryResponse.class; } public boolean isNeedEncrypt() { return this.needEncrypt; } public void setNeedEncrypt(boolean needEncrypt) { this.needEncrypt=needEncrypt; } public AlipayObject getBizModel() { return this.bizModel; } public void setBizModel(AlipayObject bizModel) { this.bizModel=bizModel; } }
[ "liuqun.lq@alibaba-inc.com" ]
liuqun.lq@alibaba-inc.com
bf0441d603a9f5f39b24e3a30984f04df2910ebd
97620186f6a73590cecd764e5896b524054f69d6
/src/org/cict/reports/checklist/BITCT.java
bd8240c6a3fed9280667fbe09e1e08d99de55753
[]
no_license
joemardc98/Enrollment-Evaluation-Management-System
cd541a1ac356da0fda38202e0b84b1bee1afd677
a1844f05da08096a2277c8a8a3c20f3ae97f4048
refs/heads/master
2021-08-15T22:31:25.142262
2017-11-18T12:03:02
2017-11-18T12:03:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
19,829
java
package org.cict.reports.checklist; import app.lazy.models.SubjectMapping; import artifacts.ResourceManager; import com.itextpdf.text.BaseColor; import com.itextpdf.text.Chunk; import java.io.FileOutputStream; import java.io.IOException; import com.itextpdf.text.Rectangle; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Element; import com.itextpdf.text.Font; import com.itextpdf.text.Font.FontFamily; import com.itextpdf.text.Image; import com.itextpdf.text.Paragraph; import com.itextpdf.text.Phrase; import com.itextpdf.text.Utilities; import com.itextpdf.text.pdf.BaseFont; import com.itextpdf.text.pdf.ColumnText; import com.itextpdf.text.pdf.PdfContentByte; import com.itextpdf.text.pdf.PdfPCell; import com.itextpdf.text.pdf.PdfPTable; import com.itextpdf.text.pdf.PdfPageEventHelper; import com.itextpdf.text.pdf.PdfWriter; import java.awt.Desktop; import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.HashMap; import org.cict.reports.ReportsDirectory; public class BITCT { // public static String document = ""; public static String RESULT = ""; public BITCT(String filename) { RESULT = filename;//"reports/checklist/" + BSIT1516.document + ".pdf"; } public int print() { try { init(); int val = createPdf(RESULT); if(val==1) System.out.println("Please close the previous report"); /* -------- run the created pdf */ if (Desktop.isDesktopSupported()) { try { File myFile = new File(RESULT); Desktop.getDesktop().open(myFile); } catch (IOException ex) { // no application registered for PDFs } } /** * ****************** end run */ } catch (Exception e) { e.printStackTrace(); } return 0; } /** * PUBLIC VARIABLES */ public String STUDENT_NUMBER = "", STUDENT_NAME = "", STUDENT_ADDRESS = "", STUDENT_HS = "", IMAGE_LOCATION = ReportsDirectory.DEFAULT_IMAGE2x2; public Integer ADMISSION_YEAR = 2014; public HashMap<String,ArrayList<Object[]>> SUBJECTS_PER_SEM = new HashMap<String, ArrayList<Object[]>>(); /** * FONTS */ private static final Font font7Plain = new Font(FontFamily.HELVETICA, 7); private static final Font font7Bold = new Font(FontFamily.HELVETICA, 7, Font.BOLD); private static final Font font6Plain = new Font(FontFamily.HELVETICA, 6); private static final Font font6Bold = new Font(FontFamily.HELVETICA, 6, Font.BOLD); private static final Font font5BoldItalic = new Font(FontFamily.HELVETICA, 5, Font.BOLDITALIC); private static final Font font5Plain = new Font(FontFamily.HELVETICA, 5); private static final Font font5Bold = new Font(FontFamily.HELVETICA, 5, Font.BOLD); /** * PRIVATE VARIABLES */ private String studentNo, name, address, highSchool, image1x1; private Integer admissionYear; private HashMap<String,ArrayList<Object[]>> subjectsPerSem = new HashMap<String, ArrayList<Object[]>>(); public void init() { this.studentNo = this.STUDENT_NUMBER; this.name = this.STUDENT_NAME; this.address = this.STUDENT_ADDRESS; this.highSchool = this.STUDENT_HS; this.subjectsPerSem = this.SUBJECTS_PER_SEM; this.admissionYear = this.ADMISSION_YEAR; this.image1x1 = IMAGE_LOCATION; } private static PdfWriter writer; /** * Creates a PDF document. * * @param filename the path to the new PDF document * @throws DocumentException * @throws IOException */ public int createPdf(String filename) throws DocumentException, IOException { Document document = new Document(new Rectangle(Utilities.inchesToPoints(8.5f), Utilities.inchesToPoints(13f)), 50, 50, 70, 50); //lrtb try{ writer = PdfWriter.getInstance(document, new FileOutputStream(filename)); }catch(FileNotFoundException es){ return 1; } document.open(); String location_logo1 = ReportsDirectory.REPORTS_DIR_IMAGES + "checklist/BULSU.png", location_logo2 = ReportsDirectory.REPORTS_DIR_IMAGES + "checklist/CICT.png"; // add bulsu logo Image img = Image.getInstance(ResourceManager.fetchFromResource(BITCT.class, location_logo1)); img.setAbsolutePosition(32, 815); //position img.scaleAbsolute(52, 52); //size document.add(img); // add cict logo Image img2 = Image.getInstance(ResourceManager.fetchFromResource(BITCT.class, location_logo2)); img2.setAbsolutePosition(85, 815); //position img2.scaleAbsolute(52, 52); //size document.add(img2); document.add(createHeader()); try { Image image1X1 = Image.getInstance(image1x1); image1X1.setAbsolutePosition(450f,750); //position image1X1.scaleAbsolute(Utilities.inchesToPoints(2),Utilities.inchesToPoints(2)); //size document.add(image1X1); } catch (Exception e) { Image image1X1 = Image.getInstance(ReportsDirectory.DEFAULT_IMAGE2x2); image1X1.setAbsolutePosition(450f,750); //position image1X1.scaleAbsolute(Utilities.inchesToPoints(2),Utilities.inchesToPoints(2)); //size document.add(image1X1); }create2x2Box(writer); document.add(createStudentInfo()); document.add(createBody(0,2)); Paragraph p = new Paragraph(0); p.setFirstLineIndent(-25f); p.setSpacingAfter(7f); p.add(new Chunk("(Upon completion of the requirements of the two-year course," + " a Certificate in Two-Year Industrial Technology will be granted.)", font5BoldItalic)); document.add(p); document.add(createBody(2,4)); writer.setPageEvent(new MyFooter()); document.close(); return 0; } private static Paragraph createHeader() throws DocumentException{ Paragraph header = new Paragraph(10); header.setAlignment(Element.ALIGN_CENTER); header.add(new Chunk("BULACAN STATE UNIVERSITY\n",font7Plain)); header.add(new Chunk("COLLEGE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY\n",font7Bold)); header.add(new Chunk("City of Malolos, Bulacan\n",font7Plain)); header.add(new Chunk("Tele Fax No. (044) 796-0147\n",font7Plain)); header.add(new Chunk("Email: bsuice@pldtdsl.net\n",font7Plain)); header.add(new Chunk("http://www.bulsu.edu.ph\n\n\n\n",font7Plain)); header.add(new Chunk("CHECKLIST IN\n",font7Bold)); header.add(new Chunk("BACHELOR IN INDUSTRIAL TECHNOLOGY\n",font7Bold)); header.add(new Chunk("MAJOR IN COMPUTER TECHNOLOGY\n",font7Bold)); header.add(new Chunk("\n",font7Plain)); return header; } private PdfPTable createStudentInfo() throws DocumentException { PdfPTable tbl_stud = new PdfPTable(2); tbl_stud.setTotalWidth(575); tbl_stud.setLockedWidth(true); Paragraph p_title = new Paragraph(5); p_title.add(new Phrase(10, "PROPOSED CURRICULUM FOR S.Y. 2011-2012", font7Bold)); p_title.setLeading(0, 1); PdfPCell cell = new PdfPCell(); cell.setBackgroundColor(BaseColor.LIGHT_GRAY); cell.setColspan(2); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); p_title.setAlignment(Element.ALIGN_CENTER); cell.addElement(p_title); tbl_stud.addCell(cell); /** * STUDENT INFO */ tbl_stud.addCell(createCellWithObject(getTitleContent("NAME: ", font7Plain, getShortenedDetail(this.name, 40), font7Plain, "", true), false, true)); tbl_stud.addCell(createCellWithObject(getTitleContent("STUDENT NO: ", font7Plain, getShortenedDetail(this.studentNo, 47), font7Plain, "", true), false, true)); tbl_stud.addCell(createCellWithObject(getTitleContent("ADDRESS: ", font7Plain, getShortenedDetail(this.STUDENT_ADDRESS, 39), font7Plain, "", true), false, false)); boolean underlined = true; if(highSchool.isEmpty()) { highSchool = "__________________________________________"; underlined = false; } tbl_stud.addCell(createCellWithObject(getTitleContent("HIGH SCHOOL: ", font7Plain, getShortenedDetail(this.highSchool,42), font7Plain, "\n\n", underlined) ,false, true)); return tbl_stud; } private String objectKey; private int sem = 1; private PdfPTable createBody(int start, int end) throws DocumentException { PdfPTable tbl_stud = new PdfPTable(3); tbl_stud.setWidths(new float[]{3,0,3}); tbl_stud.setTotalWidth(575); tbl_stud.setLockedWidth(true); /** * SEMESTERS */ for (int i = start; i < end; i++) { String t_header = this.getTitleHeader(i); tbl_stud.addCell(createCellWithObject(createSemesterTable(t_header, objectKey),false,true)); tbl_stud.addCell(createCellWithObject(new Phrase("",font7Plain), false, true)); t_header = this.getTitleHeader(i); tbl_stud.addCell(createCellWithObject(createSemesterTable(t_header, objectKey),false,true)); admissionYear++; } return tbl_stud; } private String getTitleHeader(int counter) { String t_header = "", sy = admissionYear + "-" + (admissionYear+1); switch (counter+1) { case 1: if(sem == 1){ t_header = "FIRST YEAR 1st Semester SY "; } else if(sem == 2) t_header = "FIRST YEAR 2nd Semester SY "; objectKey = 1 + String.valueOf(sem); break; case 2: if(sem == 1){ t_header = "SECOND YEAR 1st Semester SY "; } else if(sem == 2) t_header = "SECOND YEAR 2nd Semester SY "; objectKey = 2 + String.valueOf(sem); break; case 3: if(sem == 1){ t_header = "THIRD YEAR 1st Semester SY "; } else if(sem == 2) t_header = "THIRD YEAR 2nd Semester SY "; objectKey = 3 + String.valueOf(sem); break; case 4: if(sem == 1){ t_header = "FOURTH YEAR 1st Semester SY "; } else if(sem == 2) t_header = "FOURTH YEAR 2nd Semester SY "; objectKey = 4 + String.valueOf(sem); break; default: break; } //change sem if(sem == 1) sem = 2; else sem = 1; return t_header + sy; } private Integer OVERALL_TOTAL = 0; private PdfPTable createSemesterTable(String titleHeader, String key) throws DocumentException { PdfPTable tbl_stud = new PdfPTable(6); tbl_stud.setWidths(new float[]{2, 4, 1, 2, 2, 1}); tbl_stud.setTotalWidth(280); tbl_stud.setLockedWidth(true); tbl_stud.setSpacingAfter(10f); tbl_stud.setHorizontalAlignment(Element.ALIGN_TOP); /** * HEADER */ tbl_stud.addCell(createSimpleCell(titleHeader, font5Bold, 6, true)); tbl_stud.addCell(createSimpleCell("Subject Code", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("Description", font5Plain, 0, true)); if(objectKey.equals("22") || objectKey.equals("42")){ tbl_stud.addCell(createSimpleCell("Industry Immersion", font5Plain, 2, true)); } else tbl_stud.addCell(createSimpleCell("Units", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("Pre-requisite/s", font5Plain, 0, true)); if(objectKey.equals("22") || objectKey.equals("42")){ tbl_stud.addCell(createSimpleCell("Hours", font6Plain, 0, true)); } else { tbl_stud.addCell(createSimpleCell("Co-requisite/s", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("Grade", font5Plain, 0, true)); } /** * DATA */ Integer totalUnits = 0; ArrayList<Object[]> subjects = this.subjectsPerSem.get(objectKey); //0-subjectmap //1-total hrs //2-prereq //3-co-req for (int i = 0; i < subjects.size(); i++) { SubjectMapping subject = (SubjectMapping) subjects.get(i)[0]; tbl_stud.addCell(createSimpleCell(subject.getCode(), font5Plain, 0, false)); tbl_stud.addCell(createSimpleCell(subject.getDescriptive_title(), font5Plain, 0, false)); if(objectKey.equals("22") || objectKey.equals("42")){ tbl_stud.addCell(createSimpleCell((subject.getLab_units() + subject.getLec_units())+"", font5Plain, 2, true)); String str = "Second Year Standing"; if(objectKey.equals("42")) str = "Fourth Year Standing"; tbl_stud.addCell(createSimpleCell(str, font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("520", font5Plain, 0, true)); } else { tbl_stud.addCell(createSimpleCell((subject.getLab_units() + subject.getLec_units())+"", font5Plain, 0, true)); String prereq = ""; if(!subjects.get(i)[2].toString().equalsIgnoreCase("NONE")) prereq = subjects.get(i)[2]+""; tbl_stud.addCell(createSimpleCell(prereq, font5Plain, 0, true)); String coreq = ""; if(!subjects.get(i)[3].toString().equalsIgnoreCase("NONE")) coreq = subjects.get(i)[3]+""; tbl_stud.addCell(createSimpleCell(coreq, font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); } Double total = (subject.getLab_units() + subject.getLec_units()); totalUnits += total.intValue(); } /** * TOTAL */ if(!objectKey.equals("22") && !objectKey.equals("42")){ tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("TOTAL LAB / LEC UNITS", font5Bold, 0, false)); tbl_stud.addCell(createSimpleCell(String.valueOf(totalUnits), font5Bold, 0, true)); tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); } /** * */ tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("TOTAL UNITS", font5Bold, 0, true)); tbl_stud.addCell(createSimpleCell(String.valueOf(totalUnits), font5Bold, 2, true)); tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); tbl_stud.addCell(createSimpleCell("", font5Plain, 0, true)); OVERALL_TOTAL += totalUnits; if(objectKey.equals("22")){ tbl_stud.addCell(createSimpleCell("TOTAL UNITS FOR Certificate in " + "BIT COMPUTER TECHNOLOGY \n " + OVERALL_TOTAL, font5BoldItalic, 12, true)); } else if(objectKey.equals("42")){ tbl_stud.addCell(createSimpleCell("TOTAL UNITS FOR BIT major in " + "COMPUTER TECHNOLOGY \n " + OVERALL_TOTAL, font5BoldItalic, 12, true)); } return tbl_stud; } private static PdfPCell createCellWithPhrase(Phrase phr, Font font, boolean border, boolean center){ PdfPCell cell = new PdfPCell(); if(!border) cell.setBorder(PdfPCell.NO_BORDER); if(center){ cell.setVerticalAlignment(Element.ALIGN_MIDDLE); } cell.addElement(phr); return cell; } private static PdfPCell createCellWithObject(Object tbl, boolean border, boolean center){ PdfPCell cell = new PdfPCell(); if(!border) cell.setBorder(PdfPCell.NO_BORDER); if(center){ cell.setVerticalAlignment(Element.ALIGN_MIDDLE); } cell.addElement((Element)tbl); return cell; } private PdfPCell createSimpleCell(String content, Font font, int colspan, boolean center) { PdfPCell cell = new PdfPCell(); Paragraph p = new Paragraph(5); if(center) p.setAlignment(Element.ALIGN_CENTER); p.add(new Chunk(content, font)); cell.addElement(p); cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_CENTER); if(colspan != 0) cell.setColspan(colspan); return cell; } private PdfPCell createSimpleCell(String content, Font font, int colspan, boolean center, int rowspan) { PdfPCell cell = new PdfPCell(); Paragraph p = new Paragraph(5); if(center) p.setAlignment(Element.ALIGN_CENTER); p.add(new Chunk(content, font)); cell.addElement(p); cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_CENTER); if(colspan != 0) cell.setColspan(colspan); cell.setRowspan(rowspan); return cell; } private static Phrase getTitleContent(String title, Font font1, String info, Font font2, String space, boolean underlined){ Phrase phr = new Phrase(10); phr.add(new Chunk(title, font1)); Chunk chunks = new Chunk(info, font2); if(underlined) chunks.setUnderline(0.1f, -2f); phr.add(chunks); phr.add(new Chunk(space, font2)); return phr; } private static String getShortenedDetail(String str, int count){ if(str.length()>count){ return str.substring(0, count) + "..."; } else return str; } private static void create2x2Box(PdfWriter writer) { PdfContentByte cb = writer.getDirectContent(); try { cb.setFontAndSize(BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, false), 24); cb.rectangle(450f,750,Utilities.inchesToPoints(2f),Utilities.inchesToPoints(2f)); cb.stroke(); } catch (DocumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } class MyFooter extends PdfPageEventHelper { private static final Font font_footer = new Font(FontFamily.HELVETICA, 8); public void onEndPage(PdfWriter writer, Document document) { PdfContentByte cb = writer.getDirectContent(); Phrase footer = new Phrase("BulSU-OP-CICT-03F2",font_footer); Phrase footer2 = new Phrase("Revision: 0",font_footer); ColumnText.showTextAligned(cb, Element.ALIGN_LEFT, footer, 30, //x document.bottom() - 20, //y 0); ColumnText.showTextAligned(cb, Element.ALIGN_LEFT, footer2, 30, (document.bottom() - 30), 0); } }
[ "jhmvinperello@gmail.com" ]
jhmvinperello@gmail.com
b66eed7d0aa1e6b1d04f299c248ad740ff10f9e2
30f66a61865458458947055888d17f53f102456d
/server/game/src/main/java/com/linlongyx/sanguo/webgame/proto/binary/rankAct/RankActListResponse.java
57e992c9cce48e41dbdef47554a74c51c71fcaee
[]
no_license
NeverMoreShadowFiend/xxsg
0f833d963098b0d66aa1161ecefc7f6cc2fa9610
51b0b7620c450ab076d0e4dd362969ee0a2ecd97
refs/heads/master
2022-12-11T09:44:28.737852
2020-09-23T02:10:34
2020-09-23T02:10:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,127
java
/* */ package com.linlongyx.sanguo.webgame.proto.binary.rankAct; /* */ /* */ import com.linlongyx.core.framework.protocol.ResponseBase; /* */ import com.linlongyx.sanguo.webgame.proto.ProtocolUtil; /* */ import com.linlongyx.sanguo.webgame.proto.binary.struct.RankingData; /* */ import io.netty.buffer.ByteBuf; /* */ import java.util.ArrayList; /* */ import org.msgpack.annotation.Message; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Message /* */ public class RankActListResponse /* */ extends ResponseBase /* */ { /* */ public int rankId; /* 21 */ public ArrayList<RankingData> list = new ArrayList<>(); /* */ public int myRank; /* */ /* */ public RankActListResponse() { /* 25 */ this.eventResponseId = 22003; /* 26 */ this.codeType = 2; /* */ } /* */ /* */ public RankActListResponse(short retCode) { /* 30 */ this.eventResponseId = 22003; /* 31 */ this.codeType = 2; /* 32 */ this.retCode = retCode; /* */ } /* */ /* */ /* */ public void serial(ByteBuf out) { /* 37 */ ProtocolUtil.writeInt(out, this.rankId); /* */ /* 39 */ int size_0 = this.list.size(); /* 40 */ ProtocolUtil.writeStrArraySize(out, size_0); /* 41 */ for (int index_0 = 0; index_0 < size_0; index_0++) { /* */ /* 43 */ RankingData tmp_0 = this.list.get(index_0); /* 44 */ tmp_0.serial(out); /* */ } /* 46 */ ProtocolUtil.writeInt(out, this.myRank); /* */ } /* */ /* */ /* */ public void unserial(ByteBuf in) { /* 51 */ this.rankId = ProtocolUtil.readUTFBinInt(in); /* */ /* 53 */ int size_0 = ProtocolUtil.readStrArraySize(in); /* 54 */ for (int index_0 = 0; index_0 < size_0; index_0++) { /* */ /* 56 */ RankingData tmp_0 = new RankingData(); /* 57 */ tmp_0.unserial(in); /* 58 */ this.list.add(tmp_0); /* */ } /* 60 */ this.myRank = ProtocolUtil.readUTFBinInt(in); /* */ } /* */ /* */ /* */ public RankActListResponse clone() throws CloneNotSupportedException { /* 65 */ RankActListResponse clone = (RankActListResponse)super.clone(); /* 66 */ int size_0 = this.list.size(); /* 67 */ for (int index_0 = 0; index_0 < size_0; index_0++) { /* */ /* 69 */ RankingData tmp_0 = this.list.get(index_0); /* 70 */ clone.list.add(tmp_0.clone()); /* */ } /* 72 */ return clone; /* */ } /* */ /* */ /* */ public void reset() { /* 77 */ this.rankId = 0; /* 78 */ this.list.clear(); /* 79 */ this.myRank = 0; /* */ } /* */ /* */ /* */ public String toString() { /* 84 */ String retVal = "{\"rankId\":" + this.rankId + ",\"list\":" + this.list.toString() + ",\"myRank\":" + this.myRank + "}"; /* 85 */ return retVal; /* */ } /* */ } /* Location: D:\xxsg_52gmsy\game\target\classes\!\com\linlongyx\sanguo\webgame\proto\binary\rankAct\RankActListResponse.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "parasol_qian@qq.com" ]
parasol_qian@qq.com
b9b70d907df926b9013038751748ec48d30c5fa4
a6d55b744212b31a26f792b150d1ecde3b8927e4
/fj36-livraria/src/br/com/caelum/livraria/controller/CarrinhoController.java
b2f16ff954b68ec3f190fefab02a14d2c19b41f4
[]
no_license
rodrigosenna/fj36-soa
1b9e289f80ccd93b3d37bf7bad767f2b7ee526d0
22a8735a641e4ba451dba3b33764814ced95e90a
refs/heads/master
2020-03-23T17:04:08.940950
2018-08-18T19:58:18
2018-08-18T19:58:18
141,841,102
0
0
null
null
null
null
UTF-8
Java
false
false
4,236
java
package br.com.caelum.livraria.controller; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import br.com.caelum.livraria.modelo.Carrinho; import br.com.caelum.livraria.modelo.Formato; import br.com.caelum.livraria.modelo.Livro; import br.com.caelum.livraria.modelo.Pedido; @Controller @RequestMapping("/carrinho") @Scope("request") public class CarrinhoController{ private static final String JSP_CARRINHO_CONFIRMAR = "carrinho/confirmarPagamento"; private static final String JSP_CARRINHO_LISTAR = "carrinho/listar"; private static final String REDIRECT_CARRINHO_LISTAR = "redirect:/carrinho/listar"; private static final String REDIRECT_CARRINHO_CONFIRMAR = "redirect:/carrinho/confirmarPagamento"; @Autowired Carrinho carrinho; @PersistenceContext EntityManager manager; @RequestMapping("/adicionarItem") public String adicionarItemNoCarrinho(@RequestParam("id") Integer idLivro, @RequestParam("formatoLivro") Formato formato) { Livro livro = manager.find(Livro.class, idLivro); carrinho.adicionarOuIncremantarQuantidadeDoItem(livro, formato); return REDIRECT_CARRINHO_LISTAR; } @RequestMapping("/removerItem") public String removerItemNoCarrinho(@RequestParam("codigo") String codigo, @RequestParam("formato") Formato formato, RedirectAttributes modelo) { this.carrinho.removerItemPeloCodigoEFormato(codigo, formato); modelo.addFlashAttribute("messageInfo", "O item foi removido com sucesso."); return REDIRECT_CARRINHO_LISTAR; } @RequestMapping("/calcularCep") public String calcularCep(@RequestParam("cepDestino") String novoCepDestino) { this.carrinho.atualizarFrete(novoCepDestino); return REDIRECT_CARRINHO_LISTAR; } @RequestMapping("/criarPagamento") public String criarPagamento(String numeroCartao, String titularCartao, RedirectAttributes modelo) { if(!ehStringVazia(titularCartao) && !ehStringVazia(numeroCartao)){ carrinho.setNumeroCartao(numeroCartao); carrinho.setTitularCartao(titularCartao); } if(!carrinho.temCartao()) { modelo.addFlashAttribute("messageWarn", "Por favor preenche os dados do cartão!"); return REDIRECT_CARRINHO_LISTAR; } // Aqui fica o código de verificação do access token this.carrinho.criarPagamento(numeroCartao, titularCartao); if(this.carrinho.isPagamentoCriado()) { modelo.addFlashAttribute("messageInfo", "O seu pagamento foi criado! - Por favor confirme o pedido."); } else { modelo.addFlashAttribute("messageWarn", "Pagamento não foi criado!"); } return REDIRECT_CARRINHO_CONFIRMAR; } @RequestMapping("/confirmarPagamento") public String confirmarPagamento() { return JSP_CARRINHO_CONFIRMAR; } private boolean ehStringVazia(String string) { return string == null || string.trim().isEmpty(); } @RequestMapping("/finalizar") @Transactional public String finalizarPedido(RedirectAttributes modelo) { if(!carrinho.isFreteCalculado()) { modelo.addFlashAttribute("messageWarn", "O Frete deve ser calculado."); return REDIRECT_CARRINHO_LISTAR; } if(!carrinho.isPagamentoCriado()) { modelo.addFlashAttribute("messageWarn", "O pagamento deve ser aprovado antes."); return REDIRECT_CARRINHO_LISTAR; } Pedido pedido = this.carrinho.finalizarPedido(); this.manager.persist(pedido); modelo.addFlashAttribute("messageInfo", "Pedido realizado. STATUS: " + pedido.getStatus()); return REDIRECT_CARRINHO_LISTAR; } @RequestMapping("/listar") public String listar() throws Exception { //verificacao do estoque aqui //this.carrinho.verificarDisponibilidadeDosItensComRmi(); this.carrinho.verificarDisponibilidadeDosItensComSoap(); return JSP_CARRINHO_LISTAR; } }
[ "rodrigo.sonic@gmail.com" ]
rodrigo.sonic@gmail.com