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
0c9699a002ac0980d4dd90af11e077e093a00b3c
beb903bcbce21195107987e602658f138f2ea48b
/vanstone-centralserver-common/src/main/java/com/vanstone/centralserver/common/corp/passive/CorpWeixinEvent.java
d617b672de1f2a93891d8b448447e8127ca2e77e
[]
no_license
soltex/centralserver
6a47db0e5c9fe33d3ed89cb31c7b2869fffebb35
12a1c8b7638a54551b7a8ae19f7cc767ce21cdd2
refs/heads/master
2016-09-05T23:56:41.543299
2016-01-11T09:47:16
2016-01-11T09:47:16
26,172,552
1
4
null
null
null
null
UTF-8
Java
false
false
1,668
java
/** * */ package com.vanstone.centralserver.common.corp.passive; /** * @author shipeng * */ public enum CorpWeixinEvent { SUBSCRIBE("订阅","subscribe"), UNSUBSCRIBE("取消订阅","unsubscribe"), LOCATION("上报地理位置事件","LOCATION"), CLICK("菜单点击","CLICK"), VIEW("视图事件","VIEW"), SCANCODE_PUSH("扫码推事件的事件推送","scancode_push"), SCANCODE_WAITMSG("扫码推事件且弹出“消息接收中”提示框的事件推送","scancode_waitmsg"), PIC_SYSPHOTO("弹出系统拍照发图的事件推送","pic_sysphoto"), PIC_PHOTO_OR_ALBUM("弹出拍照或者相册发图的事件推送","pic_photo_or_album"), PIC_WEIXIN("弹出微信相册发图器的事件推送","pic_weixin"), LOCATION_SELECT("弹出地理位置选择器的事件推送","location_select"), ENTER_AGENT("成员进入应用的事件推送","enter_agent"), BATCH_JOB_RESULT("异步任务完成事件推送","batch_job_result"); private String desc; private String event; private CorpWeixinEvent(String desc, String event) { this.desc = desc; this.event = event; } public String getDesc() { return desc; } public String getEvent() { return event; } /** * 解析当前事件 * @param eventstring * @return */ public static CorpWeixinEvent parseIgnoreCase(String eventstring) { if (eventstring == null || eventstring.equals("")) { return null; } CorpWeixinEvent[] events = CorpWeixinEvent.values(); for (CorpWeixinEvent event : events) { if (eventstring.equalsIgnoreCase(event.getEvent())) { return event; } } return null; } }
[ "shipengpipi@126.com" ]
shipengpipi@126.com
8f5312cc40e9ddaf61280d16900b714a60055ebe
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a051/A051962.java
847016e3d2a06789d031a2fba8e90696962a5341
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
package irvine.oeis.a051; import irvine.oeis.FiniteSequence; /** * A051962 Discriminants of real quadratic fields with class number 1 and related continued fraction period length of 21. * @author Georg Fischer */ public class A051962 extends FiniteSequence { /** Construct the sequence. */ public A051962() { super(337, 569, 977, 1453, 1669, 1741, 2053, 2293, 4093, 4349, 5437, 5557, 8861, 9341, 10133, 10709, 11117, 12917, 14549, 15053, 16253, 18413, 18917, 19013, 19973, 20117, 20333, 25373, 28493, 29333); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
f222c50a9c97ba1ef0279f0ad27524e7b83e0570
7412a778629093639b5198ab0d7e377531eb0e91
/app/src/main/java/com/haotang/pet/entity/StartPageBean.java
e2a92098f56b0627c302f64025890cf442500f80
[]
no_license
xxxxxxxxxxj/pet_android_3.4.0
6462ef8d67d5a049ab4d27d5bd916c7c965f715b
09e438318de690a270f3a838c9a8281e2e88f112
refs/heads/master
2021-01-21T23:04:38.301309
2017-06-23T05:55:14
2017-06-23T05:56:36
95,185,040
0
0
null
null
null
null
UTF-8
Java
false
false
994
java
package com.haotang.pet.entity; import java.util.List; /** * 启动页数据实体类 * <p> * Title:StartPageBean * </p> * <p> * Description: * </p> * <p> * Company:北京昊唐科技有限公司 * </p> * * @author 徐俊 * @date 2016-10-17 下午3:29:25 */ public class StartPageBean { private List<StartPage> spcList; public static class StartPage { private String img_url; private String jump_url; private String version; public String getImg_url() { return img_url; } public void setImg_url(String img_url) { this.img_url = img_url; } public String getJump_url() { return jump_url; } public void setJump_url(String jump_url) { this.jump_url = jump_url; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } } public List<StartPage> getSpcList() { return spcList; } public void setSpcList(List<StartPage> spcList) { this.spcList = spcList; } }
[ "xvjun@haotang365.com.cn" ]
xvjun@haotang365.com.cn
e0086b50b6ad22b9b19a293660b36f7d345eb884
abe48f7dbf836bcc0a75d042517895fa2bb469b1
/Prototype-CreationalPattern/src/com/pankaj/designpattern/prototype/General.java
5ac3cd1eb5ba69688a2d6eff71d79ad53b94ec1a
[]
no_license
PankajSAgarwal/DesignPatterns
4e94ad3ce06d2632aba1b1c365010278c06f1419
3918a281855eef8a4b55a66932ea98a52647057f
refs/heads/master
2023-07-05T08:19:15.588279
2023-07-02T03:38:02
2023-07-02T03:38:02
230,851,636
1
0
null
2023-07-02T03:38:03
2019-12-30T05:11:50
JavaScript
UTF-8
Java
false
false
551
java
package com.pankaj.designpattern.prototype; // Doesnt support cloning public class General extends GameUnit { private String state = "idle"; public void boostMorale() { this.state = "MoralBoost"; } @Override public String toString() { return "General "+state+" @ "+getPosition(); } @Override public GameUnit clone() throws CloneNotSupportedException { throw new CloneNotSupportedException("Generals are unique"); } @Override protected void reset() { throw new UnsupportedOperationException("Reset not supported"); } }
[ "2005pank@gmail.com" ]
2005pank@gmail.com
fc35a7e0f888b7145bd0789ba122cae64f4266ea
2f0fd635d1de3bed6cc6357b67107968833fa595
/xiaomall-protal/src/main/java/com/xiao/xiaomall/protal/service/impl/MemberAttentionServiceImpl.java
177d49ff4306ff72ff70a9b44e8a5ebf46517c46
[]
no_license
xrqing/xiaoMall
d28c9b5c59ab8a71a3c16c77f5c52bdb019ccafd
c13af58dd69f3294329286927dc4e77e1826f002
refs/heads/master
2022-06-26T22:41:38.125845
2019-07-19T12:56:31
2019-07-19T12:56:31
194,498,525
0
0
null
2022-06-21T01:27:52
2019-06-30T09:31:43
Java
UTF-8
Java
false
false
1,454
java
package com.xiao.xiaomall.protal.service.impl; import com.xiao.xiaomall.protal.domain.MemberBrandAttention; import com.xiao.xiaomall.protal.repository.MemberBrandAttentionRepository; import com.xiao.xiaomall.protal.service.MemberAttentionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** *会员关注serviceImpl **/ @Service public class MemberAttentionServiceImpl implements MemberAttentionService { @Autowired private MemberBrandAttentionRepository memberBrandAttentionRepository; /** * 添加会员关注 * */ @Override public int add(MemberBrandAttention brandAttention) { int count = 0; MemberBrandAttention repository = memberBrandAttentionRepository.findByMemberIdAndBrandId(brandAttention.getMemberId(), brandAttention.getBrandId()); if (repository==null){ memberBrandAttentionRepository.save(brandAttention); count=1; } return count; } /** * 取消关注 * */ @Override public int delete(Long memberId, Long brandId) { return memberBrandAttentionRepository.deleteByMemberIdAndBrandId(memberId,brandId); } /** * 获取用户关注列表 */ @Override public List<MemberBrandAttention> list(Long memberId) { return memberBrandAttentionRepository.findByMemberId(memberId); } }
[ "2978183194@qq.com" ]
2978183194@qq.com
0a3034e3d06db1092abc97f97d62cc53e94db717
ed790d07af17e366b61e741f4c8a210191f3492c
/core/src/main/java/com/github/drinkjava2/jdbpro/Text.java
91ad0988e6b05cfa7f9b0fb096716e7f61ac9013
[ "Apache-2.0" ]
permissive
misselvexu/jSqlBox
c3d59cb3e1ee752788cc27023ad418c6ef2cd500
b1e13f62062473bb280e1325c51b03f87c960dd5
refs/heads/master
2020-05-16T03:01:41.541269
2019-02-15T18:41:12
2019-02-15T18:41:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,972
java
/** * Copyright 2016 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.github.drinkjava2.jdbpro; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import com.github.drinkjava2.jdialects.StrUtils; /** * Child class extended from Text support multiple line String. the toString * method will return the comments between / * - and * / , To use this function * need copy java file in resources folder, or move java file in resources * folder and set a plugin in pom.xml, detail see jSqlBox wiki * * @author Yong Zhu * @since 2.0.4 */ public class Text { private static final Map<Class<?>, String> textCache = new ConcurrentHashMap<Class<?>, String>(); @Override public String toString() { return classToString(this.getClass()); } public static String classToString(Class<?> clazz) { if (textCache.containsKey(clazz)) return textCache.get(clazz); String thisPublicStaticClassName = clazz.getSimpleName(); String javaSourceCode = TextUtils.getJavaSourceCode(clazz, "UTF-8"); String classText = StrUtils.substringBetween(javaSourceCode, "public static class " + thisPublicStaticClassName, "*/"); if (StrUtils.isEmpty(classText)) throw new RuntimeException("Can not find text between \"public static class " + thisPublicStaticClassName + " and end tag \"*/\""); String s = StrUtils.substringAfter(classText, "/*-"); textCache.put(clazz, s); return s; } }
[ "yong9981@gmail.com" ]
yong9981@gmail.com
d5b480106a56cdffd9e1f92ee7799417a611e311
65c37921c5000bc01a428d36f059578ce02ebaab
/jooq/src/main/test/test/generated/pg_catalog/routines/LsegPerp.java
93749d9c0187908fec99c7c640cae50002275c9b
[]
no_license
azeredoA/projetos
05dde053aaba32f825f17f3e951d2fcb2d3034fc
7be5995edfaad4449ec3c68d422247fc113281d0
refs/heads/master
2021-01-11T05:43:21.466522
2013-06-10T15:39:42
2013-06-10T15:40:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,577
java
/** * This class is generated by jOOQ */ package test.generated.pg_catalog.routines; /** * This class is generated by jOOQ. */ @javax.annotation.Generated(value = {"http://www.jooq.org", "2.6.0"}, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings("all") public class LsegPerp extends org.jooq.impl.AbstractRoutine<java.lang.Boolean> { private static final long serialVersionUID = -327647368; /** * The procedure parameter <code>pg_catalog.lseg_perp.RETURN_VALUE</code> */ public static final org.jooq.Parameter<java.lang.Boolean> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BOOLEAN); /** * The procedure parameter <code>pg_catalog.lseg_perp._1</code> * <p> * The SQL type of this item (lseg) could not be mapped.<br/> * Deserialising this field might not work! */ public static final org.jooq.Parameter<java.lang.Object> _1 = createParameter("_1", org.jooq.util.postgres.PostgresDataType.getDefaultDataType("lseg")); /** * The procedure parameter <code>pg_catalog.lseg_perp._2</code> * <p> * The SQL type of this item (lseg) could not be mapped.<br/> * Deserialising this field might not work! */ public static final org.jooq.Parameter<java.lang.Object> _2 = createParameter("_2", org.jooq.util.postgres.PostgresDataType.getDefaultDataType("lseg")); /** * Create a new routine call instance */ public LsegPerp() { super("lseg_perp", test.generated.pg_catalog.PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.BOOLEAN); setReturnParameter(RETURN_VALUE); addInParameter(_1); addInParameter(_2); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(java.lang.Object value) { setValue(test.generated.pg_catalog.routines.LsegPerp._1, value); } /** * Set the <code>_1</code> parameter to the function * <p> * Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement! */ public void set__1(org.jooq.Field<java.lang.Object> field) { setField(_1, field); } /** * Set the <code>_2</code> parameter IN value to the routine */ public void set__2(java.lang.Object value) { setValue(test.generated.pg_catalog.routines.LsegPerp._2, value); } /** * Set the <code>_2</code> parameter to the function * <p> * Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement! */ public void set__2(org.jooq.Field<java.lang.Object> field) { setField(_2, field); } }
[ "lindomar_reitz@hotmail.com" ]
lindomar_reitz@hotmail.com
141f41ea07daedac45309d84a9b819196b1f1c2b
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/WhereYouGo-0.9.3-beta/DecompiledCode/JADX/src/main/java/com/google/zxing/client/android/Intents.java
edd33073a70ac900f20433400037fedf9115c2fc
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,008
java
package com.google.zxing.client.android; public final class Intents { public static final class Scan { public static final String ACTION = "com.google.zxing.client.android.SCAN"; public static final String AZTEC_MODE = "AZTEC_MODE"; public static final String BARCODE_IMAGE_ENABLED = "BARCODE_IMAGE_ENABLED"; public static final String BEEP_ENABLED = "BEEP_ENABLED"; public static final String CAMERA_ID = "SCAN_CAMERA_ID"; public static final String CHARACTER_SET = "CHARACTER_SET"; public static final String DATA_MATRIX_MODE = "DATA_MATRIX_MODE"; public static final String FORMATS = "SCAN_FORMATS"; public static final String INVERTED_SCAN = "INVERTED_SCAN"; public static final String MODE = "SCAN_MODE"; public static final String ONE_D_MODE = "ONE_D_MODE"; public static final String ORIENTATION_LOCKED = "SCAN_ORIENTATION_LOCKED"; public static final String PDF417_MODE = "PDF417_MODE"; public static final String PRODUCT_MODE = "PRODUCT_MODE"; public static final String PROMPT_MESSAGE = "PROMPT_MESSAGE"; public static final String QR_CODE_MODE = "QR_CODE_MODE"; public static final String RESULT = "SCAN_RESULT"; public static final String RESULT_BARCODE_IMAGE_PATH = "SCAN_RESULT_IMAGE_PATH"; public static final String RESULT_BYTES = "SCAN_RESULT_BYTES"; public static final String RESULT_BYTE_SEGMENTS_PREFIX = "SCAN_RESULT_BYTE_SEGMENTS_"; public static final String RESULT_ERROR_CORRECTION_LEVEL = "SCAN_RESULT_ERROR_CORRECTION_LEVEL"; public static final String RESULT_FORMAT = "SCAN_RESULT_FORMAT"; public static final String RESULT_ORIENTATION = "SCAN_RESULT_ORIENTATION"; public static final String RESULT_UPC_EAN_EXTENSION = "SCAN_RESULT_UPC_EAN_EXTENSION"; public static final String TIMEOUT = "TIMEOUT"; private Scan() { } } private Intents() { } }
[ "crash@home.home.hr" ]
crash@home.home.hr
cac41e68ce5fac896a9800448f5d80fffe4fa749
33de98aeb1bb63dedff40bd707e1ed917048ec06
/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java
3ca11775a5645251a2f048fc73af0ffce4bca9f5
[ "Apache-2.0" ]
permissive
Wan123ab/spring-framework-master
519fcc32ca7f72e91774729d15e9eb7f818af893
7866ed116e29b131eb3f7414d6c6c3258c0aedd0
refs/heads/master
2021-06-26T02:08:35.117922
2020-12-07T08:01:14
2020-12-07T08:01:14
185,965,422
0
0
null
null
null
null
UTF-8
Java
false
false
3,363
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.util.xml; import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; import org.junit.Test; import static javax.xml.stream.XMLStreamConstants.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.*; import static org.xmlunit.matchers.CompareMatcher.*; /** * @author Arjen Poutsma * @author Andrzej Hołowko */ public class ListBasedXMLEventReaderTests { private final XMLInputFactory inputFactory = XMLInputFactory.newInstance(); private final XMLOutputFactory outputFactory = XMLOutputFactory.newFactory(); @Test public void standard() throws Exception { String xml = "<foo><bar>baz</bar></foo>"; List<XMLEvent> events = readEvents(xml); ListBasedXMLEventReader reader = new ListBasedXMLEventReader(events); StringWriter resultWriter = new StringWriter(); XMLEventWriter writer = this.outputFactory.createXMLEventWriter(resultWriter); writer.add(reader); assertThat(resultWriter.toString(), isSimilarTo(xml)); } @Test public void testGetElementText() throws Exception { String xml = "<foo><bar>baz</bar></foo>"; List<XMLEvent> events = readEvents(xml); ListBasedXMLEventReader reader = new ListBasedXMLEventReader(events); assertEquals(START_DOCUMENT, reader.nextEvent().getEventType()); assertEquals(START_ELEMENT, reader.nextEvent().getEventType()); assertEquals(START_ELEMENT, reader.nextEvent().getEventType()); assertEquals("baz", reader.getElementText()); assertEquals(END_ELEMENT, reader.nextEvent().getEventType()); assertEquals(END_DOCUMENT, reader.nextEvent().getEventType()); } @Test public void testGetElementTextThrowsExceptionAtWrongPosition() throws Exception { String xml = "<foo><bar>baz</bar></foo>"; List<XMLEvent> events = readEvents(xml); ListBasedXMLEventReader reader = new ListBasedXMLEventReader(events); assertEquals(START_DOCUMENT, reader.nextEvent().getEventType()); try { reader.getElementText(); fail("Should have thrown XMLStreamException"); } catch (XMLStreamException ex) { // expected assertTrue(ex.getMessage().startsWith("Not at START_ELEMENT")); } } private List<XMLEvent> readEvents(String xml) throws XMLStreamException { XMLEventReader reader = this.inputFactory.createXMLEventReader(new StringReader(xml)); List<XMLEvent> events = new ArrayList<>(); while (reader.hasNext()) { events.add(reader.nextEvent()); } return events; } }
[ "853280347@qq.com" ]
853280347@qq.com
67917485ff3dd04f4302869af0086b331db8f88d
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/google--closure-compiler/4c6e1039b80859f17de5f3cbcfeba61ed8ea0485/before/BasicErrorManager.java
8000bd8481e7c57ab6de1414e696761193ae5d64
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
5,280
java
/* * Copyright 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.javascript.jscomp; import com.google.common.collect.Sets; import com.google.javascript.jscomp.CheckLevel; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.SortedSet; /** * <p>A basic error manager that sorts all errors and warnings reported to it to * generate a sorted report when the {@link #generateReport()} method * is called.</p> * * <p>This error manager does not produce any output, but subclasses can * override the {@link #println(CheckLevel, JSError)} method to generate custom * output.</p> * * * */ public abstract class BasicErrorManager implements ErrorManager { private final SortedSet<ErrorWithLevel> messages = Sets.newTreeSet(new LeveledJSErrorComparator()); private int errorCount = 0; private int warningCount = 0; private double typedPercent = 0.0; public void report(CheckLevel level, JSError error) { if (messages.add(new ErrorWithLevel(error, level))) { if (level == CheckLevel.ERROR) { errorCount++; } else if (level == CheckLevel.WARNING) { warningCount++; } } } public void generateReport() { for (ErrorWithLevel message : messages) { println(message.level, message.error); } printSummary(); } /** * Print a message with a trailing new line. This method is called by the * {@link #generateReport()} method when generating messages. */ public abstract void println(CheckLevel level, JSError error); /** * Print the summary of the compilation - number of errors and warnings. */ protected abstract void printSummary(); public int getErrorCount() { return errorCount; } public int getWarningCount() { return warningCount; } public JSError[] getErrors() { return toArray(CheckLevel.ERROR); } public JSError[] getWarnings() { return toArray(CheckLevel.WARNING); } public void setTypedPercent(double typedPercent) { this.typedPercent = typedPercent; } public double getTypedPercent() { return typedPercent; } private JSError[] toArray(CheckLevel level) { List<JSError> errors = new ArrayList<JSError>(messages.size()); for (ErrorWithLevel p : messages) { if (p.level == level) { errors.add(p.error); } } return errors.toArray(new JSError[errors.size()]); } /** * <p>Comparator of {@link JSError} with an associated {@link CheckLevel}. * The ordering is the standard lexical ordering on the quintuple * (file name, line number, {@link CheckLevel}, * character number, description).</p> * * <p>Note: this comparator imposes orderings that are inconsistent with * {@link JSError#equals(Object)}.</p> */ static final class LeveledJSErrorComparator implements Comparator<ErrorWithLevel> { private static final int P1_LT_P2 = -1; private static final int P1_GT_P2 = 1; public int compare(ErrorWithLevel p1, ErrorWithLevel p2) { // null is the smallest value if (p2 == null) { if (p1 == null) { return 0; } else { return P1_GT_P2; } } // check level if (p1.level != p2.level) { return p2.level.compareTo(p1.level); } // sourceName comparison String source1 = p1.error.sourceName; String source2 = p2.error.sourceName; if (source1 != null && source2 != null) { int sourceCompare = source1.compareTo(source2); if (sourceCompare != 0) { return sourceCompare; } } else if (source1 == null && source2 != null) { return P1_LT_P2; } else if (source1 != null && source2 == null) { return P1_GT_P2; } // lineno comparison int lineno1 = p1.error.lineNumber; int lineno2 = p2.error.lineNumber; if (lineno1 != lineno2) { return lineno1 - lineno2; } else if (lineno1 < 0 && 0 <= lineno2) { return P1_LT_P2; } else if (0 <= lineno1 && lineno2 < 0) { return P1_GT_P2; } // charno comparison int charno1 = p1.error.getCharno(); int charno2 = p2.error.getCharno(); if (charno1 != charno2) { return charno1 - charno2; } else if (charno1 < 0 && 0 <= charno2) { return P1_LT_P2; } else if (0 <= charno1 && charno2 < 0) { return P1_GT_P2; } // description return p1.error.description.compareTo(p2.error.description); } } static class ErrorWithLevel { final JSError error; final CheckLevel level; ErrorWithLevel(JSError error, CheckLevel level) { this.error = error; this.level = level; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
32718b95cd68f3e537d83749c16db7995e52ac65
55aca439e180a9bcf0a36f60320013979905d1e5
/efreight-afbase/src/main/java/com/efreight/EfreightAfbaseApplication.java
ba338bfbd1518c4c2ad4b74f70a60b9fae715e07
[]
no_license
zhoudy-github/efreight-cloud
1a8f791f350a37c1f2828985ebc20287199a8027
fc669facfdc909b51779a88575ab4351e275bd25
refs/heads/master
2023-03-18T07:24:18.001404
2021-03-23T06:55:54
2021-03-23T06:55:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,985
java
package com.efreight; import cn.hutool.core.util.StrUtil; import org.springframework.boot.SpringApplication; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.cloud.client.SpringCloudApplication; import com.efreight.afbase.utils.SpringUtil; import com.efreight.common.security.annotation.EnableEftFeignClients; import com.efreight.common.security.annotation.EnableEftResourceServer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.core.convert.converter.Converter; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @SpringCloudApplication @EnableEftFeignClients @EnableEftResourceServer public class EfreightAfbaseApplication { public static void main(String[] args) { SpringApplication.run(EfreightAfbaseApplication.class, args); } /*** * 日期参数接收转换器,将json字符串转为日期类型 * @return */ @Bean public Converter<String, LocalDateTime> LocalDateTimeConvert() { return new Converter<String, LocalDateTime>() { @Override public LocalDateTime convert(String source) { LocalDateTime date = null; if (StrUtil.isNotBlank(source)) { DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); try { date = LocalDateTime.parse((String) source, df); } catch (Exception e) { e.printStackTrace(); } } return date; } }; } @Bean public Converter<String, LocalDate> LocalDateConvert() { return new Converter<String, LocalDate>() { @Override public LocalDate convert(String source) { LocalDate date = null; if (StrUtil.isNotBlank(source)) { DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); try { date = LocalDate.parse((String) source, df); } catch (Exception e) { e.printStackTrace(); } } return date; } }; } }
[ "yeliang_sun@163.com" ]
yeliang_sun@163.com
0edc85f9177d81fe3d05252556f7ac05ef93e48c
6811fd178ae01659b5d207b59edbe32acfed45cc
/jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/web/debug/ClearDomainFromCookiesHttpServletResponse.java
6673b7753d76703f294964497f955f5ceb084f27
[]
no_license
xiezhifeng/mysource
540b09a1e3c62614fca819610841ddb73b12326e
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
refs/heads/master
2023-04-14T00:55:23.536578
2018-04-19T11:08:38
2018-04-19T11:08:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,126
java
package com.atlassian.jira.web.debug; import java.lang.reflect.Field; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; /** * Clears domain parameter from all addCookie requests. It can be also used for the purpose of {@link * BreakpointReadyHttpServletResponse} * <p/> * It only gets setup in dev.mode and clears all domain parameters from cookies this se needed because on dev mode we * usually run on localhost and one cannot set domain cookies for localhost * * @since v6.3 */ @SuppressWarnings ("UnnecessaryLocalVariable") public class ClearDomainFromCookiesHttpServletResponse extends BreakpointReadyHttpServletResponse { private Field cookieDomainField; public ClearDomainFromCookiesHttpServletResponse(final HttpServletResponse delegate) { super(delegate); try { cookieDomainField = Cookie.class.getDeclaredField("domain"); cookieDomainField.setAccessible(true); } catch (final NoSuchFieldException e) { cookieDomainField = null; } } @Override public void addCookie(final Cookie cookie) { //we cannot simply use cookie.setDomain(null); because tomcat wants to lowercase domain name and lowercase on //null does not work try { cookieDomainField.set(cookie, null); } catch (final IllegalAccessException ignore) { } super.addCookie(cookie); } @Override public void setHeader(final String name, final String value) { super.setHeader(name, getCookieValue(name, value)); } @Override public void addHeader(final String name, final String value) { super.addHeader(name, getCookieValue(name, value)); } private String getCookieValue(final String name, final String value) { if ("Set-Cookie".equals(name) && StringUtils.isNotBlank(value)) { return value.replaceFirst("(?i)\\s*Domain=.+?;\\s*", " "); } return value; } }
[ "moink635@gmail.com" ]
moink635@gmail.com
fe081d521da679265f7f29bd984b6bad0e6c0d52
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/services/identitymanagement/model/PolicyScopeType.java
fecc71af7704adf7a92c93980c50dc409c0a252f
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
950
java
package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.identitymanagement.model; public enum PolicyScopeType { All("All"), AWS("AWS"), Local("Local"); private String value; private PolicyScopeType(String value) { this.value = value; } public String toString() { return value; } public static PolicyScopeType fromValue(String value) { if ((value == null) || ("".equals(value))) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (PolicyScopeType enumEntry : values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.identitymanagement.model.PolicyScopeType * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
6f6183150bfabd0176f247a30a9b6703903627ca
eb5f5353f49ee558e497e5caded1f60f32f536b5
/com/sun/xml/internal/ws/api/model/ParameterBinding.java
c190b8248d8eedef4ad3726dffc4d175fad186bf
[]
no_license
mohitrajvardhan17/java1.8.0_151
6fc53e15354d88b53bd248c260c954807d612118
6eeab0c0fd20be34db653f4778f8828068c50c92
refs/heads/master
2020-03-18T09:44:14.769133
2018-05-23T14:28:24
2018-05-23T14:28:24
134,578,186
0
2
null
null
null
null
UTF-8
Java
false
false
1,461
java
package com.sun.xml.internal.ws.api.model; public final class ParameterBinding { public static final ParameterBinding BODY = new ParameterBinding(Kind.BODY, null); public static final ParameterBinding HEADER = new ParameterBinding(Kind.HEADER, null); public static final ParameterBinding UNBOUND = new ParameterBinding(Kind.UNBOUND, null); public final Kind kind; private String mimeType; public static ParameterBinding createAttachment(String paramString) { return new ParameterBinding(Kind.ATTACHMENT, paramString); } private ParameterBinding(Kind paramKind, String paramString) { kind = paramKind; mimeType = paramString; } public String toString() { return kind.toString(); } public String getMimeType() { if (!isAttachment()) { throw new IllegalStateException(); } return mimeType; } public boolean isBody() { return this == BODY; } public boolean isHeader() { return this == HEADER; } public boolean isUnbound() { return this == UNBOUND; } public boolean isAttachment() { return kind == Kind.ATTACHMENT; } public static enum Kind { BODY, HEADER, UNBOUND, ATTACHMENT; private Kind() {} } } /* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\com\sun\xml\internal\ws\api\model\ParameterBinding.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "mohit.rajvardhan@ericsson.com" ]
mohit.rajvardhan@ericsson.com
f334c2325befd45d1c2c26cdbdecc020f68990f4
a0cd546101594e679544d24f92ae8fcc17013142
/refactorit-core/src/main/java/net/sf/refactorit/ui/module/RefactorItAction.java
d44c203e9273748e5b696c541e7af771a950a03f
[]
no_license
svn2github/RefactorIT
f65198bb64f6c11e20d35ace5f9563d781b7fe5c
4b1fc1ebd06c8e192af9ccd94eb5c2d96f79f94c
refs/heads/master
2021-01-10T03:09:28.310366
2008-09-18T10:17:56
2008-09-18T10:17:56
47,540,746
0
1
null
null
null
null
UTF-8
Java
false
false
4,177
java
/* * Copyright 2001-2008 Aqris Software AS. All rights reserved. * * This program is dual-licensed under both the Common Development * and Distribution License ("CDDL") and the GNU General Public * License ("GPL"). You may elect to use one or the other of these * licenses. */ package net.sf.refactorit.ui.module; import net.sf.refactorit.classmodel.BinItem; import net.sf.refactorit.commonIDE.ShortcutAction; /** * Refactoring action. * * @author Igor Malinin * @author Vlad Vislogubov * @author Anton Safonov */ public interface RefactorItAction extends ShortcutAction { /** * Determines whether this action can operate with * multiple selected objects. * * @return true if action can operate with multiple targets. */ boolean isMultiTargetsSupported(); /** * Determines whether this action can operate with * other sources than .java (jsp for example). * * @return true if action can operate with preprocessed sources. */ boolean isPreprocessedSourcesSupported(BinItem item); /** * Determines wheter action can operate on concrete class constructed from JSP source. * */ boolean isPreprocessedSourcesSupported(Class cl); /** * Module execution. * * It executes the RefactorItAction on target BinXXX object. * If you want to make a clean, first time execution of this RefactorItAction, * then you MUST provide a new Context() object into run(...) method, * otherwise, if you just want to ReRun the action on specified target, * then you provide the old context object into run(...) method it was * executed previously. * * Some module actions check the context object for old data they have * put into it. For example Metrics should check whether it should display * a Dialog full of metric selections to the user or not, it depends whether * it finds old data from Context or not. * * @param context context on which refactoring was run, * includes: project, point, state * @param object Bin object to operate * @return false if nothing changed, true otherwise. Return value should be * used to decide if the environment must be updated. */ boolean run(RefactorItContext context, Object object); /* /** * Transformation list filling method. * It DOES NOT execute the RefactorItAction, byt fills the list, given * as a parameter with appropriate refactoring transformations. * * @param context context context on which refactoring was run, * includes: project, point, state * @param object object Bin object to operate * @param transList Transformation list, that will be updated * with selected refactoring transformations * @return false if nothing changed, true otherwise. Return value should be * used to decide if the environment must be updated. * boolean run(RefactorItContext context, Object object, TransformationList transList); */ /** * Rebuilds the project, reloads current source file and shows errors * arosen during or after refactoring.<br> * Usually called after "write" refactorings. * * @param parent parent to show the dialogs * @param context context on which refactoring was executed */ void updateEnvironment(RefactorItContext context); /** If the refactoring called was of "search" type, e.g. Where Used, * Not Used etc., then we need to get focus on results pane. * * @param parent parent to show the dialogs * @param context context on which refactoring was executed */ void raiseResultsPane(RefactorItContext context); boolean isPreprocessedSourcesSupported(Class[] cl); /** * @return true if refactorings does not perform changes, false otherwise */ boolean isReadonly(); /** * * @param type bin class * @return true if action is applicable for type */ public boolean isAvailableForType(Class type); /** * @param target array of bin objects * @return true if action is available for targets */ boolean isAvailableForTarget(Object[] target); }
[ "l950637@285b47d1-db48-0410-a9c5-fb61d244d46c" ]
l950637@285b47d1-db48-0410-a9c5-fb61d244d46c
9fac56ecfd0a6479f471edcf98a8291f8bf9d389
cb90c674a9d7c27ebe0c2ad1fd6658150d92fe75
/app/src/main/java/com/beyond/popscience/frame/util/ImageLoaderUtil.java
8ba73bceb97f7e6f074b1d171435c09239a5ea36
[ "Apache-2.0" ]
permissive
sunhaiteng2016/iknow-android
b5ad49e8bf14cf3a22b72d9da3c6757a7abc41cf
b1aeec07a70953b776d0c113384b04cef3b36869
refs/heads/master
2020-07-16T09:59:34.249095
2019-09-02T02:33:43
2019-09-02T02:34:14
205,760,878
0
0
null
null
null
null
UTF-8
Java
false
false
5,702
java
package com.beyond.popscience.frame.util; import android.content.Context; import android.text.TextUtils; import android.widget.ImageView; import com.beyond.popscience.frame.application.BeyondApplication; import com.beyond.popscience.frame.view.imageloader.MDImageViewAware; import com.facebook.drawee.backends.pipeline.Fresco; import com.facebook.drawee.interfaces.DraweeController; import com.facebook.drawee.view.SimpleDraweeView; import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageloader.core.assist.ImageScaleType; import com.nostra13.universalimageloader.core.assist.QueueProcessingType; import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; import java.io.File; /** * */ public class ImageLoaderUtil { /** * @param url * @param imageAware */ public static void display(Context context, String url, ImageView imageAware) { if (TextUtils.isEmpty(url)||imageAware==null){ return; } displayImage(context, url, imageAware, null); } /** * ImageLoader display * * @param context * @param url * @param imageAware */ public static void displayImage(Context context, String url, ImageView imageAware) { displayImage(context, url, imageAware, new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisk(true).build()); } /** * * @param context * @param url * @param imageAware * @param displayImageOptions */ public static void displayImage(Context context, String url, ImageView imageAware, DisplayImageOptions displayImageOptions) { displayImage(context, url, imageAware, displayImageOptions, null); } /** * * @param url */ public static void displayImageFresco(String url, SimpleDraweeView simpleDraweeView) { DraweeController mDraweeController = Fresco.newDraweeControllerBuilder() .setAutoPlayAnimations(true) .setUri(url) .build(); simpleDraweeView.setController(mDraweeController); } /** * * @param context * @param url * @param imageAware * @param displayImageOptions * @param loadingListener */ public static void displayImage(Context context, String url, ImageView imageAware, DisplayImageOptions displayImageOptions, ImageLoadingListener loadingListener) { if (!ImageLoader.getInstance().isInited()) { init(context); } ImageLoader.getInstance().displayImage(url, new MDImageViewAware(imageAware), displayImageOptions, loadingListener); } /** * ImageLoader display * * @param context * @param url * @param displayImageOptions */ public static void loadImage(Context context, String url, DisplayImageOptions displayImageOptions, ImageLoadingListener listener) { if (!ImageLoader.getInstance().isInited()) { init(context); } ImageLoader.getInstance().loadImage(url, displayImageOptions, listener); } /** * @param context */ public static void init(Context context) { if(!ImageLoader.getInstance().isInited()){ DisplayImageOptions displayImageOptions = new DisplayImageOptions.Builder() .cacheInMemory(true) .cacheOnDisk(true) .imageScaleType(ImageScaleType.NONE) .build(); ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(context) .threadPriority(Thread.NORM_PRIORITY - 2) .denyCacheImageMultipleSizesInMemory() .defaultDisplayImageOptions(displayImageOptions) .diskCacheFileNameGenerator(new Md5FileNameGenerator()) .diskCacheSize(50 * 1024 * 1024) // 50M .tasksProcessingOrder(QueueProcessingType.FIFO) // .imageDownloader(new HttpHeaderImageDownloader(context)) //自定义的ImageDownloader @linjifa .build(); ImageLoader.getInstance().init(configuration); } } /** * 从sdcard缓存中获取图片地址 * * @param imgUrl * @return */ public static String getImgPathFromDiskCache(String imgUrl) { File file = getImgFileFromDiskCache(imgUrl); if (file != null) { return file.getAbsolutePath(); } return ""; } /** * 从sdcard缓存中获取图片 * * @param imgUrl * @return */ public static File getImgFileFromDiskCache(String imgUrl) { if (TextUtils.isEmpty(imgUrl)) { return null; } if (!ImageLoader.getInstance().isInited()) { init(BeyondApplication.getInstance()); } File imgFile = ImageLoader.getInstance().getDiskCache().get(imgUrl); if (imgFile != null && imgFile.exists()) { return imgFile; } return null; } /** * 暂停加载图片 */ public static void pauseLoadImg(){ if (ImageLoader.getInstance().isInited()){ ImageLoader.getInstance().pause(); } } /** * 恢复加载图片 */ public static void resumeLoadImg(){ if (ImageLoader.getInstance().isInited()){ ImageLoader.getInstance().resume(); } } }
[ "2502410120@qq.com" ]
2502410120@qq.com
1e55d560064e93d94601e6415e544fdd867da69a
497e5c9526e5b554d0c9c245216e61bbb081c192
/springbootdemo/springboot-servlet-war/src/main/java/mylearning/servicecomb/springboot/servlet/war/service/CommonService.java
280df01e0fa536ed4984ffe9aa9ce279c3f5d6d1
[]
no_license
zhangchi02/mylearning-servicecomb
dee6284d91d38b4d1c9e728563c70002894adbb1
a76ce695f267b8f3d21021b4cf1730ccc81176d9
refs/heads/master
2023-04-28T07:09:50.957061
2022-03-10T08:49:07
2022-03-10T08:49:34
242,974,591
1
2
null
2023-04-17T19:46:51
2020-02-25T10:39:45
Java
UTF-8
Java
false
false
567
java
package mylearning.servicecomb.springboot.servlet.war.service; import org.apache.servicecomb.provider.rest.common.RestSchema; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @RestSchema(schemaId = "common") @RequestMapping(path = "/") public class CommonService { @RequestMapping(path = "hello", method = RequestMethod.GET) public String sayHello(@RequestParam(name="name") String name) { return "Hello " + name; } }
[ "1466504436@qq.com" ]
1466504436@qq.com
4e9b1a2277ce692de092420f6bb062a31842b66d
3dd565c03bd07132c4e6abe799eb606fdc3ed0e8
/src/main/java/elec332/abstraction/impl/MCAbstractedItem.java
ed863af760f3a54c016b618346ffcc4141ba3ebc
[]
no_license
Elecs-Mods/AbstractionLayer
47d308df106dcce774c7596af07ee42b453dac22
fa529cad7fa9ceff6fa1c2d55fd929fb8cf2da9b
refs/heads/master
2020-12-31T05:56:20.164258
2017-05-25T08:27:56
2017-05-25T08:27:56
80,627,647
0
0
null
null
null
null
UTF-8
Java
false
false
2,597
java
package elec332.abstraction.impl; import elec332.abstraction.object.IAbstractedItem; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import javax.annotation.Nonnull; import java.util.List; /** * Created by Elec332 on 29-1-2017. */ public class MCAbstractedItem extends Item implements IAbstractedItem { @Override @Nonnull public final ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, @Nonnull EnumHand hand) { return onItemRightClickC(player, hand, world); } @Override @Nonnull public ActionResult<ItemStack> onItemRightClickC(EntityPlayer player, @Nonnull EnumHand hand, World world) { return super.onItemRightClick(world, player, hand); } @Override @Nonnull public final EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { return onItemUseFirstC(player, hand, world, pos, side, hitX, hitY, hitZ); } @Override @Nonnull public EnumActionResult onItemUseFirstC(EntityPlayer player, EnumHand hand, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) { return super.onItemUseFirst(player, world, pos, side, hitX, hitY, hitZ, hand); } @Override @Nonnull public final EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { return onItemUseC(player, hand, world, pos, facing, hitX, hitY, hitZ); } @Override @Nonnull public EnumActionResult onItemUseC(EntityPlayer player, EnumHand hand, World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ) { return super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ); } @Override @SideOnly(Side.CLIENT) public final void getSubItems(@Nonnull Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems) { getSubItemsC(itemIn, subItems, tab); } @Override @SideOnly(Side.CLIENT) public void getSubItemsC(@Nonnull Item item, List<ItemStack> subItems, CreativeTabs creativeTab){ super.getSubItems(item, creativeTab, (NonNullList<ItemStack>) subItems); } }
[ "arnout1998@gmail.com" ]
arnout1998@gmail.com
9ce1ba13df74e82bbdba82eeb1644f3db65ae191
22e1ae9fda07be3916337f173a4c05d166d2df14
/src/main/java/fr/uphf/se/kotlinresearch/features/analyzers/KotlinFeatureFromKastreeDiffAnalyzer.java
353e1ce6e67ea2604b62ee3d764cab72614e2cbe
[]
no_license
UPCArtifacts/migA
432ed53e4796d5f53e9092e7b0bb772623244c85
a6e6d81181bc059a8ad97bf629292dfd25bf6632
refs/heads/master
2023-04-06T14:52:39.227120
2021-01-20T09:33:33
2021-01-20T09:33:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,901
java
package fr.uphf.se.kotlinresearch.features.analyzers; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.apache.log4j.Logger; import org.jetbrains.kotlin.psi.KtElement; import com.github.gumtreediff.actions.model.Action; import com.github.gumtreediff.tree.ITree; import fr.inria.coming.changeminer.entity.IRevision; import fr.inria.coming.core.engine.Analyzer; import fr.inria.coming.core.entities.AnalysisResult; import fr.inria.coming.core.entities.DiffResult; import fr.inria.coming.core.entities.RevisionResult; import fr.uphf.feature.FeatureDetector; import fr.uphf.se.kotlinresearch.core.MigACore; import fr.uphf.se.kotlinresearch.diff.analyzers.KotlinDiffAnalyzer; import fr.uphf.se.kotlinresearch.diff.analyzers.SingleDiff; import io.gitlab.arturbosch.detekt.api.Finding; import kastree.ast.Node; /** * * @author Matias Martinez * */ public class KotlinFeatureFromKastreeDiffAnalyzer implements Analyzer<IRevision> { Logger log = Logger.getLogger(KotlinFeatureFromKastreeDiffAnalyzer.class.getName()); @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public AnalysisResult analyze(IRevision revision, RevisionResult previousResults) { long init = (new Date()).getTime(); log.debug("\n*** Analyzing revision: " + revision.getName()); DiffResult<IRevision, SingleDiff> dk = (DiffResult<IRevision, SingleDiff>) previousResults .getResultFromClass(KotlinDiffAnalyzer.class); Map<String, Map<Action, List<Finding>>> result = new HashMap<>(); for (String file : dk.getDiffOfFiles().keySet()) { SingleDiff diff = dk.getDiffOfFiles().get(file); List<Action> actions = diff.getRootOperations(); log.debug("file " + file + " #Root actions " + actions.size()); Map<Action, List<Finding>> findingsPerAction = new HashMap<Action, List<Finding>>(); for (Action action : actions) { ITree tree = action.getNode(); Node kastreenode = (Node) tree.getMetadata("kastree_node"); KtElement element = (KtElement) kastreenode.getKtEl(); try { if (element == null) { log.error("Error: not KtElement associated to kastree node " + kastreenode.getClass().getCanonicalName()); } else { List<Finding> findings = FeatureDetector.Companion.extractAll(element); log.debug("Finding in diff: " + findings.stream().map(e -> e.getId()).collect(Collectors.toList())); // featOfFile.addAll(findings); // findingsPerAction.put(action, findings); } } catch (Exception e) { log.error("Problems when extracting features from diff"); e.printStackTrace(); } } result.put(file, findingsPerAction); } MigACore.executionsTime.add(this.getClass().getSimpleName(), new Long((new Date()).getTime() - init)); return new FeatureFromDiffResult<>(revision, result); } }
[ "matias.sebastian.martinez@gmail.com" ]
matias.sebastian.martinez@gmail.com
ac3148f2f057d27092185a1b0eac18871a1bc5c3
5075a400f9984df9b07acf721c12d7b8ba22bb88
/SpringSecurityRememberMe/src/main/java/com/javatpoint/SecurityWebApplicationInitializer.java
c796dec24b97ebf8dc984eea2743a471c6ae194d
[]
no_license
aakulasaikiran/SpringSecurityExamples
1deeef068d1cac1cbfd28362c263f6866ec661e7
b22e636d04b75a34c600534e1070c13a444d8912
refs/heads/master
2020-03-27T15:21:21.742977
2018-08-30T07:44:43
2018-08-30T07:44:43
146,712,890
0
0
null
null
null
null
UTF-8
Java
false
false
219
java
package com.javatpoint; import org.springframework.security.web.context.*; public class SecurityWebApplicationInitializer extends AbstractSecurityWebApplicationInitializer { }
[ "aakulasaikiran@gmail.com" ]
aakulasaikiran@gmail.com
24c36903385a406caef5dbda8e80244b65f9dfed
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/google/maps/android/a/b/c.java
1455873b8217e0a6bca67017cbcb8dd60ae38b87
[]
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
4,632
java
package com.google.maps.android.a.b; import com.google.android.gms.measurement.api.AppMeasurementSdk; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; class c { static b a(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException { return b(xmlPullParser); } private static b b(XmlPullParser xmlPullParser) throws XmlPullParserException, IOException { String name = xmlPullParser.getName(); HashMap hashMap = new HashMap(); HashMap hashMap2 = new HashMap(); HashMap hashMap3 = new HashMap(); ArrayList arrayList = new ArrayList(); HashMap hashMap4 = new HashMap(); HashMap hashMap5 = new HashMap(); String attributeValue = xmlPullParser.getAttributeValue((String) null, "id") != null ? xmlPullParser.getAttributeValue((String) null, "id") : null; xmlPullParser.next(); int eventType = xmlPullParser.getEventType(); while (true) { if (eventType == 3 && xmlPullParser.getName().equals(name)) { return new b(hashMap, hashMap2, hashMap3, hashMap4, arrayList, hashMap5, attributeValue); } if (eventType == 2) { if (xmlPullParser.getName().matches("altitude|altitudeModeGroup|altitudeMode|begin|bottomFov|cookie|displayName|displayMode|displayMode|end|expires|extrude|flyToView|gridOrigin|httpQuery|leftFov|linkDescription|linkName|linkSnippet|listItemType|maxSnippetLines|maxSessionLength|message|minAltitude|minFadeExtent|minLodPixels|minRefreshPeriod|maxAltitude|maxFadeExtent|maxLodPixels|maxHeight|maxWidth|near|overlayXY|range|refreshMode|refreshInterval|refreshVisibility|rightFov|roll|rotationXY|screenXY|shape|sourceHref|state|targetHref|tessellate|tileSize|topFov|viewBoundScale|viewFormat|viewRefreshMode|viewRefreshTime|when")) { i.a(xmlPullParser); } else if (xmlPullParser.getName().matches("Folder|Document")) { arrayList.add(b(xmlPullParser)); } else if (xmlPullParser.getName().matches("name|description|visibility|open|address|phoneNumber")) { hashMap.put(xmlPullParser.getName(), xmlPullParser.nextText()); } else if (xmlPullParser.getName().equals("StyleMap")) { a(xmlPullParser, hashMap4); } else if (xmlPullParser.getName().equals("Style")) { c(xmlPullParser, hashMap2); } else if (xmlPullParser.getName().equals("Placemark")) { d(xmlPullParser, hashMap3); } else if (xmlPullParser.getName().equals("ExtendedData")) { b(xmlPullParser, hashMap); } else if (xmlPullParser.getName().equals("GroundOverlay")) { hashMap5.put(d.b(xmlPullParser), (Object) null); } } eventType = xmlPullParser.next(); } } private static void a(XmlPullParser xmlPullParser, HashMap<String, String> hashMap) throws XmlPullParserException, IOException { hashMap.putAll(o.b(xmlPullParser)); } private static void b(XmlPullParser xmlPullParser, HashMap<String, String> hashMap) throws XmlPullParserException, IOException { int eventType = xmlPullParser.getEventType(); String str = null; while (true) { if (eventType != 3 || !xmlPullParser.getName().equals("ExtendedData")) { if (eventType == 2) { if (xmlPullParser.getName().equals("Data")) { str = xmlPullParser.getAttributeValue((String) null, "name"); } else if (xmlPullParser.getName().equals(AppMeasurementSdk.ConditionalUserProperty.VALUE) && str != null) { hashMap.put(str, xmlPullParser.nextText()); str = null; } } eventType = xmlPullParser.next(); } else { return; } } } private static void c(XmlPullParser xmlPullParser, HashMap<String, n> hashMap) throws XmlPullParserException, IOException { if (xmlPullParser.getAttributeValue((String) null, "id") != null) { n a2 = o.a(xmlPullParser); hashMap.put(a2.b(), a2); } } private static void d(XmlPullParser xmlPullParser, HashMap<j, Object> hashMap) throws XmlPullParserException, IOException { hashMap.put(d.a(xmlPullParser), (Object) null); } }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
0a5b499612d20b708d1eb51480aaeae6a6db5c48
4a0a921a3c82a2326a4d2b7d78d4c068625fe67d
/src/main/java/nc/multiblock/turbine/tile/TileTurbineFrame.java
e9b3f19c443b3485549317cbfab84c44edfd7a06
[ "MIT", "CC0-1.0" ]
permissive
dmptrluke/NuclearCraft
3952c539330736c5bcddd5ee4724b66f835af00c
11b16a97882c87cc8037565255198f90cbe5db62
refs/heads/master
2021-10-02T19:16:24.701478
2018-11-13T13:04:59
2018-11-13T13:04:59
157,207,548
0
0
null
2018-11-12T12:05:29
2018-11-12T12:05:29
null
UTF-8
Java
false
false
726
java
package nc.multiblock.turbine.tile; import nc.multiblock.cuboidal.CuboidalPartPositionType; import nc.multiblock.turbine.Turbine; public abstract class TileTurbineFrame<TURBINE extends Turbine> extends TileTurbinePartBase<TURBINE> { public TileTurbineFrame(Class<TURBINE> tClass) { super(tClass, CuboidalPartPositionType.FRAME); } @Override public void onMachineAssembled(TURBINE controller) { doStandardNullControllerResponse(controller); super.onMachineAssembled(controller); if (getWorld().isRemote) return; } @Override public void onMachineBroken() { super.onMachineBroken(); if (getWorld().isRemote) return; //getWorld().setBlockState(getPos(), getWorld().getBlockState(getPos()), 2); } }
[ "joedodd35@gmail.com" ]
joedodd35@gmail.com
7bcdbe7e73989c5fed14304750e1b204f140dabd
460b396d197b154529be341af23889e5171fa981
/src/main/java/ibis/constellation/NoSuitableExecutorException.java
c0b7e8ad0f2cf5cbe735809a259ad4d83eb3ff1d
[ "Apache-2.0" ]
permissive
ZakariasLaws/Constellation
b51998d2de5654ec51960c8a1acfcbd0d5ee00ab
8b5b83cd8599c7547893e0fb4c52aefd92e2c022
refs/heads/master
2020-06-27T09:22:35.298810
2019-07-31T19:07:51
2019-07-31T19:07:51
199,911,627
0
0
null
2019-07-31T18:48:22
2019-07-31T18:48:20
null
UTF-8
Java
false
false
1,464
java
/* * Copyright 2018 Netherlands eScience Center * * 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 ibis.constellation; /** * This exception gets thrown when an activity is submitted from which constellation can figure out that there will not be a * suitable executor that can execute it. * */ public class NoSuitableExecutorException extends Exception { private static final long serialVersionUID = 5816385974217284589L; /** * Creates a NoSuitableExecutorException. * * @param s * describes the reason. */ public NoSuitableExecutorException(String s) { super(s); } /** * Creates a NoSuitableExecutorException. * * @param s * describes the reason. * @param cause * a nested exception that is the cause of this. */ public NoSuitableExecutorException(String s, Throwable cause) { super(s, cause); } }
[ "c.j.h.jacobs@vu.nl" ]
c.j.h.jacobs@vu.nl
3585ba12a1579c60a44c64c9da9fef8e2ce76607
9ab5bdb918b886f1f2d09d81efb63ff83a86bfb0
/coordinator/src/main/java/com/jdt/fedlearn/coordinator/service/validate/ValidateBatchServiceImpl.java
9c37ce3d2c7a968e1e7f0b1f365f62353feca9b2
[ "Apache-2.0" ]
permissive
BestJex/fedlearn
75a795ec51c4a37af34886c551874df419da3a9c
15395f77ac3ddd983ae3affb1c1a9367287cc125
refs/heads/master
2023-06-17T01:27:36.143351
2021-07-19T10:43:09
2021-07-19T10:43:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,153
java
/* Copyright 2020 The FedLearn Authors. 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.jdt.fedlearn.coordinator.service.validate; import com.fasterxml.jackson.core.JsonProcessingException; import com.google.common.collect.Maps; import com.jdt.fedlearn.coordinator.entity.validate.ValidateRequest; import com.jdt.fedlearn.coordinator.service.AbstractDispatchService; import com.jdt.fedlearn.coordinator.service.CommonService; import com.jdt.fedlearn.coordinator.service.InferenceService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.*; /** * @Name: InferenceBatchService */ public class ValidateBatchServiceImpl implements InferenceService { private static final Logger logger = LoggerFactory.getLogger(ValidateBatchServiceImpl.class); // public static final String PREDICT = "predict"; @Override public Map<String, Object> service(String content) throws JsonProcessingException { Map<String, Object> modelMap = Maps.newHashMap(); try { logger.info("validate content len:" + content.length()); ValidateRequest query = new ValidateRequest(content); Map<String, Object> predict = ValidateCommonServiceImpl.VALIDATE_SERVICE.batchValidate(query); return new AbstractDispatchService() { @Override public Map dealService() { return predict; } }.doProcess(true); } catch (Exception ex) { if (CommonService.exceptionProcess(ex, modelMap) == null) { throw ex; } } return modelMap; } }
[ "wangpeiqi@jd.com" ]
wangpeiqi@jd.com
02956e0a83e119cf6e72614f8f365d6800d36d09
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava10/Foo809Test.java
6333a62c6f034741909e0c12fbbed43e2220a549
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package applicationModulepackageJava10; import org.junit.Test; public class Foo809Test { @Test public void testFoo0() { new Foo809().foo0(); } @Test public void testFoo1() { new Foo809().foo1(); } @Test public void testFoo2() { new Foo809().foo2(); } @Test public void testFoo3() { new Foo809().foo3(); } @Test public void testFoo4() { new Foo809().foo4(); } @Test public void testFoo5() { new Foo809().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
c9adddefe99e8e71a7327b875872376eeee7be8b
573087d82d407e943423a1e97479361eb161193a
/chap02/Plot.java
4a812ba27a05e1f0c78d81857ba4b675004e3475
[]
no_license
CurtisNewbie/Algorithms
1a5980146b65ae8947f1b3d46b8a07127267546e
221639fa33965a065e9ad3e51b85e8b115a8a293
refs/heads/master
2023-08-05T03:50:26.744288
2021-09-02T11:02:28
2021-09-02T15:56:54
273,834,173
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
import edu.princeton.cs.algs4.*; public class Plot { public static void plot(final Integer[] arr, boolean sorted) { if (sorted) StdDraw.setPenColor(StdDraw.RED); int len = arr.length; StdDraw.setXscale(0, len); StdDraw.setYscale(0, len); StdDraw.setPenRadius(0.01); for (int i = 0; i < len; i++) { StdDraw.point(i, arr[i]); } } }
[ "zhuangyongj@gmail.com" ]
zhuangyongj@gmail.com
fb3f846e73c976cf95825dfd8a0c5285dc960f52
63cf604c914e0fa6328a87703a2b16a78e52eeb0
/tl/src/main/java/com/github/badoualy/telegram/tl/api/request/TLRequestChannelsDeleteUserHistory.java
995cc0d88418af866f1b45ec611c345dd9725a05
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
jacoboliveira/kotlogram
7a60d8c58e3297765015607da47bf48d4b5d0581
24bbcece0278fd1b134e869ef74e66326357b097
refs/heads/master
2020-12-25T12:40:39.144898
2016-06-23T07:04:08
2016-06-23T07:04:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,205
java
package com.github.badoualy.telegram.tl.api.request; import com.github.badoualy.telegram.tl.TLContext; import com.github.badoualy.telegram.tl.api.TLAbsInputChannel; import com.github.badoualy.telegram.tl.api.TLAbsInputUser; import com.github.badoualy.telegram.tl.api.messages.TLAffectedHistory; import com.github.badoualy.telegram.tl.core.TLMethod; import com.github.badoualy.telegram.tl.core.TLObject; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import static com.github.badoualy.telegram.tl.StreamUtils.readTLObject; import static com.github.badoualy.telegram.tl.StreamUtils.writeTLObject; import static com.github.badoualy.telegram.tl.TLObjectUtils.SIZE_CONSTRUCTOR_ID; /** * @author Yannick Badoual yann.badoual@gmail.com * @see <a href="http://github.com/badoualy/kotlogram">http://github.com/badoualy/kotlogram</a> */ public class TLRequestChannelsDeleteUserHistory extends TLMethod<TLAffectedHistory> { public static final int CONSTRUCTOR_ID = 0xd10dd71b; protected TLAbsInputChannel channel; protected TLAbsInputUser userId; private final String _constructor = "channels.deleteUserHistory#d10dd71b"; public TLRequestChannelsDeleteUserHistory() { } public TLRequestChannelsDeleteUserHistory(TLAbsInputChannel channel, TLAbsInputUser userId) { this.channel = channel; this.userId = userId; } @Override @SuppressWarnings("unchecked") public TLAffectedHistory deserializeResponse(InputStream stream, TLContext context) throws IOException { final TLObject response = readTLObject(stream, context); if (response == null) { throw new IOException("Unable to parse response"); } if (!(response instanceof TLAffectedHistory)) { throw new IOException( "Incorrect response type, expected getClass().getCanonicalName(), found response.getClass().getCanonicalName()"); } return (TLAffectedHistory) response; } @Override public void serializeBody(OutputStream stream) throws IOException { writeTLObject(channel, stream); writeTLObject(userId, stream); } @Override @SuppressWarnings("unchecked") public void deserializeBody(InputStream stream, TLContext context) throws IOException { channel = readTLObject(stream, context, TLAbsInputChannel.class, -1); userId = readTLObject(stream, context, TLAbsInputUser.class, -1); } @Override public int computeSerializedSize() { int size = SIZE_CONSTRUCTOR_ID; size += channel.computeSerializedSize(); size += userId.computeSerializedSize(); return size; } @Override public String toString() { return _constructor; } @Override public int getConstructorId() { return CONSTRUCTOR_ID; } public TLAbsInputChannel getChannel() { return channel; } public void setChannel(TLAbsInputChannel channel) { this.channel = channel; } public TLAbsInputUser getUserId() { return userId; } public void setUserId(TLAbsInputUser userId) { this.userId = userId; } }
[ "yann.badoual@gmail.com" ]
yann.badoual@gmail.com
c66a61bb0064363ec3e341ed892c06527a48812b
a2272f1002da68cc554cd57bf9470322a547c605
/src/main/java/java.xml/com/sun/org/apache/xerces/internal/xni/grammars/XMLGrammarPool.java
12460fb74c5a3432d003b7a86eb144e32ba382d8
[]
no_license
framework-projects/java
50af8953ab46c509432c467c9ad69cc63818fa63
2d131cb46f232d3bf909face20502e4ba4b84db0
refs/heads/master
2023-06-28T05:08:00.482568
2021-08-04T08:42:32
2021-08-04T08:42:32
312,414,414
2
0
null
null
null
null
UTF-8
Java
false
false
4,608
java
/* * Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * 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 com.sun.org.apache.xerces.internal.xni.grammars; /** * <p> This interface specifies how the parser and the application * interact with respect to Grammar objects that the application * possesses--either by having precompiled them or by having stored them * from a previous validation of an instance document. It makes no * assumptions about the kind of Grammar involved, or about how the * application's storage mechanism works.</p> * * <p>The interaction works as follows: * <ul> * <li>When a validator considers a document, it is expected to request * grammars of the type it can handle from this object using the * <code>retrieveInitialGrammarSet</code> method. </li> * <li>If it requires a grammar * not in this set, it will request it from this Object using the * <code>retrieveGrammar</code> method. </li> * <li> After successfully validating an * instance, the validator should make any new grammars it has compiled * available to this object using the <code>cacheGrammars</code> * method; for ease of implementation it may make other Grammars it holds references to as well (i.e., * it may return some grammars that were retrieved from the GrammarPool in earlier operations). </li> </ul> </p> * * @author Neil Graham, IBM */ public interface XMLGrammarPool { // <p>we are trying to make this XMLGrammarPool work for all kinds of // grammars, so we have a parameter "grammarType" for each of the // methods. </p> /** * <p> retrieve the initial known set of grammars. this method is * called by a validator before the validation starts. the application * can provide an initial set of grammars available to the current * validation attempt. </p> * @param grammarType the type of the grammar, from the * <code>com.sun.org.apache.xerces.internal.xni.grammars.Grammar</code> interface. * @return the set of grammars the validator may put in its "bucket" */ public Grammar[] retrieveInitialGrammarSet(String grammarType); /** * <p>return the final set of grammars that the validator ended up * with. * This method is called after the * validation finishes. The application may then choose to cache some * of the returned grammars. </p> * @param grammarType the type of the grammars being returned; * @param grammars an array containing the set of grammars being * returned; order is not significant. */ public void cacheGrammars(String grammarType, Grammar[] grammars); /** * <p> This method requests that the application retrieve a grammar * corresponding to the given GrammarIdentifier from its cache. * If it cannot do so it must return null; the parser will then * call the EntityResolver. <strong>An application must not call its * EntityResolver itself from this method; this may result in infinite * recursions.</strong> * @param desc The description of the Grammar being requested. * @return the Grammar corresponding to this description or null if * no such Grammar is known. */ public Grammar retrieveGrammar(XMLGrammarDescription desc); /** * Causes the XMLGrammarPool not to store any grammars when * the cacheGrammars(String, Grammar[[]) method is called. */ public void lockPool(); /** * Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[]) * method is called. This is the default state of the object. */ public void unlockPool(); /** * Removes all grammars from the pool. */ public void clear(); } // XMLGrammarPool
[ "chovavea@outlook.com" ]
chovavea@outlook.com
f97cf5700b0787b5f291e1ef7bdda32901fd2e33
c79a207f5efdc03a2eecea3832b248ca8c385785
/com.googlecode.jinahya/ocap-api/1.0.1/src/main/java/org/dvb/si/SITransportStreamDescription.java
f338ec2eca94be1d26a08fd18c19fcc1880b6ff3
[]
no_license
jinahya/jinahya
977e51ac2ad0af7b7c8bcd825ca3a576408f18b8
5aef255b49da46ae62fb97bffc0c51beae40b8a4
refs/heads/master
2023-07-26T19:08:55.170759
2015-12-02T07:32:18
2015-12-02T07:32:18
32,245,127
2
1
null
2023-07-12T19:42:46
2015-03-15T04:34:19
Java
UTF-8
Java
false
false
322
java
package org.dvb.si; /** * This interface represents the Transport Stream Description Table (TSDT). * <p> * It defines no methods of its own other than those inherited from SIInformation. * @see SIDatabase * @see SITransportStream */ public interface SITransportStreamDescription extends SIInformation { }
[ "onacit@e3df469a-503a-0410-a62b-eff8d5f2b914" ]
onacit@e3df469a-503a-0410-a62b-eff8d5f2b914
3020ace88422e0aadfdacbf9a4f96e28cfa3bb28
275d2fa1fafe8ef555328e24112f127798ac8cbd
/tamboo-calc/src/main/java/com/unistack/tamboo/compute/process/until/dataclean/join/JoinType.java
46874cb6cf9d36ed1cd0e6e39dfb588c87b6fe08
[]
no_license
GZ315200/yc-sa
beb2f6028cdc8d91a5fdb7e714e04415e036d0f4
26b4d51ed59f5b9c2db15cd06033921a6c52e94b
refs/heads/master
2020-03-27T17:45:14.544231
2018-08-31T12:06:24
2018-08-31T12:06:24
146,871,954
0
1
null
null
null
null
UTF-8
Java
false
false
236
java
package com.unistack.tamboo.compute.process.until.dataclean.join; import java.lang.annotation.*; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface JoinType { String value() default ""; }
[ "l2241883@gmail.com" ]
l2241883@gmail.com
a916c5e1d382134f131fcf39a17a4e1a8b94bdee
134950f7f1315d92abc95a1cf6b9c6843dcb5a4b
/Chapter9/property-source-demo/src/main/java/com/geektime/propertysourcedemo/YapfEnvironmentPostProcessor.java
eb60d7ed7c3e21e95a1711456c2038297743919b
[]
no_license
jinrunheng/spring-family-learn
d773812afed625eb65d2d7e8ec1b9d13ddedc7da
b92a87bd7c116b1c2062cc811260a323167449e1
refs/heads/master
2023-04-12T16:18:52.332279
2021-05-10T08:19:27
2021-05-10T08:19:27
305,738,244
1
0
null
null
null
null
UTF-8
Java
false
false
1,222
java
package com.geektime.propertysourcedemo; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.env.EnvironmentPostProcessor; import org.springframework.boot.env.PropertiesPropertySourceLoader; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @Slf4j public class YapfEnvironmentPostProcessor implements EnvironmentPostProcessor { private PropertiesPropertySourceLoader loader = new PropertiesPropertySourceLoader(); @Override public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { MutablePropertySources propertySources = environment.getPropertySources(); Resource resource = new ClassPathResource("yapf.properties"); try { PropertySource ps = loader.load("YetAnotherPropertiesFile", resource).get(0); propertySources.addFirst(ps); } catch (Exception e) { log.error("Exception!", e); } } }
[ "1175088275@qq.com" ]
1175088275@qq.com
42307a1c7158f48f69ad4d750ab9a413f4e62f9e
34b662f2682ae9632060c2069c8b83916d6eecbd
/cn/jpush/android/util/ab.java
7e7dfefd7198b6df06bdfd375acdb0590b2703f6
[]
no_license
mattshapiro/fc40
632c4df2d7e117100705325544fc709cd38bb0a9
b47ee545260d3e0de66dd05a973b457a3c03f5cf
refs/heads/master
2021-01-19T00:25:32.311567
2015-03-07T00:48:51
2015-03-07T00:48:51
31,795,769
0
1
null
null
null
null
UTF-8
Java
false
false
1,479
java
package cn.jpush.android.util; public final class ab extends f { private static final String z; static { Object localObject1 = "\036!{{\"+\"o~/+2{{>\033<Qj?\035=jm8".toCharArray(); int i = localObject1.length; int j = 0; Object localObject2; int k; int m; Object localObject3; label27: int n; int i1; if (i <= 1) { localObject2 = localObject1; k = j; m = i; localObject3 = localObject1; n = localObject3[j]; switch (k % 5) { default: i1 = 74; case 0: case 1: case 2: case 3: } } while (true) { localObject3[j] = ((char)(i1 ^ n)); j = k + 1; if (m == 0) { localObject3 = localObject2; k = j; j = m; break label27; } i = m; localObject1 = localObject2; if (i > j) break; z = new String((char[])localObject1).intern(); return; i1 = 116; continue; i1 = 81; continue; i1 = 14; continue; i1 = 8; } } public static String a(String paramString) { return b(z + paramString, ""); } public static void c(String paramString1, String paramString2) { a(z + paramString1, paramString2); } } /* Location: /Users/mattshapiro/Downloads/dex2jar/com.dji.smartphone.downloader-dex2jar.jar * Qualified Name: cn.jpush.android.util.ab * JD-Core Version: 0.6.2 */
[ "typorrhea@gmail.com" ]
typorrhea@gmail.com
b7b4aff1ef090584650aa7ba1858824cc33d8dc4
928d279b84807556a77d2d4e76b473bd7b3fbe89
/Leet-Code/src/Week_02/MinStack.java
1e27190a0fbfa87e68c31ab4299cb813319337a3
[ "MIT" ]
permissive
Ashleshk/Java-Online-Coding
15541d0c20c2bdc50c4547ad43ffe8152f389c2b
9955035bfb98c34f98e079a6ed7a7e0718e45655
refs/heads/main
2023-07-09T11:52:05.403472
2021-08-14T10:35:40
2021-08-14T10:35:40
314,812,020
1
0
null
null
null
null
UTF-8
Java
false
false
1,125
java
package Week_02; import java.util.*; class MinStack { /** initialize your data structure here. */ private int min=Integer.MAX_VALUE; private ArrayList<Integer>al=new ArrayList<Integer>(); public MinStack() { } public void push(int x) { if(al.size()!=0) { al.add(0,x); return; } else{ al.add(x); return; } } public void pop() { min=Integer.MAX_VALUE; if(al.size()==0) { return; } else{ al.remove(0); } } public int top() { if(al.size()==0) { return -1; } return al.get(0); } public int getMin() { for(int i:al) { if(i<min) { min=i; } } return min; } } /** * Your MinStack object will be instantiated and called as such: * MinStack obj = new MinStack(); * obj.push(x); * obj.pop(); * int param_3 = obj.top(); * int param_4 = obj.getMin(); */
[ "ashleshuk@gmail.com" ]
ashleshuk@gmail.com
d7666f057760d34fd85968441a54d51fcdff8a16
40df4983d86a3f691fc3f5ec6a8a54e813f7fe72
/app/src/main/java/com/nineoldandroids/p055b/C0970g.java
7f62aed9a1c4719a8d4f14fb75d1e941decdb14a
[]
no_license
hlwhsunshine/RootGeniusTrunAK
5c63599a939b24a94c6f083a0ee69694fac5a0da
1f94603a9165e8b02e4bc9651c3528b66c19be68
refs/heads/master
2020-04-11T12:25:21.389753
2018-12-24T10:09:15
2018-12-24T10:09:15
161,779,612
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package com.nineoldandroids.p055b; /* renamed from: com.nineoldandroids.b.g */ final class C0970g implements Runnable { /* renamed from: a */ final /* synthetic */ C0969f f2414a; C0970g(C0969f c0969f) { this.f2414a = c0969f; } public final void run() { C0969f.m2720a(this.f2414a); } }
[ "603820467@qq.com" ]
603820467@qq.com
d21e88ca696181fae0a7a6a7ac9c309776bee940
1415496f94592ba4412407b71dc18722598163dd
/doc/jitsi-bundles-dex/sources/org/jivesoftware/smackx/provider/DiscoverInfoProvider.java
e4ee657ebbf9795c11fc7d37858640c0e836a349
[ "Apache-2.0" ]
permissive
lhzheng880828/VOIPCall
ad534535869c47b5fc17405b154bdc651b52651b
a7ba25debd4bd2086bae2a48306d28c614ce0d4a
refs/heads/master
2021-07-04T17:25:21.953174
2020-09-29T07:29:42
2020-09-29T07:29:42
183,576,020
0
0
null
null
null
null
UTF-8
Java
false
false
2,117
java
package org.jivesoftware.smackx.provider; import net.java.sip.communicator.impl.protocol.jabber.extensions.jingleinfo.JingleInfoQueryIQ; import org.jitsi.org.xmlpull.v1.XmlPullParser; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smackx.packet.DiscoverInfo; import org.jivesoftware.smackx.packet.DiscoverInfo.Identity; public class DiscoverInfoProvider implements IQProvider { public IQ parseIQ(XmlPullParser parser) throws Exception { DiscoverInfo discoverInfo = new DiscoverInfo(); boolean done = false; String category = ""; String name = ""; String type = ""; String variable = ""; discoverInfo.setNode(parser.getAttributeValue("", "node")); while (!done) { int eventType = parser.next(); if (eventType == 2) { if (parser.getName().equals("identity")) { category = parser.getAttributeValue("", "category"); name = parser.getAttributeValue("", "name"); type = parser.getAttributeValue("", "type"); } else if (parser.getName().equals("feature")) { variable = parser.getAttributeValue("", "var"); } else { discoverInfo.addExtension(PacketParserUtils.parsePacketExtension(parser.getName(), parser.getNamespace(), parser)); } } else if (eventType == 3) { if (parser.getName().equals("identity")) { Identity identity = new Identity(category, name); identity.setType(type); discoverInfo.addIdentity(identity); } if (parser.getName().equals("feature")) { discoverInfo.addFeature(variable); } if (parser.getName().equals(JingleInfoQueryIQ.ELEMENT_NAME)) { done = true; } } } return discoverInfo; } }
[ "lhzheng@grandstream.cn" ]
lhzheng@grandstream.cn
b14a164e0379df291785fa94fa550530e7257c01
338973b384d4abb937b1cf97dfcabdc69b1826cc
/grpc-long-polling-common/src/test/java/com/payneteasy/grpc/longpolling/common/MessagesContainerTest.java
86d3149463fe13ef0b14cd141e7f20410fac30f8
[]
no_license
evsinev/grpc-java-long-polling
a3e859d69920f4e1d26896111b8ba4f208940258
66b1f7b052e64064b32716962fd1db1d8b5ca6f2
refs/heads/master
2023-04-08T03:16:40.852060
2020-02-26T16:34:35
2020-02-26T16:34:35
116,256,122
5
2
null
2021-04-26T19:59:46
2018-01-04T12:11:59
Java
UTF-8
Java
false
false
2,866
java
package com.payneteasy.grpc.longpolling.common; import com.payneteasy.tlv.HexUtil; import org.junit.Test; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import static com.payneteasy.grpc.longpolling.common.MessagesContainer.parse; import static com.payneteasy.tlv.HexUtil.parseHex; import static org.junit.Assert.*; public class MessagesContainerTest { @Test public void oneMessage() throws Exception { MessagesContainer messages = parse(new ByteArrayInputStream(parseHex( "01 " + // version "02" // content ))); assertFalse(messages.isEmpty()); ByteArrayOutputStream out = new ByteArrayOutputStream(10); messages.writeToOutput(out); assertEquals("[2] : 01 02", HexUtil.toFormattedHexString(out.toByteArray())); } @Test public void twoMessages() throws Exception { MessagesContainer messages = parse(new ByteArrayInputStream(parseHex( "02 " + // version "00 00 00 01 02" + // message 1 "00 00 00 02 02 03" // message 2 ))); assertFalse(messages.isEmpty()); ByteArrayOutputStream out = new ByteArrayOutputStream(10); messages.writeToOutput(out); assertEquals("[12] : 02 00 00 00 01 02 00 00 00 02 02 03", HexUtil.toFormattedHexString(out.toByteArray())); } @Test public void empty() throws Exception { assertTrue(parse(new ByteArrayInputStream(new byte[0])).isEmpty()); assertTrue("Must be empty", parse(new ByteArrayInputStream(new byte[]{0x01})).isEmpty()); assertTrue(parse(new ByteArrayInputStream(new byte[]{0x02})).isEmpty()); } @Test public void badVersion() throws Exception { try { parse(new ByteArrayInputStream(new byte[]{0x03})).isEmpty(); fail(); } catch (IllegalStateException e) { assertEquals("Version 3 not supported", e.getMessage()); } } @Test public void wrongLength() throws Exception { try { parse(new ByteArrayInputStream(parseHex( "02 " + // version "00 " ))); fail(); } catch (IllegalStateException e) { assertEquals("Cannot read length. End of the stream", e.getMessage()); } } @Test public void wrongData() throws Exception { try { parse(new ByteArrayInputStream(parseHex( "02 " + // version "00 00 00 02 " // length + "01" // wrong data ))); fail(); } catch (IllegalStateException e) { assertEquals("Cannot read data. End of the stream", e.getMessage()); } } }
[ "es@payneteasy.com" ]
es@payneteasy.com
1aaa52ef5520049a81208b61591435b44c6dc7ca
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/28/28_4c08ba1e9ada4e1a639586856294fd4d0001c79a/ZipFileSystem/28_4c08ba1e9ada4e1a639586856294fd4d0001c79a_ZipFileSystem_t.java
c18ddf0a22df6bda3f3f2a92a45d692d1e9d64f4
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,999
java
/* * Copyright 2011 Josh Beitelspacher * * 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.netbeetle.reboot.core; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collection; import java.util.Enumeration; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; public class ZipFileSystem implements RebootFileSystem { private final ZipFile zipFile; private class ZipDirectory extends RebootDirectory { public ZipDirectory(String name) { super(name); } @Override public Collection<RebootFile> list(boolean recursive) { List<RebootFile> contents = new ArrayList<RebootFile>(); Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); String name = entry.getName(); if (name.startsWith(getName()) && name.length() > getName().length()) { if (recursive || name.indexOf('/', getName().length()) == -1) { if (entry.isDirectory()) { contents.add(new ZipDirectory(entry.getName())); } else { contents.add(new ZipEntryFile(entry)); } } } } return contents; } } private class ZipEntryFile extends RebootStreamFile { private final ZipEntry entry; public ZipEntryFile(ZipEntry entry) { super(entry.getName()); this.entry = entry; } @Override public InputStream getInputStream() throws IOException { return zipFile.getInputStream(entry); } @Override public long getSize() { return entry.getSize(); } } public ZipFileSystem(ZipFile zipFile) { this.zipFile = zipFile; } @Override public RebootFile getFile(String name) { if (name.isEmpty()) { return new ZipDirectory(name); } ZipEntry entry = zipFile.getEntry(name); if (entry == null) { // some zip files don't contain directory entries, so look for files // inside the directory instead if (name.endsWith("/")) { Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { ZipEntry nextEntry = entries.nextElement(); String nextName = nextEntry.getName(); if (nextName.endsWith("/")) { // the zip file contain directories, don't bother // scanning any further through it to find the directory // in question // this may fail to find directories inside zip files // that use directory entries inconsistently, but // preventing long scans through valid zip files is more // important than handling inconsistent zip files break; } else if (nextName.startsWith(name)) { // found a file inside the directory return new ZipDirectory(name); } } } return null; } else if (entry.isDirectory()) { return new ZipDirectory(name); } else { return new ZipEntryFile(entry); } } @Override public String fingerprint() throws IOException { try { return HashUtil.hash(new File(zipFile.getName())); } catch (NoSuchAlgorithmException e) { throw new IOException("Unable to compute hash", e); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8fe2303744e79698c02f028f8cde773a28bbfde5
dec9e85ae5a2c874d71bb05f9b7b7cd49c1132ff
/modules/fuse-patch/patch-commands/src/main/java/org/jboss/fuse/patch/commands/model/FuseVersion.java
0b74446fbdc72f7ab20dcb9ae88bed98a03d9741
[ "Apache-2.0" ]
permissive
jboss-fuse/fuse-karaf
2c5b54f4bf64a688f4f9fc4adcf258e5642deb21
5c57f3349252422c85a003654a0675fcec43e7da
refs/heads/7.x.redhat-7-x
2023-08-08T05:16:31.987195
2023-07-27T12:25:32
2023-07-27T12:25:32
67,794,596
26
30
Apache-2.0
2023-09-11T06:52:03
2016-09-09T11:46:46
Java
UTF-8
Java
false
false
3,670
java
/* * Copyright 2005-2020 Red Hat, 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 org.jboss.fuse.patch.commands.model; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.eclipse.aether.util.version.GenericVersionScheme; import org.eclipse.aether.version.InvalidVersionSpecificationException; import org.eclipse.aether.version.VersionRange; public class FuseVersion { public static final GenericVersionScheme GVS = new GenericVersionScheme(); private int major = 0; private int minor = 0; private String qualifier = ""; // in Fuse BOMs, sb2 infix is always present in BOM version since FUse 7.8 private boolean sb1 = true; public FuseVersion(String version) { // DefaultArtifactVersion v = new DefaultArtifactVersion(version); // 7.8.0 will be parsed correctly // 7.8.0-fuse-xxx will be parsed correctly // 7.8.0.1 won't be parsed correctly // 7.8.0.redhat-xxx will give correct major.minor, but qualifier will be "redhat" instead of "redhat-xxx" // 7.8.0-redhat-xxx will be parsed correctly // // but because we can't reliably get full qualifier, we'll parse the vesion manually StringTokenizer st = new StringTokenizer(version, "."); List<Integer> digits = new ArrayList<>(); StringBuilder qualifier = new StringBuilder(); boolean inQualifier = false; while (st.hasMoreTokens()) { String part = st.nextToken(); if (!inQualifier) { for (char c : part.toCharArray()) { if (!Character.isDigit(c)) { // this part and the rest will be the qualifier inQualifier = true; break; } } } if (inQualifier) { qualifier.append('.').append(part); } else { digits.add(Integer.parseInt(part)); } } if (digits.size() == 0) { // case of "1-redhat" version... major = 0; minor = 0; sb1 = false; } else { major = digits.get(0); if (digits.size() > 1) { minor = digits.get(1); } } this.qualifier = qualifier.toString(); if (this.qualifier.length() > 0) { // skip the '.' this.qualifier = this.qualifier.substring(1); } if (this.qualifier.contains("-sb2-")) { this.sb1 = false; } } public int getMajor() { return major; } public int getMinor() { return minor; } public boolean isSb1() { return sb1; } public String getQualifier() { return qualifier; } public boolean canUse(VersionRange productVersionRange) { try { return productVersionRange.containsVersion(GVS.parseVersion(String.format("%d.%d", major, minor))); } catch (InvalidVersionSpecificationException ignored) { return false; } } }
[ "gr.grzybek@gmail.com" ]
gr.grzybek@gmail.com
193a66c1b67d4d042337c5e3502addd0fbb45832
d0a87b74643e8ab0d7393185a815dfd378733bae
/carrental-ejb/src/main/java/ch/xxx/carrental/ui/dto/CrTableRow.java
7b52289deabb6d8db42dc69ef8552ff12861b3a0
[ "Apache-2.0" ]
permissive
Angular2Guy/Angular2AndJavaEE
bbb9aeb488a700d922472b4b1c30edc13c2df7a9
de1f208cfef36649688da83f00216f1f1109f3ed
refs/heads/master
2023-08-16T10:14:41.388159
2023-08-10T18:10:25
2023-08-10T18:10:25
74,204,252
110
45
Apache-2.0
2023-08-10T18:10:28
2016-11-19T11:25:06
Java
UTF-8
Java
false
false
4,061
java
/** * Copyright 2016 Sven Loesekann 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 ch.xxx.carrental.ui.dto; import java.math.BigDecimal; import java.util.Date; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name="CrTableRow") @XmlAccessorType(XmlAccessType.FIELD) public class CrTableRow { @XmlElement(required=true) private String mietNr; @XmlElement(required=true) private String jahr; @XmlElement(required=false) private String status; @XmlElement(required=false) private String grund; @XmlElement(required=false) private Integer fahrzeugeTotal; @XmlElement(required=false) private BigDecimal mieteGeplantTotal; @XmlElement(required=false) private BigDecimal mieteAbgerechnetTotal; @XmlElement(required=false) private Integer anzahlPkw; @XmlElement(required=false) private Integer anzahlLkw; @XmlElement(required=false) private Date mutatedAt; @XmlElement(required=false) private String mutatedBy; @XmlElement(required=false) private boolean mahnstop; public CrTableRow() { } public CrTableRow(String mietNr, String jahr, String status, String grund, Integer fahrzeugeTotal, BigDecimal mieteGeplantTotal, BigDecimal mieteAbgerechnetTotal, Integer anzahlPkw, Integer anzahlLkw, Date mutatedAt, String mutatedBy, boolean mahnstop) { super(); this.mietNr = mietNr; this.jahr = jahr; this.status = status; this.grund = grund; this.fahrzeugeTotal = fahrzeugeTotal; this.mieteGeplantTotal = mieteGeplantTotal; this.mieteAbgerechnetTotal = mieteAbgerechnetTotal; this.anzahlPkw = anzahlPkw; this.anzahlLkw = anzahlLkw; this.mutatedAt = mutatedAt; this.mutatedBy = mutatedBy; this.mahnstop = mahnstop; } public String getMietNr() { return mietNr; } public void setMietNr(String mietNr) { this.mietNr = mietNr; } public String getJahr() { return jahr; } public void setJahr(String jahr) { this.jahr = jahr; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getGrund() { return grund; } public void setGrund(String grund) { this.grund = grund; } public BigDecimal getMieteGeplantTotal() { return mieteGeplantTotal; } public void setMieteGeplantTotal(BigDecimal mieteGeplantTotal) { this.mieteGeplantTotal = mieteGeplantTotal; } public BigDecimal getMieteAbgerechnetTotal() { return mieteAbgerechnetTotal; } public void setMieteAbgerechnetTotal(BigDecimal mieteAbgerechnetTotal) { this.mieteAbgerechnetTotal = mieteAbgerechnetTotal; } public Integer getAnzahlPkw() { return anzahlPkw; } public void setAnzahlPkw(Integer anzahlPkw) { this.anzahlPkw = anzahlPkw; } public Integer getAnzahlLkw() { return anzahlLkw; } public void setAnzahlLkw(Integer anzahlLkw) { this.anzahlLkw = anzahlLkw; } public Date getMutatedAt() { return mutatedAt; } public void setMutatedAt(Date mutatedAt) { this.mutatedAt = mutatedAt; } public String getMutatedBy() { return mutatedBy; } public void setMutatedBy(String mutatedBy) { this.mutatedBy = mutatedBy; } public boolean isMahnstop() { return mahnstop; } public void setMahnstop(boolean mahnstop) { this.mahnstop = mahnstop; } public Integer getFahrzeugeTotal() { return fahrzeugeTotal; } public void setFahrzeugeTotal(Integer fahrzeugeTotal) { this.fahrzeugeTotal = fahrzeugeTotal; } }
[ "you@example.com" ]
you@example.com
769578fa03343c999b4d0676d38acec31505a6b6
7214286385dbe2d6c4253ad7014c7df3deda9ced
/app/src/main/java/com/khalej/Turbaadmin/Activity/Delete_category.java
1c036c2195d3a7966e03865cf7d94059b2c290da
[]
no_license
mohamedfathyd/Boutique_Admin
874c8ebe08239b7c8c32ccd863d833aa864005f0
c28566487b804189d4234f56b33b1ccb69ef287b
refs/heads/master
2020-08-11T03:12:23.997173
2019-11-23T14:01:12
2019-11-23T14:01:24
214,479,633
0
0
null
null
null
null
UTF-8
Java
false
false
3,276
java
package com.khalej.Turbaadmin.Activity; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.ProgressBar; import android.widget.TextView; import com.khalej.Turbaadmin.Adapter.RecyclerAdapter_deletefirst; import com.khalej.Turbaadmin.model.Apiclient_home; import com.khalej.Turbaadmin.model.apiinterface_home; import com.khalej.Turbaadmin.model.contact_home; import com.khalej.HelpMe.R; import java.util.List; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class Delete_category extends AppCompatActivity { Toolbar toolbar; ProgressBar progressBar; private RecyclerView recyclerView; private RecyclerView.LayoutManager layoutManager; private RecyclerAdapter_deletefirst recyclerAdapter_secondry; private List<contact_home> contactList; private apiinterface_home apiinterface; int id = 0; String name; int sec_id; Typeface myTypeface; Intent intent; TextView textView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_delete_category); progressBar = (ProgressBar) findViewById(R.id.progressBar_subject); textView = (TextView) findViewById(R.id.toolbar_title); progressBar.setVisibility(View.VISIBLE); toolbar = (Toolbar) findViewById(R.id.app_bar); intent = getIntent(); this.setTitle(""); toolbar.setNavigationIcon(R.drawable.ic_keyboard_arrow_left_black_24dp); setSupportActionBar(toolbar); toolbar.setNavigationOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { finish(); } } ); recyclerView = (RecyclerView) findViewById(R.id.review); progressBar = (ProgressBar) findViewById(R.id.progressBar_subject); progressBar.setVisibility(View.VISIBLE); layoutManager = new GridLayoutManager(this, 1); recyclerView.setLayoutManager(layoutManager); recyclerView.setHasFixedSize(true); fetchInfo(); } public void fetchInfo() { apiinterface = Apiclient_home.getapiClient().create(apiinterface_home.class); Call<List<contact_home>> call = apiinterface.getcontacts_first(); call.enqueue(new Callback<List<contact_home>>() { @Override public void onResponse(Call<List<contact_home>> call, Response<List<contact_home>> response) { contactList = response.body(); progressBar.setVisibility(View.GONE); recyclerAdapter_secondry = new RecyclerAdapter_deletefirst(Delete_category.this, contactList); recyclerView.setAdapter(recyclerAdapter_secondry); } @Override public void onFailure(Call<List<contact_home>> call, Throwable t) { } }); } }
[ "m.fathy7793@gmail.com" ]
m.fathy7793@gmail.com
b4e4981f13bb3acb9d2024d66d856f6d81fbb74a
40665051fadf3fb75e5a8f655362126c1a2a3af6
/idylnlp-idylnlp/37bcbf3ac3a19f93693299cdfdc660038393818f/772/TrainingDefinitionValidationResult.java
4e57f7ad175bb252789a4ffde087e6faecae364d
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
1,279
java
/******************************************************************************* * Copyright 2018 Mountain Fog, 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 ai.idylnlp.training.definition.model; import java.util.List; public class TrainingDefinitionValidationResult { private boolean valid; private List<String> messages; public TrainingDefinitionValidationResult() { this.valid = true; } public TrainingDefinitionValidationResult(boolean valid, List<String> messages) { this.valid = valid; this.messages = messages; } public boolean isValid() { return valid; } public List<String> getMessages() { return messages; } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
67afd000e65e7ac0771682256f7dd366d36fb47f
ac7c1a8c3d1e812da141970804ed86b5c5abacea
/Toy Language Interpreter/SantaClaus/src/View/TextMenu.java
6f343e0d4a6df0c6e5c2196ddb2de5f10c41017f
[]
no_license
Boress23/Advanced-Methods-of-Programming
fe111e5f09090b166ccfb40a1a68cfeeec9d1fb9
faf67373dcbc926a180122a7e06a88544ef03a29
refs/heads/master
2022-01-07T06:47:23.764189
2022-01-02T17:08:13
2022-01-02T17:08:13
415,936,974
0
0
null
null
null
null
UTF-8
Java
false
false
939
java
package View; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class TextMenu { private Map<String, Command> commands; public TextMenu(){ commands = new HashMap<>(); } public void addCommand(Command c){ commands.put(c.getKey(), c); } private void printMenu(){ for(Command com : commands.values()){ String line = String.format("%4s : %s", com.getKey(), com.getDescription()); System.out.println(line); } } public void show(){ Scanner scanner=new Scanner(System.in); while(true){ printMenu(); System.out.printf("Input the option: "); String key=scanner.nextLine(); Command com=commands.get(key); if (com==null){ System.out.println("Invalid Option"); continue; } com.execute(); } } }
[ "todorananacorina13@gmail.com" ]
todorananacorina13@gmail.com
44deef6fb5e293e8bc796e36ae5a75ccf5f9bb9d
f9e2110d9405476e40b1ea36a94aec45a9dc851d
/src/main/java/com/sen/design/pattern/resposibilitychain/DepartmentApprover.java
f4cc78c8fa226c2d20a30f3d7b4637a958c7f8b0
[]
no_license
sumforest/design-pattern
b4eec127eff50a208e57efcbeb2849aa52994a62
1f09e0edd90b65860d1e694f2167fd4b6d5eaddf
refs/heads/master
2023-06-08T11:22:05.194180
2023-06-01T10:40:03
2023-06-01T10:40:03
221,487,151
0
0
null
null
null
null
UTF-8
Java
false
false
578
java
package com.sen.design.pattern.resposibilitychain; import java.math.BigDecimal; /** * @Auther: Sen * @Date: 2019/11/17 23:15 * @Description: */ public class DepartmentApprover extends Approver { public DepartmentApprover(String name) { super(name); } @Override public void processRequest(PurchaseRequest request) { if (request.getPrice().longValue() <= 1000) { System.out.println("请求:" + request.getId() + "被:" + this.name + "处理"); } else { approver.processRequest(request); } } }
[ "12345678" ]
12345678
ce4f064a188736f7a4a82e76a0f2e3dcbfa22469
41fe59ea9a363730543d8d9d1b475546e2fd4e08
/src/main/java/com/wewebu/ow/server/app/OwGlobalParametersConfiguration.java
9266dda781b2cc274360a21ad586674f37056ea1
[]
no_license
flashboss/workdesk
49a8c99e864edf121a31f2b043803ef0e36af633
fcf280c918c7d895d55be166e32c7c214045d367
refs/heads/master
2016-08-11T05:37:44.452860
2015-05-22T14:56:27
2015-05-22T14:56:27
36,077,649
0
0
null
null
null
null
UTF-8
Java
false
false
3,561
java
package com.wewebu.ow.server.app; import java.util.List; import org.alfresco.wd.ui.conf.OwUniformParamConfiguration; import com.wewebu.ow.server.util.OwXMLUtil; /** *<p> * simple Helper to work with GlobalParameters configuration. *</p> * *<p><font size="-2"> * Alfresco Workdesk<br/> * Copyright (c) Alfresco Software, Inc.<br/> * All rights reserved.<br/> * <br/> * For licensing information read the license.txt file or<br/> * go to: http://wiki.alfresco.com<br/> *</font></p> *@since 4.2.0.0 */ public class OwGlobalParametersConfiguration { private OwXMLUtil root; public OwGlobalParametersConfiguration(OwXMLUtil root) { this.root = root; } /** * Return a boolean value for requested parameter. * @param paramName String name of parameter * @param defaultValue boolean default value * @return boolean value from configuration if existing, else defaultValue */ public boolean getSafeBoolean(String paramName, boolean defaultValue) { OwXMLUtil util = getXMLUtil(paramName); if (util != null) { String value = util.getSafeTextValue(null); if (value != null) { return Boolean.parseBoolean(value); } } return defaultValue; } /** * Return a boolean value for requested parameter. * @param paramName String name of parameter * @param defaultValue integer default value * @return integer value from configuration if existing, else defaultValue */ public int getSafeInteger(String paramName, int defaultValue) { OwXMLUtil util = getXMLUtil(paramName); if (util != null) { String value = util.getSafeTextValue(null); if (value != null) { try { return Integer.parseInt(value); } catch (NumberFormatException nfex) { } } } return defaultValue; } /** * Return a boolean value for requested parameter. * @param paramName String name of parameter * @param defaultValue String default value * @return String value from configuration if existing, else defaultValue */ public String getSafeString(String paramName, String defaultValue) { OwXMLUtil util = getXMLUtil(paramName); if (util != null) { return util.getSafeTextValue(defaultValue); } else { return defaultValue; } } /** * Get the OwXMLUtil which is has the parameter name * @param paramName String * @return OwXMLUtil or null */ @SuppressWarnings("unchecked") protected OwXMLUtil getXMLUtil(String paramName) { if (root != null) { List<OwXMLUtil> utils = root.getSafeUtilList(null); for (OwXMLUtil util : utils) { if (OwUniformParamConfiguration.ELEM_PARAM.equals(util.getName())) { String name = util.getSafeStringAttributeValue(OwUniformParamConfiguration.ATT_NAME, null); if (name != null && name.equals(paramName)) { return util; } } } } return null; } }
[ "luca.stancapiano@pronetics.it" ]
luca.stancapiano@pronetics.it
b360689d89c051f9686ec94b132f78b558dd4d8b
5bc000f17ebb4ba7fec573fd5c889ad993bfec4d
/src/test/java/com/dairy/producerportal/security/OAuth2TokenMockUtil.java
182da07ca7aa28b78b87c9e73eee3a8754b5cec9
[]
no_license
donlyon/producer-portal
53569d1bd965672a68fe5aa2a47d92fc820abfa7
d1461c5168aa876eae0596a72ca7e88dd7be6ee1
refs/heads/master
2021-08-17T09:25:58.084003
2019-01-24T21:06:02
2019-01-24T21:06:02
167,437,729
0
0
null
2021-08-03T11:14:31
2019-01-24T21:05:57
Java
UTF-8
Java
false
false
3,369
java
package com.dairy.producerportal.security; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.User; import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.security.oauth2.provider.OAuth2Request; import org.springframework.security.oauth2.provider.token.ResourceServerTokenServices; import org.springframework.stereotype.Component; import org.springframework.test.web.servlet.request.RequestPostProcessor; import java.util.Collections; import java.util.List; import java.util.Set; import java.util.UUID; import java.util.stream.Collectors; import static org.mockito.BDDMockito.given; /** * A bean providing simple mocking of OAuth2 access tokens for security integration tests. */ @Component public class OAuth2TokenMockUtil { @MockBean private ResourceServerTokenServices tokenServices; private OAuth2Authentication createAuthentication(String username, Set<String> scopes, Set<String> roles) { List<GrantedAuthority> authorities = roles.stream() .map(SimpleGrantedAuthority::new) .collect(Collectors.toList()); User principal = new User(username, "test", true, true, true, true, authorities); Authentication authentication = new UsernamePasswordAuthenticationToken(principal, principal.getPassword(), principal.getAuthorities()); // Create the authorization request and OAuth2Authentication object OAuth2Request authRequest = new OAuth2Request(null, "testClient", null, true, scopes, null, null, null, null); return new OAuth2Authentication(authRequest, authentication); } public RequestPostProcessor oauth2Authentication(String username, Set<String> scopes, Set<String> roles) { String uuid = String.valueOf(UUID.randomUUID()); given(tokenServices.loadAuthentication(uuid)) .willReturn(createAuthentication(username, scopes, roles)); given(tokenServices.readAccessToken(uuid)).willReturn(new DefaultOAuth2AccessToken(uuid)); return new OAuth2PostProcessor(uuid); } public RequestPostProcessor oauth2Authentication(String username, Set<String> scopes) { return oauth2Authentication(username, scopes, Collections.emptySet()); } public RequestPostProcessor oauth2Authentication(String username) { return oauth2Authentication(username, Collections.emptySet()); } public static class OAuth2PostProcessor implements RequestPostProcessor { private String token; public OAuth2PostProcessor(String token) { this.token = token; } @Override public MockHttpServletRequest postProcessRequest(MockHttpServletRequest mockHttpServletRequest) { mockHttpServletRequest.addHeader("Authorization", "Bearer " + token); return mockHttpServletRequest; } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
b5db90e8dc69bacd96bf402fca23a148e191f47b
e78e34e44c0682de24fc35c27d9ebda13cb950a9
/app/src/main/java/br/senac/sp/l13/appheroephpmysql/RequestHandler.java
f217fe198bf30b00a9bcef4b8fd1416092a115a4
[]
no_license
lndsilva/AppHeroePHPMySQL-Final
07dbfcc4c426c39b39cea2a0bbe36cd552704fcc
d5d4322e3b08ec6a9979bad693e1b39ae892f8a7
refs/heads/master
2020-03-26T22:01:06.950805
2018-08-20T14:14:54
2018-08-20T14:14:54
145,424,429
0
0
null
null
null
null
UTF-8
Java
false
false
2,999
java
package br.senac.sp.l13.appheroephpmysql; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; import javax.net.ssl.HttpsURLConnection; public class RequestHandler { public String sendPostRequest(String requestURL, HashMap<String, String> postDataParams) { URL url; StringBuilder sb = new StringBuilder(); try { url = new URL(requestURL); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(15000); conn.setConnectTimeout(15000); conn.setRequestMethod("POST"); conn.setDoInput(true); conn.setDoOutput(true); OutputStream os = conn.getOutputStream(); BufferedWriter writer = new BufferedWriter( new OutputStreamWriter(os, "UTF-8")); writer.write(getPostDataString(postDataParams)); writer.flush(); writer.close(); os.close(); int responseCode = conn.getResponseCode(); if (responseCode == HttpsURLConnection.HTTP_OK) { BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); sb = new StringBuilder(); String response; while ((response = br.readLine()) != null) { sb.append(response); } } } catch (Exception e) { e.printStackTrace(); } return sb.toString(); } public String sendGetRequest(String requestURL) { StringBuilder sb = new StringBuilder(); try { URL url = new URL(requestURL); HttpURLConnection con = (HttpURLConnection) url.openConnection(); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream())); String s; while ((s = bufferedReader.readLine()) != null) { sb.append(s + "\n"); } } catch (Exception e) { } return sb.toString(); } private String getPostDataString(HashMap<String, String> params) throws UnsupportedEncodingException { StringBuilder result = new StringBuilder(); boolean first = true; for (Map.Entry<String, String> entry : params.entrySet()) { if (first) first = false; else result.append("&"); result.append(URLEncoder.encode(entry.getKey(), "UTF-8")); result.append("="); result.append(URLEncoder.encode(entry.getValue(), "UTF-8")); } return result.toString(); } }
[ "lndsilva@hotmail.com" ]
lndsilva@hotmail.com
48bb3fa2b50dc7f87e63c22866eaca2d09365ef6
9f262284abcd2f31d8987f3137cd023b28be5de6
/app/src/main/java/ua/r4mstein/moviedbdemo/modules/people/popular/PopularPeopleFragment.java
ae3af43139dcdd82130169ac167d991105c93335
[]
no_license
r4mstein/MovieDBDemo
4531f571d96e40e24195bdd52c83f3c7f553e917
f15e84f745d381078cd1be3a17cb6bd6d983bb63
refs/heads/master
2020-04-05T14:02:49.644089
2017-07-04T11:22:36
2017-07-04T11:22:36
94,750,417
0
0
null
null
null
null
UTF-8
Java
false
false
2,657
java
package ua.r4mstein.moviedbdemo.modules.people.popular; import android.support.annotation.NonNull; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import java.util.List; import ua.r4mstein.moviedbdemo.R; import ua.r4mstein.moviedbdemo.data.models.response.popular_people.KnownFor; import ua.r4mstein.moviedbdemo.data.models.response.popular_people.PopularPeopleItem; import ua.r4mstein.moviedbdemo.modules.base.BaseFragment; import ua.r4mstein.moviedbdemo.utills.EndlessScrollListener; public class PopularPeopleFragment extends BaseFragment<PopularPeoplePresenter> implements PopularPeoplePresenter.PopularPeopleView { private RecyclerView mRecyclerView; private PopularPeopleAdapter mAdapter; @Override protected int getTitle() { return R.string.title_popular_people; } @Override protected int getLayoutResource() { return R.layout.fragment_popular_people; } @Override protected PopularPeoplePresenter initPresenter() { return new PopularPeoplePresenter(); } @Override protected void findUI(View rootView) { mRecyclerView = (RecyclerView) rootView.findViewById(R.id.rv_FPP); } @Override protected void setupUI() { LinearLayoutManager layoutManager = new LinearLayoutManager(getContext()); mRecyclerView.setLayoutManager(layoutManager); mAdapter = new PopularPeopleAdapter(getViewContext()); mAdapter.setPopularPeopleClickListener(getPopularPeopleClickListener()); mRecyclerView.setAdapter(mAdapter); mRecyclerView.addOnScrollListener(new EndlessScrollListener(layoutManager, () -> { getPresenter().getNextPage(); return true; })); } @NonNull private PopularPeopleClickListener getPopularPeopleClickListener() { return new PopularPeopleClickListener() { @Override public void popularPeopleItemClicked(long movieId) { getPresenter().goToPersonDetailScreen(movieId); } @Override public void popularPeopleItemLongClicked(long movieId) { } @Override public void knownForClicked(List<KnownFor> list) { getPresenter().showKnownForDialog(list); } }; } @Override public void setList(List<PopularPeopleItem> list) { mAdapter.setData(list); } @Override public void addList(List<PopularPeopleItem> list) { mAdapter.addData(list); } }
[ "r4mstein@ukr.net" ]
r4mstein@ukr.net
9767a1b47cf2257ce0b79361152ee722104dc5f3
28da7038838ff7bc3263cf10684fdfbcb19cd673
/src/java/main/com/lankr/tv_cloud/web/api/webchat/util/WechatTokenDeal.java
d167f90413ba5a3c4044944d144587ea2170a334
[]
no_license
hefugu136234/weike_learn
e2b820b8c550f8a81f7c88968ee43b56c2c32cdb
5cfa678e8ab124999870a368aae4f5a75d1d5f5c
refs/heads/master
2021-01-13T16:17:59.246218
2017-02-08T09:45:43
2017-02-08T09:45:43
81,301,335
0
0
null
null
null
null
UTF-8
Java
false
false
7,137
java
package com.lankr.tv_cloud.web.api.webchat.util; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import java.util.HashMap; import java.util.concurrent.TimeUnit; import org.apache.commons.lang3.StringUtils; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.lankr.tv_cloud.utils.HttpUtils; import com.lankr.tv_cloud.utils.JSONObject; import com.lankr.tv_cloud.web.api.webchat.util.MenuButtons.Button; public class WechatTokenDeal { public static HashMap<String, Object> cacheMap=new HashMap<String, Object>(); //局部临时access_token,作用获取用户的信息,有效7200=2小时 public final static String INTERIM_ACCESS_TOKEN="interim_access_token"; /** * 局部刷新refresh_token,刷新access_token,有效30天,一旦刷新access_token, * refresh_token将失效,重新获取access_token,refresh_token */ public final static String INTERIM_REFRESH_TOKEN="interim_refresh_token"; //全局的access_token,有效7200=2小时,主要用在服务号本身操作,如菜单 //也可查询数据api,公众号(暂不使用),无refresh_token,一旦失效,重新请求 public final static String WHOLE_ACCESS_TOKEN="whole_access_token"; public static void main(String[] args) { WechatTokenDeal deal=new WechatTokenDeal(); // String nickname=deal.getUserInfo(); // String nickname="{🎀asda案说法三十&*((*……%&*&*个HJHKB内科——+++}"; // nickname=EmojiFilter.filterEmoji(nickname); // System.out.println(nickname); // deal.delMenu(); // deal.creatMenu(); } /** * 11-24 生成带参数的二维码 * 用户扫描带场景值二维码时,可能推送以下两种事件: 如果用户还未关注公众号,则用户可以关注公众号,关注后微信会将带场景值关注事件推送给开发者。 如果用户已经关注公众号,在用户扫描后会自动进入会话,微信也会将带场景值扫描事件推送给开发者。 */ public final static String SCENE_URL="https://api.weixin.qq.com/cgi-bin/qrcode/create"; //11-28正式上线的场景id public final static int SCENE_ID=20151128; //2016-3-23 摇一摇 public final static int YAO_SCENE_ID=99999999; /** *知了测试 * @return */ // public final static String appid="wx276a6518ef3995a3"; // public final static String appsecret="0762905a3b431911df541f3dab30e002"; // public final static String LOCAL_URL ="http://zbox.lankr.cn/api/webchat"; public final static String appid="wx6f33bbfa98752634"; public final static String appsecret="30f76c4cd1d9202071960a7f6f34bbd3"; public final static String LOCAL_URL ="http://weike.z-box.com.cn/api/webchat"; public static String getAccessToken() { String url = WebChatMenu.WEBCHAT_URL_PRE + "/token?grant_type=client_credential&appid=" + appid + "&secret=" + appsecret; String access_object = HttpUtils.sendGetRequest(url); System.out.println("getAccessTokenResult="+access_object); JSONObject demoJson = new JSONObject(access_object); String access_token = demoJson.getString("access_token"); return access_token; } //获取用户基本信息的测试 public String getUserInfo(){ //o9UKvw5Z9chFspnDSF-o4rn54ZSg (xing) o9UKvw8f0tM0R47ajWSnL8yo_ZZM String access_token=getAccessToken(); String url="https://api.weixin.qq.com/cgi-bin/user/info?access_token="+access_token + "&openid=o9UKvw8f0tM0R47ajWSnL8yo_ZZM" + "&lang=zh_CN"; String message=HttpUtils.sendGetRequest(url); System.out.println(message); JSONObject demoJson = new JSONObject(message); String nickname=demoJson.getString("nickname"); System.out.println(nickname); System.out.println(nickname.length()); for(int i = 0 ; i < nickname.length() ; i++){ System.out.println(nickname.charAt(i)); } return nickname; } public void createQr(){ ActionInfo info=new ActionInfo(); Scene sce=new Scene(); sce.setScene_id(YAO_SCENE_ID); info.setScene(sce); WxTempQr wxTempQr=new WxTempQr(); wxTempQr.setExpire_seconds(TimeUnit.DAYS.toSeconds(30)); //wxTempQr.setExpire_seconds(TimeUnit.D.toSeconds(300)); wxTempQr.setAction_name(WxTempQr.QR_SCENE);//临时 wxTempQr.setAction_info(info); Gson gson=new Gson(); String json=gson.toJson(wxTempQr); String acess_token=getAccessToken(); String s_url=SCENE_URL+"?access_token="+acess_token; String message=HttpUtils.sendPostRequest(s_url, json,true); System.out.println("message="+message); JSONObject demoJson = new JSONObject(message); String ticket = demoJson.getString("ticket"); System.out.println("ticket="+ticket); long expire_seconds = demoJson.getLong("expire_seconds"); System.out.println(expire_seconds); String url = demoJson.getString("url"); System.out.println("url="+url); } public String creatMenu() { String access_token = getAccessToken(); String url = WebChatMenu.WEBCHAT_URL_PRE + "/menu/create?access_token=" + access_token; MenuButtons menuButtons = buildMenu(); Gson gson = new GsonBuilder().disableHtmlEscaping().create(); String json_menu = gson.toJson(menuButtons); //System.out.println(json_menu); String result = HttpUtils.sendPostRequest(url, json_menu, false); System.out.println(result); return result; } public String delMenu() { String access_token = getAccessToken(); String url = WebChatMenu.WEBCHAT_URL_PRE + "/menu/delete?access_token=" + access_token; String result = HttpUtils.sendGetRequest(url); System.out.println(result); return result; } public MenuButtons buildMenu() { MenuButtons menuButtons = new MenuButtons(); MenuButtons.Button button1 = new MenuButtons.Button(); button1.setType("view"); button1.setName("知了微课"); button1.setKey("zlxy"); button1.setUrl(getWebAutoUrl("/api/webchat/index")); MenuButtons.Button button2 = new MenuButtons.Button(); button2.setType("view"); button2.setName("精彩直播"); button2.setKey("ZBHD"); button2.setUrl(getWebAutoUrl("/api/webchat/broadcast/wonder/page")); MenuButtons.Button button3 = new MenuButtons.Button(); button3.setType("view"); button3.setName("个人中心"); button3.setKey("GRZX"); button3.setUrl(getWebAutoUrl("/api/webchat/my/center")); Button[] button = {button1 ,button2,button3}; menuButtons.setButton(button); return menuButtons; } // 获取微信的认证链接 public static String getWebAutoUrl(String url) { String redirect_uri = LOCAL_URL + "/auth/common/skip?redirect_uri="+url; try { redirect_uri = URLEncoder.encode(redirect_uri, "UTF-8"); System.out.println(redirect_uri); System.out.println(URLDecoder.decode(redirect_uri, "UTF-8")); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } String entrance_url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + appid + "&" + "redirect_uri=" + redirect_uri + "&response_type=code&scope=snsapi_base&" + "state=" + WebChatMenu.ZHILIAO_STATE + "#wechat_redirect"; System.out.println(entrance_url); return entrance_url; } }
[ "shineng.he@lankr.cn" ]
shineng.he@lankr.cn
5ee1123caa5be2aac92d85a25603469edf6ea16c
606c8f5c854bcc4bc5b5e9404fe56cbc6fd38d3b
/src/test/java/indi/mybatis/flying/test/jmh/MyBenchmarkTest.java
ac1ca52029979d6f71887292ea74c2ee84f03097
[ "Apache-2.0" ]
permissive
limeng32/mybatis.flying
53aa16b3ab0c2d09e8210738d7c2286652b76594
970ec4f972c10357f2bfdfbb6647a58ae1e2c688
refs/heads/master
2023-08-17T14:10:06.076377
2023-08-11T08:25:22
2023-08-11T08:25:22
85,466,479
365
14
Apache-2.0
2023-07-07T21:37:48
2017-03-19T10:07:30
Java
UTF-8
Java
false
false
2,968
java
package indi.mybatis.flying.test.jmh; import java.util.concurrent.TimeUnit; import org.junit.Ignore; import org.junit.Test; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; import org.openjdk.jmh.runner.options.TimeValue; import indi.mybatis.flying.pojo2.Account; import indi.mybatis.flying.pojo2.Account2; import indi.mybatis.flying.pojo2.LoginLog; public class MyBenchmarkTest { @Ignore @Test public void launchBenchmark() throws Exception { Options opt = new OptionsBuilder() // Specify which benchmarks to run. // You can be more specific if you'd like to run only one benchmark per test. .include(this.getClass().getSimpleName()) // Set the following options as needed .mode(Mode.AverageTime).timeUnit(TimeUnit.NANOSECONDS).warmupTime(TimeValue.seconds(1)) .warmupIterations(5).measurementTime(TimeValue.seconds(1)).measurementIterations(1).forks(1) // .shouldFailOnError(true).shouldDoGC(true) // .jvmArgs("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining") // .addProfiler(WinPerfAsmProfiler.class) .build(); new Runner(opt).run(); } @Benchmark public Object testMethod() { Account2 a = new Account2(); a.setId(1L); LoginLog l1 = new LoginLog(); l1.setId(1); LoginLog l2 = new LoginLog(); l2.setId(2); LoginLog l3 = new LoginLog(); l3.setId(3); LoginLog l4 = new LoginLog(); l4.setId(4); LoginLog l5 = new LoginLog(); l5.setId(5); LoginLog l6 = new LoginLog(); l6.setId(6); LoginLog l7 = new LoginLog(); l7.setId(7); LoginLog l8 = new LoginLog(); l8.setId(8); LoginLog l9 = new LoginLog(); l9.setId(9); LoginLog l10 = new LoginLog(); l10.setId(10); a.addLoginLog(l1); a.addLoginLog(l2); a.addLoginLog(l3); a.addLoginLog(l4); a.addLoginLog(l5); a.addLoginLog(l6); a.addLoginLog(l7); a.addLoginLog(l8); a.addLoginLog(l9); a.addLoginLog(l10); return a; } @Benchmark public Object testMethod2() { Account a = new Account(); a.setId(1L); LoginLog l1 = new LoginLog(); l1.setId(1); LoginLog l2 = new LoginLog(); l2.setId(2); LoginLog l3 = new LoginLog(); l3.setId(3); LoginLog l4 = new LoginLog(); l4.setId(4); LoginLog l5 = new LoginLog(); l5.setId(5); LoginLog l6 = new LoginLog(); l6.setId(6); LoginLog l7 = new LoginLog(); l7.setId(7); LoginLog l8 = new LoginLog(); l8.setId(8); LoginLog l9 = new LoginLog(); l9.setId(9); LoginLog l10 = new LoginLog(); l10.setId(10); a.addLoginLog(l1); a.addLoginLog(l2); a.addLoginLog(l3); a.addLoginLog(l4); a.addLoginLog(l5); a.addLoginLog(l6); a.addLoginLog(l7); a.addLoginLog(l8); a.addLoginLog(l9); a.addLoginLog(l10); return a; } }
[ "limeng32@live.cn" ]
limeng32@live.cn
12721bb0019aaf4e943543cb8426c68921634aa8
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Mockito-18/org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues/BBC-F0-opt-100/tests/25/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValues_ESTest.java
0f8c451838189f669eb1a11fdad2fb5d03d501bd
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
2,236
java
/* * This file was automatically generated by EvoSuite * Sat Oct 23 20:23:45 GMT 2021 */ package org.mockito.internal.stubbing.defaultanswers; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.LinkedList; import java.util.List; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues; import org.mockito.invocation.InvocationOnMock; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class ReturnsEmptyValues_ESTest extends ReturnsEmptyValues_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { ReturnsEmptyValues returnsEmptyValues0 = new ReturnsEmptyValues(); // Undeclared exception! try { returnsEmptyValues0.answer((InvocationOnMock) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues", e); } } @Test(timeout = 4000) public void test1() throws Throwable { ReturnsEmptyValues returnsEmptyValues0 = new ReturnsEmptyValues(); Class<List> class0 = List.class; LinkedList linkedList0 = (LinkedList)returnsEmptyValues0.returnValueFor(class0); assertEquals(0, linkedList0.size()); } @Test(timeout = 4000) public void test2() throws Throwable { ReturnsEmptyValues returnsEmptyValues0 = new ReturnsEmptyValues(); Class<Integer> class0 = Integer.class; Object object0 = returnsEmptyValues0.returnValueFor(class0); assertEquals(0, object0); } @Test(timeout = 4000) public void test3() throws Throwable { ReturnsEmptyValues returnsEmptyValues0 = new ReturnsEmptyValues(); Class<Object> class0 = Object.class; Object object0 = returnsEmptyValues0.returnValueFor(class0); assertNull(object0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
bb4b17c5abe18be994a10d66b006f09b4b5714ce
9113e825106c3f756bc982493fa634309d32ff23
/src/com/cabletech/linepatrol/hiddanger/model/HiddangerEndplan.java
1c60a4c5fca2825b08549820c081cfa0085796c7
[]
no_license
liveqmock/hljnewweb
204cea81c12d4051e29d9dd237b16e58422a5f73
a895281c9ee72cf6992aac298bbd4eb8b283a9db
refs/heads/master
2020-05-29T11:38:35.424256
2012-09-18T07:54:15
2012-09-18T07:54:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
773
java
package com.cabletech.linepatrol.hiddanger.model; public class HiddangerEndplan { private String id; private String planId; private String endType; private String reason; private String creater; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPlanId() { return planId; } public void setPlanId(String planId) { this.planId = planId; } public String getEndType() { return endType; } public void setEndType(String endType) { this.endType = endType; } public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } public String getCreater() { return creater; } public void setCreater(String creater) { this.creater = creater; } }
[ "253479240@qq.com" ]
253479240@qq.com
cf420c68e8b69f06388b48f6a7a5cdb54267d82e
3ca95f96a980a0c86743813adc1fd18df11b8808
/xwiki-commons-core/xwiki-commons-filter/xwiki-commons-filter-xml/src/main/java/org/xwiki/filter/xml/internal/parser/DefaultXMLParserFactory.java
7a85cc2d19452c95352aede88098135005e4e0db
[]
no_license
phamthaithinh/xwiki-commons
ca80ec76548248942df5630858da95e6d67dc0f9
3adac7d99e49abf905224910de86fe66dab2b88c
refs/heads/master
2021-01-21T09:34:12.253956
2014-09-02T14:28:16
2014-09-02T14:28:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,043
java
/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.xwiki.filter.xml.internal.parser; import javanet.staxutils.XMLEventStreamWriter; import javanet.staxutils.XMLStreamUtils; import javax.inject.Inject; import javax.inject.Singleton; import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLStreamException; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.stax.StAXResult; import javax.xml.transform.stax.StAXSource; import org.xml.sax.ContentHandler; import org.xwiki.component.annotation.Component; import org.xwiki.filter.FilterDescriptorManager; import org.xwiki.filter.xml.XMLConfiguration; import org.xwiki.filter.xml.internal.parameter.ParameterManager; import org.xwiki.filter.xml.parser.XMLParserFactory; import org.xwiki.properties.ConverterManager; import org.xwiki.xml.stax.SAXEventWriter; /** * Default implementation of {@link XMLParserFactory}. * * @version $Id$ * @since 5.2M1 */ @Component @Singleton public class DefaultXMLParserFactory implements XMLParserFactory { /** * The parameter converter. */ @Inject private ParameterManager parameterManager; /** * The events supported by the listener. */ @Inject private FilterDescriptorManager descriptorManager; /** * Used to convert simple types. */ @Inject private ConverterManager converter; /** * @param filter the filter to send events to * @param configuration the configuration of the parser * @return the parser as a {@link ContentHandler}. */ private ContentHandler createParser(Object filter, XMLConfiguration configuration) { return new DefaultXMLParser(filter, this.descriptorManager.getFilterDescriptor(filter.getClass()), this.converter, this.parameterManager, configuration); } @Override public void parse(Source source, Object filter, XMLConfiguration configuration) throws XMLStreamException { if (source instanceof StAXSource) { // StAXSource is not supported by standard XMLInputFactory StAXSource staxSource = (StAXSource) source; if (staxSource.getXMLEventReader() != null) { XMLStreamUtils.copy(staxSource.getXMLEventReader(), createXMLEventWriter(filter, configuration)); } else { XMLStreamUtils.copy(staxSource.getXMLStreamReader(), new XMLEventStreamWriter(createXMLEventWriter(filter, configuration))); } } else { XMLStreamUtils.copy(source, createXMLEventWriter(filter, configuration)); } } @Override public Result createResult(Object filter, XMLConfiguration configuration) { return new StAXResult(createXMLEventWriter(filter, configuration)); } @Override public XMLEventWriter createXMLEventWriter(Object filter, XMLConfiguration configuration) { return new SAXEventWriter(createParser(filter, configuration)); } @Override public ContentHandler createContentHandler(Object filter, XMLConfiguration configuration) { return createParser(filter, configuration); } }
[ "thomas.mortagne@gmail.com" ]
thomas.mortagne@gmail.com
9751d26ff0338f0c1067b498b5aee2ae925f3d96
df99a4475f03503b9a8d015a961cb36874ced89e
/app/src/main/java/com/example/myapplication/UploadPhotoBean.java
39638df1e15857e6dee07071ffbc43b9be599b58
[]
no_license
landuhello/BusinessAdanvanceSample
7b9cf5c8900ed7e366a9b2a3d8e2283d26a70e13
2dff3b760225d9b3a501f2cb0bec47276bf0ea6b
refs/heads/master
2020-07-02T05:30:08.813380
2019-08-09T08:41:47
2019-08-09T08:41:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
992
java
package com.example.myapplication; public class UploadPhotoBean { /** * headPath : http://172.17.8.100/images/head_pic/20180720175142.png * message : 上传成功 * status : 0000 */ private String headPath; private String message; private String status; public String getHeadPath() { return headPath; } public void setHeadPath(String headPath) { this.headPath = headPath; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Override public String toString() { return "UploadPhotoBean{" + "headPath='" + headPath + '\'' + ", message='" + message + '\'' + ", status='" + status + '\'' + '}'; } }
[ "tongchexinfeitao@sina.cn" ]
tongchexinfeitao@sina.cn
281258c80587253a8e1a6cfa84e9b65ce08369e0
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p042cz/msebera/android/httpclient/client/protocol/RequestClientConnControl.java
3db1dd3d7489c4adec9ca39689bdefd39a103dc4
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,879
java
package p042cz.msebera.android.httpclient.client.protocol; import java.io.IOException; import p042cz.msebera.android.httpclient.HttpException; import p042cz.msebera.android.httpclient.HttpRequest; import p042cz.msebera.android.httpclient.HttpRequestInterceptor; import p042cz.msebera.android.httpclient.conn.routing.RouteInfo; import p042cz.msebera.android.httpclient.extras.HttpClientAndroidLog; import p042cz.msebera.android.httpclient.protocol.HTTP; import p042cz.msebera.android.httpclient.protocol.HttpContext; import p042cz.msebera.android.httpclient.util.Args; /* renamed from: cz.msebera.android.httpclient.client.protocol.RequestClientConnControl */ public class RequestClientConnControl implements HttpRequestInterceptor { private static final String PROXY_CONN_DIRECTIVE = "Proxy-Connection"; public HttpClientAndroidLog log = new HttpClientAndroidLog(getClass()); public void process(HttpRequest httpRequest, HttpContext httpContext) throws HttpException, IOException { Args.notNull(httpRequest, "HTTP request"); if (httpRequest.getRequestLine().getMethod().equalsIgnoreCase("CONNECT")) { httpRequest.setHeader(PROXY_CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE); return; } RouteInfo httpRoute = HttpClientContext.adapt(httpContext).getHttpRoute(); if (httpRoute == null) { this.log.debug("Connection route not set in the context"); return; } if ((httpRoute.getHopCount() == 1 || httpRoute.isTunnelled()) && !httpRequest.containsHeader("Connection")) { httpRequest.addHeader("Connection", HTTP.CONN_KEEP_ALIVE); } if (httpRoute.getHopCount() == 2 && !httpRoute.isTunnelled() && !httpRequest.containsHeader(PROXY_CONN_DIRECTIVE)) { httpRequest.addHeader(PROXY_CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE); } } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
4a4153bf030de10aaa5481fe31d94498b1fc3034
73601deb01f3c3f90fbe6346c5d407653431609a
/First_Step/sample/45/286/submittedfiles/Tools.java
f60cf1a9539f2bca4cba3c6bf8d17e64ae008115
[]
no_license
Benjam73/ComplexityAnalyzer
145fbac896ac18e6239791a636fe871efc3de332
27a0f1d5528ee66f2913b18137425aae59d06b0f
refs/heads/master
2020-03-17T09:25:31.308634
2018-07-20T13:34:17
2018-07-20T13:34:17
133,474,612
0
0
null
null
null
null
UTF-8
Java
false
false
724
java
/** * A class providing a static method for sorting. */ public class Tools { /** * Sort the table given in argument using a bubble sort algoritm, * and returns the sorted table. */ public static int[] sortBubble(int[] tab) { int n=tab.length; int i=0; boolean trie=false; while(!trie){ trie=true; for (int j=0; j<n-1; j++){ if (tab[j]>tab[j+1]){ echanger(tab,j,j+1); trie=false; } } } return tab; } public static void echanger(int tab[], int i, int j){ int mem=tab[i]; tab[i]=tab[j]; tab[j]=mem; } }
[ "besnierbenjamin73@gmail.com" ]
besnierbenjamin73@gmail.com
23f3c65312320d5ff9bacd07a6aafe8bdff961d9
cb381fba627fd41c892f9169edd0198d5b64b734
/taska/login/src/main/java/pojo/UserManagement.java
93a3d605cfd8feaecfc2ff21721a907b4779929b
[ "Apache-2.0" ]
permissive
jiuyuey/test
99f1f1e83ec2080b5a78b6dfc68e2727d073c549
e8cf922b30bef4b3f3456168024760e629d1faba
refs/heads/master
2022-12-25T07:22:11.090653
2020-03-16T08:10:50
2020-03-16T08:10:50
180,545,307
3
0
Apache-2.0
2022-12-16T09:44:15
2019-04-10T09:11:51
Java
UTF-8
Java
false
false
615
java
package pojo; public class UserManagement { private String name; private String password; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return "UserManagement{" + "name='" + name + '\'' + ", password='" + password + '\'' + '}'; } }
[ "your email" ]
your email
ef6ecb0ce1fa056dc2e20d9685062e5bd76fa223
d59ecc8ff1193c4e5f77f8b57eb85ff97daaba14
/src/main/java/com/hzth/myapp/myHttpClient/protocol/CallbackInterface.java
ba7f4aa1564c229ea31f84622b2adadd67b9d771
[]
no_license
tianyl1984/myWebApp
0d7a6dfc6ca73a339b16262e4988fbada1e93965
21edbf1f8d2a653824ddbae1540c6ed9c398dfe5
refs/heads/master
2020-04-06T09:36:06.798747
2016-09-06T07:29:44
2016-09-06T07:29:44
49,413,254
0
0
null
null
null
null
UTF-8
Java
false
false
1,432
java
/** * $Id: CallbackInterface.java 23 2012-05-27 23:19:57Z k42b3.x@googlemail.com $ * * aletheia * A browser like application to send raw http requests. It is designed for * debugging and finding security issues in web applications. For the current * version and more informations visit <http://code.google.com/p/aletheia> * * Copyright (c) 2010-2012 Christoph Kappestein <k42b3.x@gmail.com> * * This file is part of Aletheia. Aletheia is free software: you can * redistribute it and/or modify it under the terms of the GNU * General Public License as published by the Free Software Foundation, * either version 3 of the License, or at any later version. * * Aletheia is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aletheia. If not, see <http://www.gnu.org/licenses/>. */ package com.hzth.myapp.myHttpClient.protocol; /** * CallbackInterface * * @author Christoph Kappestein <k42b3.x@gmail.com> * @license http://www.gnu.org/licenses/gpl.html GPLv3 * @link http://aletheia.k42b3.com * @version $Revision: 23 $ */ public interface CallbackInterface { public void onResponse(Request request, Response response); }
[ "tianyl1984@qq.com" ]
tianyl1984@qq.com
f7f1a78cc75bc65638aa992350a549330d96081b
8eac9fe5030455cb9d1692d2136fa79046fa3350
/src/main/java/com/i4one/base/web/controller/admin/balancetriggers/WebModelBalanceTrigger.java
f01d42253924b79202119261ccd66ab206d6f694
[ "MIT" ]
permissive
badiozam/concord
1987190d9aac2fb89b990e561acab6a59275bd7b
343842aa69f25ff9917e51936eabe72999b81407
refs/heads/master
2022-12-24T06:29:32.881068
2020-07-01T19:26:05
2020-07-01T19:26:05
149,226,043
0
0
MIT
2022-12-16T09:44:00
2018-09-18T03:53:29
Java
UTF-8
Java
false
false
2,473
java
/* * MIT License * * Copyright (c) 2018 i4one Interactive, LLC * * 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.i4one.base.web.controller.admin.balancetriggers; import com.i4one.base.model.RecordTypeDelegator; import com.i4one.base.model.balancetrigger.BalanceTrigger; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; /** * @author Hamid Badiozamani */ public class WebModelBalanceTrigger extends BalanceTrigger { static final long serialVersionUID = 42L; private final transient List<RecordTypeDelegator<?>> featureList; public WebModelBalanceTrigger() { super(); featureList = new ArrayList<>(); // The policy is to create non-exclusive triggers here, and exclusive // triggers within the feature to which the trigger will be attached // getDelegate().setExclusive(false); } public WebModelBalanceTrigger(BalanceTrigger trigger) { super(trigger.getDelegate()); featureList = new ArrayList<>(); } public List<RecordTypeDelegator<?>> getFeatureList() { return Collections.unmodifiableList(featureList); } public void setFeatureList(Collection<RecordTypeDelegator<?>> featureList) { this.featureList.clear(); this.featureList.addAll(featureList); } @Override public final void setExclusive(boolean exclusive) { // Can't alter the exclusive flag because this trigger will always be // non-exclusive // } }
[ "badiozam@yahoo.com" ]
badiozam@yahoo.com
80fb629716b1891ab8d86ecece2ca34145630168
276f2b0d78b06d0f58258f41138e7a19ffbccf00
/src/org/javacore/annotation/target/CatchTarget.java
a4630b67ed787be13b10f6c6ab71a2c0a9664a80
[]
no_license
orb1t/ByteCodeSpecification
887c39935099a1174ab8f2716f18d63fcb4c653f
d5dc2bf7cc96c02e80e33f6170936d909f5a77e1
refs/heads/master
2020-03-18T13:47:22.964691
2017-09-18T21:25:16
2017-09-18T21:25:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
140
java
package org.javacore.annotation.target; /** */ public interface CatchTarget extends Target { public int getExceptionTableIndex(); }
[ "mattwzawislak@gmail.com" ]
mattwzawislak@gmail.com
f6bb249b85a230a459655eb202d4379001f6ae3a
3234ec2fb42d6ebdf7e5f27b5cfdf0e4cbcae0f3
/src/fiap/scj/ws/soap/client/AppMain.java
061c2a027d9bc2f083d81ee5eb80e054a05d483f
[]
no_license
felipefriserio/SoapClient
9887d4fcf440903db4a8789f7ee0794040a0fa99
4b734ff9c39524cb1e6125ded9350393243543bf
refs/heads/master
2021-04-18T20:38:00.975153
2018-03-24T15:03:26
2018-03-24T15:03:26
126,610,536
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package fiap.scj.ws.soap.client; public class AppMain { public static void main(String[] args) { MinhaSaudeImpl servico = new MinhaSaudeImplService().getMinhaSaudeImplPort(); float imc = servico.calcularImc(1.8f, 60); System.out.println("Seu IMC eh : "+imc); System.out.println(servico.classificacaoImc(imc)); } }
[ "logonrm@fiap.com.br" ]
logonrm@fiap.com.br
b6418c0e3ac5b45cd65618e55d1455ee61cdd92e
642323b88f6a3f9050d3ce297b80c02715ba08db
/Databases Advanced - Hibernate & Spring/01-Java-Basics/src/IndexOfLetters.java
9388f2f288c32913047f8e86c4d734da1ebe5e4a
[]
no_license
VenelinBakalov/javaAdvanced
5a9e418c6666f85fe8a8d1e65d587a863af367b9
d890a84fa56af2e24669e60f48f6d776cf55e9ef
refs/heads/master
2021-01-11T21:07:45.912758
2017-12-03T15:39:27
2017-12-03T15:39:27
79,252,307
8
8
null
null
null
null
UTF-8
Java
false
false
1,080
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * Created by Venelin on 27.6.2017 г.. */ public class IndexOfLetters { public static void main(String[] args) throws IOException { char[] letters = new char[26]; for (int i = 0; i < letters.length; i++) { letters[i] = (char) ('a' + i); } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String word = reader.readLine(); for (int i = 0; i < word.length(); i++) { char currentLetter = word.charAt(i); for (int j = 0; j < letters.length; j++) { if (letters[j] == currentLetter) { System.out.println(currentLetter + " -> " + j); break; } } } /* for (int i = 0; i < word.length(); i++) { char currentLetter = word.charAt(i); System.out.println(currentLetter + " -> " + ((int)currentLetter - 97)); } */ } }
[ "venelin_bakalov@abv.bg" ]
venelin_bakalov@abv.bg
654f7558bd3bb31ac0d69c4a0bfd8df34bc780eb
4c89db7a4173c90b4c91ec742ede6909abac2a8d
/src/L16_July16/InheritanceStory/Client.java
b7500ef01b045e52c6f49f814fabfdb659f56a0a
[]
no_license
jatin5jan/Crux5June2019PP
94c8529687b666ec4494af7d03fbfe7843d4cb32
9b1ecf2f8f0952010b282e217660b17d4b521329
refs/heads/master
2020-07-10T15:08:05.494563
2019-08-18T15:18:36
2019-08-18T15:18:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,009
java
package L16_July16.InheritanceStory; /** * @author Garima Chhikara * @email garima.chhikara@codingblocks.com * @date 16-Jul-2019 * */ public class Client { public static void main(String[] args) { // Case 1 P obj1 = new P(); System.out.println(obj1.d); System.out.println(obj1.d1); obj1.fun(); obj1.fun1(); // Case 2 P obj2 = new C(); System.out.println(obj2.d); // 10 System.out.println(((C) obj2).d); // 20 System.out.println(obj2.d1); // 100 System.out.println(((C) obj2).d2); // 200 obj2.fun(); // C Fun obj2.fun1(); // P Fun 1 ((C) obj2).fun2(); // C Fun 2 // Case 3 // C obj3 = new P() ; // System.out.println(obj3.d); // System.out.println(obj3.d1); // System.out.println(obj3.d2); // Case 4 C obj4 = new C(); System.out.println(obj4.d); // 20 System.out.println(((P) obj4).d); // 10 System.out.println(obj4.d1); // 100 System.out.println(obj4.d2); // 200 obj4.fun(); // C Fun obj4.fun1(); // P Fun 1 obj4.fun2(); // C Fun 2 } }
[ "garimachhikara128@gmail.com" ]
garimachhikara128@gmail.com
1c39a1ffdfaf9a36acc71c7b4b47cfcdca5c81f2
9fbd2ba8247f7bc8cd884c1c2f89c45e4ee54bf6
/lib/org.apache.lucene/lucene-3.0.3/src/java/org/apache/lucene/util/AverageGuessMemoryModel.java
4694cda4dec8c5c47cf03b893057ea107776b5e5
[ "MIT", "BSD-3-Clause", "Apache-2.0", "ICU", "Python-2.0", "LicenseRef-scancode-unicode-mappings" ]
permissive
rappazzo/PartyDJ
94906fc5d93dad9d7d45aa6ccf20bdd4050b5ac2
7c3abe4ae0402dbdbb1a0ddaabe141c3112be6c6
refs/heads/master
2021-01-10T19:36:47.817717
2012-02-16T17:31:09
2012-02-16T17:31:25
1,173,147
4
1
null
null
null
null
UTF-8
Java
false
false
2,202
java
package org.apache.lucene.util; /** * 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. */ import java.util.IdentityHashMap; import java.util.Map; /** * An average, best guess, MemoryModel that should work okay on most systems. * */ public class AverageGuessMemoryModel extends MemoryModel { // best guess primitive sizes private final Map<Class,Integer> sizes = new IdentityHashMap<Class,Integer>() { { put(boolean.class, Integer.valueOf(1)); put(byte.class, Integer.valueOf(1)); put(char.class, Integer.valueOf(2)); put(short.class, Integer.valueOf(2)); put(int.class, Integer.valueOf(4)); put(float.class, Integer.valueOf(4)); put(double.class, Integer.valueOf(8)); put(long.class, Integer.valueOf(8)); } }; /* * (non-Javadoc) * * @see org.apache.lucene.util.MemoryModel#getArraySize() */ @Override public int getArraySize() { return 16; } /* * (non-Javadoc) * * @see org.apache.lucene.util.MemoryModel#getClassSize() */ @Override public int getClassSize() { return 8; } /* (non-Javadoc) * @see org.apache.lucene.util.MemoryModel#getPrimitiveSize(java.lang.Class) */ @Override public int getPrimitiveSize(Class clazz) { return sizes.get(clazz).intValue(); } /* (non-Javadoc) * @see org.apache.lucene.util.MemoryModel#getReferenceSize() */ @Override public int getReferenceSize() { return 4; } }
[ "mrappazzo@tradecard.com" ]
mrappazzo@tradecard.com
dbc2e3bd575bea226f0bd4acf70c381ba7aa079f
3180c5a659d5bfdbf42ab07dfcc64667f738f9b3
/src/com/zing/zalo/ui/PhoneBookActivity.java
ec23fe1bd7f79aa87b8caa8a3f3dcbdcec0ae34e
[]
no_license
tinyx3k/ZaloRE
4b4118c789310baebaa060fc8aa68131e4786ffb
fc8d2f7117a95aea98a68ad8d5009d74e977d107
refs/heads/master
2023-05-03T16:21:53.296959
2013-05-18T14:08:34
2013-05-18T14:08:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,202
java
package com.zing.zalo.ui; import android.app.Dialog; import android.app.ProgressDialog; import android.content.res.Resources; import android.os.Bundle; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; import com.zing.zalo.app.MainApplication; import com.zing.zalo.g.c; import com.zing.zalo.h.v; import com.zing.zalo.l.e; import com.zing.zalo.utils.b; import com.zing.zalo.utils.p; public class PhoneBookActivity extends BetterActivity { private static volatile PhoneBookActivity anL = null; private ProgressDialog Kg; private ImageButton No; private LinearLayout anI; private TextView anJ; private String anK = ""; private void kF() { setContentView(2130903232); this.No = ((ImageButton)findViewById(2131296482)); this.No.setOnClickListener(new acm(this)); this.anJ = ((TextView)findViewById(2131297249)); this.anI = ((LinearLayout)findViewById(2131297250)); this.anI.setOnClickListener(new acn(this)); if (c.m(MainApplication.cx()) == 0L); for (this.anK = getResources().getString(2131165618); ; this.anK = p.n(c.m(MainApplication.cx()))) { this.anJ.setText(this.anK); this.Kg = new ProgressDialog(this); this.Kg.setMessage(getResources().getString(2131165618)); this.Kg.setCancelable(true); this.Kg.setCanceledOnTouchOutside(false); return; } } public static PhoneBookActivity oF() { return anL; } public static void oH() { try { if (oF() != null) oF().oI(); return; } catch (Exception localException) { localException.printStackTrace(); } } public void oG() { if (!this.Kg.isShowing()) this.Kg.show(); e.mb(); } public void oI() { try { runOnUiThread(new aco(this)); return; } catch (Exception localException) { localException.printStackTrace(); } } public void onCreate(Bundle paramBundle) { super.onCreate(paramBundle); if (p.d(this)) return; p.e(this); kF(); b.eB("PhoneBookActivity"); anL = this; } public Dialog onCreateDialog(int paramInt) { switch (paramInt) { default: return null; case 0: Resources localResources2 = getResources(); v localv2 = new v(this); localv2.bW(localResources2.getString(2131165234)).bV(localResources2.getString(2131165235)).h(localResources2.getString(2131165233), new acp(this)).g(localResources2.getString(2131165232), new acq(this)); return localv2.io(); case 1: } Resources localResources1 = getResources(); v localv1 = new v(this); localv1.bW(localResources1.getString(2131165489)).bV(localResources1.getString(2131165613)).h(localResources1.getString(2131165233), new acr(this)).g(localResources1.getString(2131165232), new acs(this)); return localv1.io(); } protected void onDestroy() { anL = null; super.onDestroy(); } public void onResume() { super.onResume(); } } /* Location: /home/danghvu/0day/Zalo/Zalo_1.0.8_dex2jar.jar * Qualified Name: com.zing.zalo.ui.PhoneBookActivity * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
58ef08b6b992761b2ba33b5300c29aae1e3006c9
1d8d3f11f734fac34e0d197f4707f3ba1c9fe7d6
/MyApplication/app/src/main/java/notrace/daytongue/loadmanager/LoadingAndRetryLayout.java
6fb13b51eb9760685e3776c7b76b53393a0efe9b
[]
no_license
messnoTrace/DayTongue
6e7edd2294616463ac9f80785d82b4b30d72ef57
8b2a5869af29a6d836ee1360567b9768d6d87c12
refs/heads/master
2020-04-13T12:43:14.596456
2015-09-28T11:04:37
2015-09-28T11:04:37
42,583,946
0
0
null
null
null
null
UTF-8
Java
false
false
6,265
java
package notrace.daytongue.loadmanager; import android.content.Context; import android.os.Looper; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; /** * Created by notrace on 2015/9/25. */ public class LoadingAndRetryLayout extends FrameLayout{ private View mLoadingView; private View mRetryView; private View mContentView; private View mEmptyView; private LayoutInflater mInflater; private static final String TAG = LoadingAndRetryLayout.class.getSimpleName(); public LoadingAndRetryLayout(Context context) { this(context,null); } public LoadingAndRetryLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mInflater=LayoutInflater.from(context); } public LoadingAndRetryLayout(Context context, AttributeSet attrs) { this(context,attrs,-1); } private boolean isMainThread() { return Looper.myLooper()==Looper.getMainLooper(); } public void showLoading(){ if(isMainThread()){ showView(mLoadingView); }else { post(new Runnable() { @Override public void run() { showView(mLoadingView); } }); } } public void showRetry() { if (isMainThread()) { showView(mRetryView); } else { post(new Runnable() { @Override public void run() { showView(mRetryView); } }); } } public void showContent() { if (isMainThread()) { showView(mContentView); } else { post(new Runnable() { @Override public void run() { showView(mContentView); } }); } } public void showEmpty() { if (isMainThread()) { showView(mEmptyView); } else { post(new Runnable() { @Override public void run() { showView(mEmptyView); } }); } } private void showView(View view){ if(view==null) return; if(view==mLoadingView){ mLoadingView.setVisibility(VISIBLE); if (mRetryView != null) mRetryView.setVisibility(View.GONE); if (mContentView != null) mContentView.setVisibility(View.GONE); if (mEmptyView != null) mEmptyView.setVisibility(View.GONE); }else if (view == mRetryView) { mRetryView.setVisibility(View.VISIBLE); if (mLoadingView != null) mLoadingView.setVisibility(View.GONE); if (mContentView != null) mContentView.setVisibility(View.GONE); if (mEmptyView != null) mEmptyView.setVisibility(View.GONE); } else if (view == mContentView) { mContentView.setVisibility(View.VISIBLE); if (mLoadingView != null) mLoadingView.setVisibility(View.GONE); if (mRetryView != null) mRetryView.setVisibility(View.GONE); if (mEmptyView != null) mEmptyView.setVisibility(View.GONE); } else if (view == mEmptyView) { mEmptyView.setVisibility(View.VISIBLE); if (mLoadingView != null) mLoadingView.setVisibility(View.GONE); if (mRetryView != null) mRetryView.setVisibility(View.GONE); if (mContentView != null) mContentView.setVisibility(View.GONE); } } public View setContentView(int layoutId) { return setContentView(mInflater.inflate(layoutId, this, false)); } public View setLoadingView(int layoutId) { return setLoadingView(mInflater.inflate(layoutId, this, false)); } public View setEmptyView(int layoutId) { return setEmptyView(mInflater.inflate(layoutId, this, false)); } public View setRetryView(int layoutId) { return setRetryView(mInflater.inflate(layoutId, this, false)); } public View setLoadingView(View view) { View loadingView = mLoadingView; if (loadingView != null) { Log.w(TAG, "you have already set a loading view and would be instead of this new one."); } removeView(loadingView); addView(view); mLoadingView = view; return mLoadingView; } public View setEmptyView(View view) { View emptyView = mEmptyView; if (emptyView != null) { Log.w(TAG, "you have already set a empty view and would be instead of this new one."); } removeView(emptyView); addView(view); mEmptyView = view; return mEmptyView; } public View setRetryView(View view) { View retryView = mRetryView; if (retryView != null) { Log.w(TAG, "you have already set a retry view and would be instead of this new one."); } removeView(retryView); addView(view); mRetryView = view; return mRetryView; } public View setContentView(View view) { View contentView = mContentView; if (contentView != null) { Log.w(TAG, "you have already set a retry view and would be instead of this new one."); } removeView(contentView); addView(view); mContentView = view; return mContentView; } public View getRetryView() { return mRetryView; } public View getLoadingView() { return mLoadingView; } public View getContentView() { return mContentView; } public View getEmptyView() { return mEmptyView; } }
[ "cy_nforget@126.com" ]
cy_nforget@126.com
99adec7b4bca7c460682a14bff532322251856b5
ebdcaff90c72bf9bb7871574b25602ec22e45c35
/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201808/ReconciliationReportRowServiceInterface.java
6bbb45f3e5a68d6424d3ff343685052bb1eb3777
[ "Apache-2.0" ]
permissive
ColleenKeegan/googleads-java-lib
3c25ea93740b3abceb52bb0534aff66388d8abd1
3d38daadf66e5d9c3db220559f099fd5c5b19e70
refs/heads/master
2023-04-06T16:16:51.690975
2018-11-15T20:50:26
2018-11-15T20:50:26
158,986,306
1
0
Apache-2.0
2023-04-04T01:42:56
2018-11-25T00:56:39
Java
UTF-8
Java
false
false
5,768
java
// Copyright 2018 Google LLC // // 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. /** * ReconciliationReportRowServiceInterface.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.admanager.axis.v201808; public interface ReconciliationReportRowServiceInterface extends java.rmi.Remote { /** * Gets a {@link ReconciliationReportRowPage} of {@link ReconciliationReportRow} * objects that * satisfy the given {@link Statement#query}. The following fields * are supported for filtering: * * <table> * <tr> * <th scope="col">PQL Property</th> <th scope="col">Object Property</th> * </tr> * <tr> * <td>{@code reconciliationReportId}</td> * <td>{@link ReconciliationReportRow#reconciliationReportId}</td> * </tr> * <tr> * <td>{@code advertiserId}</td> * <td>{@link ReconciliationReportRow#advertiserId}</td> * </tr> * <tr> * <td>{@code orderId}</td> * <td>{@link ReconciliationReportRow#orderId}</td> * </tr> * <tr> * <td>{@code lineItemId}</td> * <td>{@link ReconciliationReportRow#lineItemId}</td> * </tr> * <tr> * <td>{@code proposalLineItemId}</td> * <td>{@link ReconciliationReportRow#proposalLineItemId}</td> * </tr> * <tr> * <td>{@code creativeId}</td> * <td>{@link ReconciliationReportRow#creativeId}</td> * </tr> * <tr> * <td>{@code lineItemCostType}</td> * <td>{@link ReconciliationReportRow#lineItemCostType}</td> * </tr> * <tr> * <td>{@code dfpClicks}</td> * <td>{@link ReconciliationReportRow#dfpClicks}</td> * </tr> * <tr> * <td>{@code dfpImpressions}</td> * <td>{@link ReconciliationReportRow#dfpImpressions}</td> * </tr> * <tr> * <td>{@code dfpLineItemDays}</td> * <td>{@link ReconciliationReportRow#dfpLineItemDays}</td> * </tr> * <tr> * <td>{@code thirdPartyClicks}</td> * <td>{@link ReconciliationReportRow#thirdPartyClicks}</td> * </tr> * <tr> * <td>{@code thirdPartyImpressions}</td> * <td>{@link ReconciliationReportRow#thirdPartyImpressions}</td> * </tr> * <tr> * <td>{@code thirdPartyLineItemDays}</td> * <td>{@link ReconciliationReportRow#thirdPartyLineItemDays}</td> * </tr> * <tr> * <td>{@code manualClicks}</td> * <td>{@link ReconciliationReportRow#manualClicks}</td> * </tr> * <tr> * <td>{@code manualImpressions}</td> * <td>{@link ReconciliationReportRow#manualImpressions}</td> * </tr> * <tr> * <td>{@code manualLineItemDays}</td> * <td>{@link ReconciliationReportRow#manualLineItemDays}</td> * </tr> * <tr> * <td>{@code reconciledClicks}</td> * <td>{@link ReconciliationReportRow#reconciledClicks}</td> * </tr> * <tr> * <td>{@code reconciledImpressions}</td> * <td>{@link ReconciliationReportRow#reconciledImpressions}</td> * </tr> * <tr> * <td>{@code reconciledLineItemDays}</td> * <td>{@link ReconciliationReportRow#reconciledLineItemDays}</td> * </tr> * </table> * * The {@code reconciliationReportId} field is required and can * only be combined with an * {@code AND} to other conditions. Furthermore, the results * may only belong to * one {@link ReconciliationReport}. * * * @param filterStatement a Publisher Query Language statement used to * filter a set of reconciliation report rows * * @return the reconciliation report rows that match the given filter */ public com.google.api.ads.admanager.axis.v201808.ReconciliationReportRowPage getReconciliationReportRowsByStatement(com.google.api.ads.admanager.axis.v201808.Statement filterStatement) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v201808.ApiException; /** * Updates a list of {@link ReconciliationReportRow} which belong * to same * {@link ReconciliationReport}. * * * @param reconciliationReportRows a list of reconciliation report rows * to update * * @return the updated reconciliation report rows */ public com.google.api.ads.admanager.axis.v201808.ReconciliationReportRow[] updateReconciliationReportRows(com.google.api.ads.admanager.axis.v201808.ReconciliationReportRow[] reconciliationReportRows) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v201808.ApiException; }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
f87dbb52399a2aa51e9819fd2ead4e6773f5c42a
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/testing/377/WatchedFile.java
949aa8db1315586bee38db928f8082daa67e0690
[]
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,182
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.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 General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.io.fs.watcher.resource; import java.io.IOException; import java.nio.file.WatchKey; /** * Default {@link WatchedResource} implementation. */ public class WatchedFile implements WatchedResource { private final WatchKey watchKey; public WatchedFile( WatchKey watchKey ) { this.watchKey = watchKey; } @Override public void close() { watchKey.cancel(); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
d48a50f84563e8182ef60e8e7c22751819c60f9a
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
/icefaces/scratchpads/patches/SF8770/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/ImageRenderer.java
8744de2c3d883b5648e055c14349a68cfa9565d1
[]
no_license
numbnet/icesoft
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
2f7106b27a2b3109d73faf85d873ad922774aeae
refs/heads/master
2021-01-11T04:56:52.145182
2016-11-04T16:43:45
2016-11-04T16:43:45
72,894,498
0
0
null
null
null
null
UTF-8
Java
false
false
4,428
java
/* * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * "The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations under * the License. * * The Original Code is ICEfaces 1.5 open source software code, released * November 5, 2006. The Initial Developer of the Original Code is ICEsoft * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C) * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved. * * Contributor(s): _____________________. * * Alternatively, the contents of this file may be used under the terms of * the GNU Lesser General Public License Version 2.1 or later (the "LGPL" * License), in which case the provisions of the LGPL License are * applicable instead of those above. If you wish to allow use of your * version of this file only under the terms of the LGPL License and not to * allow others to use your version of this file under the MPL, indicate * your decision by deleting the provisions above and replace them with * the notice and other provisions required by the LGPL License. If you do * not delete the provisions above, a recipient may use your version of * this file under either the MPL or the LGPL License." * */ package com.icesoft.faces.renderkit.dom_html_basic; import com.icesoft.faces.context.DOMContext; import com.icesoft.faces.util.Debug; import org.w3c.dom.Element; import javax.faces.component.UIComponent; import javax.faces.component.UIGraphic; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import java.io.IOException; public class ImageRenderer extends DomBasicRenderer { public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException { validateParameters(facesContext, uiComponent, UIGraphic.class); UIGraphic uiGraphic = (UIGraphic) uiComponent; DOMContext domContext = DOMContext.attachDOMContext(facesContext, uiComponent); if (!domContext.isInitialized()) { Element root = domContext.createElement("img"); domContext.setRootNode(root); } Element root = (Element) domContext.getRootNode(); setRootElementId(facesContext, root, uiGraphic); String srcAttribute = processSrcAttribute(facesContext, uiGraphic); root.setAttribute("src", srcAttribute); String styleClass = String.valueOf(uiComponent.getAttributes().get("styleClass")); if (styleClass != null) { root.setAttribute("class", styleClass); } ResponseWriter responseWriter = facesContext.getResponseWriter(); Debug.assertTrue(responseWriter != null, "ResponseWriter is null"); PassThruAttributeRenderer .renderAttributes(facesContext, uiComponent, null); String altAttribute = (String) uiComponent.getAttributes().get("alt"); if (altAttribute == null) { altAttribute = ""; } root.setAttribute("alt", altAttribute); domContext.stepOver(); domContext.streamWrite(facesContext, uiComponent); } public void encodeChildren(FacesContext facesContext, UIComponent uiComponent) { validateParameters(facesContext, uiComponent, UIGraphic.class); } public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException { validateParameters(facesContext, uiComponent, UIGraphic.class); } protected String processSrcAttribute(FacesContext facesContext, UIGraphic uiGraphic) { String value = (String) uiGraphic.getValue(); // support url as an alias for value if (value == null) { value = uiGraphic.getUrl(); } if (value != null) { value = facesContext.getApplication().getViewHandler() .getResourceURL(facesContext, value); return value; } else { return ""; } } }
[ "ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74" ]
ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74
916af55e1063833b7e546e40b7b15020fb653245
5b8609579a1d8e14730a8148f49b3adc6673eea7
/app/src/main/java/com/king/app/tcareer/view/widget/scoreboard/BoardStyleProvider.java
e538eb55a982ec7d229bc39fc6e0148e463c54a8
[]
no_license
JasonKing0329/TCareer
f20fb791110c3a9b4f5031db5821d5e9efa28701
868caa9775b1326c011d9046c30156e1cc78be3e
refs/heads/master
2021-05-09T07:10:33.910798
2019-05-31T03:07:13
2019-05-31T03:07:13
119,350,861
0
0
null
null
null
null
UTF-8
Java
false
false
3,591
java
package com.king.app.tcareer.view.widget.scoreboard; import android.graphics.Color; /** * Desc: * * @author:Jing Yang * @date: 2019/5/31 10:11 */ public class BoardStyleProvider { public BoardStyle getDefault() { return new DefaultStyle(); } public BoardStyle getFrenchOpen() { return new FrenchOpen(); } public BoardStyle getWimbledonOpen() { return new WimbledonOpen(); } public BoardStyle getAustriliaOpen() { return new AustraliaOpen(); } /** * 澳网 */ private class AustraliaOpen implements BoardStyle { @Override public int getNormalBgColor() { return Color.WHITE; } @Override public int getFocusBgColor() { return Color.parseColor("#007cb5"); } @Override public int getNormalTextColor() { return Color.parseColor("#9b9b9b"); } @Override public int getFocusTextColor() { return Color.WHITE; } @Override public int getMatchNameColor() { return Color.parseColor("#007cb5"); } @Override public int getMatchRoundColor() { return Color.parseColor("#007cb5"); } } /** * 法网 */ private class FrenchOpen implements BoardStyle { @Override public int getNormalBgColor() { return Color.WHITE; } @Override public int getFocusBgColor() { return Color.parseColor("#e6946c"); } @Override public int getNormalTextColor() { return Color.parseColor("#9b9b9b"); } @Override public int getFocusTextColor() { return Color.WHITE; } @Override public int getMatchNameColor() { return Color.parseColor("#e6946c"); } @Override public int getMatchRoundColor() { return Color.parseColor("#e6946c"); } } /** * 温网 */ private class WimbledonOpen implements BoardStyle { @Override public int getNormalBgColor() { return Color.WHITE; } @Override public int getFocusBgColor() { return Color.parseColor("#00703c"); } @Override public int getNormalTextColor() { return Color.parseColor("#5400a1"); } @Override public int getFocusTextColor() { return Color.WHITE; } @Override public int getMatchNameColor() { return Color.parseColor("#00703c"); } @Override public int getMatchRoundColor() { return Color.parseColor("#00703c"); } } /** * default */ private class DefaultStyle implements BoardStyle { @Override public int getNormalBgColor() { return Color.WHITE; } @Override public int getFocusBgColor() { return Color.parseColor("#64907f"); } @Override public int getNormalTextColor() { return Color.parseColor("#333333"); } @Override public int getFocusTextColor() { return Color.WHITE; } @Override public int getMatchNameColor() { return Color.parseColor("#333333"); } @Override public int getMatchRoundColor() { return Color.parseColor("#333333"); } } }
[ "jingyang@tcsl.com.cn" ]
jingyang@tcsl.com.cn
28cf9e7a6c8b756be5ad7a3131c3952a9e96453f
eb866cc8920911c79afa0c3f22611f400d15874c
/simpleos/src.simple/net/simpleframework/content/component/topicpager/TopicVoteHandle.java
b345dee6785419c9a0e69ada130c96fc8a816b75
[]
no_license
eliyanfei/simpleos
bca0d8520ccae5bc1a8acceaaf1031441a5c315b
c371c0d4bbb87462209f424cddd796578cf967c8
refs/heads/master
2021-01-21T13:49:19.610336
2015-08-18T01:23:13
2015-08-18T01:23:13
26,625,820
0
0
null
null
null
null
UTF-8
Java
false
false
3,427
java
package net.simpleframework.content.component.topicpager; import java.util.ArrayList; import java.util.Map; import net.simpleframework.ado.db.ITableEntityManager; import net.simpleframework.content.component.vote.DefaultVoteHandle; import net.simpleframework.organization.OrgUtils; import net.simpleframework.organization.account.AccountSession; import net.simpleframework.organization.account.IAccount; import net.simpleframework.util.HTMLBuilder; import net.simpleframework.util.StringUtils; import net.simpleframework.web.page.component.ComponentParameter; import net.simpleframework.web.page.component.ado.IDbComponentHandle; /** * 这是一个开源的软件,请在LGPLv3下合法使用、修改或重新发布。 * * @author 陈侃(cknet@126.com, 13910090885) * http://code.google.com/p/simpleframework/ * http://www.simpleframework.net */ public class TopicVoteHandle extends DefaultVoteHandle { @Override public String getDocumentIdParameterName(final ComponentParameter compParameter) { final ComponentParameter nComponentParameter = TopicPagerUtils .getComponentParameter(compParameter); return ((ITopicPagerHandle) nComponentParameter.getComponentHandle()) .getIdParameterName(nComponentParameter); } @Override public ITableEntityManager getTableEntityManager(final ComponentParameter compParameter, final Class<?> beanClazz) { final ComponentParameter nComponentParameter = TopicPagerUtils .getComponentParameter(compParameter); return ((IDbComponentHandle) nComponentParameter.getComponentHandle()).getTableEntityManager( nComponentParameter, beanClazz); } @Override public Object getBeanProperty(final ComponentParameter compParameter, final String beanProperty) { if ("selector".equals(beanProperty)) { return "#__pager_postsId form"; } else if ("jobEdit".equals(beanProperty)) { final ComponentParameter nComponentParameter = TopicPagerUtils .getComponentParameter(compParameter); return nComponentParameter.getBeanProperty("jobEdit"); } return super.getBeanProperty(compParameter, beanProperty); } @Override public Map<String, Object> getFormParameters(final ComponentParameter compParameter) { final Map<String, Object> parameters = super.getFormParameters(compParameter); final ComponentParameter nComponentParameter = TopicPagerUtils .getComponentParameter(compParameter); parameters.putAll(nComponentParameter.getComponentHandle().getFormParameters( nComponentParameter)); return parameters; } @Override public String getManagerToolbar(final ComponentParameter compParameter) { final ArrayList<String> al = new ArrayList<String>(); final IAccount account = AccountSession.getLogin(compParameter.getSession()); if (account != null) { final ComponentParameter nComponentParameter = TopicPagerUtils .getComponentParameter(compParameter); final TopicBean topic = ((ITopicPagerHandle) nComponentParameter.getComponentHandle()) .getEntityBeanByRequest(nComponentParameter); if ((topic != null && AccountSession.isAccount(compParameter.getSession(), topic.getUserId())) || OrgUtils.isMember((String) compParameter.getBeanProperty("jobEdit"), account.user())) { al.add(TB_VOTE_REFRESH); al.add(TB_VOTE_EDIT); } } return StringUtils.join(al, HTMLBuilder.SEP); } }
[ "eliyanfei@126.com" ]
eliyanfei@126.com
0314516bdd3e3afa6b252de524b317bad0565072
5fe04ecaba633d794d37c51aa842f17180aa9bfc
/Generics-Exercises/src/tuple/Main.java
80047dac52afe36626bbb8652944f0cdc2fc6d89
[]
no_license
danielanikolova/JavaOOPAdvanced
3afeaf6991c58b1a6aa510543031885e04a4e80f
1c21ecd51c1722a9e640fe993da2f4dbe7d96ce8
refs/heads/master
2021-09-05T05:40:37.299876
2018-01-24T13:55:29
2018-01-24T13:55:29
118,771,476
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
package tuple; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] personInfo = br.readLine().split("\\s+"); String[] drinkingPersonInfo = br.readLine().split("\\s+"); String[] intAndDouble = br.readLine().split("\\s+"); Tuple<String, String> firstT = new Tuple<>((personInfo[0]+ " "+personInfo[1]), personInfo[2]); System.out.println(firstT.toString()); Tuple<String, Integer> secondT = new Tuple<>(drinkingPersonInfo[0], Integer.parseInt(drinkingPersonInfo[1])); System.out.println(secondT.toString()); Tuple<Integer, Double> thirdT = new Tuple<>(Integer.parseInt(intAndDouble[0]), Double.parseDouble(intAndDouble[1])); System.out.println(thirdT.toString()); } }
[ "daniela.a.nikolova@gmail.com" ]
daniela.a.nikolova@gmail.com
3d8b86879ef8da6df3304f9b8a5da181515e37e0
4e9c5e37a4380d5a11a27781187918a6aa31f3f9
/dse-db-all-6.7.0/org/apache/cassandra/cql3/functions/JavaUDFQuotaHandler.java
a4eb800141087fa63eb84c75365b8e588f2292f5
[]
no_license
jiafu1115/dse67
4a49b9a0d7521000e3c1955eaf0911929bc90d54
62c24079dd5148e952a6ff16bc1161952c222f9b
refs/heads/master
2021-10-11T15:38:54.185842
2019-01-28T01:28:06
2019-01-28T01:28:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package org.apache.cassandra.cql3.functions; import java.util.Set; final class JavaUDFQuotaHandler { private JavaUDFQuotaHandler() { } static void beforeStart(UDFQuotaState quotaState) { ThreadAwareSecurityManager.enterSecureSection(quotaState, (Set)null).onStart(); } static boolean udfExecCall() { return ThreadAwareSecurityManager.secureSection().failCheckLazy(); } static void afterExec(UDFExecResult result) { ThreadAwareSecurityManager.leaveSecureSection().afterExec(result); } }
[ "superhackerzhang@sina.com" ]
superhackerzhang@sina.com
9e79ca981d620e07832cd84a976e0e59cc296cce
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
/Crawler/data/SecureStorage.java
2ce864c26067ab3958f76754a43ec138bd7eee17
[]
no_license
NayrozD/DD2476-Project
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
94dfb3c0a470527b069e2e0fd9ee375787ee5532
refs/heads/master
2023-03-18T04:04:59.111664
2021-03-10T15:03:07
2021-03-10T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,232
java
277 https://raw.githubusercontent.com/DP-3T/dp3t-app-android/develop/app/src/main/java/org/dpppt/android/app/storage/SecureStorage.java /* * Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch> * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * SPDX-License-Identifier: MPL-2.0 */ package org.dpppt.android.app.storage; import android.content.Context; import android.content.SharedPreferences; import androidx.annotation.NonNull; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.security.crypto.EncryptedSharedPreferences; import androidx.security.crypto.MasterKeys; import java.io.IOException; import java.security.GeneralSecurityException; public class SecureStorage { private static final String PREFERENCES = "SecureStorage"; private static final String KEY_INFECTED_DATE = "infected_date"; private static final String KEY_INFORM_TIME_REQ = "inform_time_req"; private static final String KEY_INFORM_CODE_REQ = "inform_code_req"; private static final String KEY_INFORM_TOKEN_REQ = "inform_token_req"; private static final String KEY_ONBOARDING_COMPLETED = "onboarding_completed"; private static final String KEY_LAST_SHOWN_CONTACT_ID = "last_shown_contact_id"; private static final String KEY_HOTLINE_CALL_PENDING = "hotline_call_pending"; private static final String KEY_HOTLINE_LAST_CALL_TIMESTAMP = "hotline_ever_called_timestamp"; private static final String KEY_PENDING_REPORTS_HEADER_ANIMATION = "pending_reports_header_animation"; private static final String KEY_CONFIG_FORCE_UPDATE = "config_do_force_update"; private static final String KEY_CONFIG_HAS_INFOBOX = "has_ghettobox"; private static final String KEY_CONFIG_INFOBOX_TITLE = "ghettobox_title"; private static final String KEY_CONFIG_INFOBOX_TEXT = "ghettobox_text"; private static final String KEY_CONFIG_INFOBOX_LINK_TITLE = "ghettobox_link_title"; private static final String KEY_CONFIG_INFOBOX_LINK_URL = "ghettobox_link_url"; private static final String KEY_CONFIG_FORCED_TRACE_SHUTDOWN = "forced_trace_shutdown"; private static SecureStorage instance; private SharedPreferences prefs; private final MutableLiveData<Boolean> forceUpdateLiveData; private final MutableLiveData<Boolean> hasInfoboxLiveData; private SecureStorage(@NonNull Context context) { try { String masterKeys = MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC); this.prefs = EncryptedSharedPreferences .create(PREFERENCES, masterKeys, context, EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV, EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM); } catch (GeneralSecurityException | IOException e) { this.prefs = null; e.printStackTrace(); } forceUpdateLiveData = new MutableLiveData<>(getDoForceUpdate()); hasInfoboxLiveData = new MutableLiveData<>(getHasInfobox()); } public static SecureStorage getInstance(Context context) { if (instance == null) { instance = new SecureStorage(context); } return instance; } public LiveData<Boolean> getForceUpdateLiveData() { return forceUpdateLiveData; } public LiveData<Boolean> getInfoBoxLiveData() { return hasInfoboxLiveData; } public long getInfectedDate() { return prefs.getLong(KEY_INFECTED_DATE, 0); } public void setInfectedDate(long date) { prefs.edit().putLong(KEY_INFECTED_DATE, date).apply(); } public void saveInformTimeAndCodeAndToken(String informCode, String informToken) { prefs.edit().putLong(KEY_INFORM_TIME_REQ, System.currentTimeMillis()) .putString(KEY_INFORM_CODE_REQ, informCode) .putString(KEY_INFORM_TOKEN_REQ, informToken) .apply(); } public void clearInformTimeAndCodeAndToken() { prefs.edit().remove(KEY_INFORM_TIME_REQ) .remove(KEY_INFORM_CODE_REQ) .remove(KEY_INFORM_TOKEN_REQ) .apply(); } public long getLastInformRequestTime() { return prefs.getLong(KEY_INFORM_TIME_REQ, 0); } public String getLastInformCode() { return prefs.getString(KEY_INFORM_CODE_REQ, null); } public String getLastInformToken() { return prefs.getString(KEY_INFORM_TOKEN_REQ, null); } public boolean getOnboardingCompleted() { return prefs.getBoolean(KEY_ONBOARDING_COMPLETED, false); } public void setOnboardingCompleted(boolean completed) { prefs.edit().putBoolean(KEY_ONBOARDING_COMPLETED, completed).apply(); } public int getLastShownContactId() { return prefs.getInt(KEY_LAST_SHOWN_CONTACT_ID, -1); } public void setLastShownContactId(int contactId) { prefs.edit().putInt(KEY_LAST_SHOWN_CONTACT_ID, contactId).apply(); } public boolean isHotlineCallPending() { return prefs.getBoolean(KEY_HOTLINE_CALL_PENDING, false); } public void setHotlineCallPending(boolean pending) { prefs.edit().putBoolean(KEY_HOTLINE_CALL_PENDING, pending).apply(); } public long lastHotlineCallTimestamp() { return prefs.getLong(KEY_HOTLINE_LAST_CALL_TIMESTAMP, 0); } public void justCalledHotline() { prefs.edit().putBoolean(KEY_HOTLINE_CALL_PENDING, false) .putLong(KEY_HOTLINE_LAST_CALL_TIMESTAMP, System.currentTimeMillis()) .apply(); } public boolean isReportsHeaderAnimationPending() { return prefs.getBoolean(KEY_PENDING_REPORTS_HEADER_ANIMATION, false); } public void setReportsHeaderAnimationPending(boolean pending) { prefs.edit().putBoolean(KEY_PENDING_REPORTS_HEADER_ANIMATION, pending).apply(); } public void setDoForceUpdate(boolean doForceUpdate) { prefs.edit().putBoolean(KEY_CONFIG_FORCE_UPDATE, doForceUpdate).apply(); forceUpdateLiveData.postValue(doForceUpdate); } public boolean getDoForceUpdate() { return prefs.getBoolean(KEY_CONFIG_FORCE_UPDATE, false); } public void setHasInfobox(boolean hasInfobox) { prefs.edit().putBoolean(KEY_CONFIG_HAS_INFOBOX, hasInfobox).apply(); hasInfoboxLiveData.postValue(hasInfobox); } public boolean getHasInfobox() { return prefs.getBoolean(KEY_CONFIG_HAS_INFOBOX, false); } public void setInfoboxTitle(String title) { prefs.edit().putString(KEY_CONFIG_INFOBOX_TITLE, title).apply(); } public String getInfoboxTitle() { return prefs.getString(KEY_CONFIG_INFOBOX_TITLE, null); } public void setInfoboxText(String text) { prefs.edit().putString(KEY_CONFIG_INFOBOX_TEXT, text).apply(); } public String getInfoboxText() { return prefs.getString(KEY_CONFIG_INFOBOX_TEXT, null); } public void setInfoboxLinkTitle(String title) { prefs.edit().putString(KEY_CONFIG_INFOBOX_LINK_TITLE, title).apply(); } public boolean getForcedTraceShutdown() { return prefs.getBoolean(KEY_CONFIG_FORCED_TRACE_SHUTDOWN, false); } public void setForcedTraceShutdown(boolean forcedTraceShutdown) { prefs.edit().putBoolean(KEY_CONFIG_FORCED_TRACE_SHUTDOWN, forcedTraceShutdown).apply(); } public String getInfoboxLinkTitle() { return prefs.getString(KEY_CONFIG_INFOBOX_LINK_TITLE, null); } public void setInfoboxLinkUrl(String url) { prefs.edit().putString(KEY_CONFIG_INFOBOX_LINK_URL, url).apply(); } public String getInfoboxLinkUrl() { return prefs.getString(KEY_CONFIG_INFOBOX_LINK_URL, null); } }
[ "veronika.cucorova@gmail.com" ]
veronika.cucorova@gmail.com
3e5420e311d6492454e965bc4bbffd443530b67f
fff80cdaf12712704f36038479f50418253f42f3
/cassandra/src/org/apache/cassandra/db/MemtableManager.java
6d7055093536c05bb4d26e27138ee11866d4722d
[]
no_license
rudolfkopriva/Facebook
1ea0cfbc116f68ae0317332eeb9155461af5645a
56e4c6a83f992bb01849ad353004b28409e53eef
refs/heads/master
2023-02-14T01:54:36.519860
2021-01-05T02:09:26
2021-01-05T02:09:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,024
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cassandra.db; import java.io.IOException; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor; import org.apache.cassandra.concurrent.ThreadFactoryImpl; import org.apache.cassandra.utils.LogUtil; import org.apache.log4j.Logger; /** * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com ) */ public class MemtableManager { private static MemtableManager instance_; private static Lock lock_ = new ReentrantLock(); private static Logger logger_ = Logger.getLogger(MemtableManager.class); private ReentrantReadWriteLock rwLock_ = new ReentrantReadWriteLock(true); static MemtableManager instance() { if ( instance_ == null ) { lock_.lock(); try { if ( instance_ == null ) instance_ = new MemtableManager(); } finally { lock_.unlock(); } } return instance_; } class MemtableFlusher implements Runnable { private Memtable memtable_; private CommitLog.CommitLogContext cLogCtx_; MemtableFlusher(Memtable memtable, CommitLog.CommitLogContext cLogCtx) { memtable_ = memtable; cLogCtx_ = cLogCtx; } public void run() { try { memtable_.flush(cLogCtx_); } catch (IOException e) { logger_.debug( LogUtil.throwableToString(e) ); } rwLock_.writeLock().lock(); try { List<Memtable> memtables = history_.get(memtable_.getColumnFamily()); memtables.remove(memtable_); } finally { rwLock_.writeLock().unlock(); } } } private Map<String, List<Memtable>> history_ = new HashMap<String, List<Memtable>>(); ExecutorService flusher_ = new DebuggableThreadPoolExecutor( 1, 1, Integer.MAX_VALUE, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactoryImpl("MEMTABLE-FLUSHER-POOL") ); /* Submit memtables to be flushed to disk */ void submit(String cfName, Memtable memtbl, CommitLog.CommitLogContext cLogCtx) { rwLock_.writeLock().lock(); try { List<Memtable> memtables = history_.get(cfName); if ( memtables == null ) { memtables = new ArrayList<Memtable>(); history_.put(cfName, memtables); } memtables.add(memtbl); flusher_.submit( new MemtableFlusher(memtbl, cLogCtx) ); } finally { rwLock_.writeLock().unlock(); } } /* * Retrieve column family from the list of Memtables that have been * submitted for flush but have not yet been flushed. * It also filters out unneccesary columns based on the passed in filter. */ void getColumnFamily(String key, String cfName, String cf, IFilter filter, List<ColumnFamily> columnFamilies) { rwLock_.readLock().lock(); try { /* Get all memtables associated with this column family */ List<Memtable> memtables = history_.get(cfName); if ( memtables != null ) { Collections.sort(memtables); int size = memtables.size(); for ( int i = size - 1; i >= 0; --i ) { ColumnFamily columnFamily = memtables.get(i).getLocalCopy(key, cf, filter); if ( columnFamily != null ) { columnFamilies.add(columnFamily); if( filter.isDone()) break; } } } } finally { rwLock_.readLock().unlock(); } } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
10a6dcab90198dab59bddc467374209b708a7dd8
b26fa0b184d9121c8ce8a77b1cb983e63f8bc609
/codeForces/Codeforces_492A_Vanya_and_Cubes.java
0e9cab7d6156ebb6fd5af21d61d8ad68da834068
[]
no_license
Ignorance-of-Dong/Algorithm
ecc1e143ddccd56f2c5e556cfc0de936ac4831f5
ee3403dcd73c302674e0f911bcfec4d648d3229a
refs/heads/master
2023-08-16T11:02:23.156599
2023-08-13T06:41:37
2023-08-13T06:41:37
246,977,114
1
0
null
2023-09-12T11:56:06
2020-03-13T03:03:46
Java
UTF-8
Java
false
false
443
java
// AC: 186 ms // Memory: 0 KB // . // T:O(sqrt(-3, n)), S:O(1) // import java.util.Scanner; public class Codeforces_492A_Vanya_and_Cubes { public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(), level = 1, sum = 0; while (sum <= n) { sum += (level * (level + 1)) / 2; level++; } System.out.println(level - 2); } }
[ "1460018362@qq.com" ]
1460018362@qq.com
29a68d956306ed202160f5386aadcc1e555f5722
83ed1f4070ee69e7ce1fe0877deda7c9016828a2
/01_JavaBase/src/main/java/JavaSE/charset/getEncoding.java
85cbad9ff4804017801b215398766bade6f84553
[]
no_license
BaronND/opslabJava
78f5c5d5549cab3e0619a6070a10429874098d7c
f3749a3e3cc78b886e5af526625a0dd469f1f9c3
refs/heads/master
2021-05-06T10:02:20.800676
2017-11-01T14:38:49
2017-11-01T14:38:49
114,087,392
1
0
null
2017-12-13T07:15:45
2017-12-13T07:15:44
null
UTF-8
Java
false
false
329
java
package JavaSE.charset; import java.nio.charset.Charset; import java.util.SortedMap; public class getEncoding { public static void main(String[] args) { SortedMap<String, Charset> map = Charset.availableCharsets(); for (String alias : map.keySet()) { System.out.println(alias); } } }
[ "909070781@qq.com" ]
909070781@qq.com
ad51fa20d1a490c63013beb95b3d4b3e84b9bb5b
a1f4332fec5bc6dd94249ce346faed94bdf1e2d5
/src/test/java/newTest/BinaryTest.java
f78ca79053fe57564c9ed8cc6dd57d539b3553db
[]
no_license
ujko/tdd
bb1357f04e241461d966008ddf39eda245d69355
555272d60e84f743a3993e1d5d97d21b3045c245
refs/heads/master
2020-04-20T17:12:40.046358
2019-02-17T07:26:14
2019-02-17T07:26:14
168,982,191
0
0
null
null
null
null
UTF-8
Java
false
false
1,102
java
package newTest; import junitparams.JUnitParamsRunner; import junitparams.Parameters; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; @RunWith(JUnitParamsRunner.class) public class BinaryTest { Binary binary; @Test @Parameters({"0,0", "1,1", "5,101"}) public void method(int a, String b) { assertEquals(b, binary.method(a)); } @Before public void setUp() { binary = new Binary(); } @Test(expected = IllegalArgumentException.class) public void method2() { binary.method(-1); } @Test @Parameters({"100, 0", "101, 1 ", "1001, 2", "000001000100, 3", "10110010000, 2"}) public void binaryZero_test(String a, int result) { assertEquals(result, binary.binaryZero(a)); } @Test @Parameters({"4, 0", "5, 1 ", "9, 2", "68, 3"}) // test integracyjny public void binaryZero_test1(int a, int result) { int res = binary.binaryZero(binary.method(a)); Assert.assertEquals(result, res); } }
[ "uio6398@gmail.com" ]
uio6398@gmail.com
17e368be96c072a2176278bbc4e3e93e98f861ce
03ec6a37b303b32b21b4765c9431bd43c43856fb
/logistics/src/test/java/com/incito/logistics/testcase/userPassword/UserPasswordPage_201_AttestingUI_Test.java
a0666ad2c643d7dc9e83de37e96c597b240c4c51
[]
no_license
TriciaChen/web-logistics-standard
126ffa9993b0999dd8f7d28dcca794dded411766
415f26862c8161af90e71e259714d86f8a8480ab
refs/heads/master
2021-01-18T09:57:38.447730
2015-01-13T06:13:23
2015-01-13T06:21:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
746
java
package com.incito.logistics.testcase.userPassword; import org.testng.ITestContext; import org.testng.annotations.Test; import com.incito.logistics.pages.pageshelper.UserPasswordPageHelper; import com.incito.logistics.plugins.father.UserPasswordAttestingFather; /** * * @author xy-incito-wy * @Description 认证审核中的用户登录之后,进入修改密码页面,检查修改密码页面UI * */ public class UserPasswordPage_201_AttestingUI_Test extends UserPasswordAttestingFather{ @Test public void changePasswdPageUITestForUnattestedUser(ITestContext context){ UserPasswordAttestingFather.userPasswordParpare(context, seleniumUtil); UserPasswordPageHelper.checkUserAttestStatus(seleniumUtil, "attesting"); } }
[ "398733146@qq.com" ]
398733146@qq.com
ba0f17c9ceb746f3e623bfc9fc4beeaf12c21d94
e4613aa77f9ce6a860913a494a8662a5aaab3b37
/app/src/main/java/com/example/dharmendraverma/myapplication/gpuimage/GPUImageMonochromeFilter.java
fdab48f701f446ef3113ff70079e24abac2c31ec
[]
no_license
dharmendrahike/media
cb41d7a00f1d6f51048358c14767ad24e77cbc66
e3c501b0da6702d615b4c6b9b36e475461abd981
refs/heads/master
2021-09-02T11:11:24.805908
2018-01-02T07:12:42
2018-01-02T07:12:42
115,414,790
0
0
null
null
null
null
UTF-8
Java
false
false
4,149
java
/* * Copyright (C) 2012 CyberAgent * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.dharmendraverma.myapplication.gpuimage; import android.opengl.GLES20; /** * Converts the image to a single-color version, based on the luminance of each pixel * intensity: The degree to which the specific color replaces the normal image color (0.0 - 1.0, with 1.0 as the default) * color: The color to use as the basis for the effect, with (0.6, 0.45, 0.3, 1.0) as the default. */ public class GPUImageMonochromeFilter extends GPUImageFilter { public static final String MONOCHROME_FRAGMENT_SHADER = "" + " precision lowp float;\n" + " \n" + " varying highp vec2 textureCoordinate;\n" + " \n" + " uniform sampler2D inputImageTexture;\n" + " uniform float intensity;\n" + " uniform vec3 filterColor;\n" + " \n" + " const mediump vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721);\n" + " \n" + " void main()\n" + " {\n" + " //desat, then apply overlay blend\n" + " lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);\n" + " float luminance = dot(textureColor.rgb, luminanceWeighting);\n" + " \n" + " lowp vec4 desat = vec4(vec3(luminance), 1.0);\n" + " \n" + " //overlay\n" + " lowp vec4 outputColor = vec4(\n" + " (desat.r < 0.5 ? (2.0 * desat.r * filterColor.r) : (1.0 - 2.0 * (1.0 - desat.r) * (1.0 - filterColor.r))),\n" + " (desat.g < 0.5 ? (2.0 * desat.g * filterColor.g) : (1.0 - 2.0 * (1.0 - desat.g) * (1.0 - filterColor.g))),\n" + " (desat.b < 0.5 ? (2.0 * desat.b * filterColor.b) : (1.0 - 2.0 * (1.0 - desat.b) * (1.0 - filterColor.b))),\n" + " 1.0\n" + " );\n" + " \n" + " //which is better, or are they equal?\n" + " gl_FragColor = vec4( mix(textureColor.rgb, outputColor.rgb, intensity), textureColor.a);\n" + " }"; private int mIntensityLocation; private float mIntensity; private int mFilterColorLocation; private float[] mColor; public GPUImageMonochromeFilter() { this(1.0f, new float[] {0.6f, 0.45f, 0.3f, 1.0f}); } public GPUImageMonochromeFilter(final float intensity, final float[] color) { super(NO_FILTER_VERTEX_SHADER, MONOCHROME_FRAGMENT_SHADER); mIntensity = intensity; mColor = color; } @Override public void onInit() { super.onInit(); mIntensityLocation = GLES20.glGetUniformLocation(getProgram(), "intensity"); mFilterColorLocation = GLES20.glGetUniformLocation(getProgram(), "filterColor"); } @Override public void onInitialized() { super.onInitialized(); setIntensity(1.0f); setColor(new float[]{ 0.6f, 0.45f, 0.3f, 1.f }); } public void setIntensity(final float intensity) { mIntensity = intensity; setFloat(mIntensityLocation, mIntensity); } public void setColor(final float[] color) { mColor = color; setColorRed(mColor[0], mColor[1], mColor[2]); } public void setColorRed(final float red, final float green, final float blue) { setFloatVec3(mFilterColorLocation, new float[]{ red, green, blue }); } }
[ "dharmendra@hike.in" ]
dharmendra@hike.in
2c914349e498399f8bdec91a49cff9c8c9097430
3d242b5e81e75fb82edb27fecd64f0222f50c3f3
/subprojects/griffon-core/src/main/java/org/codehaus/griffon/runtime/core/DefaultContextProvider.java
151fe311bc243db79569429e71ec79265bb0be7f
[ "Apache-2.0" ]
permissive
pgremo/griffon
d7105330ad5c3969bfa56d84d632a9d5bbcb9f59
4c19a3cc2af3dbb8e489e64f82bde99ff7e773e8
refs/heads/master
2022-12-07T02:42:49.102745
2018-11-06T13:12:10
2018-11-06T13:12:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,097
java
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2008-2018 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 org.codehaus.griffon.runtime.core; import griffon.core.Context; import griffon.core.ContextFactory; import javax.inject.Inject; import javax.inject.Provider; /** * @author Andres Almiray * @since 2.2.0 */ public class DefaultContextProvider implements Provider<Context> { @Inject private ContextFactory contextFactory; @Override public Context get() { return contextFactory.create(null); } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
f0f17bed622d1bb6f7a4f35cc3487a26d9cbaf1d
bc20b8db8e0afdc84edec1eb299553e0c413fc4c
/CiF009LayoutWithDiffernFragments_/app/src/main/java/ru/startandroid/cif009layoutwithdiffernfragments_/PlusOneFragment.java
3dd3299d2ce341e74bf26bc1593a6f9150ae4774
[]
no_license
expencive/AndroidLessonsPart03
1c0ced3a2fcbec304f4408d7350d0e7d72404de9
adb5bac6b07706240d07809c38284ff543b67f71
refs/heads/master
2020-04-04T10:01:10.199663
2020-03-04T15:45:03
2020-03-04T15:45:03
155,839,690
0
0
null
null
null
null
UTF-8
Java
false
false
4,352
java
package ru.startandroid.cif009layoutwithdiffernfragments_; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.google.android.gms.plus.PlusOneButton; /** * A fragment with a Google +1 button. * Activities that contain this fragment must implement the * {@link PlusOneFragment.OnFragmentInteractionListener} interface * to handle interaction events. * Use the {@link PlusOneFragment#newInstance} factory method to * create an instance of this fragment. */ public class PlusOneFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // The request code must be 0 or greater. private static final int PLUS_ONE_REQUEST_CODE = 0; // The URL to +1. Must be a valid URL. private final String PLUS_ONE_URL = "http://developer.android.com"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; private PlusOneButton mPlusOneButton; private OnFragmentInteractionListener mListener; public PlusOneFragment() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment PlusOneFragment. */ // TODO: Rename and change types and number of parameters public static PlusOneFragment newInstance(String param1, String param2) { PlusOneFragment fragment = new PlusOneFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_plus_one, container, false); //Find the +1 button mPlusOneButton = (PlusOneButton) view.findViewById(R.id.plus_one_button); return view; } @Override public void onResume() { super.onResume(); // Refresh the state of the +1 button each time the activity receives focus. mPlusOneButton.initialize(PLUS_ONE_URL, PLUS_ONE_REQUEST_CODE); } // TODO: Rename method, update argument and hook method into UI event public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentInteractionListener) { mListener = (OnFragmentInteractionListener) context; } else { throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } /** * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated * to the activity and potentially other fragments contained in that * activity. * <p> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. */ public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); } }
[ "43270198+expencive@users.noreply.github.com" ]
43270198+expencive@users.noreply.github.com
19fddfaaf03ddecb2b55be7d1b350d526cdb2a48
64abfc0130cfa0aeb85c2c0a7d2f95037a80271f
/ECO_TT-portlet/docroot/WEB-INF/src/vn/com/ecopharma/hrm/tt/dm/VacationLeaveIndexLazyDataModel.java
f5094d82627f7bc1e0a430d8ee9dd0d1d151f81c
[]
no_license
taotran/eco
8c962eb918ad4675b535d775f7b8af99cfaab31b
22620bc21ceb8da83e06c402cfa7bd5a0ea05cee
refs/heads/master
2021-01-10T02:48:29.194619
2016-04-14T11:00:58
2016-04-14T11:00:58
44,424,693
0
0
null
null
null
null
UTF-8
Java
false
false
2,107
java
package vn.com.ecopharma.hrm.tt.dm; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.primefaces.model.SortOrder; import vn.com.ecopharma.emp.service.VacationLeaveLocalServiceUtil; import vn.com.ecopharma.hrm.tt.bean.filter.VacationLeaveFilterBean; import vn.com.ecopharma.hrm.tt.constant.VacationLeaveField; import vn.com.ecopharma.hrm.tt.dto.VacationLeaveIndexedItem; import vn.com.ecopharma.hrm.tt.utils.BeanUtils; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.search.Document; import com.liferay.portal.kernel.search.Sort; public class VacationLeaveIndexLazyDataModel extends AbstractEmpBaseLazyDataModel<VacationLeaveIndexedItem, VacationLeaveFilterBean> { /** * */ private static final long serialVersionUID = 1L; private static final Log LOGGER = LogFactoryUtil .getLog(VacationLeaveIndexLazyDataModel.class); @Override public List<VacationLeaveIndexedItem> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { super.bindEmpFilterFields(filters, BeanUtils.getLeaveFilterBean()); final List<VacationLeaveIndexedItem> results = new ArrayList<>(); try { final Sort sort = new Sort(VacationLeaveField.ID, false); final List<Document> documents = VacationLeaveLocalServiceUtil .filterByFields(searchContext, filters, sort, companyId, first, first + pageSize); for (Document document : documents) { results.add(new VacationLeaveIndexedItem(document)); } setPageSize(pageSize); setRowCount(VacationLeaveLocalServiceUtil.countFilterByFields( searchContext, filters, sort, companyId)); return results; } catch (PortalException e) { LOGGER.info(e); } return new ArrayList<>(); } @Override public VacationLeaveIndexedItem getRowData(String rowKey) { return new VacationLeaveIndexedItem( VacationLeaveLocalServiceUtil.getIndexedDocument( Long.valueOf(rowKey), searchContext)); } }
[ "tao.tranv@gmail.com" ]
tao.tranv@gmail.com
02242da50815835e9c611d0e994b888a348b2172
6940b6ead73e11271f99639868f0369e6f8f956a
/src/main/org/codehaus/griffon/runtime/validation/constraints/CreditCardConstraint.java
0e16f8af54d68a3d2c89552dd1cff129281809fe
[ "Apache-2.0" ]
permissive
griffon-legacy/griffon-domain-plugin
712bd9e4d439bc83c89fede2289a6c1c2ffa1897
10c43d5ae799b8aa8c483f6ea9b87c3387f3c1d5
refs/heads/master
2021-05-27T00:57:19.894537
2013-04-18T09:49:47
2013-04-18T09:49:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,597
java
/* * Copyright 2004-2013 Graeme Rocher * * 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.codehaus.griffon.runtime.validation.constraints; import griffon.plugins.validation.Errors; import org.apache.commons.validator.routines.CreditCardValidator; /** * Validates a credit card number. * * @author Graeme Rocher (Grails 0.4) */ public class CreditCardConstraint extends AbstractConstraint { public static final String VALIDATION_DSL_NAME = "creditCard"; public static final String DEFAULT_INVALID_CREDIT_CARD_MESSAGE_CODE = "default.invalid.creditCard.message"; public static final String DEFAULT_INVALID_CREDIT_CARD_MESSAGE = "Property [{0}] of class [{1}] with value [{2}] is not a valid credit card number"; private boolean creditCard; @Override protected void processValidate(Object target, Object propertyValue, Errors errors) { if (!creditCard) { return; } CreditCardValidator validator = new CreditCardValidator(); if (!validator.isValid(propertyValue.toString())) { Object[] args = new Object[]{constraintPropertyName, constraintOwningClass, propertyValue}; rejectValue(target, errors, DEFAULT_INVALID_CREDIT_CARD_MESSAGE_CODE, VALIDATION_DSL_NAME + INVALID_SUFFIX, args); } } @Override public void setParameter(Object constraintParameter) { if (!(constraintParameter instanceof Boolean)) { throw new IllegalArgumentException("Parameter for constraint [" + VALIDATION_DSL_NAME + "] of property [" + constraintPropertyName + "] of class [" + constraintOwningClass + "] must be a boolean value"); } creditCard = ((Boolean) constraintParameter).booleanValue(); super.setParameter(constraintParameter); } public String getName() { return VALIDATION_DSL_NAME; } @SuppressWarnings("rawtypes") public boolean supports(Class type) { return type != null && (String.class.isAssignableFrom(type)); } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
e0a8d34fa3a7b1bdb35cfd01bcc1132a4b2028a4
04f47413d684c0562d270861241373bce4ea3abe
/app/src/main/java/com/example/jinphy/simplechat/modules/system_msg/notice/NoticeContract.java
eb3d1f7d90cad0c90b8651f4e28c09750586a13c
[]
no_license
Jinphy/SimpleChat
61b20e36b3862fbe96aa888d7bdc356b2a670051
ea3c2bfdceff4ffd7cb161c39744021a34b881c3
refs/heads/master
2021-01-15T18:26:51.918042
2018-04-04T09:06:16
2018-04-04T09:06:16
99,784,673
0
0
null
null
null
null
UTF-8
Java
false
false
595
java
package com.example.jinphy.simplechat.modules.system_msg.notice; import com.example.jinphy.simplechat.base.BasePresenter; import com.example.jinphy.simplechat.base.BaseView; import com.example.jinphy.simplechat.models.message.Message; import java.util.List; /** * DESC: * Created by jinphy on 2018/3/2. */ public interface NoticeContract { interface View extends BaseView<Presenter> { } interface Presenter extends BasePresenter { List<Message> loadNoticeMsg(); void updateMsg(List<Message> messages); void deleteMsg(Message message); } }
[ "709584408@qq.com" ]
709584408@qq.com
41dd547aa7a3392ae3371d691aef4dbf9440cb65
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_4fbf7f46edfc1209a130bcec4ec436fbbe501919/KaraCopyPastePostProcessor/2_4fbf7f46edfc1209a130bcec4ec436fbbe501919_KaraCopyPastePostProcessor_t.java
5133d3b0913cd8b81956ae85da39be432b328d29
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,435
java
/* * Copyright 2010-2013 JetBrains s.r.o. * * 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.jetbrains.kara.plugin.converter.copy; import com.intellij.codeInsight.editorActions.CopyPastePostProcessor; import com.intellij.codeInsight.editorActions.TextBlockTransferableData; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.RangeMarker; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Ref; import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.kara.plugin.KaraPluginOptions; import org.jetbrains.kara.plugin.converter.KaraHTMLConverter; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; public class KaraCopyPastePostProcessor implements CopyPastePostProcessor<TextBlockTransferableData> { private static final Logger LOG = Logger.getInstance(KaraCopyPastePostProcessor.class); @Override public TextBlockTransferableData collectTransferableData(final PsiFile file, final Editor editor, final int[] startOffsets, final int[] endOffsets) { return null; } private boolean containsHtml(Transferable content) { try { String text = (String) content.getTransferData(DataFlavor.stringFlavor); if (KaraHTMLConverter.instance$.itMayContentHTML(text)) { return true; } } catch (Throwable e) { LOG.error(e); } return false; } @Override public TextBlockTransferableData extractTransferableData(Transferable content) { try { if (containsHtml(content)) { String text = (String) content.getTransferData(DataFlavor.stringFlavor); String newText = KaraHTMLConverter.instance$.converter(text, KaraPluginOptions.getInstance(), 0); return new KaraCode(newText); } } catch (Throwable e) { LOG.error(e); } return null; } @Override public void processTransferableData(final Project project, final Editor editor, final RangeMarker bounds, int caretOffset, Ref<Boolean> indented, final TextBlockTransferableData value) { try { final PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); if (!(file instanceof JetFile) || !(value instanceof KaraCode)) { return; } if (allowConvert(project)) { final String text = ((KaraCode) value).getData(); ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { editor.getDocument().replaceString(bounds.getStartOffset(), bounds.getEndOffset(), text); editor.getCaretModel().moveToOffset(bounds.getStartOffset() + text.length()); PsiDocumentManager.getInstance(file.getProject()).commitDocument(editor.getDocument()); } }); } } catch (Throwable t) { LOG.error(t); } } private static boolean allowConvert(@NotNull Project project) { KaraPluginOptions options = KaraPluginOptions.getInstance(); if (options.isDonTShowConversionDialog()) { return options.isEnableHtmlToKaraConversion(); } KaraPasteFromHtmlDialog dialog = new KaraPasteFromHtmlDialog(project); dialog.show(); return dialog.isOK(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1deabb24d5bf4f39fbf2a58f196a85db85f31e0a
838576cc2e44f590d4c59f8a4d120f629969eedf
/src/com/sino/ams/newasset/scrap/constant/ScrapAppConstant.java
c74067d5f98304bca6d3e6999e65c95a7e2e4a63
[]
no_license
fancq/CQEAM
ecbfec8290fc4c213101b88365f7edd4b668fdc8
5dbb23cde5f062d96007f615ddae8fd474cb37d8
refs/heads/master
2021-01-16T20:33:40.983759
2013-09-03T16:00:57
2013-09-03T16:00:57
null
0
0
null
null
null
null
GB18030
Java
false
false
453
java
package com.sino.ams.newasset.scrap.constant; public interface ScrapAppConstant { String PROC_NAME = "otherRejectApp"; String TRANS_TYPE = "ASS-DIS-OTHER"; String TRANS_TYPE_NAME = "通服报废单"; String PROC_APP_NAME = "其他资产报废流程"; String ATT3_FILL_DATA = "FILL_DATA"; String ATT3_APPROVING = "APPROVING"; /** * 历史变更表中值 */ String ORDER_DTL_URL = ""; String ORDER_CATEGORY = "3"; }
[ "lq_xm@163.com" ]
lq_xm@163.com
67d47241e81339924b6e4ce940ce11bbfd052ed8
bb13907de0911a1c03f1a32a7ea16740234abf1c
/src/main/java/com/emc/fapi/jaxws/v4_3_1/SplitterSANView.java
1cd1854e0b9e5a8168d18bb80b102af564958c1b
[]
no_license
noamda/fal431
9287e95fa2bacdace92e65b16ec6985ce2ded29c
dad30667424970fba049df3ba2c2023b82b9276e
refs/heads/master
2021-01-21T14:25:10.211169
2016-06-20T08:55:43
2016-06-20T08:58:33
58,481,483
0
0
null
null
null
null
UTF-8
Java
false
false
1,886
java
package com.emc.fapi.jaxws.v4_3_1; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import java.util.ArrayList; import java.util.List; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SplitterSANView", propOrder = {"splitterUID", "volumes"}) public class SplitterSANView { @XmlElement(nillable = true) protected SplitterUID splitterUID; @XmlElement(nillable = true) protected List<SplitterVolumeSANInfo> volumes; public SplitterSANView() { } public SplitterSANView(SplitterUID splitterUID, List<SplitterVolumeSANInfo> volumes) { this.splitterUID = splitterUID; this.volumes = volumes; } public SplitterUID getSplitterUID() { return this.splitterUID; } public void setSplitterUID(SplitterUID value) { this.splitterUID = value; } public List<SplitterVolumeSANInfo> getVolumes() { if (this.volumes == null) { this.volumes = new ArrayList(); } return this.volumes; } public boolean equals(Object obj) { if (!(obj instanceof SplitterSANView)) { return false; } SplitterSANView otherObj = (SplitterSANView) obj; return (this.splitterUID != null ? this.splitterUID.equals(otherObj.splitterUID) : this.splitterUID == otherObj.splitterUID) && (this.volumes != null ? this.volumes.equals(otherObj.volumes) : this.volumes == otherObj.volumes); } public int hashCode() { return (this.splitterUID != null ? this.splitterUID.hashCode() : 0) ^ (this.volumes != null ? this.volumes.hashCode() : 0); } public String toString() { return "SplitterSANView [splitterUID=" + this.splitterUID + ", " + "volumes=" + this.volumes + "]"; } }
[ "style.daniel@gmail.com" ]
style.daniel@gmail.com
f7e57435d794e7ae9eea25ed79c1e119e0bf6c01
ad64a14fac1f0d740ccf74a59aba8d2b4e85298c
/linkwee-supermarket-admin/src/main/java/com/linkwee/web/dao/AcCityListMapper.java
45b73ad07371ff3f0d6d0872b029a650e5d4c965
[]
no_license
zhangjiayin/supermarket
f7715aa3fdd2bf202a29c8683bc9322b06429b63
6c37c7041b5e1e32152e80564e7ea4aff7128097
refs/heads/master
2020-06-10T16:57:09.556486
2018-10-30T07:03:15
2018-10-30T07:03:15
193,682,975
0
1
null
2019-06-25T10:03:03
2019-06-25T10:03:03
null
UTF-8
Java
false
false
922
java
package com.linkwee.web.dao; import java.util.List; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.session.RowBounds; import com.linkwee.core.datatable.DataTable; import com.linkwee.core.generic.GenericDao; import com.linkwee.web.model.acc.AcCityList; import com.linkwee.web.response.acc.CityInfoResponse; /** * * @描述: Dao接口 * * @创建人: chenjl * * @创建时间:2016年07月26日 17:59:48 * * Copyright (c) 深圳领会科技有限公司-版权所有 */ public interface AcCityListMapper extends GenericDao<AcCityList,Long>{ /** * 封装DataTable对象查询 * @param dt * @param page * @return */ List<AcCityList> selectBySearchInfo(@Param("dt")DataTable dt,RowBounds page); /** * 查询城市 */ List<CityInfoResponse> selectByProvinceCode(@Param("provinceId")String provinceId); }
[ "liqimoon@qq.com" ]
liqimoon@qq.com
06dbd10059370b0ce3fce2278f057bfcef230647
7a9c01bbee5d314a2d97bfb2aef67fcb4accc11d
/com/igexin/push/core/p045a/p046a/C0389g.java
ee7cdd7ebcc0dbffc98e50ad178e463b15be7fc4
[]
no_license
Kainanchen/Sangokushi
72c9ec0aa654e95bc3622a8a3d758eedfc32276e
80fdb55c92776690b9b02aa0a6fba3dc7790025e
refs/heads/master
2021-01-13T01:17:35.153817
2017-03-14T22:01:10
2017-03-14T22:01:10
82,147,818
0
1
null
null
null
null
UTF-8
Java
false
false
1,337
java
package com.igexin.push.core.p045a.p046a; import com.igexin.push.core.C0426b; import com.igexin.push.core.bean.BaseAction; import com.igexin.push.core.bean.C0433g; import com.igexin.push.core.bean.PushTaskBean; import com.igexin.push.core.p045a.C0402e; import com.tencent.connect.common.Constants; import org.json.JSONException; import org.json.JSONObject; /* renamed from: com.igexin.push.core.a.a.g */ public class C0389g implements C0383a { public C0426b m1279a(PushTaskBean pushTaskBean, BaseAction baseAction) { return C0426b.success; } public BaseAction m1280a(JSONObject jSONObject) { try { BaseAction c0433g = new C0433g(); c0433g.setType("goto"); c0433g.setActionId(jSONObject.getString("actionid")); c0433g.setDoActionId(jSONObject.getString("do")); return c0433g; } catch (JSONException e) { return null; } } public boolean m1281b(PushTaskBean pushTaskBean, BaseAction baseAction) { if (!(pushTaskBean == null || baseAction == null || baseAction.getDoActionId() == null || baseAction.getDoActionId().equals(Constants.STR_EMPTY))) { C0402e.m1330a().m1367a(pushTaskBean.getTaskId(), pushTaskBean.getMessageId(), baseAction.getDoActionId()); } return true; } }
[ "kainan.chen.cn@gmail.com" ]
kainan.chen.cn@gmail.com
e30fd5159b61fd6bfdd939b30f9bd147baaf5353
8fba80ff1dc857d111dc55dc77ef841721dee0db
/client/src/main/java/com/baishan/nearshopclient/presenter/MessagePresenter.java
d2e4c6436c0c22dd2692ff2b037c9ef0870f197b
[]
no_license
lucky-you/nearshop
edfd85a676174ff1e57a39d1288c34f2be198bd3
2022ac19607ac8d2bb7eada7160cd59c8c42e6aa
refs/heads/master
2020-03-09T15:58:41.433204
2018-07-20T05:43:09
2018-07-20T05:43:09
128,872,729
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
package com.baishan.nearshopclient.presenter; import com.baishan.mylibrary.mvp.BasePresenter; import com.baishan.nearshopclient.dao.PushParserDao; import com.baishan.nearshopclient.db.DBManager; import com.baishan.nearshopclient.model.PushParser; import com.baishan.nearshopclient.view.IMessageView; import org.greenrobot.greendao.query.QueryBuilder; import java.util.List; /** * Created by RayYeung on 2016/9/21. */ public class MessagePresenter extends BasePresenter<IMessageView> { public MessagePresenter(IMessageView mvpView) { super(mvpView); } public List<PushParser> getMessage(String userId) { QueryBuilder qb = DBManager.getInstance().getPushDao().queryBuilder(); return (List<PushParser>) qb.where(PushParserDao.Properties.UserId.eq(userId)).orderDesc(PushParserDao.Properties.PushTime).list(); } }
[ "1021237228@qq.com" ]
1021237228@qq.com
fde06426eeaf10f4e7476766368d4c2752c62a3d
c0fa6552970c01e31b0e9836e68d415940527945
/016-2-start-mybatis-plus/src/main/java/com/zyf/springboot/entity/test/Test.java
8579212d06f01162c4cc57dc40010d83d0aca47e
[]
no_license
zengyufei/springboot-zyf
275c7b9fd95674307dc7445b2fc4127ee2cb3b51
566326d6ae3bb5c6da11a82e69b4dabef4174495
refs/heads/master
2021-09-14T21:40:56.282893
2018-05-20T01:40:35
2018-05-20T01:40:35
125,204,364
0
0
null
null
null
null
UTF-8
Java
false
false
1,790
java
package com.zyf.springboot.entity.test; import java.math.BigDecimal; import java.util.Calendar; import java.util.Date; import java.util.List; public class Test { private String name; private Date createTime; private Calendar updateTime; private BigDecimal id; private Integer age; private List<Integer> ids; private List<Integer> arrToIds; private List<String> types; private List<String> arrToTypes; public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Calendar getUpdateTime() { return updateTime; } public void setUpdateTime(Calendar updateTime) { this.updateTime = updateTime; } public BigDecimal getId() { return id; } public void setId(BigDecimal id) { this.id = id; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public List<Integer> getIds() { return ids; } public void setIds(List<Integer> ids) { this.ids = ids; } public List<Integer> getArrToIds() { return arrToIds; } public void setArrToIds(List<Integer> arrToIds) { this.arrToIds = arrToIds; } public List<String> getTypes() { return types; } public void setTypes(List<String> types) { this.types = types; } public List<String> getArrToTypes() { return arrToTypes; } public void setArrToTypes(List<String> arrToTypes) { this.arrToTypes = arrToTypes; } }
[ "zengyufei@evergrande.com" ]
zengyufei@evergrande.com
0073478ef9fc2bde3d371c2aff4d6bb80fac15be
6eb473fdee564e75899580270c5566bdea7b5e08
/org/apache/lucene/document/Field$Store.java
17465059cace1b095bfabe26780c4b79f84e3f2a
[]
no_license
Rashmos/Information_Retrieval_System
d2f9e3db1e8a7177b3114d430e0f9c799e59dd67
4b7bc23cb38a100a202df403fd90a217e89594e6
refs/heads/master
2020-05-26T18:35:47.617244
2014-01-28T07:06:33
2014-01-28T07:06:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
373
java
/* */ package org.apache.lucene.document; /* */ /* */ public enum Field$Store /* */ { /* 45 */ YES, /* */ /* 51 */ NO; /* */ /* */ public abstract boolean isStored(); /* */ } /* Location: /Users/Rashmi/Downloads/set_rp2614/rashmi.jar * Qualified Name: org.apache.lucene.document.Field.Store * JD-Core Version: 0.6.2 */
[ "Rashmi@rashmis-MacBook-Pro.local" ]
Rashmi@rashmis-MacBook-Pro.local
c8a158418ea807bf38ef81177a1b7e3312eeb59f
ae359fe0f0c62b6a17ea55ddae6bc4db6ef60b36
/gaf-cloud/gaf-biz/gaf-gis/gaf-map/gaf-map-service/src/main/java/com/supermap/gaf/webgis/cache/RegistryResultCacheI.java
be1a463a3db7c6b8657d65728f62adcd90b0047a
[ "Apache-2.0" ]
permissive
yifu-du/GAF
b34e42aa3b8814f347a798228ada49df607895d0
7c8ed8b12d98dce521a7bc1ad5fb9e061a19cdde
refs/heads/main
2023-04-22T20:38:03.315155
2021-05-12T03:32:04
2021-05-12T03:32:04
326,898,704
0
0
Apache-2.0
2021-01-05T05:42:49
2021-01-05T05:42:48
null
UTF-8
Java
false
false
747
java
/* * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */ package com.supermap.gaf.webgis.cache; import com.supermap.gaf.webgis.domain.BatchRegistryServiceResult; /** * @date:2021/3/25 * @author heykb */ public interface RegistryResultCacheI { String generateKey(); BatchRegistryServiceResult get(String code); void put(String code,BatchRegistryServiceResult data); void success(String code); void fail(String code); void exist(String code); void done(String code); void error(String code); }
[ "rhett_du@163.com" ]
rhett_du@163.com
6f94bf98b3a4ac5a77344e88c425b15e5ee68bdf
88421b7172f7634d56e2d29edfc8e2f67ec1d9ac
/miniGameHeaven/src/common/JDBCTemplate.java
feace2579591bb428860f06954ae3b8dd87dc734
[]
no_license
ajtwls1256/JDBC-exam
6ceda95fe46fc49bc6c7a24dea7ee7359ebf821b
cb2a23bd4da401c386396a74d9622f0214e6b70a
refs/heads/master
2020-09-18T06:37:04.273474
2019-11-26T08:05:02
2019-11-26T08:05:02
224,136,070
0
0
null
null
null
null
UTF-8
Java
false
false
1,859
java
package common; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class JDBCTemplate { public JDBCTemplate() { super(); } public static Connection getConnection() { Connection conn = null; try { Class.forName("oracle.jdbc.driver.OracleDriver"); conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","minigame","1234"); conn.setAutoCommit(false);// 자동 커밋을 해제 } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } return conn; } public static void close(Connection conn) { try { if(conn != null && !conn.isClosed()) { conn.close(); } } catch (SQLException e) { e.printStackTrace(); } } public static void commit(Connection conn) { try { if(conn != null && !conn.isClosed()) { conn.commit(); } } catch (SQLException e) { e.printStackTrace(); } } public static void rollback(Connection conn) { try { if(conn != null && !conn.isClosed()) { conn.rollback(); } } catch (SQLException e) { e.printStackTrace(); } } public static void close (Statement stmt) { try { if(stmt != null && !stmt.isClosed()) { stmt.close(); } } catch (SQLException e) { e.printStackTrace(); } } /* 다형성에 의해 프리페어는 만들지 않아도 괜찮다. 스테이트가 상위이기 때문. public void close (PreparedStatement pstmt) { try { if(pstmt != null && !pstmt.isClosed()) { pstmt.close(); } } catch (SQLException e) { e.printStackTrace(); } }*/ public static void close (ResultSet rset) { try { if(rset != null && !rset.isClosed()) { rset.close(); } } catch (SQLException e) { e.printStackTrace(); } } }
[ "ajtwls1256@gmail.com" ]
ajtwls1256@gmail.com
68a663632a8aea53a136bdeb57886fcb8a341e97
a500b8f800fe0b1df31cdea70358d9c1186d0de9
/meta/org/obinject/storage/Structure.java
0a77e22e727d28d016b16567bc3781525a630db1
[]
no_license
joaorenno/obinject
e1c0d40e64b88e3eaa5114a0a9875524bbbf7c3a
e79a7993e5cdd308e3e6bafe11788807038bc4a2
refs/heads/master
2021-01-01T15:24:01.136442
2017-08-01T00:01:55
2017-08-01T00:18:02
20,874,558
0
0
null
null
null
null
UTF-8
Java
false
false
1,362
java
/* Copyright (C) 2013 Enzo Seraphim This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit <http://www.gnu.org/licenses/> */ package org.obinject.storage; /** * * @author Enzo Seraphim <seraphim@unifei.edu.br> * @author Luiz Olmes Carvalho <olmes@icmc.usp.br> * @author Thatyana de Faria Piola Seraphim <thatyana@unifei.edu.br> * * @param <T> */ public interface Structure <T>{ /** * * @param obj * @return */ public boolean add(T obj); /** * * @return */ public abstract long getRootPageId(); /** * * @param obj * @return */ public abstract boolean remove(T obj); public Class<T> getObjectClass(); }
[ "administrator@JOAORENNO-MacBook-Air.local" ]
administrator@JOAORENNO-MacBook-Air.local
6e00822c79707c44fa9be39dc0b06d81d4b2c4a9
d9853162b6258442e0b089680522e5223ca0333e
/src/main/java/com/github/fabriciofx/cactoos/jdbc/param/DateTimeOf.java
33e2859b49bcded2ddcea821eeaf06bf1aaf27de
[ "MIT" ]
permissive
fabriciofx/cactoos-jdbc
d1512349cfddfabc98efc079ad40d9285e2b2916
fed8fd6e4ee0bb4d5014608fb4ba354fa9ed6112
refs/heads/master
2023-08-31T11:26:11.683877
2023-08-22T00:48:31
2023-08-22T00:48:31
132,658,324
31
13
MIT
2023-09-01T22:18:21
2018-05-08T19:59:43
Java
UTF-8
Java
false
false
2,182
java
/* * The MIT License (MIT) * * Copyright (C) 2018-2023 Fabrício Barros Cabral * * 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 NON-INFRINGEMENT. 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.github.fabriciofx.cactoos.jdbc.param; import com.github.fabriciofx.cactoos.jdbc.Param; import java.sql.PreparedStatement; import java.sql.Timestamp; import java.time.LocalDateTime; /** * DateTime param. * * @since 0.2 */ public final class DateTimeOf implements Param { /** * Name. */ private final String id; /** * Value. */ private final LocalDateTime datetime; /** * Ctor. * @param name The id * @param value The data */ public DateTimeOf(final String name, final LocalDateTime value) { this.id = name; this.datetime = value; } @Override public String name() { return this.id; } @Override public void prepare( final PreparedStatement stmt, final int index ) throws Exception { stmt.setTimestamp(index, Timestamp.valueOf(this.datetime)); } @Override public String asString() throws Exception { return this.datetime.toString(); } }
[ "fabriciofx@gmail.com" ]
fabriciofx@gmail.com
9300104ed3a0299a54d613da89eab602ba5480eb
1d2fda2245888413e3eef8798a61236822f022db
/org/apache/commons/logging/impl/NoOpLog.java
5ea332ebec288a62d11e1f07162111c68ad7d50b
[ "IJG" ]
permissive
SynieztroLedPar/Wu
3b4391e916f6a5605d60663f800702f3e45d5dfc
5f7daebc2fb430411ddb76a179005eeecde9802b
refs/heads/master
2023-04-29T17:27:08.301723
2020-10-10T22:28:40
2020-10-10T22:28:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,513
java
package org.apache.commons.logging.impl; import java.io.Serializable; import org.apache.commons.logging.Log; public class NoOpLog implements Log, Serializable { private static final long serialVersionUID = 561423906191706148L; public NoOpLog() {} public NoOpLog(String name) {} public void trace(Object message) {} public void trace(Object message, Throwable t) {} public void debug(Object message) {} public void debug(Object message, Throwable t) {} public void info(Object message) {} public void info(Object message, Throwable t) {} public void warn(Object message) {} public void warn(Object message, Throwable t) {} public void error(Object message) {} public void error(Object message, Throwable t) {} public void fatal(Object message) {} public void fatal(Object message, Throwable t) {} public final boolean isDebugEnabled() { return false; } public final boolean isErrorEnabled() { return false; } public final boolean isFatalEnabled() { return false; } public final boolean isInfoEnabled() { return false; } public final boolean isTraceEnabled() { return false; } public final boolean isWarnEnabled() { return false; } } /* Location: C:\Games\SteamLibrary\steamapps\common\Wurm Unlimited Dedicated Server\server.jar!\org\apache\commons\logging\impl\NoOpLog.class * Java compiler version: 1 (45.3) * JD-Core Version: 0.7.1 */
[ "dwayne.griffiths@outlook.com" ]
dwayne.griffiths@outlook.com
e65ac2e96fb314cc0f386349518470994d526df8
0e49eee4f85024e0857b77bce1e78030beb47b1f
/src/main/java/com/tencentcloudapi/fmu/v20191213/models/RGBAInfo.java
da57225480189aae9cacd7c708c56f19bd3021fe
[ "Apache-2.0" ]
permissive
arbing/tencentcloud-sdk-java
7b880af16540fac10a785a1bef0d529eec89c525
c1bdd3f711c92f950ffe15e6506426a8e340a638
refs/heads/master
2021-03-31T15:58:36.276205
2020-03-18T00:28:16
2020-03-18T00:28:16
248,117,938
1
0
Apache-2.0
2020-03-18T02:15:34
2020-03-18T02:15:33
null
UTF-8
Java
false
false
3,042
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.tencentcloudapi.fmu.v20191213.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class RGBAInfo extends AbstractModel{ /** * R通道数值。[0,255]。 */ @SerializedName("R") @Expose private Long R; /** * G通道数值。[0,255]。 */ @SerializedName("G") @Expose private Long G; /** * B通道数值。[0,255]。 */ @SerializedName("B") @Expose private Long B; /** * A通道数值。[0,100]。建议取值50。 */ @SerializedName("A") @Expose private Long A; /** * Get R通道数值。[0,255]。 * @return R R通道数值。[0,255]。 */ public Long getR() { return this.R; } /** * Set R通道数值。[0,255]。 * @param R R通道数值。[0,255]。 */ public void setR(Long R) { this.R = R; } /** * Get G通道数值。[0,255]。 * @return G G通道数值。[0,255]。 */ public Long getG() { return this.G; } /** * Set G通道数值。[0,255]。 * @param G G通道数值。[0,255]。 */ public void setG(Long G) { this.G = G; } /** * Get B通道数值。[0,255]。 * @return B B通道数值。[0,255]。 */ public Long getB() { return this.B; } /** * Set B通道数值。[0,255]。 * @param B B通道数值。[0,255]。 */ public void setB(Long B) { this.B = B; } /** * Get A通道数值。[0,100]。建议取值50。 * @return A A通道数值。[0,100]。建议取值50。 */ public Long getA() { return this.A; } /** * Set A通道数值。[0,100]。建议取值50。 * @param A A通道数值。[0,100]。建议取值50。 */ public void setA(Long A) { this.A = A; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "R", this.R); this.setParamSimple(map, prefix + "G", this.G); this.setParamSimple(map, prefix + "B", this.B); this.setParamSimple(map, prefix + "A", this.A); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
bd969b5e03d6901febf5b30c601e104a4fad0393
b66bdee811ed0eaea0b221fea851f59dd41e66ec
/src/android/support/v4/view/df.java
5b642b410f81d0ac298b2ab8e2efbdf64413a31c
[]
no_license
reverseengineeringer/com.grubhub.android
3006a82613df5f0183e28c5e599ae5119f99d8da
5f035a4c036c9793483d0f2350aec2997989f0bb
refs/heads/master
2021-01-10T05:08:31.437366
2016-03-19T20:41:23
2016-03-19T20:41:23
54,286,207
0
0
null
null
null
null
UTF-8
Java
false
false
282
java
package android.support.v4.view; import android.view.View; public abstract interface df { public abstract void a(View paramView, float paramFloat); } /* Location: * Qualified Name: android.support.v4.view.df * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
6f47e19bafb84b292861eebbe286efd1c1a92205
15378acfac6ded9aa860dc0d1cc498d0dbd61587
/src/main/java/org/mycontroller/restclient/core/RestHttpResponse.java
96ce22da3408a83069305a5974d919efe18ebd0d
[]
no_license
mycontroller-org/mycontroller-rest-clients
2f0a2b1aeae496fa84e337b983c75d1aeef2db9f
f5b45254402e8f3c6cc44a0e508a4ecfd15af9dd
refs/heads/master
2022-08-23T23:56:42.852421
2022-08-04T08:49:48
2022-08-04T08:49:48
53,250,390
0
3
null
null
null
null
UTF-8
Java
false
false
1,964
java
/* * Copyright 2015-2018 Jeeva Kandasamy (jkandasa@gmail.com) * and other contributors as indicated by the @author tags. * * 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.mycontroller.restclient.core; import java.io.IOException; import java.net.URI; import org.apache.commons.io.IOUtils; import org.apache.http.Header; import org.apache.http.HttpResponse; import org.mycontroller.restclient.core.RestHttpClient.STATUS_CODE; import lombok.Builder; import lombok.Getter; import lombok.ToString; import lombok.extern.slf4j.Slf4j; /** * @author Jeeva Kandasamy (jkandasa) * @since 2.1.0 */ @Getter @ToString @Builder @Slf4j public class RestHttpResponse { public static RestHttpResponse get(URI uri, HttpResponse response) throws UnsupportedOperationException, IOException { _logger.debug("{}", response); RestHttpResponse mcResponse = RestHttpResponse.builder() .uri(uri) .responseCode(response.getStatusLine().getStatusCode()) .headers(response.getAllHeaders()) .build(); if (response.getStatusLine().getStatusCode() != STATUS_CODE.NO_CONTENT.getCode()) { mcResponse.entity = IOUtils.toString(response.getEntity().getContent()); } return mcResponse; } private URI uri; private String entity; private Integer responseCode; private Header[] headers; private String exception; }
[ "jkandasa@gmail.com" ]
jkandasa@gmail.com