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
5c04c780ca9b977803711d036fba71125e1018ad
7806a39c9abe05220813d25bd9b306625c953278
/jkafka-console/src/main/java/me/bliss/kafka/web/home/controller/TopicController.java
3d4459e5cd5f04c900c23047c1a1a0eb1f48ff26
[ "Apache-2.0" ]
permissive
hmfms/Jkafka
86ffe89bcc461a561b6a44e94bf20497eab86fdf
95248f50271060e0e4610a0714128c01395e1c89
refs/heads/master
2020-04-29T18:28:40.923084
2017-07-06T11:54:42
2017-07-06T11:54:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,467
java
package me.bliss.kafka.web.home.controller; import me.bliss.kafka.core.component.ZookeeperComponent; import me.bliss.kafka.model.Topic; import me.bliss.kafka.model.TopicMessage; import me.bliss.kafka.service.TopicService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * * * @author lanjue * @version $Id: me.bliss.kafka.web.controller, v 0.1 4/4/15 * Exp $ */ @Controller @RequestMapping(value = "/topic") public class TopicController { @Autowired private TopicService topicService; @Autowired private ZookeeperComponent zookeeperComponent; @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public List<Topic> getList() { return topicService.getAllTopics(); } @RequestMapping(value = "/messages", method = RequestMethod.GET) @ResponseBody public List<TopicMessage> getAllMessages() { return topicService.getAllMessages(); } public void setTopicService(TopicService topicService) { this.topicService = topicService; } public void setZookeeperComponent(ZookeeperComponent zookeeperComponent) { this.zookeeperComponent = zookeeperComponent; } }
9174e1087498ae4d7fc4f4af1e9d9e0787a25e5e
caa05d82a3e0cf84ae664e18c37e5ca1cb85fd95
/JAVA/src/kr/co/ch/day08/Manager01.java
c48d1add570f6caa3939af280f018509399fd3e0
[]
no_license
park-cheonho/Polytech_JAVA
060e56783a3d18eb47e1b8b82db6ae011aee4cc6
ea52df76f151ce68e6c44bc8c245c443bcadbb45
refs/heads/master
2022-11-09T18:59:26.770482
2020-06-23T23:40:57
2020-06-23T23:40:57
266,079,918
1
0
null
null
null
null
UTF-8
Java
false
false
986
java
package kr.co.ch.day08; public class Manager01 extends Employee { Employee[] empList; public Manager01() { //super(); } public Manager01(int no, String name, String grade, int salary, Employee[] empList) { super(no, name, grade, salary); //this.no = no; //super.no = no; 지만 원래 this로도 자기꺼처럼 사용가능하다는 것임 //this.name = name; //this.grade = grade; //this.salary = salary; this.empList = empList; } public void info() { super.info(); //System.out.println("사원번호 : " + no + "사원명 : " + name + "직급 : " + grade + "연봉 : " + salary + " 만원"); System.out.println("=========================================================="); System.out.println("\t\t < 관리사원 목록 > "); System.out.println("=========================================================="); for(Employee e : empList) { e.info(); } System.out.println("=========================================================="); } }
298db0058d3a4110130e1a61a651a5533df6a7e8
cdd87204a5c8576f39daa7b027406a8787ca4628
/app/src/main/java/yc/com/pinyin_study/base/activity/WebActivity.java
1a6b714391b1dd39733fc0ffb7bdc91df221c475
[]
no_license
YangChengTeam/pingyin-study
0016b9662088b221da627f17131336ea541ce26c
d1724abadc989e946ab6e94449aaa0106d9b4493
refs/heads/master
2022-02-18T11:05:13.811404
2022-02-11T06:07:30
2022-02-11T06:07:30
174,971,529
0
0
null
null
null
null
UTF-8
Java
false
false
2,240
java
package yc.com.pinyin_study.base.activity; import android.content.Context; import android.content.Intent; import android.view.View; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.widget.ProgressBar; import butterknife.BindView; import yc.com.base.BaseActivity; import yc.com.pinyin_study.R; import yc.com.pinyin_study.base.widget.CommonWebView; import yc.com.pinyin_study.base.widget.MainToolBar; /** * Created by wanglin on 2018/11/8 15:03. */ public class WebActivity extends BaseActivity { @BindView(R.id.main_toolbar) MainToolBar mainToolbar; @BindView(R.id.progressBar) ProgressBar progressBar; @BindView(R.id.commonWebView) CommonWebView commonWebView; private String url = "http://en.upkao.com/"; public static void startActivity(Context context, String url, String title) { Intent intent = new Intent(context, WebActivity.class); intent.putExtra("url", url); intent.putExtra("title", title); context.startActivity(intent); } @Override public boolean isStatusBarMateria() { return true; } @Override public int getLayoutId() { return R.layout.activity_web; } @Override public void init() { url = getIntent().getStringExtra("url"); String title = getIntent().getStringExtra("title"); mainToolbar.setTitle(title); mainToolbar.showNavigationIcon(); mainToolbar.init(this); mainToolbar.setRightContainerVisible(false); commonWebView.setWebChromeClient(new WebChromeClient() { @Override public void onProgressChanged(WebView view, int newProgress) { super.onProgressChanged(view, newProgress); if (progressBar.getVisibility() == View.GONE) { progressBar.setVisibility(View.VISIBLE); } progressBar.setProgress(newProgress); if (newProgress == 100) { progressBar.setVisibility(View.GONE); } } }); commonWebView.loadUrl(url); } }
617d82f4aa7ca04b47cca73d59f96e11d3c681cc
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_a41b2c51ec5b88cd52889e6549751ea6a392a4b8/RenderableSizeTransformerBuilder/2_a41b2c51ec5b88cd52889e6549751ea6a392a4b8_RenderableSizeTransformerBuilder_s.java
1e117d72685f600b619f28895d5174f161f2c7e3
[]
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
2,189
java
/* Copyright 2008-2010 Gephi Authors : Mathieu Bastian, Mathieu Jacomy, Julian Bilcke Website : http://www.gephi.org This file is part of Gephi. Gephi is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Gephi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Gephi. If not, see <http://www.gnu.org/licenses/>. */ package org.gephi.ranking.plugin.transformer; import org.gephi.graph.api.Renderable; import org.gephi.ranking.api.Ranking; import org.gephi.ranking.api.Transformer; import org.gephi.ranking.spi.TransformerBuilder; import org.openide.util.lookup.ServiceProvider; /** * Renderable size transformer builder. Builds <code>RenderableSizeTransformer</code> * instances, that receives {@link Renderable} targets. Renderable can be nodes or * edges data. * * @author Mathieu Bastian */ @ServiceProvider(service = TransformerBuilder.class, position = 200) public class RenderableSizeTransformerBuilder implements TransformerBuilder { @Override public Transformer buildTransformer() { return new RenderableSizeTransformer(); } @Override public boolean isTransformerForElement(String elementType) { return elementType.equals(Ranking.NODE_ELEMENT) || elementType.equals(Ranking.EDGE_ELEMENT); } @Override public String getName() { return Transformer.RENDERABLE_SIZE; } public static class RenderableSizeTransformer extends AbstractSizeTransformer<Renderable> { @Override public Object transform(Renderable target, float normalizedValue) { float size = getSize(normalizedValue); target.setSize(size); return Float.valueOf(size); } } }
97ffd594d8a066b0c3f498c427ac22a928e989ba
8055b532077b515c13920180e901b7c4e51eefab
/HelloJava/src/cn/ucai/day08/pa6/Animal.java
0b59719449285a98556e39f95f83d4dccb879332
[]
no_license
MyCloudream/java1017
1950629c3ea0079b126272d9b25d54870b79cafd
b111df2547e76d7aff8f91ec8ee74de0dc208d76
refs/heads/master
2021-01-12T06:31:47.897270
2016-12-26T09:52:48
2016-12-26T09:52:48
77,374,635
0
0
null
null
null
null
GB18030
Java
false
false
210
java
package cn.ucai.day08.pa6; /** * 动物类 */ public class Animal { public void eat(){ System.out.println("吃..."); } public void animlMethod(){ System.out.println("父类的其他方法"); } }
1544b03f737e7679f3bea70275e2a4bdbdd3fdec
d03142402e2e050d68d083fa84b25cb8223221fb
/gcj/y2013/round2/A.java
a946d830f19cf0dffed922fc3380af9fc712ccac
[ "Unlicense" ]
permissive
mikhail-dvorkin/competitions
b859028712d69d6a14ac1b6194e43059e262d227
4e781da37faf8c82183f42d2789a78963f9d79c3
refs/heads/master
2023-09-01T03:45:21.589421
2023-08-24T20:24:58
2023-08-24T20:24:58
93,438,157
10
0
null
null
null
null
UTF-8
Java
false
false
2,263
java
package gcj.y2013.round2; import java.io.*; import java.util.*; public class A { private static String fileName = A.class.getSimpleName().replaceFirst("_.*", "").toLowerCase(); private static String inputFileName = fileName + ".in"; private static String outputFileName = fileName + ".out"; private static Scanner in; private static PrintWriter out; final int M = 1000002013; private void solve() { int n = in.nextInt(); int m = in.nextInt(); int[] from = new int[m]; int[] to = new int[m]; int[] amount = new int[m]; Set<Integer> imp = new TreeSet<Integer>(); long honest = 0; for (int i = 0; i < m; i++) { from[i] = in.nextInt() - 1; to[i] = in.nextInt() - 1; amount[i] = in.nextInt(); imp.add(from[i]); imp.add(to[i]); int dist = to[i] - from[i]; long h = (n + n - dist + 1L) * dist / 2; h %= M; honest += amount[i] * h; honest %= M; } long cheat = 0; TreeMap<Integer, Long> people = new TreeMap<Integer, Long>(); for (int x : imp) { long plus = 0; for (int i = 0; i < m; i++) { if (from[i] == x) { plus += amount[i]; } } if (plus > 0) { people.put(x, plus); } long minus = 0; for (int i = 0; i < m; i++) { if (to[i] == x) { minus += amount[i]; } } while (minus > 0) { int y = people.lastKey(); long z = Math.min(minus, people.get(y)); int dist = x - y; long h = (n + n - dist + 1L) * dist / 2; h %= M; cheat += (z % M) * h; cheat %= M; minus -= z; z = people.get(y) - z; if (z == 0) { people.remove(y); } else { people.put(y, z); } } } if (!people.isEmpty()) { throw new RuntimeException(); } long ans = (honest - cheat) % M; ans += M; ans %= M; out.println(ans); } public static void main(String[] args) throws IOException { Locale.setDefault(Locale.US); if (args.length >= 2) { inputFileName = args[0]; outputFileName = args[1]; } in = new Scanner(new File(inputFileName)); out = new PrintWriter(outputFileName); int tests = in.nextInt(); in.nextLine(); for (int t = 1; t <= tests; t++) { out.print("Case #" + t + ": "); new A().solve(); System.out.println("Case #" + t + ": solved"); } in.close(); out.close(); } }
3eb3f392e15b04ead8088d0acac616e2afa0d094
5c23d6703e3dbfae406315a8fe9dee997e6ec8b6
/jhs-loan-entity/src/main/java/com/jhh/jhs/loan/entity/manager_vo/PhoneBookVo.java
9ff5a2f6089b3359b2c7439b939eaa96c3c3c457
[]
no_license
soldiers1989/loan-uhs
1dc4e766fce56ca21bc34e5a5b060eaf7116a8b0
77b06a67651898c4f1734e6c323becd0df639c22
refs/heads/master
2020-03-28T09:27:29.670311
2018-06-12T07:53:52
2018-06-12T07:53:52
148,038,503
0
1
null
null
null
null
UTF-8
Java
false
false
610
java
package com.jhh.jhs.loan.entity.manager_vo; import org.jeecgframework.poi.excel.annotation.Excel; import java.io.Serializable; /** * Create by Jxl on 2017/9/15 */ public class PhoneBookVo implements Serializable { @Excel(name="电话号码",width = 14.0) private String phone; @Excel(name="姓名") private String name; public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
417fd34442909b09ecbea618be4f82877e2d3d1d
c2f4654ad76bb64a34eaa9950000e58b70b3acdc
/src/org/drip/xva/pde/ParabolicDifferentialOperator.java
bf60ae818762d0404132d6c8eee6a31fe8e9c8b8
[ "Apache-2.0" ]
permissive
IanMadlenya/DROP
0a1361a1f6fd46d9dc8d9795edf04ee8f928b437
872d93bbae48ce071bcd9bae2b5ce1570bbbc862
refs/heads/master
2021-07-23T01:41:01.575353
2017-11-03T14:45:49
2017-11-03T14:45:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,938
java
package org.drip.xva.pde; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! * Copyright (C) 2017 Lakshmi Krishnamurthy * * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model * libraries targeting analysts and developers * https://lakshmidrip.github.io/DRIP/ * * DRIP is composed of four main libraries: * * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ * * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. * * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy * Incorporator, Holdings Constraint, and Transaction Costs. * * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. * * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. * * 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. */ /** * ParabolicDifferentialOperator sets up the Parabolic Differential Equation based on the Ito Evolution * Differential for the Reference Underlier Asset, as laid out in Burgard and Kjaer (2014). The References * are: * * - Burgard, C., and M. Kjaer (2014): PDE Representations of Derivatives with Bilateral Counter-party Risk * and Funding Costs, Journal of Credit Risk, 7 (3) 1-19. * * - Cesari, G., J. Aquilina, N. Charpillon, X. Filipovic, G. Lee, and L. Manda (2009): Modeling, Pricing, * and Hedging Counter-party Credit Exposure - A Technical Guide, Springer Finance, New York. * * - Gregory, J. (2009): Being Two-faced over Counter-party Credit Risk, Risk 20 (2) 86-90. * * - Li, B., and Y. Tang (2007): Quantitative Analysis, Derivatives Modeling, and Trading Strategies in the * Presence of Counter-party Credit Risk for the Fixed Income Market, World Scientific Publishing, * Singapore. * * - Piterbarg, V. (2010): Funding Beyond Discounting: Collateral Agreements and Derivatives Pricing, Risk * 21 (2) 97-102. * * @author Lakshmi Krishnamurthy */ public class ParabolicDifferentialOperator { private org.drip.xva.universe.Tradeable _t = null; /** * ParabolicDifferentialOperator Constructor * * @param t The Trade-able Asset * * @throws java.lang.Exception Thrown if the Inputs are Invalid */ public ParabolicDifferentialOperator ( final org.drip.xva.universe.Tradeable t) throws java.lang.Exception { if (null == (_t = t)) throw new java.lang.Exception ("ParabolicDifferentialOperator Constructor => Invalid Inputs"); } /** * Retrieve the Reference Trade-able Asset * * @return The Reference Trade-able Asset */ public org.drip.xva.universe.Tradeable asset() { return _t; } /** * Compute the Theta for the Derivative from the Asset Edge Value * * @param etv The Derivative's Evolution Trajectory Vertex * @param dblAssetNumeraireVertex The Asset Numeraire Vertex Value * * @return The Theta * * @throws java.lang.Exception Thrown if the Inputs are Invalid */ public double theta ( final org.drip.xva.derivative.EvolutionTrajectoryVertex etv, final double dblAssetNumeraireVertex) throws java.lang.Exception { if (null == etv || !org.drip.quant.common.NumberUtil.IsValid (dblAssetNumeraireVertex)) throw new java.lang.Exception ("ParabolicDifferentialOperator::theta => Invalid Inputs"); org.drip.xva.derivative.AssetGreekVertex agv = etv.assetGreekVertex(); double dblVolatility = _t.numeraireEvolver().evaluator().volatility().value (new org.drip.measure.realization.JumpDiffusionVertex (etv.time(), dblAssetNumeraireVertex, 0., false)); return 0.5 * dblVolatility * dblVolatility * dblAssetNumeraireVertex * dblAssetNumeraireVertex * agv.derivativeXVAValueGamma() - _t.cashAccumulationRate() * dblAssetNumeraireVertex * agv.derivativeXVAValueDelta(); } /** * Compute the Up/Down Thetas * * @param etv The Derivative's Evolution Trajectory Vertex * @param dblAssetNumeraireVertex The Asset Numeraire Vertex Value * @param dblShift The Amount to Shift the Reference Underlier Numeraire By * * @return The Array of the Up/Down Thetas */ public double[] thetaUpDown ( final org.drip.xva.derivative.EvolutionTrajectoryVertex etv, final double dblAssetNumeraireVertex, final double dblShift) { if (null == etv || !org.drip.quant.common.NumberUtil.IsValid (dblAssetNumeraireVertex) || !org.drip.quant.common.NumberUtil.IsValid (dblShift)) return null; org.drip.xva.derivative.AssetGreekVertex agv = etv.assetGreekVertex(); double dblAssetNumeraireVertexDown = dblAssetNumeraireVertex - dblShift; double dblAssetNumeraireVertexUp = dblAssetNumeraireVertex + dblShift; double dblVolatility = java.lang.Double.NaN; try { dblVolatility = _t.numeraireEvolver().evaluator().volatility().value (new org.drip.measure.realization.JumpDiffusionVertex (etv.time(), dblAssetNumeraireVertex, 0., false)); } catch (java.lang.Exception e) { e.printStackTrace(); return null; } double dblGammaCoefficient = 0.5 * dblVolatility * dblVolatility * agv.derivativeXVAValueGamma(); double dblDeltaCoefficient = -1. * _t.cashAccumulationRate() * agv.derivativeXVAValueDelta(); return new double[] {dblGammaCoefficient * dblAssetNumeraireVertexDown * dblAssetNumeraireVertexDown + dblDeltaCoefficient * dblAssetNumeraireVertexDown, dblGammaCoefficient * dblAssetNumeraireVertex * dblAssetNumeraireVertex + dblDeltaCoefficient * dblAssetNumeraireVertex, dblGammaCoefficient * dblAssetNumeraireVertexUp * dblAssetNumeraireVertexUp + dblDeltaCoefficient * dblAssetNumeraireVertexUp}; } }
d4f425cc1c1ce5bb03e5f32773dfb726869e3cc5
a0451215148eaecf53119664417c9e577926ee48
/ax-boot-initialzr/src/main/resources/templates/java/domain/scheduler/SchedulerService.java
fd6eca4411b981b52c3fcc844ff9b4380687ab9a
[ "MIT" ]
permissive
neoguru/axboot-base
b828f6b9635cd54376f442b3b67268aed932b1d6
5f8cd3a76b3df34463ebcb234b88732b60a5d85c
refs/heads/master
2020-04-26T02:44:52.758990
2019-04-27T04:20:57
2019-04-27T04:20:57
173,244,109
0
0
null
null
null
null
UTF-8
Java
false
false
4,076
java
package ${basePackage}.domain.scheduler; import ${basePackage}.domain.user.User; import ${basePackage}.domain.BaseService; import ${basePackage}.domain.scheduler.repeat.SchedulerRepeatService; import ${basePackage}.domain.scheduler.repeat.change.SchedulerRepeatChange; import ${basePackage}.domain.scheduler.repeat.change.SchedulerRepeatChangeService; import org.springframework.stereotype.Service; import javax.inject.Inject; import javax.transaction.Transactional; import com.chequer.axboot.core.parameter.RequestParams; import com.querydsl.core.BooleanBuilder; import com.querydsl.core.types.dsl.Expressions; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; @Service public class SchedulerService extends BaseService<Scheduler, Integer> { private SchedulerRepository schedulerRepository; @Inject private SchedulerRepeatService schedulerRepeatService; @Inject private SchedulerRepeatChangeService schedulerRepeatChangeService; @Inject public SchedulerService(SchedulerRepository schedulerRepository) { super(schedulerRepository); this.schedulerRepository = schedulerRepository; } @Transactional public void deleteSchedule(List<Scheduler> schedulers) throws Exception { if (isNotEmpty(schedulers)) { for (Scheduler scheduler: schedulers) { delete(scheduler.getId()); } } } /* @Transactional public void repeatDelete(List<Scheduler> schedulers) throws Exception { if (isNotEmpty(schedulers)) { for (Scheduler scheduler: schedulers) { schedulerRepeatService.delete(scheduler.getId()); schedulerRepeatChangeService.delete(scheduler.getId()); delete(scheduler.getId()); } } } */ @Transactional public void saveSchedule(List<Scheduler> schedulers) throws Exception { /* * 신규등록과 전체일정 수정의 경우 실행되는 method */ if (isNotEmpty(schedulers)) { for (Scheduler scheduler: schedulers) { //Scheduler save save(scheduler); //SchedulerRepeat save if (scheduler.getRepeatSave() != null) { scheduler.getRepeatSave().setNoSchedule(scheduler.getNoSchedule()); schedulerRepeatService.save(scheduler.getRepeatSave()); } List<SchedulerRepeatChange> changeList = schedulerRepeatChangeService.getChangeList(scheduler.getId()); if (isNotEmpty(changeList)) schedulerRepeatChangeService.delete(changeList); } } } public Scheduler getScheduler(RequestParams requestParams) { Scheduler scheduler = gets(requestParams).stream().findAny().orElse(null); return scheduler; } public List<Scheduler> gets(RequestParams requestParams) { String baseDate = requestParams.getString("baseDate"); Integer noEmployee = requestParams.getInt("noEmployee"); Integer noSchedule = requestParams.getInt("noSchedule"); BooleanBuilder builder = new BooleanBuilder(); builder.and(qScheduler.ynRepeat.eq("NONE")); //반복없는 event만 get if (noEmployee > 0) builder.and(qScheduler.noEmployee.eq(noEmployee)); if (noSchedule > 0) builder.and(qScheduler.noSchedule.eq(noSchedule)); if (isNotEmpty(baseDate)) { LocalDate localDate = LocalDate.parse(baseDate); LocalDate dtStart = LocalDate.parse(baseDate); LocalDate dtEnd = LocalDate.parse(baseDate); dtStart = dtStart.minusMonths(1); dtEnd = dtEnd.plusMonths(1); dtStart = LocalDate.of(dtStart.getYear(), dtStart.getMonthValue(), 01); dtEnd = LocalDate.of(dtEnd.getYear(), dtEnd.getMonthValue(), dtEnd.lengthOfMonth()); builder.and(qScheduler.start.between(dtStart, dtEnd)); } List<Scheduler> schedules = select().from(qScheduler).where(builder).fetch(); return schedules; } }
[ "kwpark@localhost" ]
kwpark@localhost
9f03fff81ec274b0e7e996416cd19c1bbbe092bc
e3efc1fede34736a2cd21da72c83939186277ca2
/server/src/main/java/org/fastcatsearch/db/DBService.java
6f721990537cdff9cf0c15eedf4584d583fea852
[ "Apache-2.0" ]
permissive
songaal/abcc
e3a646d3636105b1290c251395c90e3b785f9c88
6839cbf947296ff8ff4439c591aa314a14f19f7b
refs/heads/master
2023-04-03T04:40:09.743919
2019-10-14T08:05:21
2019-10-14T08:05:21
222,627,949
0
0
Apache-2.0
2023-03-23T20:38:31
2019-11-19T06:47:36
Java
UTF-8
Java
false
false
3,792
java
/* * Copyright (c) 2013 Websquared, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v2.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * swsong - initial API and implementation */ package org.fastcatsearch.db; import org.apache.ibatis.session.SqlSession; import org.fastcatsearch.db.InternalDBModule.MapperSession; import org.fastcatsearch.db.mapper.ExceptionHistoryMapper; import org.fastcatsearch.db.mapper.GroupAccountMapper; import org.fastcatsearch.db.mapper.GroupAuthorityMapper; import org.fastcatsearch.db.mapper.IndexingHistoryMapper; import org.fastcatsearch.db.mapper.IndexingResultMapper; import org.fastcatsearch.db.mapper.ManagedMapper; import org.fastcatsearch.db.mapper.NotificationConfigMapper; import org.fastcatsearch.db.mapper.NotificationHistoryMapper; import org.fastcatsearch.db.mapper.TaskHistoryMapper; import org.fastcatsearch.db.mapper.UserAccountMapper; import org.fastcatsearch.db.vo.GroupAccountVO; import org.fastcatsearch.db.vo.GroupAuthorityVO; import org.fastcatsearch.db.vo.UserAccountVO; import org.fastcatsearch.env.Environment; import org.fastcatsearch.exception.FastcatSearchException; import org.fastcatsearch.http.ActionAuthority; import org.fastcatsearch.http.ActionAuthorityLevel; import org.fastcatsearch.service.ServiceManager; import org.fastcatsearch.settings.Settings; public class DBService extends AbstractDBService { protected static DBService instance; private static Class<?>[] mapperList = new Class<?>[] { ExceptionHistoryMapper.class , NotificationHistoryMapper.class , TaskHistoryMapper.class , IndexingHistoryMapper.class , IndexingResultMapper.class , UserAccountMapper.class , GroupAccountMapper.class , GroupAuthorityMapper.class , NotificationConfigMapper.class }; public static DBService getInstance() { return instance; } public void asSingleton() { instance = this; } public DBService(Environment environment, Settings settings, ServiceManager serviceManager) { super("db/system", DBService.mapperList, environment, settings, serviceManager); } public InternalDBModule internalDBModule() { return internalDBModule; } public <T> MapperSession<T> getMapperSession(Class<T> type) { SqlSession session = internalDBModule.openSession(); return new MapperSession<T>(session, session.getMapper(type)); } @Override protected boolean doStart() throws FastcatSearchException { if (super.doStart()) { return true; } else { return false; } } @Override protected void initMapper(ManagedMapper managedMapper) throws Exception { if (managedMapper instanceof GroupAccountMapper) { GroupAccountMapper mapper = (GroupAccountMapper) managedMapper; mapper.putEntry(new GroupAccountVO(GroupAccountVO.ADMIN_GROUP_NAME)); } else if (managedMapper instanceof GroupAuthorityMapper) { GroupAuthorityMapper mapper = (GroupAuthorityMapper) managedMapper; for (ActionAuthority authority : ActionAuthority.values()) { if (authority != ActionAuthority.NULL) { mapper.putEntry(new GroupAuthorityVO(1, authority.name(), ActionAuthorityLevel.WRITABLE.name())); } } } else if (managedMapper instanceof UserAccountMapper) { UserAccountMapper mapper = (UserAccountMapper) managedMapper; mapper.putEntry(new UserAccountVO(UserAccountVO.ADMIN_USER_NAME, UserAccountVO.ADMIN_USER_ID, "1111", "", "", 1)); } } @Override protected boolean doStop() throws FastcatSearchException { if (super.doStop()) { return true; } else { return false; } } @Override protected boolean doClose() throws FastcatSearchException { return super.doClose(); } }
3bc05110453f6aa2cecd72712c399b2e13e15862
fac8480326f1f49e7eed9c6a4b87fb30f74504e4
/src/main/java/com/zizibujuan/util/json/IJson.java
77f9d5d1d675a972bae3373c1f4931025c714552
[]
no_license
zizibujuan/util.json
8eab0db6e8a83d9d22d893aa57682066884d920e
5dd3fdf4f3a1226184f4ccfdbb66827559ffa70c
refs/heads/master
2021-01-10T19:11:36.094653
2015-04-06T14:32:07
2015-04-06T14:32:07
33,388,642
1
1
null
null
null
null
UTF-8
Java
false
false
670
java
package com.zizibujuan.util.json; import java.io.InputStream; import java.io.Reader; import java.util.List; import java.util.Map; public interface IJson { Map<String,Object> fromJsonObject(String jsonString); Map<String,Object> fromJsonObject(Reader reader); List<Map<String, Object>> fromJsonArray(String jsonString); List<Map<String, Object>> fromJsonArray(Reader reader); <T> T fromJsonObject(String jsonString, Class<T> clazz); <T> T fromJsonObject(InputStream io, Class<T> clazz); <T> List<T> fromJsonArray(String jsonString, Class<List<?>> collectionClass, Class<T> elementClass); <T> String stringify(T bean); }
b5b7e935a92f3187c7d271770758c5ef37fd5405
cb2ad8d85a6e32eaf32d65de786d160f25b850e1
/Smart/app/src/main/java/adapter/Model_HeadImage_Adapter.java
9daba6f65ddd937f7e5cb06b89c56966e3e1f061
[]
no_license
tyhjh/The-First
49f986a5290c3039693aa040a585d724db3f0041
04337fef8ba35fe5bf9627bfeeae737ba6b22eaf
refs/heads/master
2021-01-21T13:04:13.522963
2016-05-02T16:57:13
2016-05-02T16:57:13
55,385,096
0
3
null
null
null
null
UTF-8
Java
false
false
1,924
java
package adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.ArrayAdapter; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.example.tyhj.smart.R; import com.squareup.picasso.Picasso; import java.util.List; import Api_sours.CircularImage; import activity_for_adapter.For_Model; import activity_for_adapter.For_ModelHead; import savephoto.GetModelHeadImage; /** * Created by Tyhj on 2016/4/4. */ public class Model_HeadImage_Adapter extends ArrayAdapter<For_ModelHead> { int[] imageId= GetModelHeadImage.mosiheah; int resourceId; View view; For_ModelHead fmd; ViewHold viewH; WindowManager wm = (WindowManager) getContext() .getSystemService(Context.WINDOW_SERVICE); int width = wm.getDefaultDisplay().getWidth(); public Model_HeadImage_Adapter(Context context, int resource, List<For_ModelHead> objects) { super(context, resource, objects); resourceId=resource; } @Override public View getView(int position, View convertView, ViewGroup parent) { fmd=getItem(position); int x=fmd.getCount(); if(convertView==null) { view = LayoutInflater.from(getContext()).inflate(resourceId, null); viewH = new ViewHold(); viewH.iv= (ImageView) view.findViewById(R.id.iv_for_gridview); view.setTag(viewH); }else{ view=convertView; viewH= (ViewHold) view.getTag(); } Picasso.with(getContext()) .load(imageId[x]) .resize(width/12, width/12) .centerCrop() .into(viewH.iv); return view; } class ViewHold{ ImageView iv; } }
ecf8f39c53467d8e634cd8b9ba0340f4c2aa3401
348136f8d238f283df54e609dac7b58e91e444c5
/app/src/main/java/com/example/linhlee/myimusik/activities/AboutActivity.java
20a5affc8ed1d9b405efedf7026d90a0310a09b3
[]
no_license
linhlq58/iMusik
57a37e3ba4424e9761bd5ea2cd3303b0f36a134f
43339e93bb73fd6e79623a0eec22c9292bf5c763
refs/heads/master
2021-01-10T08:08:59.883170
2016-04-22T03:16:12
2016-04-22T03:16:12
55,795,974
1
0
null
null
null
null
UTF-8
Java
false
false
1,117
java
package com.example.linhlee.myimusik.activities; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; import com.example.linhlee.myimusik.R; /** * Created by Linh Lee on 4/10/2016. */ public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); ImageView btnBack = (ImageView) findViewById(R.id.btn_back_about); btnBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); Window window = this.getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); window.setStatusBarColor(this.getResources().getColor(R.color.colorPrimaryDark)); } }
ecfcb07b7ef974530257c033c1ffbb7c6c443c79
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_340/Productionnull_33990.java
30e288d89ba20363446cbc09a02904ed14a36d4f
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.test.performancenull_340; public class Productionnull_33990 { private final String property; public Productionnull_33990(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
02cdadc114e314816887f91dabbd9c00abba5e17
13934ea3feb478b42257abcb7b5e969dbf965c34
/app/src/main/java/net/zhongbenshuo/attendance/bean/Legend.java
3eee2bad127d1c5f55528964d82da381bd8ebbeb
[]
no_license
tkkhy/ZBSKaoQin
a730a5729942004946a1e0ee21c76ae9267f8d2d
76c915eab9f8ffb897acd4eb5d0be162fcda85e6
refs/heads/master
2020-06-18T18:35:59.811842
2019-07-11T11:45:18
2019-07-11T11:45:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
749
java
package net.zhongbenshuo.attendance.bean; /** * 图例实体类 * Created at 2019/6/20 9:43 * * @author LiYuliang * @version 1.0 */ public class Legend { private String legendName; private int legendResourceId; public Legend(String legendName, int legendResourceId) { this.legendName = legendName; this.legendResourceId = legendResourceId; } public String getLegendName() { return legendName; } public void setLegendName(String legendName) { this.legendName = legendName; } public int getLegendResourceId() { return legendResourceId; } public void setLegendResourceId(int legendResourceId) { this.legendResourceId = legendResourceId; } }
f10e7326297da73e6025d0d5777855f7954ff03d
3eca6278418d9eef7f5f850b23714a8356ef525f
/tumi/SocioEJB/ejbModule/pe/com/tumi/credito/socio/creditos/bo/CreditoTipoGarantiaCondicionHabilBO.java
9974d906905431351d87e97b730b40987a07f0d1
[]
no_license
cdelosrios88/tumiws-bizarq
2728235b3f3239f12f14b586bb6349e2f9b8cf4f
7b32fa5765a4384b8d219c5f95327b2e14dd07ac
refs/heads/master
2021-01-23T22:53:21.052873
2014-07-05T05:19:58
2014-07-05T05:19:58
32,641,875
0
0
null
null
null
null
ISO-8859-3
Java
false
false
5,029
java
package pe.com.tumi.credito.socio.creditos.bo; import java.util.HashMap; import java.util.List; import pe.com.tumi.credito.socio.creditos.dao.CreditoTipoGarantiaCondicionHabilDao; import pe.com.tumi.credito.socio.creditos.dao.impl.CreditoTipoGarantiaCondicionHabilDaoIbatis; import pe.com.tumi.credito.socio.creditos.domain.CondicionHabilTipoGarantia; import pe.com.tumi.credito.socio.creditos.domain.CondicionHabilTipoGarantiaId; import pe.com.tumi.credito.socio.creditos.domain.CondicionSocioTipoGarantia; import pe.com.tumi.credito.socio.creditos.domain.CreditoTipoGarantiaId; import pe.com.tumi.framework.negocio.exception.BusinessException; import pe.com.tumi.framework.negocio.exception.DAOException; import pe.com.tumi.framework.negocio.factory.TumiFactory; public class CreditoTipoGarantiaCondicionHabilBO { private CreditoTipoGarantiaCondicionHabilDao dao = (CreditoTipoGarantiaCondicionHabilDao)TumiFactory.get(CreditoTipoGarantiaCondicionHabilDaoIbatis.class); public CondicionHabilTipoGarantia grabarCreditoTipoGarantia(CondicionHabilTipoGarantia o) throws BusinessException{ CondicionHabilTipoGarantia dto = null; try{ dto = dao.grabar(o); }catch(DAOException e){ throw new BusinessException(e); }catch(Exception e) { throw new BusinessException(e); } return dto; } public CondicionHabilTipoGarantia modificarCreditoTipoGarantia(CondicionHabilTipoGarantia o) throws BusinessException{ CondicionHabilTipoGarantia dto = null; try{ dto = dao.modificar(o); }catch(DAOException e){ throw new BusinessException(e); }catch(Exception e) { throw new BusinessException(e); } return dto; } public CondicionHabilTipoGarantia getCreditoTipoGarantiaPorPK(CondicionHabilTipoGarantiaId pPK) throws BusinessException{ CondicionHabilTipoGarantia domain = null; List<CondicionHabilTipoGarantia> lista = null; try{ HashMap mapa = new HashMap(); mapa.put("intPersEmpresaPk", pPK.getIntPersEmpresaPk()); mapa.put("intParaTipoCreditoCod", pPK.getIntParaTipoCreditoCod()); mapa.put("intItemCredito", pPK.getIntItemCredito()); mapa.put("intParaTipoGarantiaCod", pPK.getIntParaTipoGarantiaCod()); mapa.put("intItemCreditoGarantia", pPK.getIntItemCreditoGarantia()); mapa.put("intItemGarantiaTipo", pPK.getIntItemGarantiaTipo()); mapa.put("intParaTipoHabilCod", pPK.getIntParaTipoHabilCod()); lista = dao.getListaCondicionHabilTipoGarantiaPorPK(mapa); if(lista!=null){ if(lista.size()==1){ domain = lista.get(0); }else if(lista.size()==0){ domain = null; }else{ throw new BusinessException("Obtención de mas de un registro coincidente"); } } }catch(DAOException e){ throw new BusinessException(e); }catch(BusinessException e){ throw e; }catch(Exception e) { throw new BusinessException(e); } return domain; } /** * * @param pCreditoGarantia * @return * @throws BusinessException */ public List<CondicionHabilTipoGarantia> getListaCondicionHabilPorPKCreditoTipoGarantia(CreditoTipoGarantiaId pCreditoGarantia) throws BusinessException{ List<CondicionHabilTipoGarantia> lista = null; try{ HashMap<String, Object> mapa = new HashMap<String, Object>(); mapa.put("intPersEmpresaPk", pCreditoGarantia.getIntPersEmpresaPk()); mapa.put("intParaTipoCreditoCod", pCreditoGarantia.getIntParaTipoCreditoCod()); mapa.put("intItemCredito", pCreditoGarantia.getIntItemCredito()); mapa.put("intParaTipoGarantiaCod", pCreditoGarantia.getIntParaTipoGarantiaCod()); mapa.put("intItemCreditoGarantia", pCreditoGarantia.getIntItemCreditoGarantia()); mapa.put("intItemGarantiaTipo", pCreditoGarantia.getIntItemGarantiaTipo()); lista = dao.getListaCondicionHabilTipoGarantiaPorCreditoTipoGarantia(mapa); }catch(DAOException e){ throw new BusinessException(e); }catch(Exception e) { throw new BusinessException(e); } return lista; } public List<CondicionHabilTipoGarantia> getListaCondicionHabilPorCreditoTipoGarantia(CreditoTipoGarantiaId pCreditoGarantia) throws BusinessException{ List<CondicionHabilTipoGarantia> lista = null; try{ HashMap<String, Object> mapa = new HashMap<String, Object>(); mapa.put("intPersEmpresaPk", pCreditoGarantia.getIntPersEmpresaPk()); mapa.put("intParaTipoCreditoCod", pCreditoGarantia.getIntParaTipoCreditoCod()); mapa.put("intItemCredito", pCreditoGarantia.getIntItemCredito()); mapa.put("intParaTipoGarantiaCod", pCreditoGarantia.getIntParaTipoGarantiaCod()); mapa.put("intItemCreditoGarantia", pCreditoGarantia.getIntItemCreditoGarantia()); mapa.put("intItemGarantiaTipo", pCreditoGarantia.getIntItemGarantiaTipo()); lista = dao.getListaCondicionHabilPorCreditoTipoGarantia(mapa); }catch(DAOException e){ throw new BusinessException(e); }catch(Exception e) { throw new BusinessException(e); } return lista; } }
[ "[email protected]@b3a863b4-f5f8-5366-a268-df30542ed8c1" ]
[email protected]@b3a863b4-f5f8-5366-a268-df30542ed8c1
383cb48b7da08ece7b23c2650d70a0af9cc2ca03
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-dms-enterprise/src/main/java/com/aliyuncs/dms_enterprise/model/v20181101/GetSQLReviewCheckResultStatusRequest.java
a06b962bac456b5ea2a68d5f4b5db102cf842b1f
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
1,914
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.dms_enterprise.model.v20181101; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.dms_enterprise.Endpoint; /** * @author auto create * @version */ public class GetSQLReviewCheckResultStatusRequest extends RpcAcsRequest<GetSQLReviewCheckResultStatusResponse> { private Long orderId; private Long tid; public GetSQLReviewCheckResultStatusRequest() { super("dms-enterprise", "2018-11-01", "GetSQLReviewCheckResultStatus", "dms-enterprise"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Long getOrderId() { return this.orderId; } public void setOrderId(Long orderId) { this.orderId = orderId; if(orderId != null){ putQueryParameter("OrderId", orderId.toString()); } } public Long getTid() { return this.tid; } public void setTid(Long tid) { this.tid = tid; if(tid != null){ putQueryParameter("Tid", tid.toString()); } } @Override public Class<GetSQLReviewCheckResultStatusResponse> getResponseClass() { return GetSQLReviewCheckResultStatusResponse.class; } }
20cda5e54d19c7c93fe8f8f164778cdbfd2f9d89
d81b8829ebc2deea1acf4b41b39e8eda2734a952
/input_output/src/test/java/ru/job4j/iotasks/InStreamServiceTest.java
d97e6c67c63db4b77e54d72ff835519654c77b38
[ "Apache-2.0" ]
permissive
DmitriyShaplov/job4j
6d8c4b505f0f6bd9f19d6e829370eb45492e73c7
46acbe6deb17ecfd00492533555f27e0df481d37
refs/heads/master
2022-12-04T14:51:37.185520
2021-02-01T21:41:00
2021-02-01T21:59:02
159,066,243
0
0
Apache-2.0
2022-11-16T12:25:02
2018-11-25T19:23:23
Java
UTF-8
Java
false
false
1,989
java
package ru.job4j.iotasks; import org.junit.Test; import java.io.*; import static org.hamcrest.Matchers.is; import static org.junit.Assert.*; /** * @author shaplov * @since 18.03.2019 */ public class InStreamServiceTest { @Test public void whenInputStreamHasEvenNumberThenTrue() throws IOException { InStreamService service = new InStreamService(); final boolean number = service.isNumber(new ByteArrayInputStream("1234567891234567890".getBytes())); assertTrue(number); } @Test public void whenInputStreamHasOddNumberThenFalse() throws IOException { InStreamService service = new InStreamService(); final boolean number = service.isNumber(new ByteArrayInputStream("423456789123456789".getBytes())); assertFalse(number); } @Test public void whenInputStreamHasNotNumberThenFalse() throws IOException { InStreamService service = new InStreamService(); final boolean number = service.isNumber(new ByteArrayInputStream("123мамамылараму7890".getBytes())); assertFalse(number); } @Test public void whenDropAbuseWordsFromStreamThenStreamWithoutIt() throws IOException { InStreamService service = new InStreamService(); String[] abuse = {"нельзя", "прекратить", "завтрашний"}; OutputStream out = new ByteArrayOutputStream(); service.dropAbuses(new ByteArrayInputStream(("зачем говорить когда нельзя прекратить влеченный в завтрашний день" + System.lineSeparator() + "прекратить нельзя зачем").getBytes()), out, abuse); String result = out.toString(); String expect = "зачем говорить когда влеченный в день" + System.lineSeparator() + "зачем"; assertThat(result, is(expect)); } }
8e50df3c40cae00476a20e724216be913a19d8b5
540b0af99eef8cdb9f2b8f31075504ebeab36c74
/heartwork/work-usercore/src/main/java/im/heart/usercore/service/FrameUserService.java
b7a07d16624a420624bf401fdef7f082478b34a8
[]
no_license
nullllun/heartwork
682aca16df2a970bf1ab598458c234052bd795e7
1d8e56da24c805d1792f0ecdd59c70779fc5eed7
refs/heads/master
2020-07-11T18:51:03.529649
2018-10-23T07:20:28
2018-10-23T07:20:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,800
java
package im.heart.usercore.service; import java.math.BigInteger; import java.util.Set; import im.heart.core.service.CommonService; import im.heart.core.service.ServiceException; import im.heart.usercore.entity.FrameUser; import im.heart.usercore.exception.IncorrectCredentialsException; /** * * @author gg * @desc : 角色接口 */ public interface FrameUserService extends CommonService<FrameUser, BigInteger>{ public static final String BEAN_NAME = "frameUserService"; public void updateUserheadPortrait(BigInteger userId,String headPortrait); /** * @desc:创建用户 * @param frameUser * @return * @throws ServiceException */ public FrameUser save(FrameUser frameUser) throws ServiceException ; // /** // * @desc:激活用户 // * @param userId // * @return // */ // public FrameUser activateUser(BigInteger userId); // // /** // * @desc:禁用用户 // * @param userId // * @return // */ // public FrameUser disabledUser(BigInteger userId); /** * * @desc:激活用户邮箱 * @param userEmail * @return * @throws ServiceException */ public FrameUser activateUserEmail(String userEmail) throws ServiceException ; /** * * @desc:根据用户名称查询用户信息 * @param userName * @return */ public FrameUser findByUserName(String userName); /** * * @desc:根据电话号码查找 * @param userPhone * @return */ public FrameUser findByUserPhone(String userPhone); /** * * @desc:根据邮箱查找 * @param userEmail * @return */ public FrameUser findByUserEmail(String userEmail); /** * * @desc:自动选择账号登录,可以使用邮箱,账号,或者注册手机号 * @param account * @return */ public FrameUser findFrameUser(String account); /** * * @desc:修改密码 * @param userId * @param newPwd */ public FrameUser changePassword(BigInteger userId,String oldPwd ,String newPwd) throws IncorrectCredentialsException; /** * * @desc:重置密码 * @param userId * @param newPwd */ public FrameUser resetPassword(BigInteger userId, String newPwd) throws IncorrectCredentialsException; /** * * @desc:根据用户Id 查询用户角色权限 * @param userId * @return */ public Set<String> findRoleCodesByUserId(BigInteger userId); /** * @desc:只更新用户的默认机构信息 * @param userId * @param defaultorgId */ public void updateUserDefaultOrg(BigInteger userId,BigInteger defaultorgId); public boolean existsUserName(String userName); public boolean existsUserPhone(String userPhone); public boolean existsUserEmail(String userEmail); }
e6635e60fdfee4cc691d619c04f3986258dd2dd7
e0ea15a96dfb33d673a3cd0c33f416c63252dd59
/goja/goja-jfinal/src/main/java/com/jfinal/ext/handler/ServerNameRedirect301Handler.java
ebdb8565b3f4ca350cf9e8df45f3eb150787b54d
[]
no_license
jerryou/goja
a746e30d1239b055544b26d6bf08d2a0b350b751
ad59925f83e7fa3f7c7ac44ecf8f7192ff0e1786
refs/heads/master
2020-05-30T13:25:48.178437
2014-08-25T03:15:57
2014-08-25T03:15:57
23,374,918
1
0
null
null
null
null
UTF-8
Java
false
false
3,655
java
/** * Copyright (c) 2011-2014, James Zhan 詹波 ([email protected]). * * 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.jfinal.ext.handler; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.jfinal.handler.Handler; /** * ServerNameRedirect301Handler redirect to new server name with 301 Moved Permanently. */ public class ServerNameRedirect301Handler extends Handler { private String originalServerName; private String targetServerName; private int serverNameLength; /** * Example: new ServerNameRedirectHandler("http://abc.com", "http://www.abc.com") * @param originalServerName The original server name that you want be redirect * @param targetServerName The target server name that redirect to */ public ServerNameRedirect301Handler(String originalServerName, String targetServerName) { this.originalServerName = originalServerName; this.targetServerName = targetServerName; format(); serverNameLength = this.originalServerName.length(); } private final void format() { if (originalServerName.endsWith("/")) originalServerName = originalServerName.substring(0, originalServerName.length() - 1); if (targetServerName.endsWith("/")) targetServerName = targetServerName.substring(0, targetServerName.length() - 1); // 此处没有考虑 https 的情况, 该情况由用户在 new ServerNameRedirectHandler() 时自行解决 if (originalServerName.indexOf("://") == -1) originalServerName = "http://" + originalServerName; if (targetServerName.indexOf("://") == -1) targetServerName = "http://" + targetServerName; } @Override public void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled) { String url = request.getRequestURL().toString(); if (url.startsWith(originalServerName)) { isHandled[0] = true; String queryString = request.getQueryString(); queryString = (queryString == null ? "" : "?" + queryString); url = targetServerName + url.substring(serverNameLength) + queryString; response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); // response.sendRedirect(url); // always 302 response.setHeader("Location", url); response.setHeader("Connection", "close"); } else { nextHandler.handle(target, request, response, isHandled); } } } /* http://souwangxiao.com redirect 301 to http://www.souwangxiao.com <%@ page language="java" pageEncoding="utf-8"%> <%@taglib prefix="s" uri="/struts-tags"%> <% if(request.getRequestURL().indexOf("http://souwangxiao.com") >= 0) { // String requestURI = request.getRequestURI(); // String queryString = request.getQueryString(); // queryString = (queryString == null ? "" : "?" + queryString); //attempt to merge non-www urls response.setStatus(301); // 301 rewrite // response.setHeader("Location", "http://www.souwangxiao.com" + requestURI + queryString); response.setHeader("Location", "http://www.souwangxiao.com"); response.setHeader("Connection", "close"); } else {%> <s:action namespace="/" name="index" executeResult="true" /> <%}%> */
12e5b71f87a2ad9010b9fa0b758202ed602736ec
b12ecb0b86afe455275b6271944c9f2465de079a
/balazs-ai/src/main/java/io/jsd/training/artificialintelligence1/geneticalgorithms/Constants.java
1c870056c4321c1237e57f9c7cd137ebe2b0730b
[]
no_license
jsdumas/ai-training
7a898437433b6a901e9d99805838037f86786e16
0fc1dee319b3f1429597f5648ae326a4ca2a3400
refs/heads/master
2020-03-11T08:30:39.123940
2018-04-19T21:23:50
2018-04-19T21:23:50
129,885,693
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package io.jsd.training.artificialintelligence1.geneticalgorithms; public class Constants { private Constants(){ } public static final int[] SOLUTION_SEQUENCE = {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9}; public static final double UNIFORM_RATE = 0.5; public static final double MUTATION_RATE = 0.15; public static final int TOURNAMENT_SIZE = 5; public static final int GENE_LENGTH = 20; public static final int MAX_FITNESS = 20; }
b0162f4b1dda222fb43b572adef55faeff64771e
78c990f287df4886edc0db7094a8c2f77eb16461
/icetone-core/src/main/java/icetone/controls/buttons/StatefulButton.java
17b44370ffa0911fe7e836adce996248071529b3
[ "BSD-2-Clause", "LicenseRef-scancode-other-permissive" ]
permissive
Scrappers-glitch/icetone
a91a104571fba25cacc421ef1c3e774de6769a53
1684c2a6da1b1228ddcabafbbbee56286ccc4adb
refs/heads/master
2022-01-08T10:53:47.263080
2019-06-27T11:10:54
2019-06-27T11:10:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,387
java
/** * ICETONE - A GUI Library for JME3 based on a heavily modified version of * Tonegod's 'Tonegodgui'. * * Copyright (c) 2013, t0neg0d * Copyright (c) 2016, Emerald Icemoon * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those * of the authors and should not be interpreted as representing official policies, * either expressed or implied, of the FreeBSD Project. */ package icetone.controls.buttons; import java.util.Objects; import icetone.core.BaseScreen; import icetone.core.Layout.LayoutType; import icetone.core.event.ChangeSupport; import icetone.core.event.UIChangeEvent; import icetone.core.event.UIChangeListener; /** * @author rockfire */ public abstract class StatefulButton<S extends Object> extends Button { protected S state; protected ChangeSupport<StatefulButton<S>, S> changeSupport; public StatefulButton() { super(); } public StatefulButton(BaseScreen screen) { super(screen); } public StatefulButton(BaseScreen screen, String text) { super(screen, text); } public StatefulButton(String text) { super(text); } public StatefulButton(String texturePath, String text) { super(texturePath, text); } public StatefulButton<S> onChange(UIChangeListener<StatefulButton<S>, S> listener) { if (changeSupport == null) changeSupport = new ChangeSupport<>(); changeSupport.bind(listener); return this; } public S getState() { return state; } public StatefulButton<S> setState(S state) { if (!Objects.equals(state, this.state)) { S oldState = this.state; this.state = state; onStateChanged(oldState, state); dirtyLayout(true, LayoutType.reset); layoutChildren(); if (changeSupport != null) changeSupport.fireEvent(new UIChangeEvent<StatefulButton<S>, S>(this, oldState, state)); } return this; } public StatefulButton<S> unbindChanged(UIChangeListener<StatefulButton<S>, S> listener) { if (changeSupport != null) changeSupport.unbind(listener); return this; } protected void onStateChanged(S oldState, S state2) { } }
0f60923ea59b4b5cd543ff7a44f8c48f2a8ca815
f6b90fae50ea0cd37c457994efadbd5560a5d663
/android/nut-dex2jar.src/com/tencent/wxop/stat/b.java
8a4ff8b30971e1d0608314b483a7ff4d4c6f7925
[]
no_license
dykdykdyk/decompileTools
5925ae91f588fefa7c703925e4629c782174cd68
4de5c1a23f931008fa82b85046f733c1439f06cf
refs/heads/master
2020-01-27T09:56:48.099821
2016-09-14T02:47:11
2016-09-14T02:47:11
66,894,502
1
0
null
null
null
null
UTF-8
Java
false
false
764
java
package com.tencent.wxop.stat; import com.tencent.wxop.stat.b.f; import java.util.List; final class b implements k { b(ai paramai, List paramList, boolean paramBoolean) { } public final void a() { v.b(); ai localai = this.c; List localList = this.a; boolean bool = this.b; if (localai.a != null) localai.a.a(new ak(localai, localList, bool)); } public final void b() { v.c(); ai localai = this.c; List localList = this.a; boolean bool = this.b; if (localai.a != null) localai.a.a(new aj(localai, localList, bool)); } } /* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar * Qualified Name: com.tencent.wxop.stat.b * JD-Core Version: 0.6.2 */
22145381fe114ffe1e0eb66cd979d317050af92e
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project40/src/main/java/org/gradle/test/performance40_3/Production40_257.java
e7e730c51a1097f659c6547c8920c1090a77d550
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance40_3; public class Production40_257 extends org.gradle.test.performance13_3.Production13_257 { private final String property; public Production40_257() { this.property = "foo"; } public String getProperty() { return property; } }
dfbc713bbb98257316520db71502bdbb540ec65b
198737841fb4b1ca4d16c64520ad9d842a7b350d
/micro-weather-eureka-client-feign-hystrix/src/main/java/com/soldier/controller/CityController.java
9542965e080fe763e548d04cf6c68e099c119946
[]
no_license
soldiergit/spring-cloud-learn
a7e21175127d0b909fc8e507c30687d2b79edca5
15ad1af4ee1151e0ee0afc6e4422abe6ddf4c357
refs/heads/master
2021-07-16T19:10:06.847137
2020-04-12T02:16:02
2020-04-12T02:16:02
249,862,931
0
1
null
2021-06-04T02:33:45
2020-03-25T01:56:04
Java
UTF-8
Java
false
false
909
java
package com.soldier.controller; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import com.soldier.services.CityClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @Author soldier * @Date 20-4-11 下午5:25 * @Email:[email protected] * @Version 1.0 * @Description: */ @RestController public class CityController { @Autowired private CityClient cityClient; @RequestMapping("/cities") @HystrixCommand(fallbackMethod = "defaultCities") public String cityList() { // 通过Feign客户端查找 String data = cityClient.cityList(); return data; } /** * 当服务宕机时调用 */ public String defaultCities() { return "city data server is down"; } }
6c886024fa45e98a96feb71352afc8886153a06b
a407678d9973a09183ca556b54d9d35cd7a2b765
/src/minecraft/java/org/darkstorm/darkbot/minecraftbot/events/world/SpawnEvent.java
c5dd5c92a5e01209cc4205df7dc38084eb911cb3
[ "BSD-2-Clause" ]
permissive
dahquan1/DarkBot
d4920b6f196e9b5a8bffe1adcfe150abc7e88d50
09ff65b67060486eaa723a68e3faf4a6296a194c
refs/heads/master
2020-12-25T04:17:12.624939
2014-03-04T21:02:02
2014-03-04T21:02:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package org.darkstorm.darkbot.minecraftbot.events.world; import org.darkstorm.darkbot.minecraftbot.events.Event; import org.darkstorm.darkbot.minecraftbot.world.entity.MainPlayerEntity; public class SpawnEvent extends Event { private final MainPlayerEntity player; public SpawnEvent(MainPlayerEntity player) { this.player = player; } public MainPlayerEntity getPlayer() { return player; } }
5b68387a285854b69082a9be0bb4ba31a93984d9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_a55f62f86b939903fa810b7562415f156ec440a4/SchedulingBuilder/31_a55f62f86b939903fa810b7562415f156ec440a4_SchedulingBuilder_s.java
a7fcb2579c8eec11ff4ffdc9292b84510e4e7167
[]
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,181
java
package org.icefaces.samples.showcase.example.ace.dataTable; import entities.Backend; import entities.Composite; import entities.Mode; import entities.Scheduling; /* * Builder class for creating a new scheduling. */ public class SchedulingBuilder { private String name; private boolean javaAgentPollable = false; private boolean bankHolidayOnly = false; private Mode mode; private Composite composite; private Backend source; private Backend target; private String requestURL; private String cron = "*"; private String description = ""; private int id; private static final String LINE_BREAK = "\n"; public SchedulingBuilder() { } public SchedulingBuilder(Scheduling s) { this.name = s.getName(); if (s.getJavaAgentPollable() == 1) this.javaAgentPollable = true; if (s.getBankHolidayOnly() == 1) this.bankHolidayOnly = true; this.mode = SessionBean.MODES.get(s.getStatusID()); this.composite = SessionBean.COMPOSITES.get(s.getServiceID()); this.source = SessionBean.BACKENDS.get(s.getSource()); this.target = SessionBean.BACKENDS.get(s.getTarget()); this.requestURL = s.getRequestURL(); this.cron = s.getCron(); this.description = s.getDescription(); this.id = s.getId(); } public boolean validate() throws IllegalOperationException { String message = ""; boolean error = false; if (this.name == null || this.name.isEmpty()) { error = true; message += "Name cannot be empty!" + LINE_BREAK; } if (this.mode == null) { error = true; message += "Mode was not selected!" + LINE_BREAK; } if (this.composite == null) { error = true; message += "Composite was not selected!" + LINE_BREAK; } if (this.source == null) { error = true; message += "Source was not selected!" + LINE_BREAK; } if (this.target == null) { error = true; message += "Target was not selected!" + LINE_BREAK; } if (this.cron == null || this.cron.isEmpty()) { error = true; message += "CRON cannot be empty!" + LINE_BREAK; } if (this.description == null || this.description.isEmpty()) { error = true; message += "Description cannot be empty!" + LINE_BREAK; } if (this.source.getBackend() == this.target.getBackend()) { error = true; message += "Source cannot be the same as target!" + LINE_BREAK; } if (error) throw new IllegalOperationException(message); return true; } public Scheduling build() throws IllegalOperationException { this.validate(); Scheduling s = new Scheduling(); s.setName(name); s.setId(id); if (this.bankHolidayOnly) s.setBankHolidayOnly(1); else s.setBankHolidayOnly(0); if (this.javaAgentPollable) s.setJavaAgentPollable(1); else s.setJavaAgentPollable(0); s.setCron(cron); s.setDescription(description); s.setRequestURL(requestURL); s.setServiceID(this.composite.getId()); s.setStatusID(this.mode.getId()); s.setSource(this.source.getId()); s.setTarget(this.target.getId()); return s; } public void sync(Scheduling s) throws IllegalOperationException { this.validate(); s.setName(name); s.setId(id); if (this.bankHolidayOnly) s.setBankHolidayOnly(1); else s.setBankHolidayOnly(0); if (this.javaAgentPollable) s.setJavaAgentPollable(1); else s.setJavaAgentPollable(0); s.setCron(cron); s.setDescription(description); s.setRequestURL(requestURL); s.setServiceID(this.composite.getId()); s.setStatusID(this.mode.getId()); s.setSource(this.source.getId()); s.setTarget(this.target.getId()); } public String getName() { return name; } public String getRequestURL() { return requestURL; } public String getCron() { return cron; } public String getDescription() { return description; } public int getId() { return id; } public void setId(int id) { this.id = id; } public void setName(String name) { this.name = name; } public void setDescription(String description) { this.description = description; } public void setCron(String cron) { this.cron = cron; } public void setRequestURL(String requestURL) { this.requestURL = requestURL; } public boolean isJavaAgentPollable() { return javaAgentPollable; } public void setJavaAgentPollable(boolean javaAgentPollable) { this.javaAgentPollable = javaAgentPollable; } public boolean isBankHolidayOnly() { return bankHolidayOnly; } public void setBankHolidayOnly(boolean bankHolidayOnly) { this.bankHolidayOnly = bankHolidayOnly; } public Mode getMode() { return mode; } public void setMode(Mode mode) { this.mode = mode; } public Composite getComposite() { return composite; } public void setComposite(Composite composite) { this.composite = composite; } public Backend getSource() { return source; } public void setSource(Backend source) { this.source = source; } public Backend getTarget() { return target; } public void setTarget(Backend target) { this.target = target; } }
e2851e08e6bfd4ea9b64b1b9b184c0308bbacff0
b18a33dbfbe6aa49645823cb6d34179b5a942910
/task04decomposition/src/main/java/by/avdeev/task04decomposition/quadrangle/service/exception/ServiceException.java
613d3b0e14580dc77a4f2e1d858a8f377bde687a
[]
no_license
Bogdan1506/24_JavaST
587d0a31f625844804403803835a8ef60cc3f0cf
d9328b5bf726bb64fd329f2f52fb57ebf0cd03c8
refs/heads/master
2022-07-09T00:17:53.552808
2020-05-27T10:58:40
2020-05-27T10:58:40
227,462,682
0
0
null
null
null
null
UTF-8
Java
false
false
413
java
package by.avdeev.task04decomposition.quadrangle.service.exception; public class ServiceException extends Exception { public ServiceException() { } public ServiceException(String message) { super(message); } public ServiceException(String message, Throwable cause) { super(message, cause); } public ServiceException(Throwable cause) { super(cause); } }
8373062954c6aefab78a4f6695d3ffe060d90f2c
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/spoon/learning/5239/CtFieldReferenceImpl.java
828d64edd1d9421c8211fbbbe58fab4936e726ad
[]
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
7,142
java
/** * Copyright (C) 2006-2018 INRIA and contributors * Spoon - http://spoon.gforge.inria.fr/ * * This software is governed by the CeCILL-C License under French law and * abiding by the rules of distribution of free software. You can use, modify * and/or redistribute the software under the terms of the CeCILL-C license as * circulated by CEA, CNRS and INRIA at http://www.cecill.info. * * 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 CeCILL-C License for more details. * * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ package spoon.support.reflect.reference; import spoon.Launcher; import spoon.SpoonException; import spoon.reflect.annotations.MetamodelPropertyField; import spoon.reflect.declaration.CtEnum; import spoon.reflect.declaration.CtField; import spoon.reflect.declaration.CtType; import spoon.reflect.declaration.CtVariable; import spoon.reflect.declaration.ModifierKind; import spoon.reflect.reference.CtFieldReference; import spoon.reflect.reference.CtTypeReference; import spoon.reflect.visitor.CtVisitor; import spoon.support.SpoonClassNotFoundException; import spoon.support.util.RtHelper; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Member; import java.util.Collections; import java.util.Set; import static spoon.reflect.path.CtRole.DECLARING_TYPE; import static spoon.reflect.path.CtRole.IS_FINAL; import static spoon.reflect.path.CtRole.IS_STATIC; public class CtFieldReferenceImpl<T> extends CtVariableReferenceImpl<T> implements CtFieldReference<T> { private static final long serialVersionUID = 1L; @MetamodelPropertyField(role = DECLARING_TYPE) CtTypeReference<?> declaringType; @MetamodelPropertyField(role = IS_FINAL) boolean fina = false; @MetamodelPropertyField(role = IS_STATIC) boolean stat = false; public CtFieldReferenceImpl() { } @Override public void accept(CtVisitor visitor) { visitor.visitCtFieldReference(this); } @Override public Member getActualField() { CtTypeReference<?> typeRef = getDeclaringType(); if (typeRef == null) { throw new SpoonException("Declaring type of field " + getSimpleName() + " isn't defined"); } Class<?> clazz; try { clazz = typeRef.getActualClass(); } catch (SpoonClassNotFoundException e) { if (getFactory().getEnvironment().getNoClasspath()) { Launcher.LOGGER.info("The class " + typeRef.getQualifiedName() + " of field " + getSimpleName() + " is not on class path. Problem ignored in noclasspath mode"); return null; } throw e; } try { if (clazz.isAnnotation()) { return clazz.getDeclaredMethod(getSimpleName()); } else { return clazz.getDeclaredField(getSimpleName()); } } catch (NoSuchMethodException | NoSuchFieldException e) { throw new SpoonException("The field " + getQualifiedName() + " not found", e); } } @Override protected AnnotatedElement getActualAnnotatedElement() { return (AnnotatedElement) getActualField(); } // @Override // public <A extends Annotation> A getAnnotation(Class<A> annotationType) { // A annotation = super.getAnnotation(annotationType); // if (annotation != null) { // return annotation; // } // // use reflection // Class<?> c = getDeclaringType().getActualClass(); // if (c.isAnnotation()) { // for (Method m : RtHelper.getAllMethods(c)) { // if (!getSimpleName().equals(m.getName())) { // continue; // } // m.setAccessible(true); // return m.getAnnotation(annotationType); // } // } else { // for (Field f : RtHelper.getAllFields(c)) { // if (!getSimpleName().equals(f.getName())) { // continue; // } // f.setAccessible(true); // return f.getAnnotation(annotationType); // } // } // return null; // } // @Override // public Annotation[] getAnnotations() { // Annotation[] annotations = super.getAnnotations(); // if (annotations != null) { // return annotations; // } // // use reflection // Class<?> c = getDeclaringType().getActualClass(); // for (Field f : RtHelper.getAllFields(c)) { // if (!getSimpleName().equals(f.getName())) { // continue; // } // f.setAccessible(true); // return f.getAnnotations(); // } // // If the fields belong to an annotation type, they are actually // // methods // for (Method m : RtHelper.getAllMethods(c)) { // if (!getSimpleName().equals(m.getName())) { // continue; // } // m.setAccessible(true); // return m.getAnnotations(); // } // return null; // } @Override @SuppressWarnings("unchecked") public CtField<T> getDeclaration() { return fromDeclaringType(); } private CtField<T> fromDeclaringType() { if (declaringType == null) { return null; } CtType<?> type = declaringType.getDeclaration(); if (type != null) { return (CtField<T>) type.getField(getSimpleName()); } return null; } @Override public CtField<T> getFieldDeclaration() { if (declaringType == null) { return null; } CtType<?> type = declaringType.getTypeDeclaration(); if (type != null) { final CtField<T> ctField = (CtField<T>) type.getField(getSimpleName()); if (ctField == null && type instanceof CtEnum) { return ((CtEnum) type).getEnumValue(getSimpleName()); } return ctField; } return null; } @Override public CtTypeReference<?> getDeclaringType() { return declaringType; } @Override public String getQualifiedName() { CtTypeReference<?> declaringType = getDeclaringType(); if (declaringType != null) { return getDeclaringType().getQualifiedName() + "#" + getSimpleName(); } else { return "<unknown>#" + getSimpleName(); } } @Override public boolean isFinal() { return fina; } /** * Tells if the referenced field is static. */ @Override public boolean isStatic() { return stat; } @Override public <C extends CtFieldReference<T>> C setDeclaringType(CtTypeReference<?> declaringType) { if (declaringType != null) { declaringType.setParent(this); } getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, DECLARING_TYPE, declaringType, this.declaringType); this.declaringType = declaringType; return (C) this; } @Override public <C extends CtFieldReference<T>> C setFinal(boolean fina) { getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, IS_FINAL, fina, this.fina); this.fina = fina; return (C) this; } @Override public <C extends CtFieldReference<T>> C setStatic(boolean stat) { getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, IS_STATIC, stat, this.stat); this.stat = stat; return (C) this; } @Override public Set<ModifierKind> getModifiers() { CtVariable<?> v = getDeclaration(); if (v != null) { return v.getModifiers(); } Member m = getActualField(); if (m != null) { return RtHelper.getModifiers(m.getModifiers()); } return Collections.emptySet(); } @Override public CtFieldReference<T> clone() { return (CtFieldReference<T>) super.clone() ; } }
64953fd88caf7087de98e17d3f1466d625b1c6ea
bd269973faf84050ccd3e7bdd57b1b94d67f02c7
/control/src/main/java/com/MAVLink/common/msg_position_target_local_ned0.java
79552a3c3b5ee89a439f0ecd286aba1edcef220f
[]
no_license
guanqingguang0914/man5_sevice
99b045ed6b30b85cf2e2cae1f0d9cb0ca2ca1375
740a7f71f80d6e50372ef5d0e5a203cc1be9bfe5
refs/heads/master
2023-08-31T18:23:27.689525
2018-12-04T06:18:35
2018-12-04T06:18:35
160,308,856
0
0
null
null
null
null
UTF-8
Java
false
false
5,248
java
//// MESSAGE POSITION_TARGET_LOCAL_NED PACKING //package com.MAVLink.common; // //import com.MAVLink.MAVLinkPacket; //import com.MAVLink.Messages.MAVLinkMessage; //import com.MAVLink.Messages.MAVLinkPayload; ////import android.util.Log; // ///** // * Set vehicle position, velocity and acceleration setpoint in local frame. // */ //public class msg_position_target_local_ned extends MAVLinkMessage { // // public static final int MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED = 85; // public static final int MAVLINK_MSG_LENGTH = 43; // private static final long serialVersionUID = MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED; // // // /** // * Timestamp in milliseconds since system boot // */ // public int time_boot_ms; // /** // * X Position in NED frame in meters // */ // public float x; // /** // * Y Position in NED frame in meters // */ // public float y; // /** // * Z Position in NED frame in meters (note, altitude is negative in NED) // */ // public float z; // /** // * X velocity in NED frame in meter / s // */ // public float vx; // /** // * Y velocity in NED frame in meter / s // */ // public float vy; // /** // * Z velocity in NED frame in meter / s // */ // public float vz; // /** // * X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N // */ // public float afx; // /** // * Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N // */ // public float afy; // /** // * Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N // */ // public float afz; // /** // * Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint // */ // public short type_mask; // /** // * Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 // */ // public byte coordinate_frame; // // // /** // * Generates the payload for a mavlink message for a message of this type // * // * @return // */ // public MAVLinkPacket pack() { // MAVLinkPacket packet = new MAVLinkPacket(); // packet.len = MAVLINK_MSG_LENGTH; // packet.sysid = 255; // packet.compid = 190; // packet.msgid = MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED; // packet.payload.putInt(time_boot_ms); // packet.payload.putFloat(x); // packet.payload.putFloat(y); // packet.payload.putFloat(z); // packet.payload.putFloat(vx); // packet.payload.putFloat(vy); // packet.payload.putFloat(vz); // packet.payload.putFloat(afx); // packet.payload.putFloat(afy); // packet.payload.putFloat(afz); // packet.payload.putShort(type_mask); // packet.payload.putByte(coordinate_frame); // // return packet; // } // // /** // * Decode a position_target_local_ned message into this class fields // * // * @param payload The message to decode // */ // public void unpack(MAVLinkPayload payload) { // payload.resetIndex(); // this.time_boot_ms = payload.getInt(); // this.x = payload.getFloat(); // this.y = payload.getFloat(); // this.z = payload.getFloat(); // this.vx = payload.getFloat(); // this.vy = payload.getFloat(); // this.vz = payload.getFloat(); // this.afx = payload.getFloat(); // this.afy = payload.getFloat(); // this.afz = payload.getFloat(); // this.type_mask = payload.getShort(); // this.coordinate_frame = payload.getByte(); // // } // // /** // * Constructor for a new message, just initializes the msgid // */ // public msg_position_target_local_ned() { // msgid = MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED; // } // // /** // * Constructor for a new message, initializes the message with the payload // * from a mavlink packet // */ // public msg_position_target_local_ned(MAVLinkPacket mavLinkPacket) { // this.sysid = mavLinkPacket.sysid; // this.compid = mavLinkPacket.compid; // this.msgid = MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED; // unpack(mavLinkPacket.payload); // //Log.d("MAVLink", "POSITION_TARGET_LOCAL_NED"); // //Log.d("MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED", toString()); // } // // // /** // * Returns a string with the MSG name and data // */ // public String toString() { // return "MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED -" + " time_boot_ms:" + time_boot_ms + " x:" + x + " y:" + y + " z:" + z + " vx:" + vx + " vy:" + vy + " vz:" + vz + " afx:" + afx + " afy:" + afy + " afz:" + afz + " type_mask:" + type_mask + " coordinate_frame:" + coordinate_frame + ""; // } //} //
2077eb39a9dc5c70c1b817357767d148dfaa482a
58558513bbd69fe99463b4895bc5078dbe09596a
/src/us/jaba/titaniumblocks/core/tickmarks/marks/types/clock/round/DashCirclesTicks.java
054ad0da1b921ffedd44a011b4b173f934ec31e2
[]
no_license
tonybeckett/TitaniumBlocks
16fdd135b46cb2e4b534a7b5ea36c3ee7e2c7139
32354597255b007a67fed500a707538509c5bfb5
refs/heads/master
2020-05-21T13:43:54.732539
2016-12-08T23:21:09
2016-12-08T23:21:09
48,827,953
1
0
null
null
null
null
UTF-8
Java
false
false
3,073
java
/* * Copyright (c) 2015, Tony Beckett * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * The names of its contributors may not be used to endorse or promote * products derived from this software without specific prior written * permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ package us.jaba.titaniumblocks.core.tickmarks.marks.types.clock.round; import java.awt.BasicStroke; import java.awt.Dimension; import java.awt.Graphics2D; import us.jaba.titaniumblocks.core.shape.ShapeUtils; import us.jaba.titaniumblocks.core.tickmarks.marks.types.AbstractRadialTickmark; public class DashCirclesTicks extends AbstractRadialTickmark { private static final double DEFAULT_TEXT_POSITION = 0.85; public DashCirclesTicks() { //intentional } @Override public void subPaint(Graphics2D graphics, Dimension dimensions) { mediumStroke = new BasicStroke(((float) dimensions.width / 500.0f * 2.0F), BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL); majorStroke = new BasicStroke(((float) dimensions.width / 500.0f * 5.0F), BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL); final float tickRadius = (float) (dimensions.getWidth() * 0.485f * this.ticksPositionScale.getValue()); graphics.setColor(mediumColor); graphics.setStroke(mediumStroke); ShapeUtils.drawRadialLines(graphics, centerPoint, tickRadius * 0.9, tickRadius * 0.95, 0.0, 6.0, 60); graphics.setColor(majorColor); graphics.setStroke(majorStroke); for (int i = 0; i < 4; i++) { ShapeUtils.placeCirclesOnRadius(graphics, centerPoint, tickRadius * 0.750, tickRadius * 0.075, (90.0 * i) + 30.0, 30.0, false, 2); } ShapeUtils.drawRadialLines(graphics, centerPoint, tickRadius * 0.65, tickRadius * 0.85, 0, 90.0, 4); graphics.dispose(); } }
e2acf02b64bf6698affed78a721a87fb03eb8470
dedd8b238961dbb6889a864884e011ce152d1d5c
/src/com/seeclickfix/ma/android/fragments/FeedFrag$11.java
8b7ef1ae097d8cb174077d556dcd9d0085b8c979
[]
no_license
reverseengineeringer/gov.cityofboston.commonwealthconnect
d553a8a7a4fcd7b846eebadb6c1e3e9294919eb7
1a829995d5527f4d5798fa578ca1b0fe499839e1
refs/heads/master
2021-01-10T05:08:31.188375
2016-03-19T20:37:17
2016-03-19T20:37:17
54,285,966
0
1
null
null
null
null
UTF-8
Java
false
false
691
java
package com.seeclickfix.ma.android.fragments; import com.seeclickfix.ma.android.fragments.interfaces.CommentCardClickListener; import com.seeclickfix.ma.android.fragments.interfaces.HomeButtonsInterface; import com.seeclickfix.ma.android.objects.issue.Comment; class FeedFrag$11 implements CommentCardClickListener { FeedFrag$11(FeedFrag paramFeedFrag) {} public void onCommentCardClick(Comment paramComment) { ((HomeButtonsInterface)this$0.getActivity()).onClickButton(4, Integer.valueOf(paramComment.getIssueId())); } } /* Location: * Qualified Name: com.seeclickfix.ma.android.fragments.FeedFrag.11 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
7b7dd5d7ca620363f057f3115a6bd9c39560e359
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a183/A183207Test.java
b5cc45cbaa1f6c8469d7c6debff2d5d4d9a084af
[]
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.a183; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A183207Test extends AbstractSequenceTest { }
08b08ca9bec99873a44f5accfb25fbbc284731e0
2dfb6d4c2b9255754f2e8801cb1483fd23e3915f
/src/org/iesapp/clients/sgd7/clases/ClasesCollection.java
4b8a5613a0a3bb595d56833dd424493fc1736675
[]
no_license
jmulet/sgd-client
4a36c1bd2b5e9d98b6640d9c1153e0ab26c6b0e2
1a055a396f04ab6d78f36cc22497eb27f9fffdb4
refs/heads/master
2020-05-18T21:55:51.913760
2013-07-31T15:22:25
2013-07-31T15:22:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,508
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.iesapp.clients.sgd7.clases; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import org.iesapp.clients.sgd7.IClient; import org.iesapp.clients.sgd7.IClientController; import org.iesapp.clients.sgd7.base.SgdBase; import org.iesapp.clients.sgd7.logger.Log; import org.iesapp.clients.sgd7.profesores.BeanFaltasProfesores; import org.iesapp.database.MyDatabase; import org.iesapp.util.DataCtrl; /** * * @author Josep */ public class ClasesCollection implements IClientController { private final IClient client; public ClasesCollection() { this.client = null; } public ClasesCollection(IClient client) { this.client = client; } /** * * @param idProfesor * @return */ public ArrayList<BeanClase> getClasesProfe(String idProfesor) { return new Clases(idProfesor,-1, client).getHorario(); } public int findIdConceptoEvaluable(String grupo) { int id = 0; String nivel=""; String estudis=""; if(grupo.contains("1")) { nivel="1r"; } else if(grupo.contains("2")) { nivel="2n"; } else if(grupo.contains("3")) { nivel="3r"; } else if(grupo.contains("4")) { nivel="4t"; } if(grupo.toUpperCase().contains("ESO")) { estudis="ESO"; } else if(grupo.toUpperCase().contains("BAT")) { estudis="BAT"; } String SQL1 = "Select id from tiponota where descripcion like '%"+nivel+"%"+estudis+"%'"; try { Statement st = getSgd().createStatement(); ResultSet rs1 = getSgd().getResultSet(SQL1,st); if(rs1!=null && rs1.next()) { id = rs1.getInt("id"); } if(rs1!=null) { rs1.close(); st.close(); } } catch (SQLException ex) { Logger.getLogger(ClasesCollection.class.getName()).log(Level.SEVERE, null, ex); } return id; } //Obté una llista de clases de guardia //Omple el bean clase guardia i a mes crea un beanFaltaProfe public ArrayList<BeanClaseGuardia> getSubstitucionesByProfeGuardia(final MyDatabase sgd, final int idDias, final java.util.Date fecha, final String idProfesores2) { ArrayList<BeanClaseGuardia> list = new ArrayList<BeanClaseGuardia>(); String SQL1 = "SELECT DISTINCT " + " horascentro.inicio, " + " horascentro.fin, " + " clases.nombre AS grupo, " + " aulas.descripcionLarga AS aula, " + " clases.id AS idClase, " + " horarios.idHorasCentro, " + " horarios.idProfesores, " + " profesores.nombre, " + " fp.idProfesores2, " + " fp.idTipoIncidencias, " + " fp.observaciones, " + " fp.fecha, " + " fp.hora, " + " ti.descripcion, " + " ti.simbolo " + " FROM " + " horarios " + " INNER JOIN " + " profesores " + " ON profesores.id = horarios.idProfesores " + " LEFT JOIN " + " aulas " + " ON (horarios.idAulas = aulas.id) " + " LEFT JOIN " + " horascentro " + " ON ( " + " horarios.idHorascentro = horascentro.id " + " ) " + " INNER JOIN " + " clases " + " ON (horarios.idClases = clases.id) " + " LEFT JOIN " + " clasesdetalle AS cd " + " ON cd.idClases = clases.id " + " LEFT JOIN " + " grupasig AS ga " + " ON ga.id = cd.idGrupasig " + " LEFT JOIN " + " asignaturas AS asig " + " ON asig.id = ga.idAsignaturas " + " INNER JOIN " + " faltasprofesores AS fp " + " ON (fp.idProfesores=horarios.idProfesores " + " AND fp.idHorasCentro=horarios.idHorascentro AND cd.idGrupasig=fp.idGrupAsig) " + " LEFT JOIN " + " tipoincidencias as ti" + " ON ti.id=fp.idTipoIncidencias " + " WHERE (horarios.idDias="+idDias+" AND fp.fecha='"+new DataCtrl(fecha).getDataSQL()+"' " + " AND idProfesores2="+idProfesores2+" )" + " ORDER BY inicio, profesores.nombre "; try { Statement st = sgd.createStatement(); ResultSet rs1 = sgd.getResultSet(SQL1,st); while(rs1!=null && rs1.next()) { //Construeix el bean base BeanClaseGuardia bh = new BeanClaseGuardia(); bh.setAula(rs1.getString("aula")); bh.setInicio(rs1.getTime("inicio")); bh.setFin(rs1.getTime("fin")); bh.setGrupo(rs1.getString("grupo")); int idClase = rs1.getInt("idClase"); bh.setIdClase(idClase); bh.setIdHorasCentro(rs1.getInt("idHorasCentro")); //bh.setMateria(""); //no aplica bh.setIdProfesor(rs1.getString("idProfesores")); bh.setNombreProfesor(rs1.getString("nombre")); //Aqui carrega la informacio del BeanFaltasProfesores BeanFaltasProfesores beanfp = new BeanFaltasProfesores(); beanfp.setIdTipoIncidencias(rs1.getInt("idTipoIncidencias")); beanfp.setObservaciones(rs1.getString("observaciones")); beanfp.setDescripcion(rs1.getString("descripcion")); beanfp.setSimbolo(rs1.getString("simbolo")); beanfp.setIdProfesores2(rs1.getString("idProfesores2")); beanfp.setIdProfesores(rs1.getString("idProfesores")); beanfp.setFecha(rs1.getDate("fecha")); beanfp.setHora(rs1.getTime("hora")); beanfp.setIdHorasCentro(rs1.getInt("idHorasCentro")); bh.setBeanFProf(beanfp); list.add(bh); } if(rs1!=null){ rs1.close(); st.close(); } } catch (SQLException ex) { Logger.getLogger(ClasesCollection.class.getName()).log(Level.SEVERE, null, ex); } return list; } @Override public MyDatabase getMysql() { if(client==null) { return SgdBase.getMysql(); } else { return client.getMysql(); } } @Override public MyDatabase getSgd() { if(client==null) { return SgdBase.getSgd(); } else { return client.getSgd(); } } @Override public Log getLogger() { if(client==null) { return new Log(); } else { return client.getLogger(); } } }
[ "Josep@hpjosep" ]
Josep@hpjosep
aa6c54b9d36abbc9b6f124f72f77f23f1450db26
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mobileqqi/classes.jar/com/tencent/mobileqq/servlet/QQLevelACCServlet.java
a7dd47ea4ff61b9082fcb8daa4919329b29d6d1e
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
4,076
java
package com.tencent.mobileqq.servlet; import android.content.Intent; import android.os.Bundle; import com.tencent.mobileqq.app.QQAppInterface; import com.tencent.mobileqq.observer.QQLevelACCObserver; import com.tencent.mobileqq.pb.ByteStringMicro; import com.tencent.mobileqq.pb.PBBytesField; import com.tencent.mobileqq.pb.PBUInt32Field; import com.tencent.qphone.base.remote.FromServiceMsg; import com.tencent.qphone.base.util.QLog; import java.nio.ByteBuffer; import mqq.app.MSFServlet; import mqq.app.NewIntent; import mqq.app.Packet; import tencent.im.oidb.oidb_sso.OIDBSSOPkg; public class QQLevelACCServlet extends MSFServlet { private static String a = "QQLevelACCServlet"; private static final String b = "OidbSvc.0x826_0"; private static final String c = "k_uin"; public static void a(QQAppInterface paramQQAppInterface) { NewIntent localNewIntent = new NewIntent(paramQQAppInterface.a(), QQLevelACCServlet.class); localNewIntent.putExtra("k_uin", paramQQAppInterface.a()); paramQQAppInterface.startServlet(localNewIntent); if (QLog.isColorLevel()) { QLog.d(a, 2, "getLevelACCInfo:--startServlet--"); } } byte[] a(long paramLong) { Object localObject = new oidb_sso.OIDBSSOPkg(); ((oidb_sso.OIDBSSOPkg)localObject).uint32_command.set(2086); ((oidb_sso.OIDBSSOPkg)localObject).uint32_service_type.set(0); ByteBuffer localByteBuffer = ByteBuffer.allocate(8); localByteBuffer.putInt((int)paramLong); ((oidb_sso.OIDBSSOPkg)localObject).bytes_bodybuffer.set(ByteStringMicro.copyFrom(localByteBuffer.array())); localObject = ((oidb_sso.OIDBSSOPkg)localObject).toByteArray(); localByteBuffer = ByteBuffer.allocate(localObject.length + 4); localByteBuffer.putInt(localObject.length + 4); localByteBuffer.put((byte[])localObject); return localByteBuffer.array(); } public void onReceive(Intent paramIntent, FromServiceMsg paramFromServiceMsg) { bool = paramFromServiceMsg.isSuccess(); if (QLog.isColorLevel()) { QLog.d(a, 2, "onReceive:--success=" + bool); } Bundle localBundle = new Bundle(); try { paramFromServiceMsg = ByteBuffer.wrap(paramFromServiceMsg.getWupBuffer()); paramFromServiceMsg.clear(); byte[] arrayOfByte = new byte[paramFromServiceMsg.getInt() - 4]; paramFromServiceMsg.get(arrayOfByte); paramFromServiceMsg = ByteBuffer.wrap(((oidb_sso.OIDBSSOPkg)new oidb_sso.OIDBSSOPkg().mergeFrom(arrayOfByte)).bytes_bodybuffer.get().toByteArray()); if (paramFromServiceMsg.get() != 0) { break label237; } paramFromServiceMsg.getInt(); int j = paramFromServiceMsg.getShort(); i = 0; for (;;) { if (i >= j) { break label237; } if (paramFromServiceMsg.getShort() == 5) { break; } paramFromServiceMsg.position(paramFromServiceMsg.getShort() + paramFromServiceMsg.position()); i += 1; } paramFromServiceMsg.getShort(); i = paramFromServiceMsg.getShort(); } catch (Exception paramFromServiceMsg) { for (;;) { paramFromServiceMsg.printStackTrace(); int i = 0; bool = false; continue; i = 0; } } if (QLog.isColorLevel()) { QLog.d(a, 2, "onReceive:--speed=" + i); } localBundle.putInt("key_qqlevelacc", i); notifyObserver(paramIntent, 1, bool, localBundle, QQLevelACCObserver.class); } public void onSend(Intent paramIntent, Packet paramPacket) { paramPacket.putSendData(a(Long.parseLong(paramIntent.getStringExtra("k_uin")))); paramPacket.setSSOCommand("OidbSvc.0x826_0"); if (QLog.isColorLevel()) { QLog.d(a, 2, "--onSend--"); } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes.jar * Qualified Name: com.tencent.mobileqq.servlet.QQLevelACCServlet * JD-Core Version: 0.7.0.1 */
81dfdc084588be9872a325f6c76301b9c279b84a
9254e7279570ac8ef687c416a79bb472146e9b35
/edas-20170801/src/main/java/com/aliyun/edas20170801/models/ListEcsNotInClusterResponse.java
6d2e6913a88d84f2ea1cb8665d2217c07981b3b0
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,098
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.edas20170801.models; import com.aliyun.tea.*; public class ListEcsNotInClusterResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public ListEcsNotInClusterResponseBody body; public static ListEcsNotInClusterResponse build(java.util.Map<String, ?> map) throws Exception { ListEcsNotInClusterResponse self = new ListEcsNotInClusterResponse(); return TeaModel.build(map, self); } public ListEcsNotInClusterResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ListEcsNotInClusterResponse setBody(ListEcsNotInClusterResponseBody body) { this.body = body; return this; } public ListEcsNotInClusterResponseBody getBody() { return this.body; } }
53ad275d4fe4c9f130dc4e8b192fc70629d4c3e9
abbece01134969e145539d69c47f33b677381fad
/scroll/src/main/java/cdflynn/android/library/scroller/cache/CacheInterface.java
55dcd3c8ffda09dbe550ccd681654553c2167e6b
[]
no_license
jinsedeyuzhou/bubble-scroll
e0aaf2f2fd371aea548822ef26412515aa4ae507
bb2f043f42e4a742983e20c645fd3f561bdd90c8
refs/heads/master
2020-07-03T20:08:15.685866
2019-08-13T04:03:16
2019-08-13T04:03:16
202,035,316
0
0
null
2019-08-13T01:08:41
2019-08-13T01:08:41
null
UTF-8
Java
false
false
527
java
package cdflynn.android.library.scroller.cache; /** * Created by gavin * date 2018/3/4 * 缓存工具需要暴露的接口 */ public interface CacheInterface<T> { /** * 加入缓存 * @param position * @param t */ void put(int position, T t); /** * 从缓存中获取 * @param position * @return */ T get(int position); /** * 移除 * @param position */ void remove(int position); /** * 清空缓存 */ void clean(); }
72898a5c86ec429e0d3be4ef6fa10c160a651836
995f73d30450a6dce6bc7145d89344b4ad6e0622
/DVC-AN20_EMUI10.1.1/src/main/java/android/se/omapi/Session.java
5e3c08eba3f99c2fe70737e4144b14dce70cfbad
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,776
java
package android.se.omapi; import android.os.RemoteException; import android.os.ServiceSpecificException; import android.util.Log; import java.io.IOException; import java.util.NoSuchElementException; public final class Session { private static final String TAG = "OMAPI.Session"; private final Object mLock = new Object(); private final Reader mReader; private final SEService mService; private final ISecureElementSession mSession; Session(SEService service, ISecureElementSession session, Reader reader) { if (service == null || reader == null || session == null) { throw new IllegalArgumentException("Parameters cannot be null"); } this.mService = service; this.mReader = reader; this.mSession = session; } public Reader getReader() { return this.mReader; } public byte[] getATR() { if (this.mService.isConnected()) { try { return this.mSession.getAtr(); } catch (RemoteException e) { throw new IllegalStateException(e.getMessage()); } } else { throw new IllegalStateException("service not connected to system"); } } public void close() { if (!this.mService.isConnected()) { Log.e(TAG, "service not connected to system"); return; } synchronized (this.mLock) { try { this.mSession.close(); } catch (RemoteException e) { Log.e(TAG, "Error closing session", e); } } } public boolean isClosed() { try { return this.mSession.isClosed(); } catch (RemoteException e) { return true; } } public void closeChannels() { if (!this.mService.isConnected()) { Log.e(TAG, "service not connected to system"); return; } synchronized (this.mLock) { try { this.mSession.closeChannels(); } catch (RemoteException e) { Log.e(TAG, "Error closing channels", e); } } } public Channel openBasicChannel(byte[] aid, byte p2) throws IOException { if (this.mService.isConnected()) { synchronized (this.mLock) { try { ISecureElementChannel channel = this.mSession.openBasicChannel(aid, p2, this.mReader.getSEService().getListener()); if (channel == null) { return null; } return new Channel(this.mService, this, channel); } catch (ServiceSpecificException e) { if (e.errorCode == 1) { throw new IOException(e.getMessage()); } else if (e.errorCode == 2) { throw new NoSuchElementException(e.getMessage()); } else { throw new IllegalStateException(e.getMessage()); } } catch (RemoteException e2) { throw new IllegalStateException(e2.getMessage()); } } } else { throw new IllegalStateException("service not connected to system"); } } public Channel openBasicChannel(byte[] aid) throws IOException { return openBasicChannel(aid, (byte) 0); } public Channel openLogicalChannel(byte[] aid, byte p2) throws IOException { if (this.mService.isConnected()) { synchronized (this.mLock) { try { ISecureElementChannel channel = this.mSession.openLogicalChannel(aid, p2, this.mReader.getSEService().getListener()); if (channel == null) { return null; } return new Channel(this.mService, this, channel); } catch (ServiceSpecificException e) { if (e.errorCode == 1) { throw new IOException(e.getMessage()); } else if (e.errorCode == 2) { throw new NoSuchElementException(e.getMessage()); } else { throw new IllegalStateException(e.getMessage()); } } catch (RemoteException e2) { throw new IllegalStateException(e2.getMessage()); } } } else { throw new IllegalStateException("service not connected to system"); } } public Channel openLogicalChannel(byte[] aid) throws IOException { return openLogicalChannel(aid, Byte.MAX_VALUE); } }
af41cb45d67ce8b05b3f3639530628fd658921ef
f5acd38efe9f28e14a3e77cf60f938000a6660ab
/clients/android/generated/src/main/java/org/openapitools/client/model/GithubRepository.java
87220ca2d2f181356419c6ddbbe8e5d66aa86272
[ "MIT" ]
permissive
rahulyhg/swaggy-jenkins
3fc9377c8cf8643d6b4ffe4a6aceb49315afdb8e
21326779f8814a07153acaf5af15ffbbd593c48b
refs/heads/master
2020-05-04T16:14:43.369417
2019-01-27T06:27:32
2019-01-27T06:27:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,374
java
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * OpenAPI spec version: 1.0.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import org.openapitools.client.model.GithubRepositorylinks; import org.openapitools.client.model.GithubRepositorypermissions; import io.swagger.annotations.*; import com.google.gson.annotations.SerializedName; @ApiModel(description = "") public class GithubRepository { @SerializedName("_class") private String _class = null; @SerializedName("_links") private GithubRepositorylinks links = null; @SerializedName("defaultBranch") private String defaultBranch = null; @SerializedName("description") private String description = null; @SerializedName("name") private String name = null; @SerializedName("permissions") private GithubRepositorypermissions permissions = null; @SerializedName("private") private Boolean _private = null; @SerializedName("fullName") private String fullName = null; /** **/ @ApiModelProperty(value = "") public String getClass() { return _class; } public void setClass(String _class) { this._class = _class; } /** **/ @ApiModelProperty(value = "") public GithubRepositorylinks getLinks() { return links; } public void setLinks(GithubRepositorylinks links) { this.links = links; } /** **/ @ApiModelProperty(value = "") public String getDefaultBranch() { return defaultBranch; } public void setDefaultBranch(String defaultBranch) { this.defaultBranch = defaultBranch; } /** **/ @ApiModelProperty(value = "") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } /** **/ @ApiModelProperty(value = "") public String getName() { return name; } public void setName(String name) { this.name = name; } /** **/ @ApiModelProperty(value = "") public GithubRepositorypermissions getPermissions() { return permissions; } public void setPermissions(GithubRepositorypermissions permissions) { this.permissions = permissions; } /** **/ @ApiModelProperty(value = "") public Boolean getPrivate() { return _private; } public void setPrivate(Boolean _private) { this._private = _private; } /** **/ @ApiModelProperty(value = "") public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GithubRepository githubRepository = (GithubRepository) o; return (this._class == null ? githubRepository._class == null : this._class.equals(githubRepository._class)) && (this.links == null ? githubRepository.links == null : this.links.equals(githubRepository.links)) && (this.defaultBranch == null ? githubRepository.defaultBranch == null : this.defaultBranch.equals(githubRepository.defaultBranch)) && (this.description == null ? githubRepository.description == null : this.description.equals(githubRepository.description)) && (this.name == null ? githubRepository.name == null : this.name.equals(githubRepository.name)) && (this.permissions == null ? githubRepository.permissions == null : this.permissions.equals(githubRepository.permissions)) && (this._private == null ? githubRepository._private == null : this._private.equals(githubRepository._private)) && (this.fullName == null ? githubRepository.fullName == null : this.fullName.equals(githubRepository.fullName)); } @Override public int hashCode() { int result = 17; result = 31 * result + (this._class == null ? 0: this._class.hashCode()); result = 31 * result + (this.links == null ? 0: this.links.hashCode()); result = 31 * result + (this.defaultBranch == null ? 0: this.defaultBranch.hashCode()); result = 31 * result + (this.description == null ? 0: this.description.hashCode()); result = 31 * result + (this.name == null ? 0: this.name.hashCode()); result = 31 * result + (this.permissions == null ? 0: this.permissions.hashCode()); result = 31 * result + (this._private == null ? 0: this._private.hashCode()); result = 31 * result + (this.fullName == null ? 0: this.fullName.hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GithubRepository {\n"); sb.append(" _class: ").append(_class).append("\n"); sb.append(" links: ").append(links).append("\n"); sb.append(" defaultBranch: ").append(defaultBranch).append("\n"); sb.append(" description: ").append(description).append("\n"); sb.append(" name: ").append(name).append("\n"); sb.append(" permissions: ").append(permissions).append("\n"); sb.append(" _private: ").append(_private).append("\n"); sb.append(" fullName: ").append(fullName).append("\n"); sb.append("}\n"); return sb.toString(); } }
fc6ee45c023e6e74b34ea3b4d6740856ff67d685
dc17a43f25cfd1d3ecf0ffebf709b2721c80031d
/IDE/editor/com.lembed.lite.studio.manager.analysis.editor/elf/com/lembed/lite/studio/manager/analysis/editor/elf/ui/widgets/package-info.java
e43553d38dd2136b373cdc14c0c08d4f59eed168
[]
no_license
skykying/bundle
e7b25a8d56668a5cb1cd70932d14958927960e50
0b3b590760baa953677eb99e07d7e1a37af5434c
refs/heads/master
2023-01-07T20:03:42.318642
2020-11-08T06:36:39
2020-11-08T06:36:39
306,216,461
0
0
null
null
null
null
UTF-8
Java
false
false
647
java
/******************************************************************************* * Copyright (C) 2017 Lembed Electronic. * 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: * Lembed Electronic - initial API and implementation ******************************************************************************/ /** * */ /** * @author Administrator * */ package com.lembed.lite.studio.manager.analysis.editor.elf.ui.widgets;
263c0f1c6cf312edfffddff59c3eb1c350301c9c
832a25d71428fcc97554ead3184c34c7668c13f6
/src/main/java/com/jeeplus/modules/report/ironfofiveqtzyqtzlreport/service/IronfofiveqtzyqtzlReportService.java
81a7bf427a92eda227b0a415271a8ad8320fb7e3
[]
no_license
wxbing2015/jeeplusS
bb3b2bc7e475a7042c9a147952008ca93de59feb
faf39d547fad5fad9ff0e046fd9a657f2202a886
refs/heads/master
2020-07-19T11:44:35.847707
2018-05-02T11:59:39
2018-05-02T11:59:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,528
java
/** * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved. */ package com.jeeplus.modules.report.ironfofiveqtzyqtzlreport.service; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.jeeplus.common.persistence.Page; import com.jeeplus.common.service.CrudService; import com.jeeplus.modules.report.ironfofiveqtzyqtzlreport.entity.IronfofiveqtzyqtzlReport; import com.jeeplus.modules.report.ironfofiveqtzyqtzlreport.dao.IronfofiveqtzyqtzlReportDao; /** * 气体种类Service * @author anti_magina * @version 2018-04-23 */ @Service @Transactional(readOnly = true) public class IronfofiveqtzyqtzlReportService extends CrudService<IronfofiveqtzyqtzlReportDao, IronfofiveqtzyqtzlReport> { public IronfofiveqtzyqtzlReport get(String id) { return super.get(id); } public List<IronfofiveqtzyqtzlReport> findList(IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { return super.findList(ironfofiveqtzyqtzl); } public Page<IronfofiveqtzyqtzlReport> findPage(Page<IronfofiveqtzyqtzlReport> page, IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { return super.findPage(page, ironfofiveqtzyqtzl); } @Transactional(readOnly = false) public void save(IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { super.save(ironfofiveqtzyqtzl); } @Transactional(readOnly = false) public void delete(IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { super.delete(ironfofiveqtzyqtzl); } }
3526ce6fdfe00be0801d5202cc6530dd00fc3cda
8823c96d433605e7c13679b027a697e6a647cf9c
/src/main/java/com/lzhlyle/leetcode/tomorrow/no115/DistinctSubsequences_DP_Adv.java
ed3b39a92af861b164fde636a676e883622948a7
[ "MIT" ]
permissive
lzhlyle/leetcode
62278bf6e949f802da335e8de2d420440f578c2f
8f053128ed7917c231fd24cfe82552d9c599dc16
refs/heads/master
2022-07-14T02:28:11.082595
2020-11-16T14:28:20
2020-11-16T14:28:20
215,598,819
2
0
MIT
2022-06-17T02:55:41
2019-10-16T16:52:05
Java
UTF-8
Java
false
false
579
java
package com.lzhlyle.leetcode.tomorrow.no115; public class DistinctSubsequences_DP_Adv { public int numDistinct(String s, String t) { int slen = s.length(), tlen = t.length(); int[] dp = new int[tlen + 1]; for (int si = 0; si < slen; si++) { int northwest = dp[0] = 1; for (int ti = 0; ti < tlen; ti++) { int next = dp[ti + 1]; if (s.charAt(si) == t.charAt(ti)) dp[ti + 1] += northwest; northwest = next; } } return dp[tlen]; } }
976e173c0f4534ddc3c0136b8ed71e505d829cdd
3b22415910ee1f7726e77134e819eb805c775b8d
/Final_MFI/src/main/java/com/mfi/controller/ChangePasswordController.java
35e27e8984833ff123d250b890aca52a35aa31e0
[]
no_license
thureintun-me/ACE_MFI
0b7566589dfa408ba4840568d02682c8a109c8e6
dbe381db07fbdcb78f379fac0800eaef317b84e0
refs/heads/master
2023-03-06T00:00:25.418510
2021-02-17T12:28:38
2021-02-17T12:28:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,690
java
package com.mfi.controller; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.mfi.formmodel.UserChangePassword; import com.mfi.model.User; import com.mfi.service.MyUserDetails; import com.mfi.service.UserService; @Controller public class ChangePasswordController { @Autowired UserService userService; @Autowired private PasswordEncoder passwordEncoder; @RequestMapping("/setup") public String setup(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); MyUserDetails currentPrincipalName = (MyUserDetails) authentication.getPrincipal(); int userId = currentPrincipalName.getUserId(); String username = currentPrincipalName.getUsername(); System.out.println("name"+username); //User user = userService.selectOne(userId); model.addAttribute("changePassuname", username); model.addAttribute("changePasswordBean", new UserChangePassword()); return "mfi/user/MFI_USR_03"; } @RequestMapping("/userChangePassword") public String changePass(@ModelAttribute("changePasswordBean")@Valid UserChangePassword userChnagePass,BindingResult result,RedirectAttributes redirectAttributes) { if (result.hasErrors()) { redirectAttributes.addFlashAttribute("changePasswordBean",userChnagePass); return "mfi/user/MFI_USR_03"; } Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); MyUserDetails currentPrincipalName = (MyUserDetails) authentication.getPrincipal(); int userId = currentPrincipalName.getUserId(); User user = userService.selectOne(userId); if(userChnagePass.getNewPassword().equals(userChnagePass.getConfirmPassword())){ user.setPassword(passwordEncoder.encode(userChnagePass.getNewPassword())); userService.update(user); boolean mesg = true; redirectAttributes.addFlashAttribute("mesg",mesg); return "redirect:/setup"; }else { boolean err = true; redirectAttributes.addFlashAttribute("err", err); return "redirect:/setup"; } } }
065dc3e86616afb52359d05c111b638f31705983
7bbea063b44d212f82eff499d8291aaaca85daa1
/Genealogy/src/main/java/ws/daley/genealogy/menubar/view/ViewMediaMenuItem.java
c24b71287ebb643f4fa6387d7c5a116ad7b6deb5
[]
no_license
AixNPanes/genealogy
d6bfc02c67d04341ea6faed501ffd9474cc4e408
111e89209852a8d48b3b6002bc0bbf2c2b7289cb
refs/heads/master
2022-05-26T20:00:31.342782
2021-07-20T21:27:41
2021-07-20T21:27:41
62,721,459
0
0
null
2022-05-20T20:49:27
2016-07-06T13:04:08
Java
UTF-8
Java
false
false
526
java
package ws.daley.genealogy.menubar.view; import org.slf4j.LoggerFactory; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.LoggerContext; import ws.daley.genealogy.menubar.MyMenuItem; @SuppressWarnings("serial") public class ViewMediaMenuItem extends MyMenuItem { private static final Logger log = ((LoggerContext)LoggerFactory.getILoggerFactory()).getLogger(ViewMediaMenuItem.class); public ViewMediaMenuItem() { super("&Media", 0); log.trace(this.getClass().getSimpleName() + " Exitting"); } }
3a3e92efaee6b8297691cc19ab2ab69d84f03a86
fb653699a76413300e90b75ce4626ebbd78afdcf
/academy6721/src/by/academy/lesson17/ReflectionFieldDemo.java
a70e11eaa8fa84cd08a0e99caa0ebd4f69bfae49
[]
no_license
dmitry-academy/academy6721
4ca560f6c413c24ce94a9c5e6623c6ea85143c46
6cb68cc9e4bfb29e1de81837ff0851667c4d9b57
refs/heads/master
2023-03-24T20:38:59.741311
2021-03-27T12:17:47
2021-03-27T12:17:47
330,203,298
0
2
null
null
null
null
UTF-8
Java
false
false
1,604
java
package by.academy.lesson17; import java.lang.reflect.Field; import java.lang.reflect.Modifier; public class ReflectionFieldDemo { public static void main(String... args) { Car car = new Car(500, "1233"); Class<? extends Car> carClass = Car.class; // Example 1 try { Field serialNumberField = carClass.getDeclaredField("horsePower"); String serialNumberValue = (String) serialNumberField.get(car); System.out.println(serialNumberValue); // output: 1233 } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { e.printStackTrace(); } // Example 2 try { Field horsepowerField = carClass.getDeclaredField("horsepower"); horsepowerField.setAccessible(true); int horsepowerValue = horsepowerField.getInt(car); System.out.println(horsepowerValue); } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { e.printStackTrace(); } // Example 3 try { Field horsepowerField = carClass.getDeclaredField("horsepower"); String name = horsepowerField.getName(); System.out.println(name); Class<?> type = horsepowerField.getType(); System.out.println(type); int modifiers = horsepowerField.getModifiers(); System.out.println(modifiers); // output: 2 System.out.println("isPrivate: " + Modifier.isPrivate(modifiers)); // output: true System.out.println("isFinal: " + Modifier.isFinal(modifiers)); // output: false } catch (NoSuchFieldException | SecurityException | IllegalArgumentException e) { e.printStackTrace(); } } }
b697f531a333b66ffc72f11332413b57b5f29a2c
0574bb948761d496942d2f07b8c3a38b1b757659
/app/src/main/java/com/youli/zbetuch/jingan/naire/ShowPersionHistoryList.java
2967cacf9d6983f92d89c0baef637a2482833811
[]
no_license
542210035/ZBETuch_new_phone
3d2227fb15172ca6380111520dee5985e0c973cc
e7b69e76c3c9f68fba4aade789204d4afad21d79
refs/heads/master
2021-07-24T22:41:37.529161
2017-11-06T03:47:49
2017-11-06T03:47:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,018
java
package com.youli.zbetuch.jingan.naire; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import okhttp3.Call; import okhttp3.OkHttpClient; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.youli.zbetuch.jingan.R; import com.youli.zbetuch.jingan.utils.MyOkHttpUtils; import com.zhy.http.okhttp.OkHttpUtils; import com.zhy.http.okhttp.callback.StringCallback; import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.LinearLayout; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; public class ShowPersionHistoryList extends Activity{ private TextView qx_tv, pid_tv, number_tv, name_tv, sex_tv, sfz_tv, edu_tv, zt_tv, jd_tv, jw_tv, lxdz_tv, phone, dzszqx_tv,sphl_tv_name; public HistoryInfo info; private LinearLayout lv_title; private ListView lv; private HistoryListAdapter adapter; private List<FamilyInfo> listInfo=new ArrayList<FamilyInfo>(); private ProgressDialog dialog; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_showpersionhistorylist); info = (HistoryInfo) getIntent().getSerializableExtra("info"); qx_tv = (TextView) this.findViewById(R.id.qx_sphl); pid_tv = (TextView) this.findViewById(R.id.pid_sphl); number_tv = (TextView) this.findViewById(R.id.id_sphl); name_tv = (TextView) this.findViewById(R.id.name_sphl); sex_tv = (TextView) this.findViewById(R.id.sex_sphl); edu_tv = (TextView) this.findViewById(R.id.edu_sphl); sfz_tv = (TextView) this.findViewById(R.id.sfz_sphl); jd_tv = (TextView) this.findViewById(R.id.jd_sphl); jw_tv = (TextView) this.findViewById(R.id.jw_sphl); lxdz_tv = (TextView) this.findViewById(R.id.lxdz_sphl); phone = (TextView) this.findViewById(R.id.lxdh_sphl); zt_tv = (TextView) this.findViewById(R.id.status_sphl); dzszqx_tv = (TextView) this.findViewById(R.id.hjqx_sphl); lv_title=(LinearLayout) findViewById(R.id.sphl_ll_title); sphl_tv_name=(TextView) findViewById(R.id.sphl_tv_name); if(info.getQA_MASTER()==5){ sphl_tv_name.setVisibility(View.VISIBLE); }else if(info.getQA_MASTER()==6){ sphl_tv_name.setVisibility(View.GONE); } lv=(ListView) findViewById(R.id.sphl_lv); lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { toWenJuanDetail(position); } }); if(info!=null){ qx_tv.setText(info.getQX()); pid_tv.setText(info.getPID()); number_tv.setText(info.getNO()); name_tv.setText(info.getNAME()); sex_tv.setText(info.getSEX()); sfz_tv.setText(info.getSFZ()); edu_tv.setText(info.getEDU()); jd_tv.setText(info.getJD()); jw_tv.setText(info.getJW()); lxdz_tv.setText(info.getLXDZ()); phone.setText(info.getPHONE()); zt_tv.setText(info.getZT()); dzszqx_tv.setText(info.getQX()); } getFamilyList(); } private void showDialog() { dialog = new ProgressDialog(ShowPersionHistoryList.this); dialog.setCanceledOnTouchOutside(false); dialog.setMessage("数据信息加载中..."); dialog.show(); } private void getFamilyList(){ showDialog(); // http://192.168.11.11:89/Json/Get_Home.aspx?TYPE=1&QA_MASTER=5&SFZ=310108197604155814 OkHttpUtils.post().url(MyOkHttpUtils.BaseUrl+ShowPersionDetailInfo.familyListUrl).addParams("TYPE","1").addParams("SFZ",info.getSFZ()).addParams("QA_MASTER",info.getQA_MASTER()+"").build().execute(new StringCallback() { @Override public void onError(Call call, Exception e) { dialog.dismiss(); Toast.makeText(ShowPersionHistoryList.this,"请连接网络",Toast.LENGTH_SHORT).show(); } @Override public void onResponse(final String infoStr) { if(TextUtils.equals(infoStr,"[]")){ lv_title.setVisibility(View.GONE); lv.setVisibility(View.GONE); dialog.dismiss(); return; }else{ lv_title.setVisibility(View.VISIBLE); lv.setVisibility(View.VISIBLE); } runOnUiThread(new Runnable() { public void run() { Gson gson=new Gson(); Type listType=new TypeToken<LinkedList<FamilyInfo>>(){}.getType(); LinkedList<FamilyInfo> fi=gson.fromJson(infoStr,listType); listInfo.clear(); for (Iterator iterator = fi.iterator(); iterator .hasNext();) { FamilyInfo content = (FamilyInfo) iterator .next(); listInfo.add(content); } if(adapter==null){ adapter=new HistoryListAdapter(listInfo, ShowPersionHistoryList.this); lv.setAdapter(adapter); }else{ adapter.notifyDataSetChanged(); } setListViewHeightBasedOnChildren(lv); dialog.dismiss(); } }); } }); } public void setListViewHeightBasedOnChildren(ListView listView) { // 获取ListView对应的Adapter ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { return; } int totalHeight = 0; for (int i = 0, len = listAdapter.getCount(); i < len; i++) { // listAdapter.getCount()返回数据项的数目 View listItem = listAdapter.getView(i, null, listView); // 计算子项View 的宽高 listItem.measure(0, 0); // 统计所有子项的总高度 totalHeight += listItem.getMeasuredHeight(); } ViewGroup.LayoutParams params = listView.getLayoutParams(); params.height = totalHeight+ (listView.getDividerHeight() * (listAdapter.getCount() - 1)); // listView.getDividerHeight()获取子项间分隔符占用的高度 // params.height最后得到整个ListView完整显示需要的高度 listView.setLayoutParams(params); } private void toWenJuanDetail(final int position){ // http://192.168.11.11:89/Json/Get_Tb_Home_Answer_Info.aspx?HOMEID=241 OkHttpUtils.post().url(MyOkHttpUtils.BaseUrl+ShowPersionDetailInfo.answerUrl).addParams("HOMEID", listInfo.get(position).getID()+"").build().execute(new StringCallback() { @Override public void onResponse(String str) { Intent intent=new Intent(ShowPersionHistoryList.this,WenJuanDetailActivity.class); if(TextUtils.equals(str, "false")){ intent.putExtra("rb", true); Toast.makeText(ShowPersionHistoryList.this,"该人员未答题,请先答题",Toast.LENGTH_SHORT).show(); return; }else{ intent.putExtra("rb", false); } //intent.putExtra("info", info); intent.putExtra("pid", info.getID()); intent.putExtra("NO", info.getNO()); intent.setAction("historyList"); intent.putExtra("sname", listInfo.get(position).getSQR()); intent.putExtra("position", position); intent.putExtra("QUESTIONMASTERID",listInfo.get(position).getQUESTIONMASTERID()); intent.putExtra("myHOMEID", listInfo.get(position).getID()); intent.putExtra("myStatus",getIntent().getBooleanExtra("myStatus",false)); MainTools.map.put("lishiwenjuaninfo", (WenJuanType) ShowWenJuanActivity.lishiJuanTypes.get(listInfo.get(position).getQUESTIONMASTERID()-1)); startActivity(intent); } @Override public void onError(Call arg0, Exception arg1) { Toast.makeText(ShowPersionHistoryList.this,"请连接网络",Toast.LENGTH_SHORT).show(); } }); } }
3ed2e11a8fa5998431e566392f088886897ae91a
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/response/KoubeiServindustryPromoIntelligentguideOrderResponse.java
ac7093d0208d4be1c11928cc519de7744849de4c
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.servindustry.promo.intelligentguide.order response. * * @author auto create * @since 1.0, 2020-03-10 10:35:08 */ public class KoubeiServindustryPromoIntelligentguideOrderResponse extends AlipayResponse { private static final long serialVersionUID = 7311171285998561728L; /** * 是否成功 */ @ApiField("success") private Boolean success; public void setSuccess(Boolean success) { this.success = success; } public Boolean getSuccess( ) { return this.success; } }
623defcafba54db6b9da5b2d188c2f6d641f2897
f2bae3afa17745be9bc3bc98b9540b98f1cfd3c9
/src/com/massivecraft/factions/integration/spigot/EngineSpigot.java
f2ad63a520a4995c6eac4e476d21b66d878b2723
[]
no_license
Hillimy/Factions
7814bcce65ebd6f2ea29544bbf0eda8cd25a9802
399af19ec059126ea8c6563997bbea393834b2b2
refs/heads/master
2021-01-20T15:30:21.591448
2017-02-22T15:17:54
2017-02-22T15:17:54
82,819,037
1
0
null
2017-02-22T15:17:02
2017-02-22T15:17:02
null
UTF-8
Java
false
false
4,549
java
package com.massivecraft.factions.integration.spigot; import java.util.List; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.BlockPistonExtendEvent; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent; import com.massivecraft.factions.engine.EngineMain; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; public class EngineSpigot extends Engine { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // private static EngineSpigot i = new EngineSpigot(); public static EngineSpigot get() { return i; } // -------------------------------------------- // // LISTENER // -------------------------------------------- // // This is a special Spigot event that fires for Minecraft 1.8 armor stands. // It also fires for other entity types but for those the event is buggy. // It seems we can only cancel interaction with armor stands from here. // Thus we only handle armor stands from here and handle everything else in EngineMain. @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent event) { // Ignore Off Hand if (isOffHand(event)) return; // Gather Info final Player player = event.getPlayer(); if (MUtil.isntPlayer(player)) return; final Entity entity = event.getRightClicked(); final boolean verboose = true; // Only care for armor stands. if (entity.getType() != EntityType.ARMOR_STAND) return; // If we can't use ... if (EngineMain.canPlayerUseEntity(player, entity, verboose)) return; // ... block use. event.setCancelled(true); } /* * Note: With 1.8 and the slime blocks, retracting and extending pistons * became more of a problem. Blocks located on the border of a chunk * could have easily been stolen. That is the reason why every block * needs to be checked now, whether he moved into a territory which * he actually may not move into. */ @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockBuild(BlockPistonExtendEvent event) { // Is checking deactivated by MConf? if ( ! MConf.get().handlePistonProtectionThroughDenyBuild) return; Faction pistonFaction = BoardColl.get().getFactionAt(PS.valueOf(event.getBlock())); List<Block> blocks = event.getBlocks(); // Check for all extended blocks for (Block block : blocks) { // Block which is being pushed into Block targetBlock = block.getRelative(event.getDirection()); // Members of a faction might not have build rights in their own territory, but pistons should still work regardless Faction targetFaction = BoardColl.get().getFactionAt(PS.valueOf(targetBlock)); if (targetFaction == pistonFaction) continue; // Perm check if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) continue; event.setCancelled(true); return; } } @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockBuild(BlockPistonRetractEvent event) { // Is checking deactivated by MConf? if ( ! MConf.get().handlePistonProtectionThroughDenyBuild) return; Faction pistonFaction = BoardColl.get().getFactionAt(PS.valueOf(event.getBlock())); List<Block> blocks = event.getBlocks(); // Check for all retracted blocks for (Block block : blocks) { // Is the retracted block air/water/lava? Don't worry about it if (block.isEmpty() || block.isLiquid()) return; // Members of a faction might not have build rights in their own territory, but pistons should still work regardless Faction targetFaction = BoardColl.get().getFactionAt(PS.valueOf(block)); if (targetFaction == pistonFaction) continue; // Perm check if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) continue; event.setCancelled(true); return; } } }
d0389d950e78f79467187da346d74f251c538971
99747123c4a1cdb98cfb6b484c5be7e269ced9f5
/project/bio-nio-aio/c-nio-chat/src/UserInputHandler.java
2e112cf6cfd00312f0393b7c672995278a90d752
[ "Apache-2.0" ]
permissive
CodingSoldier/java-learn
0dea60617be635d6d028cd3c4302bd2975526dbf
114358e63c41a1884ca660b70e13ed25bc12fbc6
refs/heads/master
2023-05-28T14:46:52.437585
2023-05-12T09:07:34
2023-05-12T09:07:34
113,655,752
27
20
Apache-2.0
2023-05-12T09:10:03
2017-12-09T08:51:50
Java
UTF-8
Java
false
false
941
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class UserInputHandler implements Runnable { private ChatClient chatClient; public UserInputHandler(ChatClient chatClient) { this.chatClient = chatClient; } @Override public void run() { BufferedReader reader = null; try { reader = new BufferedReader( new InputStreamReader(System.in) ); while (true){ String msg = reader.readLine(); chatClient.send(msg); if (chatClient.readToQuit(msg)){ break; } } }catch (IOException e){ e.printStackTrace(); }finally { try { reader.close(); } catch (IOException e) { e.printStackTrace(); } } } }
65db5c3e9c126eefeee64dffc7b3223f078efa13
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/lingochamp--FileDownloader/6de097f757832344cc9099127e10b6159e23c696/before/FileDownloadListener.java
a36c9aad8ef43fed349ed51bb65eeec65ee13477
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
8,062
java
/* * Copyright (c) 2015 LingoChamp 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.liulishuo.filedownloader; import com.liulishuo.filedownloader.event.IDownloadEvent; import com.liulishuo.filedownloader.event.IDownloadListener; import com.liulishuo.filedownloader.model.FileDownloadStatus; import com.liulishuo.filedownloader.util.FileDownloadLog; /** * Created by Jacksgong on 9/7/15. * <p/> * normal chain {@link #pending} -> {@link #connected} -> {@link #progress} -> {@link #blockComplete} -> {@link #completed} * may final width {@link #paused}/{@link #completed}/{@link #error}/{@link #warn} * if reuse just {@link #blockComplete} ->{@link #completed} * * @see FileDownloadLargeFileListener */ public abstract class FileDownloadListener extends IDownloadListener { public FileDownloadListener() { } /** * @param priority not handle priority any more * @see #FileDownloadListener() * @deprecated not handle priority any more */ public FileDownloadListener(int priority) { FileDownloadLog.w(this, "not handle priority any more"); } @Override public boolean callback(IDownloadEvent event) { if (!(event instanceof FileDownloadEvent)) { return false; } final FileDownloadEvent downloaderEvent = ((FileDownloadEvent) event); switch (downloaderEvent.getStatus()) { case FileDownloadStatus.pending: pending(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.started: started(downloaderEvent.getDownloader()); break; case FileDownloadStatus.connected: connected(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getEtag(), downloaderEvent.getDownloader().isResuming(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.progress: progress(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.blockComplete: blockComplete(downloaderEvent.getDownloader()); break; case FileDownloadStatus.retry: retry(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getEx(), downloaderEvent.getDownloader().getRetryingTimes(), downloaderEvent.getDownloader().getSmallFileSoFarBytes()); break; case FileDownloadStatus.completed: completed(downloaderEvent.getDownloader()); break; case FileDownloadStatus.error: error(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getEx()); break; case FileDownloadStatus.paused: paused(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.warn: // already same url & path in pending/running list warn(downloaderEvent.getDownloader()); break; } return false; } /** * Enqueue, and pending * * @param task Current task * @param soFarBytes Already downloaded bytes stored in the db * @param totalBytes Total bytes stored in the db * @see IFileDownloadMessage#notifyPending() */ protected abstract void pending(final BaseDownloadTask task, final int soFarBytes, final int totalBytes); /** * Finish pending, and start the download runnable. * * @param task Current task. * @see IFileDownloadMessage#notifyStarted() */ protected void started(final BaseDownloadTask task) { } /** * Connected * * @param task Current task * @param etag ETag * @param isContinue Is resume from breakpoint * @param soFarBytes Number of bytes download so far * @param totalBytes Total size of the download in bytes * @see IFileDownloadMessage#notifyConnected() */ protected void connected(final BaseDownloadTask task, final String etag, final boolean isContinue, final int soFarBytes, final int totalBytes) { } /** * Fetching datum and Writing to local disk. * * @param task Current task * @param soFarBytes Number of bytes download so far * @param totalBytes Total size of the download in bytes * @see IFileDownloadMessage#notifyProgress() */ protected abstract void progress(final BaseDownloadTask task, final int soFarBytes, final int totalBytes); /** * Block completed in new thread * * @param task Current task * @see IFileDownloadMessage#notifyBlockComplete() */ protected abstract void blockComplete(final BaseDownloadTask task); /** * Occur a exception and has chance{@link BaseDownloadTask#setAutoRetryTimes(int)} to retry and * start Retry * * @param task Current task * @param ex why retry * @param retryingTimes How many times will retry * @param soFarBytes Number of bytes download so far * @see IFileDownloadMessage#notifyRetry() */ protected void retry(final BaseDownloadTask task, final Throwable ex, final int retryingTimes, final int soFarBytes) { } // final width below methods /** * Succeed download * * @param task Current task * @see IFileDownloadMessage#notifyCompleted() */ protected abstract void completed(final BaseDownloadTask task); /** * Download paused * * @param task Current task * @param soFarBytes Number of bytes download so far * @param totalBytes Total size of the download in bytes * @see IFileDownloadMessage#notifyPaused() */ protected abstract void paused(final BaseDownloadTask task, final int soFarBytes, final int totalBytes); /** * Download error * * @param task Current task * @param e Any throwable on download pipeline * @see IFileDownloadMessage#notifyError() * @see com.liulishuo.filedownloader.exception.FileDownloadHttpException * @see com.liulishuo.filedownloader.exception.FileDownloadGiveUpRetryException * @see com.liulishuo.filedownloader.exception.FileDownloadOutOfSpaceException */ protected abstract void error(final BaseDownloadTask task, final Throwable e); /** * There is already an identical task being downloaded * * @param task Current task * @see IFileDownloadMessage#notifyWarn() */ protected abstract void warn(final BaseDownloadTask task); }
178c1eeae4edc56cb8a2e67fe7f456fefab31285
a1d00fd7792806a7f75810813e5b0c7f6f0dfda1
/eclipse/src/org/ripple/power/ui/table/AddressTable.java
cff0988a23ea8b387d052e33e0e45a4bd3fc95e7
[ "Apache-2.0" ]
permissive
hjkio19086/RipplePower
0790863058547bbd6227d1bc100e11481f7b4855
af087e473cbacb17f4de11559493afd85ff8d171
refs/heads/master
2021-01-22T21:37:09.136987
2014-11-06T06:06:10
2014-11-06T06:06:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,241
java
package org.ripple.power.ui.table; import java.awt.Color; import java.awt.Component; import javax.swing.JLabel; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.JTableHeader; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; import javax.swing.table.TableModel; public final class AddressTable extends ColorTable { /** * */ private static final long serialVersionUID = 1L; public static final int DATE = 1; public static final int NAME = 2; public static final int TYPE = 3; public static final int AMOUNT = 4; public static final int STATUS = 5; public static final int ADDRESS = 6; public static final int CUR = 7; public AddressTable(TableModel tableModel, int[] columnTypes) { super(tableModel); JTableHeader header = getTableHeader(); header.setBackground(new Color(70, 70, 70)); header.setForeground(Color.WHITE); Component component; TableCellRenderer renderer; TableColumn column; TableColumnModel columnModel = getColumnModel(); TableCellRenderer headRenderer = getTableHeader().getDefaultRenderer(); if (headRenderer instanceof DefaultTableCellRenderer) { DefaultTableCellRenderer defaultRenderer = (DefaultTableCellRenderer) headRenderer; defaultRenderer.setHorizontalAlignment(JLabel.CENTER); } int columnCount = tableModel.getColumnCount(); if (columnCount > columnTypes.length) { throw new IllegalArgumentException( "columnCount > columnTypes.length ! More columns than column types."); } for (int i = 0; i < columnCount; i++) { Object value = null; column = columnModel.getColumn(i); switch (columnTypes[i]) { case DATE: // 日期 column.setCellRenderer(new DateRenderer()); value = "1970-01-01"; break; case NAME: // 别名(max length 20) value = "mmmmmmmmmmmmmmmmmmmm"; break; case TYPE:// 状态(max length 10) column.setCellRenderer(new StringRenderer(JLabel.CENTER)); value = "mmmmmmmmmm"; break; case AMOUNT:// 钱数 column.setCellRenderer(new AmountRenderer()); value = "0.000000"; break; case STATUS: // 状态 column.setCellRenderer(new StringRenderer(JLabel.CENTER)); value = "none"; break; case ADDRESS: // 地址长度(max length 34) value = "0123456789AbCdEfGhIjKlMnOpQrStUvWx"; break; case CUR: // 地址长度(max length 34) column.setCellRenderer(new StringRenderer(JLabel.CENTER)); value = "XRP"; break; default: throw new IllegalArgumentException("Unsupported column type " + columnTypes[i]); } component = headRenderer.getTableCellRendererComponent(this, tableModel.getColumnName(i), false, false, 0, i); int headWidth = component.getPreferredSize().width; renderer = column.getCellRenderer(); if (renderer == null) { renderer = getDefaultRenderer(tableModel.getColumnClass(i)); } component = renderer.getTableCellRendererComponent(this, value, false, false, 0, i); int cellWidth = component.getPreferredSize().width; column.setPreferredWidth(Math.max(headWidth + 5, cellWidth + 5)); } setAutoResizeMode(AUTO_RESIZE_ALL_COLUMNS); } }
1b0081a9bfc21f71ef1fbb8c5a960b81ad3a2a18
e60685847d77895a4019426b9c291b986855d9ec
/archunit/src/main/java/com/tngtech/archunit/library/dependencies/Slice.java
2dfad29f2508f42d29f1197807dbedc14cb57202
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
kosani/ArchUnit
ba818058b4f9d2262b0e1c54780ee7b9a4898c84
fefe1d372200781ada710db8ba88e4fed5fb2f2b
refs/heads/master
2020-04-16T13:58:14.245764
2019-01-13T21:33:44
2019-01-13T21:33:44
165,649,629
5
0
null
null
null
null
UTF-8
Java
false
false
5,075
java
/* * Copyright 2019 TNG Technology Consulting GmbH * * 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.tngtech.archunit.library.dependencies; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import com.google.common.base.Joiner; import com.google.common.collect.ForwardingSet; import com.google.common.collect.ImmutableSet; import com.tngtech.archunit.PublicAPI; import com.tngtech.archunit.base.HasDescription; import com.tngtech.archunit.core.domain.Dependency; import com.tngtech.archunit.core.domain.JavaClass; import com.tngtech.archunit.core.domain.properties.CanOverrideDescription; import static com.google.common.base.Preconditions.checkArgument; import static com.tngtech.archunit.PublicAPI.Usage.ACCESS; public final class Slice extends ForwardingSet<JavaClass> implements HasDescription, CanOverrideDescription<Slice> { private final List<String> matchingGroups; private Description description; private final Set<JavaClass> classes; private Slice(List<String> matchingGroups, Set<JavaClass> classes) { this.matchingGroups = matchingGroups; this.description = new Description("Slice " + Joiner.on(" - ").join(ascendingCaptures(matchingGroups))); this.classes = ImmutableSet.copyOf(classes); } private List<String> ascendingCaptures(List<String> matchingGroups) { List<String> result = new ArrayList<>(); for (int i = 1; i <= matchingGroups.size(); i++) { result.add("$" + i); } return result; } @Override protected Set<JavaClass> delegate() { return classes; } @Override public String getDescription() { return description.format(matchingGroups); } /** * The pattern can be a description with references to the matching groups by '$' and position. * E.g. slices are created by 'some.svc.(*).sub.(*)', and the pattern is "the module $2 of service $1", * and we match 'some.svc.foo.module.bar', then the resulting description will be * "the module bar of service foo". * * @param pattern The description pattern with numbered references of the form $i * @return Same slice with different description */ @Override public Slice as(String pattern) { description = new Description(pattern); return this; } @PublicAPI(usage = ACCESS) public Set<Dependency> getDependencies() { Set<Dependency> result = new HashSet<>(); for (JavaClass javaClass : this) { for (Dependency dependency : javaClass.getDirectDependenciesFromSelf()) { if (!contains(dependency.getTargetClass())) { result.add(dependency); } } } return result; } @Override public String toString() { return getDescription(); } /** * Returns a matching part of this slice. E.g. if the slice was created by matching '..(*).controller.(*)..', * against 'some.other.controller.here.more', then name part '1' would be 'other' and name part '2' would * be 'here'. * * @param index The index of the matched group * @return The part of the matched package name. */ @PublicAPI(usage = ACCESS) public String getNamePart(int index) { checkArgument(index > 0 && index <= matchingGroups.size(), "Found no name part with index %d", index); return matchingGroups.get(index - 1); } private static class Description { private final String pattern; private Description(String pattern) { this.pattern = pattern; } String format(List<String> matchingGroups) { String result = pattern; for (int i = 1; i <= matchingGroups.size(); i++) { result = result.replace("$" + i, matchingGroups.get(i - 1)); } return result; } } static class Builder { private final List<String> matchingGroups; private final Set<JavaClass> classes = new HashSet<>(); private Builder(List<String> matchingGroups) { this.matchingGroups = matchingGroups; } static Builder from(List<String> matchingGroups) { return new Builder(matchingGroups); } Builder addClass(JavaClass clazz) { classes.add(clazz); return this; } Slice build() { return new Slice(matchingGroups, classes); } } }
a6770e8292756574e7de283dd3a152885c3684b1
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/testing/56/App.java
54bf10e5c04c670c1742ab133d960143f40d80c3
[]
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,031
java
/** * The MIT License * Copyright (c) 2014-2016 Ilkka Seppälä * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.iluwatar.pageobject ; import java.awt.Desktop; import java.io.File; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Page Object pattern wraps an UI component with an application specific API allowing you to * manipulate the UI elements without having to dig around with the underlying UI technology used. This is * especially useful for testing as it means your tests will be less brittle. Your tests can concentrate on * the actual test cases where as the manipulation of the UI can be left to the internals of the page object * itself. * * <p> * Due to this reason, it has become very popular within the test automation community. * In particular, it is very common in that the page object is used to represent the html pages of a * web application that is under test. This web application is referred to as AUT (Application Under Test). * A web browser automation tool/framework like Selenium for instance, is then used to drive the automating * of the browser navigation and user actions journeys through this web application. Your test class would * therefore only be responsible for particular test cases and page object would be used by the test class * for UI manipulation required for the tests. * * <p> * In this implementation rather than using Selenium, the HtmlUnit library is used as a replacement to * represent the specific html elements and to drive the browser. The purpose of this example is just to * provide a simple version that showcase the intentions of this pattern and how this pattern is used * in order to understand it. */ public final class App { private static final Logger LOGGER = LoggerFactory.getLogger(App.class); private App() { } /** * Application entry point * * <p> * The application under development is a web application. Normally you would probably have a * backend that is probably implemented in an object-oriented language (e.g. Java) that serves * the frontend which comprises of a series of HTML, CSS, JS etc... * * <p> * For illustrations purposes only, a very simple static html app is used here. This main method * just fires up this simple web app in a default browser. * * @param args arguments */ public static void main(String[] args) { try { File applicationFile = new File(App.class.getClassLoader().getResource("sample-ui/login.html").getPath()); // should work for unix like OS (mac, unix etc...) if (Desktop.isDesktopSupported()) { Desktop.getDesktop().open(applicationFile); } else { // java Desktop not supported - above unlikely to work for Windows so try following instead... Runtime.getRuntime().exec("cmd.exe start " + applicationFile); } } catch (IOException ex) { LOGGER.error("An error occured.", ex); } } }
915bbc4c6a8aeaebccf1caa066815e9c285ae4b4
31ffb347d971038f19cc4de6f9023b9f9d997cf6
/lightframework.data/src/main/java/lightframework/data/biz/AbstractBaseBiz.java
bfd692908363a0eb660b1352a8c74d7d29829174
[]
no_license
shaxianwei/LightFramework
1e3db400e2f879d3cc31fe8cc94ceeafbca78778
be66ecb87d34a4b3f79f5bd67663a5c72ee6aac7
refs/heads/master
2021-01-16T21:50:55.505038
2013-07-26T10:18:03
2013-07-26T10:18:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
509
java
package lightframework.data.biz; import java.util.List; import lightframework.data.Select; /** * * @param <TDAO> * @param <TEntity> * @author Tom Deng */ public abstract class AbstractBaseBiz<TDAO extends Select<TEntity>, TEntity> { private TDAO dao; protected AbstractBaseBiz(TDAO dao) { this.dao = dao; } public TDAO getDAO() { return this.dao; } public List<TEntity> getAll(String... columnNames) { return this.dao.select(columnNames); } }
e937fd461dd888930084b825b3a00db6570ed0cf
2c47066781f0398cfc78c247b3817ef7385a78fa
/compiler/frontend/src/org/jetbrains/jet/config/CompilerConfiguration.java
339eb8e1864b45e580827a97c541612697d06988
[]
no_license
hhariri/kotlin
9e60383961d5ba9e6216b8344f3fb54165262e49
d150bfbce0e2e47d687f39e2fd233ea55b2ccd26
refs/heads/master
2021-01-21T02:11:33.068540
2014-06-20T14:52:30
2014-06-21T08:26:34
21,116,939
1
0
null
null
null
null
UTF-8
Java
false
false
3,996
java
/* * Copyright 2010-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jetbrains.jet.config; import com.intellij.openapi.util.Key; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; @SuppressWarnings("unchecked") public class CompilerConfiguration { private final Map<Key, Object> map = new HashMap<Key, Object>(); private boolean readOnly = false; @Nullable public <T> T get(@NotNull CompilerConfigurationKey<T> key) { T data = (T) map.get(key.ideaKey); return data == null ? null : unmodifiable(data); } @NotNull public <T> T get(@NotNull CompilerConfigurationKey<T> key, @NotNull T defaultValue) { T data = (T) map.get(key.ideaKey); return data == null ? defaultValue : unmodifiable(data); } @NotNull public <T> List<T> getList(@NotNull CompilerConfigurationKey<List<T>> key) { List<T> data = (List<T>) map.get(key.ideaKey); if (data == null) { return Collections.emptyList(); } else { return Collections.unmodifiableList(data); } } public <T> void put(@NotNull CompilerConfigurationKey<T> key, @Nullable T value) { checkReadOnly(); map.put(key.ideaKey, value); } public <T> void add(@NotNull CompilerConfigurationKey<List<T>> key, @NotNull T value) { checkReadOnly(); Key<List<T>> ideaKey = key.ideaKey; if (map.get(ideaKey) == null) { map.put(ideaKey, new ArrayList<T>()); } List<T> list = (List<T>) map.get(ideaKey); list.add(value); } public <T> void addAll(@NotNull CompilerConfigurationKey<List<T>> key, @NotNull Collection<T> values) { checkReadOnly(); checkForNullElements(values); Key<List<T>> ideaKey = key.ideaKey; if (map.get(ideaKey) == null) { map.put(ideaKey, new ArrayList<T>()); } List<T> list = (List<T>) map.get(ideaKey); list.addAll(values); } public CompilerConfiguration copy() { CompilerConfiguration copy = new CompilerConfiguration(); copy.map.putAll(map); return copy; } private void checkReadOnly() { if (readOnly) { throw new IllegalStateException("CompilerConfiguration is read-only"); } } public void setReadOnly(boolean readOnly) { if (readOnly != this.readOnly) { checkReadOnly(); this.readOnly = readOnly; } } @NotNull private static <T> T unmodifiable(@NotNull T object) { if (object instanceof List) { return (T) Collections.unmodifiableList((List) object); } else if (object instanceof Map) { return (T) Collections.unmodifiableMap((Map) object); } else if (object instanceof Collection) { return (T) Collections.unmodifiableCollection((Collection) object); } else { return object; } } private static <T> void checkForNullElements(Collection<T> values) { int index = 0; for (T value : values) { if (value == null) { throw new IllegalArgumentException("Element " + index + " is null, while null values in compiler configuration are not allowed"); } index++; } } }
6c0b192f794a1c89e92891a9e38e3d3555840109
05402fc0ffd11a84bb9619152d2a28f1b2e10047
/fase3/ine5409/programasEmJava/metodosDeQuebra/modelo/MetodoDaFalsaPosicao.java
0ce4dfaaa12f5e2c2e8ceae539331ca239285879
[]
no_license
grazipauluka/cienciasDaComputacaoUfsc
61c14d724e6852529e5d8b0a576be819a1a1547d
13357b174f9d520874514194efd446747e11be5b
refs/heads/master
2023-07-24T12:45:42.635201
2015-12-09T20:42:27
2015-12-09T20:42:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,023
java
package modelo; public class MetodoDaFalsaPosicao { private static final double ZERO = 0.0; public static double calcular(double a, double b, double e) { double fa = f(a); double fb = f(b); double xx = (a-fa*(b-a)/(fb-fa))*10; if (verificarSeTemMesmoSinal(fa, fb)) { return Double.NaN; } double erro = Math.abs(a-b); while (erro >= e) { double xx0 = xx; xx = a-fa*(b-a)/(fb-fa); double fxx = f(xx); if (fxx == ZERO) { return xx; } System.out.printf("%.10f %.10f %.10f %.10f %.10f %.10f %.11f\n", a, xx, b, fa, fxx, fb, erro); if (verificarSeTemMesmoSinal(fa, fxx)) { a = xx; fa = fxx; } else { b = xx; fb = fxx; } erro = Math.abs(xx-xx0); } return xx; } private static double f(double x) { double ln = Math.log(x); double elevadoLn = Math.pow(ln, x); return x-elevadoLn; } private static boolean verificarSeTemMesmoSinal(double a, double b) { return (a > ZERO && b > ZERO) || (a < ZERO && b < ZERO); } }
95fec5e43e11dababdfee1191a9593fe039a4d19
9b01ffa3db998c4bca312fd28aa977f370c212e4
/app/src/streamD/java/com/loki/singlemoduleapp/stub/SampleClass6863.java
91e449b94badeeec0d19fed28e6422d49c3a368f
[]
no_license
SergiiGrechukha/SingleModuleApp
932488a197cb0936785caf0e73f592ceaa842f46
b7fefea9f83fd55dbbb96b506c931cc530a4818a
refs/heads/master
2022-05-13T17:15:21.445747
2017-07-30T09:55:36
2017-07-30T09:56:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package com.loki.singlemoduleapp.stub; public class SampleClass6863 { private SampleClass6864 sampleClass; public SampleClass6863(){ sampleClass = new SampleClass6864(); } public String getClassName() { return sampleClass.getClassName(); } }
23f20ba249e1db7fbcffce512004b4eef60e261d
d93ce3950a3c805cd2a5b32e09ed8341a0ff9bbd
/md-sal/model/model-flow-base/src/main/yang-gen-sal/org/opendaylight/yang/gen/v1/urn/opendaylight/model/match/types/rev131026/match/layer/_3/match/TunnelIpv4Match.java
661a69bf6e0c79b14804aa897decda4f2ef68326
[]
no_license
ycymio/opendaylight-adsal-controller
6247d6d4b2a11718932528f4873dc90844f6145d
c3d5164e990e5f95faf02594646c164c66759a23
refs/heads/master
2021-01-11T09:05:36.364505
2016-12-26T02:40:46
2016-12-26T02:40:46
77,222,077
0
0
null
null
null
null
UTF-8
Java
false
false
1,403
java
package org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match; import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Layer3Match; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.TunnelIpv4MatchFields; import org.opendaylight.yangtools.yang.binding.Augmentable; /** * <p>This class represents the following YANG schema fragment defined in module <b>opendaylight-match-types</b> * <br />(Source path: <i>META-INF\yang\opendaylight-match-types.yang</i>): * <pre> * case tunnel-ipv4-match { * leaf tunnel-ipv4-source { * type ipv4-prefix; * } * leaf tunnel-ipv4-destination { * type ipv4-prefix; * } * } * </pre> * The schema path to identify an instance is * <i>opendaylight-match-types/match/layer-3-match/tunnel-ipv4-match</i> */ public interface TunnelIpv4Match extends DataObject, Augmentable<org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4Match>, TunnelIpv4MatchFields, Layer3Match { public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:model:match:types","2013-10-26","tunnel-ipv4-match");; }
c3b45a9f30f8e1a9865008d50732455e63de69ad
d93ce3950a3c805cd2a5b32e09ed8341a0ff9bbd
/md-sal/model/model-flow-base/src/main/yang-gen-sal/org/opendaylight/yang/gen/v1/urn/opendaylight/action/types/rev131112/action/action/flood/action/_case/FloodActionBuilder.java
985afa63a9c56c9962fb2a2181cf0139fef6fce2
[]
no_license
ycymio/opendaylight-adsal-controller
6247d6d4b2a11718932528f4873dc90844f6145d
c3d5164e990e5f95faf02594646c164c66759a23
refs/heads/master
2021-01-11T09:05:36.364505
2016-12-26T02:40:46
2016-12-26T02:40:46
77,222,077
0
0
null
null
null
null
UTF-8
Java
false
false
7,414
java
package org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case; import java.util.Collections; import java.util.Map; import org.opendaylight.yangtools.yang.binding.DataObject; import java.util.HashMap; import org.opendaylight.yangtools.yang.binding.Augmentation; /** * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction} instances. * * @see org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction */ public class FloodActionBuilder { Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>> augmentation = new HashMap<>(); public FloodActionBuilder() { } public FloodActionBuilder(FloodAction base) { if (base instanceof FloodActionImpl) { FloodActionImpl _impl = (FloodActionImpl) base; this.augmentation = new HashMap<>(_impl.augmentation); } } @SuppressWarnings("unchecked") public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>> E getAugmentation(java.lang.Class<E> augmentationType) { if (augmentationType == null) { throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!"); } return (E) augmentation.get(augmentationType); } public FloodActionBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction> augmentation) { this.augmentation.put(augmentationType, augmentation); return this; } public FloodAction build() { return new FloodActionImpl(this); } private static final class FloodActionImpl implements FloodAction { public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction> getImplementedInterface() { return org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction.class; } private Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>> augmentation = new HashMap<>(); private FloodActionImpl(FloodActionBuilder base) { switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } } @SuppressWarnings("unchecked") @Override public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>> E getAugmentation(java.lang.Class<E> augmentationType) { if (augmentationType == null) { throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!"); } return (E) augmentation.get(augmentationType); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); return result; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (!(obj instanceof DataObject)) { return false; } if (!org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction.class.equals(((DataObject)obj).getImplementedInterface())) { return false; } org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction other = (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction)obj; if (getClass() == obj.getClass()) { // Simple case: we are comparing against self FloodActionImpl otherImpl = (FloodActionImpl) obj; if (augmentation == null) { if (otherImpl.augmentation != null) { return false; } } else if(!augmentation.equals(otherImpl.augmentation)) { return false; } } else { // Hard case: compare our augments with presence there... for (Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodAction>> e : augmentation.entrySet()) { if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false; } } // .. and give the other one the chance to do the same if (!obj.equals(this)) { return false; } } return true; } @Override public java.lang.String toString() { java.lang.StringBuilder builder = new java.lang.StringBuilder ("FloodAction ["); boolean first = true; if (first) { first = false; } else { builder.append(", "); } builder.append("augmentation="); builder.append(augmentation.values()); return builder.append(']').toString(); } } }
c8e2c0ba53272eef28d4a2cc567e459a9a4d025b
cf0b2e2fcd3838e470cb4c205dda8cc05ac11628
/hotils-core/src/main/java/org/hotilsframework/lang/FatalInstanceException.java
292532cba00a14c9c72af39cf11695330ae246c9
[]
no_license
hireny/hotils
b216b2991c7f3ad6447dbcc8433a9a771e8be1e3
0b59a3853d5e636a4a499cca8e7799d540ece62b
refs/heads/master
2021-09-10T02:05:54.275527
2021-08-26T14:44:08
2021-08-26T14:44:08
225,169,822
0
0
null
2020-10-13T20:59:23
2019-12-01T13:54:30
Java
UTF-8
Java
false
false
868
java
package org.hotilsframework.lang; /** * 这个异常主要针对:对类进行实例化失败。 * @author hireny * @className CannotInstanceException * @create 2020-02-21 21:25 */ public class FatalInstanceException extends NestedRuntimeException { private static final long serialVersionUID = 4251359161254269742L; public FatalInstanceException() { super(); } public FatalInstanceException(String message) { super(message); } public FatalInstanceException(String message, Throwable cause) { super(message, cause); } public FatalInstanceException(Throwable cause) { super(cause); } protected FatalInstanceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } }
7a71d5222e13d5460865469189fc43ce9beab93f
ea48509d44177fa42f7b172a335d0bea0b454c96
/gradletrans/gson/trans/gson/src/test/java/com/google/gson/functional/ThrowableFunctionalTest.java
6c7bf88219fc81ed657f17c414167eb0888aac0d
[ "Apache-2.0" ]
permissive
touchlab-lab/DoppelPoc
b2850a7a057b0f2e5955303badf92dcaf4d671ba
0d13d71a20b64c6c371c1bf6fc43bd6a69e9ea53
refs/heads/master
2021-06-09T14:57:56.642071
2016-11-30T15:50:36
2016-11-30T15:50:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,497
java
// Copyright (C) 2014 Trymph Inc. package com.google.gson.functional; import java.io.IOException; import junit.framework.TestCase; import com.google.gson.Gson; import com.google.gson.annotations.SerializedName; import co.touchlab.doppel.testing.DoppelTest; @SuppressWarnings("serial") @DoppelTest public final class ThrowableFunctionalTest extends TestCase { private final Gson gson = new Gson(); public void testExceptionWithoutCause() { RuntimeException e = new RuntimeException("hello"); String json = gson.toJson(e); assertTrue(json.contains("hello")); e = gson.fromJson("{'detailMessage':'hello'}", RuntimeException.class); assertEquals("hello", e.getMessage()); } /*public void testExceptionWithCause() { Exception e = new Exception("top level", new IOException("io error")); String json = gson.toJson(e); assertTrue(json.contains("{\"detailMessage\":\"top level\",\"cause\":{\"detailMessage\":\"io error\"")); e = gson.fromJson("{'detailMessage':'top level','cause':{'detailMessage':'io error'}}", Exception.class); assertEquals("top level", e.getMessage()); assertTrue(e.getCause() instanceof Throwable); // cause is not parameterized so type info is lost assertEquals("io error", e.getCause().getMessage()); }*/ public void testSerializedNameOnExceptionFields() { MyException e = new MyException(); String json = gson.toJson(e); assertTrue(json.contains("{\"my_custom_name\":\"myCustomMessageValue\"")); } public void testErrorWithoutCause() { OutOfMemoryError e = new OutOfMemoryError("hello"); String json = gson.toJson(e); assertTrue(json.contains("hello")); e = gson.fromJson("{'detailMessage':'hello'}", OutOfMemoryError.class); assertEquals("hello", e.getMessage()); } /*public void testErrornWithCause() { Error e = new Error("top level", new IOException("io error")); String json = gson.toJson(e); assertTrue(json.contains("top level")); assertTrue(json.contains("io error")); e = gson.fromJson("{'detailMessage':'top level','cause':{'detailMessage':'io error'}}", Error.class); assertEquals("top level", e.getMessage()); assertTrue(e.getCause() instanceof Throwable); // cause is not parameterized so type info is lost assertEquals("io error", e.getCause().getMessage()); }*/ private static final class MyException extends Throwable { @SerializedName("my_custom_name") String myCustomMessage = "myCustomMessageValue"; } }
2e78b8edd2e7f1a9260b898d518338c47f2d4b22
684e018ce44456ad860b9bbd01ca0fcf40be296d
/src/main/java/com/leetcode/algorithm/No23/Solution.java
412cf56bf3758148cf1dfb80fa644f1f29a9b6f2
[]
no_license
Nagisa12321/LeetCode
ebcfc5d9508e9e5feb1a9d44932f28f19d1ac3e2
14d0bd9e95fe1eef57678e3dbf3fb6751ee196d1
refs/heads/master
2023-07-15T21:32:51.265786
2021-08-29T03:37:14
2021-08-29T03:37:14
316,138,604
1
0
null
null
null
null
UTF-8
Java
false
false
771
java
package com.leetcode.algorithm.No23; import com.leetcode.struct.ListNode; import java.util.Comparator; import java.util.PriorityQueue; /** * @author jtchen * @version 1.0 * @date 2021/7/30 9:54 */ public class Solution { public ListNode mergeKLists(ListNode[] lists) { PriorityQueue<ListNode> queue = new PriorityQueue<>(Comparator.comparingInt(node -> node.val)); for (ListNode list : lists) { ListNode cur = list; while (cur != null) { queue.offer(cur); cur = cur.next; } } if (queue.isEmpty()) return null; ListNode head = new ListNode(queue.poll().val); ListNode cur = head; while (!queue.isEmpty()) { cur.next = new ListNode(queue.poll().val); cur = cur.next; } return head; } }
d5fd14ea8210389ea0812bca8a59f455c29b3bf2
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2019/8/AdversarialFileChannel.java
a51a51945b5606c1a3f411cf9d497afd127e92ef
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
6,720
java
/* * Copyright (c) 2002-2019 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.adversaries.fs; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileLock; import org.neo4j.adversaries.Adversary; import org.neo4j.io.fs.StoreChannel; import org.neo4j.io.fs.StoreFileChannel; @SuppressWarnings( "unchecked" ) public class AdversarialFileChannel extends StoreFileChannel { private final StoreChannel delegate; private final Adversary adversary; public static StoreFileChannel wrap( StoreFileChannel channel, Adversary adversary ) { return new AdversarialFileChannel( channel, adversary ); } private AdversarialFileChannel( StoreFileChannel channel, Adversary adversary ) { super( channel ); this.delegate = channel; this.adversary = adversary; } @Override public long write( ByteBuffer[] srcs ) throws IOException { if ( adversary.injectFailureOrMischief( IOException.class ) ) { ByteBuffer mischievousBuffer = srcs[srcs.length - 1]; int oldLimit = mischiefLimit( mischievousBuffer ); long written = delegate.write( srcs ); mischievousBuffer.limit( oldLimit ); return written; } return delegate.write( srcs ); } @Override public void writeAll( ByteBuffer src, long position ) throws IOException { adversary.injectFailure( IOException.class ); delegate.writeAll( src, position ); } @Override public void writeAll( ByteBuffer src ) throws IOException { adversary.injectFailure( IOException.class ); delegate.writeAll( src ); } @Override public long write( ByteBuffer[] srcs, int offset, int length ) throws IOException { if ( adversary.injectFailureOrMischief( IOException.class ) ) { length = length == 1 ? 1 : length / 2; ByteBuffer mischievousBuffer = srcs[offset + length - 1]; int oldLimit = mischiefLimit( mischievousBuffer ); long written = delegate.write( srcs, offset, length ); mischievousBuffer.limit( oldLimit ); return written; } return delegate.write( srcs, offset, length ); } @Override public StoreFileChannel truncate( long size ) throws IOException { adversary.injectFailure( IOException.class ); return (StoreFileChannel) delegate.truncate( size ); } @Override public StoreFileChannel position( long newPosition ) throws IOException { adversary.injectFailure( IOException.class ); return (StoreFileChannel) delegate.position( newPosition ); } @Override public int read( ByteBuffer dst, long position ) throws IOException { if ( adversary.injectFailureOrMischief( IOException.class ) ) { int oldLimit = mischiefLimit( dst ); int read = delegate.read( dst, position ); dst.limit( oldLimit ); return read; } return delegate.read( dst, position ); } private int mischiefLimit( ByteBuffer buf ) { int oldLimit = buf.limit(); int newLimit = oldLimit - buf.remaining() / 2; buf.limit( newLimit ); return oldLimit; } @Override public void force( boolean metaData ) throws IOException { adversary.injectFailure( IOException.class ); delegate.force( metaData ); } @Override public int read( ByteBuffer dst ) throws IOException { if ( adversary.injectFailureOrMischief( IOException.class ) ) { int oldLimit = mischiefLimit( dst ); int read = delegate.read( dst ); dst.limit( oldLimit ); return read; } return delegate.read( dst ); } @Override public long read( ByteBuffer[] dsts, int offset, int length ) throws IOException { if ( adversary.injectFailureOrMischief( IOException.class ) ) { ByteBuffer lastBuf = dsts[dsts.length - 1]; int oldLimit = mischiefLimit( lastBuf ); long read = delegate.read( dsts, offset, length ); lastBuf.limit( oldLimit ); return read; } return delegate.read( dsts, offset, length ); } @Override public long position() throws IOException { adversary.injectFailure( IOException.class ); return delegate.position(); } @Override public FileLock tryLock() throws IOException { adversary.injectFailure( IOException.class ); return delegate.tryLock(); } @Override public boolean isOpen() { adversary.injectFailure(); return delegate.isOpen(); } @Override public long read( ByteBuffer[] dsts ) throws IOException { if ( adversary.injectFailureOrMischief( IOException.class ) ) { ByteBuffer lastBuf = dsts[dsts.length - 1]; int oldLimit = mischiefLimit( lastBuf ); long read = delegate.read( dsts ); lastBuf.limit( oldLimit ); return read; } return delegate.read( dsts ); } @Override public int write( ByteBuffer src ) throws IOException { if ( adversary.injectFailureOrMischief( IOException.class ) ) { int oldLimit = mischiefLimit( src ); int written = delegate.write( src ); src.limit( oldLimit ); return written; } return delegate.write( src ); } @Override public void close() throws IOException { adversary.injectFailure( IOException.class ); delegate.close(); } @Override public long size() throws IOException { adversary.injectFailure( IOException.class ); return delegate.size(); } @Override public void flush() throws IOException { force( false ); } }
4092154dcca15aef79fcba7d010709a2c4a60eb1
c7ff844a2ac95501e38a65d2a5b1c674d20f650c
/ashigel-compiler/src/main/java/com/asakusafw/compiler/flow/epilogue/parallel/ResolvedSlot.java
45315848781e204e8b954c22a36d3c4a907e5412
[ "Apache-2.0" ]
permissive
tottokomakotaro/asakusafw
3a16cf125302169fecb9aec5df2c8a387663415c
fd237fc270165eeda831d33f984451b684d5356f
refs/heads/master
2021-01-18T05:34:48.764909
2011-07-28T05:48:55
2011-07-28T05:49:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,848
java
/** * Copyright 2011 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.asakusafw.compiler.flow.epilogue.parallel; import java.util.List; import com.asakusafw.compiler.common.Precondition; import com.asakusafw.compiler.flow.DataClass; import com.asakusafw.compiler.flow.DataClass.Property; /** * 型に関連する情報を解決したスロット。 */ public class ResolvedSlot { private Slot source; private int slotNumber; private DataClass valueClass; private List<Property> sortProperties; /** * インスタンスを生成する。 * @param source コンパイルしたソース * @param slotNumber このスロットのスロット番号 * @param valueClass スロットの値を表すクラス * @param sortProperties スロットのソート順序に関連するプロパティ一覧 * @throws IllegalArgumentException 引数に{@code null}が指定された場合 */ public ResolvedSlot(Slot source, int slotNumber, DataClass valueClass, List<Property> sortProperties) { Precondition.checkMustNotBeNull(source, "source"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(valueClass, "valueClass"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(sortProperties, "sortProperties"); //$NON-NLS-1$ this.source = source; this.slotNumber = slotNumber; this.valueClass = valueClass; this.sortProperties = sortProperties; } /** * コンパイルしたソースを返す。 * @return コンパイルしたソース */ public Slot getSource() { return source; } /** * このスロットのスロット番号を返す。 * @return このスロットのスロット番号 */ public int getSlotNumber() { return slotNumber; } /** * スロットの値を表すクラスを返す。 * @return スロットの値を表すクラス */ public DataClass getValueClass() { return valueClass; } /** * スロットのソート順序に関連するプロパティ一覧を返す。 * @return スロットのソート順序に関連するプロパティ一覧 */ public List<DataClass.Property> getSortProperties() { return sortProperties; } }
10316d19255f45cd8d17cba3a7c7d576e52988a8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_5ac5447456035bc650951f760cc95684076fbbd7/ClaferOptimizer/15_5ac5447456035bc650951f760cc95684076fbbd7_ClaferOptimizer_t.java
cfab5cb95cb0d8e92ed3398b9d1d7b80868aed90
[]
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,614
java
package org.clafer.compiler; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.clafer.collection.Either; import org.clafer.collection.Pair; import org.clafer.common.Check; import org.clafer.instance.InstanceModel; import solver.ResolutionPolicy; import solver.Solver; import solver.constraints.ICF; import solver.exception.ContradictionException; import solver.objective.IntObjectiveManager; import solver.propagation.NoPropagationEngine; import solver.propagation.hardcoded.SevenQueuesPropagatorEngine; import solver.search.loop.monitors.IMonitorSolution; import solver.search.solution.Solution; import solver.variables.IntVar; import solver.variables.SetVar; import solver.variables.Variable; /** * * @author jimmy */ public class ClaferOptimizer implements ClaferSearch<Pair<Integer, InstanceModel>> { public final Solver solver; private final ClaferSolutionMap solutionMap; private final boolean maximize; private final Either<Integer, IntVar> score; private boolean first = true; private boolean more = true; private boolean second = true; private final Solution firstSolution = new Solution(); ClaferOptimizer(Solver solver, ClaferSolutionMap solutionMap, boolean maximize, Either<Integer, IntVar> score) { this.solver = Check.notNull(solver); this.solutionMap = Check.notNull(solutionMap); this.maximize = maximize; this.score = Check.notNull(score); } public ClaferSolutionMap getSolutionMap() { return solutionMap; } public boolean isMaximize() { return maximize; } public boolean isMinimize() { return !maximize; } @Override public boolean find() { if (!more) { return false; } if (first) { more &= solveFirst(); first = false; return more; } more &= solveNext(); return more; } /* * Implementation of multiple optimal search based on discussion here: * https://github.com/chocoteam/choco3/issues/121. */ private boolean solveFirst() { if (score.isLeft()) { return solver.findSolution(); } IntVar scoreVar = score.getRight(); solver.getSearchLoop().setObjectivemanager(new IntObjectiveManager( scoreVar, maximize ? ResolutionPolicy.MAXIMIZE : ResolutionPolicy.MINIMIZE, solver)); solver.getSearchLoop().plugSearchMonitor(new IMonitorSolution() { private static final long serialVersionUID = 1L; @Override public void onSolution() { if (first) { firstSolution.record(solver); } } }); if (solver.getEngine() == NoPropagationEngine.SINGLETON) { solver.set(new SevenQueuesPropagatorEngine(solver)); } solver.getSearchLoop().getMeasures().setReadingTimeCount(System.nanoTime()); solver.getSearchLoop().launch(false); if (!firstSolution.hasBeenFound()) { return false; } try { firstSolution.restore(); } catch (ContradictionException e) { // Should never happen because the solution should not be contradictory. throw new IllegalStateException(e); } return true; } private boolean solveNext() { if (score.isLeft() || !second) { return solver.nextSolution(); } second = false; IntVar scoreVar = score.getRight(); int best = scoreVar.getValue(); // TODO: forbid the current solution from happening again. solver.getEngine().flush(); solver.getSearchLoop().reset(); solver.post(ICF.arithm(scoreVar, "=", best)); boolean next = solver.findSolution(); return next && duplicateSolution() ? solver.nextSolution() : next; } private boolean duplicateSolution() { for (IntVar var : solutionMap.getIrSolution().getIntVars()) { if ((var.getTypeAndKind() & Variable.CSTE) == 0) { if (var.getValue() != firstSolution.getIntVal(var)) { return false; } } } for (SetVar var : solutionMap.getIrSolution().getSetVars()) { if ((var.getTypeAndKind() & Variable.CSTE) == 0) { if (!Arrays.equals(var.getValue(), firstSolution.getSetVal(var))) { return false; } } } return true; } /** * @return the optimal value and the optimal instance */ @Override public Pair<Integer, InstanceModel> instance() { return new Pair<>( score.isLeft() ? score.getLeft() : score.getRight().getValue(), solutionMap.getInstance()); } @Override public Pair<Integer, InstanceModel>[] allInstances() { List<Pair<Integer, InstanceModel>> instances = new ArrayList<>(); while (find()) { instances.add(instance()); } @SuppressWarnings("unchecked") Pair<Integer, InstanceModel>[] pairs = new Pair[instances.size()]; return instances.toArray(pairs); } @Override public Solver getInternalSolver() { return solver; } }
a23b1f2799c4bf4cc9da80f5a93035f6cd87fa41
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/appbrand/page/at.java
0cebb7ba7bbb69cc86527a1375b2d270e85505fb
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,935
java
package com.tencent.mm.plugin.appbrand.page; import a.f.b.j; import a.l; import android.content.res.Resources; import android.view.View; import com.tencent.matrix.trace.core.AppMethodBeat; import me.imid.swipebacklayout.lib.SwipeBackLayout; @l(dWo = {1, 1, 13}, dWp = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0007¨\u0006\u0007"}, dWq = {"Lcom/tencent/mm/plugin/appbrand/page/SwipeBackLayoutSettingsAlignmentWC;", "", "()V", "alignSettings", "", "maybeSwipeLayout", "Landroid/view/View;", "plugin-appbrand-integration_release"}) public final class at { public static final at ivg = new at(); static { AppMethodBeat.i(134776); AppMethodBeat.o(134776); } private at() { } public static final void cr(View view) { View view2; AppMethodBeat.i(134775); if (view instanceof SwipeBackLayout) { view2 = view; } else { view2 = null; } SwipeBackLayout swipeBackLayout = (SwipeBackLayout) view2; if (swipeBackLayout != null) { Resources resources = swipeBackLayout.getResources(); j.o(resources, "page.resources"); float f = resources.getDisplayMetrics().density; float f2 = 300.0f * f; swipeBackLayout.setMinVelocity(100.0f * f); swipeBackLayout.setMaxVelocity(f2); swipeBackLayout.setEdgeTrackingEnabled(1); swipeBackLayout.setEdgeSize((int) ((f * 20.0f) + 0.5f)); swipeBackLayout.setEdgeTrackingEnabled(1); swipeBackLayout.setScrimColor(0); AppMethodBeat.o(134775); return; } AppMethodBeat.o(134775); } }
d8c0c39fdc31f5a65fb2b44b3bf10caffe355b21
93bb4679a18b29b41d60065f34b7fec770cdbd00
/jbpm-human-task/jbpm-human-task-core/src/test/java/org/jbpm/process/workitem/wsht/test/async/AsyncTestQHTWorkItemHandlerTest.java
0d55673de40659aaf95e262c018932c667e80c64
[]
no_license
tcharman/jbpm
9636bf2da7b14aa198246aae03491776b4817a2d
c91e48310534e33d64455d312763bd52a44f33f2
refs/heads/master
2021-01-17T16:01:53.188719
2012-05-29T14:42:28
2012-05-30T16:32:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,691
java
/** * Copyright 2010 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.jbpm.process.workitem.wsht.test.async; import static org.jbpm.task.service.test.impl.TestServerUtil.startAsyncServer; import org.jbpm.process.workitem.wsht.async.WSHumanTaskHandlerBaseAsyncTest; import org.jbpm.task.TestStatefulKnowledgeSession; import org.jbpm.task.service.TaskServer; import org.jbpm.task.service.test.impl.AsyncTestHTWorkItemHandler; public class AsyncTestQHTWorkItemHandlerTest extends WSHumanTaskHandlerBaseAsyncTest { private TaskServer server; @Override protected void setUp() throws Exception { super.setUp(); server = startAsyncServer(taskService, 1); while (!server.isRunning()) { Thread.sleep(50); } AsyncTestHTWorkItemHandler handler = new AsyncTestHTWorkItemHandler(new TestStatefulKnowledgeSession(), server); setClient(handler.getClient()); setHandler(handler); } protected void tearDown() throws Exception { ((AsyncTestHTWorkItemHandler) getHandler()).dispose(); getClient().disconnect(); server.stop(); super.tearDown(); } }
fed59438ce61c35623935ff36e74f21ffedbb580
b4bd4f75642545bb87417980f680d5e020d76a61
/oa_07/src/com/bjsxt/oa/managers/impl/UserManagerImpl.java
e7fa5fd5979b637741dc5f423e9a187535869814
[]
no_license
yomea/Java2
9404299fa08b9be32c5577be8f2d90d00604eac8
78abbf319b1c950a977391171fa49235481dfb49
refs/heads/master
2021-09-04T05:15:57.560334
2018-01-16T06:12:45
2018-01-16T06:12:45
72,603,240
1
0
null
null
null
null
GB18030
Java
false
false
3,339
java
package com.bjsxt.oa.managers.impl; import java.util.Calendar; import java.util.Date; import java.util.List; import com.bjsxt.oa.managers.SystemException; import com.bjsxt.oa.managers.UserManager; import com.bjsxt.oa.model.Person; import com.bjsxt.oa.model.Role; import com.bjsxt.oa.model.User; import com.bjsxt.oa.model.UsersRoles; public class UserManagerImpl extends AbstractManager implements UserManager { public void addOrUpdateUserRole(int userId, int roleId, int orderNo) { //首先根据userId和roleId查找UsersRoles对象 UsersRoles ur = findUsersRoles(userId,roleId); if(ur == null){ ur = new UsersRoles(); ur.setOrderNo(orderNo); ur.setRole((Role)getHibernateTemplate().load(Role.class, roleId)); ur.setUser((User)getHibernateTemplate().load(User.class, userId)); getHibernateTemplate().save(ur); return; } // ur.setOrderNo(orderNo); getHibernateTemplate().update(ur); } public void addUser(User user, int personId) { if(personId == 0){ throw new SystemException("必须选择相应的人员信息"); } user.setPerson((Person)getHibernateTemplate().load(Person.class, personId)); //设置创建时间 user.setCreateTime(new Date()); getHibernateTemplate().save(user); } public void delUser(int userId) { getHibernateTemplate().delete(getHibernateTemplate().load(User.class, userId)); } public void delUserRole(int userId, int roleId) { getHibernateTemplate().delete(findUsersRoles(userId,roleId)); } public User findUser(int userId) { return (User)getHibernateTemplate().load(User.class, userId); } public User login(String username, String password) { /** * 因为设置了User的auto-import="false",所以,在这里使用 * HQL查询的时候,必须使用全路径的类名 */ User user = (User)getSession().createQuery( "select u from com.bjsxt.oa.model.User u where u.username = ?") .setParameter(0, username) .uniqueResult(); if(user == null){ throw new SystemException("没有这个用户"); } if(!user.getPassword().equals(password)){ throw new SystemException("密码错误!"); } if(user.getExpireTime() != null){ //现在时间 Calendar now = Calendar.getInstance(); //失效时间 Calendar expireTime = Calendar.getInstance(); expireTime.setTime(user.getExpireTime()); //如果现在在失效时间之后 if(now.after(expireTime)){ throw new SystemException("用户信息已失效!"); } } return user; } public List searchUserRoles(int userId) { return getHibernateTemplate().find("select ur from UsersRoles ur where ur.user.id = ?", userId); } public void updateUser(User user, int personId) { if(personId == 0){ throw new SystemException("必须选择相应的人员信息"); } user.setPerson((Person)getHibernateTemplate().load(Person.class, personId)); getHibernateTemplate().update(user); } private UsersRoles findUsersRoles(int userId,int roleId){ return (UsersRoles)getSession().createQuery( "select ur from UsersRoles ur where ur.role.id = ? and ur.user.id = ?") .setParameter(0, roleId) .setParameter(1, userId) .uniqueResult(); } }
c879bb81a8f729b1351cfce5d95ea480102971c3
56d1c5242e970ca0d257801d4e627e2ea14c8aeb
/src/com/csms/leetcode/number/n800/n860/Leetcode871.java
b1ed941c7b90996dd77e1f75ded9cd762c005d21
[]
no_license
dai-zi/leetcode
e002b41f51f1dbd5c960e79624e8ce14ac765802
37747c2272f0fb7184b0e83f052c3943c066abb7
refs/heads/master
2022-12-14T11:20:07.816922
2020-07-24T03:37:51
2020-07-24T03:37:51
282,111,073
0
0
null
null
null
null
UTF-8
Java
false
false
636
java
package com.csms.leetcode.number.n800.n860; //最低加油次数 //困难 public class Leetcode871 { public int minRefuelStops(int target, int startFuel, int[][] stations) { int N = stations.length; long[] dp = new long[N + 1]; dp[0] = startFuel; for (int i = 0; i < N; ++i) for (int t = i; t >= 0; --t) if (dp[t] >= stations[i][0]) dp[t+1] = Math.max(dp[t+1], dp[t] + (long) stations[i][1]); for (int i = 0; i <= N; ++i) if (dp[i] >= target) return i; return -1; } public static void main(String[] args) { } }
c5fa0c36e31dd56e8f397276ffd2599f5a9539ed
4570050f771e0ea8c712d4306dbf2916470917cf
/hibernate-plus/src/main/java/com/baomidou/hibernateplus/generator/config/rules/NamingStrategy.java
853f11622c4fc8489874a8a3be8134ad7fc858a9
[ "MIT" ]
permissive
jqmtony/hibernate-plus
a4cf574a84b7a816498478da1ae3ba645c084b2e
5d025bbbfba36bf95478e43a1e6499277a06b57b
refs/heads/master
2020-03-21T06:47:56.993845
2017-04-02T18:57:07
2017-04-02T18:57:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,008
java
/** * Copyright (c) 2011-2020, hubin ([email protected]). * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.baomidou.hibernateplus.generator.config.rules; import com.baomidou.hibernateplus.generator.config.ConstVal; import com.baomidou.hibernateplus.utils.StringUtils; /** * 从数据库表到文件的命名策略 * * @author YangHu, tangguo * @since 2016/8/30 */ public enum NamingStrategy { /** * 不做任何改变,原样输出 */ nochange, /** * 下划线转驼峰命名 */ underline_to_camel, /** * 仅去掉前缀 */ remove_prefix, /** * 去掉前缀并且转驼峰 */ remove_prefix_and_camel; public static String underlineToCamel(String name) { // 快速检查 if (StringUtils.isBlank(name)) { // 没必要转换 return StringUtils.EMPTY; } StringBuilder result = new StringBuilder(); // 用下划线将原始字符串分割 String camels[] = name.toLowerCase().split(ConstVal.UNDERLINE); for (String camel : camels) { // 跳过原始字符串中开头、结尾的下换线或双重下划线 if (StringUtils.isBlank(camel)) { continue; } // 处理真正的驼峰片段 if (result.length() == 0) { // 第一个驼峰片段,全部字母都小写 result.append(camel); } else { // 其他的驼峰片段,首字母大写 result.append(capitalFirst(camel)); } } return result.toString(); } /** * 去掉下划线前缀 * * @param name * @return */ public static String removePrefix(String name) { if (StringUtils.isBlank(name)) { return StringUtils.EMPTY; } int idx = name.indexOf(ConstVal.UNDERLINE); if (idx == -1) { return name; } return name.substring(idx + 1); } /** * 去掉指定的前缀 * * @param name * @param prefix * @return */ public static String removePrefix(String name, String prefix) { if (StringUtils.isBlank(name)) { return StringUtils.EMPTY; } int idx = name.indexOf(ConstVal.UNDERLINE); if (prefix != null && !"".equals(prefix.trim())) { if (name.toLowerCase().matches("^" + prefix.toLowerCase() + ".*")) { // 判断是否有匹配的前缀,然后截取前缀 idx = prefix.length() - 1; } } if (idx == -1) { return name; } return name.substring(idx + 1); } /** * 去掉下划线前缀且将后半部分转成驼峰格式 * * @param name * @param tablePrefix * @return */ public static String removePrefixAndCamel(String name, String tablePrefix) { return underlineToCamel(removePrefix(name, tablePrefix)); } /** * 实体首字母大写 * * @param name 待转换的字符串 * @return 转换后的字符串 */ public static String capitalFirst(String name) { if (StringUtils.isNotBlank(name)) { return name.substring(0, 1).toUpperCase() + name.substring(1); /*char[] array = name.toCharArray(); array[0] -= 32; return String.valueOf(array);*/ } return StringUtils.EMPTY; } }
456240c75121f07e143b86a5ca08b4d33ff131d9
425ac2b3d2ba036202c1dc72c561d3a904df33ad
/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/DefaultDelegatedClientIdentityProviderConfigurationProducer.java
b26b58527d0541cb1b7d7bb36db59112af48f956
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
fogbeam/cas_mirror
fee69b4b1a7bf5cac87da75b209edc3cc3c1d5d6
b7daea814f1238e95a6674663b2553555a5b2eed
refs/heads/master
2023-01-07T08:34:26.200966
2021-08-12T19:14:41
2021-08-12T19:14:41
41,710,765
1
2
Apache-2.0
2022-12-27T15:39:03
2015-09-01T01:53:24
Java
UTF-8
Java
false
false
8,098
java
package org.apereo.cas.web.flow; import org.apereo.cas.authentication.AuthenticationServiceSelectionPlan; import org.apereo.cas.authentication.principal.Service; import org.apereo.cas.authentication.principal.WebApplicationService; import org.apereo.cas.configuration.CasConfigurationProperties; import org.apereo.cas.pac4j.client.DelegatedClientAuthenticationRequestCustomizer; import org.apereo.cas.services.ServicesManager; import org.apereo.cas.util.LoggingUtils; import org.apereo.cas.validation.DelegatedAuthenticationAccessStrategyHelper; import org.apereo.cas.web.DelegatedClientIdentityProviderConfiguration; import org.apereo.cas.web.DelegatedClientIdentityProviderConfigurationFactory; import org.apereo.cas.web.cookie.CasCookieBuilder; import org.apereo.cas.web.support.WebUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.apache.commons.lang3.StringUtils; import org.pac4j.core.client.Client; import org.pac4j.core.client.Clients; import org.pac4j.core.client.IndirectClient; import org.pac4j.core.context.JEEContext; import org.springframework.http.HttpStatus; import org.springframework.webflow.execution.RequestContext; import javax.servlet.http.HttpServletRequest; import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.Set; /** * This is {@link DefaultDelegatedClientIdentityProviderConfigurationProducer}. * * @author Misagh Moayyed * @since 6.2.0 */ @Slf4j @RequiredArgsConstructor public class DefaultDelegatedClientIdentityProviderConfigurationProducer implements DelegatedClientIdentityProviderConfigurationProducer { /** * The Services manager. */ private final ServicesManager servicesManager; private final AuthenticationServiceSelectionPlan authenticationRequestServiceSelectionStrategies; private final Clients clients; private final DelegatedAuthenticationAccessStrategyHelper delegatedAuthenticationAccessStrategyHelper; private final CasConfigurationProperties casProperties; private final CasCookieBuilder delegatedAuthenticationCookieBuilder; private final List<DelegatedClientAuthenticationRequestCustomizer> delegatedClientAuthenticationRequestCustomizers; @Override public Set<DelegatedClientIdentityProviderConfiguration> produce(final RequestContext context) { val currentService = WebUtils.getService(context); val service = authenticationRequestServiceSelectionStrategies.resolveService(currentService, WebApplicationService.class); val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context); val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context); val webContext = new JEEContext(request, response); LOGGER.debug("Initialized context with request parameters [{}]", webContext.getRequestParameters()); val allClients = this.clients.findAllClients(); val providers = new LinkedHashSet<DelegatedClientIdentityProviderConfiguration>(allClients.size()); allClients .stream() .filter(client -> client instanceof IndirectClient && isDelegatedClientAuthorizedForService(client, service, request)) .map(IndirectClient.class::cast) .forEach(client -> { try { val provider = produce(context, client); provider.ifPresent(p -> { providers.add(p); determineAutoRedirectPolicyForProvider(context, service, p); }); } catch (final Exception e) { LOGGER.error("Cannot process client [{}]", client); LoggingUtils.error(LOGGER, e); } }); if (!providers.isEmpty()) { WebUtils.putDelegatedAuthenticationProviderConfigurations(context, providers); } else if (response.getStatus() != HttpStatus.UNAUTHORIZED.value()) { LOGGER.warn("No delegated authentication providers could be determined based on the provided configuration. " + "Either no clients are configured, or the current access strategy rules prohibit CAS from using authentication providers"); } return providers; } @Override public Optional<DelegatedClientIdentityProviderConfiguration> produce(final RequestContext requestContext, final IndirectClient client) { val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext); val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(requestContext); val webContext = new JEEContext(request, response); val currentService = WebUtils.getService(requestContext); LOGGER.debug("Initializing client [{}] with request parameters [{}] and service [{}]", client, requestContext.getRequestParameters(), currentService); client.init(); if (delegatedClientAuthenticationRequestCustomizers.isEmpty() || delegatedClientAuthenticationRequestCustomizers.stream().anyMatch(c -> c.isAuthorized(webContext, client, currentService))) { return DelegatedClientIdentityProviderConfigurationFactory.builder() .client(client) .webContext(webContext) .service(currentService) .casProperties(casProperties) .build() .resolve(); } return Optional.empty(); } /** * Determine auto redirect policy for provider. * * @param context the context * @param service the service * @param provider the provider */ protected void determineAutoRedirectPolicyForProvider(final RequestContext context, final WebApplicationService service, final DelegatedClientIdentityProviderConfiguration provider) { if (service != null) { val registeredService = servicesManager.findServiceBy(service); val delegatedPolicy = registeredService.getAccessStrategy().getDelegatedAuthenticationPolicy(); if (delegatedPolicy.isExclusive() && delegatedPolicy.getAllowedProviders().size() == 1 && provider.getName().equalsIgnoreCase(delegatedPolicy.getAllowedProviders().iterator().next())) { LOGGER.trace("Registered service [{}] is exclusively allowed to use provider [{}]", registeredService, provider); provider.setAutoRedirect(true); WebUtils.putDelegatedAuthenticationProviderPrimary(context, provider); } } if (WebUtils.getDelegatedAuthenticationProviderPrimary(context) == null && provider.isAutoRedirect()) { LOGGER.trace("Provider [{}] is configured to auto-redirect", provider); WebUtils.putDelegatedAuthenticationProviderPrimary(context, provider); } val cookieProps = casProperties.getAuthn().getPac4j().getCookie(); if (cookieProps.isEnabled()) { val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context); val cookieValue = delegatedAuthenticationCookieBuilder.retrieveCookieValue(request); if (StringUtils.equalsIgnoreCase(cookieValue, provider.getName())) { LOGGER.trace("Provider [{}] is chosen via cookie value preference as primary", provider); provider.setAutoRedirect(true); WebUtils.putDelegatedAuthenticationProviderPrimary(context, provider); } } } private boolean isDelegatedClientAuthorizedForService(final Client client, final Service service, final HttpServletRequest request) { return delegatedAuthenticationAccessStrategyHelper.isDelegatedClientAuthorizedForService(client, service, request); } }
fd6dbaa04eda7a32c3711699903ba7e891557e36
dfe5caf190661c003619bfe7a7944c527c917ee4
/src/main/java/com/vmware/vim25/VirtualAppSummary.java
1767a52f6fe524a68809af45ac5e1559baf3154f
[ "BSD-3-Clause" ]
permissive
timtasse/vijava
c9787f9f9b3116a01f70a89d6ea29cc4f6dc3cd0
5d75bc0bd212534d44f78e5a287abf3f909a2e8e
refs/heads/master
2023-06-01T08:20:39.601418
2022-10-31T12:43:24
2022-10-31T12:43:24
150,118,529
4
1
BSD-3-Clause
2023-05-01T21:19:53
2018-09-24T14:46:15
Java
UTF-8
Java
false
false
2,847
java
/*================================================================================ Copyright (c) 2013 Steve Jin. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of VMware, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================*/ package com.vmware.vim25; /** * @author Steve Jin (http://www.doublecloud.org) * @version 5.1 */ @SuppressWarnings("all") public class VirtualAppSummary extends ResourcePoolSummary { public VAppProductInfo product; public VirtualAppVAppState vAppState; public Boolean suspended; public Boolean installBootRequired; public String instanceUuid; public VAppProductInfo getProduct() { return this.product; } public VirtualAppVAppState getVAppState() { return this.vAppState; } public Boolean getSuspended() { return this.suspended; } public Boolean getInstallBootRequired() { return this.installBootRequired; } public String getInstanceUuid() { return this.instanceUuid; } public void setProduct(VAppProductInfo product) { this.product=product; } public void setVAppState(VirtualAppVAppState vAppState) { this.vAppState=vAppState; } public void setSuspended(Boolean suspended) { this.suspended=suspended; } public void setInstallBootRequired(Boolean installBootRequired) { this.installBootRequired=installBootRequired; } public void setInstanceUuid(String instanceUuid) { this.instanceUuid=instanceUuid; } }
5609dc1e52d1841ca5dbf203349fc19bbbb829bc
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/plugin/appbrand/jsapi/auth/b.java
9921d797d4a09e4a431acea7726cd7d8531b0796
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
353
java
package com.tencent.mm.plugin.appbrand.jsapi.auth; public abstract interface b { public abstract void aia(); } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes2-dex2jar.jar!/com/tencent/mm/plugin/appbrand/jsapi/auth/b.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
f0aadad789e80d0044174a1c7e473935e1a937c4
2b7db6b45cd63b4e8e658d31abbaabb9903c22b2
/spring-test/src/test/java/org/springframework/test/context/hierarchies/web/DispatcherWacRootWacEarTests.java
aa42080dd832fd2f21133ae8b4f1c219b4e857f4
[ "MIT" ]
permissive
CrazyLiu-9527/spring-analysis-note
413b2448d0ae45f72d6d49ef82a8b6283b3218c3
7df0ce990d1a6b48e63ac9ff8f45b6bd353ce5bb
refs/heads/master
2022-08-29T00:29:20.546633
2020-05-28T08:39:15
2020-05-28T08:39:15
267,532,779
0
0
MIT
2020-05-28T08:16:34
2020-05-28T08:16:33
null
UTF-8
Java
false
false
2,839
java
/* * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.test.context.hierarchies.web; import javax.servlet.ServletContext; import org.junit.Ignore; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextHierarchy; import org.springframework.web.context.WebApplicationContext; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; /** * @author Sam Brannen * @since 3.2.2 */ @ContextHierarchy(@ContextConfiguration) public class DispatcherWacRootWacEarTests extends RootWacEarTests { @Autowired private WebApplicationContext wac; @Autowired private String ear; @Autowired private String root; @Autowired private String dispatcher; @Ignore("Superseded by verifyDispatcherWacConfig()") @Test @Override public void verifyEarConfig() { /* no-op */ } @Ignore("Superseded by verifyDispatcherWacConfig()") @Test @Override public void verifyRootWacConfig() { /* no-op */ } @Test public void verifyDispatcherWacConfig() { ApplicationContext parent = wac.getParent(); assertNotNull(parent); assertTrue(parent instanceof WebApplicationContext); ApplicationContext grandParent = parent.getParent(); assertNotNull(grandParent); assertFalse(grandParent instanceof WebApplicationContext); ServletContext dispatcherServletContext = wac.getServletContext(); assertNotNull(dispatcherServletContext); ServletContext rootServletContext = ((WebApplicationContext) parent).getServletContext(); assertNotNull(rootServletContext); assertSame(dispatcherServletContext, rootServletContext); assertSame(parent, rootServletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE)); assertSame(parent, dispatcherServletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE)); assertEquals("ear", ear); assertEquals("root", root); assertEquals("dispatcher", dispatcher); } }
0488b963c632d9c7edce5b283d838e7dfbc42141
896a95a97dadc6eb034469c75eaaab4626d29dde
/src/main/java/com/qfedu/fourstudy/transport/EsUtil.java
77f6122237ceaddd0919b783d729e1c5ca58f1f2
[]
no_license
xingpenghui/FourStudy1901
176d9e9d200c671c0b4453a23ee2e84f43cfe07a
69b28242b87fdfc0a0341eb295fad9d5a077dbfa
refs/heads/master
2022-07-03T21:08:31.168483
2019-07-11T04:57:40
2019-07-11T04:57:40
196,322,455
0
0
null
2022-06-21T01:26:11
2019-07-11T04:57:33
Java
UTF-8
Java
false
false
5,699
java
package com.qfedu.fourstudy.transport; import com.alibaba.fastjson.JSON; import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteResponse; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.update.UpdateResponse; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.InetSocketTransportAddress; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.TermQueryBuilder; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.transport.client.PreBuiltTransportClient; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; /** *@Author feri *@Date Created in 2019/6/20 15:34 * 基于Transport实现对象ES的封装处理 */ public class EsUtil { private TransportClient client; public EsUtil(String clusterName,String host,int port){ Settings settings=Settings.builder().put("cluster.name",clusterName).build(); //2、创建连接对象 try { client=new PreBuiltTransportClient(settings).addTransportAddress( new InetSocketTransportAddress(InetAddress.getByName(host),port)); } catch (UnknownHostException e) { e.printStackTrace(); } } //新增 public boolean save(String indexName,String typeName,String id,String res){ IndexResponse response=client.prepareIndex(indexName,typeName,id).setSource(res,XContentType.JSON).get(); return response.getResult().name().equals("CREATED"); } //修改 public boolean update(String indexName,String typeName,String id,String res){ UpdateResponse updateResponse=client.prepareUpdate(indexName,typeName,id).setDoc(res,XContentType.JSON).get(); return updateResponse.status().name().equals("OK"); } //删除 public boolean delete(String indexName,String typeName,String id){ DeleteResponse deleteResponse=client.prepareDelete(indexName, typeName, id).get(); return deleteResponse.status().name().equals("OK"); } //查询 public String getById(String indexName,String typeName,String id){ GetResponse getResponse=client.prepareGet(indexName, typeName, id).get(); return getResponse.getSourceAsString(); } //自定义泛型 public <T> T getByIdObj(String indexName,String typeName,String id,Class<T> clz){ String json=getById(indexName, typeName, id); if(json!=null){ return JSON.parseObject(json,clz); }else { return null; } } //批量新增 public <T> boolean batchSave(String indexName,String typeName,List<String> ids,List<String> res){ BulkRequestBuilder requestBuilder=client.prepareBulk(); for(int i=0;i<ids.size();i++){ requestBuilder.add(client.prepareIndex(indexName,typeName,ids.get(i)). setSource(res.get(i),XContentType.JSON)); } return requestBuilder.get().status().name().equals("OK"); } //批量修改 public <T> boolean batchUpdate(String indexName,String typeName,List<String> ids,List<String> res){ BulkRequestBuilder requestBuilder=client.prepareBulk(); for(int i=0;i<ids.size();i++){ requestBuilder.add(client.prepareUpdate(indexName,typeName,ids.get(i)). setDoc(res.get(i),XContentType.JSON)); } return requestBuilder.get().status().name().equals("OK"); } //批量删除 public <T> boolean batchDelete(String indexName,String typeName,List<String> ids){ BulkRequestBuilder requestBuilder=client.prepareBulk(); for(int i=0;i<ids.size();i++){ requestBuilder.add(client.prepareDelete(indexName,typeName,ids.get(i))); } return requestBuilder.get().status().name().equals("OK"); } //复杂查询-单值 public String searhValue(String indexName, String typeName,String field,Object value){ TermQueryBuilder termQueryBuilder= QueryBuilders.termQuery(field,value); List<String> list= search(indexName,typeName,0,1,termQueryBuilder); if(list!=null) { return list.get(0); }else { return null; } } //复杂查询-多值 //复杂查询-模糊 //复杂查询-范围 //查询 public List<String> search(String indexName, String typeName,int start,int count, QueryBuilder queryBuilder){ SearchSourceBuilder sourceBuilder=new SearchSourceBuilder(); sourceBuilder.query(queryBuilder); SearchResponse searchResponse=client.prepareSearch(indexName).setTypes(typeName).setFrom(start).setSize(count).setQuery(sourceBuilder.query()).get(); SearchHit[] hits=searchResponse.getHits().getHits(); List<String> list=new ArrayList<>(); for(SearchHit sh:hits){ list.add(sh.getSourceAsString()); } return list; } public <T> List<T> searchList(String indexName, String typeName,int start,int count, QueryBuilder queryBuilder,Class<T> clz){ List<String> arr=search(indexName, typeName, start, count, queryBuilder); String json=JSON.toJSONString(arr); List<T> list=JSON.parseArray(json,clz); return list; } }
09e7fcb55be5f111fc3737ad8a3439a5ea3bdee9
4419bbecc195b63a8d0b23cd0a646477c652fb85
/my-java-core-app/src/main/java/com/app/concurrency/app01/blockingqueue/priority/MyQueueProducer.java
0a29db0b9eeae78b6bbd1cc77c1f08016d3866f8
[]
no_license
softwareengineerhub/test
c81affe5a53d5e9d3f2e052b8921abb4c4662c21
26915613b2613c1112219b2d3efebcbbf82097f3
refs/heads/master
2022-11-22T00:54:35.738807
2020-03-15T20:16:51
2020-03-15T20:16:51
143,843,743
0
1
null
2022-11-16T11:51:41
2018-08-07T08:32:22
Java
UTF-8
Java
false
false
2,161
java
package com.app.concurrency.app01.blockingqueue.priority; import java.util.concurrent.BlockingQueue; public class MyQueueProducer extends Thread { private BlockingQueue blockingQueue; public MyQueueProducer(BlockingQueue blockingQueue) { this.blockingQueue = blockingQueue; } public void run(){ MyData myData1 = new MyData("Added1", 0); MyData myData2 = new MyData("Added2", 1); MyData myData3 = new MyData("Added3", -5); MyData myData4 = new MyData("Added4", 6); MyData myData5 = new MyData("Added5", 2); MyData myData6 = new MyData("Added6", 3); MyData myData7 = new MyData("Added7", 4); MyData myData8 = new MyData("Added8", 5); MyData myData9 = new MyData("Added9", 6); MyData myData10 = new MyData("Added10", 7); MyData myData11 = new MyData("Added11", 8); MyData myData12 = new MyData("Added12", 9); try { blockingQueue.put(myData1); System.out.println("Produced: "+myData1); blockingQueue.put(myData2); System.out.println("Produced: "+myData2); blockingQueue.put(myData3); System.out.println("Produced: "+myData3); blockingQueue.put(myData4); System.out.println("Produced: "+myData4); blockingQueue.put(myData5); System.out.println("Produced: "+myData5); blockingQueue.put(myData6); System.out.println("Produced: "+myData6); blockingQueue.put(myData7); System.out.println("Produced: "+myData7); blockingQueue.put(myData8); System.out.println("Produced: "+myData8); blockingQueue.put(myData9); System.out.println("Produced: "+myData9); blockingQueue.put(myData10); System.out.println("Produced: "+myData10); blockingQueue.put(myData11); System.out.println("Produced: "+myData11); blockingQueue.put(myData12); System.out.println("Produced: "+myData12); }catch(Exception ex){ ex.printStackTrace(); } } }
729bc00c25c27bf5af082883abd873359b8787e2
bcf03d43318239f6242e53e0bdd3c4753c08fc79
/java/okio/Base64.java
d0b2b5314f4df277468ee1ed25c419537aa9a82b
[]
no_license
morristech/Candid
24699d45f9efb08787316154d05ad5e6a7a181a5
102dd9504cac407326b67ca7a36df8adf6a8b450
refs/heads/master
2021-01-22T21:07:12.067146
2016-12-22T18:40:30
2016-12-22T18:40:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,443
java
package okio; import defpackage.um$h; import java.io.UnsupportedEncodingException; final class Base64 { private static final byte[] MAP = new byte[]{(byte) 65, (byte) 66, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 75, (byte) 76, (byte) 77, (byte) 78, (byte) 79, (byte) 80, (byte) 81, (byte) 82, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 97, (byte) 98, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 107, (byte) 108, (byte) 109, (byte) 110, (byte) 111, (byte) 112, (byte) 113, (byte) 114, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 48, (byte) 49, (byte) 50, (byte) 51, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 43, (byte) 47}; private static final byte[] URL_MAP = new byte[]{(byte) 65, (byte) 66, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 75, (byte) 76, (byte) 77, (byte) 78, (byte) 79, (byte) 80, (byte) 81, (byte) 82, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 97, (byte) 98, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 107, (byte) 108, (byte) 109, (byte) 110, (byte) 111, (byte) 112, (byte) 113, (byte) 114, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 48, (byte) 49, (byte) 50, (byte) 51, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 45, (byte) 95}; private Base64() { } public static byte[] decode(String in) { int limit = in.length(); while (limit > 0) { char c = in.charAt(limit - 1); if (c != '=' && c != '\n' && c != '\r' && c != ' ' && c != '\t') { break; } limit--; } byte[] out = new byte[((int) ((((long) limit) * 6) / 8))]; int inCount = 0; int word = 0; int pos = 0; int outCount = 0; while (pos < limit) { int bits; int outCount2; c = in.charAt(pos); if (c >= 'A' && c <= 'Z') { bits = c - 65; } else if (c >= 'a' && c <= 'z') { bits = c - 71; } else if (c >= '0' && c <= '9') { bits = c + 4; } else if (c == '+' || c == '-') { bits = 62; } else if (c == '/' || c == '_') { bits = 63; } else { if (!(c == '\n' || c == '\r' || c == ' ')) { if (c == '\t') { outCount2 = outCount; pos++; outCount = outCount2; } else { outCount2 = outCount; return null; } } outCount2 = outCount; pos++; outCount = outCount2; } word = (word << 6) | ((byte) bits); inCount++; if (inCount % 4 == 0) { outCount2 = outCount + 1; out[outCount] = (byte) (word >> 16); outCount = outCount2 + 1; out[outCount2] = (byte) (word >> 8); outCount2 = outCount + 1; out[outCount] = (byte) word; pos++; outCount = outCount2; } outCount2 = outCount; pos++; outCount = outCount2; } int lastWordChars = inCount % 4; if (lastWordChars == 1) { outCount2 = outCount; return null; } if (lastWordChars == 2) { outCount2 = outCount + 1; out[outCount] = (byte) ((word << 12) >> 16); } else { if (lastWordChars == 3) { word <<= 6; outCount2 = outCount + 1; out[outCount] = (byte) (word >> 16); outCount = outCount2 + 1; out[outCount2] = (byte) (word >> 8); } outCount2 = outCount; } if (outCount2 == out.length) { return out; } byte[] prefix = new byte[outCount2]; System.arraycopy(out, 0, prefix, 0, outCount2); return prefix; } public static String encode(byte[] in) { return encode(in, MAP); } public static String encodeUrl(byte[] in) { return encode(in, URL_MAP); } private static String encode(byte[] in, byte[] map) { int i; byte[] out = new byte[(((in.length + 2) * 4) / 3)]; int end = in.length - (in.length % 3); int index = 0; for (int i2 = 0; i2 < end; i2 += 3) { i = index + 1; out[index] = map[(in[i2] & 255) >> 2]; index = i + 1; out[i] = map[((in[i2] & 3) << 4) | ((in[i2 + 1] & 255) >> 4)]; i = index + 1; out[index] = map[((in[i2 + 1] & 15) << 2) | ((in[i2 + 2] & 255) >> 6)]; index = i + 1; out[i] = map[in[i2 + 2] & 63]; } switch (in.length % 3) { case um$h.com_facebook_profile_picture_view_com_facebook_is_cropped /*1*/: i = index + 1; out[index] = map[(in[end] & 255) >> 2]; index = i + 1; out[i] = map[(in[end] & 3) << 4]; i = index + 1; out[index] = (byte) 61; index = i + 1; out[i] = (byte) 61; i = index; break; case um$h.com_facebook_login_view_com_facebook_logout_text /*2*/: i = index + 1; out[index] = map[(in[end] & 255) >> 2]; index = i + 1; out[i] = map[((in[end] & 3) << 4) | ((in[end + 1] & 255) >> 4)]; i = index + 1; out[index] = map[(in[end + 1] & 15) << 2]; index = i + 1; out[i] = (byte) 61; break; } i = index; try { return new String(out, 0, i, "US-ASCII"); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } } }
3fe835b06d252726e0ad1299b099d43797c2dceb
e635fb4ec1a29afd113145531e661eb644ea84ce
/inference-framework/checker-framework/checkers/inference-tests/swift/src/webil/ui/CheckBox.java
78bec0bc1edf66d0578142349c54bfb331eb4e8c
[]
no_license
flankerhqd/type-inference
82f4538db3dd46021403cd3867faab2ee09aa6e3
437af6525c050bb6689d8626e696d14cb6742cbf
refs/heads/master
2016-08-04T00:38:21.756067
2015-05-04T03:10:56
2015-05-04T03:10:56
35,372,790
2
1
null
null
null
null
UTF-8
Java
false
false
1,099
java
package webil.ui; public class CheckBox extends ClickableWidget { public CheckBox(String text) { super(); setText(text); } public CheckBox(String id, String text) { super(id); setText(text); } protected void initWidget() { this.widgetImpl = new CheckBoxImpl(this); } public String getText() { CheckBoxImpl b = (CheckBoxImpl)widgetImpl; return b.getText(); } public void setText(String text) { CheckBoxImpl b = (CheckBoxImpl)widgetImpl; b.setText(text); } public boolean isChecked() { CheckBoxImpl b = (CheckBoxImpl)widgetImpl; return b.isChecked(); } public boolean isEnabled() { CheckBoxImpl b = (CheckBoxImpl)widgetImpl; return b.isEnabled(); } public void setChecked(boolean check) { CheckBoxImpl b = (CheckBoxImpl)widgetImpl; b.setChecked(check); } public void setEnabled(boolean enable) { CheckBoxImpl b = (CheckBoxImpl)widgetImpl; b.setChecked(enable); } }
[ "[email protected]@e039eaa7-eea3-5927-096b-721137851c37" ]
[email protected]@e039eaa7-eea3-5927-096b-721137851c37
be18ccb3c1073373a1e0bde4753717007adf12e8
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13942-2-1-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/model/internal/reference/AbstractEntityReferenceResolver_ESTest.java
b592c5a8bece82b708d093eef635342d5c182244
[]
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,103
java
/* * This file was automatically generated by EvoSuite * Sun Apr 05 13:44:29 UTC 2020 */ package org.xwiki.model.internal.reference; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.xwiki.model.EntityType; import org.xwiki.model.internal.reference.ExplicitStringEntityReferenceResolver; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractEntityReferenceResolver_ESTest extends AbstractEntityReferenceResolver_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { ExplicitStringEntityReferenceResolver explicitStringEntityReferenceResolver0 = new ExplicitStringEntityReferenceResolver(); EntityType entityType0 = EntityType.OBJECT; Object[] objectArray0 = new Object[0]; // Undeclared exception! explicitStringEntityReferenceResolver0.resolveDefaultReference(entityType0, objectArray0); } }
1a2b60ccb7f2d4303935b70f35d64d6fdc8aba67
ed107eefd4714aac8f3c34acacc2bcc7b582c24b
/src/main/java/com/wolf/concurrenttest/threadpool/MyTask1.java
c5b7987427f4a0095e7275f0b192f76afe865fbf
[]
no_license
liyork/concurrenttest
07a7a14546b473e65e372941ebe1a444251747c6
5da7b5d4a0551ea7c39e0d86a8fca991b682efb0
refs/heads/master
2022-10-22T11:02:45.490207
2021-09-28T14:06:29
2021-09-28T14:06:29
167,670,022
0
2
null
2022-10-05T00:08:53
2019-01-26T09:08:17
Java
UTF-8
Java
false
false
692
java
package com.wolf.concurrenttest.threadpool; import java.util.Random; import java.util.concurrent.Callable; /** * <p> Description: * <p/> * Date: 2016/6/23 * Time: 11:51 * * @author 李超 * @version 1.0 * @since 1.0 */ public class MyTask1 implements Callable<Boolean> { @Override public Boolean call() throws Exception { System.out.println(Thread.currentThread().getName() + " is in call"); Random random = new Random(); // 总计耗时约10秒 for(int i = 0; i < 10L; i++) { int millis = random.nextInt(5000); Thread.sleep(millis); System.out.print('-'); } return Boolean.TRUE; } }
e212475222eb2c4a2a2f0bd95b138201f481f631
d5515553d071bdca27d5d095776c0e58beeb4a9a
/src/net/sourceforge/plantuml/ugraphic/AbstractUGraphic.java
94800e509706771abc2ce6442b7ee09f876c85d8
[]
no_license
ccamel/plantuml
29dfda0414a3dbecc43696b63d4dadb821719489
3100d49b54ee8e98537051e071915e2060fe0b8e
refs/heads/master
2022-07-07T12:03:37.351931
2016-12-14T21:01:03
2016-12-14T21:01:03
77,067,872
1
0
null
2022-05-30T09:56:21
2016-12-21T16:26:58
Java
UTF-8
Java
false
false
2,806
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.ugraphic; import java.util.HashMap; import java.util.Map; public abstract class AbstractUGraphic<O> extends AbstractCommonUGraphic { private final O g2d; private final Map<Class<? extends UShape>, UDriver<O>> drivers = new HashMap<Class<? extends UShape>, UDriver<O>>(); public AbstractUGraphic(ColorMapper colorMapper, O g2d) { super(colorMapper); this.g2d = g2d; } protected AbstractUGraphic(AbstractUGraphic<O> other) { super(other); this.g2d = other.g2d; // this.drivers.putAll(other.drivers); } protected final O getGraphicObject() { return g2d; } protected boolean manageHiddenAutomatically() { return true; } final protected void registerDriver(Class<? extends UShape> cl, UDriver<O> driver) { this.drivers.put(cl, driver); } public final void draw(UShape shape) { if (shape instanceof UEmpty) { return; } if (shape instanceof UComment) { drawComment((UComment) shape); return; } final UDriver<O> driver = drivers.get(shape.getClass()); if (driver == null) { throw new UnsupportedOperationException(shape.getClass().toString() + " " + this.getClass()); } if (getParam().isHidden() && manageHiddenAutomatically()) { return; } beforeDraw(); if (shape instanceof Scalable) { final double scale = getParam().getScale(); shape = ((Scalable) shape).getScaled(scale); driver.draw(shape, getTranslateX(), getTranslateY(), getColorMapper(), getParam(), g2d); } else { driver.draw(shape, getTranslateX(), getTranslateY(), getColorMapper(), getParam(), g2d); } afterDraw(); } protected void drawComment(UComment shape) { } protected void beforeDraw() { } protected void afterDraw() { } }
988d4c328f9365f9c27500a3acfa0793d6d2d96d
34b713d69bae7d83bb431b8d9152ae7708109e74
/common/src/main/java/org/broadleafcommerce/common/copy/MultiTenantCopierExtensionManager.java
8c7b4e21270f01341ef0bf85eef5e74c5aad9c1e
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sinotopia/BroadleafCommerce
d367a22af589b51cc16e2ad094f98ec612df1577
502ff293d2a8d58ba50a640ed03c2847cb6369f6
refs/heads/BroadleafCommerce-4.0.x
2021-01-23T14:14:45.029362
2019-07-26T14:18:05
2019-07-26T14:18:05
93,246,635
0
0
null
2017-06-03T12:27:13
2017-06-03T12:27:13
null
UTF-8
Java
false
false
1,355
java
/* * #%L * BroadleafCommerce Common Libraries * %% * Copyright (C) 2009 - 2014 Broadleaf Commerce * %% * 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. * #L% */ package org.broadleafcommerce.common.copy; import org.broadleafcommerce.common.extension.ExtensionManager; import org.springframework.stereotype.Service; @Service("blMultiTenantCopierExtensionManager") public class MultiTenantCopierExtensionManager extends ExtensionManager<MultiTenantCopierExtensionHandler> { public MultiTenantCopierExtensionManager() { super(MultiTenantCopierExtensionHandler.class); } /** * By default,this extension manager will continue on handled allowing multiple handlers to interact with the order. */ public boolean continueOnHandled() { return true; } }
1bf3adfa850dd3c19f04255792be1c89847e8949
d5b8084532ab76c1a75d311375427cf73a22ecd8
/src/main/java/com/epmweb/server/domain/BuyingGroups.java
8448f52b45b4ae8aa5a8197e1a27fb9912454c2e
[]
no_license
thetlwinoo/epm-web
4959f71e2766284f53e29eaf892467822bc6493b
ae6e41fc4df0767301909e536c30f63f58d8a489
refs/heads/master
2022-12-21T15:44:42.018331
2020-03-27T11:44:53
2020-03-27T11:44:53
250,519,805
1
1
null
2022-12-16T04:42:45
2020-03-27T11:43:54
Java
UTF-8
Java
false
false
2,593
java
package com.epmweb.server.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import javax.validation.constraints.*; import java.io.Serializable; import java.time.Instant; /** * A BuyingGroups. */ @Entity @Table(name = "buying_groups") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class BuyingGroups implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") private Long id; @Column(name = "name") private String name; @NotNull @Column(name = "valid_from", nullable = false) private Instant validFrom; @NotNull @Column(name = "valid_to", nullable = false) private Instant validTo; // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public BuyingGroups name(String name) { this.name = name; return this; } public void setName(String name) { this.name = name; } public Instant getValidFrom() { return validFrom; } public BuyingGroups validFrom(Instant validFrom) { this.validFrom = validFrom; return this; } public void setValidFrom(Instant validFrom) { this.validFrom = validFrom; } public Instant getValidTo() { return validTo; } public BuyingGroups validTo(Instant validTo) { this.validTo = validTo; return this; } public void setValidTo(Instant validTo) { this.validTo = validTo; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof BuyingGroups)) { return false; } return id != null && id.equals(((BuyingGroups) o).id); } @Override public int hashCode() { return 31; } @Override public String toString() { return "BuyingGroups{" + "id=" + getId() + ", name='" + getName() + "'" + ", validFrom='" + getValidFrom() + "'" + ", validTo='" + getValidTo() + "'" + "}"; } }
c48b74a77a0fc75d5a91cf052d9feccebfc548d0
7bd91222d410aa2178bdf10f5aef6114b6e1897f
/TV/tests/unit/src/com/android/tv/recommendation/ChannelRecordTest.java
bf8fecdeaf25dffe76dbb5f663a80d2025d09770
[ "Apache-2.0" ]
permissive
huimingli/androidsourccode
657c53c26dbdf7e22754e8e8634f5899bf45edb7
74eeb77e12de91e1f14f582a64b550c5f7c33a19
refs/heads/master
2021-04-29T09:48:29.403003
2016-12-30T02:55:09
2016-12-30T02:55:09
77,655,025
3
0
null
null
null
null
UTF-8
Java
false
false
4,163
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tv.recommendation; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import com.android.tv.testing.Utils; import java.util.Random; import java.util.concurrent.TimeUnit; /** * Unit tests for {@link ChannelRecord}. */ @SmallTest public class ChannelRecordTest extends AndroidTestCase { private static final int CHANNEL_RECORD_MAX_HISTORY_SIZE = ChannelRecord.MAX_HISTORY_SIZE; private Random mRandom; private ChannelRecord mChannelRecord; private long mLatestWatchEndTimeMs; @Override public void setUp() throws Exception { super.setUp(); mLatestWatchEndTimeMs = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1); mChannelRecord = new ChannelRecord(getContext(), null, false); mRandom = Utils.createTestRandom(); } public void testGetLastWatchEndTime_noHistory() { assertEquals(0, mChannelRecord.getLastWatchEndTimeMs()); } public void testGetLastWatchEndTime_oneHistory() { addWatchLog(); assertEquals(mLatestWatchEndTimeMs, mChannelRecord.getLastWatchEndTimeMs()); } public void testGetLastWatchEndTime_maxHistories() { for (int i = 0; i < CHANNEL_RECORD_MAX_HISTORY_SIZE; ++i) { addWatchLog(); } assertEquals(mLatestWatchEndTimeMs, mChannelRecord.getLastWatchEndTimeMs()); } public void testGetLastWatchEndTime_moreThanMaxHistories() { for (int i = 0; i < CHANNEL_RECORD_MAX_HISTORY_SIZE + 1; ++i) { addWatchLog(); } assertEquals(mLatestWatchEndTimeMs, mChannelRecord.getLastWatchEndTimeMs()); } public void testGetTotalWatchDuration_noHistory() { assertEquals(0, mChannelRecord.getTotalWatchDurationMs()); } public void testGetTotalWatchDuration_oneHistory() { long durationMs = addWatchLog(); assertEquals(durationMs, mChannelRecord.getTotalWatchDurationMs()); } public void testGetTotalWatchDuration_maxHistories() { long totalWatchTimeMs = 0; for (int i = 0; i < CHANNEL_RECORD_MAX_HISTORY_SIZE; ++i) { long durationMs = addWatchLog(); totalWatchTimeMs += durationMs; } assertEquals(totalWatchTimeMs, mChannelRecord.getTotalWatchDurationMs()); } public void testGetTotalWatchDuration_moreThanMaxHistories() { long totalWatchTimeMs = 0; long firstDurationMs = 0; for (int i = 0; i < CHANNEL_RECORD_MAX_HISTORY_SIZE + 1; ++i) { long durationMs = addWatchLog(); totalWatchTimeMs += durationMs; if (i == 0) { firstDurationMs = durationMs; } } // Only latest CHANNEL_RECORD_MAX_HISTORY_SIZE logs are remained. assertEquals(totalWatchTimeMs - firstDurationMs, mChannelRecord.getTotalWatchDurationMs()); } /** * Add new log history to channelRecord which its duration is lower than 1 minute. * * @return New watch log's duration time in milliseconds. */ private long addWatchLog() { // Time hopping with random seconds. mLatestWatchEndTimeMs += TimeUnit.SECONDS.toMillis(mRandom.nextInt(60) + 1); long durationMs = TimeUnit.SECONDS.toMillis(mRandom.nextInt(60) + 1); mChannelRecord.logWatchHistory(new WatchedProgram(null, mLatestWatchEndTimeMs, mLatestWatchEndTimeMs + durationMs)); mLatestWatchEndTimeMs += durationMs; return durationMs; } }
715b8a0362cc8dfd515bedbc8284e8ab17227188
70348320d90284ab78a21f6ec1bb25330ed22331
/app/src/main/java/com/socket/org/join/ws/serv/entity/GzipEntity.java
daf7811d8f079f53d293132e21252ec5b8e1e1b8
[]
no_license
liyimeifeng/AndroidHttpServer
6d30940d1356a25def1ab78927bb0bc65ce2b189
e3012c6380157d0a72f018cce42eb669364ef275
refs/heads/master
2021-01-22T20:13:19.420301
2017-07-12T01:28:58
2017-07-12T01:28:58
85,295,259
7
0
null
null
null
null
UTF-8
Java
false
false
1,900
java
package com.socket.org.join.ws.serv.entity; import com.socket.org.join.ws.Constants; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.zip.GZIPOutputStream; import org.apache.http.Header; import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.message.BasicHeader; /** * 基础Gzip实体 * @author Join */ public abstract class GzipEntity extends AbstractHttpEntity implements Cloneable { /** * @brief 输入流拷贝进输出流 * @warning When outstream is GZIPOutputStream, it will call finish(). But won't close any stream. * @param instream 输入流 * @param outstream * @throws IOException 输出流 */ protected void copy(InputStream instream, OutputStream outstream) throws IOException { byte[] tmp = new byte[Constants.Config.BUFFER_LENGTH]; int l; while ((l = instream.read(tmp)) != -1) { outstream.write(tmp, 0, l); } if (outstream instanceof GZIPOutputStream) { ((GZIPOutputStream) outstream).flush(); //4.4系统把finish方法改为flush,防止stream error异常 } outstream.close(); } @Override public boolean isRepeatable() { return true; } @Override public boolean isStreaming() { return false; } @Override public InputStream getContent() throws IOException { ByteArrayOutputStream buf = new ByteArrayOutputStream(); writeTo(buf); return new ByteArrayInputStream(buf.toByteArray()); } @Override public Header getContentEncoding() { return new BasicHeader("Content-Encoding", "gzip"); } @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
3974270f6b92d03889622d9200be948ca47c4bca
7927db09a08e17761d5531426b358ef2fb274fc2
/src/main/java/org/stsffap/cep/monitoring/events/PowerEvent.java
5c238eb1158fe7256c60e3f94dc85f8db4a17fcc
[ "Apache-2.0" ]
permissive
ChangShuai1013/cep-monitoring
4f09f95a71e686430e0d3fcb217e686240129321
75a90013da088265b53fdacc6ea552d79d04f54e
refs/heads/master
2020-09-23T17:05:26.496073
2019-12-03T06:15:23
2019-12-03T06:15:23
225,545,674
0
0
Apache-2.0
2019-12-03T06:18:22
2019-12-03T06:18:21
null
UTF-8
Java
false
false
1,850
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.stsffap.cep.monitoring.events; public class PowerEvent extends MonitoringEvent { private double voltage; public PowerEvent(int rackID, double voltage) { super(rackID); this.voltage = voltage; } public void setVoltage(double voltage) { this.voltage = voltage; } public double getVoltage() { return voltage; } @Override public boolean equals(Object obj) { if (obj instanceof PowerEvent) { PowerEvent powerEvent = (PowerEvent) obj; return powerEvent.canEquals(this) && super.equals(powerEvent) && voltage == powerEvent.voltage; } else { return false; } } @Override public int hashCode() { return 41 * super.hashCode() + Double.hashCode(voltage); } @Override public boolean canEquals(Object obj) { return obj instanceof PowerEvent; } @Override public String toString() { return "PowerEvent(" + getRackID() + ", " + voltage + ")"; } }
6aeb88733c908535b092de415288bf857279c70b
222c56bda708da134203560d979fb90ba1a9da8d
/uapunit测试框架/engine/src/public/uap/workflow/engine/invocation/ActivityBehaviorInvocation.java
aaafd4184c75fcdd5d8cd4a14567b4651969a05c
[]
no_license
langpf1/uapunit
7575b8a1da2ebed098d67a013c7342599ef10ced
c7f616bede32bdc1c667ea0744825e5b8b6a69da
refs/heads/master
2020-04-15T00:51:38.937211
2013-09-13T04:58:27
2013-09-13T04:58:27
12,448,060
0
1
null
null
null
null
UTF-8
Java
false
false
1,264
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package uap.workflow.engine.invocation; import uap.workflow.engine.core.IActivityInstance; import uap.workflow.engine.pvm.behavior.ActivityBehavior; /** * * @author Daniel Meyer */ public class ActivityBehaviorInvocation extends DelegateInvocation { protected final ActivityBehavior behaviorInstance; protected final IActivityInstance execution; public ActivityBehaviorInvocation(ActivityBehavior behaviorInstance, IActivityInstance execution) { this.behaviorInstance = behaviorInstance; this.execution = execution; } protected void invoke() throws Exception { behaviorInstance.execute(execution); } public Object getTarget() { return behaviorInstance; } }
1dabc83a0a008c907140858ffb1aefd7d68361f8
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/41/org/apache/commons/lang/Validate_isTrue_128.java
eff718e16f55ba534be31876e6cd306cfe66a83b
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,340
java
org apach common lang assist valid argument base line unit junit argument deem invalid illeg argument except illegalargumentexcept thrown pre valid true istru greater valid null notnul surnam surnam pre author href mailto ola berg arkitema ola berg author stephen colebourn author gari gregori author norm dean version valid valid argument throw code illeg argument except illegalargumentexcept code test result code code valid arbitrari express valid primit number custom valid express pre valid true istru greater pre perform reason pass separ paramet append messag string error param express express param messag except messag express code code param append messag error illeg argument except illegalargumentexcept express code code true istru express string messag express illeg argument except illegalargumentexcept messag
4c2a1ce809925017d7cf879c4a3e6403bc64e503
096e862f59cf0d2acf0ce05578f913a148cc653d
/code/apps/Messaging/MmsFolderView/src/com/android/mmsfolderview/data/binding/Binding.java
9f8bca6377f334cea63c8f2c1cbf0e9d9633b586
[]
no_license
Phenix-Collection/Android-6.0-packages
e2ba7f7950c5df258c86032f8fbdff42d2dfc26a
ac1a67c36f90013ac1de82309f84bd215d5fdca9
refs/heads/master
2021-10-10T20:52:24.087442
2017-05-27T05:52:42
2017-05-27T05:52:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,848
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.mmsfolderview.data.binding; import java.util.concurrent.atomic.AtomicLong; public class Binding<T extends BindableData> extends BindingBase<T> { private static AtomicLong sBindingIdx = new AtomicLong(System.currentTimeMillis() * 1000); private String mBindingId; private T mData; private final Object mOwner; private boolean mWasBound; /** * Initialize a binding instance - the owner is typically the containing class */ Binding(final Object owner) { mOwner = owner; } @Override public T getData() { ensureBound(); return mData; } @Override public boolean isBound() { return (mData != null && mData.isBound(mBindingId)); } @Override public boolean isBound(final T data) { return (isBound() && data == mData); } @Override public void ensureBound() { if (!isBound()) { throw new IllegalStateException("not bound; wasBound = " + mWasBound); } } @Override public void ensureBound(final T data) { if (!isBound()) { throw new IllegalStateException("not bound; wasBound = " + mWasBound); } else if (data != mData) { throw new IllegalStateException("not bound to correct data " + data + " vs " + mData); } } @Override public String getBindingId() { return mBindingId; } public void bind(final T data) { // Check both this binding and the data not already bound if (mData != null || data.isBound()) { throw new IllegalStateException("already bound when binding to " + data); } // Generate a unique identifier for this bind call mBindingId = Long.toHexString(sBindingIdx.getAndIncrement()); data.bind(mBindingId); mData = data; mWasBound = true; } public void unbind() { // Check this binding is bound and that data is bound to this binding if (mData == null || !mData.isBound(mBindingId)) { throw new IllegalStateException("not bound when unbind"); } mData.unbind(mBindingId); mData = null; mBindingId = null; } }
11237ecc243592f1de482b6dd8f8a558b642e168
d6a5da3794ef8a79b2cc8e58caf7a9915ef741b4
/src/main/java/agents/org/apache/commons/lang/text/StrLookup.java
fff9e37be6b4e0bfdd4f316e31e547a7e2778c6e
[]
no_license
Shaobo-Xu/ANAC2019
67d70b52217a28129a6c1ccd3d23858e81c64240
6f47514a4b8ee5bc81640692030c6ed976804500
refs/heads/master
2020-05-16T22:26:14.655595
2019-07-28T15:29:49
2019-07-28T15:29:49
183,329,259
2
0
null
null
null
null
UTF-8
Java
false
false
5,758
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 agents.org.apache.commons.lang.text; import java.util.Map; /** * Lookup a String key to a String value. * <p> * This class represents the simplest form of a string to string map. * It has a benefit over a map in that it can create the result on * demand based on the key. * <p> * This class comes complete with various factory methods. * If these do not suffice, you can subclass and implement your own matcher. * <p> * For example, it would be possible to implement a lookup that used the * key as a primary key, and looked up the value on demand from the database * * @author Apache Software Foundation * @since 2.2 * @version $Id: StrLookup.java 905636 2010-02-02 14:03:32Z niallp $ */ public abstract class StrLookup { /** * Lookup that always returns null. */ private static final StrLookup NONE_LOOKUP; /** * Lookup that uses System properties. */ private static final StrLookup SYSTEM_PROPERTIES_LOOKUP; static { NONE_LOOKUP = new MapStrLookup(null); StrLookup lookup = null; try { lookup = new MapStrLookup(System.getProperties()); } catch (SecurityException ex) { lookup = NONE_LOOKUP; } SYSTEM_PROPERTIES_LOOKUP = lookup; } //----------------------------------------------------------------------- /** * Returns a lookup which always returns null. * * @return a lookup that always returns null, not null */ public static StrLookup noneLookup() { return NONE_LOOKUP; } /** * Returns a lookup which uses {@link System#getProperties() System properties} * to lookup the key to value. * <p> * If a security manager blocked access to system properties, then null will * be returned from every lookup. * <p> * If a null key is used, this lookup will throw a NullPointerException. * * @return a lookup using system properties, not null */ public static StrLookup systemPropertiesLookup() { return SYSTEM_PROPERTIES_LOOKUP; } /** * Returns a lookup which looks up values using a map. * <p> * If the map is null, then null will be returned from every lookup. * The map result object is converted to a string using toString(). * * @param map the map of keys to values, may be null * @return a lookup using the map, not null */ public static StrLookup mapLookup(Map map) { return new MapStrLookup(map); } //----------------------------------------------------------------------- /** * Constructor. */ protected StrLookup() { super(); } /** * Looks up a String key to a String value. * <p> * The internal implementation may use any mechanism to return the value. * The simplest implementation is to use a Map. However, virtually any * implementation is possible. * <p> * For example, it would be possible to implement a lookup that used the * key as a primary key, and looked up the value on demand from the database * Or, a numeric based implementation could be created that treats the key * as an integer, increments the value and return the result as a string - * converting 1 to 2, 15 to 16 etc. * <p> * The {@link #lookup(String)} method always returns a String, regardless of * the underlying data, by converting it as necessary. For example: * <pre> * Map map = new HashMap(); * map.put("number", new Integer(2)); * assertEquals("2", StrLookup.mapLookup(map).lookup("number")); * </pre> * @param key the key to be looked up, may be null * @return the matching value, null if no match */ public abstract String lookup(String key); //----------------------------------------------------------------------- /** * Lookup implementation that uses a Map. */ static class MapStrLookup extends StrLookup { /** Map keys are variable names and value. */ private final Map map; /** * Creates a new instance backed by a Map. * * @param map the map of keys to values, may be null */ MapStrLookup(Map map) { this.map = map; } /** * Looks up a String key to a String value using the map. * <p> * If the map is null, then null is returned. * The map result object is converted to a string using toString(). * * @param key the key to be looked up, may be null * @return the matching value, null if no match */ public String lookup(String key) { if (map == null) { return null; } Object obj = map.get(key); if (obj == null) { return null; } return obj.toString(); } } }
4b5079c12a342d9940d17b0377a1c8879a3123e8
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/defpackage/FG1.java
0129c299ae26b6e135871ea21420494a3aaeaf09
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,091
java
package defpackage; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; /* renamed from: FG1 reason: default package */ /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public final class FG1 implements AbstractC2328eG1, IInterface { /* renamed from: a reason: collision with root package name */ public final IBinder f8006a; public final String b = "com.google.android.auth.IAuthManagerService"; public FG1(IBinder iBinder) { this.f8006a = iBinder; } public IBinder asBinder() { return this.f8006a; } public final Parcel c() { Parcel obtain = Parcel.obtain(); obtain.writeInterfaceToken(this.b); return obtain; } public final Parcel d(int i, Parcel parcel) { parcel = Parcel.obtain(); try { this.f8006a.transact(i, parcel, parcel, 0); parcel.readException(); return parcel; } catch (RuntimeException e) { throw e; } finally { parcel.recycle(); } } }
7c5fe0c9ea443b9471db5e453695323bae51e682
b60da22bc192211b3978764e63af23e2e24081f5
/cdc/test/share/gunit/classes/gunit/lister/BaseTestLister.java
d0c540c84028fbf9cc935a1f3cfa43d282970016
[]
no_license
clamp03/JavaAOTC
44d566927c057c013538ab51e086c42c6348554e
0ade633837ed9698cd74a3f6928ebde3d96bd3e3
refs/heads/master
2021-01-01T19:33:51.612033
2014-12-02T14:29:58
2014-12-02T14:29:58
27,435,591
5
4
null
null
null
null
UTF-8
Java
false
false
4,853
java
/* * @(#)BaseTestLister.java 1.5 06/10/10 * * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version * 2 only, as published by the Free Software Foundation. * * 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 version 2 for more details (a copy is * included at /legal/license.txt). * * You should have received a copy of the GNU General Public License * version 2 along with this work; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa * Clara, CA 95054 or visit www.sun.com if you need additional * information or have any questions. */ package gunit.lister ; import java.util.* ; import java.io.* ; import java.lang.reflect.* ; import junit.framework.Test ; import junit.framework.TestCase ; import junit.framework.TestSuite ; import junit.textui.TestRunner ; import gunit.framework.TestFactory ; /** * <code>BaseTestLister</code> is a base class for listing testcases */ public abstract class BaseTestLister { List testcases ; protected PrintStream out ; protected BaseTestLister() { this.testcases = new ArrayList() ; setStream(System.out) ; } protected final void addTestcases(Test test) { if ( test instanceof TestSuite ) { addTestcases((TestSuite)test) ; } else if ( test instanceof TestCase ) { addTestcase((TestCase)test); } else { addTestcases(test.getClass()) ; } } protected final void setStream(PrintStream stream) { this.out = stream ; } void addTestcases(TestSuite suite) { Enumeration e = suite.tests() ; while ( e.hasMoreElements() ) { Test t = (Test) e.nextElement() ; addTestcases(t) ; } } void addTestcase(TestCase testcase) { try { Method method = testcase.getClass().getMethod(testcase.getName(), null) ; if ( isPublicTestMethod(method)) { this.testcases.add(method) ; } } catch ( Exception ex ) { } } void addTestcases(Class cls) { try { Method[] methods = cls.getMethods() ; for ( int i = 0 ; i < methods.length ; i ++ ) { if ( isPublicTestMethod(methods[i])) { this.testcases.add(methods[i]) ; } } } catch (Exception ex) { } } private boolean isPublicTestMethod(Method m) { return isTestMethod(m) && Modifier.isPublic(m.getModifiers()); } private boolean isTestMethod(Method m) { String name= m.getName(); Class[] parameters= m.getParameterTypes(); Class returnType= m.getReturnType(); return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE); } /** * List the testcase methods contained within the lister */ public void list() { Iterator iter = this.testcases.iterator() ; while ( iter.hasNext() ) { listTestCase((Method)iter.next()); } } // --tb | --testbundle <filename> protected void usage() { System.err.println("Usage : java "+ getClass().getName() + " --tb <filename>|<testcaseclass>") ; } /** * Start the lister to list tests specified in args */ protected void start(String args[]) { if ( args.length == 0) { usage() ; return ; } String test_bundle = null ; if ( "--tb".equals(args[0]) || "--testbundle".equals(args[0]) ) { if ( args.length > 1 ) { test_bundle = args[1] ; } else { usage() ; return ; } } Test test = null ; if ( test_bundle != null ) { test = TestFactory.createTest(test_bundle) ; } else { TestRunner runner = new TestRunner() ; test = runner.getTest(args[0]) ; } addTestcases(test) ; list() ; } /** * List the testcase method specified */ public abstract void listTestCase(Method method) ; }
3508c4ed9678dc0997110e4cacbb06aed552ae8e
71f80e192b59f2e11c8e10651e589556a8773e25
/universities/src/ORMclasses/university/CountryORM.java
6ab1487226ff697b051c3931255f973d663376a6
[]
no_license
sxl147/universities
13f853fd6a52cabd1baa0a923f20e43c811035e1
3e3444bf7f727c7ee7b8eb8ba8a05e10d1d9b880
refs/heads/master
2020-06-12T18:03:09.960078
2018-05-28T22:06:32
2018-05-28T22:06:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
939
java
package ORMclasses.university; import java.util.Date; public class CountryORM { private Long Id; private String countryCode; // country_code private String countryName; // country_name private Date evntTmeStmp; // evnt_tmestmp private String evntOperId; // evnt_oper_id public Long getId() { return Id; } public void setId(Long id) { Id = id; } public String getCountryCode() { return countryCode; } public void setCountryCode(String countryCode) { this.countryCode = countryCode; } public String getCountryName() { return countryName; } public void setCountryName(String countryName) { this.countryName = countryName; } public Date getEvntTmeStmp() { return evntTmeStmp; } public void setEvntTmeStmp(Date evntTmeStmp) { this.evntTmeStmp = evntTmeStmp; } public String getEvntOperId() { return evntOperId; } public void setEvntOperId(String evntOperId) { this.evntOperId = evntOperId; } }
d80a3cfc3fe4faa3298d6270b5478b96a079ddc6
939bc9b579671de84fb6b5bd047db57b3d186aca
/java.xml/com/sun/org/apache/xerces/internal/xs/XSValue.java
806fccbdb136bb8877c6dcaff4868c6544db9c23
[]
no_license
lc274534565/jdk11-rm
509702ceacfe54deca4f688b389d836eb5021a17
1658e7d9e173f34313d2e5766f4f7feef67736e8
refs/heads/main
2023-01-24T07:11:16.084577
2020-11-16T14:21:37
2020-11-16T14:21:37
313,315,578
1
1
null
null
null
null
UTF-8
Java
false
false
4,506
java
/* * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.sun.org.apache.xerces.internal.xs; /** * Represents an actual value of a simple type. */ public interface XSValue { /** * The schema normalized value. * @return The normalized value. */ public String getNormalizedValue(); /** * The actual value. <code>null</code> if the value is in error. * @return The actual value. */ public Object getActualValue(); /** * The declared simple type definition used to validate this value. * It can be a union type. * @return The declared simple type definition */ public XSSimpleTypeDefinition getTypeDefinition(); /** * If the declared simple type definition is a union, return the member * type actually used to validate the value. Otherwise null. * @return The member type */ public XSSimpleTypeDefinition getMemberTypeDefinition(); /** * If <code>getTypeDefinition()</code> returns a list type whose item type * is a union type, then this method returns a list with the same length * as the value list, for simple types that actually validated * the corresponding item in the value. * @return A list of type definitions */ public XSObjectList getMemberTypeDefinitions(); /** * The actual value built-in datatype, e.g. * <code>STRING_DT, SHORT_DT</code>. If the type definition of this * value is a list type definition, this method returns * <code>LIST_DT</code>. If the type definition of this value is a list * type definition whose item type is a union type definition, this * method returns <code>LISTOFUNION_DT</code>. To query the actual value * of the list or list of union type definitions use * <code>itemValueTypes()</code>. * @return The actual value type */ public short getActualValueType(); /** * In the case the actual value represents a list, i.e. the * <code>actualNormalizedValueType</code> is <code>LIST_DT</code>, the * returned array consists of one type kind which represents the itemType * . For example: * <pre> &lt;simpleType name="listtype"&gt; &lt;list * itemType="positiveInteger"/&gt; &lt;/simpleType&gt; &lt;element * name="list" type="listtype"/&gt; ... &lt;list&gt;1 2 3&lt;/list&gt; </pre> * * The <code>schemaNormalizedValue</code> value is "1 2 3", the * <code>actualNormalizedValueType</code> value is <code>LIST_DT</code>, * and the <code>itemValueTypes</code> is an array of size 1 with the * value <code>POSITIVEINTEGER_DT</code>. * <br> If the actual value represents a list type definition whose item * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>, * for each actual value in the list the array contains the * corresponding memberType kind. For example: * <pre> &lt;simpleType * name='union_type' memberTypes="integer string"/&gt; &lt;simpleType * name='listOfUnion'&gt; &lt;list itemType='union_type'/&gt; * &lt;/simpleType&gt; &lt;element name="list" type="listOfUnion"/&gt; * ... &lt;list&gt;1 2 foo&lt;/list&gt; </pre> * The * <code>schemaNormalizedValue</code> value is "1 2 foo", the * <code>actualNormalizedValueType</code> is <code>LISTOFUNION_DT</code> * , and the <code>itemValueTypes</code> is an array of size 3 with the * following values: <code>INTEGER_DT, INTEGER_DT, STRING_DT</code>. * @return The list value types */ public ShortList getListValueTypes(); }
20412426b2ad57811168c4f29ee39e956482dcfb
7bc975c929eedca0d2254360360b7f021749ae7f
/src/main/java/com/redxun/bpm/core/dao/ActHiTaskinstDao.java
b0e887b469ccbadeb4eb552ca66bab3a7fcc478c
[]
no_license
liaosheng2018/jsaas-1
7d6e5a10b9bf22e4e6793a4efe3c783fb4afc621
0fd2df00b4680c92500429bd800b1806b816002d
refs/heads/master
2022-03-10T12:22:51.907294
2019-11-29T07:11:11
2019-11-29T07:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
/** * * <pre> * 描述:act_hi_taskinst DAO接口 * 作者:ray * 日期:2019-04-02 09:26:35 * 版权:广州红迅软件 * </pre> */ package com.redxun.bpm.core.dao; import java.util.List; import com.redxun.bpm.core.entity.ActHiTaskinst; import org.springframework.stereotype.Repository; import com.redxun.core.dao.mybatis.BaseMybatisDao; @Repository public class ActHiTaskinstDao extends BaseMybatisDao<ActHiTaskinst> { @Override public String getNamespace() { return ActHiTaskinst.class.getName(); } }
1c90022572b7f6096f909b2ef65d5a8962c5257c
9a031e8d2716aea8ceb51044965111978fdca570
/pa/pa-ejb/src/java/gov/nih/nci/pa/service/TrialDataVerificationServiceRemote.java
48ca87a5df0f6070f12ebcb34db10e426b1dafda
[]
no_license
polavarapup2/CTRP_4x_PA
040423608334115dad9b2c441c2a27daa9716ae2
08b9615840d81cf9d85eae1d7ae7ed6c33883d47
refs/heads/master
2021-01-23T12:32:49.287585
2017-06-02T13:29:26
2017-06-02T13:29:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package gov.nih.nci.pa.service; import javax.ejb.Local; /** * * @author Reshma.Koganti * */ @Local public interface TrialDataVerificationServiceRemote extends TrialDataVerificationServiceLocal { }
636da2ec4361dc3b128ac8b7be5e543d3ce947a9
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/1237_1.java
c96568fb93935123e810fe4cede474dd1bc78a12
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
//,temp,FsDatasetImpl.java,1266,1285,temp,FsDatasetImpl.java,824,846 //,3 public class xxx { private void bumpReplicaGS(ReplicaInfo replicaInfo, long newGS) throws IOException { long oldGS = replicaInfo.getGenerationStamp(); File oldmeta = replicaInfo.getMetaFile(); replicaInfo.setGenerationStamp(newGS); File newmeta = replicaInfo.getMetaFile(); // rename meta file to new GS if (LOG.isDebugEnabled()) { LOG.debug("Renaming " + oldmeta + " to " + newmeta); } try { NativeIO.renameTo(oldmeta, newmeta); } catch (IOException e) { replicaInfo.setGenerationStamp(oldGS); // restore old GS throw new IOException("Block " + replicaInfo + " reopen failed. " + " Unable to move meta file " + oldmeta + " to " + newmeta, e); } } };
811e2d07a9e96b1bc4e12ee65aad0069b5999554
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13377-13-24-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/user/impl/xwiki/XWikiAuthServiceImpl_ESTest_scaffolding.java
b97addcf8b5b00114a4e0af3f29de28d04a09a4d
[]
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
454
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Apr 07 19:29:29 UTC 2020 */ package com.xpn.xwiki.user.impl.xwiki; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWikiAuthServiceImpl_ESTest_scaffolding { // Empty scaffolding for empty test suite }
91cd30f4679f03b0bc82fe6ec25f1b4ab4e38de2
11babced1f48d7a4d9353da64f278b25384d5acd
/CSEIII/CSEIII-Web/src/VO/stockVO/TwentyStockVO.java
3badc354cff36aa7332fc3f08dca801ed8430a32
[]
no_license
Apocalpyse/NJU-SE3
08daf05f9f98569b892fa41cd706f7445eb9baf2
27ae6915830a4087d2eb9350257fb5513c6d8692
refs/heads/master
2020-03-11T02:04:58.892123
2018-04-16T08:43:37
2018-04-16T08:43:37
129,316,413
0
0
null
null
null
null
UTF-8
Java
false
false
1,360
java
package VO.stockVO; import java.util.ArrayList; /** * Created by A on 2017/5/21. */ public class TwentyStockVO { private String start;//开始日期 private String end;//结束日期 private ArrayList<String> name;//股票名字 private ArrayList<String> code;//股票代码 private ArrayList<GoalVO> goal;//股票得分 public TwentyStockVO(){ } public TwentyStockVO(String start, String end, ArrayList<String> name, ArrayList<String> code, ArrayList<GoalVO> goal) { this.start = start; this.end = end; this.name = name; this.code = code; this.goal = goal; } public String getStart() { return start; } public void setStart(String start) { this.start = start; } public String getEnd() { return end; } public void setEnd(String end) { this.end = end; } public ArrayList<String> getName() { return name; } public void setName(ArrayList<String> name) { this.name = name; } public ArrayList<String> getCode() { return code; } public void setCode(ArrayList<String> code) { this.code = code; } public ArrayList<GoalVO> getGoal() { return goal; } public void setGoal(ArrayList<GoalVO> goal) { this.goal = goal; } }
3feffb321855e32c106c0f1122cb0f41ebb39ffb
7559bead0c8a6ad16f016094ea821a62df31348a
/src/com/vmware/vim25/HostExtraNetworksEvent.java
fa9277e8772222ab2f03457c87e64b0ee81cf2be
[]
no_license
ZhaoxuepengS/VsphereTest
09ba2af6f0a02d673feb9579daf14e82b7317c36
59ddb972ce666534bf58d84322d8547ad3493b6e
refs/heads/master
2021-07-21T13:03:32.346381
2017-11-01T12:30:18
2017-11-01T12:30:18
109,128,993
1
1
null
null
null
null
UTF-8
Java
false
false
1,344
java
package com.vmware.vim25; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for HostExtraNetworksEvent complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="HostExtraNetworksEvent"> * &lt;complexContent> * &lt;extension base="{urn:vim25}HostDasEvent"> * &lt;sequence> * &lt;element name="ips" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "HostExtraNetworksEvent", propOrder = { "ips" }) public class HostExtraNetworksEvent extends HostDasEvent { protected String ips; /** * Gets the value of the ips property. * * @return * possible object is * {@link String } * */ public String getIps() { return ips; } /** * Sets the value of the ips property. * * @param value * allowed object is * {@link String } * */ public void setIps(String value) { this.ips = value; } }