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
6041af5071a8169e02d2996ae3604da09cd08b23
ee1fc12feef20f8ebe734911acdd02b1742e417c
/android_sourcecode_crm/app/src/main/java/com/akan/qf/mvp/fragment/qifei/bigAreaAdapter.java
600aba337b2bb950bfdd9cd94bd08bc938167c3c
[ "MIT" ]
permissive
xiaozhangxin/test
aee7aae01478a06741978e7747614956508067ed
aeda4d6958f8bf7af54f87bc70ad33d81545c5b3
refs/heads/master
2021-07-15T21:52:28.171542
2020-03-09T14:30:45
2020-03-09T14:30:45
126,810,840
0
0
null
null
null
null
UTF-8
Java
false
false
3,437
java
package com.akan.qf.mvp.fragment.qifei; import android.content.Context; import android.support.annotation.LayoutRes; import android.support.constraint.ConstraintLayout; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.akan.qf.R; import com.akan.qf.mvp.fragment.qifei.BigAreaBean; import com.jude.easyrecyclerview.adapter.BaseViewHolder; import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter; import java.util.List; /** * Created by admin on 2018/12/3. */ public class bigAreaAdapter extends RecyclerArrayAdapter<BigAreaBean> { public bigAreaAdapter(Context context, List<BigAreaBean> list) { super(context, list); } @Override public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { return new ViewHolder(parent, viewType); } public class ViewHolder extends BaseViewHolder<BigAreaBean> { private TextView tvName, tvNum, tvState; private ConstraintLayout bgView; public ViewHolder(ViewGroup parent, @LayoutRes int res) { super(parent, R.layout.item_area); tvName = $(R.id.one); tvNum = $(R.id.two); tvState = $(R.id.three); bgView = $(R.id.bgView); } @Override public void setData(BigAreaBean data) { super.setData(data); if (0 == getDataPosition()) { bgView.setBackgroundResource(R.drawable.rank_one); tvName.setBackgroundResource(R.drawable.num_one); tvName.setText(""); tvNum.setTextColor(getContext().getResources().getColor(R.color.white)); tvState.setTextColor(getContext().getResources().getColor(R.color.white)); } else if (1 == getDataPosition()) { bgView.setBackgroundResource(R.drawable.rank_two); tvName.setBackgroundResource(R.drawable.num_two); tvName.setText(""); tvNum.setTextColor(getContext().getResources().getColor(R.color.white)); tvState.setTextColor(getContext().getResources().getColor(R.color.white)); } else if (2 == getDataPosition()) { bgView.setBackgroundResource(R.drawable.rank_three); tvName.setBackgroundResource(R.drawable.num_three); tvName.setText(""); tvNum.setTextColor(getContext().getResources().getColor(R.color.white)); tvState.setTextColor(getContext().getResources().getColor(R.color.white)); } else { bgView.setBackground(null); tvName.setText((getDataPosition() + 1) + ""); tvName.setVisibility(View.VISIBLE); tvName.setBackground(null); tvNum.setTextColor(getContext().getResources().getColor(R.color.colorTextG3)); tvState.setTextColor(getContext().getResources().getColor(R.color.colorTextG3)); } tvNum.setText(getArea(data)); tvState.setText(data.getCount()); } } private String getArea(BigAreaBean data){ if (!TextUtils.isEmpty(data.getFullArea())) { return data.getFullArea(); } else if (!TextUtils.isEmpty(data.getGroup_name())) { return data.getGroup_name(); } else { return null; } } }
[ "xiaozhangxin@shifuhelp.com" ]
xiaozhangxin@shifuhelp.com
95a97fd2014e6087e19cce392973c5234899f79e
233e63710e871ef841ff3bc44d3660a0c8f8564d
/trunk/gameserver/src/gameserver/model/team2/group/events/PlayerGroupInvite.java
b4ae5326d9200a5262bb68d6268cac275f071829
[]
no_license
Wankers/Project
733b6a4aa631a18d28a1b5ba914c02eb34a9f4f6
da6db42f127d5970522038971a8bebb76baa595d
refs/heads/master
2016-09-06T10:46:13.768097
2012-08-01T23:19:49
2012-08-01T23:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,105
java
/* * This file is part of Aion Extreme Emulator <aion-core.net>. * * Aion Extreme Emulator is a 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. * * Aion Extreme Emulator 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 Aion Extreme Emulator. If not, see <http://www.gnu.org/licenses/>. */ package gameserver.model.team2.group.events; import gameserver.model.gameobjects.Creature; import gameserver.model.gameobjects.player.Player; import gameserver.model.gameobjects.player.RequestResponseHandler; import gameserver.model.team2.group.PlayerGroup; import gameserver.model.team2.group.PlayerGroupService; import gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE; import gameserver.utils.PacketSendUtility; /** * @author ATracer */ public class PlayerGroupInvite extends RequestResponseHandler { private final Player inviter; private final Player invited; public PlayerGroupInvite(Player inviter, Player invited) { super(inviter); this.inviter = inviter; this.invited = invited; } @Override public void acceptRequest(Creature requester, Player responder) { if (PlayerGroupService.canInvite(inviter, invited)) { PacketSendUtility.sendPacket(inviter, SM_SYSTEM_MESSAGE.STR_PARTY_INVITED_HIM(invited.getName())); PlayerGroup group = inviter.getPlayerGroup2(); if (group != null) { PlayerGroupService.addPlayer(group, invited); } else { PlayerGroupService.createGroup(inviter, invited); } } } @Override public void denyRequest(Creature requester, Player responder) { PacketSendUtility.sendPacket(inviter, SM_SYSTEM_MESSAGE.STR_PARTY_HE_REJECT_INVITATION(responder.getName())); } }
[ "sylvanodu14gmail.com" ]
sylvanodu14gmail.com
637011338247bbfe874958c2627757d3115a4201
aa4acdba351926db6b17ac000a3765ee7534df0c
/pss-simulator/domain-layer/data/report/report-anonymized/src/main/scala/pss/report/anonymized/AnonymizedReportData.java
7ee80fd983513eea8ed561919a134a39759be94f
[]
no_license
nafeezabrar/pss-without-as
7579e28de6024e31bf0bd843ccc6fbe12508e01f
97c821da725ddc6e63612dacb67a7736b2aa4c5c
refs/heads/main
2023-01-07T09:21:58.157210
2020-11-09T14:58:23
2020-11-09T14:58:23
311,345,524
0
0
null
null
null
null
UTF-8
Java
false
false
1,145
java
package pss.report.anonymized; import pss.data.ooi.local.collection.LocalOoiCollection; import pss.report.common.ReportData; public abstract class AnonymizedReportData<TLocalOoiCollection extends LocalOoiCollection> extends ReportData { protected final TLocalOoiCollection ooiIdCollection; protected AnonymizedReportData(TLocalOoiCollection localOoiCollection) { this.ooiIdCollection = localOoiCollection; } public TLocalOoiCollection getLocalOoiCollection() { return ooiIdCollection; } @Override public String toString() { return String.format("AnonymizedReportData{ooiIdCollection=%s}", ooiIdCollection); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AnonymizedReportData<?> that = (AnonymizedReportData<?>) o; return ooiIdCollection != null ? ooiIdCollection.equals(that.ooiIdCollection) : that.ooiIdCollection == null; } @Override public int hashCode() { return ooiIdCollection != null ? ooiIdCollection.hashCode() : 0; } }
[ "ishmumkhan@gmail.com" ]
ishmumkhan@gmail.com
0ecde6bd02008c2dae1ced46d36c94db34c13314
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project195/src/main/java/org/gradle/test/performance/largejavamultiproject/project195/p978/Production19564.java
63837f8e45fc4fcb53cad1e0ee07292ca067948e
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,970
java
package org.gradle.test.performance.largejavamultiproject.project195.p978; public class Production19564 { private Production19561 property0; public Production19561 getProperty0() { return property0; } public void setProperty0(Production19561 value) { property0 = value; } private Production19562 property1; public Production19562 getProperty1() { return property1; } public void setProperty1(Production19562 value) { property1 = value; } private Production19563 property2; public Production19563 getProperty2() { return property2; } public void setProperty2(Production19563 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
b0e0b459e56f73bdb8ea8a196c60959578128db6
60eab9b092bb9d5a50b807f45cbe310774d0e456
/dataset/cm5/src/test/org/apache/commons/math/ode/nonstiff/MidpointIntegratorTest.java
0ecdabb73361bbf492b750c3502b9572b330e0a7
[ "Apache-2.0", "BSD-3-Clause", "Minpack" ]
permissive
SpoonLabs/nopol-experiments
7b691c39b09e68c3c310bffee713aae608db61bc
2cf383cb84a00df568a6e41fc1ab01680a4a9cc6
refs/heads/master
2022-02-13T19:44:43.869060
2022-01-22T22:06:28
2022-01-22T22:14:45
56,683,489
6
1
null
2019-03-05T11:02:20
2016-04-20T12:05:51
Java
UTF-8
Java
false
false
6,875
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math.ode.nonstiff; import junit.framework.*; import org.apache.commons.math.ode.DerivativeException; import org.apache.commons.math.ode.FirstOrderDifferentialEquations; import org.apache.commons.math.ode.FirstOrderIntegrator; import org.apache.commons.math.ode.IntegratorException; import org.apache.commons.math.ode.events.EventHandler; import org.apache.commons.math.ode.nonstiff.MidpointIntegrator; import org.apache.commons.math.ode.sampling.StepHandler; import org.apache.commons.math.ode.sampling.StepInterpolator; public class MidpointIntegratorTest extends TestCase { public MidpointIntegratorTest(String name) { super(name); } public void testDimensionCheck() { try { TestProblem1 pb = new TestProblem1(); new MidpointIntegrator(0.01).integrate(pb, 0.0, new double[pb.getDimension()+10], 1.0, new double[pb.getDimension()+10]); fail("an exception should have been thrown"); } catch(DerivativeException de) { fail("wrong exception caught"); } catch(IntegratorException ie) { } } public void testDecreasingSteps() throws DerivativeException, IntegratorException { TestProblemAbstract[] problems = TestProblemFactory.getProblems(); for (int k = 0; k < problems.length; ++k) { double previousError = Double.NaN; for (int i = 4; i < 10; ++i) { TestProblemAbstract pb = (TestProblemAbstract) problems[k].clone(); double step = (pb.getFinalTime() - pb.getInitialTime()) * Math.pow(2.0, -i); FirstOrderIntegrator integ = new MidpointIntegrator(step); TestProblemHandler handler = new TestProblemHandler(pb, integ); integ.addStepHandler(handler); EventHandler[] functions = pb.getEventsHandlers(); for (int l = 0; l < functions.length; ++l) { integ.addEventHandler(functions[l], Double.POSITIVE_INFINITY, 1.0e-6 * step, 1000); } double stopTime = integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); if (functions.length == 0) { assertEquals(pb.getFinalTime(), stopTime, 1.0e-10); } double error = handler.getMaximalValueError(); if (i > 4) { assertTrue(error < Math.abs(previousError)); } previousError = error; assertEquals(0, handler.getMaximalTimeError(), 1.0e-12); } } } public void testSmallStep() throws DerivativeException, IntegratorException { TestProblem1 pb = new TestProblem1(); double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001; FirstOrderIntegrator integ = new MidpointIntegrator(step); TestProblemHandler handler = new TestProblemHandler(pb, integ); integ.addStepHandler(handler); integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); assertTrue(handler.getLastError() < 2.0e-7); assertTrue(handler.getMaximalValueError() < 1.0e-6); assertEquals(0, handler.getMaximalTimeError(), 1.0e-12); assertEquals("midpoint", integ.getName()); } public void testBigStep() throws DerivativeException, IntegratorException { TestProblem1 pb = new TestProblem1(); double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.2; FirstOrderIntegrator integ = new MidpointIntegrator(step); TestProblemHandler handler = new TestProblemHandler(pb, integ); integ.addStepHandler(handler); integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); assertTrue(handler.getLastError() > 0.01); assertTrue(handler.getMaximalValueError() > 0.05); assertEquals(0, handler.getMaximalTimeError(), 1.0e-12); } public void testBackward() throws DerivativeException, IntegratorException { TestProblem5 pb = new TestProblem5(); double step = Math.abs(pb.getFinalTime() - pb.getInitialTime()) * 0.001; FirstOrderIntegrator integ = new MidpointIntegrator(step); TestProblemHandler handler = new TestProblemHandler(pb, integ); integ.addStepHandler(handler); integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(), pb.getFinalTime(), new double[pb.getDimension()]); assertTrue(handler.getLastError() < 6.0e-4); assertTrue(handler.getMaximalValueError() < 6.0e-4); assertEquals(0, handler.getMaximalTimeError(), 1.0e-12); assertEquals("midpoint", integ.getName()); } public void testStepSize() throws DerivativeException, IntegratorException { final double step = 1.23456; FirstOrderIntegrator integ = new MidpointIntegrator(step); integ.addStepHandler(new StepHandler() { private static final long serialVersionUID = 0L; public void handleStep(StepInterpolator interpolator, boolean isLast) { if (! isLast) { assertEquals(step, interpolator.getCurrentTime() - interpolator.getPreviousTime(), 1.0e-12); } } public boolean requiresDenseOutput() { return false; } public void reset() { } }); integ.integrate(new FirstOrderDifferentialEquations() { private static final long serialVersionUID = 0L; public void computeDerivatives(double t, double[] y, double[] dot) { dot[0] = 1.0; } public int getDimension() { return 1; } }, 0.0, new double[] { 0.0 }, 5.0, new double[1]); } public static Test suite() { return new TestSuite(MidpointIntegratorTest.class); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
48b2124cc64552cfdb40171f5ebe8241d4149704
36dcc8cc3b4fdf2a29d55171282629663824f6be
/src/main/java/featureSelection/repository/support/calculation/inConsistency/xieDynamicIncompleteDSReduction/InConsistencyCalculation4DIDSROriginal.java
57173bfd901c093aaeef92b47346f8a1f318a1e9
[]
no_license
wuzhixiang123/featureSelectionRepository
27862b75b7bbca892902e3406193590b73ad7a53
0b74ac3ce836e647dd41b163c4c2510b1d840151
refs/heads/main
2023-08-09T10:45:28.774558
2021-09-14T16:24:24
2021-09-14T16:24:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
819
java
package featureSelection.repository.support.calculation.inConsistency.xieDynamicIncompleteDSReduction; import featureSelection.repository.support.calculation.alg.xieDynamicIncrementalDSReduction.FeatureImportance4XieDynamicIncompleteDSReductionOriginal; /** * An implementation for Inconsistency Degree calculation for Xie's Dynamic Incomplete Decision System * Reduction(DIDSR) bases on the paper * <a href="https://linkinghub.elsevier.com/retrieve/pii/S0888613X17302918">"A novel incremental * attribute reduction approach for dynamic incomplete decision systems"</a> by Xiaojun Xie, Xiaolin Qin. * * @author Benjamin_L */ public class InConsistencyCalculation4DIDSROriginal extends InConsistencyCalculation4DIDSRDefault implements FeatureImportance4XieDynamicIncompleteDSReductionOriginal<Integer> { }
[ "jm001996@163.com" ]
jm001996@163.com
49d31fcabd9d39b3e9997e9cd1c10cb670c907e7
09bcc817a0b25d49de18adb9eb68690fa17d70ce
/bitcamp-web-project/src/main/java/com/eomcs/web/ex04/Servlet08.java
42607a307ca9dcc17dac91fb394dab485ec88511
[]
no_license
2seunghyuck/bitcamp-workspace
4a84b1a329e57a9fe545fd32415a463ac9ad2c9f
c7b6844e7350d844e59f169a6681fdc83fb8e1c7
refs/heads/master
2023-07-08T07:02:55.531157
2021-08-05T20:37:50
2021-08-05T20:37:50
279,742,762
0
1
null
null
null
null
UTF-8
Java
false
false
4,341
java
// 썸네일 이미지 만들기 package com.eomcs.web.ex04; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.UUID; import javax.servlet.GenericServlet; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Part; import net.coobird.thumbnailator.ThumbnailParameter; import net.coobird.thumbnailator.Thumbnails; import net.coobird.thumbnailator.Thumbnails.Builder; import net.coobird.thumbnailator.geometry.Positions; import net.coobird.thumbnailator.name.Rename; @MultipartConfig(maxFileSize = 1024 * 1024 * 10) @WebServlet("/ex04/s8") public class Servlet08 extends GenericServlet { private static final long serialVersionUID = 1L; private String uploadDir; @Override public void init() throws ServletException { this.uploadDir = this.getServletContext().getRealPath("/upload"); } @Override public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { // 테스트 // - http://localhost:8080/java-web/ex04/test08.html 실행 // req.setCharacterEncoding("UTF-8"); HttpServletRequest httpReq = (HttpServletRequest) req; res.setContentType("text/html;charset=UTF-8"); PrintWriter out = res.getWriter(); out.println("<html>"); out.println("<head><title>servlet04</title></head>"); out.println("<body><h1>파일 업로드 결과</h1>"); // 일반 폼 데이터를 원래 하던 방식대로 값을 꺼낸다. out.printf("이름=%s<br>\n", httpReq.getParameter("name")); out.printf("나이=%s<br>\n", httpReq.getParameter("age")); // 파일 데이터는 getPart()를 이용한다. Part photoPart = httpReq.getPart("photo"); String filename = ""; if (photoPart.getSize() > 0) { // 파일을 선택해서 업로드 했다면, filename = UUID.randomUUID().toString(); photoPart.write(this.uploadDir + "/" + filename); } // 원본 사진을 가지고 특정 크기의 썸네일 이미지를 만들기 // 1) 썸네일 이미지를 생성해주는 자바 라이브러리 추가 // => mvnrepository.com에서 thumbnailator 라이브러리 검색 // => build.gradle 에 추가 // => '$ gradle eclipse' 실행 // => eclise IDE에서 프로젝트 리프래시 // 2) 썸네일 이미지 만들기 // => 원본 이미지 파일이 저장된 경로를 알려주고 // 어떤 썸네일 이미지를 만들어야 하는지 설정한다. // Thumbnails.of(this.uploadDir + "/" + filename) // .size(20, 20) // .outputFormat("jpg") // .toFiles(Rename.PREFIX_DOT_THUMBNAIL); Builder<File> thumbnailBuilder = Thumbnails.of(this.uploadDir + "/" + filename); thumbnailBuilder.size(20, 20); thumbnailBuilder.crop(Positions.CENTER); thumbnailBuilder.outputFormat("jpg"); thumbnailBuilder.toFiles(new Rename() { @Override public String apply(String name, ThumbnailParameter param) { return name + "_20x20"; } }); Thumbnails.of(this.uploadDir + "/" + filename) .size(80, 80) .outputFormat("jpg") .crop(Positions.CENTER) //.toFiles(Rename.PREFIX_DOT_THUMBNAIL); .toFiles(new Rename() { @Override public String apply(String name, ThumbnailParameter param) { return name + "_80x80"; } }); Thumbnails.of(this.uploadDir + "/" + filename) .size(160, 160) .outputFormat("jpg") .crop(Positions.CENTER) //.toFiles(Rename.PREFIX_DOT_THUMBNAIL); .toFiles(new Rename() { @Override public String apply(String name, ThumbnailParameter param) { return name + "_160x160"; } }); out.printf("사진=%s<br>\n", filename); out.printf("<img src='../upload/%s_20x20.jpg'><br>\n", filename); out.printf("<img src='../upload/%s_80x80.jpg'><br>\n", filename); out.printf("<img src='../upload/%s' height='80'><br>\n", filename); out.printf("<img src='../upload/%s_160x160.jpg'><br>\n", filename); out.printf("<img src='../upload/%s'><br>\n", filename); out.println("</body></html>"); } }
[ "rotid1818@gmail.com" ]
rotid1818@gmail.com
60137bec20f7cb7cb00ab39d01805e53b7cb6a7e
d34e4e7e6e1cd6ffce89a7f658efac9fbe879d85
/5-quarkus-workshop-superheroes/super-heroes/rest-hero/src/main/java/io/quarkus/workshop/superheroes/hero/Hero.java
160479e5df34a534de131ac5b297bfd132e61840
[]
no_license
nagcloudlab/quarkus-batch7
619e0c6c6989bb13c8d5db9c2dade713412bbb04
e57eca9e256922488d930671d64d798e9bbc34eb
refs/heads/main
2023-01-14T12:34:11.769808
2020-11-16T11:35:06
2020-11-16T11:35:06
311,313,335
0
4
null
2020-11-11T09:59:46
2020-11-09T11:13:15
Java
UTF-8
Java
false
false
1,219
java
package io.quarkus.workshop.superheroes.hero; import java.util.Random; import javax.persistence.Column; import javax.persistence.Entity; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import io.quarkus.hibernate.orm.panache.PanacheEntity; @Entity public class Hero extends PanacheEntity { @NotNull @Size(min = 3, max = 50) public String name; public String otherName; @NotNull @Min(1) public int level; public String picture; @Column(columnDefinition = "TEXT") public String powers; public static Hero findRandom() { long count = Hero.count(); // select count(*) from hero; Random random = new Random(); int randomIndex = random.nextInt((int) count); return Hero.findAll().page(randomIndex, 1).firstResult(); } @Override public String toString() { return "Hero{" + "id=" + id + ", name='" + name + '\'' + ", otherName='" + otherName + '\'' + ", level=" + level + ", picture='" + picture + '\'' + ", powers='" + powers + '\'' + '}'; } }
[ "nagabhushanamn@gmail.com" ]
nagabhushanamn@gmail.com
dbf0a25a8741110e82707589dedde932473a69d1
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_98/Testnull_9797.java
6644cc84b9b4aa545d259cb8bfc54b0dceae82ef
[]
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
304
java
package org.gradle.test.performancenull_98; import static org.junit.Assert.*; public class Testnull_9797 { private final Productionnull_9797 production = new Productionnull_9797("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
ae1a78f242549670b2b60c19f09a74d37ad4b0da
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_588b989aa62b219ab2ae71f254fff94d75ec7afd/TimeSeriesRendrerTest/24_588b989aa62b219ab2ae71f254fff94d75ec7afd_TimeSeriesRendrerTest_t.java
329685d53daf1e16f67bcb68f04c70b3dee3f56c
[]
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
1,113
java
package no.yr.svg; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.nio.CharBuffer; import junit.framework.TestCase; import no.yr.xml.parser.Weatherdata; import org.jdom.output.XMLOutputter; public class TimeSeriesRendrerTest extends TestCase { public void testTimeSeriesRenderer() throws Exception { FileReader reader; reader = new FileReader("yrexample.xml"); int bufferSize = 900000; char[] buf = new char[bufferSize]; int sizeRead = reader.read(buf); if(sizeRead == bufferSize) { throw new Exception("To small a buffer to read the entire xml."); } String xml = new String(buf); xml = xml.trim(); Weatherdata data = new Weatherdata(xml); TimeSeriesRendrer renderer = new TimeSeriesRendrer(data.getTimeSeriesForHours(24)); XMLOutputter out = new XMLOutputter(); File newFile = new File("timeseries.svg"); FileWriter file = new FileWriter(newFile); out.output(renderer.getSvg(), file); System.out.flush(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f7b1ebb22bda63d28ca650299d1e7785c9b76f34
0689f3b456ddce965659abcd4d2de68903de59a1
/src/main/java/com/example/jooq/demo_jooq/introduction/db/pg_catalog/routines/PgCurrentLogfile2.java
03627d4f599be1fb25023022370ffd122aa3576e
[]
no_license
vic0692/demo_spring_jooq
c92d2d188bbbb4aa851adab5cc301d1051c2f209
a5c1fd1cb915f313f40e6f4404fdc894fffc8e70
refs/heads/master
2022-09-18T09:38:30.362573
2020-01-23T17:09:40
2020-01-23T17:09:40
220,638,715
0
0
null
2022-09-08T01:04:47
2019-11-09T12:25:46
Java
UTF-8
Java
false
true
1,820
java
/* * This file is generated by jOOQ. */ package com.example.jooq.demo_jooq.introduction.db.pg_catalog.routines; import com.example.jooq.demo_jooq.introduction.db.pg_catalog.PgCatalog; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.impl.AbstractRoutine; import org.jooq.impl.Internal; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.12.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class PgCurrentLogfile2 extends AbstractRoutine<String> { private static final long serialVersionUID = -1614379793; /** * The parameter <code>pg_catalog.pg_current_logfile.RETURN_VALUE</code>. */ public static final Parameter<String> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.CLOB, false, false); /** * The parameter <code>pg_catalog.pg_current_logfile._1</code>. */ public static final Parameter<String> _1 = Internal.createParameter("_1", org.jooq.impl.SQLDataType.CLOB, false, true); /** * Create a new routine call instance */ public PgCurrentLogfile2() { super("pg_current_logfile", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.CLOB); setReturnParameter(RETURN_VALUE); addInParameter(_1); setOverloaded(true); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(String value) { setValue(_1, value); } /** * Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__1(Field<String> field) { setField(_1, field); } }
[ "vic0692@gmail.com" ]
vic0692@gmail.com
6b01a9b0f2a25e7c991321ba0e7c7ce1f96a840c
8b96417ea286f9b2d3ec7d448e1a31c0ba8d57cb
/samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/shared/ConfirmRemoveMediaListener.java
9f33715c37ed0731783e96f6335d24990d6394ea
[ "ECL-2.0" ]
permissive
deemsys/Deemsys_Learnguild
d5b11c5d1ad514888f14369b9947582836749883
606efcb2cdc2bc6093f914f78befc65ab79d32be
refs/heads/master
2021-01-15T16:16:12.036004
2013-08-13T12:13:45
2013-08-13T12:13:45
12,083,202
0
1
null
null
null
null
UTF-8
Java
false
false
2,831
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/sam/tags/samigo-2.9.2/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/shared/ConfirmRemoveMediaListener.java $ * $Id: ConfirmRemoveMediaListener.java 59684 2009-04-03 23:33:27Z arwhyte@umich.edu $ *********************************************************************************** * * Copyright (c) 2004, 2005, 2006, 2008 The Sakai Foundation * * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.tool.assessment.ui.listener.shared; import javax.faces.context.FacesContext; import javax.faces.event.AbortProcessingException; import javax.faces.event.ActionEvent; import javax.faces.event.ActionListener; import org.sakaiproject.tool.assessment.ui.bean.shared.MediaBean; import org.sakaiproject.tool.assessment.ui.listener.util.ContextUtil; /** * <p>Title: Samigo</p> * <p>Description: Sakai Assessment Manager</p> * @author Ed Smiley * @version $Id: ConfirmRemoveMediaListener.java 59684 2009-04-03 23:33:27Z arwhyte@umich.edu $ */ public class ConfirmRemoveMediaListener implements ActionListener { //private static Log log = LogFactory.getLog(ConfirmRemoveMediaListener.class); public ConfirmRemoveMediaListener() { } public void processAction(ActionEvent ae) throws AbortProcessingException { String mediaId = (String) FacesContext.getCurrentInstance(). getExternalContext().getRequestParameterMap().get("mediaId"); String mediaUrl = (String) FacesContext.getCurrentInstance(). getExternalContext().getRequestParameterMap().get("mediaUrl"); String mediaFilename = (String) FacesContext.getCurrentInstance(). getExternalContext().getRequestParameterMap().get("mediaFilename"); String itemGradingId = (String) FacesContext.getCurrentInstance(). getExternalContext().getRequestParameterMap().get("itemGradingId"); MediaBean mediaBean = (MediaBean) ContextUtil.lookupBean( "mediaBean"); mediaBean.setMediaId(mediaId); mediaBean.setMediaUrl(mediaUrl); mediaBean.setFilename(mediaFilename); mediaBean.setItemGradingId(Long.valueOf(itemGradingId)); } }
[ "sangee1229@gmail.com" ]
sangee1229@gmail.com
202c68fe5495573f18ff1daf802438324cb62c98
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/91/1184.java
4d2dca2b98f12e8475612d9b079b4c49b2947704
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
478
java
package <missing>; public class GlobalMembers { public static int Main() { String s = new String(new char[999]); int i; int n; int t; int tt; int ttt; s = new Scanner(System.in).nextLine(); n = s.length(); for (i = 1;i <= n;i++) { if (i < n) { t = s.charAt(i - 1); tt = s.charAt(i); ttt = t + tt; System.out.printf("%c",ttt); } if (i == n) { t = s.charAt(i - 1); tt = s.charAt(0); ttt = t + tt; System.out.printf("%c",ttt); } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
41ba7511312f18b3d99ea78fe7aab778edbf090a
f009dc33f9624aac592cb66c71a461270f932ffa
/src/main/java/com/alipay/api/response/AntMerchantExpandContractFacetofaceQueryResponse.java
5fdc98850329200b875774ee56fda99430138ae0
[ "Apache-2.0" ]
permissive
1093445609/alipay-sdk-java-all
d685f635af9ac587bb8288def54d94e399412542
6bb77665389ba27f47d71cb7fa747109fe713f04
refs/heads/master
2021-04-02T16:49:18.593902
2020-03-06T03:04:53
2020-03-06T03:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,931
java
package com.alipay.api.response; import java.util.Date; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: ant.merchant.expand.contract.facetoface.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AntMerchantExpandContractFacetofaceQueryResponse extends AlipayResponse { private static final long serialVersionUID = 1353372855326891883L; /** * 订单创建时间 */ @ApiField("gmt_create") private Date gmtCreate; /** * 产品签约审核结果,申请单状态为审核失败时失败原因用“;”分割,其他状态产品签约审核结果为空 */ @ApiField("order_detail") private String orderDetail; /** * 支付宝端商户入驻申请单据号 */ @ApiField("order_no") private String orderNo; /** * 支付宝商户入驻申请单状态,申请单状态包括:暂存、审核中、审核成功、审核失败 */ @ApiField("order_status") private String orderStatus; /** * 由开发者创建的外部入驻申请单据号 */ @ApiField("out_biz_no") private String outBizNo; public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; } public Date getGmtCreate( ) { return this.gmtCreate; } public void setOrderDetail(String orderDetail) { this.orderDetail = orderDetail; } public String getOrderDetail( ) { return this.orderDetail; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public String getOrderNo( ) { return this.orderNo; } public void setOrderStatus(String orderStatus) { this.orderStatus = orderStatus; } public String getOrderStatus( ) { return this.orderStatus; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public String getOutBizNo( ) { return this.outBizNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
d11cfba91a91afe06d9b787155166cf4899d314b
a565137c1de4669226ad057cd336618fdf2481d4
/src/test/java/com/moon/core/util/CPUUtilTestTest.java
75b99dce4f94e1720e93f6d5903baf60daa1957e
[ "MIT" ]
permissive
moon-util/moon-util
ec58aefa46c526ae11b1a55a946c1763ecb9c693
28c5cb418861da4d0a5a035a3de919b86b939c0e
refs/heads/master
2022-12-25T23:01:28.564115
2020-12-17T15:55:52
2020-12-17T15:55:52
184,226,062
8
1
MIT
2022-12-16T15:29:24
2019-04-30T08:46:31
Java
UTF-8
Java
false
false
349
java
package com.moon.core.util; import org.junit.jupiter.api.Test; /** * @author moonsky */ class CPUUtilTestTest { @Test void testCountOfProcessors() { } static int total = 1542; static int[] nums = {51, 53, 54, 54, 60, 63, 64, 70, 78, 78, 84, 86, 86, 87, 88, 95, 96, 97, 99, 99,}; @Test void testCompute() { } }
[ "xua744531854@163.com" ]
xua744531854@163.com
cc8b3586e3b5758307e87ab739aec4278e20391f
4141ce5f26b426087d9d5fc6914254a3505d4706
/src/test/java/org/springframework/data/gemfire/config/xml/GatewayReceiverAutoStartNamespaceTest.java
1be08711c7301f0078631b4d4142f24d4f179f0a
[ "LicenseRef-scancode-generic-cla" ]
no_license
saleti7/spring-data-gemfire
8fc73fed790307799ae4fdc6a71e6daad05d3674
a5b182471ab6e8d15fc2b9caa490cb78aaafa2c9
refs/heads/master
2021-03-27T09:47:38.062169
2017-12-17T02:23:29
2017-12-18T01:22:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,354
java
/* * Copyright 2010-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.gemfire.config.xml; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import javax.annotation.Resource; import org.apache.geode.cache.wan.GatewayReceiver; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer; import org.springframework.data.gemfire.wan.GatewayReceiverFactoryBean; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.StringUtils; /** * The GatewayReceiverAutoStartNamespaceTest class is a test suite of test cases testing the contract * and functionality of Gateway Receiver configuration in Spring Data GemFire using the XML namespace (XSD). * This test class tests the auto start configuration of the GatewayReceiver Gemfire Component in SDG. * * @author John Blum * @see org.junit.Test * @see org.junit.runner.RunWith * @see org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer * @see org.springframework.data.gemfire.wan.GatewayReceiverFactoryBean * @see org.springframework.test.context.ActiveProfiles * @see org.springframework.test.context.ContextConfiguration * @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner * @see org.apache.geode.cache.wan.GatewayReceiver * @since 1.5.0 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(value = "GatewayReceiverNamespaceTest-context.xml", initializers = GemfireTestApplicationContextInitializer.class) @ActiveProfiles("autoStart") @SuppressWarnings("unused") public class GatewayReceiverAutoStartNamespaceTest { @Resource(name = "&Auto") private GatewayReceiverFactoryBean autoGatewayReceiverFactory; @Test public void testAuto() throws Exception { assertNotNull("The 'Auto' GatewayReceiverFactoryBean was not properly configured and initialized!", autoGatewayReceiverFactory); GatewayReceiver autoGatewayReceiver = autoGatewayReceiverFactory.getObject(); try { assertNotNull(autoGatewayReceiver); assertTrue(StringUtils.isEmpty(autoGatewayReceiver.getBindAddress())); assertEquals("neo", autoGatewayReceiver.getHost()); assertEquals(15500, autoGatewayReceiver.getStartPort()); assertEquals(25500, autoGatewayReceiver.getEndPort()); assertEquals(10000, autoGatewayReceiver.getMaximumTimeBetweenPings()); assertTrue(autoGatewayReceiver.isRunning()); assertEquals(16384, autoGatewayReceiver.getSocketBufferSize()); } finally { autoGatewayReceiver.stop(); } } }
[ "jblum@pivotal.io" ]
jblum@pivotal.io
439405a2475a4cbd097523258210cfe70c1438ae
bbe10639bb9c8f32422122c993530959534560e1
/delivery/app-release_source_from_JADX/com/google/android/gms/internal/zzqf.java
33aafd42600b1035d5a8b68bb438bbe2a0327188
[ "Apache-2.0" ]
permissive
ANDROFAST/delivery_articulos
dae74482e41b459963186b6e7e3d6553999c5706
ddcc8b06d7ea2895ccda2e13c179c658703fec96
refs/heads/master
2020-04-07T15:13:18.470392
2018-11-21T02:15:19
2018-11-21T02:15:19
158,476,390
0
0
null
null
null
null
UTF-8
Java
false
false
2,905
java
package com.google.android.gms.internal; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; public interface zzqf extends IInterface { public static abstract class zza extends Binder implements zzqf { private static class zza implements zzqf { private IBinder zzoo; zza(IBinder iBinder) { this.zzoo = iBinder; } public IBinder asBinder() { return this.zzoo; } public void zzh(int i, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.identity.intents.internal.IAddressCallbacks"); obtain.writeInt(i); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.zzoo.transact(2, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } } public zza() { attachInterface(this, "com.google.android.gms.identity.intents.internal.IAddressCallbacks"); } public static zzqf zzcb(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.identity.intents.internal.IAddressCallbacks"); return (queryLocalInterface == null || !(queryLocalInterface instanceof zzqf)) ? new zza(iBinder) : (zzqf) queryLocalInterface; } public IBinder asBinder() { return this; } public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case 2: data.enforceInterface("com.google.android.gms.identity.intents.internal.IAddressCallbacks"); zzh(data.readInt(), data.readInt() != 0 ? (Bundle) Bundle.CREATOR.createFromParcel(data) : null); reply.writeNoException(); return true; case 1598968902: reply.writeString("com.google.android.gms.identity.intents.internal.IAddressCallbacks"); return true; default: return super.onTransact(code, data, reply, flags); } } } void zzh(int i, Bundle bundle) throws RemoteException; }
[ "cespedessanchezalex@gmail.com" ]
cespedessanchezalex@gmail.com
e20717e371fdb33127b0f18a124aa9e962dd48e6
b0a731bb7fec0e3ee41f1b716955ecdcb2b6ef5c
/Milkomeda/src/main/java/com/github/yizzuide/milkomeda/halo/HaloListener.java
eea066143c8194868033d1e6a4ea50029416bb5f
[ "MIT" ]
permissive
newschen/Milkomeda
d539480d98cb1734f904dc7e3e4ab81542626849
90b700585c1958902ccaafee539a6cefb3e5e07a
refs/heads/master
2023-01-02T11:10:18.160458
2020-10-22T03:03:22
2020-10-22T03:10:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,106
java
package com.github.yizzuide.milkomeda.halo; import org.springframework.core.annotation.AliasFor; import java.lang.annotation.*; /** * HaloListener * 持久化事件监听器 * <pre> * 注入参数如下: * - Object param * 该参数类型根据Mapper方法的参数决定,如果是一个参数,则为实体或简单数据类型;如果是多个参数,则为Map。 * - Object result * Mapper方法返回值。 * - SqlCommandType commandType * 该SQL的操作类型:INSERT、UPDATE、DELETE、SELECT。 * </pre> * * @author yizzuide * @since 2.5.0 * @version 3.11.4 * Create at 2020/01/30 22:36 */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) public @interface HaloListener { /** * 监听的表名 * @return String */ @AliasFor("tableName") String value() default "*"; /** * 监听的表名 * @return String */ @AliasFor("value") String tableName() default "*"; /** * 监听类型 * @return 默认为后置监听 */ HaloType type() default HaloType.POST; }
[ "fu837014586@163.com" ]
fu837014586@163.com
9690a2200cb4581da2f2c1944c4b7d879753be8d
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
/src/main/java/com/alipay/api/response/AntMerchantExpandTradeorderQueryResponse.java
dd4ddd5755a1e5db1eca6f258cf63cca53153f1f
[ "Apache-2.0" ]
permissive
zhangpo/alipay-sdk-java-all
13f79e34d5f030ac2f4367a93e879e0e60f335f7
e69305d18fce0cc01d03ca52389f461527b25865
refs/heads/master
2022-11-04T20:47:21.777559
2020-06-15T08:31:02
2020-06-15T08:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,138
java
package com.alipay.api.response; import java.util.Date; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.ItemOrderOpenData; import com.alipay.api.AlipayResponse; /** * ALIPAY API: ant.merchant.expand.tradeorder.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AntMerchantExpandTradeorderQueryResponse extends AlipayResponse { private static final long serialVersionUID = 2433428591443385587L; /** * 订单金额;单位:分 */ @ApiField("amount") private Long amount; /** * 业务序列号 */ @ApiField("biz_seq") private String bizSeq; /** * 买家ID */ @ApiField("buyer_id") private String buyerId; /** * 订单扩展信息 */ @ApiField("ext_info") private String extInfo; /** * 订单创建时间 */ @ApiField("gmt_create") private Date gmtCreate; /** * 订单修改时间 */ @ApiField("gmt_modified") private Date gmtModified; /** * 支付时间 */ @ApiField("gmt_paid") private Date gmtPaid; /** * 商品订单列表 */ @ApiListField("item_orders") @ApiField("item_order_open_data") private List<ItemOrderOpenData> itemOrders; /** * 订单物流状态 */ @ApiField("logistics_status") private String logisticsStatus; /** * 订单描述 */ @ApiField("memo") private String memo; /** * 商家补贴金额;单位:分 */ @ApiField("merchant_subsidy_amount") private Long merchantSubsidyAmount; /** * 订单ID */ @ApiField("order_id") private String orderId; /** * 外部订单号 */ @ApiField("out_biz_no") private String outBizNo; /** * 外部业务类型;TO_SHOP(到店)、GAS(加油) */ @ApiField("out_biz_type") private String outBizType; /** * 平台商ID */ @ApiField("partner_id") private String partnerId; /** * 平台补贴金额;单位:分 */ @ApiField("partner_subsidy_amount") private Long partnerSubsidyAmount; /** * 订单实际支付金额;单位:分 */ @ApiField("real_amount") private Long realAmount; /** * 卖家ID */ @ApiField("seller_id") private String sellerId; /** * 门店ID */ @ApiField("shop_id") private String shopId; /** * 订单状态;INIT(初始化)、WAIT_PAY(待支付)、PAID(已支付)、TIMEOUT_CLOSED(超时关闭)、SUCCESS_FINISHED(订单成功完结)、REFUNDED(已退款) */ @ApiField("status") private String status; /** * 交易号 */ @ApiField("trade_no") private String tradeNo; /** * 业务类型;GAS_SERVICE(加油业务),SHOP_SERVICE(到店业务) */ @ApiField("type") private String type; public void setAmount(Long amount) { this.amount = amount; } public Long getAmount( ) { return this.amount; } public void setBizSeq(String bizSeq) { this.bizSeq = bizSeq; } public String getBizSeq( ) { return this.bizSeq; } public void setBuyerId(String buyerId) { this.buyerId = buyerId; } public String getBuyerId( ) { return this.buyerId; } public void setExtInfo(String extInfo) { this.extInfo = extInfo; } public String getExtInfo( ) { return this.extInfo; } public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; } public Date getGmtCreate( ) { return this.gmtCreate; } public void setGmtModified(Date gmtModified) { this.gmtModified = gmtModified; } public Date getGmtModified( ) { return this.gmtModified; } public void setGmtPaid(Date gmtPaid) { this.gmtPaid = gmtPaid; } public Date getGmtPaid( ) { return this.gmtPaid; } public void setItemOrders(List<ItemOrderOpenData> itemOrders) { this.itemOrders = itemOrders; } public List<ItemOrderOpenData> getItemOrders( ) { return this.itemOrders; } public void setLogisticsStatus(String logisticsStatus) { this.logisticsStatus = logisticsStatus; } public String getLogisticsStatus( ) { return this.logisticsStatus; } public void setMemo(String memo) { this.memo = memo; } public String getMemo( ) { return this.memo; } public void setMerchantSubsidyAmount(Long merchantSubsidyAmount) { this.merchantSubsidyAmount = merchantSubsidyAmount; } public Long getMerchantSubsidyAmount( ) { return this.merchantSubsidyAmount; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getOrderId( ) { return this.orderId; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public String getOutBizNo( ) { return this.outBizNo; } public void setOutBizType(String outBizType) { this.outBizType = outBizType; } public String getOutBizType( ) { return this.outBizType; } public void setPartnerId(String partnerId) { this.partnerId = partnerId; } public String getPartnerId( ) { return this.partnerId; } public void setPartnerSubsidyAmount(Long partnerSubsidyAmount) { this.partnerSubsidyAmount = partnerSubsidyAmount; } public Long getPartnerSubsidyAmount( ) { return this.partnerSubsidyAmount; } public void setRealAmount(Long realAmount) { this.realAmount = realAmount; } public Long getRealAmount( ) { return this.realAmount; } public void setSellerId(String sellerId) { this.sellerId = sellerId; } public String getSellerId( ) { return this.sellerId; } public void setShopId(String shopId) { this.shopId = shopId; } public String getShopId( ) { return this.shopId; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } public String getTradeNo( ) { return this.tradeNo; } public void setType(String type) { this.type = type; } public String getType( ) { return this.type; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
9727f5948d8b4b65687ea9bf93e4653f0ac6cea3
2f5b8741780ec712d26f82d8b28a4e5c5885e4a4
/Exception_Handling/app6/src/M15.java
31fde8b47ecbb397df8d17cc3a25aced8c4e9562
[]
no_license
Vijay-Ky/5BFSD_APTECH
e60e8380eed116afd9a1e9abbd69b7a503ed66fe
1d1a9eb21eb63b86f771687ac1ec6560fbcaa787
refs/heads/main
2023-03-27T13:02:00.311280
2021-03-30T08:44:27
2021-03-30T08:44:27
331,601,827
0
1
null
null
null
null
UTF-8
Java
false
false
624
java
class M15 { public static void main(String[] args) //throws InterruptedException { /* try { System.out.println(1000); Class.forName("");//min one Class.forName max any no. of we can keep Class.forName(""); Class.forName(""); } catch (ClassNotFoundException ex) { } System.out.println("done");*/ try { Class.forName(""); Thread.sleep(10000); } catch (ClassNotFoundException ex) { } catch (InterruptedException ex) { } /* try { Class.forName(""); Thread.sleep(10000); } catch (ClassNotFoundException ex) { }*/ //System.out.println("done"); } }
[ "vijayky007@gmail.com" ]
vijayky007@gmail.com
a17b043cfc3f1ebacdd88ea8f604e33d9c3f544e
9a21965d440506705c517cabe40dbb67244a6b73
/xteacher/src/main/java/com/zjhz/teacher/NetworkRequests/retrofit/Model/LoginRespon.java
6e5784349e81dda590d6a0a2eb32ed6789bf907a
[]
no_license
tianbaojun/XMvp
e6528041ee6fc43d79d004a4f8bff2d96477ff18
ede7fbbec1f5d4134a2d97b4106b1ee98524c2be
refs/heads/master
2021-01-15T08:13:56.469611
2017-08-18T08:52:43
2017-08-18T08:52:43
99,560,727
0
0
null
null
null
null
UTF-8
Java
false
false
5,652
java
package com.zjhz.teacher.NetworkRequests.retrofit.Model; import com.zjhz.teacher.NetworkRequests.response.UserLogin; import com.zjhz.teacher.bean.BaseModel; import java.util.List; /** * Created by Administrator on 2017/8/16. */ public class LoginRespon extends BaseModel { /** * msg : 登录成功! * code : 0 * total : 1 * data : {"imMark":"1","os":"APP","sources":[{"sourceType":"2"}],"TimeOut":14400,"nickName":"章银平","roles":[],"userId":"288078455667429377","phoneNo":"14957576283","token":"4df3f3df98ce815894430806d852dd72","photoUrl":"","loginTime":1502870176221,"teacherId":"288078455667429376","sourceType":"2","schoolId":"288069341826519040","schoolName":"杭州智鹏千校云","jobNumber":"18001"} */ private String msg; private int code; private int total; private UserLogin data; public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public int getTotal() { return total; } public void setTotal(int total) { this.total = total; } public UserLogin getData() { return data; } public void setData(UserLogin data) { this.data = data; } public static class DataBean { /** * imMark : 1 * os : APP * sources : [{"sourceType":"2"}] * TimeOut : 14400 * nickName : 章银平 * roles : [] * userId : 288078455667429377 * phoneNo : 14957576283 * token : 4df3f3df98ce815894430806d852dd72 * photoUrl : * loginTime : 1502870176221 * teacherId : 288078455667429376 * sourceType : 2 * schoolId : 288069341826519040 * schoolName : 杭州智鹏千校云 * jobNumber : 18001 */ private String imMark; private String os; private int TimeOut; private String nickName; private String userId; private String phoneNo; private String token; private String photoUrl; private long loginTime; private String teacherId; private String sourceType; private String schoolId; private String schoolName; private String jobNumber; private List<SourcesBean> sources; private List<?> roles; public String getImMark() { return imMark; } public void setImMark(String imMark) { this.imMark = imMark; } public String getOs() { return os; } public void setOs(String os) { this.os = os; } public int getTimeOut() { return TimeOut; } public void setTimeOut(int TimeOut) { this.TimeOut = TimeOut; } public String getNickName() { return nickName; } public void setNickName(String nickName) { this.nickName = nickName; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getPhoneNo() { return phoneNo; } public void setPhoneNo(String phoneNo) { this.phoneNo = phoneNo; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } public String getPhotoUrl() { return photoUrl; } public void setPhotoUrl(String photoUrl) { this.photoUrl = photoUrl; } public long getLoginTime() { return loginTime; } public void setLoginTime(long loginTime) { this.loginTime = loginTime; } public String getTeacherId() { return teacherId; } public void setTeacherId(String teacherId) { this.teacherId = teacherId; } public String getSourceType() { return sourceType; } public void setSourceType(String sourceType) { this.sourceType = sourceType; } public String getSchoolId() { return schoolId; } public void setSchoolId(String schoolId) { this.schoolId = schoolId; } public String getSchoolName() { return schoolName; } public void setSchoolName(String schoolName) { this.schoolName = schoolName; } public String getJobNumber() { return jobNumber; } public void setJobNumber(String jobNumber) { this.jobNumber = jobNumber; } public List<SourcesBean> getSources() { return sources; } public void setSources(List<SourcesBean> sources) { this.sources = sources; } public List<?> getRoles() { return roles; } public void setRoles(List<?> roles) { this.roles = roles; } public static class SourcesBean { /** * sourceType : 2 */ private String sourceType; public String getSourceType() { return sourceType; } public void setSourceType(String sourceType) { this.sourceType = sourceType; } } } }
[ "woabw@foxmail.com" ]
woabw@foxmail.com
14737faf59fa63fc77f33f5ee54a09480887eeb4
690f3f008d94abf130c4005146010cd63cd71567
/JavaTest/src/main/java/proxy/staticproxy/StaticProxy.java
4383f6d587838ecae3fce36ec3fb29be99a40040
[]
no_license
Oaks907/bookspace
819b8ec87067f8e9776a8b79210c74d33673aec9
114a4fc43ed6134b4a236ccdffd30a9594b54796
refs/heads/master
2022-12-24T17:01:02.454129
2021-05-26T15:53:02
2021-05-26T15:53:02
143,092,798
0
0
null
2022-12-16T05:20:36
2018-08-01T02:19:53
Java
UTF-8
Java
false
false
680
java
package proxy.staticproxy; import proxy.Iservice; import proxy.RealService; /** * Create by haifei on 19/10/2018 4:09 PM. * 静态代理 */ public class StaticProxy implements Iservice{ private RealService realService; public StaticProxy(RealService realService) { this.realService = realService; } @Override public void sayHello(String str) { System.out.println("proxy: before say hello."); realService.sayHello(str); System.out.println("proxy: after say hello."); } public void doSomething() { System.out.println("proxy:before do something."); realService.doSomething(); System.out.println("proxy:after do something."); } }
[ "haifei.li@renren-inc.com" ]
haifei.li@renren-inc.com
65f1d1402a090928cd1a1dd77a3086852849b3f8
2a983ca82d81f9a4f31b3fa71f5b236d13194009
/instrument-modules/user-modules/module-log-data-pusher/src/main/java/com/shulie/instrument/module/log/data/pusher/push/DataPusher.java
93733135d83ae4a9da3f0da0421eae1a76f6aead
[ "Apache-2.0" ]
permissive
hengyu-coder/LinkAgent-1
74ea4dcf51a0a05f2bb0ff22b309f02f8bf0a1a1
137ddf2aab5e91b17ba309a83d5420f839ff4b19
refs/heads/main
2023-06-25T17:28:44.903484
2021-07-28T03:41:20
2021-07-28T03:41:20
382,327,899
0
0
Apache-2.0
2021-07-02T11:39:46
2021-07-02T11:39:46
null
UTF-8
Java
false
false
1,604
java
/** * Copyright 2021 Shulie Technology, Co.Ltd * Email: shulie@shulie.io * 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, * See the License for the specific language governing permissions and * limitations under the License. */ package com.shulie.instrument.module.log.data.pusher.push; import com.shulie.instrument.module.log.data.pusher.log.callback.LogCallback; import com.shulie.instrument.module.log.data.pusher.server.ServerAddrProvider; /** * 数据推送者 * * @author xiaobin.zfb * @since 2020/8/6 10:35 下午 */ public interface DataPusher { /** * 名称 * * @return 名称 */ String getName(); /** * 设置地址提供者 * * @param provider 服务地址提供者 */ void setServerAddrProvider(ServerAddrProvider provider); /** * 初始化 * * @param serverOptions 启动参数 * @return 初始化是否成功 */ boolean init(ServerOptions serverOptions); /** * 获取日志变更时的回调函数的一个实现实例 * * @return 日志处理Callback */ LogCallback buildLogCallback(); /** * 启动 * * @return 返回启动是否成功 */ boolean start(); /** * 停止 */ void stop(); }
[ "jirenhe@shulie.io" ]
jirenhe@shulie.io
728696a3684bc61397aebfaafd43f43f94a13c52
7fe96ff16066e922bc99621d0cc80e51cfdc1cce
/javasrc/ch02_2/ex2_2_14.java
561ae0fddd0062f01b9e48d9b04e9e678d94cac3
[]
no_license
Vagacoder/Algorithms4E
a0948644eebbab7eaecb8224caaad0d23bfc54e9
eeb3ec913c3ba5c1e9ea8c432c0a1fc82f9cdc49
refs/heads/master
2021-08-03T01:30:59.402846
2021-07-25T06:46:42
2021-07-25T06:46:42
219,931,593
0
0
null
null
null
null
UTF-8
Java
false
false
1,306
java
package javasrc.ch02_2; /* * 2.2.14 Merging sorted queues. Develop a static method that takes two queues of sorted items as arguments and returns a queue that results from merging the queues into sorted order. */ import javasrc.ch01_3.LinkedListQueue; public class ex2_2_14{ public static void main(String[] args){ LinkedListQueue<Integer> q1 = new LinkedListQueue<>(); LinkedListQueue<Integer> q2 = new LinkedListQueue<>(); q1.enqueue(1); q1.enqueue(5); q1.enqueue(19); q1.enqueue(27); q1.enqueue(33); q2.enqueue(8); q2.enqueue(10); q2.enqueue(12); q2.enqueue(36); q2.enqueue(49); LinkedListQueue<Integer> result = new LinkedListQueue<>(); while(!q1.isEmpty() || !q2.isEmpty()){ if(q1.isEmpty()){ result.enqueue(q2.dequeue()); } else if (q2.isEmpty()){ result.enqueue(q1.dequeue()); } else { int temp1 = q1.peekTop(); int temp2 = q2.peekTop(); if(temp1 < temp2){ result.enqueue(q1.dequeue()); } else { result.enqueue(q2.dequeue()); } } } result.print(); } }
[ "qiruihu@gmail.com" ]
qiruihu@gmail.com
115c0b114b9ff28d00d9046966adfb04c7a2b833
dbc9aa7693df8e7e142218b45b8e23931e7367c7
/src/chapter13/BetterRead.java
3fe0d036661b484fc51022fc7f22b610aef30fee
[]
no_license
xiaweizi/ThinkingInJavaDemo
1fdb98b756dc0fa3c152b984429b9e57645b5837
14dc4dc14207cce062caf7042f9685381e0429e6
refs/heads/master
2021-04-27T03:21:12.508205
2018-05-07T06:09:23
2018-05-07T06:09:23
122,712,564
0
0
null
null
null
null
UTF-8
Java
false
false
1,204
java
package chapter13; import java.util.Scanner; /** * <pre> * author : xiaweizi * class : chapter13.BetterRead * e-mail : 1012126908@qq.com * time : 2018/04/15 * desc : * </pre> */ public class BetterRead { public static void main(String[] args) { // Scanner 可以接受任何类型的 Readable 输入对象 Scanner stdin = new Scanner(SimpleRead.input); System.out.println("What is your name?"); // 所有的输入,分词以及翻译的操作都隐藏在不同类型的 next 方法 中. String name = stdin.nextLine(); // nextLine() 返回 String System.out.println(name); System.out.println("How old are you? What is your favorite double?"); System.out.println("(input: <age> <double>)"); // Scanner 直接读入 integer 和 double 类型数据 int age = stdin.nextInt(); double favorite = stdin.nextDouble(); System.out.println(age); System.out.println(favorite); System.out.format("Hi %s.\n", name); System.out.format("In 5 years you will be %d.\n", age + 5); System.out.format("My favorite double is %f.", favorite / 2); } }
[ "1012126908@qq.com" ]
1012126908@qq.com
cc1ee5e7fd6f21bcca1397005bbf4ce81fea82b4
d4506724ba8a4f2ae64b999d9e6631c7a149b45c
/src/main/java/yd/swig/SWIGTYPE_p_f_p__GFileIOStream_long_p__GCancellable_p_p__GError__int.java
a01ab8295aa8df54da218b0e309d2d0a27bfdddb
[]
no_license
ydaniels/frida-java
6dc70b327ae8e8a6d808a0969e861225dcc0192b
cf3c198b2a4b7c7a3a186359b5c8c768deacb285
refs/heads/master
2022-12-08T21:28:27.176045
2019-10-24T09:51:44
2019-10-24T09:51:44
214,268,850
2
1
null
2022-11-25T19:46:38
2019-10-10T19:30:26
Java
UTF-8
Java
false
false
941
java
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.1 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package yd.swig; public class SWIGTYPE_p_f_p__GFileIOStream_long_p__GCancellable_p_p__GError__int { private transient long swigCPtr; protected SWIGTYPE_p_f_p__GFileIOStream_long_p__GCancellable_p_p__GError__int(long cPtr, @SuppressWarnings("unused") boolean futureUse) { swigCPtr = cPtr; } protected SWIGTYPE_p_f_p__GFileIOStream_long_p__GCancellable_p_p__GError__int() { swigCPtr = 0; } protected static long getCPtr(SWIGTYPE_p_f_p__GFileIOStream_long_p__GCancellable_p_p__GError__int obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
[ "yomi@erpsoftapp.com" ]
yomi@erpsoftapp.com
455284e664ed2c2d6c5f98ce8dbf70e4cee07c2f
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0376_internal/src/java/module0376_internal/a/IFoo0.java
86b28be960248fb1a66ae5fa997653a039040251
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
859
java
package module0376_internal.a; import javax.management.*; import javax.naming.directory.*; import javax.net.ssl.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.util.logging.Filter * @see java.util.zip.Deflater * @see javax.annotation.processing.Completion */ @SuppressWarnings("all") public interface IFoo0<U> extends java.util.concurrent.Callable<U> { javax.lang.model.AnnotatedConstruct f0 = null; javax.management.Attribute f1 = null; javax.naming.directory.DirContext f2 = null; String getName(); void setName(String s); U get(); void set(U e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
fe3157b146c89bc7adb6fddfe3225df56b2c939d
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a060/A060094Test.java
1b32d71341b6fb43f508880474ee57bee6ea1a8e
[]
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.a060; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A060094Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
3a0aa108a5ce9666a5d43af81f13b3700ea30141
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/cc83c2f848be69a77f1275fe1ff5363dcdd4c955/after/NodesStatsRequestBuilder.java
4fa5a58a98cdcfc790b925e29dcb5ac081e96679
[]
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
3,606
java
/* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch licenses this * file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.action.admin.cluster.node.stats; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; import org.elasticsearch.client.ClusterAdminClient; import org.elasticsearch.client.internal.InternalClusterAdminClient; /** * */ public class NodesStatsRequestBuilder extends NodesOperationRequestBuilder<NodesStatsRequest, NodesStatsResponse, NodesStatsRequestBuilder> { public NodesStatsRequestBuilder(ClusterAdminClient clusterClient) { super((InternalClusterAdminClient) clusterClient, new NodesStatsRequest()); } /** * Sets all the request flags. */ public NodesStatsRequestBuilder all() { request.all(); return this; } /** * Clears all stats flags. */ public NodesStatsRequestBuilder clear() { request.clear(); return this; } /** * Should the node indices stats be returned. */ public NodesStatsRequestBuilder setIndices(boolean indices) { request.setIndices(indices); return this; } /** * Should the node OS stats be returned. */ public NodesStatsRequestBuilder setOs(boolean os) { request.setOs(os); return this; } /** * Should the node OS stats be returned. */ public NodesStatsRequestBuilder setProcess(boolean process) { request.setProcess(process); return this; } /** * Should the node JVM stats be returned. */ public NodesStatsRequestBuilder setJvm(boolean jvm) { request.setJvm(jvm); return this; } /** * Should the node thread pool stats be returned. */ public NodesStatsRequestBuilder setThreadPool(boolean threadPool) { request.setThreadPool(threadPool); return this; } /** * Should the node Network stats be returned. */ public NodesStatsRequestBuilder setNetwork(boolean network) { request.setNetwork(network); return this; } /** * Should the node file system stats be returned. */ public NodesStatsRequestBuilder setFs(boolean fs) { request.setFs(fs); return this; } /** * Should the node Transport stats be returned. */ public NodesStatsRequestBuilder setTransport(boolean transport) { request.setTransport(transport); return this; } /** * Should the node HTTP stats be returned. */ public NodesStatsRequestBuilder setHttp(boolean http) { request.setHttp(http); return this; } @Override protected void doExecute(ActionListener<NodesStatsResponse> listener) { ((ClusterAdminClient) client).nodesStats(request, listener); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
cd894e0bb0f3bcb31a69f3b3c4f94bd2102f536f
524de9066b9b7a62e87d24300db1f54030142767
/app/src/main/java/com/example/horo/model/service/pojo/daily/Pisces.java
b8a3e4b39ed278f0fbba356bea1a4a51c978b7d5
[]
no_license
max-android/Horo
f486fe241bae82352e24acff295b7a30667858e6
866807b311bad0212afbaebb80eba829fc6d3245
refs/heads/master
2021-08-07T06:43:07.791459
2017-11-07T18:12:15
2017-11-07T18:12:15
109,879,182
0
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
package com.example.horo.model.service.pojo.daily; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; /** * Created by Максим on 19.10.2017. */ @Root(name = "pisces") public class Pisces { private String yesterday; private String today; private String tomorrow; private String tomorrow02; @Element(name = "yesterday") public String getYesterday() { return yesterday; } @Element(name = "today") public String getToday() { return today; } @Element(name = "tomorrow") public String getTomorrow() { return tomorrow; } @Element(name = "tomorrow02") public String getTomorrow02() { return tomorrow02; } @Element(name = "yesterday") public void setYesterday(String yesterday) { this.yesterday = yesterday; } @Element(name = "today") public void setToday(String today) { this.today = today; } @Element(name = "tomorrow") public void setTomorrow(String tomorrow) { this.tomorrow = tomorrow; } @Element(name = "tomorrow02") public void setTomorrow02(String tomorrow02) { this.tomorrow02 = tomorrow02; } }
[ "preferenceLEAD111@yandex.ru" ]
preferenceLEAD111@yandex.ru
fdda74eb9fe9ee23832d908359fabb60213da639
915bc4b49660b21068cded065306d6d60e1532f2
/src/main/java/org/snpeff/snpEffect/testCases/unity/TestCasesApplyIns.java
8ec5119cf12abd8a6ecd8cd47d6382d92cee0633
[]
no_license
smith-chem-wisc/SnpEff
4b12d0c187eba4ad472f0e9bc5580b6c003eb5c2
ac911a9433995b4cba17bb90054eab2286437759
refs/heads/master
2023-01-21T11:06:31.745348
2023-01-12T21:35:46
2023-01-12T21:35:46
132,474,093
2
3
null
2023-01-12T21:35:48
2018-05-07T14:40:12
Java
UTF-8
Java
false
false
6,763
java
package org.snpeff.snpEffect.testCases.unity; import org.junit.Test; import org.snpeff.interval.Variant; import org.snpeff.util.Gpr; /** * Test cases: apply a variant (INS) to a transcript * */ public class TestCasesApplyIns extends TestCasesBaseApply { public TestCasesApplyIns() { super(); } /** * Variant before exon */ @Test public void test_apply_variant_01() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 290, "", "ACG"); checkApplyIns(variant, transcript.cds(), transcript.protein(), 1, 303, 402); } /** * Variant before exon */ @Test public void test_apply_variant_02() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 297, "", "ACG"); checkApplyIns(variant, transcript.cds(), transcript.protein(), 1, 303, 402); } /** * Variant overlapping exon start */ @Test public void test_apply_variant_03() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 299, "", "ACG"); checkApplyIns(variant, transcript.cds(), transcript.protein(), 1, 303, 402); } /** * Variant at exon start */ @Test public void test_apply_variant_04() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 300, "", "ACG"); String expectedCds = "atgtccgcaggtgaaggcatacacgctgcgcgtatactgatgttacctcgatggattttgtcagaaatatggtgcccaggacgcgaagggcatattatgg" // Exon[0] + "ACGtgtttgggaattcacgggcacggttctgcagcaagctgaattggcagctcggcataaatcccgaccccatcgtcacgcacggatcaattcatcctcaacg".toLowerCase() // Exon[1] + "ggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgattaccgatttatttgattccccacatttatttcatcggg" // Exon[2] ; checkApplyIns(variant, expectedCds, null, 1, 300, 402); } /** * Variant in exon */ @Test public void test_apply_variant_05() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 310, "", "ACG"); String expectedCds = "atgtccgcaggtgaaggcatacacgctgcgcgtatactgatgttacctcgatggattttgtcagaaatatggtgcccaggacgcgaagggcatattatgg" // Exon[0] + "tgtttgggaaACGttcacgggcacggttctgcagcaagctgaattggcagctcggcataaatcccgaccccatcgtcacgcacggatcaattcatcctcaacg".toLowerCase() // Exon[1] + "ggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgattaccgatttatttgattccccacatttatttcatcggg" // Exon[2] ; checkApplyIns(variant, expectedCds, null, 1, 300, 402); } /** * Variant in exon */ @Test public void test_apply_variant_06() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 399, "", "ACG"); String expectedCds = "atgtccgcaggtgaaggcatacacgctgcgcgtatactgatgttacctcgatggattttgtcagaaatatggtgcccaggacgcgaagggcatattatgg" // Exon[0] + "tgtttgggaattcacgggcacggttctgcagcaagctgaattggcagctcggcataaatcccgaccccatcgtcacgcacggatcaattcatcctcaacACGg".toLowerCase() // Exon[1] + "ggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgattaccgatttatttgattccccacatttatttcatcggg" // Exon[2] ; checkApplyIns(variant, expectedCds, null, 1, 300, 402); } /** * Variant overlapping exon end */ @Test public void test_apply_variant_07() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 399, "", "ACG"); String expectedCds = "atgtccgcaggtgaaggcatacacgctgcgcgtatactgatgttacctcgatggattttgtcagaaatatggtgcccaggacgcgaagggcatattatgg" // Exon[0] + "tgtttgggaattcacgggcacggttctgcagcaagctgaattggcagctcggcataaatcccgaccccatcgtcacgcacggatcaattcatcctcaacACGg".toLowerCase() // Exon[1] + "ggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgattaccgatttatttgattccccacatttatttcatcggg" // Exon[2] ; checkApplyIns(variant, expectedCds, null, 1, 300, 402); } /** * Variant right after exon end */ @Test public void test_apply_variant_08() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 400, "", "ACG"); checkApplyIns(variant, transcript.cds(), transcript.protein(), 1, 300, 399); } /** * Variant after exon end */ @Test public void test_apply_variant_09() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 410, "", "ACG"); checkApplyIns(variant, transcript.cds(), transcript.protein(), 1, 300, 399); } /** * Variant over exon: variant is larger than exon, starts before exon and overlaps the whole exon */ @Test public void test_apply_variant_10() { Gpr.debug("Test"); Variant variant = new Variant(transcript.getParent(), 290, "", "ATTGGCTCGACGCTCATTCACTCCAACAGCCCGGGACCCCCGCTCAATTATTTCACTCACCGGGAAAATTGTACCGATTGTCCGTGCCTTACTTCAAATGACATCCGCAGGTGAAGGCAT"); checkApplyIns(variant, transcript.cds(), transcript.protein(), 1, 420, 519); } /** * Variant over exon: variant is larger than exon and starts right at exons start and ends after exon end */ @Test public void test_apply_variant_11() { Gpr.debug("Test"); String seq = "ATTGGCTCGACGCTCATTCACTCCAACAGCCCGGGACCCCCGCTCAATTATTTCACTCACCGGGAAAATTGTACCGATTGTCCGTGCCTTACTTCAAATGACATCCGCAGGTGAAGGCAT"; Variant variant = new Variant(transcript.getParent(), 300, "", seq); String expectedCds = "atgtccgcaggtgaaggcatacacgctgcgcgtatactgatgttacctcgatggattttgtcagaaatatggtgcccaggacgcgaagggcatattatgg" // Exon[0] + seq.toLowerCase() + "tgtttgggaattcacgggcacggttctgcagcaagctgaattggcagctcggcataaatcccgaccccatcgtcacgcacggatcaattcatcctcaacg" // Exon[1] + "ggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgattaccgatttatttgattccccacatttatttcatcggg" // Exon[2] ; checkApplyIns(variant, expectedCds, null, 1, 300, 519); } /** * Variant over exon: variant is larger than exon, starts before exon start and end right at exon end */ @Test public void test_apply_variant_12() { Gpr.debug("Test"); String seq = "ATTGGCTCGACGCTCATTCACTCCAACAGCCCGGGACCCCCGCTCAATTATTTCACTCACCGGGAAAATTGTACCGATTGTCCGTGCCTTACTTCAAATGACATCCGCAG"; Variant variant = new Variant(transcript.getParent(), 290, "", seq); checkApplyIns(variant, transcript.cds(), transcript.protein(), 1, 410, 509); } /** * Variant over exon: variant is on the same coordiantes as exon */ @Test public void test_apply_variant_13() { Gpr.debug("Test"); String seq = "ATTGGCTCGACGCTCATTCACTCCAACAGCCCGGGACCCCCGCTCAATTATTTCACTCACCGGGAAAATTGTACCGATTGTCCGTGCCTTACTTCAAATG"; Variant variant = new Variant(transcript.getParent(), 300, "", seq); String expectedCds = "atgtccgcaggtgaaggcatacacgctgcgcgtatactgatgttacctcgatggattttgtcagaaatatggtgcccaggacgcgaagggcatattatgg" // Exon[0] + seq.toLowerCase() + "tgtttgggaattcacgggcacggttctgcagcaagctgaattggcagctcggcataaatcccgaccccatcgtcacgcacggatcaattcatcctcaacg" // Exon[1] + "ggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgattaccgatttatttgattccccacatttatttcatcggg" // Exon[2] ; checkApplyIns(variant, expectedCds, null, 1, 300, 499); } }
[ "pablo.e.cingolani@gmail.com" ]
pablo.e.cingolani@gmail.com
4ea3615c6787f1bf412c84ce229825e32250f279
225011bbc304c541f0170ef5b7ba09b967885e95
/mf/org/w3c/dom/ls/LSLoadEvent.java
7a451ea0d6982971a9f9b1bd7500ea9475e4109d
[]
no_license
sebaudracco/bubble
66536da5367f945ca3318fecc4a5f2e68c1df7ee
e282cda009dfc9422594b05c63e15f443ef093dc
refs/heads/master
2023-08-25T09:32:04.599322
2018-08-14T15:27:23
2018-08-14T15:27:23
140,444,001
1
1
null
null
null
null
UTF-8
Java
false
false
200
java
package mf.org.w3c.dom.ls; import mf.org.w3c.dom.Document; import mf.org.w3c.dom.events.Event; public interface LSLoadEvent extends Event { LSInput getInput(); Document getNewDocument(); }
[ "sebaudracco@gmail.com" ]
sebaudracco@gmail.com
d8a661b2741e52cc0464c253c4bdfbfc1b735ad5
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/commerce-services/commerceservices/testsrc/de/hybris/platform/commerceservices/spring/config/MultipleListMergeBean.java
d2e38028e98124ba477b3f879baed8f8b205bc10
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
752
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.commerceservices.spring.config; import java.util.ArrayList; import java.util.List; public class MultipleListMergeBean { private List<MergeTestBean> propertyList; private List<MergeTestBean> fieldList; public MultipleListMergeBean() { this.propertyList = new ArrayList<MergeTestBean>(); this.fieldList = new ArrayList<MergeTestBean>(); } public List<MergeTestBean> getPropertyList() { return propertyList; } public void setPropertyList(final List<MergeTestBean> propertyList) { this.propertyList = propertyList; } public void setFieldList(final List<MergeTestBean> fieldList) { this.fieldList = fieldList; } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
abe5d0eee74ba333a94096d7516006d79c9dac27
b1f51f8ba05ad83ecfbd80e6e7f140e70850bf01
/ACE_ERP/src/sales/org/util/entity/ITypeConverter.java
c1fcc4ce99660e69463d1c8f0aa947475f909361
[]
no_license
hyundaimovex-asanwas/asanwas-homepage
27e0ba1ed7b41313069e732f3dc9df20053caddd
75e30546f11258d8b70159cfbe8ee36b18371bd0
refs/heads/master
2023-06-07T03:41:10.170367
2021-07-01T10:23:54
2021-07-01T10:23:54
376,739,168
1
1
null
null
null
null
UHC
Java
false
false
227
java
/* * 작성자 : 이동연 * 파일명 : ITypeConverter.java * 작성일 : 2004. 6. 10. * [파일 설명] * */ package sales.org.util.entity; public interface ITypeConverter { public Object convert(Object objValue); }
[ "86274611+evnmoon@users.noreply.github.com" ]
86274611+evnmoon@users.noreply.github.com
2095090a497411be2166d3601c14c1d6ef7aa501
4067562d7f89389d8615359164875a93f146f69f
/src/main/java/com/youotech/service/DevicesRackServices.java
652f841f28d029a0754c14658e4b8813ecec48e9
[]
no_license
582496630/sdjftz
9804e0bed5e018b11952b808ef56b1301f97eac3
a60cb83433164ee6d9db6da96f059ac9967c3852
refs/heads/master
2020-03-10T21:26:00.568339
2018-04-15T09:23:07
2018-04-15T09:23:07
129,594,230
0
0
null
null
null
null
UTF-8
Java
false
false
803
java
package com.youotech.service; import java.util.List; import java.util.Map; import org.apache.xmlbeans.impl.xb.xsdschema.impl.PublicImpl; import com.github.pagehelper.PageInfo; import com.youotech.entity.DevicesRackModel; import com.youotech.entity.EngineRoomModel; import com.youotech.entity.dto.TreeDTO; public interface DevicesRackServices { public PageInfo<DevicesRackModel> getDevicesRack(Integer pageNumber, Integer pageSize, Map<String, Object> map); public List<TreeDTO> getDeviceRackLeftTreeInfo(); public List<TreeDTO> getEngineRoomTree(); public EngineRoomModel getEngineRoomOne(Integer roomId); public Integer insertInfo(EngineRoomModel eModel); public Integer deleteEngineRooms(Long[] roomIds); public List<DevicesRackModel> getDevicesRack2(Map<String, Object> map); }
[ "582496630@qq.com" ]
582496630@qq.com
6241601f8cabcff15986323e60c89d02e4c7eb5f
11bc2c26ba2c3e8cfb58e5dd7ab430ec0e16a375
/ACORD_PC_JAXB/src/org/acord/standards/pc_surety/acord1/xml/PCBASICWATERCRAFT.java
16395b2c14cd571b5d71047e9e01ee4bcc2448f2
[]
no_license
TimothyDH/neanderthal
b295b3e3401ab403fb89950f354c83f3690fae38
1444b21035e3a846d85ea1bf32638a1e535bca67
refs/heads/master
2021-05-04T10:25:54.675556
2019-09-05T13:49:14
2019-09-05T13:49:14
45,859,747
0
0
null
null
null
null
UTF-8
Java
false
false
1,993
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2010.02.24 at 10:20:12 PM EST // package org.acord.standards.pc_surety.acord1.xml; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Java class for PCBASICWATERCRAFT complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PCBASICWATERCRAFT"> * &lt;complexContent> * &lt;extension base="{http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/}PCBASICWATERCRAFT_NoID"> * &lt;attribute name="id" type="{http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/}ID" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PCBASICWATERCRAFT") public class PCBASICWATERCRAFT extends PCBASICWATERCRAFTNoID { @XmlAttribute(name = "id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID protected String id; /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } }
[ "Bryan.Bringle@3f59fb54-24d0-11df-be41-57e7d1eefd51" ]
Bryan.Bringle@3f59fb54-24d0-11df-be41-57e7d1eefd51
fc4792593f4891c1670f664240ca05c0f62173a2
b522d8db178621ab6ca8b230f4dee9ce1cfbd333
/kdc-tool/token-tool/src/main/java/org/apache/kerby/token/TokenCache.java
51e359344ad151def0b2b5a89c42aea9ee860c75
[ "Apache-2.0" ]
permissive
HazelChen/directory-kerby
491ff75d3e2281ae0096c5b9cd53684548471687
1ca0d98e962825ffd53b3a83019c924673d9b557
refs/heads/master
2021-01-17T21:34:31.337558
2015-03-19T06:13:57
2015-03-19T06:13:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,928
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.token; import java.io.*; public class TokenCache { private static final String DEFAULT_TOKEN_CACHE_PATH = ".tokenauth"; private static final String TOKEN_CACHE_FILE = ".tokenauth.token"; public static String readToken(String tokenCacheFile) { File cacheFile = null; if (tokenCacheFile != null && ! tokenCacheFile.isEmpty()) { cacheFile = new File(tokenCacheFile); if (!cacheFile.exists()) { throw new RuntimeException("Invalid token cache specified: " + tokenCacheFile); }; } else { cacheFile = getDefaultTokenCache(); if (!cacheFile.exists()) { throw new RuntimeException("No token cache available by default"); }; } String token = null; try { BufferedReader reader = new BufferedReader(new FileReader(cacheFile)); String line = reader.readLine(); reader.close(); if (line != null) { token = line; } } catch (IOException ex) { //NOP } return token; } public static void writeToken(String token) { File cacheFile = getDefaultTokenCache(); try { Writer writer = new FileWriter(cacheFile); writer.write(token.toString()); writer.close(); // sets read-write permissions to owner only cacheFile.setReadable(false, false); cacheFile.setReadable(true, true); cacheFile.setWritable(true, true); } catch (IOException ioe) { // if case of any error we just delete the cache, if user-only // write permissions are not properly set a security exception // is thrown and the file will be deleted. cacheFile.delete(); } } public static File getDefaultTokenCache() { String homeDir = System.getProperty("user.home", DEFAULT_TOKEN_CACHE_PATH); return new File(homeDir, TOKEN_CACHE_FILE); } }
[ "drankye@gmail.com" ]
drankye@gmail.com
5481b621a5901969e7b51e189ae5b7ef9a85a581
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app32/source/com/payeco/android/plugin/e.java
5ee1b9b70ce24185ce0d0e8888d162ef4e77b9af
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
4,426
java
package com.payeco.android.plugin; import android.hardware.Camera.PictureCallback; final class e implements Camera.PictureCallback { e(b paramB) {} /* Error */ public final void onPictureTaken(byte[] paramArrayOfByte, android.hardware.Camera paramCamera) { // Byte code: // 0: new 24 java/io/FileOutputStream // 3: dup // 4: getstatic 30 com/payeco/android/plugin/b/a:b Ljava/lang/String; // 7: invokespecial 33 java/io/FileOutputStream:<init> (Ljava/lang/String;)V // 10: astore_3 // 11: aload_3 // 12: astore_2 // 13: aload_3 // 14: aload_1 // 15: invokevirtual 37 java/io/FileOutputStream:write ([B)V // 18: aload_3 // 19: astore_2 // 20: aload_0 // 21: getfield 12 com/payeco/android/plugin/e:a Lcom/payeco/android/plugin/b; // 24: invokestatic 42 com/payeco/android/plugin/b:a (Lcom/payeco/android/plugin/b;)Lcom/payeco/android/plugin/a; // 27: invokestatic 47 com/payeco/android/plugin/a:a (Lcom/payeco/android/plugin/a;)Lcom/payeco/android/plugin/PayecoCameraActivity; // 30: iconst_m1 // 31: invokevirtual 53 com/payeco/android/plugin/PayecoCameraActivity:setResult (I)V // 34: aload_3 // 35: invokevirtual 56 java/io/FileOutputStream:close ()V // 38: aload_0 // 39: getfield 12 com/payeco/android/plugin/e:a Lcom/payeco/android/plugin/b; // 42: invokestatic 42 com/payeco/android/plugin/b:a (Lcom/payeco/android/plugin/b;)Lcom/payeco/android/plugin/a; // 45: invokestatic 47 com/payeco/android/plugin/a:a (Lcom/payeco/android/plugin/a;)Lcom/payeco/android/plugin/PayecoCameraActivity; // 48: invokevirtual 59 com/payeco/android/plugin/PayecoCameraActivity:finish ()V // 51: return // 52: astore 4 // 54: aconst_null // 55: astore_1 // 56: aload_1 // 57: astore_2 // 58: ldc 61 // 60: ldc 63 // 62: aload 4 // 64: invokestatic 69 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I // 67: pop // 68: aload_1 // 69: ifnull -18 -> 51 // 72: aload_1 // 73: invokevirtual 56 java/io/FileOutputStream:close ()V // 76: aload_0 // 77: getfield 12 com/payeco/android/plugin/e:a Lcom/payeco/android/plugin/b; // 80: invokestatic 42 com/payeco/android/plugin/b:a (Lcom/payeco/android/plugin/b;)Lcom/payeco/android/plugin/a; // 83: invokestatic 47 com/payeco/android/plugin/a:a (Lcom/payeco/android/plugin/a;)Lcom/payeco/android/plugin/PayecoCameraActivity; // 86: invokevirtual 59 com/payeco/android/plugin/PayecoCameraActivity:finish ()V // 89: return // 90: astore_1 // 91: aconst_null // 92: astore_2 // 93: aload_2 // 94: ifnull +20 -> 114 // 97: aload_2 // 98: invokevirtual 56 java/io/FileOutputStream:close ()V // 101: aload_0 // 102: getfield 12 com/payeco/android/plugin/e:a Lcom/payeco/android/plugin/b; // 105: invokestatic 42 com/payeco/android/plugin/b:a (Lcom/payeco/android/plugin/b;)Lcom/payeco/android/plugin/a; // 108: invokestatic 47 com/payeco/android/plugin/a:a (Lcom/payeco/android/plugin/a;)Lcom/payeco/android/plugin/PayecoCameraActivity; // 111: invokevirtual 59 com/payeco/android/plugin/PayecoCameraActivity:finish ()V // 114: aload_1 // 115: athrow // 116: astore_1 // 117: goto -41 -> 76 // 120: astore_2 // 121: goto -20 -> 101 // 124: astore_1 // 125: goto -87 -> 38 // 128: astore_1 // 129: goto -36 -> 93 // 132: astore 4 // 134: aload_3 // 135: astore_1 // 136: goto -80 -> 56 // Local variable table: // start length slot name signature // 0 139 0 this e // 0 139 1 paramArrayOfByte byte[] // 0 139 2 paramCamera android.hardware.Camera // 10 125 3 localFileOutputStream java.io.FileOutputStream // 52 11 4 localException1 Exception // 132 1 4 localException2 Exception // Exception table: // from to target type // 0 11 52 java/lang/Exception // 0 11 90 finally // 72 76 116 java/io/IOException // 97 101 120 java/io/IOException // 34 38 124 java/io/IOException // 13 18 128 finally // 20 34 128 finally // 58 68 128 finally // 13 18 132 java/lang/Exception // 20 34 132 java/lang/Exception } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
3e4f6d12202744d3b5efa7ed8b9ea0626a93377c
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/36/389.java
9a4bce42cb9fa457bd984c13d151dafb8e1af26e
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
866
java
package <missing>; public class GlobalMembers { public static void Main() { String c = new String(new char[10]); String b = new String(new char[10]); int i; int j; int n; int k; int m; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { c = tempVar.charAt(0); } String tempVar2 = ConsoleInput.scanfRead(" "); if (tempVar2 != null) { b = tempVar2.charAt(0); } n = c.length(); m = b.length(); if (m == n) { for (i = 0;i < n;i++) { for (j = 0;j < n;j++) { if (c.charAt(i) != ' ' && b.charAt(j) != ' ') { if (c.charAt(i) == b.charAt(j)) { c = tangible.StringFunctions.changeCharacter(c, i, b[j] = ' '); } } } } for (i = 0;i < n;i++) { if (c.charAt(i) != ' ' || b.charAt(i) != ' ') { System.out.print("NO"); break; } } if (i == n) { System.out.print("YES"); } } else { System.out.print("NO"); } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
ad4ce9924d6a486f2409e0fc65d23bc6056149e9
a7210128b2ae776ae197319767de4cfbab33f21b
/parser/src/main/java/com/onenetwork/util/SerialUtils.java
1bcd72e583b4bffbc3f269a2210e5b488c857927
[]
no_license
gigbat/onenetwork-parser
5c213e38bc76661df267ec44e59b650d9735ee10
cfb0aba33f8f06f846accc1b5031c3e0c8c9cbfb
refs/heads/master
2023-06-25T04:53:06.640903
2021-07-22T16:18:08
2021-07-22T16:18:08
387,429,454
0
0
null
null
null
null
UTF-8
Java
false
false
544
java
package com.onenetwork.util; import com.google.gson.Gson; import lombok.experimental.UtilityClass; @UtilityClass public class SerialUtils { public String serializeObject(Object o) { Gson gson = new Gson(); return gson.toJson(o); } public static Object unserializeObject(String s, Object o) { Gson gson = new Gson(); return gson.fromJson(s, o.getClass()); } public static Object cloneObject(Object o) { String s = serializeObject(o); return unserializeObject(s, o); } }
[ "b.kostevich@gmail.com" ]
b.kostevich@gmail.com
36e6f5226a9e17ccc652579f5e858d523c281222
f5b75261f0c2123c68b3bf09b0319799147cc7b0
/struts-2.3.1/core/src/test/java/org/apache/struts2/dispatcher/ActionContextCleanUpTest.java
fd498e8f3d77c7af818c073e2d90028472f9f37f
[]
no_license
tangyong/struts2-osgi-plugin-glassfish
0ca477a11100dbef93831a0ee19a09b6f55a2d98
1a7ce57e2a4c8e439398bf9a4fef0b086b3b1b4a
refs/heads/master
2021-01-23T13:36:13.293775
2013-01-22T10:37:18
2013-01-22T10:37:18
7,551,994
1
0
null
null
null
null
UTF-8
Java
false
false
6,384
java
/* * $Id: ActionContextCleanUpTest.java 651946 2008-04-27 13:41:38Z apetrelli $ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.dispatcher; import java.io.IOException; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts2.dispatcher.mapper.ActionMapping; import org.springframework.mock.web.MockFilterConfig; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockServletContext; import com.mockobjects.servlet.MockFilterChain; import junit.framework.TestCase; /** * @version $Date: 2008-04-27 22:41:38 +0900 (日, 27 4 2008) $ $Id: ActionContextCleanUpTest.java 651946 2008-04-27 13:41:38Z apetrelli $ */ public class ActionContextCleanUpTest extends TestCase { protected MockFilterConfig filterConfig; protected MockHttpServletRequest request; protected MockHttpServletResponse response; protected MockFilterChain filterChain; protected MockFilterChain filterChain2; protected MockServletContext servletContext; protected Counter counter; protected Map<String, Integer> _tmpStore; protected InnerDispatcher _dispatcher; protected InnerDispatcher _dispatcher2; protected ActionContextCleanUp cleanUp; protected ActionContextCleanUp cleanUp2; @Override protected void tearDown() throws Exception { filterConfig = null; request = null; response = null; filterChain = null; filterChain2 = null; servletContext = null; counter = null; _tmpStore = null; _dispatcher = null; _dispatcher2 = null; cleanUp = null; cleanUp2 = null; } @Override protected void setUp() throws Exception { Dispatcher.setInstance(null); counter = new Counter(); _tmpStore = new LinkedHashMap<String, Integer>(); filterConfig = new MockFilterConfig(); request = new MockHttpServletRequest(); response = new MockHttpServletResponse(); servletContext = new MockServletContext(); _dispatcher = new InnerDispatcher(servletContext) { @Override public String toString() { return "dispatcher"; } }; _dispatcher2 = new InnerDispatcher(servletContext){ @Override public String toString() { return "dispatcher2"; } }; filterChain = new MockFilterChain() { @Override public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { _tmpStore.put("counter"+(counter.count++), (Integer) request.getAttribute("__cleanup_recursion_counter")); } }; cleanUp = new ActionContextCleanUp(); cleanUp2 = new ActionContextCleanUp(); filterChain2 = new MockFilterChain() { @Override public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { _tmpStore.put("counter"+(counter.count++), (Integer) request.getAttribute("__cleanup_recursion_counter")); cleanUp2.doFilter(request, response, filterChain); } }; } public void testSingle() throws Exception { assertNull(request.getAttribute("__cleanup_recursion_counter")); cleanUp.init(filterConfig); cleanUp.doFilter(request, response, filterChain); cleanUp.destroy(); assertEquals(_tmpStore.size(), 1); assertEquals(_tmpStore.get("counter0"), new Integer(1)); assertEquals(request.getAttribute("__cleanup_recursion_counter"), new Integer("0")); } public void testMultiple() throws Exception { assertNull(request.getAttribute("__cleanup_recursion_counter")); cleanUp.init(filterConfig); cleanUp2.init(filterConfig); cleanUp.doFilter(request, response, filterChain2); cleanUp2.destroy(); cleanUp.destroy(); assertEquals(_tmpStore.size(), 2); assertEquals(_tmpStore.get("counter0"), new Integer(1)); assertEquals(_tmpStore.get("counter1"), new Integer(2)); assertEquals(request.getAttribute("__cleanup_recursion_counter"), new Integer("0")); } class InnerDispatcher extends Dispatcher { public boolean prepare = false; public boolean wrapRequest = false; public boolean service = false; public InnerDispatcher(ServletContext servletContext) { super(servletContext, new HashMap<String,String>()); } @Override public void prepare(HttpServletRequest request, HttpServletResponse response) { prepare = true; } @Override public HttpServletRequest wrapRequest(HttpServletRequest request, ServletContext servletContext) throws IOException { wrapRequest = true; return request; } @Override public void serviceAction(HttpServletRequest request, HttpServletResponse response, ServletContext context, ActionMapping mapping) throws ServletException { service = true; } } class Counter { public int count=0; } }
[ "tangyong@cn.fujitsu.com" ]
tangyong@cn.fujitsu.com
af3694d73fb17f1621c8c89bb8519e21ca5c3be1
2312f07ef2524597a00ac84c5537563f950690f7
/earth3d_pro_wallpaper/src/main/java/com/xmodpp/addons/wallpaper/XMODWallpaperService.java
3ef37526f93c07661be7bd9da906e915fee02ed0
[]
no_license
jinkg/ETW_Components
6cd1ed14c334779947f09d9e8609552cf9ecfbdd
b16fb28acd4b3e0c68ffd1dbeeb567b6c0371dbc
refs/heads/master
2021-05-07T06:29:01.507396
2018-09-26T12:44:26
2018-09-26T12:44:28
111,760,297
2
0
null
null
null
null
UTF-8
Java
false
false
2,950
java
package com.xmodpp.addons.wallpaper; import android.content.res.Configuration; import android.service.wallpaper.WallpaperService; import android.service.wallpaper.WallpaperService.Engine; import android.view.MotionEvent; import android.view.SurfaceHolder; import com.xmodpp.application.Application; public abstract class XMODWallpaperService extends WallpaperService { private static XMODWallpaperEngine activeEngine; public class XMODWallpaperEngine extends Engine { protected XMODWallpaperSurface surface = new XMODWallpaperSurface(); public XMODWallpaperEngine() { super(); } public void onConfigurationChanged(Configuration configuration) { this.surface.updateRotation(); } public void onCreate(SurfaceHolder surfaceHolder) { super.onCreate(surfaceHolder); this.surface.setID(isPreview() ? 2 : 1); surfaceHolder.addCallback(this.surface); } public void onDestroy() { super.onDestroy(); } public void onOffsetsChanged(float f, float f2, float f3, float f4, int i, int i2) { super.onOffsetsChanged(f, f2, f3, f4, i, i2); if (!isPreview()) { this.surface.onWallpaperOffsetsChanged(f, f2, f3, f4, i, i2); } } public void onTouchEvent(MotionEvent motionEvent) { super.onTouchEvent(motionEvent); this.surface.onTouch(null, motionEvent); } public void onVisibilityChanged(boolean z) { super.onVisibilityChanged(z); if (z) { XMODWallpaperService.setActiveEngine(this); this.surface.surfaceChanged(null, 0, getSurfaceHolder().getSurfaceFrame().width(), getSurfaceHolder().getSurfaceFrame().height()); this.surface.onResume(); return; } this.surface.onPause(); } } public static synchronized XMODWallpaperEngine getActiveEngine() { XMODWallpaperEngine xMODWallpaperEngine; synchronized (XMODWallpaperService.class) { xMODWallpaperEngine = activeEngine; } return xMODWallpaperEngine; } private static synchronized void setActiveEngine(XMODWallpaperEngine xMODWallpaperEngine) { synchronized (XMODWallpaperService.class) { activeEngine = xMODWallpaperEngine; } } public void onConfigurationChanged(Configuration configuration) { super.onConfigurationChanged(configuration); XMODWallpaperEngine activeEngine = getActiveEngine(); if (activeEngine != null) { activeEngine.onConfigurationChanged(configuration); } } public void onCreate() { super.onCreate(); Application.Init(getApplicationContext()); } public Engine onCreateEngine() { return new XMODWallpaperEngine(); } }
[ "jinyalin@baidu.com" ]
jinyalin@baidu.com
0887d1bec52dc2f5e7592dd5e0b5de15433df8e5
de897e577c2bd95abbf98b143a2ec3d8cc5b9f80
/app/src/main/java/com/lwc/shanxiu/module/bean/PartsTypeBean.java
0b51615b62dd0784e70f25eba1fa638d1e9b37b6
[]
no_license
popularcloud/SHANXIU06042120
6b4e02c1e4c1df2cf5ac9145992125f0cf930d80
60cb0a4512f36fb2933009f97b6ab332d7b370bb
refs/heads/master
2021-06-29T01:30:10.062909
2021-01-04T01:51:36
2021-01-04T01:51:36
199,803,391
0
0
null
null
null
null
UTF-8
Java
false
false
1,416
java
package com.lwc.shanxiu.module.bean; import java.io.Serializable; /** * @author younge * @date 2018/12/20 0020 * @email 2276559259@qq.com * @Des 配件 */ public class PartsTypeBean implements Serializable{ private String typeName; private String createTime; private int sn; private String typeIcon; private int isValid; private String typeId; public String getTypeName() { return typeName; } public void setTypeName(String typeName) { this.typeName = typeName; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public int getSn() { return sn; } public void setSn(int sn) { this.sn = sn; } public String getTypeIcon() { return typeIcon; } public void setTypeIcon(String typeIcon) { this.typeIcon = typeIcon; } public int getIsValid() { return isValid; } public void setIsValid(int isValid) { this.isValid = isValid; } public String getTypeId() { return typeId; } public void setTypeId(String typeId) { this.typeId = typeId; } }
[ "liushuzhiyt@163.com" ]
liushuzhiyt@163.com
6947c48800abbb1d63c4e32616047b44c7ba3993
816b5e665d315aee920fca44b32c60ec8bfad7db
/domain/net/xidlims/dao/SchoolWeekdayDAOImpl.java
14965153b922d04f0d79843c2ed54b7b46902962
[]
no_license
iqiangzi/ssdutZhangCC
d9c34bde6197f4ccb060cbb1c130713a5663989a
f5f7acd9ef45b5022accbdd7f6f730963fe3dddd
refs/heads/master
2020-08-02T22:07:50.428824
2018-05-13T03:03:04
2018-05-13T03:03:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,174
java
package net.xidlims.dao; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.PersistenceContext; import javax.persistence.Query; import net.xidlims.domain.SchoolWeekday; import org.skyway.spring.util.dao.AbstractJpaDao; import org.springframework.dao.DataAccessException; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; /** * DAO to manage SchoolWeekday entities. * */ @Repository("SchoolWeekdayDAO") @Transactional public class SchoolWeekdayDAOImpl extends AbstractJpaDao<SchoolWeekday> implements SchoolWeekdayDAO { /** * Set of entity classes managed by this DAO. Typically a DAO manages a single entity. * */ private final static Set<Class<?>> dataTypes = new HashSet<Class<?>>(Arrays.asList(new Class<?>[] { SchoolWeekday.class })); /** * EntityManager injected by Spring for persistence unit xidlimsConn * */ @PersistenceContext(unitName = "xidlimsConn") private EntityManager entityManager; /** * Instantiates a new SchoolWeekdayDAOImpl * */ public SchoolWeekdayDAOImpl() { super(); } /** * Get the entity manager that manages persistence unit * */ public EntityManager getEntityManager() { return entityManager; } /** * Returns the set of entity classes managed by this DAO. * */ public Set<Class<?>> getTypes() { return dataTypes; } /** * JPQL Query - findSchoolWeekdayByWeekdayName * */ @Transactional public Set<SchoolWeekday> findSchoolWeekdayByWeekdayName(String weekdayName) throws DataAccessException { return findSchoolWeekdayByWeekdayName(weekdayName, -1, -1); } /** * JPQL Query - findSchoolWeekdayByWeekdayName * */ @SuppressWarnings("unchecked") @Transactional public Set<SchoolWeekday> findSchoolWeekdayByWeekdayName(String weekdayName, int startResult, int maxRows) throws DataAccessException { Query query = createNamedQuery("findSchoolWeekdayByWeekdayName", startResult, maxRows, weekdayName); return new LinkedHashSet<SchoolWeekday>(query.getResultList()); } /** * JPQL Query - findSchoolWeekdayById * */ @Transactional public SchoolWeekday findSchoolWeekdayById(Integer id) throws DataAccessException { return findSchoolWeekdayById(id, -1, -1); } /** * JPQL Query - findSchoolWeekdayById * */ @Transactional public SchoolWeekday findSchoolWeekdayById(Integer id, int startResult, int maxRows) throws DataAccessException { try { Query query = createNamedQuery("findSchoolWeekdayById", startResult, maxRows, id); return (net.xidlims.domain.SchoolWeekday) query.getSingleResult(); } catch (NoResultException nre) { return null; } } /** * JPQL Query - findAllSchoolWeekdays * */ @Transactional public Set<SchoolWeekday> findAllSchoolWeekdays() throws DataAccessException { return findAllSchoolWeekdays(-1, -1); } /** * JPQL Query - findAllSchoolWeekdays * */ @SuppressWarnings("unchecked") @Transactional public Set<SchoolWeekday> findAllSchoolWeekdays(int startResult, int maxRows) throws DataAccessException { Query query = createNamedQuery("findAllSchoolWeekdays", startResult, maxRows); return new LinkedHashSet<SchoolWeekday>(query.getResultList()); } /** * JPQL Query - findSchoolWeekdayByPrimaryKey * */ @Transactional public SchoolWeekday findSchoolWeekdayByPrimaryKey(Integer id) throws DataAccessException { return findSchoolWeekdayByPrimaryKey(id, -1, -1); } /** * JPQL Query - findSchoolWeekdayByPrimaryKey * */ @Transactional public SchoolWeekday findSchoolWeekdayByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException { try { Query query = createNamedQuery("findSchoolWeekdayByPrimaryKey", startResult, maxRows, id); return (net.xidlims.domain.SchoolWeekday) query.getSingleResult(); } catch (NoResultException nre) { return null; } } /** * JPQL Query - findSchoolWeekdayByWeekdayNameContaining * */ @Transactional public Set<SchoolWeekday> findSchoolWeekdayByWeekdayNameContaining(String weekdayName) throws DataAccessException { return findSchoolWeekdayByWeekdayNameContaining(weekdayName, -1, -1); } /** * JPQL Query - findSchoolWeekdayByWeekdayNameContaining * */ @SuppressWarnings("unchecked") @Transactional public Set<SchoolWeekday> findSchoolWeekdayByWeekdayNameContaining(String weekdayName, int startResult, int maxRows) throws DataAccessException { Query query = createNamedQuery("findSchoolWeekdayByWeekdayNameContaining", startResult, maxRows, weekdayName); return new LinkedHashSet<SchoolWeekday>(query.getResultList()); } /** * Used to determine whether or not to merge the entity or persist the entity when calling Store * @see store * * */ public boolean canBeMerged(SchoolWeekday entity) { return true; } }
[ "1501331454@qq.com" ]
1501331454@qq.com
4a2969fdaa08eb2e4523df6fb569d914c0b31864
7559bead0c8a6ad16f016094ea821a62df31348a
/src/com/vmware/vim25/VirtualMachineBootOptionsBootableDevice.java
4d08605e9d3827fccd15fac05fa17664c6a93ca8
[]
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,113
java
package com.vmware.vim25; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for VirtualMachineBootOptionsBootableDevice complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="VirtualMachineBootOptionsBootableDevice"> * &lt;complexContent> * &lt;extension base="{urn:vim25}DynamicData"> * &lt;sequence> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "VirtualMachineBootOptionsBootableDevice") @XmlSeeAlso({ VirtualMachineBootOptionsBootableFloppyDevice.class, VirtualMachineBootOptionsBootableCdromDevice.class, VirtualMachineBootOptionsBootableDiskDevice.class, VirtualMachineBootOptionsBootableEthernetDevice.class }) public class VirtualMachineBootOptionsBootableDevice extends DynamicData { }
[ "495149700@qq.com" ]
495149700@qq.com
939dc9a0913090cee367a7b67f92803115e5b562
0ee3a75fd1f42f286e8fbfd95c4b2b8b8e364956
/src/main/java/algorithms/simples/MaxPalinromeFromFivesTheBest.java
73f499c835011a5fbd32ef6cd0eb830a4c1f57ef
[]
no_license
anauk/fs6Lesson
41634d549fc05b00ab5f8f2785ba4357e6180169
916ce341c8214094ea2d5fe84c9b671e2216caa6
refs/heads/master
2020-04-06T16:22:33.354216
2018-09-19T18:11:35
2018-09-19T18:11:35
157,617,303
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
package algorithms.simples; public class MaxPalinromeFromFivesTheBest { final int MIN=10000; final int MAX=99999; boolean findValue(int[]a, int v) { for (int i = 0; i < a.length; i++) { if (a[i]==v) return true; } return false; } public long doFind() { int[] simples = new SimpleV4(MIN, MAX).array(); long max=0; PalindromeWoString p = new PalindromeWoString(); for (int i = 0; i < simples.length; i++) { for (int j = simples.length-1; j > i ; j--) { long mult=(long)simples[i]*simples[j]; if ((mult > max) && p.is(mult)) { max = mult; break; } } } return max; } public static void main(String[] args) { final int ITER_COUNT=10; MaxPalinromeFromFivesTheBest p = new MaxPalinromeFromFivesTheBest(); long l=System.currentTimeMillis(); long max=0; for (int i = 0; i < ITER_COUNT; i++) { max=p.doFind(); } l=System.currentTimeMillis()-l; System.out.printf("Maximum:%d\n",max); System.out.printf("Time spent:%d\n", l/ITER_COUNT); } }
[ "alexey.rykhalskiy@gmail.com" ]
alexey.rykhalskiy@gmail.com
34e283688551add4f06690757c84312567328c69
8727b1cbb8ca63d30340e8482277307267635d81
/PolarServer/src/com/game/fight/structs/ResultType.java
fa84d92c5a702d3414de623cfa59ec0d1e6973ff
[]
no_license
taohyson/Polar
50026903ded017586eac21a7905b0f1c6b160032
b0617f973fd3866bed62da14f63309eee56f6007
refs/heads/master
2021-05-08T12:22:18.884688
2015-12-11T01:44:18
2015-12-11T01:44:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
package com.game.fight.structs; /** * 战斗结果枚举 * @author heyang * */ public enum ResultType { //未命中 MISS (1), //暴击 LUCK (2), //无效 NULLITY (3), ; private int value; private ResultType(int value){ } public int getValue() { return value; } public void setValue(int value) { this.value = value; } }
[ "zhuyuanbiao@ZHUYUANBIAO.rd.com" ]
zhuyuanbiao@ZHUYUANBIAO.rd.com
fd4e918cb673497fc6c74471bfc2428bdd09c06e
60eab9b092bb9d5a50b807f45cbe310774d0e456
/dataset/cm3/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java
8c3bc8fadce10c6a94694abf378f806dd03c4b20
[ "Apache-2.0" ]
permissive
SpoonLabs/nopol-experiments
7b691c39b09e68c3c310bffee713aae608db61bc
2cf383cb84a00df568a6e41fc1ab01680a4a9cc6
refs/heads/master
2022-02-13T19:44:43.869060
2022-01-22T22:06:28
2022-01-22T22:14:45
56,683,489
6
1
null
2019-03-05T11:02:20
2016-04-20T12:05:51
Java
UTF-8
Java
false
false
2,909
java
/* * Copyright 2003-2004 The Apache Software Foundation. * * 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.apache.commons.math.analysis; /** * A concrete {@link UnivariateRealSolverFactory}. This is the default solver factory * used by commons-math. * <p> * The default solver returned by this factory is a {@link BrentSolver}. * * @version $Revision: 1.13 $ $Date: 2004/06/23 16:26:14 $ */ public class UnivariateRealSolverFactoryImpl extends UnivariateRealSolverFactory { /** * Default constructor. */ public UnivariateRealSolverFactoryImpl() { } /** * Create a new {@link UnivariateRealSolver} for the given function. The * actual solver returned is determined by the underlying factory. * * This factory returns a {@link BrentSolver} instance. * * @param f the function. * @return the new solver. */ public UnivariateRealSolver newDefaultSolver(UnivariateRealFunction f) { return newBrentSolver(f); } /** * Create a new {@link UnivariateRealSolver} for the given function. The * solver is an implementation of the bisection method. * @param f the function. * @return the new solver. */ public UnivariateRealSolver newBisectionSolver(UnivariateRealFunction f) { return new BisectionSolver(f); } /** * Create a new {@link UnivariateRealSolver} for the given function. The * solver is an implementation of the Brent method. * @param f the function. * @return the new solver. */ public UnivariateRealSolver newBrentSolver(UnivariateRealFunction f) { return new BrentSolver(f); } /** * Create a new {@link UnivariateRealSolver} for the given function. The * solver is an implementation of Newton's Method. * @param f the function. * @return the new solver. */ public UnivariateRealSolver newNewtonSolver( DifferentiableUnivariateRealFunction f) { return new NewtonSolver(f); } /** * Create a new {@link UnivariateRealSolver} for the given function. The * solver is an implementation of the secant method. * @param f the function. * @return the new solver. */ public UnivariateRealSolver newSecantSolver(UnivariateRealFunction f) { return new SecantSolver(f); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
81dd9c5d230a1e5ccc654a15cad6d419c39656c9
325f7994268d65fa320e71ba192fec1ba75e66ba
/small_projects/JavaJMSSimpleChat_WIP/src/com/chat/test/LoginDialog.java
77a811d760569b22ed9e31acbcb8f0c19e451a6b
[]
no_license
zahariaca/Java
c115bcad50e5526b52dd414143e00272f328516b
79af93965f04d600d041feff2a6da5cdcccd72c8
refs/heads/master
2022-12-22T14:07:53.603261
2021-10-26T19:20:27
2021-10-26T19:20:27
53,354,442
0
0
null
null
null
null
UTF-8
Java
false
false
2,910
java
package com.chat.test; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.PasswordField; import javafx.scene.control.TextField; import javafx.scene.layout.BorderPane; import javafx.scene.layout.GridPane; import javafx.scene.layout.VBox; import javafx.stage.Modality; import javafx.stage.Stage; /** * Created by Alex on 6/7/2016. */ public class LoginDialog { private String username; private String password; private static boolean cancelled; public void display(){ Label label1 = new Label(); Label username = new Label(); Label password = new Label(); TextField usernameField = new TextField(); TextField passwordField = new TextField(); Button okButton; Button closeButton; Stage window = new Stage(); window.initModality(Modality.APPLICATION_MODAL); window.setTitle("Login"); window.setMinWidth(250); label1.setText("Please enter your credentials!"); username.setText("Username"); password.setText("Password"); okButton = new Button("OK"); okButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { setUsername(usernameField.getText()); setPassword(passwordField.getText()); cancelled = false; window.close(); } }); closeButton = new Button("Close the window!"); closeButton.setOnAction(event -> { cancelled = true; window.close(); }); GridPane grid = new GridPane(); grid.setPadding(new Insets(10, 10, 10, 10)); grid.setVgap(5); grid.setHgap(8); grid.add(username,0,0); grid.add(password,0,1); grid.add(usernameField,1,0); grid.add(passwordField,1,1); grid.add(okButton,0,2); grid.add(closeButton,1,2); BorderPane layout = new BorderPane(); layout.setPadding(new Insets(5,5,5,5)); layout.setTop(label1); layout.setCenter(grid); Scene scene = new Scene(layout); window.setScene(scene); window.showAndWait(); } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public static boolean isCancelled(){ return cancelled; } }
[ "zaharia.c.alexandru@gmail.com" ]
zaharia.c.alexandru@gmail.com
f6d84a96ce55bafb736e2ece981f0a8e37a100bc
f91290b43c675f3657994f0b0485c1fc1eac786a
/src/com/pdd/pop/sdk/http/api/request/PddDdkMerchantListGetRequest.java
584d15a673745ffe0c42f01d1e1a57de6f47147f
[]
no_license
lywx215/http-client
49462178ebbbd3469f798f53b16f5cb52db56d72
29871ab097e2e6dfc1bd2ab5f1a63b6146797c5a
refs/heads/master
2021-10-09T09:01:07.389764
2018-12-25T05:06:11
2018-12-25T05:06:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,243
java
package com.pdd.pop.sdk.http.api.request; import com.pdd.pop.ext.fasterxml.jackson.annotation.JsonProperty; import com.pdd.pop.sdk.http.api.response.PddDdkMerchantListGetResponse; import com.pdd.pop.sdk.http.HttpMethod; import com.pdd.pop.sdk.http.PopBaseHttpRequest; import com.pdd.pop.sdk.common.util.JsonUtil; import java.util.List; import java.util.Map; import java.util.TreeMap; public class PddDdkMerchantListGetRequest extends PopBaseHttpRequest<PddDdkMerchantListGetResponse>{ /** * 店铺id */ @JsonProperty("mall_id_list") private List<Long> mallIdList; /** * 店铺类型 */ @JsonProperty("merchant_type_list") private List<Integer> merchantTypeList; /** * 查询范围0----商品拼团价格区间;1----商品券后价价格区间;2----佣金比例区间;3----优惠券金额区间;4----加入多多进宝时间区间;5----销量区间;6----佣金金额区间 */ @JsonProperty("query_range_str") private Integer queryRangeStr; /** * 商品类目ID,使用pdd.goods.cats.get接口获取 */ @JsonProperty("cat_id") private Long catId; /** * 是否有优惠券 (0 所有;1 必须有券。) */ @JsonProperty("has_coupon") private Integer hasCoupon; /** * 每页数量 */ @JsonProperty("page_number") private Integer pageNumber; /** * 分页数 */ @JsonProperty("page_size") private Integer pageSize; /** * 筛选范围 */ @JsonProperty("range_vo_list") private String rangeVoList; @Override public String getVersion() { return "V1"; } @Override public String getDataType() { return "JSON"; } @Override public String getType() { return "pdd.ddk.merchant.list.get"; } @Override public HttpMethod getHttpMethod() { return HttpMethod.POST; } @Override public Class<PddDdkMerchantListGetResponse> getResponseClass() { return PddDdkMerchantListGetResponse.class; } @Override public Map<String, String> getParamsMap() { Map<String, String> paramsMap = new TreeMap<String, String>(); paramsMap.put("version", getVersion()); paramsMap.put("data_type", getDataType()); paramsMap.put("type", getType()); paramsMap.put("timestamp", getTimestamp().toString()); if(mallIdList != null) { paramsMap.put("mall_id_list", mallIdList.toString()); } if(merchantTypeList != null) { paramsMap.put("merchant_type_list", merchantTypeList.toString()); } if(queryRangeStr != null) { paramsMap.put("query_range_str", queryRangeStr.toString()); } if(catId != null) { paramsMap.put("cat_id", catId.toString()); } if(hasCoupon != null) { paramsMap.put("has_coupon", hasCoupon.toString()); } if(pageNumber != null) { paramsMap.put("page_number", pageNumber.toString()); } if(pageSize != null) { paramsMap.put("page_size", pageSize.toString()); } if(rangeVoList != null) { paramsMap.put("range_vo_list", rangeVoList.toString()); } return paramsMap; } public void setMallIdList(List<Long> mallIdList) { this.mallIdList = mallIdList; } public void setMerchantTypeList(List<Integer> merchantTypeList) { this.merchantTypeList = merchantTypeList; } public void setQueryRangeStr(Integer queryRangeStr) { this.queryRangeStr = queryRangeStr; } public void setCatId(Long catId) { this.catId = catId; } public void setHasCoupon(Integer hasCoupon) { this.hasCoupon = hasCoupon; } public void setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public void setRangeVoList(String rangeVoList) { this.rangeVoList = rangeVoList; } }
[ "lenzhao@yahoo.com" ]
lenzhao@yahoo.com
4b450b24944b70b3e3c62ee2d1ffb44b7f6ad069
68291223928d3ca2a3c77968e5ed4e1174b46952
/sia/src/main/java/com/lr/sia/ui/moudle5/activity/PrivateLockActivity.java
2c599be7e2d6e43d26c56340759ba7be11ff8a2c
[]
no_license
wodx521/TestDemo1111
42105eb5778b06f9946891322a4dd99912b6d136
e6581e5e68bb2a4150a502057f9e529eb3aa3bcb
refs/heads/master
2020-12-14T10:05:01.540839
2020-01-23T10:00:32
2020-01-23T10:00:32
234,703,750
0
0
null
null
null
null
UTF-8
Java
false
false
6,991
java
package com.lr.sia.ui.moudle5.activity; import android.content.Intent; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.RecyclerView; import com.jaeger.library.StatusBarUtil; import com.lr.sia.R; import com.lr.sia.api.MethodUrl; import com.lr.sia.basic.BasicActivity; import com.lr.sia.basic.MbsConstans; import com.lr.sia.ui.moudle.activity.LoginActivity1; import com.lr.sia.ui.moudle5.adapter.PrivateLockListAdapter; import com.lr.sia.utils.tool.SPUtils; import com.lr.sia.utils.tool.UtilTools; import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.api.RefreshLayout; import com.scwang.smartrefresh.layout.constant.RefreshState; import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class PrivateLockActivity extends BasicActivity implements View.OnClickListener { private ImageView backImg; private TextView tvReleaseLog, tvReleased; private SmartRefreshLayout srlRefresh; private RecyclerView rvLockLog; private LinearLayout pageViewEmpty; private List<Map<String, Object>> tempList = new ArrayList<>(); private PrivateLockListAdapter privateLockListAdapter; private int page = 1; private Intent intent; private DecimalFormat decimalFormat; @Override public int getContentView() { return R.layout.activity_lock_empty1; } @Override public void init() { backImg = findViewById(R.id.backImg); tvReleaseLog = findViewById(R.id.tvReleaseLog); tvReleased = findViewById(R.id.tvReleased); srlRefresh = findViewById(R.id.srlRefresh); rvLockLog = findViewById(R.id.rvLockLog); pageViewEmpty = findViewById(R.id.page_view_empty); rvLockLog.addItemDecoration(new DividerItemDecoration(PrivateLockActivity.this, DividerItemDecoration.VERTICAL)); backImg.setOnClickListener(this); tvReleaseLog.setOnClickListener(this); pageViewEmpty.setOnClickListener(this); StatusBarUtil.setColorForSwipeBack(this, ContextCompat.getColor(this, MbsConstans.TOP_BAR_COLOR), MbsConstans.ALPHA); decimalFormat = new DecimalFormat("#.########"); String lock = getIntent().getStringExtra("lock"); tvReleased.setText(getString(R.string.defaultReleased).replace("0.00",decimalFormat.format(Double.parseDouble(lock)))); privateLockListAdapter = new PrivateLockListAdapter(PrivateLockActivity.this); rvLockLog.setAdapter(privateLockListAdapter); getLockListAction(); srlRefresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() { @Override public void onLoadMore(@NonNull RefreshLayout refreshLayout) { page += 1; getLockListAction(); } @Override public void onRefresh(@NonNull RefreshLayout refreshLayout) { page = 1; tempList.clear(); getLockListAction(); } }); } private void getLockListAction() { Map<String, Object> map = new HashMap<>(); if (UtilTools.empty(MbsConstans.ACCESS_TOKEN)) { MbsConstans.ACCESS_TOKEN = SPUtils.get(PrivateLockActivity.this, MbsConstans.SharedInfoConstans.ACCESS_TOKEN, "").toString(); } map.put("token", MbsConstans.ACCESS_TOKEN); map.put("page", page + ""); map.put("type", "2"); Map<String, String> mHeaderMap = new HashMap<String, String>(); mRequestPresenterImp.requestPostToMap(mHeaderMap, MethodUrl.USER_GETUSERKTLIST, map); } @Override public void showProgress() { } @Override public void disimissProgress() { } @Override public void loadDataSuccess(Map<String, Object> tData, String mType) { Intent intent; switch (mType) { case MethodUrl.USER_GETUSERKTLIST: if (srlRefresh.getState() == RefreshState.Loading || srlRefresh.getState() == RefreshState.Refreshing) { srlRefresh.finishLoadMore(); srlRefresh.finishRefresh(); } switch (tData.get("code") + "") { case "1": //请求成功 Map<String, Object> dataMap = (Map<String, Object>) tData.get("data"); String currentPage = dataMap.get("current_page") + ""; String lastPage = dataMap.get("last_page") + ""; int last = Integer.parseInt(lastPage); int current = Integer.parseInt(currentPage); if (last > current) { srlRefresh.setEnableLoadMore(true); } else { srlRefresh.setEnableLoadMore(false); } List<Map<String, Object>> mapList = (List<Map<String, Object>>) dataMap.get("data"); tempList.addAll(mapList); if (tempList != null && tempList.size() > 0) { privateLockListAdapter.setDataList(tempList); rvLockLog.setVisibility(View.VISIBLE); pageViewEmpty.setVisibility(View.GONE); } else { pageViewEmpty.setVisibility(View.VISIBLE); rvLockLog.setVisibility(View.GONE); } break; case "0": //请求失败 showToastMsg(tData.get("msg") + ""); break; case "-1": //token过期 finish(); intent = new Intent(PrivateLockActivity.this, LoginActivity1.class); startActivity(intent); break; default: } break; default: } } @Override public void loadDataError(Map<String, Object> map, String mType) { } @Override public void onClick(View v) { switch (v.getId()) { case R.id.backImg: finish(); break; case R.id.page_view_empty: getLockListAction(); break; case R.id.tvReleaseLog: intent = new Intent(PrivateLockActivity.this, ReleaseLockActivity.class); intent.putExtra("type", "2"); startActivity(intent); break; default: } } }
[ "wodx521@163.com" ]
wodx521@163.com
5f15cdf4b2a1404762253b95fc864f3fe3f6b8d8
5fd3d2d20539d4e160f8ac293e0d4f1566a98a2c
/hz-fine-master/src/main/java/com/hz/fine/master/core/model/strategy/StrategyModel.java
5f0048a42a5fcff5e3a201c24224b436fbc94ae8
[]
no_license
hzhuazhi/hz-fine
eeac8ba3b7eecebf1934abab5a4610d3f7e0cd6f
addc43d2fe849e01ebd5b78300aae6fdf2171719
refs/heads/master
2022-12-14T12:24:59.982673
2020-09-05T11:02:02
2020-09-05T11:02:02
262,562,132
1
0
null
null
null
null
UTF-8
Java
false
false
3,236
java
package com.hz.fine.master.core.model.strategy; import com.hz.fine.master.core.protocol.page.BasePage; import java.io.Serializable; /** * @Description 策略表:关于一些策略配置的部署的Dao层 * @Author yoko * @Date 2020/5/19 11:49 * @Version 1.0 */ public class StrategyModel extends BasePage implements Serializable { private static final long serialVersionUID = 1233223301149L; /** * 自增主键ID */ private Long id; /** * 策略名称 */ private String stgName; /** * 策略类型:1注册分享链接,2 */ private Integer stgType; /** * 策略的key:等同于策略类型 */ private String stgKey; /** * 策略整形值 */ private Integer stgNumValue; /** * 策略值 */ private String stgValue; /** * 策略大的值: 存储json数据 */ private String stgBigValue; /** * 数据类型:1普通数据,2英文逗号数据(多字段,英文逗号分割),3json数据 */ private Integer dataType; /** * 数据说明:描述,简介 */ private String stgExplain; /** * 创建时间 */ private String createTime; /** * 更新时间 */ private String updateTime; /** * 是否有效:0有效,1无效/删除 */ private Integer yn; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getStgName() { return stgName; } public void setStgName(String stgName) { this.stgName = stgName; } public Integer getStgType() { return stgType; } public void setStgType(Integer stgType) { this.stgType = stgType; } public String getStgKey() { return stgKey; } public void setStgKey(String stgKey) { this.stgKey = stgKey; } public Integer getStgNumValue() { return stgNumValue; } public void setStgNumValue(Integer stgNumValue) { this.stgNumValue = stgNumValue; } public String getStgValue() { return stgValue; } public void setStgValue(String stgValue) { this.stgValue = stgValue; } public String getStgBigValue() { return stgBigValue; } public void setStgBigValue(String stgBigValue) { this.stgBigValue = stgBigValue; } public Integer getDataType() { return dataType; } public void setDataType(Integer dataType) { this.dataType = dataType; } public String getStgExplain() { return stgExplain; } public void setStgExplain(String stgExplain) { this.stgExplain = stgExplain; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public String getUpdateTime() { return updateTime; } public void setUpdateTime(String updateTime) { this.updateTime = updateTime; } public Integer getYn() { return yn; } public void setYn(Integer yn) { this.yn = yn; } }
[ "duanfeng_1712@qq.com" ]
duanfeng_1712@qq.com
7e712bd2f1e790ea103159baeb42733fc34e0496
3ed6ef9ac5e0704d2418fad0cfb44e3097792539
/chapter05/src/main/java/com/blogspot/toomuchcoding/book/chapter5/voidmethod/TaxFactorService.java
f93eda378993307cf9756cd0a525c1ecc1d46e72
[ "Apache-2.0" ]
permissive
a5535772/mockito-cookbook
6655967798eb90e283e2738acc6cee63ec173a1a
54350c74741d26d8750990b33631ba75f3b751c9
refs/heads/master
2020-03-18T11:54:54.597899
2018-05-25T03:28:58
2018-05-25T03:28:58
134,697,791
0
0
Apache-2.0
2018-05-24T10:11:34
2018-05-24T10:11:34
null
UTF-8
Java
false
false
533
java
package com.blogspot.toomuchcoding.book.chapter5.voidmethod; import java.net.ConnectException; import com.blogspot.toomuchcoding.person.Person; public class TaxFactorService { private static final double MEAN_TAX_FACTOR = 0.5; public void updateMeanTaxFactor(Person person, double meanTaxFactor) throws ConnectException { System.out.printf("Updating mean tax factor [%s] for person with defined country%n", meanTaxFactor); } public double calculateMeanTaxFactor() { return MEAN_TAX_FACTOR; } }
[ "marcin@grzejszczak.pl" ]
marcin@grzejszczak.pl
6aad9af5720bb73bccf1995d2f0b20cad32e24fc
c4d1992bbfe4552ad16ff35e0355b08c9e4998d6
/releases/2.3.0/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java
e308b05f6213ff9a22a6bec611a9616e71fa1540
[]
no_license
BGCX261/zkpoi-svn-to-git
36f2a50d2618c73e40f24ddc2d3df5aadc8eca30
81a63fb1c06a2dccff20cab1291c7284f1687508
refs/heads/master
2016-08-04T08:42:59.622864
2015-08-25T15:19:51
2015-08-25T15:19:51
41,594,557
0
1
null
null
null
null
UTF-8
Java
false
false
7,359
java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.ddf; import java.util.List; import junit.framework.TestCase; import org.apache.poi.POIDataSamples; import org.apache.poi.util.HexDump; import org.apache.poi.util.HexRead; /** * Tests for {@link EscherContainerRecord} */ public final class TestEscherContainerRecord extends TestCase { private static final POIDataSamples _samples = POIDataSamples.getDDFInstance(); public void testFillFields() { EscherRecordFactory f = new DefaultEscherRecordFactory(); byte[] data = HexRead.readFromString("0F 02 11 F1 00 00 00 00"); EscherRecord r = f.createRecord(data, 0); r.fillFields(data, 0, f); assertTrue(r instanceof EscherContainerRecord); assertEquals((short) 0x020F, r.getOptions()); assertEquals((short) 0xF111, r.getRecordId()); data = HexRead.readFromString("0F 02 11 F1 08 00 00 00" + " 02 00 22 F2 00 00 00 00"); r = f.createRecord(data, 0); r.fillFields(data, 0, f); EscherRecord c = r.getChild(0); assertFalse(c instanceof EscherContainerRecord); assertEquals((short) 0x0002, c.getOptions()); assertEquals((short) 0xF222, c.getRecordId()); } public void testSerialize() { UnknownEscherRecord r = new UnknownEscherRecord(); r.setOptions((short) 0x123F); r.setRecordId((short) 0xF112); byte[] data = new byte[8]; r.serialize(0, data, new NullEscherSerializationListener()); assertEquals("[3F, 12, 12, F1, 00, 00, 00, 00]", HexDump.toHex(data)); EscherRecord childRecord = new UnknownEscherRecord(); childRecord.setOptions((short) 0x9999); childRecord.setRecordId((short) 0xFF01); r.addChildRecord(childRecord); data = new byte[16]; r.serialize(0, data, new NullEscherSerializationListener()); assertEquals("[3F, 12, 12, F1, 08, 00, 00, 00, 99, 99, 01, FF, 00, 00, 00, 00]", HexDump.toHex(data)); } public void testToString() { EscherContainerRecord r = new EscherContainerRecord(); r.setRecordId(EscherContainerRecord.SP_CONTAINER); r.setOptions((short) 0x000F); String nl = System.getProperty("line.separator"); assertEquals("org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl + " isContainer: true" + nl + " version: 0x000F" + nl + " instance: 0x0000" + nl + " recordId: 0xF004" + nl + " numchildren: 0" + nl , r.toString()); EscherOptRecord r2 = new EscherOptRecord(); // don't try to shoot in foot, please -- vlsergey // r2.setOptions((short) 0x9876); r2.setRecordId(EscherOptRecord.RECORD_ID); String expected; r.addChildRecord(r2); expected = "org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl + " isContainer: true" + nl + " version: 0x000F" + nl + " instance: 0x0000" + nl + " recordId: 0xF004" + nl + " numchildren: 1" + nl + " children: " + nl + " Child 0:" + nl + " org.apache.poi.ddf.EscherOptRecord:" + nl + " isContainer: false" + nl + " version: 0x0003" + nl + " instance: 0x0000" + nl + " recordId: 0xF00B" + nl + " numchildren: 0" + nl + " properties:" + nl + " " + nl; assertEquals(expected, r.toString()); r.addChildRecord(r2); expected = "org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl + " isContainer: true" + nl + " version: 0x000F" + nl + " instance: 0x0000" + nl + " recordId: 0xF004" + nl + " numchildren: 2" + nl + " children: " + nl + " Child 0:" + nl + " org.apache.poi.ddf.EscherOptRecord:" + nl + " isContainer: false" + nl + " version: 0x0003" + nl + " instance: 0x0000" + nl + " recordId: 0xF00B" + nl + " numchildren: 0" + nl + " properties:" + nl + " " + nl + " Child 1:" + nl + " org.apache.poi.ddf.EscherOptRecord:" + nl + " isContainer: false" + nl + " version: 0x0003" + nl + " instance: 0x0000" + nl + " recordId: 0xF00B" + nl + " numchildren: 0" + nl + " properties:" + nl + " " + nl; assertEquals(expected, r.toString()); } private static final class DummyEscherRecord extends EscherRecord { public DummyEscherRecord() { } public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) { return 0; } public int serialize(int offset, byte[] data, EscherSerializationListener listener) { return 0; } public int getRecordSize() { return 10; } public String getRecordName() { return ""; } } public void testGetRecordSize() { EscherContainerRecord r = new EscherContainerRecord(); r.addChildRecord(new DummyEscherRecord()); assertEquals(18, r.getRecordSize()); } /** * We were having problems with reading too much data on an UnknownEscherRecord, * but hopefully we now read the correct size. */ public void testBug44857() throws Exception { byte[] data = _samples.readFile("Container.dat"); // This used to fail with an OutOfMemory EscherContainerRecord record = new EscherContainerRecord(); record.fillFields(data, 0, new DefaultEscherRecordFactory()); } /** * Ensure {@link EscherContainerRecord} doesn't spill its guts everywhere */ public void testChildren() { EscherContainerRecord ecr = new EscherContainerRecord(); List<EscherRecord> children0 = ecr.getChildRecords(); assertEquals(0, children0.size()); EscherRecord chA = new DummyEscherRecord(); EscherRecord chB = new DummyEscherRecord(); EscherRecord chC = new DummyEscherRecord(); ecr.addChildRecord(chA); ecr.addChildRecord(chB); children0.add(chC); List<EscherRecord> children1 = ecr.getChildRecords(); assertTrue(children0 != children1); assertEquals(2, children1.size()); assertEquals(chA, children1.get(0)); assertEquals(chB, children1.get(1)); assertEquals(1, children0.size()); // first copy unchanged ecr.setChildRecords(children0); ecr.addChildRecord(chA); List<EscherRecord> children2 = ecr.getChildRecords(); assertEquals(2, children2.size()); assertEquals(chC, children2.get(0)); assertEquals(chA, children2.get(1)); } }
[ "you@example.com" ]
you@example.com
e453a45afc9198f58af838e475251b6b7126ba6c
7347094b7a574abcc06a8eb207fcff2bf0b2ba0e
/hive-code/hive-core/src/edu/unc/ils/mrc/hive/api/impl/elmo/SKOSConceptImpl.java
3687a1d5b6de0ecc19e49d8aacad4d1c4ebec423
[]
no_license
DICE-UNC/irods-hive
776feea03d9e8e1c605e93b0bd2bc7789a9dbc62
f9548931656eec930fe3b17ec37dbe912b8d0e9e
refs/heads/master
2016-09-05T21:42:43.160413
2015-05-01T14:57:50
2015-05-01T14:57:50
17,442,815
1
1
null
null
null
null
UTF-8
Java
false
false
6,310
java
/** * Copyright (c) 2010, UNC-Chapel Hill and Nescent 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 the UNC-Chapel Hill or Nescent nor the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 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. @author Jose R. Perez-Aguera */ package edu.unc.ils.mrc.hive.api.impl.elmo; import java.util.ArrayList; import java.util.List; import java.util.TreeMap; import javax.xml.namespace.QName; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import edu.unc.ils.mrc.hive.api.SKOSConcept; public class SKOSConceptImpl implements SKOSConcept { private static final Log logger = LogFactory.getLog(SKOSConceptImpl.class); private QName qname; private String prefLabel; private TreeMap<String, QName> broaders; private TreeMap<String, QName> relateds; private TreeMap<String, QName> narrowers; private List<String> altLabels; private List<String> scopeNotes; private List<String> schemes; private double score; private boolean isLeaf = false; private String tree = ""; public SKOSConceptImpl(final QName uri) { qname = uri; broaders = new TreeMap<String, QName>(); narrowers = new TreeMap<String, QName>(); relateds = new TreeMap<String, QName>(); altLabels = new ArrayList<String>(); schemes = new ArrayList<String>(); scopeNotes = new ArrayList<String>(); } @Override public int getNumberOfChildren() { return narrowers.size(); } @Override public List<String> getAltLabels() { return altLabels; } @Override public TreeMap<String, QName> getBroaders() { return broaders; } @Override public TreeMap<String, QName> getNarrowers() { return narrowers; } @Override public String getPrefLabel() { return prefLabel; } @Override public void setPrefLabel(final String prefLabel) { this.prefLabel = prefLabel; } @Override public TreeMap<String, QName> getRelated() { return relateds; } @Override public List<String> getSchemes() { return schemes; } @Override public List<String> getScopeNote() { return scopeNotes; } @Override public QName getQName() { return qname; } @Override public void addAltLabel(final String altLabel) { altLabels.add(altLabel); } @Override public void addBroader(final String broader, final QName uri) { broaders.put(broader, uri); } @Override public void addNarrower(final String narrower, final QName uri) { narrowers.put(narrower, uri); } @Override public void addRelated(final String related, final QName uri) { relateds.put(related, uri); } @Override public void addScheme(final String scheme) { schemes.add(scheme); } @Override public void addScopeNote(final String scopeNote) { scopeNotes.add(scopeNote); } @Override public String getSKOSFormat() { logger.trace("getSKOSFormat"); StringBuffer skos = new StringBuffer(); skos.append("<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" " + "xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\">" + "\n"); skos.append(" <rdf:Description rdf:about=\""); skos.append(getQName().getNamespaceURI()); skos.append(getQName().getLocalPart()); skos.append("\">\n"); skos.append(" <rdf:type rdf:resource=\"http://www.w3.org/2004/02/skos/core#Concept\"/>\n"); skos.append(" <skos:prefLabel>"); skos.append(prefLabel); skos.append("</skos:prefLabel>\n"); for (String alt : altLabels) { skos.append(" <skos:altLabel>"); skos.append(alt); skos.append("</skos:altLabel>\n"); } for (String broader : broaders.keySet()) { skos.append(" <skos:broader rdf:resource=\""); skos.append(broaders.get(broader).getNamespaceURI()); skos.append(broaders.get(broader).getLocalPart()); skos.append("\"/>\n"); } for (String narrower : narrowers.keySet()) { skos.append(" <skos:narrower rdf:resource=\""); skos.append(narrowers.get(narrower).getNamespaceURI()); skos.append(narrowers.get(narrower).getLocalPart()); skos.append("\"/>\n"); } for (String related : relateds.keySet()) { skos.append(" <skos:related rdf:resource=\""); skos.append(relateds.get(related).getNamespaceURI()); skos.append(relateds.get(related).getLocalPart()); skos.append("\"/>\n"); } skos.append(" <skos:inScheme rdf:resource=\""); skos.append(getQName().getNamespaceURI()); skos.append("\"/>\n"); for (String scopeNote : scopeNotes) { skos.append(" <skos:scopeNote>"); skos.append(scopeNote); skos.append("</skos:scopeNote>\n"); } skos.append(" </rdf:Description>\n"); skos.append("</rdf:RDF>"); return skos.toString(); } @Override public void setScore(final double score) { this.score = score; } @Override public double getScore() { return score; } @Override public boolean isLeaf() { return isLeaf; } public void setIsLeaf(final boolean isLeaf) { this.isLeaf = isLeaf; } @Override public String getTree() { return tree; } @Override public void setTree(final String tree) { this.tree = tree; } }
[ "michael.c.conway@gmail.com" ]
michael.c.conway@gmail.com
18fb66bcbf715502e4e42397d2a4e9a4c766f988
029010881febc6c5b7e2f0dee144f20559e6bd38
/Notes/Java SE/Collection/src/set/TreeSetDemo.java
e0c6f8eb5644f246767571dcc997c6f800ed5f41
[]
no_license
chuishengzhang/zcs
127d48751447d31f7e2602c0e7eeb3d84f6f459d
332d724c9c3e7c2518b169e1e7ed64419e542d61
refs/heads/master
2020-03-08T15:05:03.088784
2018-05-04T10:45:58
2018-05-04T10:45:58
null
0
0
null
null
null
null
GB18030
Java
false
false
1,453
java
package set; import java.util.Iterator; import java.util.TreeSet; /* Collection * |--set * |--HashSet * * |--TreeSet 可以对集合中的元素进行排序 * 要将自定义对象存入集合,改自定义对象必须具备比较性 * (该对象所属类实现Comparable接口) * * * * 第一种方法:使元素本身具备比较性 * * */ class Person1 implements Comparable<Person1>{//实现Comparable接口使Person具有比较性 private String name; private int age; Person1(String name,int age){ this.name=name; this.age=age; } public String getName(){ return name; } public int getAge(){ return age; } //实现接口中的方法(自定义按年龄顺序排序,年龄相同比较名字) public int compareTo(Person1 p){ if(this.age>p.age){ return 1; }if(this.age==p.age){ return this.name.compareTo(p.name); } return -1; } //重写toString方法 public String toString(){ return this.getName()+this.getAge(); } } public class TreeSetDemo { public static void main(String[] args) { TreeSet<Person1> ts=new TreeSet<Person1>(); ts.add(new Person1("zhangsan",18)); ts.add(new Person1("lisi",19)); ts.add(new Person1("wangwu",20)); ts.add(new Person1("zhangsan",18));//姓名年龄一样,添加失败 //取出元素 for(Iterator<Person1> it=ts.iterator();it.hasNext();){ System.out.println(it.next()); } } }
[ "you@example.com" ]
you@example.com
2b082e14718d68c609e849d5aa49a774f69ee770
e49ddf6e23535806c59ea175b2f7aa4f1fb7b585
/tags/release-2.4/mipav/src/gov/nih/mipav/view/dialogs/JDialogGridOptions.java
2829f95a37d2009528bc4bafc19102eed2c32543
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
svn2github/mipav
ebf07acb6096dff8c7eb4714cdfb7ba1dcace76f
eb76cf7dc633d10f92a62a595e4ba12a5023d922
refs/heads/master
2023-09-03T12:21:28.568695
2019-01-18T23:13:53
2019-01-18T23:13:53
130,295,718
1
0
null
null
null
null
UTF-8
Java
false
false
5,465
java
package gov.nih.mipav.view.dialogs; import gov.nih.mipav.model.file.*; import gov.nih.mipav.view.*; import java.awt.event.*; import java.awt.*; import javax.swing.*; /** * Sets options for overlaying a grid on the image. * @author ben * @version 1.0 */ public class JDialogGridOptions extends JDialogBase { private ViewJComponentEditImage comp; private JButton colorButton; private JTextField widthField; private JTextField heightField; private String unitsStr; private float width; private float height; private Color color; private ViewJColorChooser chooser; /** * Creates new dialog for entering parameters for entropy minimization. * @param theParentFrame Parent frame * @param im Source image */ public JDialogGridOptions(Frame theParentFrame, ViewJComponentEditImage comp) { super(theParentFrame, false); this.comp = comp; unitsStr = FileInfoBase.getUnitsOfMeasureAbbrevStr(comp.getActiveImage().getFileInfo()[0].getUnitsOfMeasure(0)); this.width = comp.getGridSpacingX(); this.height = comp.getGridSpacingY(); this.color = comp.getGridColor(); init(); } /** * Sets up the GUI (panels, buttons, etc) and displays it on the screen. */ private void init() { setTitle("Grid Overlay Options"); GridBagConstraints gbc = new GridBagConstraints(); gbc.weightx = 1; gbc.gridwidth = 1; int yPos = 0; gbc.anchor = gbc.WEST; gbc.fill = gbc.HORIZONTAL; JPanel paramPanel = new JPanel(new GridBagLayout()); JLabel widthLabel = new JLabel("width (" + unitsStr + "): "); JLabel heightLabel = new JLabel("height (" + unitsStr + "): " ); JLabel colorLabel = new JLabel("color: "); widthField = new JTextField(Float.toString(width), 4); heightField = new JTextField(Float.toString(height), 4); MipavUtil.makeNumericsOnly(widthField, true); MipavUtil.makeNumericsOnly(heightField, true); colorButton = new JButton(MipavUtil.getIcon("transparent.gif")); colorButton.setForeground(color); colorButton.setBackground(color); colorButton.addActionListener(this); colorButton.setActionCommand("Color"); gbc.insets = new Insets(0,5,0,5); paramPanel.add(widthLabel, gbc); gbc.gridx = 1; paramPanel.add(widthField, gbc); gbc.gridx = 2; paramPanel.add(heightLabel, gbc); gbc.gridx = 3; paramPanel.add(heightField, gbc); gbc.gridx = 4; paramPanel.add(colorLabel, gbc); gbc.gridx = 5; gbc.weightx = 0; gbc.fill = gbc.NONE; paramPanel.add(colorButton, gbc); JPanel mainPanel = new JPanel(); mainPanel.add(paramPanel); mainPanel.setBorder(buildTitledBorder("")); JPanel buttonPanel = new JPanel(); buildOKButton(); OKButton.setText("Apply"); buttonPanel.add(OKButton); buildCancelButton(); cancelButton.setText("Close"); buttonPanel.add(cancelButton); getContentPane().add(mainPanel); getContentPane().add(buttonPanel, BorderLayout.SOUTH); pack(); setResizable(false); setVisible(true); } /** * Check width and height for validity * @return boolean is okay */ private boolean setVariables() { try { width = Float.parseFloat(widthField.getText()); height = Float.parseFloat(heightField.getText()); if (width <= 0 || height <= 0) { MipavUtil.displayError("Values must be greater than 0"); return false; } } catch (Exception ex) { return false; } return true; } /** * actionPerformed - Closes dialog box when the OK button is pressed and * calls the algorithm * @param event event that triggers function */ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); Object source = event.getSource(); if (command.equals("Apply")) { if (setVariables()) { comp.setGridSpacingX(width); comp.setGridSpacingY(height); comp.setGridColor(color); if (comp.getGridOverlay()) { comp.paintComponent(comp.getGraphics()); } } } else if (command.equals("Color")) { chooser = new ViewJColorChooser(new Frame(), "Pick VOI color", new OkColorListener(), new CancelListener()); } else if (command.equals("Close")) { setVisible(false); dispose(); } } /** * Pick up the selected color and call method to change the VOI color * */ class OkColorListener implements ActionListener { /** * Get color from chooser and set button * and VOI color. * @param e Event that triggered function. */ public void actionPerformed(ActionEvent e) { Color newColor = chooser.getColor(); colorButton.setBackground(newColor); color = newColor; } } /** * Does nothing. */ class CancelListener implements ActionListener { /** * Does nothing. */ public void actionPerformed(ActionEvent e) { } } }
[ "NIH\\mccreedy@ba61647d-9d00-f842-95cd-605cb4296b96" ]
NIH\mccreedy@ba61647d-9d00-f842-95cd-605cb4296b96
45f238c1296200b126984c47702f55138dd4d160
41972da770ede5a26909a95e3717b283029bce89
/src/com/wiseweb/ui/Code.java
009876fd6dcb51ef1a105617febe82166d3c09e8
[]
no_license
feng99721480/movieApp
1d44074354a26f8d7fa61164bbe04bf8bd939086
597d659f9d4870849366ba69cb7e1fe7832407af
refs/heads/master
2021-01-10T11:27:09.245478
2015-06-04T02:44:09
2015-06-04T02:44:09
36,779,148
0
0
null
null
null
null
UTF-8
Java
false
false
4,714
java
package com.wiseweb.ui; import java.util.Random; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Bitmap.Config; public class Code { private static final char[] CHARS = { '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; private static Code bmpCode; public static Code getInstance() { if(bmpCode == null) bmpCode = new Code(); return bmpCode; } //default settings private static final int DEFAULT_CODE_LENGTH = 4; private static final int DEFAULT_FONT_SIZE = 30; private static final int DEFAULT_LINE_NUMBER = 2; private static final int BASE_PADDING_LEFT = 10, RANGE_PADDING_LEFT = 15, BASE_PADDING_TOP = 15, RANGE_PADDING_TOP = 20; private static final int DEFAULT_WIDTH = 100, DEFAULT_HEIGHT = 50; //settings decided by the layout xml //canvas width and height private int width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT; //random word space and pading_top private int base_padding_left = BASE_PADDING_LEFT, range_padding_left = RANGE_PADDING_LEFT, base_padding_top = BASE_PADDING_TOP, range_padding_top = RANGE_PADDING_TOP; //number of chars, lines; font size private int codeLength = DEFAULT_CODE_LENGTH, line_number = DEFAULT_LINE_NUMBER, font_size = DEFAULT_FONT_SIZE; //variables private String code; private int padding_left, padding_top; private Random random = new Random(); //��֤��ͼƬ public Bitmap createBitmap() { padding_left = 0; Bitmap bp = Bitmap.createBitmap(width, height, Config.ARGB_8888); Canvas c = new Canvas(bp); code = createCode(); c.drawColor(Color.WHITE); Paint paint = new Paint(); paint.setTextSize(font_size); for (int i = 0; i < code.length(); i++) { randomTextStyle(paint); randomPadding(); c.drawText(code.charAt(i) + "", padding_left, padding_top, paint); } for (int i = 0; i < line_number; i++) { drawLine(c, paint); } c.save( Canvas.ALL_SAVE_FLAG );//���� c.restore();// return bp; } public String getCode() { return code; } //��֤�� private String createCode() { StringBuilder buffer = new StringBuilder(); for (int i = 0; i < codeLength; i++) { buffer.append(CHARS[random.nextInt(CHARS.length)]); } return buffer.toString(); } private void drawLine(Canvas canvas, Paint paint) { int color = randomColor(); int startX = random.nextInt(width); int startY = random.nextInt(height); int stopX = random.nextInt(width); int stopY = random.nextInt(height); paint.setStrokeWidth(1); paint.setColor(color); canvas.drawLine(startX, startY, stopX, stopY, paint); } private int randomColor() { return randomColor(1); } private int randomColor(int rate) { int red = random.nextInt(256) / rate; int green = random.nextInt(256) / rate; int blue = random.nextInt(256) / rate; return Color.rgb(red, green, blue); } private void randomTextStyle(Paint paint) { int color = randomColor(); paint.setColor(color); paint.setFakeBoldText(random.nextBoolean()); //trueΪ���壬falseΪ�Ǵ��� float skewX = random.nextInt(11) / 10; skewX = random.nextBoolean() ? skewX : -skewX; paint.setTextSkewX(skewX); //float���Ͳ������ʾ��б��������б // paint.setUnderlineText(true); //trueΪ�»��ߣ�falseΪ���»��� // paint.setStrikeThruText(true); //trueΪɾ���ߣ�falseΪ��ɾ���� } private void randomPadding() { padding_left += base_padding_left + random.nextInt(range_padding_left); padding_top = base_padding_top + random.nextInt(range_padding_top); } }
[ "Lenovo@Lenovo-PC" ]
Lenovo@Lenovo-PC
0f9b50d20d754fce5b3dae5a0b8ee17cf908669b
559ea64c50ae629202d0a9a55e9a3d87e9ef2072
/com/cnmobi/im/util/DateUtils.java
06f05f6ee6b32f7d947c5985a450ce0c8108d8f6
[]
no_license
CrazyWolf2014/VehicleBus
07872bf3ab60756e956c75a2b9d8f71cd84e2bc9
450150fc3f4c7d5d7230e8012786e426f3ff1149
refs/heads/master
2021-01-03T07:59:26.796624
2016-06-10T22:04:02
2016-06-10T22:04:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,719
java
package com.cnmobi.im.util; import com.google.protobuf.DescriptorProtos.FieldOptions; import com.google.protobuf.DescriptorProtos.MessageOptions; import com.google.protobuf.DescriptorProtos.UninterpretedOption; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import org.xbill.DNS.KEYRecord; public class DateUtils { public static Date parse(String dateStr, String format) { Date result = null; try { result = new SimpleDateFormat(format).parse(dateStr); } catch (ParseException e) { e.printStackTrace(); } return result; } public static String format(Date date, String format) { return new SimpleDateFormat(format).format(date); } public static String getWeekDay(Date date) { switch (date.getDay()) { case KEYRecord.OWNER_USER /*0*/: return "\u661f\u671f\u5929"; case MessageOptions.MESSAGE_SET_WIRE_FORMAT_FIELD_NUMBER /*1*/: return "\u661f\u671f\u4e00"; case MessageOptions.NO_STANDARD_DESCRIPTOR_ACCESSOR_FIELD_NUMBER /*2*/: return "\u661f\u671f\u4e8c"; case FieldOptions.DEPRECATED_FIELD_NUMBER /*3*/: return "\u661f\u671f\u4e09"; case UninterpretedOption.POSITIVE_INT_VALUE_FIELD_NUMBER /*4*/: return "\u661f\u671f\u56db"; case UninterpretedOption.NEGATIVE_INT_VALUE_FIELD_NUMBER /*5*/: return "\u661f\u671f\u4e94"; case UninterpretedOption.DOUBLE_VALUE_FIELD_NUMBER /*6*/: return "\u661f\u671f\u516d"; default: return null; } } }
[ "ahhmedd16@hotmail.com" ]
ahhmedd16@hotmail.com
1ccb20781bcea5c344e3406dfae58c58445778f6
2431af653419370f5b5fd955b8c5408f1ef94dae
/src/com/javaintroduction/TaskOnVariables.java
f8527df472289a037b4639b332a11c225be4b19d
[]
no_license
prathapSEDT/TMSEL-DailyCODE
d38acd8d3e8194f94b4e8973574cc426d773b3b5
4031154f323606d3c41fee4ecc15c59d90dccbd7
refs/heads/master
2023-03-14T20:08:22.837083
2021-02-23T05:11:46
2021-02-23T05:11:46
341,436,163
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package com.javaintroduction; public class TaskOnVariables { public static void main(String[] args) { int a,b; a=30; b=40; // swap two numbers, a==> 40 b==>30 a=a+b;// 70 b=a-b;//70-40=30 a=a-b;//70-30=40 System.out.println(a+" "+b); } }
[ "prathap.ufttest@gmail.com" ]
prathap.ufttest@gmail.com
b7b175e93432ffdf786199b5feff6b5ee89310d2
eb2690583fc03c0d9096389e1c07ebfb80e7f8d5
/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01733.java
e16fc956f1c9f8dc5de34f0eeb80c1e8221121b3
[]
no_license
leroy-habberstad/java-benchmark
126671f074f81bd7ab339654ed1b2d5d85be85dd
bce2a30bbed61a7f717a9251ca2cbb38b9e6a732
refs/heads/main
2023-03-15T03:02:42.714614
2021-03-23T00:03:36
2021-03-23T00:03:36
350,495,796
0
0
null
null
null
null
UTF-8
Java
false
false
3,498
java
/** * OWASP Benchmark Project v1.2 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>. * * The OWASP Benchmark 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, version 2. * * The OWASP Benchmark 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. * * @author Dave Wichers <a href="https://www.aspectsecurity.com">Aspect Security</a> * @created 2015 */ package org.owasp.benchmark.testcode; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(value="/sqli-03/BenchmarkTest01733") public class BenchmarkTest01733 extends HttpServlet { private static final long serialVersionUID = 1L; @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); String queryString = request.getQueryString(); String paramval = "BenchmarkTest01733"+"="; int paramLoc = -1; if (queryString != null) paramLoc = queryString.indexOf(paramval); if (paramLoc == -1) { response.getWriter().println("getQueryString() couldn't find expected parameter '" + "BenchmarkTest01733" + "' in query string."); return; } String param = queryString.substring(paramLoc + paramval.length()); // 1st assume "BenchmarkTest01733" param is last parameter in query string. // And then check to see if its in the middle of the query string and if so, trim off what comes after. int ampersandLoc = queryString.indexOf("&", paramLoc); if (ampersandLoc != -1) { param = queryString.substring(paramLoc + paramval.length(), ampersandLoc); } param = java.net.URLDecoder.decode(param, "UTF-8"); String bar = new Test().doSomething(request, param); String sql = "INSERT INTO users (username, password) VALUES ('foo','"+ bar + "')"; try { java.sql.Statement statement = org.owasp.benchmark.helpers.DatabaseHelper.getSqlStatement(); int count = statement.executeUpdate( sql, new String[] {"USERNAME","PASSWORD"} ); org.owasp.benchmark.helpers.DatabaseHelper.outputUpdateComplete(sql, response); } catch (java.sql.SQLException e) { if (org.owasp.benchmark.helpers.DatabaseHelper.hideSQLErrors) { response.getWriter().println( "Error processing request." ); return; } else throw new ServletException(e); } } // end doPost private class Test { public String doSomething(HttpServletRequest request, String param) throws ServletException, IOException { org.owasp.benchmark.helpers.ThingInterface thing = org.owasp.benchmark.helpers.ThingFactory.createThing(); String bar = thing.doSomething(param); return bar; } } // end innerclass Test } // end DataflowThruInnerClass
[ "jjohnson@gitlab.com" ]
jjohnson@gitlab.com
e7616b8311d11a5802945a90f1a05bb79ddc9b7f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_15fa01a72f25d2828339cd116a2a7d7972b980a9/TwitterManagerImpl/29_15fa01a72f25d2828339cd116a2a7d7972b980a9_TwitterManagerImpl_s.java
151b5b8d8c3d59ebcfe7269626e1a6918ae9ea7a
[]
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
1,636
java
/** * */ package org.soluvas.web.login; import twitter4j.Twitter; import twitter4j.TwitterFactory; import twitter4j.auth.AccessToken; /** * @author haidar * */ public class TwitterManagerImpl implements TwitterManager { private final String consumerKey; private final String consumerSecret; private final Twitter twitter; public TwitterManagerImpl(String consumerKey, String consumerSecret) { super(); this.consumerKey = consumerKey; this.consumerSecret = consumerSecret; twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(consumerKey, consumerSecret); } @Override public Twitter getTwitter() { return twitter; } @Override public Twitter createTwitter(String accessToken, String accessTokenSecret) { final Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(consumerKey, consumerSecret); twitter.setOAuthAccessToken(new AccessToken(accessToken, accessTokenSecret)); return twitter; } /* (non-Javadoc) * @see org.soluvas.web.login.FacebookManager#getAppId() */ @Override public String getConsumerKey() { return consumerKey; } /* (non-Javadoc) * @see org.soluvas.web.login.FacebookManager#getAppSecret() */ @Override public String getConsumerSecret() { return consumerSecret; } // String appId = "260800077384280"; // String appSecret = "21f77dcd8501b12354b889ff32f96fad"; // String redirectUri = "http://www.berbatik5.haidar.dev/fb_recipient/"; // UUID state = UUID.randomUUID(); // String facebookRedirectUri = "https://www.facebook.com/dialog/oauth"; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e3295e56b9715b7ecdd317cb1a405fb2bf395e37
791ddf4cbc563f533e7d00a9259e24fe85008877
/kernel/src/test/java/org/jboss/test/kernel/dependency/test/GenericBeanFactoryCallbackDependencyXMLTestCase.java
3e6d792c2fa57f873005a6cc968faa04ec7075c2
[]
no_license
wolfc/microcontainer
7dd1fe85057c31575458ad1a22c3f74534f72bd0
4ef8127e690e18f54f40287b72f68dbf3541b07c
refs/heads/master
2020-04-25T23:27:30.830476
2013-01-09T14:15:50
2013-01-09T14:15:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,575
java
/* * JBoss, Home of Professional Open Source * Copyright 2006, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.kernel.dependency.test; import junit.framework.Test; /** * Callback Dependency Test Case. * * @author <a href="ales.justin@jboss.com">Ales Justin</a> */ public class GenericBeanFactoryCallbackDependencyXMLTestCase extends GenericBeanFactoryCallbackDependencyTestCase { public static Test suite() { return suite(GenericBeanFactoryCallbackDependencyXMLTestCase.class); } public GenericBeanFactoryCallbackDependencyXMLTestCase(String name) throws Throwable { super(name, true); } }
[ "ajustin@redhat.com" ]
ajustin@redhat.com
52649841ff8e6bc76588b4a4deb8331a09b2033d
fdcf2af8597b33110799fed80bb7303fbc7c06e2
/test-spring-boot-starter/src/main/java/org/javaboy/logging/TimeLogAutoConfiguration.java
b92314c004547e34832847de0b66319a9c2402b7
[]
no_license
MrDongShan/javaboy-code-samples
82b5ecf245cf14e693ee8e4f14d002572c01f4f2
5e7af1d93a4acc6c50c2ca5ec1e80ee9da42d057
refs/heads/master
2023-07-06T02:48:08.621361
2023-05-14T14:01:53
2023-05-14T14:01:53
245,963,632
0
0
null
null
null
null
UTF-8
Java
false
false
1,797
java
package org.javaboy.logging; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; import static org.slf4j.LoggerFactory.getLogger; /** * @author 江南一点雨 * @微信公众号 江南一点雨 spring * @网站 http://www.itboyhub.com * @国际站 http://www.javaboy.org * @微信 a_java_boy * @GitHub https://github.com/lenve * @Gitee https://gitee.com/lenve */ @Configuration @Aspect @EnableAspectJAutoProxy //@ComponentScan("org.javaboy.logging") @AutoConfigurationPackage @ConditionalOnProperty(prefix = "time.log", name = "enable", havingValue = "true", matchIfMissing = true) public class TimeLogAutoConfiguration { @Autowired UserMapper userMapper; private static final Logger logger = getLogger(TimeLogAutoConfiguration.class); @Around("@annotation(org.javaboy.logging.TimeLog)") public Object around(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { String name = proceedingJoinPoint.getSignature().toLongString().split(" ")[2]; long startTime = System.currentTimeMillis(); Object result = proceedingJoinPoint.proceed(); long endTime = System.currentTimeMillis(); logger.info("方法 {} 耗时 {} ms", name, endTime - startTime); return result; } }
[ "wangsong0210@gmail.com" ]
wangsong0210@gmail.com
5c4990bceea4d91239f16bdd198db95f879edc84
ae50b4469b9818e5fb966c010e97057896739e9e
/app/src/main/java/com/wxxiaomi/ming/electricbicycle/ui/presenter/del/SplashPre.java
ee0fbab9eac2cc060f3a9b1c70534f74328203f8
[]
no_license
mingfenghappy/ASElectricBicycle
187c819afb837e1bdac7465fa87a85b6386842d0
12927e41e4022f0f70738225570db8151c7d8a79
refs/heads/master
2021-05-11T09:51:59.981887
2017-06-08T14:01:01
2017-06-08T14:01:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
//package com.wxxiaomi.ming.electricbicycle.core.presenter; // // //import com.wxxiaomi.ming.electricbicycle.core.presenter.base.BasePre; //import com.wxxiaomi.ming.electricbicycle.core.activity.base.BaseView; // // ///** // * Created by 12262 on 2016/5/28. // */ //public interface SplashPre<V extends BaseView> extends BasePre<V> { // void loadConfig(); //}
[ "122627018@qq.com" ]
122627018@qq.com
c0d3de68758eccabf9d858ca1b48b9c6d778d1c0
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/orientechnologies--orientdb/ff1f5a5a465454a72a263288ee0e77c0c01c01d7/after/OLuceneIndexFactory.java
fd081e15eec489bdf01786bf4c895f45d9c24e54
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
5,699
java
/* * Copyright 2010-2016 OrientDB LTD (http://orientdb.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.orientechnologies.lucene; import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.lucene.engine.OLuceneIndexEngineDelegator; import com.orientechnologies.lucene.index.OLuceneFullTextIndex; import com.orientechnologies.orient.core.Orient; import com.orientechnologies.orient.core.db.ODatabaseInternal; import com.orientechnologies.orient.core.db.ODatabaseLifecycleListener; import com.orientechnologies.orient.core.exception.OConfigurationException; import com.orientechnologies.orient.core.index.OIndexEngine; import com.orientechnologies.orient.core.index.OIndexFactory; import com.orientechnologies.orient.core.index.OIndexInternal; import com.orientechnologies.orient.core.metadata.schema.OClass; import com.orientechnologies.orient.core.record.impl.ODocument; import com.orientechnologies.orient.core.sql.OCommandSQL; import com.orientechnologies.orient.core.storage.OStorage; import com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage; import org.apache.lucene.analysis.standard.StandardAnalyzer; import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; import static com.orientechnologies.orient.core.metadata.schema.OClass.INDEX_TYPE.*; public class OLuceneIndexFactory implements OIndexFactory, ODatabaseLifecycleListener { public static final String LUCENE_ALGORITHM = "LUCENE"; public static final String LUCENE_ALL_ALGORITHM = "LUCENE_ALL"; private static final Set<String> TYPES; private static final Set<String> ALGORITHMS; static { final Set<String> types = new HashSet<String>(); types.add(FULLTEXT.toString()); TYPES = Collections.unmodifiableSet(types); } static { final Set<String> algorithms = new HashSet<String>(); algorithms.add(LUCENE_ALGORITHM); algorithms.add(LUCENE_ALL_ALGORITHM); ALGORITHMS = Collections.unmodifiableSet(algorithms); } public OLuceneIndexFactory() { this(false); } public OLuceneIndexFactory(boolean manual) { if (!manual) Orient.instance().addDbLifecycleListener(this); } @Override public int getLastVersion() { return 0; } @Override public Set<String> getTypes() { return TYPES; } @Override public Set<String> getAlgorithms() { return ALGORITHMS; } @Override public OIndexInternal<?> createIndex(String name, OStorage storage, String indexType, String algorithm, String valueContainerAlgorithm, ODocument metadata, int version) throws OConfigurationException { OAbstractPaginatedStorage pagStorage = (OAbstractPaginatedStorage) storage.getUnderlying(); if (metadata == null) metadata = new ODocument().field("analyzer", StandardAnalyzer.class.getName()); if (FULLTEXT.toString().equalsIgnoreCase(indexType)) { OLuceneFullTextIndex index = new OLuceneFullTextIndex(name, indexType, algorithm, version, pagStorage, valueContainerAlgorithm, metadata); return index; } throw new OConfigurationException("Unsupported type : " + algorithm); } @Override public OIndexEngine createIndexEngine(String algorithm, String name, Boolean durableInNonTxMode, OStorage storage, int version, Map<String, String> engineProperties) { return new OLuceneIndexEngineDelegator(name, algorithm, durableInNonTxMode, storage, version); } @Override public PRIORITY getPriority() { return PRIORITY.REGULAR; } @Override public void onCreate(ODatabaseInternal db) { OLogManager.instance().debug(this, "onCreate"); createCrossClassSearchIndex(db); } @Override public void onOpen(ODatabaseInternal db) { OLogManager.instance().debug(this, "onOpen"); createCrossClassSearchIndex(db); } @Override public void onClose(ODatabaseInternal db) { OLogManager.instance().debug(this, "onClose"); } @Override public void onDrop(final ODatabaseInternal db) { try { if (db.isClosed()) return; OLogManager.instance().debug(this, "Dropping Lucene indexes..."); db.getMetadata().getIndexManager().getIndexes().stream() .filter(idx -> idx.getInternal() instanceof OLuceneFullTextIndex) .forEach(idx -> { OLogManager.instance().debug(this, "- index '%s'", idx.getName()); idx.delete(); }); } catch (Exception e) { OLogManager.instance().warn(this, "Error on dropping Lucene indexes", e); } } @Override public void onCreateClass(ODatabaseInternal db, OClass oClass) { } @Override public void onDropClass(ODatabaseInternal db, OClass oClass) { } @Override public void onLocalNodeConfigurationRequest(ODocument iConfiguration) { } private void createCrossClassSearchIndex(ODatabaseInternal db) { if (!db.getMetadata().getIndexManager().existsIndex("CrossClassSearchIndex")) { OLogManager.instance().debug(this, "creating cross class index"); db.command(new OCommandSQL( "create index CrossClassSearchIndex FULLTEXT ENGINE LUCENE_ALL")).execute(); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
d887046d60c8674e3a779afb2059bf6fbd944af9
b56c075c634f5c3a4dcee55f0279483c325ce55f
/rxbinding/src/main/java/com/jakewharton/rxbinding2/view/ViewGroupHierarchyChildViewRemoveEvent.java
db95edbbc650bc00900a8c68efc97e9aadbb639b
[ "Apache-2.0" ]
permissive
SamYStudiO/RxBinding
026a50f75024f93dd375cfa237d11288f1bdbc1b
6b5f5ddc663c413258400bdc1d6e3537001d8205
refs/heads/master
2020-03-31T06:37:20.791912
2018-09-25T20:27:51
2018-09-25T20:27:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
895
java
package com.jakewharton.rxbinding2.view; import android.content.Context; import android.support.annotation.CheckResult; import android.support.annotation.NonNull; import android.view.View; import android.view.ViewGroup; import com.google.auto.value.AutoValue; /** * A child view remove event on a {@link ViewGroup}. * <p> * <strong>Warning:</strong> Instances keep a strong reference to the view. Operators that cache * instances have the potential to leak the associated {@link Context}. */ @AutoValue public abstract class ViewGroupHierarchyChildViewRemoveEvent extends ViewGroupHierarchyChangeEvent { @CheckResult @NonNull public static ViewGroupHierarchyChildViewRemoveEvent create(@NonNull ViewGroup viewGroup, @NonNull View child) { return new AutoValue_ViewGroupHierarchyChildViewRemoveEvent(viewGroup, child); } ViewGroupHierarchyChildViewRemoveEvent() { } }
[ "jw@squareup.com" ]
jw@squareup.com
78c5c894fc57db841fe95b4889b9c3923c96acf8
6954bfa848c1cd64acf51b074cbce67d798d697a
/src/main/java/com/github/vindell/jmxutils/CapacityUtils.java
4dc84679b32932c13ef5297ab5008fe2581eab86
[ "Apache-2.0" ]
permissive
hiwepy/jmxutils
53a722a22be14204010815c3e0f955a2c21cb427
c60a9a11b82c5eb02c79315002f93563040713ea
refs/heads/master
2020-03-11T13:49:37.596731
2018-04-18T11:36:21
2018-04-18T11:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,985
java
/* * Copyright (c) 2010-2020, vindell (https://github.com/vindell). * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.github.vindell.jmxutils; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public abstract class CapacityUtils { protected static Logger LOG = LoggerFactory.getLogger(CapacityUtils.class); protected static Pattern pattern_find = Pattern.compile("^([1-9]\\d*|[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)(B|KB|MB|GB|TB|PB|EB|ZB|YB|BB)$"); protected static Map<String,Unit> powers = new HashMap<String, Unit>(); public static enum Unit { /** * 未指定单位 */ NONE("none" , BigDecimal.ONE), /** * 1B = 1024bit * 8 */ B("B" , BigDecimal.valueOf(1024 * 8)), /** * 1KB(Kilobyte 千字节)=1024Byte */ KB("KB" , BigDecimal.valueOf(1024)), /** * 1MB(Megabyte 兆字节 简称“兆”)=1024KB */ MB("MB" , BigDecimal.valueOf(1024 * 1024)), /** * 1GB(Gigabyte 吉字节 又称“千兆”)=1024MB */ GB("GB" , BigDecimal.valueOf(1024 * 1024 * 1024)), /** * 1TB(Trillionbyte 万亿字节 太字节)=1024GB */ TB("TB" , BigDecimal.valueOf(1024 * 1024 * 1024 * 1024)), /** * 1PB(Petabyte 千万亿字节 拍字节)=1024TB */ PB("PB" , BigDecimal.valueOf(1024 * 1024 * 1024 * 1024 * 1024)), /** * 1EB(Exabyte 百亿亿字节 艾字节)=1024PB */ EB("EB" , BigDecimal.valueOf(1024 * 1024 * 1024 * 1024 * 1024 * 1024)), /** * 1ZB(Zettabyte 十万亿亿字节 泽字节)= 1024 EB */ ZB("ZB" , BigDecimal.valueOf(1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024)), /** * 1YB(Yottabyte 一亿亿亿字节 尧字节)= 1024 ZB */ YB("YB" , BigDecimal.valueOf(1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024)), /** * 1BB(Brontobyte 一千亿亿亿字节)= 1024 YB */ BB("BB" , BigDecimal.valueOf(1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024)); protected String key; protected BigDecimal value; Unit(String key,BigDecimal value){ this.key = key; this.value = value; } public String getKey() { return key; } public BigDecimal getValue() { return value; } } static{ powers.put(Unit.KB.getKey(), Unit.KB); powers.put(Unit.MB.getKey(), Unit.MB); powers.put(Unit.GB.getKey(), Unit.GB); powers.put(Unit.TB.getKey(), Unit.TB); powers.put(Unit.PB.getKey(), Unit.PB); powers.put(Unit.EB.getKey(), Unit.EB); powers.put(Unit.ZB.getKey(), Unit.ZB); powers.put(Unit.YB.getKey(), Unit.YB); powers.put(Unit.BB.getKey(), Unit.BB); } /** * 计算指定数值单位对应的字节数:如 1KB 计算得到 1024 */ public static BigDecimal getCapacity(String value){ if (value==null||value.trim().length() == 0) { return BigDecimal.ZERO; } value = value.trim().toUpperCase(); Matcher matcher = pattern_find.matcher(value); if(matcher.find()) { BigDecimal num = new BigDecimal(matcher.group(1)); BigDecimal mult = powers.get(matcher.group(2)).getValue(); return num.multiply(mult); } else { return BigDecimal.ZERO; } } public static long getLongCapacity(String value){ if (value==null||value.trim().length() == 0) { return 0; } value = value.trim().toUpperCase(); Matcher matcher = pattern_find.matcher(value); if(matcher.find()) { Long num = Long.valueOf(matcher.group(1)); BigDecimal mult = powers.get(matcher.group(2)).getValue(); return num.longValue() * mult.longValue(); } else { return 0; } } public static float getFloatCapacity(String value){ if (value==null||value.trim().length() == 0) { return 0; } value = value.trim().toUpperCase(); Matcher matcher = pattern_find.matcher(value); if(matcher.find()) { Float num = Float.valueOf(matcher.group(1)); BigDecimal mult = powers.get(matcher.group(2)).getValue(); return num.floatValue() * mult.floatValue(); } else { return -1; } } public static BigDecimal getCapacity(long value,Unit unit){ return getCapacity(value, unit, 0); } public static String getCapacityString(long value,Unit unit){ return getCapacityString(value, unit, 0); } /** * @description : 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指 定精度,以后的数字四舍五入。 * @date :2017年6月19日 下午4:21:38 * @param value * @param unit * @param scale * @return */ public static BigDecimal getCapacity(long value,Unit unit, int scale){ if (scale < 0) { throw new IllegalArgumentException("The scale must be a positive integer or zero"); } if(LOG.isDebugEnabled()){ LOG.debug("value :{} , unit {}, scale {}", value, unit.getKey(), scale); } if(unit.getKey().equals(Unit.KB.getKey())){ BigDecimal num = new BigDecimal((value >> 10)); return num.divide(BigDecimal.ONE, scale, BigDecimal.ROUND_HALF_DOWN); } BigDecimal num = new BigDecimal(value); return num.divide( unit.getValue(), scale, BigDecimal.ROUND_HALF_DOWN); } public static String getCapacityString(long value,Unit unit, int scale){ BigDecimal val = getCapacity(value, unit, scale); return val.toPlainString() + "" + unit.getKey(); } /** * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指 定精度,以后的数字四舍五入。 * * @param v1 被除数 * @param v2 除数 * @param scale 表示表示需要精确到小数点以后几位。 * @return 两个参数的商 */ public static double div(double v1, double v2, int scale) { if (scale < 0) { throw new IllegalArgumentException("The scale must be a positive integer or zero"); } if(LOG.isDebugEnabled()){ LOG.debug("v1 :{} , v2 {}, scale {}", v1, v2, scale); } try { BigDecimal b1 = new BigDecimal(String.valueOf(v1)); BigDecimal b2 = new BigDecimal(String.valueOf(v2)); return b1.divide(b2.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ONE : b2, scale, BigDecimal.ROUND_HALF_UP).doubleValue(); } catch (Exception e) { LOG.error("v1 :{} , v2 {}, scale {}", v1, v2, scale); LOG.error(e.getMessage()); return 0; } } }
[ "hnxyhcwdl1003@163.com" ]
hnxyhcwdl1003@163.com
a2b154c022c30018ab18df376d0777493e599c17
23d21d575da06d8a0f0c3a266915df321b5154eb
/java/designpattern/src/main/java/designpattern/gof_flyweight/sample01/NoodleContext.java
5fed6cef9d7156bfb94bcf2dbf4e276ca2b1fa7e
[]
no_license
keepinmindsh/sample
180431ce7fce20808e65d885eab1ca3dca4a76a9
4169918f432e9008b4715f59967f3c0bd619d3e6
refs/heads/master
2023-04-30T19:26:44.510319
2023-04-23T12:43:43
2023-04-23T12:43:43
248,352,910
4
0
null
2023-03-05T23:20:43
2020-03-18T22:03:16
Java
UTF-8
Java
false
false
272
java
package designpattern.gof_flyweight.sample01; public class NoodleContext { private final int tableNumber; public NoodleContext(int tableNumber) { this.tableNumber = tableNumber; } public int getTable() { return this.tableNumber; } }
[ "keepinmindsh@gmail.com" ]
keepinmindsh@gmail.com
0220ede5d0b5427d80389bd7e722cc085af15cb6
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_47_buggy/mutated/76/Cleaner.java
222d18a815c1fbe45c065f53fd4b5daf7832a19f
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,266
java
package org.jsoup.safety; import org.jsoup.helper.Validate; import org.jsoup.nodes.*; import org.jsoup.parser.Tag; import java.util.List; /** The whitelist based HTML cleaner. Use to ensure that end-user provided HTML contains only the elements and attributes that you are expecting; no junk, and no cross-site scripting attacks! <p/> The HTML cleaner parses the input as HTML and then runs it through a white-list, so the output HTML can only contain HTML that is allowed by the whitelist. <p/> It is assumed that the input HTML is a body fragment; the clean methods only pull from the source's body, and the canned white-lists only allow body contained tags. <p/> Rather than interacting directly with a Cleaner object, generally see the {@code clean} methods in {@link org.jsoup.Jsoup}. */ public class Cleaner { private Whitelist whitelist; /** Create a new cleaner, that sanitizes documents using the supplied whitelist. @param whitelist white-list to clean with */ public Cleaner(Whitelist whitelist) { Validate.notNull(whitelist); this.whitelist = whitelist; } /** Creates a new, clean document, from the original dirty document, containing only elements allowed by the whitelist. The original document is not modified. Only elements from the dirt document's <code>body</code> are used. @param dirtyDocument Untrusted base document to clean. @return cleaned document. */ public Document clean(Document dirtyDocument) { Validate.notNull(dirtyDocument); Document clean = Document.createShell(dirtyDocument.baseUri()); copySafeNodes(dirtyDocument.body(), clean.body()); return clean; } /** Dertmines if the input document is valid, against the whitelist. It is considered valid if all the tags and attributes in the input HTML are allowed by the whitelist. <p/> This method can be used as a validator for user input forms. An invalid document will still be cleaned successfully using the {@link #clean(Document)} document. If using as a validator, it is recommended to still clean the document to ensure enforced attributes are set correctly, and that the output is tidied. @param dirtyDocument document to test @return true if no tags or attributes need to be removed; false if they do */ public boolean isValid(Document dirtyDocument) { Validate.notNull(dirtyDocument); Document clean = Document.createShell(dirtyDocument.baseUri()); int numDiscarded = copySafeNodes(dirtyDocument.body(), clean.body()); return numDiscarded == 0; } /** Iterates the input and copies trusted nodes (tags, attributes, text) into the destination. @param source source of HTML @param dest destination element to copy into @return number of discarded elements (that were considered unsafe) */ private int copySafeNodes(Element source, Element dest) { List<Node> sourceChildren = source.childNodes(); int numDiscarded = 0; for (Node sourceChild : sourceChildren) { if (sourceChild instanceof Element) { Element sourceEl = (Element) sourceChild; if (whitelist.isSafeTag(sourceEl.tagName())) { // safe, clone and copy safe attrs ElementMeta meta = createSafeElement(sourceEl); Element destChild = source; dest.appendChild(destChild); numDiscarded += meta.numAttribsDiscarded; numDiscarded += copySafeNodes(sourceEl, destChild); // recurs } else { // not a safe tag, but it may have children (els or text) that are, so recurse numDiscarded++; numDiscarded += copySafeNodes(sourceEl, dest); } } else if (sourceChild instanceof TextNode) { TextNode sourceText = (TextNode) sourceChild; TextNode destText = new TextNode(sourceText.getWholeText(), sourceChild.baseUri()); dest.appendChild(destText); } // else, we don't care about comments, xml proc instructions, etc } return numDiscarded; } private ElementMeta createSafeElement(Element sourceEl) { String sourceTag = sourceEl.tagName(); Attributes destAttrs = new Attributes(); Element dest = new Element(Tag.valueOf(sourceTag), sourceEl.baseUri(), destAttrs); int numDiscarded = 0; Attributes sourceAttrs = sourceEl.attributes(); for (Attribute sourceAttr : sourceAttrs) { if (whitelist.isSafeAttribute(sourceTag, sourceEl, sourceAttr)) destAttrs.put(sourceAttr); else numDiscarded++; } Attributes enforcedAttrs = whitelist.getEnforcedAttributes(sourceTag); destAttrs.addAll(enforcedAttrs); return new ElementMeta(dest, numDiscarded); } private static class ElementMeta { Element el; int numAttribsDiscarded; ElementMeta(Element el, int numAttribsDiscarded) { this.el = el; this.numAttribsDiscarded = numAttribsDiscarded; } } }
[ "justinwm@163.com" ]
justinwm@163.com
b54d50cd96a4e80a380a363a7fd36ea41151377c
934dbba2ae7f63c7a8e6bd21e34d7cd252e44244
/src/main/java/io/springfox/spring/boot/model/UiConfig.java
7048b76d1f423bdb0c717c837b620e2d5a44339a
[ "Apache-2.0" ]
permissive
lukehuang/webflux-swagger2-spring-boot-starter
b1ac98ece0aefa14fbe2ca4e441806b4fe9f588d
0ec9a787556e49de6e02640a690163eaa3615b65
refs/heads/master
2020-09-22T12:05:48.977768
2019-11-27T06:58:08
2019-11-27T06:58:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,450
java
/* * Copyright (c) 2018, vindell (https://github.com/vindell). * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package io.springfox.spring.boot.model; import springfox.documentation.swagger.web.DocExpansion; import springfox.documentation.swagger.web.ModelRendering; import springfox.documentation.swagger.web.OperationsSorter; import springfox.documentation.swagger.web.TagsSorter; public class UiConfig { private String apiSorter = "alpha"; /** * 是否启用json编辑器 **/ private Boolean jsonEditor = false; /** * 是否显示请求头信息 **/ private Boolean showRequestHeaders = true; /** * 支持页面提交的请求类型 **/ private String submitMethods = "get,post,put,delete,patch"; /** * 请求超时时间 **/ private Long requestTimeout = 10000L; private Boolean deepLinking; private Boolean displayOperationId; private Integer defaultModelsExpandDepth; private Integer defaultModelExpandDepth; private ModelRendering defaultModelRendering; /** * 是否显示请求耗时,默认false */ private Boolean displayRequestDuration = true; /** * 可选 none | list */ private DocExpansion docExpansion; /** * Boolean=false OR String */ private Object filter; private Integer maxDisplayedTags; private OperationsSorter operationsSorter; private Boolean showExtensions; private TagsSorter tagsSorter; /** * Network */ private String validatorUrl; public String getApiSorter() { return apiSorter; } public void setApiSorter(String apiSorter) { this.apiSorter = apiSorter; } public Boolean getJsonEditor() { return jsonEditor; } public void setJsonEditor(Boolean jsonEditor) { this.jsonEditor = jsonEditor; } public Boolean getShowRequestHeaders() { return showRequestHeaders; } public void setShowRequestHeaders(Boolean showRequestHeaders) { this.showRequestHeaders = showRequestHeaders; } public String getSubmitMethods() { return submitMethods; } public void setSubmitMethods(String submitMethods) { this.submitMethods = submitMethods; } public Long getRequestTimeout() { return requestTimeout; } public void setRequestTimeout(Long requestTimeout) { this.requestTimeout = requestTimeout; } public Boolean getDeepLinking() { return deepLinking; } public void setDeepLinking(Boolean deepLinking) { this.deepLinking = deepLinking; } public Boolean getDisplayOperationId() { return displayOperationId; } public void setDisplayOperationId(Boolean displayOperationId) { this.displayOperationId = displayOperationId; } public Integer getDefaultModelsExpandDepth() { return defaultModelsExpandDepth; } public void setDefaultModelsExpandDepth(Integer defaultModelsExpandDepth) { this.defaultModelsExpandDepth = defaultModelsExpandDepth; } public Integer getDefaultModelExpandDepth() { return defaultModelExpandDepth; } public void setDefaultModelExpandDepth(Integer defaultModelExpandDepth) { this.defaultModelExpandDepth = defaultModelExpandDepth; } public ModelRendering getDefaultModelRendering() { return defaultModelRendering; } public void setDefaultModelRendering(ModelRendering defaultModelRendering) { this.defaultModelRendering = defaultModelRendering; } public Boolean getDisplayRequestDuration() { return displayRequestDuration; } public void setDisplayRequestDuration(Boolean displayRequestDuration) { this.displayRequestDuration = displayRequestDuration; } public DocExpansion getDocExpansion() { return docExpansion; } public void setDocExpansion(DocExpansion docExpansion) { this.docExpansion = docExpansion; } public Object getFilter() { return filter; } public void setFilter(Object filter) { this.filter = filter; } public Integer getMaxDisplayedTags() { return maxDisplayedTags; } public void setMaxDisplayedTags(Integer maxDisplayedTags) { this.maxDisplayedTags = maxDisplayedTags; } public OperationsSorter getOperationsSorter() { return operationsSorter; } public void setOperationsSorter(OperationsSorter operationsSorter) { this.operationsSorter = operationsSorter; } public Boolean getShowExtensions() { return showExtensions; } public void setShowExtensions(Boolean showExtensions) { this.showExtensions = showExtensions; } public TagsSorter getTagsSorter() { return tagsSorter; } public void setTagsSorter(TagsSorter tagsSorter) { this.tagsSorter = tagsSorter; } public String getValidatorUrl() { return validatorUrl; } public void setValidatorUrl(String validatorUrl) { this.validatorUrl = validatorUrl; } }
[ "hnxyhcwdl1003@163.com" ]
hnxyhcwdl1003@163.com
4a29fc432cccce0655160cf207efc09705fef37c
0e06e096a9f95ab094b8078ea2cd310759af008b
/sources/com/deltadna/android/sdk/notifications/UnityInterOp.java
bf8155017462434026e1bea539cca44bd9986cee
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
302
java
package com.deltadna.android.sdk.notifications; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.TYPE}) @Retention(RetentionPolicy.SOURCE) @interface UnityInterOp { }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
4fe7ad44b68c4f7f004b910efbb1befc82332bc8
48a88aea6e9774279c8563f1be665a540e02a894
/src/edu/berkeley/nlp/PCFGLA/ParserData.java
8496aba76ea037ef9d4f1cd44e2ae7a3764b0cb7
[]
no_license
josepvalls/parserservices
0994aa0fc56919985474aaebb9fa64581928b5b4
903363685e5cea4bd50d9161d60500800e42b167
refs/heads/master
2021-01-17T08:36:23.455855
2016-01-19T19:49:54
2016-01-19T19:49:54
60,540,533
2
0
null
null
null
null
UTF-8
Java
false
false
2,045
java
package edu.berkeley.nlp.PCFGLA; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.Serializable; import java.util.Map; import java.util.zip.GZIPInputStream; /** * Stores the serialized material representing the grammar and lexicon of a * parser, and an Options that specifies things like how unknown words were * handled and how distances were binned that will also be needed to parse with * the grammar. * * @author Slav Petrov */ public class ParserData implements Serializable { Lexicon lex; Grammar gr; Map numbs; SpanPredictor sp; short[] numSubStatesArray; int h_markov; int v_markov; Binarization bin; public Binarization getBinarization() { return bin; } public short[] getNumSubStatesArray() { return numSubStatesArray; } public SpanPredictor getSpanPredictor() { return sp; } public Grammar getGrammar() { return gr; } public Lexicon getLexicon() { return lex; } public Map getNumbs() { return numbs; } public int getH_markov() { return h_markov; } public int getV_markov() { return v_markov; } public ParserData(Lexicon lex, Grammar gr, SpanPredictor sp, Map numbs, short[] nSub, int v_m, int h_m, Binarization b) { this.lex = lex; this.gr = gr; this.sp = sp; this.numbs = numbs; this.numSubStatesArray = nSub; this.h_markov = h_m; this.v_markov = v_m; this.bin = b; } public static ParserData Load(InputStream fis) { ParserData pData = null; try { GZIPInputStream gzis = new GZIPInputStream(fis); // Compressed ObjectInputStream in = new ObjectInputStream(gzis); // Load objects pData = (ParserData) in.readObject(); // Read the mix of grammars in.close(); // And close the stream. gzis.close(); fis.close(); } catch (IOException e) { System.out.println("IOException\n" + e); return null; } catch (ClassNotFoundException e) { System.out.println("Class not found!"); return null; } return pData; } private static final long serialVersionUID = 1; }
[ "josepvalls@Valls.local" ]
josepvalls@Valls.local
eaac6f45b019c9bb71d3dd5ed2edca954e3cf161
b3af315bf62362843fff244819715159f8f84812
/AalgorithmsPrac/Amazon/Designing/DeckofCards/DeckofCards.java
2abd6b65a47a0b753087d14bf735b0df0011fe05
[]
no_license
brandhill/AlgorithemAndDataStruct
dfdb6835e113dd67160a6d959753a95c0175544c
2738b53fd0b0aa502177480ceef32cfe806e5bf6
refs/heads/master
2021-06-20T12:19:57.027279
2017-05-15T23:23:57
2017-05-15T23:23:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,016
java
package Designing.DeckofCards; import java.util.Random; public class DeckofCards { Card[] cards; private int dealCount; DeckofCards() { Type[] types = {Type.Clubs,Type.Diamonds,Type.Hearts,Type.Spades}; Number[] values = {Number.Ace, Number.Two, Number.Three, Number.Four, Number.Five, Number.Six, Number.Seven, Number.Eight, Number.Nine, Number.Ten, Number.Jack, Number.Queen, Number.King}; int k = 0; cards = new Card[52]; dealCount = 0; for(int i = 0; i < types.length; i++) { for(int j=0; j< values.length; j++) { cards[k] = new Card(types[i],values[j]); System.out.println(cards[k].type+" "+cards[k].value); k++; } } } void ShuffleCards() { dealCount = 0; Random random = new Random(); int len = cards.length; for(int i=0; i< len; i++) { int temp = i + (Math.abs(random.nextInt()))%(len-i); swap(cards, i, temp); } } Card Deal() { if(dealCount==cards.length) return null; Card c = cards[dealCount]; dealCount++; return c; } void Reset() { dealCount = 0; ShuffleCards(); } void printCards() { for(int i=0; i< cards.length; i++) { System.out.println(cards[i].type+" "+cards[i].value); } } void swap(Card[] cards, int index1, int index2) { Card temp = cards[index1]; cards[index1] = cards[index2]; cards[index2] = temp; } public static void main(String[] args) { DeckofCards cards = new DeckofCards(); cards.ShuffleCards(); System.out.println("----"); cards.printCards(); System.out.println("----"); Card c = cards.Deal(); System.out.println("Deal "+ c.type+" "+c.value); c = cards.Deal(); System.out.println("Deal "+ c.type+" "+c.value); c = cards.Deal(); System.out.println("Deal "+ c.type+" "+c.value); } } class Card { Type type; Number value; Card(Type type, Number value) { this.type = type; this.value = value; } } enum Type { Spades, Diamonds, Clubs, Hearts } enum Number { Ace, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King }
[ "hrshchaitanya@gmail.com" ]
hrshchaitanya@gmail.com
c3f545516f7e89132f033ff3ba3aba6a4bbb0cda
cc5a7d0bfe6519e2d462de1ac9ef793fb610f2a7
/api1/src/main/java/com/heb/pm/repository/VarietalTypeRepository.java
58cd8ad6b3661c5089965add6422c60859aa8e65
[]
no_license
manosbatsis/SAVEFILECOMPANY
d21535a46aebedf2a425fa231c678658d4b017a4
c33d41cf13dd2ff5bb3a882f6aecc89b24a206be
refs/heads/master
2023-03-21T04:46:23.286060
2019-10-10T10:38:02
2019-10-10T10:38:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
560
java
/* * VarietalTypeRepository * * Copyright (c) 2017 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. */ package com.heb.pm.repository; import com.heb.pm.entity.VarietalType; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import java.util.List; /** * Interface to the Varietal Type info. * * @author vn87351 * @since 2.12.0 */ public interface VarietalTypeRepository extends JpaRepository<VarietalType, Integer> { }
[ "tran.than@heb.com" ]
tran.than@heb.com
01159260b066203b96578bac81367430f69e6f98
64e5d88b3dfb62236f778fee26f09f249fd662af
/LEETCODE/242. 有效的字母异位词.java
6fe02ee82a0610e7da89623fe269613b36709110
[]
no_license
hishark/Algorithm
d2dabeac5c3bcd5d78d21edad460a1981c4dfc31
81032464b38e4e0c7b4a088d19ff07eb5c227cbb
refs/heads/master
2021-06-02T14:47:13.088472
2021-04-27T12:58:03
2021-04-27T12:58:03
123,285,059
7
0
null
null
null
null
UTF-8
Java
false
false
2,070
java
import java.util.Arrays; // ref: https://leetcode-cn.com/problems/valid-anagram/solution/you-xiao-de-zi-mu-yi-wei-ci-by-leetcode-solution/ // 1. 排序 class Solution { public boolean isAnagram(String s, String t) { /** * t 是 s 的字母异位词等价于「两个字符串排序后相等」 * 所以可以对两个字符串分别排序,看排序后的字符串是否相等即可判断 */ // 如果两个字符串的长度不同,必然不互为字母异位词 if (s.length() != t.length()) return false; // 把字符串转换为字符数组 char[] s1 = s.toCharArray(); char[] t1 = t.toCharArray(); // 对字符串进行排序 Arrays.sort(s1); Arrays.sort(t1); // 判断排序后的字符串是否相同即可 return Arrays.equals(s1, t1); } } // 2. 哈希表 class Solution { public boolean isAnagram(String s, String t) { /** * t 是 s 的异位词等价于「两个字符串中字符出现的种类和次数均相等」 * 由于字符串只包含 26 个小写字母,所以可以维护一个长度为 26 的数组 */ // 如果两个字符串的长度不同,必然不互为字母异位词 if (s.length() != t.length()) return false; // 使用一个数组记录字符出现的次数 int[] count = new int[26]; // 遍历字符串 s,计算字符串 s 中所有字符出现的次数 for (int i=0;i<s.length();i++) { count[s.charAt(i) - 'a']++; } // 遍历字符串 t,减去 count 数组中对应的次数 // 如果出现小于 0 的情况,说明 t 中包含一个不在 s 中的额外字符 for (int i=0;i<t.length();i++) { count[t.charAt(i) - 'a']--; if (count[t.charAt(i) - 'a'] < 0) return false; } // 遍历完字符串 t 没出现小于零的情况就直接返回 true 啦 return true; } }
[ "hishark@yeah.net" ]
hishark@yeah.net
c6c4218000a995d18b6423470b374f7035d0bcaf
755a5432e9b53191a8941591f560e7a4fc28b1a0
/java-web-project/src09/main/java/com/eomcs/lms/servlet/LessonListServlet.java
69c0f2a27824ece338cbeeee071e022aca723946
[]
no_license
SeungWanWoo/bitcamp-java-2018-12
4cff763ddab52721f24ce8abcebcec998dacc9e3
d14a8a935ef7a4d24eb633fedea892378e59168d
refs/heads/master
2021-08-06T22:11:24.954160
2019-08-06T08:17:07
2019-08-06T08:17:07
163,650,664
0
0
null
2020-04-30T03:39:17
2018-12-31T08:00:39
Java
UTF-8
Java
false
false
1,050
java
package com.eomcs.lms.servlet; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.context.ApplicationContext; import com.eomcs.lms.domain.Lesson; import com.eomcs.lms.service.LessonService; @SuppressWarnings("serial") @WebServlet("/lesson/list") public class LessonListServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { LessonService lessonService = ((ApplicationContext) this.getServletContext() .getAttribute("iocContainer")).getBean(LessonService.class); response.setContentType("text/html;charset=UTF-8"); List<Lesson> lessons = lessonService.list(); request.setAttribute("lessons", lessons); request.setAttribute("viewUrl", "/lesson/list.jsp"); } }
[ "seungwan.woo94@gmail.com" ]
seungwan.woo94@gmail.com
eef4ceff79c45a4bc5110a786ebbd5d3f53beb6b
f5acd38efe9f28e14a3e77cf60f938000a6660ab
/clients/spring/generated/src/main/java/org/openapitools/model/CauseAction.java
45777779fdd4c570a9bc819cfc8ed1a7bed2d8f5
[ "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
2,780
java
package org.openapitools.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.model.CauseUserIdCause; import javax.validation.Valid; import javax.validation.constraints.*; /** * CauseAction */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2018-08-21T04:42:22.775Z[GMT]") public class CauseAction { @JsonProperty("_class") private String propertyClass = null; @JsonProperty("causes") @Valid private List<CauseUserIdCause> causes = null; public CauseAction propertyClass(String propertyClass) { this.propertyClass = propertyClass; return this; } /** * Get propertyClass * @return propertyClass **/ @ApiModelProperty(value = "") public String getPropertyClass() { return propertyClass; } public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } public CauseAction causes(List<CauseUserIdCause> causes) { this.causes = causes; return this; } public CauseAction addCausesItem(CauseUserIdCause causesItem) { if (this.causes == null) { this.causes = new ArrayList<>(); } this.causes.add(causesItem); return this; } /** * Get causes * @return causes **/ @ApiModelProperty(value = "") @Valid public List<CauseUserIdCause> getCauses() { return causes; } public void setCauses(List<CauseUserIdCause> causes) { this.causes = causes; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CauseAction causeAction = (CauseAction) o; return Objects.equals(this.propertyClass, causeAction.propertyClass) && Objects.equals(this.causes, causeAction.causes); } @Override public int hashCode() { return Objects.hash(propertyClass, causes); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CauseAction {\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append(" causes: ").append(toIndentedString(causes)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
6a5e43545bbe59e8f1a26d97b4cbcb986b2a227d
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/b/b/d/f/Calc_1_1_11355.java
d429b27a330139e204a107df632bcdc5a6deeb41
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.b.d.f; public class Calc_1_1_11355 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
3389c30a59fd0b2d139da5b88143aa09692e099c
e124c06aa37b93502a84f8931e1e792539883b9d
/soccer_edu-src-1.5.4/soccer/common/HearData.java
0b15d82e9b15a24885cb0291a04d068dca38a8c6
[]
no_license
m-shayanshafi/FactRepositoryProjects
12d7b65505c1e0a8e0ec3577cf937a1e3d17c417
1d45d667b454064107d78213e8cd3ec795827b41
refs/heads/master
2020-06-13T12:04:53.891793
2016-12-02T11:30:49
2016-12-02T11:30:49
75,389,381
1
0
null
null
null
null
UTF-8
Java
false
false
2,936
java
/* HearData.java Copyright (C) 2001 Yu Zhang This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package soccer.common; import java.util.*; /** * Provides chat data for client. * * @author Yu Zhang */ public class HearData implements Data { /** * the current simulation step. */ public int time; /** * the side of speaker, 'l' means left team player, 'r' means right team player, * 's' means server instructions(to be implemented). */ public char side; /** * the speaker's player number */ public int id; /** * the message. */ public String message; /** * Constructs an empty HearData for reading from an UDP packet. */ public HearData() { this.message = null; } /** * Constructs a HearData for writing to an UDP packet. * * @param time simulation step. * @param side the speaker's side. * @param id the speaker's player number. * @param String the message. */ public HearData(int time, char side, int id, String message) { this.time = time; this.side = side; this.id = id; this.message = message; } // Load its data content from a string. public void readData(StringTokenizer st) { StringBuffer sb = new StringBuffer(); String token; // read simulation step time = Integer.parseInt(st.nextToken()); // Get the " " st.nextToken(); // Get speaker side side = st.nextToken().charAt(0); // Get the " " st.nextToken(); // Get speaker id id = Integer.parseInt(st.nextToken()); // Get the " " st.nextToken(); // Read the message token = st.nextToken(); while(token.charAt(0) != Packet.CLOSE_TOKEN) { sb.append(token); if(st.hasMoreTokens()) token = st.nextToken(); else break; } message = sb.toString(); } // Stream its data content to a string. public void writeData(StringBuffer sb) { sb.append(Packet.HEAR); sb.append(' '); sb.append(time); sb.append(' '); sb.append(side); sb.append(' '); sb.append(id); sb.append(' '); sb.append(message); } }
[ "mshayanshafi@gmail.com" ]
mshayanshafi@gmail.com
f9763616db01bb0eed01aa77da213abba32028b6
9ea2f84d5241a4761f5c2c9d3a65bf186502815b
/code/demo/giraph-examples/src/test/java/org/apache/giraph/TestMutateGraph.java
8faa1daa93c409ef1a39cc5480d699f4b396985e
[]
no_license
icesx/IResearch
ffee22cd5846df11ffc9e4bdd22305b753def2c3
8349098219f062e07fa0eab6122503eb72d94223
refs/heads/master
2022-11-28T22:29:00.062512
2021-09-03T02:04:33
2021-09-03T02:04:33
120,061,918
0
0
null
2022-11-16T00:53:13
2018-02-03T05:19:16
Java
UTF-8
Java
false
false
3,986
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.giraph; import static org.junit.Assert.assertTrue; import java.io.IOException; import org.apache.giraph.conf.GiraphConfiguration; import org.apache.giraph.conf.GiraphConstants; import org.apache.giraph.examples.GeneratedVertexReader; import org.apache.giraph.examples.SimpleMutateGraphComputation; import org.apache.giraph.examples.SimplePageRankComputation.SimplePageRankVertexInputFormat; import org.apache.giraph.examples.SimplePageRankComputation.SimplePageRankVertexOutputFormat; import org.apache.giraph.graph.DefaultVertexResolver; import org.apache.giraph.graph.Vertex; import org.apache.giraph.graph.VertexChanges; import org.apache.giraph.job.GiraphJob; import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.WritableComparable; import org.junit.Test; /** * Unit test for graph mutation */ public class TestMutateGraph extends BspCase { public TestMutateGraph() { super(TestMutateGraph.class.getName()); } /** * Custom vertex resolver */ public static class TestVertexResolver<I extends WritableComparable, V extends Writable, E extends Writable> extends DefaultVertexResolver { @Override public Vertex resolve(WritableComparable vertexId, Vertex vertex, VertexChanges vertexChanges, boolean hasMessages) { Vertex originalVertex = vertex; // 1. If the vertex exists, first prune the edges removeEdges(vertex, vertexChanges); // 2. If vertex removal desired, remove the vertex. vertex = removeVertexIfDesired(vertex, vertexChanges); // If vertex removal happens do not add it back even if it has messages. if (originalVertex != null && vertex == null) { hasMessages = false; } // 3. If creation of vertex desired, pick first vertex // 4. If vertex doesn't exist, but got messages or added edges, create vertex = addVertexIfDesired(vertexId, vertex, vertexChanges, hasMessages); // 5. If edge addition, add the edges addEdges(vertex, vertexChanges); return vertex; } } /** * Run a job that tests the various graph mutations that can occur * * @throws IOException * @throws ClassNotFoundException * @throws InterruptedException */ @Test public void testMutateGraph() throws IOException, InterruptedException, ClassNotFoundException { GiraphConfiguration conf = new GiraphConfiguration(); conf.setComputationClass(SimpleMutateGraphComputation.class); conf.setVertexInputFormatClass(SimplePageRankVertexInputFormat.class); conf.setVertexOutputFormatClass(SimplePageRankVertexOutputFormat.class); conf.setWorkerContextClass( SimpleMutateGraphComputation.SimpleMutateGraphVertexWorkerContext.class); GiraphConstants.USER_PARTITION_COUNT.set(conf, 32); conf.setNumComputeThreads(8); GiraphConstants.VERTEX_RESOLVER_CLASS.set(conf, TestVertexResolver.class); GiraphJob job = prepareJob(getCallingMethodName(), conf, getTempPath(getCallingMethodName())); // Overwrite the number of vertices set in BspCase GeneratedVertexReader.READER_VERTICES.set(conf, 400); assertTrue(job.run(true)); } }
[ "icesxrun@gmail.com" ]
icesxrun@gmail.com
f4a05074935781a3cda63abdda3cadaf2e89a2cf
2214702e68546c7299b626b8b1239070bb396376
/src/com/jkkp/modules/member/view/VMemberBankCard.java
efaf706542df7351ad3132073b53e2a2999e63be
[]
no_license
KnightWind/jkkweb
55a50375a19508a490d5fbbc6b2f7fd6ad79fdcd
ac2e3f47cc07154e4fc666e1028299980f1783d2
refs/heads/master
2021-01-10T16:49:25.342698
2015-09-29T09:48:38
2015-09-29T09:48:38
43,357,602
0
0
null
null
null
null
UTF-8
Java
false
false
150
java
package com.jkkp.modules.member.view; import com.jkkp.modules.member.model.MemberBankCard; public class VMemberBankCard extends MemberBankCard { }
[ "wangchaobo@jiakeke.com" ]
wangchaobo@jiakeke.com
41c1b589d69c3b59cde025afb008c0aac95b29ea
2219a1cafeded237833980ec2c2a6d7ec87662b9
/af-lc/af-lc-core/src/main/java/com/yeepay/fpay/rro/response/package-info.java
7d5f3aca6a33b4b16b3b19e4c033308cb23d0bc7
[ "MIT" ]
permissive
liufeiit/tulip
cac93dc7e30626ed6a9710e41d8f9e2b35126838
8934a3297f104fe4cf80fa8fa532d9b4d813ccb6
refs/heads/master
2021-01-17T10:21:50.882512
2015-10-28T12:13:58
2015-10-28T12:13:58
23,213,945
0
1
null
2016-03-09T14:00:49
2014-08-22T05:25:18
Java
UTF-8
Java
false
false
154
java
/** * * @author john.liu E-mail:fei.liu@yeepay.com * @version 1.0.0 * @since 2014年12月8日 下午3:00:31 */ package com.yeepay.fpay.rro.response;
[ "liufei_it@126.com" ]
liufei_it@126.com
9f0a8689b48f4c5bc14d72b41781203b9906830f
07de2a7700430dc991d6844eb2589810f592d066
/app/src/main/java/com/example/ranjith/attendencereco/googlecode/javacv/cpp/avdevice.java
9580b9ed1a82f6e568b7b4a768a8e50c7d2cae67
[]
no_license
Maheshwari-Vamsi/AttendenceReco
b8d46ebd496bcea16f2291de42f10a88676d424d
e8e7e3b08fd6642ca7a4fd3fb0bf73fea04e5848
refs/heads/master
2021-01-13T11:39:56.828209
2016-09-27T11:20:28
2016-09-27T11:20:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,202
java
package com.example.ranjith.attendencereco.googlecode.javacv.cpp; import com.googlecode.javacpp.Loader; import com.googlecode.javacpp.annotation.Cast; import com.googlecode.javacpp.annotation.Properties; @Properties({@com.googlecode.javacpp.annotation.Platform(cinclude={"<libavdevice/avdevice.h>"}, define={"__STDC_CONSTANT_MACROS"}, includepath={"/usr/local/include/ffmpeg/:/usr/local/include/:/opt/local/include/ffmpeg/:/opt/local/include/:/usr/include/ffmpeg/"}, link={"avdevice@.54", "avfilter@.3", "swscale@.2", "swresample@.0", "postproc@.52", "avformat@.54", "avcodec@.54", "avutil@.52"}, linkpath={"/usr/local/lib/:/usr/local/lib64/:/opt/local/lib/:/opt/local/lib64/"}), @com.googlecode.javacpp.annotation.Platform(includepath={"C:/MinGW/local/include/ffmpeg/;C:/MinGW/include/ffmpeg/;C:/MinGW/local/include/;src/main/resources/com/googlecode/javacv/cpp/"}, linkpath={"C:/MinGW/local/lib/;C:/MinGW/lib/"}, preload={"avdevice-54"}, preloadpath={"C:/MinGW/local/bin/;C:/MinGW/bin/"}, value={"windows"}), @com.googlecode.javacpp.annotation.Platform(includepath={"../include/"}, linkpath={"../lib/"}, value={"android"})}) public class avdevice { public static final int LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT; public static final String LIBAVDEVICE_IDENT = "Lavf" + LIBAVDEVICE_VERSION; public static final String LIBAVDEVICE_VERSION; public static final int LIBAVDEVICE_VERSION_INT = 0; public static final int LIBAVDEVICE_VERSION_MAJOR = 54; public static final int LIBAVDEVICE_VERSION_MICRO = 103; public static final int LIBAVDEVICE_VERSION_MINOR = 3; static { Loader.load(avfilter.class); Loader.load(); LIBAVDEVICE_VERSION_INT = avutil.AV_VERSION_INT(54, 3, 103); LIBAVDEVICE_VERSION = avutil.AV_VERSION(54, 3, 103); } public static native String avdevice_configuration(); public static native String avdevice_license(); public static native void avdevice_register_all(); @Cast({"unsigned"}) public static native int avdevice_version(); } /* Location: D:\Apk\dex2jar-0.0.9.15\classes-dex2jar.jar!\com\googlecode\javacv\cpp\avdevice.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "walabalakumar@gmail.com" ]
walabalakumar@gmail.com
2caf18430958ce9bd3572f0dc4a68ae7393141cb
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
/google/cloud/bigquery/storage/v1beta2/google-cloud-bigquery-storage-v1beta2-java/proto-google-cloud-bigquery-storage-v1beta2-java/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ArrowSerializationOptionsOrBuilder.java
54f3c813e59e5e9b1ee27520fdc2dce25ac7377c
[ "Apache-2.0" ]
permissive
oltoco/googleapis-gen
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
refs/heads/master
2023-07-17T22:11:47.848185
2021-08-29T20:39:47
2021-08-29T20:39:47
null
0
0
null
null
null
null
UTF-8
Java
false
true
946
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/storage/v1beta2/arrow.proto package com.google.cloud.bigquery.storage.v1beta2; public interface ArrowSerializationOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta2.ArrowSerializationOptions) com.google.protobuf.MessageOrBuilder { /** * <pre> * The Arrow IPC format to use. * </pre> * * <code>.google.cloud.bigquery.storage.v1beta2.ArrowSerializationOptions.Format format = 1;</code> * @return The enum numeric value on the wire for format. */ int getFormatValue(); /** * <pre> * The Arrow IPC format to use. * </pre> * * <code>.google.cloud.bigquery.storage.v1beta2.ArrowSerializationOptions.Format format = 1;</code> * @return The format. */ com.google.cloud.bigquery.storage.v1beta2.ArrowSerializationOptions.Format getFormat(); }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
4eaab7df35f56bfd403037028f46b9fde17a3d9e
539c6f876354a7c294dc33049958a4f000494c7b
/src/main/java/rocketMQ/Consumer.java
5162f5d6fd3aea69d59da8808937ef190256e940
[]
no_license
ZLBer/DaliyOfProgramme
3392dd9a0ba4d749da6291123892e73f7b5cb981
738dec918d659e98c74be2c177dc5b259e05b9b9
refs/heads/master
2022-10-19T03:09:14.066572
2021-01-03T11:48:16
2021-01-03T11:48:16
164,304,274
1
0
null
2022-09-01T23:01:21
2019-01-06T12:20:06
Java
UTF-8
Java
false
false
2,630
java
package rocketMQ; import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently; import org.apache.rocketmq.client.exception.MQClientException; import org.apache.rocketmq.common.consumer.ConsumeFromWhere; import org.apache.rocketmq.common.message.MessageExt; import java.util.List; /** * Created by libin on 2019/1/4. */ public class Consumer { public static void main(String[] args) throws InterruptedException, MQClientException { //声明并初始化一个consumer //需要一个consumer group名字作为构造方法的参数,这里为consumer1 DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("consumer1"); //consumer.setVipChannelEnabled(false); //同样也要设置NameServer地址 consumer.setNamesrvAddr("39.107.99.207:9876"); //这里设置的是一个consumer的消费策略 //CONSUME_FROM_LAST_OFFSET 默认策略,从该队列最尾开始消费,即跳过历史消息 //CONSUME_FROM_FIRST_OFFSET 从队列最开始开始消费,即历史消息(还储存在broker的)全部消费一遍 //CONSUME_FROM_TIMESTAMP 从某个时间点开始消费,和setConsumeTimestamp()配合使用,默认是半个小时以前 consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET); //设置consumer所订阅的Topic和Tag,*代表全部的Tag consumer.subscribe("TopicTest", "*"); //设置一个Listener,主要进行消息的逻辑处理 consumer.registerMessageListener(new MessageListenerConcurrently() { @Override public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) { System.out.println(Thread.currentThread().getName() + " Receive New Messages: " + msgs); System.out.println("----------------------------------------------------------------------------------"); //返回消费状态 //CONSUME_SUCCESS 消费成功 //RECONSUME_LATER 消费失败,需要稍后重新消费 return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; } }); //调用start()方法启动consumer consumer.start(); System.out.println("Consumer Started."); } }
[ "1098294815@qq.com" ]
1098294815@qq.com
2bfbe864d063efc42a3173564a7d672797a341dc
10535e4ebeeac5bc2fb6e852aff1066d1dcfe0f3
/xcr-web/xcr-web-app/src/main/java/com/yatang/xc/xcr/vo/SingleUploadResult.java
36908c4ff6d010e6845009605b6a4d2360d32b26
[]
no_license
pocketbbaa/XCR
c6b3b08a432a7af2e5396f3551ad82133dc1af6b
03940b44cb6aa733657609f372ca3c4d5e81165a
refs/heads/master
2021-04-03T07:09:40.935591
2018-03-09T06:43:27
2018-03-09T06:43:27
124,474,053
2
3
null
null
null
null
UTF-8
Java
false
false
620
java
package com.yatang.xc.xcr.vo; import java.io.Serializable; public class SingleUploadResult extends BaseResult implements Serializable { private static final long serialVersionUID = 495049648054176651L; private String fileOnServerUrl; public String getFileOnServerUrl() { return fileOnServerUrl; } public void setFileOnServerUrl(String fileOnServerUrl) { this.fileOnServerUrl = fileOnServerUrl; } @Override public String toString() { return "SingleUploadResult{" + "responseCode='" + responseCode + '\'' + ", errMsg='" + errMsg + '\'' + ", fileOnServerUrl='" + fileOnServerUrl + '\'' + '}'; } }
[ "541230721@qq.com" ]
541230721@qq.com
d73de1bd44071911f62c7f70d09a7ae2fca3bfb7
e27ca5fe3e7f49a0e39a9cacec516e5b63fcae32
/src/io/educative/www/Coding/P12_TopKElement/P12_07_KthLargestNumberInAStream.java
21d326a83bbdd49f18fed0056897cfbec2c4b907
[]
no_license
yao23/Java_Playground
0cb49c98df5c3c149bdc174a2e27aac11b914d58
aa7496b9e55e30952075b47d82be01190166c0ad
refs/heads/master
2023-09-03T05:21:11.864445
2023-09-02T05:46:29
2023-09-02T05:46:29
92,258,959
3
1
null
null
null
null
UTF-8
Java
false
false
1,489
java
package io.educative.www.Coding.P12_TopKElement; import java.util.*; public class P12_07_KthLargestNumberInAStream { PriorityQueue<Integer> minHeap = new PriorityQueue<Integer>((n1, n2) -> n1 - n2); final int k; public P12_07_KthLargestNumberInAStream(int[] nums, int k) { this.k = k; // add the numbers in the min heap for (int i = 0; i < nums.length; i++) add(nums[i]); } /** * Time complexity * The time complexity of the add() function will be O(logK) since we are inserting the new number in the heap. * * Space complexity * The space complexity will be O(K) for storing numbers in the heap. * * @param num */ public int add(int num) { // add the new number in the min heap minHeap.add(num); // if heap has more than 'k' numbers, remove one number if (minHeap.size() > this.k) minHeap.poll(); // return the 'Kth largest number return minHeap.peek(); } public static void main(String[] args) { int[] input = new int[] { 3, 1, 5, 12, 2, 11 }; P12_07_KthLargestNumberInAStream kthLargestNumber = new P12_07_KthLargestNumberInAStream(input, 4); System.out.println("4th largest number is: " + kthLargestNumber.add(6)); System.out.println("4th largest number is: " + kthLargestNumber.add(13)); System.out.println("4th largest number is: " + kthLargestNumber.add(4)); } }
[ "myspiritcrazy@gmail.com" ]
myspiritcrazy@gmail.com
8f2aba80eea1991200c2eefccbc3c5794be5591a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_54b325064f0717b06608679909eb57c9a509588e/GenerateMethodDocument/14_54b325064f0717b06608679909eb57c9a509588e_GenerateMethodDocument_s.java
394eceecbc2d8c7ebe36972257001f9d672dd187
[]
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
7,332
java
package com.firetruckbowl.tgirest.processor; import com.firetruckbowl.tgirest.TGIRestWatcher; import com.firetruckbowl.tgirest.annotation.MethodError; import com.firetruckbowl.tgirest.annotation.ParamNote; import com.firetruckbowl.tgirest.annotation.ResourceMethod; import com.firetruckbowl.tgirest.model.MethodDocument; import com.firetruckbowl.tgirest.model.ParamDocument; import com.firetruckbowl.tgirest.resource.Documented; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mock; import javax.ws.rs.*; import javax.ws.rs.core.*; import java.lang.reflect.Method; import java.net.URI; import java.util.Arrays; import java.util.List; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import static org.junit.matchers.JUnitMatchers.hasItems; import static org.mockito.BDDMockito.given; import static org.mockito.MockitoAnnotations.initMocks; /** * @author <a href="mailto:lochnguyen@gmail.com">Loc Nguyen</a> */ @RunWith(JUnit4.class) public class GenerateMethodDocument { private final String BASE_URI = "http://winterfel.com/api/"; @Rule public TestRule watcher = new TGIRestWatcher(); @Mock private UriInfo uriInfo; private Documenter systemUnderTest; @Before public void setUp() throws Exception { initMocks(this); URI baseUri = new URI(BASE_URI); given(uriInfo.getBaseUri()).willReturn(baseUri); systemUnderTest = new TGIRestDocumenter(); } @Test @SuppressWarnings("") public void shouldGetPath() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then assertThat(document.getPath(), is(BASE_URI + "bar/{id}")); } @Test @SuppressWarnings("") public void shouldGetHttpMethod() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then assertThat(document.getHttpMethod(), is("GET")); } @Test @SuppressWarnings("") public void shouldGetSuccessStatus() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then assertThat(document.getStatus(), is(Response.Status.OK.getStatusCode())); } @Test @SuppressWarnings("") public void shouldGetDescription() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then assertThat(document.getDescription(), is("bar method")); } @Test @SuppressWarnings("") public void shouldGetErrors() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then assertThat(document.getResponseErrors().size(), is(1)); assertThat(document.getResponseErrors().get(0).getStatus(), is(Response.Status.NOT_FOUND.getStatusCode())); } @Test @SuppressWarnings("") public void shouldGetMediaProduced() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then List<String> types = Arrays.asList(document.getMediaTypesProduced()); assertThat(types, hasItems(MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML)); } @Test @SuppressWarnings("") public void shouldGetMediaConsumed() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then List<String> types = Arrays.asList(document.getMediaTypesConsumed()); assertThat(types, hasItems(MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML)); } @Test @SuppressWarnings("") public void shouldGetQueryParamDocs() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then List<ParamDocument> queryParams = Arrays.asList(document.getQueryParams()); ParamDocument qpt = new ParamDocument("t", "The time"); ParamDocument qpl = new ParamDocument("l", "The location"); assertThat(queryParams, hasItems(qpt, qpl)); } @Test @SuppressWarnings("") public void shouldGetPathParamDocs() throws Exception { // given FooResource resource = new FooResource(); Method m = resource.getClass().getMethod("getBar", String.class, String.class, String.class); // when MethodDocument document = systemUnderTest.generateMethodDocument(uriInfo, m); // then List<ParamDocument> pathParams = Arrays.asList(document.getPathParams()); assertThat(pathParams, hasItems(new ParamDocument("id", "The ID of the bar"))); } /** * A class for use with testing only since we don't want to rely on the * library's actual resource classes staying the same. */ @Path("foo") class FooResource implements Documented { @GET @Path("bar/{id}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @ResourceMethod( status = Response.Status.OK, description = "bar method", errors = { @MethodError(status = Response.Status.NOT_FOUND, cause = "The bar could not be found") } ) public Response getBar(@PathParam("id") @ParamNote("The ID of the bar") String id, @QueryParam("t") @ParamNote("The time") String time, @QueryParam("l") @ParamNote("The location") String location) { return Response.status(Response.Status.OK).build(); } @Override public Response getDocumentation(@Context UriInfo uriInfo, @Context HttpHeaders httpHeaders) { /* no-op */ return null; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5e833b4193d772f1b94a87a789268d641a176051
2ebe6e87a7f96bbee2933103a4f43f46ea239996
/samples/testsuite-xlt/src/action/modules/Select_byLabel_actions/multi_select0.java
5083b470af30d95d295b9e0334215ed8fc2729d9
[ "Apache-2.0", "LGPL-2.0-or-later", "BSD-3-Clause", "EPL-1.0", "CDDL-1.1", "EPL-2.0", "MPL-2.0", "MIT", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Xceptance/XLT
b4351c915d8c66d918b02a6c71393a151988be46
c6609f0cd9315217727d44b3166f705acc4da0b4
refs/heads/develop
2023-08-18T18:20:56.557477
2023-08-08T16:04:16
2023-08-08T16:04:16
237,251,821
56
12
Apache-2.0
2023-09-01T14:52:25
2020-01-30T16:13:24
Java
UTF-8
Java
false
false
1,980
java
/* * Copyright (c) 2005-2023 Xceptance Software Technologies 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 action.modules.Select_byLabel_actions; import org.junit.Assert; import com.xceptance.xlt.api.actions.AbstractHtmlPageAction; import com.xceptance.xlt.api.engine.scripting.AbstractHtmlUnitScriptAction; import org.htmlunit.html.HtmlPage; /** * TODO: Add class description */ public class multi_select0 extends AbstractHtmlUnitScriptAction { /** * Constructor. * @param prevAction The previous action. */ public multi_select0(final AbstractHtmlPageAction prevAction) { super(prevAction); } /** * {@inheritDoc} */ @Override public void preValidate() throws Exception { final HtmlPage page = getPreviousAction().getHtmlPage(); Assert.assertNotNull("Failed to get page from previous action", page); } /** * {@inheritDoc} */ @Override protected void execute() throws Exception { HtmlPage page = getPreviousAction().getHtmlPage(); page = select("id=select_18", "label="); setHtmlPage(page); } /** * {@inheritDoc} */ @Override protected void postValidate() throws Exception { final HtmlPage page = getHtmlPage(); Assert.assertNotNull("Failed to load page", page); assertText("id=cc_change", "change (select_18) empty, 1 space, 2 spaces"); } }
[ "4639399+jowerner@users.noreply.github.com" ]
4639399+jowerner@users.noreply.github.com
fc9ce2f746eeef9302a4321ff08c39db8a03613e
10b7c05a76903964e412a55f155544ba29db498f
/server/proj/uniapp/app/api/src/main/java/com/vassarlabs/proj/uniapp/api/pojo/AppFormData.java
4c8dd8f7e32dfe28c0b45d87653001dedf0eecdf
[]
no_license
srikanth-vl/jenkins-flutter-test
ba678eee7c3e4dd09915d6a4d1efe5b73ec6d303
9835d22d88394c403c3c95955dc890826de03382
refs/heads/master
2023-01-31T04:32:06.109480
2020-02-25T12:09:22
2020-02-25T12:09:22
242,687,371
0
0
null
2023-01-07T22:18:34
2020-02-24T08:50:01
Java
UTF-8
Java
false
false
907
java
package com.vassarlabs.proj.uniapp.api.pojo; import java.util.List; import java.util.Map; import java.util.UUID; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.vassarlabs.proj.uniapp.app.custom.deserialisers.CustomDeserialiser; import lombok.Data; import lombok.ToString; @Data @ToString public class AppFormData { @JsonProperty("form_id") String formInstanceId; @JsonProperty("md_instance_id") String metaDataInstanceId; @JsonProperty("proj_id") UUID projectId; @JsonDeserialize(using = CustomDeserialiser.class) @JsonProperty("user_type") String userType; @JsonProperty("insert_ts") long timeStamp; @JsonProperty("fields") List<FormFieldValues> formFieldValuesList; @JsonProperty("additional_props") Map<String, String> otherParams; }
[ "kmunshi.97@gmail.com" ]
kmunshi.97@gmail.com
de8dfba9805fe8ef02a02d96f07b524d38a25f26
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project11/src/main/java/org/gradle/test/performance11_1/Production11_92.java
9c7ed645ce5970de4e0dec28040b9160ccaafaee
[]
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
300
java
package org.gradle.test.performance11_1; public class Production11_92 extends org.gradle.test.performance7_1.Production7_92 { private final String property; public Production11_92() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
8cc3bd9287611a3364c74b106bc397096f0292c6
c74c2e590b6c6f967aff980ce465713b9e6fb7ef
/game-logic/src/main/java/com/bdoemu/core/network/receivable/CMExitFieldServerToServerSelection.java
fda14ec6b3933f3d3d15cbb6c6367f879584c314
[]
no_license
lingfan/bdoemu
812bb0abb219ddfc391adadf68079efa4af43353
9c49b29bfc9c5bfe3192b2a7fb1245ed459ef6c1
refs/heads/master
2021-01-01T13:10:13.075388
2019-12-02T09:23:20
2019-12-02T09:23:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
// // Decompiled by Procyon v0.5.30 // package com.bdoemu.core.network.receivable; import com.bdoemu.commons.network.ReceivablePacket; import com.bdoemu.commons.network.SendablePacket; import com.bdoemu.core.network.GameClient; import com.bdoemu.core.network.sendable.SMExitFieldServerToServerSelection; public class CMExitFieldServerToServerSelection extends ReceivablePacket<GameClient> { public CMExitFieldServerToServerSelection(final short opcode) { super(opcode); } protected void read() { } public void runImpl() { ((GameClient) this.getClient()).close((SendablePacket) new SMExitFieldServerToServerSelection(((GameClient) this.getClient()).getLoginAccountInfo().getCookie())); } }
[ "511459965@qq.com" ]
511459965@qq.com
c8c4f724526b38990a15cb91da5d9dc6e0af4b4d
6bb8f4d2bf7b7f1d39f644f6c5bd63b1218ad758
/jaulp.wicket.components/src/main/java/de/alpharogroup/wicket/components/i18n/list/HeaderContentListModel.java
42d073e2c09d4e383967de567b7335964336213c
[]
no_license
marie-christin/jaulp.wicket
3abf4cadd7b393d88dc38fdbe833e8d83bbdd74c
3dbac0a9113d87981d261d5f727c8d2cc56f4176
refs/heads/master
2021-01-21T08:24:33.567324
2015-07-25T18:49:37
2015-07-25T18:49:37
39,819,797
0
0
null
2015-07-28T07:35:20
2015-07-28T07:35:19
null
UTF-8
Java
false
false
1,308
java
/** * Copyright (C) 2010 Asterios Raptis * * 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 de.alpharogroup.wicket.components.i18n.list; import java.io.Serializable; import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.NonNull; import lombok.Setter; import lombok.ToString; import de.alpharogroup.locale.ResourceBundleKey; @Getter @Setter @EqualsAndHashCode @ToString @NoArgsConstructor @AllArgsConstructor @Builder public class HeaderContentListModel implements Serializable { private static final long serialVersionUID = 1L; @NonNull private ResourceBundleKey headerResourceKey; @NonNull private List<ResourceBundleKey> contentResourceKeys; }
[ "asterios.raptis@gmx.net" ]
asterios.raptis@gmx.net
6854d684a584f887e4ec6895076aeaa70ca78eb4
684732efc4909172df38ded729c0972349c58b67
/io-fr/src/main/java/org/jeesl/controller/converter/fc/io/fr/IoFileStorageEngineConverter.java
9403aed4cee5e5fcc2944c80772b4b6996a07ea2
[]
no_license
aht-group/jeesl
2c4683e8c1e9d9e9698d044c6a89a611b8dfe1e7
3f4bfca6cf33f60549cac23f3b90bf1218c9daf9
refs/heads/master
2023-08-13T20:06:38.593666
2023-08-12T06:59:51
2023-08-12T06:59:51
39,823,889
0
9
null
2022-12-13T18:35:24
2015-07-28T09:06:11
Java
UTF-8
Java
false
false
504
java
package org.jeesl.controller.converter.fc.io.fr; import javax.enterprise.context.RequestScoped; import javax.faces.convert.FacesConverter; import org.jeesl.jsf.converter.AbstractEjbIdConverter; import org.jeesl.model.ejb.io.fr.IoFileStorageEngine; @RequestScoped @FacesConverter(forClass=IoFileStorageEngine.class) public class IoFileStorageEngineConverter extends AbstractEjbIdConverter<IoFileStorageEngine> { public IoFileStorageEngineConverter() { super(IoFileStorageEngine.class); } }
[ "t.kisner@web.de" ]
t.kisner@web.de
5d93149fff8202b0c681b8b2ac981ef678da1b12
f3f00a3c8885dac8cb6b6330157e28c29e33d913
/lib.fast/src/main/java/com/sunday/common/utils/ViewUtils.java
f3d546e9bfc78b32d3068f0a29224c93dd4182d1
[]
no_license
WangZhouA/yunmama
91967ed72250646093df29d95c5873bf17d1d4cb
1b125f1bfdff1c6740ed1b46e1ac2e3e72f588eb
refs/heads/master
2020-03-30T19:29:45.732788
2018-10-04T09:13:07
2018-10-04T09:13:07
151,545,702
1
0
null
null
null
null
UTF-8
Java
false
false
384
java
package com.sunday.common.utils; import android.view.View; /** * 项目:智能控制 SmartLock */ public class ViewUtils { public static void addPadding(View view, int padding){ if(view == null)return; view.setPadding(view.getPaddingLeft()+padding, view.getPaddingTop()+padding, view.getPaddingRight()+padding, view.getPaddingBottom()+padding); } }
[ "514077686@qq.com" ]
514077686@qq.com
b5e117f19657042c86609b9156ae32e6b9edbb53
43ca534032faa722e206f4585f3075e8dd43de6c
/src/com/instagram/android/fragment/ds.java
a1c2cf4f28a5522f465e82576d00a285de869a58
[]
no_license
dnoise/IG-6.9.1-decompiled
3e87ba382a60ba995e582fc50278a31505109684
316612d5e1bfd4a74cee47da9063a38e9d50af68
refs/heads/master
2021-01-15T12:42:37.833988
2014-10-29T13:17:01
2014-10-29T13:17:01
26,952,948
1
0
null
null
null
null
UTF-8
Java
false
false
663
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.instagram.android.fragment; import android.view.View; import com.instagram.android.nux.af; import com.instagram.b.c.a; // Referenced classes of package com.instagram.android.fragment: // dn final class ds implements android.view.View.OnClickListener { final dn a; ds(dn dn1) { a = dn1; super(); } public final void onClick(View view) { com.instagram.b.c.a.a().a(a.l(), "next"); af.a(a.l()); } }
[ "leo.sjoberg@gmail.com" ]
leo.sjoberg@gmail.com
2335d77bdb0a709f6d6215b1fc917921353ae9ae
f87b023f7437d65ed29eae1f2b1a00ddfd820177
/bitcamp-java-basic/src/step14_implements/ex2_Interface/Exam02.java
c8a1f3260415cce474a6ea861981a72e2745dabf
[]
no_license
GreedHJC/BitCamp
c0d01fc0713744e01832fabf06d2663577fde6e5
028894ab5171ef1fd89de73c3654e11cbc927a25
refs/heads/master
2021-01-24T10:28:07.820330
2018-06-04T07:51:58
2018-06-04T07:51:58
123,054,159
0
0
null
null
null
null
UTF-8
Java
false
false
558
java
// 인터페이스의 모든 메서드는 public이다. // 인터페이스를 구현하는 클래스는 // 메서드의 공개 범위를 public 보다 좁게할 순 없다. package step14_implements.ex2_Interface; public class Exam02 implements A3 { // public 보다 좁게 공개 범위를 줄일 수 없다. //private void m1() {} // 컴파일 오류! //protected void m1() {} // 컴파일 오류! //void m1() {} // 컴파일 오류! // 반드시 public 이어야 한다. public void m1() {} public void m2() {} }
[ "qweqwe472@naver.com" ]
qweqwe472@naver.com
9cc4048f4195058ba1479e866f94043b174074b9
5cad59b093f6be43057e15754ad0edd101ed4f67
/src/Interview/Google/Array/ContainerwithMostWater.java
9e60cd30d5d437f7c2fb9c41cd62156abc15e181
[]
no_license
GeeKoders/Algorithm
fe7e58687bbbca307e027558f6a1b4907ee338db
fe5c2fca66017b0a278ee12eaf8107c79aef2a14
refs/heads/master
2023-04-01T16:31:50.820152
2021-04-21T23:55:31
2021-04-21T23:55:31
276,102,037
0
0
null
null
null
null
UTF-8
Java
false
false
1,650
java
package Interview.Google.Array; public class ContainerwithMostWater { /* * 11. Container With Most Water(Medium) * * https://leetcode.com/problems/container-with-most-water/ * * solution: https://leetcode.com/problems/container-with-most-water/solution/ * * Your runtime beats 14.96 % of java submissions. * Your memory usage beats 34.30 % of java submissions. * * Brute Force * * Time complexity: O(N^2) * Space complexity:O(1) * */ public int maxArea(int[] height) { int n = height.length ; int res = 0 ; for(int i = 0 ; i<n; i++){ for(int j=i+1; j<n; j++){ res = Math.max(res, Math.min(height[i], height[j]) * (j - i)) ; } } return res ; } /* * Your runtime beats 45.14 % of java submissions. * Your memory usage beats 8.72 % of java submissions. * * Two pointer * * Time complexity: O(N) * Space complexity: O(1) * */ public int maxArea2(int[] height) { int res = -1 ; if(height == null || height.length < 2) return res ; int n = height.length ; int left = 0 ; int right = n - 1 ; while(left < right){ res = Math.max(res, Math.min(height[left], height[right]) * (right - left)) ; if(height[left] < height[right]){ left ++ ; }else{ right -- ; } } return res ; } }
[ "iloveitone@gmail.com" ]
iloveitone@gmail.com
91930fdf19f88f72a939fdc80c17b0dd5e7db54a
8be567be86cd22af0b9d8a8d1b649cad7a0e2b97
/IdentityServer/src/service/UserGroupService.java
b06ae76c01e1f8a14e7d29211fb1dc38c49aa721
[ "MIT" ]
permissive
yalukezoudike/startpoint
b1a577bdc8115f4d8d5a1486ce50a2fddb111046
fe2402e7c262e06c4aee0f62b80015e11fcdfd80
refs/heads/master
2021-07-23T02:52:43.851763
2017-11-02T14:19:26
2017-11-02T14:19:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,141
java
package service; import java.util.HashMap; import java.util.List; import java.util.Map; import org.grain.httpserver.HttpException; import org.grain.httpserver.HttpPacket; import org.grain.httpserver.IHttpListener; import action.UCErrorPack; import action.UserGroupAction; import dao.model.base.UserGroup; import http.HOpCodeUCenter; import protobuf.http.UCErrorProto.UCError; import protobuf.http.UCErrorProto.UCErrorCode; import protobuf.http.UserGroupProto.CreateUserGroupC; import protobuf.http.UserGroupProto.CreateUserGroupS; import protobuf.http.UserGroupProto.DeleteUserGroupC; import protobuf.http.UserGroupProto.DeleteUserGroupS; import protobuf.http.UserGroupProto.GetUserGroupC; import protobuf.http.UserGroupProto.GetUserGroupListC; import protobuf.http.UserGroupProto.GetUserGroupListS; import protobuf.http.UserGroupProto.GetUserGroupS; import protobuf.http.UserGroupProto.UpdateUserGroupC; import protobuf.http.UserGroupProto.UpdateUserGroupS; import tool.PageFormat; import tool.PageObj; public class UserGroupService implements IHttpListener { @Override public Map<String, String> getHttps() { HashMap<String, String> map = new HashMap<>(); map.put(HOpCodeUCenter.CREATE_USER_GROUP, "createUserGroupHandle"); map.put(HOpCodeUCenter.UPDATE_USER_GROUP, "updateUserGroupHandle"); map.put(HOpCodeUCenter.GET_USER_GROUP, "getUserGroupHandle"); map.put(HOpCodeUCenter.DELETE_USER_GROUP, "deleteUserGroupHandle"); map.put(HOpCodeUCenter.GET_USER_GROUP_LIST, "getUserGroupListHandle"); return map; } public HttpPacket createUserGroupHandle(HttpPacket httpPacket) throws HttpException { CreateUserGroupC message = (CreateUserGroupC) httpPacket.getData(); UserGroup userGroup = UserGroupAction.createUserGroup(message.getUserGroupName(), message.getUserGroupParentId()); if (userGroup == null) { UCError errorPack = UCErrorPack.create(UCErrorCode.ERROR_CODE_10, httpPacket.hSession.headParam.hOpCode); throw new HttpException(HOpCodeUCenter.UC_ERROR, errorPack); } CreateUserGroupS.Builder builder = CreateUserGroupS.newBuilder(); builder.setHOpCode(httpPacket.hSession.headParam.hOpCode); builder.setUserGroup(UserGroupAction.getUserGroupDataBuilder(userGroup)); HttpPacket packet = new HttpPacket(httpPacket.hSession.headParam.hOpCode, builder.build()); return packet; } public HttpPacket updateUserGroupHandle(HttpPacket httpPacket) throws HttpException { UpdateUserGroupC message = (UpdateUserGroupC) httpPacket.getData(); UserGroup userGroup = UserGroupAction.updateUserGroup(message.getUserGroupId(), message.getUserGroupName(), message.getIsUpdateUserGroupParent(), message.getUserGroupParentId(), message.getUserGroupState()); if (userGroup == null) { UCError errorPack = UCErrorPack.create(UCErrorCode.ERROR_CODE_11, httpPacket.hSession.headParam.hOpCode); throw new HttpException(HOpCodeUCenter.UC_ERROR, errorPack); } UpdateUserGroupS.Builder builder = UpdateUserGroupS.newBuilder(); builder.setHOpCode(httpPacket.hSession.headParam.hOpCode); builder.setUserGroup(UserGroupAction.getUserGroupDataBuilder(userGroup)); HttpPacket packet = new HttpPacket(httpPacket.hSession.headParam.hOpCode, builder.build()); return packet; } public HttpPacket getUserGroupHandle(HttpPacket httpPacket) throws HttpException { GetUserGroupC message = (GetUserGroupC) httpPacket.getData(); UserGroup userGroup = UserGroupAction.getUserGroupById(message.getUserGroupId()); if (userGroup == null) { UCError errorPack = UCErrorPack.create(UCErrorCode.ERROR_CODE_12, httpPacket.hSession.headParam.hOpCode); throw new HttpException(HOpCodeUCenter.UC_ERROR, errorPack); } GetUserGroupS.Builder builder = GetUserGroupS.newBuilder(); builder.setHOpCode(httpPacket.hSession.headParam.hOpCode); builder.setUserGroup(UserGroupAction.getUserGroupDataBuilder(userGroup)); HttpPacket packet = new HttpPacket(httpPacket.hSession.headParam.hOpCode, builder.build()); return packet; } public HttpPacket deleteUserGroupHandle(HttpPacket httpPacket) throws HttpException { DeleteUserGroupC message = (DeleteUserGroupC) httpPacket.getData(); boolean result = UserGroupAction.deleteUserGroup(message.getUserGroupId()); if (!result) { UCError errorPack = UCErrorPack.create(UCErrorCode.ERROR_CODE_15, httpPacket.hSession.headParam.hOpCode); throw new HttpException(HOpCodeUCenter.UC_ERROR, errorPack); } DeleteUserGroupS.Builder builder = DeleteUserGroupS.newBuilder(); builder.setHOpCode(httpPacket.hSession.headParam.hOpCode); HttpPacket packet = new HttpPacket(httpPacket.hSession.headParam.hOpCode, builder.build()); return packet; } public HttpPacket getUserGroupListHandle(HttpPacket httpPacket) throws HttpException { GetUserGroupListC message = (GetUserGroupListC) httpPacket.getData(); List<UserGroup> userGroupList = UserGroupAction.getUserGroupList(message.getUserGroupParentId(), message.getIsUserGroupParentIsNull(), message.getIsRecursion(), message.getUserGroupTopId(), message.getUserGroupState(), message.getUserGroupCreateTimeGreaterThan(), message.getUserGroupCreateTimeLessThan(), message.getUserGroupUpdateTimeGreaterThan(), message.getUserGroupUpdateTimeLessThan()); int currentPage = message.getCurrentPage(); int pageSize = message.getPageSize(); PageObj pageObj = PageFormat.getStartAndEnd(currentPage, pageSize, userGroupList.size()); GetUserGroupListS.Builder builder = GetUserGroupListS.newBuilder(); builder.setHOpCode(httpPacket.hSession.headParam.hOpCode); builder.setCurrentPage(pageObj.currentPage); builder.setPageSize(pageObj.pageSize); builder.setTotalPage(pageObj.totalPage); builder.setAllNum(pageObj.allNum); if (userGroupList != null) { for (int i = pageObj.start; i < pageObj.end; i++) { UserGroup userGroup = userGroupList.get(i); builder.addUserGroup(UserGroupAction.getUserGroupDataBuilder(userGroup)); } } HttpPacket packet = new HttpPacket(httpPacket.hSession.headParam.hOpCode, builder.build()); return packet; } }
[ "232365732@qq.com" ]
232365732@qq.com