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
32de41f12862d315c75e6a534facf9f992496efe
7ef841751c77207651aebf81273fcc972396c836
/cstream/src/main/java/com/loki/cstream/stubs/SampleClass4459.java
34a6366b746b02844b4a4b079d49d711555e5a0d
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
274
java
package com.loki.cstream.stubs; public class SampleClass4459 { private SampleClass4460 sampleClass; public SampleClass4459(){ sampleClass = new SampleClass4460(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
5ac6ed5f2c26c2e02ad14d545aad1ed5c3ab5fd6
7a2c41c756e97390af3a77c86c6dc65a2f01d9f8
/src/main/java/com/googlecode/starflow/service/filter/ProcessFilter.java
0ae48dcf6e8f945b308d1311dc014ae00184443e
[]
no_license
melin/starflow
925cafe3fc5e49881fd0a5091eda3b62e9c1ca12
49f5c8fb9f84aced0352f0e8b841893de0ba6e70
refs/heads/master
2023-08-06T08:20:52.234085
2022-07-16T14:24:12
2022-07-16T14:24:12
4,428,440
23
28
null
null
null
null
UTF-8
Java
false
false
2,274
java
/* * Copyright 2010-2011 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.googlecode.starflow.service.filter; import com.googlecode.starflow.engine.event.AbstractFlowEvent; import com.googlecode.starflow.engine.event.ActivityFinishEvent; import com.googlecode.starflow.engine.event.ActivityStartEvent; import com.googlecode.starflow.engine.event.ActivityTerminalEvent; import com.googlecode.starflow.engine.event.ProcessFinishEvent; import com.googlecode.starflow.engine.event.ProcessStartEvent; import com.googlecode.starflow.engine.event.ProcessTerminalEvent; import com.googlecode.starflow.engine.model.ActivityInst; import com.googlecode.starflow.engine.model.ProcessInstance; /** * * @author libinsong1204@gmail.com * @version 1.0 */ public interface ProcessFilter { /** * 流程创建 * @param processInstance */ public void processCreate(ProcessInstance processInstance); /** * 流程开始 * @param event */ public void processStart(ProcessStartEvent event); /** * 流程运行完成 * @param event */ public void processComplete(ProcessFinishEvent event); /** * 流程终止 * @param event */ public void processTerminal(ProcessTerminalEvent event); /** * 环节创建 * @param event * @param destActInst */ public void activityCreate(AbstractFlowEvent event, ActivityInst destActInst); /** * 环节启动 * @param event * @param destActInst */ public void activityStart(ActivityStartEvent event, ActivityInst destActInst); /** * 环节终止 * @param event */ public void activityTerminal(ActivityTerminalEvent event); /** * 环节结束 * @param event */ public void activityComplete(ActivityFinishEvent event); }
[ "libinsong1204@gmail.com" ]
libinsong1204@gmail.com
b0bf570651977e630ada011267051222c9eef653
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1420_public/tests/more/src/java/module1420_public_tests_more/a/Foo1.java
81a7998efd18d42feac6fb54f50a5cc18764bba8
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,635
java
package module1420_public_tests_more.a; import java.util.zip.*; import javax.annotation.processing.*; import javax.lang.model.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.awt.datatransfer.DataFlavor * @see java.beans.beancontext.BeanContext * @see java.io.File */ @SuppressWarnings("all") public abstract class Foo1<J> extends module1420_public_tests_more.a.Foo0<J> implements module1420_public_tests_more.a.IFoo1<J> { java.rmi.Remote f0 = null; java.nio.file.FileStore f1 = null; java.sql.Array f2 = null; public J element; public static Foo1 instance; public static Foo1 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1420_public_tests_more.a.Foo0.create(input); } public String getName() { return module1420_public_tests_more.a.Foo0.getInstance().getName(); } public void setName(String string) { module1420_public_tests_more.a.Foo0.getInstance().setName(getName()); return; } public J get() { return (J)module1420_public_tests_more.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (J)element; module1420_public_tests_more.a.Foo0.getInstance().set(this.element); } public J call() throws Exception { return (J)module1420_public_tests_more.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
32a80762b2a378355f3520ada3479f80ae36d62e
ac72641cacd2d68bd2f48edfc511f483951dd9d6
/opscloud-service/src/main/java/com/baiyi/opscloud/service/kubernetes/impl/OcKubernetesTemplateServiceImpl.java
71a7c921ca223877c4a2d32eca5c2856c990592b
[]
no_license
fx247562340/opscloud-demo
6afe8220ce6187ac4cc10602db9e14374cb14251
b608455cfa5270c8c021fbb2981cb8c456957ccb
refs/heads/main
2023-05-25T03:33:22.686217
2021-06-08T03:17:32
2021-06-08T03:17:32
373,446,042
1
1
null
null
null
null
UTF-8
Java
false
false
2,290
java
package com.baiyi.opscloud.service.kubernetes.impl; import com.baiyi.opscloud.domain.DataTable; import com.baiyi.opscloud.domain.generator.opscloud.OcKubernetesTemplate; import com.baiyi.opscloud.domain.param.kubernetes.KubernetesTemplateParam; import com.baiyi.opscloud.mapper.opscloud.OcKubernetesTemplateMapper; import com.baiyi.opscloud.service.kubernetes.OcKubernetesTemplateService; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import org.springframework.stereotype.Service; import tk.mybatis.mapper.entity.Example; import javax.annotation.Resource; import java.util.List; /** * @Author baiyi * @Date 2020/6/30 10:58 上午 * @Version 1.0 */ @Service public class OcKubernetesTemplateServiceImpl implements OcKubernetesTemplateService { @Resource private OcKubernetesTemplateMapper ocKubernetesTemplateMapper; @Override public DataTable<OcKubernetesTemplate> queryOcKubernetesTemplateByParam(KubernetesTemplateParam.PageQuery pageQuery) { Page page = PageHelper.startPage(pageQuery.getPage(), pageQuery.getLength()); List<OcKubernetesTemplate> list = ocKubernetesTemplateMapper.queryKubernetesTemplateByParam(pageQuery); return new DataTable<>(list, page.getTotal()); } @Override public List<OcKubernetesTemplate> queryOcKubernetesTemplateByType(String templateType) { Example example = new Example(OcKubernetesTemplate.class); Example.Criteria criteria = example.createCriteria(); criteria.andEqualTo("templateType", templateType); return ocKubernetesTemplateMapper.selectByExample(example); } @Override public OcKubernetesTemplate queryOcKubernetesTemplateById(Integer id) { return ocKubernetesTemplateMapper.selectByPrimaryKey(id); } @Override public void addOcKubernetesTemplate(OcKubernetesTemplate ocKubernetesTemplate) { ocKubernetesTemplateMapper.insert(ocKubernetesTemplate); } @Override public void updateOcKubernetesTemplate(OcKubernetesTemplate ocKubernetesTemplate) { ocKubernetesTemplateMapper.updateByPrimaryKey(ocKubernetesTemplate); } @Override public void deleteOcKubernetesTemplateById(int id) { ocKubernetesTemplateMapper.deleteByPrimaryKey(id); } }
[ "fanxin01@longfor.com" ]
fanxin01@longfor.com
63e92d2b536d62c6eb6aa7d0707e3d89dad71540
7c20e36b535f41f86b2e21367d687ea33d0cb329
/Capricornus/src/com/gopawpaw/erp/hibernate/f/FcgMstrDAO.java
968710c481914fb26345a171a9048a13a3c64f4b
[]
no_license
fazoolmail89/gopawpaw
50c95b924039fa4da8f309e2a6b2ebe063d48159
b23ccffce768a3d58d7d71833f30b85186a50cc5
refs/heads/master
2016-09-08T02:00:37.052781
2014-05-14T11:46:18
2014-05-14T11:46:18
35,091,153
1
1
null
null
null
null
UTF-8
Java
false
false
3,974
java
package com.gopawpaw.erp.hibernate.f; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.springframework.context.ApplicationContext; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; /** * A data access object (DAO) providing persistence and search support for * FcgMstr entities. Transaction control of the save(), update() and delete() * operations can directly support Spring container-managed transactions or they * can be augmented to handle user-managed Spring transactions. Each of these * methods provides additional information for how to configure it for the * desired type of transaction control. * * @see com.gopawpaw.erp.hibernate.f.FcgMstr * @author MyEclipse Persistence Tools */ public class FcgMstrDAO extends HibernateDaoSupport { private static final Log log = LogFactory.getLog(FcgMstrDAO.class); protected void initDao() { // do nothing } public void save(FcgMstr transientInstance) { log.debug("saving FcgMstr instance"); try { getHibernateTemplate().save(transientInstance); log.debug("save successful"); } catch (RuntimeException re) { log.error("save failed", re); throw re; } } public void delete(FcgMstr persistentInstance) { log.debug("deleting FcgMstr instance"); try { getHibernateTemplate().delete(persistentInstance); log.debug("delete successful"); } catch (RuntimeException re) { log.error("delete failed", re); throw re; } } public FcgMstr findById(com.gopawpaw.erp.hibernate.f.FcgMstrId id) { log.debug("getting FcgMstr instance with id: " + id); try { FcgMstr instance = (FcgMstr) getHibernateTemplate().get( "com.gopawpaw.erp.hibernate.f.FcgMstr", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public List findByExample(FcgMstr instance) { log.debug("finding FcgMstr instance by example"); try { List results = getHibernateTemplate().findByExample(instance); log.debug("find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { log.error("find by example failed", re); throw re; } } public List findByProperty(String propertyName, Object value) { log.debug("finding FcgMstr instance with property: " + propertyName + ", value: " + value); try { String queryString = "from FcgMstr as model where model." + propertyName + "= ?"; return getHibernateTemplate().find(queryString, value); } catch (RuntimeException re) { log.error("find by property name failed", re); throw re; } } public List findAll() { log.debug("finding all FcgMstr instances"); try { String queryString = "from FcgMstr"; return getHibernateTemplate().find(queryString); } catch (RuntimeException re) { log.error("find all failed", re); throw re; } } public FcgMstr merge(FcgMstr detachedInstance) { log.debug("merging FcgMstr instance"); try { FcgMstr result = (FcgMstr) getHibernateTemplate().merge( detachedInstance); log.debug("merge successful"); return result; } catch (RuntimeException re) { log.error("merge failed", re); throw re; } } public void attachDirty(FcgMstr instance) { log.debug("attaching dirty FcgMstr instance"); try { getHibernateTemplate().saveOrUpdate(instance); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void attachClean(FcgMstr instance) { log.debug("attaching clean FcgMstr instance"); try { getHibernateTemplate().lock(instance, LockMode.NONE); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public static FcgMstrDAO getFromApplicationContext(ApplicationContext ctx) { return (FcgMstrDAO) ctx.getBean("FcgMstrDAO"); } }
[ "ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5" ]
ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5
54768f1f5487e222097194761e8d9ef6df045752
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/shopee/app/c/a.java
73c31f274d809bb8f2ce7bc0cfd2b7801faef169
[]
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
1,201
java
package com.shopee.app.c; import android.app.Activity; import android.content.Context; import android.view.View; import android.view.inputmethod.InputMethodManager; import com.shopee.app.application.ar; public class a { public static void a(View view) { InputMethodManager inputMethodManager = (InputMethodManager) ar.a().getSystemService("input_method"); if (inputMethodManager != null) { try { inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } catch (Exception unused) { inputMethodManager.toggleSoftInput(1, 2); } } } public static void b(View view) { view.requestFocus(); InputMethodManager inputMethodManager = (InputMethodManager) ar.a().getSystemService("input_method"); if (inputMethodManager != null) { inputMethodManager.showSoftInput(view, 1); } } public static void a(Context context) { if (context instanceof Activity) { View currentFocus = ((Activity) context).getCurrentFocus(); if (currentFocus != null) { a(currentFocus); } } } }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
c4c4f14e1b9001dfcfab56821e1c1c5444357942
7c1bb7f2507e856d1dd1645ec70b7e9a298daf9d
/src/main/java/com/vereinssponsoren/myapp/service/AuditEventService.java
b799079e529701adb60432f0628389ed2bf79d70
[]
no_license
hakojava/VereinsSponsoren
fbcb36736970f46228aa7229efa44170b5139da9
fb61b8a380126ea1133db118f2c56f7565bbb3cb
refs/heads/main
2023-03-02T00:42:03.598897
2021-02-08T22:03:21
2021-02-08T22:03:21
336,813,166
0
0
null
null
null
null
UTF-8
Java
false
false
2,978
java
package com.vereinssponsoren.myapp.service; import com.vereinssponsoren.myapp.config.audit.AuditEventConverter; import com.vereinssponsoren.myapp.repository.PersistenceAuditEventRepository; import io.github.jhipster.config.JHipsterProperties; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * Service for managing audit events. * <p> * This is the default implementation to support SpringBoot Actuator {@code AuditEventRepository}. */ @Service @Transactional public class AuditEventService { private final Logger log = LoggerFactory.getLogger(AuditEventService.class); private final JHipsterProperties jHipsterProperties; private final PersistenceAuditEventRepository persistenceAuditEventRepository; private final AuditEventConverter auditEventConverter; public AuditEventService( PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter, JHipsterProperties jhipsterProperties ) { this.persistenceAuditEventRepository = persistenceAuditEventRepository; this.auditEventConverter = auditEventConverter; this.jHipsterProperties = jhipsterProperties; } /** * Old audit events should be automatically deleted after 30 days. * * This is scheduled to get fired at 12:00 (am). */ @Scheduled(cron = "0 0 12 * * ?") public void removeOldAuditEvents() { persistenceAuditEventRepository .findByAuditEventDateBefore(Instant.now().minus(jHipsterProperties.getAuditEvents().getRetentionPeriod(), ChronoUnit.DAYS)) .forEach( auditEvent -> { log.debug("Deleting audit data {}", auditEvent); persistenceAuditEventRepository.delete(auditEvent); } ); } @Transactional(readOnly = true) public Page<AuditEvent> findAll(Pageable pageable) { return persistenceAuditEventRepository.findAll(pageable).map(auditEventConverter::convertToAuditEvent); } @Transactional(readOnly = true) public Page<AuditEvent> findByDates(Instant fromDate, Instant toDate, Pageable pageable) { return persistenceAuditEventRepository .findAllByAuditEventDateBetween(fromDate, toDate, pageable) .map(auditEventConverter::convertToAuditEvent); } @Transactional(readOnly = true) public Optional<AuditEvent> find(Long id) { return persistenceAuditEventRepository.findById(id).map(auditEventConverter::convertToAuditEvent); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e4b5f97262ff25e8cc4c9e871c70d0b9476c75f0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_b3a495620423c90b037393fafcc09c551db904af/InitRank/2_b3a495620423c90b037393fafcc09c551db904af_InitRank_t.java
0d963fe98aa192229197ed7e07040f314d7fb3ec
[]
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
5,749
java
package v2; import japa.parser.JavaParser; import japa.parser.ParseException; import japa.parser.ast.CompilationUnit; import japa.parser.ast.ImportDeclaration; import japa.parser.ast.PackageDeclaration; import japa.parser.ast.body.TypeDeclaration; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.filecache.DistributedCache; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; import org.apache.hadoop.util.GenericOptionsParser; import a2.Lookup; public class InitRank extends Configured implements Tool{ public static class Map extends Mapper<Text, Text, Text, CitationAggregator> { Text name = new Text(); CitationAggregator agg = new CitationAggregator(); public static enum MyCounter{ BAD_PARSE, NO_PACKAGE, WILD_CARD_IMPORTS, NO_IMPORTS, USEFUL, TOTAL }; @Override public void map(Text key, Text value, Context context) throws IOException, InterruptedException { CompilationUnit unit =null; ByteArrayInputStream b = null; context.getCounter(MyCounter.TOTAL).increment(1); try { b = new ByteArrayInputStream(value.toString().getBytes("UTF-8")); unit = JavaParser.parse(b); PackageDeclaration dec = unit.getPackage(); List<TypeDeclaration> types = unit.getTypes(); List<ImportDeclaration> imports = unit.getImports(); if(types!=null&&types.size()>0){ name.set(dec.getName().toString()+"."+types.get(0).getName()); if(imports != null){ for(ImportDeclaration declaration: imports){ String decName = declaration.getName().toString(); if(decName.contains("*")){ context.getCounter(MyCounter.WILD_CARD_IMPORTS).increment(1); }else{ agg.setCiter(Integer.parseInt(key.toString())); agg.setOwner(-1); context.write(new Text(decName), agg); } } }else{ context.getCounter(MyCounter.NO_IMPORTS).increment(1); } context.getCounter(MyCounter.USEFUL).increment(1); agg.setCiter(-1); agg.setOwner(Integer.parseInt(key.toString())); context.write(name, agg); }else{ context.getCounter(MyCounter.NO_PACKAGE).increment(1); } } catch (ParseException e) { context.getCounter(MyCounter.BAD_PARSE).increment(1); }catch (NullPointerException e){ context.getCounter(MyCounter.NO_PACKAGE).increment(1); }catch (Error e){ context.getCounter(MyCounter.BAD_PARSE).increment(1); } } @Override public void run (Context context) throws IOException, InterruptedException { setup(context); while (context.nextKeyValue()) { map(context.getCurrentKey(), context.getCurrentValue(), context); } cleanup(context); } } public static class Reduce extends Reducer<Text, CitationAggregator, Text, CitationAggregator> { private HashMap<Integer,Integer> map = Lookup.get(); public void reduce(Text key, Iterable<CitationAggregator> values, Context context) throws IOException, InterruptedException { ArrayList<CitationAggregator> citers = new ArrayList<CitationAggregator>(); int owner = -1; int count = 0; for(CitationAggregator agg: values){ if(agg.getOwner()!=-1 && (owner == -1 || map.get(agg.getOwner())>count)){ owner=agg.getOwner(); count=map.get(owner); } if(agg.getCiter()!=-1){ citers.add(agg); } } for(CitationAggregator agg: citers){ if(agg.getCiter()!=owner){ agg.setOwner(owner); if(agg.getCiter()!=-1) context.write(key,agg); } } CitationAggregator ret = new CitationAggregator(); ret.setCiter(owner); ret.setOwner(-1); context.write(key,ret); } } @Override public int run(String[] args) throws Exception { Job job = new Job(); Configuration conf = job.getConfiguration(); FileSystem fs = FileSystem.get(conf); FileStatus[] jarFiles = fs.listStatus(new Path("/libs")); for (FileStatus status : jarFiles) { Path disqualified = new Path(status.getPath().toUri().getPath()); DistributedCache.addFileToClassPath(disqualified, conf, fs); } job.setOutputKeyClass(Text.class); job.setOutputValueClass(CitationAggregator.class); job.setMapperClass(Map.class); job.setReducerClass(Reduce.class); job.setInputFormatClass(SequenceFileInputFormat.class); job.setOutputFormatClass(SequenceFileOutputFormat.class); FileInputFormat.setInputPaths(job, new Path(args[0])); FileOutputFormat.setOutputPath(job, new Path(args[1])); job.setJarByClass(InitRank.class); job.waitForCompletion(true); return 0; } public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs(); ToolRunner.run(new InitRank(), otherArgs); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c89eb7bff00f9726b04503c6fa921e48a2a3c46d
09a8689816547852cec71944cacbda85c1fc2f11
/file-server-representation-impl/src/main/java/org/cyk/system/file/server/representation/impl/FileRepresentationImpl.java
7bc49434647764b5b67016c828f945ac0acf019c
[]
no_license
devlopper/org.cyk.system.file.server
1f6b6e464f02fa21580c59cc095669684d403a1c
414721e8c08deb121a3ce9aedfb8e9db1ef18d9f
refs/heads/master
2022-02-09T09:28:05.050964
2021-04-11T13:56:44
2021-04-11T13:56:44
180,776,404
0
0
null
2022-01-21T23:49:38
2019-04-11T11:18:51
Java
UTF-8
Java
false
false
4,681
java
package org.cyk.system.file.server.representation.impl; import java.io.Serializable; import java.net.URI; import java.util.List; import javax.enterprise.context.ApplicationScoped; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder; import javax.ws.rs.core.Response.Status; import org.apache.commons.io.IOUtils; import org.cyk.system.file.server.business.api.FileBusiness; import org.cyk.system.file.server.business.api.FileBytesBusiness; import org.cyk.system.file.server.persistence.api.query.FileQuerier; import org.cyk.system.file.server.persistence.entities.File; import org.cyk.system.file.server.persistence.entities.FileBytes; import org.cyk.system.file.server.representation.api.FileRepresentation; import org.cyk.system.file.server.representation.entities.FileDto; import org.cyk.utility.__kernel__.collection.CollectionHelper; import org.cyk.utility.__kernel__.constant.ConstantString; import org.cyk.utility.__kernel__.file.FileHelper; import org.cyk.utility.__kernel__.number.NumberHelper; import org.cyk.utility.__kernel__.persistence.query.QueryExecutorArguments; import org.cyk.utility.__kernel__.representation.Arguments; import org.cyk.utility.__kernel__.representation.EntityReader; import org.cyk.utility.__kernel__.string.StringHelper; import org.cyk.utility.__kernel__.string.Strings; import org.cyk.utility.number.Intervals; import org.cyk.utility.server.representation.AbstractRepresentationEntityImpl; @ApplicationScoped public class FileRepresentationImpl extends AbstractRepresentationEntityImpl<FileDto> implements FileRepresentation,Serializable { private static final long serialVersionUID = 1L; @Override public Response createFromDirectories(List<String> directories,/*List<String> mimeTypeTypes,List<String> mimeTypeSubTypes,List<String> mimeTypes,*/List<String> extensions ,List<String> sizes,Integer batchSize,Integer count) { Intervals intervals = null; if(CollectionHelper.isNotEmpty(sizes)) { intervals = __inject__(Intervals.class); for(String index : sizes) { String[] extremities = index.split(";"); if(extremities.length == 2) { intervals.add(NumberHelper.getInteger(extremities[0]), NumberHelper.getInteger(extremities[1])); } } } __inject__(FileBusiness.class).createFromDirectories(__inject__(Strings.class).add(directories),null,null,null ,__inject__(Strings.class).add(extensions),intervals,batchSize,count == null || count == 0 ? null : count); return Response.ok("Files has been created from directories").build(); } @Override public Response getManyByGlobalFilter(Boolean isPageable, Long from, Long count, String fields,String globalFilter,Boolean loggableAsInfo) { Arguments arguments = new Arguments().setRepresentationEntityClass(FileDto.class); arguments.setQueryExecutorArguments(new QueryExecutorArguments.Dto().setQueryIdentifier(FileQuerier.QUERY_IDENTIFIER_READ_VIEW_01) .addFilterField(File.FIELD_NAME, globalFilter) .setFirstTupleIndex(NumberHelper.getInteger(from)) .setNumberOfTuples(NumberHelper.getInteger(count)) ).setCountable(Boolean.TRUE).setLoggableAsInfo(loggableAsInfo); return EntityReader.getInstance().read(arguments); //return getMany(null,isPageable, from, count, fields, new Filter.Dto().setValue(globalFilter)); } @Override public Response download(String identifier,String isInline) { File file = __inject__(FileBusiness.class).findBySystemIdentifier(identifier); if(file == null) return Response.status(Status.NOT_FOUND).build(); byte[] bytes = null; if(StringHelper.isBlank(file.getUniformResourceLocator())) { FileBytes fileBytes = __inject__(FileBytesBusiness.class).findByFile(file); bytes = fileBytes.getBytes(); }else { try { URI uri = new URI(file.getUniformResourceLocator()); bytes = IOUtils.toByteArray(uri.toURL()); } catch (Exception exception) { return Response.status(Status.INTERNAL_SERVER_ERROR).entity(exception.toString()).build(); } } ResponseBuilder response = Response.ok(bytes); response.header(HttpHeaders.CONTENT_TYPE, file.getMimeType()); String name = FileHelper.concatenateNameAndExtension(file.getName(), file.getExtension()); response.header(HttpHeaders.CONTENT_DISPOSITION, (Boolean.parseBoolean(isInline) ? ConstantString.INLINE : ConstantString.ATTACHMENT)+"; "+ConstantString.FILENAME +"="+name); Long size = file.getSize(); if(size!=null && size > 0) response.header(HttpHeaders.CONTENT_LENGTH, size); return response.build(); } }
[ "kycdev@gmail.com" ]
kycdev@gmail.com
b7f5fac8ff7c9018f2f4f3c82ccd253aa5899f4f
b52fa223f54b51cc271e1cbfc4c28aa76e734718
/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/JobVertexBackPressureHandlerTest.java
db0715a2b393a8901f0e0325aef9d0167626c68e
[ "ISC", "Apache-2.0", "BSD-3-Clause", "OFL-1.1" ]
permissive
itharavi/flink
1d0b7e711df93d3a13eae42da71a08dc45aaf71f
f0f9343a35ff21017e2406614b34a9b1f2712330
refs/heads/master
2023-08-03T02:53:12.278756
2020-01-08T05:58:54
2020-01-10T15:51:31
233,090,272
3
1
Apache-2.0
2023-07-23T02:28:35
2020-01-10T16:47:58
null
UTF-8
Java
false
false
6,442
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.flink.runtime.rest.handler.job; import org.apache.flink.api.common.JobID; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.jobgraph.JobVertexID; import org.apache.flink.runtime.rest.handler.HandlerRequest; import org.apache.flink.runtime.rest.handler.legacy.backpressure.OperatorBackPressureStats; import org.apache.flink.runtime.rest.handler.legacy.backpressure.OperatorBackPressureStatsResponse; import org.apache.flink.runtime.rest.messages.EmptyRequestBody; import org.apache.flink.runtime.rest.messages.JobIDPathParameter; import org.apache.flink.runtime.rest.messages.JobVertexBackPressureHeaders; import org.apache.flink.runtime.rest.messages.JobVertexBackPressureInfo; import org.apache.flink.runtime.rest.messages.JobVertexBackPressureInfo.VertexBackPressureStatus; import org.apache.flink.runtime.rest.messages.JobVertexIdPathParameter; import org.apache.flink.runtime.rest.messages.JobVertexMessageParameters; import org.apache.flink.runtime.webmonitor.TestingRestfulGateway; import org.junit.Before; import org.junit.Test; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; import static org.apache.flink.runtime.rest.messages.JobVertexBackPressureInfo.VertexBackPressureLevel.HIGH; import static org.apache.flink.runtime.rest.messages.JobVertexBackPressureInfo.VertexBackPressureLevel.LOW; import static org.apache.flink.runtime.rest.messages.JobVertexBackPressureInfo.VertexBackPressureLevel.OK; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; /** * Tests for {@link JobVertexBackPressureHandler}. */ public class JobVertexBackPressureHandlerTest { /** * Job ID for which {@link OperatorBackPressureStats} exist. */ private static final JobID TEST_JOB_ID_BACK_PRESSURE_STATS_AVAILABLE = new JobID(); /** * Job ID for which {@link OperatorBackPressureStats} are not available. */ private static final JobID TEST_JOB_ID_BACK_PRESSURE_STATS_ABSENT = new JobID(); private TestingRestfulGateway restfulGateway; private JobVertexBackPressureHandler jobVertexBackPressureHandler; @Before public void setUp() { restfulGateway = new TestingRestfulGateway.Builder().setRequestOperatorBackPressureStatsFunction( (jobId, jobVertexId) -> { if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_AVAILABLE)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(new OperatorBackPressureStats( 4711, Integer.MAX_VALUE, new double[]{1.0, 0.5, 0.1} ))); } else if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_ABSENT)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(null)); } else { throw new AssertionError(); } } ).build(); jobVertexBackPressureHandler = new JobVertexBackPressureHandler( () -> CompletableFuture.completedFuture(restfulGateway), Time.seconds(10), Collections.emptyMap(), JobVertexBackPressureHeaders.getInstance() ); } @Test public void testGetBackPressure() throws Exception { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, TEST_JOB_ID_BACK_PRESSURE_STATS_AVAILABLE.toString()); pathParameters.put(JobVertexIdPathParameter.KEY, new JobVertexID().toString()); final HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request = new HandlerRequest<>( EmptyRequestBody.getInstance(), new JobVertexMessageParameters(), pathParameters, Collections.emptyMap()); final CompletableFuture<JobVertexBackPressureInfo> jobVertexBackPressureInfoCompletableFuture = jobVertexBackPressureHandler.handleRequest(request, restfulGateway); final JobVertexBackPressureInfo jobVertexBackPressureInfo = jobVertexBackPressureInfoCompletableFuture.get(); assertThat(jobVertexBackPressureInfo.getStatus(), equalTo(VertexBackPressureStatus.OK)); assertThat(jobVertexBackPressureInfo.getBackpressureLevel(), equalTo(HIGH)); assertThat(jobVertexBackPressureInfo.getSubtasks() .stream() .map(JobVertexBackPressureInfo.SubtaskBackPressureInfo::getRatio) .collect(Collectors.toList()), contains(1.0, 0.5, 0.1)); assertThat(jobVertexBackPressureInfo.getSubtasks() .stream() .map(JobVertexBackPressureInfo.SubtaskBackPressureInfo::getBackpressureLevel) .collect(Collectors.toList()), contains(HIGH, LOW, OK)); assertThat(jobVertexBackPressureInfo.getSubtasks() .stream() .map(JobVertexBackPressureInfo.SubtaskBackPressureInfo::getSubtask) .collect(Collectors.toList()), contains(0, 1, 2)); } @Test public void testAbsentBackPressure() throws Exception { final Map<String, String> pathParameters = new HashMap<>(); pathParameters.put(JobIDPathParameter.KEY, TEST_JOB_ID_BACK_PRESSURE_STATS_ABSENT.toString()); pathParameters.put(JobVertexIdPathParameter.KEY, new JobVertexID().toString()); final HandlerRequest<EmptyRequestBody, JobVertexMessageParameters> request = new HandlerRequest<>( EmptyRequestBody.getInstance(), new JobVertexMessageParameters(), pathParameters, Collections.emptyMap()); final CompletableFuture<JobVertexBackPressureInfo> jobVertexBackPressureInfoCompletableFuture = jobVertexBackPressureHandler.handleRequest(request, restfulGateway); final JobVertexBackPressureInfo jobVertexBackPressureInfo = jobVertexBackPressureInfoCompletableFuture.get(); assertThat(jobVertexBackPressureInfo.getStatus(), equalTo(VertexBackPressureStatus.DEPRECATED)); } }
[ "trohrmann@apache.org" ]
trohrmann@apache.org
04aa50fd0d2d93c50841821309c2b519ee6fcc9b
4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d
/src/main/java/com/alipay/api/response/AlipayAcquireCreateandpayResponse.java
1d5cce4189d6ef89638a328a0360e14563b9ec17
[ "Apache-2.0" ]
permissive
weizai118/payment-alipay
042898e172ce7f1162a69c1dc445e69e53a1899c
e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1
refs/heads/master
2020-04-05T06:29:57.113650
2018-11-06T11:03:05
2018-11-06T11:03:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,396
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.acquire.createandpay response. * * @author auto create * @since 1.0, 2018-08-24 17:34:55 */ public class AlipayAcquireCreateandpayResponse extends AlipayResponse { private static final long serialVersionUID = 4754928525878159587L; /** * 买家支付宝账号,可以为email或者手机号。对部分信息进行了隐藏。 */ @ApiField("buyer_logon_id") private String buyerLogonId; /** * 买家支付宝账号对应的支付宝唯一用户号。 以2088开头的纯16位数字。 */ @ApiField("buyer_user_id") private String buyerUserId; /** * 对返回响应码进行原因说明,请参见“10.2 业务错误码”。 当result_code响应码为ORDER_SUCCESS_PAY_SUCCESS时,不返回该参数。 */ @ApiField("detail_error_code") private String detailErrorCode; /** * 对详细错误码进行文字说明。 当result_code响应码为ORDER_SUCCESS_PAY_SUCCESS时,不返回该参数。 */ @ApiField("detail_error_des") private String detailErrorDes; /** * 支付后返回的其他信息,如预付卡金额,key值mcard_fee,以Json格式返回。 */ @ApiField("extend_info") private String extendInfo; /** * 7085502131376415 */ @ApiField("out_trade_no") private String outTradeNo; /** * 下单并支付处理结果响应码,请参见“10.1 业务响应码”。 */ @ApiField("result_code") private String resultCode; /** * 该交易在支付宝系统中的交易流水号。 最短16位,最长64位。 */ @ApiField("trade_no") private String tradeNo; /** * Sets buyer logon id. * * @param buyerLogonId the buyer logon id */ public void setBuyerLogonId(String buyerLogonId) { this.buyerLogonId = buyerLogonId; } /** * Gets buyer logon id. * * @return the buyer logon id */ public String getBuyerLogonId( ) { return this.buyerLogonId; } /** * Sets buyer user id. * * @param buyerUserId the buyer user id */ public void setBuyerUserId(String buyerUserId) { this.buyerUserId = buyerUserId; } /** * Gets buyer user id. * * @return the buyer user id */ public String getBuyerUserId( ) { return this.buyerUserId; } /** * Sets detail error code. * * @param detailErrorCode the detail error code */ public void setDetailErrorCode(String detailErrorCode) { this.detailErrorCode = detailErrorCode; } /** * Gets detail error code. * * @return the detail error code */ public String getDetailErrorCode( ) { return this.detailErrorCode; } /** * Sets detail error des. * * @param detailErrorDes the detail error des */ public void setDetailErrorDes(String detailErrorDes) { this.detailErrorDes = detailErrorDes; } /** * Gets detail error des. * * @return the detail error des */ public String getDetailErrorDes( ) { return this.detailErrorDes; } /** * Sets extend info. * * @param extendInfo the extend info */ public void setExtendInfo(String extendInfo) { this.extendInfo = extendInfo; } /** * Gets extend info. * * @return the extend info */ public String getExtendInfo( ) { return this.extendInfo; } /** * Sets out trade no. * * @param outTradeNo the out trade no */ public void setOutTradeNo(String outTradeNo) { this.outTradeNo = outTradeNo; } /** * Gets out trade no. * * @return the out trade no */ public String getOutTradeNo( ) { return this.outTradeNo; } /** * Sets result code. * * @param resultCode the result code */ public void setResultCode(String resultCode) { this.resultCode = resultCode; } /** * Gets result code. * * @return the result code */ public String getResultCode( ) { return this.resultCode; } /** * Sets trade no. * * @param tradeNo the trade no */ public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } /** * Gets trade no. * * @return the trade no */ public String getTradeNo( ) { return this.tradeNo; } }
[ "hanley@thlws.com" ]
hanley@thlws.com
f3bdd50491b22c9e5dc441064d602eb1b750c8d8
6e2e383a00778d826c451a4d9274fc49e0cff41c
/hackerrank/src/Leecode/Prob_986.java
df4c8edfcf52503e443d4ec917cfa5ce7382c50e
[]
no_license
kenvifire/AlgorithmPractice
d875df9d13a76a02bce9ce0b90a8fad5ba90f832
e16315ca2ad0476f65f087f608cc9424710e0812
refs/heads/master
2022-12-17T23:45:37.784637
2020-09-22T14:45:46
2020-09-22T14:45:46
58,105,208
0
0
null
null
null
null
UTF-8
Java
false
false
1,739
java
package Leecode; import lib.Interval; import utils.AssertUtils; import utils.IntervalUtils; import java.util.ArrayList; import java.util.List; public class Prob_986 { public Interval[] intervalIntersection(Interval[] A, Interval[] B) { List<Interval> temp = new ArrayList<>(); int a = 0, b = 0; while (a < A.length && b < B.length) { Interval intelA = A[a]; Interval intelB = B[b]; Interval intersect = getIntersect(intelA, intelB); if(intersect == null) { if(intelA.end < intelB.start) { a++; } else { b++; } } else { temp.add(intersect); if(intelA.end < intelB.end) { a++; } else if (intelB.end < intelA.end){ b++; } else { a++; b++; } } } Interval[] result = new Interval[temp.size()]; temp.toArray(result); return result; } private Interval getIntersect(Interval A, Interval B) { int start = Math.max(A.start, B.start); int end = Math.min(A.end, B.end); if(start <= end) return new Interval(start, end); return null; } public static void main(String[] args) { Prob_986 prob = new Prob_986(); AssertUtils.equals("[[1,2],[5,5],[8,10],[15,23],[24,24],[25,25]]", IntervalUtils.toString(prob.intervalIntersection(IntervalUtils.fromString("[[0,2],[5,10],[13,23],[24,25]]"), IntervalUtils.fromString("[[1,5],[8,12],[15,24],[25,26]]")))); } }
[ "mrwhite@163.com" ]
mrwhite@163.com
62cd119f6b04eb18b8db778abd918207cbbebac5
ef7c846fd866bbc748a2e8719358c55b73f6fc96
/library/weiui/src/main/java/vip/kuaifan/weiui/extend/view/loading/spinkit/style/Circle.java
6c8b403a1eb72df07774837cf4dc86a9d8f88827
[ "MIT" ]
permissive
shaibaoj/weiui
9e876fa3797537faecccca74a0c9206dba67e444
131a8e3a6ecad245f421f039d2bedc8a0362879d
refs/heads/master
2020-03-17T22:45:52.855193
2018-07-02T01:56:51
2018-07-02T01:56:51
134,017,696
0
0
null
2018-07-02T01:56:52
2018-05-19T01:01:44
Java
UTF-8
Java
false
false
1,404
java
package vip.kuaifan.weiui.extend.view.loading.spinkit.style; import android.animation.ValueAnimator; import android.os.Build; import vip.kuaifan.weiui.extend.view.loading.spinkit.animation.SpriteAnimatorBuilder; import vip.kuaifan.weiui.extend.view.loading.spinkit.sprite.CircleSprite; import vip.kuaifan.weiui.extend.view.loading.spinkit.sprite.CircleLayoutContainer; import vip.kuaifan.weiui.extend.view.loading.spinkit.sprite.Sprite; /** * Created by ybq. */ public class Circle extends CircleLayoutContainer { @Override public Sprite[] onCreateChild() { Dot[] dots = new Dot[12]; for (int i = 0; i < dots.length; i++) { dots[i] = new Dot(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { dots[i].setAnimationDelay(1200 / 12 * i); } else { dots[i].setAnimationDelay(1200 / 12 * i + -1200); } } return dots; } private class Dot extends CircleSprite { Dot() { setScale(0f); } @Override public ValueAnimator onCreateAnimation() { float fractions[] = new float[]{0f, 0.5f, 1f}; return new SpriteAnimatorBuilder(this). scale(fractions, 0f, 1f, 0f). duration(1200). easeInOut(fractions) .build(); } } }
[ "342210020@qq.com" ]
342210020@qq.com
5d7208ab3c54dfb48397eac6f81230405b25cd4c
f4dc98194091d07ee728ea9a8696f98126bc2d09
/app/src/main/java/com/gta/zssx/fun/adjustCourse/view/page/v2/ConfirmInnerFragment.java
8136024558e2b872f1cca15ae658a44c66da042f
[]
no_license
ecenllen/ZSSX_V2.0
1c58e7c24ed27c80c5952663e355f8540f37636b
02640fb16aa39d985d6832e942a3fde6eb87ca66
refs/heads/master
2021-01-16T21:14:46.649616
2017-08-14T07:45:24
2017-08-14T07:45:24
100,223,879
0
0
null
null
null
null
UTF-8
Java
false
false
3,862
java
package com.gta.zssx.fun.adjustCourse.view.page.v2; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.View; import com.chad.library.adapter.base.BaseQuickAdapter; import com.gta.zssx.fun.adjustCourse.model.bean.ApplyConfirmBean; import com.gta.zssx.fun.adjustCourse.presenter.ConfirmInnerPresenter; import com.gta.zssx.fun.adjustCourse.view.ConfirmInnerView; import com.gta.zssx.fun.adjustCourse.view.adapter.MyConfirmAdapter; import com.gta.zssx.fun.adjustCourse.view.base.BaseRecyclerViewFragment; import com.gta.zssx.fun.adjustCourse.view.base.Constant; import com.gta.zssx.pub.util.LogUtil; import com.gta.zssx.pub.util.RxBus; /** * [Description] * <p> * [How to use] * <p> * [Tips] * * @author Created by Zhimin.Huang on 2017/3/20. * @since 1.0.0 */ public class ConfirmInnerFragment extends BaseRecyclerViewFragment <ConfirmInnerView, ConfirmInnerPresenter, ApplyConfirmBean.ListBean> implements ConfirmInnerView { public static String FRAGMENT_TYPE = "type"; //0代表我的确认列表,1代表我的审核列表 public int mType; public static final int CONFIRM = 0; public static final int AUDIT = 1; private String mStatus; @Override protected BaseQuickAdapter getRecyclerAdapter() { return new MyConfirmAdapter(mStatus); } @NonNull @Override public ConfirmInnerPresenter createPresenter() { return new ConfirmInnerPresenter(); } @Override protected void initData() { super.initData(); mStatus = getArguments().getString(MyApplyInnerFragment.STATUS); mType = getArguments().getInt(FRAGMENT_TYPE); } @Override protected void initView(View view) { super.initView(view); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); presenter.mCompositeSubscription.add(RxBus.getDefault().toObserverable(Constant.ConfirmSuccess.class) .subscribe(confirmSuccess -> { onRefresh(); }, throwable -> { LogUtil.Log(ConfirmInnerFragment.class.getSimpleName(), "确认返回刷新出错"); })); presenter.mCompositeSubscription.add(RxBus.getDefault().toObserverable(Constant.AuditSuccess.class) .subscribe(auditSuccess -> { onRefresh(); }, throwable -> { LogUtil.Log(ConfirmInnerFragment.class.getSimpleName(), "审核返回刷新出错"); })); } @Override protected void requestData() { super.requestData(); presenter.getApplyConfirm(mPage, mType, mStatus); } @Override protected void itemClick(ApplyConfirmBean.ListBean confirmBean, int position) { super.itemClick(confirmBean, position); if (mType == AUDIT) { if (mStatus.equals(Constant.AUDIT_STATUS_N)) { DetailActivity.start(mActivity, Constant.DETAIL_TYPE_AUDIT, confirmBean.getTransferApplyId(), Constant.PAGE_THREE); } else { DetailActivity.start(mActivity, Constant.DETAIL_TYPE_CHECK, confirmBean.getTransferApplyId(), Constant.PAGE_THREE); } } else { if (mStatus.equals(Constant.AUDIT_STATUS_N)) { DetailActivity.start(mActivity, Constant.DETAIL_TYPE_CONFIRM, confirmBean.getTransferApplyId(), Constant.PAGE_TOW); } else { DetailActivity.start(mActivity, Constant.DETAIL_TYPE_CHECK, confirmBean.getTransferApplyId(), Constant.PAGE_TOW); } } } @Override public void getResultData(ApplyConfirmBean confirmBean) { update(confirmBean.getList()); } }
[ "weiye.chen@gtadata.com" ]
weiye.chen@gtadata.com
a976134f86e327fb836aac47155aac7a1ef890bb
b4db8f5f994b4f0711a78cae4847459220e55a25
/src/main/java/models/EnglishDeck.java
781a66ca94c1c07b4c1b4f1364a8e0e098190618
[]
no_license
cs361-W16/Group13-2
3aa59268f6a1c2b81d9d37507e2947078acc9304
b72ca4a8cab9b29db4f2358de0b6d063d9b6dfe8
refs/heads/master
2016-08-11T14:40:08.150380
2016-02-20T08:04:50
2016-02-20T08:04:50
50,548,712
0
4
null
2016-02-20T08:04:51
2016-01-28T02:38:25
HTML
UTF-8
Java
false
false
390
java
package models; public class EnglishDeck extends Deck { public EnglishDeck(){} public void build(){ for(int i = 2; i < 15; i++){ deck.add(new Card(i,Suit.Clubs)); deck.add(new Card(i,Suit.Hearts)); deck.add(new Card(i,Suit.Diamonds)); deck.add(new Card(i,Suit.Spades)); } } }
[ "user.email" ]
user.email
0788ab2843c62d11fda0ee1a1482fd4d3cfdab18
6a922e840b33f11ab3d0f154afa0b33cff272676
/src/xlsx4j/java/org/xlsx4j/sml/CTCalculatedMember.java
f0d5a798ced92650f87d1aa917065ea176170bb6
[ "Apache-2.0" ]
permissive
baochanghong/docx4j
912fc146cb5605e6f7869c4839379a83a8b4afd8
4c83d8999c9396067dd583b82a6fc892469a3919
refs/heads/master
2021-01-12T15:30:26.971311
2016-10-20T00:44:25
2016-10-20T00:44:25
71,792,895
3
0
null
2016-10-24T13:39:57
2016-10-24T13:39:57
null
UTF-8
Java
false
false
8,104
java
/* * Copyright 2010-2013, Plutext Pty Ltd. * * This file is part of xlsx4j, a component of docx4j. docx4j is 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.xlsx4j.sml; import javax.xml.bind.Unmarshaller; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; import org.jvnet.jaxb2_commons.ppp.Child; /** * <p>Java class for CT_CalculatedMember complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="CT_CalculatedMember"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence minOccurs="0"> * &lt;element name="extLst" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_ExtensionList" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="name" use="required" type="{http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes}ST_Xstring" /> * &lt;attribute name="mdx" use="required" type="{http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes}ST_Xstring" /> * &lt;attribute name="memberName" type="{http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes}ST_Xstring" /> * &lt;attribute name="hierarchy" type="{http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes}ST_Xstring" /> * &lt;attribute name="parent" type="{http://schemas.openxmlformats.org/officeDocument/2006/sharedTypes}ST_Xstring" /> * &lt;attribute name="solveOrder" type="{http://www.w3.org/2001/XMLSchema}int" default="0" /> * &lt;attribute name="set" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CT_CalculatedMember", propOrder = { "extLst" }) public class CTCalculatedMember implements Child { protected CTExtensionList extLst; @XmlAttribute(name = "name", required = true) protected String name; @XmlAttribute(name = "mdx", required = true) protected String mdx; @XmlAttribute(name = "memberName") protected String memberName; @XmlAttribute(name = "hierarchy") protected String hierarchy; @XmlAttribute(name = "parent") protected String parent; @XmlAttribute(name = "solveOrder") protected Integer solveOrder; @XmlAttribute(name = "set") protected Boolean set; @XmlTransient private Object parentObj; /** * Gets the value of the extLst property. * * @return * possible object is * {@link CTExtensionList } * */ public CTExtensionList getExtLst() { return extLst; } /** * Sets the value of the extLst property. * * @param value * allowed object is * {@link CTExtensionList } * */ public void setExtLst(CTExtensionList value) { this.extLst = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the mdx property. * * @return * possible object is * {@link String } * */ public String getMdx() { return mdx; } /** * Sets the value of the mdx property. * * @param value * allowed object is * {@link String } * */ public void setMdx(String value) { this.mdx = value; } /** * Gets the value of the memberName property. * * @return * possible object is * {@link String } * */ public String getMemberName() { return memberName; } /** * Sets the value of the memberName property. * * @param value * allowed object is * {@link String } * */ public void setMemberName(String value) { this.memberName = value; } /** * Gets the value of the hierarchy property. * * @return * possible object is * {@link String } * */ public String getHierarchy() { return hierarchy; } /** * Sets the value of the hierarchy property. * * @param value * allowed object is * {@link String } * */ public void setHierarchy(String value) { this.hierarchy = value; } /** * Gets the value of the parent property. * * @return * possible object is * {@link String } * */ public String getParentAttr() { return parent; } /** * Sets the value of the parent property. * * @param value * allowed object is * {@link String } * */ public void setParent(String value) { this.parent = value; } /** * Gets the value of the solveOrder property. * * @return * possible object is * {@link Integer } * */ public int getSolveOrder() { if (solveOrder == null) { return 0; } else { return solveOrder; } } /** * Sets the value of the solveOrder property. * * @param value * allowed object is * {@link Integer } * */ public void setSolveOrder(Integer value) { this.solveOrder = value; } /** * Gets the value of the set property. * * @return * possible object is * {@link Boolean } * */ public boolean isSet() { if (set == null) { return false; } else { return set; } } /** * Sets the value of the set property. * * @param value * allowed object is * {@link Boolean } * */ public void setSet(Boolean value) { this.set = value; } /** * Gets the parent object in the object tree representing the unmarshalled xml document. * * @return * The parent object. */ public Object getParent() { return this.parentObj; } public void setParent(Object parent) { this.parentObj = parent; } /** * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. * * @param parent * The parent object in the object tree. * @param unmarshaller * The unmarshaller that generated the instance. */ public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { setParent(parent); } }
[ "jason@plutext.org" ]
jason@plutext.org
73e48e49b7cc10b52af98fc53a94c78340f07370
6dac76f33cfbd45bd44b74ed322dd9b6ee7cb2b4
/src/main/java/com/datangliang/app/web/rest/EnterpriseInfoResource.java
d5ef7fd4bdf275bc4e33eaf878163fe2bab4a3f4
[]
no_license
ouyangshixiong/dtl-app-mock
2ebb4755b7d03330838462918a49be099f662ec3
f90e6621411d24f7d15064801a7396bc4cb43124
refs/heads/master
2021-07-01T06:37:35.956464
2019-01-15T06:50:59
2019-01-15T06:50:59
165,581,779
0
1
null
2020-09-18T10:53:42
2019-01-14T02:25:15
Java
UTF-8
Java
false
false
5,000
java
package com.datangliang.app.web.rest; import com.codahale.metrics.annotation.Timed; import com.datangliang.app.domain.EnterpriseInfo; import com.datangliang.app.service.EnterpriseInfoService; import com.datangliang.app.web.rest.errors.BadRequestAlertException; import com.datangliang.app.web.rest.util.HeaderUtil; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Optional; /** * REST controller for managing EnterpriseInfo. */ @RestController @RequestMapping("/api") public class EnterpriseInfoResource { private final Logger log = LoggerFactory.getLogger(EnterpriseInfoResource.class); private static final String ENTITY_NAME = "enterpriseInfo"; private final EnterpriseInfoService enterpriseInfoService; public EnterpriseInfoResource(EnterpriseInfoService enterpriseInfoService) { this.enterpriseInfoService = enterpriseInfoService; } /** * POST /enterprise-infos : Create a new enterpriseInfo. * * @param enterpriseInfo the enterpriseInfo to create * @return the ResponseEntity with status 201 (Created) and with body the new enterpriseInfo, or with status 400 (Bad Request) if the enterpriseInfo has already an ID * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping("/enterprise-infos") @Timed public ResponseEntity<EnterpriseInfo> createEnterpriseInfo(@RequestBody EnterpriseInfo enterpriseInfo) throws URISyntaxException { log.debug("REST request to save EnterpriseInfo : {}", enterpriseInfo); if (enterpriseInfo.getId() != null) { throw new BadRequestAlertException("A new enterpriseInfo cannot already have an ID", ENTITY_NAME, "idexists"); } EnterpriseInfo result = enterpriseInfoService.save(enterpriseInfo); return ResponseEntity.created(new URI("/api/enterprise-infos/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); } /** * PUT /enterprise-infos : Updates an existing enterpriseInfo. * * @param enterpriseInfo the enterpriseInfo to update * @return the ResponseEntity with status 200 (OK) and with body the updated enterpriseInfo, * or with status 400 (Bad Request) if the enterpriseInfo is not valid, * or with status 500 (Internal Server Error) if the enterpriseInfo couldn't be updated * @throws URISyntaxException if the Location URI syntax is incorrect */ @PutMapping("/enterprise-infos") @Timed public ResponseEntity<EnterpriseInfo> updateEnterpriseInfo(@RequestBody EnterpriseInfo enterpriseInfo) throws URISyntaxException { log.debug("REST request to update EnterpriseInfo : {}", enterpriseInfo); if (enterpriseInfo.getId() == null) { throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); } EnterpriseInfo result = enterpriseInfoService.save(enterpriseInfo); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, enterpriseInfo.getId().toString())) .body(result); } /** * GET /enterprise-infos : get all the enterpriseInfos. * * @return the ResponseEntity with status 200 (OK) and the list of enterpriseInfos in body */ @GetMapping("/enterprise-infos") @Timed public List<EnterpriseInfo> getAllEnterpriseInfos() { log.debug("REST request to get all EnterpriseInfos"); return enterpriseInfoService.findAll(); } /** * GET /enterprise-infos/:id : get the "id" enterpriseInfo. * * @param id the id of the enterpriseInfo to retrieve * @return the ResponseEntity with status 200 (OK) and with body the enterpriseInfo, or with status 404 (Not Found) */ @GetMapping("/enterprise-infos/{id}") @Timed public ResponseEntity<EnterpriseInfo> getEnterpriseInfo(@PathVariable Long id) { log.debug("REST request to get EnterpriseInfo : {}", id); Optional<EnterpriseInfo> enterpriseInfo = enterpriseInfoService.findOne(id); return ResponseUtil.wrapOrNotFound(enterpriseInfo); } /** * DELETE /enterprise-infos/:id : delete the "id" enterpriseInfo. * * @param id the id of the enterpriseInfo to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/enterprise-infos/{id}") @Timed public ResponseEntity<Void> deleteEnterpriseInfo(@PathVariable Long id) { log.debug("REST request to delete EnterpriseInfo : {}", id); enterpriseInfoService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5cf900768b8f43c9ddef8fda403c390375726d08
157d84f8aafc76ba9ea0dbbf08ede744966b4250
/code/iaas/model/src/main/java/io/cattle/platform/core/dao/ProcessSummaryDao.java
8e343e476fef2510ba269804253a158938c61135
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
rancher/cattle
81d165a0339a41950561fe534c7529ec74203c56
82d154a53f4089fecfb9f320caad826bb4f6055f
refs/heads/v1.6
2023-08-27T20:19:31.989806
2020-05-01T18:15:55
2020-05-01T20:11:28
18,023,059
487
233
Apache-2.0
2022-01-03T18:07:33
2014-03-23T00:19:52
Java
UTF-8
Java
false
false
203
java
package io.cattle.platform.core.dao; import io.cattle.platform.core.addon.ProcessSummary; import java.util.List; public interface ProcessSummaryDao { List<ProcessSummary> getProcessSummary(); }
[ "darren@rancher.com" ]
darren@rancher.com
b11e7ae647c17656a5699c66f7299d64a17142d6
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_141/Testnull_14093.java
3684bd3914c80784a0e6c9b0882f8ec5e3cccf57
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_141; import static org.junit.Assert.*; public class Testnull_14093 { private final Productionnull_14093 production = new Productionnull_14093("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
9741886046c3e7268b0faa2d467ab7a533d51778
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_76a649e94d12c18eee86f114d4fa2ae3eaaad0b6/HomeController/2_76a649e94d12c18eee86f114d4fa2ae3eaaad0b6_HomeController_s.java
37b3d68ae5b245df5416bbc4cfdb668f90636bfc
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,411
java
/* * #%L * debox-photos * %% * Copyright (C) 2012 Debox * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ package org.debox.photo.action; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.HashMap; import java.util.Map; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.debox.photo.model.Configuration; import org.debox.photo.model.User; import org.debox.photo.server.ApplicationContext; import org.debux.webmotion.server.render.Render; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author Corentin Guy <corentin.guy@debox.fr> */ public class HomeController extends DeboxController { private static final Logger logger = LoggerFactory.getLogger(HomeController.class); public Render index() { User user = (User) SecurityUtils.getSubject().getPrincipal(); String username = "null"; if (user != null) { username = "\"" + StringEscapeUtils.escapeHtml4(user.getUsername()) + "\""; } Configuration configuration = ApplicationContext.getInstance().getConfiguration(); String title = configuration.get(Configuration.Key.TITLE); title = "\"" + StringEscapeUtils.escapeHtml4(title) + "\""; return renderView("index.jsp", "title", title, "username", username); } public Render getTemplates() { Map<String, Object> templates = new HashMap<>(); try { URL templatesDirectoryUrl = this.getClass().getClassLoader().getResource("templates"); URI templatesURI = templatesDirectoryUrl.toURI(); File templatesDirectory = new File(templatesURI); if (templatesDirectory != null && templatesDirectory.isDirectory()) { for (File child : templatesDirectory.listFiles()) { try (FileInputStream fis = new FileInputStream(child)) { String filename = StringUtils.substringBeforeLast(child.getName(), "."); String content = IOUtils.toString(fis); templates.put(filename, content); } catch (IOException ex) { logger.error("Unable to load template " + child.getAbsolutePath(), ex); } } } } catch (URISyntaxException ex) { logger.error("Unable to load templates", ex); } return renderJSON(templates); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6eae8fdc61e94db18fe5ebd00fae19ff56b28a28
fccd5805e92854fa860530b212b99695f9f2cc1c
/src/main/java/com/digitalfeonix/hydrogel/block/HydroGelBlock.java
60652d802b5d651f75b589e8c3b6f7720357f2e6
[]
no_license
Shadows-of-Fire/HydroGel
c650c38dee4538ed3b163ed87e4200a0d7fe94a8
f5a4f2a8d3b633280bb210a091b770df643ee015
refs/heads/master
2023-02-17T07:15:47.392000
2021-01-18T19:28:41
2021-01-18T19:28:41
114,837,729
1
1
null
2021-01-18T19:21:33
2017-12-20T03:17:34
Java
UTF-8
Java
false
false
1,684
java
package com.digitalfeonix.hydrogel.block; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.FlowingFluidBlock; import net.minecraft.block.ILiquidContainer; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.material.PushReaction; import net.minecraft.fluid.Fluid; import net.minecraft.fluid.FluidState; import net.minecraft.fluid.Fluids; import net.minecraft.item.BlockItemUseContext; import net.minecraft.state.IntegerProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; public class HydroGelBlock extends Block implements ILiquidContainer { public static final IntegerProperty LEVEL = FlowingFluidBlock.LEVEL; public HydroGelBlock() { super(Block.Properties.create(Material.WATER).hardnessAndResistance(1).sound(SoundType.SLIME)); } @Override protected void fillStateContainer(Builder<Block, BlockState> builder) { builder.add(LEVEL); } @Override public boolean isReplaceable(BlockState state, BlockItemUseContext ctx) { return false; } @Override public PushReaction getPushReaction(BlockState state) { return PushReaction.NORMAL; } @Override public FluidState getFluidState(BlockState p_204507_1_) { return Fluids.WATER.getDefaultState(); } @Override public boolean canContainFluid(IBlockReader worldIn, BlockPos pos, BlockState state, Fluid fluidIn) { return false; } @Override public boolean receiveFluid(IWorld worldIn, BlockPos pos, BlockState state, FluidState fluidStateIn) { return false; } }
[ "Bward7864@gmail.com" ]
Bward7864@gmail.com
6ba20c5237b6283de50c33c43d53d62cb8103416
6883c617e4439b8fa5497373f5c24152d843a1ba
/src/main/java/com/lothrazar/cyclicmagic/gui/component/GuiCheckboxTooltip.java
b013cfedc7a2dbd4dc802c39ed549b27d8a1a0f8
[ "MIT" ]
permissive
sandtechnology/Cyclic
b84c8ba00d9d3ec099bb15c24069e2289bd62844
a668cfe42db63c0c2d660d3e6abebc21ac7a50b4
refs/heads/develop
2021-08-18T00:01:12.701994
2019-12-31T05:30:04
2019-12-31T05:30:04
131,421,090
0
0
MIT
2019-06-09T10:32:57
2018-04-28T15:25:17
Java
UTF-8
Java
false
false
2,159
java
/******************************************************************************* * The MIT License (MIT) * * Copyright (C) 2014-2018 Sam Bassett (aka Lothrazar) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ package com.lothrazar.cyclicmagic.gui.component; import java.util.ArrayList; import java.util.List; import com.lothrazar.cyclicmagic.data.ITooltipButton; import com.lothrazar.cyclicmagic.util.UtilChat; import net.minecraftforge.fml.client.config.GuiCheckBox; public class GuiCheckboxTooltip extends GuiCheckBox implements ITooltipButton { public GuiCheckboxTooltip(int buttonId, int x, int y, String buttonText, boolean ch) { super(buttonId, x, y, buttonText, ch); } private List<String> tooltip = new ArrayList<String>(); @Override public List<String> getTooltips() { return tooltip; } public void setTooltips(List<String> t) { tooltip = t; } public void setTooltip(final String t) { List<String> remake = new ArrayList<String>(); remake.add(UtilChat.lang(t)); tooltip = remake; } }
[ "samson.bassett@gmail.com" ]
samson.bassett@gmail.com
9b0495de7ce387117bf74ca586d408cbbe6b82a5
4f95aee5f176e7c07fcb93636b4a849f79333800
/app/src/main/java/top/wzmyyj/zymk/view/fragment/F_1.java
6ce7575c6e5341019416886f8ee273e54cebcd14
[]
no_license
yinjunChic/ZYMK
b845ae80a75a8876e9c34f704cbb270a8e5c967f
8e4cd999393a9d8d06a7275164e6e0a73636798c
refs/heads/master
2020-03-27T00:43:41.362930
2018-08-21T09:16:17
2018-08-21T09:16:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,231
java
package top.wzmyyj.zymk.view.fragment; import android.view.View; import android.widget.FrameLayout; import android.widget.LinearLayout; import java.util.List; import butterknife.BindView; import butterknife.OnClick; import top.wzmyyj.wzm_sdk.tools.T; import top.wzmyyj.zymk.R; import top.wzmyyj.zymk.app.bean.FavorBean; import top.wzmyyj.zymk.common.utils.StatusBarUtil; import top.wzmyyj.zymk.presenter.HomePresenter; import top.wzmyyj.zymk.view.fragment.base.BaseFragment; import top.wzmyyj.zymk.view.iv.IF_1View; import top.wzmyyj.zymk.view.panel.HomeFavorPanel; import top.wzmyyj.zymk.view.panel.HomeNestedScrollPanel; /** * Created by yyj on 2018/06/28. email: 2209011667@qq.com */ public class F_1 extends BaseFragment<HomePresenter> implements IF_1View { @Override protected void initPresenter() { mPresenter = new HomePresenter(activity, this); } @Override protected int getLayoutId() { return R.layout.fragment_1; } @Override protected void initPanels() { super.initPanels(); addPanels(new HomeNestedScrollPanel(context, mPresenter)); addPanels(new HomeFavorPanel(context, mPresenter)); } @BindView(R.id.fl_panel) FrameLayout fl_panel; @OnClick(R.id.img_a) public void fff() { T.s("这是一个预留按钮>_<"); } @OnClick(R.id.img_search) public void search() { mPresenter.goSearch(); } @BindView(R.id.ll_top) LinearLayout ll_top; @BindView(R.id.v_top_0) View v0; @BindView(R.id.v_top_1) View v1; @BindView(R.id.v_top_2) View v2; @Override protected void initView() { super.initView(); StatusBarUtil.fitsStatusBarView(v0, v1, v2); fl_panel.addView(getPanelView(0)); fl_panel.addView(getPanelView(1)); getPanel(0).bingViews(ll_top); } @Override protected void initData() { super.initData(); mPresenter.loadData(); mPresenter.updateLoadFavor(); } @Override public void update(int w, Object... objs) { getPanel(0).f(w, objs); } @Override public void loadFavor(List<FavorBean> list) { getPanel(1).f(0, list); } }
[ "2209011667@qq.com" ]
2209011667@qq.com
c274066367b0c475fb2089ab7424d0870572c272
e49213f91a2d4e6e89c49fdae5dd0239c03b9240
/src/main/java/com/mynegocio/app/service/InvalidPasswordException.java
991bf7442108ef8e8c401d02f0762be0af273c5b
[]
no_license
efacu/hjisterapp
576faaeffdb706c407fe90a0eb8e5de0baa559b4
7401cd995f61ea19cc55dfeff4c40d703b00b78a
refs/heads/master
2022-12-24T02:25:34.631939
2019-09-19T19:16:44
2019-09-19T19:16:44
209,631,139
0
0
null
2022-12-16T05:05:41
2019-09-19T19:16:28
Java
UTF-8
Java
false
false
188
java
package com.mynegocio.app.service; public class InvalidPasswordException extends RuntimeException { public InvalidPasswordException() { super("Incorrect password"); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3f00ba40e6d1223894a6a27fd378b09faea80d62
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/kylin/testing/937/UserService.java
85c6c5148189bee09a6467e5faafe413b5f9cd13
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,613
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.kylin.rest.service; import java.io.IOException; import java.util.List; import org.apache.kylin.rest.security.ManagedUser; import org.springframework.security.provisioning.UserDetailsManager; public interface UserService extends UserDetailsManager { boolean isEvictCacheFlag(); void setEvictCacheFlag(boolean evictCacheFlag); List<ManagedUser> listUsers() throws IOException; List<String> listAdminUsers() throws IOException; //For performance consideration, list all users may be incomplete(eg. not load user's authorities until authorities has benn used). //So it's an extension point that can complete user's information latter. //loadUserByUsername() has guarantee that the return user is complete. void completeUserInfo(ManagedUser user); }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
c1ff51a62fd967f87e340430a45cb59e222a335e
1f4c06ca5ea137c7d4566c5f514fbc2c2b13d45d
/src/main/java/com/gotofinal/messages/api/chat/component/ComponentBuilder.java
5fbf7f3bd2e1d64fb6c855cf3205bd337eeaa522
[]
no_license
GotoFinal/MessagesAPI
68070930d43bcc0251025ba100b710a40decf55b
898086fd9e3f2fd20428befc975f5066b24ad35e
refs/heads/master
2021-01-10T16:42:17.095135
2016-02-21T08:09:35
2016-02-21T08:09:35
51,719,200
0
0
null
null
null
null
UTF-8
Java
false
false
7,641
java
/* * The MIT License (MIT) * * Copyright (c) 2016. Diorite (by Bartłomiej Mazur (aka GotoFinal)) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.gotofinal.messages.api.chat.component; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.gotofinal.messages.api.chat.ChatColor; /** * Builder class for easier building chat messages. */ public class ComponentBuilder { private final TextComponent parts = new TextComponent(""); private BaseComponent current; /** * Construct new ComponentBuilder as copy of old one. * * @param original ComponentBuilder to copy. */ protected ComponentBuilder(final ComponentBuilder original) { this.current = new TextComponent(original.current); original.parts.getExtra().stream().map(BaseComponent::duplicate).forEach(this.parts::addExtra); } /** * Construct new ComponentBuilder strating from given string ({@link TextComponent}). * * @param text first element of message. */ protected ComponentBuilder(final String text) { this.current = new TextComponent(text); } /** * Add previously edited component to other parts, and set given component as current one. * * @param component new component to edit and add. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder append(final BaseComponent component) { this.parts.addExtra(this.current); this.current = component; return this; } /** * Add previously edited component to other parts, and set given component as current one. * * @param text new component to edit and add as legacy string. {@link TextComponent#fromLegacyText(String)} * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder appendLegacy(final String text) { this.parts.addExtra(this.current); this.current = TextComponent.fromLegacyText(text); return this; } /** * Add previously edited component to other parts, and set given component as current one. * * @param text new component to edit and add as string. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder append(final String text) { this.parts.addExtra(this.current); this.current = new TextComponent(text); return this; } /** * Set color of current element to given one, may be null. * * @param color color to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder color(final ChatColor color) { this.current.setColor(color); return this; } /** * Set bold style flag of current element to given one, may be null. * * @param bold bold style flag to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder bold(final Boolean bold) { this.current.setBold(bold); return this; } /** * Set italic style flag of current element to given one, may be null. * * @param italic italic style flag to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder italic(final Boolean italic) { this.current.setItalic(italic); return this; } /** * Set underlined style flag of current element to given one, may be null. * * @param underlined underlined style flag to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder underlined(final Boolean underlined) { this.current.setUnderlined(underlined); return this; } /** * Set strikethrough style flag of current element to given one, may be null. * * @param strikethrough strikethrough style flag to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder strikethrough(final Boolean strikethrough) { this.current.setStrikethrough(strikethrough); return this; } /** * Set obfuscated style flag of current element to given one, may be null. * * @param obfuscated obfuscated style flag to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder obfuscated(final Boolean obfuscated) { this.current.setObfuscated(obfuscated); return this; } /** * Set click event of current element to given one, may be null. * * @param clickEvent click event to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder event(final ClickEvent clickEvent) { this.current.setClickEvent(clickEvent); return this; } /** * Set hover event of current element to given one, may be null. * * @param hoverEvent hover event to use, may be null. * * @return this same ComponentBuilder for method chains. */ public ComponentBuilder event(final HoverEvent hoverEvent) { this.current.setHoverEvent(hoverEvent); return this; } /** * Finish builder, and create {@link TextComponent} with all created parts. * * @return builded {@link TextComponent}. */ public TextComponent create() { this.parts.addExtra(this.current); return this.parts; } /** * Construct new ComponentBuilder strating from given string ({@link TextComponent}). * * @param text first element of message. * * @return new ComponentBuilder instance. */ public static ComponentBuilder start(final String text) { return new ComponentBuilder(text); } /** * Construct new ComponentBuilder as copy of old one. * * @param original ComponentBuilder to copy. * * @return new ComponentBuilder instance. */ public static ComponentBuilder start(final ComponentBuilder original) { return new ComponentBuilder(original); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).appendSuper(super.toString()).append("parts", this.parts).append("current", this.current).toString(); } }
[ "bartlomiejkmazur@gmail.com" ]
bartlomiejkmazur@gmail.com
e0dbf4a9247b648a5f10cb6028aaf59cce9dd424
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/53/1613.java
581b01cccd103dc30a5a57953a680405edcbb12f
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
933
java
package <missing>; public class GlobalMembers { public static int Main() { int[] x = new int[300]; int[] y = new int[300]; int i; int j; int k = 0; int n; int sign; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (i = 0;i < n;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { x[i] = Integer.parseInt(tempVar2); } } for (i = 0;i < n;i++) { for (sign = 0,j = 0;j < i;j++) { if (x[i] == x[j]) { sign = 1; break; } } if (sign == 0) { y[k] = x[i]; k++; } } System.out.printf("%d",y[0]); for (i = 1;i < k;i++) { System.out.printf(",%d",y[i]); } String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { n = Integer.parseInt(tempVar3); } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
a22e4b1a9530d5bad77bb6c485af14173e7fb831
d69ce52f1998e83fd2447102f001e7598a71e91c
/src/main/java/com/dt/controller/VedioSectionController.java
884654efadc4c4a81d72bf49ceeea26a2b31776e
[]
no_license
NDCFL/KoreanTV
276f836bd1b79e16561e1bf4a271be69e01f0629
0c206867a956ee56c0139c02c35d4df4de78c316
refs/heads/master
2020-03-21T08:06:27.891485
2018-08-17T05:34:40
2018-08-17T05:34:40
138,320,812
1
0
null
null
null
null
UTF-8
Java
false
false
6,393
java
package com.dt.controller; import com.dt.common.Message; import com.dt.common.PageQuery; import com.dt.common.PagingBean; import com.dt.common.StatusQuery; import com.dt.enums.ActiveStatusEnum; import com.dt.service.VedioSectionService; import com.dt.vo.Select2Vo; import com.dt.vo.UserVo; import com.dt.vo.VedioSectionVo; import org.apache.ibatis.annotations.Param; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.stereotype.Controller; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import javax.servlet.http.HttpSession; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; /** * Created by chenfeilong on 2017/10/21. */ @Controller @RequestMapping("vedioSection") public class VedioSectionController { @Resource private VedioSectionService vedioSectionService; @RequestMapping("vedioSectionList") @ResponseBody public PagingBean vedioSectionList(int pageSize, int pageIndex, Long vedioId, HttpSession session) throws Exception{ UserVo userVo = (UserVo) session.getAttribute("userVo"); PageQuery pageQuery = new PageQuery(); pageQuery.setId(vedioId); PagingBean pagingBean = new PagingBean(); pagingBean.setPageSize(pageSize); pagingBean.setCurrentPage(pageIndex); pageQuery.setPageSize(pagingBean.getPageSize()); pageQuery.setPageNo(pagingBean.getStartIndex()); pagingBean.setTotal(vedioSectionService.count(pageQuery)); pagingBean.setrows(vedioSectionService.listPage(pageQuery)); return pagingBean; } @RequestMapping("findVedioSectionLists") @ResponseBody public PagingBean findVedioSectionLists(int pageSize, int pageIndex, VedioSectionVo vedioSectionVo, HttpSession session) throws Exception{ UserVo userVo = (UserVo) session.getAttribute("userVo"); PageQuery pageQuery = new PageQuery(); PagingBean pagingBean = new PagingBean(); pagingBean.setPageSize(pageSize); pagingBean.setCurrentPage(pageIndex); pageQuery.setPageSize(pagingBean.getPageSize()); pageQuery.setPageNo(pagingBean.getStartIndex()); pagingBean.setTotal(vedioSectionService.findVedioSectionCount(pageQuery,vedioSectionVo)); pagingBean.setrows(vedioSectionService.findVedioSectionList(pageQuery,vedioSectionVo)); return pagingBean; } @RequestMapping("/vedioSectionAddSave") @ResponseBody public Message addSavevedioSection(VedioSectionVo vedioSection, HttpSession session) throws Exception { try{ UserVo userVo = (UserVo) session.getAttribute("userVo"); vedioSection.setIsActive(ActiveStatusEnum.ACTIVE.getValue().byteValue()); vedioSectionService.save(vedioSection); return Message.success("新增成功!"); }catch (Exception E){ return Message.fail("新增失败!"); } } @RequestMapping("/updateVedio") @ResponseBody public Message updateVedio(VedioSectionVo vedioSection) throws Exception { try{ vedioSectionService.updateVedio(vedioSection); return Message.success("视频修改成功!"); }catch (Exception E){ return Message.fail("视频修改失败!"); } } @RequestMapping("/findVedioSection/{id}") @ResponseBody public VedioSectionVo findvedioSection(@PathVariable("id") long id){ VedioSectionVo vedioSection = vedioSectionService.getById(id); return vedioSection; } @RequestMapping("/getSectionList/{id}") @ResponseBody public List<Select2Vo> getSectionList(@PathVariable("id") long id){ return vedioSectionService.getSectionList(id); } @RequestMapping("/findVedioSectionList") @ResponseBody public List<VedioSectionVo> findVedioSectionList(long id){ return vedioSectionService.getList(id); } @RequestMapping("/vedioSectionUpdateSave") @ResponseBody public Message updatevedioSection(VedioSectionVo vedioSection) throws Exception{ try{ vedioSectionService.update(vedioSection); return Message.success("修改成功!"); }catch (Exception e){ return Message.fail("修改失败!"); } } @RequestMapping("/deleteManyVedioSection") @ResponseBody public Message deleteManyvedioSection(@Param("manyId") String manyId,Integer status) throws Exception{ try{ String str[] = manyId.split(","); for (String s: str) { vedioSectionService.updateStatus(new StatusQuery(Long.parseLong(s),status)); } return Message.success("批量修改状态成功!"); }catch (Exception e){ e.printStackTrace(); return Message.fail("批量修改状态失败!"); } } @RequestMapping("/deleteVedioSection/{id}") @ResponseBody public Message deletevedioSection(@PathVariable("id") long id) throws Exception{ try{ vedioSectionService.removeById(id); return Message.success("删除成功!"); }catch (Exception e){ e.printStackTrace(); return Message.fail("删除失败!"); } } @RequestMapping("/vedioSectionPage") public String table() throws Exception{ return "vedio/vedioSectionList"; } @RequestMapping("updateStatus/{id}/{status}") @ResponseBody public Message updateStatus(@PathVariable("id") long id,@PathVariable("status") int status) throws Exception{ try{ vedioSectionService.updateStatus(new StatusQuery(id,status)); return Message.success("ok"); }catch (Exception e){ return Message.fail("fail"); } } @InitBinder public void initBinder(WebDataBinder binder) { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); } }
[ "275300091@qq.com" ]
275300091@qq.com
357390a2ff924c127cbf852e3321ab9d38512fcd
55bf3cf97644af0bcbec091532fe83c99ba592f6
/org/w3c/css/properties/css2/CssCursor.java
a525072ac5b1a128cb1c4a98ab571153e81c0014
[ "W3C-20150513", "W3C" ]
permissive
w3c/css-validator
dda4f191ff839b392440d91f9012ba2d2d63d0c6
6874d1990af57d3260fdc2a9420b09077cf2ed06
refs/heads/main
2023-09-03T12:40:19.427371
2023-03-13T13:59:56
2023-03-13T13:59:56
40,552,697
223
124
NOASSERTION
2023-09-13T17:38:37
2015-08-11T16:28:14
Java
UTF-8
Java
false
false
4,508
java
// $Id$ // Author: Yves Lafon <ylafon@w3.org> // // (c) COPYRIGHT MIT, ERCIM and Keio University, 2012. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css2; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; import org.w3c.css.values.CssIdent; import org.w3c.css.values.CssLayerList; import org.w3c.css.values.CssTypes; import org.w3c.css.values.CssValue; import java.util.ArrayList; import static org.w3c.css.values.CssOperator.COMMA; /** * @spec http://www.w3.org/TR/2008/REC-CSS2-20080411/ui.html#cursor-props */ public class CssCursor extends org.w3c.css.properties.css.CssCursor { public static CssIdent[] allowed_values; static { String[] _allowed_values = { "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help"}; allowed_values = new CssIdent[_allowed_values.length]; int i = 0; for (String s : _allowed_values) { allowed_values[i++] = CssIdent.getIdent(s); } } public static CssIdent getMatchingIdent(CssIdent ident) { for (CssIdent id : allowed_values) { if (id.equals(ident)) { return id; } } return null; } /** * Create a new CssCursor */ public CssCursor() { } /** * Creates a new CssCursor * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssCursor(ApplContext ac, CssExpression expression, boolean check) throws InvalidParamException { setByUser(); CssValue val; char op; CssValue lastIdent = null; ArrayList<CssValue> values = new ArrayList<CssValue>(); while (!expression.end()) { val = expression.getValue(); op = expression.getOperator(); switch (val.getType()) { case CssTypes.CSS_URL: if (lastIdent != null) { throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } values.add(val); break; case CssTypes.CSS_IDENT: if (inherit.equals(val)) { if (expression.getCount() > 1) { throw new InvalidParamException("value", inherit.toString(), getPropertyName(), ac); } value = inherit; break; } if (lastIdent == null) { lastIdent = getMatchingIdent((CssIdent) val); // not recognized... exit if (lastIdent == null) { throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } values.add(val); break; } default: throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } expression.next(); if (!expression.end() && (op != COMMA)) { throw new InvalidParamException("operator", Character.toString(op), ac); } } if (value != inherit) { // check if we got the mandatory ident if (lastIdent == null) { // TODO better errormsg throw new InvalidParamException("value", expression.toString(), getPropertyName(), ac); } value = (values.size() == 1) ? values.get(0) : new CssLayerList(values); } } public CssCursor(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } }
[ "ylafon@w3.org" ]
ylafon@w3.org
e22789f02903a24dfe65a8a69cd3ee2ccd0eb7eb
585403956837456778b9da4a8bd88af082ca70d9
/devbeginner-news-facebook/src/test/java/com/jojoldu/devbeginnernews/facebook/FacebookTokenExchangerRealTest.java
c534959c55e2435a24cc50a079a51cd0b304e375
[]
no_license
rheehot/devbeginner-news
827c31d19c6a810ea7f9e75be269f0b06d535323
d228bece0a9b6d0b771b14548103d27f1cc0d435
refs/heads/master
2022-03-27T16:59:50.954082
2020-01-01T23:13:44
2020-01-01T23:13:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,387
java
package com.jojoldu.devbeginnernews.facebook; import com.jojoldu.devbeginnernews.core.token.FacebookUserTokenRepository; import com.jojoldu.devbeginnernews.facebook.service.FacebookTokenExchanger; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.client.HttpClientErrorException; import static com.jojoldu.devbeginnernews.core.token.FacebookUserToken.DEFAULT_USER; /** * Created by jojoldu@gmail.com on 08/11/2019 * Blog : http://jojoldu.tistory.com * Github : http://github.com/jojoldu */ @RunWith(SpringRunner.class) @SpringBootTest public class FacebookTokenExchangerRealTest { @Autowired private FacebookUserTokenRepository facebookUserTokenRepository; @Autowired private FacebookTokenExchanger facebookTokenExchanger; @After public void tearDown() throws Exception { facebookUserTokenRepository.deleteAll(); } @Test(expected = HttpClientErrorException.class) public void 토큰이잘못되면_HttpClientErrorException이_반환된다() { //given String userToken = "a"; //when facebookTokenExchanger.exchangeAll(DEFAULT_USER, userToken); } }
[ "jojoldu@gmail.com" ]
jojoldu@gmail.com
ef765b02ab587c7a3dccff4169e1f272d8b23322
87ca872569b19e1ebf629ed80c74b0769ca5fd7a
/src/main/java/com/speedment/internal/util/tuple/impl/Tuple5Impl.java
46528c0dc950abef636317d1bff9e1e63a7c0aa6
[ "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
lawesson/speedment
04772f9a30dc28ade7e358761d615f43b32f3dd6
fad54076832496a8dd81919a0db9fb162f3ab165
refs/heads/master
2021-01-17T20:28:03.873640
2016-08-21T00:07:42
2016-08-21T00:07:42
66,567,694
0
0
null
2016-08-25T14:58:39
2016-08-25T14:58:39
null
UTF-8
Java
false
false
1,717
java
/** * * Copyright (c) 2006-2016, Speedment, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); You may not * use this file except in compliance with the License. You may obtain a copy of * the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.speedment.internal.util.tuple.impl; import com.speedment.util.tuple.Tuple5; /** * * @author pemi * @param <T0> Type of 0:th argument * @param <T1> Type of 1:st argument * @param <T2> Type of 2:nd argument * @param <T3> Type of 3:rd argument * @param <T4> Type of 4:th argument */ public final class Tuple5Impl<T0, T1, T2, T3, T4> extends AbstractTuple implements Tuple5<T0, T1, T2, T3, T4> { public Tuple5Impl(T0 v0, T1 v1, T2 v2, T3 v3, T4 v4) { super(Tuple5Impl.class, v0, v1, v2, v3, v4); } @SuppressWarnings("unchecked") @Override public T0 get0() { return (T0) values[0]; } @SuppressWarnings("unchecked") @Override public T1 get1() { return (T1) values[1]; } @SuppressWarnings("unchecked") @Override public T2 get2() { return (T2) values[2]; } @SuppressWarnings("unchecked") @Override public T3 get3() { return (T3) values[3]; } @SuppressWarnings("unchecked") @Override public T4 get4() { return (T4) values[4]; } }
[ "minborg@speedment.com" ]
minborg@speedment.com
a1a3fe39c1d79e072251c9b836de19dfbc292273
cdceb0cd5840af01e21dd21b2648f571c840e53d
/src/main/java/win/hupubao/mapper/hupubao/TagMapper.java
11909121e1f0e59605f46f77c7d45454ebe5bc65
[]
no_license
ysdxz207/hupubao
3175935a22e4c1c0e06e11f3399caba24767f556
697edf2e278acd906999576d1e2708f5cbe3d6df
refs/heads/master
2020-03-23T22:29:54.512721
2019-01-18T06:23:18
2019-01-18T06:23:18
52,258,543
0
0
null
null
null
null
UTF-8
Java
false
false
593
java
package win.hupubao.mapper.hupubao; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; import win.hupubao.beans.biz.TagBean; import win.hupubao.utils.mybatis.MyMapper; import java.util.List; @Repository public interface TagMapper extends MyMapper<TagBean> { @Select("select * from tag where id in (select tag_id from article_tag where article_id = #{articleId})") List<TagBean> selectTagListByArticleId(@Param("articleId") String articleId); List<TagBean> selectList(TagBean tagBean); }
[ "ysdxz207@qq.com" ]
ysdxz207@qq.com
76b19bfb69a5f52062999855809546c745a8ad70
2534632801fd1f4c59b184088c515a28078e3a70
/src/main/java/com/nswt/entity/system/Department.java
d5037ea7b5001ca1eb2131536e132687e4744965
[]
no_license
SimonHK/ProcessIntegrationPlatform
0b339a7051a858eedf87953471c9f8820cdd0f8b
d7bd97e3a8b125cc1137de7ede8c0498dd0f02d6
refs/heads/master
2021-10-27T16:07:27.150839
2019-04-18T10:28:45
2019-04-18T10:28:45
100,347,976
0
0
null
null
null
null
UTF-8
Java
false
false
2,784
java
package com.nswt.entity.system; import java.util.List; /** * * 类名称:组织机构 * 类描述: * @author HongKai * 作者单位: * 联系方式: * 修改时间:2015年12月16日 * @version 2.0 */ public class Department { private String NAME; //名称 private String NAME_EN; //英文名称 private String BIANMA; //编码 private String PARENT_ID; //上级ID private String HEADMAN; //负责人 private String TEL; //电话 private String FUNCTIONS; //部门职能 private String BZ; //备注 private String ADDRESS; //地址 private String DEPARTMENT_ID; //主键 private String target; private Department department; private List<Department> subDepartment; private boolean hasDepartment = false; private String treeurl; private String icon; public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public String getNAME() { return NAME; } public void setNAME(String nAME) { NAME = nAME; } public String getNAME_EN() { return NAME_EN; } public void setNAME_EN(String nAME_EN) { NAME_EN = nAME_EN; } public String getBIANMA() { return BIANMA; } public void setBIANMA(String bIANMA) { BIANMA = bIANMA; } public String getPARENT_ID() { return PARENT_ID; } public void setPARENT_ID(String pARENT_ID) { PARENT_ID = pARENT_ID; } public String getHEADMAN() { return HEADMAN; } public void setHEADMAN(String hEADMAN) { HEADMAN = hEADMAN; } public String getTEL() { return TEL; } public void setTEL(String tEL) { TEL = tEL; } public String getFUNCTIONS() { return FUNCTIONS; } public void setFUNCTIONS(String fUNCTIONS) { FUNCTIONS = fUNCTIONS; } public String getBZ() { return BZ; } public void setBZ(String bZ) { BZ = bZ; } public String getADDRESS() { return ADDRESS; } public void setADDRESS(String aDDRESS) { ADDRESS = aDDRESS; } public String getDEPARTMENT_ID() { return DEPARTMENT_ID; } public void setDEPARTMENT_ID(String dEPARTMENT_ID) { DEPARTMENT_ID = dEPARTMENT_ID; } public String getTarget() { return target; } public void setTarget(String target) { this.target = target; } public Department getDepartment() { return department; } public void setDepartment(Department department) { this.department = department; } public List<Department> getSubDepartment() { return subDepartment; } public void setSubDepartment(List<Department> subDepartment) { this.subDepartment = subDepartment; } public boolean isHasDepartment() { return hasDepartment; } public void setHasDepartment(boolean hasDepartment) { this.hasDepartment = hasDepartment; } public String getTreeurl() { return treeurl; } public void setTreeurl(String treeurl) { this.treeurl = treeurl; } }
[ "18611949252@163.como" ]
18611949252@163.como
3274de0ac3299b3391198673e15f8083eabb9acb
f10dc8fb4181c4865cd4797de9d5a79f2c98af7a
/crmsrc/com/psit/struts/entity/SupPaidPast.java
74c23b2bdd49963599bb0f67d4ce528f5d4c0576
[]
no_license
DennisAZ/NewtouchOA
b9c41cc1f4caac53b453c56952af0f5156b6c4fa
881d72d80c83e1f2ad578c92e37a3241498499fc
refs/heads/master
2020-03-30T05:37:21.900004
2018-09-29T02:11:34
2018-09-29T02:11:34
150,809,685
0
3
null
null
null
null
UTF-8
Java
false
false
3,576
java
package com.psit.struts.entity; // default package import java.util.Date; /** * SupPaidPast entity. @author MyEclipse Persistence Tools */ public class SupPaidPast implements java.io.Serializable { // Fields private Long sppId; private PurOrd purOrd; private Supplier supplier; private String sppContent; private Date sppFctDate; private String sppPayType; private Double sppPayMon; private SalEmp salEmp; private String sppIsinv; private String sppCreUser; private Date sppCreDate; private String sppUpdUser; private Date sppUpdDate; // Constructors /** default constructor */ public SupPaidPast() { } public SupPaidPast(Long sppId){ this.sppId = sppId; } /** full constructor */ public SupPaidPast(PurOrd purOrd, Supplier supplier, String sppContent, Date sppFctDate, String sppPayType, Double sppPayMon, SalEmp salEmp, String sppIsinv, String sppCreUser, Date sppCreDate, String sppUpdUser, Date sppUpdDate) { this.purOrd = purOrd; this.supplier = supplier; this.sppContent = sppContent; this.sppFctDate = sppFctDate; this.sppPayType = sppPayType; this.sppPayMon = sppPayMon; this.salEmp = salEmp; this.sppIsinv = sppIsinv; this.sppCreUser = sppCreUser; this.sppCreDate = sppCreDate; this.sppUpdUser = sppUpdUser; this.sppUpdDate = sppUpdDate; } // Property accessors public Long getSppId() { return this.sppId; } public void setSppId(Long sppId) { this.sppId = sppId; } public PurOrd getPurOrd() { return purOrd; } public void setPurOrd(PurOrd purOrd) { this.purOrd = purOrd; } public Supplier getSupplier() { return supplier; } public void setSupplier(Supplier supplier) { this.supplier = supplier; } public String getSppContent() { return this.sppContent; } public void setSppContent(String sppContent) { this.sppContent = sppContent; } public Date getSppFctDate() { return this.sppFctDate; } public void setSppFctDate(Date sppFctDate) { this.sppFctDate = sppFctDate; } public String getSppPayType() { return this.sppPayType; } public void setSppPayType(String sppPayType) { this.sppPayType = sppPayType; } public Double getSppPayMon() { return this.sppPayMon; } public void setSppPayMon(Double sppPayMon) { this.sppPayMon = sppPayMon; } public SalEmp getSalEmp() { return salEmp; } public void setSalEmp(SalEmp salEmp) { this.salEmp = salEmp; } public String getSppIsinv() { return this.sppIsinv; } public void setSppIsinv(String sppIsinv) { this.sppIsinv = sppIsinv; } public String getSppCreUser() { return this.sppCreUser; } public void setSppCreUser(String sppCreUser) { this.sppCreUser = sppCreUser; } public Date getSppCreDate() { return this.sppCreDate; } public void setSppCreDate(Date sppCreDate) { this.sppCreDate = sppCreDate; } public String getSppUpdUser() { return this.sppUpdUser; } public void setSppUpdUser(String sppUpdUser) { this.sppUpdUser = sppUpdUser; } public Date getSppUpdDate() { return this.sppUpdDate; } public void setSppUpdDate(Date sppUpdDate) { this.sppUpdDate = sppUpdDate; } }
[ "hao.duan@newtouch.cn" ]
hao.duan@newtouch.cn
43f79776abc9430a646921e51b012d90415b15fe
522c4abef6c0410d52dd5b8433bf4487d46c1c25
/efamily-device/src/main/java/com/winterframework/efamily/dao/IEjlUserDeviceDao.java
ad905ac827fb792dc7b83ead09cad76fb5906774
[]
no_license
xjiafei/efamily
05b1c71e1f7f485132e5d6243e7af7208b567517
0401d6ec572c7959721c294408f6d525e3d12866
refs/heads/master
2020-03-10T11:42:00.359799
2018-04-13T08:13:58
2018-04-13T08:13:58
129,361,914
0
3
null
null
null
null
UTF-8
Java
false
false
655
java
package com.winterframework.efamily.dao; import com.winterframework.efamily.core.base.IBaseDao; import com.winterframework.efamily.entity.EjlUserDevice; public interface IEjlUserDeviceDao extends IBaseDao<EjlUserDevice> { /** * 功能:获取用户设备 * @param ejlUserDevice * @return */ public EjlUserDevice getEjlUserDevice(EjlUserDevice ejlUserDevice); /** * 功能:删除用户设备 * @param ejlUserDevice * @return */ public int deleteByDeviceSwitch(EjlUserDevice ejlUserDevice); public int updateByAttribute(EjlUserDevice ejlUserDevice); public EjlUserDevice getByAttribute(EjlUserDevice ejlUserDevice); }
[ "xjiafei126@126.com" ]
xjiafei126@126.com
fcabd685ecac288bf0767c2d674990cf87f0a1b1
cee07e9b756aad102d8689b7f0db92d611ed5ab5
/src_6/org/benf/cfr/tests/CondJumpTest10.java
08ea98e4250116a832c89266ecca103afa4f8b15
[ "MIT" ]
permissive
leibnitz27/cfr_tests
b85ab71940ae13fbea6948a8cc168b71f811abfd
b3aa4312e3dc0716708673b90cc0a8399e5f83e2
refs/heads/master
2022-09-04T02:45:26.282511
2022-08-11T06:14:39
2022-08-11T06:14:39
184,790,061
11
5
MIT
2022-02-24T07:07:46
2019-05-03T16:49:01
Java
UTF-8
Java
false
false
314
java
package org.benf.cfr.tests; /** * Created by IntelliJ IDEA. * User: lee * Date: 07/06/2011 * Time: 06:24 * To change this template use File | Settings | File Templates. */ public class CondJumpTest10 { public boolean test(int a, int b) { if (a==b) { } return a>b; } }
[ "lee@benf.org" ]
lee@benf.org
0023e5a2f3c9870248bf4503e3f0b6c7522da14a
c00b0135e26f8e3b9e97e0916529318fe1816dbe
/bitcamp-java-application2-server/v32_10/src/main/java/com/eomcs/lms/ServerTest2.java
0ada6567629dda71eb0eb2f1ec41d880ddacd117
[]
no_license
jisoo0516/bitcamp-java-20190527
40c0ae9fe7b07201cd977de7c12a182e398487ec
0e1efcd7405f088f6ad0fbcc21778d9142968f4c
refs/heads/master
2020-06-13T20:15:13.951155
2019-10-11T10:55:15
2019-10-11T10:55:15
194,775,331
0
0
null
2020-04-30T11:45:58
2019-07-02T02:41:01
Java
UTF-8
Java
false
false
4,905
java
package com.eomcs.lms; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.Socket; import java.sql.Date; import java.util.List; import com.eomcs.lms.domain.Lesson; public class ServerTest2 { static ObjectOutputStream out; static ObjectInputStream in; public static void main(String[] args) throws Exception { System.out.println("[수업관리시스템 서버 애플리케이션 테스트]"); try (Socket socket = new Socket("localhost", 8888); ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream()); ObjectInputStream in = new ObjectInputStream(socket.getInputStream())) { System.out.println("서버와 연결되었음."); // 다른 메서드가 입출력 객체를 사용할 수 있도록 스태틱 변수에 저장한다. ServerTest2.in = in; ServerTest2.out = out; Lesson lesson = new Lesson(); lesson.setNo(1); lesson.setTitle("자바프로그래밍"); lesson.setContents("okok"); lesson.setStartDate(Date.valueOf("2019-1-1")); lesson.setEndDate(Date.valueOf("2019-1-1")); lesson.setTotalHours(400); lesson.setDayHours(4); if (!add(lesson)) { error(); } System.out.println("------------------"); lesson = new Lesson(); lesson.setNo(2); lesson.setTitle("자바프로그래밍2"); lesson.setContents("okok"); lesson.setStartDate(Date.valueOf("2019-2-2")); lesson.setEndDate(Date.valueOf("2019-3-3")); lesson.setTotalHours(400); lesson.setDayHours(4); if (!add(lesson)) { error(); } System.out.println("------------------"); if (!list()) { error(); } System.out.println("------------------"); if (!delete()) { error(); } System.out.println("------------------"); if (!list()) { error(); } System.out.println("------------------"); if (!detail()) { error(); } System.out.println("------------------"); lesson = new Lesson(); lesson.setNo(1); lesson.setTitle("자바 웹 프로그래밍"); lesson.setContents("웹개발자 양성과정"); lesson.setStartDate(Date.valueOf("2019-5-27")); lesson.setEndDate(Date.valueOf("2019-11-27")); lesson.setTotalHours(400); lesson.setDayHours(3); if (!update(lesson)) { error(); } System.out.println("------------------"); if (!list()) { error(); } System.out.println("------------------"); if (!quit()) { error(); } } catch (IOException e) { e.printStackTrace(); } System.out.println("서버와 연결 끊음."); } private static void error() throws Exception { System.out.printf("오류: %s\n", in.readUTF()); } private static boolean quit() throws Exception { out.writeUTF("quit"); out.flush(); System.out.print("quit 요청함 => "); if (!in.readUTF().equals("ok")) return false; System.out.println("처리 완료!"); return true; } private static boolean delete() throws Exception { out.writeUTF("/lesson/delete"); out.writeInt(2); out.flush(); System.out.print("delete 요청함 => "); if (!in.readUTF().equals("ok")) return false; System.out.println("처리 완료!"); return true; } private static boolean detail() throws Exception { out.writeUTF("/lesson/detail"); out.writeInt(1); out.flush(); System.out.print("detail 요청함 => "); if (!in.readUTF().equals("ok")) return false; System.out.println("처리 완료!"); System.out.println(in.readObject()); return true; } private static boolean update(Lesson obj) throws Exception { out.writeUTF("/lesson/update"); out.writeObject(obj); out.flush(); System.out.print("update 요청함 => "); if (!in.readUTF().equals("ok")) return false; System.out.println("처리 완료!"); return true; } private static boolean list() throws Exception { out.writeUTF("/lesson/list"); out.flush(); System.out.print("list 요청함 => "); if (!in.readUTF().equals("ok")) return false; System.out.println("처리 완료!"); @SuppressWarnings("unchecked") List<Lesson> list = (List<Lesson>) in.readObject(); System.out.println("------------------"); for (Lesson obj : list) { System.out.println(obj); } return true; } private static boolean add(Lesson obj) throws IOException { out.writeUTF("/lesson/add"); out.writeObject(obj); out.flush(); System.out.print("add 요청함 => "); if (!in.readUTF().equals("ok")) return false; System.out.println("처리 완료!"); return true; } }
[ "classy960516@gmail.com" ]
classy960516@gmail.com
96b7e7479114574a30d29bb2613dc75b4ed0c281
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
/app/src/main/wechat6.5.3/android/support/v4/widget/r.java
af2a6b9b635eedce2bf9970954ae6bc02be77f2b
[]
no_license
newtonker/wechat6.5.3
8af53a870a752bb9e3c92ec92a63c1252cb81c10
637a69732afa3a936afc9f4679994b79a9222680
refs/heads/master
2020-04-16T03:32:32.230996
2017-06-15T09:54:10
2017-06-15T09:54:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,641
java
package android.support.v4.widget; import android.graphics.drawable.Drawable; import android.os.Build.VERSION; import android.widget.TextView; public final class r { static final f DP; interface f { void a(TextView textView, Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4); int c(TextView textView); } static class b implements f { b() { } public void a(TextView textView, Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) { textView.setCompoundDrawables(drawable, null, null, null); } public int c(TextView textView) { if (!s.DT) { s.DS = s.n("mMaxMode"); s.DT = true; } if (s.DS != null && s.a(s.DS, textView) == 1) { if (!s.DR) { s.DQ = s.n("mMaximum"); s.DR = true; } if (s.DQ != null) { return s.a(s.DQ, textView); } } return -1; } } static class e extends b { e() { } public final int c(TextView textView) { return textView.getMaxLines(); } } static class c extends e { c() { } public void a(TextView textView, Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) { Object obj = textView.getLayoutDirection() == 1 ? 1 : null; Drawable drawable5 = obj != null ? null : drawable; if (obj == null) { drawable = null; } textView.setCompoundDrawables(drawable5, null, drawable, null); } } static class d extends c { d() { } public final void a(TextView textView, Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) { textView.setCompoundDrawablesRelative(drawable, null, null, null); } } static class a extends d { a() { } } static { int i = VERSION.SDK_INT; if (i >= 23) { DP = new a(); } else if (i >= 18) { DP = new d(); } else if (i >= 17) { DP = new c(); } else if (i >= 16) { DP = new e(); } else { DP = new b(); } } public static void a(TextView textView, Drawable drawable) { DP.a(textView, drawable, null, null, null); } public static int c(TextView textView) { return DP.c(textView); } }
[ "zhangxhbeta@gmail.com" ]
zhangxhbeta@gmail.com
6c62b4c6873ba4a4ed2af52064a9cccfa884d3ca
153d0daab959d1865eae5ea975b99e9f1919b4f9
/prezentacja/src/test/java/pl/comarch/prezentacja/PrezentacjaApplicationTests.java
2a3bd9cdf974521d94b552b0e2c8016834dc5565
[]
no_license
wemstar/prezentacja-docker
2e3f12068c782bd98a92f920acc21ebd76c49a03
39f967c6fca6f9ebc33f32c70de75cf50069622b
refs/heads/master
2021-08-08T07:41:26.619890
2017-11-09T22:16:43
2017-11-09T22:16:43
110,171,900
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package pl.comarch.prezentacja; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class PrezentacjaApplicationTests { @Test public void contextLoads() { } }
[ "sylwestermacura@gmail.com" ]
sylwestermacura@gmail.com
d7e27991a591ae13b31fec7395a4ce2615445be7
c59595ed3e142591f6668d6cf68267ee6378bf58
/android/src/main/java/org/apache/http/impl/client/RedirectLocations.java
e1820e5ba62bd053a609632a42b8c1e74741c87a
[]
no_license
BBPL/ardrone
4c713a2e4808ddc54ae23c3bcaa4252d0f7b4b36
712c277850477b1115d5245885a4c5a6de3d57dc
refs/heads/master
2021-04-30T05:08:05.372486
2018-02-13T16:46:48
2018-02-13T16:46:48
121,408,031
1
1
null
null
null
null
UTF-8
Java
false
false
998
java
package org.apache.http.impl.client; import java.net.URI; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.apache.http.annotation.NotThreadSafe; @NotThreadSafe public class RedirectLocations { private final List<URI> all = new ArrayList(); private final Set<URI> unique = new HashSet(); public void add(URI uri) { this.unique.add(uri); this.all.add(uri); } public boolean contains(URI uri) { return this.unique.contains(uri); } public List<URI> getAll() { return new ArrayList(this.all); } public boolean remove(URI uri) { boolean remove = this.unique.remove(uri); if (remove) { Iterator it = this.all.iterator(); while (it.hasNext()) { if (((URI) it.next()).equals(uri)) { it.remove(); } } } return remove; } }
[ "feber.sm@gmail.com" ]
feber.sm@gmail.com
fea1965a1b70c227bb8b4b0cd03bc09ffd0984a7
24748d9c3311c5683f1d6e815fa7e24740c3709a
/Spring/dependency_injectio2/src/Si_Map2/Answer3.java
cf944d3c1dcf743be8d35ca09c2dfbb7bbe4adc6
[]
no_license
pradeepp82/mypractice
6262a862770f4a8bcfaf5e6be725d51c5d24b915
3b845d2b7635271d5a75631ae47515c429d4a7cb
refs/heads/master
2021-07-17T07:48:18.324173
2017-10-25T07:20:23
2017-10-25T07:20:23
108,234,160
0
0
null
null
null
null
UTF-8
Java
false
false
567
java
package Si_Map2; import java.util.Date; public class Answer3 { private int id; private String answer; private Date postedDate; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getAnswer() { return answer; } public void setAnswer(String answer) { this.answer = answer; } public Date getPostedDate() { return postedDate; } public void setPostedDate(Date postedDate) { this.postedDate = postedDate; } public String toString(){ return "Id:"+id+" Answer:"+answer+" Posted Date:"+postedDate; } }
[ "panwarp82@gmail.com" ]
panwarp82@gmail.com
3517c6343225ec81f8a18e453ab3203a945d34ab
16cf69f5658d0a3d3c67eca33f851bc79ac485ec
/RetrofitRxJavaMvp/app/src/main/java/com/dawn/rrm/Plugin.java
da79d66a2fa22a3fdc1f25a8eaa0fd16d839fd8b
[]
no_license
wangxiongtao/Retrofit-RxJava-Mvp
be03668e4307a6fb6a97622febb22925075b6602
fd53823fd4a0e26c792f7eb50089d9bd29fe0799
refs/heads/master
2018-11-27T05:53:08.513466
2018-09-05T07:43:48
2018-09-05T07:43:48
120,549,737
0
0
null
null
null
null
UTF-8
Java
false
false
177
java
package com.dawn.rrm; /** * Created by Administrator on 2018/3/12 0012. */ public class Plugin { public String getString(){ return "WO im getString "; } }
[ "1422559134@qq.com" ]
1422559134@qq.com
f8eb87ceed47cb4a86d0efd7d3473faff197adbc
9e5a398d20e1a7d485c0767fd38aca1ca6a1d7fb
/1_6.h12_dev/sonos.jad/src/ch/qos/logback/classic/spi/ThrowableProxyVO.java
e4561c636f661a5512dac46a21e89233ff6f4e40
[]
no_license
witokondoria/OpenWrt_Luci_Lua
6690e0f9cce38676ea93d176a7966546fd03fd32
07d1a20e1a950a330b51625b89cb6466ffaec84b
refs/heads/master
2021-06-01T18:25:09.937542
2016-08-26T13:14:10
2016-08-26T13:14:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,304
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package ch.qos.logback.classic.spi; import java.io.Serializable; import java.util.Arrays; // Referenced classes of package ch.qos.logback.classic.spi: // IThrowableProxy, StackTraceElementProxy public class ThrowableProxyVO implements IThrowableProxy, Serializable { public ThrowableProxyVO() { } public static ThrowableProxyVO build(IThrowableProxy ithrowableproxy) { ThrowableProxyVO throwableproxyvo1; if(ithrowableproxy == null) { throwableproxyvo1 = null; } else { ThrowableProxyVO throwableproxyvo = new ThrowableProxyVO(); throwableproxyvo.className = ithrowableproxy.getClassName(); throwableproxyvo.message = ithrowableproxy.getMessage(); throwableproxyvo.commonFramesCount = ithrowableproxy.getCommonFrames(); throwableproxyvo.stackTraceElementProxyArray = ithrowableproxy.getStackTraceElementProxyArray(); IThrowableProxy ithrowableproxy1 = ithrowableproxy.getCause(); if(ithrowableproxy1 != null) throwableproxyvo.cause = build(ithrowableproxy1); IThrowableProxy aithrowableproxy[] = ithrowableproxy.getSuppressed(); if(aithrowableproxy != null) { throwableproxyvo.suppressed = new IThrowableProxy[aithrowableproxy.length]; for(int i = 0; i < aithrowableproxy.length; i++) throwableproxyvo.suppressed[i] = build(aithrowableproxy[i]); } throwableproxyvo1 = throwableproxyvo; } return throwableproxyvo1; } public boolean equals(Object obj) { boolean flag = true; if(this != obj) goto _L2; else goto _L1 _L1: return flag; _L2: if(obj == null) { flag = false; continue; /* Loop/switch isn't completed */ } if(getClass() != obj.getClass()) { flag = false; continue; /* Loop/switch isn't completed */ } ThrowableProxyVO throwableproxyvo = (ThrowableProxyVO)obj; if(className == null) { if(throwableproxyvo.className != null) { flag = false; continue; /* Loop/switch isn't completed */ } } else if(!className.equals(throwableproxyvo.className)) { flag = false; continue; /* Loop/switch isn't completed */ } if(!Arrays.equals(stackTraceElementProxyArray, throwableproxyvo.stackTraceElementProxyArray)) flag = false; else if(!Arrays.equals(suppressed, throwableproxyvo.suppressed)) flag = false; else if(cause == null) { if(throwableproxyvo.cause != null) flag = false; } else if(!cause.equals(throwableproxyvo.cause)) flag = false; if(true) goto _L1; else goto _L3 _L3: } public IThrowableProxy getCause() { return cause; } public String getClassName() { return className; } public int getCommonFrames() { return commonFramesCount; } public String getMessage() { return message; } public StackTraceElementProxy[] getStackTraceElementProxyArray() { return stackTraceElementProxyArray; } public IThrowableProxy[] getSuppressed() { return suppressed; } public int hashCode() { int i; if(className == null) i = 0; else i = className.hashCode(); return i + 31; } private static final long serialVersionUID = 0xf54432135b2763ddL; private IThrowableProxy cause; private String className; private int commonFramesCount; private String message; private StackTraceElementProxy stackTraceElementProxyArray[]; private IThrowableProxy suppressed[]; }
[ "huangruohai2010@gmail.com" ]
huangruohai2010@gmail.com
23150d3299f75544b7bf3f7d264d2a9d4957c12d
31b7d2067274728a252574b2452e617e45a1c8fb
/jpa-connector-beehive-bdk/com_V2.0.1.0.0/oracle/beehive/rest/UnsupportedAcceptHeaderFailure.java
91382d6682257d0812600e2e706111f7de004a41
[]
no_license
ericschan/open-icom
c83ae2fa11dafb92c3210a32184deb5e110a5305
c4b15a2246d1b672a8225cbb21b75fdec7f66f22
refs/heads/master
2020-12-30T12:22:48.783144
2017-05-28T00:51:44
2017-05-28T00:51:44
91,422,338
0
0
null
null
null
null
UTF-8
Java
false
false
2,378
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.3-hudson-jaxb-ri-2.2.3-3- // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2011.02.27 at 04:52:46 PM PST // package com.oracle.beehive.rest; import java.util.ArrayList; import java.util.List; 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 unsupportedAcceptHeaderFailure complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="unsupportedAcceptHeaderFailure"> * &lt;complexContent> * &lt;extension base="{http://www.oracle.com/beehive/rest}failure"> * &lt;sequence> * &lt;element name="acceptedValues" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "unsupportedAcceptHeaderFailure", propOrder = { "acceptedValues" }) @XmlRootElement(name = "unsupportedAcceptHeaderFailure") public class UnsupportedAcceptHeaderFailure extends Failure { protected List<String> acceptedValues; /** * Gets the value of the acceptedValues property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the acceptedValues property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAcceptedValues().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getAcceptedValues() { if (acceptedValues == null) { acceptedValues = new ArrayList<String>(); } return this.acceptedValues; } }
[ "eric.sn.chan@gmail.com" ]
eric.sn.chan@gmail.com
17b4ceeb7075aa91ff81ab577f531999abaee99c
642e90aa1c85330cee8bbe8660ca277655bc4f78
/gameserver/src/main/java/l2s/gameserver/stats/triggers/TriggerType.java
91776960fd20af528cc43083025fb90b56eccb1f
[]
no_license
BETAJIb/Studious
ac329f850d8c670d6e355ef68138c9e8fd525986
328e344c2eaa70238c403754566865e51629bd7b
refs/heads/master
2020-04-04T08:41:21.112223
2018-10-31T20:18:49
2018-10-31T20:18:49
155,790,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,987
java
package l2s.gameserver.stats.triggers; /** * @author VISTALL * @date 15:05/22.01.2011 */ public enum TriggerType { ADD, // Срабатывает при добавлении скилла. ATTACK, RECEIVE_DAMAGE, // Срабатывает при получении урона CRIT, // Срабатывает при крите OFFENSIVE_PHYSICAL_SKILL_USE, // Срабатывает при юзе Физ скилов OFFENSIVE_MAGICAL_SKILL_USE, // Срабатывает при юзе Маг скилов SUPPORT_MAGICAL_SKILL_USE, // Срабатывает при юзе баффов UNDER_MISSED_ATTACK, DIE, // Срабатывает при смерти IDLE, // Срабатывает каждый раз через определенное время. В качестве таймера используется время отката умения, к которому привязан триггер. ON_REVIVE, // Срабатывает при воскрешении персонажа. ON_START_EFFECT, // Срабатывает при старте эффекта. ON_EXIT_EFFECT, // Срабатывает по завершению эффекта (любым способом: время вышло, принудительно и т.д.). ON_FINISH_EFFECT, // Срабатывает по завершению времени действия эффекта. ON_START_CAST, // Срабатывает при начале каста. ON_TICK_CAST, ON_END_CAST, // Срабатывает после завершения времени каста скилла. ON_FINISH_CAST, // Срабатывает после успешного использования скилла (учитывая c coolTime). ON_ENTER_WORLD, // Срабатывает при входе в игру. ON_KILL, // Срабатывает при убийстве противника. ON_CAST_SKILL; // Срабатывает при касте определенного скилла. }
[ "gladiadorse@hotmail.com" ]
gladiadorse@hotmail.com
a18c5d1710169266c12382da47937f2736f27a6b
995fccc3026fa474da6af9cb87237ba4640a25e9
/src/main/java/com/lothrazar/cyclicmagic/enchantment/EnchantBase.java
d9fa05a4b5b32eb06be1aa4e781a30e888aa75b5
[ "MIT" ]
permissive
Aemande123/Cyclic
51c8f9d9068c95783dbb6c426e28e86a26bd58b5
f457d243104ab2495b06f7acca0fda453b401145
refs/heads/master
2021-04-09T16:19:24.329957
2018-03-18T03:24:45
2018-03-18T03:24:45
99,875,313
0
0
null
2017-08-10T03:06:18
2017-08-10T03:06:18
null
UTF-8
Java
false
false
2,850
java
/******************************************************************************* * The MIT License (MIT) * * Copyright (C) 2014-2018 Sam Bassett (aka Lothrazar) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ******************************************************************************/ package com.lothrazar.cyclicmagic.enchantment; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnumEnchantmentType; import net.minecraft.entity.EntityLivingBase; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; public abstract class EnchantBase extends Enchantment { protected EnchantBase(String name, Rarity rarityIn, EnumEnchantmentType typeIn, EntityEquipmentSlot[] slots) { super(rarityIn, typeIn, slots); this.setName(name); } protected int getCurrentLevelTool(ItemStack stack) { if (stack.isEmpty() == false && EnchantmentHelper.getEnchantments(stack).containsKey(this)) return EnchantmentHelper.getEnchantments(stack).get(this); return -1; } protected int getCurrentLevelTool(EntityLivingBase player) { if (player == null) { return -1; } ItemStack main = player.getHeldItemMainhand(); ItemStack off = player.getHeldItemOffhand(); return Math.max(getCurrentLevelTool(main), getCurrentLevelTool(off)); } protected ItemStack getFirstArmorStackWithEnchant(EntityLivingBase player) { if (player == null) { return ItemStack.EMPTY; } for (ItemStack main : player.getArmorInventoryList()) { if ((main.isEmpty() == false) && EnchantmentHelper.getEnchantments(main).containsKey(this)) { return main;// EnchantmentHelper.getEnchantments(main).get(this); } } return ItemStack.EMPTY; } }
[ "samson.bassett@gmail.com" ]
samson.bassett@gmail.com
9b57b51e5964bf0b8d7b35e25d3d54cf8b389963
c670fe9624e7490e262e90716145fe1f966a9f60
/lib_util/src/main/java/com/leezp/lib/util/tuples/Tuple3.java
8f92d700c9c08b6b38aa7a8bcac493cd9bc01fd1
[]
no_license
15608447849/lbs_driver
8c747a15ae43555840c75dc8f168fa14fa54b949
f675232d5f51def0cad386c7cfa4574149d8ba49
refs/heads/master
2020-03-27T17:38:12.646649
2018-12-25T09:48:54
2018-12-25T09:48:54
146,863,268
3
0
null
null
null
null
UTF-8
Java
false
false
342
java
package com.leezp.lib.util.tuples; /** * Created by Leeping on 2018/4/8. * email: 793065165@qq.com */ public class Tuple3<A,B,C> extends Tuple2<A,B> implements Tuple.IValue2<C> { public Tuple3(A a, B b,C c) { super(new Object[]{a,b,c}); } @Override public C getValue2() { return (C)getValue(2); } }
[ "793065165@qq.com" ]
793065165@qq.com
b0320f7cdd7e7c5b73a9be362fdecaaf10904113
0167f77a8364fe86aed16510c97ffc348c0d9132
/src/com/jetcms/core/action/front/LoginAct.java
b233dfaca25a89d6555eeb7868b145996636a2d1
[]
no_license
barrycom/kgmx
1bc379b7472ec11f8d807fbdf38644b59449410f
f2ad7902d06d36fdb908c6c098f36c978907b05f
refs/heads/master
2021-07-13T14:06:20.966837
2017-09-26T03:14:54
2017-09-26T03:16:42
104,827,608
2
0
null
null
null
null
UTF-8
Java
false
false
6,980
java
package com.jetcms.core.action.front; import static com.jetcms.core.manager.AuthenticationMng.AUTH_KEY; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.jetcms.common.security.BadCredentialsException; import com.jetcms.common.security.UsernameNotFoundException; import com.jetcms.common.web.RequestUtils; import com.jetcms.common.web.session.SessionProvider; import com.jetcms.core.entity.Authentication; import com.jetcms.core.manager.AuthenticationMng; import com.jetcms.core.web.WebCoreErrors; /** * 统一认证中心Action * * 统一认证中心由两个方面组成。 * <ul> * <li> * 用户信息来源。 可以有多种来源,最合适的来源是LDAP,也可以是数据库。本认证中心为实现更实用于互联网的、更轻量级的单点登录,使用数据库作为用户信息来源。 * 只要在同一数据库实例下,即可访问到用户信息。各系统可以自行实现注册、修改密码、禁用等功能。如果是用一体系下的应用,这些功能都提供了统一接口。 * <li> * 用户认证信息。用户登录成功后,需要保存登录信息,最合适的保存技术是memcached,也可以是其他集群缓存或数据库。本认证中心使用数据库保存登录信息。 * 只要在同一数据库实例下,即可访问。各系统可以自行实现退出登录。 * </ul> */ @Controller public class LoginAct { public static final String PROCESS_URL = "processUrl"; public static final String RETURN_URL = "returnUrl"; public static final String MESSAGE = "message"; public static final String LOGIN_INPUT = "/WEB-INF/t/jeecore/login.html"; public static final String LOGIN_SUCCESS = "/WEB-INF/t/jeecore/login_success.html"; /** * 统一登录入口 * * 入口有三种作用 * <ul> * <li>统一登录中心测试用。直接输入登录地址,登录成功后返回登录成功界面。如果processUrl为空,则认为使用该功能。</li> * <li>统一登录。其他系统使用该入口统一登录。使用此功能proseccUrl不能为空。</li> * <li>单点登录。多系统通过该入口实现单点登录。如果session中AUTH_KEY存在,则直接重定向至proseccUrl。</li> * </ul> * * @param processUrl * 登录成功后的处理地址。登录成功后即重定向到该页面,并将returnUrl、auth_key作为参数。 * @param returnUrl * 登录成功,并处理后,返回到该地址。 * @param message * 登录是提示的信息,比如:“您需要登录后才能继续刚才的操作”,该信息必须用UTF-8编码进行URLEncode。 * @param request * @param model * @return 重定向至processUrl,如prosessUrl不存在,则返回登录成功界面。 */ @RequestMapping(value = "/login.jspx", method = RequestMethod.GET) public String input(HttpServletRequest request, ModelMap model) { String processUrl = RequestUtils.getQueryParam(request, PROCESS_URL); String returnUrl = RequestUtils.getQueryParam(request, RETURN_URL); String message = RequestUtils.getQueryParam(request, MESSAGE); String authId = (String) session.getAttribute(request, AUTH_KEY); if (authId != null) { // 存在认证ID Authentication auth = authMng.retrieve(authId); // 存在认证信息,且未过期 if (auth != null) { String view = getView(processUrl, returnUrl, auth.getId()); if (view != null) { return view; } else { model.addAttribute("auth", auth); return LOGIN_SUCCESS; } } } if (!StringUtils.isBlank(processUrl)) { model.addAttribute(PROCESS_URL, processUrl); } if (!StringUtils.isBlank(returnUrl)) { model.addAttribute(RETURN_URL, returnUrl); } if (!StringUtils.isBlank(message)) { model.addAttribute(MESSAGE, message); } return LOGIN_INPUT; } @RequestMapping(value = "/login.jspx", method = RequestMethod.POST) public String submit(String username, String password, String processUrl, String returnUrl, String message, HttpServletRequest request, HttpServletResponse response, ModelMap model) { WebCoreErrors errors = validateSubmit(username, password, request); if (!errors.hasErrors()) { try { Authentication auth = authMng.login(username, password, RequestUtils.getIpAddr(request), request, response, session); String view = getView(processUrl, returnUrl, auth.getId()); if (view != null) { return view; } else { model.addAttribute("auth", auth); return LOGIN_SUCCESS; } } catch (UsernameNotFoundException e) { errors.addErrorString(e.getMessage()); } catch (BadCredentialsException e) { errors.addErrorString(e.getMessage()); } } errors.toModel(model); if (!StringUtils.isBlank(processUrl)) { model.addAttribute(PROCESS_URL, processUrl); } if (!StringUtils.isBlank(returnUrl)) { model.addAttribute(RETURN_URL, returnUrl); } if (!StringUtils.isBlank(message)) { model.addAttribute(MESSAGE, message); } return LOGIN_INPUT; } @RequestMapping(value = "/logout.jspx") public String logout(HttpServletRequest request, HttpServletResponse response) { String authId = (String) session.getAttribute(request, AUTH_KEY); if (authId != null) { authMng.deleteById(authId); session.logout(request, response); } return "redirect:index.jhtml"; } /** * 获得地址 * * @param processUrl * @param returnUrl * @param authId * @return */ private String getView(String processUrl, String returnUrl, String authId) { if (!StringUtils.isBlank(processUrl)) { StringBuilder sb = new StringBuilder("redirect:"); sb.append(processUrl).append("?").append(AUTH_KEY).append("=") .append(authId); if (!StringUtils.isBlank(returnUrl)) { sb.append("&").append(RETURN_URL).append("=").append(returnUrl); } return sb.toString(); } else if (!StringUtils.isBlank(returnUrl)) { StringBuilder sb = new StringBuilder("redirect:"); sb.append(returnUrl); if (!StringUtils.isBlank(authId)) { sb.append("?").append(AUTH_KEY).append("=").append(authId); } return sb.toString(); } else { return null; } } private WebCoreErrors validateSubmit(String username, String password, HttpServletRequest request) { WebCoreErrors errors = WebCoreErrors.create(request); if (errors.ifOutOfLength(username, "username", 3, 100)) { return errors; } if (errors.ifOutOfLength(password, "password", 3, 32)) { return errors; } return errors; } @Autowired private AuthenticationMng authMng; @Autowired private SessionProvider session; }
[ "whlitiger_yp@163.com" ]
whlitiger_yp@163.com
62ac4e0c4a88982d756bf9626965826dc4655b76
d6cf28d1b37216c657d23d8e512c15bdd9d3f226
/app/src/main/java/com/foreveross/atwork/modules/chat/component/chat/reference/RightReferencedStickerMessageChatItemView.java
927a4e08cbd3f1d79c970a51f3632014b6565759
[ "MIT" ]
permissive
AoEiuV020/w6s_lite_android
a2ec1ca8acdc848592266b548b9ac6b9a4117cd3
1c4ca5bdaea6d5230d851fb008cf2578a23b2ce5
refs/heads/master
2023-08-22T00:46:03.054115
2021-10-27T06:21:32
2021-10-27T07:45:41
421,650,297
1
0
null
null
null
null
UTF-8
Java
false
false
6,874
java
package com.foreveross.atwork.modules.chat.component.chat.reference; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; import com.foreverht.workplus.module.sticker.activity.StickerViewActivity; import com.foreveross.atwork.R; import com.foreveross.atwork.infrastructure.newmessage.post.ChatPostMessage; import com.foreveross.atwork.infrastructure.newmessage.post.chat.StickerChatMessage; import com.foreveross.atwork.infrastructure.newmessage.post.chat.reference.ReferenceMessage; import com.foreveross.atwork.modules.chat.component.ChatSendStatusView; import com.foreveross.atwork.modules.chat.component.chat.MessageSourceView; import com.foreveross.atwork.modules.chat.component.chat.SomeStatusView; import com.foreveross.atwork.modules.chat.component.chat.definition.IStickerChatView; import com.foreveross.atwork.modules.chat.data.AnchorInfo; import com.foreveross.atwork.modules.chat.presenter.StickerChatViewRefreshUIPresenter; import com.foreveross.atwork.modules.chat.util.AutoLinkHelper; import com.foreveross.atwork.support.AtworkBaseActivity; import com.foreveross.atwork.utils.ThemeResourceHelper; import org.jetbrains.annotations.NotNull; public class RightReferencedStickerMessageChatItemView extends RightBasicReferenceUserChatItemView implements IStickerChatView { private View mVRoot; private ImageView mIvAvatar; private LinearLayout mLlContent; private ImageView mIvSelect; private ChatSendStatusView mChatSendStatusView; private ReferenceMessage mReferencedChatMessage; private TextView mTvAuthorName; private FrameLayout mFlReply; private TextView mTvReply; private ImageView mIvContent; private LinearLayout mLlSomeStatusInfoWrapperParent; private LinearLayout mLlSomeStatusInfo; private TextView mTvTime; private ImageView mIvSomeStatus; public RightReferencedStickerMessageChatItemView(Context context) { super(context); findView(); registerListener(); mChatViewRefreshUIPresenter = new StickerChatViewRefreshUIPresenter(this); } @Override protected View getMessageRootView() { return mVRoot; } @Override protected ChatSendStatusView getChatSendStatusView() { return mChatSendStatusView; } @Override protected ImageView getAvatarView() { return mIvAvatar; } @Override protected ImageView getSelectView() { return mIvSelect; } @Override protected MessageSourceView getMessageSourceView() { return null; } @Override protected ChatPostMessage getMessage() { return mReferencedChatMessage; } @Override protected void registerListener() { super.registerListener(); mLlContent.setOnClickListener(v -> { AutoLinkHelper.getInstance().setLongClick(false); if (mSelectMode) { mReferencedChatMessage.select = !mReferencedChatMessage.select; select(mReferencedChatMessage.select); } else { mChatItemClickListener.referenceClick(mReferencedChatMessage); } }); mLlContent.setOnLongClickListener(v -> { AutoLinkHelper.getInstance().setLongClick(true); AnchorInfo anchorInfo = getAnchorInfo(); if (!mSelectMode) { mChatItemLongClickListener.referenceLongClick(mReferencedChatMessage, anchorInfo); return true; } return false; }); mIvContent.setOnClickListener(v -> { if(mReferencedChatMessage.mReferencingMessage instanceof StickerChatMessage) { Context context = getContext(); Intent intent = StickerViewActivity.Companion.getIntent(context, (StickerChatMessage) mReferencedChatMessage.mReferencingMessage); if(context instanceof AtworkBaseActivity) { ((AtworkBaseActivity)context).startActivity(intent, false); } else { context.startActivity(intent); } } }); } private void findView() { LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(R.layout.chat_right_referenced_sticker_message, this); mVRoot = view.findViewById(R.id.rl_root); mIvAvatar = view.findViewById(R.id.chat_right_text_avatar); mLlContent = view.findViewById(R.id.ll_chat_right_content); mTvAuthorName = view.findViewById(R.id.tv_title); mIvContent = view.findViewById(R.id.iv_content); mFlReply = view.findViewById(R.id.fl_reply); mTvReply = view.findViewById(R.id.tv_reply); mIvSelect = view.findViewById(R.id.right_text_select); mChatSendStatusView = view.findViewById(R.id.chat_right_text_send_status); mLlSomeStatusInfoWrapperParent = view.findViewById(R.id.ll_some_status_info_wrapper_parent); mLlSomeStatusInfo = view.findViewById(R.id.ll_some_status_info); mTvTime = view.findViewById(R.id.tv_time); mIvSomeStatus = view.findViewById(R.id.iv_some_status); } @Override protected SomeStatusView getSomeStatusView() { return SomeStatusView .newSomeStatusView() .setVgSomeStatusWrapperParent(mLlSomeStatusInfoWrapperParent) .setTvContentShow(mTvReply) .setIvStatus(mIvSomeStatus) .setIconDoubleTick(R.mipmap.icon_double_tick_white) .setIconOneTick(R.mipmap.icon_one_tick_white) .setTvTime(mTvTime) .setMaxTvContentWidthBaseOn(mFlReply, mLlSomeStatusInfo) .setLlSomeStatusInfo(mLlSomeStatusInfo); } @Override public void refreshItemView(ChatPostMessage message) { super.refreshItemView(message); mReferencedChatMessage = (ReferenceMessage) message; } @Override protected void burnSkin() { ThemeResourceHelper.setChatRightViewColorBg9Drawable(mLlContent); } @Override protected void themeSkin() { ThemeResourceHelper.setChatRightViewColorBg9Drawable(mLlContent); } @NonNull @Override protected View getContentRootView() { return mLlContent; } @Override TextView getAuthorNameView() { return mTvAuthorName; } @Override TextView getReplyView() { return mTvReply; } @NotNull @Override public ImageView contentView() { return mIvContent; } }
[ "lingen.liu@gmail.com" ]
lingen.liu@gmail.com
674d3ec0dae0e99942377e6462df3597ffbcfbc6
633493d37af3053a5acf3846492e1a7b94a84069
/src/HW_18_10_19/HW_Task12.java
aedce613d6fdfe0c1795d70bd0fe843ac870a80c
[]
no_license
JuliaBarsegian/Courses
6797bc4e888dcee4494ce4e36e0d8248aea457e2
e9d2a74619adcf998597e168c874229603c5585e
refs/heads/master
2020-08-09T06:14:42.693052
2019-11-25T18:44:15
2019-11-25T18:44:15
214,017,599
0
0
null
2019-11-25T18:44:16
2019-10-09T20:30:16
Java
UTF-8
Java
false
false
623
java
package HW_18_10_19; import java.util.Arrays; import java.util.Scanner; public class HW_Task12 { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Введите размер массива:"); int n = in.nextInt(); int[] array = new int[n]; for (int i = 0; i < array.length; i++) { array[i] = Math.abs(n / 2 - i); } System.out.println("Массив, заполненный числами по возрастанию начиная с центра массива\n" + Arrays.toString(array)); } }
[ "=" ]
=
a5c3f0e96f59e38e5ddce08ada3d66bf9218d475
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ImageViewTest.java
1519291541f161aafecabf3159c7bc37af71ef40
[ "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
3,969
java
package com.xtremelabs.robolectric.shadows; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.graphics.drawable.AnimationDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.widget.ImageView; import com.xtremelabs.robolectric.R; import com.xtremelabs.robolectric.Robolectric; import com.xtremelabs.robolectric.WithTestDefaultsRunner; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import static com.xtremelabs.robolectric.Robolectric.shadowOf; import static com.xtremelabs.robolectric.Robolectric.visualize; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @RunWith(WithTestDefaultsRunner.class) public class ImageViewTest { private ImageView imageView; @Before public void setUp() throws Exception { Resources resources = Robolectric.application.getResources(); Bitmap bitmap = BitmapFactory.decodeResource(resources, R.drawable.an_image); imageView = new ImageView(Robolectric.application); imageView.setImageBitmap(bitmap); } @Test public void shouldDrawWithImageMatrix() throws Exception { imageView.setImageMatrix(new Matrix()); assertEquals("Bitmap for resource:drawable/an_image", visualize(imageView)); Matrix matrix = new Matrix(); matrix.setTranslate(15, 20); imageView.setImageMatrix(matrix); assertEquals("Bitmap for resource:drawable/an_image at (15,20)", visualize(imageView)); } @Test public void shouldCopyMatrixSetup() throws Exception { Matrix matrix = new Matrix(); matrix.setTranslate(15, 20); imageView.setImageMatrix(matrix); assertEquals("Bitmap for resource:drawable/an_image at (15,20)", visualize(imageView)); matrix.setTranslate(30, 40); assertEquals("Bitmap for resource:drawable/an_image at (15,20)", visualize(imageView)); imageView.setImageMatrix(matrix); assertEquals("Bitmap for resource:drawable/an_image at (30,40)", visualize(imageView)); } @Test public void testSetImageResource_drawable() { imageView.setImageResource(R.drawable.l0_red); assertTrue("Drawable", imageView.getDrawable() instanceof Drawable); assertFalse("LayerDrawable", imageView.getDrawable() instanceof LayerDrawable); } @Test public void testSetAnimatedImage_drawable() { imageView.setImageResource(R.drawable.animation_list); Drawable animation = imageView.getDrawable(); assertTrue(animation instanceof Drawable); assertTrue(animation instanceof AnimationDrawable); } @Test public void testSetAnimationItem() throws Exception { imageView.setImageResource(R.drawable.animation_list); AnimationDrawable animation = (AnimationDrawable) imageView.getDrawable(); assertEquals(3, animation.getNumberOfFrames()); } @Test public void testSetImageResource_layerDrawable() { imageView.setImageResource(R.drawable.rainbow); assertTrue("Drawable", imageView.getDrawable() instanceof Drawable); assertTrue("LayerDrawable", imageView.getDrawable() instanceof LayerDrawable); assertThat(shadowOf(imageView.getDrawable()).getLoadedFromResourceId(), is(R.drawable.rainbow)); } @Test public void testSetImageLevel() throws Exception { imageView.setImageLevel(2); assertThat(shadowOf(imageView).getImageLevel(), equalTo(2)); } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
911ccaab2bc9b508e48f793d0d969a96b163d5b1
6a5e53d54a8e9787b390f9c3b69db2d7153d08bb
/core/modules/common/src/test/java/org/onetwo/common/hc/HttpClientTest.java
ecf5beb5c5fe2303c33c3b5881f383be2243b3bd
[ "Apache-2.0" ]
permissive
wayshall/onetwo
64374159b23fc8d06373a01ecc989db291e57714
44c9cd40bc13d91e4917c6eb6430a95f395f906a
refs/heads/master
2023-08-17T12:26:47.634987
2022-07-05T06:54:30
2022-07-05T06:54:30
47,802,308
23
13
Apache-2.0
2023-02-22T07:08:34
2015-12-11T03:17:58
Java
UTF-8
Java
false
false
3,340
java
package org.onetwo.common.hc; import java.io.IOException; import org.apache.commons.lang3.RandomUtils; import org.apache.http.Header; import org.apache.http.HeaderIterator; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.ParseException; import org.apache.http.client.CookieStore; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.BasicCookieStore; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.cookie.BasicClientCookie; import org.apache.http.util.EntityUtils; import org.junit.Test; import org.onetwo.common.hc.HttpClientUtils; public class HttpClientTest { static CookieStore cookieStore = new BasicCookieStore(); static HttpClient httpClient = HttpClientUtils.createHttpClient(cookieStore); static String USER_AGENT = "Mozilla/5.0 (Linux; Android 5.1; m3 note Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043024 Safari/537.36 MicroMessenger/6.5.4.1000 NetType/WIFI Language/zh_CN"; @Test public void test() throws Exception { CloseableHttpClient httpClient = HttpClients.createDefault(); String url = "weixinurl"; HttpGet get = new HttpGet(url); HttpResponse reponse = httpClient.execute(get); HttpEntity entity = reponse.getEntity(); System.out.println(EntityUtils.toString(entity)); String cookieString = reponse.getFirstHeader("Set-Cookie").toString(); System.out.println("cookieString: "+cookieString); String jsessionId = cookieString.substring("JSESSIONID=".length(), cookieString.indexOf(";")); System.out.println("jsessionId: "+jsessionId); } public static void main(String[] args) { BasicClientCookie cookie = new BasicClientCookie("xx", "yyy"); cookie.setDomain("www.test.com"); cookie.setPath("/"); cookieStore.addCookie(cookie); while(true){ draw(); long delay = RandomUtils.nextLong(100, 1000); try { Thread.sleep(delay); } catch (InterruptedException e) { System.err.println("sleep error:"+e.getMessage()); } } } public static void draw(){ String url = "weixinurl"; HttpPost requestUrl = new HttpPost(url); requestUrl.setHeader("user-agent", USER_AGENT); try { HttpResponse response = httpClient.execute(requestUrl); printResponse(response); } catch (Exception e) { System.err.println("request error:"+e.getMessage()+", ignore..."); return ; } url = "weixinurl"; requestUrl = new HttpPost(url); requestUrl.setHeader("user-agent", USER_AGENT); try { HttpResponse response = httpClient.execute(requestUrl); printResponse(response); } catch (Exception e) { System.err.println("request error:"+e.getMessage()+", ignore..."); return ; } } static void printResponse(HttpResponse response) throws ParseException, IOException{ System.out.println("statusCode:"+response.getStatusLine().getStatusCode()); HeaderIterator headerIt = response.headerIterator(); while(headerIt.hasNext()){ Header header = headerIt.nextHeader(); System.out.println(header); } HttpEntity entity = response.getEntity(); System.out.println(EntityUtils.toString(entity)); } }
[ "weishao.zeng@gmail.com" ]
weishao.zeng@gmail.com
d036dd290c7230d384c62a70039ea742ebcd0c16
b3633e3ec170e10ffaf07f7125d1bc17ff2b462f
/Benchmarks/ph-commons-ph-commons-parent-pom-9.3.9-patched/ph-commons/src/main/java/com/helger/commons/io/file/FileSystemIterator.java
60c1ae938ac7b84f78856038bf50641e82a0b8d9
[ "Apache-2.0" ]
permissive
dliang2000/hierarchy_analysis
23c30460050a2451606adf28cc1e09fc101e7457
4083b4c9e0daaf519cd1c3f37c4379bf97da9329
refs/heads/master
2022-05-31T02:01:24.776781
2021-03-30T20:39:58
2021-03-30T20:39:58
231,459,166
1
0
null
2022-05-20T21:58:23
2020-01-02T21:03:00
Java
UTF-8
Java
false
false
1,997
java
/** * Copyright (C) 2014-2019 Philip Helger (www.helger.com) * philip[at]helger[dot]com * * 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.helger.commons.io.file; import java.io.File; import javax.annotation.Nonnull; import javax.annotation.concurrent.NotThreadSafe; import com.helger.commons.collection.iterate.IterableIterator; /** * Iterate over the content of a single directory. Iteration is <b>not</b> * recursive. * * @author Philip Helger */ @NotThreadSafe public final class FileSystemIterator extends IterableIterator <File> { /** * Constructor. * * @param sBaseDir * The base directory to iterate. May not be <code>null</code>. */ public FileSystemIterator (@Nonnull final String sBaseDir) { this (new File (sBaseDir)); } /** * Constructor. * * @param aBaseDir * The base directory to iterate. May not be <code>null</code>. */ public FileSystemIterator (@Nonnull final File aBaseDir) { super (FileHelper.getDirectoryContent (aBaseDir)); } /** * Constructor. * * @param aBaseDir * The base directory to iterate. May not be <code>null</code>. * @param sDirName * The directory name relative to the passed base directory. May not be * <code>null</code>. */ public FileSystemIterator (@Nonnull final File aBaseDir, @Nonnull final String sDirName) { super (FileHelper.getDirectoryContent (new File (aBaseDir, sDirName))); } }
[ "q8liang@uwaterloo.ca" ]
q8liang@uwaterloo.ca
9759627b24f71eb28732973dd7f82962957f7e8e
89dedd7f3c7acc81d12e2bcb2e716f9af9e5fa04
/chrome/android/javatests/src/org/chromium/chrome/browser/instantapps/InstantAppsHandlerTest.java
32a7a0d45ee1fb206981b6a1e8eec502f75a1c9c
[ "BSD-3-Clause" ]
permissive
bino7/chromium
8d26f84a1b6e38a73d1b97fea6057c634eff68cb
4666a6bb6fdcb1114afecf77bdaa239d9787b752
refs/heads/master
2022-12-22T14:31:53.913081
2016-09-06T10:05:11
2016-09-06T10:05:11
67,410,510
1
3
BSD-3-Clause
2022-12-17T03:08:52
2016-09-05T10:11:59
null
UTF-8
Java
false
false
5,680
java
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.instantapps; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.nfc.NfcAdapter; import android.provider.Browser; import android.test.InstrumentationTestCase; import android.test.suitebuilder.annotation.SmallTest; import org.chromium.base.ContextUtils; import org.chromium.chrome.browser.IntentHandler; /** * Unit tests for {@link InstantAppsHandler}. */ public class InstantAppsHandlerTest extends InstrumentationTestCase { private TestInstantAppsHandler mHandler; private Context mContext; private static final Uri URI = Uri.parse("http://sampleurl.com/foo"); private Intent createViewIntent() { return new Intent(Intent.ACTION_VIEW, URI); } @Override public void setUp() throws Exception { super.setUp(); mContext = getInstrumentation().getTargetContext(); mHandler = new TestInstantAppsHandler(); SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("applink.app_link_enabled", true); editor.putBoolean("applink.chrome_default_browser", true); editor.apply(); } @Override public void tearDown() throws Exception { ContextUtils.getAppSharedPreferences().edit().clear().apply(); super.tearDown(); } @SmallTest public void testInstantAppsDisabled_disabledByFlag() { SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("applink.app_link_enabled", false); editor.apply(); assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), false)); assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), true)); } @SmallTest public void testInstantAppsDisabled_incognito() { Intent i = createViewIntent(); i.putExtra(IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, true); assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); } @SmallTest public void testInstantAppsDisabled_doNotLaunch() { Intent i = createViewIntent(); i.putExtra("com.google.android.gms.instantapps.DO_NOT_LAUNCH_INSTANT_APP", true); assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); } @SmallTest public void testInstantAppsDisabled_dataReductionProxy() { SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("BANDWIDTH_REDUCTION_PROXY_ENABLED", true); editor.apply(); assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), false)); } @SmallTest public void testInstantAppsDisabled_mainIntent() { Intent i = new Intent(Intent.ACTION_MAIN); assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); } @SmallTest public void testInstantAppsDisabled_intentOriginatingFromChrome() { Intent i = createViewIntent(); i.putExtra(Browser.EXTRA_APPLICATION_ID, mContext.getPackageName()); assertFalse(mHandler.handleIncomingIntent(mContext, i, false)); Intent signedIntent = createViewIntent(); signedIntent.setPackage(mContext.getPackageName()); IntentHandler.addTrustedIntentExtras(signedIntent, mContext); assertFalse(mHandler.handleIncomingIntent(mContext, signedIntent, false)); } @SmallTest public void testChromeNotDefault() { SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("applink.chrome_default_browser", false); editor.apply(); assertFalse(mHandler.handleIncomingIntent(mContext, createViewIntent(), false)); // Even if Chrome is not default, launch Instant Apps for CustomTabs since those never // show disambiguation dialogs. Intent cti = createViewIntent() .putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", true); assertTrue(mHandler.handleIncomingIntent(mContext, cti, true)); } @SmallTest public void testInstantAppsEnabled() { Intent i = createViewIntent(); assertTrue(mHandler.handleIncomingIntent(getInstrumentation().getContext(), i, false)); // Check that identical intent wouldn't be enabled for CustomTab flow. assertFalse(mHandler.handleIncomingIntent(getInstrumentation().getContext(), i, true)); // Add CustomTab specific extra and check it's now enabled. i.putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", true); assertTrue(mHandler.handleIncomingIntent(getInstrumentation().getContext(), i, true)); } @SmallTest public void testNfcIntent() { Intent i = new Intent(NfcAdapter.ACTION_NDEF_DISCOVERED); i.setData(Uri.parse("http://instantapp.com/")); assertTrue(mHandler.handleIncomingIntent(getInstrumentation().getContext(), i, false)); } static class TestInstantAppsHandler extends InstantAppsHandler { @Override protected boolean tryLaunchingInstantApp(Context context, Intent intent, boolean isCustomTabsIntent, Intent fallbackIntent) { return true; } } }
[ "bino.zh@gmail.com" ]
bino.zh@gmail.com
a073e77a220319cf2f231aed8cc99ca5110bd16c
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.pde.ui/976.java
9fe90df068abbce7d57b0cbedf0a60525e80d6ba
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,478
java
/******************************************************************************* * Copyright (c) 2007, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.pde.api.tools.internal.provisional.scanner; import org.eclipse.osgi.util.NLS; public class ScannerMessages extends NLS { //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.pde.api.tools.internal.provisional.scanner.ScannerMessages"; public static String ApiDescriptionManager_0; public static String ApiDescriptionManager_1; public static String ApiDescriptionManager_2; public static String ApiDescriptionManager_3; public static String ApiDescriptionManager_4; public static String ComponentXMLScanner_0; public static String ComponentXMLScanner_1; public static String ComponentXMLScanner_2; public static String ComponentXMLScanner_3; static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, ScannerMessages.class); } private ScannerMessages() { } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
316ce609bf6e9a53893dd5e82ef46bc679abc0c7
e106ed1b19e8bb93e788da4e895c2bf29e89809e
/src/main/java/com/ylink/ylpay/common/project/otcbb/constant/BillCheckStatus.java
65b14e721cb28b93dae51561d294c46da73cad9e
[]
no_license
lf2035724/aucross-commons
ab691f93ac21bd2bdaa959fd492efd86d2591853
d2977749da24db8dc1db4ea6f42624c95991d0b2
refs/heads/master
2020-06-13T11:39:31.064143
2016-12-02T11:20:57
2016-12-02T11:21:02
75,385,027
0
2
null
null
null
null
UTF-8
Java
false
false
1,150
java
/** * 版权所有(C) 2013 证联融通 * 创建:jf.zhao 2013-5-14 */ package com.ylink.ylpay.common.project.otcbb.constant; import java.util.HashMap; import java.util.Map; /** * @author jf.zhao * @date 2013-5-14 * @description: */ public enum BillCheckStatus { NEW("00", "新建"), WAIT("01", "等待"), FAILURE("03", "失败"), SUCCESS("02", "数据准备完成"); private String value; private final String displayName; public String getValue() { return this.value; } public String getDisplayName() { return this.displayName; } BillCheckStatus(String value, String displayName) { this.value = value; this.displayName = displayName; } private static Map<String, BillCheckStatus> valueMap = new HashMap<String, BillCheckStatus>(); static { for (BillCheckStatus _enum : BillCheckStatus.values()) { valueMap.put(_enum.value, _enum); } } /** * 枚举转换 */ public static BillCheckStatus parseOf(String value) { for (BillCheckStatus item : values()) if (item.getValue().equals(value)) return item; throw new IllegalArgumentException("枚举值[" + value + "]不匹配!"); } }
[ "a2168885@sina.com" ]
a2168885@sina.com
d937c731589b1ded631110771d81b7bbd9ba7cc4
0f21b35272ae2527ff1ab95a258378d3fb8418eb
/DataStructure-J/src/main/java/cn/shuaijunlan/nowcoder/$2017/$04/$27/App3.java
22bfdeb62b8b185625a64758202d49a6486c3c8c
[]
no_license
ShuaiJunlan/java-learning
c1a92b41ba4ed1ff880e55a70330dd342dc6e8c6
ae5cbbf146e6c059b5cd613bcd095d7855a00f8e
refs/heads/master
2023-03-04T07:14:22.649266
2022-11-18T07:34:16
2022-11-18T07:34:16
162,292,537
4
0
null
2023-02-22T07:22:48
2018-12-18T13:29:13
Java
UTF-8
Java
false
false
251
java
package cn.shuaijunlan.nowcoder.$2017.$04.$27; /** * @author Junlan Shuai[shuaijunlan@gmail.com]. * @date Created on 20:39 2017/4/27. */ public class App3 { public static void main(String[] args) { System.out.print("6.00000"); } }
[ "shuaijunlan@gmail.com" ]
shuaijunlan@gmail.com
c2ccc1e9a177ae91ec4b417f7632ad75df7661eb
fd3f67368e7177cd5e8aed9e38a81fbfb9a1bbc8
/components/event-receiver/event-input-adapters/org.wso2.carbon.event.input.adapter.email/src/main/java/org/wso2/carbon/event/input/adapter/email/internal/util/EmailEventAdapterConstants.java
7420cc668f9cc6806e5043bc12969b9583a8f617
[ "Apache-2.0" ]
permissive
ayash/carbon-analytics-common
1a3ed2f6a9cf8e62ba569595db4d1465449580da
7722d5d7b6423d0a56f192b3e383fabd245cf2b6
refs/heads/master
2021-01-18T11:38:06.851127
2015-05-15T10:04:56
2015-05-15T10:04:56
32,130,853
0
0
null
2015-03-13T05:20:37
2015-03-13T05:20:37
null
UTF-8
Java
false
false
3,030
java
/* * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. 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.wso2.carbon.event.input.adapter.email.internal.util; public final class EmailEventAdapterConstants { private EmailEventAdapterConstants() { } public static final String ADAPTER_TYPE_EMAIL = "email"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_ADDRESS = "transport.mail.Address"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_ADDRESS_HINT = "transport.mail.Address.hint"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PROTOCOL = "transport.mail.Protocol"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PROTOCOL_HINT = "transport.mail.Protocol.hint"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_POLL_INTERVAL = "transport.PollInterval"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_POLL_INTERVAL_HINT = "transport.PollInterval.hint"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PROTOCOL_HOST = "mail.protocol.host"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PROTOCOL_HOST_HINT = "mail.protocol.host.hint"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PROTOCOL_PORT = "mail.protocol.port"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PROTOCOL_PORT_HINT = "mail.protocol.port.hint"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_USERNAME = "mail.protocol.user"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_USERNAME_HINT = "mail.protocol.user.hint"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PASSWORD = "mail.protocol.password"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_PASSWORD_HINT = "mail.protocol.password.hint"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_SOCKET_FACTORY_CLASS = "mail.protocol.socketFactory.class"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_SOCKET_FACTORY_FALLBACK = "mail.protocol.socketFactory.fallback"; public static final String ADAPTER_CONF_RECEIVING_EMAIL_TRANSPORT_NAME = "mailto"; public static final String ADAPTER_MESSAGE_RECEIVING_EMAIL_SUBJECT = "email.in.subject"; public static final String ADAPTER_MESSAGE_RECEIVING_EMAIL_SUBJECT_HINT = "email.in.subject.hint"; public static final String BROKER_CONF_EMAIL_PROTOCOL = "transport.mail.Protocol"; public static final int AXIS_TIME_INTERVAL_IN_MILLISECONDS = 10000; }
[ "shortyrules1990" ]
shortyrules1990
ddcae09484c0b7a43120acc6730fbdb0569412b7
afd8e1a90a2686d8dea5dfcc1a0f4c1d355f239d
/src/main/java/net/bitnine/agensbrowser/bundle/util/TokenUtil.java
57e2321acc2ca1f00f28c4b6562f3dfe0e6389ed
[]
no_license
lydon-GH/agensgraph-web
ba468c9a3bb6805c273d96a183e387259754ef5b
19b993445d816ea40d5796dd9f675efca05e62d7
refs/heads/main
2023-02-23T21:54:02.484585
2021-01-30T03:15:31
2021-01-30T03:15:31
333,812,631
1
0
null
null
null
null
UTF-8
Java
false
false
5,921
java
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package net.bitnine.agensbrowser.bundle.util; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import java.io.Serializable; import java.util.Date; import java.util.HashMap; import java.util.Map; import net.bitnine.agensbrowser.bundle.message.ClientDto; import org.springframework.beans.factory.annotation.Value; import org.springframework.mobile.device.Device; import org.springframework.stereotype.Component; @Component public class TokenUtil implements Serializable { private static final long serialVersionUID = -3301605591108950415L; static final String CLAIM_KEY_USERNAME = "sub"; static final String CLAIM_KEY_USERIP = "addr"; static final String CLAIM_KEY_AUDIENCE = "audience"; static final String CLAIM_KEY_CREATED = "created"; private static final String AUDIENCE_UNKNOWN = "unknown"; private static final String AUDIENCE_WEB = "web"; private static final String AUDIENCE_MOBILE = "mobile"; private static final String AUDIENCE_TABLET = "tablet"; @Value("${agens.jwt.secret}") private String secret; @Value("${agens.jwt.expiration}") private Long expiration; public TokenUtil() { } public String getUserNameFromToken(String token) { String userName; try { Claims claims = this.getClaimsFromToken(token); userName = claims.getSubject(); } catch (Exception var4) { userName = null; } return userName; } public String getUserIpFromToken(String token) { String userIp; try { Claims claims = this.getClaimsFromToken(token); userIp = new String((String)claims.get("addr")); } catch (Exception var4) { userIp = null; } return userIp; } public Date getCreatedDateFromToken(String token) { Date created; try { Claims claims = this.getClaimsFromToken(token); created = new Date((Long)claims.get("created")); } catch (Exception var4) { created = null; } return created; } public Date getExpirationDateFromToken(String token) { Date expiration; try { Claims claims = this.getClaimsFromToken(token); expiration = claims.getExpiration(); } catch (Exception var4) { expiration = null; } return expiration; } public String getAudienceFromToken(String token) { String audience; try { Claims claims = this.getClaimsFromToken(token); audience = (String)claims.get("audience"); } catch (Exception var4) { audience = null; } return audience; } private Claims getClaimsFromToken(String token) { Claims claims; try { claims = (Claims)Jwts.parser().setSigningKey(this.secret).parseClaimsJws(token).getBody(); } catch (Exception var4) { claims = null; } return claims; } private Date generateExpirationDate() { return new Date(System.currentTimeMillis() + this.expiration * 1000L); } private Boolean isTokenExpired(String token) { Date expiration = this.getExpirationDateFromToken(token); return expiration.before(new Date()); } private Boolean isCreatedBeforeLastPasswordReset(Date created, Date lastPasswordReset) { return lastPasswordReset != null && created.before(lastPasswordReset); } private static final String generateAudience(Device device) { String audience = "unknown"; if (device.isNormal()) { audience = "web"; } else if (device.isTablet()) { audience = "tablet"; } else if (device.isMobile()) { audience = "mobile"; } return audience; } private Boolean ignoreTokenExpiration(String token) { String audience = this.getAudienceFromToken(token); return "tablet".equals(audience) || "mobile".equals(audience); } public String generateToken(ClientDto client) { Map<String, Object> claims = new HashMap(); claims.put("sub", client.getUserName()); claims.put("addr", client.getUserIp()); claims.put("audience", generateAudience(client.getDevice())); claims.put("created", new Date()); return this.generateToken((Map)claims); } String generateToken(Map<String, Object> claims) { return Jwts.builder().setClaims(claims).setExpiration(this.generateExpirationDate()).signWith(SignatureAlgorithm.HS512, this.secret).compact(); } public Boolean canTokenBeRefreshed(String token, Date lastPasswordReset) { Date created = this.getCreatedDateFromToken(token); return !this.isCreatedBeforeLastPasswordReset(created, lastPasswordReset) && (!this.isTokenExpired(token) || this.ignoreTokenExpiration(token)); } public String refreshToken(String token) { String refreshedToken; try { Claims claims = this.getClaimsFromToken(token); claims.put("created", new Date()); refreshedToken = this.generateToken((Map)claims); } catch (Exception var4) { refreshedToken = null; } return refreshedToken; } public Boolean validateToken(String token, ClientDto client) { String userName = this.getUserNameFromToken(token); String userIp = this.getUserIpFromToken(token); String audience = this.getAudienceFromToken(token); return client.getUserName().equals(userName) && client.getUserIp().equals(userIp) && generateAudience(client.getDevice()).equals(audience) && !this.isTokenExpired(token) ? true : false; } }
[ "447172979@qq.com" ]
447172979@qq.com
fd55552a1977574883cfc57d3eca2c1e13fefa54
2e590ef886718e01d7ec58beff00a28d7aa9a366
/source-code/java/dv/src/gov/nasa/kepler/dv/io/DvGhostDiagnosticResults.java
eb3dafdaa9547d12af51e84dc222c70f55341e14
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
adam-sweet/kepler-pipeline
95a6cbc03dd39a8289b090fb85cdfc1eb5011fd9
f58b21df2c82969d8bd3e26a269bd7f5b9a770e1
refs/heads/master
2022-06-07T21:22:33.110291
2020-05-06T01:12:08
2020-05-06T01:12:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,254
java
/* * Copyright 2017 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. * All Rights Reserved. * * This file is available under the terms of the NASA Open Source Agreement * (NOSA). You should have received a copy of this agreement with the * Kepler source code; see the file NASA-OPEN-SOURCE-AGREEMENT.doc. * * No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY * WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, * INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE * WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM * INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR * FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM * TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, * CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT * OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY * OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE. * FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES * REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, * AND DISTRIBUTES IT "AS IS." * * Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS * AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND * SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF * THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, * EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM * PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT * SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED * STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY * PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE * REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL * TERMINATION OF THIS AGREEMENT. */ package gov.nasa.kepler.dv.io; import gov.nasa.spiffy.common.persistable.Persistable; /** * Ghost diagnostic results. * * @author Bill Wohler */ public class DvGhostDiagnosticResults implements Persistable { private DvStatistic coreApertureCorrelationStatistic = new DvStatistic(); private DvStatistic haloApertureCorrelationStatistic = new DvStatistic(); /** * Creates a {@link DvGhostDiagnosticResults}. For use only by * serialization, mock objects and Hibernate. */ public DvGhostDiagnosticResults() { } /** * Creates a new immutable {@link DvGhostDiagnosticResults} object. */ public DvGhostDiagnosticResults( DvStatistic coreApertureCorrelationStatistic, DvStatistic haloApertureCorrelationStatistic) { this.coreApertureCorrelationStatistic = coreApertureCorrelationStatistic; this.haloApertureCorrelationStatistic = haloApertureCorrelationStatistic; } public DvStatistic getCoreApertureCorrelationStatistic() { return coreApertureCorrelationStatistic; } public DvStatistic getHaloApertureCorrelationStatistic() { return haloApertureCorrelationStatistic; } }
[ "Bill.Wohler@nasa.gov" ]
Bill.Wohler@nasa.gov
0f712afdfe54d6d531fd9cb47659c7ca8145c295
2f92dfff9b9929b64e645fdc254815d06bf2b8d2
/src/main/lee/code/code_171__Excel_Sheet_Column_Number/MainTest.java
2bcdcc81fb2793d219cff7c208a3fa7e241f6bbf
[ "MIT" ]
permissive
code543/leetcodequestions
fc5036d63e4c3e1b622fe73552fb33c039e63fb0
44cbfe6718ada04807b6600a5d62b9f0016d4ab2
refs/heads/master
2020-04-05T19:43:15.530768
2018-12-07T04:09:07
2018-12-07T04:09:07
157,147,529
1
0
null
null
null
null
UTF-8
Java
false
false
810
java
package lee.code.code_171__Excel_Sheet_Column_Number; import java.util.*; import lee.util.*; /** * * * 171.Excel Sheet Column Number * * difficulty: Easy * @see https://leetcode.com/problems/excel-sheet-column-number/description/ * @see description_171.md * @Similiar Topics * -->Math https://leetcode.com//tag/math * @Similiar Problems * -->Excel Sheet Column Title https://leetcode.com//problems/excel-sheet-column-title * Run solution from Unit Test: * @see lee.codetest.code_171__Excel_Sheet_Column_Number.CodeTest * Run solution from Main Judge Class: * @see lee.code.code_171__Excel_Sheet_Column_Number.C171_MainClass * */ /** testcase:"A" */ public class MainTest { public static void main(String[] args) { //new Solution().titleToNumber(Strings); } }
[ "santoschenwbu@gmail.com" ]
santoschenwbu@gmail.com
8647addb91261793ef5cb99102a4459b1aadb3c2
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_6377668744314880_0/java/kongbomb/C.java
43af5033fac79c0575ecf74048d2ea80564e3b9e
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
2,244
java
package running; import org.psjava.algo.geometry.convexhull.ConvexHullAlgorithm; import org.psjava.ds.array.Array; import org.psjava.ds.array.DynamicArray; import org.psjava.ds.geometry.Point2D; import org.psjava.ds.geometry.Polygon2D; import org.psjava.ds.numbersystrem.LongNumberSystem; import org.psjava.ds.set.Set; import org.psjava.ds.set.SetFromIterable; import org.psjava.formula.geometry.StraightOrder; import org.psjava.goods.GoodConvexHullAlgorithm; import org.psjava.util.SubSetIterable; import org.psjava.util.ZeroTo; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.util.Scanner; public class C implements Runnable { public static final ConvexHullAlgorithm CONVEX_HULL_ALGORITHM = GoodConvexHullAlgorithm.getInstance(); public static final LongNumberSystem NS = LongNumberSystem.getInstance(); @Override public void run() { Scanner in = new Scanner(System.in); int casen = in.nextInt(); for(int casei : ZeroTo.get(casen)) { System.out.println("Case #" + (casei + 1) + ": "); int n = in.nextInt(); DynamicArray<Point2D<Long>> points = DynamicArray.create(); for(int i : ZeroTo.get(n)) points.addToLast(Point2D.create(in.nextLong(), in.nextLong())); for(Point2D<Long> p : points) { int min = n-1; for (Iterable<Point2D<Long>> sub : SubSetIterable.create(points)) { Set<Point2D<Long>> subset = SetFromIterable.create(sub); int candidate = n - subset.size(); if(subset.size() > 0 && candidate < min) { Polygon2D<Long> convexHull = CONVEX_HULL_ALGORITHM.calc(subset, NS); if(isOnHull(p, convexHull)) min = candidate; } } System.out.println(min); } } } private boolean isOnHull(Point2D<Long> p, Polygon2D<Long> convexHull) { Array<Point2D<Long>> points = convexHull.getCCWOrderPoints(); for(int k : ZeroTo.get(points.size())) if (StraightOrder.is(points.get(k), p, points.get((k + 1) % points.size()), NS)) return true; return false; } public static void main(String[] args) throws Exception { System.setIn(new BufferedInputStream(new FileInputStream("solutions/running-io/C-small-attempt2.in"))); new C().run(); } }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
0aa59ca1821ff67ee31a2aa93022931aa68f4dcf
eace11a5735cfec1f9560e41a9ee30a1a133c5a9
/CMT/cptiscas/程序变异体的backup/改名前/FineGrainedHeap/RCXC_remove7/FineGrainedHeap.java
e257b84bb6edf1bf4409cd1337a5eff4e8e58d5a
[]
no_license
phantomDai/mypapers
eb2fc0fac5945c5efd303e0206aa93d6ac0624d0
e1aa1236bbad5d6d3b634a846cb8076a1951485a
refs/heads/master
2021-07-06T18:27:48.620826
2020-08-19T12:17:03
2020-08-19T12:17:03
162,563,422
0
1
null
null
null
null
UTF-8
Java
false
false
5,547
java
/* * FineGrainedHeap.java * * Created on March 10, 2007, 10:45 AM * * From "Multiprocessor Synchronization and Concurrent Data Structures", * by Maurice Herlihy and Nir Shavit. * Copyright 2007 Elsevier Inc. All rights reserved. */ package mutants.FineGrainedHeap.RCXC_remove7; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * Heap with fine-grained locking and arbitrary priorities. * @param T type manged by heap * @author mph */ public class FineGrainedHeap<T> implements PQueue<T> { private static int ROOT = 1; private static int NO_ONE = -1; private Lock heapLock; int next; HeapNode<T>[] heap; /** * Constructor * @param capacity maximum number of items heap can hold */ @SuppressWarnings(value = "unchecked") public FineGrainedHeap(int capacity) { heapLock = new ReentrantLock(); next = ROOT; heap = (HeapNode<T>[]) new HeapNode[capacity + 1]; for (int i = 0; i < capacity + 1; i++) { heap[i] = new HeapNode<T>(); } } /** * Add item to heap. * @param item Uninterpreted item. * @param priority item priority */ public void add(T item, int priority) { heapLock.lock(); int child = next++; heap[child].lock(); heapLock.unlock(); heap[child].init(item, priority); heap[child].unlock(); while (child > ROOT) { int parent = child / 2; heap[parent].lock(); heap[child].lock(); int oldChild = child; try { if (heap[parent].tag == Status.AVAILABLE && heap[child].amOwner()) { if (heap[child].score < heap[parent].score) { swap(child, parent); child = parent; } else { heap[child].tag = Status.AVAILABLE; heap[child].owner = NO_ONE; return; } } else if (!heap[child].amOwner()) { child = parent; } } finally { heap[oldChild].unlock(); heap[parent].unlock(); } } if (child == ROOT) { heap[ROOT].lock(); if (heap[ROOT].amOwner()) { heap[ROOT].tag = Status.AVAILABLE; heap[child].owner = NO_ONE; } heap[ROOT].unlock(); } } /** * Returns and removes lowest-priority item in heap. * @return lowest-priority item. */ public T removeMin() { heapLock.lock(); int bottom = --next; heap[bottom].lock(); heap[ROOT].lock(); heapLock.unlock(); if (heap[ROOT].tag == Status.EMPTY) { heap[ROOT].unlock(); heap[bottom].lock(); return null; } T item = heap[ROOT].item; heap[ROOT].tag = Status.EMPTY; swap(bottom, ROOT); heap[bottom].owner = NO_ONE; heap[bottom].unlock(); if (heap[ROOT].tag == Status.EMPTY) { heap[ROOT].unlock(); return item; } int child = 0; int parent = ROOT; while (parent < heap.length / 2) { int left = parent * 2; int right = (parent * 2) + 1; heap[left].lock(); heap[right].lock(); if (heap[left].tag == Status.EMPTY) { heap[right].unlock(); heap[left].unlock(); break; } else if (heap[right].tag == Status.EMPTY || heap[left].score < heap[right].score) { heap[right].unlock(); child = left; } else { heap[left].unlock(); child = right; } if (heap[child].score < heap[parent].score) { swap(parent, child); heap[parent].unlock(); parent = child; } else { //heap[child].unlock(); break; } } heap[parent].unlock(); return item; } private void swap(int i, int j) { int _owner = heap[i].owner; heap[i].owner = heap[j].owner; heap[j].owner = _owner; T _item = heap[i].item; heap[i].item = heap[j].item; heap[j].item = _item; int _priority = heap[i].score; heap[i].score = heap[j].score; heap[j].score = _priority; Status _tag = heap[i].tag; heap[i].tag = heap[j].tag; heap[j].tag = _tag; } public void sanityCheck() { int stop = next; for (int i = ROOT; i < stop; i++) { int left = i * 2; int right = (i * 2) + 1; if (left < stop && heap[left].score < heap[i].score) { System.out.println("Heap property violated:"); System.out.printf("\theap[%d] = %d, left child heap[%d] = %d\n", i, heap[i].score, left, heap[left].score); } if (right < stop && heap[right].score < heap[i].score) { System.out.println("Heap property violated:"); System.out.printf("\theap[%d] = %d, right child heap[%d] = %d\n", i, heap[i].score, right, heap[right].score); } } } private static enum Status { EMPTY, AVAILABLE, BUSY } private static class HeapNode<S> { Status tag; int score; S item; int owner; Lock lock; /** * initialize node * @param myItem * @param myPriority */ public void init(S myItem, int myPriority) { item = myItem; score = myPriority; tag = Status.BUSY; owner = ThreadID.get(); } public HeapNode() { tag = Status.EMPTY; lock = new ReentrantLock(); } public void lock() { lock.lock(); } public void unlock() { lock.unlock(); } public boolean amOwner() { switch (tag) { case EMPTY: return false; case AVAILABLE: return false; case BUSY: return owner == ThreadID.get(); } return false; // not reached } } }
[ "daihepeng@sina.cn" ]
daihepeng@sina.cn
808f440426b82ebd1906b464cca7a2e75a7c417f
9c2b23a2d6da1e762400ae963c1f787c3121eb89
/core/com.hundsun.ares.studio.jres.script.api/src/com/hundsun/ares/studio/jres/script/api/model/IJSONModel.java
28c34f02768f3d8d567fa3e4d2f906cf088bd519
[ "MIT" ]
permissive
zhuyf03516/ares-studio
5d67757283a52e51100666c9ce35227a63656f0e
5648b0f606cb061d06c39ac25b7b206f3307882f
refs/heads/master
2021-01-11T11:31:51.436304
2016-08-11T10:56:31
2016-08-11T10:56:31
65,444,199
0
0
null
2016-08-11T06:24:33
2016-08-11T06:24:32
null
GB18030
Java
false
false
285
java
/** * <p>Copyright: Copyright (c) 2012</p> * <p>Company: 恒生电子股份有限公司</p> */ package com.hundsun.ares.studio.jres.script.api.model; /** * @author lvgao * */ public interface IJSONModel { /** * 转换为JSON数据 * @return */ public String toJSON(); }
[ "zhuyf@hundsun.com" ]
zhuyf@hundsun.com
a7b36970f94fc50cb342634788edb2f5d8e09893
9ae5965121f143fa5a5781b413d686311b734a2c
/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAElement.java
b6cee68102c3985241680b62b0982c96df08ceac
[ "EPL-2.0", "MIT", "EPL-1.0", "LGPL-2.0-or-later", "LicenseRef-scancode-unknown-license-reference", "MPL-2.0", "CDDL-1.1", "Apache-2.0", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
andre-becker/XLT
41395ec5b673193412b26df35cc64e05ac55c9b4
174f9f467ab3094bcdbf80bcea818134a9d1180a
refs/heads/master
2022-04-21T09:20:03.443914
2020-03-12T09:48:41
2020-03-12T09:48:41
257,584,910
0
0
Apache-2.0
2020-04-21T12:14:39
2020-04-21T12:14:38
null
UTF-8
Java
false
false
1,345
java
/* * Copyright (c) 2002-2020 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.javascript.host.svg; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; import com.gargoylesoftware.htmlunit.svg.SvgAnchor; /** * A JavaScript object for {@code SVGAElement}. * * @author Ahmed Ashour */ @JsxClass(domClass = SvgAnchor.class) public class SVGAElement extends SVGGraphicsElement { /** * Creates an instance. */ @JsxConstructor({CHROME, FF}) public SVGAElement() { } }
[ "4639399+jowerner@users.noreply.github.com" ]
4639399+jowerner@users.noreply.github.com
ece85ce5ac5119b9b3b31940363c0beb3dee482f
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/drjava_cluster/15883/tar_1.java
9c6e57cc09ee255025921b4927ae7dcc55a6ac1f
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,451
java
/*BEGIN_COPYRIGHT_BLOCK * * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu) * 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 names of DrJava, the JavaPLT group, Rice University, 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. * * This software is Open Source Initiative approved Open Source Software. * Open Source Initative Approved is a trademark of the Open Source Initiative. * * This file is part of DrJava. Download the current version of this project * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/ * * END_COPYRIGHT_BLOCK*/ package edu.rice.cs.javalanglevels; import edu.rice.cs.javalanglevels.tree.*; import edu.rice.cs.javalanglevels.parser.JExprParser; import java.util.*; import junit.framework.TestCase; /** Represents the data for an instantiation of a class. When you actually create an object of some type, * an InstanceData represents what you have created. Each InstanceData has a pointer to the SymbolData of its * class type. */ public class InstanceData extends TypeData { /**The class corresponding to this InstanceData*/ private SymbolData _classSymbolData; /*@param classSD The SymbolData this is an instance of*/ public InstanceData(SymbolData classSD) { super(null); _classSymbolData = classSD; _name = classSD.getName(); } /**@return true since this is an InstanceData.*/ public boolean isInstanceType() { return true; } /**@return The class SymbolData corresponding to the class of this InstanceData.*/ public SymbolData getSymbolData() { return _classSymbolData; } /**@return this InstanceData.*/ public InstanceData getInstanceData() { return this; } public String toString() { return "An instance of type '" + _classSymbolData +"'"; } public boolean equals(Object o) { return o != null && o.getClass() == getClass() && ((InstanceData)o)._classSymbolData.equals(_classSymbolData); } public int hashCode() { return _classSymbolData.hashCode(); } }
[ "375833274@qq.com" ]
375833274@qq.com
3e7331a2317282a435d6d4a8623c608598bdf0af
f5329b59547e7faf602f3f9c8e30a5b258a9c298
/app/src/main/java/com/lx/hd/bean/MoRenQiDianAddressEntity.java
4d5e39769b8e6018b6d10773b896a3b3199b11ae
[ "Apache-2.0" ]
permissive
zyhchinese/huodi_huzhu
009139e0694e029cb818bfe7fcd2915e8b7e94b8
334ea5ff558b47b81f8b4689bce1311c5c4f068e
refs/heads/master
2020-03-26T10:17:05.402625
2018-09-04T01:23:28
2018-09-04T01:23:28
144,789,869
3
0
null
null
null
null
UTF-8
Java
false
false
7,806
java
package com.lx.hd.bean; import java.util.List; /** * Created by 赵英辉 on 2018/6/13. */ public class MoRenQiDianAddressEntity { /** * flag : 200 * msg : 查询成功 * response : [{"custinfo":[{"id":61,"name":"送给","call":"17606401400","isdefault":0}],"saddlist":[{"id":62,"slongitude":"117.22173392772675","slatitude":"36.669316052970146","saddress":"山东省济南市历城区港沟街道济南药谷济南综合保税区(港兴一路)","sprovince":"山东省","scity":"济南市","scounty":"历城区","isdefault":0}],"eaddlist":[{"id":63,"elongitude":"117.20937967300415","elatitude":"36.66130386704049","eaddress":"山东省济南市历城区港沟街道G2京沪高速济南综合保税区(港兴一路)","eprovince":"山东省","ecity":"济南市","ecounty":"历城区","isdefault":0}]}] */ private int flag; private String msg; private List<ResponseBean> response; public int getFlag() { return flag; } public void setFlag(int flag) { this.flag = flag; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public List<ResponseBean> getResponse() { return response; } public void setResponse(List<ResponseBean> response) { this.response = response; } public static class ResponseBean { private List<CustinfoBean> custinfo; private List<SaddlistBean> saddlist; private List<EaddlistBean> eaddlist; public List<CustinfoBean> getCustinfo() { return custinfo; } public void setCustinfo(List<CustinfoBean> custinfo) { this.custinfo = custinfo; } public List<SaddlistBean> getSaddlist() { return saddlist; } public void setSaddlist(List<SaddlistBean> saddlist) { this.saddlist = saddlist; } public List<EaddlistBean> getEaddlist() { return eaddlist; } public void setEaddlist(List<EaddlistBean> eaddlist) { this.eaddlist = eaddlist; } public static class CustinfoBean { /** * id : 61 * name : 送给 * call : 17606401400 * isdefault : 0 */ private int id; private String name; private String call; private int isdefault; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCall() { return call; } public void setCall(String call) { this.call = call; } public int getIsdefault() { return isdefault; } public void setIsdefault(int isdefault) { this.isdefault = isdefault; } } public static class SaddlistBean { /** * id : 62 * slongitude : 117.22173392772675 * slatitude : 36.669316052970146 * saddress : 山东省济南市历城区港沟街道济南药谷济南综合保税区(港兴一路) * sprovince : 山东省 * scity : 济南市 * scounty : 历城区 * isdefault : 0 */ private int id; private String slongitude; private String slatitude; private String saddress; private String sprovince; private String scity; private String scounty; private int isdefault; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getSlongitude() { return slongitude; } public void setSlongitude(String slongitude) { this.slongitude = slongitude; } public String getSlatitude() { return slatitude; } public void setSlatitude(String slatitude) { this.slatitude = slatitude; } public String getSaddress() { return saddress; } public void setSaddress(String saddress) { this.saddress = saddress; } public String getSprovince() { return sprovince; } public void setSprovince(String sprovince) { this.sprovince = sprovince; } public String getScity() { return scity; } public void setScity(String scity) { this.scity = scity; } public String getScounty() { return scounty; } public void setScounty(String scounty) { this.scounty = scounty; } public int getIsdefault() { return isdefault; } public void setIsdefault(int isdefault) { this.isdefault = isdefault; } } public static class EaddlistBean { /** * id : 63 * elongitude : 117.20937967300415 * elatitude : 36.66130386704049 * eaddress : 山东省济南市历城区港沟街道G2京沪高速济南综合保税区(港兴一路) * eprovince : 山东省 * ecity : 济南市 * ecounty : 历城区 * isdefault : 0 */ private int id; private String elongitude; private String elatitude; private String eaddress; private String eprovince; private String ecity; private String ecounty; private int isdefault; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getElongitude() { return elongitude; } public void setElongitude(String elongitude) { this.elongitude = elongitude; } public String getElatitude() { return elatitude; } public void setElatitude(String elatitude) { this.elatitude = elatitude; } public String getEaddress() { return eaddress; } public void setEaddress(String eaddress) { this.eaddress = eaddress; } public String getEprovince() { return eprovince; } public void setEprovince(String eprovince) { this.eprovince = eprovince; } public String getEcity() { return ecity; } public void setEcity(String ecity) { this.ecity = ecity; } public String getEcounty() { return ecounty; } public void setEcounty(String ecounty) { this.ecounty = ecounty; } public int getIsdefault() { return isdefault; } public void setIsdefault(int isdefault) { this.isdefault = isdefault; } } } }
[ "ying1004031972@163.com" ]
ying1004031972@163.com
2581e8130fa9503fbaa98fecec2763a8bbfe736f
df350c55817b70356488e78f5a17ee29fbea363c
/02BusinessLayer/demoproject/src/main/java/com/example/demoproject/Customer.java
55eb6bb982d13fa10cf4b11cafa3b7ef7215e593
[]
no_license
puneetvashisht/fsdcapsule_java
9897204dfa6e0ebcdc43a7c92f9fc623a53a5b03
ee7371aa0ef369f4b6e42c47b99af88da6dae580
refs/heads/master
2020-03-19T07:18:16.719741
2018-06-20T01:36:47
2018-06-20T01:36:47
136,103,290
0
2
null
null
null
null
UTF-8
Java
false
false
550
java
package com.example.demoproject; import org.springframework.data.annotation.Id; public class Customer { @Id public String id; public String firstName; public String lastName; public Customer() {} public Customer(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } @Override public String toString() { return String.format( "Customer[id=%s, firstName='%s', lastName='%s']", id, firstName, lastName); } }
[ "puneetvashsiht@gmail.com" ]
puneetvashsiht@gmail.com
a1256cb26d80d32331c634509f1e30a7c3571787
8c1ebcf2aabda6315cbaad3c6f9f9e72b609ca54
/kubernetes-model-generator/kubernetes-model-gatewayapi/src/generated/java/io/fabric8/kubernetes/api/model/gatewayapi/v1beta1/ReferenceGrantTo.java
177dc5848b2ecad1a8252b63b65d49b782a73dec
[ "Apache-2.0" ]
permissive
akram/kubernetes-client
154969ce0aee87223bb3d5f6fb89f5e7d5f4d163
449d06bc447f2b621149b20312235d2d28460873
refs/heads/master
2023-08-08T20:59:09.663361
2023-06-22T11:58:02
2023-06-22T13:46:14
197,317,669
0
3
Apache-2.0
2023-07-03T08:10:43
2019-07-17T04:54:52
Java
UTF-8
Java
false
false
3,733
java
package io.fabric8.kubernetes.api.model.gatewayapi.v1beta1; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; import lombok.EqualsAndHashCode; import lombok.Setter; import lombok.ToString; import lombok.experimental.Accessors; @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "apiVersion", "kind", "metadata", "group", "name" }) @ToString @EqualsAndHashCode @Setter @Accessors(prefix = { "_", "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) }) public class ReferenceGrantTo implements KubernetesResource { @JsonProperty("group") private String group; @JsonProperty("kind") private String kind; @JsonProperty("name") private String name; @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<String, Object>(); /** * No args constructor for use in serialization * */ public ReferenceGrantTo() { } /** * * @param kind * @param name * @param group */ public ReferenceGrantTo(String group, String kind, String name) { super(); this.group = group; this.kind = kind; this.name = name; } @JsonProperty("group") public String getGroup() { return group; } @JsonProperty("group") public void setGroup(String group) { this.group = group; } @JsonProperty("kind") public String getKind() { return kind; } @JsonProperty("kind") public void setKind(String kind) { this.kind = kind; } @JsonProperty("name") public String getName() { return name; } @JsonProperty("name") public void setName(String name) { this.name = name; } @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
[ "marc@marcnuri.com" ]
marc@marcnuri.com
177ce2972b33b68af313a6c57781f5e6d86e8507
1fbc7b819ded0824d28f4e24465b023e30c1f421
/core/src/main/java/org/mini2Dx/core/font/MonospaceGameFontCache.java
c6d1bd45f16c884b267a99bc95d37f3c3a348da7
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
mini2Dx/mini2Dx
959bfce4690f54cce68c9e8bb68328d2d48eaeaa
93a5c6cb59ff186926ca7005604aad5e707a7656
refs/heads/master
2023-09-03T14:37:58.044965
2023-08-19T18:47:09
2023-08-19T18:47:09
8,236,056
543
76
Apache-2.0
2022-12-05T21:53:34
2013-02-16T13:27:08
Java
UTF-8
Java
false
false
3,191
java
/******************************************************************************* * Copyright 2019 See AUTHORS file * * 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.mini2Dx.core.font; import org.mini2Dx.core.Graphics; import org.mini2Dx.core.Mdx; import org.mini2Dx.core.graphics.Color; import org.mini2Dx.core.util.Align; import org.mini2Dx.gdx.utils.Array; public class MonospaceGameFontCache implements GameFontCache { private final Array<MonospaceGlyph> glyphs = new Array<MonospaceGlyph>(); private final MonospaceGameFont monospaceFont; private final MonospaceFontGlyphLayout glyphLayout; private final Color color = Mdx.graphics.newColor(0f, 0f, 0f, 1f); private float x, y; public MonospaceGameFontCache(MonospaceGameFont monospaceFont) { super(); this.monospaceFont = monospaceFont; glyphLayout = new MonospaceFontGlyphLayout(monospaceFont); } @Override public void addText(CharSequence str, float x, float y) { glyphLayout.setText(str, color, -1f, Align.LEFT, true); glyphLayout.transferGlyphsTo(glyphs, x, y); } @Override public void addText(CharSequence str, float x, float y, float targetWidth, int halign, boolean wrap) { glyphLayout.setText(str, color, targetWidth, halign, wrap); glyphLayout.transferGlyphsTo(glyphs, x, y); } @Override public void clear() { while(glyphs.size > 0) { final MonospaceGlyph glyph = glyphs.removeIndex(0); glyph.release(); } } @Override public void draw(Graphics g) { monospaceFont.draw(g, glyphs, x, y, null); } @Override public Color getColor() { return color; } @Override public void setColor(Color color) { this.color.set(color); } @Override public void setAllColors(Color color) { for(int i = 0; i < glyphs.size; i++) { glyphs.get(i).color.set(color); } } @Override public void setAllAlphas(float alpha) { for(int i = 0; i < glyphs.size; i++) { glyphs.get(i).color.setA(alpha); } } @Override public void setText(CharSequence str, float x, float y) { clear(); glyphLayout.setText(str, color, -1f, Align.LEFT, true); glyphLayout.transferGlyphsTo(glyphs, x, y); } @Override public void setText(CharSequence str, float x, float y, float targetWidth, int halign, boolean wrap) { clear(); glyphLayout.setText(str, color, targetWidth, halign, wrap); glyphLayout.transferGlyphsTo(glyphs, x, y); } @Override public void translate(float x, float y) { this.x += x; this.y += y; } @Override public void setPosition(float x, float y) { this.x = x; this.y = y; } @Override public GameFont getFont() { return monospaceFont; } }
[ "thomascashman404@gmail.com" ]
thomascashman404@gmail.com
3fa8a51691b7feb6271c391d469148e73469cffa
b3a694913d943bdb565fbf828d6ab8a08dd7dd12
/sources/com/google/crypto/tink/proto/EllipticCurveType.java
aa9c710ed90e32f5d21f619134d86edccbd00847
[]
no_license
v1ckxy/radar-covid
feea41283bde8a0b37fbc9132c9fa5df40d76cc4
8acb96f8ccd979f03db3c6dbfdf162d66ad6ac5a
refs/heads/master
2022-12-06T11:29:19.567919
2020-08-29T08:00:19
2020-08-29T08:00:19
294,198,796
1
0
null
2020-09-09T18:39:43
2020-09-09T18:39:43
null
UTF-8
Java
false
false
2,392
java
package com.google.crypto.tink.proto; import p213q.p217b.p301c.p302a.p311j0.p312a.C3594b0.C3597c; import p213q.p217b.p301c.p302a.p311j0.p312a.C3594b0.C3598d; import p213q.p217b.p301c.p302a.p311j0.p312a.C3594b0.C3599e; public enum EllipticCurveType implements C3597c { UNKNOWN_CURVE(0), NIST_P256(2), NIST_P384(3), NIST_P521(4), CURVE25519(5), UNRECOGNIZED(-1); public static final int CURVE25519_VALUE = 5; public static final int NIST_P256_VALUE = 2; public static final int NIST_P384_VALUE = 3; public static final int NIST_P521_VALUE = 4; public static final int UNKNOWN_CURVE_VALUE = 0; public static final C3598d<EllipticCurveType> internalValueMap = null; public final int value; public static final class EllipticCurveTypeVerifier implements C3599e { public static final C3599e INSTANCE = null; static { INSTANCE = new EllipticCurveTypeVerifier(); } public boolean isInRange(int i) { return EllipticCurveType.forNumber(i) != null; } } /* access modifiers changed from: public */ static { internalValueMap = new C3598d<EllipticCurveType>() { public EllipticCurveType findValueByNumber(int i) { return EllipticCurveType.forNumber(i); } }; } /* access modifiers changed from: public */ EllipticCurveType(int i) { this.value = i; } public static EllipticCurveType forNumber(int i) { if (i == 0) { return UNKNOWN_CURVE; } if (i == 2) { return NIST_P256; } if (i == 3) { return NIST_P384; } if (i == 4) { return NIST_P521; } if (i != 5) { return null; } return CURVE25519; } public static C3598d<EllipticCurveType> internalGetValueMap() { return internalValueMap; } public static C3599e internalGetVerifier() { return EllipticCurveTypeVerifier.INSTANCE; } @Deprecated public static EllipticCurveType valueOf(int i) { return forNumber(i); } public final int getNumber() { if (this != UNRECOGNIZED) { return this.value; } throw new IllegalArgumentException("Can't get the number of an unknown enum value."); } }
[ "josemmoya@outlook.com" ]
josemmoya@outlook.com
b10b95debcd0fad3368b0bd71da0ce24b166ed26
692a7b9325014682d72bd41ad0af2921a86cf12e
/iZhejiang/src/org/jivesoftware/smack/packet/RosterPacket$Item.java
dea680db098a6aa2fd26e85deeb289497293af24
[]
no_license
syanle/WiFi
f76fbd9086236f8a005762c1c65001951affefb6
d58fb3d9ae4143cbe92f6f893248e7ad788d3856
refs/heads/master
2021-01-20T18:39:13.181843
2015-10-29T12:38:57
2015-10-29T12:38:57
45,156,955
0
0
null
null
null
null
UTF-8
Java
false
false
2,610
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.jivesoftware.smack.packet; import java.util.Collections; import java.util.Iterator; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; import org.jivesoftware.smack.util.StringUtils; // Referenced classes of package org.jivesoftware.smack.packet: // RosterPacket public static class itemStatus { private final Set groupNames = new CopyOnWriteArraySet(); private tatus itemStatus; private ype itemType; private String name; private String user; public void addGroupName(String s) { groupNames.add(s); } public Set getGroupNames() { return Collections.unmodifiableSet(groupNames); } public tatus getItemStatus() { return itemStatus; } public ype getItemType() { return itemType; } public String getName() { return name; } public String getUser() { return user; } public void removeGroupName(String s) { groupNames.remove(s); } public void setItemStatus(tatus tatus) { itemStatus = tatus; } public void setItemType(ype ype) { itemType = ype; } public void setName(String s) { name = s; } public String toXML() { StringBuilder stringbuilder = new StringBuilder(); stringbuilder.append("<item jid=\"").append(user).append("\""); if (name != null) { stringbuilder.append(" name=\"").append(StringUtils.escapeForXML(name)).append("\""); } if (itemType != null) { stringbuilder.append(" subscription=\"").append(itemType).append("\""); } if (itemStatus != null) { stringbuilder.append(" ask=\"").append(itemStatus).append("\""); } stringbuilder.append(">"); Iterator iterator = groupNames.iterator(); do { if (!iterator.hasNext()) { stringbuilder.append("</item>"); return stringbuilder.toString(); } String s = (String)iterator.next(); stringbuilder.append("<group>").append(StringUtils.escapeForXML(s)).append("</group>"); } while (true); } public ype(String s, String s1) { user = s.toLowerCase(); name = s1; itemType = null; itemStatus = null; } }
[ "arehigh@gmail.com" ]
arehigh@gmail.com
ecb0016b6b01e5ceb73630843cb45e317e1c13ce
29ec18aaf1fc9fca5e35848f2f0e89bc11361193
/bdms-root/.svn/pristine/f1/f1f936659e3c9ebb5ced27fdf1323045f01eb49c.svn-base
c534e4f4fd8fdb11e0dd149161b4a5ed45c80193
[]
no_license
ichoukou/bdms-root
847417eb2950a11f39e5b85d9f22755d1d1bb5f3
e64302419f4f51bf4fdf372ec340776c859755aa
refs/heads/master
2020-04-19T18:37:02.777154
2018-02-27T06:22:34
2018-02-27T06:22:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,074
package com.bdms.dams.wifi.service; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import com.bdms.hbase.service.HbaseService; import com.bdms.hbse.enums.ResultType; import com.bdms.hbse.enums.Wifi2Meta; import com.bdms.dams.criterion.service.CriterionService; import com.bdms.dams.util.AxisUtil; import com.bdms.dams.wifi.dao.WifiDataDao; import com.bdms.entity.dams.Criterion; import com.bdms.entity.dams.WifiData; @Service("wifiDataService") public class WifiDataServiceImpl implements WifiDataService{ private static final Logger LOG = LoggerFactory.getLogger(WifiDataServiceImpl.class); @PersistenceContext private EntityManager entityManager; @Autowired private WifiDataDao wifiDataDao; @Autowired private HbaseService hbaseService; @Autowired private CriterionService criterionService; private final static String wifiMysqlConfigPropertiesPath = "system/wifimysql-config.properties"; static PropertiesConfiguration propertiesConfig=null; @Override public List<WifiData> getStations() { // TODO Auto-generated method stub return wifiDataDao.findAll(); } public Map<String, Object> getWifi2DayDataForHighchart(String apNameAndTimeStr) { Map<String,Object> result = new HashMap<String,Object>(); List<Map<String, Object>> dayData = hbaseService.getWifi2DayData(apNameAndTimeStr, Arrays.asList(Wifi2Meta.TIME,Wifi2Meta.MACOUNT,Wifi2Meta.NUM)); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); try { propertiesConfig=new PropertiesConfiguration(wifiMysqlConfigPropertiesPath); } catch (ConfigurationException e1) { e1.printStackTrace(); } String multFactor=propertiesConfig.getString("wifi.data.multiple"); if( !dayData.isEmpty() ){ List<long[]> data = new ArrayList<long[]>(); long[] point = null; String time = null; String count = null; String num = null; long c = 0; for(Map<String,Object> map : dayData ) { point = new long[2]; time = (String) map.get(Wifi2Meta.TIME.getName()); count = (String) map.get(Wifi2Meta.MACOUNT.getName()); num = (String) map.get(Wifi2Meta.NUM.getName()); if( time != null) { try { point[0] = format.parse(time).getTime(); if(count == null || null == num) { c=0; } else { c = (Long.parseLong(count))/(Long.parseLong(num))*Long.parseLong(multFactor); } point[1] = c; data.add(point); } catch (ParseException e) { LOG.error( "时间字串 " +time + " 转成 日期失败。", e); } } } result.put("data", data); } setYAxis(result,apNameAndTimeStr.split("-")[0].toString(),ResultType.WIFIDATA); return result; } private void setYAxis( Map<String, Object> data,String station_id,ResultType rt){ String type = null; boolean isStation = true; if(station_id.contains("631422656")){ switch (rt) { case WIFIDATA: type = "wifiData"; break; default: type = "wifiData"; break; } } Criterion criter = criterionService.findByCodeAndType(station_id, type); String level = criter.getLevel(); if(level == null ){ LOG.error("数据库中 station_id为" + station_id + "的level字段为空"); } String[] split = level.split(","); int begin = 0; String yAxis = ""; //wifi yAxis = AxisUtil.getYAxis(String.valueOf(begin),split[0],split[0],split[1],split[1],split[2],split[2],String.valueOf(Integer.MAX_VALUE)); data.put("yAxis", yAxis); } /** * 按照apname获取wifiData表的全部数据 */ @Override public List<WifiData> getwifiDataTotal(final String apname) { Specification<WifiData> specification = new Specification<WifiData>() { @Override public Predicate toPredicate(Root<WifiData> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicate = new ArrayList<>(); if(apname!=" ") { predicate.add(cb.equal( root.get("apname").as(String.class), apname)); } Predicate[] pre = new Predicate[predicate.size()]; return query.where(predicate.toArray(pre)).getRestriction(); } }; return wifiDataDao.findAll(specification); } }
[ "shuai.hong@lantaiyuan.com" ]
shuai.hong@lantaiyuan.com
3da9e43cd7ad0a424bf4761f199ceca6b272ae4c
eb31160e5915c422860267acbd1dcb3c3743c09c
/jOOQ/src/main/java/org/jooq/Adapter.java
41ef0b68495ff40f78cd4e2878cd6ce5f83e3aa6
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
digulla/jOOQ
b75b43c2e15b4e46d3412aca9d08d65c240c94f3
6c3334d5b73749a2045ae038e71a0003ba5f6139
refs/heads/master
2022-06-20T17:34:48.041188
2022-06-04T21:52:39
2022-06-04T21:52:39
4,752,073
0
0
NOASSERTION
2022-06-04T21:52:40
2012-06-22T14:36:17
Java
UTF-8
Java
false
false
2,856
java
/** * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com * All rights reserved. * * This software is licensed to you under the Apache License, Version 2.0 * (the "License"); You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * 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 "jOOQ" nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.jooq; /** * A type that can dynamically implement another interface. * <p> * This interface is for JOOQ INTERNAL USE only. Do not reference directly * * @author Lukas Eder */ public interface Adapter { /** * Adapt to an internal type assuming its functionality * <p> * This is for JOOQ INTERNAL USE only. If you need to access the internal * API, these are the known possible interfaces: * <ul> * <li> {@link QueryPartInternal}: The internal API for {@link QueryPart}</li> * </ul> * Be aware though, that the internal API may change even between minor * releases. * * @param <I> The internal type's generic type parameter. * @param internalType The internal type * @return This object wrapped by or cast to an internal type * @throws ClassCastException If this object cannot be wrapped by or cast to * the given internal type */ <I> I internalAPI(Class<I> internalType) throws ClassCastException; }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
f8af24a42f7518329a942e999a372fb55a61c3e8
2f49e2f63dea85d62aa1a56b12d103d8bab0bee3
/EasyMPermission/test/transform/resource/after-ecj/GenerateSuppressFBWarnings.java
407d41b67e84d1b4cfb3dbb5b733a91ffe3d7c69
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
mobmead/EasyMPermission
9837a0bbb1c6f6b33a6905fd7e60ffb921484b27
e373737c4c9d9494a25f3700654022c155d027fc
refs/heads/master
2021-01-18T20:30:06.222457
2015-11-12T17:45:18
2015-11-12T17:45:18
39,174,977
62
12
null
null
null
null
UTF-8
Java
false
false
314
java
class GenerateSuppressFBWarnings { @lombok.Getter int y; GenerateSuppressFBWarnings() { super(); } public @java.lang.SuppressWarnings("all") @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code") @javax.annotation.Generated("lombok") int getY() { return this.y; } }
[ "jian@mobmead.com" ]
jian@mobmead.com
c27c118aface87ad64cbb3aa6be16bc4465c9188
3c49f0766779f1c4b5865b0a70f82ab790d9866a
/02branches/kxoa/src/main/java/com/centit/oa/dao/OaSurveyDao.java
9a65b6e638bce9ec4a7710dc2bfe44c8cc782fa8
[]
no_license
laoqianlaile/xwoa
bfa9e64ca01e9333efbc5602b41c1816f1fa746e
fe8a618ff9c0ddfcb8b51bc9d6786e2658b62fa1
refs/heads/master
2022-01-09T23:27:17.273124
2019-05-21T08:35:34
2019-05-21T08:35:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,426
java
package com.centit.oa.dao; import java.util.HashMap; import java.util.Map; import com.centit.core.dao.CodeBook; import com.centit.core.dao.BaseDaoImpl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.centit.oa.po.OaSurvey; public class OaSurveyDao extends BaseDaoImpl<OaSurvey> { private static final long serialVersionUID = 1L; public static final Log log = LogFactory.getLog(OaSurveyDao.class); public Map<String, String> getFilterField() { if (filterField == null) { filterField = new HashMap<String, String>(); filterField.put("djid", CodeBook.EQUAL_HQL_ID); filterField.put("title", CodeBook.LIKE_HQL_ID); filterField.put("reType", CodeBook.EQUAL_HQL_ID); filterField.put("remark", CodeBook.LIKE_HQL_ID); filterField.put("begtime", CodeBook.LIKE_HQL_ID); filterField.put("endtime", CodeBook.LIKE_HQL_ID); filterField.put("creater", CodeBook.LIKE_HQL_ID); filterField.put("createtime", CodeBook.LIKE_HQL_ID); filterField.put("createRemark", CodeBook.LIKE_HQL_ID); filterField.put("createDepno", CodeBook.LIKE_HQL_ID); filterField.put("thesign", CodeBook.EQUAL_HQL_ID); filterField.put("sendusers", CodeBook.LIKE_HQL_ID); filterField.put("isautoend", CodeBook.EQUAL_HQL_ID); filterField.put("isviewresult", CodeBook.EQUAL_HQL_ID); filterField.put("isbookn", CodeBook.EQUAL_HQL_ID); // 调查开始时间 filterField.put("begtimeBegin", " begtime >= to_date(?,'yyyy-MM-dd hh24:mi:ss')"); filterField.put("begtimeEnd", " begtime <= to_date(?,'yyyy-MM-dd hh24:mi:ss')"); // 调查结束时间 filterField.put("endtimeBegin", " endtime >= to_date(?,'yyyy-MM-dd hh24:mi:ss')"); filterField.put("endtimeEnd", " endtime <= to_date(?,'yyyy-MM-dd hh24:mi:ss')"); filterField.put("NP_thesign", " thesign != '4' "); } return filterField; } /** * 系統自動結束調查 */ public void autoEnd() { doExecuteHql("update OaSurvey t set t.thesign='3' where t.isautoend ='Y' and t.thesign not in ('3','4') and t.endtime<=sysdate "); } }
[ "1820244007@qq.com" ]
1820244007@qq.com
a0a89ffe2f60a8651f44013d8dfea214d2723f96
9373fe952c96922d53468edbd844519b038d2c28
/Java/Loon-Neo/src/loon/action/map/ArrayInt2DAStar.java
82dd70efa0398360ef959d58e1ec7be78f5b326a
[ "Apache-2.0" ]
permissive
dc6273632/LGame
58f2820db7baf76099e565f75ce7edd0eb600b7c
eccae858c2f40f8f5a5da9b9a62613ccb68d66fc
refs/heads/master
2020-04-29T18:02:40.009966
2019-03-18T08:59:43
2019-03-18T08:59:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,185
java
/** * Copyright 2014 * * 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. * * @project loon * @author cping * @email javachenpeng@yahoo.com * @version 0.4.2 */ package loon.action.map; import loon.utils.CollectionUtils; import loon.utils.SortedList; import loon.utils.TArray; public class ArrayInt2DAStar { public static interface TileFactory<T> { public T create(int m, int n); } public static interface Map { public int[][] adjacent(int[] position); public boolean reachable(int[] position); public int roughness(int[] position); public int baseRoughness(); public int distance(int[] start, int[] end); } protected static class Node implements Comparable<Node> { int[] position; int f, g, h; Node parent; public Node(int[] position) { this.position = CollectionUtils.copyOf(position); } public boolean equals(int[] position) { return this.position[0] == position[0] && this.position[1] == position[1]; } @Override public int compareTo(Node another) { int result = this.f - another.f; if (result == 0) { result = this.h - another.h; } return result; } } protected static class NodeList extends TArray<Node> { public Node find(int[] position) { for (int i = size - 1; i >= 0; i--) { Node node = get(i); if (node.equals(position)) { return node; } } return null; } public void insert(Node node) { for (int i = size; i > 0; i--) { Node n = get(i - 1); if (node.compareTo(n) >= 0) { insert(i, node); return; } } insert(0, node); } public void sort(Node node) { for (int i = size - 1; i >= 0; i--) { Node n = get(i); if (n == node) { for (; i > 0; i--) { n = get(i - 1); if (node.compareTo(n) >= 0) { return; } else { set(i, n); set(i - 1, node); } } } } } } public static class Path { public SortedList<int[]> positions; public int cost; } public static Path findPath(ArrayInt2DAStar.Map map, int[] start, int[] end) { return findPath(map, start, end, 0); } public static Path findPath(ArrayInt2DAStar.Map map, int[] start, int[] end, int endRadius) { NodeList openNodes = new NodeList(); NodeList closedNodes = new NodeList(); openNodes.add(new Node(start)); Node found = null; for (;;) { if (openNodes.size == 0) { return null; } Node node = openNodes.removeIndex(0); int distance = map.distance(node.position, end); if (distance <= endRadius) { found = node; break; } closedNodes.add(node); int[][] positions = map.adjacent(node.position); for (int[] position : positions) { if (!map.reachable(position)) { continue; } if (closedNodes.find(position) != null) { continue; } Node openNode = openNodes.find(position); if (openNode == null) { Node newNode = new Node(position); newNode.g = node.g + map.roughness(position); newNode.h = map.distance(position, end) * map.baseRoughness(); newNode.f = newNode.g + newNode.h; newNode.parent = node; openNodes.insert(newNode); } else { int g = node.g + map.roughness(position); if (openNode.g > g) { openNode.g = g; openNode.f = openNode.g + openNode.h; openNode.parent = node; openNodes.sort(openNode); } } } } if (found == null) { return null; } Path path = new Path(); path.cost = found.g; SortedList<int[]> positions = new SortedList<int[]>(); while (found != null) { positions.addFirst(found.position.clone()); found = found.parent; } path.positions = positions; return path; } }
[ "longwind2012@hotmail.com" ]
longwind2012@hotmail.com
f5cdaa3cd415b18a3abbcaa8c3c975dae53ee1c9
22b1f967750c313d8a2e6fc255fd3bca9f13c290
/AdvancedAlgorithm(LintCode)/FollowUpsII/401_KthSmallestNumberInSortedMatrix.java
bbfc1e02f43e8dae767aa66f9726e5d59411a88a
[ "MIT" ]
permissive
robin-qu/Leetcode
333e997f1779fe41cbd4b0e057631454c1f37d13
9178287a7cc8fac7adb0e9bfd8d4771cd151d4a6
refs/heads/master
2021-06-24T18:49:25.879307
2021-01-21T05:28:20
2021-01-21T05:28:20
178,751,405
0
0
null
null
null
null
UTF-8
Java
false
false
1,594
java
public class Solution { /** * @param matrix: a matrix of integers * @param k: An integer * @return: the kth smallest number in the matrix */ class Pair implements Comparable<Pair> { public int x; public int y; public int val; public Pair(int x, int y, int val) { this.x = x; this.y = y; this.val = val; } @Override public int compareTo(Pair other) { return this.val - other.val; } } public int kthSmallest(int[][] matrix, int k) { if (matrix == null || matrix.length == 0 || matrix[0] == null || matrix[0].length == 0) { return 0; } int m = matrix.length; int n = matrix[0].length; boolean[][] visited = new boolean[m][n]; PriorityQueue<Pair> pq = new PriorityQueue<>(); pq.offer(new Pair(0, 0, matrix[0][0])); visited[0][0] = true; for (int i = 0; i < k - 1; i++) { Pair curr = pq.poll(); int x = curr.x; int y = curr.y; int nx = x + 1; int ny = y + 1; if (nx < m && !visited[nx][y]) { pq.offer(new Pair(nx, y, matrix[nx][y])); visited[nx][y] = true; } if (ny < n && !visited[x][ny]) { pq.offer(new Pair(x, ny, matrix[x][ny])); visited[x][ny] = true; } } return pq.peek().val; } }
[ "hongbinqu9@gmail.com" ]
hongbinqu9@gmail.com
1a1be78bc49c6138387e945326b3ffb4d48dde4c
1556b1bad7ff19b6811e353d66fa5946a3c4e5b1
/src/main/java/com/ioc/beanannotation/multibean/BeanTwo.java
81763f913facdb92c19309858121a3ce0fe3554e
[]
no_license
xianglingchuan/java-learn-record-project
8e104ba8bc48b51ba66213d31a200372805359ac
92a193b0adde8773d8d3a2f843a8f7606d528ca0
refs/heads/master
2021-01-19T08:03:59.145502
2018-01-17T09:57:02
2018-01-17T09:57:02
82,068,808
1
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.ioc.beanannotation.multibean; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @Order(1) //list列表排序 @Component public class BeanTwo implements BeanInterface { }
[ "xianglingchuan@sina.cn" ]
xianglingchuan@sina.cn
e291704b92a45e7b0df4a44b9e9d2468581b57b8
cc328476eba0f9dcbac108688cf1b97d1d06c189
/src/main/java/com/cisco/policyconversiontool/dto/wsa/asyncos806/ProxAclCustomCategoryForService.java
a858e60ec7704c43e9dc77a98df40155c94a1042
[]
no_license
SecurView/cws-wsa
b9278caee8d52afd9f71b925516bc18380b5c331
c3e9c245722f89d9a3189bf7bc9700e8b4c7f1d6
refs/heads/master
2016-09-06T21:35:20.674191
2014-12-19T14:45:23
2014-12-19T14:45:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,896
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.11.26 at 05:46:49 PM IST // package com.cisco.policyconversiontool.dto.wsa.asyncos806; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "service", "option" }) @XmlRootElement(name = "prox_acl_custom_category_for_service") public class ProxAclCustomCategoryForService { @XmlElement(required = true) protected String service; @XmlElement(required = true) protected String option; /** * Gets the value of the service property. * * @return * possible object is * {@link String } * */ public String getService() { return service; } /** * Sets the value of the service property. * * @param value * allowed object is * {@link String } * */ public void setService(String value) { this.service = value; } /** * Gets the value of the option property. * * @return * possible object is * {@link String } * */ public String getOption() { return option; } /** * Sets the value of the option property. * * @param value * allowed object is * {@link String } * */ public void setOption(String value) { this.option = value; } }
[ "kgadekar@securview.com" ]
kgadekar@securview.com
0a5fa050a3ec29882abb8d5ba2c28d6029432238
2fc1e0070e576fd45ae13ed80daad3a4834fc444
/src/main/java/com/cloudera/cdp/iam/model/DeleteSshPublicKeyResponse.java
a2f9cc6270645ca1b75c3c672e24f22e47d8e582
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
isabella232/cdp-sdk-java
832c47e119e8399a782848c04815612e35acad0d
f6fb9f121065f1c3759a9c3fd777c32ad25ac118
refs/heads/master
2023-01-19T08:18:20.758968
2020-11-24T15:36:52
2020-11-24T15:36:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,069
java
/* * Copyright (c) 2018 Cloudera, Inc. All Rights Reserved. * * Portions Copyright (c) Copyright 2013-2018 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. * 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.cloudera.cdp.iam.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.cloudera.cdp.client.CdpResponse; /** * Response object for delete SSH public key. **/ @javax.annotation.Generated(value = "com.cloudera.cdp.client.codegen.CdpSDKJavaCodegen", date = "2020-11-24T07:35:53.146-08:00") public class DeleteSshPublicKeyResponse extends CdpResponse { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } return true; } @Override public int hashCode() { return Objects.hash( super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeleteSshPublicKeyResponse {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line except the first indented by 4 spaces. */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "dev-kitchen@cloudera.com" ]
dev-kitchen@cloudera.com
cf7310f256a8381e05bf0343fd1dd6a8a30c176e
388c2a44fe5de5c6524d407c1dddfe43db754c5b
/src/gui/org/deidentifier/arx/gui/view/def/IEditor.java
d4373101aa4cd0327a9283e6e7df06e2970c8dc5
[ "Apache-2.0" ]
permissive
arx-deidentifier/arx
d51f751acac017d39e18213cce18d42887dcdb22
c8c26c95e42465908cdc1e07f6211121374600af
refs/heads/master
2023-08-16T08:07:47.794373
2023-04-06T18:34:16
2023-04-06T18:34:16
9,751,165
567
243
Apache-2.0
2023-05-23T20:17:59
2013-04-29T15:23:18
Java
UTF-8
Java
false
false
1,782
java
/* * ARX Data Anonymization Tool * Copyright 2012 - 2023 Fabian Prasser and contributors * * 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.deidentifier.arx.gui.view.def; import org.eclipse.swt.widgets.Composite; /** * Interface for an editor for a given data type. * * @author Fabian Prasser * @param <T> */ public interface IEditor<T> { /** * Does the editor accept the value. * * @param t * @return */ public boolean accepts(T t); /** * Creates an according control. * * @param parent */ public void createControl(Composite parent); /** * Returns the category. * * @return */ public String getCategory(); /** * Returns the label. * * @return */ public String getLabel(); /** * Returns the current value. * * @return */ public T getValue(); /** * Sets the value. * * @param t */ public void setValue(T t); /** * Checks whether the two values are different * @param value1 * @param value2 * @return */ public boolean isDifferent(T value1, T value2); }
[ "mail@fabian-prasser.de" ]
mail@fabian-prasser.de
6f60e2420f7a6eb23dd0665e9696b2c8a59f534a
92c1674aacda6c550402a52a96281ff17cfe5cff
/module07/module26/src/main/java/com/android/example/module07_module26/ClassAAJ.java
fdfba8cb6e554d6a1ff24aa75ace5b680a0f2550
[]
no_license
bingranl/android-benchmark-project
2815c926df6a377895bd02ad894455c8b8c6d4d5
28738e2a94406bd212c5f74a79179424dd72722a
refs/heads/main
2023-03-18T20:29:59.335650
2021-03-12T11:47:03
2021-03-12T11:47:03
336,009,838
0
0
null
null
null
null
UTF-8
Java
false
false
2,371
java
package com.android.example.module07_module26; public class ClassAAJ { private dagger.internal.DelegateFactory<Object> instance_var_1_0 = new dagger.internal.DelegateFactory(); private dagger.internal.DelegateFactory<Object> instance_var_1_1 = new dagger.internal.DelegateFactory(); private dagger.internal.DelegateFactory<Object> instance_var_1_2 = new dagger.internal.DelegateFactory(); private dagger.internal.DelegateFactory<Object> instance_var_1_3 = new dagger.internal.DelegateFactory(); public void method0( dagger.internal.DelegateFactory<Object> param0, dagger.internal.DelegateFactory<Object> param1, dagger.internal.DelegateFactory<Object> param2, dagger.internal.DelegateFactory<Object> param3) throws Throwable { for (int iAb = 0; iAb < 2; iAb++) { if (new java.lang.Object().equals(new java.lang.Object())) { dagger.internal.DelegateFactory<Object> local_var_4_0 = new dagger.internal.DelegateFactory(); local_var_4_0.get(); } param0.get(); } } public void method1( dagger.internal.DelegateFactory<Object> param0) throws Throwable { param0.get(); dagger.internal.DelegateFactory<Object> local_var_2_1 = new dagger.internal.DelegateFactory(); local_var_2_1.get(); dagger.internal.DelegateFactory<Object> local_var_2_2 = new dagger.internal.DelegateFactory(); local_var_2_2.get(); dagger.internal.DelegateFactory<Object> local_var_2_3 = new dagger.internal.DelegateFactory(); local_var_2_3.get(); } public void method2( dagger.internal.DelegateFactory<Object> param0, dagger.internal.DelegateFactory<Object> param1, dagger.internal.DelegateFactory<Object> param2) throws Throwable { dagger.internal.DelegateFactory<Object> local_var_2_3 = new dagger.internal.DelegateFactory(); local_var_2_3.get(); dagger.internal.DelegateFactory<Object> local_var_2_4 = new dagger.internal.DelegateFactory(); local_var_2_4.get(); dagger.internal.DelegateFactory<Object> local_var_2_5 = new dagger.internal.DelegateFactory(); local_var_2_5.get(); } public void method3( dagger.internal.DelegateFactory<Object> param0, dagger.internal.DelegateFactory<Object> param1, dagger.internal.DelegateFactory<Object> param2) throws Throwable { param0.get(); dagger.internal.DelegateFactory<Object> local_var_2_3 = new dagger.internal.DelegateFactory(); local_var_2_3.get(); } }
[ "bingran@google.com" ]
bingran@google.com
2ded0457285a45aa1a3407914c3b7eea4e5fb354
7b1441bd90792cb33b20151839b89c6477e2fa0a
/src/powercrystals/minefactoryreloaded/farmables/plantables/PlantableCocoa.java
779ca788708ef624b8ff5ee8cc2cef177d37f762
[]
no_license
NATOcm/MineFactoryReloaded
737d109e178d0c8cb8b77e28a53806eb545bfcc3
3c8412dbd20fda85640b37369f0c72d876dcf440
refs/heads/master
2021-01-18T04:36:11.383148
2013-05-01T22:33:46
2013-05-01T22:33:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,942
java
package powercrystals.minefactoryreloaded.farmables.plantables; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Direction; import net.minecraft.world.World; import powercrystals.minefactoryreloaded.api.IFactoryPlantable; public class PlantableCocoa implements IFactoryPlantable { @Override public int getSeedId() { return Item.dyePowder.itemID; } @Override public int getPlantedBlockId(World world, int x, int y, int z, ItemStack stack) { return Block.cocoaPlant.blockID; } @Override public int getPlantedBlockMetadata(World world, int x, int y, int z, ItemStack stack) { return 0; } @Override public boolean canBePlantedHere(World world, int x, int y, int z, ItemStack stack) { return world.isAirBlock(x, y, z) && isNextToJungleLog(world, x, y, z); } private boolean isNextToJungleLog(World world, int x, int y, int z) { if (isJungleLog(world, x+1, y, z) || isJungleLog(world, x-1, y, z) || isJungleLog(world, x, y, z+1) || isJungleLog(world, x, y, z-1)) { return true; } return false; } private boolean isJungleLog(World world, int x, int y, int z) { return world.getBlockId(x, y, z) == Block.wood.blockID && BlockLog.limitToValidMetadata(world.getBlockMetadata(x, y, z)) == 3; } @Override public void prePlant(World world, int x, int y, int z, ItemStack stack) { } @Override public void postPlant(World world, int x, int y, int z, ItemStack stack) { int blockDirection = 4; // NORTH if (isJungleLog(world, x-1, y, z)) { blockDirection = 5; // SOUTH } else if (isJungleLog(world, x, y, z+1)) { blockDirection = 2; // EAST } else if (isJungleLog(world, x, y, z-1)) { blockDirection = 3; // WEST } world.setBlockMetadataWithNotify(x, y, z, Direction.rotateOpposite[Direction.facingToDirection[blockDirection]], 2); } }
[ "powcrystals@gmail.com" ]
powcrystals@gmail.com
eb409f50241d056d076630b136bea18d2ee6cbe3
305e64233c32670c3b8522854142d59fe9c80167
/programmers/입국심사.java
765c6f1e5fc718a371420c38a3fd521841552dc3
[]
no_license
Kastori1206/algo
144f7708ecd653c01a2c98d83d0406a90390ace8
ea937ae3e4def01f7949c11254035a33f6aae6bb
refs/heads/master
2023-01-08T11:11:24.155073
2022-12-28T04:41:45
2022-12-28T04:41:45
239,990,626
0
0
null
null
null
null
UTF-8
Java
false
false
811
java
package programmers; import java.util.*; /* * 입국심사 * https://programmers.co.kr/learn/courses/30/lessons/43238 * 이분탐색 */ public class 입국심사 { class Solution { public long solution(int n, int[] times) { Arrays.sort(times); long left =1, right = (long)times[times.length-1] * n; long answer = right; while(left <= right){ long people =0; long mid = (left+right)/2; for (int time : times) { people += (mid / time); } if(people<n){ left = mid + 1; }else{ right = mid-1; answer = mid; } } return answer; } } }
[ "kastori1990@gmail.com" ]
kastori1990@gmail.com
bd4523acb5641645fb08311f03ab4b2905a20bc9
2bbef284ff5b2fb4a2d6f4d520c4d9e3114d8941
/Core/Colloection/src/com/collection/map/HashMap.java
d7ee6472025c5b6710530f43a8a4963ac8f73b5f
[]
no_license
dhirajhargode/java-practice
97deac4384a5070825ec1527bc128caa69d5b780
8aba94153eb23033a00da9b38d0e4186461cc724
refs/heads/master
2023-06-09T08:59:13.871686
2023-05-26T13:30:54
2023-05-26T13:30:54
220,675,609
0
0
null
2020-10-16T15:12:16
2019-11-09T17:09:31
JavaScript
UTF-8
Java
false
false
766
java
package com.collection.map; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; class HashMapDemo { public static void main(String[] args) { HashMap m = new HashMap(); m.put("A", 1000); m.put("B", 500); m.put("C", 200); m.put("D", 700); System.out.println(m); System.out.println(m.put("A", 100)); /* Collection c = m.values(); System.out.println(c); Set s1 = m.entrySet(); System.out.println(s1); Iterator itr = s1.iterator(); while (itr.hasNext()) { Map.Entry m1 = (Map.Entry) itr.next(); System.out.println(m1.getKey() + "........." + m1.getValue()); if (m1.getKey().equals("C")) { m1.setValue(2000); } System.out.println(m); } */} }
[ "hargodedhiraj@gmail.com" ]
hargodedhiraj@gmail.com
317691523b8205991d0d2ef78fda7ef853c7d917
38c3180624ffa0ab5ae90ffb8ccdaea70734295d
/scm-finance/src/main/java/com/winway/scm/model/ScmCwAnnualFee.java
ae70e9727fef35b642e73e3ee3e4e6536cf35817
[]
no_license
cwy329233832/scm_code
e88fe0296638202443643941fbfca58dc1abf3f0
fbd3e56af615ce39bca96ce12d71dc5487c51515
refs/heads/master
2021-04-17T16:02:51.463958
2019-09-05T08:22:39
2019-09-05T08:22:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,867
java
package com.winway.scm.model; import org.apache.commons.lang.builder.ToStringBuilder; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.hotent.base.model.BaseModel; /** * 年费信息管理费详情 * <pre> * 描述:年费信息管理费详情 实体对象 * 构建组:x7 * 作者:原浩 * 邮箱:PRD-jun.he@winwayworld.com * 日期:2019-04-28 09:38:33 * 版权:美达开发小组 * </pre> */ @ApiModel(value = "ScmCwAnnualFee",description = "年费信息管理费详情") public class ScmCwAnnualFee extends BaseModel<String>{ private static final long serialVersionUID = 1L; @ApiModelProperty(value="id") protected String id; @ApiModelProperty(value="主表ID") protected String masterId; @ApiModelProperty(value="商业名称") protected String commerceName; @ApiModelProperty(value="商业ID") protected String commerceId; @ApiModelProperty(value="商业编号") protected String commerceCode; @ApiModelProperty(value="协议签订类型") protected String commerceType; @ApiModelProperty(value="商业类别") protected String commerceClasses; @ApiModelProperty(value="信息直连费") protected Double messagePrice; @ApiModelProperty(value="流向折扣费") protected Double flowDirection; @ApiModelProperty(value="备注") protected String memo; public void setId(String id) { this.id = id; } /** * 返回 id * @return */ public String getId() { return this.id; } public void setMasterId(String masterId) { this.masterId = masterId; } /** * 返回 主表ID * @return */ public String getMasterId() { return this.masterId; } public void setCommerceName(String commerceName) { this.commerceName = commerceName; } /** * 返回 商业名称 * @return */ public String getCommerceName() { return this.commerceName; } public void setCommerceId(String commerceId) { this.commerceId = commerceId; } /** * 返回 商业ID * @return */ public String getCommerceId() { return this.commerceId; } public void setCommerceCode(String commerceCode) { this.commerceCode = commerceCode; } /** * 返回 商业编号 * @return */ public String getCommerceCode() { return this.commerceCode; } public void setCommerceType(String commerceType) { this.commerceType = commerceType; } /** * 返回 协议签订类型 * @return */ public String getCommerceType() { return this.commerceType; } public void setCommerceClasses(String commerceClasses) { this.commerceClasses = commerceClasses; } /** * 返回 商业类别 * @return */ public String getCommerceClasses() { return this.commerceClasses; } public void setMessagePrice(Double messagePrice) { this.messagePrice = messagePrice; } /** * 返回 信息直连费 * @return */ public Double getMessagePrice() { return this.messagePrice; } public void setFlowDirection(Double flowDirection) { this.flowDirection = flowDirection; } /** * 返回 流向折扣费 * @return */ public Double getFlowDirection() { return this.flowDirection; } public void setMemo(String memo) { this.memo = memo; } /** * 返回 备注 * @return */ public String getMemo() { return this.memo; } /** * @see java.lang.Object#toString() */ public String toString() { return new ToStringBuilder(this) .append("id", this.id) .append("masterId", this.masterId) .append("commerceName", this.commerceName) .append("commerceId", this.commerceId) .append("commerceCode", this.commerceCode) .append("commerceType", this.commerceType) .append("commerceClasses", this.commerceClasses) .append("messagePrice", this.messagePrice) .append("flowDirection", this.flowDirection) .append("memo", this.memo) .toString(); } }
[ "1540307734@qq.com" ]
1540307734@qq.com
9edc4fe83f72dd9a53aa625b7b95319c47755192
cf1c7cd146b381cb83c4e5910c35fef936a5ec14
/dsl-project/ashigel-compiler/src/test/java/com/asakusafw/compiler/batch/JoinBatch.java
a9d4c67e49818ff9f5ec74bc715a9b9737e2b2b5
[ "Apache-2.0" ]
permissive
claymodel/asakusafw
b0df814b608ccf2446a0a2cf4f8503dcc065e92b
d86fd41add8c32e0b8a3b83d367ed0bd2754f00a
refs/heads/master
2021-01-18T01:59:06.648773
2013-07-26T12:18:20
2013-07-26T12:18:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,190
java
/** * Copyright 2011-2013 Asakusa Framework Team. * * 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.asakusafw.compiler.batch; import com.asakusafw.vocabulary.batch.Batch; import com.asakusafw.vocabulary.batch.BatchDescription; import com.asakusafw.vocabulary.batch.Work; /** * 合流付きののバッチ。 */ @Batch(name = "join") public class JoinBatch extends BatchDescription { @Override protected void describe() { Work first = run(FirstJobFlow.class).soon(); Work second = run(SecondJobFlow.class).after(first); Work side = run(SideJobFlow.class).after(first); run(JoinJobFlow.class).after(second, side); } }
[ "akirakw@gmail.com" ]
akirakw@gmail.com
edf73a7794e1f8272c81e883437f4f1ff9b99a26
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_3/src/j/a/a/Calc_1_3_9005.java
50f94c47369dbdc565a54fa841712af1d022c887
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package j.a.a; public class Calc_1_3_9005 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
7d19d3ccd5a674baf5b6fdcab75b8495b602be0b
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/io/reactivex/internal/observers/DisposableLambdaObserver.java
147bc9a7eeaa0f4e9bcaa3adb7bde95e86caf67a
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
2,797
java
package io.reactivex.internal.observers; import io.reactivex.Observer; import io.reactivex.disposables.Disposable; import io.reactivex.exceptions.Exceptions; import io.reactivex.functions.Action; import io.reactivex.functions.Consumer; import io.reactivex.internal.disposables.DisposableHelper; import io.reactivex.internal.disposables.EmptyDisposable; import io.reactivex.plugins.RxJavaPlugins; public final class DisposableLambdaObserver<T> implements Observer<T>, Disposable { public final Observer<? super T> a; public final Consumer<? super Disposable> b; public final Action c; public Disposable d; public DisposableLambdaObserver(Observer<? super T> observer, Consumer<? super Disposable> consumer, Action action) { this.a = observer; this.b = consumer; this.c = action; } @Override // io.reactivex.disposables.Disposable public void dispose() { Disposable disposable = this.d; DisposableHelper disposableHelper = DisposableHelper.DISPOSED; if (disposable != disposableHelper) { this.d = disposableHelper; try { this.c.run(); } catch (Throwable th) { Exceptions.throwIfFatal(th); RxJavaPlugins.onError(th); } disposable.dispose(); } } @Override // io.reactivex.disposables.Disposable public boolean isDisposed() { return this.d.isDisposed(); } @Override // io.reactivex.Observer public void onComplete() { Disposable disposable = this.d; DisposableHelper disposableHelper = DisposableHelper.DISPOSED; if (disposable != disposableHelper) { this.d = disposableHelper; this.a.onComplete(); } } @Override // io.reactivex.Observer public void onError(Throwable th) { Disposable disposable = this.d; DisposableHelper disposableHelper = DisposableHelper.DISPOSED; if (disposable != disposableHelper) { this.d = disposableHelper; this.a.onError(th); return; } RxJavaPlugins.onError(th); } @Override // io.reactivex.Observer public void onNext(T t) { this.a.onNext(t); } @Override // io.reactivex.Observer public void onSubscribe(Disposable disposable) { try { this.b.accept(disposable); if (DisposableHelper.validate(this.d, disposable)) { this.d = disposable; this.a.onSubscribe(this); } } catch (Throwable th) { Exceptions.throwIfFatal(th); disposable.dispose(); this.d = DisposableHelper.DISPOSED; EmptyDisposable.error(th, this.a); } } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
1d12d342302a2bc2e006062b73515171d751e08b
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/8/DurableStateStorage.java
2055eda6c86952ac1b9ab64ac031e034c3229769
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
5,180
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.causalclustering.core.state.storage; import java.io.File; import java.io.IOException; import org.neo4j.causalclustering.core.state.StateRecoveryManager; import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.kernel.impl.transaction.log.FlushableChannel; import org.neo4j.kernel.impl.transaction.log.PhysicalFlushableChannel; import org.neo4j.kernel.lifecycle.LifecycleAdapter; import org.neo4j.logging.Log; import org.neo4j.logging.LogProvider; public class DurableStateStorage<STATE> extends LifecycleAdapter implements StateStorage<STATE> { private final StateRecoveryManager<STATE> recoveryManager; private final Log log; private STATE initialState; private final File fileA; private final File fileB; private final FileSystemAbstraction fsa; private final String name; private final StateMarshal<STATE> marshal; private final int numberOfEntriesBeforeRotation; private int numberOfEntriesWrittenInActiveFile; private File currentStoreFile; private PhysicalFlushableChannel currentStoreChannel; public DurableStateStorage( FileSystemAbstraction fsa, File baseDir, String name, StateMarshal<STATE> marshal, int numberOfEntriesBeforeRotation, LogProvider logProvider ) { this.fsa = fsa; this.name = name; this.marshal = marshal; this.numberOfEntriesBeforeRotation = numberOfEntriesBeforeRotation; this.log = logProvider.getLog( getClass() ); this.recoveryManager = new StateRecoveryManager<>( fsa, marshal ); File parent = stateDir( baseDir, name ); this.fileA = new File( parent, name + ".a" ); this.fileB = new File( parent, name + ".b" ); } public boolean exists() { return fsa.fileExists( fileA ) && fsa.fileExists( fileB ); } private void create() throws IOException { ensureExists( fileA ); ensureExists( fileB ); } private void ensureExists( File file ) throws IOException { if ( !fsa.fileExists( file ) ) { fsa.mkdirs( file.getParentFile() ); try ( FlushableChannel channel = new PhysicalFlushableChannel( fsa.create( file ) ) ) { marshal.marshal( marshal.startState(), channel ); } } } private void recover() throws IOException { final StateRecoveryManager.RecoveryStatus<STATE> recoveryStatus = recoveryManager.recover( fileA, fileB ); this.currentStoreFile = recoveryStatus.activeFile(); this.currentStoreChannel = resetStoreFile( currentStoreFile ); this.initialState = recoveryStatus.recoveredState(); log.info( "%s state restored, up to ordinal %d", name, marshal.ordinal( initialState ) ); } @Override public STATE getInitialState() { assert initialState != null; return initialState; } @Override public void init() throws IOException { create(); recover(); } @Override public synchronized void shutdown() throws IOException { currentStoreChannel.close(); currentStoreChannel = null; } @Override public synchronized void persistStoreData( STATE state ) throws IOException { if ( numberOfEntriesWrittenInActiveFile >= numberOfEntriesBeforeRotation ) { switchStoreFile(); numberOfEntriesWrittenInActiveFile = 0; } marshal.marshal( state, currentStoreChannel ); currentStoreChannel.prepareForFlush().flush(); numberOfEntriesWrittenInActiveFile++; } void switchStoreFile() throws IOException { currentStoreChannel.close(); if ( currentStoreFile.equals( fileA ) ) { currentStoreChannel = resetStoreFile( fileB ); currentStoreFile = fileB; } else { currentStoreChannel = resetStoreFile( fileA ); currentStoreFile = fileA; } } private PhysicalFlushableChannel resetStoreFile( File nextStore ) throws IOException { fsa.truncate( nextStore, 0 ); return new PhysicalFlushableChannel( fsa.open( nextStore, "rw" ) ); } static File stateDir( File baseDir, String name ) { return new File( baseDir, name + "-state" ); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
6363a041c51cb42230283a57598fa06bcbb2d0fb
45eae3b3f6d0355bc997161af9c9638771340cf0
/src/main/java/com/clueride/sse/event/EventBundler.java
03da3d7dd386e838ec43005878fda552a5698e62
[]
no_license
jettmarks/clueRide-sse-server
520c5559e845477574b6512adc4cf7d340ddd396
ddac17d25cfdf32450c7b91ec96b772e971a06d7
refs/heads/master
2021-04-26T23:46:45.473100
2020-02-10T02:00:02
2020-02-10T02:00:02
123,850,937
0
0
null
2020-10-13T08:58:55
2018-03-05T02:04:30
Java
UTF-8
Java
false
false
2,568
java
/* * Copyright 2019 Jett Marks * * 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. * * Created by jett on 2/24/19. */ package com.clueride.sse.event; import org.glassfish.jersey.media.sse.OutboundEvent; /** * Common method for bundling up an event. */ public class EventBundler { private static int messageId = 101; /** * Generic message defaults to the eventType 'message'. * * @deprecated use {@link #bundleMessage(String,EventType)} instead. * * @param message String to be sent as the payload. * @return the event bundled up for broadcasting. */ public OutboundEvent bundleMessage(String message) { return bundleMessage(message, "message"); } public OutboundEvent getKeepAliveMessage() { final OutboundEvent.Builder eventBuilder = new OutboundEvent.Builder(); eventBuilder.name("message"); eventBuilder.id("" + generateMessageId()); eventBuilder.comment("Keep Alive"); return eventBuilder.build(); } /** * Wraps a message string (generally JSON represention of an event), with the SSE stuff required to broadcast the * message of the given Event Type. * * @param message JSON-representation of the event. * @param eventType Type of the Event. * @return An OutboundEvent instance ready for broadcast. */ public OutboundEvent bundleMessage(String message, EventType eventType) { return bundleMessage( message, eventType.eventName ); } private OutboundEvent bundleMessage(String message, String eventType) { final OutboundEvent.Builder eventBuilder = new OutboundEvent.Builder(); eventBuilder.name(eventType); eventBuilder.id("" + generateMessageId()); if (message == null) { eventBuilder.comment("Keep Alive"); } else { eventBuilder.data(message); } return eventBuilder.build(); } private Integer generateMessageId() { return messageId++; } }
[ "jettmarks@gmail.com" ]
jettmarks@gmail.com
6ce3abfa76f37fd4858d82343abd6249bd9bc294
14fec7d48aa2bd28ecbeb87e4e1d8aeb23e20635
/src/main/java/com/mht/controller/SysParamGroupController.java
5a71389cbfde614cd351f03909001d7812d11a55
[]
no_license
haoqiunie/api1
352a2d75ee77b98ff09f7e5a43bfc4f6cab98294
37bf9c55edda5e9b7a70a85f0851472dd8306280
refs/heads/master
2022-06-27T18:22:03.203863
2019-08-12T03:02:11
2019-08-12T03:02:11
201,601,048
0
0
null
2022-06-17T02:25:39
2019-08-10T08:17:18
Java
UTF-8
Java
false
false
351
java
package com.mht.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * <p> * 系统参数组 前端控制器 * </p> * * @author jobob * @since 2019-07-29 */ @RestController @RequestMapping("/sys-param-group") public class SysParamGroupController { }
[ "1778715299@qq.com" ]
1778715299@qq.com
36556ed4bde3ac844cf27de8386af5fe4ee3d932
f1b65f6ace564ef496ae97c237763a1e282b2189
/tis-console/src/main/java/com/qlangtech/tis/manage/yarn/YarnClientFactory.java
176daac7e27f8ad6174266ada29f1914813c4037
[ "MIT" ]
permissive
fightingyuman/tis-solr
27b65d3e4a89612ea9087a0f260a8c0a89b7f640
8655db7c32bb88928b931e2754291deb0e4ab4db
refs/heads/master
2022-04-04T08:26:23.438875
2020-01-02T13:04:51
2020-01-02T13:04:51
258,164,459
1
0
MIT
2020-04-23T10:09:51
2020-04-23T10:09:51
null
UTF-8
Java
false
false
3,462
java
/* * The MIT License * * Copyright (c) 2018-2022, qinglangtech Ltd * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.qlangtech.tis.manage.yarn; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; //import java.io.IOException; //import java.io.InputStream; // //import org.apache.hadoop.yarn.conf.YarnConfiguration; //import org.springframework.beans.factory.FactoryBean; //import org.springframework.beans.factory.InitializingBean; // //import com.qlangtech.tis.yarn.common.YarnConstant; //import java.io.IOException; //import java.io.InputStream; // //import org.apache.hadoop.yarn.client.api.YarnClient; //import org.apache.hadoop.yarn.conf.YarnConfiguration; //import org.springframework.beans.factory.FactoryBean; //import org.springframework.beans.factory.InitializingBean; // //import com.qlangtech.tis.yarn.common.YarnConstant; /** * @author 百岁 * * @date 2019年3月12日 */ public class YarnClientFactory implements FactoryBean<YarnClient>, InitializingBean { private YarnClient yarnClient; // @Override public void afterPropertiesSet() throws Exception { this.yarnClient = new YarnClient(); // this.yarnClient = YarnClient.createYarnClient(); // this.yarnClient.init(getYarnConfig()); // this.yarnClient.start(); // Set<String> applicationTypes = Sets.newHashSet("YARN"); // List<ApplicationReport> reports = // yarnClient.getApplications(applicationTypes); // for (ApplicationReport report : reports) { // System.out.println(report.getName() + ",start:" + // report.getStartTime() + ",state:" // + report.getFinalApplicationStatus()); // } } // // private YarnConfiguration getYarnConfig() throws IOException { // YarnConfiguration conf = new YarnConfiguration(); // conf.set("hadoop.job.ugi", "search"); // InputStream yarnsiteStream = // this.getClass().getResourceAsStream(YarnConstant.CLASSPATH_YARN_CONFIG_PATH); // if (yarnsiteStream == null) { // throw new IllegalStateException( // "yarn-site.xml is not exist in class path:" + // YarnConstant.CLASSPATH_YARN_CONFIG_PATH); // } // // conf.addResource(yarnsiteStream); // return conf; // } @Override public YarnClient getObject() throws Exception { return this.yarnClient; } // @Override public Class<?> getObjectType() { return YarnClient.class; } // @Override public boolean isSingleton() { return true; } }
[ "baisui@2dfire.com" ]
baisui@2dfire.com
37776707c21f3848c2067626317cdb7471c07bff
e5f0c2261c0f9fb9687b301ab3491bcb8f61762f
/eclipse/mybatis-first/src/main/java/com/thinking/mybatis_first/pojo/User.java
31881154aca1db1269f9bee1b2d985b54fccf97f
[]
no_license
Thinking-c/ssm-project
614118a370453b46c0df3cb8aa6fbb36b722c5bc
2d7fdbe2abccfb08d0eae3b7724811c99abbb75c
refs/heads/master
2020-03-21T13:05:38.412929
2018-11-07T08:52:16
2018-11-07T08:52:16
138,587,843
0
0
null
null
null
null
UTF-8
Java
false
false
1,114
java
package com.thinking.mybatis_first.pojo; import java.io.Serializable; import java.util.Date; public class User implements Serializable { /** * */ private static final long serialVersionUID = 1L; private Integer id; private String username;// 用户姓名 private String sex;// 性别 private Date birthday;// 生日 private String address;// 地址 public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } @Override public String toString() { return "User [id=" + id + ", username=" + username + ", sex=" + sex + ", birthday=" + birthday + ", address=" + address + "]"; } }
[ "ji.cao@chargedot.com" ]
ji.cao@chargedot.com
262fa7ad4bf52db4dad45b8df49cdf80362b0002
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/facebook/react/views/picker/ReactDropdownPickerManager.java
937c7362092a0cb48c1553d218aea2928f7582f8
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
package com.facebook.react.views.picker; public class ReactDropdownPickerManager extends ReactPickerManager { public final String a() { return "AndroidDropdownPicker"; } } /* Location: * Qualified Name: com.facebook.react.views.picker.ReactDropdownPickerManager * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
dbc9f7961a98b1b0f1a44d627bfbc345c480d2db
3bc15fa92f9a7336e855a32f8b16173dd916713c
/mobile-api/src/main/java/com/shangpin/wireless/api/service/impl/FeedbackServiceImpl.java
34c7146e0c277e5a78201a81971f5b3fac922d5a
[]
no_license
cenbow/2016_sp_mobile
36018bea8154b9deaf9d15dbf1b4e2ec90eb1191
5edb6203a5cf4352db7c051f3fd1ef12ccada32c
refs/heads/master
2020-04-06T04:44:14.075549
2016-06-15T05:19:25
2016-06-15T05:19:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
735
java
package com.shangpin.wireless.api.service.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.shangpin.wireless.api.dao.FeedbackDao; import com.shangpin.wireless.api.domain.Feedback; import com.shangpin.wireless.api.service.FeedbackService; @Service(FeedbackService.SERVICE_NAME) public class FeedbackServiceImpl implements FeedbackService { @Resource(name = FeedbackDao.DAO_NAME) private FeedbackDao feedbackDao; /** * 保存实体 * * @Author: zhouyu * @CreateDate: 2012-09-11 * @param model * @param dbType * 数据库类型 * @Return: */ public void save(Feedback model, String dbType) throws Exception { feedbackDao.save(model, dbType); } }
[ "fengwenyu@shangpin.com" ]
fengwenyu@shangpin.com
6a9db2b16d030448ea5b3fdc14111649d87d598f
313fde4adb3d77bb35c873bbfeecb3dce39a553b
/app/src/main/java/com/qgyyzs/globalcosmetics/nim/main/viewholder/CustomNotificationViewHolder.java
18cd502435c632eead67698d2e81de315a640828
[]
no_license
wangbo666/hzp
b41d37b63a90b7f83bb560b42dea8506619ce44a
ce75f47e36946c57d0ffd0a884f834e62be8bc15
refs/heads/master
2021-03-12T04:53:19.598350
2020-03-13T08:16:49
2020-03-13T08:16:49
246,590,994
0
0
null
null
null
null
UTF-8
Java
false
false
3,207
java
package com.qgyyzs.globalcosmetics.nim.main.viewholder; import android.view.View; import android.widget.TextView; import com.alibaba.fastjson.JSONObject; import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; import com.netease.nimlib.sdk.msg.model.CustomNotification; import com.qgyyzs.globalcosmetics.R; import com.qgyyzs.globalcosmetics.nim.main.helper.MessageHelper; import com.qgyyzs.globalcosmetics.uikit.common.adapter.TViewHolder; import com.qgyyzs.globalcosmetics.uikit.common.ui.imageview.HeadImageView; import com.qgyyzs.globalcosmetics.uikit.common.util.sys.ScreenUtil; import com.qgyyzs.globalcosmetics.uikit.common.util.sys.TimeUtil; public class CustomNotificationViewHolder extends TViewHolder { private HeadImageView imgHead; private TextView lblNickname; private TextView lblMessage; private TextView lblDatetime; private CustomNotification notification; private View bottomLine; private View topLine; public void refresh(Object item) { notification = (CustomNotification) item; updateBackground(); loadPortrait(); updateNickLabel(MessageHelper.getName(notification.getFromAccount(), notification.getSessionType())); updateMsgLabel(); } private void updateBackground() { topLine.setVisibility(isFirstItem() ? View.GONE : View.VISIBLE); bottomLine.setVisibility(isLastItem() ? View.VISIBLE : View.GONE); } protected void loadPortrait() { // 设置头像 if (notification.getSessionType() == SessionTypeEnum.P2P) { imgHead.loadBuddyAvatar(notification.getFromAccount()); } else if (notification.getSessionType() == SessionTypeEnum.Team) { imgHead.setImageResource(R.drawable.nim_avatar_group); } } private void updateMsgLabel() { JSONObject jsonObj = com.alibaba.fastjson.JSONObject.parseObject(notification.getContent()); String id = jsonObj.getString("id"); String content; if (id != null && id.equals("1")) { content = "正在输入..."; } else { content = jsonObj.getString("content"); } lblMessage.setText(content); String timeString = TimeUtil.getTimeShowString(notification.getTime(), true); lblDatetime.setText(timeString); } protected void updateNickLabel(String nick) { int labelWidth = ScreenUtil.screenWidth; labelWidth -= ScreenUtil.dip2px(50 + 70); // 减去固定的头像和时间宽度 if (labelWidth > 0) { lblNickname.setMaxWidth(labelWidth); } lblNickname.setText(nick); } protected int getResId() { return R.layout.item_custom_notification; } public void inflate() { this.imgHead = (HeadImageView) view.findViewById(R.id.img_head); this.lblNickname = (TextView) view.findViewById(R.id.tv_nick_name); this.lblMessage = (TextView) view.findViewById(R.id.tv_message); this.lblDatetime = (TextView) view.findViewById(R.id.tv_date_time); this.topLine = view.findViewById(R.id.top_line); this.bottomLine = view.findViewById(R.id.bottom_line); } }
[ "1052291325@qq.com" ]
1052291325@qq.com
2c2d75bace80ad54d485a27e0db458f61aa4643a
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/5/org/jfree/data/time/TimeTableXYDataset_getEndX_405.java
6a241df36b65aec099310e6f95d6871170aa3c8f
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,076
java
org jfree data time dataset regular time period link tabl dataset tablexydataset note link tabl dataset tablexydataset requir seri share set valu ad item code code seri seri automat item code code item org jfree data tabl dataset tablexydataset time tabl dataset timetablexydataset abstract interv dataset abstractintervalxydataset return end seri item param seri seri base index param item item seri base index end seri item end getendxvalu number end getendx seri item doubl end getendxvalu seri item
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
5609e737d6475b1e6c5b019aa7219c1256a959bf
9cb83f3b3c05ab29454812fabdda2c26a0e39754
/Leetcode-2/94-二叉树/95-二叉搜索树/108-有序数组变成二叉搜索树/Solution.java
402c4421eb413993169955d824be8cd29a0b59d0
[]
no_license
heathjay/niuke
0da093bd6b1bd3099955d5ffac3f749e85ccf29a
ad3e82ddf9aac2e718d77571f2191815ce1bd44d
refs/heads/master
2023-08-21T00:18:29.116733
2021-10-20T08:48:36
2021-10-20T08:48:36
306,721,910
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNode left, TreeNode right) { * this.val = val; * this.left = left; * this.right = right; * } * } */ class Solution { int[] nums; public TreeNode sortedArrayToBST(int[] nums) { this.nums = nums; return help(0,nums.length-1); } public TreeNode help(int left, int right){ if(left > right) return null; int mid = (right - left) / 2 + left; TreeNode root = new TreeNode(nums[mid]); root.left = help(left,mid-1); root.right = help(mid+1,right); return root; } }
[ "jpmzy@163.com" ]
jpmzy@163.com