blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
0109fc7262f0e3a265995da5c1dc693234d3b50a
9573f936174ccbcda704e1b83d596a3f093f727c
/OPERAcraft New/temp/src/minecraft/net/minecraft/src/IntegratedServerListenThread.java
0f1d3b8411ef837edf96463a3ea1cd18bcbc1ac5
[]
no_license
operacraft/Minecraft
17466d8538be6253f4d689926d177614c6accf5b
89c4012b11cf5fa118cd5e63b0f51d03ee1ddc09
refs/heads/master
2021-01-10T05:54:10.056575
2016-02-24T15:54:29
2016-02-24T15:54:49
51,405,369
1
2
null
null
null
null
UTF-8
Java
false
false
3,155
java
package net.minecraft.src; import java.io.IOException; import java.net.InetAddress; import net.minecraft.server.MinecraftServer; import net.minecraft.src.EntityPlayerMP; import net.minecraft.src.HttpUtil; import net.minecraft.src.IntegratedServer; import net.minecraft.src.MemoryConnection; import net.minecraft.src.NetHandler; import net.minecraft.src.NetworkListenThread; import net.minecraft.src.ServerListenThread; public class IntegratedServerListenThread extends NetworkListenThread { private final MemoryConnection field_71760_c; private MemoryConnection field_71758_d; private String field_71759_e; private boolean field_71756_f = false; private ServerListenThread field_71757_g; public IntegratedServerListenThread(IntegratedServer p_i3121_1_) throws IOException { super(p_i3121_1_); this.field_71760_c = new MemoryConnection(p_i3121_1_.func_98033_al(), (NetHandler)null); } public void func_71754_a(MemoryConnection p_71754_1_, String p_71754_2_) { this.field_71758_d = p_71754_1_; this.field_71759_e = p_71754_2_; } public String func_71755_c() throws IOException { if(this.field_71757_g == null) { int var1 = -1; try { var1 = HttpUtil.func_76181_a(); } catch (IOException var4) { ; } if(var1 <= 0) { var1 = 25564; } try { this.field_71757_g = new ServerListenThread(this, (InetAddress)null, var1); this.field_71757_g.start(); } catch (IOException var3) { throw var3; } } return this.field_71757_g.func_71767_c().getHostAddress() + ":" + this.field_71757_g.func_71765_d(); } public void func_71744_a() { super.func_71744_a(); if(this.field_71757_g != null) { this.func_71753_e().func_98033_al().func_98233_a("Stopping server connection"); this.field_71757_g.func_71768_b(); this.field_71757_g.interrupt(); this.field_71757_g = null; } } public void func_71747_b() { if(this.field_71758_d != null) { EntityPlayerMP var1 = this.func_71753_e().func_71203_ab().func_72366_a(this.field_71759_e); if(var1 != null) { this.field_71760_c.func_74434_a(this.field_71758_d); this.field_71756_f = true; this.func_71753_e().func_71203_ab().func_72355_a(this.field_71760_c, var1); } this.field_71758_d = null; this.field_71759_e = null; } if(this.field_71757_g != null) { this.field_71757_g.func_71766_a(); } super.func_71747_b(); } public IntegratedServer func_71753_e() { return (IntegratedServer)super.func_71746_d(); } public boolean func_71752_f() { return this.field_71756_f && this.field_71760_c.func_74432_i().func_74435_g() && this.field_71760_c.func_74432_i().func_74433_h(); } // $FF: synthetic method public MinecraftServer func_71746_d() { return this.func_71753_e(); } }
[ "operacraft@googlegroups.com" ]
operacraft@googlegroups.com
2feac611e1445409ce0cfb90f946fd158a1ccea7
74887a4393149536aa0e5ee7395b5ac8f2cc3994
/JavaPractice/src/collection/book.java
e1eba68822ba74c7310dea1fdb2c173f3b7f7fb2
[]
no_license
abhisheksawai/SeleniumIntermediate
70b29d2ab92540df5b49561453fe35cea4e3b8ba
d0c9855eb9f7d4f157a75a8b440d7d86cbea2271
refs/heads/master
2020-05-24T09:02:52.188765
2019-05-25T15:39:52
2019-05-25T15:39:52
187,196,584
0
0
null
null
null
null
UTF-8
Java
false
false
237
java
package collection; public class book { int id; String name; String author; public book(int id, String name, String author) { super(); this.id = id; this.name = name; this.author = author; } }
[ "sawai.abhishek@gmail.com" ]
sawai.abhishek@gmail.com
fa53b6be3b84778feb03ed39900c6487cc8f7fd5
731147bab2348ab1fbd823af18085e2ff4f188da
/baseaccount/basaccount-model/src/main/java/com/basaccount/model/operations/EcritureAnalytique.java
cf2092485827784388e3b3497e50883889669451
[]
no_license
bekondo84/Teratech
5976999a76f0f6aaa5356fc047aeb91788a4324c
f556d5bfe3d4b788185446e88fe695b89aafdce2
refs/heads/master
2021-04-28T05:01:21.955227
2018-02-20T08:20:49
2018-02-20T08:20:49
122,169,273
0
0
null
null
null
null
UTF-8
Java
false
false
6,028
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.basaccount.model.operations; import com.basaccount.model.comptabilite.CompteAnalytique; import com.basaccount.model.comptabilite.ExerciceComptable; import com.core.base.BaseElement; import com.megatim.common.annotations.Predicate; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author Commercial_2 */ @Entity @Table(name = "T_ECRIT_ANAL") public class EcritureAnalytique extends BaseElement implements Serializable,Comparable<EcritureAnalytique>{ @Temporal(TemporalType.DATE) @Predicate(label = "DATE ECRITURE",target = "date",optional = false,updatable = false,type = Date.class,search = true,colsequence = 1,sequence = 0) private Date dateEcriture ; @Predicate(label = "REFERENCE",search = true,colsequence = 2,sequence = 2) private String refPiece ; @Predicate(label = "LIBELLE",search = true,colsequence = 3,sequence = 3) private String libelle ; @ManyToOne @JoinColumn(name = "CPTE_ID") @Predicate(label = "COMPTE ANALYTIQUE",type = CompteAnalytique.class,updatable = false,optional = false,target = "many-to-one",search = true,colsequence = 4,sequence = 4) private CompteAnalytique compte ; @Predicate(label = "DEBIT",type = BigDecimal.class,search = true,colsequence = 6,sequence = 6,updatable = false) private BigDecimal debit =BigDecimal.ZERO; @Predicate(label = "CREDIT",type = BigDecimal.class,search = true,colsequence = 7,sequence = 7,updatable = false) private BigDecimal credit = BigDecimal.ZERO; @ManyToOne @JoinColumn(name = "EXER_ID") private ExerciceComptable exercice; /** * * @param dateEcriture * @param refPiece * @param libelle * @param compte */ public EcritureAnalytique(Date dateEcriture, String refPiece, String libelle, CompteAnalytique compte) { this.dateEcriture = dateEcriture; this.refPiece = refPiece; this.libelle = libelle; this.compte = compte; } /** * * @param dateEcriture * @param refPiece * @param libelle * @param compte * @param id * @param designation * @param moduleName */ public EcritureAnalytique(Date dateEcriture, String refPiece, String libelle, CompteAnalytique compte, long id, String designation, String moduleName) { super(id, designation, moduleName); this.dateEcriture = dateEcriture; this.refPiece = refPiece; this.libelle = libelle; this.compte = compte; } /** * * @param data */ public EcritureAnalytique(EcritureAnalytique data) { super(data.id, data.designation, data.moduleName); this.dateEcriture = data.dateEcriture; this.refPiece = data.refPiece; this.libelle = data.libelle; this.compte = data.compte; this.debit = data.debit; this.credit = data.credit; this.exercice = data.exercice; } /** * * @param data * @param compte * @param debit * @param credit */ public EcritureAnalytique(EcritureComptable data,CompteAnalytique compte , BigDecimal debit , BigDecimal credit) { this.dateEcriture = data.getDateEcriture(); this.refPiece = data.getRefPiece(); this.libelle = data.getLibelle(); this.debit = debit ; this.credit = credit ; this.compte =compte; this.exercice = data.getExercice(); } public EcritureAnalytique() { } public Date getDateEcriture() { return dateEcriture; } public void setDateEcriture(Date dateEcriture) { this.dateEcriture = dateEcriture; } public String getRefPiece() { return refPiece; } public void setRefPiece(String refPiece) { this.refPiece = refPiece; } public String getLibelle() { return libelle; } public void setLibelle(String libelle) { this.libelle = libelle; } public CompteAnalytique getCompte() { return compte; } public void setCompte(CompteAnalytique compte) { this.compte = compte; } public BigDecimal getDebit() { return debit; } public void setDebit(BigDecimal debit) { this.debit = debit; } public BigDecimal getCredit() { return credit; } public void setCredit(BigDecimal credit) { this.credit = credit; } @Override public String getDesignation() { return libelle; //To change body of generated methods, choose Tools | Templates. } @Override public String getListTitle() { return "INTERROGATION ANALYTIQUE"; //To change body of generated methods, choose Tools | Templates. } @Override public String getEditTitle() { return "INTERROGATION ANALYTIQUE"; //To change body of generated methods, choose Tools | Templates. } @Override public boolean isDesabledelete() { return true; //To change body of generated methods, choose Tools | Templates. } @Override public boolean isDesablecreate() { return true; //To change body of generated methods, choose Tools | Templates. } public ExerciceComptable getExercice() { return exercice; } public void setExercice(ExerciceComptable exercice) { this.exercice = exercice; } @Override public int compareTo(EcritureAnalytique o) { //To change body of generated methods, choose Tools | Templates. return refPiece.compareTo(o.refPiece); } }
[ "bekondo_dieu@yahoo.fr" ]
bekondo_dieu@yahoo.fr
4f9c5de2385e2b1b0e12053e097bdca9c07bdb98
52b219f3fcbb88982bc98b95d27c09cc646cdb1d
/QuestionBank/src/main/java/com/xinyunfu/constant/Common.java
a1fffc288fe1dd13af92212ade477bf09e23000f
[]
no_license
jiangqiang520/xyfProjects
d65d9f144522bbbbf492dba4a847afd0784b84ac
ab348de96b5c0c6a4f46d609720e189c274a4b26
refs/heads/master
2020-09-06T14:12:31.464210
2019-09-23T09:52:08
2019-09-23T09:52:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,083
java
package com.xinyunfu.constant; import java.util.Random; /** * @author XRZ * @date 2019/7/8 0008 * @Description : 通用常量类 */ public interface Common { String UID = "currentUserId"; /** * 万能券答题的键前缀 */ String KEY_SPECIAL = "Answer_"; /** * redis 普通答题的键前缀 */ String KEY_BASIC = "AnswerRecord_"; /** * 七天 * 单位:秒 */ long EXC_REDIS = 3600 * 24 * 7; /** * 随机数对象 */ Random random = new Random(); /** * 每页展示条数 */ Integer PAGE_SIEZ = 20; /** * 启用 表数据 */ int ENABLE = 1; /** * 禁用 表数据 */ int DISABLE = 0; /** * 万能券的初始化数量 */ int PACKAGE_COUNT = 6; /** * 生活常识 */ int LIFE = 0; /** * 法律 */ int LAW = 1; //===========================答题状态 /** * 正确 */ Integer CORRECT = 1; /** * 为答 */ Integer UNDEFINED = 0; }
[ "294442437@qq.com" ]
294442437@qq.com
ea9622b350437e16442c412b514523d583dde00e
82262cdae859ded0f82346ed04ff0f407b18ea6f
/366pai/zeus-core/core-start-jar/src/test/java/com/_360pai/test/AppletTest.java
42cf2c67ef3ce367dc28b816a499ad7238b9a53f
[]
no_license
dwifdji/real-project
75ec32805f97c6d0d8f0935f7f92902f9509a993
9ddf66dfe0493915b22132781ef121a8d4661ff8
refs/heads/master
2020-12-27T14:01:37.365982
2019-07-26T10:07:27
2019-07-26T10:07:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,586
java
package com._360pai.test; import com._360pai.core.facade.applet.AppletFacade; import com._360pai.core.facade.applet.req.AssistantReq; import com._360pai.core.facade.applet.req.AuctionReq; import com._360pai.core.facade.enrolling.EnrollingImportFacade; import com._360pai.core.facade.enrolling.req.EnrollingImportReq; import com._360pai.core.facade.shop.ShopFacade; import com._360pai.core.facade.shop.req.ShopReq; import com._360pai.core.service.applet.TAppletMessageService; import com.alibaba.fastjson.JSON; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.Resource; import java.io.File; import java.math.BigDecimal; /** * @author wuchuanqi * @create 2018-11-29 16:00 */ public class AppletTest extends TestBase{ @Resource private ShopFacade shopFacade; @Autowired private TAppletMessageService appletMessageService; @Resource private AppletFacade appletFacade; @Resource private EnrollingImportFacade enrollingImportFacade; @Test public void uploadActivity() { File file = new File("D:\\长城招商导入-山东-1.xlsx"); EnrollingImportReq.uploadActivityReq req = new EnrollingImportReq.uploadActivityReq(); req.setUserId("1"); req.setFile(file); enrollingImportFacade.uploadActivity(req); } @Test public void disposalEmailTest() { ShopReq.HomePageReq homePageReq = new ShopReq.HomePageReq(); homePageReq.setShopId("2"); homePageReq.setHomePageArray(new String[]{"359","333","358","359","360"}); shopFacade.setHomePage(homePageReq); } @Test public void createShopTest() { try { ShopReq.CreateReq req = new ShopReq.CreateReq(); req.setAmount(BigDecimal.ZERO); req.setOpenId("oTWB75QB4xr1uKEG-mdW7AI7DvJs"); req.setPartyId(300); shopFacade.createShop(req); } catch (Exception e) { e.printStackTrace(); } } @Test public void createsSendAccountRegisterMessageTest() { try { appletMessageService.sendAccountRegisterMessage(353); } catch (Exception e) { e.printStackTrace(); } } @Test public void saveVisitRecordTest() { try { AssistantReq.comReq req = new AssistantReq.comReq(); req.setOpenId("oTWB75YuAD8l3kEG5N0rh04MTKXM"); req.setShopId("4"); req.setType("1"); appletFacade.saveVisitRecord(req); } catch (Exception e) { e.printStackTrace(); } } @Test public void getVisitList() { try { AssistantReq.comReq req = new AssistantReq.comReq(); req.setShopId("4"); req.setType("1"); System.out.print(JSON.toJSONString(appletFacade.getVisitList(req))); } catch (Exception e) { e.printStackTrace(); } } @Test public void getShopAuctionList() { ShopReq.ShopListReq shopListReq = new ShopReq.ShopListReq(); shopListReq.setShopId("2"); System.out.printf(JSON.toJSONString(shopFacade.getShopAuctionList(shopListReq))); } @Test public void getAuctionDetail() { AuctionReq.AuctionInfoReq req = new AuctionReq.AuctionInfoReq(); req.setShopId("8"); req.setAuctionId("569"); System.out.printf(JSON.toJSONString(shopFacade.getAuctionDetail(req))); } @Test public void testFavorShop() { } }
[ "15538068782@163.com" ]
15538068782@163.com
94bfccba8f6d941da7ded572c2cd208bb5c61d1a
83436380fe01acf30dd154294b3da930e58c5ceb
/BelejanorProject/src/com/belejanor/switcher/queueadmin/ReceiveAsyncMessage.java
be401036c9f0eedc8e293fa1be65a92f7268d3f2
[]
no_license
jmptrader/BelejanorSwitch
83e847ee3dc6a555a40e6347f40af4e106c9054f
ce11d46b5ed52b89d22b5890f1e4fad29730125a
refs/heads/master
2023-02-07T07:22:42.266465
2020-12-27T05:07:15
2020-12-27T05:07:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,053
java
package com.belejanor.switcher.queueadmin; import javax.jms.Connection; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageListener; import javax.jms.Session; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import com.belejanor.switcher.cscoreswitch.CallersAsync; import com.belejanor.switcher.logger.Logger; import com.belejanor.switcher.logger.LoggerConfig.TypeMonitor; public class ReceiveAsyncMessage extends Thread implements MessageListener{ private static String url = ActiveMQConnection.DEFAULT_BROKER_URL; private String nameQueue; private Session session; private Logger log; public ReceiveAsyncMessage(String queueName, Session session){ log = new Logger(); this.nameQueue = queueName; this.session = session; //this.setDaemon(true); //this.start(); } private void ReadMessage(){ ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url); //connectionFactory.setMaxThreadPoolSize(20000); connectionFactory.setTrustAllPackages(true); try { Connection connection = connectionFactory.createConnection(); connection.start(); this.session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination destination = this.session.createQueue(this.nameQueue); MessageConsumer consumer = this.session.createConsumer(destination); consumer.setMessageListener(this); log.WriteLogMonitor("QueueReceiveAsync [" + this.nameQueue +"] loaded successfull!!", TypeMonitor.monitor, null); }catch (JMSException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } @Override public void onMessage(Message message) { try { CallersAsync call = new CallersAsync(message); call.start(); } catch (Exception e) { e.printStackTrace(); } } @Override public void run() { ReadMessage(); } }
[ "jorellana29@gmail.com" ]
jorellana29@gmail.com
de7142cd1f563112597a7562ba5e24699f93dc8d
18dd76be683e360b460148c777bbe7a28cff3494
/websiteSaver/src/main/java/com/curtisnewbie/api/UrlUtil.java
6c178f1109afe76d9dcb6628dec4c002d26a25b8
[ "Apache-2.0" ]
permissive
QaziShuaib/WebsiteSaver
a4581b351f0783fa881671801bc4e040760edd53
7d5a42cb793e248ef6c7f24c125a5ac4e7bc8ab2
refs/heads/master
2022-12-18T00:55:59.080911
2020-09-30T19:21:19
2020-09-30T19:21:19
300,034,019
0
0
null
2020-09-30T19:18:02
2020-09-30T19:18:01
null
UTF-8
Java
false
false
321
java
package com.curtisnewbie.api; /** * @author zhuangyongj */ public interface UrlUtil { /** * Parse the given http url (with protocols), and extract the base url. * * @param url http url with protocols * @return base url or empty string if failed */ String parseBaseUrl(String url); }
[ "zhuangyongj@gmail.com" ]
zhuangyongj@gmail.com
c45fed7609daaae1f7a4d30fbdf7068d7d2a44b5
0d25868392735a1e180b4bf2bfb893fcc01299c3
/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigTestUtils.java
6ee42c62c6dc3a8f9a36bef60e62b96d7e0b31d7
[ "GPL-2.0-only", "CDDL-1.0", "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
irinil/qpid-broker-j
6ccf06f2a15c6e4a83560be42e834cf68e5a3cd1
fbe90f47a1f98147124738d4125660ac5851156e
refs/heads/master
2022-11-30T00:38:32.324095
2020-08-05T21:02:41
2020-08-05T21:02:41
284,720,061
1
0
Apache-2.0
2020-08-03T14:20:15
2020-08-03T14:20:15
null
UTF-8
Java
false
false
2,510
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.disttest.controller.config; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.apache.qpid.disttest.controller.CommandForClient; import org.apache.qpid.disttest.message.Command; public class ConfigTestUtils { public static <C extends Command> void assertCommandForClient(final List<CommandForClient> commandsForClients, final int index, final String expectedRegisteredClientName, final Class<C> expectedCommandClass) { final CommandForClient commandForClient = commandsForClients.get(index); assertEquals(expectedRegisteredClientName, commandForClient.getClientName()); final Command command = commandForClient.getCommand(); assertTrue("Command " + index + " is of class " + command.getClass() + " but expecting " + expectedCommandClass, expectedCommandClass.isAssignableFrom(command.getClass())); } public static <C extends Command> void assertCommandEquals(final List<Command> commands, final int index, final Class<C> expectedCommandClass) { @SuppressWarnings("unchecked") C command = (C) getCommand(commands, index); //explicit cast added to get round oracle compiler bug (id 6302954) assertTrue("Command " + index + " is of class " + command.getClass() + " but expecting " + expectedCommandClass, expectedCommandClass.isAssignableFrom(command.getClass())); } public static <C extends Command> C getCommand(final List<Command> commands, final int index) { @SuppressWarnings("unchecked") C command = (C) commands.get(index); return command; } }
[ "robbie@apache.org" ]
robbie@apache.org
dec065caf3594269c799ffc15953ed1db703f15d
7c38b8186714800e7e7dff482d48c3036952c0e0
/src/main/java/io/github/pascalgrimaud/jhipster/aop/logging/LoggingAspect.java
0c92c066cdf0212991eaf7d66f58fd70fa69f9cd
[]
no_license
pascalgrimaud/TestJhipsterOnline3
6f068193802c9fc29f892413cc670ceaa93a1598
febc9d02d4c618a1aefcf21e60af6fd9943ab82a
refs/heads/master
2021-01-01T15:42:30.265267
2020-09-18T13:38:19
2020-09-18T13:38:19
97,678,874
0
1
null
2020-09-18T13:38:21
2017-07-19T06:06:50
Java
UTF-8
Java
false
false
3,878
java
package io.github.pascalgrimaud.jhipster.aop.logging; import io.github.jhipster.config.JHipsterConstants; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; import java.util.Arrays; /** * Aspect for logging execution of service and repository Spring components. * * By default, it only runs with the "dev" profile. */ @Aspect public class LoggingAspect { private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Environment env; public LoggingAspect(Environment env) { this.env = env; } /** * Pointcut that matches all repositories, services and Web REST endpoints. */ @Pointcut("within(@org.springframework.stereotype.Repository *)" + " || within(@org.springframework.stereotype.Service *)" + " || within(@org.springframework.web.bind.annotation.RestController *)") public void springBeanPointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Pointcut that matches all Spring beans in the application's main packages. */ @Pointcut("within(io.github.pascalgrimaud.jhipster.repository..*)"+ " || within(io.github.pascalgrimaud.jhipster.service..*)"+ " || within(io.github.pascalgrimaud.jhipster.web.rest..*)") public void applicationPackagePointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Advice that logs methods throwing exceptions. * * @param joinPoint join point for advice * @param e exception */ @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e); } else { log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); } } /** * Advice that logs when a method is entered and exited. * * @param joinPoint join point for advice * @return result * @throws Throwable throws IllegalArgumentException */ @Around("applicationPackagePointcut() && springBeanPointcut()") public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { if (log.isDebugEnabled()) { log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); } try { Object result = joinPoint.proceed(); if (log.isDebugEnabled()) { log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), result); } return result; } catch (IllegalArgumentException e) { log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName()); throw e; } } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
a9629a4cbe707eb449ffc7df3617503932442d67
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/dataset/t3/425_frag2.java
1c9ba835ab2fc5f2591a144ef8b93ec399b27d9e
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
2,248
java
int total = 0; synchronized (in) { while ((nread = in.read(buf, 0, buf.length)) >= 0) { out.write(buf, 0, nread); total += nread; } } out.flush(); buf = null; } /** * adds a file parameter to the request * @param name parameter name * @param filename the name of the file * @param is input stream to read the contents of the file from * @throws IOException */ public void setParameter(String name, String filename, InputStream is) throws IOException { boundary(); writeName(name); write("; filename=\""); write(filename); write('"'); newline(); write("Content-Type: "); @SuppressWarnings("static-access") String type = connection.guessContentTypeFromName(filename); if (type == null) type = "application/octet-stream"; writeln(type); newline(); pipe(is, os); newline(); } /** * adds a file parameter to the request * @param name parameter name * @param file the file to upload * @throws IOException */ public void setParameter(String name, File file) throws IOException { setParameter(name, file.getPath(), new FileInputStream(file)); } /** * adds a parameter to the request; if the parameter is a File, the file is uploaded, otherwise the string value of the parameter is passed in the request * @param name parameter name * @param object parameter value, a File or anything else that can be stringified * @throws IOException */ public void setParameter(String name, Object object) throws IOException { if (object instanceof File) { setParameter(name, (File) object); } else { setParameter(name, object.toString()); } } /** * adds parameters to the request * @param parameters "name-to-value" map of parameters; if a value is a file, the file is uploaded, otherwise it is stringified and sent in the request * @throws IOException */ public void setParameters(Map parameters) throws IOException {
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
35a4ec006248b88d62cb803b390126d08a1585f6
1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a
/acm-module-dc2/src/main/java/com/wisdom/acm/dc2/form/SmsTemplateAddForm.java
2ed24419055cf0116bd720e0ef15fd41db5a26ed
[ "Apache-2.0" ]
permissive
daiqingsong2021/ord_project
332056532ee0d3f7232a79a22e051744e777dc47
a8167cee2fbdc79ea8457d706ec1ccd008f2ceca
refs/heads/master
2023-09-04T12:11:51.519578
2021-10-28T01:58:43
2021-10-28T01:58:43
406,659,566
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.wisdom.acm.dc2.form; import lombok.Data; import javax.validation.constraints.NotBlank; @Data public class SmsTemplateAddForm { //模板标题 @NotBlank(message = "模板标题为空") private String templateTitle; //模板内容 @NotBlank(message = "模板内容为空") private String templateContent; }
[ "homeli@126.com" ]
homeli@126.com
fbb8866c0d15d35b5dede93e9a6672a82580c894
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/android/animation/FloatKeyframeSet.java
c768643e2a07a1967270e42f32dc1e59bd853e77
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
4,502
java
package android.animation; import android.animation.Keyframes.FloatKeyframes; import java.util.List; class FloatKeyframeSet extends KeyframeSet implements FloatKeyframes { public FloatKeyframeSet(FloatKeyframe... keyframes) { super(keyframes); } public Object getValue(float fraction) { return Float.valueOf(getFloatValue(fraction)); } public FloatKeyframeSet clone() { List<Keyframe> keyframes = this.mKeyframes; int numKeyframes = this.mKeyframes.size(); FloatKeyframe[] newKeyframes = new FloatKeyframe[numKeyframes]; for (int i = 0; i < numKeyframes; i++) { newKeyframes[i] = (FloatKeyframe) ((Keyframe) keyframes.get(i)).clone(); } return new FloatKeyframeSet(newKeyframes); } public float getFloatValue(float fraction) { FloatKeyframe prevKeyframe; FloatKeyframe nextKeyframe; float prevValue; float nextValue; float prevFraction; float nextFraction; TimeInterpolator interpolator; float intervalFraction; float f; if (fraction <= 0.0f) { prevKeyframe = (FloatKeyframe) this.mKeyframes.get(0); nextKeyframe = (FloatKeyframe) this.mKeyframes.get(1); prevValue = prevKeyframe.getFloatValue(); nextValue = nextKeyframe.getFloatValue(); prevFraction = prevKeyframe.getFraction(); nextFraction = nextKeyframe.getFraction(); interpolator = nextKeyframe.getInterpolator(); if (interpolator != null) { fraction = interpolator.getInterpolation(fraction); } intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); if (this.mEvaluator == null) { f = ((nextValue - prevValue) * intervalFraction) + prevValue; } else { f = ((Number) this.mEvaluator.evaluate(intervalFraction, Float.valueOf(prevValue), Float.valueOf(nextValue))).floatValue(); } return f; } else if (fraction >= 1.0f) { prevKeyframe = (FloatKeyframe) this.mKeyframes.get(this.mNumKeyframes - 2); nextKeyframe = (FloatKeyframe) this.mKeyframes.get(this.mNumKeyframes - 1); prevValue = prevKeyframe.getFloatValue(); nextValue = nextKeyframe.getFloatValue(); prevFraction = prevKeyframe.getFraction(); nextFraction = nextKeyframe.getFraction(); interpolator = nextKeyframe.getInterpolator(); if (interpolator != null) { fraction = interpolator.getInterpolation(fraction); } intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); if (this.mEvaluator == null) { f = ((nextValue - prevValue) * intervalFraction) + prevValue; } else { f = ((Number) this.mEvaluator.evaluate(intervalFraction, Float.valueOf(prevValue), Float.valueOf(nextValue))).floatValue(); } return f; } else { prevKeyframe = (FloatKeyframe) this.mKeyframes.get(0); for (int i = 1; i < this.mNumKeyframes; i++) { nextKeyframe = (FloatKeyframe) this.mKeyframes.get(i); if (fraction < nextKeyframe.getFraction()) { interpolator = nextKeyframe.getInterpolator(); intervalFraction = (fraction - prevKeyframe.getFraction()) / (nextKeyframe.getFraction() - prevKeyframe.getFraction()); prevValue = prevKeyframe.getFloatValue(); nextValue = nextKeyframe.getFloatValue(); if (interpolator != null) { intervalFraction = interpolator.getInterpolation(intervalFraction); } if (this.mEvaluator == null) { f = ((nextValue - prevValue) * intervalFraction) + prevValue; } else { f = ((Number) this.mEvaluator.evaluate(intervalFraction, Float.valueOf(prevValue), Float.valueOf(nextValue))).floatValue(); } return f; } prevKeyframe = nextKeyframe; } return ((Number) ((Keyframe) this.mKeyframes.get(this.mNumKeyframes - 1)).getValue()).floatValue(); } } public Class getType() { return Float.class; } }
[ "toor@debian.toor" ]
toor@debian.toor
ba2058870df69001cc51ad8be0d54ad7211a111c
fda63eb5d1ef6be4bdbff1616d26062cb9fc18b2
/src/main/java/com/myhome/jhipster/gateway/TokenRelayFilter.java
21333693e679bc6b5b87c3655cbf3527e5b068cc
[]
no_license
jamesrajendran/jhipsterSampleApplication
e241fcf614cbaab36a83caab89e5d3a5dbc3622b
2c0fa237d25d216f1c14a245dc393f3daff5bd41
refs/heads/master
2020-03-10T01:41:28.970393
2018-04-11T15:38:20
2018-04-11T15:38:20
129,116,421
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
package com.myhome.jhipster.gateway; import com.netflix.zuul.ZuulFilter; import com.netflix.zuul.context.RequestContext; import org.springframework.stereotype.Component; import java.util.Set; @Component public class TokenRelayFilter extends ZuulFilter { @Override public Object run() { RequestContext ctx = RequestContext.getCurrentContext(); Set<String> headers = (Set<String>) ctx.get("ignoredHeaders"); // JWT tokens should be relayed to the resource servers headers.remove("authorization"); return null; } @Override public boolean shouldFilter() { return true; } @Override public String filterType() { return "pre"; } @Override public int filterOrder() { return 10000; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
a8bc2c94a91ea20393630d89a2a2331d9fa5ce01
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/smtt/sdk/TbsMediaPlayer.java
45c1f6c3801403f07d2c50927918d5d404e8f74e
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,963
java
package com.tencent.smtt.sdk; import android.graphics.SurfaceTexture; import android.os.Bundle; import com.tencent.matrix.trace.core.AppMethodBeat; public class TbsMediaPlayer { private ba a = null; public interface TbsMediaPlayerListener { public static final int MEDIA_EXTRA_AUDIOTRACK_INDEX = 104; public static final int MEDIA_EXTRA_AUDIOTRACK_TITLES = 103; public static final int MEDIA_EXTRA_SUBTITLE_COUNT = 101; public static final int MEDIA_EXTRA_SUBTITLE_INDEX = 102; public static final int MEDIA_INFO_BAD_INTERLEAVING = 800; public static final int MEDIA_INFO_BUFFERING_END = 702; public static final int MEDIA_INFO_BUFFERING_PERCENTAGE = 790; public static final int MEDIA_INFO_BUFFERING_START = 701; public static final int MEDIA_INFO_EXTERNAL_METADATA_UPDATE = 803; public static final int MEDIA_INFO_HAVE_VIDEO_DATA = 752; public static final int MEDIA_INFO_METADATA_UPDATE = 802; public static final int MEDIA_INFO_NETWORK_BANDWIDTH = 703; public static final int MEDIA_INFO_NOT_SEEKABLE = 801; public static final int MEDIA_INFO_NO_VIDEO_DATA = 751; public static final int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902; public static final int MEDIA_INFO_TIMED_TEXT_ERROR = 900; public static final int MEDIA_INFO_UNSUPPORTED_SUBTITLE = 901; public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700; public static final int ROTATE_ACTION_HASROTATE = 3; public static final int ROTATE_ACTION_NOTHING = 1; public static final int ROTATE_ACTION_SETDEGREE = 2; public static final int ROTATE_ACTION_UNKNOWN = 0; void onBufferingUpdate(float f); void onPlayerCompleted(); void onPlayerError(String str, int i, int i2, Throwable th); void onPlayerExtra(int i, Object obj); void onPlayerInfo(int i, int i2); void onPlayerPaused(); void onPlayerPlaying(); void onPlayerPrepared(long j, int i, int i2, int i3, int i4); void onPlayerProgress(long j); void onPlayerSeeked(long j); void onPlayerSubtitle(String str); } public TbsMediaPlayer(ba baVar) { this.a = baVar; } public void audio(int i) { AppMethodBeat.i(64528); this.a.b(i); AppMethodBeat.o(64528); } public void close() { AppMethodBeat.i(64532); this.a.e(); AppMethodBeat.o(64532); } public float getVolume() { AppMethodBeat.i(64524); float b = this.a.b(); AppMethodBeat.o(64524); return b; } public boolean isAvailable() { AppMethodBeat.i(64521); boolean a = this.a.a(); AppMethodBeat.o(64521); return a; } public void pause() { AppMethodBeat.i(64529); this.a.c(); AppMethodBeat.o(64529); } public void play() { AppMethodBeat.i(64530); this.a.d(); AppMethodBeat.o(64530); } public void seek(long j) { AppMethodBeat.i(64531); this.a.a(j); AppMethodBeat.o(64531); } public void setPlayerListener(TbsMediaPlayerListener tbsMediaPlayerListener) { AppMethodBeat.i(64523); this.a.a(tbsMediaPlayerListener); AppMethodBeat.o(64523); } public void setSurfaceTexture(SurfaceTexture surfaceTexture) { AppMethodBeat.i(64522); this.a.a(surfaceTexture); AppMethodBeat.o(64522); } public void setVolume(float f) { AppMethodBeat.i(64525); this.a.a(f); AppMethodBeat.o(64525); } public void startPlay(String str, Bundle bundle) { AppMethodBeat.i(64526); this.a.a(str, bundle); AppMethodBeat.o(64526); } public void subtitle(int i) { AppMethodBeat.i(64527); this.a.a(i); AppMethodBeat.o(64527); } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
4c8ce6857883663f4784d7baefb7a6b14a99e84a
b7a1bade5bf347f2601ebdb7eda3e954895e6455
/java01t/src/step04/Exam01.java
5201f9e544dc95811cbc14ed8a33090ba4e87a1e
[]
no_license
Jeongjiho/Java76
a1429f12ffc2a5c557289760eb3164adba39c6eb
5c98d47a341776bc7b54b28907356b3007b46592
refs/heads/master
2016-08-12T20:29:57.698964
2016-02-22T14:59:27
2016-02-22T14:59:27
56,924,651
1
0
null
2016-04-23T14:54:31
2016-04-23T14:54:31
null
UTF-8
Java
false
false
598
java
/* * 주제: 기능 정의1 * - function = method * - 문법 * 작업결과값의종류 기능명(작업할때사용할값1, 값2, 값3...) { * 명령어... * } */ package step04; public class Exam01 { //1) 메서드 정의 //return: 없음 //parameter: 없음 //parameter? 값을 받는 변수(메모리)를 가리킨다. static void hello() { System.out.println("Hello!"); } public static void main(String[] args) { hello(); // 메서드 호출 //메서드 호출? //메서드 블록 안에 선언된 명령어를 실행하라! } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
0ae3bcab3a5853291de467fd2b88119f43f4ff04
2cf9cbafdfd5df582a9a46dcf85e5162901ef337
/uml/src/main/java/uk/ac/ukc/cs/kmf/kmfstudio/uml/Foundation/Data_Types/ParameterDirectionKind$Class.java
9b5c4bd363674957f42e31a6b8778a116ddaf13b
[ "Apache-2.0" ]
permissive
opatrascoiu/jmf
918303cf7ff6a5428157ea5deedc863386f457fb
be597da51fa5964f07ee74213640894af8fff535
refs/heads/master
2022-02-28T08:57:39.220759
2019-10-17T08:48:14
2019-10-17T08:48:14
110,419,420
0
0
null
null
null
null
UTF-8
Java
false
false
1,656
java
/** * * Class ParameterDirectionKind$Class.java * * Generated by KMFStudio at 14 April 2004 22:36:44 * Visit http://www.cs.ukc.ac.uk/kmf * */ package uk.ac.ukc.cs.kmf.kmfstudio.uml.Foundation.Data_Types; public class ParameterDirectionKind$Class implements ParameterDirectionKind, uk.ac.ukc.cs.kmf.kmfstudio.uml.UmlVisitable { /** The 'IN' enumerator */ public static final ParameterDirectionKind IN = new ParameterDirectionKind$Class(); /** The 'OUT' enumerator */ public static final ParameterDirectionKind OUT = new ParameterDirectionKind$Class(); /** The 'INOUT' enumerator */ public static final ParameterDirectionKind INOUT = new ParameterDirectionKind$Class(); /** The 'RETURN' enumerator */ public static final ParameterDirectionKind RETURN = new ParameterDirectionKind$Class(); /** Default constructors */ public ParameterDirectionKind$Class() { } /** The id */ protected String id; /** Get the id */ public String getId() { return id; } /** Set the id */ public void setId(String id) { this.id = "1"; } /** Overrride toString */ public String toString() { String res = "ParameterDirectionKind"; if (this == IN) res += "::IN"; if (this == OUT) res += "::OUT"; if (this == INOUT) res += "::INOUT"; if (this == RETURN) res += "::RETURN"; return res; } /** Clone the object */ public Object clone() { ParameterDirectionKind$Class obj = new ParameterDirectionKind$Class(); return obj; } /** Delete the object */ public void delete() { } /** Accept the visitor */ public Object accept(uk.ac.ukc.cs.kmf.kmfstudio.uml.UmlVisitor v, Object obj) { return v.visit(this, obj); } }
[ "opatrascoiu@yahoo.com" ]
opatrascoiu@yahoo.com
668b233c44c27ee003a4973fb0093205f3e0d8a4
643ab004f98842a83cf1999ed30dd7df7a4ada60
/sparke-module-support/src/main/java/cn/sparke/support/modules/v1/writing/bean/vo/Question.java
d88e57e4f87d50a2bba54c03837a4a384a3365c1
[]
no_license
JohnVeZh/spark-english-api-release-1.0.x
162130b1cedd90e09318077dc98a587fd03bccf3
f1659ffa072e6a79baa62b7636cbe1a17631ed26
refs/heads/master
2020-03-21T07:16:09.505836
2018-06-22T07:44:45
2018-06-22T07:44:45
138,270,184
0
0
null
null
null
null
UTF-8
Java
false
false
1,063
java
package cn.sparke.support.modules.v1.writing.bean.vo; import com.fasterxml.jackson.annotation.JsonIgnore; /** * @author ToQuery * @version V1.0 * @date 2017/7/10 19:20 */ public class Question{ private String id; private String content; private String analysis; private String reference; @JsonIgnore private String type; public String getType() { return type; } public void setType(String type) { this.type = type; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getAnalysis() { return analysis; } public void setAnalysis(String analysis) { this.analysis = analysis; } public String getReference() { return reference; } public void setReference(String reference) { this.reference = reference; } }
[ "530225288@qq.com" ]
530225288@qq.com
a14e548266ff6c4401b40b5277aa4527df9885fb
5c5ff74381acaf619dbdd95cda58f0d96f9f8334
/app/src/main/java/com/latihan/cooliner/ResepBakso.java
146a4e29cd7ce275a2e2a41c27c23cfbcf1b3d8a
[]
no_license
najmi10/Cooliner
3eb0a690b5bb53263786d0ec1435e69e5939cbd8
de6cdf46652f5534bcd6d738b0cbbdaa86283ba5
refs/heads/master
2023-01-18T19:38:29.636871
2020-12-03T08:56:16
2020-12-03T08:56:16
318,128,689
0
0
null
null
null
null
UTF-8
Java
false
false
881
java
package com.latihan.cooliner; import androidx.appcompat.app.AppCompatActivity; import android.net.Uri; import android.os.Bundle; import android.widget.MediaController; import android.widget.VideoView; public class ResepBakso extends AppCompatActivity { VideoView videoView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_resep_bakso); videoView = (VideoView) findViewById(R.id.videoView); //inisialisasi object videoView videoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.vid_bakso)); //digunakan untuk mengidentifikasi resource seperti lokasi video videoView.setMediaController(new MediaController(this)); //menampilkan media controller video videoView.start(); } }
[ "you@example.com" ]
you@example.com
a5e328b1387fa3ec0fab2ca827570051c579f9d0
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/JADX/src/main/java/org/telegram/messenger/C0607-$$Lambda$MessagesController$CpLCaAXrUWrrraDtT2_grVns0kE.java
f48e90bb8ac7c0252287de21493b25e58122d808
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
785
java
package org.telegram.messenger; import java.util.Comparator; import org.telegram.tgnet.TLRPC.Updates; /* compiled from: lambda */ /* renamed from: org.telegram.messenger.-$$Lambda$MessagesController$CpLCaAXrUWrrraDtT2_grVns0kE */ public final /* synthetic */ class C0607-$$Lambda$MessagesController$CpLCaAXrUWrrraDtT2_grVns0kE implements Comparator { public static final /* synthetic */ C0607-$$Lambda$MessagesController$CpLCaAXrUWrrraDtT2_grVns0kE INSTANCE = new C0607-$$Lambda$MessagesController$CpLCaAXrUWrrraDtT2_grVns0kE(); private /* synthetic */ C0607-$$Lambda$MessagesController$CpLCaAXrUWrrraDtT2_grVns0kE() { } public final int compare(Object obj, Object obj2) { return AndroidUtilities.compare(((Updates) obj).pts, ((Updates) obj2).pts); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
9332a320747a590950f6aa82e7a277eec464b335
61493988859ee2869df048c26ec2840760d23e80
/dwdmlinksim/src/com/tejas/eda/spice/parse/semi/mos/MOS3ModelCard.java
e03c92975ccd1463741057fe0fe6925c07951c27
[]
no_license
vikramzmail/tejPlan
6f2a34aafdf7df29d3d993b4f1bc3f11cd68b84c
749644dea9b59eee413b155222a19bbb50f8cab1
refs/heads/master
2021-01-01T05:40:51.841146
2015-03-04T17:40:28
2015-03-04T17:41:11
31,670,235
2
0
null
null
null
null
UTF-8
Java
false
false
4,757
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.tejas.eda.spice.parse.semi.mos; import com.tejas.eda.spice.device.semi.mos.MOS3Instance; import com.tejas.eda.spice.device.semi.mos.MOS3ModelValues; import com.tejas.eda.spice.parse.Deck; import com.tejas.eda.spice.parse.ParserException; import static com.tejas.eda.spice.Constants.CtoK; /** * * * @author Kristopher T. Beck */ public class MOS3ModelCard extends MOSModelCard<MOS3Instance, MOS3ModelValues> { public MOS3ModelCard(String cardString) throws ParserException { super(cardString); } @Override public MOS3Instance createInstance() { MOS3Instance instance = new MOS3Instance(); initModelValues(instance); return instance; } @Override public void setProperty(MOS3ModelValues model, String name, String value) { if (name.equals("VTO")) { model.setVt0(parseDouble(value)); } else if (name.equals("KP")) { model.setTransconductance(parseDouble(value)); } else if (name.equals("GAMMA")) { model.setGamma(parseDouble(value)); } else if (name.equals("PHI")) { model.setPhi(parseDouble(value)); } else if (name.equals("RD")) { model.setDrnResistance(parseDouble(value)); } else if (name.equals("RS")) { model.setSrcResistance(parseDouble(value)); } else if (name.equals("CBD")) { model.setCapBD(parseDouble(value)); } else if (name.equals("CBS")) { model.setCapBS(parseDouble(value)); } else if (name.equals("IS")) { model.setJctSatCur(parseDouble(value)); } else if (name.equals("PB")) { model.setBlkJctPotential(parseDouble(value)); } else if (name.equals("CGSO")) { model.setGateSrcOverlapCapFactor(parseDouble(value)); } else if (name.equals("CGDO")) { model.setGateDrnOverlapCapFactor(parseDouble(value)); } else if (name.equals("CGBO")) { model.setGateBlkOverlapCapFactor(parseDouble(value)); } else if (name.equals("RSH")) { model.setSheetResistance(parseDouble(value)); } else if (name.equals("CJ")) { model.setBlkCapFactor(parseDouble(value)); } else if (name.equals("MJ")) { model.setBlkJctBotGradingCoeff(parseDouble(value)); } else if (name.equals("CJSW")) { model.setSideWallCapFactor(parseDouble(value)); } else if (name.equals("MJSW")) { model.setBlkJctSideGradingCoeff(parseDouble(value)); } else if (name.equals("JS")) { model.setJctSatCurDensity(parseDouble(value)); } else if (name.equals("TOX")) { model.setOxideThickness(parseDouble(value)); } else if (name.equals("LD")) { model.setLatDiff(parseDouble(value)); } else if (name.equals("XL")) { model.setLengthAdjust(parseDouble(value)); } else if (name.equals("WD")) { model.setWidthNarrow(parseDouble(value)); } else if (name.equals("XW")) { model.setWidthAdjust(parseDouble(value)); } else if (name.equals("DELVTO")) { model.setDelvt0(parseDouble(value)); } else if (name.equals("U0")) { model.setSurfaceMobility(parseDouble(value)); } else if (name.equals("FC")) { model.setFwdCapDepCoeff(parseDouble(value)); } else if (name.equals("NSUB")) { model.setSubstrateDoping(parseDouble(value)); } else if (name.equals("TPG")) { model.setGateType(Integer.parseInt(value)); } else if (name.equals("NSS")) { model.setSurfaceStateDensity(parseDouble(value)); } else if (name.equals("ETA")) { model.setEta(parseDouble(value)); } else if (name.equals("DELTA")) { model.setDelta(parseDouble(value)); } else if (name.equals("NFS")) { model.setFastSurfaceStateDensity(parseDouble(value)); } else if (name.equals("THETA")) { model.setTheta(parseDouble(value)); } else if (name.equals("VMAX")) { model.setMaxDriftVel(parseDouble(value)); } else if (name.equals("KAPPA")) { model.setKappa(parseDouble(value)); } else if (name.equals("XJ")) { model.setJunctionDepth(parseDouble(value)); } else if (name.equals("TNOM")) { model.setTnom(parseDouble(value) + CtoK); } else if (name.equals("KF")) { model.setfNcoef(parseDouble(value)); } else if (name.equals("AF")) { model.setfNexp(parseDouble(value)); } } }
[ "vikrams@india.tejasnetworks.com" ]
vikrams@india.tejasnetworks.com
a55de3cfcc91ff65a07ab59da4cec792321b816f
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/abcenter/$$Lambda$b$XKjKaPoHrD2648ps9d8FrLW9Ck.java
1227dd329631633ba530b4d901e35acf91d68240
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
926
java
package com.zhihu.android.abcenter; import com.zhihu.android.app.util.C16943dj; import okhttp3.AbstractC32726ae; import p2189io.reactivex.p2209c.AbstractC31736h; import p2189io.reactivex.p2231i.Schedulers; /* renamed from: com.zhihu.android.abcenter.-$$Lambda$b$XKjKaPoHrD2648ps9d-8FrLW9Ck reason: invalid class name */ /* compiled from: lambda */ public final /* synthetic */ class $$Lambda$b$XKjKaPoHrD2648ps9d8FrLW9Ck implements AbstractC31736h { public static final /* synthetic */ $$Lambda$b$XKjKaPoHrD2648ps9d8FrLW9Ck INSTANCE = new $$Lambda$b$XKjKaPoHrD2648ps9d8FrLW9Ck(); private /* synthetic */ $$Lambda$b$XKjKaPoHrD2648ps9d8FrLW9Ck() { } @Override // p2189io.reactivex.p2209c.AbstractC31736h public final Object apply(Object obj) { return ((AbService) C16943dj.m83996a(AbService.class)).mo56341a(AbService.f39053a, (AbstractC32726ae) obj).subscribeOn(Schedulers.m148537b()); } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
b7d031ee3a8497e2e1310ea1671f8132272833d5
be7c20be8e396dfc15e6b3654e0e5ca04c5e0665
/platform-base/platform-common-shop/src/main/java/com/platform/dao/PaymentLogDao.java
f3fab441a4d5a4b0d7ee06f82ceb3c6cff84662d
[]
no_license
shuchongqj/duojifen
e465cce60ec07e060dc1859c2afc976f6a714db4
d8c0eb50b046024b55cb7d9b304f76b095051c99
refs/heads/master
2023-05-05T17:27:36.211808
2020-02-20T04:53:30
2020-02-20T04:53:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
package com.platform.dao; import com.platform.entity.PaymentLogEntity; /** * Dao * * @author softopensell * @email softopensell@outlook.com * @date 2019-04-29 22:33:28 */ public interface PaymentLogDao extends BaseDao<PaymentLogEntity> { }
[ "softopensell@outlook.com" ]
softopensell@outlook.com
c6b7a8780e2809d2b4efc9e2fb2ed5b7717f46ec
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
/hybris/bin/modules/web-content-management-system/cmsfacades/testsrc/de/hybris/platform/cmsfacades/media/validator/CreateMediaValidatorTest.java
242ca55aba5453bd7225766487175a4c4c3a645a
[]
no_license
shaikshakeeb785/hybrisNew
c753ac45c6ae264373e8224842dfc2c40a397eb9
228100b58d788d6f3203333058fd4e358621aba1
refs/heads/master
2023-08-15T06:31:59.469432
2021-09-03T09:02:04
2021-09-03T09:02:04
402,680,399
0
0
null
null
null
null
UTF-8
Java
false
false
4,561
java
/* * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.cmsfacades.media.validator; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.cmsfacades.constants.CmsfacadesConstants; import de.hybris.platform.cmsfacades.data.MediaData; import java.util.function.Predicate; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.Errors; @UnitTest @RunWith(MockitoJUnitRunner.class) public class CreateMediaValidatorTest { private static final String MEDIA_CODE = "mouse123"; private static final String MEDIA_DESC = "Wireless Mouse"; private static final String MEDIA_ALT_TEXT = "Apple Wireless Mouse"; private static final String INVALID = "invalid"; @Mock private Predicate<String> validStringLengthPredicate; @Mock private Predicate<String> mediaCodeExistsPredicate; @InjectMocks private CreateMediaValidator validator; private MediaData mediaData; private Errors errors; @Before public void setUp() { mediaData = new MediaData(); mediaData.setAltText(MEDIA_ALT_TEXT); mediaData.setCode(MEDIA_CODE); mediaData.setDescription(MEDIA_DESC); errors = new BeanPropertyBindingResult(mediaData, mediaData.getClass().getSimpleName()); when(validStringLengthPredicate.test(MEDIA_CODE)).thenReturn(Boolean.TRUE); when(validStringLengthPredicate.test(MEDIA_DESC)).thenReturn(Boolean.TRUE); when(validStringLengthPredicate.test(MEDIA_ALT_TEXT)).thenReturn(Boolean.TRUE); when(validStringLengthPredicate.test(INVALID)).thenReturn(Boolean.FALSE); when(mediaCodeExistsPredicate.test(MEDIA_CODE)).thenReturn(Boolean.FALSE); } @Test public void shouldSupportClass() { final boolean result = validator.supports(MediaData.class); assertTrue(result); } @Test public void shouldNotSupportClass() { final boolean result = validator.supports(Object.class); assertFalse(result); } @Test public void shouldPassAllValidations() { validator.validate(mediaData, errors); assertFalse(errors.hasErrors()); } @Test public void shouldFailCodeNotUnique() { when(mediaCodeExistsPredicate.test(MEDIA_CODE)).thenReturn(Boolean.TRUE); validator.validate(mediaData, errors); assertTrue(errors.hasErrors()); assertEquals(1, errors.getFieldErrorCount()); assertFieldError(CmsfacadesConstants.FIELD_ALREADY_EXIST, CreateMediaValidator.CODE); } @Test public void shouldFailCodeTooLongAndNotUnique() { when(validStringLengthPredicate.test(MEDIA_CODE)).thenReturn(Boolean.FALSE); when(mediaCodeExistsPredicate.test(MEDIA_CODE)).thenReturn(Boolean.TRUE); validator.validate(mediaData, errors); assertTrue(errors.hasErrors()); assertEquals(1, errors.getFieldErrorCount()); assertFieldError(CmsfacadesConstants.FIELD_LENGTH_EXCEEDED, CreateMediaValidator.CODE); } @Test public void shouldFailDescriptionTooLong() { when(validStringLengthPredicate.test(MEDIA_DESC)).thenReturn(Boolean.FALSE); validator.validate(mediaData, errors); assertTrue(errors.hasErrors()); assertEquals(1, errors.getFieldErrorCount()); assertFieldError(CmsfacadesConstants.FIELD_LENGTH_EXCEEDED, CreateMediaValidator.DESCRIPTION); } @Test public void shouldFailNullCode() { mediaData.setCode(null); validator.validate(mediaData, errors); assertTrue(errors.hasErrors()); assertEquals(1, errors.getFieldErrorCount()); assertFieldError(CmsfacadesConstants.FIELD_REQUIRED, CreateMediaValidator.CODE); } @Test public void shouldFailAllNullFieldsValidations() { mediaData.setAltText(null); mediaData.setCode(null); mediaData.setDescription(null); validator.validate(mediaData, errors); assertTrue(errors.hasErrors()); assertEquals(3, errors.getFieldErrorCount()); assertFieldError(CmsfacadesConstants.FIELD_REQUIRED, CreateMediaValidator.CODE); assertFieldError(CmsfacadesConstants.FIELD_REQUIRED, CreateMediaValidator.DESCRIPTION); assertFieldError(CmsfacadesConstants.FIELD_REQUIRED, CreateMediaValidator.ALT_TEXT); } protected void assertFieldError(final String expectedError, final String errorCode) { assertEquals(expectedError, errors.getFieldError(errorCode).getCode()); } }
[ "sauravkr82711@gmail.com" ]
sauravkr82711@gmail.com
ae0bfe22412ba179c71fd9f0809550acc5258bb9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_c7a572609b0a8f6f2eb998bcccaa3aacc0ff4867/TileEntityBatteryBox/27_c7a572609b0a8f6f2eb998bcccaa3aacc0ff4867_TileEntityBatteryBox_s.java
705653e7e6e26607b2fa00af4b1922029c95c9e7
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,205
java
package com.builtbroken.assemblyline.machine; import java.util.EnumSet; import net.minecraft.inventory.Container; import net.minecraft.network.packet.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; import universalelectricity.api.CompatibilityModule; import universalelectricity.api.energy.IEnergyInterface; import universalelectricity.api.item.ElectricItemHelper; import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.VectorHelper; import com.builtbroken.minecraft.network.PacketHandler; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.google.common.io.ByteArrayDataInput; import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.registry.LanguageRegistry; /** Simple in out battery box * * @author DarkGuardsman */ public class TileEntityBatteryBox extends TileEntityEnergyMachine { public TileEntityBatteryBox() { super(0, 5000000); this.invSlots = 2; this.hasGUI = true; } @Override public void updateEntity() { super.updateEntity(); if (!this.worldObj.isRemote && this.enabled && !this.isDisabled()) { /** Recharges electric item. */ this.setEnergy(ForgeDirection.UNKNOWN, this.getEnergy(ForgeDirection.UNKNOWN) - CompatibilityModule.chargeItem(this.getStackInSlot(0), Math.min(10000, this.getEnergyStored()), true)); /** Decharge electric item. */ this.setEnergy(ForgeDirection.UNKNOWN, this.getEnergy(ForgeDirection.UNKNOWN) + CompatibilityModule.disChargeItem(this.getStackInSlot(1), Math.min(10000, this.getEnergyCapacity(ForgeDirection.UNKNOWN) - this.getEnergyStored()), true)); this.produce(); } } @Override public boolean canConnect(ForgeDirection direction) { return true; } @Override public EnumSet<ForgeDirection> getOutputDirections() { return EnumSet.of(ForgeDirection.getOrientation(this.getBlockMetadata()).getOpposite()); } /** The electrical input direction. * * @return The direction that electricity is entered into the tile. Return null for no input. By * default you can accept power from all sides. */ public EnumSet<ForgeDirection> getInputDirections() { EnumSet<ForgeDirection> et = EnumSet.allOf(ForgeDirection.class); et.remove(ForgeDirection.getOrientation(this.getBlockMetadata()).getOpposite()); et.remove(ForgeDirection.UNKNOWN); return et; } @Override public boolean simplePacket(String id, ByteArrayDataInput dis, Player player) { boolean r = super.simplePacket(id, dis, player); try { if (this.worldObj.isRemote && !r) { if (id.equalsIgnoreCase("desc")) { this.setEnergy(ForgeDirection.UNKNOWN, dis.readLong()); this.setMaxEnergyStored(dis.readLong()); return true; } } } catch (Exception e) { e.printStackTrace(); } return r; } @Override public Packet getDescriptionPacket() { return PacketHandler.instance().getTilePacket(this.getChannel(), "desc", this, this.getEnergyStored(), this.getMaxEnergyStored()); } @Override public Packet getGUIPacket() { return this.getDescriptionPacket(); } @Override public Class<? extends Container> getContainer() { return ContainerBatteryBox.class; } @Override public String getInvName() { return LanguageRegistry.instance().getStringLocalization("tile.batterybox.name"); } @Override public int getInventoryStackLimit() { return 1; } @Override public boolean isInvNameLocalized() { return true; } @Override public int[] getAccessibleSlotsFromSide(int slotID) { return new int[] { 0, 1 }; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
74531c2e6094d5d583e70e0991078f87b069d1b9
e0532d36d933f76c1a3ccf90dcb78489ee01501e
/middlegroudInterfaceTest/src/main/java/com/duoweidu/utils/ConfigFileUrl.java
3d5954f999d2799b1f856b7d3ac6d926bfe793e4
[]
no_license
wuhaiyanwhy/jiekouzidonghua_dwd
ff7bdbbcc21683d2d592ea48624b476dd9ff027f
1627453a5ad678b5438ad424ca1f23e0de2b3aa0
refs/heads/master
2022-07-15T16:40:14.545287
2019-10-25T08:32:34
2019-10-25T08:32:34
217,483,394
1
0
null
2022-06-29T17:44:05
2019-10-25T08:03:53
HTML
UTF-8
Java
false
false
2,931
java
package com.duoweidu.utils; import com.duoweidu.config.sql.SqlDetail; import com.duoweidu.config.sql.SqlGeneral; import java.util.Locale; import java.util.ResourceBundle; /** * 获取环境,开关,URL地址相关 */ public class ConfigFileUrl { private static ResourceBundle bundle=ResourceBundle.getBundle("switch", Locale.CHINA); /** * 拼接url * @param name * @return */ public static String getUrlByKey(String name) { String protocol = SqlDetail.getInstance().getProtocol(); String server_name = SqlDetail.getInstance().getServerName(); String path = SqlDetail.getInstance().getPath(name); if (path.isEmpty()) { throw new IllegalStateException("未知地址"); } return protocol + "://" + server_name + path; } /** * 拼接url * @param name * @return */ public static String getUrlByKey(String name, int channel_id) { String protocol = SqlGeneral.getServerHostValue(channel_id).getProtocol(); String server_name = SqlGeneral.getServerHostValue(channel_id).getServer_name(); String path = SqlGeneral.getInterfacePathValue(channel_id, name).getPath(); if (path.isEmpty()) { throw new IllegalStateException("未知地址"); } return protocol + "://" + server_name + path; } /** * 拼接url,根据渠道 * @param channel_id * @param env * @param name * @return */ public static String getUrlByKey(int channel_id, int env, String name) { String protocol = SqlGeneral.getServerHostValue(channel_id, env).getProtocol(); String server_name = SqlGeneral.getServerHostValue(channel_id, env).getServer_name(); String path = SqlGeneral.getInterfacePathValue(channel_id, name).getPath(); if (path.isEmpty()) { throw new IllegalStateException("未知地址"); } return protocol + "://" + server_name + path; } //环境 public static String getEnv() { return bundle.getString("test.env"); } //调试开关 public static String getDebug() { return bundle.getString("debug"); } //当前渠道 public static int getChannel() { return Integer.parseInt(bundle.getString("channel")); } /** * 有多个渠道时设置以下方法 * @return */ public static int getChannel1() { return Integer.parseInt(bundle.getString("channel1")); } public static int getChannel2() { return Integer.parseInt(bundle.getString("channel2")); } //获取接口的限制时间 public static int getLimitTime() { return Integer.parseInt(bundle.getString("limitTime")); } //后台的限制时间特殊处理 public static int getLimitTime1() { return Integer.parseInt(bundle.getString("limitTime1")); } }
[ "1174837652@qq.com" ]
1174837652@qq.com
bdcca07fb3ddc5e4202217cd11750cf0cbf9906f
d39337141191bda495c9063fc4535d14b416466f
/ArchPagingLibraryWithNetworkJava/app/src/main/java/org/brainail/Everboxing/sample/NetworkPaging/model/KitsuResponse.java
9acd3e57fba8df2b93d182e4942456300e5ad523
[]
no_license
qskeksq/Android_PagingLibrary
aa68db3063ca5abce7916228c5caa7de378e4d84
a8bb74f38ad840a22e79af2657bac222abd4a7f6
refs/heads/master
2020-03-22T01:48:38.196012
2018-07-01T13:30:16
2018-07-01T13:30:16
139,331,346
0
0
null
null
null
null
UTF-8
Java
false
false
2,195
java
package org.brainail.Everboxing.sample.NetworkPaging.model; import java.util.List; /** * This file is part of Everboxing modules. <br/><br/> * <p> * The MIT License (MIT) <br/><br/> * <p> * Copyright (c) 2017 Malyshev Yegor aka brainail at org.brainail.everboxing@gmail.com <br/><br/> * <p> * Permission is hereby granted, free of charge, to any person obtaining a copy <br/> * of this software and associated documentation files (the "Software"), to deal <br/> * in the Software without restriction, including without limitation the rights <br/> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell <br/> * copies of the Software, and to permit persons to whom the Software is <br/> * furnished to do so, subject to the following conditions: <br/><br/> * <p> * The above copyright notice and this permission notice shall be included in <br/> * all copies or substantial portions of the Software. <br/><br/> * <p> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR <br/> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, <br/> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE <br/> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER <br/> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, <br/> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN <br/> * THE SOFTWARE. */ public class KitsuResponse { public List<KitsuItem> data; public KitsuResponse(final List<KitsuItem> data) { this.data = data; } @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final KitsuResponse that = (KitsuResponse) o; return data != null ? data.equals(that.data) : that.data == null; } @Override public int hashCode() { return data != null ? data.hashCode() : 0; } @Override public String toString() { return "KitsuResponse{" + "data=" + data + '}'; } }
[ "qskeksq@gmail.com" ]
qskeksq@gmail.com
d26ff8282971e4b5af18b16a961ee71fcba83d32
3b3638de9f031124511cc3c6920dc043469a2ea3
/src/main/java/ideah/tree/expr/LetExpr.java
e059e7a40a18d8f695166f60bbc71863fbbafdb9
[]
no_license
consulo/consulo-haskell
e049587308b86f78a6fb0d1193ee535b7d688db6
5b7b2008399ed9cb1948b530e9ecd94e96ecf98e
refs/heads/master
2021-12-31T04:05:18.160237
2021-12-24T20:28:07
2021-12-24T20:28:07
11,036,227
0
1
null
null
null
null
UTF-8
Java
false
false
1,368
java
package ideah.tree.expr; import com.google.common.collect.Iterables; import ideah.tree.*; import java.util.Arrays; public final class LetExpr extends Expression { public final LocalBinds localBinds; public final Expression expression; public LetExpr(IRange location, LocalBinds localBinds, Expression expression) { super(location); this.localBinds = localBinds; this.expression = expression; } protected Iterable<Located> getChildren() { return Iterables.concat(localBinds.getChildren(), Arrays.asList(expression)); } @Override protected void rebuildStructure(RangeFactory factory) { Located let = findKeyword("let"); Located in = findKeyword("in"); if (let != null && in != null) { int from = allChildren.indexOf(let); int to = allChildren.indexOf(in); IndentBlock letBinds = LocalBinds.createSubBlock(allChildren, from + 1, to, factory, let); allChildren.remove(from); allChildren.add(from, letBinds); IndentBlock inExpr = LocalBinds.createSubBlock(allChildren, from + 2, allChildren.size(), factory, in); allChildren.remove(from + 1); allChildren.add(from + 1, inExpr); // todo: indent binds relative to let? // todo: align let/in? } } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
6c4535c2db7988c7584f3576620469b117295a94
96d71f73821cfbf3653f148d8a261eceedeac882
/external/decompiled/android/WhatsApp-2.8.4278_dex2jar.src.meta/com/whatsapp/yu.java
c66b24cf178ba898253e86ee658acfe4e183f828
[]
no_license
JaapSuter/Niets
9a9ec53f448df9b866a8c15162a5690b6bcca818
3cc42f8c2cefd9c3193711cbf15b5304566e08cb
refs/heads/master
2020-04-09T19:09:40.667155
2012-09-28T18:11:33
2012-09-28T18:11:33
5,751,595
2
1
null
null
null
null
UTF-8
Java
false
false
701
java
package com.whatsapp; public class yu extends wu { public int a(int paramInt) { int i = 2; int j = wu.b; int k = paramInt % 100; int m = paramInt % 10; if ((m == 1) && (k != 11)); while (true) { return i; if ((m >= i) && (m <= 4) && ((k < 12) || (k > 14))) { i = 8; } else if ((m == 0) || ((m >= 5) && (m <= 9)) || ((k >= 11) && (k <= 14))) { i = 16; } else { i = 0; if (App.wc != 0) wu.b = j + 1; } } } } /* Location: C:\Users\Jaap\Downloads\Code\WhatsApp-2.8.4278_dex2jar.jar * Qualified Name: com.whatsapp.yu * JD-Core Version: 0.6.1 */
[ "git@jaapsuter.com" ]
git@jaapsuter.com
ef0cd620a2a272aadb3069f630e29a876bd70e21
5b18912685a4638f3363ce3333dd2722170b90c8
/src/bfsdfs/medium/ClosedIslands.java
6954cb224717f1d7354d20111ee4002702d7373d
[]
no_license
Poorvankbhatia/Leetcode
adfa7f8ff787cafd8cb43f87b043b272229c95f1
dbe2fe65a69cda182d3b759565f8077fe3de27a0
refs/heads/master
2022-12-18T14:45:23.911905
2022-12-12T09:03:59
2022-12-12T09:03:59
66,108,432
12
6
null
null
null
null
UTF-8
Java
false
false
1,724
java
/* Given a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of 0s and a closed island is an island totally (all left, top, right, bottom) surrounded by 1s. Return the number of closed islands. Input: grid = [[1,1,1,1,1,1,1,0],[1,0,0,0,0,1,1,0],[1,0,1,0,1,1,1,0],[1,0,0,0,0,1,0,1],[1,1,1,1,1,1,1,0]] Output: 2 Explanation: Islands in gray are closed because they are completely surrounded by water (group of 1s). Input: grid = [[0,0,1,0,0],[0,1,0,1,0],[0,1,1,1,0]] Output: 1 Input: grid = [[1,1,1,1,1,1,1], [1,0,0,0,0,0,1], [1,0,1,1,1,0,1], [1,0,1,0,1,0,1], [1,0,1,1,1,0,1], [1,0,0,0,0,0,1], [1,1,1,1,1,1,1]] Output: 2 */ package bfsdfs.medium; public class ClosedIslands { int[][] dir = new int[][]{{0,1},{1,0},{0,-1},{-1,0}}; public int closedIsland(int[][] grid) { int count=0; for(int i=0;i<grid.length;i++) { for(int j=0;j<grid[0].length;j++) { if(grid[i][j]==0) { count+=dfs(grid,i,j)?1:0; } } } return count; } private boolean dfs(int[][] grid,int i,int j) { if(i<0 || j<0 || i>=grid.length || j>=grid[0].length) { return false; } if(grid[i][j]==1) { return true; } grid[i][j]=1; boolean isSurrounded = true; for(int k=0;k<4;k++) { int nextX = i+dir[k][0]; int nextY = j+dir[k][1]; isSurrounded = isSurrounded & dfs(grid,nextX,nextY); } return isSurrounded; } } /* Similar to surrounded regions. */
[ "puravbhatia9@gmail.com" ]
puravbhatia9@gmail.com
a63691615cd02815caa0311cc619ed9474f32737
573a66e4f4753cc0f145de8d60340b4dd6206607
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/1438167/pmd-src-4.3/pmd-src-4.3/src/net/sourceforge/pmd/parsers/Java14Parser.java
e7ec252aabc32d2ee00f4559484ab18b1679b950
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mkaouer/Code-Smells-Detection-in-JavaScript
3919ec0d445637a7f7c5f570c724082d42248e1b
7130351703e19347884f95ce6d6ab1fb4f5cfbff
refs/heads/master
2023-03-09T18:04:26.971934
2022-03-23T22:04:28
2022-03-23T22:04:28
73,915,037
8
3
null
2023-02-28T23:00:07
2016-11-16T11:47:44
null
UTF-8
Java
false
false
899
java
package net.sourceforge.pmd.parsers; import net.sourceforge.pmd.ast.JavaCharStream; import net.sourceforge.pmd.ast.JavaParser; import net.sourceforge.pmd.ast.ParseException; import java.io.Reader; import java.util.Map; /** * Adapter for the JavaParser, using Java 1.4 grammar. * * @author Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be */ public class Java14Parser implements Parser { private JavaParser parser; private String marker; public Object parse(Reader source) throws ParseException { parser = new JavaParser(new JavaCharStream(source)); parser.setJdkVersion(4); parser.setExcludeMarker(marker); return parser.CompilationUnit(); } public Map<Integer, String> getExcludeMap() { return parser.getExcludeMap(); } public void setExcludeMarker(String marker) { this.marker = marker; } }
[ "mmkaouer@umich.edu" ]
mmkaouer@umich.edu
d3933cbe96cb3e3d9b30f9b0e8d531077ef4313e
fabd01e4d39dc9c26e5a5142f688bbfd7b5d60b6
/quickstart-t-io/src/main/java/org/quickstart/t/io/example/common/HelloPacket.java
df6060e4ecda785b04ed31e2b09f3f60bf0cafef
[ "Apache-2.0" ]
permissive
youngzil/quickstart-remoting
78a725ad73d7dc5f01449129f55efc4d584a1f3a
123c8fe36d598130636b5731c884de273b49f72c
refs/heads/master
2023-05-10T16:38:02.410474
2022-08-25T15:55:05
2022-08-25T15:55:05
140,261,475
0
0
Apache-2.0
2023-05-09T18:41:01
2018-07-09T09:18:14
Java
UTF-8
Java
false
false
558
java
package org.quickstart.t.io.example.common; import org.tio.core.intf.Packet; /** * @author tanyaowu */ public class HelloPacket extends Packet { private static final long serialVersionUID = -172060606924066412L; public static final int HEADER_LENGHT = 4;//消息头的长度 public static final String CHARSET = "utf-8"; private byte[] body; /** * @return the body */ public byte[] getBody() { return body; } /** * @param body the body to set */ public void setBody(byte[] body) { this.body = body; } }
[ "youngzil@163.com" ]
youngzil@163.com
477015d3ac83c7d6d1683b24763cbf86439aec64
6fdd4b50ead3e8f9923262fd2ba6f9c3acd4e7c0
/Database Project TV channel management/Project_TV_Channel-master/updated project/Project_TV_Channel-master/src/main/Jobs_history.java
679b62539f096830cdb1ea16523ad29e79e58d2d
[]
no_license
Mritunjoy71/CSE_216-Database-Sessional
5c145d4695d8d763e47b3e97ce93c2282fcb34d3
3c1c56884cfdc0388c90e15cbfc75432fe8e5dd2
refs/heads/master
2023-02-19T00:33:37.013842
2021-01-22T08:13:50
2021-01-22T08:13:50
331,879,590
0
0
null
null
null
null
UTF-8
Java
false
false
1,611
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 main; /** * * @author user2 */ public class Jobs_history { String employee_id,start_date,end_date,job_id,department_id; public Jobs_history(String employee_id, String start_date, String end_date, String job_id, String department_id) { this.employee_id = employee_id; this.start_date = start_date; this.end_date = end_date; this.job_id = job_id; this.department_id = department_id; } public String getEmployee_id() { return employee_id; } public String getStart_date() { return start_date; } public String getEnd_date() { return end_date; } public String getJob_id() { return job_id; } public String getDepartment_id() { return department_id; } public void setEmployee_id(String employee_id) { this.employee_id = employee_id; } public void setStart_date(String start_date) { this.start_date = start_date; } public void setEnd_date(String end_date) { this.end_date = end_date; } public void setJob_id(String job_id) { this.job_id = job_id; } public void setDepartment_id(String department_id) { this.department_id = department_id; } @Override public String toString() { return employee_id + " " + start_date + " " + end_date + " " + job_id + " " + department_id; } }
[ "you@example.com" ]
you@example.com
797f8aecb63c375de9d96c8d460625c92fc00a35
c278c78ed9a967f6ef2e2c136b5311f62b6ad2d1
/aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/GetHostedZoneCountRequest.java
62127099dc3ac0fa219b560a051e67835ab721d7
[ "JSON", "Apache-2.0" ]
permissive
codota/aws-sdk-java
0e3141f309c92ab7af1e175e173cce3b1ee9a087
909d2a2cd8816dd48b15a2e79a8f0dfb65cd2356
refs/heads/master
2020-12-25T10:50:51.895633
2016-02-05T21:16:08
2016-02-05T21:16:08
51,334,568
0
1
null
2016-02-08T23:21:00
2016-02-08T23:21:00
null
UTF-8
Java
false
false
1,997
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights * Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.route53.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** * <p> * To retrieve a count of all your hosted zones, send a <code>GET</code> request * to the <code>2013-04-01/hostedzonecount</code> resource. * </p> */ public class GetHostedZoneCountRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetHostedZoneCountRequest == false) return false; GetHostedZoneCountRequest other = (GetHostedZoneCountRequest) obj; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; return hashCode; } @Override public GetHostedZoneCountRequest clone() { return (GetHostedZoneCountRequest) super.clone(); } }
[ "aws@amazon.com" ]
aws@amazon.com
511227247c72717574ee6bb3a534b104f8a1389b
3b5dce38a7ec8186b434dd96b0143b6c6ed7b584
/jbbvm/bbvm-core/src/main/java/me/wener/bbvm/vm/Symbol.java
0029695523b135f879be5029494499db87e5929c
[ "Apache-2.0" ]
permissive
wenerme/bbvm
be4cb9481425ccdb89e1527f5b7da9e754305378
764e6f07536ca9e530be76110a641346f2294cb4
refs/heads/master
2023-03-18T17:36:48.928196
2021-06-27T19:03:36
2021-06-27T19:03:36
23,155,396
16
4
Apache-2.0
2023-03-07T01:14:52
2014-08-20T16:19:48
Java
UTF-8
Java
false
false
187
java
package me.wener.bbvm.vm; /** * A symbol represent a address in memory * * @author wener * @since 15/12/11 */ public interface Symbol { String getName(); int getValue(); }
[ "wenermail@gmail.com" ]
wenermail@gmail.com
0efa7582d24c0638989cf2a511c16383af8af8c1
987c8e7d5ce91ae39f67cf82eae9826a4bf0744d
/src/com/beini/sql/ArticleSql.java
2e9e62fa18dde5d6f83ba1264dff8f85e1fa80b2
[]
no_license
hwhVm/KotlinAppService
3c6b61606e8d9e556424ed86a9c1cb0d1d485c41
8c01eeb8ee6fec6d929724b0d875766d12b96234
refs/heads/master
2021-06-04T04:35:54.795572
2019-06-09T10:07:29
2019-06-09T10:07:29
96,605,439
1
0
null
null
null
null
UTF-8
Java
false
false
580
java
package com.beini.sql; import org.apache.ibatis.jdbc.SQL; /** * Created by beini on 2017/4/19. */ public class ArticleSql { private String tableName = "t_user"; public String findAllSql() { return new SQL() { { SELECT("*"); FROM(tableName); } }.toString(); } public String findUserByIdSql(int id) { return new SQL(){ { SELECT("*"); FROM(tableName); WHERE("user_id=" + id); } }.toString(); } }
[ "874140704@qq.com" ]
874140704@qq.com
b327c2b0a31655c2fe78baca12fc53a3ae94a6ba
f77857fd393f152cb9b430766d7314e802d6ae4f
/src/test/java/org/codelibs/fess/ds/csv/CsvDataStoreTest.java
ae2252b812d8925b2ce1ecc5c38fb409072430d8
[ "Apache-2.0" ]
permissive
codelibs/fess-ds-csv
441d3b164c12cb5062e6fd69aaa18578f06110a4
4df03eb9af83e4f61fd30955542d63aaf255a774
refs/heads/master
2023-08-17T07:55:52.835844
2023-08-06T05:40:47
2023-08-06T05:40:47
135,579,169
2
1
NOASSERTION
2020-10-13T13:09:58
2018-05-31T12:13:36
Java
UTF-8
Java
false
false
1,385
java
/* * Copyright 2012-2023 CodeLibs Project and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.codelibs.fess.ds.csv; import org.codelibs.fess.util.ComponentUtil; import org.dbflute.utflute.lastadi.ContainerTestCase; public class CsvDataStoreTest extends ContainerTestCase { public CsvDataStore dataStore; @Override protected String prepareConfigFile() { return "test_app.xml"; } @Override protected boolean isSuppressTestCaseTransaction() { return true; } @Override public void setUp() throws Exception { super.setUp(); dataStore = new CsvDataStore(); } @Override public void tearDown() throws Exception { ComponentUtil.setFessConfig(null); super.tearDown(); } public void test_xxx() { // TODO assertTrue(true); } }
[ "shinsuke@apache.org" ]
shinsuke@apache.org
88882ebc32074712b450944f93803e2677cd0433
34ba129e3923eaeb66ced20380956fac0b9b855a
/Aula8/src/br/com/elaborata/colecao/comparable/Main.java
34792478862a1cad2025e0b007f63f2f8fb047cf
[]
no_license
ladp17/javaA
e59eb597fd8340c1f99e29a02ebff48940e06f5e
793edb5b9f588f3348af13b0a0ac626996d99418
refs/heads/master
2020-07-14T06:26:10.494209
2019-09-23T23:52:08
2019-09-23T23:52:08
205,260,360
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
/** * */ package br.com.elaborata.colecao.comparable; import java.util.ArrayList; import java.util.Collections; /** * @author aluno * */ public class Main { /** * @param args */ public static void main(String[] args) { ArrayList<Aluno> alunos = new ArrayList<Aluno>(); alunos.add(new Aluno(2, "BAluno2", "m")); alunos.add(new Aluno(4, "DAluno4", "m")); alunos.add(new Aluno(1, "AAluno1", "m")); alunos.add(new Aluno(3, "CAluno3", "m")); Collections.sort(alunos); for (Aluno aluno : alunos) { System.out.println(aluno); } } }
[ "email" ]
email
1e0c31b568de7eaf9aba1d2c5944af7d4e801c85
7babc8d969e1e0878a1917901b10c1777c128b03
/ddl-designpattern/src/main/java/com/ddl/mediator/smarthouse/TV.java
ef4c94933cbe25fc67d9cb979d853bd02339d063
[]
no_license
vigour0423/ddlall
430912dde1a3cd881d29b017f2952ec4b727d852
7915abf5f9e93391cefdbb8d75952b6755fcca48
refs/heads/master
2022-12-25T05:29:28.990336
2020-05-14T15:43:05
2020-05-14T15:43:05
154,122,468
0
2
null
2022-12-16T09:45:08
2018-10-22T10:05:15
Java
UTF-8
Java
false
false
493
java
package com.ddl.mediator.smarthouse; public class TV extends Colleague { public TV(Mediator mediator, String name) { super(mediator, name); mediator.Register(name, this); } @Override public void SendMessage(int stateChange) { this.GetMediator().GetMessage(stateChange, this.name); } public void StartTv() { System.out.println("It's time to StartTv!"); } public void StopTv() { System.out.println("StopTv!"); } }
[ "489582986@qq.com" ]
489582986@qq.com
d3b380787ddf7278935b99ee0a9d0663b56095fd
a3625c4d9dd7a3e0eef9010c18cfda040b05315a
/app/parent-end/ChildrenGuard/src/eden/sun/childrenguard/util/MemoryCache.java
ed2f01015ff34d6104f72fcdc42691ed389b848b
[]
no_license
zhaozw/children-guard
62f0abe612e167944d22ed2bfff8cc4fe93060e5
d3a974ad29c350d810b167b3e6bcb0a4261fcaa4
refs/heads/master
2021-01-18T12:44:54.255568
2014-11-19T09:17:21
2014-11-19T09:17:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
690
java
package eden.sun.childrenguard.util; import java.lang.ref.SoftReference; import java.util.Collections; import java.util.HashMap; import java.util.Map; import android.graphics.Bitmap; public class MemoryCache { private Map<String, SoftReference<Bitmap>> cache=Collections.synchronizedMap(new HashMap<String, SoftReference<Bitmap>>()); public Bitmap get(String id){ if(!cache.containsKey(id)) return null; SoftReference<Bitmap> ref=cache.get(id); return ref.get(); } public void put(String id, Bitmap bitmap){ cache.put(id, new SoftReference<Bitmap>(bitmap)); } public void clear() { cache.clear(); } }
[ "durian.suen@gmail.com" ]
durian.suen@gmail.com
6f62fb0fec643a2118a225ae5034a808565767bd
c5f0b9a449b0e22ad87a05f2a4d7a010ed167cb3
/3_implementation/src/net/hudup/core/alg/ModelBasedRecommender.java
b8c1e0e11717914940808a95e0b866346ed1c558
[ "MIT" ]
permissive
sunflowersoft/hudup-ext
91bcd5b48d84ab33d6d8184e381d27d8f42315f7
cb62d5d492a82f1ecc7bc28955a52e767837afd3
refs/heads/master
2023-08-03T12:25:02.578863
2023-07-21T08:23:52
2023-07-21T08:23:52
131,940,602
0
0
null
null
null
null
UTF-8
Java
false
false
2,076
java
/** * HUDUP: A FRAMEWORK OF E-COMMERCIAL RECOMMENDATION ALGORITHMS * (C) Copyright by Loc Nguyen's Academic Network * Project homepage: hudup.locnguyen.net * Email: ng_phloc@yahoo.com * Phone: +84-975250362 */ package net.hudup.core.alg; /** * Two typical inherited interfaces of {@link Recommender} are {@code MemoryBasedRecomender} and {@code ModelBasedRecommender} * which in turn are interfaces for memory-based recommendation algorithm and model-based recommendation algorithm. * As a convention, this interface is called model-based recommender. * <br> * Model-based recommender applies knowledge database represented by {@link KBase} interface into performing recommendation task. * In other words, {@code KBase} provides both necessary information and inference mechanism to model-based recommender. * Ability of inference is the unique feature of {@code KBase}. Model-based recommender is responsible for creating {@code KBase} by * calling its {@link #newKB()} method and so, every model-based recommender owns distinguished {@code KBase}. * For example, if model-based recommender uses frequent purchase pattern to make recommendation, its {@code KBase} contains such pattern. * model-based recommender always takes advantages of {@code KBase} whereas memory-based recommender uses dataset in execution. * <br> * In general, methods of model-based recommender always using {@code KBase} are {@code ModelBasedRecommender.setup()}, {@code ModelBasedRecommender.createKB()}, {@code ModelBasedRecommender.estimate(...)} and {@code ModelBasedRecommender.recommend(...)}. * Especially, it is mandatory that {@code setup()} method of model-based recommender calls method {@code KBase.learn(...)} or {@code KBase.load()}. * The association between memory-based recommender represented by {@code MemoryBasedRecommender} interface and dataset indicates that all memory-based algorithms use dataset for recommendation task. * * @author Loc Nguyen * @version 10.0 * */ public interface ModelBasedRecommender extends Recommender, ModelBasedAlg { }
[ "ngphloc@gmail.com" ]
ngphloc@gmail.com
d3a16161a33378ac8e4efb1170a65ace764cb1b5
5d627873300a067e390b7f14f541a29ed53312f6
/src/test/java/com/example/bench/LauncherStateTests.java
b414d5f9aa7a473cebe3c817f83ba31414513023
[]
no_license
jesesun/spring-boot-allocations
441be08502728441824f00bdfbc843f37ac2bcc5
31b86fad792ecad8e529641e49cdd4270327a88f
refs/heads/master
2023-04-16T16:41:36.026146
2021-05-04T10:54:31
2021-05-04T10:54:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,627
java
/* * Copyright 2016-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.bench; import com.example.auto.AutoApplication; import com.example.boot.BootApplication; import com.example.func.FuncApplication; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.system.CapturedOutput; import org.springframework.boot.test.system.OutputCaptureExtension; import static org.assertj.core.api.Assertions.assertThat; /** * @author Dave Syer * */ @ExtendWith(OutputCaptureExtension.class) public class LauncherStateTests { private LauncherState state; @BeforeEach public void init() throws Exception { state = new LauncherState(); state.start(); } @AfterEach public void close() throws Exception { if (state != null) { state.close(); } } @Test public void isolated(CapturedOutput output) throws Exception { state.isolated(); assertThat(output.toString()).contains("Benchmark app started"); } @Test public void shared(CapturedOutput output) throws Exception { // System.setProperty("bench.args", "-verbose:class"); state.shared(); assertThat(output.toString()).contains("Benchmark app started"); } @Test public void func(CapturedOutput output) throws Exception { // System.setProperty("bench.args", "-verbose:class"); state.setMainClass(FuncApplication.class); state.shared(); assertThat(output.toString()).contains("Benchmark app started"); } @Test public void boot(CapturedOutput output) throws Exception { // System.setProperty("bench.args", "-verbose:class"); state.setMainClass(BootApplication.class); state.shared(); assertThat(output.toString()).contains("Benchmark app started"); } @Test public void auto(CapturedOutput output) throws Exception { // System.setProperty("bench.args", "-verbose:class"); state.setMainClass(AutoApplication.class); state.shared(); assertThat(output.toString()).contains("Benchmark app started"); } }
[ "dsyer@pivotal.io" ]
dsyer@pivotal.io
d9bf2ecb3eaaf7866e60405519f0820a2789949a
26a837b93cf73e6c372830f9a7a316c01081a4ea
/processor/src/test/fixtures/expected/com/example/collections/Arez_MemoizeKeepAliveListModel.java
29bd3fb88dca61ab521601b7e7d5b12f68f58143
[ "Apache-2.0" ]
permissive
arez/arez
033b27f529b527c747b2a93f3c2c553c41c32acd
df68d72a69d3af1123e7d7c424f77b74f13f8052
refs/heads/master
2023-06-08T00:09:56.319223
2023-06-05T02:12:14
2023-06-05T02:12:14
96,367,327
13
4
Apache-2.0
2022-12-10T20:29:35
2017-07-05T22:50:24
Java
UTF-8
Java
false
false
8,128
java
package com.example.collections; import arez.Arez; import arez.ArezContext; import arez.Component; import arez.ComputableValue; import arez.Disposable; import arez.SafeProcedure; import arez.component.DisposeNotifier; import arez.component.Identifiable; import arez.component.internal.CollectionsUtil; import arez.component.internal.ComponentKernel; import java.util.List; import javax.annotation.Nonnull; import javax.annotation.processing.Generated; import org.realityforge.braincheck.Guards; @Generated("arez.processor.ArezProcessor") @SuppressWarnings("unchecked") final class Arez_MemoizeKeepAliveListModel extends MemoizeKeepAliveListModel implements Disposable, Identifiable<Integer>, DisposeNotifier { private static volatile int $$arezi$$_nextId; private final ComponentKernel $$arezi$$_kernel; @Nonnull private final ComputableValue<List<String>> $$arez$$_myValue; private List<String> $$arezd$$_$$cache$$_myValue; private List<String> $$arezd$$_$$unmodifiable_cache$$_myValue; private boolean $$arezd$$_$$cache_active$$_myValue; Arez_MemoizeKeepAliveListModel() { super(); final ArezContext $$arezv$$_context = Arez.context(); final int $$arezv$$_id = ++$$arezi$$_nextId; final String $$arezv$$_name = Arez.areNamesEnabled() ? "com_example_collections_MemoizeKeepAliveListModel." + $$arezv$$_id : null; final Component $$arezv$$_component = Arez.areNativeComponentsEnabled() ? $$arezv$$_context.component( "com_example_collections_MemoizeKeepAliveListModel", $$arezv$$_id, $$arezv$$_name, this::$$arezi$$_nativeComponentPreDispose ) : null; this.$$arezi$$_kernel = new ComponentKernel( Arez.areZonesEnabled() ? $$arezv$$_context : null, Arez.areNamesEnabled() ? $$arezv$$_name : null, $$arezv$$_id, Arez.areNativeComponentsEnabled() ? $$arezv$$_component : null, null, Arez.areNativeComponentsEnabled() ? null : this::$$arezi$$_dispose, null, true, false, false ); this.$$arez$$_myValue = Arez.areCollectionsPropertiesUnmodifiable() ? $$arezv$$_context.computable( Arez.areNativeComponentsEnabled() ? $$arezv$$_component : null, Arez.areNamesEnabled() ? $$arezv$$_name + ".myValue" : null, () -> super.getMyValue(), Arez.areCollectionsPropertiesUnmodifiable() ? this::$$arezi$$_onActivate_myValue : null, Arez.areCollectionsPropertiesUnmodifiable() ? this::$$arezi$$_onDeactivate_myValue : null, ComputableValue.Flags.AREZ_DEPENDENCIES | ComputableValue.Flags.RUN_LATER | ComputableValue.Flags.KEEPALIVE ) : $$arezv$$_context.computable( Arez.areNativeComponentsEnabled() ? $$arezv$$_component : null, Arez.areNamesEnabled() ? $$arezv$$_name + ".myValue" : null, () -> super.getMyValue(), ComputableValue.Flags.AREZ_DEPENDENCIES | ComputableValue.Flags.RUN_LATER | ComputableValue.Flags.KEEPALIVE ); this.$$arezi$$_kernel.componentConstructed(); this.$$arezi$$_kernel.componentComplete(); } private int $$arezi$$_id() { return this.$$arezi$$_kernel.getId(); } @Override @Nonnull public Integer getArezId() { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'getArezId' invoked on uninitialized component of type 'com_example_collections_MemoizeKeepAliveListModel'" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named 'getArezId' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" ); } return $$arezi$$_id(); } private void $$arezi$$_nativeComponentPreDispose() { this.$$arezi$$_kernel.notifyOnDisposeListeners(); } @Override public void addOnDisposeListener(@Nonnull final Object key, @Nonnull final SafeProcedure action) { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'addOnDisposeListener' invoked on uninitialized component of type 'com_example_collections_MemoizeKeepAliveListModel'" ); } this.$$arezi$$_kernel.addOnDisposeListener( key, action ); } @Override public void removeOnDisposeListener(@Nonnull final Object key) { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'removeOnDisposeListener' invoked on uninitialized component of type 'com_example_collections_MemoizeKeepAliveListModel'" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named 'removeOnDisposeListener' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" ); } this.$$arezi$$_kernel.removeOnDisposeListener( key ); } @Override public boolean isDisposed() { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'isDisposed' invoked on uninitialized component of type 'com_example_collections_MemoizeKeepAliveListModel'" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named 'isDisposed' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" ); } return this.$$arezi$$_kernel.isDisposed(); } @Override public void dispose() { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'dispose' invoked on uninitialized component of type 'com_example_collections_MemoizeKeepAliveListModel'" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named 'dispose' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" ); } this.$$arezi$$_kernel.dispose(); } private void $$arezi$$_dispose() { this.$$arez$$_myValue.dispose(); } @Override public List<String> getMyValue() { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.isActive(), () -> "Method named 'getMyValue' invoked on " + this.$$arezi$$_kernel.describeState() + " component named '" + this.$$arezi$$_kernel.getName() + "'" ); } if ( Arez.areCollectionsPropertiesUnmodifiable() ) { final List<String> $$ar$$_result = this.$$arez$$_myValue.get(); if ( this.$$arezd$$_$$cache$$_myValue != $$ar$$_result ) { this.$$arezd$$_$$cache$$_myValue = $$ar$$_result; this.$$arezd$$_$$unmodifiable_cache$$_myValue = null == $$ar$$_result ? null : CollectionsUtil.wrap( $$ar$$_result ); } return $$arezd$$_$$unmodifiable_cache$$_myValue; } else { return this.$$arez$$_myValue.get(); } } private void $$arezi$$_onActivate_myValue() { if ( Arez.areCollectionsPropertiesUnmodifiable() ) { this.$$arezd$$_$$cache_active$$_myValue = true; this.$$arezd$$_$$cache$$_myValue = null; this.$$arezd$$_$$unmodifiable_cache$$_myValue = null; } } private void $$arezi$$_onDeactivate_myValue() { if ( Arez.areCollectionsPropertiesUnmodifiable() ) { this.$$arezd$$_$$cache_active$$_myValue = false; this.$$arezd$$_$$cache$$_myValue = null; this.$$arezd$$_$$unmodifiable_cache$$_myValue = null; } } @Override public String toString() { if ( Arez.areNamesEnabled() ) { return "ArezComponent[" + this.$$arezi$$_kernel.getName() + "]"; } else { return super.toString(); } } }
[ "peter@realityforge.org" ]
peter@realityforge.org
3bc81a6f8a60a22061e2dfc3ef1c616e4d2509ca
f08256664e46e5ac1466f5c67dadce9e19b4e173
/sources/p520io/reactivex/p531y/p536e/p539c/C12226b0.java
dc94b0292e339c4c43e61aedb698fd6a51932ea4
[]
no_license
IOIIIO/DisneyPlusSource
5f981420df36bfbc3313756ffc7872d84246488d
658947960bd71c0582324f045a400ae6c3147cc3
refs/heads/master
2020-09-30T22:33:43.011489
2019-12-11T22:27:58
2019-12-11T22:27:58
227,382,471
6
3
null
null
null
null
UTF-8
Java
false
false
3,339
java
package p520io.reactivex.p531y.p536e.p539c; import java.util.concurrent.atomic.AtomicReference; import p520io.reactivex.C11958l; import p520io.reactivex.C11987u; import p520io.reactivex.MaybeSource; import p520io.reactivex.Single; import p520io.reactivex.SingleSource; import p520io.reactivex.disposables.Disposable; import p520io.reactivex.p531y.p532a.C12010c; import p520io.reactivex.p531y.p534c.C12042e; /* renamed from: io.reactivex.y.e.c.b0 */ /* compiled from: MaybeSwitchIfEmptySingle */ public final class C12226b0<T> extends Single<T> implements C12042e<T> { /* renamed from: U */ final SingleSource<? extends T> f28243U; /* renamed from: c */ final MaybeSource<T> f28244c; /* renamed from: io.reactivex.y.e.c.b0$a */ /* compiled from: MaybeSwitchIfEmptySingle */ static final class C12227a<T> extends AtomicReference<Disposable> implements C11958l<T>, Disposable { /* renamed from: U */ final SingleSource<? extends T> f28245U; /* renamed from: c */ final C11987u<? super T> f28246c; /* renamed from: io.reactivex.y.e.c.b0$a$a */ /* compiled from: MaybeSwitchIfEmptySingle */ static final class C12228a<T> implements C11987u<T> { /* renamed from: U */ final AtomicReference<Disposable> f28247U; /* renamed from: c */ final C11987u<? super T> f28248c; C12228a(C11987u<? super T> uVar, AtomicReference<Disposable> atomicReference) { this.f28248c = uVar; this.f28247U = atomicReference; } public void onError(Throwable th) { this.f28248c.onError(th); } public void onSubscribe(Disposable disposable) { C12010c.m38624c(this.f28247U, disposable); } public void onSuccess(T t) { this.f28248c.onSuccess(t); } } C12227a(C11987u<? super T> uVar, SingleSource<? extends T> singleSource) { this.f28246c = uVar; this.f28245U = singleSource; } public void dispose() { C12010c.m38621a((AtomicReference<Disposable>) this); } public boolean isDisposed() { return C12010c.m38619a((Disposable) get()); } public void onComplete() { Disposable disposable = (Disposable) get(); if (disposable != C12010c.DISPOSED && compareAndSet(disposable, null)) { this.f28245U.mo30216a(new C12228a(this.f28246c, this)); } } public void onError(Throwable th) { this.f28246c.onError(th); } public void onSubscribe(Disposable disposable) { if (C12010c.m38624c(this, disposable)) { this.f28246c.onSubscribe(this); } } public void onSuccess(T t) { this.f28246c.onSuccess(t); } } public C12226b0(MaybeSource<T> maybeSource, SingleSource<? extends T> singleSource) { this.f28244c = maybeSource; this.f28243U = singleSource; } /* access modifiers changed from: protected */ /* renamed from: b */ public void mo17771b(C11987u<? super T> uVar) { this.f28244c.mo30113a(new C12227a(uVar, this.f28243U)); } }
[ "101110@vivaldi.net" ]
101110@vivaldi.net
34a83a9fc85630708e3e3b0cf82caab3428ce620
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/services/core/java/com/android/server/NativeDaemonConnectorException.java
05fe1682f5bcc517fa07346b2514cbb926b7798f
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,832
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 com.android.server; import android.os.Parcel; /** * An exception that indicates there was an error with a * {@link NativeDaemonConnector} operation. */ public class NativeDaemonConnectorException extends Exception { private String mCmd; private NativeDaemonEvent mEvent; public NativeDaemonConnectorException(String detailMessage) { super(detailMessage); } public NativeDaemonConnectorException(String detailMessage, Throwable throwable) { super(detailMessage, throwable); } public NativeDaemonConnectorException(String cmd, NativeDaemonEvent event) { super("command '" + cmd + "' failed with '" + event + "'"); mCmd = cmd; mEvent = event; } public int getCode() { return mEvent != null ? mEvent.getCode() : -1; } public String getCmd() { return mCmd; } /** * Rethrow as a {@link RuntimeException} subclass that is handled by * {@link Parcel#writeException(Exception)}. */ public IllegalArgumentException rethrowAsParcelableException() { throw new IllegalStateException(getMessage(), this); } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
6738e8b1e043e215f95773a8eee16010be4e2e34
29159bc4c137fe9104d831a5efe346935eeb2db5
/mmj-cloud-third/src/main/java/com/qianmi/open/api/response/CoachItemsListResponse.java
9fba80c0135b6e1679db477d3e975fffbc9e1ce3
[]
no_license
xddpool/mmj-cloud
bfb06d2ef08c9e7b967c63f223fc50b1a56aac1c
de4bcb35db509ce929d516d83de765fdc2afdac5
refs/heads/master
2023-06-27T11:16:38.059125
2020-07-24T03:23:48
2020-07-24T03:23:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,472
java
package com.qianmi.open.api.response; import com.qianmi.open.api.QianmiResponse; import com.qianmi.open.api.domain.elife.AdminItem; import com.qianmi.open.api.tool.mapping.ApiField; import com.qianmi.open.api.tool.mapping.ApiListField; import java.util.List; /** * API: qianmi.elife.coach.items.list response. * * @author auto * @since 2.0 */ public class CoachItemsListResponse extends QianmiResponse { private static final long serialVersionUID = 1L; /** * 可选择的火车票标准商品信息 */ @ApiListField("items") @ApiField("item") private List<AdminItem> items; /** * 页码,从0开始 */ @ApiField("pageNo") private Integer pageNo; /** * 单页返回的记录数 */ @ApiField("pageSize") private Integer pageSize; /** * 总刻录数 */ @ApiField("totalCount") private Integer totalCount; public void setItems(List<AdminItem> items) { this.items = items; } public List<AdminItem> getItems( ) { return this.items; } public void setPageNo(Integer pageNo) { this.pageNo = pageNo; } public Integer getPageNo( ) { return this.pageNo; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public Integer getPageSize( ) { return this.pageSize; } public void setTotalCount(Integer totalCount) { this.totalCount = totalCount; } public Integer getTotalCount( ) { return this.totalCount; } }
[ "shenfuding@shenfudingdeMacBook-Pro.local" ]
shenfuding@shenfudingdeMacBook-Pro.local
33c9e94c54f3b2e0312bf2a87df060390ae2e717
c612fe9597af8f89a8852c1b1866d4a6460de84e
/javaee-servlets-workshop/west-compass-dealer-shop/src/main/java/org/atanasov/wcds/domain/models/view/CarServiceViewModel.java
d2a093c47df35b3418a2a95be4feee776149c85c
[ "MIT" ]
permissive
VasAtanasov/SoftUni-Java-Web-Basics-September-2019
cf8f79190ba2b2b8d727b9b8c1e05dfc06726ae8
c5456fd987d559159a3ba3dc16da0875138defd1
refs/heads/master
2022-07-10T13:10:21.647063
2019-10-30T08:56:55
2019-10-30T08:56:55
211,797,820
0
0
MIT
2022-06-21T02:08:25
2019-09-30T07:09:39
Java
UTF-8
Java
false
false
360
java
package org.atanasov.wcds.domain.models.view; import lombok.*; import org.atanasov.wcds.domain.enums.Engine; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @ToString @Builder public class CarServiceViewModel { private String brand; private String model; private Integer year; private Engine engine; private String userUsername; }
[ "vas.atanasov@gmail.com" ]
vas.atanasov@gmail.com
ba674c6aad72b718b048ac362c63734f3c6cf173
74539d9e911ccfd18b0c13a526810be052eec77b
/src/com/amazonaws/services/elasticloadbalancing/model/InvalidSubnetException.java
9f06da3748ed4b26706a673792933ff122a69f6b
[]
no_license
dovikn/inegotiate-android
723f12a3ee7ef46b980ee465b36a6a154e5adf6f
cea5e088b01ae4487d83cd1a84e6d2df78761a6e
refs/heads/master
2021-01-12T02:14:41.503567
2017-01-10T04:20:15
2017-01-10T04:20:15
78,492,148
0
1
null
null
null
null
UTF-8
Java
false
false
304
java
package com.amazonaws.services.elasticloadbalancing.model; import com.amazonaws.AmazonServiceException; public class InvalidSubnetException extends AmazonServiceException { private static final long serialVersionUID = 1; public InvalidSubnetException(String str) { super(str); } }
[ "dovik@dovik-macbookpro.roam.corp.google.com" ]
dovik@dovik-macbookpro.roam.corp.google.com
bd4b705cbae2762d4ebbdefce1fd4ae4f016d761
ffb5553ea590723498a8c3d37bda4ce672ee02ef
/evaluation/visualization/src/boofcv/alg/tracker/VideoTrackFeaturesApp.java
dbee904262f3d17569353ef5b0f6e9cf70666a57
[ "Apache-2.0" ]
permissive
jacktasia/BoofCV
3e4bee8cff589bcb0a8f36359cb65a9b48cd5642
48599fe2936bfc0816219e3984dfd1417e2c88d4
refs/heads/master
2021-01-23T20:22:06.184031
2013-01-19T22:32:54
2013-01-19T22:32:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,067
java
/* * Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * 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 boofcv.alg.tracker; import boofcv.abst.feature.detect.interest.ConfigFastHessian; import boofcv.abst.feature.detect.interest.ConfigGeneralDetector; import boofcv.abst.feature.tracker.PkltConfig; import boofcv.abst.feature.tracker.PointTrack; import boofcv.abst.feature.tracker.PointTracker; import boofcv.factory.feature.tracker.FactoryPointSequentialTracker; import boofcv.gui.VideoProcessAppBase; import boofcv.gui.feature.VisualizeFeatures; import boofcv.gui.image.ImagePanel; import boofcv.gui.image.ShowImages; import boofcv.io.PathLabel; import boofcv.io.image.SimpleImageSequence; import boofcv.struct.image.ImageFloat32; import boofcv.struct.image.ImageSingleBand; import javax.swing.*; import java.awt.*; import java.awt.event.MouseListener; import java.awt.image.BufferedImage; import java.util.ArrayList; /** * Runs a KLT tracker through a video sequence * * @author Peter Abeles */ // todo extract out base class for handling videos public class VideoTrackFeaturesApp<I extends ImageSingleBand, D extends ImageSingleBand> extends VideoProcessAppBase<I> implements MouseListener { int maxFeatures = 400; int minFeatures = 150; PointTracker<I> tracker; ImagePanel gui = new ImagePanel(); BufferedImage workImage; public VideoTrackFeaturesApp( Class<I> imageType , Class<D> derivType ) { super(1,imageType); PkltConfig<I, D> config = PkltConfig.createDefault(imageType, derivType); config.featureRadius = 3; config.pyramidScaling = new int[]{1,2,4,8}; ConfigFastHessian configFH = new ConfigFastHessian(); configFH.maxFeaturesPerScale = 200; configFH.extractRadius = 4; configFH.detectThreshold = 15f; addAlgorithm(0,"KLT", FactoryPointSequentialTracker.klt(config,new ConfigGeneralDetector(maxFeatures,1,3))); addAlgorithm(0,"ST-BRIEF", FactoryPointSequentialTracker. dda_ST_BRIEF(200, new ConfigGeneralDetector(maxFeatures,3, 1), imageType, derivType)); addAlgorithm(0,"ST-NCC", FactoryPointSequentialTracker. dda_ST_NCC(new ConfigGeneralDetector(maxFeatures, 3, 2), 5, imageType, derivType)); addAlgorithm(0,"FH-SURF", FactoryPointSequentialTracker. dda_FH_SURF_Fast(maxFeatures, configFH, null, null, imageType)); addAlgorithm(0,"ST-SURF-KLT", FactoryPointSequentialTracker. combined_ST_SURF_KLT(new ConfigGeneralDetector(maxFeatures,3, 1), 3, config.pyramidScaling, 50, null,null, imageType, derivType)); addAlgorithm(0,"FH-SURF-KLT", FactoryPointSequentialTracker.combined_FH_SURF_KLT(maxFeatures, 3, config.pyramidScaling, 50,configFH,null,null,imageType)); gui.addMouseListener(this); gui.requestFocus(); setMainGUI(gui); } @Override public void loadConfigurationFile(String fileName) {} @Override public void process( SimpleImageSequence<I> sequence ) { stopWorker(); this.sequence = sequence; sequence.setLoop(true); doRefreshAll(); } @Override public boolean getHasProcessedImage() { return workImage != null; } @Override public void refreshAll(Object[] cookies) { setActiveAlgorithm(0,null,cookies[0]); } @Override public void setActiveAlgorithm(int indexFamily, String name, Object cookie) { if( sequence == null ) return; stopWorker(); tracker = (PointTracker<I>)cookie; sequence.reset(); SwingUtilities.invokeLater(new Runnable() { public void run() { I image = sequence.next(); gui.setPreferredSize(new Dimension(image.width,image.height)); workImage = new BufferedImage(image.width,image.height,BufferedImage.TYPE_INT_BGR); gui.setBufferedImage(workImage); revalidate(); startWorkerThread(); }}); } void renderFeatures( BufferedImage orig , double trackerFPS ) { Graphics2D g2 = workImage.createGraphics(); g2.drawImage(orig,0,0,orig.getWidth(),orig.getHeight(),null); for( PointTrack p : tracker.getActiveTracks(null) ) { int x = (int)p.x; int y = (int)p.y; VisualizeFeatures.drawPoint(g2,x,y,Color.blue); } for( PointTrack p : tracker.getNewTracks(null) ) { int x = (int)p.x; int y = (int)p.y; VisualizeFeatures.drawPoint(g2,x,y,Color.green); } g2.setColor(Color.WHITE); g2.fillRect(5,15,140,20); g2.setColor(Color.BLACK); g2.drawString(String.format("Tracker FPS: %3.1f",trackerFPS),10,30); } @Override protected void updateAlg(I frame, BufferedImage buffImage) { tracker.process(frame); if( tracker.getActiveTracks(null).size() < minFeatures ) { tracker.spawnTracks(); } } @Override protected void updateAlgGUI(ImageSingleBand frame, BufferedImage imageGUI, double fps) { renderFeatures((BufferedImage)sequence.getGuiImage(),fps); } public static void main( String args[] ) { Class imageType = ImageFloat32.class; Class derivType = ImageFloat32.class; // Class imageType = ImageUInt8.class; // Class derivType = ImageSInt16.class; VideoTrackFeaturesApp app = new VideoTrackFeaturesApp(imageType, derivType); java.util.List<PathLabel> inputs = new ArrayList<PathLabel>(); inputs.add(new PathLabel("Shake", "../data/applet/shake.mjpeg")); inputs.add(new PathLabel("Zoom", "../data/applet/zoom.mjpeg")); inputs.add(new PathLabel("Rotate", "../data/applet/rotate.mjpeg")); app.setInputList(inputs); // wait for it to process one image so that the size isn't all screwed up while( !app.getHasProcessedImage() ) { Thread.yield(); } ShowImages.showWindow(app, "Feature Tracker"); } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
c07e1d6a4cf80af34b63a2e975d6d2b2e87c0835
899a427a903148d0d26e903faf8021b94b126911
/12-Backtracking-And-DFS/Type-3-FloodFill/0733-flood-fill/src/Solution2.java
1b6181b7dbb26320c49f693bc22a63a3b7c1e996
[ "Apache-2.0" ]
permissive
liweiwei1419/LeetCode-Solutions-in-Good-Style
033ab69b93fa2d294ab6a08c8b9fbcff6d32a178
acc8661338cc7c1ae067915fb16079a9e3e66847
refs/heads/master
2022-07-27T15:24:57.717791
2021-12-19T03:11:02
2021-12-19T03:11:02
161,101,415
2,016
351
Apache-2.0
2022-01-07T10:38:35
2018-12-10T01:50:09
Java
UTF-8
Java
false
false
1,500
java
import java.util.LinkedList; import java.util.Queue; public class Solution2 { // 方法二:广度优先遍历 public int[][] floodFill(int[][] image, int sr, int sc, int newColor) { int originColor = image[sr][sc]; if (originColor == newColor) { return image; } int rows = image.length; int cols = image[0].length; int[][] directions = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; boolean[][] visited = new boolean[rows][cols]; Queue<int[]> queue = new LinkedList<>(); // 从一个结点开始进行深度优先遍历 queue.offer(new int[]{sr, sc}); visited[sr][sc] = true; while (!queue.isEmpty()) { int[] head = queue.poll(); image[head[0]][head[1]] = newColor; for (int[] direction : directions) { int newX = head[0] + direction[0]; int newY = head[1] + direction[1]; if (inArea(newX, newY, rows, cols) && !visited[newX][newY] && image[newX][newY] == originColor) { queue.offer(new int[]{newX, newY}); // 特别注意:添加到队列以后,需要马上标记为已经访问,否则相同结点会重复入队 visited[newX][newY] = true; } } } return image; } private boolean inArea(int x, int y, int rows, int cols) { return x >= 0 && x < rows && y >= 0 && y < cols; } }
[ "liweiwei1419@gmail.com" ]
liweiwei1419@gmail.com
93a5d400db2f7f0643d8dd7d5e5601dd4bc512f4
cdff118a93947b54dfa32f258da2deb939af033c
/campaign/listeners/MarineLossesStatModifier.java
cd8d1ad6606379f467b302c002861a3c0a8e0c20
[]
no_license
wilki24/Starsector-API
c12ea5d0c131f5cdd26d6799ac63f9a61d9b93fb
825b1bde4d2b3808c1ebd23a8afbb2414f7aed6d
refs/heads/main
2023-08-18T07:56:54.486127
2021-09-19T01:53:04
2021-09-19T01:53:04
408,007,467
0
0
null
null
null
null
UTF-8
Java
false
false
421
java
package com.fs.starfarer.api.campaign.listeners; import java.util.List; import com.fs.starfarer.api.campaign.econ.MarketAPI; import com.fs.starfarer.api.combat.MutableStat; import com.fs.starfarer.api.impl.campaign.graid.GroundRaidObjectivePlugin; public interface MarineLossesStatModifier { public void modifyMarineLossesStatPreRaid(MarketAPI market, List<GroundRaidObjectivePlugin> objectives, MutableStat stat); }
[ "8873894+wilki24@users.noreply.github.com" ]
8873894+wilki24@users.noreply.github.com
d427e95de927027ba0a474efc1f492ec1a2e8178
06261cd6c6e85734c6840e838553c3667438adaf
/app7/part_3/B1.java
d2ccc0c51645fa309b6d6fd799cb7d4a0f331d95
[]
no_license
Vijay-Ky/PRYCE_TRAINING
d6e13b2112174ccaa79cfe0ba2337caeacb2299a
2435249b63abeaf1bc9f1a0589862e5f26e70808
refs/heads/master
2020-04-06T18:43:22.741556
2018-11-15T12:38:05
2018-11-15T12:38:05
157,709,982
0
0
null
null
null
null
UTF-8
Java
false
false
251
java
class B1 { B1() { System.out.println("B()"); } B1(int i) { this(); System.out.println("B(int)"); } public static void main(String[] args) { B1 b1 = new B1(); System.out.println("-----"); B1 b2 = new B1(22); } }
[ "vijayky007@gmail.com" ]
vijayky007@gmail.com
13c698ea15ce9a792ed353e830875ff7f8c24e68
503f99882ed28c7328b1c42319cdfeaf1bc3ff52
/myvietnam/src/main/java/net/myvietnam/mvncore/service/impl/URLResolverServiceImplServletDefault.java
a1b64e1f44c1426d6071a782b73d8b65230f5ff9
[]
no_license
khanhnguyenj/mvnForumJ
3c6872ffff0285874a242aa2707b6c4c087d40ec
6e31879a6cb5d18ad5267a245cb2fd96b101be5a
refs/heads/main
2023-07-09T00:40:04.488600
2021-08-18T00:46:02
2021-08-18T00:46:02
388,469,371
3
0
null
null
null
null
UTF-8
Java
false
false
3,822
java
/* * $Header: /cvsroot/mvnforum/myvietnam/src/net/myvietnam/mvncore/service/impl/URLResolverServiceImplServletDefault.java,v 1.3 2008/08/18 06:52:30 minhnn Exp $ * $Author: minhnn $ * $Revision: 1.3 $ * $Date: 2008/08/18 06:52:30 $ * * ==================================================================== * * Copyright (C) 2002-2007 by MyVietnam.net * * All copyright notices regarding MyVietnam and MyVietnam CoreLib * MUST remain intact in the scripts and source code. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Correspondence and Marketing Questions can be sent to: * info at MyVietnam net * * @author: Minh Nguyen */ package net.myvietnam.mvncore.service.impl; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.myvietnam.mvncore.MVNCoreConfig; import net.myvietnam.mvncore.service.URLResolverService; import net.myvietnam.mvncore.web.*; public class URLResolverServiceImplServletDefault implements URLResolverService { public boolean isSupportServlet() { return true; } public boolean isSupportPortlet() { return false; } public String encodeURL(HttpServletRequest request, HttpServletResponse response, String url) { if (MVNCoreConfig.getEnableEncodeURL()) { url = response.encodeURL(url); } return url; } public String encodeURL(GenericRequest request, GenericResponse response, String url) { return encodeURL(request.getServletRequest(), response.getServletResponse(), url); } public String encodeURL(HttpServletRequest request, HttpServletResponse response, String url, int option) { if (MVNCoreConfig.getEnableEncodeURL()) { url = response.encodeURL(url); } return url; } public String encodeURL(GenericRequest request, GenericResponse response, String url, int option) { return encodeURL(request.getServletRequest(), response.getServletResponse(), url, option); } public String encodeURL(HttpServletRequest request, HttpServletResponse response, String url, int option, String mode) { // not implemented for cross module links if (MVNCoreConfig.getEnableEncodeURL()) { url = response.encodeURL(url); } return url; } public String encodeURL(GenericRequest request, GenericResponse response, String url, int option, String mode) { return encodeURL(request.getServletRequest(), response.getServletResponse(), url, option, mode); } public String decodeAction(GenericRequest request, GenericResponse response) { return ""; } public String generateFormAction(HttpServletRequest request, HttpServletResponse response, String url) { return ""; } public String generateFormActionForJavascript(HttpServletRequest request, HttpServletResponse response, String url, String formName) { return ""; } public String getActionParam() { return ""; } }
[ "nhkhanh2406@gmail.com" ]
nhkhanh2406@gmail.com
f3763acd2b949c2c268db440d412710088f8e868
9f486245866ac128d3f75fb3bbc69caeed805fea
/04-data/src/main/java/allianz/spring/data/b_jpa_repository/UserRepository.java
9ef030040149f2ef6bc5f073a00e30bd36d9ee44
[]
no_license
anblaca3790/spring-2019
986bf63ba11cd2c9bb66d9e695a35faab7c12a0b
ea7e5f0f9bcb05a9c758cffec00a994ef597a6d2
refs/heads/master
2020-06-11T23:37:54.936202
2019-06-27T13:39:48
2019-06-27T13:39:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,234
java
package allianz.spring.data.b_jpa_repository; import allianz.spring.data.entities.UserEntity; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import java.util.ArrayList; import java.util.List; @Repository public interface UserRepository extends JpaRepository<UserEntity, Long> { List<UserEntity> findAllByOrderByNameAsc(); @Query(value = "from User order by name" ) List<UserEntity> listMyOrder(); @Query( "select u.name from User u group by u.name order by u.name" ) List<String> listNames(); Page<UserEntity> findAllByNameLikeOrderByNameAsc(String name, Pageable page); @Query(value = "from User where name=:name order by name", countQuery = "select count(u) from User u where u.name like :name ") //?1 Page<UserEntity> listMyOrder(@Param("name") String name, Pageable page); default List<String> names(EntityManager e){ return new ArrayList<>(); } }
[ "fphilip@houseware.es" ]
fphilip@houseware.es
2f711f837f30874d35ee4359e0e869bd4d5f4659
d0094eec897f6cf935fae911d85366d6da216535
/src/main/java/com/vmware/vim25/AddMonitoredEntitiesResponse.java
26c7e0dec63b5f3a285b8e86a50e3751993f932a
[ "BSD-3-Clause" ]
permissive
darkedges/vijava
9e09798f8cfc61ec28a7a214e260f464c26e4531
c65a731a25aa41d96e032271496f2464a8aa6fe9
refs/heads/main
2023-04-20T10:41:43.931180
2021-05-22T00:03:58
2021-05-22T00:03:58
369,026,457
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package com.vmware.vim25; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "AddMonitoredEntitiesResponse") public class AddMonitoredEntitiesResponse { }
[ "nirving@darkedges.com" ]
nirving@darkedges.com
d20dc795880f7150dbeca55c71af9b96fde348ca
cd1e60af5201413ddbdaa56c58e1d0600bc4af35
/message-system/message-service/src/main/java/com/hqjy/msg/provide/operation/RemoveObjectToRedisServiceImpl.java
bfd2eaaee7d4e210f242e070d3d9cce20afd58cb
[]
no_license
franywhy/projects
6b3fe268709c7239536da802e57f9f1630688061
965b2b0938f8c3620299b52055035f522559fa5c
refs/heads/master
2020-04-18T01:14:13.551295
2019-01-23T02:49:00
2019-01-23T02:49:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,159
java
package com.hqjy.msg.provide.operation; import com.hqjy.msg.provide.MsgSend; import com.hqjy.msg.provide.RemoveObjectToRedisService; import com.hqjy.msg.util.Constant; import com.hqjy.msg.util.ListUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by baobao on 2017/12/29 0029. */ @Service public class RemoveObjectToRedisServiceImpl implements RemoveObjectToRedisService { @Autowired @Qualifier("sendHaveNotAck") private MsgSend msgSend; @Override public void removeMsgToRedis(String msgId, List list) { List channels = ListUtils.listsToArray(list, Constant.SPLIT_LIST_SIZE); for (int i = 0; i < channels.size(); i++) { List items = (List) channels.get(i); Map map = new HashMap(); map.put("list",items); map.put("msg_id",msgId); //移除到消息的过期队列 msgSend.sendMsg(Constant.QUEUE_MSG_EXPIRE,map); } } }
[ "longduyuan@hengqijy.com" ]
longduyuan@hengqijy.com
9d9f636a52f27706eb71886e2920f13c628447bb
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/schedule/IRESchTemplate.java
457d8455c3ba64672cf4aaeb4fcf99387e4576ec
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
3,356
java
package com.kingdee.eas.fdc.schedule; import com.kingdee.bos.BOSException; //import com.kingdee.bos.metadata.*; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.*; import com.kingdee.bos.Context; import java.lang.String; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.bos.metadata.entity.SorterItemCollection; import com.kingdee.eas.fdc.basedata.IFDCTreeBaseData; import com.kingdee.bos.util.*; import com.kingdee.bos.metadata.entity.FilterInfo; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.BOSUuid; public interface IRESchTemplate extends IFDCTreeBaseData { public boolean exists(IObjectPK pk) throws BOSException, EASBizException; public boolean exists(FilterInfo filter) throws BOSException, EASBizException; public boolean exists(String oql) throws BOSException, EASBizException; public RESchTemplateInfo getRESchTemplateInfo(IObjectPK pk) throws BOSException, EASBizException; public RESchTemplateInfo getRESchTemplateInfo(IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException; public RESchTemplateInfo getRESchTemplateInfo(String oql) throws BOSException, EASBizException; public IObjectPK addnew(RESchTemplateInfo model) throws BOSException, EASBizException; public void addnew(IObjectPK pk, RESchTemplateInfo model) throws BOSException, EASBizException; public void update(IObjectPK pk, RESchTemplateInfo model) throws BOSException, EASBizException; public void updatePartial(RESchTemplateInfo model, SelectorItemCollection selector) throws BOSException, EASBizException; public void updateBigObject(IObjectPK pk, RESchTemplateInfo model) throws BOSException; public void delete(IObjectPK pk) throws BOSException, EASBizException; public IObjectPK[] getPKList() throws BOSException, EASBizException; public IObjectPK[] getPKList(String oql) throws BOSException, EASBizException; public IObjectPK[] getPKList(FilterInfo filter, SorterItemCollection sorter) throws BOSException, EASBizException; public RESchTemplateCollection getRESchTemplateCollection() throws BOSException; public RESchTemplateCollection getRESchTemplateCollection(EntityViewInfo view) throws BOSException; public RESchTemplateCollection getRESchTemplateCollection(String oql) throws BOSException; public IObjectPK[] delete(FilterInfo filter) throws BOSException, EASBizException; public IObjectPK[] delete(String oql) throws BOSException, EASBizException; public void delete(IObjectPK[] arrayPK) throws BOSException, EASBizException; public void importTasks(String templateID, RESchTemplateTaskCollection tasks) throws BOSException, EASBizException; public void audit(BOSUuid billID) throws BOSException, EASBizException; public void setAudittingStatus(BOSUuid billID) throws BOSException, EASBizException; public void setSubmitStatus(BOSUuid billID) throws BOSException, EASBizException; public void unAudit(BOSUuid billID) throws BOSException, EASBizException; }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
350c7e3c03667aaa17f5bb31f5b92c6e07ab08cb
772d593c0b2e4951b8ac95490ea7defa527eaf68
/credits-business-capability-sdk/src/main/java/com/lulobank/credits/sdk/dto/clientproduct/offer/OfferFlexible.java
51ae8bc3410cb40fc4b5db60127dffeb49e67155
[]
no_license
juandevtoledo/loan
4010cb5b1d90981551b9e09ee6b74f1270b508c6
fd84cae4b8897b2bc57c2b5b762f4de801fbcd0f
refs/heads/main
2023-06-19T03:49:44.430276
2021-06-29T23:07:10
2021-06-29T23:07:10
381,517,606
1
0
null
null
null
null
UTF-8
Java
false
false
260
java
package com.lulobank.credits.sdk.dto.clientproduct.offer; import lombok.Getter; import lombok.Setter; import java.util.List; @Getter @Setter public class OfferFlexible extends Offer{ private List<FlexibleLoanSimulationInstallments> simulateInstallment; }
[ "juan.toledo@globant.com" ]
juan.toledo@globant.com
c97e54e85391471cf0be4c6dd440766a02f09076
2097d290e6d3d8f1236eda58a230a114d36089ad
/smbiz-admin/src/main/java/com/tll/common/dto/AccountRequest.java
8dc789863408bdaac8ea6b0dfa4aec445251cae3
[]
no_license
jopaki/tll
b31434a7b7b0c5b6592e52e1844f9cc80bae8ede
9a37b43b3c1be6e32173d19f9b9a94e8f24a50f5
refs/heads/master
2021-01-20T11:13:32.672419
2012-09-04T05:31:45
2012-09-04T05:39:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
/** * The Logic Lab * @author jpk */ package com.tll.common.dto; import com.google.web.bindery.requestfactory.shared.InstanceRequest; import com.google.web.bindery.requestfactory.shared.Request; import com.google.web.bindery.requestfactory.shared.RequestContext; import com.google.web.bindery.requestfactory.shared.Service; import com.tll.model.Account; /** * @author jpk */ @Service(Account.class) public interface AccountRequest extends RequestContext { Request<AccountProxy> findAccount(Long id); InstanceRequest<AccountProxy, Void> persist(); InstanceRequest<AccountProxy, Void> remove(); }
[ "jopaki@gmail.com" ]
jopaki@gmail.com
f10355f78fceacc3380147b6383dc8ae5eadd467
d6920bff5730bf8823315e15b0858c68a91db544
/android/ftsafe_0.7.04_source_from_cfr/gnu/kawa/reflect/ArrayMake.java
179b25f6ec9771c4e9ad087926fa107f4a885a98
[]
no_license
AppWerft/Ti.FeitianSmartcardReader
f862f9a2a01e1d2f71e09794aa8ff5e28264e458
48657e262044be3ae8b395065d814e169bd8ad7d
refs/heads/master
2020-05-09T10:54:56.278195
2020-03-17T08:04:07
2020-03-17T08:04:07
181,058,540
2
0
null
null
null
null
UTF-8
Java
false
false
1,446
java
/* * Decompiled with CFR 0.139. */ package gnu.kawa.reflect; import gnu.bytecode.ClassType; import gnu.bytecode.Type; import gnu.mapping.Procedure; import gnu.mapping.ProcedureN; import gnu.mapping.Symbol; import java.lang.reflect.Array; public class ArrayMake extends ProcedureN { Type elementType; public static final ArrayMake makeObjectArray = new ArrayMake(Type.objectType); public ArrayMake(Type elementType) { this.elementType = elementType; this.setProperty(Procedure.compilerXKey, "gnu.kawa.reflect.CompileArrays:compileMake"); } public static ArrayMake getInstance(Type elementType) { return elementType == Type.objectType ? makeObjectArray : new ArrayMake(elementType); } @Override public Object applyN(Object[] args) { int nlen = args.length; if (this.elementType == Type.objectType) { Object[] arr = new Object[nlen]; System.arraycopy(args, 0, arr, 0, nlen); return arr; } Class clas = this.elementType.getImplementationType().getReflectClass(); Object arr = Array.newInstance(clas, nlen); for (int i = 0; i < nlen; ++i) { Object val = this.elementType.coerceFromObject(args[i]); Array.set(arr, i, val); } return arr; } @Override public String toString() { return "#<procedure ArrayMake[" + this.elementType + "]>"; } }
[ "“rs@hamburger-appwerft.de“" ]
“rs@hamburger-appwerft.de“
a497a3df9964bf4ad026800ddf48b7e23cc55080
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/jmonkeyengine/engine/src/test/jme3test/effect/TestEverything.java
a3ada4d882f7ef2f147d0e9d5240c354e0defa1b
[ "GPL-1.0-or-later", "BSD-3-Clause", "GPL-2.0-or-later", "BSD-2-Clause", "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
7,750
java
/* * Copyright (c) 2009-2010 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'jMonkeyEngine' nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package jme3test.effect; import com.jme3.app.SimpleApplication; import com.jme3.light.DirectionalLight; import com.jme3.material.Material; import com.jme3.math.*; import com.jme3.post.HDRRenderer; import com.jme3.renderer.Caps; import com.jme3.renderer.queue.RenderQueue.ShadowMode; import com.jme3.scene.Geometry; import com.jme3.scene.Node; import com.jme3.scene.Spatial; import com.jme3.scene.Spatial.CullHint; import com.jme3.scene.shape.Box; import com.jme3.shadow.BasicShadowRenderer; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import com.jme3.util.SkyFactory; import com.jme3.util.TangentBinormalGenerator; public class TestEverything extends SimpleApplication { private BasicShadowRenderer bsr; private HDRRenderer hdrRender; private Vector3f lightDir = new Vector3f(-1, -1, .5f).normalizeLocal(); public static void main(String[] args){ TestEverything app = new TestEverything(); app.start(); } public void setupHdr(){ if (renderer.getCaps().contains(Caps.GLSL100)){ hdrRender = new HDRRenderer(assetManager, renderer); hdrRender.setMaxIterations(40); hdrRender.setSamples(settings.getSamples()); hdrRender.setWhiteLevel(3); hdrRender.setExposure(0.72f); hdrRender.setThrottle(1); // setPauseOnLostFocus(false); // new HDRConfig(hdrRender).setVisible(true); viewPort.addProcessor(hdrRender); } } public void setupBasicShadow(){ if (renderer.getCaps().contains(Caps.GLSL100)){ bsr = new BasicShadowRenderer(assetManager, 1024); bsr.setDirection(lightDir); viewPort.addProcessor(bsr); } } public void setupSkyBox(){ Texture envMap; if (renderer.getCaps().contains(Caps.FloatTexture)){ envMap = assetManager.loadTexture("Textures/Sky/St Peters/StPeters.hdr"); }else{ envMap = assetManager.loadTexture("Textures/Sky/St Peters/StPeters.jpg"); } rootNode.attachChild(SkyFactory.createSky(assetManager, envMap, new Vector3f(-1,-1,-1), true)); } public void setupLighting(){ boolean hdr = false; if (hdrRender != null){ hdr = hdrRender.isEnabled(); } DirectionalLight dl = new DirectionalLight(); dl.setDirection(lightDir); if (hdr){ dl.setColor(new ColorRGBA(3, 3, 3, 1)); }else{ dl.setColor(new ColorRGBA(.9f, .9f, .9f, 1)); } rootNode.addLight(dl); dl = new DirectionalLight(); dl.setDirection(new Vector3f(1, 0, -1).normalizeLocal()); if (hdr){ dl.setColor(new ColorRGBA(1, 1, 1, 1)); }else{ dl.setColor(new ColorRGBA(.4f, .4f, .4f, 1)); } rootNode.addLight(dl); } public void setupFloor(){ Material mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall.j3m"); mat.getTextureParam("DiffuseMap").getTextureValue().setWrap(WrapMode.Repeat); mat.getTextureParam("NormalMap").getTextureValue().setWrap(WrapMode.Repeat); mat.getTextureParam("ParallaxMap").getTextureValue().setWrap(WrapMode.Repeat); Box floor = new Box(Vector3f.ZERO, 50, 1f, 50); TangentBinormalGenerator.generate(floor); floor.scaleTextureCoordinates(new Vector2f(5, 5)); Geometry floorGeom = new Geometry("Floor", floor); floorGeom.setMaterial(mat); floorGeom.setShadowMode(ShadowMode.Receive); rootNode.attachChild(floorGeom); } // public void setupTerrain(){ // Material mat = manager.loadMaterial("Textures/Terrain/Rock/Rock.j3m"); // mat.getTextureParam("DiffuseMap").getValue().setWrap(WrapMode.Repeat); // mat.getTextureParam("NormalMap").getValue().setWrap(WrapMode.Repeat); // try{ // Geomap map = GeomapLoader.fromImage(TestEverything.class.getResource("/textures/heightmap.png")); // Mesh m = map.createMesh(new Vector3f(0.35f, 0.0005f, 0.35f), new Vector2f(10, 10), true); // Logger.getLogger(TangentBinormalGenerator.class.getName()).setLevel(Level.SEVERE); // TangentBinormalGenerator.generate(m); // Geometry t = new Geometry("Terrain", m); // t.setLocalTranslation(85, -15, 0); // t.setMaterial(mat); // t.updateModelBound(); // t.setShadowMode(ShadowMode.Receive); // rootNode.attachChild(t); // }catch (IOException ex){ // ex.printStackTrace(); // } // // } public void setupRobotGuy(){ Node model = (Node) assetManager.loadModel("Models/Oto/Oto.mesh.xml"); Material mat = assetManager.loadMaterial("Models/Oto/Oto.j3m"); model.getChild(0).setMaterial(mat); // model.setAnimation("Walk"); model.setLocalTranslation(30, 10.5f, 30); model.setLocalScale(2); model.setShadowMode(ShadowMode.CastAndReceive); rootNode.attachChild(model); } public void setupSignpost(){ Spatial signpost = assetManager.loadModel("Models/Sign Post/Sign Post.mesh.xml"); Material mat = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m"); signpost.setMaterial(mat); signpost.rotate(0, FastMath.HALF_PI, 0); signpost.setLocalTranslation(12, 3.5f, 30); signpost.setLocalScale(4); signpost.setShadowMode(ShadowMode.CastAndReceive); rootNode.attachChild(signpost); } @Override public void simpleInitApp() { cam.setLocation(new Vector3f(-32.295086f, 54.80136f, 79.59805f)); cam.setRotation(new Quaternion(0.074364014f, 0.92519957f, -0.24794696f, 0.27748522f)); cam.update(); cam.setFrustumFar(300); flyCam.setMoveSpeed(30); rootNode.setCullHint(CullHint.Never); setupBasicShadow(); setupHdr(); setupLighting(); setupSkyBox(); // setupTerrain(); setupFloor(); // setupRobotGuy(); setupSignpost(); } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
b9d4f1271be86be1f9db420b43ddfa2afaff09f4
f848d41f61fc95887c48bc8c9cd5fee83b184b6a
/src/br/ol/oxo/entitity/Selection.java
d2af71e84b14192521a272377c1272f7e7cafd58
[]
no_license
leonardo-ono/Java_OXO_TicTacToe_3D_Game
bc32a263cbd9db66aa13585b3fe2f7161125113d
2611eba146dd45f85f791989e2ddee6106b7700f
refs/heads/master
2021-01-18T16:09:38.523779
2016-12-31T21:24:14
2016-12-31T21:24:14
77,756,262
0
0
null
null
null
null
UTF-8
Java
false
false
6,088
java
package br.ol.oxo.entitity; import br.ol.oxo.OxoEntity; import br.ol.oxo.OxoScene; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Polygon; import renderer.core.Mouse; import renderer.core.Renderer; import renderer.math.Vec4; /** * Selection class. * * @author Leonardo Ono (ono.leo@gmail.com) */ public class Selection extends OxoEntity { private int col; private int row; private MouseCursor mouseCursor; private Polygon polygon = new Polygon(); private Vec4[] points = { new Vec4(-70, -70, -500, 1), new Vec4(-70, 70, -500, 1), new Vec4( 70, 70, -500, 1), new Vec4( 70, -70, -500, 1), }; private boolean selected; private Color[][] selectedColors = new Color[2][100]; private Color selectedColor; public Selection(String name, OxoScene scene, int col, int row) { super(name, scene); this.col = col; this.row = row; for (int c = 0; c < selectedColors[0].length; c++) { selectedColors[0][c] = new Color(255, 0, 0, c); selectedColors[1][c] = new Color(0, 0, 255, c); } selectedColor = selectedColors[0][0]; } @Override public void init() throws Exception { mouseCursor = scene.getProperty("getMouseCursor", MouseCursor.class); transform.setIdentity(); transform.translate(200 * (col - 1), 200 * (row - 1), 0); } private void updateSelectionPolygon(Renderer renderer) { preDraw(renderer); renderer.begin(); polygon.reset(); Vec4 tp = new Vec4(); int shw = renderer.getColorBuffer().getWidth() / 2; int shh = renderer.getColorBuffer().getHeight() / 2; for (Vec4 point : points) { tp.set(point); renderer.getMvp().multiply(tp); tp.doPerspectiveDivision(); polygon.addPoint((int) (tp.x + shw), (int) (shh - tp.y)); } } @Override public void updateTitle(Renderer renderer) { selected = false; } @Override public void updateSelectStartPlayer(Renderer renderer) { visible = false; int option = 0; if (col == 0 && row == 1) { // yes selected = checkSelection(renderer); option = 1; updateBlink(0); visible = true; } else if (col == 2 && row == 1) { // no selected = checkSelection(renderer); option = 2; updateBlink(1); visible = true; } if (selected && Mouse.pressed && !Mouse.pressedConsumed) { Mouse.pressedConsumed = true; switch (option) { case 1: scene.setState(OxoScene.State.PLAYING_1); break; case 2: scene.setState(OxoScene.State.PLAYING_2); break; } } } @Override public void updatePlaying1(Renderer renderer) { yield: while (true) { switch (instructionPointer) { case 0: updateBlink(0); selected = checkSelection(renderer); selected = selected && scene.model.getValue(col, row).equals(" "); if (selected && Mouse.pressed && !Mouse.pressedConsumed) { Mouse.pressedConsumed = true; scene.model.play(col, row); mouseCursor.visible = false; mouseCursor.locked = true; visible = false; waitTime = System.currentTimeMillis(); instructionPointer = 1; } break yield; case 1: while (System.currentTimeMillis() - waitTime < 1000) { break yield; } if (scene.model.checkWin1() || scene.model.isDraw()) { scene.setState(OxoScene.State.END); break yield; } scene.setState(OxoScene.State.PLAYING_2); break yield; } } } @Override public void updatePlaying2(Renderer renderer) { updateBlink(1); selected = checkSelection(renderer); selected = selected && scene.model.getValue(col, row).equals(" "); } @Override public void updateEnd(Renderer renderer) { selected = false; } public boolean checkSelection(Renderer renderer) { updateSelectionPolygon(renderer); int shw = renderer.getColorBuffer().getWidth() / 2; int shh = renderer.getColorBuffer().getHeight() / 2; int mx = (int) (mouseCursor.x + shw); int my = (int) (shh - mouseCursor.y); return polygon.contains(mx, my); } private void updateBlink(int player) { int sci = (int) (50 * Math.sin(System.nanoTime() * 0.00000001)) + 50; selectedColor = selectedColors[player][sci]; } // selected = polygon.contains(mx, my); // selected = selected && scene.ai.getValue(col, row).equals(" "); // if (selected && Mouse.pressed && !Mouse.pressedConsumed) { // Mouse.pressedConsumed = true; // scene.ai.play(col, row); // scene.ai.playAI(); // } // // } @Override public void draw(Renderer renderer, Graphics2D g) { if (!visible) { return; } if (selected) { g.setColor(selectedColor); g.fill(polygon); } } // broadcast messages @Override public void stateChanged() { visible = scene.state != OxoScene.State.INITIALIZING && scene.state != OxoScene.State.SELECT_START_PLAYER && scene.state != OxoScene.State.END; if (scene.state == OxoScene.State.PLAYING_1 || scene.state == OxoScene.State.PLAYING_2) { instructionPointer = 0; } } }
[ "ono.leo@gmail.com" ]
ono.leo@gmail.com
78c1bcb4613e338dfb1c6b763925a6cdc536faa3
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/apache--cassandra/0368e97ee4a807cb832a90c590ae5c65a98730c1/before/StreamMessage.java
c9b0243106fa290b97496caa1b12fe974ccb9406
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,345
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cassandra.streaming.messages; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.ReadableByteChannel; import org.apache.cassandra.io.util.DataOutputStreamAndChannel; import org.apache.cassandra.streaming.StreamSession; /** * StreamMessage is an abstract base class that every messages in streaming protocol inherit. * * Every message carries message type({@link Type}) and streaming protocol version byte. */ public abstract class StreamMessage { /** Streaming protocol version */ public static final int CURRENT_VERSION = 3; public static void serialize(StreamMessage message, DataOutputStreamAndChannel out, int version, StreamSession session) throws IOException { ByteBuffer buff = ByteBuffer.allocate(1); // message type buff.put(message.type.type); buff.flip(); out.write(buff); message.type.outSerializer.serialize(message, out, version, session); } public static StreamMessage deserialize(ReadableByteChannel in, int version, StreamSession session) throws IOException { ByteBuffer buff = ByteBuffer.allocate(1); if (in.read(buff) > 0) { buff.flip(); Type type = Type.get(buff.get()); return type.inSerializer.deserialize(in, version, session); } else { // when socket gets closed, there is a chance that buff is empty // in that case, just return null return null; } } /** StreamMessage serializer */ public static interface Serializer<V extends StreamMessage> { V deserialize(ReadableByteChannel in, int version, StreamSession session) throws IOException; void serialize(V message, DataOutputStreamAndChannel out, int version, StreamSession session) throws IOException; } /** StreamMessage types */ public static enum Type { PREPARE(1, 5, PrepareMessage.serializer), FILE(2, 0, IncomingFileMessage.serializer, OutgoingFileMessage.serializer), RECEIVED(3, 4, ReceivedMessage.serializer), RETRY(4, 4, RetryMessage.serializer), COMPLETE(5, 1, CompleteMessage.serializer), SESSION_FAILED(6, 5, SessionFailedMessage.serializer); public static Type get(byte type) { for (Type t : Type.values()) { if (t.type == type) return t; } throw new IllegalArgumentException("Unknown type " + type); } private final byte type; public final int priority; public final Serializer<StreamMessage> inSerializer; public final Serializer<StreamMessage> outSerializer; @SuppressWarnings("unchecked") private Type(int type, int priority, Serializer serializer) { this(type, priority, serializer, serializer); } @SuppressWarnings("unchecked") private Type(int type, int priority, Serializer inSerializer, Serializer outSerializer) { this.type = (byte) type; this.priority = priority; this.inSerializer = inSerializer; this.outSerializer = outSerializer; } } public final Type type; protected StreamMessage(Type type) { this.type = type; } /** * @return priority of this message. higher value, higher priority. */ public int getPriority() { return type.priority; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
cf707243d4f13b215bc1895840d56d7265764024
746572ba552f7d52e8b5a0e752a1d6eb899842b9
/JDK8Source/src/main/java/java/util/function/ToDoubleBiFunction.java
cbc1601d848c6a0c4efc4bf0cca4b11e27681c99
[]
no_license
lobinary/Lobinary
fde035d3ce6780a20a5a808b5d4357604ed70054
8de466228bf893b72c7771e153607674b6024709
refs/heads/master
2022-02-27T05:02:04.208763
2022-01-20T07:01:28
2022-01-20T07:01:28
26,812,634
7
5
null
null
null
null
UTF-8
Java
false
false
1,380
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.util.function; /** * Represents a function that accepts two arguments and produces a double-valued * result. This is the {@code double}-producing primitive specialization for * {@link BiFunction}. * * <p>This is a <a href="package-summary.html">functional interface</a> * whose functional method is {@link #applyAsDouble(Object, Object)}. * * <p> *  表示接受两个参数并生成双值结果的函数。这是{@link BiFunction}的{@code double}生成原语专业化。 * *  <p>这是一个<a href="package-summary.html">功能介面</a>,其功能方法是{@link #applyAsDouble(Object,Object)}。 * * * @param <T> the type of the first argument to the function * @param <U> the type of the second argument to the function * * @see BiFunction * @since 1.8 */ @FunctionalInterface public interface ToDoubleBiFunction<T, U> { /** * Applies this function to the given arguments. * * <p> * * @param t the first function argument * @param u the second function argument * @return the function result */ double applyAsDouble(T t, U u); }
[ "919515134@qq.com" ]
919515134@qq.com
64a81421f1efa2e1057e56119c33f581ad687050
7f8911ca170a2a974576a0d44125e733eeca3b0c
/admin-portal/common/src/main/java/com/tng/portal/common/config/RestTemplateConfig.java
1085e6e60c9e98469571f0417082736ba4b649c5
[]
no_license
jianfengEric/testcase3
019afb24e28a8019e1bc4f3b22239be8fe48aa77
f7f98e281fd12d413f4c923172e96f86ccb6d34b
refs/heads/master
2020-04-28T08:53:01.617761
2019-04-01T03:12:24
2019-04-01T03:12:24
175,145,884
0
0
null
null
null
null
UTF-8
Java
false
false
1,075
java
package com.tng.portal.common.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; /** * Created by Dell on 2018/8/17. */ @Configuration public class RestTemplateConfig { @Value("${rest.config.connectTimeout:10000}") private int connectTimeout; @Value("${rest.config.readTimeout:60000}") private int readTimeout; @Bean public SimpleClientHttpRequestFactory httpClientFactory() { SimpleClientHttpRequestFactory httpRequestFactory = new SimpleClientHttpRequestFactory(); httpRequestFactory.setReadTimeout(readTimeout); httpRequestFactory.setConnectTimeout(connectTimeout); return httpRequestFactory; } @Bean public RestTemplate restTemplate(SimpleClientHttpRequestFactory httpClientFactory) { return new RestTemplate(httpClientFactory); } }
[ "eric.lu@sinodynamic.com" ]
eric.lu@sinodynamic.com
3ee5dbe0bef1885dfa7bb98a8aea73b42a2f13c0
0c28a12d3efa7ef425a8dd8f829b6521e0c8f6f5
/src/results/solutions/Dataset3/13190.txt
857fa48f5f7dc9801728640ac85d665245f1d168
[ "Apache-2.0", "Minpack" ]
permissive
bsse1017kavi/Dissection-of-CodeRep
8408b80be8104f3642a99ee50deca5b2d9914524
a4b09622e1082e2df9683f549f2e26351a440b1a
refs/heads/master
2022-01-15T11:29:16.391603
2019-07-06T09:25:11
2019-07-06T09:25:11
195,090,051
0
0
null
null
null
null
UTF-8
Java
false
false
2,391
txt
/* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.as.test.embedded.demos.ds; import java.sql.Connection; import java.sql.ResultSet; import javax.naming.InitialContext; import javax.sql.DataSource; import junit.framework.Assert; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.as.test.modular.utils.ShrinkWrapUtils; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; /** * @author <a href="kabir.khan@jboss.com">Kabir Khan</a> * @version $Revision: 1.1 $ */ @RunWith(Arquillian.class) @Ignore("[AS7-814] Fix or remove ignored smoke tests") public class DsTestCase { private static final String JNDI_NAME = "java:/H2DS"; @Deployment public static Archive<?> getDeployment() { JavaArchive archive = ShrinkWrapUtils.createJavaArchive("demos/ds-example.jar"); archive.addClass(DsTestCase.class); return archive; } @Test public void testDatasource() throws Exception { InitialContext context = new InitialContext(); DataSource ds = (DataSource) context.lookup(JNDI_NAME); Connection conn = ds.getConnection(); ResultSet rs = conn.prepareStatement("select 1").executeQuery(); Assert.assertTrue(rs.next()); } }
[ "bsse1017@iit.du.ac.bd" ]
bsse1017@iit.du.ac.bd
03141a35d090bbc3b7567cd536ffa90c3c3467e3
d5f5fa26bd4e39154cb5498735e91810275d586a
/SVN_Source_26/qrcode/src/main/java/com/jinlin/zxing/example/utils/BeepManager.java
68d6f98470be1deb674c0c406ed2f2f7e5eb2b02
[]
no_license
henlisishi/Paopaokan
72804819a644b1cd003a3e9ce77cef434d31f809
51d1cdd9dece55b411a7dc0d4fe9024968c6f7e3
refs/heads/master
2023-03-16T17:00:48.784381
2019-04-28T02:35:36
2019-04-28T02:35:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,252
java
/* * Copyright (C) 2010 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.jinlin.zxing.example.utils; import java.io.Closeable; import java.io.IOException; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.res.AssetFileDescriptor; import android.media.AudioManager; import android.media.MediaPlayer; import android.os.Vibrator; import android.preference.PreferenceManager; import android.util.Log; import com.jinlin.zxing.example.activity.CaptureActivity; import com.jinlin.zxing.example.camera.R; /** * Manages beeps and vibrations for {@link CaptureActivity}. */ public class BeepManager implements MediaPlayer.OnCompletionListener, MediaPlayer.OnErrorListener, Closeable { private static final String TAG = BeepManager.class.getSimpleName(); private static final float BEEP_VOLUME = 0.10f; private static final long VIBRATE_DURATION = 200L; private final Activity activity; private MediaPlayer mediaPlayer; private boolean playBeep; private boolean vibrate; public BeepManager(Activity activity) { this.activity = activity; this.mediaPlayer = null; updatePrefs(); } private synchronized void updatePrefs() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity); playBeep = shouldBeep(prefs, activity); vibrate = true; if (playBeep && mediaPlayer == null) { // The volume on STREAM_SYSTEM is not adjustable, and users found it // too loud, // so we now play on the music stream. activity.setVolumeControlStream(AudioManager.STREAM_MUSIC); mediaPlayer = buildMediaPlayer(activity); } } public synchronized void playBeepSoundAndVibrate() { if (playBeep && mediaPlayer != null) { mediaPlayer.start(); } if (vibrate) { Vibrator vibrator = (Vibrator) activity.getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(VIBRATE_DURATION); } } private static boolean shouldBeep(SharedPreferences prefs, Context activity) { boolean shouldPlayBeep = true; if (shouldPlayBeep) { // See if sound settings overrides this AudioManager audioService = (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE); if (audioService.getRingerMode() != AudioManager.RINGER_MODE_NORMAL) { shouldPlayBeep = false; } } return shouldPlayBeep; } private MediaPlayer buildMediaPlayer(Context activity) { MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setOnCompletionListener(this); mediaPlayer.setOnErrorListener(this); try { AssetFileDescriptor file = activity.getResources().openRawResourceFd(R.raw.beep); try { mediaPlayer.setDataSource(file.getFileDescriptor(), file.getStartOffset(), file.getLength()); } finally { file.close(); } mediaPlayer.setVolume(BEEP_VOLUME, BEEP_VOLUME); mediaPlayer.prepare(); return mediaPlayer; } catch (IOException ioe) { Log.w(TAG, ioe); mediaPlayer.release(); return null; } } @Override public void onCompletion(MediaPlayer mp) { // When the beep has finished playing, rewind to queue up another one. mp.seekTo(0); } @Override public synchronized boolean onError(MediaPlayer mp, int what, int extra) { if (what == MediaPlayer.MEDIA_ERROR_SERVER_DIED) { // we are finished, so put up an appropriate error toast if required // and finish activity.finish(); } else { // possibly media player error, so release and recreate mp.release(); mediaPlayer = null; updatePrefs(); } return true; } @Override public synchronized void close() { if (mediaPlayer != null) { mediaPlayer.release(); mediaPlayer = null; } } }
[ "raul.fan@fizzo.cn" ]
raul.fan@fizzo.cn
a637dda1293d75272a709417fd1caaf9724d9fde
f51d7e7e17f50921cf19c6fe09c0aecfdd11ccec
/4 EXERCISE DEFINING CLASSES/p11_CatLady/Main.java
c452685b6dc9cde8c067c2c133c99b755605898a
[ "MIT" ]
permissive
TsvetanNikolov123/Java---OOP-Basics
a39b83199d07e4a51e67b664d5216662e45f3fe6
5ac6360d283c1d7abf2b04df4eca560654a6ad18
refs/heads/master
2020-03-19T22:30:09.158937
2019-09-13T21:02:24
2019-09-13T21:02:24
136,972,231
0
0
null
null
null
null
UTF-8
Java
false
false
1,314
java
package p11_CatLady; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); HashMap<String, Cat> cats = new HashMap<>(); while (true) { String input = reader.readLine(); if ("End".equals(input)) break; String[] params = input.split("\\s+"); String breed = params[0]; String name = params[1]; double special = Double.parseDouble(params[2]); Cat cat = null; switch (breed) { case "Siamese": // пример за полиморфизъм cat = new Siamese(name, special); break; case "Cymric": cat = new Cymric(name, special); break; case "StreetExtraordinaire": cat = new StreetExtraordinaire(name, special); break; } cats.put(name, cat); } String searched = reader.readLine(); System.out.println(cats.get(searched)); } }
[ "tsdman1985@gmail.com" ]
tsdman1985@gmail.com
591cd93ccfc71e107071e985243b5a2acfcd6cd8
e9d1b2db15b3ae752d61ea120185093d57381f73
/mytcuml-src/src/java/components/xmi_writer_diagram_interchange_plugin/trunk/src/java/tests/com/topcoder/xmi/writer/transformers/diagram/accuracytests/TestDimensionTransformerAccuracy.java
fe8b5962997fe15b1cca0241e5f46a920611fefb
[]
no_license
kinfkong/mytcuml
9c65804d511ad997e0c4ba3004e7b831bf590757
0786c55945510e0004ff886ff01f7d714d7853ab
refs/heads/master
2020-06-04T21:34:05.260363
2014-10-21T02:31:16
2014-10-21T02:31:16
25,495,964
1
0
null
null
null
null
UTF-8
Java
false
false
2,395
java
/* * Copyright (C) 2006 TopCoder Inc., All Rights Reserved. */ package com.topcoder.xmi.writer.transformers.diagram.accuracytests; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.topcoder.diagraminterchange.Dimension; import com.topcoder.xmi.writer.transformers.diagram.Diagram2XMITransformer; import com.topcoder.xmi.writer.transformers.diagram.DiagramInterchangeElementTransformer; import com.topcoder.xmi.writer.transformers.diagram.elementtransformers.DimensionTransformer; import junit.framework.TestCase; /** * Accuracy test cases for class <code>DimensionTransformer </code>. * * @author Chenhong * @version 1.0 */ public class TestDimensionTransformerAccuracy extends TestCase { /** * Represents the DiagramInterchangeElementTransformer instance for testing. */ private DiagramInterchangeElementTransformer transformer = new DimensionTransformer(); /** * Represents the document instance for testing. */ private Document document; /** * Represents the Diagram2XMITransformer instance for testing. */ private static Diagram2XMITransformer trans = null; /** * Sets up the fixture. * * @throws Exception * throws to junit. * @see junit.framework.TestCase#setUp() */ public void setUp() throws Exception { trans = Util.createDiagram2XMITransformer(); document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); } /** * Tear down the environment. * * @throws Exception * to junit. */ public void tearDown() throws Exception { trans = null; document = null; } /** * Test the method transform. * * @throws Exception * to junit. */ public void testTransform() throws Exception { Dimension d = new Dimension(); d.setHeight(10.45); d.setWidth(0); Element node = (Element) transformer.transform(d, document, trans); assertEquals("The node name should be 'UML:Dimension'", "UML:Dimension", node.getNodeName()); assertEquals("There should be 2 attributes.", 2, node.getAttributes().getLength()); assertTrue("The height value should be 10.45", Double.parseDouble(node.getAttribute("height")) == 10.45); assertTrue("The width value should be 0.", Double.parseDouble(node.getAttribute("width")) == 0); } }
[ "kinfkong@126.com" ]
kinfkong@126.com
0d07247d0262bbcea591cbc49fa2b8f002594ffb
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a024/A024606.java
0540d8da6733663096c4b30b8e7e7382b306dd60
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,201
java
package irvine.oeis.a024; import java.util.TreeSet; import irvine.math.z.Z; import irvine.oeis.Sequence; import irvine.util.Pair; /** * A024606 Numbers of form <code>x^2 + xy + y^2</code> with distinct x and <code>y &gt; 0</code>. * @author Sean A. Irvine */ public class A024606 implements Sequence { private static Z eval(final Pair<Long, Long> a) { final Z l = Z.valueOf(a.left()); final Z r = Z.valueOf(a.right()); return l.square().add(r.square()).add(l.multiply(r)); } private final TreeSet<Pair<Long, Long>> mA = new TreeSet<>((a, b) -> { final int c = eval(a).compareTo(eval(b)); if (c != 0) { return c; } final int d = a.left().compareTo(b.left()); if (d != 0) { return d; } return a.right().compareTo(b.right()); }); { mA.add(new Pair<>(1L, 2L)); } @Override public Z next() { final Pair<Long, Long> pair = mA.pollFirst(); mA.add(new Pair<>(pair.left(), pair.right() + 1)); if (pair.left() + 1 < pair.right()) { mA.add(new Pair<>(pair.left() + 1, pair.right())); } final Z res = eval(pair); while (eval(mA.first()).equals(res)) { mA.pollFirst(); } return res; } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
3bf8a16ce452f09cb23dcde22a969feb438b3eea
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-companyreg/src/main/java/com/aliyuncs/companyreg/model/v20190508/QueryTradeIntentionUserListResponse.java
f3a0c0d98d5ed36051f1f466e7f0e43b2ae8a2c9
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
4,387
java
/* * 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.aliyuncs.companyreg.model.v20190508; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.companyreg.transform.v20190508.QueryTradeIntentionUserListResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class QueryTradeIntentionUserListResponse extends AcsResponse { private String requestId; private Integer totalItemNum; private Integer currentPageNum; private Integer pageSize; private Integer totalPageNum; private List<Trademark> data; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Integer getTotalItemNum() { return this.totalItemNum; } public void setTotalItemNum(Integer totalItemNum) { this.totalItemNum = totalItemNum; } public Integer getCurrentPageNum() { return this.currentPageNum; } public void setCurrentPageNum(Integer currentPageNum) { this.currentPageNum = currentPageNum; } public Integer getPageSize() { return this.pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public Integer getTotalPageNum() { return this.totalPageNum; } public void setTotalPageNum(Integer totalPageNum) { this.totalPageNum = totalPageNum; } public List<Trademark> getData() { return this.data; } public void setData(List<Trademark> data) { this.data = data; } public static class Trademark { private String registerNumber; private String classification; private String mobile; private String userName; private String bizId; private String description; private Integer status; private Integer area; private Integer type; private Long createTime; private Long updateTime; public String getRegisterNumber() { return this.registerNumber; } public void setRegisterNumber(String registerNumber) { this.registerNumber = registerNumber; } public String getClassification() { return this.classification; } public void setClassification(String classification) { this.classification = classification; } public String getMobile() { return this.mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getUserName() { return this.userName; } public void setUserName(String userName) { this.userName = userName; } public String getBizId() { return this.bizId; } public void setBizId(String bizId) { this.bizId = bizId; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } public Integer getStatus() { return this.status; } public void setStatus(Integer status) { this.status = status; } public Integer getArea() { return this.area; } public void setArea(Integer area) { this.area = area; } public Integer getType() { return this.type; } public void setType(Integer type) { this.type = type; } public Long getCreateTime() { return this.createTime; } public void setCreateTime(Long createTime) { this.createTime = createTime; } public Long getUpdateTime() { return this.updateTime; } public void setUpdateTime(Long updateTime) { this.updateTime = updateTime; } } @Override public QueryTradeIntentionUserListResponse getInstance(UnmarshallerContext context) { return QueryTradeIntentionUserListResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
88bb0ce1c5b1d74cee33f8ccde34a31106fc0d41
6b2542400a56de686a7f84978fd6df4c45fc056a
/app-web/src/main/java/com/blackstrawai/response/keycontact/statutorybody/StatutoryDropDownResponse.java
dfdb567636c7286308e5c48bedf487d9011e50fd
[]
no_license
BhargavMaddikera-BM/erp_fintech
adb6f2bb8b9b4e555930a1714b90a57603cc055c
ea78162e490f46adb998ca8a4e935c2aa144a753
refs/heads/master
2023-03-14T15:40:04.206288
2021-02-26T09:23:48
2021-02-26T09:23:48
342,523,642
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
package com.blackstrawai.response.keycontact.statutorybody; import com.blackstrawai.common.BaseResponse; import com.blackstrawai.keycontact.dropdowns.StatutoryBodyDropDownVo; public class StatutoryDropDownResponse extends BaseResponse{ private StatutoryBodyDropDownVo data; public StatutoryBodyDropDownVo getData() { return data; } public void setData(StatutoryBodyDropDownVo data) { this.data = data; } }
[ "bhargav.maddikera@blackstraw.ai" ]
bhargav.maddikera@blackstraw.ai
178a5d6edaf891612ef4cdb2f29c846b52e76b77
c94f888541c0c430331110818ed7f3d6b27b788a
/rms/java/src/main/java/com/antgroup/antchain/openapi/rms/models/AllTraasmetaAppgroupResponse.java
5672cda6adc40186456cae5bdfaa531342e7523f
[ "Apache-2.0", "MIT" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
1,736
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.rms.models; import com.aliyun.tea.*; public class AllTraasmetaAppgroupResponse extends TeaModel { // 请求唯一ID,用于链路跟踪和问题排查 @NameInMap("req_msg_id") public String reqMsgId; // 结果码,一般OK表示调用成功 @NameInMap("result_code") public String resultCode; // 异常信息的文本描述 @NameInMap("result_msg") public String resultMsg; // appgroupsdto @NameInMap("app_groups") public java.util.List<TraasAppGroupDto> appGroups; public static AllTraasmetaAppgroupResponse build(java.util.Map<String, ?> map) throws Exception { AllTraasmetaAppgroupResponse self = new AllTraasmetaAppgroupResponse(); return TeaModel.build(map, self); } public AllTraasmetaAppgroupResponse setReqMsgId(String reqMsgId) { this.reqMsgId = reqMsgId; return this; } public String getReqMsgId() { return this.reqMsgId; } public AllTraasmetaAppgroupResponse setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public AllTraasmetaAppgroupResponse setResultMsg(String resultMsg) { this.resultMsg = resultMsg; return this; } public String getResultMsg() { return this.resultMsg; } public AllTraasmetaAppgroupResponse setAppGroups(java.util.List<TraasAppGroupDto> appGroups) { this.appGroups = appGroups; return this; } public java.util.List<TraasAppGroupDto> getAppGroups() { return this.appGroups; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
ca2540a1019f4bdc778a8bd2c46f3cc2977bce76
760f984ef88f1bfc0a86442c4df56823dc8e11fc
/KeyboardCustom/gen/sra/keyboard/R.java
556619510c09518e1de9d9f8d1499c000305092e
[]
no_license
Naduni18/hbworkspace2-100
faff2ae982ffa43a6ab009959791c00f429fdbd1
00cbd33513d0ee68d78e7da22aa3ead37012e89b
refs/heads/master
2020-04-11T04:54:50.383140
2018-07-06T11:49:47
2018-07-06T11:49:47
161,531,081
1
0
null
2018-12-12T18:49:44
2018-12-12T18:49:43
null
UTF-8
Java
false
false
3,332
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 sra.keyboard; public final class R { public static final class attr { } public static final class drawable { public static final int back=0x7f020000; public static final int back_click=0x7f020001; public static final int back_high=0x7f020002; public static final int change=0x7f020003; public static final int change_click=0x7f020004; public static final int change_high=0x7f020005; public static final int hide_high=0x7f020006; public static final int hide_keyboard_click=0x7f020007; public static final int hidekeyboard=0x7f020008; public static final int icon=0x7f020009; } public static final class id { public static final int et1=0x7f050029; public static final int hebrwKeyboardView=0x7f050000; public static final int xA=0x7f05000c; public static final int xB=0x7f05001b; public static final int xBack=0x7f05001f; public static final int xC=0x7f050019; public static final int xChange=0x7f050020; public static final int xD=0x7f05000e; public static final int xDone=0x7f050026; public static final int xE=0x7f050004; public static final int xEt=0x7f050028; public static final int xF=0x7f05000f; public static final int xG=0x7f050010; public static final int xH=0x7f050011; public static final int xI=0x7f050009; public static final int xJ=0x7f050012; public static final int xK=0x7f050013; public static final int xK1=0x7f05002a; public static final int xKeyBoard=0x7f05002b; public static final int xL=0x7f050014; public static final int xM=0x7f05001d; public static final int xMLayout=0x7f050027; public static final int xN=0x7f05001c; public static final int xNum=0x7f050025; public static final int xO=0x7f05000a; public static final int xP=0x7f05000b; public static final int xQ=0x7f050002; public static final int xR=0x7f050005; public static final int xS=0x7f05000d; public static final int xS1=0x7f050015; public static final int xS2=0x7f050016; public static final int xS3=0x7f05001e; public static final int xS4=0x7f050021; public static final int xS5=0x7f050023; public static final int xS6=0x7f050024; public static final int xSpace=0x7f050022; public static final int xT=0x7f050006; public static final int xU=0x7f050008; public static final int xV=0x7f05001a; public static final int xW=0x7f050003; public static final int xX=0x7f050018; public static final int xY=0x7f050007; public static final int xZ=0x7f050017; public static final int xsubLayout=0x7f050001; } public static final class layout { public static final int keyboard=0x7f030000; public static final int main=0x7f030001; } public static final class string { public static final int app_name=0x7f040001; public static final int hello=0x7f040000; } }
[ "harshalbenake@gmail.com" ]
harshalbenake@gmail.com
2de4db2a19766eaee44c42badc7681f288c43614
55eb24f599565e850dbe7d84a216756f6358ed45
/sms/src/main/java/com/joh/sms/service/ClassLevelService.java
65c1bf464f61c11bb94a92dde87b02e29294c6ee
[]
no_license
jawharomer/sms
302370a2fc4ba628e3e00a952096fdfd14824851
bd5853f17fd28d0f4656b853b9d0dabc33291ddb
refs/heads/master
2020-03-27T02:51:36.251176
2019-01-06T17:07:28
2019-01-06T17:07:28
145,822,598
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package com.joh.sms.service; import com.joh.sms.model.ClassLevel; public interface ClassLevelService { Iterable<ClassLevel> findAll(); ClassLevel save(ClassLevel classLevel); void delete(int id); ClassLevel findOne(int id); ClassLevel update(ClassLevel classLevel); ClassLevel findClassLevelByStudentId(int id); }
[ "jawhar.omar@yahoo.com" ]
jawhar.omar@yahoo.com
2a5606c3ce2167568a6e25b8407a07b3edb88b45
3560541681cfb7484f3d88772a94ce13aa00c95c
/PDFComparer/org/apache/pdfbox/pdmodel/graphics/predictor/Paeth.java
5eaff8ef773b621c2c7a8aefad56b21f7c6ee492
[]
no_license
daguti/PDFComparator
2efc16037a6cd3cd4ae6a12be13b8b7d083c51a7
4b84ea93bebc49f2739efac9325a417749e692c3
refs/heads/master
2021-01-10T12:43:08.814267
2016-03-17T16:39:36
2016-03-17T16:39:36
54,134,348
0
0
null
null
null
null
UTF-8
Java
false
false
1,778
java
/* */ package org.apache.pdfbox.pdmodel.graphics.predictor; /* */ /* */ public class Paeth extends PredictorAlgorithm /* */ { /* */ public int paethPredictor(int a, int b, int c) /* */ { /* 55 */ int p = a + b - c; /* 56 */ int pa = Math.abs(p - a); /* 57 */ int pb = Math.abs(p - b); /* 58 */ int pc = Math.abs(p - c); /* */ /* 61 */ if ((pa <= pb) && (pa <= pc)) /* */ { /* 63 */ return a; /* */ } /* 65 */ if (pb <= pc) /* */ { /* 67 */ return b; /* */ } /* */ /* 71 */ return c; /* */ } /* */ /* */ public void encodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset) /* */ { /* 81 */ int bpl = getWidth() * getBpp(); /* 82 */ for (int x = 0; x < bpl; x++) /* */ { /* 84 */ dest[(x + destOffset)] = ((byte)(src[(x + srcOffset)] - paethPredictor(leftPixel(src, srcOffset, srcDy, x), abovePixel(src, srcOffset, srcDy, x), aboveLeftPixel(src, srcOffset, srcDy, x)))); /* */ } /* */ } /* */ /* */ public void decodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset) /* */ { /* 97 */ int bpl = getWidth() * getBpp(); /* 98 */ for (int x = 0; x < bpl; x++) /* */ { /* 100 */ dest[(x + destOffset)] = ((byte)(src[(x + srcOffset)] + paethPredictor(leftPixel(dest, destOffset, destDy, x), abovePixel(dest, destOffset, destDy, x), aboveLeftPixel(dest, destOffset, destDy, x)))); /* */ } /* */ } /* */ } /* Location: C:\Users\ESa10969\Desktop\PDFComparer\ * Qualified Name: org.apache.pdfbox.pdmodel.graphics.predictor.Paeth * JD-Core Version: 0.6.2 */
[ "ESa10969@MADWN0030139.euro.net.intra" ]
ESa10969@MADWN0030139.euro.net.intra
3201cb3c42968e79d61b0fefa30483e5c53c87a2
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/google/c/c.java
876d6b7e72943d8166b03e9abf6640880fc2b3d9
[]
no_license
BharathPalanivelu/repotest
ddaf56a94eb52867408e0e769f35bef2d815da72
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
refs/heads/master
2020-09-30T18:55:04.802341
2019-12-02T10:52:08
2019-12-02T10:52:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,326
java
package com.google.c; import com.google.c.ad; import java.io.InputStream; public abstract class c<MessageType extends ad> implements aj<MessageType> { /* renamed from: a reason: collision with root package name */ private static final p f13705a = p.e(); private as a(MessageType messagetype) { if (messagetype instanceof b) { return ((b) messagetype).c(); } return new as((ad) messagetype); } private MessageType b(MessageType messagetype) throws v { if (messagetype == null || messagetype.a()) { return messagetype; } throw a(messagetype).a().a(messagetype); } public MessageType a(f fVar, p pVar) throws v { MessageType messagetype; try { g f2 = fVar.f(); messagetype = (ad) b(f2, pVar); f2.a(0); return messagetype; } catch (v e2) { throw e2.a(messagetype); } catch (v e3) { throw e3; } } /* renamed from: b */ public MessageType c(f fVar, p pVar) throws v { return b(a(fVar, pVar)); } public MessageType a(byte[] bArr, int i, int i2, p pVar) throws v { MessageType messagetype; try { g a2 = g.a(bArr, i, i2); messagetype = (ad) b(a2, pVar); a2.a(0); return messagetype; } catch (v e2) { throw e2.a(messagetype); } catch (v e3) { throw e3; } } public MessageType b(byte[] bArr, int i, int i2, p pVar) throws v { return b(a(bArr, i, i2, pVar)); } /* renamed from: a */ public MessageType b(byte[] bArr, p pVar) throws v { return b(bArr, 0, bArr.length, pVar); } /* renamed from: a */ public MessageType b(byte[] bArr) throws v { return b(bArr, f13705a); } public MessageType a(InputStream inputStream, p pVar) throws v { g a2 = g.a(inputStream); MessageType messagetype = (ad) b(a2, pVar); try { a2.a(0); return messagetype; } catch (v e2) { throw e2.a(messagetype); } } /* renamed from: b */ public MessageType c(InputStream inputStream, p pVar) throws v { return b(a(inputStream, pVar)); } }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
bdcf907396ee2929f3de35e78e3493a7ccacd236
6d08d99826c55ebf772c92653fd28e4af980f6c6
/covid-tracker-back/src/main/java/com/andres_k/web/covidtracker/utils/data/Pair.java
3a55e468c790bf6b5970f7c7770a6fa1e1632776
[]
no_license
Draym/Covid19Tracker
4e6226396eb304a14e96adae32f4b37fe7d6e1fe
ddbae4a92058a0937602b7f9afa0aedaaaa1ffbb
refs/heads/master
2021-01-26T12:50:13.708469
2020-03-29T04:35:48
2020-03-29T04:35:48
243,438,162
3
1
null
2020-07-02T02:28:02
2020-02-27T05:24:38
JavaScript
UTF-8
Java
false
false
227
java
package com.andres_k.web.covidtracker.utils.data; public class Pair<T1, T2> { public T1 v1; public T2 v2; public Pair(){ } public Pair(T1 v1, T2 v2) { this.v1 = v1; this.v2 = v2; } }
[ "kevin.andres@epitech.eu" ]
kevin.andres@epitech.eu
3426e343e4b399937487f4a0d221efd722d61e8c
8523563143e69b9ca0326acafdaa646f1b57bb94
/trunk/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage2.java
792354d656c5bd6b2a1a454eada6590b180a51ab
[]
no_license
svn2github/plantuml
d372e8c5f4b1c5d990b190e2989cd8e5a86ed8fc
241b60a9081a25079bf73f12c08c476e16993384
refs/heads/master
2023-09-03T13:20:47.638892
2012-11-20T22:08:10
2012-11-20T22:08:10
10,839,094
0
0
null
null
null
null
UTF-8
Java
false
false
4,162
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2012, Arnaud Roques * * Project Info: http://plantuml.sourceforge.net * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * Original Author: Arnaud Roques * * Revision $Revision: 5183 $ * */ package net.sourceforge.plantuml.svek.image; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HorizontalAlignement; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Cluster; import net.sourceforge.plantuml.svek.ClusterDecoration; import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.ugraphic.UGraphic; public class EntityImageEmptyPackage2 extends AbstractEntityImage { final private TextBlock desc; final private static int MARGIN = 10; final private HtmlColor specificBackColor; final private ISkinParam skinParam; final private Stereotype stereotype; public EntityImageEmptyPackage2(ILeaf entity, ISkinParam skinParam) { super(entity, skinParam); this.skinParam = skinParam; this.specificBackColor = entity.getSpecificBackColor(); this.stereotype = entity.getStereotype(); this.desc = TextBlockUtils.create( entity.getDisplay(), new FontConfiguration(getFont(FontParam.PACKAGE, stereotype), getFontColor(FontParam.PACKAGE, stereotype)), HorizontalAlignement.CENTER, skinParam); } @Override public Dimension2D getDimension(StringBounder stringBounder) { final Dimension2D dim = desc.calculateDimension(stringBounder); return Dimension2DDouble.delta(dim, MARGIN * 2, MARGIN * 2 + dim.getHeight() * 2); } public void drawU(UGraphic ug, double xTheoricalPosition, double yTheoricalPosition) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = getDimension(stringBounder); final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); final HtmlColor stateBack = Cluster.getStateBackColor(specificBackColor, skinParam, stereotype == null ? null : stereotype.getLabel()); final ClusterDecoration decoration = new ClusterDecoration(getSkinParam().getPackageStyle(), null, desc, TextBlockUtils.empty(0, 0), stateBack, 0, 0, widthTotal, heightTotal); decoration.drawU(ug, xTheoricalPosition, yTheoricalPosition, getColor(ColorParam.packageBorder, getStereo()), getSkinParam().shadowing()); } public ShapeType getShapeType() { return ShapeType.RECTANGLE; } public int getShield() { return 0; } }
[ "arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1" ]
arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1
4157195e2b88cbfe067b0f3f3efe4809ab82cb0e
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
/schemaOrgGson/src/org/kyojo/schemaorg/m3n4/gson/core/container/RequiredMaxAgeDeserializer.java
fedfbbc29616854f45049ad0cdf74641b30a7fd8
[ "Apache-2.0" ]
permissive
nagaikenshin/schemaOrg
3dec1626781913930da5585884e3484e0b525aea
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
refs/heads/master
2021-06-25T04:52:49.995840
2019-05-12T06:22:37
2019-05-12T06:22:37
134,319,974
1
0
null
null
null
null
UTF-8
Java
false
false
1,147
java
package org.kyojo.schemaorg.m3n4.gson.core.container; import java.lang.reflect.Field; import java.lang.reflect.Type; import java.util.HashMap; import java.util.Map; import org.kyojo.gson.JsonDeserializationContext; import org.kyojo.gson.JsonDeserializer; import org.kyojo.gson.JsonElement; import org.kyojo.gson.JsonParseException; import org.kyojo.schemaorg.m3n4.core.impl.REQUIRED_MAX_AGE; import org.kyojo.schemaorg.m3n4.core.Container.RequiredMaxAge; import org.kyojo.schemaorg.m3n4.gson.DeserializerTemplate; public class RequiredMaxAgeDeserializer implements JsonDeserializer<RequiredMaxAge> { public static Map<String, Field> fldMap = new HashMap<>(); @Override public RequiredMaxAge deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { if(jsonElement.isJsonPrimitive()) { try { return new REQUIRED_MAX_AGE(jsonElement.getAsLong()); } catch(NumberFormatException nfe) { return null; } } return DeserializerTemplate.deserializeSub(jsonElement, type, context, new REQUIRED_MAX_AGE(), RequiredMaxAge.class, REQUIRED_MAX_AGE.class, fldMap); } }
[ "nagai@nagaikenshin.com" ]
nagai@nagaikenshin.com
9c3e07f630fe4783fb50da7e9a506fae7439d192
80696d2553eb38693d9faadca881530d28d48201
/OnlineShop-master/OnlineShop-master/OnlineShop/src/java/com/dao/MySQLOrderDAO.java
0568377725e6e68cd0bdfdc26a563815eed9e03d
[]
no_license
AbsSecurePwd/AbsSecurePwd
c5bbab6d592848aff0c5db70f6fde69c471db431
b0a6d8151573673b12900a8a0d4b76004a8b1361
refs/heads/master
2023-02-08T07:23:07.768558
2020-12-11T13:31:56
2020-12-11T13:31:56
320,307,848
0
0
null
null
null
null
UTF-8
Java
false
false
417
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.dao; import com.entity.TblOrder; import com.interfaces.OrderDAO; /** * * @author */ public class MySQLOrderDAO implements OrderDAO { public MySQLOrderDAO() { } public int insertOrder(TblOrder order) { throw new UnsupportedOperationException("Not supported yet."); } }
[ "738501@TCS.com" ]
738501@TCS.com
ae9f083716b0305c6e0394b20f613ce59266cf0c
93e55d19b3e9c1066e401ab271f2d66bde0ee125
/project/mj-dao/project/mj-dao/src/main/java/game/boss/poker/dao/dao/UserPayLogDao.java
dde191e751e2686ae5edda0ab958b24b6f9285e0
[]
no_license
nostradamas/YILE_MJ
be5e00b2e5eff288911ef6b417f2efe919c39648
053967dcbf3f80800e0ece8e2fb9e948323dcec6
refs/heads/master
2020-05-04T11:20:44.194693
2017-11-14T05:35:13
2017-11-14T05:35:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
417
java
package game.boss.poker.dao.dao; import org.forkjoin.core.dao.impi.BaseDaoImpi; import game.boss.poker.dao.entity.UserPayLogDO; import org.springframework.stereotype.Component; @Component public class UserPayLogDao extends BaseDaoImpi<UserPayLogDO,UserPayLogDO.Key> { public UserPayLogDao() { super(UserPayLogDO.TABLE_INFO); } public UserPayLogDO get(int id) { return get(new UserPayLogDO.Key(id)); } }
[ "13323659953@163.com" ]
13323659953@163.com
e71e863f9edba87773dd3a7bc968fc410c8bcd11
26da0aea2ab0a2266bbee962d94a96d98a770e5f
/aries/ariel-compiler/src/main/java/org/aries/ast/node/OptionNode.java
f9b5d921da721a5a67ec6243d3b072895098073e
[ "Apache-2.0" ]
permissive
tfisher1226/ARIES
1de2bc076cf83488703cf18f7e3f6e3c5ef1b40b
814e3a4b4b48396bcd6d082e78f6519679ccaa01
refs/heads/master
2021-01-10T02:28:07.807313
2015-12-10T20:30:00
2015-12-10T20:30:00
44,076,313
2
0
null
null
null
null
UTF-8
Java
false
false
340
java
package org.aries.ast.node; /** * <p>Option node class for Ariel Abstract Syntax Tree. * * <p>The following attributes are configurable in Ariel Language. * * <pre>String name</pre> * * <pre>Properties properties</pre> * */ public class OptionNode extends BlockNode { public OptionNode(Object node) { super(node); } }
[ "tfisher@kattare.com" ]
tfisher@kattare.com
9fc725de4b764ec753fd3571c5502cadde52abcd
fac8f927aad055bf9d86a5299240c7eefdf6ffd6
/src/main/java/Leetcode/Solution43.java
7f71733346bf966f522dbbf1364a667424cf9064
[]
no_license
whl6785968/MachineLearningBySpark
d0f4ea1c5432d0c2909a46c3f8cd360a5c63e84a
82a542669cf4f7067e45359424d2cc46b915f088
refs/heads/master
2022-07-24T12:49:15.074695
2020-07-24T01:53:04
2020-07-24T01:53:04
204,861,202
0
0
null
2022-06-21T01:45:52
2019-08-28T06:14:29
Java
UTF-8
Java
false
false
1,413
java
package Leetcode; public class Solution43 { // public int countDigitOne(int n) { // int digit = 1,res = 0; // int high = n / 10,cur = n % 10,low = 0; // // while (high != 0 || cur != 0){ // if(cur == 0) res += high * digit; // else if(cur == 1) res += high * digit + low + 1; // else res += (high + 1) * digit; // low += cur * digit; // cur = high % 10; // high /= 10; // digit *= 10; // } // // return res; // } public int countDigitOne(int n) { return f(n); } //如果high位为1,只看high位,即为pow //如果high位不为1,看低位,即f(pow-1) private int f(int n ) { if (n <= 0) return 0; String s = String.valueOf(n); int high = s.charAt(0) - '0'; int pow = (int) Math.pow(10, s.length()-1); int last = n - high*pow; if (high == 1) { return f(pow-1) + last + 1 + f(last); } else { return pow + high*f(pow-1) + f(last); } } public static void main(String[] args) { Solution43 solution43 = new Solution43(); // int n = 3234; // String s = String.valueOf(n); // int h = s.charAt(0) - '0'; // System.out.println(h); int i = solution43.countDigitOne(3234); // System.out.println(i); } }
[ "806403789@qq.com" ]
806403789@qq.com
ba4536cb72d7f2109c882d5fe074eb4e4e2ff782
4a1773d1d68f69a383ce44fd3d1342d76ef3bb59
/swg-acs-core/message/src/main/java/com/swg/acs/message/SetParameterValuesResponse.java
898477026cb31361483ab2289af3dfb3d5239d8c
[]
no_license
swg-corp/swg-acs
ae74593b9996d3138c7a4cd5312cfe905550a3d4
9a2cdf5e87d718ca151ca6409f963309790277f7
refs/heads/master
2021-01-15T18:26:25.548637
2012-07-06T15:39:17
2012-07-06T15:39:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
733
java
package com.swg.acs.message; import com.swg.acs.MessageBody; import com.swg.acs.message.cwmp.ArgumentFactory; import com.swg.acs.message.cwmp.CwmpMessage; /** * * @author satriaprayoga * */ public class SetParameterValuesResponse extends CwmpMessage{ private static final long serialVersionUID = 5645504722332986246L; private int status; public SetParameterValuesResponse() { super("SetParameterValuesResponse"); } @Override protected void configureBody(MessageBody bodyPart, ArgumentFactory argumentFactory) { } @Override protected void configureParse(MessageBody messageBody) { status=Integer.valueOf(messageBody.getChild("Status").getValue()); } public int getStatus() { return status; } }
[ "satria.prayoga@gmail.com" ]
satria.prayoga@gmail.com
235d90b739155672413d0fa78f7da8034437a2b6
d883f3b07e5a19ff8c6eb9c3a4b03d9f910f27b2
/Services/Data/DatabasePoolService/src/test/com/sandata/lab/dl/db/pool/osgi/DatabasePoolServiceOsgiTest/src/test/com/sandata/lab/dl/vv/integration/BaseIntegrationTest.java
a2f6995b55f214794349b2f4dd405fa445275d79
[]
no_license
dev0psunleashed/Sandata_SampleDemo
ec2c1f79988e129a21c6ddf376ac572485843b04
a1818601c59b04e505e45e33a36e98a27a69bc39
refs/heads/master
2021-01-25T12:31:30.026326
2017-02-20T11:49:37
2017-02-20T11:49:37
82,551,409
0
0
null
null
null
null
UTF-8
Java
false
false
3,544
java
package com.sandata.lab.dl.vv.integration; import com.sandata.lab.common.oracle.db.connection.SandataOracleConnection; import com.sandata.lab.dl.vv.BaseTestSupport; import oracle.ucp.UniversalConnectionPoolException; import org.junit.After; import org.junit.Assert; import org.junit.Before; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.SQLException; /** * Date: 8/13/15 * Time: 5:59 PM */ public class BaseIntegrationTest extends BaseTestSupport { private SandataOracleConnection sandataOracleConnection; @Before public void beforeTest() throws UniversalConnectionPoolException { sandataOracleConnection.startPool(); } @After public void afterTest() throws UniversalConnectionPoolException { sandataOracleConnection.stopPool(); } protected BaseIntegrationTest() throws SQLException { this.sandataOracleConnection = new SandataOracleConnection() //.DatabaseName("sdbdev1") .DatabaseName("sdbdev2") .ServerName("stxdevdb.sandata.com") .PortNumber(1526) .User("coredata") //.Password("z3U0kCdbdN") .Password("Z4fEIRn7D2") .Open(); } protected Connection openConnection() throws SQLException { Assert.assertNotNull(sandataOracleConnection); Connection connection = sandataOracleConnection.getConnection(); Assert.assertNotNull(connection); connection.setAutoCommit(true); return connection; } protected Object call(final String method, int outputParameterType, Object[] params) throws SQLException { Connection connection = null; try { connection = openConnection(); CallableStatement callableStatement = connection.prepareCall(method); callableStatement.registerOutParameter(1, outputParameterType); int index = 2; for (Object param : params) { callableStatement.setObject(index++, param); } callableStatement.execute(); return callableStatement.getObject(1); } finally { try { if (connection != null) { connection.close(); } } catch (Exception e) {} } } protected Object call(final Connection connection, final String method, int outputParameterType, Object[] params) throws SQLException { CallableStatement callableStatement = connection.prepareCall(method); callableStatement.registerOutParameter(1, outputParameterType); int index = 2; for (Object param : params) { callableStatement.setObject(index++, param); } callableStatement.execute(); return callableStatement.getObject(1); } protected Object call(final Connection connection, final String method, int outputParameterType) throws SQLException { CallableStatement callableStatement = connection.prepareCall(method); callableStatement.registerOutParameter(1, outputParameterType); callableStatement.execute(); return callableStatement.getObject(1); } public SandataOracleConnection getSandataOracleConnection() { return sandataOracleConnection; } @Override protected void onSetup() throws Exception { } }
[ "pradeep.ganesh@softcrylic.co.in" ]
pradeep.ganesh@softcrylic.co.in
083d854e3c9f486302282ff4907e944cb16af728
615edc20afa7c5a0df5db6c828d5384b4ceeec13
/CT25-DataPack/dist/game/data/scripts/hellbound/Buron/Buron.java
3a525c4155f61276be6de1f9acaf616e3202c40f
[]
no_license
l2jmaximun/Freya
7e40d4bce9a1b7837bbbe5c3bf6601a03c023fe9
5dc44b1a8048b9658a7e27b83eef2ea06268898a
refs/heads/master
2021-08-30T19:31:24.630211
2017-12-19T05:57:16
2017-12-19T05:57:16
114,718,987
0
0
null
null
null
null
UTF-8
Java
false
false
2,901
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package hellbound.Buron; import ct25.xtreme.gameserver.instancemanager.HellboundManager; import ct25.xtreme.gameserver.model.actor.L2Npc; import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance; import ct25.xtreme.gameserver.model.quest.Quest; public class Buron extends Quest { // Npc private static final int BURON = 32345; // Items private static final int HELMET = 9669; private static final int TUNIC = 9670; private static final int PANTS = 9671; private static final int DARION_BADGE = 9674; @Override public final String onAdvEvent(final String event, final L2Npc npc, final L2PcInstance player) { if ("Rumor".equalsIgnoreCase(event)) return "32345-" + HellboundManager.getInstance().getLevel() + "r.htm"; else if ("Tunic".equalsIgnoreCase(event) || "Helmet".equalsIgnoreCase(event) || "Pants".equalsIgnoreCase(event)) { if (HellboundManager.getInstance().getLevel() < 2) return "32345-lowlvl.htm"; if (player.getInventory().getInventoryItemCount(DARION_BADGE, -1, false) >= 10) if (player.destroyItemByItemId("Quest", DARION_BADGE, 10, npc, true)) { if ("Tunic".equalsIgnoreCase(event)) player.addItem("Quest", TUNIC, 1, npc, true); else if ("Helmet".equalsIgnoreCase(event)) player.addItem("Quest", HELMET, 1, npc, true); else if ("Pants".equalsIgnoreCase(event)) player.addItem("Quest", PANTS, 1, npc, true); return null; } return "32345-noitems.htm"; } return event; } @Override public final String onFirstTalk(final L2Npc npc, final L2PcInstance player) { if (player.getQuestState(getName()) == null) newQuestState(player); switch (HellboundManager.getInstance().getLevel()) { case 1: return "32345-01.htm"; case 2: case 3: case 4: return "32345-02.htm"; default: return "32345-01a.htm"; } } public Buron(final int questId, final String name, final String descr) { super(questId, name, descr); addFirstTalkId(BURON); addStartNpc(BURON); addTalkId(BURON); } public static void main(final String[] args) { new Buron(-1, Buron.class.getSimpleName(), "hellbound"); } }
[ "Rener@Rener-PC" ]
Rener@Rener-PC
20c13ae56c669d5be87ec34b19c8bf0679e25715
12283ca4b55141bba6ce0dd28580d79f2f5223fa
/String/src/Main.java
46a4f846482add9492ddfc82a90d92f73ee13bb2
[]
no_license
java-hyein/Class-Code
1c5f5cda2578199cacb28a6f5be2eaf39d305e20
3992508307f7e07bcc72a9df893293fc25f2ffbc
refs/heads/master
2020-09-06T12:46:13.257489
2020-01-07T10:17:14
2020-01-07T10:17:14
220,427,701
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
import java.util.*; public class Main { public static void main(String[] args) { LinkedList<Integer> linkedList = new LinkedList<Integer>(); for (int i = 0; i < 10; i++) linkedList.add(0,i); for (int i = 0; i < 10; i++) System.out.format("linkedlist[%d] = %d\n",i,linkedList.get(i)); for(Integer i : linkedList) System.out.format("i = %d\n",i); List list = new SingleLinkedList(); for(int i = 0; i < 10; i++) list.insertAt(0, i); for(int i = 0; i < 10; i++) System.out.format("list[%d] = %d\n",i,list.getAt(i)); } }
[ "user@DESKTOP-V882PTR" ]
user@DESKTOP-V882PTR
e78ee518f067528859873ad3582de2983be35d28
89f31c179d5a1650c1f482f4543bf596d34eb85c
/artifact/josceleton/core-api/trunk/src/main/java/net/sf/josceleton/core/api/entity/joint/Skeleton.java
48b574009ae9de8cb3a4c0aba5808c6b195b34b4
[]
no_license
christophpickl/josceleton
65aa145e0287ff2f2bd2705dda6c5aa63db060ad
090d1a62d2d2658fc5a3581197307e04a11317c8
refs/heads/master
2016-09-13T08:20:21.821361
2011-04-15T21:39:53
2011-04-15T21:39:53
56,807,708
1
0
null
null
null
null
UTF-8
Java
false
false
1,774
java
package net.sf.josceleton.core.api.entity.joint; import net.sf.josceleton.core.api.entity.joint.JointParts.LeftJoint; import net.sf.josceleton.core.api.entity.joint.JointParts.RightJoint; import net.sf.josceleton.core.api.entity.location.Coordinate; /** * @since 0.4 */ public interface Skeleton { /** * <font style="font-weight:bold;color:red;">ATTENTION:</font> This method might return <code>null</code>! * * @param joint of which to get the most recent coordinate * @return recent position of given <code>joint</code>, or </code>null</code> if none yet available * @since 0.4 */ Coordinate get(Joint joint); /** * Safely get a coordinate, ensuring the return value is not null but throwing an exception instead. * * @param joint of which to get the most recent coordinate * @return recent position of given <code>joint</code> * @throws SkeletonCoordinateUnavailableException if no joint data was yet received for this joint * @since 0.4 * @see #get(Joint) */ Coordinate getNullSafe(Joint joint); // FIXME rename "getNullSafe" to simply "get", and old "get" to something like "getOrNull" /** * * @param joint * @return * @since 0.4 * @deprecated since 0.5; see {@link #isAvailableFor(Joint...)} instead. */ @Deprecated boolean isCoordinateAvailable(Joint joint); /** * @since 0.5 */ boolean isAvailableFor(Joint... joint); /** * Allows to pass symmetric joint parts, e.g.: <code>Joints.HANDS()</code>. * @since 0.5 */ <J extends Joint, SJ extends SymetricJoint<J, LJ, RJ>, LJ extends LeftJoint<J>, RJ extends RightJoint<J>> boolean areAvailableFor(SJ symetricJoint); /** * @return true if there is data for all joints available. * @since 0.5 */ boolean allCoordinatesAvailable(); }
[ "christoph.pickl@gmail.com" ]
christoph.pickl@gmail.com
909f99690fd26b6567b2fa648e97e1e8a5d14b27
0bffcdd8c5f803627956bd7cec7b28d1cea00dc3
/src/main/java/com/google/android/gms/ads/internal/overlay/zzr.java
8717c0fac70554346f3c05b90159799856265b6e
[]
no_license
sinzua/baseApk
eb5d8c28cdb385ec49413217151ebba7c2fbb723
9011fb631ed84b1747561244cc08fff38205e97c
refs/heads/master
2021-01-21T17:39:20.367401
2017-05-21T18:06:26
2017-05-21T18:06:26
91,977,496
3
2
null
null
null
null
UTF-8
Java
false
false
406
java
package com.google.android.gms.ads.internal.overlay; import android.app.Activity; import android.widget.RelativeLayout; import com.google.android.gms.internal.zzjp; public class zzr implements zzm { public zzl zza(Activity activity, zzjp com_google_android_gms_internal_zzjp, RelativeLayout relativeLayout) { return new zzq(); } public boolean zzfM() { return false; } }
[ "sinzua@gmail.com" ]
sinzua@gmail.com
399e07b2526f7222ae167a95d7f38b6944cbeaac
ce0a5947851c94f9ca674a32010624e0d50d31ac
/src/org/cakelab/jdoxml/api/IException.java
36c8a68ee47e981a459cf126ed9ca8661647e1f7
[]
no_license
homacs/org.cakelab.jdoxml
fbd1413c134a6688f7baa139e32d45e11cfcb3e4
6f1db859d1d1461423db837172f5b1af441fe77b
refs/heads/master
2023-04-03T22:58:54.421098
2023-03-23T18:58:26
2023-03-23T18:58:26
203,998,179
0
0
null
null
null
null
UTF-8
Java
false
false
156
java
package org.cakelab.jdoxml.api; /** The public interface to a Java/IDL exception in the object model. */ public interface IException extends ICompound { }
[ "homac@strace.org" ]
homac@strace.org
81045fe7ccfe1ea5213dff873a4207e1bdd4cd92
ead0566033ceff467b7535e258ef80b4cf21d4df
/servlet/spring-boot/java/oauth2/resource-server/src/main/java/sample/OAuth2ResourceServerSecurityConfiguration.java
09676aa0827931e1e028bd4bbd693c31f0fc387e
[]
no_license
liulong1010/spring-security-samples
736f9749223b6ea11ba3f55ed427e83fe0a22176
8e95415ed8bc85aa8747592e3c1940c5a4a8f52b
refs/heads/master
2022-11-30T02:06:31.367626
2020-07-31T19:27:55
2020-07-31T19:30:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,141
java
/* * Copyright 2002-2019 the original author or 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package sample; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer; import org.springframework.security.oauth2.jwt.JwtDecoder; import org.springframework.security.oauth2.jwt.NimbusJwtDecoder; /** * OAuth resource configuration. * * @author Josh Cummings */ @EnableWebSecurity public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfigurerAdapter { @Value("${spring.security.oauth2.resourceserver.jwt.jwk-set-uri}") String jwkSetUri; @Override protected void configure(HttpSecurity http) throws Exception { // @formatter:off http .authorizeRequests((requests) -> requests .antMatchers(HttpMethod.GET, "/message/**").hasAuthority("SCOPE_message:read") .antMatchers(HttpMethod.POST, "/message/**").hasAuthority("SCOPE_message:write") .anyRequest().authenticated() ) .oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt); // @formatter:on } @Bean JwtDecoder jwtDecoder() { return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri).build(); } }
[ "rwinch@users.noreply.github.com" ]
rwinch@users.noreply.github.com
3fa0b76da73655bc2ed1b59172fb77ebe708a2eb
9153325f818aafb102d0a53b126beae8df0a1bb8
/src/main/java/com/gongjun/changsha/excel2png.java
5942d4bf797b787eafe5870910a33d0c625eee1f
[]
no_license
gongaustin/test
b49ca8954faa5ca8732d33da4d6f775ff3d0140c
b5e47f53e74b9b49d834b2d8969e5dc164c80789
refs/heads/master
2023-06-22T04:01:25.678815
2022-05-11T09:28:36
2022-05-11T09:28:36
196,309,636
0
0
null
2023-06-14T22:44:59
2019-07-11T02:58:13
Java
UTF-8
Java
false
false
1,001
java
package com.gongjun.changsha; import com.spire.xls.Workbook; import com.spire.xls.Worksheet; import org.junit.Test; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; /** * @Description: Excel生成png图片 * @Author: GongJun * @Date: Created in 14:38 2020/9/23 */ public class excel2png { @Test public void toPng() throws Exception { //加载Excel文档 Workbook workbook = new Workbook(); workbook.loadFromFile("D:\\1.xlsx"); Worksheet ws = workbook.getActiveSheet(); BufferedImage bufferedImage = ws.toImage(1, 1, ws.getLastRow(), ws.getLastColumn()); ImageIO.write(bufferedImage, "PNG", new File("D:\\1.png")); //将Excel文档第一个工作表中的第一个图表保存为图片 // Worksheet ws = workbook.getWorksheets().get(0); // BufferedImage image= workbook.saveChartAsImage(ws,0); // ImageIO.write(image,"png", new File("D:\\1.png")); } }
[ "28402674@qq.com" ]
28402674@qq.com
beb06c0dfd5db5145b3c45128aa279c8231be6a8
f80b63052b690ef6c145727c4c0a46b94ec33394
/ylc/src/com/nangua/xiaomanjflc/widget/VerticalViewPager.java
f7854175d205187f02464b2678632a0e3f89619d
[]
no_license
dougisadog/xiaoman
dbd31ff957ec4e90606ed395c57275561d9a9b40
5dc8bb23f4680eaeded0fd6421c39aeb62ca1eee
refs/heads/master
2020-12-11T07:19:04.544002
2017-09-06T09:18:58
2017-09-06T09:18:59
68,798,640
0
0
null
null
null
null
UTF-8
Java
false
false
2,853
java
package com.nangua.xiaomanjflc.widget; import com.nangua.xiaomanjflc.error.DebugPrinter; import android.content.Context; import android.graphics.PointF; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; /** * Uses a combination of a PageTransformer and swapping X & Y coordinates * of touch events to create the illusion of a vertically scrolling ViewPager. * * Requires API 11+ * */ public class VerticalViewPager extends ViewPager { public VerticalViewPager(Context context) { super(context); init(); } public VerticalViewPager(Context context, AttributeSet attrs) { super(context, attrs); init(); } protected void init() { // The majority of the magic happens here setPageTransformer(true, new VerticalPageTransformer()); // The easiest way to get rid of the overscroll drawing that happens on the left and right setOverScrollMode(OVER_SCROLL_NEVER); } private class VerticalPageTransformer implements ViewPager.PageTransformer { @Override public void transformPage(View view, float position) { if (position < -1) { // [-Infinity,-1) // This page is way off-screen to the left. view.setAlpha(0); } else if (position <= 1) { // [-1,1] view.setAlpha(1); // Counteract the default slide transition view.setTranslationX(view.getWidth() * -position); //set Y position to swipe in from top float yPosition = position * view.getHeight(); view.setTranslationY(yPosition); } else { // (1,+Infinity] // This page is way off-screen to the right. view.setAlpha(0); } } } /** * Swaps the X and Y coordinates of your touch event. */ private MotionEvent swapXY(MotionEvent ev) { float width = getWidth(); float height = getHeight(); float newX = (ev.getY() / height) * width; float newY = (ev.getX() / width) * height; ev.setLocation(newX, newY); return ev; } @Override public boolean onInterceptTouchEvent(MotionEvent ev){ boolean intercepted = super.onInterceptTouchEvent(swapXY(ev)); swapXY(ev); // return touch coordinates to original reference frame for any child views return intercepted; } @Override public boolean onTouchEvent(MotionEvent ev) { // DebugPrinter.d(ev.getAction() + "vvp"); return super.onTouchEvent(swapXY(ev)); } }
[ "wzc2542736@163.com" ]
wzc2542736@163.com
ed9f124559c0e6392908be5040c1df8ec8b145f0
f1f7ca2c57431b064c7adb9689662285b23849da
/Logic/src/ida/ilp/logic/Term.java
1e32f4b0314f9d0c79194c459986a3d44b7b6609
[]
no_license
GustikS/Neurologic
95286d23c67164b58f9123d68015732e5a26a561
3b91fc3d5efc87a37f1fe039f0fad99212dd5dd5
refs/heads/master
2021-06-20T09:17:28.967573
2021-06-11T14:29:34
2021-06-11T14:29:34
34,123,440
5
3
null
null
null
null
UTF-8
Java
false
false
1,525
java
/* * Copyright (c) 2015 Ondrej Kuzelka * * 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. */ /* * Term.java * * Created on 30. listopad 2006, 16:47 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package ida.ilp.logic; /** * Terms are variables, constants, function symbols and lists. * @author Ondra */ public interface Term { /** * * @return string representation of the term */ public String name(); public String type(); }
[ "souregus@gmail.com" ]
souregus@gmail.com
d97b16edd3475b2a2b1132df28ddff7b749b4906
5142795f647bda40a8014f7ec9d7a88e32717099
/src/main/java/it/ricfed/pprocommons/config/DefaultProfileUtil.java
d14a5c917326ffbe599c1e0ee001773e68b48529
[]
no_license
ricfedel/ppro-commons
d018dce59029a469fed90e5210b80149851ed267
b8168cf7650d09ab43ebcbd28497b2d29e7577fe
refs/heads/master
2022-12-22T14:38:17.272569
2019-06-07T12:38:20
2019-06-07T12:38:20
190,741,086
0
0
null
2022-12-16T04:52:44
2019-06-07T12:38:09
Java
UTF-8
Java
false
false
1,297
java
package it.ricfed.pprocommons.config; import io.github.jhipster.config.JHipsterConstants; import org.springframework.boot.SpringApplication; import org.springframework.core.env.Environment; import java.util.*; /** * Utility class to load a Spring profile to be used as default * when there is no {@code spring.profiles.active} set in the environment or as command line argument. * If the value is not available in {@code application.yml} then {@code dev} profile will be used as default. */ public final class DefaultProfileUtil { private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default"; private DefaultProfileUtil() { } /** * Set a default to use when no profile is configured. * * @param app the Spring application. */ public static void addDefaultProfile(SpringApplication app) { Map<String, Object> defProperties = new HashMap<>(); /* * The default profile to use when no other profiles are defined * This cannot be set in the application.yml file. * See https://github.com/spring-projects/spring-boot/issues/1219 */ defProperties.put(SPRING_PROFILE_DEFAULT, JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); app.setDefaultProperties(defProperties); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
347365f65303269cbe50435bd1117023982d6c0a
5c695162da270641584c35bb2644f886e41e66bc
/application-power/src/main/java/com/power/generator/builder/AbstractCodeWriter.java
80b64cf5e8893b8cd836b68a368404de9a0a3e2d
[ "Apache-2.0" ]
permissive
WanGuChou/ApplicationPower
38bcbf472d731d8742c035afcde7b3efd48b4ddc
b317c4508e4d1ae91dca0439106ff7b6e0af661d
refs/heads/master
2020-04-14T10:35:45.061347
2019-01-01T10:58:51
2019-01-01T10:58:51
163,791,296
1
0
Apache-2.0
2019-01-02T03:46:57
2019-01-02T03:46:57
null
UTF-8
Java
false
false
2,334
java
package com.power.generator.builder; import com.power.generator.constant.PackageConfig; import com.power.generator.constant.ProjectConfig; import com.power.generator.constant.SpringBootProjectConfig; import com.power.generator.database.DbProvider; import com.power.generator.factory.DbProviderFactory; /** * Created by yu on 2016/12/10. */ public abstract class AbstractCodeWriter { /** * 数据库信息 */ private DbProvider dataBaseInfo; /** * 包配置 */ private PackageConfig packageConfig; /** * 工程配置 */ private ProjectConfig projectConfig; private SpringBootProjectConfig springBootProjectConfig; /** * */ protected ConfigBuilder config; /** * 初始化配置 */ protected void initConfig() { if (null == config) { dataBaseInfo = new DbProviderFactory().getInstance(); config = new ConfigBuilder(dataBaseInfo, packageConfig, projectConfig); } } /** * 初始化spring boot的配置 */ protected void initSpringBootConfig() { if (null == config) { dataBaseInfo = new DbProviderFactory().getInstance(); config = new ConfigBuilder(dataBaseInfo, packageConfig, springBootProjectConfig); } } public DbProvider getDataBaseInfo() { return dataBaseInfo; } public void setDataBaseInfo(DbProvider dataBaseInfo) { this.dataBaseInfo = dataBaseInfo; } public PackageConfig getPackageConfig() { return packageConfig; } public void setPackageConfig(PackageConfig packageConfig) { this.packageConfig = packageConfig; } public ProjectConfig getProjectConfig() { return projectConfig; } public void setProjectConfig(ProjectConfig projectConfig) { this.projectConfig = projectConfig; } public ConfigBuilder getConfig() { return config; } public void setConfig(ConfigBuilder config) { this.config = config; } public SpringBootProjectConfig getSpringBootProjectConfig() { return springBootProjectConfig; } public void setSpringBootProjectConfig(SpringBootProjectConfig springBootProjectConfig) { this.springBootProjectConfig = springBootProjectConfig; } }
[ "836575280@qq.com" ]
836575280@qq.com
640e7e782795429959b05e368889aca5c239fd1c
7e14a944b5e26a919d9bd286a4c7f62cf42a4ca7
/RM-EMPRESARIAL-ejb/src/main/java/com/rm/empresarial/puente/PaisPuente.java
01dcef1d943ddb3d1530c48828eda15e07a0fbc4
[]
no_license
bryan1090/RegistroPropiedad
7bcca20dbb1a67da97c85716b67d516916aee3fa
182406c840187a6cc31458f38522f717cc34e258
refs/heads/master
2022-07-07T08:06:20.251959
2020-01-02T03:02:34
2020-01-02T03:02:34
231,295,897
0
0
null
2022-06-30T20:22:05
2020-01-02T02:50:13
Java
UTF-8
Java
false
false
396
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.rm.empresarial.puente; import com.rm.empresarial.dao.PaisDao; import java.io.Serializable; /** * * @author Bryan_Mora */ public class PaisPuente extends PaisDao implements Serializable{ }
[ "42019366+bryan1090@users.noreply.github.com" ]
42019366+bryan1090@users.noreply.github.com
d0ce525cf18fe97b3a0fff40812a072d161a499a
052d648a7b0f6c249804bc026db19075d7975aed
/Entitybean/src/com/dtv/oss/domain/LdapProcessLogBean.java
0961049b2541c4abad065562e9a6021197d379bb
[]
no_license
worldup/boss
84fa357934a7a374d3d0617607391d0446e3b37d
667dc568c35c3f38b506d21375e298819e58bc33
refs/heads/master
2021-01-13T01:36:56.187120
2015-02-10T14:01:37
2015-02-10T14:01:37
30,594,799
0
1
null
null
null
null
UTF-8
Java
false
false
3,741
java
package com.dtv.oss.domain; import java.sql.Timestamp; import javax.ejb.CreateException; import javax.ejb.EntityBean; import javax.ejb.EntityContext; import javax.ejb.RemoveException; import com.dtv.oss.dto.LdapProcessLogDTO; import com.dtv.oss.util.EntityBeanAutoUpdate; public abstract class LdapProcessLogBean implements EntityBean { EntityContext entityContext; public Integer ejbCreate(Integer seqno) throws CreateException { // setSeqno(seqno); return null; } public Integer ejbCreate(LdapProcessLogDTO dto) throws CreateException { setCreateTime(dto.getCreateTime()); setEventID(dto.getEventID()); setQueueID(dto.getQueueID()); setCommandName(dto.getCommandName()); setProcessResult(dto.getProcessResult()); setDescription(dto.getDescription()); setCustomerID(dto.getCustomerID()); setAccountID(dto.getAccountID()); setServiceAccountID(dto.getServiceAccountID()); setPsID(dto.getPsID()); setDeviceID(dto.getDeviceID()); setStatus(dto.getStatus()); setDtCreate(new java.sql.Timestamp(System.currentTimeMillis())); setDtLastmod(new java.sql.Timestamp(System.currentTimeMillis())); return null; } public void ejbPostCreate(Integer seqno) throws CreateException { } public void ejbPostCreate(LdapProcessLogDTO dto) throws CreateException { } public void ejbRemove() throws RemoveException { } public abstract void setSeqno(Integer seqno); public abstract Integer getSeqno(); public abstract void setCreateTime(Timestamp createTime); public abstract Timestamp getCreateTime(); public abstract void setEventID(int eventID); public abstract int getEventID(); public abstract void setQueueID(int queueID); public abstract int getQueueID(); public abstract void setCommandName(String commandName); public abstract String getCommandName(); public abstract void setProcessResult(String processResult); public abstract String getProcessResult(); public abstract void setDescription(String description); public abstract String getDescription(); public abstract void setCustomerID(int customerID); public abstract int getCustomerID(); public abstract void setAccountID(int accountID); public abstract int getAccountID(); public abstract void setServiceAccountID(int serviceAccountID); public abstract int getServiceAccountID(); public abstract void setPsID(int psID); public abstract int getPsID(); public abstract void setDeviceID(int deviceID); public abstract int getDeviceID(); public abstract void setStatus(String status); public abstract String getStatus(); public abstract void setDtCreate(Timestamp dtCreate); public abstract Timestamp getDtCreate(); public abstract void setDtLastmod(Timestamp dtLastmod); public abstract Timestamp getDtLastmod(); public void ejbLoad() { } public void ejbStore() { } public void ejbActivate() { } public void ejbPassivate() { } public void unsetEntityContext() { this.entityContext = null; } public void setEntityContext(EntityContext entityContext) { this.entityContext = entityContext; } public int ejbUpdate(LdapProcessLogDTO dto) { /** @todo Complete this method */ if (dto.getDtLastmod() == null) { return -1; } if (!dto.getDtLastmod().equals(getDtLastmod())) { return -1; } else { try { EntityBeanAutoUpdate.update(dto, this); } catch (Exception e) { e.printStackTrace(); return -1; } setDtLastmod(new java.sql.Timestamp(System.currentTimeMillis())); return 0; } } }
[ "worldup@163.com" ]
worldup@163.com
7bc05ad688b2658156752b4aa04bfb6abd760d18
6fe2a27baca6be39e7b584e25164c729ca54d01d
/toeic-core-data/src/main/java/vn/myclass/core/data/dao/GenericDao.java
a648ef98b607e10b50e4d4b4027d2702d5364e54
[]
no_license
phunglam07082000/toieconline
f45b54ea69cd131c17178b0c5c7c9ff9af063be7
81c4d849908f2520af03ef401582e0a283deb275
refs/heads/master
2023-01-04T13:16:44.545181
2020-11-02T14:45:05
2020-11-02T14:45:05
309,396,187
0
0
null
null
null
null
UTF-8
Java
false
false
504
java
package vn.myclass.core.data.dao; import java.io.Serializable; import java.util.List; import java.util.Map; public interface GenericDao<ID extends Serializable, T> { List<T> findAll(); T update(T entity); T save(T entity); T findById(ID id); Object[] findByProperty(Map<String, Object> property, String sortExpression, String sortDirection, Integer offset, Integer limit,String whereClause); Integer delete(List<ID> ids); T findEqualUnique(String property, Object value); }
[ "you@example.com" ]
you@example.com
43c1588f8fc6f1e17ba3d1161935b7e61541c7ce
a032d50c1978edb29df28b9451cf52a2579c12e2
/examples/vertx-on-kubernetes-example/src/test/java/io/dekorate/example/VertxTest.java
f551959f380e5afc66a1eee6f485d9e58013cd03
[ "Apache-2.0" ]
permissive
iocanel/dekorate
027f74fd2dd2065231454da58786a92b0483f8d1
c4aeadb7d9d7c9875bf6b038f238bf9c775d4fc7
refs/heads/main
2023-06-09T21:19:09.437216
2021-11-17T14:14:19
2021-11-17T14:14:19
318,128,192
0
0
Apache-2.0
2020-12-03T08:40:25
2020-12-03T08:40:24
null
UTF-8
Java
false
false
1,226
java
/** * Copyright 2018 The original authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **/ package io.dekorate.example; import java.util.Optional; import org.junit.jupiter.api.Test; import io.fabric8.kubernetes.api.model.KubernetesList; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.Service; import static org.junit.jupiter.api.Assertions.assertTrue; import static io.dekorate.testing.KubernetesResources.*; class VertxTest { @Test public void shouldContainService() throws Exception { KubernetesList list = loadGenerated("kubernetes"); Optional<Service> service = findFirst(list, Service.class); assertTrue(service.isPresent()); } }
[ "iocanel@gmail.com" ]
iocanel@gmail.com