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
9f6ae9edf804a8dde7898949b72a61f6ab8a8313
c073d6812630484bd302733d0ac61c8967bf4404
/interview-skill/src/main/java/com/tom/two/design/strategy/pattern/Context.java
05fa94ebb553febce11bc3edd547e4aab9df334c
[]
no_license
tomlxq/interview
e0d1f8a7f230f29e8372ff575fd67519df341e0c
5ce5186457583fa9d34e10ce4d3590db5a45da88
refs/heads/master
2023-03-17T03:21:06.567455
2023-03-06T11:55:07
2023-03-06T11:55:07
193,185,320
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package com.tom.two.design.strategy.pattern; /** * 功能描述 * * @author TomLuo * @date 2020/12/6 */ public class Context { //构造函数,你要使用哪个妙计 private IStrategy strategy; public Context(IStrategy strategy){ this.strategy = strategy; } //使用计谋了,看我出招了 public void operate(){ this.strategy.operate(); } }
[ "21429503@qq.com" ]
21429503@qq.com
76f0ced227cce2ed87d5b86c8b281886d44c1d6f
16a0a6a5e0d07b5e3117c316acf4b4dbe11e6d29
/app/src/main/java/com/epsilon/see_gpa/Utility.java
37ac732d4246974127b1ba38ea1fcd54807c32c6
[]
no_license
ahmedmolawale/See-GPA
35183db4000708e7828ffdc347df52dfd69c6f5f
9f622c7d09915b605f6d16032fb902093d786455
refs/heads/master
2021-01-17T23:02:10.667421
2017-03-07T14:39:40
2017-03-07T14:39:40
84,209,656
1
1
null
null
null
null
UTF-8
Java
false
false
1,401
java
package com.epsilon.see_gpa; /** * Created by ahmed on 04/08/2016. */ import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Class which has Utility methods */ public class Utility { private static Pattern pattern; private static Matcher matcher; //Email Pattern private static final String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; private static final String PASSWORD_PATTERN = "((?=.*[a-z])(?=.*d)(?=.*[A-Z]).{6,16})"; /** * Validate Email with regular expression * * @param email * @return true for Valid Email and false for Invalid Email */ public static boolean validateEmail(String email) { pattern = Pattern.compile(EMAIL_PATTERN); matcher = pattern.matcher(email); return matcher.matches(); } public static boolean validatePassword(String password) { pattern = Pattern.compile(PASSWORD_PATTERN); matcher = pattern.matcher(password); return matcher.matches(); } /** * Checks for Null String object * * @param txt * @return true for not null and false for null String object */ public static boolean isNotNull(String txt) { return txt != null && txt.trim().length() > 0 ? true : false; } }
[ "=" ]
=
db932a34298fc170b8a51c5e703b9a2f23458c97
ee7998300fc1db613f5b3e05736011cdf02d3ef5
/dongyimai_parent/dongyimai_content_service/src/main/java/com/offcn/content/service/impl/ContentServiceImpl.java
60c902070e6ad2c4138431f951e8726bae6ed690
[]
no_license
wgijja/DYM
c44a700608a849341d158051a972af41d4fa6de7
1ed0d8ab476d8c6672b6a41508ade4b15ffafcdb
refs/heads/master
2023-04-23T00:18:19.520074
2021-04-26T14:13:36
2021-04-26T14:13:36
359,502,627
0
0
null
null
null
null
UTF-8
Java
false
false
4,964
java
package com.offcn.content.service.impl; import com.alibaba.dubbo.config.annotation.Service; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.offcn.content.service.ContentService; import com.offcn.entity.PageResult; import com.offcn.mapper.TbContentMapper; import com.offcn.pojo.TbContent; import com.offcn.pojo.TbContentExample; import com.offcn.pojo.TbContentExample.Criteria; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.util.CollectionUtils; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 服务实现层 * * @author Administrator */ @Service public class ContentServiceImpl implements ContentService { @Autowired private TbContentMapper contentMapper; @Autowired private RedisTemplate redisTemplate; /** * 查询全部 */ @Override public List<TbContent> findAll() { return contentMapper.selectByExample(null); } /** * 按分页查询 */ @Override public PageResult findPage(int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); Page<TbContent> page = (Page<TbContent>) contentMapper.selectByExample(null); return new PageResult(page.getTotal(), page.getResult()); } /** * 增加 */ @Override public void add(TbContent content) { contentMapper.insert(content); //清空该广告分类下的缓存 Long categoryId = content.getCategoryId(); redisTemplate.boundHashOps("content").delete(categoryId); } /** * 修改 */ @Override public void update(TbContent content) { //查询原有分类ID TbContent tbContent = contentMapper.selectByPrimaryKey(content.getId()); //在缓存中删除该分类 redisTemplate.boundHashOps("content").delete(tbContent.getCategoryId()); contentMapper.updateByPrimaryKey(content); //判断传过来的分类和原来是分类是否一致 if (content.getCategoryId().longValue() != tbContent.getCategoryId().longValue()) { redisTemplate.boundHashOps("content").delete(content.getCategoryId()); } } /** * 根据ID获取实体 * * @param id * @return */ @Override public TbContent findOne(Long id) { return contentMapper.selectByPrimaryKey(id); } /** * 批量删除 */ @Override public void delete(Long[] ids) { for (Long id : ids) { contentMapper.deleteByPrimaryKey(id); TbContent tbContent = contentMapper.selectByPrimaryKey(id); redisTemplate.boundHashOps("content").delete(tbContent.getCategoryId()); } } @Override public PageResult findPage(TbContent content, int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); TbContentExample example = new TbContentExample(); Criteria criteria = example.createCriteria(); if (content != null) { if (content.getTitle() != null && content.getTitle().length() > 0) { criteria.andTitleLike("%" + content.getTitle() + "%"); } if (content.getUrl() != null && content.getUrl().length() > 0) { criteria.andUrlLike("%" + content.getUrl() + "%"); } if (content.getPic() != null && content.getPic().length() > 0) { criteria.andPicLike("%" + content.getPic() + "%"); } if (content.getStatus() != null && content.getStatus().length() > 0) { criteria.andStatusLike("%" + content.getStatus() + "%"); } } Page<TbContent> page = (Page<TbContent>) contentMapper.selectByExample(example); return new PageResult(page.getTotal(), page.getResult()); } /** * 根据分类查询广告列表 * * @return */ @Override public List<TbContent> findByCategoryId(Long categoryId) { //在缓存中读取广告信息 List<TbContent> contentList = (List<TbContent>) redisTemplate.boundHashOps("content").get(categoryId); if (CollectionUtils.isEmpty(contentList)) { //为空时查询数据库 TbContentExample tbContentExample = new TbContentExample(); TbContentExample.Criteria criteria = tbContentExample.createCriteria(); criteria.andCategoryIdEqualTo(categoryId); criteria.andStatusEqualTo("1"); tbContentExample.setOrderByClause("sort_order"); contentList = contentMapper.selectByExample(tbContentExample); //同步到缓存中 redisTemplate.boundHashOps("content").put(categoryId, contentList); } else { System.out.println("这次走的缓存哟!"); } return contentList; } }
[ "hello@qq.com" ]
hello@qq.com
937cce0a16d53b946aa7d6866714d4eb33e49755
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/facebook/rti/b/b/d/f.java
a20eaeb2ee80ff190e241a374eb57cca15b1ebca
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
857
java
package com.facebook.rti.b.b.d; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.facebook.rti.a.i.b; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; final class f extends BroadcastReceiver { f(g paramg, b paramb) {} public final void onReceive(Context paramContext, Intent paramIntent) { if (paramIntent == null) {} do { return; paramContext = Boolean.valueOf("android.intent.action.SCREEN_ON".equals(paramIntent.getAction())); } while (paramContext.equals((Boolean)g.a(b).getAndSet(paramContext))); g.b(b).set(a.a()); g.c(b).a(paramContext.booleanValue()); } } /* Location: * Qualified Name: com.facebook.rti.b.b.d.f * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
6686c28962d519845b4319f575b3e33464b2649d
2e378b56064a91e923c1056e1fc383522ad7b96e
/fpush-android-demo/app/src/main/java/com/appjishu/fpush_demo/boot/MyApp.java
178258ff6c8ff24b85554c05219af7c2f33aa9aa
[ "Apache-2.0" ]
permissive
bestjss/fpush
c3499dbc3fbdf1a2248072f990873ea8c9966ca3
55453e24241a1b12e34be44321004297ab7a7d57
refs/heads/master
2022-11-11T02:31:12.953259
2019-11-12T02:50:25
2019-11-12T02:50:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package com.appjishu.fpush_demo.boot; import android.app.Application; public class MyApp extends Application { public static MyApp getInstance() { return instance; } private static MyApp instance; @Override public void onCreate() { super.onCreate(); instance = this; } }
[ "liushaomingdev@163.com" ]
liushaomingdev@163.com
1ac3d424d3da20c4b759ae4b8d23aa01916f5d89
fc05322703594e40548f8e738449b9418efb7518
/src/main/java/org/basex/query/func/fn/FnConcat.java
8faf251bb9f66a82e4d10726e4f7bb27def0a215
[]
no_license
mauricioscastro/basex-lmdb
0028994871be99ec1f5d86738adfad18983d3046
bb8f32b800cb0f894c398c0019bc501196a1a801
refs/heads/master
2021-01-21T00:08:36.905964
2017-09-26T17:39:31
2017-09-26T17:39:31
41,042,448
1
1
null
2017-09-26T14:58:24
2015-08-19T15:24:11
Java
UTF-8
Java
false
false
658
java
package org.basex.query.func.fn; import org.basex.query.*; import org.basex.query.expr.*; import org.basex.query.func.*; import org.basex.query.value.item.*; import org.basex.util.*; /** * Function implementation. * * @author BaseX Team 2005-15, BSD License * @author Christian Gruen */ public final class FnConcat extends StandardFunc { @Override public Item item(final QueryContext qc, final InputInfo ii) throws QueryException { final TokenBuilder tb = new TokenBuilder(); for(final Expr a : exprs) { final Item it = a.atomItem(qc, info); if(it != null) tb.add(it.string(info)); } return Str.get(tb.finish()); } }
[ "mauricioscastro@hotmail.com" ]
mauricioscastro@hotmail.com
b7694653468355b3b9a330c05e132f31821fb3ad
f249c74908a8273fdc58853597bd07c2f9a60316
/common/src/main/java/cn/edu/cug/cs/gtl/jts/geom/SingleCurvedGeometry.java
070436627727c341e3b73728bae8a0f8d2a8456b
[ "MIT" ]
permissive
zhaohhit/gtl-java
4819d7554f86e3c008e25a884a3a7fb44bae97d0
63581c2bfca3ea989a4ba1497dca5e3c36190d46
refs/heads/master
2020-08-10T17:58:53.937394
2019-10-30T03:06:06
2019-10-30T03:06:06
214,390,871
1
0
MIT
2019-10-30T03:06:08
2019-10-11T09:00:26
null
UTF-8
Java
false
false
1,529
java
package cn.edu.cug.cs.gtl.jts.geom; /* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2014, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ /** * Convenience interface to expose methods common to {@link CircularString} and {@link CircularRing} * * @author Andrea Aime - GeoSolutions */ public interface SingleCurvedGeometry<T extends LineString> extends CurvedGeometry<T> { /** * Returns the linearized coordinates at the given tolerance * * @param tolerance * @return */ public CoordinateSequence getLinearizedCoordinateSequence(final double tolerance); /** * Returns the control points for this string/ring. * * @return */ double[] getControlPoints(); /** * Number of arc circles * * @return */ public int getNumArcs(); /** * Returns the n-th circular arc making up the geometry * * @param arcIndex * @return */ public CircularArc getArcN(int arcIndex); }
[ "zwhe@cug.edu.cn" ]
zwhe@cug.edu.cn
54a2f284cd23f1a18164586c4d4290b2e51c3d23
67c2281b7bf6362fd79ab2ab69b331a34b2178a3
/framework.core/src/main/java/software/simple/solutions/framework/core/annotations/MailPlaceholders.java
8af5caf9ee910f5a8471eb30b04e0b39a97a7ca7
[]
no_license
yusufnazir/framework_parent
063f814b83d216bda20e9de2dee2cb16a24ecf78
9204c78260ad3601726db141ff599cd4c75174b8
refs/heads/master
2022-07-22T12:01:28.144363
2020-05-11T01:07:24
2020-05-11T01:07:24
183,057,473
0
1
null
2022-06-21T02:33:18
2019-04-23T16:45:51
Java
UTF-8
Java
false
false
323
java
package software.simple.solutions.framework.core.annotations; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; @Retention(RUNTIME) @Target({ java.lang.annotation.ElementType.TYPE }) public @interface MailPlaceholders { }
[ "yusuf.nazir@gmail.com" ]
yusuf.nazir@gmail.com
440bb9832e6020fd7cea75aaf5d4768b53869a39
0c23402fa0fc72480aa14a0b4c3466c8fa1b45e8
/linkage-recyclerview/src/main/java/com/kunminx/linkage/adapter/viewholder/LinkageSecondaryFooterViewHolder.java
1313c94b4b224eb1f414111d8ada57594cfc0a63
[ "Apache-2.0" ]
permissive
mozuck/Linkage-RecyclerView
a1643bb125b600fe30e77cd2fd080c8bfa9845e9
6988debf4d153637ee8d1eaa3602fba5fd0779fc
refs/heads/master
2023-06-05T00:40:12.771852
2021-06-19T09:16:20
2021-06-19T09:16:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
932
java
package com.kunminx.linkage.adapter.viewholder; /* * Copyright (c) 2018-present. KunMinX * * 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. */ import android.view.View; import androidx.annotation.NonNull; /** * Create by KunMinX at 19/5/15 */ public class LinkageSecondaryFooterViewHolder extends BaseViewHolder { public LinkageSecondaryFooterViewHolder(@NonNull View itemView) { super(itemView); } }
[ "kunminx@gmail.com" ]
kunminx@gmail.com
7701cd55ae5285cfbe1c5b5dfcee44470d9fc8c8
84ad6b013e749c112e7ced917506170840965361
/src/adjacensy/vertex/edge/AdjacencyList2.java
a18d168bf979de45401114741d0f19ab035371f2
[]
no_license
Muhaiminur/ADJACENSY-VERTEX-EDGE
9acd8af4cf76d0babafbfe98017411239af33a7e
823f84fcee48e84d145c55fa2b0cb51db1251e6c
refs/heads/master
2020-04-28T08:43:03.387943
2019-03-12T05:07:53
2019-03-12T05:07:53
175,139,374
0
0
null
null
null
null
UTF-8
Java
false
false
1,622
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package adjacensy.vertex.edge; import java.io.File; import java.util.Scanner; /** * * @author Muhaiminur */ public class AdjacencyList2 { Vertex2[]list; public AdjacencyList2() { try { Scanner abir=new Scanner(new File("Input")); list=new Vertex2[abir.nextInt()]; //System.out.println(adjl.length); int f=abir.nextInt(); char x='A'; for (int c = 0; c < list.length; c++) { String s=Character.toString(x); list[c]=new Vertex2(s, null); x++; } while (abir.hasNext()) { int l1 =index(abir.next()); int l2=index(abir.next()); list[l1].adj=new Node(l2, list[l1].adj); list[l2].adj=new Node(l1,list[l2].adj); } } catch (Exception e) { System.out.println(e); } } public int index(String s){ for (int c = 0; c < list.length; c++) { if (list[c].name.equals(s)) { return c; } } return -1; } public void print(){ for (int c = 0; c < list.length; c++) { System.out.print(list[c].name); for(Node n=list[c].adj;n!=null;n=n.next){ System.out.print(" --> "+list[n.num].name); } System.out.println(); } } }
[ "muhaiminurabir@gmail.com" ]
muhaiminurabir@gmail.com
5e7f1bd02cb0fbe25fe8f079cb30339f0a5e277b
47e24981971894ec9d0a915dad70ec5b87c41ad9
/SpringBoot开发框架/EmployeeModule/src/main/java/cn/ustb/pojo/Employee.java
604778cc2f76bd1c517aaf2ae107e3877692a44b
[]
no_license
MouseZhang/Java-Development-Framework
731dd0ee0d9e27a799dbb9775490c1bd41e4839c
e21e98e5ac3011aab694bef3191949af1e5e7b5d
refs/heads/master
2020-12-26T15:48:42.944474
2020-03-29T06:57:15
2020-03-29T06:57:15
237,552,753
2
0
null
null
null
null
UTF-8
Java
false
false
646
java
package cn.ustb.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.Date; @Data @NoArgsConstructor public class Employee { private Integer empno; private String ename; private String email; private Integer gender; // 0:女,1:男 private Date birth; private Department dept; public Employee(Integer empno, String ename, String email, Integer gender, Department dept) { this.empno = empno; this.ename = ename; this.email = email; this.gender = gender; this.birth = new Date(); this.dept = dept; } }
[ "athope@163.com" ]
athope@163.com
6a6dd4433867dc894cdf6e56fe934b9e2c62e260
de7b67d4f8aa124f09fc133be5295a0c18d80171
/workspace_java-src/java-src-test/src/com/sun/tools/javac/processing/JavacMessager.java
cbf5cc3933ebbdcc787819cd6f0df166415d6d15
[]
no_license
lin-lee/eclipse_workspace_test
adce936e4ae8df97f7f28965a6728540d63224c7
37507f78bc942afb11490c49942cdfc6ef3dfef8
refs/heads/master
2021-05-09T10:02:55.854906
2018-01-31T07:19:02
2018-01-31T07:19:02
119,460,523
0
1
null
null
null
null
UTF-8
Java
false
false
4,884
java
/** * %W% %E% * * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * Use and Distribution is subject to the Java Research License available * at <http://wwws.sun.com/software/communitysource/jrl.html>. */ package com.sun.tools.javac.processing; import com.sun.tools.javac.model.JavacElements; import com.sun.tools.javac.util.*; import com.sun.tools.javac.comp.*; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.*; import com.sun.tools.javac.util.Position; import javax.lang.model.element.*; import javax.tools.JavaFileObject; import javax.tools.Diagnostic; import javax.annotation.processing.*; import java.util.*; /** * An implementation of the Messager built on top of log. * * <p><b>This is NOT part of any API supported by Sun Microsystems. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice.</b> */ @Version("%W% %E%") public class JavacMessager implements Messager { Log log; JavacProcessingEnvironment processingEnv; int errorCount = 0; JavacMessager(Context context, JavacProcessingEnvironment processingEnv) { log = Log.instance(context); this.processingEnv = processingEnv; } // processingEnv.getElementUtils() public void printMessage(Diagnostic.Kind kind, CharSequence msg) { printMessage(kind, msg, null, null, null); } public void printMessage(Diagnostic.Kind kind, CharSequence msg, Element e) { printMessage(kind, msg, e, null, null); } /** * Prints a message of the specified kind at the location of the * annotation mirror of the annotated element. * * @param kind the kind of message * @param msg the message, or an empty string if none * @param e the annotated element * @param a the annotation to use as a position hint */ public void printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a) { printMessage(kind, msg, e, a, null); } /** * Prints a message of the specified kind at the location of the * annotation value inside the annotation mirror of the annotated * element. * * @param kind the kind of message * @param msg the message, or an empty string if none * @param e the annotated element * @param a the annotation containing the annotaiton value * @param v the annotation value to use as a position hint */ public void printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v) { JavaFileObject oldSource = null; JavaFileObject newSource = null; JCDiagnostic.DiagnosticPosition pos = null; JavacElements elemUtils = processingEnv.getElementUtils(); Pair<JCTree, JCCompilationUnit> treeTop = elemUtils.getTreeAndTopLevel(e, a, v); if (treeTop != null) { newSource = treeTop.snd.sourcefile; if (newSource != null) { oldSource = log.useSource(newSource); pos = treeTop.fst.pos(); } } try { switch (kind) { case ERROR: errorCount++; boolean prev = log.multipleErrors; log.multipleErrors = true; try { log.error(pos, "proc.messager", msg.toString()); } finally { log.multipleErrors = prev; } break; case WARNING: log.warning(pos, "proc.messager", msg.toString()); break; case MANDATORY_WARNING: log.mandatoryWarning(pos, "proc.messager", msg.toString()); break; default: log.note(pos, "proc.messager", msg.toString()); break; } } finally { if (oldSource != null) log.useSource(oldSource); } } /** * Prints an error message. * Equivalent to {@code printError(null, msg)}. * @param msg the message, or an empty string if none */ public void printError(String msg) { printMessage(Diagnostic.Kind.ERROR, msg); } /** * Prints a warning message. * Equivalent to {@code printWarning(null, msg)}. * @param msg the message, or an empty string if none */ public void printWarning(String msg) { printMessage(Diagnostic.Kind.WARNING, msg); } /** * Prints a notice. * @param msg the message, or an empty string if none */ public void printNotice(String msg) { printMessage(Diagnostic.Kind.NOTE, msg); } public boolean errorRaised() { return errorCount > 0; } public int errorCount() { return errorCount; } public void newRound(Context context) { log = Log.instance(context); errorCount = 0; } public String toString() { return "javac Messager version %W% %E%"; } }
[ "lilin@lvmama.com" ]
lilin@lvmama.com
d55840546292c34dcf1b3b63a78b35e3efd96c7c
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/validation/org/apache/dubbo/config/ProtocolConfigTest.java
cbded485f37738197a0750f69409cc8f68a21a3d
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
5,954
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.dubbo.config; import com.alibaba.dubbo.config.ProtocolConfig; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; public class ProtocolConfigTest { @Test public void testName() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setName("name"); Map<String, String> parameters = new HashMap<String, String>(); ProtocolConfig.appendParameters(parameters, protocol); MatcherAssert.assertThat(protocol.getName(), Matchers.equalTo("name")); MatcherAssert.assertThat(protocol.getId(), Matchers.equalTo("name")); MatcherAssert.assertThat(parameters.isEmpty(), Matchers.is(true)); } @Test public void testHost() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setHost("host"); Map<String, String> parameters = new HashMap<String, String>(); ProtocolConfig.appendParameters(parameters, protocol); MatcherAssert.assertThat(protocol.getHost(), Matchers.equalTo("host")); MatcherAssert.assertThat(parameters.isEmpty(), Matchers.is(true)); } @Test public void testPort() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setPort(8080); Map<String, String> parameters = new HashMap<String, String>(); ProtocolConfig.appendParameters(parameters, protocol); MatcherAssert.assertThat(protocol.getPort(), Matchers.equalTo(8080)); MatcherAssert.assertThat(parameters.isEmpty(), Matchers.is(true)); } @Test public void testPath() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setContextpath("context-path"); Map<String, String> parameters = new HashMap<String, String>(); ProtocolConfig.appendParameters(parameters, protocol); MatcherAssert.assertThat(protocol.getPath(), Matchers.equalTo("context-path")); MatcherAssert.assertThat(protocol.getContextpath(), Matchers.equalTo("context-path")); MatcherAssert.assertThat(parameters.isEmpty(), Matchers.is(true)); protocol.setPath("path"); MatcherAssert.assertThat(protocol.getPath(), Matchers.equalTo("path")); MatcherAssert.assertThat(protocol.getContextpath(), Matchers.equalTo("path")); } @Test public void testThreads() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setThreads(10); MatcherAssert.assertThat(protocol.getThreads(), Matchers.is(10)); } @Test public void testIothreads() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setIothreads(10); MatcherAssert.assertThat(protocol.getIothreads(), Matchers.is(10)); } @Test public void testQueues() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setQueues(10); MatcherAssert.assertThat(protocol.getQueues(), Matchers.is(10)); } @Test public void testAccepts() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setAccepts(10); MatcherAssert.assertThat(protocol.getAccepts(), Matchers.is(10)); } @Test public void testAccesslog() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setAccesslog("access.log"); MatcherAssert.assertThat(protocol.getAccesslog(), Matchers.equalTo("access.log")); } @Test public void testRegister() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setRegister(true); MatcherAssert.assertThat(protocol.isRegister(), Matchers.is(true)); } @Test public void testParameters() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setParameters(Collections.singletonMap("k1", "v1")); MatcherAssert.assertThat(protocol.getParameters(), Matchers.hasEntry("k1", "v1")); } @Test public void testDefault() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setDefault(true); MatcherAssert.assertThat(protocol.isDefault(), Matchers.is(true)); } @Test public void testKeepAlive() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setKeepAlive(true); MatcherAssert.assertThat(protocol.getKeepAlive(), Matchers.is(true)); } @Test public void testOptimizer() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setOptimizer("optimizer"); MatcherAssert.assertThat(protocol.getOptimizer(), Matchers.equalTo("optimizer")); } @Test public void testExtension() throws Exception { ProtocolConfig protocol = new ProtocolConfig(); protocol.setExtension("extension"); MatcherAssert.assertThat(protocol.getExtension(), Matchers.equalTo("extension")); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
7fe06a0fde2917f93f37719d59d3b2307d3b06dc
e73bd7bbae7ea4c75681f1fb03ca3e1851811cf2
/entando-components-enterprise/plugins/entando-plugin-jpjasper/src/test/java/org/entando/entando/plugins/jpjasper/apsadmin/TestApsAdminSample.java
998614479e3ca1123022326ebca998a4a13a58ba
[]
no_license
pietrangelo/entando-base-image-4.3.2
b4f3ee6bb98e5b3b651fdddf0803b88c5132af55
d8014859a2c0e8808efb34867e87d3c34764fe2c
refs/heads/master
2021-07-21T12:02:21.780905
2017-11-02T11:13:40
2017-11-02T11:13:40
109,249,644
0
0
null
null
null
null
UTF-8
Java
false
false
824
java
/* * * Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved. * * This file is part of Entando Enterprise Edition software. * You can redistribute it and/or modify it * under the terms of the Entando's EULA * * See the file License for the specific language governing permissions * and limitations under the License * * * * Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved. * */ package org.entando.entando.plugins.jpjasper.apsadmin; public class TestApsAdminSample extends ApsAdminPluginBaseTestCase { @Override protected void setUp() throws Exception { super.setUp(); this.init(); } public void test() { assertTrue(true); } private void init() throws Exception { try { // init services } catch (Exception e) { throw e; } } }
[ "p.masala@entando.com" ]
p.masala@entando.com
06945c31088c540088e39956be553837fceb8013
5b55c12f1e60ea2c0f094bf6e973e9150bbda57f
/cloudbusinessservice_reminder/src/main/java/com/ssitcloud/business/reminder/common/interceptor/GlobalInterceptor.java
0fb4b6336d633bb9e7b6d725395b238a83145b01
[]
no_license
huguodong/Cloud-4
f18a8f471efbb2167e639e407478bf808d1830c2
3facaf5fc3d585c938ecc93e89a6a4a7d35e5bcc
refs/heads/master
2020-03-27T22:59:41.109723
2018-08-24T01:42:39
2018-08-24T01:43:04
147,279,899
0
0
null
2018-09-04T02:54:28
2018-09-04T02:54:28
null
UTF-8
Java
false
false
1,965
java
package com.ssitcloud.business.reminder.common.interceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; /** * 全局拦截器 * * <p> * 2016年3月22日 下午5:33:02 * * @author hjc * */ public class GlobalInterceptor extends HandlerInterceptorAdapter { /** * 在业务处理器处理请求之前被调用 如果返回false 从当前的拦截器往回执行所有拦截器的afterCompletion(),再退出拦截器链 * 如果返回true 执行下一个拦截器,直到所有的拦截器都执行完毕 再执行被拦截的Controller 然后进入拦截器链, * 从最后一个拦截器往回执行所有的postHandle() 接着再从最后一个拦截器往回执行所有的afterCompletion() * * */ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return super.preHandle(request, response, handler); } /** * 在业务处理器处理请求执行完成后,生成视图之前执行的动作 可在modelAndView中加入数据,比如当前时间 */ @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { // TODO Auto-generated method stub super.postHandle(request, response, handler, modelAndView); } /** * 在DispatcherServlet完全处理完请求后被调用,可用于清理资源等 * * 当有拦截器抛出异常时,会从当前拦截器往回执行所有的拦截器的afterCompletion() */ @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { // TODO Auto-generated method stub super.afterCompletion(request, response, handler, ex); } }
[ "chenkun141@163com" ]
chenkun141@163com
ebfee036e93bf56cfdd3ed05aca1dbddc0bab9b7
48c04220862c665d74cc4853bf94f8a8d1987c19
/org.metaborg.meta.nabl2.java/src/main/java/org/metaborg/meta/nabl2/relations/IRelationName.java
b036326572049a19330b05ddb21c62d8270baea7
[ "Apache-2.0" ]
permissive
TimvdLippe/nabl
65cde36e6ce2fa60f333b2c1be6036e0f4a3253e
1234075429be814cf3d02a350335c12928fc47cb
refs/heads/master
2021-01-21T16:35:36.435181
2017-05-19T11:03:38
2017-05-19T11:03:38
91,898,775
0
0
null
2017-05-28T12:21:16
2017-05-20T15:37:53
Java
UTF-8
Java
false
false
140
java
package org.metaborg.meta.nabl2.relations; import java.util.Optional; public interface IRelationName { Optional<String> getName(); }
[ "hendrik@van-antwerpen.net" ]
hendrik@van-antwerpen.net
4a1f32e3a8775cbe315a0955a0412926ef0ad536
66f920169cf196c85b2bcf03c29f899fb19505a2
/reladomo/src/main/java/com/gs/fw/common/mithra/finder/time/TimeEqOperation.java
0e19b46a82214a1e9a756ad106cfc10533513527
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
gcherian/reladomo
9212f0a9f55533da0e4b62c34612514dc600de01
b42dbfcab174249183780c0ac79caac8f8de52a6
refs/heads/master
2021-01-11T23:43:52.449990
2017-01-06T17:19:42
2017-01-06T17:19:42
78,626,735
0
0
Apache-2.0
2019-03-24T16:39:08
2017-01-11T10:09:06
Java
UTF-8
Java
false
false
1,757
java
/* Copyright 2016 Goldman Sachs. 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.gs.fw.common.mithra.finder.time; import com.gs.fw.common.mithra.attribute.TimeAttribute; import com.gs.fw.common.mithra.finder.NonPrimitiveEqOperation; import com.gs.fw.common.mithra.util.Time; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; public class TimeEqOperation extends NonPrimitiveEqOperation implements Externalizable { public TimeEqOperation(TimeAttribute attribute, Time parameter) { super(attribute, parameter); } public TimeEqOperation() { // for externalizable } public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(this.getAttribute()); TimeAttribute timeAttribute = (TimeAttribute) this.getAttribute(); Time.writeToStream(out, (Time)this.getParameterAsObject()); } public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { TimeAttribute attribute = (TimeAttribute) in.readObject(); this.setAttribute(attribute); this.setParameter(Time.readFromStream(in)); } }
[ "mohammad.rezaei@gs.com" ]
mohammad.rezaei@gs.com
d5434cd56667b14d7d4e265721f0aa49f2f134db
36073e09d6a12a275cc85901317159e7fffa909e
/inbloom_secure-data-service/modifiedFiles/28/tests/SmooksExtendedReferenceResolverTest.java
02a981dbc1693953cd3a7b43bba1106c16cf1a0b
[]
no_license
monperrus/bug-fixes-saner16
a867810451ddf45e2aaea7734d6d0c25db12904f
9ce6e057763db3ed048561e954f7aedec43d4f1a
refs/heads/master
2020-03-28T16:00:18.017068
2018-11-14T13:48:57
2018-11-14T13:48:57
148,648,848
3
0
null
null
null
null
UTF-8
Java
false
false
2,719
java
package org.slc.sli.ingestion.referenceresolution; import junit.framework.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * * @author tke * */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "/spring/applicationContext-test.xml" }) public class SmooksExtendedReferenceResolverTest { @Autowired SmooksExtendedReferenceResolver referenceFactory; @Test public void test() { String testXML = "<StudentSectionAssociation>" + "<StudentReference>" + "<StudentIdentity>" + "<StudentUniqueStateId>" + "testing" + "</StudentUniqueStateId>" + "</StudentIdentity>" + "</StudentReference>" + "<SectionReference>" + "<SectionIdentity>" + "<UniqueSectionCode>" + "testing" + "</UniqueSectionCode>" + "</SectionIdentity>" + "</SectionReference>" + "</StudentSectionAssociation>"; String resultXML = "<StudentSectionAssociationReference>" + "<StudentSectionAssociationIdentity>" + "<StudentIdentity>" + "<StudentUniqueStateId>" + "testing" + "</StudentUniqueStateId>" + "</StudentIdentity>" + "<SectionIdentity>" + "<UniqueSectionCode>" + "testing" + "</UniqueSectionCode>" + "</SectionIdentity>" + "</StudentSectionAssociationIdentity>" + "</StudentSectionAssociationReference>"; String result = referenceFactory.resolve("InterchangeStudentGrade", "StudentGradebookEntry", "StudentSectionAssociationReference", testXML); result = result.replaceAll("\\n", ""); result = result.replaceAll("\\s+", ""); Assert.assertEquals(resultXML, result); } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
1d608111711a0f788d25d98359da9f9fd25ab4f9
915d1919d34ffb446e4206a29f7f5efe7ea2ff6b
/src/Repl/Repl84OnlineBookMerchants.java
fe0f0c3a6adb19c91ac22a0fed7bd1b4509b63ad
[]
no_license
gkossareva/JavaProgrammingB15Online
cf9c55b17303f74da62be548687e15b2adf11180
5c5b3ce71afdce1322b9121b2b09f4dd63e5b012
refs/heads/master
2021-01-14T04:26:20.838541
2020-02-23T22:05:34
2020-02-23T22:05:34
242,598,460
0
0
null
null
null
null
UTF-8
Java
false
false
1,426
java
package Repl; import java.util.*; public class Repl84OnlineBookMerchants { public static void main(String[] args) { //Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books // with every purchase of 8 or more books. It offers regular customers 1 free book with every purchase of 7 or more books, // and offers 2 free books with every purchase of 12 or more books. // Write a program that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer // and the int variable nbooksPurchased. Print amount of freeBooks into the console. int freeBooks = 0; Scanner scan = new Scanner(System.in); System.out.println("Are you premium?"); boolean isPremiumCustomer = scan.nextBoolean(); System.out.println("How many purchased books?"); int nbooksPurchased = scan.nextInt(); if(isPremiumCustomer){ if(nbooksPurchased>=8){ freeBooks+=2; } else if(nbooksPurchased>=5){ freeBooks+=1; } } else{ if(nbooksPurchased>=12){ freeBooks+=2; } else if(nbooksPurchased>=7){ freeBooks+=1; } } System.out.println(freeBooks); } }
[ "taccolinka@gmail.com" ]
taccolinka@gmail.com
d402b0c5322ec6289c4251f92eba4eda32d50a1c
93b73a6500e58314e8a15e80e7490518593057bc
/OOPS-JAVA/day12Assignment/src/com/core/app/Book.java
01be00dc52daca39031d7366462a365056ebd06d
[]
no_license
MadhuriTeli/Assignments
45bc800db5fe6f4c82c05fa4f7307d27286fa7cc
85cca67dfea60f6b21c6bc4c36d53eef6e934978
refs/heads/main
2023-08-18T18:02:36.322485
2021-10-04T20:22:31
2021-10-04T20:22:31
372,739,870
0
0
null
null
null
null
UTF-8
Java
false
false
1,884
java
package com.core.app; import java.text.SimpleDateFormat; import java.util.Date; public class Book implements Comparable<Book> { private int issueBookNo; private String name; private String author; private double price; private BookCategory category; private int quantity; private Date publishDate; public static SimpleDateFormat sdf; static { sdf = new SimpleDateFormat("dd-MM-yyyy"); } public Book(int issueBookNo, String name, String author, Double price, BookCategory category, int quantity, Date publishDate) { this.issueBookNo = issueBookNo; this.name = name; this.author = author; this.price = price; this.category = category; this.quantity = quantity; this.publishDate = publishDate; } public Book(int issueBookNo) { this.issueBookNo = issueBookNo; } @Override public String toString() { return "Book Issue Number="+issueBookNo+", Name="+name+", Author="+author+", Price="+price+ ", Category="+category+", Quantity="+quantity+", Publish Date="+sdf.format(publishDate); } @Override public boolean equals(Object o) { System.out.println("in Book equals"); if(o instanceof Book) return this.issueBookNo==((Book)o).issueBookNo; return false; } @Override // b1.compareTo(b2) // -1 0 1 public int compareTo(Book o) { System.out.println("in compareTo"); //sorting criteria : book issue numb if(this.issueBookNo < o.getIssueBookNo()) return -1; if(this.issueBookNo == o.getIssueBookNo()) return 0; return 1; } public int getIssueBookNo() { return issueBookNo; } public void setIssueBookNo(int issueBookNo) { this.issueBookNo = issueBookNo; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } }
[ "madhuriteli07@gmail.com" ]
madhuriteli07@gmail.com
6fb615ece346390f639088dee6e3be51e03cba7a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_bd2d2b6414477c70499feb9204e81bbd0cb801d9/HelloServlet/2_bd2d2b6414477c70499feb9204e81bbd0cb801d9_HelloServlet_t.java
be50422423ba90922d643ad5c0b03367ac2f7e2e
[]
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,448
java
package servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.net.URI; import java.net.URISyntaxException; import java.sql.*; // @WebServlet( // name = "HelloServlet", // urlPatterns = {"/hello"} // ) public class HelloServlet extends HttpServlet { // Database Connection private static Connection getConnection() throws URISyntaxException, SQLException { URI dbUri = new URI(System.getenv("DATABASE_URL")); String username = dbUri.getUserInfo().split(":")[0]; String password = dbUri.getUserInfo().split(":")[1]; String dbUrl = "jdbc:postgresql://" + dbUri.getHost() + dbUri.getPath(); return DriverManager.getConnection(dbUrl, username, password); } @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // response.getWriter().print("Hello from Java!\n"); try { Connection connection = getConnection(); Statement stmt = connection.createStatement(); stmt.executeUpdate("DROP TABLE IF EXISTS ticks"); stmt.executeUpdate("CREATE TABLE ticks (tick timestamp)"); stmt.executeUpdate("INSERT INTO ticks VALUES (now())"); ResultSet rs = stmt.executeQuery("SELECT tick FROM ticks"); while (rs.next()) { request.setAttribute("test_var", rs.getTimestamp("tick")); } } catch (SQLException e) { response.getWriter().print("SQLException: " + e.getMessage()); } catch (URISyntaxException e) { response.getWriter().print("URISyntaxException: " + e.getMessage()); } request.getRequestDispatcher("/hello.jsp").forward(request, response); } } /* import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.*; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.*; import java.net.URI; import java.net.URISyntaxException; import java.sql.*; public class HelloWorld extends HttpServlet { // Database Connection private static Connection getConnection() throws URISyntaxException, SQLException { URI dbUri = new URI(System.getenv("DATABASE_URL")); String username = dbUri.getUserInfo().split(":")[0]; String password = dbUri.getUserInfo().split(":")[1]; String dbUrl = "jdbc:postgresql://" + dbUri.getHost() + dbUri.getPath(); return DriverManager.getConnection(dbUrl, username, password); } @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // response.getWriter().print("Hello from Java!\n"); try { Connection connection = getConnection(); Statement stmt = connection.createStatement(); stmt.executeUpdate("DROP TABLE IF EXISTS ticks"); stmt.executeUpdate("CREATE TABLE ticks (tick timestamp)"); stmt.executeUpdate("INSERT INTO ticks VALUES (now())"); ResultSet rs = stmt.executeQuery("SELECT tick FROM ticks"); while (rs.next()) { // response.getWriter().print("Read from DB: " + rs.getTimestamp("tick")); } } catch (SQLException e) { response.getWriter().print("SQLException: " + e.getMessage()); } catch (URISyntaxException e) { response.getWriter().print("URISyntaxException: " + e.getMessage()); } request.getRequestDispatcher("/index.jsp").forward(request, response); } public static void main(String[] args) throws Exception{ Server server = new Server(Integer.valueOf(System.getenv("PORT"))); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); server.setHandler(context); context.addServlet(new ServletHolder(new HelloWorld()),"/*"); server.start(); server.join(); } } */
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c0df756d7cec547eea2a49bcfb8b3934d37e1d93
5430a67c140b216c40db287992c182b8d6aecc59
/app/src/main/java/it/angelic/noobpoolstats/EthereumFormatWatcher.java
317b10a4fd6540979d54d3ef04652b8621c7d1a4
[]
no_license
shineangelic/NoobPoolStats
8ab01a96185055a3ee5eb0f83c0e6d84f4e4023d
35c81476856713dbd6f0fc6e24c5745c32c8a453
refs/heads/master
2021-05-16T05:55:24.359717
2017-12-10T02:07:44
2017-12-10T02:07:44
103,303,600
3
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
package it.angelic.noobpoolstats; import android.content.Context; import android.support.v7.preference.Preference; import android.widget.Toast; import it.angelic.noobpoolstats.model.db.NoobPoolDbHelper; /** * Formats the watched EditText to a public ethereum address * * @author shine@angelic.it */ public class EthereumFormatWatcher implements Preference.OnPreferenceChangeListener { private final Context mCtx; public EthereumFormatWatcher(Context activity) { this. mCtx = activity; } @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (isValidEthAddress((String) newValue)) return false; NoobPoolDbHelper db = new NoobPoolDbHelper(mCtx); db.truncateWallets(db.getWritableDatabase()); db.close(); return true; } private boolean isValidEthAddress(String newValue) { if (!newValue.startsWith("0x")) { Toast.makeText(mCtx,"Public addresses start with 0x", Toast.LENGTH_SHORT).show(); return true; } //boolean isNumeric = ((String)newValue).matches("\\p{XDigit}+"); boolean isHex = newValue.matches("^[0-9a-fA-Fx]+$"); if(!isHex){ Toast.makeText(mCtx,"Invalid Ethereum address format, not an Hex", Toast.LENGTH_SHORT).show(); return true; } //https://www.reddit.com/r/ethereum/comments/6l3da1/how_long_are_ethereum_addresses/ if (newValue.length() != 42){ Toast.makeText(mCtx,"Invalid Ethereum address format, invalid length", Toast.LENGTH_SHORT).show(); return true; } return false; } }
[ "shineangelic@gmail.com" ]
shineangelic@gmail.com
ae85e929c3e58d525813b22cb3077c75fa488730
932995d1fec04fe3c0190d2bc239d1cc6ca0e970
/src/test/java/hu/nive/ujratervezes/kepesitovizsga/phonebook/PhonebookTest.java
703c6305f0846381e75daff76d5e52ac2dcf5235
[]
no_license
kincza1971/kepesitovizsga
ce5fa858f7f115f62218c651c7bcbf4b21201854
01d40583d673fdcc94349bd078a408197f18927b
refs/heads/master
2023-04-11T20:15:13.435145
2021-05-04T11:15:02
2021-05-04T11:15:02
362,741,896
0
0
null
null
null
null
UTF-8
Java
false
false
2,594
java
package hu.nive.ujratervezes.kepesitovizsga.phonebook; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.TreeMap; import static org.junit.jupiter.api.Assertions.*; class PhonebookTest { private Phonebook phonebook; @BeforeEach void init() { phonebook = new Phonebook(); } @Test void test_nullPhonebook() { String outputPath = "src/phonebookOutput/output0.txt"; assertThrows(IllegalArgumentException.class, () -> phonebook.exportPhonebook(null, outputPath)); assertFalse(Path.of(outputPath).toFile().exists()); } @Test void test_nullPath() { assertThrows(IllegalArgumentException.class, () -> phonebook.exportPhonebook(new TreeMap<>(), null)); } @Test void test_emptyPhonebook() throws IOException { String actualPath = "src/phonebookOutput/output1.txt"; TreeMap<String, String> contacts = new TreeMap<>(); phonebook.exportPhonebook(contacts, actualPath); assertTrue(Path.of(actualPath).toFile().exists()); List<String> actual = Files.readAllLines(Path.of(actualPath)); assertEquals(List.of(), actual); } @Test void test_singleEntry() throws IOException { String actualPath = "src/phonebookOutput/output2.txt"; TreeMap<String, String> contacts = new TreeMap<>(); contacts.put("John Doe", "1-555-1010"); phonebook.exportPhonebook(contacts, actualPath); List<String> expected = List.of("John Doe: 1-555-1010"); assertTrue(Path.of(actualPath).toFile().exists()); List<String> actual = Files.readAllLines(Path.of(actualPath)); assertEquals(expected, actual); } @Test void test_multipleEntries() throws IOException { String actualPath = "src/phonebookOutput/output3.txt"; TreeMap<String, String> contacts = new TreeMap<>(); contacts.put("Jane Doe", "1-555-1111"); contacts.put("John Doe", "1-555-1010"); contacts.put("John Smith", "1-555-2020"); phonebook.exportPhonebook(contacts, actualPath); Set<String> expected = new HashSet<>(List.of("Jane Doe: 1-555-1111", "John Doe: 1-555-1010", "John Smith: 1-555-2020")); assertTrue(Path.of(actualPath).toFile().exists()); Set<String> actual = new HashSet<>(Files.readAllLines(Path.of(actualPath))); assertEquals(expected, actual); } }
[ "kincza@gmail.com" ]
kincza@gmail.com
fde74d70f195b861ff3a4a04db3758285bf8f137
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/explore/a/aw.java
07a7c65d82c698c85be84c09c795359d0202c1f7
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
187
java
package com.instagram.explore.a; public final class aw {} /* Location: * Qualified Name: com.instagram.explore.a.aw * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
3dc688a9ce9a0501b701516b763e68f9ee4b525c
704507754a9e7f300dfab163e97cd976b677661b
/src/org/w3c/dom/css/Counter.java
f39fae66f4c7a4a436f0dcb8572626a92ee23893
[]
no_license
ossaw/jdk
60e7ca5e9f64541d07933af25c332e806e914d2a
b9d61d6ade341b4340afb535b499c09a8be0cfc8
refs/heads/master
2020-03-27T02:23:14.010857
2019-08-07T06:32:34
2019-08-07T06:32:34
145,785,700
0
0
null
null
null
null
UTF-8
Java
false
false
1,405
java
/* * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright (c) 2000 World Wide Web Consortium, * (Massachusetts Institute of Technology, Institut National de * Recherche en Informatique et en Automatique, Keio University). All * Rights Reserved. This program is distributed under the W3C's Software * Intellectual Property License. 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. */ package org.w3c.dom.css; /** * The <code>Counter</code> interface is used to represent any counter or * counters function value. This interface reflects the values in the underlying * style property. * <p> * See also the * <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document * Object Model (DOM) Level 2 Style Specification</a>. * * @since DOM Level 2 */ public interface Counter { /** * This attribute is used for the identifier of the counter. */ public String getIdentifier(); /** * This attribute is used for the style of the list. */ public String getListStyle(); /** * This attribute is used for the separator of the nested counters. */ public String getSeparator(); }
[ "jianghao7625@gmail.com" ]
jianghao7625@gmail.com
bcc7b255be5c502764d7400ed1a3d5feabc2713b
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
/backend/collecting/dsfj/Java/edited/info.GitInfoContributorTests.java
a1087f9de9621c2dff1642a9b47b974cdfce15b7
[]
no_license
haditabatabaei/webproject
8db7178affaca835b5d66daa7d47c28443b53c3d
86b3f253e894f4368a517711bbfbe257be0259fd
refs/heads/master
2020-04-10T09:26:25.819406
2018-12-08T12:21:52
2018-12-08T12:21:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,445
java
package org.springframework.boot.actuate.info; import java.time.Instant; import java.util.Map; import java.util.Properties; import org.junit.Test; import org.springframework.boot.actuate.info.InfoPropertiesInfoContributor.Mode; import org.springframework.boot.info.GitProperties; import static org.assertj.core.api.Assertions.assertThat; public class GitInfoContributorTests { @Test @SuppressWarnings("unchecked") public void coerceDate() { Properties properties = new Properties(); properties.put("branch", "master"); properties.put("commit.time", "2016-03-04T14:36:33+0100"); GitInfoContributor contributor = new GitInfoContributor( new GitProperties(properties)); Map<String, Object> content = contributor.generateContent(); assertThat(content.get("commit")).isInstanceOf(Map.class); Map<String, Object> commit = (Map<String, Object>) content.get("commit"); Object commitTime = commit.get("time"); assertThat(commitTime).isInstanceOf(Instant.class); assertThat(((Instant) commitTime).toEpochMilli()).isEqualTo(1457098593000L); } @Test @SuppressWarnings("unchecked") public void shortenCommitId() { Properties properties = new Properties(); properties.put("branch", "master"); properties.put("commit.id", "8e29a0b0d423d2665c6ee5171947c101a5c15681"); GitInfoContributor contributor = new GitInfoContributor( new GitProperties(properties)); Map<String, Object> content = contributor.generateContent(); assertThat(content.get("commit")).isInstanceOf(Map.class); Map<String, Object> commit = (Map<String, Object>) content.get("commit"); assertThat(commit.get("id")).isEqualTo("8e29a0b"); } @Test @SuppressWarnings("unchecked") public void withGitIdAndAbbrev() { Properties properties = new Properties(); properties.put("branch", "master"); properties.put("commit.id", "1b3cec34f7ca0a021244452f2cae07a80497a7c7"); properties.put("commit.id.abbrev", "1b3cec3"); GitInfoContributor contributor = new GitInfoContributor( new GitProperties(properties), Mode.FULL); Map<String, Object> content = contributor.generateContent(); Map<String, Object> commit = (Map<String, Object>) content.get("commit"); assertThat(commit.get("id")).isInstanceOf(Map.class); Map<String, Object> id = (Map<String, Object>) commit.get("id"); assertThat(id.get("full")).isEqualTo("1b3cec34f7ca0a021244452f2cae07a80497a7c7"); assertThat(id.get("abbrev")).isEqualTo("1b3cec3"); } }
[ "mahdisadeghzadeh24@gamil.com" ]
mahdisadeghzadeh24@gamil.com
abfbaad5873099379d1370f0f8396598a5003cef
355c41b5bb8706ad1acb282b828ab50f2a58d1a2
/cn/jsprun/filter/EncodingFilter.java
0e740abce23758be822c517d812177d8075d21c4
[]
no_license
goldbo/vcity
d7a424f00939ceafbb4f6d06ebfa608321a75c8a
645f6a5eb429d3974ef4afa4e3f00ab37f6d5643
refs/heads/master
2021-01-22T01:54:36.186223
2012-02-20T09:30:57
2012-02-20T09:30:57
3,134,179
2
0
null
null
null
null
UTF-8
Java
false
false
1,063
java
package cn.jsprun.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import cn.jsprun.utils.Cache; import cn.jsprun.utils.JspRunConfig; public class EncodingFilter implements Filter { public void init(FilterConfig fc) throws ServletException { } public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; request.setCharacterEncoding(JspRunConfig.CHARSET); response.setCharacterEncoding(JspRunConfig.CHARSET); if (JspRunConfig.realPath == null) { JspRunConfig.setRealPath(request); Cache.setHost(request); } chain.doFilter(req, res); } public void destroy() { } }
[ "549668352@qq.com" ]
549668352@qq.com
4e2abbad660c0d9318d2b779e224339a1a7da8f9
ba0c6c122042ca6a5635a9e9f2eab8b3fbb7e5be
/app/src/main/java/com/saiyi/oldmanwatch/mvp/presenter/CreateEnclosurePresenter.java
8923545b7970fa94e7120639d3c9635eaba45e56
[]
no_license
WangZhouA/OldManWatch
b890afeeb6be13b214e03e85949f989d1df6200a
74df1c14ce81f6e6e650f36f6cb73447f1b4e1ad
refs/heads/master
2020-04-29T01:52:16.756760
2019-03-15T04:20:37
2019-03-15T04:20:37
175,744,613
0
0
null
null
null
null
UTF-8
Java
false
false
1,027
java
package com.saiyi.oldmanwatch.mvp.presenter; import com.saiyi.oldmanwatch.base.BasePresenter; import com.saiyi.oldmanwatch.http.BaseResponse; import com.saiyi.oldmanwatch.http.callback.BaseImpl; import com.saiyi.oldmanwatch.http.callback.MyBaseObserver; import com.saiyi.oldmanwatch.mvp.model.CreateEnclosureModel; import com.saiyi.oldmanwatch.mvp.view.CreateEnclosureView; /** * @Author liwenbo * @Date 18/11/9 * @Describe */ public class CreateEnclosurePresenter extends BasePresenter<CreateEnclosureView<BaseResponse>> { public CreateEnclosurePresenter(CreateEnclosureView<BaseResponse> mView) { attachView(mView); } public void addEnclosure(BaseImpl baseImpl) { CreateEnclosureModel.getInstance().addEnclosure(getView().getData(), getView().getToken(), new MyBaseObserver<BaseResponse>(baseImpl, "正在加载...") { @Override protected void onBaseNext(BaseResponse data) { getView().onRequestSuccessData(data); } }); } }
[ "514077686@qq.com" ]
514077686@qq.com
1923693e29b33b5af42d5607cc250c2150c99044
31950cb362860ef75748508d88bbc1b1de505227
/src/main/java/com/spring/my/app/auth/jwt/JwtAccessDeniedHandler.java
ac3877b941f85c91bf4d2e6842bbb321a04477a1
[]
no_license
pikachom/MySpringApp
5e7cc7bd23be4fc59e3622e1ed2563b34abcdbe7
482e63b8a6b5bab5606a2ecdaf6357f5f3782228
refs/heads/main
2023-07-10T12:28:32.919585
2021-07-21T21:13:52
2021-07-21T21:13:52
382,931,899
0
1
null
2021-07-31T21:17:01
2021-07-04T19:22:22
Java
UTF-8
Java
false
false
709
java
package com.spring.my.app.auth.jwt; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.web.access.AccessDeniedHandler; import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @Component public class JwtAccessDeniedHandler implements AccessDeniedHandler { @Override public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException { //필요한 권한이 없이 접근하려 할때 403 response.sendError(HttpServletResponse.SC_FORBIDDEN); } }
[ "you@example.com" ]
you@example.com
4b41bd4561c2789760c49a71d5e5aa1ac3e4f41f
c0b37a664fde6a57ae61c4af635e6dea28d7905e
/Helpful dev stuff/AeriesMobilePortal_v1.2.0_apkpure.com_source_from_JADX/com/google/android/gms/common/util/concurrent/NumberedThreadFactory.java
2e0e650054147d6c0f4d9fc311c67e92dab680b3
[]
no_license
joshkmartinez/Grades
a21ce8ede1371b9a7af11c4011e965f603c43291
53760e47f808780d06c4fbc2f74028a2db8e2942
refs/heads/master
2023-01-30T13:23:07.129566
2020-12-07T18:20:46
2020-12-07T18:20:46
131,549,535
0
0
null
null
null
null
UTF-8
Java
false
false
1,354
java
package com.google.android.gms.common.util.concurrent; import com.google.android.gms.common.internal.Preconditions; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; public class NumberedThreadFactory implements ThreadFactory { private final int priority; private final ThreadFactory zzaau; private final String zzaav; private final AtomicInteger zzaaw; public NumberedThreadFactory(String str) { this(str, 0); } public NumberedThreadFactory(String str, int i) { this.zzaaw = new AtomicInteger(); this.zzaau = Executors.defaultThreadFactory(); this.zzaav = (String) Preconditions.checkNotNull(str, "Name must not be null"); this.priority = i; } public Thread newThread(Runnable runnable) { Thread newThread = this.zzaau.newThread(new zza(runnable, this.priority)); String str = this.zzaav; int andIncrement = this.zzaaw.getAndIncrement(); StringBuilder stringBuilder = new StringBuilder(13 + String.valueOf(str).length()); stringBuilder.append(str); stringBuilder.append("["); stringBuilder.append(andIncrement); stringBuilder.append("]"); newThread.setName(stringBuilder.toString()); return newThread; } }
[ "joshkmartinez@gmail.com" ]
joshkmartinez@gmail.com
818a1baaed85ba80832c34ac330dbe2937a44b3b
d15f0d388d41e00f146e6c0d5c55e2282ada2af4
/LIgnorance/src/main/java/com/livelearn/ignorance/http/HttpResultFuncCache.java
bf9adcb44c542d0fbd0a9680ee9f2a6c0f8167dc
[]
no_license
FPhoenixCorneaE/Ignorance
0ed600d128918c01590c4e236939e185a9d05bce
8737327768d1ab9e5010f6ecca0f3347bae7cbdd
refs/heads/master
2021-08-07T22:35:50.683896
2021-06-16T03:45:01
2021-06-16T03:45:01
95,649,709
2
1
null
null
null
null
UTF-8
Java
false
false
308
java
package com.livelearn.ignorance.http; import io.rx_cache.Reply; import rx.functions.Func1; /** * 用来统一处理RxCacha的结果 */ public class HttpResultFuncCache<T> implements Func1<Reply<T>, T> { @Override public T call(Reply<T> httpResult) { return httpResult.getData(); } }
[ "wangkz@digi123.cn" ]
wangkz@digi123.cn
ff3de22c2f3aeb1a5916d848fe4b48ebe16af713
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/platform/bootstrap/gensrc/de/hybris/platform/core/model/web/package-info.java
cdf8d37e8242b0b907833378edd8e12e20824fa1
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
516
java
/* * * [y] hybris Platform * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ /** * Contains generated models for each type of de.hybris.platform.jalo.web package. */ package de.hybris.platform.core.model.web;
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
7ae6165688c8145d4646d18a4fe33462e11f4658
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_be6aaa157f66a1761169b4205c696fdf1be2df10/FsTranslog/26_be6aaa157f66a1761169b4205c696fdf1be2df10_FsTranslog_t.java
106232721169f66369bef1b0e0baa2cc2620d697
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,882
java
/* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search 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.elasticsearch.index.translog.fs; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.io.FastByteArrayOutputStream; import org.elasticsearch.common.io.stream.OutputStreamStreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.env.NodeEnvironment; import org.elasticsearch.index.settings.IndexSettings; import org.elasticsearch.index.shard.AbstractIndexShardComponent; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.translog.Translog; import org.elasticsearch.index.translog.TranslogException; import org.elasticsearch.index.translog.TranslogStreams; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.ref.SoftReference; import java.util.concurrent.atomic.AtomicInteger; /** * @author kimchy (shay.banon) */ public class FsTranslog extends AbstractIndexShardComponent implements Translog { private final File location; private final Object mutex = new Object(); private volatile long id; private final AtomicInteger operationCounter = new AtomicInteger(); private RafReference raf; private volatile SoftReference<FastByteArrayOutputStream> cachedBos = new SoftReference<FastByteArrayOutputStream>(new FastByteArrayOutputStream()); @Inject public FsTranslog(ShardId shardId, @IndexSettings Settings indexSettings, NodeEnvironment nodeEnv) { this(shardId, indexSettings, new File(new File(new File(new File(nodeEnv.nodeFile(), "indices"), shardId.index().name()), Integer.toString(shardId.id())), "translog")); } public FsTranslog(ShardId shardId, @IndexSettings Settings indexSettings, File location) { super(shardId, indexSettings); this.location = location; location.mkdirs(); } @Override public long currentId() { return this.id; } @Override public int size() { return operationCounter.get(); } @Override public ByteSizeValue estimateMemorySize() { return new ByteSizeValue(0, ByteSizeUnit.BYTES); } @Override public void newTranslog(long id) throws TranslogException { synchronized (mutex) { operationCounter.set(0); this.id = id; if (raf != null) { raf.decreaseRefCount(); } try { raf = new RafReference(new File(location, "translog-" + id)); } catch (FileNotFoundException e) { raf = null; throw new TranslogException(shardId, "translog not found", e); } } } @Override public void add(Operation operation) throws TranslogException { synchronized (mutex) { FastByteArrayOutputStream bos = cachedBos.get(); if (bos == null) { bos = new FastByteArrayOutputStream(); cachedBos = new SoftReference<FastByteArrayOutputStream>(bos); } try { bos.reset(); OutputStreamStreamOutput bosOs = new OutputStreamStreamOutput(bos); TranslogStreams.writeTranslogOperation(bosOs, operation); bosOs.flush(); raf.raf().writeInt(bos.size()); raf.raf().write(bos.unsafeByteArray(), 0, bos.size()); operationCounter.incrementAndGet(); } catch (Exception e) { throw new TranslogException(shardId, "Failed to write operation [" + operation + "]", e); } } } @Override public Snapshot snapshot() throws TranslogException { synchronized (mutex) { try { raf.increaseRefCount(); return new FsSnapshot(shardId, this.id, raf, raf.raf().getFilePointer()); } catch (IOException e) { throw new TranslogException(shardId, "Failed to snapshot", e); } } } @Override public Snapshot snapshot(Snapshot snapshot) { synchronized (mutex) { if (currentId() != snapshot.translogId()) { return snapshot(); } try { FsSnapshot fsSnapshot = (FsSnapshot) snapshot; raf.increaseRefCount(); FsSnapshot newSnapshot = new FsSnapshot(shardId, id, raf, raf.raf().getFilePointer()); newSnapshot.seekForward(fsSnapshot.position()); return newSnapshot; } catch (IOException e) { throw new TranslogException(shardId, "Failed to snapshot", e); } } } @Override public void close() { synchronized (mutex) { if (raf != null) { raf.decreaseRefCount(); raf = null; } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2f060046fe2a71c527c81087ecc7791429155026
2c42d04cba77776514bc15407cd02f6e9110b554
/src/org/processmining/analysis/logclustering/profiles/NonNumericProfile.java
36b2cbfab56282b4d40a3f400bfdbd711eb654f1
[]
no_license
pinkpaint/BPMNCheckingSoundness
7a459b55283a0db39170c8449e1d262e7be21e11
48cc952d389ab17fc6407a956006bf2e05fac753
refs/heads/master
2021-01-10T06:17:58.632082
2015-06-22T14:58:16
2015-06-22T14:58:16
36,382,761
0
1
null
2015-06-14T10:15:32
2015-05-27T17:11:29
null
UTF-8
Java
false
false
318
java
package org.processmining.analysis.logclustering.profiles; /** * dummy * @author not attributable * @version 1.0 */ public class NonNumericProfile extends Profile { /** * dummy */ protected NonNumericProfile(String aName, String aDescription, int traceSize) { super(aName, aDescription, traceSize); } }
[ "pinkpaint.ict@gmail.com" ]
pinkpaint.ict@gmail.com
5b1528f550f2a6d708ab5d0087ed94a4c4b824a0
67ed109e86416b1448247371c51fef5893115f7d
/pwdgen2/evilcorp/com.evilcorp.pwdgen_source_from_JADX/sources/mono/android/text/TextWatcherImplementor.java
ce9fdf3e32c752a35eda088cb9b0bfe3c57c04c5
[]
no_license
Hong5489/FSEC2020
cc9fde303e7dced5a1defa121ddc29b88b95ab0d
9063d2266adf688e1792ea78b3f1b61cd28ece89
refs/heads/master
2022-12-01T15:17:21.314765
2020-08-16T15:35:49
2020-08-16T15:35:49
287,962,248
1
0
null
null
null
null
UTF-8
Java
false
false
2,383
java
package mono.android.text; import android.text.Editable; import android.text.NoCopySpan; import android.text.TextWatcher; import java.util.ArrayList; import mono.android.IGCUserPeer; import mono.android.Runtime; import mono.android.TypeManager; public class TextWatcherImplementor implements IGCUserPeer, TextWatcher, NoCopySpan { public static final String __md_methods = "n_afterTextChanged:(Landroid/text/Editable;)V:GetAfterTextChanged_Landroid_text_Editable_Handler:Android.Text.ITextWatcherInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\nn_beforeTextChanged:(Ljava/lang/CharSequence;III)V:GetBeforeTextChanged_Ljava_lang_CharSequence_IIIHandler:Android.Text.ITextWatcherInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\nn_onTextChanged:(Ljava/lang/CharSequence;III)V:GetOnTextChanged_Ljava_lang_CharSequence_IIIHandler:Android.Text.ITextWatcherInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\n"; private ArrayList refList; private native void n_afterTextChanged(Editable editable); private native void n_beforeTextChanged(CharSequence charSequence, int i, int i2, int i3); private native void n_onTextChanged(CharSequence charSequence, int i, int i2, int i3); static { Runtime.register("Android.Text.TextWatcherImplementor, Mono.Android", TextWatcherImplementor.class, __md_methods); } public TextWatcherImplementor() { if (getClass() == TextWatcherImplementor.class) { TypeManager.Activate("Android.Text.TextWatcherImplementor, Mono.Android", "", this, new Object[0]); } } public void afterTextChanged(Editable editable) { n_afterTextChanged(editable); } public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { n_beforeTextChanged(charSequence, i, i2, i3); } public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { n_onTextChanged(charSequence, i, i2, i3); } public void monodroidAddReference(Object obj) { if (this.refList == null) { this.refList = new ArrayList(); } this.refList.add(obj); } public void monodroidClearReferences() { ArrayList arrayList = this.refList; if (arrayList != null) { arrayList.clear(); } } }
[ "hongwei5489@gmail.com" ]
hongwei5489@gmail.com
4d7c9d2bfb19a860755d314f1717589268db3092
071a60e4409032b0a495bb20f7ea75bf064372b7
/src/com/ashish/easydb/utils/MetaDataTest.java
2138df762118fce6f128531b08cf6330fae27da0
[]
no_license
ashgit1/EasyDb
93123ce2d533cc797670e59a0f604d6a58c41797
e2f2cabf1f7cc01b89bd87fb67397f4bbb2ab41c
refs/heads/master
2020-12-24T08:47:10.471823
2016-12-22T15:47:42
2016-12-22T15:47:42
73,322,451
1
1
null
2016-12-14T09:32:10
2016-11-09T21:24:45
Java
UTF-8
Java
false
false
1,373
java
package com.ashish.easydb.utils; import java.sql.*; public class MetaDataTest { public static void main(String[] args) { try{ // Mysql /*Class.forName("com.mysql.jdbc.Driver"); Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/mb", "root", "Root@123");*/ // Derby Class.forName("org.apache.derby.jdbc.ClientDriver"); Connection con=DriverManager.getConnection("jdbc:derby://localhost:1527/testdb", "sa", "sa@123"); // Oracle /*Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","oracle");*/ DatabaseMetaData dbmd=con.getMetaData(); String table[] = {"TABLE"}; System.out.println("Driver Name: "+dbmd.getDriverName()); System.out.println("Driver Version: "+dbmd.getDriverVersion()); System.out.println("UserName: "+dbmd.getUserName()); System.out.println("Database Product Name: "+dbmd.getDatabaseProductName()); System.out.println("Database Product Version: "+dbmd.getDatabaseProductVersion()); System.out.println("Tables in Database: "); ResultSet rs = dbmd.getTables(null, null, null, table); while(rs.next()){ System.out.println(rs.getString(3)); } con.close(); }catch(Exception e){ System.out.println(e);} } }
[ "adoreashish@gmail.com" ]
adoreashish@gmail.com
1916bdddcc5b6f9604fc2dbdae6d573b7b628621
f45c2611ebecaa7458bf453deb04392f4f9d591f
/lib/HTMLUnit/htmlunit-2.26-src/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElementTest.java
f3f356562f0562f73bdcc08bd07df17b495420d6
[ "Apache-2.0" ]
permissive
abdallah-95/Arabic-News-Reader-Server
92dc9db0323df0d5694b6c97febd1d04947c740d
ef986c40bc7ccff261e4c1c028ae423573ee4a74
refs/heads/master
2021-05-12T05:08:23.710984
2018-01-15T01:46:25
2018-01-15T01:46:25
117,183,791
0
0
null
null
null
null
UTF-8
Java
false
false
5,518
java
/* * Copyright (c) 2002-2017 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.javascript.host.html; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.MockWebConnection; import com.gargoylesoftware.htmlunit.SimpleWebTestCase; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.FrameWindow; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlInlineFrame; import com.gargoylesoftware.htmlunit.html.HtmlPage; /** * Tests for {@link HTMLIFrameElement}. * * @author Marc Guillemot * @author Ahmed Ashour * @author Daniel Gredler * @author Ronald Brill * @author Frank Danek */ @RunWith(BrowserRunner.class) public class HTMLIFrameElementTest extends SimpleWebTestCase { /** * @throws Exception if the test fails */ @Test public void setSrcAttribute() throws Exception { final String firstContent = "<html><head><title>First</title><script>\n" + " function test() {\n" + " document.getElementById('iframe1').setAttribute('src', '" + URL_SECOND + "');\n" + " }\n" + "</script></head>\n" + "<body onload='test()'>\n" + "<iframe id='iframe1'>\n" + "</body></html>"; final String secondContent = "<html><head><title>Second</title></head><body></body></html>"; final String thirdContent = "<html><head><title>Third</title></head><body></body></html>"; final WebClient client = getWebClient(); final MockWebConnection webConnection = getMockWebConnection(); webConnection.setResponse(URL_FIRST, firstContent); webConnection.setResponse(URL_SECOND, secondContent); webConnection.setResponse(URL_THIRD, thirdContent); client.setWebConnection(webConnection); final HtmlPage page = client.getPage(URL_FIRST); assertEquals("First", page.getTitleText()); final HtmlInlineFrame iframe = page.getHtmlElementById("iframe1"); assertEquals(URL_SECOND.toExternalForm(), iframe.getSrcAttribute()); assertEquals("Second", ((HtmlPage) iframe.getEnclosedPage()).getTitleText()); iframe.setSrcAttribute(URL_THIRD.toExternalForm()); assertEquals(URL_THIRD.toExternalForm(), iframe.getSrcAttribute()); assertEquals("Third", ((HtmlPage) iframe.getEnclosedPage()).getTitleText()); } /** * Verify that an iframe.src with a "javascript:..." URL loaded by a client with JavaScript * disabled does not cause a NullPointerException (reported on the mailing list). * @throws Exception if an error occurs */ @Test public void srcJavaScriptUrl_JavaScriptDisabled() throws Exception { final String html = "<html><body><iframe src='javascript:false;'></iframe></body></html>"; final WebClient client = getWebClient(); client.getOptions().setJavaScriptEnabled(false); final MockWebConnection conn = getMockWebConnection(); conn.setDefaultResponse(html); client.setWebConnection(conn); client.getPage(URL_FIRST); } /** * @throws Exception if the test fails */ @Test public void removeFrameWindow() throws Exception { final String index = "<html><head></head><body>\n" + "<div id='content'>\n" + " <iframe name='content' src='second/'></iframe>\n" + "</div>\n" + "<button id='clickId' " + "onClick=\"document.getElementById('content').innerHTML = 'new content';\">Item</button>\n" + "</body></html>"; final String frame1 = "<html><head></head><body>\n" + "<p>frame content</p>\n" + "</body></html>"; final WebClient webClient = getWebClient(); final MockWebConnection webConnection = getMockWebConnection(); webConnection.setResponse(URL_SECOND, frame1); webClient.setWebConnection(webConnection); final HtmlPage page = loadPage(index); assertEquals("frame content", page.getElementById("content").asText()); // check frame on page List<FrameWindow> frames = page.getFrames(); assertEquals(1, frames.size()); assertEquals("frame content", ((HtmlPage) page.getFrameByName("content").getEnclosedPage()).asText()); // replace frame tag with javascript ((HtmlElement) page.getElementById("clickId")).click(); assertEquals("new content", page.getElementById("content").asText()); // frame has to be gone frames = page.getFrames(); assertTrue(frames.isEmpty()); } }
[ "abdallah.x95@gmail.com" ]
abdallah.x95@gmail.com
efde1db0ad944151e385a8ecd6574939f7aa85f7
6424da9b4666eb1be27ac73766d5e360a4255cea
/HaoZhongCai/src/com/haozan/caipiao/types/ShengFuBetHistoryDetailItemData.java
814ce77591470eef8d596845f5725521fd7f67f1
[]
no_license
liveqmock/HZC
7ec28ad5966fc0960497dc19490518621ac3951e
57fac851f05133b490eca0deb53b40ef904a5ae9
refs/heads/master
2020-12-26T04:55:19.210929
2014-07-31T06:18:00
2014-07-31T06:18:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,137
java
package com.haozan.caipiao.types; public class ShengFuBetHistoryDetailItemData { private String game_id; private String term; private String match_id; private String match_name; private String home_team; private String guest_team; private String sellout_time; private String remark; //赔率 private String sp1; String sp2; String result; public String getGame_id() { return game_id; } public void setGame_id(String game_id) { this.game_id = game_id; } public String getTerm() { return term; } public void setTerm(String term) { this.term = term; } public String getMatch_id() { return match_id; } public void setMatch_id(String match_id) { this.match_id = match_id; } public String getMatch_name() { return match_name; } public void setMatch_name(String match_name) { this.match_name = match_name; } public String getHome_team() { return home_team; } public void setHome_team(String home_team) { this.home_team = home_team; } public String getGuest_team() { return guest_team; } public void setGuest_team(String guest_team) { this.guest_team = guest_team; } public String getSellout_time() { return sellout_time; } public void setSellout_time(String sellout_time) { this.sellout_time = sellout_time; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getSp1() { return sp1; } public void setSp1(String sp1) { this.sp1 = sp1; } public String getSp2() { return sp2; } public void setSp2(String sp2) { this.sp2 = sp2; } public String getResult() { return result; } public void setResult(String result) { this.result = result; } public String getGuset() { return guset; } public void setGuset(String guset) { this.guset = guset; } public String[] getSetScore() { return setScore; } public void setSetScore(String[] setScore) { this.setScore = setScore; } public String[] getBetResultGG() { return betResultGG; } public void setBetResultGG(String[] betResultGG) { this.betResultGG = betResultGG; } private String betTerm = ""; private String master= ""; private String guset= ""; private String gameResult= ""; private int concedePoints=-1; private String betResultWin= ""; private String betResultEqual= ""; private String betResultLost= ""; private String halfMatchScore=""; private String fullMatchScore=""; private int splitNum; private String betGoal; private String[] letScore; private String[] setScore; private String[] betResultGG; public void setBetTerm(String betTerm) { this.betTerm = betTerm; } public String getBetTerm() { return betTerm; } public void setMaster(String master) { this.master = master; } public String getMaster() { return master; } public void setGuest(String guset) { this.guset = guset; } public String getGuest() { return guset; } public void setGameResult(String gameResult) { this.gameResult = gameResult; } public String getGameResult() { return gameResult; } public void setConcedePoints(int concedePoints) { this.concedePoints = concedePoints; } public int getConcedePoints() { return concedePoints; } public void setBetResultWin(String betResultWin) { this.betResultWin = betResultWin; } public String getBetResultWin() { return betResultWin; } public void setBetResultEqual(String betResultEqual) { this.betResultEqual = betResultEqual; } public String getBetResultEqual() { return betResultEqual; } public void setBetResultLost(String betResultLost) { this.betResultLost = betResultLost; } public String getBetResultLost() { return betResultLost; } public void setHalfMatchScore(String halfMatchScore) { this.halfMatchScore = halfMatchScore; } public String getHalfMatchScore() { return halfMatchScore; } public void setFullMatchScore(String fullMatchScore) { this.fullMatchScore = fullMatchScore; } public String getFullMatchScore() { return fullMatchScore; } public void setSplitNum(int splitNum) { this.splitNum = splitNum; } public int getSplitNum() { return splitNum; } public void setBetGoal(String betGoal) { this.betGoal = betGoal; } public String getBetGoal() { return betGoal; } public void setLetScore(String[] letScore) { this.letScore = letScore; } public String[] getLetScore() { return letScore; } public void setScore(String[] setScore) { this.setScore = setScore; } public String[] getScore() { return setScore; } public void setResultGG(String[] betResultGG) { this.betResultGG = betResultGG; } public String[] getResultGG() { return betResultGG; } }
[ "1281110961@qq.com" ]
1281110961@qq.com
bed75083180dbba6bdb1c1334ad7a49b97b9269f
1630d71d9056506193393d3ca6b7bf5daa769574
/src/com/googlecode/mp4parser/boxes/mp4/samplegrouping/UnknownEntry.java
8ad7ce14771bfbbe3b010e7b65cd1aba521d76e4
[]
no_license
Denis-chen/gallerygoogle.apk.decode
1f834635242eca6bf4d3980c12e732e7da80cf7f
ba3774f237dc4a830d558a45b7ee9f71d999a1b5
refs/heads/master
2020-04-06T06:50:26.529081
2013-09-13T05:12:04
2013-09-13T05:12:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,524
java
package com.googlecode.mp4parser.boxes.mp4.samplegrouping; import com.coremedia.iso.Hex; import java.nio.ByteBuffer; public class UnknownEntry extends GroupEntry { private ByteBuffer content; public boolean equals(Object paramObject) { if (this == paramObject); UnknownEntry localUnknownEntry; do { return true; if ((paramObject == null) || (super.getClass() != paramObject.getClass())) return false; localUnknownEntry = (UnknownEntry)paramObject; if (this.content == null) break; } while (this.content.equals(localUnknownEntry.content)); while (true) { return false; if (localUnknownEntry.content == null); } } public ByteBuffer get() { return this.content.duplicate(); } public int hashCode() { if (this.content != null) return this.content.hashCode(); return 0; } public void parse(ByteBuffer paramByteBuffer) { this.content = ((ByteBuffer)paramByteBuffer.duplicate().rewind()); } public String toString() { ByteBuffer localByteBuffer = this.content.duplicate(); localByteBuffer.rewind(); byte[] arrayOfByte = new byte[localByteBuffer.limit()]; localByteBuffer.get(arrayOfByte); return "UnknownEntry{content=" + Hex.encodeHex(arrayOfByte) + '}'; } } /* Location: D:\camera42_patched_v2\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: com.googlecode.mp4parser.boxes.mp4.samplegrouping.UnknownEntry * JD-Core Version: 0.5.4 */
[ "rainius@163.com" ]
rainius@163.com
98dc70954a1ec317b8f66029cecff3d442951e48
8e9e10734775849c1049840727b63de749c06aae
/src/java/com/webify/shared/edi/model/hipaa271/beans/SegmentMSG_1.java
689364064156de6bcb1efaaacbc134b033a1468e
[]
no_license
mperham/edistuff
6ee665082b7561d73cb2aa49e7e4b0142b14eced
ebb03626514d12e375fa593e413f1277a614ab76
refs/heads/master
2023-08-24T00:17:34.286847
2020-05-04T21:31:42
2020-05-04T21:31:42
261,299,559
4
0
null
null
null
null
UTF-8
Java
false
false
1,905
java
package com.webify.shared.edi.model.hipaa271.beans; import com.webify.shared.edi.model.*; import java.io.*; import java.util.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /* * AUTOGENERATED FILE - DO NOT EDIT!!! */ public class SegmentMSG_1 implements EDIElement { private static final Log log = LogFactory.getLog(SegmentMSG_1.class); public static final String SEGMENT_NAME = "MSG"; public static final int FIELD_COUNT = 1; private int lineNumber = 0; public int getLineNumber() { return lineNumber; } /** Do NOT use this method - it is not public by choice... */ public void setLineNumber(int foo) { lineNumber = foo; } private int ordinal = 0; public int getOrdinal() { return ordinal; } void setOrdinal(int ord) { ordinal = ord; } // Fields private String Msg01; public String getMsg01() { return Msg01; } public void setMsg01(String val) { Msg01 = val; } public void parse(EDIInputStream eis) throws IOException { lineNumber = eis.getCurrentSegmentNumber(); if (log.isDebugEnabled()) log.debug("Starting segment MSG on line " + lineNumber); String[] fields = eis.readSegment(SEGMENT_NAME, FIELD_COUNT); Msg01 = eis.getStringValue(fields, 1, 1, 264, true); if (Msg01 == null || "".equals(fields[1].trim())) { eis.addError("Field 'MSG01' missing"); } validate(eis); } protected void validate(EDIInputStream eis) { } public void emit(EDIOutputStream eos) throws IOException { eos.startSegment("MSG"); if (Msg01 == null) { eos.addError("Emitting null mandatory field 'MSG01'"); } eos.writeField(Msg01); eos.writeNullField(); eos.writeNullField(); eos.endSegment(); } public EDIElement createCopy() { SegmentMSG_1 copy = new SegmentMSG_1(); copy.setLineNumber(this.lineNumber); copy.Msg01 = this.Msg01; return copy; } }
[ "mperham@gmail.com" ]
mperham@gmail.com
51ea51b352b68bf0d9bf1e4b4eb3a0721a336559
e3896cf755d5f399464d175c226f8c4b7b5de44b
/src/main/java/constants/assessments/SubMetricConstants.java
c183c13c2a374dec3f1f8aa7f1a4c11a2f6cfa67
[]
no_license
mhsh88/ics
138c5e97616ad625b9bac48ae21e3e2f81c3876d
e9535042a1eb809c8251a9fab4e738d0d4ca688c
refs/heads/master
2020-03-09T14:27:39.285066
2018-04-30T15:38:27
2018-04-30T15:38:27
128,835,019
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package constants.assessments; import com.payAm.core.constant.BaseConstants; /** * Developer: Payam Mostafaei * Creation Time: 2018/Jan/10 - 00:03 */ public interface SubMetricConstants extends BaseConstants { String ENTITY = "subMetric"; String TEXT = "text"; String QUESTION_HAS_SALS = "questionHasSals"; }
[ "hosseinsharifi@hotmail.com" ]
hosseinsharifi@hotmail.com
fb546b5fc597c75fc8e30dc63dfaa2c832e02e4b
6d943c9f546854a99ae27784d582955830993cee
/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v201911/CreativeTemplateServiceInterfacegetCreativeTemplatesByStatementResponse.java
6b639933a4302e47ffdecd48199164a92e2997a4
[ "Apache-2.0" ]
permissive
MinYoungKim1997/googleads-java-lib
02da3d3f1de3edf388a3f2d3669a86fe1087231c
16968056a0c2a9ea1676b378ab7cbfe1395de71b
refs/heads/master
2021-03-25T15:24:24.446692
2020-03-16T06:36:10
2020-03-16T06:36:10
247,628,741
0
0
Apache-2.0
2020-03-16T06:36:35
2020-03-16T06:36:34
null
UTF-8
Java
false
false
2,295
java
// Copyright 2019 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. package com.google.api.ads.admanager.jaxws.v201911; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for getCreativeTemplatesByStatementResponse element declaration. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;element name="getCreativeTemplatesByStatementResponse"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="rval" type="{https://www.google.com/apis/ads/publisher/v201911}CreativeTemplatePage" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "rval" }) @XmlRootElement(name = "getCreativeTemplatesByStatementResponse") public class CreativeTemplateServiceInterfacegetCreativeTemplatesByStatementResponse { protected CreativeTemplatePage rval; /** * Gets the value of the rval property. * * @return * possible object is * {@link CreativeTemplatePage } * */ public CreativeTemplatePage getRval() { return rval; } /** * Sets the value of the rval property. * * @param value * allowed object is * {@link CreativeTemplatePage } * */ public void setRval(CreativeTemplatePage value) { this.rval = value; } }
[ "christopherseeley@users.noreply.github.com" ]
christopherseeley@users.noreply.github.com
2427f700f035b966c0da9f9d2b3a015f08668018
eda98a2f8dda4efca7fa614ccf2e1c8d6853ab82
/src/com/game/render/fbo/psProcess/EscapyPostProcessed.java
38e6f7b5ef5e62f68011cacc5113caec4f1f8792
[ "Apache-2.0" ]
permissive
henryco/Escapy
8acc253c31f79b826594416a431df4233e3c03d1
6c6d65cdae20e9946df76035029b6520c7606e6c
refs/heads/master
2020-05-22T02:49:53.270042
2018-03-06T13:26:53
2018-03-06T13:26:53
63,279,340
11
1
null
null
null
null
UTF-8
Java
false
false
136
java
package com.game.render.fbo.psProcess; /** * The Marker Interface EscapyPostProcessed. */ public interface EscapyPostProcessed { }
[ "hd2files@gmail.com" ]
hd2files@gmail.com
10ead613f171539930de1667f998a8906ef7425f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_2eb04213f2f9b3c5fca0a46429e1e3d79fe6cbc8/TestEventSpoolDispatcherWithMockWriter/27_2eb04213f2f9b3c5fca0a46429e1e3d79fe6cbc8_TestEventSpoolDispatcherWithMockWriter_s.java
d785f7863b52d4212cb0974e62a7285679ae0f0b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,432
java
/* * Copyright 2010-2011 Ning, Inc. * * Ning 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.ning.metrics.collector.hadoop.processing; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.ning.metrics.collector.MockEvent; import com.ning.metrics.collector.binder.config.CollectorConfig; import com.ning.metrics.serialization.event.Event; import com.ning.metrics.serialization.writer.MockEventWriter; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; //@Guice(modules = ConfigTestModule.class) public class TestEventSpoolDispatcherWithMockWriter { @Inject private CollectorConfig collectorConfig; @BeforeClass public void setup() { Guice.createInjector(new ConfigTestModule()).injectMembers(this); } @Test(groups = "slow") public void testShutdown() throws Exception { final WriterStats stats = new WriterStats(); final EventSpoolDispatcher dispatcher = new EventSpoolDispatcher(new MockPersistentWriterFactory(), stats, collectorConfig); final Event eventA = new MockEvent(); Assert.assertTrue(dispatcher.isRunning()); Assert.assertEquals(stats.getIgnoredEvents(), 0); // Send an event and wait for the dequeuer to work dispatcher.offer(eventA); Thread.sleep(100); final LocalQueueAndWriter writer = (LocalQueueAndWriter) dispatcher.getQueuesPerPath().values().toArray()[0]; Assert.assertEquals(stats.getIgnoredEvents(), 0); Assert.assertEquals(stats.getWrittenEvents(), 1); assertWriterQueues(writer, 1, 0, 0, 0); // Shutdown and make sure all queues are empty dispatcher.shutdown(); Assert.assertFalse(dispatcher.isRunning()); Assert.assertEquals(stats.getIgnoredEvents(), 0); Assert.assertEquals(stats.getWrittenEvents(), 1); assertWriterQueues(writer, 0, 0, 0, 1); // Make sure subsequent offers are ignored dispatcher.offer(eventA); Assert.assertEquals(stats.getIgnoredEvents(), 1); Assert.assertEquals(stats.getWrittenEvents(), 1); assertWriterQueues(writer, 0, 0, 0, 1); } @Test(groups = "fast") public void testOffer() throws Exception { final WriterStats stats = new WriterStats(); final EventSpoolDispatcher dispatcher = new EventSpoolDispatcher(new MockPersistentWriterFactory(), stats, collectorConfig); final MockEvent eventA = new MockEvent(); eventA.setOutputPath("/a"); final MockEvent eventB = new MockEvent(); eventB.setOutputPath("/b"); // Generic event will use DEFAULT serialization Assert.assertNull(dispatcher.getQueuesSizes().get("/a|bin")); Assert.assertNull(dispatcher.getQueuesSizes().get("/b|bin")); dispatcher.offer(eventA); Assert.assertNotNull(dispatcher.getQueuesSizes().get("/a|bin")); Assert.assertNull(dispatcher.getQueuesSizes().get("/b|bin")); Assert.assertEquals(dispatcher.getQueuesSizes().keySet().size(), 1); Assert.assertEquals(stats.getEnqueuedEvents(), 1); dispatcher.offer(eventB); Assert.assertNotNull(dispatcher.getQueuesSizes().get("/a|bin")); Assert.assertNotNull(dispatcher.getQueuesSizes().get("/b|bin")); Assert.assertEquals(dispatcher.getQueuesSizes().keySet().size(), 2); Assert.assertEquals(stats.getEnqueuedEvents(), 2); dispatcher.offer(eventA); Assert.assertNotNull(dispatcher.getQueuesSizes().get("/a|bin")); Assert.assertNotNull(dispatcher.getQueuesSizes().get("/b|bin")); Assert.assertEquals(dispatcher.getQueuesSizes().keySet().size(), 2); Assert.assertEquals(stats.getEnqueuedEvents(), 3); } /** * @param writer writer object * @param written number of events written in the current underlying open file * @param committed number of events in the closed file (ready to be flushed) * @param quarantined number of events unable to be committed * @param flushed number of events sent remotely (written to HDFS) */ private void assertWriterQueues(final LocalQueueAndWriter writer, final int written, final int committed, final int quarantined, final int flushed) { final MockEventWriter eventWriter = (MockEventWriter) writer.getEventWriter(); Assert.assertEquals(eventWriter.getWrittenEventList().size(), written); Assert.assertEquals(eventWriter.getCommittedEventList().size(), committed); Assert.assertEquals(eventWriter.getQuarantinedEventList().size(), quarantined); Assert.assertEquals(eventWriter.getFlushedEventList().size(), flushed); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
047f7dbbd02b90c70bc2bca0cdd3eff60c8c2d36
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_a434d60c81365f8c9248805412b10735ab712461/AnalyzeTextOutput/2_a434d60c81365f8c9248805412b10735ab712461_AnalyzeTextOutput_t.java
678179808b4545556d6a1883389a9cfbf3b4e11c
[]
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,329
java
//----------------------------------------------------------------------------- // $Id$ // $Source$ //----------------------------------------------------------------------------- package gui; import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.util.*; import java.util.regex.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import gtp.*; import utils.*; //----------------------------------------------------------------------------- class AnalyzeTextOutput extends JDialog { public AnalyzeTextOutput(Frame owner, String title, String response, boolean highlight) { super(owner, title); setLocationRelativeTo(owner); JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(GuiUtils.createSmallEmptyBorder()); Container contentPane = getContentPane(); contentPane.add(panel, BorderLayout.CENTER); JLabel label = new JLabel(title); panel.add(label, BorderLayout.NORTH); m_textPane = new JTextPane(); StyledDocument doc = m_textPane.getStyledDocument(); try { doc.insertString(0, response, null); } catch (BadLocationException e) { assert(false); } int fontSize = GuiUtils.getDefaultMonoFontSize(); m_textPane.setFont(new Font("Monospaced", Font.PLAIN, fontSize)); JScrollPane scrollPane = new JScrollPane(m_textPane); panel.add(scrollPane, BorderLayout.CENTER); setDefaultCloseOperation(DISPOSE_ON_CLOSE); KeyListener keyListener = new KeyAdapter() { public void keyReleased(KeyEvent e) { int c = e.getKeyCode(); if (c == KeyEvent.VK_ESCAPE) dispose(); } }; m_textPane.addKeyListener(keyListener); if (highlight) doSyntaxHighlight(); m_textPane.setEditable(false); pack(); setVisible(true); } private JTextPane m_textPane; private void doSyntaxHighlight() { StyledDocument doc = m_textPane.getStyledDocument(); StyleContext context = StyleContext.getDefaultStyleContext(); Style def = context.getStyle(StyleContext.DEFAULT_STYLE); Style styleTitle = doc.addStyle("title", def); StyleConstants.setBold(styleTitle, true); Style stylePoint = doc.addStyle("point", def); StyleConstants.setForeground(stylePoint, new Color(0.25f, 0.5f, 0.7f)); Style styleNumber = doc.addStyle("number", def); StyleConstants.setForeground(styleNumber, new Color(0f, 0.54f, 0f)); Style styleConst = doc.addStyle("const", def); StyleConstants.setForeground(styleConst, new Color(0.8f, 0f, 0f)); Style styleColor = doc.addStyle("color", def); StyleConstants.setForeground(styleColor, new Color(0.54f, 0f, 0.54f)); m_textPane.setEditable(true); highlight("number", "\\b-?[0-9]+\\.?+[0-9]*\\b"); highlight("const", "\\b[A-Z_][A-Z_]+[A-Z]\\b"); highlight("color", "\\b([Bb][Ll][Aa][Cc][Kk]|[Ww][Hh][Ii][Tt][Ee])\\b"); highlight("point", "\\b([Pp][Aa][Ss][Ss]|[A-Ta-t](1[0-9]|[1-9]))\\b"); highlight("title", "^\\S+:(\\s|$)"); m_textPane.setEditable(false); } private void highlight(String style, String regex) { StyledDocument doc = m_textPane.getStyledDocument(); Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); try { Matcher matcher = pattern.matcher(doc.getText(0, doc.getLength())); while (matcher.find()) { int start = matcher.start(); int end = matcher.end(); doc.setCharacterAttributes(start, end - start, doc.getStyle(style), true); } } catch (BadLocationException e) { assert(false); } } } //-----------------------------------------------------------------------------
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5da828549fab60773f5f18d02493794ff9f0bac1
4e4279e4c43890d105c7dbe7dc96c3c623c1ec0b
/afiliados-tests/test-aff-prepaid-importer-aqa/src/test/java/uol/test/util/LookupUtil.java
abce423104c0d2fee107c83a6fb6a8a3f49bf36d
[]
no_license
proctiger/automation
d7550988bb9528dab9af08867a22d6c8e295df18
8a2d8169d21ec6ae9a52c89b27164b05a76ce7b6
refs/heads/master
2016-09-15T22:25:05.094858
2013-11-27T13:50:43
2013-11-27T13:50:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,555
java
package uol.test.util; import java.util.Hashtable; import javax.naming.Context; import javax.naming.InitialContext; public class LookupUtil { private Class<?> clazz; private String host; private String port; private String ejbName; public LookupUtil paraClasse(Class<?> clazz) { this.clazz = clazz; return this; } public LookupUtil comNome(String ejbName) { this.ejbName = ejbName; return this; } public LookupUtil paraPorta(String port) { this.port = port; return this; } public LookupUtil paraHost(String host) { this.host = host; return this; } public <T> T lookup() { return makeLookup(); } @SuppressWarnings("unchecked") private <T> T makeLookup() { try { return (T) clazz.cast(getContext(host, port).lookup(ejbName)); } catch (Exception ex) { throw new RuntimeException(String.format("Falha ao recuperar EJB: [%s]", ejbName), ex); } } private Context getContext(String host, String port) throws Exception { Hashtable<String, String> environment = new Hashtable<String, String>(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); environment.put(Context.PROVIDER_URL, "jnp://" + host + ":" + port); return new InitialContext(environment); } }
[ "willians.romera@gmail.com" ]
willians.romera@gmail.com
cb9223451138a766cb85c37bb9dcf353fdcd7822
981df8aa31bf62db3b9b4e34b5833f95ef4bd590
/xworker_explorer/src/test/java/xworker/ide/TestXWorkerCommandLine.java
04e14d97ffb0eea815b3ee63796e1be5978b62c3
[ "Apache-2.0" ]
permissive
x-meta/xworker
638c7cd935f0a55d81f57e330185fbde9dce9319
430fba081a78b5d3871669bf6fcb1e952ad258b2
refs/heads/master
2022-12-22T11:44:10.363983
2021-10-15T00:57:10
2021-10-15T01:00:24
217,432,322
1
0
Apache-2.0
2022-12-12T23:21:16
2019-10-25T02:13:51
Java
UTF-8
Java
false
false
422
java
package xworker.ide; import org.xmeta.Thing; import org.xmeta.World; public class TestXWorkerCommandLine { public static void main(String args[]){ try{ //读取所有的事物,看看内存占用 World world = World.getInstance(); world.init("xworker"); Thing xworker = world.getThing("XWorker"); xworker.doAction("run"); }catch(Exception e){ e.printStackTrace(); } } }
[ "zhangyuxiang@tom.com" ]
zhangyuxiang@tom.com
17ec036f65a0e9d19d0ce957e23fea75a41ed621
bf4cc098ffdd37d73e13f283efc725a6bd90d45b
/jmap-gson/src/main/java/rs/ltt/jmap/gson/deserializer/GenericResponseDeserializer.java
84f8fb34c1e2cbf10f669556adc2e56e3be272a9
[ "Apache-2.0" ]
permissive
hjwhang/jmap
21c13128d21304e3391b7f7ff056f0beb82f693e
a4378f42d066bba653068c77e871949fb0aed18b
refs/heads/master
2023-07-02T03:58:55.061512
2021-08-08T14:08:36
2021-08-08T14:08:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,902
java
/* * Copyright 2019 Daniel Gultsch * 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 rs.ltt.jmap.gson.deserializer; import com.google.gson.*; import rs.ltt.jmap.common.ErrorResponse; import rs.ltt.jmap.common.GenericResponse; import rs.ltt.jmap.common.Response; import java.lang.reflect.Type; public class GenericResponseDeserializer implements JsonDeserializer<GenericResponse> { public static void register(final GsonBuilder builder) { builder.registerTypeAdapter(GenericResponse.class, new GenericResponseDeserializer()); } @Override public GenericResponse deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { if (jsonElement.isJsonObject()) { final JsonObject jsonObject = jsonElement.getAsJsonObject(); if (jsonObject.has("type") && !jsonObject.has("methodResponses")) { return context.deserialize(jsonObject, ErrorResponse.class); } if (jsonObject.has("methodResponses") && !jsonObject.has("type")) { return context.deserialize(jsonObject, Response.class); } throw new JsonParseException("Unable to identify response as neither error nor response"); } else { throw new JsonParseException("unexpected json type when parsing response"); } } }
[ "daniel@gultsch.de" ]
daniel@gultsch.de
c7ea3b4b79e185ba7b19301074dad58b25a20d36
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.0/providers/file/src/java/org/mule/providers/file/FileMessageReceiver.java
0a59f6f29ddf2e8cbadcbd3df15887051c44cd11
[ "LicenseRef-scancode-symphonysoft", "LicenseRef-scancode-unknown-license-reference" ]
permissive
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
6,399
java
/* * $Header$ * $Revision$ * $Date$ * ------------------------------------------------------------------------------------------------------ * * Copyright (c) SymphonySoft Limited. All rights reserved. * http://www.symphonysoft.com * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * */ package org.mule.providers.file; import org.mule.MuleException; import org.mule.config.i18n.Message; import org.mule.config.i18n.Messages; import org.mule.impl.MuleMessage; import org.mule.providers.PollingMessageReceiver; import org.mule.providers.file.filters.FilenameWildcardFilter; import org.mule.umo.UMOComponent; import org.mule.umo.UMOFilter; import org.mule.umo.UMOMessage; import org.mule.umo.endpoint.UMOEndpoint; import org.mule.umo.lifecycle.InitialisationException; import org.mule.umo.provider.UMOConnector; import org.mule.umo.provider.UMOMessageAdapter; import java.io.File; import java.io.FilenameFilter; /** * <code>FileMessageReceiver</code> is a polling listener that reads files from * a directory. * * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> * @version $Revision$ */ public class FileMessageReceiver extends PollingMessageReceiver { private File readDir = null; private File moveDir = null; private String moveToPattern = null; private FilenameFilter filenameFilter = null; public FileMessageReceiver(UMOConnector connector, UMOComponent component, UMOEndpoint endpoint, File readDir, File moveDir, String moveToPattern, Long frequency) throws InitialisationException { super(connector, component, endpoint, frequency); this.readDir = readDir; this.moveDir = moveDir; this.moveToPattern = moveToPattern; if(endpoint.getFilter()!=null) { filenameFilter = (FilenameFilter)endpoint.getFilter(); } else { filenameFilter = new FilenameWildcardFilter("*"); } } public void poll() { try { File[] files = listFiles(); if (files == null) { return; } for (int i = 0; i < files.length; i++) { processFile(files[i]); } } catch (Exception e) { handleException(e); } } public synchronized void processFile(File file) throws MuleException { File destinationFile = null; String orginalFilename = file.getName(); if (moveDir != null) { String fileName = file.getName(); if(moveToPattern!=null) { fileName = ((FileConnector)connector).getFilenameParser().getFilename(null, moveToPattern); } destinationFile = new File(moveDir, fileName); } boolean resultOfFileMoveOperation = false; try { //Perform some quick checks to make sure file can be processed if (!(file.canRead() && file.exists() && file.isFile())) { throw new MuleException(new Message(Messages.FILE_X_DOES_NTO_EXIST, file.getName())); } else { if (destinationFile != null) { resultOfFileMoveOperation = file.renameTo(destinationFile); if (!resultOfFileMoveOperation) { throw new MuleException(new Message("file", 4, file.getAbsolutePath(), destinationFile.getAbsolutePath())); } file = destinationFile; } UMOMessageAdapter msgAdapter = connector.getMessageAdapter(file); msgAdapter.setProperty(FileConnector.PROPERTY_ORIGINAL_FILENAME, orginalFilename); if(((FileConnector)connector).isAutoDelete()) { msgAdapter.getPayloadAsBytes(); //no moveTo directory if (destinationFile == null) { resultOfFileMoveOperation = file.delete(); if (!resultOfFileMoveOperation) { throw new MuleException(new Message("file", 3, file.getAbsolutePath())); } } } UMOMessage message = new MuleMessage(msgAdapter); routeMessage(message, endpoint.isSynchronous()); } } catch (Exception e) { boolean resultOfRollbackFileMove = false; if (resultOfFileMoveOperation) { resultOfRollbackFileMove = rollbackFileMove(destinationFile, file.getAbsolutePath()); } Exception ex = new MuleException(new Message("file", 2, file.getName(), (resultOfRollbackFileMove ? "successful" : "unsuccessful")), e); handleException(ex); } } /** * Exception tolerant roll back method */ private boolean rollbackFileMove(File sourceFile, String destinationFilePath) { boolean result = false; try { result = sourceFile.renameTo(new File(destinationFilePath)); } catch (Throwable t) { logger.debug("rollback of file move failed: " + t.getMessage()); } return result; } /** * Get a list of files to be processed. * * @return a list of files to be processed. * @throws org.mule.MuleException which will wrap any other exceptions or errors. */ File[] listFiles() throws MuleException { File[] todoFiles = new File[0]; try { todoFiles = readDir.listFiles(filenameFilter); } catch (Exception e) { throw new MuleException(new Message("file", 1), e); } return todoFiles; } protected boolean allowFilter(UMOFilter filter) throws UnsupportedOperationException { return filter instanceof FilenameFilter; } }
[ "(no author)@bf997673-6b11-0410-b953-e057580c5b09" ]
(no author)@bf997673-6b11-0410-b953-e057580c5b09
e788546ef98ab6c47c22f0d34c0faf522273430a
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/commons-lang/learning/1040/ReflectionDiffBuilder.java
da8a4a0f20f0db5b038c00a14d33525bc1971692
[]
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
4,573
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.commons.lang3.builder; import static org.apache.commons.lang3.reflect.FieldUtils.readField; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import org.apache.commons.lang3.ClassUtils; import org.apache.commons.lang3.reflect.FieldUtils; /** * <p> * Assists in implementing {@link Diffable#diff(Object)} methods. * </p> * <p> * All non-static, non-transient fields (including inherited fields) * of the objects to diff are discovered using reflection and compared * for differences. * </p> * * <p> * To use this class, write code as follows: * </p> * * <pre> * public class Person implements Diffable&lt;Person&gt; { * String name; * int age; * boolean smoker; * ... * * public DiffResult diff(Person obj) { * // No need for null check, as NullPointerException correct if obj is null * return new ReflectionDiffBuilder(this, obj, ToStringStyle.SHORT_PREFIX_STYLE) * .build(); * } * } * </pre> * * <p> * The {@code ToStringStyle} passed to the constructor is embedded in the * returned {@code DiffResult} and influences the style of the * {@code DiffResult.toString()} method. This style choice can be overridden by * calling {@link DiffResult#toString(ToStringStyle)}. * </p> * @see Diffable * @see Diff * @see DiffResult * @see ToStringStyle * @since 3.6 */ public class ReflectionDiffBuilder implements Builder<DiffResult> { private final Object left; private final Object right; private final DiffBuilder diffBuilder; /** * <p> * Constructs a builder for the specified objects with the specified style. * </p> * * <p> * If {@code lhs == rhs} or {@code lhs.equals(rhs)} then the builder will * not evaluate any calls to {@code append(...)} and will return an empty * {@link DiffResult} when {@link #build()} is executed. * </p> * @param <T> * type of the objects to diff * @param lhs * {@code this} object * @param rhs * the object to diff against * @param style * the style will use when outputting the objects, {@code null} * uses the default * @throws IllegalArgumentException * if {@code lhs} or {@code rhs} is {@code null} */ public <T> ReflectionDiffBuilder(final T lhs, final T rhs, final ToStringStyle style) { this.left = lhs; this.right = rhs; diffBuilder = new DiffBuilder(lhs, rhs, style); } @Override public DiffResult build() { if (left.equals(right)) { return diffBuilder.build(); } appendFields(left.getClass()); return diffBuilder.build(); } private void appendFields(final Class< ?> clazz) { for (final Field field : FieldUtils.getAllFields(clazz)) { if (accept(field)) { try { diffBuilder.append(field.getName(), readField(field, left, true), readField(field, right, true)); } catch (final IllegalAccessException ex) { //this can't happen. Would get a Security exception instead //throw a runtime exception in case the impossible happens. throw new InternalError("Unexpected IllegalAccessException: " + ex.getMessage()); } } } } private boolean accept(final Field field) { if (field.getName().indexOf(ClassUtils.INNER_CLASS_SEPARATOR_CHAR) != -1) { return false; } if (Modifier.isTransient(field.getModifiers())) { return false; } return !Modifier.isStatic(field.getModifiers()); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
2181082715c2753929a881323a47ebcfc2022973
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/android/thinkive/framework/message/handler/Message50200.java
69ddc47006e74aee88909e71a5fa05719e38012b
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
1,604
java
package com.android.thinkive.framework.message.handler; import android.content.Context; import android.text.TextUtils; import com.android.thinkive.framework.message.AppMessage; import com.android.thinkive.framework.message.IMessageHandler; import com.android.thinkive.framework.message.MessageManager; import com.android.thinkive.framework.util.AppUtil; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; public class Message50200 implements IMessageHandler { public String handlerMessage(Context paramContext, AppMessage paramAppMessage) { String str = paramAppMessage.getContent().optString("scheme"); if (TextUtils.isEmpty(str)) { return MessageManager.getInstance(paramContext).buildMessageReturn(-5020001, "APP标志不能为空", null); } paramAppMessage = new JSONArray(); JSONObject localJSONObject = new JSONObject(); for (;;) { try { if (!AppUtil.isAppExist(paramContext, str)) { continue; } localJSONObject.put("isInstall", "1"); paramAppMessage.put(localJSONObject); } catch (JSONException localJSONException) { localJSONException.printStackTrace(); continue; } return MessageManager.getInstance(paramContext).buildMessageReturn(1, null, paramAppMessage); localJSONObject.put("isInstall", "0"); } } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\thinkive\framework\message\handler\Message50200.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
a333bb7fc2afe675147c68541f283c231d60add6
8ef3b7fc3343ac679920ce8d9b8fa5df00f77716
/basic/src/main/java/com/abt/basic/core/bean/main/banner/BannerData.java
1aeed5afbcfed0b66e71e7ff190b82608e2c169a
[]
no_license
AppDemoOrg/MVPSample
6e605c7e13cab5383e95a980c78d032d57438626
0a7cd6f2118adde0c2b64b0ef8e39c698a34e7ba
refs/heads/master
2020-03-28T00:10:25.017008
2018-09-04T17:15:05
2018-09-04T17:15:05
128,857,808
0
0
null
null
null
null
UTF-8
Java
false
false
1,433
java
package com.abt.basic.core.bean.main.banner; /** * @描述: @BannerData * @作者: @黄卫旗 * @创建时间: @06/06/2018 */ public class BannerData { private int id; private String url; private String imagePath; private String title; private String desc; private int isVisible; private int order; private int type; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getImagePath() { return imagePath; } public void setImagePath(String imagePath) { this.imagePath = imagePath; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public int getIsVisible() { return isVisible; } public void setIsVisible(int isVisible) { this.isVisible = isVisible; } public int getOrder() { return order; } public void setOrder(int order) { this.order = order; } public int getType() { return type; } public void setType(int type) { this.type = type; } }
[ "askviky2010@gmail.com" ]
askviky2010@gmail.com
e8800d85e64549b680a952476a01da3c472a8593
981df8aa31bf62db3b9b4e34b5833f95ef4bd590
/xworker_core/src/main/java/xworker/java/lang/RuntimeActions.java
3bc0cf333ff74bd4e0de29fe0534ed53da3d9f56
[ "Apache-2.0" ]
permissive
x-meta/xworker
638c7cd935f0a55d81f57e330185fbde9dce9319
430fba081a78b5d3871669bf6fcb1e952ad258b2
refs/heads/master
2022-12-22T11:44:10.363983
2021-10-15T00:57:10
2021-10-15T01:00:24
217,432,322
1
0
Apache-2.0
2022-12-12T23:21:16
2019-10-25T02:13:51
Java
UTF-8
Java
false
false
605
java
package xworker.java.lang; import org.xmeta.ActionContext; import org.xmeta.Thing; import org.xmeta.World; public class RuntimeActions { public static void addShutdownHook(ActionContext actionContext){ String key = "__xworker_java_lang_runtime_shutdownhook__"; ShutdownHookThread th = (ShutdownHookThread) World.getInstance().getData(key); if(th == null){ th = new ShutdownHookThread("xworker shutdown hook"); World.getInstance().setData(key, th); Runtime.getRuntime().addShutdownHook(th); } th.addHook((Thing) actionContext.get("self"), actionContext) ; } }
[ "zhangyuxiang@tom.com" ]
zhangyuxiang@tom.com
30a1eeda8be945d8860fbf70aba0cd5a816cc074
1e8a5381b67b594777147541253352e974b641c5
/com/google/android/gms/maps/model/VisibleRegion.java
19f91614070c94d143990734de909138fce1ae28
[]
no_license
jramos92/Verify-Prueba
d45f48829e663122922f57720341990956390b7f
94765f020d52dbfe258dab9e36b9bb8f9578f907
refs/heads/master
2020-05-21T14:35:36.319179
2017-03-11T04:24:40
2017-03-11T04:24:40
84,623,529
1
0
null
null
null
null
UTF-8
Java
false
false
2,641
java
package com.google.android.gms.maps.model; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.common.internal.zzw; import com.google.android.gms.common.internal.zzw.zza; public final class VisibleRegion implements SafeParcelable { public static final zzp CREATOR = new zzp(); public final LatLng farLeft; public final LatLng farRight; public final LatLngBounds latLngBounds; private final int mVersionCode; public final LatLng nearLeft; public final LatLng nearRight; VisibleRegion(int paramInt, LatLng paramLatLng1, LatLng paramLatLng2, LatLng paramLatLng3, LatLng paramLatLng4, LatLngBounds paramLatLngBounds) { this.mVersionCode = paramInt; this.nearLeft = paramLatLng1; this.nearRight = paramLatLng2; this.farLeft = paramLatLng3; this.farRight = paramLatLng4; this.latLngBounds = paramLatLngBounds; } public VisibleRegion(LatLng paramLatLng1, LatLng paramLatLng2, LatLng paramLatLng3, LatLng paramLatLng4, LatLngBounds paramLatLngBounds) { this(1, paramLatLng1, paramLatLng2, paramLatLng3, paramLatLng4, paramLatLngBounds); } public int describeContents() { return 0; } public boolean equals(Object paramObject) { if (this == paramObject) {} do { return true; if (!(paramObject instanceof VisibleRegion)) { return false; } paramObject = (VisibleRegion)paramObject; } while ((this.nearLeft.equals(((VisibleRegion)paramObject).nearLeft)) && (this.nearRight.equals(((VisibleRegion)paramObject).nearRight)) && (this.farLeft.equals(((VisibleRegion)paramObject).farLeft)) && (this.farRight.equals(((VisibleRegion)paramObject).farRight)) && (this.latLngBounds.equals(((VisibleRegion)paramObject).latLngBounds))); return false; } int getVersionCode() { return this.mVersionCode; } public int hashCode() { return zzw.hashCode(new Object[] { this.nearLeft, this.nearRight, this.farLeft, this.farRight, this.latLngBounds }); } public String toString() { return zzw.zzv(this).zzg("nearLeft", this.nearLeft).zzg("nearRight", this.nearRight).zzg("farLeft", this.farLeft).zzg("farRight", this.farRight).zzg("latLngBounds", this.latLngBounds).toString(); } public void writeToParcel(Parcel paramParcel, int paramInt) { zzp.zza(this, paramParcel, paramInt); } } /* Location: C:\Users\julian\Downloads\Veryfit 2 0_vV2.0.28_apkpure.com-dex2jar.jar!\com\google\android\gms\maps\model\VisibleRegion.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ramos.marin92@gmail.com" ]
ramos.marin92@gmail.com
1882c785e0ebb311ca3644c5e3e88ae888cc0fa5
b4fd9e8ca6b98286bbb6f7f38e27a26335104d88
/src/com/facebook/browser/lite/n.java
8ac68824d0c2bd392f56ff00bc6fee43f31b5867
[]
no_license
reverseengineeringer/com.facebook.orca
7101a9d29680feafd2155fff9c771f9c2d90c16c
fac06904e19e204c9561438e4890e76c6ee00830
refs/heads/master
2021-01-20T17:58:35.856231
2016-07-21T03:45:15
2016-07-21T03:45:15
63,834,677
3
3
null
null
null
null
UTF-8
Java
false
false
330
java
package com.facebook.browser.lite; import com.facebook.browser.lite.ipc.a; final class n implements x { n(d paramd, int paramInt) {} public final void a(a parama) { parama.b(a); } } /* Location: * Qualified Name: com.facebook.browser.lite.n * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
97fe2c176f1cb9594122f08ff00321f51aa6999c
bccb412254b3e6f35a5c4dd227f440ecbbb60db9
/hl7/pseudo/message/MFK_M05.java
bd2d0ac6bb572afea80a6a51b6ec3928f7dec5a2
[]
no_license
nlp-lap/Version_Compatible_HL7_Parser
8bdb307aa75a5317265f730c5b2ac92ae430962b
9977e1fcd1400916efc4aa161588beae81900cfd
refs/heads/master
2021-03-03T15:05:36.071491
2020-03-09T07:54:42
2020-03-09T07:54:42
245,967,680
0
0
null
null
null
null
UTF-8
Java
false
false
299
java
package hl7.pseudo.message; import hl7.bean.Structure; public class MFK_M05 extends hl7.model.V2_31.message.MFK_M05{ public MFK_M05(){ super(); } public static MFK_M05 CLASS; static{ CLASS = new MFK_M05(); } public Structure[][] getComponents(){ return super.getComponents(); } }
[ "terminator800@hanmail.net" ]
terminator800@hanmail.net
519d93b185e255109d913e0f9354980517258dc8
4351d85183129e7d41aed5c7158955a2501fc659
/demo/src/test/java/org/ankarajug/testinfected/gist/TestCasesExecutionOrder.java
e73912d32eba0741f0482c15434ed74f870a7b08
[]
no_license
mulderbaba/testinfected
0c5f234181e1092cfad006106324d62e35cf7b58
cfa098d7205b693f3c8b26681fc795cbf51c3f75
refs/heads/master
2016-09-16T03:31:30.788860
2014-03-31T11:38:41
2014-03-31T11:38:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
package org.ankarajug.testinfected.gist; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; /** * User: mertcaliskan * Date: 2/22/13 */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestCasesExecutionOrder { @Test public void secondTest() { System.out.println("Executing second test"); } @Test public void firstTest() { System.out.println("Executing first test"); } @Test public void thirdTest() { System.out.println("Executing third test"); } }
[ "mert@t2.com.tr" ]
mert@t2.com.tr
114ab411717f74a40243855d8e89dba551552844
11fdfa15a5c907633cbb9f4566aab786c2f82f0e
/tags/1.2/com/pcmsolutions/device/EMU/E4/gui/preset/presetviewer/PresetParameterTable.java
4dfe9a0220f993c788a76be64990cf823583d307
[]
no_license
BGCX261/zoeos-svn-to-git
984437f7da0c72a709932a37d4657e450d14ea26
3d0b6117c1df7950a45e9e36e4a8374daa2ebc25
refs/heads/master
2020-05-17T15:54:05.091626
2015-08-25T15:53:16
2015-08-25T15:53:16
41,602,351
0
0
null
null
null
null
UTF-8
Java
false
false
3,402
java
package com.pcmsolutions.device.EMU.E4.gui.preset.presetviewer; import com.pcmsolutions.device.EMU.E4.gui.parameter.SingleColumnParameterModelTableModel; import com.pcmsolutions.device.EMU.E4.gui.table.AbstractRowHeaderedAndSectionedTable; import com.pcmsolutions.device.EMU.E4.parameter.IllegalParameterIdException; import com.pcmsolutions.device.EMU.E4.parameter.ReadableParameterModel; import com.pcmsolutions.device.EMU.E4.preset.NoSuchPresetException; import com.pcmsolutions.device.EMU.E4.preset.PresetEmptyException; import com.pcmsolutions.device.EMU.E4.preset.ReadablePreset; import com.pcmsolutions.device.EMU.E4.selections.PresetParameterSelection; import com.pcmsolutions.gui.ZCommandInvocationHelper; import com.pcmsolutions.system.ZDeviceNotRunningException; import com.pcmsolutions.system.ZDisposable; import javax.swing.*; import java.util.ArrayList; public class PresetParameterTable extends AbstractRowHeaderedAndSectionedTable implements ZDisposable { protected ReadablePreset preset; protected String title; protected String category; public PresetParameterTable(ReadablePreset p, String category, ReadableParameterModel[] parameterModels, String title) throws ZDeviceNotRunningException { this(p, category, new SingleColumnParameterModelTableModel(parameterModels), title); } public PresetParameterTable(ReadablePreset p, String category, SingleColumnParameterModelTableModel tm, String title) throws ZDeviceNotRunningException { super(tm, null, null, /*new RowHeaderTableCellRenderer(UIColors.getVoiceOverViewTableRowHeaderSectionBG(), UIColors.getVoiceOverViewTableRowHeaderSectionFG()),*/ title + " >"); this.preset = p; this.title = title; setDragEnabled(true); this.category = category; //this.setTransferHandler(mmth); this.setHidingSelectionOnFocusLost(true); } public String getCategory() { return category; } protected JMenuItem[] getCustomMenuItems() { try { return new JMenuItem[]{ZCommandInvocationHelper.getMenu(new Object[]{preset}, null, null, preset.getPresetDisplayName())}; } catch (NoSuchPresetException e) { e.printStackTrace(); } return null; } public String getTableTitle() { return title; } public PresetParameterSelection getSelection() { int[] selRows = getSelectedRows(); ArrayList ids = new ArrayList(); Object o; for (int r = 0, re = selRows.length; r < re; r++) { o = getValueAt(selRows[r], 0); if (o instanceof ReadableParameterModel) ids.add(((ReadableParameterModel) o).getParameterDescriptor().getId()); } Integer[] arrIds = new Integer[ids.size()]; ids.toArray(arrIds); try { return new PresetParameterSelection(preset, arrIds, PresetParameterSelection.convertPresetCategoryString(category)); } catch (ZDeviceNotRunningException e) { e.printStackTrace(); } catch (IllegalParameterIdException e) { e.printStackTrace(); } catch (PresetEmptyException e) { e.printStackTrace(); } catch (NoSuchPresetException e) { e.printStackTrace(); } return null; } }
[ "you@example.com" ]
you@example.com
483176f0092baf26cfea893d6c344d28f54620c2
64455042e4510b3604e900833a7f8117480b63d8
/Utilities/src/com/files/Writing/ExcelWriter.java
87cb1f88b7b46d5ab4ac88170e23cab0a6533cbd
[]
no_license
abhi-manyu/core-java
a88fba1adbdb1cd02a11ab72bfdb9fa0be128c28
a031f496fd4eca3334a0a5735db5ed62e78e2d8d
refs/heads/master
2021-06-14T17:36:16.829687
2021-04-18T18:48:04
2021-04-18T18:48:04
179,929,744
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package com.files.Writing; import java.io.File; import java.io.IOException; public class ExcelWriter { public static void main(String[] args) throws IOException { File file = new File("C:\\abhi\\GIT_HUB\\GIT\\GIT_local\\core-java\\Utilities\\src\\com\\files\\Writing" , "output.xlsx"); file.createNewFile(); System.out.println("created successfully"); } }
[ "abhim.moharana@gmail.com" ]
abhim.moharana@gmail.com
37af3ea784e7ad755f8d5acaf3055e98cc13eccc
ef5cb2e4c74d2dd21ca270040fa69ec8557c675e
/JavaAdvanced Exams/Exam28June2020/parking/Car.java
c24fe2d6d61f7252922524908b932e0eb16652a7
[]
no_license
nanko89/JavaAdvance
df7529bf16c1943d8903f6f829fbeef73375c8d2
f081763525f527022a07f63157d93ac6e320fd97
refs/heads/main
2023-08-20T15:24:32.671686
2021-10-23T11:45:57
2021-10-23T11:45:57
404,287,075
1
0
null
null
null
null
UTF-8
Java
false
false
859
java
package parking; public class Car { private String manufacturer; private String model; private int year; public Car(String manufacturer, String model, int year) { this.manufacturer = manufacturer; this.model = model; this.year = year; } public String getManufacturer() { return manufacturer; } public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } @Override public String toString() { return String.format("%s %s (%d)", this.manufacturer,this.model,this.year); } }
[ "natali.v.angelova@gmail.com" ]
natali.v.angelova@gmail.com
be2f1ca1fa7fd8f329ed9c0a1b5fe8aa171584cf
06b412971cadd112b769c5a698dcdc197e7ed534
/src/br/ufpe/cin/files/FilesTuple.java
de2c5865baca7383d66ab6f0414390ca03dd8a70
[]
no_license
AlbertoTrindade/jsFSTMerge
27fe2841a14d9402b2092fee64e82fd660721264
f85afb916754e3fc05636db6dfa2dd652c6508fe
refs/heads/master
2021-01-21T15:22:19.650346
2018-09-24T21:18:58
2018-09-24T21:18:58
110,295,710
3
0
null
null
null
null
UTF-8
Java
false
false
2,669
java
package br.ufpe.cin.files; import java.io.File; import br.ufpe.cin.mergers.util.MergeContext; /** * Represents a triple of matched files. That is, * files with the same name from the same directory in * the three revisions being merged (three-way merge). * It also stores the output of both unstructured and * semistructured merge. * @author Guilherme */ public class FilesTuple { private File leftFile; private File baseFile; private File rightFile; private MergeContext context; private String outputpath; public FilesTuple(File left, File base, File right){ this.leftFile = left; this.baseFile = base; this.rightFile = right; } public FilesTuple(File left, File base, File right, String outputpath){ this.leftFile = left; this.baseFile = base; this.rightFile = right; this.outputpath= outputpath; } public File getLeftFile() { return leftFile; } public void setLeftFile(File leftFile) { this.leftFile = leftFile; } public File getBaseFile() { return baseFile; } public void setBaseFile(File baseFile) { this.baseFile = baseFile; } public File getRightFile() { return rightFile; } public void setRightFile(File rightFile) { this.rightFile = rightFile; } public MergeContext getContext() { return context; } public void setContext(MergeContext context) { this.context = context; } public String getOutputpath() { return outputpath; } public void setOutputpath(String outputpath) { this.outputpath = outputpath; } @Override public String toString() { return "LEFT: " + ((leftFile == null) ? "empty" : leftFile.getAbsolutePath()) + "\n" + "BASE: " + ((baseFile == null) ? "empty" : baseFile.getAbsolutePath()) + "\n" + "RIGHT: "+ ((rightFile == null)? "empty" : rightFile.getAbsolutePath()) ; } @Override public boolean equals(Object obj) { if(obj instanceof FilesTuple){ FilesTuple tp = (FilesTuple) obj; String thisleftid = (this.leftFile !=null)?leftFile.getAbsolutePath():""; String thisbaseid = (this.baseFile !=null)?baseFile.getAbsolutePath():""; String thisrightid= (this.rightFile!=null)?rightFile.getAbsolutePath():""; String otherleftid = (tp.leftFile !=null)?tp.leftFile.getAbsolutePath():""; String otherbaseid = (tp.baseFile !=null)?tp.baseFile.getAbsolutePath():""; String otherrightid= (tp.rightFile!=null)?tp.rightFile.getAbsolutePath():""; return thisleftid.equals(otherleftid) && thisbaseid.equals(otherbaseid) && thisrightid.equals(otherrightid); } else { return false; } } }
[ "gjcc@cin.ufpe.br" ]
gjcc@cin.ufpe.br
ba92afbd7f2b6d16f5043f6ea91c5dbadf2c2ca2
47761f5843a42ec5ce4b0e4a5ab23579e8c44959
/src/main/java/com/geniisys/giac/service/impl/GIACCollnBatchServiceImpl.java
1a639fd7d20feaacd12d3bb3780c8f5f8bb8662d
[]
no_license
jabautista/GeniisysSCA
df6171c27594638193949df1a65c679444d51b9f
6dc1b21386453240f0632f37f00344df07f6bedd
refs/heads/development
2021-01-19T20:54:11.936774
2017-04-20T02:05:41
2017-04-20T02:05:41
88,571,440
2
0
null
2017-08-02T01:48:59
2017-04-18T02:18:03
PLSQL
UTF-8
Java
false
false
6,506
java
/** * * Project Name: Geniisys Web * Version: * Author: Computer Professionals, Inc. * */ package com.geniisys.giac.service.impl; import java.sql.SQLException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import com.geniisys.framework.util.ApplicationWideParameters; import com.geniisys.framework.util.PaginatedList; import com.geniisys.framework.util.TableGridUtil; import com.geniisys.giac.dao.GIACCollnBatchDAO; import com.geniisys.giac.entity.GIACCollnBatch; import com.geniisys.giac.service.GIACCollnBatchService; import com.seer.framework.util.StringFormatter; /** * The Class GIACCollnBatchServiceImpl. */ public class GIACCollnBatchServiceImpl implements GIACCollnBatchService{ /** The gipi par item dao. */ private GIACCollnBatchDAO giacCollnBatchDAO; /** * @return the giacCollnBatchDAO */ public GIACCollnBatchDAO getGiacCollnBatchDAO() { return giacCollnBatchDAO; } /** * @param giacCollnBatchDAO the giacCollnBatchDAO to set */ public void setGiacCollnBatchDAO(GIACCollnBatchDAO giacCollnBatchDAO) { this.giacCollnBatchDAO = giacCollnBatchDAO; } public GIACCollnBatch getDCBNo(String fundCd, String branchCd, Date tranDate) throws SQLException { return giacCollnBatchDAO.getDCBNo(fundCd, branchCd, tranDate); } public GIACCollnBatch getNewDCBNo(String fundCd, String branchCd, Date tranDate) throws SQLException { return giacCollnBatchDAO.getNewDCBNo(fundCd, branchCd, tranDate); } /* * (non-Javadoc) * @see com.geniisys.giac.service.GIACCollnBatchService#getDCBDateLOV(java.lang.Integer, java.util.Map) */ @SuppressWarnings("deprecation") @Override public PaginatedList getDCBDateLOV(Integer pageNo, Map<String, Object> params) throws SQLException { List<Map<String, Object>> dcbDateList = this.getGiacCollnBatchDAO().getDCBDateLOV(params); PaginatedList paginatedList = new PaginatedList(dcbDateList, ApplicationWideParameters.PAGE_SIZE); paginatedList.gotoPage(pageNo); return paginatedList; } /* * (non-Javadoc) * @see com.geniisys.giac.service.GIACCollnBatchService#getDCBNoLOV(java.lang.Integer, java.util.Map) */ @SuppressWarnings("deprecation") @Override public PaginatedList getDCBNoLOV(Integer pageNo, Map<String, Object> params) throws SQLException { List<Map<String, Object>> dcbDateList = this.getGiacCollnBatchDAO().getDCBNoLOV(params); PaginatedList paginatedList = new PaginatedList(dcbDateList, ApplicationWideParameters.PAGE_SIZE); paginatedList.gotoPage(pageNo); return paginatedList; } @SuppressWarnings("unchecked") @Override public HashMap<String, Object> getDCBMaintParams( HashMap<String, Object> params) throws SQLException, JSONException { TableGridUtil grid = new TableGridUtil((Integer) params.get("currentPage"), ApplicationWideParameters.PAGE_SIZE); params.put("from", grid.getStartRow()); params.put("to", grid.getEndRow()); List<GIACCollnBatch> list = this.getGiacCollnBatchDAO().getDCBNosList(params); params.put("rows", new JSONArray((List<GIACCollnBatch>) StringFormatter.escapeHTMLInList(list))); params.put("noOfRecords", list.size()); grid.setNoOfPages(list); params.put("pages", grid.getNoOfPages()); params.put("total", grid.getNoOfRows()); System.out.println("TEST === "+grid.getStartRow()+" - "+grid.getEndRow() + " // " + params.get("currentPage") + " ,size= " + list.size()); return params; } @Override public void saveDCBNoMaintChanges(String param, String userId) throws SQLException, JSONException, ParseException { JSONObject objParams = new JSONObject(param); Map<String, Object> params = new HashMap<String, Object>(); params.put("setRows", this.prepareDCBForInsert(new JSONArray(objParams.getString("setRows")))); params.put("delRows", this.prepareDCBForDelete(new JSONArray(objParams.getString("delRows")))); this.getGiacCollnBatchDAO().saveCollnBatch(params); } public List<GIACCollnBatch> prepareDCBForInsert(JSONArray setRows) throws JSONException, ParseException { List<GIACCollnBatch> dcbList = new ArrayList<GIACCollnBatch>(); GIACCollnBatch dcb = null; JSONObject dcbObj = null; //DateFormat df = new SimpleDateFormat("EEE MMM dd hh24:mm:ss z yyyy"); SimpleDateFormat df = new SimpleDateFormat("MM-dd-yyyy"); for(int i=0; i<setRows.length(); i++) { dcb = new GIACCollnBatch(); dcbObj = setRows.getJSONObject(i); dcb.setDcbNo((dcbObj.isNull("dcbNo") || "".equals(dcbObj.getString("dcbNo"))) ? 0 : dcbObj.getInt("dcbNo")); dcb.setDcbYear(dcbObj.isNull("dcbYear") ? null : dcbObj.getInt("dcbYear")); dcb.setFundCd(dcbObj.isNull("fundCd") ? null : dcbObj.getString("fundCd")); dcb.setBranchCd(dcbObj.isNull("branchCd") ? null : dcbObj.getString("branchCd")); dcb.setTranDate(dcbObj.isNull("tranDate") ? null : df.parse(dcbObj.getString("tranDate"))); dcb.setDcbFlag(dcbObj.isNull("dcbFlag") ? null : dcbObj.getString("dcbFlag")); dcb.setRemarks(dcbObj.isNull("remarks") ? null : StringFormatter.unescapeHTML2(dcbObj.getString("remarks"))); dcb.setUserId(dcbObj.isNull("userId") ? null : dcbObj.getString("userId")); dcbList.add(dcb); //System.out.println(dcbObj.getString("dcbNo")+"/"+dcbObj.getString("dcbYear")); } return dcbList; } public List<Map<String, Object>> prepareDCBForDelete(JSONArray delRows) throws JSONException { List<Map<String, Object>> dcbList = new ArrayList<Map<String, Object>>(); Map<String, Object> dcb = null; JSONObject dcbObj = null; for(int i=0; i<delRows.length(); i++) { dcb = new HashMap<String, Object>(); dcbObj = delRows.getJSONObject(i); dcb.put("dcbNo", dcbObj.isNull("dcbNo") ? null : dcbObj.getInt("dcbNo")); dcb.put("dcbYear", dcbObj.isNull("dcbYear") ? null : dcbObj.getInt("dcbYear")); dcb.put("fundCd", dcbObj.isNull("fundCd") ? null : dcbObj.getString("fundCd")); dcb.put("branchCd", dcbObj.isNull("branchCd") ? null : dcbObj.getString("branchCd")); dcbList.add(dcb); } return dcbList; } @Override public Integer generateDCBNo() throws SQLException { Integer dcbNo = this.getGiacCollnBatchDAO().generateDCBNo(); return dcbNo; } @Override public String getClosedTag(HashMap<String, Object> params) throws SQLException { return this.getGiacCollnBatchDAO().getClosedTag(params); } }
[ "jeromecris.bautista@gmail.com" ]
jeromecris.bautista@gmail.com
a4546607d5e0fc63436a696cff782a1ecad8a5df
b2f07f3e27b2162b5ee6896814f96c59c2c17405
/sun/security/krb5/internal/LocalSeqNumber.java
9a5b3701f75ae2b9f138ac5fa811c09fd7952a45
[]
no_license
weiju-xi/RT-JAR-CODE
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
d5b2590518ffb83596a3aa3849249cf871ab6d4e
refs/heads/master
2021-09-08T02:36:06.675911
2018-03-06T05:27:49
2018-03-06T05:27:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,636
java
/* */ package sun.security.krb5.internal; /* */ /* */ import sun.security.krb5.Confounder; /* */ /* */ public class LocalSeqNumber /* */ implements SeqNumber /* */ { /* */ private int lastSeqNumber; /* */ /* */ public LocalSeqNumber() /* */ { /* 40 */ randInit(); /* */ } /* */ /* */ public LocalSeqNumber(int paramInt) { /* 44 */ init(paramInt); /* */ } /* */ /* */ public LocalSeqNumber(Integer paramInteger) { /* 48 */ init(paramInteger.intValue()); /* */ } /* */ /* */ public synchronized void randInit() /* */ { /* 61 */ byte[] arrayOfByte = Confounder.bytes(4); /* 62 */ arrayOfByte[0] = ((byte)(arrayOfByte[0] & 0x3F)); /* 63 */ int i = arrayOfByte[3] & 0xFF | (arrayOfByte[2] & 0xFF) << 8 | (arrayOfByte[1] & 0xFF) << 16 | (arrayOfByte[0] & 0xFF) << 24; /* */ /* 67 */ if (i == 0) { /* 68 */ i = 1; /* */ } /* 70 */ this.lastSeqNumber = i; /* */ } /* */ /* */ public synchronized void init(int paramInt) { /* 74 */ this.lastSeqNumber = paramInt; /* */ } /* */ /* */ public synchronized int current() { /* 78 */ return this.lastSeqNumber; /* */ } /* */ /* */ public synchronized int next() { /* 82 */ return this.lastSeqNumber + 1; /* */ } /* */ /* */ public synchronized int step() { /* 86 */ return ++this.lastSeqNumber; /* */ } /* */ } /* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar * Qualified Name: sun.security.krb5.internal.LocalSeqNumber * JD-Core Version: 0.6.2 */
[ "yuexiahandao@gmail.com" ]
yuexiahandao@gmail.com
3d9853201151dfb6947ae772508fb6f89fadd119
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
/app/src/main/wechat6.5.3/com/tencent/smtt/utils/n.java
6a791c2ca494a0df4733eba7e276da935801a6ac
[]
no_license
newtonker/wechat6.5.3
8af53a870a752bb9e3c92ec92a63c1252cb81c10
637a69732afa3a936afc9f4679994b79a9222680
refs/heads/master
2020-04-16T03:32:32.230996
2017-06-15T09:54:10
2017-06-15T09:54:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,768
java
package com.tencent.smtt.utils; import android.os.Build.VERSION; import java.io.PrintWriter; import java.io.StringWriter; import java.io.Writer; import java.lang.reflect.Method; public final class n { public static Object a(Class<?> cls, String str, Class<?>[] clsArr, Object... objArr) { Object obj = null; try { Method method = cls.getMethod(str, clsArr); method.setAccessible(true); obj = method.invoke(null, objArr); } catch (Throwable th) { TbsLog.addLog(TbsLog.TBSLOG_CODE_SDK_INVOKE_ERROR, String.valueOf(th), new Object[0]); } return obj; } public static Object a(Object obj, String str, Class<?>[] clsArr, Object... objArr) { if (obj == null) { return null; } try { Class cls = obj.getClass(); Method method = VERSION.SDK_INT > 10 ? cls.getMethod(str, clsArr) : cls.getDeclaredMethod(str, clsArr); method.setAccessible(true); if (objArr.length == 0) { objArr = null; } return method.invoke(obj, objArr); } catch (Throwable th) { TbsLog.addLog(TbsLog.TBSLOG_CODE_SDK_INVOKE_ERROR, String.valueOf(th), new Object[0]); if (th.getCause() != null && th.getCause().toString().contains("AuthenticationFail")) { return new String("AuthenticationFail"); } if (str != null && (str.equalsIgnoreCase("canLoadX5Core") || str.equalsIgnoreCase("initTesRuntimeEnvironment"))) { return null; } Writer stringWriter = new StringWriter(); th.printStackTrace(new PrintWriter(stringWriter)); new StringBuilder("invokeInstance -- exceptions:").append(stringWriter.toString()); return null; } } public static Object b(Object obj, String str) { return a(obj, str, null, new Object[0]); } public static Method c(Object obj, String str, Class<?>... clsArr) { Class cls = obj.getClass(); while (cls != Object.class) { if (cls == null) { return null; } try { return cls.getDeclaredMethod(str, clsArr); } catch (Exception e) { cls = cls.getSuperclass(); } } return null; } public static Object el(String str, String str2) { Object obj = null; try { obj = Class.forName(str).getMethod(str2, new Class[0]).invoke(null, new Object[0]); } catch (Throwable th) { TbsLog.addLog(TbsLog.TBSLOG_CODE_SDK_INVOKE_ERROR, String.valueOf(th), new Object[0]); } return obj; } }
[ "zhangxhbeta@gmail.com" ]
zhangxhbeta@gmail.com
49eda8506e2ad6b676f8f80ee38784ee7aad3f5e
36838dfcd53c4d2c73b9a6b0b7a8a28e4a331517
/com/xiaomi/mistatistic/sdk/b/a/d.java
e2718d87f6e17335bca74d8dce44cabae1fdfb52
[]
no_license
ShahmanTeh/MiFit-Java
fbb2fd578727131b9ac7150b86c4045791368fe8
93bdf88d39423893b294dec2f5bf54708617b5d0
refs/heads/master
2021-01-20T13:05:10.408158
2016-02-03T21:02:55
2016-02-03T21:02:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,991
java
package com.xiaomi.mistatistic.sdk.b.a; import android.text.TextUtils; import com.amap.api.location.LocationManagerProxy; import com.g.a.b.b; import com.xiaomi.channel.b.v; import com.xiaomi.market.sdk.o; import com.xiaomi.mistatistic.sdk.b.A; import com.xiaomi.mistatistic.sdk.b.C; import com.xiaomi.mistatistic.sdk.b.C1125b; import com.xiaomi.mistatistic.sdk.b.p; import com.xiaomi.mistatistic.sdk.b.r; import java.util.ArrayList; import java.util.List; import kankan.wheel.widget.a; import org.apache.http.message.BasicNameValuePair; import org.json.JSONObject; public class d implements p { private e a; private String b; public d(String str, e eVar) { this.a = eVar; this.b = str; } public void a() { boolean z = false; A a = new A(); try { List arrayList = new ArrayList(); arrayList.add(new BasicNameValuePair(v.u, C1125b.b())); arrayList.add(new BasicNameValuePair("app_key", C1125b.c())); arrayList.add(new BasicNameValuePair(a.ak, new r().a())); arrayList.add(new BasicNameValuePair(b.c, C1125b.d())); Object e = C1125b.e(); if (!TextUtils.isEmpty(e)) { arrayList.add(new BasicNameValuePair(o.x, e)); } arrayList.add(new BasicNameValuePair("stat_value", this.b)); e = C.a(C1125b.a(), com.xiaomi.mistatistic.sdk.a.a() ? "http://10.99.168.145:8097/mistats" : "https://data.mistat.xiaomi.com/mistats", arrayList); a.a("Upload MiStat data complete, result=" + e); if (!TextUtils.isEmpty(e)) { if ("ok".equals(new JSONObject(e).getString(LocationManagerProxy.KEY_STATUS_CHANGED))) { z = true; } } } catch (Throwable e2) { a.a("Upload MiStat data failed", e2); } catch (Throwable e22) { a.a("Result parse failed", e22); } this.a.a(z); } }
[ "kasha_malaga@hotmail.com" ]
kasha_malaga@hotmail.com
882658da7d72b619e686b8cf465bc2648a94238f
6303e3e7b90d5799654d1450c24984cae9f43eb1
/cc.recommenders.mining.calls/src/main/java/cc/recommenders/mining/calls/pbn/PBNMiner.java
79193ea10e898fd4d87c1c8101ed18db1c6be8d5
[]
no_license
stg-tud/artifacts-proksch-pbn
de1a16158a4cc72db84e69eb5a9c27283f411c22
ef89b019e9ed703d6f93ef332b89c50b64303591
refs/heads/master
2021-01-13T01:35:52.797770
2017-06-12T17:50:47
2017-06-12T17:50:47
28,149,154
1
1
null
null
null
null
UTF-8
Java
false
false
4,416
java
/** * Copyright (c) 2010, 2011 Darmstadt University of Technology. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Sebastian Proksch - initial API and implementation */ package cc.recommenders.mining.calls.pbn; import java.util.List; import java.util.Set; import org.eclipse.recommenders.commons.bayesnet.BayesianNetwork; import cc.recommenders.io.Logger; import cc.recommenders.mining.calls.DictionaryBuilder; import cc.recommenders.mining.calls.ICallsRecommender; import cc.recommenders.mining.calls.Miner; import cc.recommenders.mining.calls.MiningOptions; import cc.recommenders.mining.calls.ModelBuilder; import cc.recommenders.mining.calls.Pattern; import cc.recommenders.mining.calls.PatternFinderFactory; import cc.recommenders.mining.calls.QueryOptions; import cc.recommenders.mining.features.FeatureExtractor; import cc.recommenders.mining.features.OptionAwareFeaturePredicate; import cc.recommenders.mining.features.RareFeatureDropper; import cc.recommenders.usages.Query; import cc.recommenders.usages.Usage; import cc.recommenders.usages.features.UsageFeature; import cc.recommenders.utils.dictionary.Dictionary; import com.google.inject.Inject; public class PBNMiner implements Miner<Usage, Query> { private final FeatureExtractor<Usage, UsageFeature> featureExtractor; private final DictionaryBuilder<Usage, UsageFeature> dictionaryBuilder; private final PatternFinderFactory<UsageFeature> patternFinderFactory; private final ModelBuilder<UsageFeature, BayesianNetwork> modelBuilder; private final RareFeatureDropper<UsageFeature> dropper; private final OptionAwareFeaturePredicate featurePred; private final QueryOptions qOpts; private final MiningOptions mOpts; private int lastNumberOfFeatures = 0; private int lastNumberOfPatterns = 0; @Inject public PBNMiner(FeatureExtractor<Usage, UsageFeature> featureExtractor, DictionaryBuilder<Usage, UsageFeature> dictionaryBuilder, PatternFinderFactory<UsageFeature> patternFinderFactory, ModelBuilder<UsageFeature, BayesianNetwork> modelBuilder, QueryOptions qOpts, MiningOptions mOpts, RareFeatureDropper<UsageFeature> dropper, OptionAwareFeaturePredicate featurePred) { this.featureExtractor = featureExtractor; this.dictionaryBuilder = dictionaryBuilder; this.patternFinderFactory = patternFinderFactory; this.modelBuilder = modelBuilder; this.qOpts = qOpts; this.mOpts = mOpts; this.dropper = dropper; this.featurePred = featurePred; } @Override public BayesianNetwork learnModel(List<Usage> usages) { Logger.debug("extracting features"); List<List<UsageFeature>> features = extractFeatures(usages); Logger.debug("creating dictionary"); Dictionary<UsageFeature> dictionary = createDictionary(usages, features); lastNumberOfFeatures = dictionary.size(); Logger.debug("mining"); List<Pattern<UsageFeature>> patterns = patternFinderFactory.createPatternFinder().find(features, dictionary); lastNumberOfPatterns = patterns.size(); Logger.debug("building network"); BayesianNetwork network = modelBuilder.build(patterns, dictionary); return network; } protected List<List<UsageFeature>> extractFeatures(List<Usage> usages) { return featureExtractor.extract(usages); } protected Dictionary<UsageFeature> createDictionary(List<Usage> usages, List<List<UsageFeature>> features) { Dictionary<UsageFeature> rawDictionary = dictionaryBuilder.newDictionary(usages, featurePred); if (mOpts.isFeatureDropping()) { Dictionary<UsageFeature> dictionary = dropper.dropRare(rawDictionary, features); Set<String> diff = DictionaryHelper.diff(rawDictionary, dictionary); Set<UsageFeature> rawClassContexts = new DictionaryHelper(rawDictionary).getClassContexts(); Set<UsageFeature> classContexts = new DictionaryHelper(dictionary).getClassContexts(); return dictionary; } else { return rawDictionary; } } @Override public ICallsRecommender<Query> createRecommender(List<Usage> in) { BayesianNetwork network = learnModel(in); return new PBNRecommender(network, qOpts); } public int getLastNumberOfFeatures() { return lastNumberOfFeatures; } public int getLastNumberOfPatterns() { return lastNumberOfPatterns; } }
[ "proksch@st.informatik.tu-darmstadt.de" ]
proksch@st.informatik.tu-darmstadt.de
ec72ef60e56769f682926fcfabf113336deab71e
85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5
/prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/mdl/dto/id/CaracteristicaDinamicaID.java
e1e754360164563a4aa75bb06a5ad4b3e168289a
[]
no_license
SebasBenalcazarS/RepoAngularJS
1d60d0dec454fe4f1b1a8c434b656d55166f066f
5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c
refs/heads/master
2016-08-03T23:21:26.639859
2015-08-19T16:05:00
2015-08-19T16:05:00
40,517,374
1
0
null
null
null
null
ISO-8859-1
Java
false
false
1,346
java
package ec.com.smx.sic.cliente.mdl.dto.id; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Embeddable; import ec.com.kruger.utilitario.dao.commons.annotations.SequenceDataBaseValue; import ec.com.smx.sic.cliente.persistencia.secuencia.DescriptorSecuenciasSIC; /** * Clase que encapsula a las propiedades Identificadoras de la clase CaracteristicaDinamicaDTO * @see ec.com.smx.sic.cliente.mdl.dto.ArticuloRelacion * * @author kruger */ @Embeddable @SuppressWarnings("serial") public class CaracteristicaDinamicaID implements Serializable { public CaracteristicaDinamicaID() {} /** * Código de la característica dinámica */ @SequenceDataBaseValue (descriptorClass=DescriptorSecuenciasSIC.class , name = "SCSADSCARDIN") @Column(name = "SECUENCIALCARDIN", nullable = false) private java.lang.Long secuencialCaracteristicaDinamica; /** * @return the secuencialCaracteristicaDinamica */ public java.lang.Long getSecuencialCaracteristicaDinamica() { return secuencialCaracteristicaDinamica; } /** * @param secuencialCaracteristicaDinamica the secuencialCaracteristicaDinamica to set */ public void setSecuencialCaracteristicaDinamica( java.lang.Long secuencialCaracteristicaDinamica) { this.secuencialCaracteristicaDinamica = secuencialCaracteristicaDinamica; } }
[ "nbenalcazar@kruger.com.ec" ]
nbenalcazar@kruger.com.ec
a75bebce1bc833fb779392e8c62f4c3db0fbd6d2
3a72a3353c43624971b8c97cd69b9029e51816a4
/crypto/src/main/java/foundation/fantom/jitweb3/crypto/CipherException.java
8f3111c5c1c871acf3c813238fd22a71b5c9f4cc
[ "Apache-2.0" ]
permissive
quan8/jitweb3-common
12165ce625a820db5b185ab303befd66457158ee
3d130b81af6531e7cf07e8cce17fa73aef94a169
refs/heads/master
2023-06-25T20:32:44.777408
2021-07-19T10:46:59
2021-07-19T10:46:59
387,302,062
0
0
null
null
null
null
UTF-8
Java
false
false
963
java
/* * Copyright 2019 Web3 Labs Ltd. * * 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 foundation.fantom.jitweb3.crypto; /** Cipher exception wrapper. */ public class CipherException extends Exception { public CipherException(String message) { super(message); } public CipherException(Throwable cause) { super(cause); } public CipherException(String message, Throwable cause) { super(message, cause); } }
[ "quan.nguyen@fantom.foundation" ]
quan.nguyen@fantom.foundation
b6b526a9b73292a76c1abf76c00468c842b1d8eb
d45756a446b4202fa9ce3b4d3dfaebc71dba3d5b
/src/main/java/br/com/johnmar/registradorpedidos/control/IndexControl.java
cd2ac2ec1d3beccd203dc7a6b091433314b092fa
[]
no_license
willbigas/registrador-pedidos
254c9711ae6d42ceaf95f0234ff530b1a914e993
2eb6f98ed596e768830defc1ea5e16a734fa8b11
refs/heads/master
2020-06-24T20:25:09.358733
2019-07-26T20:52:48
2019-07-26T20:52:48
199,078,043
0
0
null
null
null
null
UTF-8
Java
false
false
294
java
package br.com.johnmar.registradorpedidos.control; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @Controller public class IndexControl { @GetMapping("/") public String inicio() { return "paginas/index"; } }
[ "williambmauro@hotmail.com" ]
williambmauro@hotmail.com
bd46da801901143d6ea8fa19bd888974b2002c29
f8a202159c4c7c3b6fba2713926d565a940bb399
/rest-if/src/main/java/org/broadband_forum/obbaa/SwaggerConfig.java
6757737b7db52784967be6067a7d0aea965800da
[ "Apache-2.0" ]
permissive
BroadbandForum/obbaa
54fbc2fa11e28a572bb2ee54955918ff8d55b930
805f969ff314b3a59b7355384afade9f15c23f94
refs/heads/master
2023-07-20T22:27:55.692755
2023-07-19T09:21:10
2023-07-19T09:21:10
143,049,657
19
11
Apache-2.0
2023-06-14T22:25:46
2018-07-31T18:04:26
Java
UTF-8
Java
false
false
1,896
java
/* * Copyright 2018 Broadband Forum * * 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.broadband_forum.obbaa; import java.util.Collections; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @EnableSwagger2 public final class SwaggerConfig { private SwaggerConfig(){ } public static Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("org.broadband_forum.obbaa")) .paths(input -> input.matches("/baa/.*")) .build() .apiInfo(apiInfo()); } private static ApiInfo apiInfo() { return new ApiInfo( "BBF OBBAA REST API", "REST API providing access to OBBAA core component", "1.0", "https://www.broadband-forum.org/", new Contact("Broadband Forum", "https://www.broadband-forum.org", "info@broadband-forum.org"), "Apache License, Version 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList()); } }
[ "mahadevan.vcnokia.com" ]
mahadevan.vcnokia.com
5ba4f29b9be033ad696a7cc7effdc6901964bf20
5c328b73629d43c47a5695158162cd0814dc1dc3
/test/org/apache/catalina/servlets/TestDefaultServletPut.java
915c4484de47971a936ab5a68815115df7f3188e
[ "bzip2-1.0.6", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "CPL-1.0", "CDDL-1.0", "Zlib", "EPL-1.0", "LZMA-exception" ]
permissive
cxyroot/Tomcat8Src
8cd56d0850c0f59d4709474f761a984b7caadaf6
14608ee22b05083bb8d5dc813f46447cb4baba76
refs/heads/master
2023-07-25T12:44:07.797728
2022-12-06T14:46:22
2022-12-06T14:46:22
223,338,251
2
0
Apache-2.0
2023-07-07T21:16:21
2019-11-22T06:27:01
Java
UTF-8
Java
false
false
6,619
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.catalina.servlets; import java.io.File; import java.nio.file.Files; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import static org.apache.catalina.startup.SimpleHttpClient.CRLF; import org.apache.catalina.Context; import org.apache.catalina.Wrapper; import org.apache.catalina.startup.ExpandWar; import org.apache.catalina.startup.SimpleHttpClient; import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.util.buf.ByteChunk; @RunWith(Parameterized.class) public class TestDefaultServletPut extends TomcatBaseTest { private static final String START_TEXT= "Starting text"; private static final String START_LEN = Integer.toString(START_TEXT.length()); private static final String PATCH_TEXT= "Ending *"; private static final String PATCH_LEN = Integer.toString(PATCH_TEXT.length()); private static final String END_TEXT= "Ending * text"; @Parameterized.Parameters(name = "{index} rangeHeader [{0}]") public static Collection<Object[]> parameters() { List<Object[]> parameterSets = new ArrayList<>(); // Valid partial PUT parameterSets.add(new Object[] { "Content-Range: bytes=0-" + PATCH_LEN + "/" + START_LEN + CRLF, Boolean.TRUE, END_TEXT }); // Full PUT parameterSets.add(new Object[] { "", null, PATCH_TEXT }); // Invalid range parameterSets.add(new Object[] { "Content-Range: apples=0-" + PATCH_LEN + "/" + START_LEN + CRLF, Boolean.FALSE, START_TEXT }); parameterSets.add(new Object[] { "Content-Range: bytes00-" + PATCH_LEN + "/" + START_LEN + CRLF, Boolean.FALSE, START_TEXT }); parameterSets.add(new Object[] { "Content-Range: bytes=9-7/" + START_LEN + CRLF, Boolean.FALSE, START_TEXT }); parameterSets.add(new Object[] { "Content-Range: bytes=-7/" + START_LEN + CRLF, Boolean.FALSE, START_TEXT }); parameterSets.add(new Object[] { "Content-Range: bytes=9-/" + START_LEN + CRLF, Boolean.FALSE, START_TEXT }); parameterSets.add(new Object[] { "Content-Range: bytes=9-X/" + START_LEN + CRLF, Boolean.FALSE, START_TEXT }); parameterSets.add(new Object[] { "Content-Range: bytes=0-5/" + CRLF, Boolean.FALSE, START_TEXT }); parameterSets.add(new Object[] { "Content-Range: bytes=0-5/0x5" + CRLF, Boolean.FALSE, START_TEXT }); return parameterSets; } private File tempDocBase; @Parameter(0) public String contentRangeHeader; @Parameter(1) public Boolean contentRangeHeaderValid; @Parameter(2) public String expectedEndText; @Override public void setUp() throws Exception { super.setUp(); tempDocBase = Files.createTempDirectory(getTemporaryDirectory().toPath(), "put").toFile(); } /* * Replaces the text at the start of START_TEXT with PATCH_TEXT. */ @Test public void testPut() throws Exception { // Configure a web app with a read/write default servlet Tomcat tomcat = getTomcatInstance(); Context ctxt = tomcat.addContext("", tempDocBase.getAbsolutePath()); Wrapper w = Tomcat.addServlet(ctxt, "default", DefaultServlet.class.getName()); w.addInitParameter("readonly", "false"); ctxt.addServletMappingDecoded("/", "default"); tomcat.start(); // Disable caching ctxt.getResources().setCachingAllowed(false); // Full PUT PutClient putClient = new PutClient(getPort()); putClient.setRequest(new String[] { "PUT /test.txt HTTP/1.1" + CRLF + "Host: localhost:" + getPort() + CRLF + "Content-Length: " + START_LEN + CRLF + CRLF + START_TEXT }); putClient.connect(); putClient.processRequest(false); Assert.assertTrue(putClient.isResponse201()); putClient.disconnect(); putClient.reset(); // Partial PUT putClient.connect(); putClient.setRequest(new String[] { "PUT /test.txt HTTP/1.1" + CRLF + "Host: localhost:" + getPort() + CRLF + contentRangeHeader + "Content-Length: " + PATCH_LEN + CRLF + CRLF + PATCH_TEXT }); putClient.processRequest(false); if (contentRangeHeaderValid == null) { // Not present (so will do a full PUT, replacing the existing) Assert.assertTrue(putClient.isResponse204()); } else if (contentRangeHeaderValid.booleanValue()) { // Valid Assert.assertTrue(putClient.isResponse204()); } else { // Not valid Assert.assertTrue(putClient.isResponse400()); } // Check for the final resource String path = "http://localhost:" + getPort() + "/test.txt"; ByteChunk responseBody = new ByteChunk(); int rc = getUrl(path, responseBody, null); Assert.assertEquals(200, rc); Assert.assertEquals(expectedEndText, responseBody.toString()); } @Override public void tearDown() { ExpandWar.deleteDir(tempDocBase, false); } private static class PutClient extends SimpleHttpClient { public PutClient(int port) { setPort(port); } @Override public boolean isResponseBodyOK() { return false; } } }
[ "1076675153@qq.com" ]
1076675153@qq.com
35e127a813e7be735af6e17d10049d587aae0e64
55787868f10d29caf64dede77ce5499a94c9cad8
/java/springbootvue/official/chapter05/jpa/src/main/java/org/sang/model/Book.java
87bf4be03b453f2331cd18d681dad168c2084d57
[]
no_license
JavaAIer/NotesAndCodes
d4d14c9809c871142af6a6eec79b61ea760d15fb
83ebbc0ee75d06ead6cb60ec7850989ee796ba6f
refs/heads/master
2022-12-13T02:27:01.960050
2019-12-24T01:57:10
2019-12-24T01:57:10
158,776,818
3
1
null
2022-12-09T10:11:57
2018-11-23T03:32:43
Java
UTF-8
Java
false
false
1,438
java
package org.sang.model; import javax.persistence.*; /** * Created by sang on 2018/7/15. */ @Entity(name = "t_book") public class Book { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(name = "book_name",nullable = false) private String name; private String author; private Float price; @Transient private String description; //省略getter/setter @Override public String toString() { return "Book{" + "id=" + id + ", name='" + name + '\'' + ", author='" + author + '\'' + ", price=" + price + ", description='" + description + '\'' + '}'; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public Float getPrice() { return price; } public void setPrice(Float price) { this.price = price; } }
[ "cuteui@qq.com" ]
cuteui@qq.com
adc2b932c14db62cd3d248f7765b1b64b0580cc9
f4ea2a165bffc0cbe02f042540ef7500d64a03b0
/natj-ctests/src/test/java/c/binding/struct/NG_I_Struct.java
5ee31d94a8f49bd8c86a5f4f15befdcb7aac6943
[ "Apache-2.0" ]
permissive
multi-os-engine/moe-natj
3a048fbaa3aae5fb2d50de2b7b9495658ef5eafb
c79dd086cfcdd0c17e4943f73c8e676314f2773b
refs/heads/moe-master
2023-07-09T18:00:44.585987
2023-06-27T16:52:45
2023-06-27T16:52:45
65,320,807
3
7
Apache-2.0
2023-06-13T17:25:02
2016-08-09T19:02:37
Java
UTF-8
Java
false
false
1,679
java
/* Copyright 2014-2016 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package c.binding.struct; import org.moe.natj.c.StructObject; import org.moe.natj.c.ann.Structure; import org.moe.natj.c.ann.StructureField; import org.moe.natj.general.NatJ; import org.moe.natj.general.Pointer; import org.moe.natj.general.ann.Generated; @Generated @Structure() public final class NG_I_Struct extends StructObject { static { NatJ.register(); } private static long __natjCache; @Generated public NG_I_Struct() { super(NG_I_Struct.class); } @Generated protected NG_I_Struct(Pointer peer) { super(peer); } @Generated public NG_I_Struct(int x, int y) { super(NG_I_Struct.class); setX(x); setY(y); } @Generated @StructureField(order = 0, isGetter = true) public native int x(); @Generated @StructureField(order = 0, isGetter = false) public native void setX(int value); @Generated @StructureField(order = 1, isGetter = true) public native int y(); @Generated @StructureField(order = 1, isGetter = false) public native void setY(int value); }
[ "alexey.suhov@intel.com" ]
alexey.suhov@intel.com
f8351d26f8de3194873c3397bb0412877f5d95aa
83954d3f263f2e735888ac0dd7f495be8ff6270e
/src/test/java/org/oddjob/logging/MockLogArchiver.java
58de86041cb62f5d552d00a435732fec2538f8ca
[ "BSD-2-Clause", "Apache-2.0" ]
permissive
robjg/oddjob
d8e4d6a68d21751e0bba6dbc5ef307d69a18e366
61c1e0980830c430be00210ab1a7b9d77a3aa8c4
refs/heads/master
2023-07-05T20:37:22.644093
2023-07-04T06:29:28
2023-07-04T06:29:28
1,803,653
20
4
null
null
null
null
UTF-8
Java
false
false
561
java
package org.oddjob.logging; import org.oddjob.arooa.logging.LogLevel; public class MockLogArchiver implements LogArchiver { public void addLogListener(LogListener l, Object component, LogLevel level, long last, int max) { throw new RuntimeException("Unexpected from class " + getClass()); } public void onDestroy() { throw new RuntimeException("Unexpected from class " + getClass()); } public void removeLogListener(LogListener l, Object component) { throw new RuntimeException("Unexpected from class " + getClass()); } }
[ "rob@rgordon.co.uk" ]
rob@rgordon.co.uk
9a882c25ca03d0ad8e5857e3fadb063b54e800bc
159e86d3281e83b436fba01456ec19db1b14da48
/src/main/java/org/lastaflute/db/dbflute/accesscontext/AccessUserInfoProvider.java
3f31c20efffabb21a30b2fae2e72b4149bb616d9
[ "Apache-2.0" ]
permissive
nabedge/lastaflute
7230c985ee53d4ab378814b3fef5f317b08fa37c
d9d892d26912029d2dc21725445af602b9fff7a7
refs/heads/master
2021-01-14T11:23:24.506932
2015-11-08T14:57:55
2015-11-08T14:57:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
/* * Copyright 2014-2015 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.lastaflute.db.dbflute.accesscontext; /** * @author jflute */ public interface AccessUserInfoProvider { Long provideUserId(); String provideUserType(); String provideDomainType(); }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
6ab6bd445bab6dec126cbc8dc9575ced25fda079
7548e4773ac39b98e155393f9a697946b9c23059
/Normal/Spring-Boot-Demo/src/main/java/cn/mrdear/mapper/UserMapper.java
879ed4cc0538cb21d14acae06d48cbed5d53e417
[]
no_license
Jsonlu/java
0ec96c32e6f50ee8fd250dbf7a326d71bbb02a07
1d7a71d5640d3485dc12f4a2acd417470be19407
refs/heads/master
2021-01-20T00:04:08.542862
2017-07-22T10:13:11
2017-07-22T10:13:11
89,072,211
2
0
null
null
null
null
UTF-8
Java
false
false
325
java
package cn.mrdear.mapper; import cn.mrdear.entity.User; import org.apache.ibatis.annotations.Mapper; /** * UserMapper.xml代理 * * @author Niu Li * @date 2016/8/13 */ @Mapper public interface UserMapper { /** * 根据id查询用户 * * @param id * @return */ User findById(int id); }
[ "a12345678" ]
a12345678
e7b9ec999d8b5124bb31782aa474fce866284665
9f3d00d19d93df165347acdfd10548f43eb54513
/3.JavaMultithreading/src/com/javarush/task/task27/task2712/RandomOrderGeneratorTask.java
9cf8b0ac99d4f44c0ed6fca9a0757a171d080ee6
[]
no_license
reset1301/javarushTasks
eebeb85e9cb35feb8aac2c96b73d7afa7bdaea67
29a8e8b08bc73f831ff182e7b04c3eb49a56c740
refs/heads/master
2018-09-28T10:01:06.772595
2018-07-09T10:33:07
2018-07-09T10:33:07
116,394,770
0
0
null
null
null
null
UTF-8
Java
false
false
825
java
package com.javarush.task.task27.task2712; import com.javarush.task.task27.task2712.kitchen.TestOrder; import java.io.IOException; import java.util.List; public class RandomOrderGeneratorTask implements Runnable { List<Tablet> tablets; int interval; public RandomOrderGeneratorTask(List<Tablet> tablets, int interval) { this.tablets = tablets; this.interval = interval; } @Override public void run() { while (!Thread.currentThread().isInterrupted()) { Tablet tablet = tablets.get((int) ((tablets.size() - 1) * Math.random())); tablet.createTestOrder(); try { Thread.sleep(interval); } catch (InterruptedException e) { break; // e.printStackTrace(); } } } }
[ "reset1301@mail.ru" ]
reset1301@mail.ru
530645dbd1cdfb6b05ad404283a60c24d77a95d1
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a115/A115266Test.java
d841e2b675252e3c3fc8c0643aff6a00c59b12ad
[]
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
195
java
package irvine.oeis.a115; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A115266Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
b5e68770945be4acda700fc9071434bdca971f63
53fc81b27ef939cfe6b22f8365fb0eed415a63b7
/shop-cart/shop-cart-api/src/main/java/quick/pager/shop/mapper/OrderCartMapper.java
ad5d165b483336ba6d98d47e06fc50e6ac11abf6
[ "MIT" ]
permissive
SiGuiyang/spring-cloud-shop
59b9e3cbd356f43eb27a7d4b63792372fa02c800
5d51d31bace7bec96c19574ec09acfbf8ed537be
refs/heads/main
2022-06-24T22:12:10.288555
2021-12-05T10:59:51
2021-12-05T10:59:51
152,964,871
893
386
MIT
2022-06-17T02:23:56
2018-10-14T11:01:21
Java
UTF-8
Java
false
false
303
java
package quick.pager.shop.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import quick.pager.shop.model.OrderCart; /** * OrderCartMapper * * @author siguiyang */ @Mapper public interface OrderCartMapper extends BaseMapper<OrderCart> { }
[ "siguiyang1992@outlook.com" ]
siguiyang1992@outlook.com
866e13832eebca5abcfcc07340f99cf8d6f61606
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/1388550/buggy-version/lucene/dev/trunk/lucene/suggest/src/java/org/apache/lucene/search/spell/HighFrequencyDictionary.java
2a4b341d020c1e0fded23bac1964dc218b4feb75
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,358
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.lucene.search.spell; import java.io.IOException; import java.util.Comparator; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.Terms; import org.apache.lucene.index.MultiFields; import org.apache.lucene.util.BytesRefIterator; import org.apache.lucene.util.BytesRef; /** * HighFrequencyDictionary: terms taken from the given field * of a Lucene index, which appear in a number of documents * above a given threshold. * * Threshold is a value in [0..1] representing the minimum * number of documents (of the total) where a term should appear. * * Based on LuceneDictionary. */ public class HighFrequencyDictionary implements Dictionary { private IndexReader reader; private String field; private float thresh; /** * Creates a new Dictionary, pulling source terms from * the specified <code>field</code> in the provided <code>reader</code>. * <p> * Terms appearing in less than <code>thres</code> percentage of documents * will be excluded. */ public HighFrequencyDictionary(IndexReader reader, String field, float thresh) { this.reader = reader; this.field = field; this.thresh = thresh; } public final BytesRefIterator getWordsIterator() throws IOException { return new HighFrequencyIterator(); } final class HighFrequencyIterator implements TermFreqIterator { private final BytesRef spare = new BytesRef(); private final TermsEnum termsEnum; private int minNumDocs; private long freq; HighFrequencyIterator() throws IOException { Terms terms = MultiFields.getTerms(reader, field); if (terms != null) { termsEnum = terms.iterator(null); } else { termsEnum = null; } minNumDocs = (int)(thresh * (float)reader.numDocs()); } private boolean isFrequent(int freq) { return freq >= minNumDocs; } public long weight() { return freq; } @Override public BytesRef next() throws IOException { if (termsEnum != null) { BytesRef next; while((next = termsEnum.next()) != null) { if (isFrequent(termsEnum.docFreq())) { freq = termsEnum.docFreq(); spare.copyBytes(next); return spare; } } } return null; } @Override public Comparator<BytesRef> getComparator() { if (termsEnum == null) { return null; } else { return termsEnum.getComparator(); } } } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
d70e5cf0d4b6fe3dfabb3a9065c1ee55ed49f922
40ad7f3cbfcc711d0fe40c2becde9b726dd35d86
/query/spark-2.2/q92/q92_jobid_3_stageid_6_taskid_3361_shuffleTask_18_execid_4_302475899.java
3832571b858ff00db2e72a4aa0d36247777cb6bc
[]
no_license
kmadhugit/spark-tpcds-99-generated-code
f2ed0f40f031b58b6af2396b7248e776706dcc18
8483bdf3d8477e63bce1bb65493d2af5c9207ae7
refs/heads/master
2020-05-30T19:39:55.759974
2017-11-14T09:54:56
2017-11-14T09:54:56
83,679,481
1
1
null
2017-11-14T10:45:07
2017-03-02T13:15:25
Java
UTF-8
Java
false
false
4,642
java
/* 001 */ public Object generate(Object[] references) { /* 002 */ return new GeneratedIterator(references); /* 003 */ } /* 004 */ /* 005 */ final class GeneratedIterator extends org.apache.spark.sql.execution.BufferedRowIterator { /* 006 */ private Object[] references; /* 007 */ private scala.collection.Iterator[] inputs; /* 008 */ private boolean agg_initAgg; /* 009 */ private boolean agg_bufIsNull; /* 010 */ private double agg_bufValue; /* 011 */ private scala.collection.Iterator inputadapter_input; /* 012 */ private org.apache.spark.sql.execution.metric.SQLMetric agg_numOutputRows; /* 013 */ private org.apache.spark.sql.execution.metric.SQLMetric agg_aggTime; /* 014 */ private UnsafeRow agg_result; /* 015 */ private org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder agg_holder; /* 016 */ private org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter agg_rowWriter; /* 017 */ /* 018 */ public GeneratedIterator(Object[] references) { /* 019 */ this.references = references; /* 020 */ } /* 021 */ /* 022 */ public void init(int index, scala.collection.Iterator[] inputs) { /* 023 */ partitionIndex = index; /* 024 */ this.inputs = inputs; /* 025 */ agg_initAgg = false; /* 026 */ /* 027 */ inputadapter_input = inputs[0]; /* 028 */ this.agg_numOutputRows = (org.apache.spark.sql.execution.metric.SQLMetric) references[0]; /* 029 */ this.agg_aggTime = (org.apache.spark.sql.execution.metric.SQLMetric) references[1]; /* 030 */ agg_result = new UnsafeRow(1); /* 031 */ this.agg_holder = new org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder(agg_result, 0); /* 032 */ this.agg_rowWriter = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(agg_holder, 1); /* 033 */ /* 034 */ } /* 035 */ /* 036 */ private void agg_doAggregateWithoutKey() throws java.io.IOException { /* 037 */ // initialize aggregation buffer /* 038 */ final double agg_value = -1.0; /* 039 */ agg_bufIsNull = true; /* 040 */ agg_bufValue = agg_value; /* 041 */ /* 042 */ while (inputadapter_input.hasNext() && !stopEarly()) { /* 043 */ InternalRow inputadapter_row = (InternalRow) inputadapter_input.next(); /* 044 */ boolean inputadapter_isNull = inputadapter_row.isNullAt(0); /* 045 */ double inputadapter_value = inputadapter_isNull ? -1.0 : (inputadapter_row.getDouble(0)); /* 046 */ /* 047 */ // do aggregate /* 048 */ // common sub-expressions /* 049 */ /* 050 */ // evaluate aggregate function /* 051 */ boolean agg_isNull4 = true; /* 052 */ double agg_value4 = -1.0; /* 053 */ /* 054 */ boolean agg_isNull5 = agg_bufIsNull; /* 055 */ double agg_value5 = agg_bufValue; /* 056 */ if (agg_isNull5) { /* 057 */ boolean agg_isNull7 = false; /* 058 */ double agg_value7 = -1.0; /* 059 */ if (!false) { /* 060 */ agg_value7 = (double) 0; /* 061 */ } /* 062 */ if (!agg_isNull7) { /* 063 */ agg_isNull5 = false; /* 064 */ agg_value5 = agg_value7; /* 065 */ } /* 066 */ } /* 067 */ /* 068 */ if (!inputadapter_isNull) { /* 069 */ agg_isNull4 = false; // resultCode could change nullability. /* 070 */ agg_value4 = agg_value5 + inputadapter_value; /* 071 */ /* 072 */ } /* 073 */ boolean agg_isNull3 = agg_isNull4; /* 074 */ double agg_value3 = agg_value4; /* 075 */ if (agg_isNull3) { /* 076 */ if (!agg_bufIsNull) { /* 077 */ agg_isNull3 = false; /* 078 */ agg_value3 = agg_bufValue; /* 079 */ } /* 080 */ } /* 081 */ // update aggregation buffer /* 082 */ agg_bufIsNull = agg_isNull3; /* 083 */ agg_bufValue = agg_value3; /* 084 */ if (shouldStop()) return; /* 085 */ } /* 086 */ /* 087 */ } /* 088 */ /* 089 */ protected void processNext() throws java.io.IOException { /* 090 */ while (!agg_initAgg) { /* 091 */ agg_initAgg = true; /* 092 */ long agg_beforeAgg = System.nanoTime(); /* 093 */ agg_doAggregateWithoutKey(); /* 094 */ agg_aggTime.add((System.nanoTime() - agg_beforeAgg) / 1000000); /* 095 */ /* 096 */ // output the result /* 097 */ /* 098 */ agg_numOutputRows.add(1); /* 099 */ agg_rowWriter.zeroOutNullBytes(); /* 100 */ /* 101 */ if (agg_bufIsNull) { /* 102 */ agg_rowWriter.setNullAt(0); /* 103 */ } else { /* 104 */ agg_rowWriter.write(0, agg_bufValue); /* 105 */ } /* 106 */ append(agg_result); /* 107 */ } /* 108 */ } /* 109 */ }
[ "kavana.bhat@in.ibm.com" ]
kavana.bhat@in.ibm.com
e734cdfa201db1e2faf17a381a7641284795bd1f
854408f70611cce30522f95add6a87dfff175739
/indexr-query-opt/src/main/java/org/apache/spark/memory/MemoryConsumer.java
f21c709bdb4fcbd25a65380d270ca39ec6a10ba5
[ "Apache-2.0" ]
permissive
zhangxiangyang/indexr
eb22ac91bd93e97129f683692b591f4686099241
47de2310282f7624a7a20039e272733d8da7a690
refs/heads/master
2020-04-15T05:16:03.822499
2019-02-25T07:15:06
2019-02-25T07:15:06
97,819,571
0
0
Apache-2.0
2018-06-13T01:20:51
2017-07-20T09:54:43
Java
UTF-8
Java
false
false
4,242
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.spark.memory; import org.apache.spark.unsafe.array.LongArray; import org.apache.spark.unsafe.memory.MemoryBlock; import java.io.IOException; /** * An memory consumer of TaskMemoryManager, which support spilling. * * Note: this only supports allocation / spilling of Tungsten memory. */ public abstract class MemoryConsumer { protected final TaskMemoryManager taskMemoryManager; private final long pageSize; protected long used; protected MemoryConsumer(TaskMemoryManager taskMemoryManager, long pageSize) { this.taskMemoryManager = taskMemoryManager; this.pageSize = pageSize; } protected MemoryConsumer(TaskMemoryManager taskMemoryManager) { this(taskMemoryManager, taskMemoryManager.pageSizeBytes()); } /** * Returns the size of used memory in bytes. */ long getUsed() { return used; } /** * Force spill during building. * * For testing. */ public void spill() throws IOException { spill(Long.MAX_VALUE, this); } /** * Spill some data to disk to release memory, which will be called by TaskMemoryManager * when there is not enough memory for the task. * * This should be implemented by subclass. * * Note: In order to avoid possible deadlock, should not call acquireMemory() from spill(). * * Note: today, this only frees Tungsten-managed pages. * * @param size the amount of memory should be released * @param trigger the MemoryConsumer that trigger this spilling * @return the amount of released memory in bytes */ public abstract long spill(long size, MemoryConsumer trigger) throws IOException; /** * Allocates a LongArray of `size`. */ public LongArray allocateArray(long size) { long required = size * 8L; MemoryBlock page = taskMemoryManager.allocatePage(required, this); if (page == null || page.size() < required) { long got = 0; if (page != null) { got = page.size(); taskMemoryManager.freePage(page, this); } taskMemoryManager.showMemoryUsage(); throw new OutOfMemoryError("Unable to acquire " + required + " bytes of memory, got " + got); } used += required; return new LongArray(page); } /** * Frees a LongArray. */ public void freeArray(LongArray array) { freePage(array.memoryBlock()); } /** * Allocate a memory block with at least `required` bytes. * * Throws IOException if there is not enough memory. */ protected MemoryBlock allocatePage(long required) { MemoryBlock page = taskMemoryManager.allocatePage(Math.max(pageSize, required), this); if (page == null || page.size() < required) { long got = 0; if (page != null) { got = page.size(); taskMemoryManager.freePage(page, this); } taskMemoryManager.showMemoryUsage(); throw new OutOfMemoryError("Unable to acquire " + required + " bytes of memory, got " + got); } used += page.size(); return page; } /** * Free a memory block. */ protected void freePage(MemoryBlock page) { used -= page.size(); taskMemoryManager.freePage(page, this); } }
[ "flowbehappy@gmail.com" ]
flowbehappy@gmail.com
cbc3f93d2e178899629e6f44d3ddb7656971582d
c9480e70c4054dc0f1aac81acaaee0c31927d37a
/benchmark/src/main/java/eu/javaspecialists/books/dynamicproxies/ch03/benchmarks/BenchmarkRunner.java
b70ed35a616e0914514fad1ddc06d4e1baa46d35
[ "Apache-2.0" ]
permissive
desinas/dynamic-proxies-samples
e405057442cb50b3c3c2b58da9e74d71c02fccfe
870c375a9eac4db25632e20bb5074cf028d6b1fa
refs/heads/master
2022-02-04T20:01:57.835072
2022-01-26T11:43:42
2022-01-26T11:43:42
223,219,146
0
0
Apache-2.0
2019-11-21T16:39:37
2019-11-21T16:39:36
null
UTF-8
Java
false
false
3,565
java
/* * Copyright (C) 2020 Heinz Max Kabutz * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. Heinz Max Kabutz * 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 eu.javaspecialists.books.dynamicproxies.ch03.benchmarks; import org.openjdk.jmh.runner.*; import org.openjdk.jmh.runner.options.*; public class BenchmarkRunner { public static void main(String... args) throws RunnerException { String name = MethodCallBenchmark.class.getName(); // Object Allocation with Escape Analysis ON new Runner( new OptionsBuilder() .include(name) .forks(1) .jvmArgsAppend( "-XX:+DoEscapeAnalysis", "-XX:+UseParallelGC") .warmupIterations(3) .warmupTime(TimeValue.seconds(1)) .measurementIterations(3) .measurementTime(TimeValue.seconds(1)) .addProfiler("gc") .build()).run(); // Object Allocation with Escape Analysis OFF new Runner( new OptionsBuilder() .include(name) .forks(1) .jvmArgsAppend( "-XX:-DoEscapeAnalysis", "-XX:+UseParallelGC") .warmupIterations(3) .warmupTime(TimeValue.seconds(1)) .measurementIterations(3) .measurementTime(TimeValue.seconds(1)) .addProfiler("gc") .build()).run(); // Object Allocation with Escape Analysis OFF no turbo boost new Runner( new OptionsBuilder() .include(name) .forks(1) .jvmArgsAppend( "-XX:-DoEscapeAnalysis", "-XX:+UseParallelGC", "-Deu.javaspecialists.books.dynamicproxies" + ".util.MethodTurboBooster.disabled=true") .warmupIterations(3) .warmupTime(TimeValue.seconds(1)) .measurementIterations(3) .measurementTime(TimeValue.seconds(1)) .addProfiler("gc") .build()).run(); new Runner( new OptionsBuilder() .include(name) .forks(3) .jvmArgsAppend( "-XX:+UseParallelGC", "-Deu.javaspecialists.books.dynamicproxies" + ".util.MethodTurboBooster.disabled=false") .warmupIterations(50) .warmupTime(TimeValue.seconds(1)) .measurementIterations(50) .measurementTime(TimeValue.seconds(1)) .build()).run(); new Runner( new OptionsBuilder() .include(name) .forks(3) .jvmArgsAppend( "-XX:+UseParallelGC", "-Deu.javaspecialists.books.dynamicproxies" + ".util.MethodTurboBooster.disabled=true") .warmupIterations(50) .warmupTime(TimeValue.seconds(1)) .measurementIterations(50) .measurementTime(TimeValue.seconds(1)) .build()).run(); } }
[ "heinz@javaspecialists.eu" ]
heinz@javaspecialists.eu
9eb2fb5e39f17963cd68201e02a6f49a15dae06b
f08256664e46e5ac1466f5c67dadce9e19b4e173
/sources/com/google/android/gms/common/api/internal/C9750j.java
9e834067b5f2bbf167cc958fbbb04eaaa1686785
[]
no_license
IOIIIO/DisneyPlusSource
5f981420df36bfbc3313756ffc7872d84246488d
658947960bd71c0582324f045a400ae6c3147cc3
refs/heads/master
2020-09-30T22:33:43.011489
2019-12-11T22:27:58
2019-12-11T22:27:58
227,382,471
6
3
null
null
null
null
UTF-8
Java
false
false
515
java
package com.google.android.gms.common.api.internal; import java.util.Collections; import java.util.Set; import java.util.WeakHashMap; /* renamed from: com.google.android.gms.common.api.internal.j */ public class C9750j { /* renamed from: a */ private final Set<C9745i<?>> f22860a = Collections.newSetFromMap(new WeakHashMap()); /* renamed from: a */ public final void mo25193a() { for (C9745i a : this.f22860a) { a.mo25185a(); } this.f22860a.clear(); } }
[ "101110@vivaldi.net" ]
101110@vivaldi.net
a888a57a7ba14c9873d238458fd0b08f6d19d696
dc25b23f8132469fd95cee14189672cebc06aa56
/vendor/mediatek/proprietary/packages/apps/Bluetooth/profiles/timec/src/com/mediatek/bluetooth/time/client/TimeClientReceiver.java
50403d99ba44983192e599e3750cb29e60093618
[]
no_license
nofearnohappy/alps_mm
b407d3ab2ea9fa0a36d09333a2af480b42cfe65c
9907611f8c2298fe4a45767df91276ec3118dd27
refs/heads/master
2020-04-23T08:46:58.421689
2019-03-28T21:19:33
2019-03-28T21:19:33
171,048,255
1
5
null
2020-03-08T03:49:37
2019-02-16T20:25:00
Java
UTF-8
Java
false
false
3,523
java
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ package com.mediatek.bluetooth.time.client; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; public class TimeClientReceiver extends BroadcastReceiver { private static final String TAG = "TimeClientReceiver"; protected static final String DEVICE = "bt_time_device"; private static Handler mHandler; @Override public void onReceive(Context context, Intent intent) { TimeClientLog.d(TAG, "onReceived()"); BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); if (device == null) { TimeClientLog.w(TAG, "Selected device is null."); return; } if (mHandler == null) { TimeClientLog.e(TAG, "Handler is not specified."); return; } Bundle data = new Bundle(); data.putParcelable(DEVICE, device); Message msg = mHandler.obtainMessage(); msg.what = TimeClientConstants.MSG_SERVER_SELECTED; msg.setData(data); mHandler.sendMessage(msg); } protected static boolean setHandler(Handler handler) { if (handler != null) { mHandler = handler; return true; } return false; } protected static void clearHandler() { mHandler = null; } }
[ "fetpoh@mail.ru" ]
fetpoh@mail.ru
1850261231028fd35f2f50b1cef5c9bc184d0ccc
6c2861ba4fbde3fe7257d1aa9fc0f4943cb8e7a7
/37_Homwork03_VoThiTu/src/swing/MyBoLayOut.java
56b61b72cb089e9571e843bb278b2d9ef2e2a25a
[]
no_license
vothitu/fc1-2
8dc724965a98f28548ef8ee01c5283eb816c14a8
2e5099b71b0f0e1addd993a71cef6b9dfe89d702
refs/heads/master
2020-12-06T21:54:48.503899
2020-01-08T12:37:24
2020-01-08T12:37:24
232,559,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
package swing; import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JFrame; public class MyBoLayOut extends JFrame{ private JButton b1,b2,b3,b4,b5; public MyBoLayOut() { super(); super.setTitle("hello"); super.setSize(500, 200); super.setLocationRelativeTo(null); //Frame nam giua man hinh super.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//close program super.setVisible(true);// hien thi JFrame ra man hinh super.setLayout(new BorderLayout()); //default layout cua frame la BoorderLayout // doan lenh 2: thiet lap cac components b1 = new JButton("press me"); b2 = new JButton("Im a button"); b3 = new JButton("3"); b4 = new JButton("button 4"); b5 = new JButton("Hello 5"); //doan lenh 3: dua cac components vao container super.add(b1,BorderLayout.NORTH); super.add(b2,BorderLayout.SOUTH); super.add(b3,BorderLayout.EAST); super.add(b4,BorderLayout.WEST); super.add(b5,BorderLayout.CENTER); } public static void main(String[] args) { MyBoLayOut t= new MyBoLayOut(); t.show(); } }
[ "=" ]
=
890e5d0938f6628117f8c3f5d8ebe6ccc9811733
bfed0d992f925ee137eb94026f0283724eba17fa
/V4.0/ZDK/src/nl/zeesoft/zdk/htm/util/SDRSet.java
fc1198cc2996243122cc9157c03efb9c4692f963
[]
no_license
DyzLecticus/Zeesoft
c17c469b000f15301ff2be6c19671b12bba25f99
b5053b762627762ffeaa2de4f779d6e1524a936d
refs/heads/master
2023-04-15T01:42:36.260351
2023-04-10T06:50:40
2023-04-10T06:50:40
28,697,832
7
2
null
2023-02-27T16:30:37
2015-01-01T22:57:39
Java
UTF-8
Java
false
false
1,558
java
package nl.zeesoft.zdk.htm.util; import java.util.ArrayList; import java.util.List; import java.util.SortedMap; import java.util.TreeMap; import nl.zeesoft.zdk.ZStringBuilder; public class SDRSet extends SDRMap { private SortedMap<ZStringBuilder,List<SDRMapElement>> matchMap = new TreeMap<ZStringBuilder,List<SDRMapElement>>(); public SDRSet(int length,int bits) { super(length,bits,true); } @Override public SDRMapElement add(SDR sdr,Object value) { SDRMapElement r = null; ZStringBuilder key = sdr.toStringBuilder(); boolean updated = false; if (matchMap.containsKey(key)) { List<SDRMapElement> list = matchMap.get(key); for (SDRMapElement element: list) { if (value!=null) { if (value.equals(element.value)) { toLast(element); updated = true; } } else { toLast(element); updated = true; } } } if (!updated) { r = super.add(sdr,value); if (r!=null) { List<SDRMapElement> list = matchMap.get(key); if (list==null) { list = new ArrayList<SDRMapElement>(); matchMap.put(key,list); } list.add(r); } } return r; } @Override public SDRMapElement remove(int index) { SDRMapElement r = super.remove(index); if (r!=null) { ZStringBuilder key = r.key.toStringBuilder(); List<SDRMapElement> list = matchMap.get(key); if (list!=null) { list.remove(r); if (list.size()==0) { matchMap.remove(key); } } } return r; } @Override public void setBit(int index,int bitIndex,boolean on) { // Not allowed } }
[ "dyz@xs4all.nl" ]
dyz@xs4all.nl
d2d8ef68e640d57f2e0d8c14ba062aeb70459fc7
75c8d4d130bb8588313344d15f9e33b15e813791
/java/l2server/gameserver/network/loginserverpackets/InitLS.java
545c908b3f7764029703dc71b02ca9abf9e7f96b
[]
no_license
Hl4p3x/L2T_Server
2fd6a94f388679100115a4fb5928a8e7630656f7
66134d76aa22f90933af9119c7b198c4960283d3
refs/heads/master
2022-09-11T05:59:46.310447
2022-08-17T19:54:58
2022-08-17T19:54:58
126,422,985
2
2
null
2022-08-17T19:55:00
2018-03-23T02:38:43
Java
UTF-8
Java
false
false
1,093
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package l2server.gameserver.network.loginserverpackets; import l2server.util.network.BaseRecievePacket; public class InitLS extends BaseRecievePacket { private int _rev; private byte[] _key; public int getRevision() { return _rev; } public byte[] getRSAKey() { return _key; } /** * @param decrypt */ public InitLS(byte[] decrypt) { super(decrypt); _rev = readD(); int size = readD(); _key = readB(size); } }
[ "pere@pcasafont.net" ]
pere@pcasafont.net
047a6cf8336473531f7e46bdb659de675ea31b8e
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-32b-2-25-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/geometry/partitioning/AbstractRegion_ESTest.java
6ff93792f3b270e1511e5c54f5038497a1da0292
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
1,341
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 14:40:20 UTC 2020 */ package org.apache.commons.math3.geometry.partitioning; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.LinkedList; import org.apache.commons.math3.geometry.euclidean.oned.Euclidean1D; import org.apache.commons.math3.geometry.euclidean.twod.Euclidean2D; import org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet; import org.apache.commons.math3.geometry.partitioning.BSPTree; import org.apache.commons.math3.geometry.partitioning.SubHyperplane; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractRegion_ESTest extends AbstractRegion_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { LinkedList<SubHyperplane<Euclidean1D>> linkedList0 = new LinkedList<SubHyperplane<Euclidean1D>>(); PolygonsSet polygonsSet0 = new PolygonsSet(); BSPTree<Euclidean2D> bSPTree0 = new BSPTree<Euclidean2D>(linkedList0); PolygonsSet polygonsSet1 = polygonsSet0.buildNew(bSPTree0); // Undeclared exception! polygonsSet1.getSize(); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6f245f312e1606495004dc18c1d9db7b5db3abe4
f94510f053eeb8dd18ea5bfde07f4bf6425401c2
/app/src/main/java/com/zhiyicx/thinksnsplus/modules/home/message/messagecomment/MessageCommentPresenterModule.java
3e483e6699fe89669c16ab0bfd282e5ce7a84753
[]
no_license
firwind/3fou_com_android
e13609873ae030f151c62dfaf836a858872fa44c
717767cdf96fc2f89238c20536fa4b581a22d9aa
refs/heads/master
2020-03-28T09:02:56.431407
2018-09-07T02:14:54
2018-09-07T02:14:54
148,009,743
1
0
null
null
null
null
UTF-8
Java
false
false
536
java
package com.zhiyicx.thinksnsplus.modules.home.message.messagecomment; import dagger.Module; import dagger.Provides; /** * @Describe * @Author zl * @Date 2017/2/8 * @Contact master.jungle68@gmail.com */ @Module public class MessageCommentPresenterModule { private final MessageCommentContract.View mView; public MessageCommentPresenterModule(MessageCommentContract.View view) { mView = view; } @Provides MessageCommentContract.View provideMessageCommentContractView() { return mView; } }
[ "1428907383@qq.com" ]
1428907383@qq.com
f442d5500c3af8233309002a5fd289e6c80a0c11
63d73ee84538e9898979ed91fb61597998d44158
/HolographicDisplays/src/com/gmail/filoghost/holograms/nms/v1_7_R1/CraftHologramWitherSkull.java
7317e83f0d39ccbf535f7b66586ab57ac488d4bb
[]
no_license
PlusMCPKBPK/HolographicDisplays
25ae5ba36c00170f3c56cf7ba2f90d1f50abea03
58ca0491497a52f299f6fa4f156d07bd697a3ae7
refs/heads/master
2020-12-07T02:16:09.889527
2014-12-06T18:09:38
2014-12-06T18:09:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,710
java
package com.gmail.filoghost.holograms.nms.v1_7_R1; import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_7_R1.CraftServer; import org.bukkit.craftbukkit.v1_7_R1.entity.CraftWitherSkull; import org.bukkit.entity.Entity; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import org.bukkit.util.Vector; public class CraftHologramWitherSkull extends CraftWitherSkull { public CraftHologramWitherSkull(CraftServer server, EntityHologramWitherSkull entity) { super(server, entity); } // Disallow all the bukkit methods. @Override public void remove() { // Cannot be removed, this is the most important to override. } // Method from Fireball @Override public void setDirection(Vector dir) { } // Method from Projectile @Override public void setBounce(boolean bounce) { } // Methods from Explosive @Override public void setYield(float yield) { } @Override public void setIsIncendiary(boolean fire) { } // Methods from Entity @Override public void setVelocity(Vector vel) { } @Override public boolean teleport(Location loc) { return false; } @Override public boolean teleport(Entity entity) { return false; } @Override public boolean teleport(Location loc, TeleportCause cause) { return false; } @Override public boolean teleport(Entity entity, TeleportCause cause) { return false; } @Override public void setFireTicks(int ticks) { } @Override public boolean setPassenger(Entity entity) { return false; } @Override public boolean eject() { return false; } @Override public boolean leaveVehicle() { return false; } @Override public void playEffect(EntityEffect effect) { } }
[ "filoghost@gmail.com" ]
filoghost@gmail.com
a6a5ff81c16a1d48ee135ba373ad7e2ba5b542e6
5bee638e7ea3cbe9982432e54f1defff0b858a24
/src/java/co/com/siscomputo/endpoint/InsertarTipoControlDistribucionResponse.java
12631d17b77cec68e656f05effb3a9db57c3ed7b
[]
no_license
oscar1992/ISODOC
baa5e38f6b52fae1d766a9bc32841ed26b1694ee
3ebfc61adb4844322eaae8899613641c24183697
refs/heads/master
2021-01-10T06:03:41.422443
2016-02-19T22:30:38
2016-02-19T22:30:38
45,137,805
0
0
null
null
null
null
UTF-8
Java
false
false
1,678
java
package co.com.siscomputo.endpoint; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Clase Java para insertarTipoControlDistribucionResponse complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType name="insertarTipoControlDistribucionResponse"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="return" type="{http://endpoint.siscomputo.com.co/}tipoControlDistribucionEntity" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "insertarTipoControlDistribucionResponse", propOrder = { "_return" }) public class InsertarTipoControlDistribucionResponse { @XmlElement(name = "return") protected TipoControlDistribucionEntity _return; /** * Obtiene el valor de la propiedad return. * * @return * possible object is * {@link TipoControlDistribucionEntity } * */ public TipoControlDistribucionEntity getReturn() { return _return; } /** * Define el valor de la propiedad return. * * @param value * allowed object is * {@link TipoControlDistribucionEntity } * */ public void setReturn(TipoControlDistribucionEntity value) { this._return = value; } }
[ "LENOVO@LENOVO-PC" ]
LENOVO@LENOVO-PC
577ea209ffa3ecf160005a1eb5306a569996ea84
9213f5081537b282ded897d5d5edd9fc1ede1069
/forge/src/main/java/spaceage/common/tile/TileSilverCable.java
36ec093375af68a808a77b6bdc56fe71a625644f
[]
no_license
AwesCorp/SpaceAge-1.7.10
1bddf1c55176e4a45be7d71d24da9c64b624113c
405b61e588bc6fd6212e695e5d49806dcea73505
refs/heads/master
2021-01-20T07:12:36.503924
2015-02-05T12:37:57
2015-02-05T12:37:57
29,997,649
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
package spaceage.common.tile; import uedevkit.tile.TileCableBase; import net.minecraft.tileentity.TileEntity; public class TileSilverCable extends TileCableBase { @Override public float getResistance() { return 1.59F; } }
[ "joelsminecraft@phillipswa.com" ]
joelsminecraft@phillipswa.com
29b67dfdf214afacfc38f82bc07b4a870fad7a43
72e1e90dd8e1e43bad4a6ba46a44d1f30aa76fe6
/java/spring/pro-spring-5/pro-spring-5-chapter05-introducing-spring-aop/pro-spring-5-chapter05-part09-simple-name-matching/src/main/java/com/apress/prospring5/ch5/NamePointcutUsingAdvisor.java
ef3cc7684874848662f2b592e6dc6f192b4955e7
[ "Apache-2.0" ]
permissive
fernando-romulo-silva/myStudies
bfdf9f02778d2f4993999f0ffc0ddd0066ec41b4
aa8867cda5edd54348f59583555b1f8fff3cd6b3
refs/heads/master
2023-08-16T17:18:50.665674
2023-08-09T19:47:15
2023-08-09T19:47:15
230,160,136
3
0
Apache-2.0
2023-02-08T19:49:02
2019-12-25T22:27:59
null
UTF-8
Java
false
false
897
java
package com.apress.prospring5.ch5; import com.apress.prospring5.ch2.common.Guitar; import org.springframework.aop.Advisor; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.NameMatchMethodPointcut; import org.springframework.aop.support.NameMatchMethodPointcutAdvisor; /** * Created by iuliana.cosmina on 4/2/17. */ public class NamePointcutUsingAdvisor { public static void main(String... args) { GrammyGuitarist johnMayer = new GrammyGuitarist(); NameMatchMethodPointcutAdvisor advisor = new NameMatchMethodPointcutAdvisor(new SimpleAdvice()); advisor.setMappedNames("sing"); advisor.setMappedNames("rest"); ProxyFactory pf = new ProxyFactory(); pf.setTarget(johnMayer); pf.addAdvisor(advisor); GrammyGuitarist proxy = (GrammyGuitarist) pf.getProxy(); proxy.sing(); proxy.sing(new Guitar()); proxy.rest(); proxy.talk(); } }
[ "fernando.romulo.silva@gmail.com" ]
fernando.romulo.silva@gmail.com
12bda5938910caf71eeb55dcac9d02a540f421db
7ce370b237e933871e9d1c24aabe674e8e26659b
/project/giving-batch/src/generated/com/virginmoneygiving/givingmanagement/service/messages/SaveTrusteeCountRequest.java
e625479f60ae079ec29c75db2d4e588a462473ee
[]
no_license
ankurmitujjain/virginmoney
16c21fb7ba03b70f8fab02f6543e6531c275cfab
2355ea70b25ac00c212f8968f072365a53ef0cbc
refs/heads/master
2020-12-31T04:42:42.191330
2009-09-18T06:40:02
2009-09-18T06:40:02
57,319,348
0
0
null
null
null
null
UTF-8
Java
false
false
2,561
java
package com.virginmoneygiving.givingmanagement.service.messages; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Header" type="{http://www.virginmoneygiving.com/type/header/}MessageHeader"/> * &lt;element name="charityId" type="{http://www.w3.org/2001/XMLSchema}long"/> * &lt;element name="trusteeCount" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "header", "charityId", "trusteeCount" }) @XmlRootElement(name = "saveTrusteeCountRequest") public class SaveTrusteeCountRequest { @XmlElement(name = "Header", required = true) protected MessageHeader header; protected long charityId; protected int trusteeCount; /** * Gets the value of the header property. * * @return * possible object is * {@link MessageHeader } * */ public MessageHeader getHeader() { return header; } /** * Sets the value of the header property. * * @param value * allowed object is * {@link MessageHeader } * */ public void setHeader(MessageHeader value) { this.header = value; } /** * Gets the value of the charityId property. * */ public long getCharityId() { return charityId; } /** * Sets the value of the charityId property. * */ public void setCharityId(long value) { this.charityId = value; } /** * Gets the value of the trusteeCount property. * */ public int getTrusteeCount() { return trusteeCount; } /** * Sets the value of the trusteeCount property. * */ public void setTrusteeCount(int value) { this.trusteeCount = value; } }
[ "ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47" ]
ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47
ac4b9614390ca8ac40544a5eaaed71b30166ae82
4f707b4609bbaa053ff6fb7dc9e26e57315b1e71
/src/sysapp/cn/com/infostrategy/bs/sysapp/cometpush/ServerPushToClientUtil.java
5541273b9150a0f63ac9240ee2b8cdd6cbc533b9
[]
no_license
wnsalary/weblight
16f14e446b3aa44d66a9efef50d236e1c132b289
8b9a1700728c003862f55506ab7b600ef7006be2
refs/heads/master
2022-12-17T11:42:43.373712
2020-09-23T07:28:19
2020-09-23T07:28:19
263,282,545
1
0
null
null
null
null
GB18030
Java
false
false
2,700
java
package cn.com.infostrategy.bs.sysapp.cometpush; import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import cn.com.infostrategy.to.common.LongPushParVO; import cn.com.infostrategy.to.common.WLTRemoteException; /** * 服务器端推送消息工具类。 * 自己在客户端写一个接口。然后实现接口,平台提供了ServerPushToClientIFC接口. * 服务器端直接代理该类. * @author haoming * create by 2013-12-2 */ public class ServerPushToClientUtil implements Serializable { private static final long serialVersionUID = 2236671597950267123L; public static final String PUSH_TYPE_ONLINE = "ONLINE"; public static final String PUSH_TYPE_EXCEPT_ME = "EM"; //除了自己 public static final String PUSH_TYPE_BY_SESSION = "SESSION"; //通过对方session。 public static final String PUSH_TYPE_BY_CODE = "CODE"; //通过对方session。 public static Object lookupClient(Class _class, PushConfigVO configvo) { Object serviceobj = Proxy.newProxyInstance(_class.getClassLoader(), _class.getInterfaces(), new RemoteCallClientHandler(_class, configvo)); return serviceobj; } private static class RemoteCallClientHandler implements InvocationHandler { private Class serviceName = null; private PushConfigVO configvo; public RemoteCallClientHandler(Class _serviceName, PushConfigVO _configvo) { this.serviceName = _serviceName; //远程服务名 configvo = _configvo; } public Object invoke(Object proxy, Method method, Object[] args) throws WLTRemoteException, Throwable { Class[] pars_class = method.getParameterTypes(); // LongPushParVO pushvo = new LongPushParVO(serviceName, method, pars_class, args); byte b[] = serialize(pushvo); byte endb[] = "$end$".getBytes(); //加结束标识。 byte[] data3 = new byte[b.length + endb.length]; System.arraycopy(b, 0, data3, 0, b.length); System.arraycopy(endb, 0, data3, b.length, endb.length); configvo.setMessage(data3); ServerPushToClientServlet.send(configvo); return ""; // } } /** * 序列化一个对象.. * @param _obj * @return */ private static synchronized byte[] serialize(Object _obj) { ByteArrayOutputStream buf = null; // ObjectOutputStream out = null; // try { buf = new ByteArrayOutputStream(); out = new ObjectOutputStream(buf); out.writeObject(_obj); byte[] bytes = buf.toByteArray(); return bytes; // } catch (Exception ex) { ex.printStackTrace(); // return null; // } finally { try { out.close(); // } catch (Exception e) { } } } }
[ "17744571124@163.com" ]
17744571124@163.com
77cf1ca7bfb49b7b10cc1afc10e6847fe7b9bd3c
a6744f48b9c7e0bd19b11e46741bdc198de236fc
/4-mvc-crud-module/spring-mvc-crud-crm-add-customer/src/com/martimlima/springcourse/mvccrudmodule/addcustomer/springdemo/service/CustomerServiceImpl.java
ee065c9934faa27e9d5af7b567475f5841efb0bb
[]
no_license
martimdLima/spring-and-hibernate-course
887d6282845d73bc224b9c7556af61d8b03e0f94
f0a1287c347a54843c873952e8259b0753d6f7e3
refs/heads/main
2022-12-31T11:55:57.605932
2020-10-14T21:05:02
2020-10-14T21:05:02
303,544,909
0
0
null
null
null
null
UTF-8
Java
false
false
851
java
package com.martimlima.springcourse.mvccrudmodule.addcustomer.springdemo.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.martimlima.springcourse.mvccrudmodule.addcustomer.springdemo.dao.CustomerDAO; import com.martimlima.springcourse.mvccrudmodule.addcustomer.springdemo.entity.Customer; @Service public class CustomerServiceImpl implements CustomerService { // need to inject customer dao @Autowired private CustomerDAO customerDAO; @Override @Transactional public List<Customer> getCustomers() { return customerDAO.getCustomers(); } @Override @Transactional public void saveCustomer(Customer theCustomer) { customerDAO.saveCustomer(theCustomer); } }
[ "martim.d.lima@protonmail.com" ]
martim.d.lima@protonmail.com
009aa5fe708b04675fd8a718f62165ff2c63f497
71fc3a953626c2e38c9149bd59f5ca45b0bd5156
/sobey-projects/cmdbuild/src/main/java/com/sobey/cmdbuild/entity/SubnetHistory.java
e2825b50ef4aaadabfaa4d04f14a61f18fef4ba2
[]
no_license
scottzf/sobey-zhangfan
dc3dd00b01a04b051f2ad8babcd5a3ccd8a9dfa1
7e7223b0ed52e2ae82c1fa55ba12df620feb49ae
refs/heads/master
2021-01-22T18:10:34.736514
2015-03-12T12:54:22
2015-03-12T12:54:22
26,618,087
0
0
null
null
null
null
UTF-8
Java
false
false
2,922
java
package com.sobey.cmdbuild.entity; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import com.sobey.cmdbuild.entity.basic.BasicEntity; /** * IpaddressHistory generated by hbm2java */ @Entity @Table(name = "subnet_history", schema = "public") public class SubnetHistory extends BasicEntity { private Integer defaultSubnet; private Date endDate; private String gateway; private Integer idc; private String netMask; private Integer portIndex; private String remark; private Integer router; private String segment; private Subnet subnet; private Integer tenants; private Integer tunnelId; public SubnetHistory() { } @Column(name = "default_subnet") public Integer getDefaultSubnet() { return defaultSubnet; } @Temporal(TemporalType.TIMESTAMP) @Column(name = "\"EndDate\"", nullable = false, length = 29) public Date getEndDate() { return endDate; } @Column(name = "gateway", length = 100) public String getGateway() { return gateway; } @Column(name = "idc") public Integer getIdc() { return idc; } @Column(name = "net_mask", length = 100) public String getNetMask() { return netMask; } @Column(name = "port_index") public Integer getPortIndex() { return portIndex; } @Column(name = "remark", length = 200) public String getRemark() { return remark; } @Column(name = "router") public Integer getRouter() { return router; } @Column(name = "segment", length = 100) public String getSegment() { return segment; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "\"CurrentId\"", nullable = false) public Subnet getSubnet() { return subnet; } @Column(name = "tenants") public Integer getTenants() { return tenants; } @Column(name = "tunnel_id") public Integer getTunnelId() { return tunnelId; } public void setDefaultSubnet(Integer defaultSubnet) { this.defaultSubnet = defaultSubnet; } public void setEndDate(Date endDate) { this.endDate = endDate; } public void setGateway(String gateway) { this.gateway = gateway; } public void setIdc(Integer idc) { this.idc = idc; } public void setNetMask(String netMask) { this.netMask = netMask; } public void setPortIndex(Integer portIndex) { this.portIndex = portIndex; } public void setRemark(String remark) { this.remark = remark; } public void setRouter(Integer router) { this.router = router; } public void setSegment(String segment) { this.segment = segment; } public void setSubnet(Subnet subnet) { this.subnet = subnet; } public void setTenants(Integer tenants) { this.tenants = tenants; } public void setTunnelId(Integer tunnelId) { this.tunnelId = tunnelId; } }
[ "kai8406@gmail.com" ]
kai8406@gmail.com
e0b7e247aa015cc6d7cf8b3ea3cedb714b9c08a8
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module608/src/main/java/module608packageJava0/Foo186.java
d7ecf88a5216042b3b79caab34f074c7e769fcec
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
351
java
package module608packageJava0; import java.lang.Integer; public class Foo186 { Integer int0; Integer int1; public void foo0() { new module608packageJava0.Foo185().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
4fa4218531b094f9c74257ddd0d7b9cc093f9953
3a924708b134f3ee62398fc8dc552951d14efc6b
/src/main/java/org/colloh/flink/kudu/connector/format/BaseKuduInputFormat.java
aa87c9a8db41dd748588190f29f3ed59af09a597
[]
no_license
stevensam-lin/flink-connector-kudu
a824d26cc978792c1d88cf2beb88c4c0279f30bc
bf0c3fb41286d94927f44ec327c786b7a71ed880
refs/heads/master
2023-07-11T08:57:29.394654
2021-08-21T06:42:38
2021-08-21T06:42:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,087
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.colloh.flink.kudu.connector.format; import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.api.common.io.LocatableInputSplitAssigner; import org.apache.flink.api.common.io.RichInputFormat; import org.apache.flink.api.common.io.statistics.BaseStatistics; import org.apache.flink.api.java.typeutils.ResultTypeQueryable; import org.apache.flink.configuration.Configuration; import org.colloh.flink.kudu.connector.internal.KuduFilterInfo; import org.colloh.flink.kudu.connector.internal.KuduTableInfo; import org.colloh.flink.kudu.connector.internal.convertor.RowResultConvertor; import org.colloh.flink.kudu.connector.internal.reader.KuduInputSplit; import org.colloh.flink.kudu.connector.internal.reader.KuduReader; import org.colloh.flink.kudu.connector.internal.reader.KuduReaderConfig; import org.colloh.flink.kudu.connector.internal.reader.KuduReaderIterator; import org.colloh.flink.kudu.connector.table.catalog.KuduCatalog; import org.apache.flink.core.io.InputSplitAssigner; import org.apache.flink.types.Row; import org.apache.kudu.client.KuduException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static org.apache.flink.util.Preconditions.checkNotNull; /** * Input format for reading the contents of a Kudu table (defined by the provided {@link KuduTableInfo}) in both batch * and stream programs. Rows of the Kudu table are mapped to {@link Row} instances that can converted to other data * types by the user later if necessary. * * <p> For programmatic access to the schema of the input rows users can use the {@link KuduCatalog} * or overwrite the column order manually by providing a list of projected column names. */ @PublicEvolving public abstract class BaseKuduInputFormat<T> extends RichInputFormat<T, KuduInputSplit> implements ResultTypeQueryable<T> { private final Logger log = LoggerFactory.getLogger(getClass()); private final KuduReaderConfig readerConfig; private final KuduTableInfo tableInfo; private final List<KuduFilterInfo> tableFilters; private final List<String> tableProjections; private boolean endReached; private transient KuduReader<T> kuduReader; private transient KuduReaderIterator<T> resultIterator; private final RowResultConvertor<T> rowResultConvertor; public BaseKuduInputFormat(KuduReaderConfig readerConfig, RowResultConvertor<T> rowResultConvertor, KuduTableInfo tableInfo) { this(readerConfig, rowResultConvertor, tableInfo, new ArrayList<>(), null); } public BaseKuduInputFormat(KuduReaderConfig readerConfig, RowResultConvertor<T> rowResultConvertor, KuduTableInfo tableInfo, List<String> tableProjections) { this(readerConfig, rowResultConvertor, tableInfo, new ArrayList<>(), tableProjections); } public BaseKuduInputFormat(KuduReaderConfig readerConfig, RowResultConvertor<T> rowResultConvertor, KuduTableInfo tableInfo, List<KuduFilterInfo> tableFilters, List<String> tableProjections) { this.readerConfig = checkNotNull(readerConfig, "readerConfig could not be null"); this.rowResultConvertor = checkNotNull(rowResultConvertor, "readerConfig could not be null"); this.tableInfo = checkNotNull(tableInfo, "tableInfo could not be null"); this.tableFilters = checkNotNull(tableFilters, "tableFilters could not be null"); this.tableProjections = tableProjections; this.endReached = false; } @Override public void configure(Configuration parameters) { } @Override public void open(KuduInputSplit split) throws IOException { endReached = false; startKuduReader(); resultIterator = kuduReader.scanner(split.getScanToken()); } private void startKuduReader() throws IOException { if (kuduReader == null) { kuduReader = new KuduReader<>(tableInfo, readerConfig, rowResultConvertor, tableFilters, tableProjections); } } @Override public void close() throws IOException { if (resultIterator != null) { try { resultIterator.close(); } catch (KuduException e) { e.printStackTrace(); } } if (kuduReader != null) { kuduReader.close(); kuduReader = null; } } @Override public BaseStatistics getStatistics(BaseStatistics cachedStatistics) throws IOException { return cachedStatistics; } @Override public InputSplitAssigner getInputSplitAssigner(KuduInputSplit[] inputSplits) { return new LocatableInputSplitAssigner(inputSplits); } @Override public KuduInputSplit[] createInputSplits(int minNumSplits) throws IOException { startKuduReader(); return kuduReader.createInputSplits(minNumSplits); } @Override public boolean reachedEnd() { return endReached; } @Override public T nextRecord(T reuse) throws IOException { // check that current iterator has next rows if (this.resultIterator.hasNext()) { return resultIterator.next(); } else { endReached = true; return null; } } }
[ "h1261109615@qq.com" ]
h1261109615@qq.com