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
1314e76234bad3c0859cb34e717fe8a90829b070
eb5bda214a4c3875fe911eaae3243371b8d3bd1c
/app/src/main/java/com/pc/profnavykt/ProfessiiList/S23_01_08_colleges.java
5221721cbc339eb667abe253385b64e911501820
[]
no_license
bokunoheya/Prof_Navigation_Yakutia
edc894d7d05473261d36e08bf25a6b771fa6bf13
9e691a17676ec49901d02bd158a1db3e47c308ad
refs/heads/master
2022-12-06T09:01:49.228729
2020-08-13T01:18:53
2020-08-13T01:18:53
261,056,835
0
0
null
null
null
null
UTF-8
Java
false
false
2,340
java
package com.pc.profnavykt.ProfessiiList; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import com.pc.profnavykt.R; import androidx.fragment.app.Fragment; import androidx.navigation.Navigation; /** * A simple {@link Fragment} subclass. * Use the {@link S23_01_08_colleges#newInstance} factory method to * create an instance of this fragment. */ public class S23_01_08_colleges extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; public S23_01_08_colleges() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment S21_01_10_colleges. */ // TODO: Rename and change types and number of parameters public static S23_01_08_colleges newInstance(String param1, String param2) { S23_01_08_colleges fragment = new S23_01_08_colleges(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View root= inflater.inflate(R.layout.s23_01_08_colleges, container, false); Button but1= root.findViewById(R.id.but1); but1.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.yat)); return root; } }
[ "ikkisuruk@gmail.com" ]
ikkisuruk@gmail.com
0e8c89dd3b1cf096c52039f1a429a33da451c20c
0f0d04b3300c1e08479f5a8dbc3ae95ee43ec862
/src/main/java/com/commoncoupon/controller/PasswordEncoder.java
45ab2145488413e7718fe51fe4738f5c39a8bc81
[]
no_license
ravi1252/commoncoupon
1bdbfbcf11e22e631f2efe3b890d42c2802f3544
538db646a3edcc0e2960521e00af2989f550ef5b
refs/heads/master
2021-01-13T14:59:49.781441
2017-01-16T18:27:43
2017-01-16T18:27:43
79,145,315
0
0
null
null
null
null
UTF-8
Java
false
false
986
java
package com.commoncoupon.controller; import org.springframework.dao.DataAccessException; import org.springframework.security.authentication.encoding.Md5PasswordEncoder; public class PasswordEncoder extends Md5PasswordEncoder { @Override public String encodePassword(String arg0, Object arg1) throws DataAccessException { return super.encodePassword(arg0,null); } @Override public boolean isPasswordValid(String encPasswd, String plainPasswd, Object salt) throws DataAccessException { return super.isPasswordValid(encPasswd, plainPasswd, null); } /** * @param args */ public static void main(String[] args) { PasswordEncoder end = new PasswordEncoder(); end.setEncodeHashAsBase64(false); //e569646e2344debde78cfd644e3bfb94 System.out.println(end.encodePassword("change.me", null)); //5e8edd851d2fdfbd7415232c67367cc3 System.out.println(end.isPasswordValid("cfed2815f33f81ed7c13f8fc0ce28714","change.me", null)); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
50d1811d1f47fe48c81945e699e03246375b925c
6a7660106e52b4e821d8e275621c41453af00ba1
/src/main/java/org/x1/utils/net/manager/ServerHandlerManager.java
d4669ffd6cbab140fa77986fb7b7893a08bc6e23
[]
no_license
zglbig/x1
d1e22617494b71b79e30d54ea3314faadd663a30
b8e2dca3f02ceec1a5e9c0f6f722c0894ff9b1f2
refs/heads/master
2021-07-22T12:54:56.896689
2017-10-31T13:45:39
2017-10-31T13:45:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
package org.x1.utils.net.manager; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import org.x1.executor.ExecutorUtils; import org.x1.player.data.PersistPlayer; import org.x1.utils.net.logic.ProtocolLogicAdapter; import org.x1.utils.net.model.Request; import org.x1.utils.SpringUtils; import org.x1.utils.serializer.protostuffer.SerializerUtils; public class ServerHandlerManager extends SimpleChannelInboundHandler<Request>{ /**消息分发器*/ private MessageOutManager messageOutManager; public ServerHandlerManager() { this.messageOutManager = MessageOutManager.getInstance(); } private void process(Channel channel, Request request) throws CloneNotSupportedException { messageOutManager.process(channel,request); } @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { //客户端在 System.err.println("用户上线"+ctx.channel().remoteAddress()); } @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { ctx.channel().close(); } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { System.err.println("用户下线"+ctx.channel().remoteAddress()); ctx.channel().close(); } @Override protected void channelRead0(ChannelHandlerContext ctx, Request request) throws Exception { //将消息发送到消息分发 process(ctx.channel(), request); } }
[ "1030681978@qq.com" ]
1030681978@qq.com
7e8ce9b5869784f70fa5b754eef2b84a039173d5
6e498099b6858eae14bf3959255be9ea1856f862
/src/com/facebook/buck/support/bgtasks/BackgroundTask.java
e3ca1207fe38cb3fc4e65ecfa81be0e571d9ff36
[ "Apache-2.0" ]
permissive
Bonnie1312/buck
2dcfb0791637db675b495b3d27e75998a7a77797
3cf76f426b1d2ab11b9b3d43fd574818e525c3da
refs/heads/master
2020-06-11T13:29:48.660073
2019-06-26T19:59:32
2019-06-26T21:06:24
193,979,660
2
0
Apache-2.0
2019-09-22T07:23:56
2019-06-26T21:24:33
Java
UTF-8
Java
false
false
1,718
java
/* * Copyright 2018-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.support.bgtasks; import com.facebook.buck.core.util.immutables.BuckStyleImmutable; import java.util.Optional; import java.util.concurrent.TimeUnit; import org.immutables.value.Value; /** * Abstract class for background tasks to be run after build, e.g. cleanup/logging. Tasks take an * action (e.g. close an event listener) and the arguments for that action. Tasks should be run by a * {@link BackgroundTaskManager}. */ @Value.Immutable @Value.Style(init = "set*", deepImmutablesDetection = true) public abstract class BackgroundTask<T> { @Value.Parameter abstract String getName(); @Value.Parameter abstract TaskAction<T> getAction(); @Value.Parameter abstract T getActionArgs(); abstract Optional<Timeout> getTimeout(); @Value.Default boolean getShouldCancelOnRepeat() { return false; } /** Timeout object for {@link BackgroundTask}. */ @Value.Immutable(builder = false) @BuckStyleImmutable abstract static class AbstractTimeout { @Value.Parameter abstract long timeout(); @Value.Parameter abstract TimeUnit unit(); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
36db7fe0a54c7fc5d06354552d1f31c399435773
d743888c3f214c9e7954db39b171dec346ead657
/Java OOP Principles - Exercises/src/BirthdayCelebrations/Worker.java
ee010f3d74d4385012bfa276c0d935319e53db01
[]
no_license
GeorgeK95/DatabasesAdvanced
6683000266d922e7855cca4e55b246d8a97d0b49
cb2ed0fcaff163617460d860af70f2105471a7e1
refs/heads/master
2020-12-03T07:58:46.414568
2017-08-31T11:10:10
2017-08-31T11:10:10
95,643,423
2
0
null
null
null
null
UTF-8
Java
false
false
3,389
java
package BirthdayCelebrations; import java.text.DecimalFormat; /** * Created by George-Lenovo on 7/5/2017. */ public class Worker implements Human { private String firstName; private String lastName; private double weekSalary; private int workHoursPerDay; private boolean success = true; public Worker(String firstName, String lastName, double weekSalary, int workHoursPerDay) { this.setFirstName(firstName); this.setLastName(lastName); this.setWeekSalary(weekSalary); this.setWorkHoursPerDay(workHoursPerDay); } public double calculateMoney() { DecimalFormat df = new DecimalFormat("#.##"); double res = (this.weekSalary / 7) / this.workHoursPerDay; return Double.valueOf(df.format(res)); } public double getWeekSalary() { DecimalFormat df = new DecimalFormat("#.##"); return Double.valueOf(df.format(this.weekSalary)); } public void setWeekSalary(double weekSalary) { if (weekSalary > 10) { this.weekSalary = weekSalary; } else { System.out.println("Expected value mismatch!Argument: weekSalary"); success = false; } } public double getWorkHoursPerDay() { DecimalFormat df = new DecimalFormat("#.##"); return Double.valueOf(df.format(this.workHoursPerDay)); } public void setWorkHoursPerDay(int workHoursPerDay) { if (workHoursPerDay >= 1 && workHoursPerDay <= 12) { this.workHoursPerDay = workHoursPerDay; } else { System.out.println("Expected value mismatch!Argument: workHoursPerDay"); success = false; } } public void setFirstName(String firstName) { char fletter = firstName.charAt(0); if (fletter >= 65 && fletter <= 90) { if (firstName.length() > 4) { this.firstName = firstName; } else { System.out.println("Expected length at least 4 symbols!Argument: firstName"); } } else { System.out.println("Expected upper case letter!Argument: firstName"); } } @Override public String getFirstName() { return this.firstName; } public String getLastName() { return this.lastName; } @Override public boolean isSuccess() { return success; } public void setLastName(String lastName) { char fletter = firstName.charAt(0); if (fletter >= 65 && fletter <= 90) { if (firstName.length() > 3) { this.lastName = lastName; } else { System.out.println("Expected length more than 3 symbols!Argument: lastName"); } } else { System.out.println("Expected upper case letter!Argument: lastName"); } } @Override public String toString() { DecimalFormat df = new DecimalFormat("#.##"); return "First Name: " + firstName + '\n' + "Last Name: " + lastName + '\n' + "Week Salary: " + getWeekSalary() + '\n' + "Hours per day: " + getWorkHoursPerDay() + '\n' + "Salary per hour: " + this.calculateMoney() + '\n'; } // private void printWeekSalary() { // System.out.println("Week Salary: " + getWeekSalary()); // } }
[ "george_it@abv.bg" ]
george_it@abv.bg
61c00cff6f183a11611c22ea9714c89b5f14977c
d5786bf0335010f7de9bb2cea6bb0a9536ff73af
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/ResumeTSTriggerInstanceRequest.java
95c4cf9e3fc90b480cfefd2c73e6076df6318fe5
[ "Apache-2.0" ]
permissive
1203802276/aliyun-openapi-java-sdk
8066c546f0177cbbebb7b1178fe6ccaeb6f1da09
e3f89f2ef8542055e3990401a94edccd1bbca410
refs/heads/master
2023-04-15T07:09:27.195262
2021-03-19T06:22:51
2021-03-19T06:22:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,954
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.sofa.model.v20190815; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.sofa.Endpoint; /** * @author auto create * @version */ public class ResumeTSTriggerInstanceRequest extends RpcAcsRequest<ResumeTSTriggerInstanceResponse> { private String instanceId; private String jobRequestId; public ResumeTSTriggerInstanceRequest() { super("SOFA", "2019-08-15", "ResumeTSTriggerInstance", "sofacafedeps"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getInstanceId() { return this.instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; if(instanceId != null){ putBodyParameter("InstanceId", instanceId); } } public String getJobRequestId() { return this.jobRequestId; } public void setJobRequestId(String jobRequestId) { this.jobRequestId = jobRequestId; if(jobRequestId != null){ putBodyParameter("JobRequestId", jobRequestId); } } @Override public Class<ResumeTSTriggerInstanceResponse> getResponseClass() { return ResumeTSTriggerInstanceResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
7df96264fcebc923020e933aea0459c832f70aa8
62e334192393326476756dfa89dce9f0f08570d4
/tk_code/tiku-essay-app/essay-server/src/main/java/com/huatu/tiku/essay/task/CommitAnswerTask.java
da452966f136fb39610210a00870a932a47d1539
[]
no_license
JellyB/code_back
4796d5816ba6ff6f3925fded9d75254536a5ddcf
f5cecf3a9efd6851724a1315813337a0741bd89d
refs/heads/master
2022-07-16T14:19:39.770569
2019-11-22T09:22:12
2019-11-22T09:22:12
223,366,837
1
2
null
2022-06-30T20:21:38
2019-11-22T09:15:50
Java
UTF-8
Java
false
false
1,795
java
package com.huatu.tiku.essay.task; import com.huatu.common.exception.BizException; import com.huatu.tiku.essay.constant.cache.AmswerCommitRedisKey; import com.huatu.tiku.essay.service.UserAnswerService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.ValueOperations; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; import java.net.*; import java.util.Enumeration; import java.util.concurrent.TimeUnit; /** * 未批改成功的答题卡 再次提交 * 5分钟一次增量提交,模考大赛的答题卡除外 * * @author zhaoxi */ @Component @Slf4j public class CommitAnswerTask extends TaskService{ private static final Logger logger = LoggerFactory.getLogger(CommitAnswerTask.class); @Autowired private UserAnswerService userAnswerService; private static final long TASK_LOCK_EXPIRE_TIME = 5; @Override public void run() { String serverIp = getLocalLock(); logger.info("auto commit unfinished answerCard task start.server={}", serverIp); //提交五分钟前提交的且未完成的答题卡 userAnswerService.unfinishedCardCommit(); } @Scheduled(fixedRate = 60000 * 5) public void labelClose() throws BizException { task(); } @Override public String getCacheKey() { return AmswerCommitRedisKey.getUnCommitAnswerLockKey(); } @Override protected long getExpireTime() { return TASK_LOCK_EXPIRE_TIME; } }
[ "jelly_b@126.com" ]
jelly_b@126.com
596afc449978a297712dc7b7167f929b19e92fc5
8cc35fa8b7c37b2fae4d2fa55fdcc042c79b45b2
/BLM103_2018_2019_Guz/src/Ders04Lab/Ornek2b.java
dd55638e76b08cc1592762dd448bcbd363c51479
[]
no_license
EmirhanAkyol1721221214/BLM103_2018_2019_Guz
11adc4dc25d8a7c4f5af253df29d766f1aeb50e5
5cc544a2c041dc3f09167499607f87a3ca6a0214
refs/heads/master
2021-11-27T12:10:46.792459
2018-12-27T11:29:09
2018-12-27T11:29:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Ders04Lab; /** * * @author anizam */ public class Ornek2b { /* n!?in de?erini hesaplayan program? yaz?n?z. */ public static void main(String[] args) { int n = 5; int sonuc = 1; for (int i = n; i > 0; i--) { sonuc = sonuc*i; //5*4*3*2*1 } System.out.println(n +"! = " + sonuc); } }
[ "alinizam99@gmail.com" ]
alinizam99@gmail.com
6ec6fd00a835f6fae74fcc94318ba6a652a7102d
958b13739d7da564749737cb848200da5bd476eb
/src/main/java/com/alipay/api/response/AlipayUserUnicomCardInfoSyncResponse.java
be8d0025e750c3143e590c8ab69081ede3cd8ad1
[ "Apache-2.0" ]
permissive
anywhere/alipay-sdk-java-all
0a181c934ca84654d6d2f25f199bf4215c167bd2
649e6ff0633ebfca93a071ff575bacad4311cdd4
refs/heads/master
2023-02-13T02:09:28.859092
2021-01-14T03:17:27
2021-01-14T03:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.user.unicom.card.info.sync response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayUserUnicomCardInfoSyncResponse extends AlipayResponse { private static final long serialVersionUID = 1323291363146544242L; /** * 业务处理结果 (成功: SUCCESS, 失败: FAIL, 重试: RETRY) */ @ApiField("card_sync_result") private String cardSyncResult; /** * 状态发生变更的用户的联通手机号码 */ @ApiField("phone_no") private String phoneNo; /** * 支付宝用户ID */ @ApiField("user_id") private String userId; public void setCardSyncResult(String cardSyncResult) { this.cardSyncResult = cardSyncResult; } public String getCardSyncResult( ) { return this.cardSyncResult; } public void setPhoneNo(String phoneNo) { this.phoneNo = phoneNo; } public String getPhoneNo( ) { return this.phoneNo; } public void setUserId(String userId) { this.userId = userId; } public String getUserId( ) { return this.userId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
1a5239a1c853985d100bb98a4c17b46130bebf1d
c80f25f9c8faa1ea9db5bb1b8e36c3903a80a58b
/laosiji-sources/feng2/sources/anetwork/channel/http/NetworkStatusHelper.java
f582197d66a4b1d6747139c828fcf343e954fdde
[]
no_license
wenzhaot/luobo_tool
05c2e009039178c50fd878af91f0347632b0c26d
e9798e5251d3d6ba859bb15a00d13f085bc690a8
refs/heads/master
2020-03-25T23:23:48.171352
2019-09-21T07:09:48
2019-09-21T07:09:48
144,272,972
0
0
null
null
null
null
UTF-8
Java
false
false
939
java
package anetwork.channel.http; @Deprecated /* compiled from: Taobao */ public class NetworkStatusHelper { /* compiled from: Taobao */ public enum NetworkStatus { NONE, NO, GPRS, CDMA, EDGE, G3, G4, WIFI } @Deprecated public static NetworkStatus getStatus() { switch (anet.channel.status.NetworkStatusHelper.a()) { case NO: return NetworkStatus.NO; case G2: return NetworkStatus.GPRS; case G3: return NetworkStatus.G3; case G4: return NetworkStatus.G4; case WIFI: return NetworkStatus.WIFI; default: return NetworkStatus.NONE; } } @Deprecated public static boolean isNetworkAvailable() { return anet.channel.status.NetworkStatusHelper.g(); } }
[ "tanwenzhao@vipkid.com.cn" ]
tanwenzhao@vipkid.com.cn
35f3ee5836dbba6bf478da3e7b4cce7d621fbca3
0459a7e4333d680a38c70d61997920212d78aff5
/Other Platforms/3DR_Solo/3DRSoloHacks/3DRSoloHacks-master/src/android/support/v4/view/LayoutInflaterCompatHC.java
9485432ca29677454aee468210ad3cc8e0ccfa3f
[]
no_license
rcjetpilot/DJI-Hacking
4c5b4936ca30d7542cbd440e99ef0401f8185ab9
316a8e92fdfbad685fe35216e1293d0a3b3067d8
refs/heads/master
2020-05-17T10:41:52.166389
2018-02-19T20:04:06
2018-02-19T20:04:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,474
java
package android.support.v4.view; import android.util.Log; import android.view.LayoutInflater; import android.view.LayoutInflater.Factory; import android.view.LayoutInflater.Factory2; import java.lang.reflect.Field; class LayoutInflaterCompatHC { private static final String TAG = "LayoutInflaterCompatHC"; private static boolean sCheckedField; private static Field sLayoutInflaterFactory2Field; static void forceSetFactory2(LayoutInflater paramLayoutInflater, LayoutInflater.Factory2 paramFactory2) { if (!sCheckedField); try { sLayoutInflaterFactory2Field = LayoutInflater.class.getDeclaredField("mFactory2"); sLayoutInflaterFactory2Field.setAccessible(true); sCheckedField = true; if (sLayoutInflaterFactory2Field == null); } catch (NoSuchFieldException localNoSuchFieldException) { try { sLayoutInflaterFactory2Field.set(paramLayoutInflater, paramFactory2); return; localNoSuchFieldException = localNoSuchFieldException; Log.e("LayoutInflaterCompatHC", "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", localNoSuchFieldException); } catch (IllegalAccessException localIllegalAccessException) { Log.e("LayoutInflaterCompatHC", "forceSetFactory2 could not set the Factory2 on LayoutInflater " + paramLayoutInflater + "; inflation may have unexpected results.", localIllegalAccessException); } } } static void setFactory(LayoutInflater paramLayoutInflater, LayoutInflaterFactory paramLayoutInflaterFactory) { if (paramLayoutInflaterFactory != null); for (LayoutInflaterCompatHC.FactoryWrapperHC localFactoryWrapperHC = new LayoutInflaterCompatHC.FactoryWrapperHC(paramLayoutInflaterFactory); ; localFactoryWrapperHC = null) { paramLayoutInflater.setFactory2(localFactoryWrapperHC); LayoutInflater.Factory localFactory = paramLayoutInflater.getFactory(); if (!(localFactory instanceof LayoutInflater.Factory2)) break; forceSetFactory2(paramLayoutInflater, (LayoutInflater.Factory2)localFactory); return; } forceSetFactory2(paramLayoutInflater, localFactoryWrapperHC); } } /* Location: /Users/kfinisterre/Desktop/Solo/3DRSoloHacks/unpacked_apk/classes_dex2jar.jar * Qualified Name: android.support.v4.view.LayoutInflaterCompatHC * JD-Core Version: 0.6.2 */
[ "jajunkmail32@gmail.com" ]
jajunkmail32@gmail.com
ab43b00fc5914f5cc3d6a44fa1858fd0278ce46a
e3afe95ed7e4aafa702cb329afb6c61f671fac25
/samurai-remotedump/src/main/java/one/cafebabe/samurai/remotedump/ProcessUtil.java
e2ff2ddaacdec534cabc8a7b790d5013321d88b5
[ "Apache-2.0" ]
permissive
mhatano/samurai
ed06003cbb6c7faec6884ec1197b8c5eca30e42a
9e2038d68dabc8f996ae89521576cfd6f991516a
refs/heads/main
2023-08-05T18:39:18.470183
2021-09-26T14:40:23
2021-09-26T14:40:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,283
java
/* * * * Copyright 2015 Yusuke Yamamoto * * 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 one.cafebabe.samurai.remotedump; import sun.jvmstat.monitor.*; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; public class ProcessUtil { public static List<VM> getVMs(String host) throws URISyntaxException, MonitorException { int localPid = (int)ProcessHandle.current().pid(); List<VM> vms = new ArrayList<>(); HostIdentifier hi = new HostIdentifier(host); MonitoredHost mh = MonitoredHost.getMonitoredHost(hi); Set<Integer> jvms = mh.activeVms(); for (Integer pidInteger : jvms) { try { int pid = pidInteger; // exclude local process from the list if (pid != localPid) { MonitoredVm vm = mh.getMonitoredVm(new VmIdentifier("//" + pid + "?mode=r"), 0); StringMonitor sm = (StringMonitor) vm.findByName("sun.rt.javaCommand"); String fullCommandLine = ""; if (sm != null) { fullCommandLine = sm.stringValue(); } vms.add(new VM(pid, fullCommandLine)); vm.detach(); } } catch (MonitorException me) { // target process is no longer available } } return Collections.unmodifiableList(vms); } public static void main(String... args) throws URISyntaxException, MonitorException { List<VM> vms = getVMs("localhost"); vms.forEach(e -> System.out.printf("%s %s%n", e.getPid(), e.getFqcn())); } }
[ "yusuke@mac.com" ]
yusuke@mac.com
68a76825072a417bc1c43bdfbcfc1f2296d9a30c
b6568076b9a309885ee45db705a03c78d82c6a3e
/src/level1/sumbetweeninteger/Test.java
601c2b420e7cba75bb6fdca417cd9a24ff92e150
[]
no_license
Lokie89/programmers
541d7e761fbe02aadb89681097ae24c34d2d25bc
6402a4597f8158e5c860afe870c17b81a912d5f4
refs/heads/master
2021-06-25T20:27:43.512843
2021-02-18T06:29:23
2021-02-18T06:29:23
212,266,343
0
0
null
null
null
null
UTF-8
Java
false
false
285
java
package level1.sumbetweeninteger; public class Test { public static void main(String[] args) { System.out.println(new Solution().solution(3, 5)); System.out.println(new Solution().solution(3, 3)); System.out.println(new Solution().solution(5, 3)); } }
[ "traeuman@gmail.com" ]
traeuman@gmail.com
d9e583d2c17e4134492683459d02046754053edf
5c304274f83c358983881408c56673fce5dc982f
/src/main/java/ru/geekbrains/lesson1/hw/task1/classbook/Person.java
c4a738e1296cc981a3f48f777d3c8f4ea0a1d86f
[]
no_license
iourilitv/gb-preparing-for-interviewing
ea5abc71d06380c31a1a85f7680cae56deb42b1f
ebb3b71e20914f9bfc83bdb22215d48ebb3176d6
refs/heads/master
2023-01-05T00:31:14.605246
2020-10-29T11:38:53
2020-10-29T11:38:53
302,263,344
1
0
null
2020-10-30T08:45:33
2020-10-08T07:26:40
Java
UTF-8
Java
false
false
3,878
java
package ru.geekbrains.lesson1.hw.task1.classbook; public class Person { private String firstName; private String lastName; private String middleName; private int age; private String gender; private String country; private String address; private String phone; //TODO Пример из методички(закоментировано) не работает - все поля у person - null public static class Builder { // private String firstName; // private String lastName; // private String middleName; // private int age; // private String gender; // private String country; // private String address; // private String phone; private final Person person = new Person(); public Builder firstName(String firstName) { // this.firstName = firstName; person.firstName = firstName; return this; } public Builder lastName(String lastName) { // this.lastName = lastName; person.lastName = lastName; return this; } public Builder middleName(String middleName) { // this.middleName = middleName; person.middleName = middleName; return this; } public Builder age(int age) { // this.age = age; person.age = age; return this; } public Builder gender(String gender) { // this.gender = gender; person.gender = gender; return this; } public Builder country(String country) { // this.country = country; person.country = country; return this; } public Builder address(String address) { // this.address = address; person.address = address; return this; } public Builder phone(String phone) { // this.phone = phone; person.phone = phone; return this; } // public Person build() { // return new Person(); // } public Person build() { return person; } } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public String getMiddleName() { return middleName; } public int getAge() { return age; } public String getGender() { return gender; } public String getCountry() { return country; } public String getAddress() { return address; } public String getPhone() { return phone; } public void setFirstName(String firstName) { this.firstName = firstName; } public void setLastName(String lastName) { this.lastName = lastName; } public void setMiddleName(String middleName) { this.middleName = middleName; } public void setAge(int age) { this.age = age; } public void setGender(String gender) { this.gender = gender; } public void setCountry(String country) { this.country = country; } public void setAddress(String address) { this.address = address; } public void setPhone(String phone) { this.phone = phone; } @Override public String toString() { return "Person{" + "firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", middleName='" + middleName + '\'' + ", age=" + age + ", gender='" + gender + '\'' + ", country='" + country + '\'' + ", address='" + address + '\'' + ", phone='" + phone + '\'' + '}'; } }
[ "iourilitv1965@gmail.com" ]
iourilitv1965@gmail.com
fd34a1f7092dbcd76df0dff528276b4bb8594203
899a427a903148d0d26e903faf8021b94b126911
/07-Linked-List/补充/0143-reorder-list/src/Solution.java
b0ae824da3c50753ad6f79187f7d4fa4214d703d
[ "Apache-2.0" ]
permissive
liweiwei1419/LeetCode-Solutions-in-Good-Style
033ab69b93fa2d294ab6a08c8b9fbcff6d32a178
acc8661338cc7c1ae067915fb16079a9e3e66847
refs/heads/master
2022-07-27T15:24:57.717791
2021-12-19T03:11:02
2021-12-19T03:11:02
161,101,415
2,016
351
Apache-2.0
2022-01-07T10:38:35
2018-12-10T01:50:09
Java
UTF-8
Java
false
false
2,212
java
class ListNode { int val; ListNode next; ListNode(int x) { val = x; } public ListNode(int[] nums) { if (nums == null || nums.length == 0) { throw new IllegalArgumentException("arr can not be empty"); } this.val = nums[0]; ListNode curr = this; for (int i = 1; i < nums.length; i++) { curr.next = new ListNode(nums[i]); curr = curr.next; } } @Override public String toString() { StringBuilder s = new StringBuilder(); ListNode cur = this; while (cur != null) { s.append(cur.val + " -> "); cur = cur.next; } s.append("NULL"); return s.toString(); } } public class Solution { public void reorderList(ListNode head) { if (head == null || head.next == null || head.next.next == null) { return; } // 先找到中点 ListNode n1 = head; ListNode n2 = head; while (n2.next != null && n2.next.next != null) { n1 = n1.next; n2 = n2.next.next; } // 此时 n1 的位置就在中点,即分成 [0,n1] [n1+1,end] ListNode curNode = n1.next; n1.next = null; // 翻转链表 ListNode pre = null; ListNode next; while (curNode != null) { next = curNode.next; curNode.next = pre; pre = curNode; curNode = next; } // 此时 pre 是翻转以后的链表头 ListNode p1 = head; ListNode p2 = pre; while (p2 != null) { n1 = p1.next; n2 = p2.next; p1.next = p2; if (n1 == null) { break; } p2.next = n1; p1 = n1; p2 = n2; } } public static void main(String[] args) { int[] nums = {1, 2, 3, 4, 5}; Solution solution = new Solution(); ListNode head = new ListNode(nums); solution.reorderList(head); System.out.println(head); } }
[ "121088825@qq.com" ]
121088825@qq.com
db38ffbf89d31f391da295b9d088af6f2b90d3a3
468eb5b24b11f9a0ee3351d0cdd373c89001e557
/src/visao/tabelas/TableModelImposto.java
c40def069c990a95c5fae8ffb1d3fa5cbf3b8087
[]
no_license
thyagopacher/Gerenciador
d98a78c1b5aaabf7ffd7ea39c1d8ffde1752237b
674377fcb592e7f13772d7bbfe1f1ecec32e0088
refs/heads/main
2023-03-18T02:29:00.381552
2021-03-01T13:07:03
2021-03-01T13:07:03
343,419,217
0
0
null
null
null
null
UTF-8
Java
false
false
6,733
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package visao.tabelas; import java.util.ArrayList; import java.util.List; import static java.util.Locale.getDefault; import javax.swing.table.AbstractTableModel; import vo.Imposto; /** * * @author ThyagoHenrique */ public class TableModelImposto extends AbstractTableModel { private static final long serialVersionUID = 1L; /* Lista de Sócios que representam as linhas. */ private final List<Imposto> linhas; /* Array de Strings com o nome das colunas. */ private String[] colunas; /* Cria um ImpostoTableModel vazio. */ public TableModelImposto() { linhas = new ArrayList<>(100); this.colunas = new String[] {"Código", "Nome"}; } /* Cria um ImpostoTableModel carregado com * a lista de sócios especificada. */ public TableModelImposto(List<Imposto> obj) { linhas = new ArrayList<>(obj); } /* Retorna a quantidade de colunas. */ @Override public int getColumnCount() { // Está retornando o tamanho do array "colunas". // Mas como o array é fixo, vai sempre retornar 4. return colunas.length; } /* Retorna a quantidade de linhas. */ @Override public int getRowCount() { // Retorna o tamanho da lista de sócios. return linhas.size(); } /* Retorna o nome da coluna no índice especificado. * Este método é usado pela JTable para saber o texto do cabeçalho. */ @Override public String getColumnName(int columnIndex) { // Retorna o conteúdo do Array que possui o nome das colunas // no índice especificado. return colunas[columnIndex]; }; /* Retorna a classe dos elementos da coluna especificada. * Este método é usado pela JTable na hora de definir o editor da célula. */ @Override public Class<?> getColumnClass(int columnIndex) { // Retorna a classe referente a coluna especificada. // Aqui é feito um switch para verificar qual é a coluna // e retornar o tipo adequado. As colunas são as mesmas // que foram especificadas no array "colunas". switch (columnIndex) { case 0: // Primeira coluna é o nome, que é uma String. return Integer.class; case 1: // Segunda coluna é o telefone, que também é uma String.. return String.class; default: // Se o índice da coluna não for válido, lança um // IndexOutOfBoundsException (Exceção de índice fora dos limites). // Não foi necessário verificar se o índice da linha é inválido, // pois o próprio ArrayList lança a exceção caso seja inválido. throw new IndexOutOfBoundsException("columnIndex out of bounds"); } } /* Retorna o valor da célula especificada * pelos índices da linha e da coluna. */ @Override public Object getValueAt(int rowIndex, int columnIndex) { // Pega o sócio da linha especificada. Imposto imposto = linhas.get(rowIndex); // Retorna o campo referente a coluna especificada. // Aqui é feito um switch para verificar qual é a coluna // e retornar o campo adequado. As colunas são as mesmas // que foram especificadas no array "colunas". switch (columnIndex) { case 0: return imposto.getCodigo(); case 1: return imposto.getNome().toUpperCase(getDefault()); default: // Se o índice da coluna não for válido, lança um // IndexOutOfBoundsException (Exceção de índice fora dos limites). // Não foi necessário verificar se o índice da linha é inválido, // pois o próprio ArrayList lança a exceção caso seja inválido. throw new IndexOutOfBoundsException("columnIndex out of bounds"); } } /* Seta o valor da célula especificada * pelos índices da linha e da coluna. * Aqui ele está implementado para não fazer nada, * até porque este table model não é editável. */ public void setValueAt(Imposto aValue, int rowIndex) { linhas.set(rowIndex, aValue); fireTableRowsUpdated(rowIndex, rowIndex); } /* Retorna um valor booleano que define se a célula em questão * pode ser editada ou não. * Este método é utilizado pela JTable na hora de definir o editor da célula. * Neste caso, estará sempre retornando false, não permitindo que nenhuma * célula seja editada. */ @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return false; } //////////////////////////////////////////////////////////// // Os métodos declarados até aqui foram as implementações // // de TableModel, que são continuamente utilizados // // pela JTable para definir seu comportamento, // // por isso o nome Table Model (Modelo da Tabela). // // // // A partir de agora, os métodos criados serão // // particulares desta classe. Eles serão úteis // // em algumas situações. // //////////////////////////////////////////////////////////// /* Retorna o sócio da linha especificada. */ public Imposto getImposto(int indiceLinha) { return linhas.get(indiceLinha); } /* Adiciona um registro. */ public void addImposto(Imposto imposto) { // Adiciona o registro. linhas.add(imposto); // Pega a quantidade de registros e subtrai um para achar // o último índice. É preciso subtrair um, pois os índices // começam pelo zero. int ultimoIndice = getRowCount() - 1; // Reporta a mudança. O JTable recebe a notificação // e se redesenha permitindo que visualizemos a atualização. fireTableRowsInserted(ultimoIndice, ultimoIndice); } /* Remove a linha especificada. */ public void removeImposto(int indiceLinha) { // Remove o sócio da linha especificada. linhas.remove(indiceLinha); // Reporta a mudança. O JTable recebe a notificação // e se redesenha permitindo que visualizemos a atualização. fireTableRowsDeleted(indiceLinha, indiceLinha); } /* Adiciona uma lista de sócios ao final dos registros. */ public void addLista(List<Imposto> obj) { // Pega o tamanho antigo da tabela. int tamanhoAntigo = getRowCount(); // Adiciona os registros. linhas.addAll(obj); // Reporta a mudança. O JTable recebe a notificação // e se redesenha permitindo que visualizemos a atualização. fireTableRowsInserted(tamanhoAntigo, getRowCount() - 1); } /* Remove todos os registros. */ public void limpar() { // Remove todos os elementos da lista de sócios. linhas.clear(); // Reporta a mudança. O JTable recebe a notificação // e se redesenha permitindo que visualizemos a atualização. fireTableDataChanged(); } /* Verifica se este table model está vazio. */ public boolean isEmpty() { return linhas.isEmpty(); } }
[ "thyago.pacher@gmail.com" ]
thyago.pacher@gmail.com
5c5facff521a9bf9fc002bc749e69946e7efe89b
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/google/p550a/LazyField.java
5d4a58ee2ca35ce8f7c7e01b625989f152be47bf
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,930
java
package com.google.p550a; import java.util.Iterator; import java.util.Map; /* renamed from: com.google.a.z */ /* compiled from: LazyField */ public class LazyField extends LazyFieldLite { /* renamed from: b */ private final MessageLite f21841b; public LazyField(MessageLite aiVar, ExtensionRegistryLite sVar, AbstractC4518i iVar) { super(sVar, iVar); this.f21841b = aiVar; } /* renamed from: a */ public MessageLite mo34337a() { return mo32788a(this.f21841b); } @Override // com.google.p550a.LazyFieldLite public int hashCode() { return mo34337a().hashCode(); } @Override // com.google.p550a.LazyFieldLite public boolean equals(Object obj) { return mo34337a().equals(obj); } public String toString() { return mo34337a().toString(); } /* access modifiers changed from: package-private */ /* renamed from: com.google.a.z$a */ /* compiled from: LazyField */ public static class C4706a<K> implements Map.Entry<K, Object> { /* renamed from: a */ private Map.Entry<K, LazyField> f21842a; private C4706a(Map.Entry<K, LazyField> entry) { this.f21842a = entry; } @Override // java.util.Map.Entry public K getKey() { return this.f21842a.getKey(); } @Override // java.util.Map.Entry public Object getValue() { LazyField value = this.f21842a.getValue(); if (value == null) { return null; } return value.mo34337a(); } /* renamed from: a */ public LazyField mo34339a() { return this.f21842a.getValue(); } @Override // java.util.Map.Entry public Object setValue(Object obj) { if (obj instanceof MessageLite) { return this.f21842a.getValue().mo32790b((MessageLite) obj); } throw new IllegalArgumentException("LazyField now only used for MessageSet, and the value of MessageSet must be an instance of MessageLite"); } } /* access modifiers changed from: package-private */ /* renamed from: com.google.a.z$b */ /* compiled from: LazyField */ public static class C4707b<K> implements Iterator<Map.Entry<K, Object>> { /* renamed from: a */ private Iterator<Map.Entry<K, Object>> f21843a; public C4707b(Iterator<Map.Entry<K, Object>> it) { this.f21843a = it; } public boolean hasNext() { return this.f21843a.hasNext(); } /* renamed from: a */ public Map.Entry<K, Object> next() { Map.Entry<K, Object> next = this.f21843a.next(); return next.getValue() instanceof LazyField ? new C4706a(next) : next; } public void remove() { this.f21843a.remove(); } } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
8660d01c7bf4fca1fefdf9f3e773ba4f0a40deda
015fa633ea034d2be6aaa92aa3e1c663b38877e9
/src/main/java/collections/set/ExampleEnumSet.java
bc8c065d97ebec76be9b1a5517e0cc9cb8d9328b
[]
no_license
programming-practices/java-core
b510a5104f417e670d74b94d62b6beff8d829b44
7680e92adc6bb9310ecc401b3768fc66b3ee66c2
refs/heads/main
2023-03-15T09:44:59.469839
2021-03-01T11:53:50
2021-03-01T11:53:50
303,077,639
1
0
null
null
null
null
UTF-8
Java
false
false
7,363
java
package collections.set; import java.util.EnumSet; enum Weekday {MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY} public class ExampleEnumSet { public static void main(String[] args) { EnumSet<Weekday> always = EnumSet.allOf(Weekday.class); EnumSet<Weekday> never = EnumSet.noneOf(Weekday.class); EnumSet<Weekday> workday = EnumSet.range(Weekday.MONDAY, Weekday.FRIDAY); EnumSet<Weekday> mwf = EnumSet.of(Weekday.MONDAY, Weekday.WEDNESDAY, Weekday.FRIDAY); } }; /* ---------------------------------------------------------------------------------------------------------------------- Класс EnumSet расширяет класс AbstractSet и реализует интерфейс Set. Он служит для создания множества, предназначенного для применения вместе с klychami перечислимого типа enum. Это обобщенный класс , объявляемый следующим образом: classEnumSet<E extendз Enum<E>> где Е обозначает элементы перечислимого типа. Следует иметь в виду, что класс Е должен расширять класс Enum<E> , а это требует, чтобы элементы относились к указанному перечислимому типу enum. В классе EnumS e t конструкторы не определяются. Вместо этого для создания объектов используются фабричные методы, перечисленные в табл. 1 8. 9. Обратите внимание на неоднократную перегрузку метода о fArgInt ( ) . Это делается из соображе­ ний эффективности. Передать известное количество аргументов, когда оно неве­ лико, можно быстрее, чем делать это с помощью параметра переменной длины. ---------------------------------------------------------------------------------------------------------------------- HA ЗАМЕТКУ! В документации на прикладной программный интерфейс API класса EnumSet можно обнаружить необычные параметры вроде Е extends Е п ш К Е Х Такое обозначение просто озна­ чает, что “е относится к перечислимому типу" . Перечислимые типы расширяют обобщенный класс E m m Например, перечислимый тип Weekday расширяет класс Enum<Weekday>. ---------------------------------------------------------------------------------------------------------------------- static <Е extendз Enum<E>> EnumSet<E> allOf(Class<E> class) Создает множесгво типа EnwaSet, coдepжaщее элементы заданного перечисления class static <Е extendз Enum<E>> EnumSet<E> complementOf(EnumSet<E> enum) Создает множесгво типа EnumSet, дoпoлняющее элементы, отсугствующие в заданноммножестве еnum static <Е extends Enum<E>> EnumSet<E> copyOf(EnumSet<E> с) Создает множество типа EnumSet, содержа­щее элементы из заданного множесгва с atatic <Е extends Enum<E>> EnumSet<E> copyOf(Collection<E> с) Создает множесгво типа EnumSet, содержа­щее элементы из заданной коллекции с static <Е extends Enum<E>> EnumSet<E> noneOf(Class<E> t) Создает множесгво типа EnumSet, содержа­щее элементы, которые не входят в заданное перечисление t, которое по определению является пустым множеством static <Е extends Enum<E>> EnumSet<E> of(Е v, Е . . . аргуменoi dлины) Создает множество типа EnumSet, содержа­щее элементы v и нуль или дополнительные значения перечислимого типа static <Е extends Enum<E>> EnumSet<E> of(Е v) Создает множество типа EnumSet, содержа­щее элементы v at:&tic <Е extends Enum<E>> EnumSet<E> of(Е vl, Е v2) Создает множссгво т ип а EnumSet, содержа­щее элементы vl и v2 static <Е extendз Enum<E>> EnumSet<E> of (Е vl, Е v2, Е v3) Создает множество типа EnumSet, содержа­щее элементы от vl до v3 static <Е extendз Enum<E>> EnumSet<E> of (Е vl, Еv2, Еv3, Еv4) Создаст множество тина EnumSet, содержа­щее элементы от vl до v4 static <Е extends Enum<E>> EnnumSet<E> of (Еvl, Еv2, ЕvJ, Еv4, Еv5) Создает множество типа EnumSet, содержа­щее элементы от vl до v5 static <Е extends Enum<E>> EnumSet<E> range (Е начшю, Е конец) Создает множество tipa EnumSet, содержа­щее элементы в заданных predelax от начала и до конца • static <E extends Enum<E>> EnumSet<E> allOf (Class<E> enumType) Возвращает множество, содержащее все значения заданного перечислимого типа. • static <Е extends Е п и п К Е » EnumSet<E> noneOf (Class<E> епитТуре) Возвращает пустое множество, способное хранить значения заданного перечислимого типа. • static <Е extends Е п ш К Е » EnumSet<E> range (Е from, Е to) Возвращает множество, содержащее все значения от fArgInt r o m до t o включительно. • static <Е extends Е п и л КЕ » EnumSet<E> of(E value) • static <E extends Е п и л К Е » EnumSet<E> of(E value, E... values) Возвращают множество, содержащее заданные значения. ---------------------------------------------------------------------------------------------------------------------- */
[ "tsyupryk.roman@gmail.com" ]
tsyupryk.roman@gmail.com
c5ff6f16a5c35eefea62fe21c1f0dedb28944f29
c8bf1df473f0a1cf5d4bd58e697570a6803790a6
/cpactf/src/main/java/harness/Category.java
85727884892023b24ef9cb84284b1ceddb88a450
[]
no_license
j-white/hacked-castor
0adbe590c359fa5567856ea89e61541507800d76
6cd86a43f892643d15cfb089d34fc25cf49b6a69
refs/heads/master
2021-01-20T16:55:33.166799
2017-02-24T14:04:16
2017-02-24T14:04:16
82,838,036
0
1
null
2017-02-23T21:35:39
2017-02-22T18:20:40
Java
UTF-8
Java
false
false
4,096
java
/** * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided * that the following conditions are met: * * 1. Redistributions of source code must retain copyright * statements and notices. Redistributions must also contain a * copy of this document. * * 2. Redistributions in binary form must reproduce the * above copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * 3. The name "Exolab" must not be used to endorse or promote * products derived from this Software without prior written * permission of Intalio, Inc. For written permission, * please contact info@exolab.org. * * 4. Products derived from this Software may not be called "Exolab" * nor may "Exolab" appear in their names without prior written * permission of Intalio, Inc. Exolab is a registered * trademark of Intalio, Inc. * * 5. Due credit should be given to the Exolab Project * (http://www.exolab.org/). * * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESSED 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 * INTALIO, INC. OR ITS 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. * * Copyright 1999 (C) Intalio, Inc. All Rights Reserved. * * $Id$ */ package harness; import java.util.Vector; import java.util.Enumeration; import java.lang.reflect.Constructor; import junit.framework.TestSuite; public class Category { private String _name; private String _description; private String _className; private Vector _cases = new Vector(); private Object _object; public void setName( String name ) { _name = name; } public String getName() { return _name; } public void setDescription( String description ) { _description = description; } public String getDescription() { return _description; } public void setClassName( String className ) { _className = className; } public String getClassName() { return _className; } public void addCase( Case tc ) { _cases.addElement( tc ); } public Enumeration getCase() { return _cases.elements(); } public void setObject( Object object ) { _object = object; } public Object getObject() { return _object; } public TestSuite createTestCategory( TestHarness harness, String branch ) throws Exception { Class catClass; Constructor cnst; TestHarness category; CastorTestCase tc; String sub = (branch==null||branch.equals(""))?null :branch.substring( branch.indexOf(".")==-1?branch.length():branch.indexOf(".")+1 ); catClass = Class.forName( _className ); cnst = catClass.getConstructor( new Class[] { TestHarness.class, String.class, String.class, Object.class } ); category = (TestHarness) cnst.newInstance( new Object[] { harness, _name, _description, _object } ); for ( int i = 0 ; i < _cases.size() ; ++i ) { tc = ((Case)_cases.elementAt(i)).createTestCase( category ); if ( sub == null || sub.trim().equals("") || sub.equals( tc.getName() ) ) category.addTest( tc ); } return category; } }
[ "jesse@opennms.org" ]
jesse@opennms.org
c56cdcc1b40be7d34d6515ebf7b43cd36e5a68f9
c3bb807d1c1087254726c4cd249e05b8ed595aaa
/src/oc/wh40k/units/cm2007/CM2007Necrosius.java
c2e3431589bdbfbd4d3dfa2759196d8c989b599d
[]
no_license
spacecooky/OnlineCodex30k
f550ddabcbe6beec18f02b3e53415ed5c774d92f
db6b38329b2046199f6bbe0f83a74ad72367bd8d
refs/heads/master
2020-12-31T07:19:49.457242
2014-05-04T14:23:19
2014-05-04T14:23:19
55,958,944
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package oc.wh40k.units.cm2007; import oc.Eintrag; public class CM2007Necrosius extends Eintrag { public CM2007Necrosius() { name = "Necrosius"; grundkosten = 160; add(ico = new oc.Picture("oc/wh40k/images/Necrosius.gif")); complete(); } @Override public void refreshen() { setUnikat(true); } }
[ "spacecooky@b551ab73-3a01-0010-9fae-47f737f7a8aa" ]
spacecooky@b551ab73-3a01-0010-9fae-47f737f7a8aa
07859cf6da731c0626181f07de700c2761902eb8
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/apache/avro/ipc/stats/TestHistogram.java
facc7394419a158e5c0587c9ea897bb78cda6aee
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
4,791
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.avro.ipc.stats; import Histogram.SegmenterException; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import org.apache.avro.ipc.stats.Histogram.Entry; import org.apache.avro.ipc.stats.Histogram.Segmenter; import org.junit.Assert; import org.junit.Test; public class TestHistogram { @Test public void testBasicOperation() { Segmenter<String, Integer> s = new Histogram.TreeMapSegmenter<>(new TreeSet<>(Arrays.asList(0, 1, 2, 4, 8, 16))); Histogram<String, Integer> h = new Histogram(s); for (int i = 0; i < 20; ++i) { h.add(i); } Assert.assertEquals(20, h.getCount()); Assert.assertArrayEquals(new int[]{ 1, 1, 2, 4, 8, 4 }, h.getHistogram()); Assert.assertEquals("[0,1)=1;[1,2)=1;[2,4)=2;[4,8)=4;[8,16)=8;[16,infinity)=4", h.toString()); String[] correctBucketLabels = new String[]{ "[0,1)", "[1,2)", "[2,4)", "[4,8)", "[8,16)", "[16,infinity)" }; // test bucket iterator int pos = 0; Iterator<String> it = h.getSegmenter().getBuckets(); while (it.hasNext()) { Assert.assertEquals(correctBucketLabels[pos], it.next()); pos = pos + 1; } Assert.assertEquals(correctBucketLabels.length, pos); List<String> labels = h.getSegmenter().getBucketLabels(); Assert.assertEquals(correctBucketLabels.length, labels.size()); if ((labels.size()) == (correctBucketLabels.length)) { for (int i = 0; i < (labels.size()); i++) { Assert.assertEquals(correctBucketLabels[i], labels.get(i)); } } String[] correctBoundryLabels = new String[]{ "0", "1", "2", "4", "8", "16" }; List<String> boundryLabels = h.getSegmenter().getBoundaryLabels(); Assert.assertEquals(correctBoundryLabels.length, boundryLabels.size()); if ((boundryLabels.size()) == (correctBoundryLabels.length)) { for (int i = 0; i < (boundryLabels.size()); i++) { Assert.assertEquals(correctBoundryLabels[i], boundryLabels.get(i)); } } List<Entry<String>> entries = new ArrayList<>(); for (Entry<String> entry : h.entries()) { entries.add(entry); } Assert.assertEquals("[0,1)", entries.get(0).bucket); Assert.assertEquals(4, entries.get(5).count); Assert.assertEquals(6, entries.size()); h.add(1010); h.add(9191); List<Integer> recent = h.getRecentAdditions(); Assert.assertTrue(recent.contains(1010)); Assert.assertTrue(recent.contains(9191)); } @Test(expected = SegmenterException.class) public void testBadValue() { Segmenter<String, Long> s = new Histogram.TreeMapSegmenter<>(new TreeSet<>(Arrays.asList(0L, 1L, 2L, 4L, 8L, 16L))); Histogram<String, Long> h = new Histogram(s); h.add((-1L)); } /** * Only has one bucket */ static class SingleBucketSegmenter implements Segmenter<String, Float> { @Override public Iterator<String> getBuckets() { return Arrays.asList("X").iterator(); } public List<String> getBoundaryLabels() { return Arrays.asList("X"); } public List<String> getBucketLabels() { return Arrays.asList("X"); } @Override public int segment(Float value) { return 0; } @Override public int size() { return 1; } } @Test public void testFloatHistogram() { FloatHistogram<String> h = new FloatHistogram(new TestHistogram.SingleBucketSegmenter()); h.add(12.0F); h.add(10.0F); h.add(20.0F); Assert.assertEquals(3, h.getCount()); Assert.assertEquals(14.0F, h.getMean(), 1.0E-4); Assert.assertEquals(5.291F, h.getUnbiasedStdDev(), 0.001); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
2597ae25a70c9d9c82a53c56814cda941be1ee53
73fd3e7cddb1937e2b187312cc084137794fe454
/lichkin-projects-app-admin/src/main/java/com/lichkin/application/apis/api60003/U/n00/I.java
f2bc430bf37b273551b6134949abbdddc0218e5d
[ "MIT" ]
permissive
LichKinContributor/lichkin-projects-app
91e19e5a4a3d9cf09e133244439de95c0de2441e
213a082c674095c82a07a57a233c4e5e5cca3b14
refs/heads/master
2020-03-30T01:15:09.229470
2019-05-21T14:58:00
2019-05-21T14:58:00
150,566,894
0
0
null
null
null
null
UTF-8
Java
false
false
775
java
package com.lichkin.application.apis.api60003.U.n00; import com.lichkin.framework.beans.impl.LKRequestIDBean; import com.lichkin.framework.defines.annotations.IgnoreLog; import lombok.Getter; import lombok.Setter; @Getter @Setter public class I extends LKRequestIDBean { private String versions; private String categoryCode; private String title; private String brief; private String keywords; private String author; @IgnoreLog private String content; private String linkUrl; private Byte orderId; private String imageUrl1; private String imageUrl2; private String imageUrl3; private String imageUrl4; private String imageUrl5; private String imageUrl6; private String imageUrl7; private String imageUrl8; private String imageUrl9; }
[ "zhuangxuxin@hotmail.com" ]
zhuangxuxin@hotmail.com
a4ee56f2a0aebd1ffb36b8af902f5ee03f009b88
a1a6c1b700c9cd8cba1fd43fbc83af071dfd2800
/kaixin_source/src/com/google/common/collect/ComparisonChain.java
91734d067c182e8715c92894b93a056bad8aca85
[]
no_license
jingshauizh/kaixin
58c315f99dcdde09589471fcaa262e0a1598701c
11b8d109862dba00b7a78f9002e47064f26a0175
refs/heads/master
2021-07-11T00:55:46.997368
2021-04-16T09:41:47
2021-04-16T09:41:47
25,718,738
0
1
null
null
null
null
UTF-8
Java
false
false
4,177
java
package com.google.common.collect; import com.google.common.annotations.GwtCompatible; import com.google.common.primitives.Booleans; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; import java.util.Comparator; import javax.annotation.Nullable; @GwtCompatible public abstract class ComparisonChain { private static final ComparisonChain ACTIVE = new ComparisonChain() { ComparisonChain classify(int paramInt) { if (paramInt < 0) return ComparisonChain.LESS; if (paramInt > 0) return ComparisonChain.GREATER; return ComparisonChain.ACTIVE; } public ComparisonChain compare(double paramDouble1, double paramDouble2) { return classify(Double.compare(paramDouble1, paramDouble2)); } public ComparisonChain compare(float paramFloat1, float paramFloat2) { return classify(Float.compare(paramFloat1, paramFloat2)); } public ComparisonChain compare(int paramInt1, int paramInt2) { return classify(Ints.compare(paramInt1, paramInt2)); } public ComparisonChain compare(long paramLong1, long paramLong2) { return classify(Longs.compare(paramLong1, paramLong2)); } public ComparisonChain compare(Comparable paramComparable1, Comparable paramComparable2) { return classify(paramComparable1.compareTo(paramComparable2)); } public <T> ComparisonChain compare(@Nullable T paramT1, @Nullable T paramT2, Comparator<T> paramComparator) { return classify(paramComparator.compare(paramT1, paramT2)); } public ComparisonChain compare(boolean paramBoolean1, boolean paramBoolean2) { return classify(Booleans.compare(paramBoolean1, paramBoolean2)); } public int result() { return 0; } }; private static final ComparisonChain GREATER; private static final ComparisonChain LESS = new InactiveComparisonChain(-1); static { GREATER = new InactiveComparisonChain(1); } public static ComparisonChain start() { return ACTIVE; } public abstract ComparisonChain compare(double paramDouble1, double paramDouble2); public abstract ComparisonChain compare(float paramFloat1, float paramFloat2); public abstract ComparisonChain compare(int paramInt1, int paramInt2); public abstract ComparisonChain compare(long paramLong1, long paramLong2); public abstract ComparisonChain compare(Comparable<?> paramComparable1, Comparable<?> paramComparable2); public abstract <T> ComparisonChain compare(@Nullable T paramT1, @Nullable T paramT2, Comparator<T> paramComparator); public abstract ComparisonChain compare(boolean paramBoolean1, boolean paramBoolean2); public abstract int result(); private static final class InactiveComparisonChain extends ComparisonChain { final int result; InactiveComparisonChain(int paramInt) { super(); this.result = paramInt; } public ComparisonChain compare(double paramDouble1, double paramDouble2) { return this; } public ComparisonChain compare(float paramFloat1, float paramFloat2) { return this; } public ComparisonChain compare(int paramInt1, int paramInt2) { return this; } public ComparisonChain compare(long paramLong1, long paramLong2) { return this; } public ComparisonChain compare(@Nullable Comparable paramComparable1, @Nullable Comparable paramComparable2) { return this; } public <T> ComparisonChain compare(@Nullable T paramT1, @Nullable T paramT2, @Nullable Comparator<T> paramComparator) { return this; } public ComparisonChain compare(boolean paramBoolean1, boolean paramBoolean2) { return this; } public int result() { return this.result; } } } /* Location: C:\9exce\android\pj\kaixin_android_3.9.9_034_kaixin001\classes_dex2jar.jar * Qualified Name: com.google.common.collect.ComparisonChain * JD-Core Version: 0.6.0 */
[ "jingshuaizh@163.com" ]
jingshuaizh@163.com
4994df5c36b559dc47df22cef9d2249c0584690b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/28/28_f6fa3f3b766ca5fcb71da688474df44f96e3fe75/BillList/28_f6fa3f3b766ca5fcb71da688474df44f96e3fe75_BillList_s.java
16a02aba4b04a2257a31dd6014941635720aac96
[]
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
6,779
java
package com.sunlightlabs.android.congress; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import android.app.Activity; import android.app.ListActivity; import android.app.ProgressDialog; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; import android.text.Html; import android.text.Spanned; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; import com.sunlightlabs.android.congress.utils.Utils; import com.sunlightlabs.congress.java.Bill; import com.sunlightlabs.congress.java.CongressException; import com.sunlightlabs.congress.java.Drumbone; public class BillList extends ListActivity { private static final int BILLS = 20; public static final int BILLS_RECENT = 0; public static final int BILLS_LAW = 1; public static final int BILLS_SPONSOR = 2; private ArrayList<Bill> bills; private LoadBillsTask loadBillsTask; private String sponsor_id, sponsor_name; private int type; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.legislator_list); Drumbone.apiKey = getResources().getString(R.string.sunlight_api_key); Drumbone.baseUrl = getResources().getString(R.string.drumbone_base_url); Bundle extras = getIntent().getExtras(); type = extras.getInt("type", BILLS_RECENT); sponsor_id = extras.getString("sponsor_id"); sponsor_name = extras.getString("sponsor_name"); setupControls(); MainActivityHolder holder = (MainActivityHolder) getLastNonConfigurationInstance(); if (holder != null) { this.bills = holder.bills; this.loadBillsTask = holder.loadBillsTask; if (loadBillsTask != null) loadBillsTask.onScreenLoad(this); } loadBills(); } @Override public Object onRetainNonConfigurationInstance() { return new MainActivityHolder(bills, loadBillsTask); } public void setupControls() { switch (type) { case BILLS_RECENT: setTitle("Latest Bills"); break; case BILLS_LAW: setTitle("Latest Laws"); break; case BILLS_SPONSOR: setTitle("Latest Bills by " + sponsor_name); break; } } protected void onListItemClick(ListView parent, View v, int position, long id) { Bill bill = (Bill) parent.getItemAtPosition(position); startActivity(Utils.billIntentExtra(this, bill)); } public void loadBills() { if (loadBillsTask == null) { if (bills == null) loadBillsTask = (LoadBillsTask) new LoadBillsTask(this).execute(); else displayBills(); } } public void onLoadBills(ArrayList<Bill> bills) { this.bills = bills; displayBills(); } public void onLoadBills(CongressException exception) { Utils.alert(this, exception); this.bills = new ArrayList<Bill>(); displayBills(); } public void displayBills() { setListAdapter(new BillAdapter(this, bills)); } private class LoadBillsTask extends AsyncTask<Void,Void,ArrayList<Bill>> { private BillList context; private CongressException exception; private ProgressDialog dialog; public LoadBillsTask(BillList context) { this.context = context; } @Override protected void onPreExecute() { loadingDialog(); } public void onScreenLoad(BillList context) { this.context = context; loadingDialog(); } @Override public ArrayList<Bill> doInBackground(Void... nothing) { try { switch (context.type) { case BILLS_RECENT: return Bill.recentlyIntroduced(BILLS); case BILLS_LAW: return Bill.recentLaws(BILLS); case BILLS_SPONSOR: return Bill.recentlySponsored(BILLS, context.sponsor_id); default: throw new CongressException("Not sure what type of bills to find."); } } catch(CongressException exception) { this.exception = exception; return null; } } @Override public void onPostExecute(ArrayList<Bill> bills) { if (dialog != null && dialog.isShowing()) dialog.dismiss(); context.loadBillsTask = null; if (exception != null && bills == null) context.onLoadBills(exception); else context.onLoadBills(bills); } public void loadingDialog() { dialog = new ProgressDialog(context); dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); dialog.setMessage("Loading bills..."); dialog.setOnCancelListener(new DialogInterface.OnCancelListener() { public void onCancel(DialogInterface dialog) { cancel(true); context.finish(); } }); dialog.show(); } } private class BillAdapter extends ArrayAdapter<Bill> { LayoutInflater inflater; public BillAdapter(Activity context, ArrayList<Bill> bills) { super(context, 0, bills); inflater = LayoutInflater.from(context); } public View getView(int position, View convertView, ViewGroup parent) { LinearLayout view; if (convertView == null) view = (LinearLayout) inflater.inflate(R.layout.bill_item, null); else view = (LinearLayout) convertView; Bill bill = getItem(position); String code = Bill.formatCode(bill.code); String action; Date date; switch (type) { case BILLS_LAW: date = bill.enacted_at; action = "became law"; break; case BILLS_RECENT: case BILLS_SPONSOR: default: date = bill.introduced_at; action = "was introduced"; break; } Spanned byline = Html.fromHtml("<b>" + code + "</b> " + action + ":"); ((TextView) view.findViewById(R.id.byline)).setText(byline); ((TextView) view.findViewById(R.id.date)).setText(new SimpleDateFormat("MMM dd").format(date)); TextView titleView = ((TextView) view.findViewById(R.id.title)); if (bill.short_title != null) { String title = Utils.truncate(bill.short_title, 300); titleView.setTextSize(19); titleView.setText(title); } else { // if (bill.official_title != null) String title = Utils.truncate(bill.official_title, 300); titleView.setTextSize(16); titleView.setText(title); } view.setTag(bill); return view; } } static class MainActivityHolder { ArrayList<Bill> bills; LoadBillsTask loadBillsTask; public MainActivityHolder(ArrayList<Bill> bills, LoadBillsTask loadBillsTask) { this.bills = bills; this.loadBillsTask = loadBillsTask; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
56e4a260689fc4e62b03c5ea0a048d481211278d
c7eee575ddb627e49723de15692ed6eb146ef890
/src/main/java/com/itextpdf/html2pdf/css/page/CssNonStandardRuleSet.java
91ab0fe50c0538d1873bc9d71ed0350055d5eb44
[]
no_license
Grace007/milkana
ff2f638ebeaf3b906f24e8816eac8a3e8ec77f5e
f7207ba658bfab7799dc9f9444e1bbd08156bc35
refs/heads/master
2020-03-22T17:39:40.813233
2018-07-10T09:19:44
2018-07-10T09:19:44
140,407,668
0
0
null
null
null
null
UTF-8
Java
false
false
3,684
java
/* This file is part of the iText (R) project. Copyright (c) 1998-2017 iText Group NV Authors: Bruno Lowagie, Paulo Soares, et al. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: http://itextpdf.com/terms-of-use/ The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. In accordance with Section 7(b) of the GNU Affero General Public License, a covered work must retain the producer line in every PDF that is created or manipulated using iText. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without disclosing the source code of your own applications. These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product. For more information, please contact iText Software Corp. at this address: sales@itextpdf.com */ package com.itextpdf.html2pdf.css.page; import com.itextpdf.html2pdf.css.CssDeclaration; import com.itextpdf.html2pdf.css.CssRuleSet; import com.itextpdf.html2pdf.css.selector.ICssSelector; import java.util.List; /** * Class for a non standard {@link CssRuleSet}. */ class CssNonStandardRuleSet extends CssRuleSet { /** * Creates a new {@link CssNonStandardRuleSet} instance. * * @param selector the selector * @param declarations the declarations */ public CssNonStandardRuleSet(ICssSelector selector, List<CssDeclaration> declarations) { super(selector, declarations); } /* (non-Javadoc) * @see com.itextpdf.html2pdf.css.CssRuleSet#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < getNormalDeclarations().size(); i++) { if (i > 0) { sb.append(";").append("\n"); } CssDeclaration declaration = getNormalDeclarations().get(i); sb.append(declaration.toString()); } for (int i = 0; i < getImportantDeclarations().size(); i++) { if (i > 0 || getNormalDeclarations().size() > 0) { sb.append(";").append("\n"); } CssDeclaration declaration = getImportantDeclarations().get(i); sb.append(declaration.toString()).append(" !important"); } return sb.toString(); } }
[ "15809713216run" ]
15809713216run
4f3149c53c75c08ebd9e4749c0cf379e4fb919e6
5f783378eb66481617346c3ea9aa8df20c683b0a
/src/main/java/com/netsuite/suitetalk/proxy/v2018_1/platform/core/Passport.java
ae50cec35c14c828d867596b03e45974ea5f9155
[]
no_license
djXplosivo/suitetalk-axis-proxy
b9bd506bcb43e4254439baf3a46c7ef688c7e57f
0ffba614f117962f9de2867a0677ec8494a2605a
refs/heads/master
2020-03-28T02:49:27.612364
2018-09-06T02:36:05
2018-09-06T02:36:05
147,599,598
0
0
null
null
null
null
UTF-8
Java
false
false
5,205
java
package com.netsuite.suitetalk.proxy.v2018_1.platform.core; import java.io.Serializable; import javax.xml.namespace.QName; import org.apache.axis.description.ElementDesc; import org.apache.axis.description.TypeDesc; import org.apache.axis.encoding.Deserializer; import org.apache.axis.encoding.Serializer; import org.apache.axis.encoding.ser.BeanDeserializer; import org.apache.axis.encoding.ser.BeanSerializer; public class Passport implements Serializable { private String email; private String password; private String account; private RecordRef role; private Object __equalsCalc = null; private boolean __hashCodeCalc = false; private static TypeDesc typeDesc = new TypeDesc(Passport.class, true); public Passport() { super(); } public Passport(String email, String password, String account, RecordRef role) { super(); this.email = email; this.password = password; this.account = account; this.role = role; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return this.password; } public void setPassword(String password) { this.password = password; } public String getAccount() { return this.account; } public void setAccount(String account) { this.account = account; } public RecordRef getRole() { return this.role; } public void setRole(RecordRef role) { this.role = role; } public synchronized boolean equals(Object obj) { if (!(obj instanceof Passport)) { return false; } else { Passport other = (Passport)obj; if (obj == null) { return false; } else if (this == obj) { return true; } else if (this.__equalsCalc != null) { return this.__equalsCalc == obj; } else { this.__equalsCalc = obj; boolean _equals = (this.email == null && other.getEmail() == null || this.email != null && this.email.equals(other.getEmail())) && (this.password == null && other.getPassword() == null || this.password != null && this.password.equals(other.getPassword())) && (this.account == null && other.getAccount() == null || this.account != null && this.account.equals(other.getAccount())) && (this.role == null && other.getRole() == null || this.role != null && this.role.equals(other.getRole())); this.__equalsCalc = null; return _equals; } } } public synchronized int hashCode() { if (this.__hashCodeCalc) { return 0; } else { this.__hashCodeCalc = true; int _hashCode = 1; if (this.getEmail() != null) { _hashCode += this.getEmail().hashCode(); } if (this.getPassword() != null) { _hashCode += this.getPassword().hashCode(); } if (this.getAccount() != null) { _hashCode += this.getAccount().hashCode(); } if (this.getRole() != null) { _hashCode += this.getRole().hashCode(); } this.__hashCodeCalc = false; return _hashCode; } } public static TypeDesc getTypeDesc() { return typeDesc; } public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) { return new BeanSerializer(_javaType, _xmlType, typeDesc); } public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) { return new BeanDeserializer(_javaType, _xmlType, typeDesc); } static { typeDesc.setXmlType(new QName("urn:core_2018_1.platform.webservices.netsuite.com", "Passport")); ElementDesc elemField = new ElementDesc(); elemField.setFieldName("email"); elemField.setXmlName(new QName("urn:core_2018_1.platform.webservices.netsuite.com", "email")); elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new ElementDesc(); elemField.setFieldName("password"); elemField.setXmlName(new QName("urn:core_2018_1.platform.webservices.netsuite.com", "password")); elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new ElementDesc(); elemField.setFieldName("account"); elemField.setXmlName(new QName("urn:core_2018_1.platform.webservices.netsuite.com", "account")); elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new ElementDesc(); elemField.setFieldName("role"); elemField.setXmlName(new QName("urn:core_2018_1.platform.webservices.netsuite.com", "role")); elemField.setXmlType(new QName("urn:core_2018_1.platform.webservices.netsuite.com", "RecordRef")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } }
[ "ccolon@git.eandjmedia.com" ]
ccolon@git.eandjmedia.com
e83a4659e013f088ab8eb8379d458db0886c656a
b8f680a3d5f9fa4a6c28fe5dbfc479ecb1079685
/src/ANXGallery/sources/com/miui/gallery/picker/helper/PickableSimpleAdapterWrapper.java
ff102156f4110c1bb31e06b041b873cac98ae789
[]
no_license
nckmml/ANXGallery
fb6d4036f5d730f705172e524a038f9b62984c4c
392f7a28a34556b6784979dd5eddcd9e4ceaaa69
refs/heads/master
2020-12-19T05:07:14.669897
2020-01-22T15:56:10
2020-01-22T15:56:10
235,607,907
0
2
null
null
null
null
UTF-8
Java
false
false
3,241
java
package com.miui.gallery.picker.helper; import android.database.Cursor; import android.database.DataSetObserver; import android.view.View; import android.view.ViewGroup; import android.widget.CursorAdapter; import com.miui.gallery.picker.helper.Picker; import com.miui.gallery.ui.Checkable; import com.miui.gallery.ui.MicroThumbGridItem; public class PickableSimpleAdapterWrapper extends AbsAdapterWrapper { private Picker mPicker; private PickerItemCheckedListener mPickerItemCheckedListener = new PickerItemCheckedListener(this.mPicker); private CursorAdapter mWrapped; public PickableSimpleAdapterWrapper(Picker picker, CursorAdapter cursorAdapter) { super(cursorAdapter); this.mPicker = picker; this.mWrapped = cursorAdapter; } public /* bridge */ /* synthetic */ boolean areAllItemsEnabled() { return super.areAllItemsEnabled(); } public /* bridge */ /* synthetic */ int getCount() { return super.getCount(); } public /* bridge */ /* synthetic */ Object getItem(int i) { return super.getItem(i); } public /* bridge */ /* synthetic */ long getItemId(int i) { return super.getItemId(i); } public /* bridge */ /* synthetic */ int getItemViewType(int i) { return super.getItemViewType(i); } public View getView(int i, View view, ViewGroup viewGroup) { View view2 = this.mWrapped.getView(i, view, viewGroup); if (this.mPicker.getMode() == Picker.Mode.SINGLE) { if (view2 instanceof MicroThumbGridItem) { ((MicroThumbGridItem) view2).setSimilarMarkEnable(true); } } else if (view2 instanceof Checkable) { Checkable checkable = (Checkable) view2; checkable.setCheckable(true); Cursor cursor = this.mWrapped.getCursor(); cursor.moveToPosition(i); checkable.setChecked(this.mPicker.contains(CursorUtils.getSha1(cursor))); } PickerItemHolder.bindView(i, view2, this.mWrapped, this.mPickerItemCheckedListener); return view2; } public /* bridge */ /* synthetic */ int getViewTypeCount() { return super.getViewTypeCount(); } public /* bridge */ /* synthetic */ boolean hasStableIds() { return super.hasStableIds(); } public /* bridge */ /* synthetic */ boolean isEmpty() { return super.isEmpty(); } public /* bridge */ /* synthetic */ boolean isEnabled(int i) { return super.isEnabled(i); } public /* bridge */ /* synthetic */ void notifyDataSetChanged() { super.notifyDataSetChanged(); } public /* bridge */ /* synthetic */ void notifyDataSetInvalidated() { super.notifyDataSetInvalidated(); } public /* bridge */ /* synthetic */ void registerDataSetObserver(DataSetObserver dataSetObserver) { super.registerDataSetObserver(dataSetObserver); } public /* bridge */ /* synthetic */ Cursor swapCursor(Cursor cursor) { return super.swapCursor(cursor); } public /* bridge */ /* synthetic */ void unregisterDataSetObserver(DataSetObserver dataSetObserver) { super.unregisterDataSetObserver(dataSetObserver); } }
[ "nico.kuemmel@gmail.com" ]
nico.kuemmel@gmail.com
f99488dc85de189b3bf5957d99f9b7b74862dd0e
845bbb090a057b9c4e15557fab0377d814066784
/1.JavaSyntax/src/com/javarush/task/task09/task0926/Solution.java
aadcb387554a0c9cb7c0167a4e100cb6ca52b476
[]
no_license
lelderbe/JavaRushTasks
84f28234f77df6fea1dc387e59b29b172a3e5f69
a6418fbea98f267389bae2d352c4852957804d9c
refs/heads/master
2022-04-04T04:47:17.936301
2020-02-05T20:01:25
2020-02-05T20:01:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
940
java
package com.javarush.task.task09.task0926; import java.util.ArrayList; /* Список из массивов чисел */ public class Solution { public static void main(String[] args) { ArrayList<int[]> list = createList(); printList(list); } public static ArrayList<int[]> createList() { //напишите тут ваш код ArrayList<int[]> list = new ArrayList<>(); list.add(new int[5]); list.add(new int[2]); list.add(new int[4]); list.add(new int[7]); list.add(new int[0]); for (int[] item : list) { for (int i = 0; i < item.length; i++) { item[i] = i; } } return list; } public static void printList(ArrayList<int[]> list) { for (int[] array : list) { for (int x : array) { System.out.println(x); } } } }
[ "fvdc@ya.ru" ]
fvdc@ya.ru
12010937487217e56161e73b1e12b1a3bb907749
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/google/android/gms/internal/ads/zzcqh.java
b27dc74bf3e873ecffc9174984d1939cff963979
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
533
java
package com.google.android.gms.internal.ads; final class zzcqh implements zzbsq { private zzbsq zzgfk; public zzcqh(zzcqe paramzzcqe, zzbsq paramzzbsq) { this.zzgfk = paramzzbsq; } public final void onAdLoaded() { this.zzgfi.zzalg(); this.zzgfk.onAdLoaded(); this.zzgfi.zzalh(); } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_2_dex2jar.jar * Qualified Name: com.google.android.gms.internal.ads.zzcqh * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
f7b3dd68a5982e62624395ef13f641b39caa86aa
a286f2b18e1b21c18fee450c306b4be807488d4e
/shop-three-layers-rest/src/main/java/es/upm/miw/shop/services/ArticleItem.java
dbecd29a233098efd319852825dfae8d9be1520a
[ "MIT" ]
permissive
qmacias/apaw-shop-architectures
fa1707e610cae496e9ca8a5d4ce9e9fb119d84a3
0dc661235b8ea956d4ae087549e811c870fd427b
refs/heads/develop
2023-03-16T07:05:11.314406
2020-10-04T16:21:54
2020-10-04T16:21:54
569,813,396
2
0
MIT
2022-11-23T17:09:20
2022-11-23T17:09:19
null
UTF-8
Java
false
false
1,320
java
package es.upm.miw.shop.services; import es.upm.miw.shop.data.ArticleItemEntity; import org.springframework.beans.BeanUtils; import java.math.BigDecimal; public class ArticleItem { private Long barcode; private Integer amount; private BigDecimal discount; public ArticleItem() { //empty for framework } public ArticleItem(Long barcode, Integer amount, BigDecimal discount) { this.barcode = barcode; this.amount = amount; this.discount = discount; } public ArticleItem(ArticleItemEntity articleItemEntity) { BeanUtils.copyProperties(articleItemEntity, this); } public Long getBarcode() { return barcode; } public void setBarcode(Long barcode) { this.barcode = barcode; } public Integer getAmount() { return amount; } public void setAmount(Integer amount) { this.amount = amount; } public BigDecimal getDiscount() { return discount; } public void setDiscount(BigDecimal discount) { this.discount = discount; } @Override public String toString() { return "ArticleItem{" + "barcode=" + barcode + ", amount=" + amount + ", discount=" + discount + '}'; } }
[ "jbernal@etsisi.upm.es" ]
jbernal@etsisi.upm.es
0551e885ea19a928481a06704dc00a4a5421a537
028cbe18b4e5c347f664c592cbc7f56729b74060
/v2/admin-cli/cli-api/src/java/com/sun/cli/jmx/cmd/NoProviderFoundException.java
f2893467413a9ed925e42619d6a4047a752d739c
[]
no_license
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
2,310
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ /* * $Header: /cvs/glassfish/admin-cli/cli-api/src/java/com/sun/cli/jmx/cmd/NoProviderFoundException.java,v 1.3 2005/12/25 03:45:39 tcfujii Exp $ * $Revision: 1.3 $ * $Date: 2005/12/25 03:45:39 $ */ package com.sun.cli.jmx.cmd; public class NoProviderFoundException extends Exception { public NoProviderFoundException( String msg ) { super( msg ); } }
[ "kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
6e2d8e2c1c2dcf9614906b286360769a4cd83ebb
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/ActiveMQ/440_1.java
996573bc68b04813c676497c9ca28385a6a19f7d
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
2,140
java
//,temp,JmsQueueTransactionTest.java,153,207,temp,JmsQueueBrowserTest.java,59,109 //,3 public class xxx { public void testReceiveBrowseReceive() throws Exception { Message[] outbound = new Message[] {session.createTextMessage("First Message"), session.createTextMessage("Second Message"), session.createTextMessage("Third Message")}; // lets consume any outstanding messages from previous test runs beginTx(); while (consumer.receive(1000) != null) { } commitTx(); beginTx(); producer.send(outbound[0]); producer.send(outbound[1]); producer.send(outbound[2]); commitTx(); // Get the first. beginTx(); assertEquals(outbound[0], consumer.receive(1000)); consumer.close(); commitTx(); beginTx(); QueueBrowser browser = session.createBrowser((Queue)destination); Enumeration enumeration = browser.getEnumeration(); // browse the second assertTrue("should have received the second message", enumeration.hasMoreElements()); assertEquals(outbound[1], (Message)enumeration.nextElement()); // browse the third. assertTrue("Should have received the third message", enumeration.hasMoreElements()); assertEquals(outbound[2], (Message)enumeration.nextElement()); LOG.info("Check for more..."); // There should be no more. boolean tooMany = false; while (enumeration.hasMoreElements()) { LOG.info("Got extra message: " + ((TextMessage)enumeration.nextElement()).getText()); tooMany = true; } assertFalse(tooMany); LOG.info("close browser..."); browser.close(); LOG.info("reopen and consume..."); // Re-open the consumer. consumer = resourceProvider.createConsumer(session, destination); // Receive the second. assertEquals(outbound[1], consumer.receive(1000)); // Receive the third. assertEquals(outbound[2], consumer.receive(1000)); consumer.close(); commitTx(); } };
[ "SHOSHIN\\sgholamian@shoshin.uwaterloo.ca" ]
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
db62f9ffb76fc2810ba4e726dedf950cbee14617
7dd2ed6759bd6e20cde067fe907c40ecf6b2f0ac
/payshop/src/com/zsTrade/web/villeage/model/Dvillage.java
34c1fb52c9722b41fd9ecfe339b5406005d957f0
[ "Apache-2.0" ]
permissive
T5750/store-repositories
64406e539dd41508acd4d17324a420bd722a126d
10c44c9fc069c49ff70c45373fd3168286002308
refs/heads/master
2020-03-16T13:10:40.115323
2018-05-16T02:19:39
2018-05-16T02:19:43
132,683,143
0
0
null
null
null
null
UTF-8
Java
false
false
2,000
java
/** Powered By zscat科技, Since 2016 - 2020 */ package com.zsTrade.web.villeage.model; import java.util.Date; import java.math.BigDecimal; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.Transient; import com.zsTrade.common.base.BaseEntity; /** * * @author zsCat 2017-1-19 10:17:13 * @Email: 951449465@qq.com * @version 1.0v * 村庄管理 */ @SuppressWarnings({ "unused"}) @Table(name="d_village") public class Dvillage extends BaseEntity { private static final long serialVersionUID = 1L; private String name; public String getName() {return this.getString("name");} public void setName(String name) {this.set("name",name);} private String address; public String getAddress() {return this.getString("address");} public void setAddress(String address) {this.set("address",address);} private String phone; public String getPhone() {return this.getString("phone");} public void setPhone(String phone) {this.set("phone",phone);} private Long userid; public Long getUserid() {return this.getLong("userid");} public void setUserid(Long userid) {this.set("userid",userid);} private Integer hit; public Integer getHit() {return this.getInteger("hit");} public void setHit(Integer hit) {this.set("hit",hit);} private String postcpde; public String getPostcpde() {return this.getString("postcpde");} public void setPostcpde(String postcpde) {this.set("postcpde",postcpde);} private String img; public String getImg() {return this.getString("img");} public void setImg(String img) {this.set("img",img);} private String orderby; public String getOrderby() {return this.getString("orderby");} public void setOrderby(String orderby) {this.set("orderby",orderby);} private Integer stat; public Integer getStat() {return this.getInteger("stat");} public void setStat(Integer stat) {this.set("stat",stat);} }
[ "evangel_a@sina.com" ]
evangel_a@sina.com
10d6084225d2ed3849e80ecaf25049adb22a1b9b
a500b8f800fe0b1df31cdea70358d9c1186d0de9
/core/org/obinject/storage/AbstractStructure.java
f26874dad1069912490e2b22e6e4fb7703e48a42
[]
no_license
joaorenno/obinject
e1c0d40e64b88e3eaa5114a0a9875524bbbf7c3a
e79a7993e5cdd308e3e6bafe11788807038bc4a2
refs/heads/master
2021-01-01T15:24:01.136442
2017-08-01T00:01:55
2017-08-01T00:18:02
20,874,558
0
0
null
null
null
null
UTF-8
Java
false
false
2,470
java
/* Copyright (C) 2013 Enzo Seraphim This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit <http://www.gnu.org/licenses/> */ package org.obinject.storage; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.ParameterizedType; import java.util.logging.Level; import java.util.logging.Logger; import org.obinject.device.Workspace; import org.obinject.meta.Uuid; /** * * @author Enzo Seraphim <seraphim@unifei.edu.br> * @author Luiz Olmes Carvalho <olmes@icmc.usp.br> * @author Thatyana de Faria Piola Seraphim <thatyana@unifei.edu.br> * * @param <T> */ public abstract class AbstractStructure<T> implements Structure<T> { private final Workspace workspace; private final Class<T> objectClass; private Uuid classUuid; /** * * @param workspace */ public AbstractStructure(Workspace workspace) { this.workspace = workspace; this.objectClass = ((Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0]); try { this.classUuid = (Uuid) objectClass.getMethod("getClassId").invoke(null); } catch (IllegalAccessException | IllegalArgumentException | NoSuchMethodException | SecurityException | InvocationTargetException ex) { Logger.getLogger(AbstractStructure.class.getName()).log(Level.SEVERE, null, ex); } } /** * * @return */ public Workspace getWorkspace() { return workspace; } public Uuid getClassUuid() { return classUuid; } @Override public Class<T> getObjectClass() { return objectClass; } @Override public abstract boolean add(T obj); @Override public abstract long getRootPageId(); @Override public abstract boolean remove(T obj); }
[ "administrator@JOAORENNO-MacBook-Air.local" ]
administrator@JOAORENNO-MacBook-Air.local
fea34d355cb923bce6329fed255df3e4dc54d778
9db14a1ccbf755b8b3743335eeb8abdd35451d6a
/SYSCONDOSIND/src/br/com/syscondosind/enumerics/EstadosUfEnum.java
810a207bd43420c5267539221b88ff1af481efed
[]
no_license
lcarrafabr/syscondosind
39121e943b4554fac0ea441da2bc596192c29b94
a68b11480d0b39358bb131e6b13d06196201bf56
refs/heads/master
2020-04-23T02:45:41.401599
2019-02-16T14:03:24
2019-02-16T14:03:24
170,856,476
0
0
null
null
null
null
UTF-8
Java
false
false
1,589
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.com.syscondosind.enumerics; /** * * @author Luciano Carrafa Benfica */ public enum EstadosUfEnum { AC("AC", "Acre"), AL("AL", "Alagoas"), AM("AM", "Amazonas"), AP("AP", "Amapá"), BA("BA", "Bahia"), CE("CE", "Ceará"), DF("DF", "Distrito Federal"), ES("ES", "Espirito Santo"), GO("GO", "Goias"), MA("MA", "Maranhão"), MG("MG", "Minas Gerais"), MS("MS", "Mato Grosso Sul"), MT("MT", "Mato Grosso"), PA("PA", "Pará"), PB("PB", "Paraiba"), PE("PE", "Pernanbuco"), PI("PI", "Piaui"), PR("PR", "Parana"), RJ("RJ", "Rio de Janeiro"), RN("RN", "Rio Grande do Norte"), RO("RO", "Rondônia"), RR("RR", "Roraima"), RS("RS", "Rio Grande do Sul"), SC("SC", "Santa Catarina"), SE("SE", "Sergipe"), SP("SP", "São Paulo"), TO("TO", "Tocantins"); private String sigla; private String estado; private EstadosUfEnum(String sigla, String estado) { this.sigla = sigla; this.estado = estado; } public String getSigla() { return sigla; } public String getEstado() { return estado; } public static EstadosUfEnum getByCodigo(String sigla) { for (EstadosUfEnum e : EstadosUfEnum.values()) { if (sigla.equals(e.getSigla())) { return e; } } return null; } }
[ "lcarrafa.br@gmail.com" ]
lcarrafa.br@gmail.com
6dad38f8aeb3dee98ce047a8bdfc337c6c159655
c4a8a89aca8a50cbb81c2255c8e33215827e5d55
/backup/egakat-integration-commons-archivos-dto/src/main/java/com/egakat/integration/archivos/enums/EstadoMensajeType.java
4bdb92ce0f12cd02e1a271843bbeb7ae0baa0c60
[]
no_license
github-ek/egakat-integration
5dba020e97d2530471152e3580418e0f6d2d2f62
d451bf5da61c15d89df71d36a7af7dd8167b6ee9
refs/heads/master
2022-07-13T13:43:21.010260
2019-09-23T04:00:29
2019-09-23T04:00:29
136,370,505
1
1
null
2022-06-28T15:22:36
2018-06-06T18:31:59
Java
UTF-8
Java
false
false
232
java
package com.egakat.integration.archivos.enums; public enum EstadoMensajeType { // @formatter:off NO_PROCESADO, CORREGIDO, ERROR_ENVIO, ENVIADO, ERROR_CONFIRMACION, CONFIRMADO, // @formatter:on }
[ "esb.ega.kat@gmail.com" ]
esb.ega.kat@gmail.com
e7c3e38e0e91bf407b1c5196604f997ab45e861e
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava15/Foo777Test.java
7dd47dfa8581016acfd36520baa4471e93656d0f
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package applicationModulepackageJava15; import org.junit.Test; public class Foo777Test { @Test public void testFoo0() { new Foo777().foo0(); } @Test public void testFoo1() { new Foo777().foo1(); } @Test public void testFoo2() { new Foo777().foo2(); } @Test public void testFoo3() { new Foo777().foo3(); } @Test public void testFoo4() { new Foo777().foo4(); } @Test public void testFoo5() { new Foo777().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
e1986013e64e573bca406743eb7c19ab07bb2c85
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazonaws/services/sqs/AmazonSQSAsyncClient$16.java
9dfc1b5ef668c64c6f42c9f05d67d950a415a935
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
1,076
java
package com.amazonaws.services.sqs; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.handlers.AsyncHandler; import com.amazonaws.services.sqs.model.SendMessageRequest; import com.amazonaws.services.sqs.model.SendMessageResult; import java.util.concurrent.Callable; class AmazonSQSAsyncClient$16 implements Callable<SendMessageResult> { AmazonSQSAsyncClient$16(AmazonSQSAsyncClient this$0, SendMessageRequest paramSendMessageRequest, AsyncHandler paramAsyncHandler) {} public SendMessageResult call() throws Exception { SendMessageResult result = null; try { result = this$0.executeSendMessage(val$finalRequest); } catch (Exception ex) { if (val$asyncHandler != null) { val$asyncHandler.onError(ex); } throw ex; } if (val$asyncHandler != null) { val$asyncHandler.onSuccess(val$finalRequest, result); } return result; } } /* Location: * Qualified Name: com.amazonaws.services.sqs.AmazonSQSAsyncClient.16 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
fef8166b8dfb80963123d4d5670518822f581f99
c04e3e2e0c27a99a046e0d729bc2254e2ae46e32
/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/provider/BlockContactsIQProvider.java
72174a8eb987e8ef263c9aaaecf558a1cfff0b12
[ "Apache-2.0" ]
permissive
weiqiangzheng/Smack
af7cf1a604208d0bd85cf09c63e84ff020c0d1ba
9e18ba232722ba01aec0cc798237bb4b0585658b
refs/heads/master
2020-03-20T13:49:23.312992
2018-06-14T08:00:37
2018-06-14T08:00:37
137,467,404
1
0
Apache-2.0
2018-06-15T09:18:03
2018-06-15T09:18:03
null
UTF-8
Java
false
false
1,943
java
/** * * Copyright 2016 Fernando Ramirez * * 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.jivesoftware.smackx.blocking.provider; import java.util.ArrayList; import java.util.List; import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smackx.blocking.element.BlockContactsIQ; import org.jxmpp.jid.Jid; import org.xmlpull.v1.XmlPullParser; /** * Block contact IQ provider class. * * @author Fernando Ramirez * @see <a href="http://xmpp.org/extensions/xep-0191.html">XEP-0191: Blocking * Command</a> */ public class BlockContactsIQProvider extends IQProvider<BlockContactsIQ> { @Override public BlockContactsIQ parse(XmlPullParser parser, int initialDepth) throws Exception { List<Jid> jids = new ArrayList<>(); outerloop: while (true) { int eventType = parser.next(); switch (eventType) { case XmlPullParser.START_TAG: if (parser.getName().equals("item")) { Jid jid = ParserUtils.getJidAttribute(parser); jids.add(jid); } break; case XmlPullParser.END_TAG: if (parser.getDepth() == initialDepth) { break outerloop; } break; } } return new BlockContactsIQ(jids); } }
[ "flo@geekplace.eu" ]
flo@geekplace.eu
15e1667ee2e6598c97b416b99042be8cda46bc1f
5412f18fafb75955e6dc16cf3dcfcfa3067dd454
/limo_apps/ReconCamera/tests/src/com/reconinstruments/camera/unittest/CameraUnitTest.java
b2251f7c6552ec465650c9bc0714967ca49b6790
[]
no_license
mfkiwl/jet
a6080e6f76add78a51c8f2136ba49344f0126581
d375f89c1d5be0aa43cab8ade08d4b55d74a3f37
refs/heads/master
2021-05-31T20:44:46.987776
2016-05-27T21:45:55
2016-05-27T21:45:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,806
java
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.reconinstruments.camera.unittest; import junit.framework.TestCase; import android.graphics.Matrix; import android.test.suitebuilder.annotation.SmallTest; import com.reconinstruments.camera.util.CameraUtil; @SmallTest public class CameraUnitTest extends TestCase { public void testRoundOrientation() { int h = CameraUtil.ORIENTATION_HYSTERESIS; assertEquals(0, CameraUtil.roundOrientation(0, 0)); assertEquals(0, CameraUtil.roundOrientation(359, 0)); assertEquals(0, CameraUtil.roundOrientation(0 + 44 + h, 0)); assertEquals(90, CameraUtil.roundOrientation(0 + 45 + h, 0)); assertEquals(0, CameraUtil.roundOrientation(360 - 44 - h, 0)); assertEquals(270, CameraUtil.roundOrientation(360 - 45 - h, 0)); assertEquals(90, CameraUtil.roundOrientation(90, 90)); assertEquals(90, CameraUtil.roundOrientation(90 + 44 + h, 90)); assertEquals(180, CameraUtil.roundOrientation(90 + 45 + h, 90)); assertEquals(90, CameraUtil.roundOrientation(90 - 44 - h, 90)); assertEquals(0, CameraUtil.roundOrientation(90 - 45 - h, 90)); assertEquals(180, CameraUtil.roundOrientation(180, 180)); assertEquals(180, CameraUtil.roundOrientation(180 + 44 + h, 180)); assertEquals(270, CameraUtil.roundOrientation(180 + 45 + h, 180)); assertEquals(180, CameraUtil.roundOrientation(180 - 44 - h, 180)); assertEquals(90, CameraUtil.roundOrientation(180 - 45 - h, 180)); assertEquals(270, CameraUtil.roundOrientation(270, 270)); assertEquals(270, CameraUtil.roundOrientation(270 + 44 + h, 270)); assertEquals(0, CameraUtil.roundOrientation(270 + 45 + h, 270)); assertEquals(270, CameraUtil.roundOrientation(270 - 44 - h, 270)); assertEquals(180, CameraUtil.roundOrientation(270 - 45 - h, 270)); assertEquals(90, CameraUtil.roundOrientation(90, 0)); assertEquals(180, CameraUtil.roundOrientation(180, 0)); assertEquals(270, CameraUtil.roundOrientation(270, 0)); assertEquals(0, CameraUtil.roundOrientation(0, 90)); assertEquals(180, CameraUtil.roundOrientation(180, 90)); assertEquals(270, CameraUtil.roundOrientation(270, 90)); assertEquals(0, CameraUtil.roundOrientation(0, 180)); assertEquals(90, CameraUtil.roundOrientation(90, 180)); assertEquals(270, CameraUtil.roundOrientation(270, 180)); assertEquals(0, CameraUtil.roundOrientation(0, 270)); assertEquals(90, CameraUtil.roundOrientation(90, 270)); assertEquals(180, CameraUtil.roundOrientation(180, 270)); } public void testPrepareMatrix() { Matrix matrix = new Matrix(); float[] points; int[] expected; CameraUtil.prepareMatrix(matrix, false, 0, 800, 480); points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; expected = new int[] {0, 0, 400, 240, 800, 480, 400, 480, 100, 300}; matrix.mapPoints(points); assertEquals(expected, points); CameraUtil.prepareMatrix(matrix, false, 90, 800, 480); points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; expected = new int[] {800, 0, 400, 240, 0, 480, 0, 240, 300, 60}; matrix.mapPoints(points); assertEquals(expected, points); CameraUtil.prepareMatrix(matrix, false, 180, 800, 480); points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; expected = new int[] {800, 480, 400, 240, 0, 0, 400, 0, 700, 180}; matrix.mapPoints(points); assertEquals(expected, points); CameraUtil.prepareMatrix(matrix, true, 180, 800, 480); points = new float[] {-1000, -1000, 0, 0, 1000, 1000, 0, 1000, -750, 250}; expected = new int[] {0, 480, 400, 240, 800, 0, 400, 0, 100, 180}; matrix.mapPoints(points); assertEquals(expected, points); } private void assertEquals(int expected[], float[] actual) { for (int i = 0; i < expected.length; i++) { assertEquals("Array index " + i + " mismatch", expected[i], Math.round(actual[i])); } } }
[ "gil@reconinstruments.com" ]
gil@reconinstruments.com
9c59b11f00eaf6dc2460ed727405a65a6fc472a3
4ad17f7216a2838f6cfecf77e216a8a882ad7093
/clbs/src/main/java/com/zw/platform/domain/multimedia/MultimediaData.java
cb6f0ca9a82ecbc435f837eafb92edac2b368ea8
[ "MIT" ]
permissive
djingwu/hybrid-development
b3c5eed36331fe1f404042b1e1900a3c6a6948e5
784c5227a73d1e6609b701a42ef4cdfd6400d2b7
refs/heads/main
2023-08-06T22:34:07.359495
2021-09-29T02:10:11
2021-09-29T02:10:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package com.zw.platform.domain.multimedia; import com.zw.protocol.msg.t808.body.T808GpsInfo; import lombok.Data; /** * Created by LiaoYuecai on 2017/4/1. */ @Data public class MultimediaData { private Long id;// 多媒体ID private Integer type;// 多媒体类型 private Integer formatCode;// 多媒体格式编码 private Integer eventCode;// 事件项编码 private Integer wayId;// 通道ID private T808GpsInfo gpsInfo;// 位置信息 private byte[] data;// 多媒体数据包 private String mediaName; private String mediaUrl; private String vid; private Integer mediaId; private String mediaUrlNew; private String monitorName; }
[ "wuxuetao@zwlbs.com" ]
wuxuetao@zwlbs.com
f59900317dc68ce67eeb196a2822eff520d4be35
26af0f0f93b7f3f66d2b0125c7e7dc2046c3a285
/ysblibrary/src/main/java/com/hongchuang/ysblibrary/model/model/bean/SearchedBean.java
2428810d86380b56ef4f48017e51a2fbd3be776d
[]
no_license
timipaul/shijin3_android-dev
13d7bd3bb7fc5f93b9fac0e5ea4b57efbeed37a6
fd45639badd151e3f201a2295b6e490aa771c401
refs/heads/master
2021-01-04T08:31:22.363168
2020-02-20T03:36:13
2020-02-20T03:36:13
240,462,907
0
0
null
null
null
null
UTF-8
Java
false
false
2,445
java
package com.hongchuang.ysblibrary.model.model.bean; import java.util.List; /** * Created by yrdan on 2018/9/5. */ public class SearchedBean { public List<Ads> getAds() { return ads; } public void setAds(List<Ads> ads) { this.ads = ads; } public List<Users> getUsers() { return users; } public void setUsers(List<Users> users) { this.users = users; } public List<Ads> ads; public List<Users> users; public class Users{ public String id; public String username; public String nickname; public String imgurl; public String fan_number; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public String getImageurl() { return imgurl; } public void setImageurl(String imageurl) { this.imgurl = imageurl; } public String getFan_number() { return fan_number; } public void setFan_number(String fan_number) { this.fan_number = fan_number; } public String getIs_follow() { return is_follow; } public void setIs_follow(String is_follow) { this.is_follow = is_follow; } public String getIs_advertiser() { return is_advertiser; } public void setIs_advertiser(String is_advertiser) { this.is_advertiser = is_advertiser; } public String getCreated_at() { return created_at; } public void setCreated_at(String created_at) { this.created_at = created_at; } public String getModified_at() { return modified_at; } public void setModified_at(String modified_at) { this.modified_at = modified_at; } public String is_follow; public String is_advertiser; public String created_at; public String modified_at; } }
[ "1065997545@qq.com" ]
1065997545@qq.com
ee130df2de867a657c2c98a96510a526c002cb4a
24669636accfe5bc927561500552695e94083dd7
/src/test/java/net/test/hasor/core/_02_ioc/example/AnnoIocBean.java
d6e753b771e14c469dcab5dc85f7488b8d4f4955
[]
no_license
hiopro2016/hasor
2b6826904b484a9758345646cecd0260425f7eb7
591d3209f1d3cc4e4b2dd3d897b3d49a7bb129ab
refs/heads/master
2020-12-25T00:08:59.811080
2016-06-16T09:50:55
2016-06-16T09:50:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,317
java
/* * Copyright 2008-2009 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 net.test.hasor.core._02_ioc.example; import net.hasor.core.Inject; import net.test.hasor.core._01_bean.pojo.PojoBean; /** * 注解方式注入Bean。 * @version : 2014-1-3 * @author 赵永春(zyc@hasor.net) */ public class AnnoIocBean { @Inject private PojoBean iocBean = null; // <- 自动创建 PojoBean 对象并注入进来。 @Inject private PojoBean iocBeanField = null; // <- 自动创建 PojoBean 对象并注入进来。 // public PojoBean getIocBean() { return iocBean; } public PojoBean getIocBeanField() { return iocBeanField; } public void setIocBean(PojoBean iocBean) { this.iocBean = iocBean; } }
[ "zyc@hasor.net" ]
zyc@hasor.net
ff9d6f829a60d762016cf96bf27db0ddf900b42e
8cb955b7dec248679ec64b82f4c7df5812b8531b
/lib/tomahawk12-1.1.14/src/org/apache/myfaces/custom/document/DocumentBodyTag.java
4d9452b575bf97b31a85d45867b2e0780b3c0da2
[]
no_license
vtomic85/TCMS
dedf989a417616340308f1071c116251ac43e953
20aff23c5510e54c7e0abff19eaf84a777701380
refs/heads/master
2022-12-05T11:34:09.255605
2021-02-12T13:34:44
2021-02-12T13:34:44
36,179,350
0
0
null
null
null
null
UTF-8
Java
false
false
4,176
java
// WARNING: This file was automatically generated. Do not edit it directly, // or you will lose your changes. /* * 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.myfaces.custom.document; import javax.faces.component.UIComponent; import javax.el.ValueExpression; import javax.el.MethodExpression; import javax.faces.context.FacesContext; import javax.faces.component.UIComponent; // Generated from class org.apache.myfaces.custom.document.AbstractDocumentBody. // // WARNING: This file was automatically generated. Do not edit it directly, // or you will lose your changes. public class DocumentBodyTag extends org.apache.myfaces.custom.document.AbstractDocumentTag { public DocumentBodyTag() { } public String getComponentType() { return "org.apache.myfaces.DocumentBody"; } public String getRendererType() { return "org.apache.myfaces.DocumentBody"; } private ValueExpression _onload; public void setOnload(ValueExpression onload) { _onload = onload; } private ValueExpression _onunload; public void setOnunload(ValueExpression onunload) { _onunload = onunload; } private ValueExpression _onresize; public void setOnresize(ValueExpression onresize) { _onresize = onresize; } private ValueExpression _onkeypress; public void setOnkeypress(ValueExpression onkeypress) { _onkeypress = onkeypress; } private ValueExpression _style; public void setStyle(ValueExpression style) { _style = style; } private ValueExpression _styleClass; public void setStyleClass(ValueExpression styleClass) { _styleClass = styleClass; } protected void setProperties(UIComponent component) { if (!(component instanceof org.apache.myfaces.custom.document.DocumentBody)) { throw new IllegalArgumentException("Component "+ component.getClass().getName() +" is no org.apache.myfaces.custom.document.DocumentBody"); } org.apache.myfaces.custom.document.DocumentBody comp = (org.apache.myfaces.custom.document.DocumentBody) component; super.setProperties(component); FacesContext context = getFacesContext(); if (_onload != null) { comp.setValueExpression("onload", _onload); } if (_onunload != null) { comp.setValueExpression("onunload", _onunload); } if (_onresize != null) { comp.setValueExpression("onresize", _onresize); } if (_onkeypress != null) { comp.setValueExpression("onkeypress", _onkeypress); } if (_style != null) { comp.setValueExpression("style", _style); } if (_styleClass != null) { comp.setValueExpression("styleClass", _styleClass); } } public void release() { super.release(); _onload = null; _onunload = null; _onresize = null; _onkeypress = null; _style = null; _styleClass = null; } }
[ "vladimir.tomic.la@gmail.com" ]
vladimir.tomic.la@gmail.com
42c07afc630bcda72063fabf279accf98ff0866a
e84201a3a093bb7a883fec8510798eaf3bc0a96c
/test/com/facebook/buck/core/artifact/ArtifactImplTest.java
c618e8e842cf81bb1a9c9fee5a6d0fdddf49266a
[ "Apache-2.0" ]
permissive
ResearchMore/buck
d249b6b575dae1a489a5bd4da3c57d82dfc85c35
bb4d36afb55ca205c4b91747c7ded5b7f8ece839
refs/heads/master
2020-06-18T04:35:50.191730
2019-07-09T22:54:04
2019-07-10T01:20:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,628
java
/* * Copyright 2019-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.core.artifact; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.BuildTargetFactory; import com.facebook.buck.core.rules.analysis.action.ActionAnalysisData; import com.facebook.buck.core.rules.analysis.action.ImmutableActionAnalysisDataKey; import com.facebook.buck.core.sourcepath.ExplicitBuildTargetSourcePath; import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.cmdline.LabelSyntaxException; import com.google.devtools.build.lib.syntax.Printer; import java.nio.file.Path; import java.nio.file.Paths; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; public class ArtifactImplTest { @Rule public ExpectedException expectedException = ExpectedException.none(); private final Path genDir = Paths.get("buck-out/gen"); @Test public void artifactTransitionsToBuildArtifact() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path packagePath = Paths.get("my/foo__"); Path path = Paths.get("bar"); DeclaredArtifact artifact = ArtifactImpl.of(target, genDir, packagePath, path); assertFalse(artifact.isBound()); ImmutableActionAnalysisDataKey key = ImmutableActionAnalysisDataKey.of(target, new ActionAnalysisData.ID() {}); BuildArtifact materialized = artifact.materialize(key); assertTrue(materialized.isBound()); assertEquals(key, materialized.getActionDataKey()); assertEquals( ExplicitBuildTargetSourcePath.of(target, genDir.resolve(packagePath).resolve(path)), materialized.getSourcePath()); } @Test public void rejectsEmptyPath() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path packagePath = Paths.get("my/foo__"); expectedException.expect(ArtifactDeclarationException.class); ArtifactImpl.of(target, genDir, packagePath, Paths.get("")); } @Test public void rejectsEmptyPathAfterPathTraversal() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path packagePath = Paths.get("my/foo__"); expectedException.expect(ArtifactDeclarationException.class); ArtifactImpl.of(target, genDir, packagePath, Paths.get("foo/..")); } @Test public void rejectsPrefixedUpwardPathTraversal() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path genDir = Paths.get("buck-out/gen"); Path packagePath = Paths.get("my/foo__"); expectedException.expect(ArtifactDeclarationException.class); ArtifactImpl.of(target, genDir, packagePath, Paths.get("../bar")); } @Test public void rejectsSuffixedUpwardPathTraversal() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path genDir = Paths.get("buck-out/gen"); Path packagePath = Paths.get("my/foo__"); expectedException.expect(ArtifactDeclarationException.class); ArtifactImpl.of(target, genDir, packagePath, Paths.get("foo/../..")); } @Test public void rejectsUpwardPathTraversal() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path packagePath = Paths.get("my/foo__"); expectedException.expect(ArtifactDeclarationException.class); ArtifactImpl.of(target, genDir, packagePath, Paths.get("foo/../../bar")); } @Test public void rejectsAbsolutePath() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path packagePath = Paths.get("my/foo__"); expectedException.expect(ArtifactDeclarationException.class); ArtifactImpl.of(target, genDir, packagePath, Paths.get("").toAbsolutePath()); } @Test public void normalizesPaths() { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path genDir = Paths.get("buck-out/gen"); Path packagePath = Paths.get("my/foo__"); DeclaredArtifact artifact = ArtifactImpl.of(target, genDir, packagePath, Paths.get("bar/baz/.././blargl.sh")); assertEquals(Paths.get("my", "foo__", "bar", "blargl.sh").toString(), artifact.getShortPath()); } @Test public void skylarkFunctionsWork() throws LabelSyntaxException { BuildTarget target = BuildTargetFactory.newInstance("//my:foo"); Path packagePath = Paths.get("my/foo__"); ArtifactImpl artifact = (ArtifactImpl) ArtifactImpl.of(target, genDir, packagePath, Paths.get("bar/baz.cpp")); String expectedShortPath = Paths.get("my", "foo__", "bar", "baz.cpp").toString(); assertEquals("baz.cpp", artifact.getBasename()); assertEquals("cpp", artifact.getExtension()); assertEquals(Label.parseAbsolute("//my:foo", ImmutableMap.of()), artifact.getOwner()); assertEquals(expectedShortPath, artifact.getShortPath()); assertFalse(artifact.isSource()); assertEquals(String.format("<generated file '%s'>", expectedShortPath), Printer.repr(artifact)); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
a3e9903c3e022dfbb42491f52e56a81e4427da78
4491cdb5d919e75f3294223f1f6f94a6fcf59ec3
/src/core/item/notes/Note.java
8564a32db24d3a9c006014c582e1ae0d9f1f72b1
[]
no_license
rty1966/Erachain_alpha
09b10193e3bca7f40cf11ee51664ebdf7ba793f8
4cea0d9d08eae5beb4de455aca6f9dec04365f21
refs/heads/master
2021-01-02T09:22:31.262072
2017-08-03T07:14:38
2017-08-03T07:14:38
99,199,497
2
2
null
2017-08-03T07:14:39
2017-08-03T06:38:14
Java
UTF-8
Java
false
false
3,653
java
package core.item.notes; import java.nio.charset.StandardCharsets; import java.util.Arrays; //import org.apache.log4j.Logger; import com.google.common.primitives.Bytes; import com.google.common.primitives.Ints; import core.account.Account; import core.account.PublicKeyAccount; import core.crypto.Base58; import utill.BlockChain; public class Note extends NoteCls { private static final int TYPE_ID = NoteCls.NOTE; public Note(PublicKeyAccount owner, String name, byte[] icon, byte[] image, String description) { super(TYPE_ID, owner, name, icon, image, description); } public Note(byte[] typeBytes, PublicKeyAccount owner, String name, byte[] icon, byte[] image, String description) { super(typeBytes, owner, name, icon, image, description); } //GETTERS/SETTERS public String getItemSubType() { return "note"; } //PARSE // includeReference - TRUE only for store in local DB public static Note parse(byte[] data, boolean includeReference) throws Exception { // READ TYPE byte[] typeBytes = Arrays.copyOfRange(data, 0, TYPE_LENGTH); int position = TYPE_LENGTH; //READ CREATOR byte[] ownerBytes = Arrays.copyOfRange(data, position, position + OWNER_LENGTH); PublicKeyAccount owner = new PublicKeyAccount(ownerBytes); position += OWNER_LENGTH; //READ NAME //byte[] nameLengthBytes = Arrays.copyOfRange(data, position, position + NAME_SIZE_LENGTH); //int nameLength = Ints.fromByteArray(nameLengthBytes); //position += NAME_SIZE_LENGTH; int nameLength = Byte.toUnsignedInt(data[position]); position ++; if(nameLength < 1 || nameLength > MAX_NAME_LENGTH) { throw new Exception("Invalid name length"); } byte[] nameBytes = Arrays.copyOfRange(data, position, position + nameLength); String name = new String(nameBytes, StandardCharsets.UTF_8); position += nameLength; //READ ICON byte[] iconLengthBytes = Arrays.copyOfRange(data, position, position + ICON_SIZE_LENGTH); int iconLength = Ints.fromBytes( (byte)0, (byte)0, iconLengthBytes[0], iconLengthBytes[1]); position += ICON_SIZE_LENGTH; if(iconLength < 0 || iconLength > MAX_ICON_LENGTH) { throw new Exception("Invalid icon length"); } byte[] icon = Arrays.copyOfRange(data, position, position + iconLength); position += iconLength; //READ IMAGE byte[] imageLengthBytes = Arrays.copyOfRange(data, position, position + IMAGE_SIZE_LENGTH); int imageLength = Ints.fromByteArray(imageLengthBytes); position += IMAGE_SIZE_LENGTH; if(imageLength < 0 || imageLength > MAX_IMAGE_LENGTH) { throw new Exception("Invalid image length"); } byte[] image = Arrays.copyOfRange(data, position, position + imageLength); position += imageLength; //READ DESCRIPTION byte[] descriptionLengthBytes = Arrays.copyOfRange(data, position, position + DESCRIPTION_SIZE_LENGTH); int descriptionLength = Ints.fromByteArray(descriptionLengthBytes); position += DESCRIPTION_SIZE_LENGTH; if(descriptionLength > BlockChain.MAX_REC_DATA_BYTES) { throw new Exception("Invalid description length"); } byte[] descriptionBytes = Arrays.copyOfRange(data, position, position + descriptionLength); String description = new String(descriptionBytes, StandardCharsets.UTF_8); position += descriptionLength; byte[] reference = null; if (includeReference) { //READ REFERENCE reference = Arrays.copyOfRange(data, position, position + REFERENCE_LENGTH); position += REFERENCE_LENGTH; } //RETURN Note note = new Note(typeBytes, owner, name, icon, image, description); if (includeReference) { note.setReference(reference); } return note; } }
[ "rty1@ya.ru" ]
rty1@ya.ru
bcaa791f69b3bcaf89f23c615a9529f59a211c0b
b8e593b4a7588e8275736514ab6d7247e06b84f8
/src/Chapter_28/NineTailModel.java
fea2d81b8c17d9298a4fbe70915e2ff4e291b03e
[]
no_license
Partynin/Introduction_to_java
1cf439ba4c7f686c45eb929525f3639bf96e51e9
b7bd6f1646ca95eb8c819888d0cc9eaa26cb946f
refs/heads/master
2020-03-09T10:15:09.169268
2018-06-11T15:12:50
2018-06-11T15:12:50
128,716,766
0
0
null
null
null
null
UTF-8
Java
false
false
3,032
java
package Chapter_28; import java.util.ArrayList; import java.util.List; public class NineTailModel { public final static int NUMBER_OF_NODES = 512; protected AbstractGraph<Integer>.Tree tree; // Define a tree /** Construct a model */ public NineTailModel() { // Create edges List<AbstractGraph.Edge> edges = getEdges(); // Create a graph UnweightedGraph<Integer> graph = new UnweightedGraph<>(edges, NUMBER_OF_NODES); // Obtain a BSF tree rooted at the target node tree = graph.bfs(511); } /** Create all edges for the graph */ private List<AbstractGraph.Edge> getEdges() { List<AbstractGraph.Edge> edges = new ArrayList<>(); // Store edges for (int u = 0; u < NUMBER_OF_NODES; u++) { for (int k = 0; k < 9; k++) { char[] node = getNode(u); // Get the node for vertex u if (node[k] == 'H') { int v = getFlippedNode(node, k); // Add edge (v, u) for a legal move from node u to node v edges.add(new AbstractGraph.Edge(v, u)); } } } return edges; } public static int getFlippedNode(char[] node, int position) { int row = position / 3; int column = position % 3; flipACell(node, row, column); flipACell(node, row - 1, column); flipACell(node, row + 1, column); flipACell(node, row, column - 1); flipACell(node, row, column + 1); return getIndex(node); } public static void flipACell(char[] node, int row, int column) { if (row >= 0 && row <= 2 && column >= 0 && column <= 2) { // Within the boundary if (node[row * 3 + column] == 'H') node[row * 3 + column] = 'T'; // Flip from H to T else node[row * 3 + column] = 'H'; // Flip from T to H } } public static int getIndex(char[] node) { int result = 0; for (int i = 0; i < 9; i++) if (node[i] == 'T') result = result * 2 + 1; else result = result * 2 + 0; return result; } public static char[] getNode(int index) { char[] result = new char[9]; for (int i = 0; i < 9; i++) { int digit = index % 2; if (digit == 0) result[8 - i] = 'H'; else result[8 - i] = 'T'; index = index / 2; } return result; } public List<Integer> getShortestPath(int nodeIndex) { return tree.getPath(nodeIndex); } public static void printNode(char[] node) { for (int i = 0; i < 9; i++) if (i % 3 != 2) System.out.print(node[i]); else System.out.println(node[i]); System.out.println(); } }
[ "partinin@bk.ru" ]
partinin@bk.ru
ad05fc1582e6d96c588e0a4aaf74fb034d1a738b
967502523508f5bb48fdaac93b33e4c4aca20a4b
/aws-java-sdk-swf-libraries/src/main/java/com/amazonaws/services/simpleworkflow/flow/test/TestLambdaFunctionClient.java
78ac242fd5580e9907564a6324d4ca79e2f5891e
[ "Apache-2.0", "JSON" ]
permissive
hanjk1234/aws-sdk-java
3ac0d8a9bf6f7d9bf1bc5db8e73a441375df10c0
07da997c6b05ae068230401921860f5e81086c58
refs/heads/master
2021-01-17T18:25:34.913778
2015-10-23T03:20:07
2015-10-23T03:20:07
44,951,249
1
0
null
2015-10-26T06:53:25
2015-10-26T06:53:24
null
UTF-8
Java
false
false
3,153
java
/* * Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not * use this file except in compliance with the License. A copy of the License is * located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.simpleworkflow.flow.test; import com.amazonaws.services.simpleworkflow.flow.DecisionContextProvider; import com.amazonaws.services.simpleworkflow.flow.DecisionContextProviderImpl; import com.amazonaws.services.simpleworkflow.flow.LambdaFunctionException; import com.amazonaws.services.simpleworkflow.flow.LambdaFunctionFailedException; import com.amazonaws.services.simpleworkflow.flow.common.FlowConstants; import com.amazonaws.services.simpleworkflow.flow.core.Promise; import com.amazonaws.services.simpleworkflow.flow.core.Settable; import com.amazonaws.services.simpleworkflow.flow.core.Task; import com.amazonaws.services.simpleworkflow.flow.worker.LambdaFunctionClient; public class TestLambdaFunctionClient implements LambdaFunctionClient { protected final DecisionContextProvider decisionContextProvider; protected TestLambdaFunctionInvoker invoker; public TestLambdaFunctionClient() { this.decisionContextProvider = new DecisionContextProviderImpl(); } @Override public Promise<String> scheduleLambdaFunction(final String name, final String input) { return scheduleLambdaFunction(name, input, FlowConstants.DEFAULT_LAMBDA_FUNCTION_TIMEOUT); } @Override public Promise<String> scheduleLambdaFunction(final String name, final Promise<String> input) { return scheduleLambdaFunction(name, input, FlowConstants.DEFAULT_LAMBDA_FUNCTION_TIMEOUT); } @Override public Promise<String> scheduleLambdaFunction(final String name, final Promise<String> input, final long timeoutSeconds) { final Settable<String> result = new Settable<String>(); new Task(input) { @Override protected void doExecute() throws Throwable { result.chain(scheduleLambdaFunction(name, input.get(), timeoutSeconds)); } }; return result; } @Override public Promise<String> scheduleLambdaFunction(String name, String input, long timeoutSeconds) { final String id = decisionContextProvider.getDecisionContext() .getWorkflowClient().generateUniqueId(); final Settable<String> result = new Settable<String>(); try { result.set(invoker.invoke(name, input, timeoutSeconds)); } catch (Throwable e) { if (e instanceof LambdaFunctionException) { throw (LambdaFunctionException) e; } else { LambdaFunctionFailedException failure = new LambdaFunctionFailedException( 0, name, id, e.getMessage()); failure.initCause(e); throw failure; } } return result; } public void setInvoker(TestLambdaFunctionInvoker invoker) { this.invoker = invoker; } }
[ "aws@amazon.com" ]
aws@amazon.com
c6321bf3772af353b9c27880c99a782c68be1571
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_150770cf8c482b9eb2b9dddb4f5b0d86ce87a2ee/DisplayController/20_150770cf8c482b9eb2b9dddb4f5b0d86ce87a2ee_DisplayController_t.java
6c4359790166140efcb345fa606a08f2c721c350
[]
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,360
java
package com.bgg.farmstoryback.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import com.bgg.farmstoryback.common.ConstantsForDb; import com.bgg.farmstoryback.common.ConstantsForParam; import com.bgg.farmstoryback.common.ConstantsForResponse; import com.bgg.farmstoryback.common.FileUtil; import com.bgg.farmstoryback.service.CategoryService; import com.bgg.farmstoryback.service.ContentsService; import com.bgg.farmstoryback.service.DisplayService; @Controller public class DisplayController { private Logger logger = LoggerFactory.getLogger(DisplayController.class); @Autowired private FileUtil fileUtil; @Autowired private DisplayService displayService; @Autowired private ContentsService contentsService; @Autowired private CategoryService categoryService; @RequestMapping(value = "display/main/manageView.do") public String manageView(Model model, @RequestParam Map<String,Object> parameter) { Map map = displayService.listInfo(); model.addAttribute(ConstantsForResponse.TOP_DISPLAY, map.get(ConstantsForResponse.TOP_DISPLAY)); model.addAttribute(ConstantsForResponse.BANNER_DISPLAY, map.get(ConstantsForResponse.BANNER_DISPLAY)); return "display/main"; } @RequestMapping(value = "display/main/createView.do") public String createView(Model model, @RequestParam Map<String,Object> parameter) { return "display/mainCreate"; } @RequestMapping(value = "display/main/create.do") public String create(Model model, @RequestParam Map<String,Object> parameter) { displayService.add(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/main/updateView.do") public String updateView(Model model, @RequestParam Map<String,Object> parameter) { model.addAttribute("displayInfo", displayService.detail(parameter)); return "display/mainUpdate"; } @RequestMapping(value = "display/main/update.do") public String update(Model model, @RequestParam Map<String,Object> parameter) { displayService.modify(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/main/delete.do") public String delete(Model model, @RequestParam Map<String,Object> parameter) { displayService.delete(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/main/bannerCreateView.do") public String bannerCreateView(Model model, @RequestParam Map<String,Object> parameter) { return "display/bannerCreate"; } @RequestMapping(value = "display/main/bannerCreate.do") public String bannerCreate(Model model, @RequestParam Map<String,Object> parameter) { displayService.add(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/main/bannerUpdateView.do") public String bannerUpdateView(Model model, @RequestParam Map<String,Object> parameter) { model.addAttribute("bannerInfo", displayService.detail(parameter)); return "display/bannerUpdate"; } @RequestMapping(value = "display/main/bannerUpdate.do") public String bannerUpdate(Model model, @RequestParam Map<String,Object> parameter) { displayService.modify(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/main/bannerDelete.do") public String bannerDelete(Model model, @RequestParam Map<String,Object> parameter) { displayService.delete(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/contents/manageView.do") public String contentsManageView(Model model, @RequestParam Map<String,Object> parameter) { model.addAttribute("parameter", parameter); List<Map> categoryList = categoryService.list(); model.addAttribute("categories", categoryList); Object obj = parameter.get(ConstantsForParam.CATEGORY_ID); if(obj == null){ // if(categoryList.size() > 0){ // Map cate = categoryList.get(0); // parameter.put(ConstantsForParam.CATEGORY_ID, String.valueOf(cate.get(ConstantsForDb.CATEGORY_ID))); // } // TODO 전체 컨텐츠 불러오기 // model.addAttribute("contents", displayService.contentsList(parameter)); } else { model.addAttribute("contents", displayService.contentsList(parameter)); } return "display/contents"; } @RequestMapping(value = "display/contents/orderingUpdate.do") public String orderingUpdate(Model model, @RequestParam Map<String,Object> parameter) { String cateId = String.valueOf(parameter.get(ConstantsForParam.CATEGORY_ID)); String[] contentsIdList = String.valueOf(parameter.get(ConstantsForParam.CONTENTS_ID)).split("&"); String[] orderingNoList = String.valueOf(parameter.get(ConstantsForParam.ORDERING_NO)).split("&"); int contentsIdCount = contentsIdList.length; for(int idx = 0; idx < contentsIdCount; idx++) { Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put(ConstantsForParam.CATEGORY_ID, cateId); paramMap.put(ConstantsForParam.CONTENTS_ID, contentsIdList[idx]); paramMap.put(ConstantsForParam.ORDERING_NO, orderingNoList[idx]); displayService.modifyContentsOrderingNo(paramMap); } return String.format("redirect:manageView.do?category_id=%s", cateId); } @RequestMapping(value = "display/popup/manageView.do") public String popupManageView(Model model, @RequestParam Map<String,Object> parameter) { model.addAttribute("popupList", displayService.popupList()); return "display/popup"; } @RequestMapping(value = "display/popup/createView.do") public String popupCreateView(Model model, @RequestParam Map<String,Object> parameter) { return "display/popupCreate"; } @RequestMapping(value = "display/popup/create.do") public String popupCreate(Model model, @RequestParam Map<String,Object> parameter) { displayService.add(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/popup/updateView.do") public String popupUpdateView(Model model, @RequestParam Map<String,Object> parameter) { model.addAttribute("obj", displayService.popupDetail(parameter)); return "display/popupUpdate"; } @RequestMapping(value = "display/popup/update.do") public String popupUpdate(Model model, @RequestParam Map<String,Object> parameter) { displayService.modify(parameter); return "redirect:manageView.do"; } @RequestMapping(value = "display/popup/delete.do") public String popupDelete(Model model, @RequestParam Map<String,Object> parameter) { displayService.delete(parameter); return "redirect:manageView.do"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
32c74d39e93cef581ef56231c3229ef966523d5c
9cf0b608fc6884e4dc6b85564397583e1ff6084e
/salesforce/src/test/java/salesforce/app/server/service/AppCustomerTypeTestCase.java
4e8552bbfb013ba8b1f4e52f532005b1d4ef5767
[]
no_license
applifireAlgo/test
3110439a7b143c419a76708580d75737637739cf
7bcddc41518af021b1608e4e55622250c71a91cd
refs/heads/master
2016-08-12T04:09:14.640199
2015-10-23T11:49:36
2015-10-23T11:49:36
44,667,116
0
0
null
null
null
null
UTF-8
Java
false
false
6,439
java
package salesforce.app.server.service; import org.junit.runner.RunWith; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.ContextConfiguration; import salesforce.app.config.WebConfigExtended; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; import org.springframework.test.context.TestExecutionListeners; import salesforce.app.server.repository.AppCustomerTypeRepository; import salesforce.app.shared.customers.AppCustomerType; import org.springframework.beans.factory.annotation.Autowired; import com.athena.framework.server.helper.RuntimeLogInfoHelper; import com.athena.framework.server.helper.EntityValidatorHelper; import com.athena.framework.server.test.RandomValueGenerator; import java.util.HashMap; import com.spartan.healthmeter.entity.scheduler.ArtMethodCallStack; import org.springframework.mock.web.MockHttpSession; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.junit.Before; import org.junit.After; import com.athena.framework.shared.entity.web.entityInterface.CommonEntityInterface.RECORD_TYPE; import org.junit.Test; @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @ContextConfiguration(classes = WebConfigExtended.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) @TestExecutionListeners({ org.springframework.test.context.support.DependencyInjectionTestExecutionListener.class, org.springframework.test.context.support.DirtiesContextTestExecutionListener.class, org.springframework.test.context.transaction.TransactionalTestExecutionListener.class }) public class AppCustomerTypeTestCase { @Autowired private AppCustomerTypeRepository<AppCustomerType> appcustomertypeRepository; @Autowired private RuntimeLogInfoHelper runtimeLogInfoHelper; @Autowired private EntityValidatorHelper<Object> entityValidator; private RandomValueGenerator valueGenerator = new RandomValueGenerator(); private static HashMap<String, Object> map = new HashMap<String, Object>(); @Autowired private ArtMethodCallStack methodCallStack; protected MockHttpSession session; protected MockHttpServletRequest request; protected MockHttpServletResponse response; protected void startSession() { session = new MockHttpSession(); } protected void endSession() { session.clearAttributes(); session.invalidate(); session = null; } protected void startRequest() { request = new MockHttpServletRequest(); request.setSession(session); org.springframework.web.context.request.RequestContextHolder.setRequestAttributes(new org.springframework.web.context.request.ServletRequestAttributes(request)); } protected void endRequest() { ((org.springframework.web.context.request.ServletRequestAttributes) org.springframework.web.context.request.RequestContextHolder.getRequestAttributes()).requestCompleted(); org.springframework.web.context.request.RequestContextHolder.resetRequestAttributes(); request = null; } @Before public void before() { startSession(); startRequest(); setBeans(); } @After public void after() { endSession(); endRequest(); } private void setBeans() { runtimeLogInfoHelper.createRuntimeLogUserInfo(1, "AAAAA", request.getRemoteHost()); org.junit.Assert.assertNotNull(runtimeLogInfoHelper); methodCallStack.setRequestId(java.util.UUID.randomUUID().toString().toUpperCase()); } @Test public void test1Save() { try { AppCustomerType appcustomertype = new AppCustomerType(); appcustomertype.setCustomerType("F1pTOHBbrjn177BRWB4STe5B96r0UuTcvq3M8s6EWoXTzhqAzZ"); appcustomertype.setDefaults(1); appcustomertype.setSequenceId(2147483647); appcustomertype.setEntityAudit(1, "xyz", RECORD_TYPE.ADD); appcustomertype.setEntityValidator(entityValidator); appcustomertype.isValid(); appcustomertypeRepository.save(appcustomertype); map.put("AppCustomerTypePrimaryKey", appcustomertype._getPrimarykey()); } catch (com.athena.framework.server.exception.biz.SpartanConstraintViolationException e) { org.junit.Assert.fail(e.getMessage()); } catch (java.lang.Exception e) { e.printStackTrace(); } } @Test public void test2Update() { try { org.junit.Assert.assertNotNull(map.get("AppCustomerTypePrimaryKey")); AppCustomerType appcustomertype = appcustomertypeRepository.findById((java.lang.String) map.get("AppCustomerTypePrimaryKey")); appcustomertype.setCustomerType("rzKifvNVyYDbDa3S9MwRQpdLGed2T4CArogGE495X2SA3R6m9t"); appcustomertype.setDefaults(0); appcustomertype.setSequenceId(2147483647); appcustomertype.setVersionId(1); appcustomertype.setEntityAudit(1, "xyz", RECORD_TYPE.UPDATE); appcustomertypeRepository.update(appcustomertype); } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) { org.junit.Assert.fail(e.getMessage()); } catch (java.lang.Exception e) { e.printStackTrace(); } } @Test public void test3FindById() { try { org.junit.Assert.assertNotNull(map.get("AppCustomerTypePrimaryKey")); appcustomertypeRepository.findById((java.lang.String) map.get("AppCustomerTypePrimaryKey")); } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) { org.junit.Assert.fail(e.getMessage()); } catch (Exception e) { e.printStackTrace(); } } @Test public void test4Delete() { try { org.junit.Assert.assertNotNull(map.get("AppCustomerTypePrimaryKey")); appcustomertypeRepository.delete((java.lang.String) map.get("AppCustomerTypePrimaryKey")); } catch (com.athena.framework.server.exception.repository.SpartanPersistenceException e) { org.junit.Assert.fail(e.getMessage()); } catch (Exception e) { e.printStackTrace(); } } }
[ "anant@algorhythm.co.in" ]
anant@algorhythm.co.in
f69a2b02b18cb0d6019f4338bfc2d41c22c30e34
71f619760d327229546a15f5591b123824e58812
/src/main/java/com/demo/project/service/LessonService.java
2e52e24d65ec937dee8e831fe8d5fca34e5af1f5
[]
no_license
kara4k/project
fa6903bd8b28bef89f0f44ab78d7e8fe389817bb
40715365828bc24edbe375ebd9949a876d862323
refs/heads/master
2020-05-16T00:09:17.467597
2019-05-08T12:05:21
2019-05-08T12:05:21
182,573,050
1
0
null
null
null
null
UTF-8
Java
false
false
827
java
package com.demo.project.service; import com.demo.project.converter.DtoDboConverter; import com.demo.project.dto.LessonDto; import com.demo.project.entity.LessonEntity; import com.demo.project.repository.IBaseRepository; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; @Service public class LessonService extends AbstractService<LessonDto, LessonEntity> { public LessonService(@Qualifier("LessonRepository") final IBaseRepository<LessonEntity> repository, final DtoDboConverter<LessonDto, LessonEntity> converter) { super(repository, converter); } @Override protected String getNotFoundMessage(final Long id) { return String.format("Lesson with id %d not found.", id); } }
[ "kara4k@gmail.com" ]
kara4k@gmail.com
085a27d07d68878f264718781e3328b544807dcd
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
/jun_java_plugins/jun_jdk/src/main/java/com/jun/plugin/bigdata/storm/example1/ReportBolt.java
5be035ad2e15007677d3883304a008692e2d790b
[ "Apache-2.0" ]
permissive
wujun728/jun_java_plugin
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
e031bc451c817c6d665707852308fc3b31f47cb2
refs/heads/master
2023-09-04T08:23:52.095971
2023-08-18T06:54:29
2023-08-18T06:54:29
62,047,478
117
42
null
2023-08-21T16:02:15
2016-06-27T10:23:58
Java
UTF-8
Java
false
false
2,153
java
package com.jun.plugin.bigdata.storm.example1; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.storm.task.OutputCollector; import org.apache.storm.task.TopologyContext; import org.apache.storm.topology.OutputFieldsDeclarer; import org.apache.storm.topology.base.BaseRichBolt; import org.apache.storm.tuple.Tuple; /** * 生成一份报告 * @author soul * */ public class ReportBolt extends BaseRichBolt { private HashMap<String, Long> counts = null;//保存单词和对应的计数 public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { // TODO Auto-generated method stub this.counts = new HashMap<String, Long>(); } public void execute(Tuple input) { // TODO Auto-generated method stub String word = input.getStringByField("word"); Long count = input.getLongByField("count"); this.counts.put(word, count); //实时输出 System.out.println("结果:"+this.counts); } public void declareOutputFields(OutputFieldsDeclarer declarer) { // TODO Auto-generated method stub //这里是末端bolt,不需要发射数据流,这里无需定义 } /** * cleanup是IBolt接口中定义 * Storm在终止一个bolt之前会调用这个方法 * 本例我们利用cleanup()方法在topology关闭时输出最终的计数结果 * 通常情况下,cleanup()方法用来释放bolt占用的资源,如打开的文件句柄或数据库连接 * 但是当Storm拓扑在一个集群上运行,IBolt.cleanup()方法不能保证执行(这里是开发模式,生产环境不要这样做)。 */ public void cleanup(){ System.out.println("---------- FINAL COUNTS -----------"); ArrayList<String> keys = new ArrayList<String>(); keys.addAll(this.counts.keySet()); Collections.sort(keys); for(String key : keys){ System.out.println(key + " : " + this.counts.get(key)); } System.out.println("----------------------------"); } }
[ "wujun728@163.com" ]
wujun728@163.com
1423ecf0ef0bbb7f65cd9e77c77445ef5e875938
32dc3c1948b43b1fb1791088f429900d1adbf619
/Arrays/StringSorting.java
4e69519050bccb9679e82441863a90b615f09eaf
[ "MIT" ]
permissive
Kevin-SJW/Enterprise-programming-exercises
a6a00e6477163bec55ba7d9bcd72c6f81bce3c7c
7b64e7c7c0d4b5bb4624b7ce3f5875485ab2d614
refs/heads/master
2021-06-20T11:11:38.396675
2021-02-20T13:32:08
2021-02-20T13:32:08
177,378,667
1
0
null
null
null
null
UTF-8
Java
false
false
1,470
java
package Arrays; import Container.Generated; import Container.RandomGenerator; import java.util.Arrays; import java.util.Collections; import static Container.Countries.print; /** * @Classname StringSorting * @Description TODO * @Date 2019/10/28 19:53 * @Created by 14241 */ public class StringSorting { public static void main(String[] args) { String[] sa = Generated.array(new String[20], new RandomGenerator.String(5)); print("Before sort: " + Arrays.toString(sa)); Arrays.sort(sa); print("After sort: " + Arrays.toString(sa)); Arrays.sort(sa, Collections.reverseOrder()); print("Reverse sort: " + Arrays.toString(sa)); Arrays.sort(sa, String.CASE_INSENSITIVE_ORDER); print("Case-insensitive sort: " + Arrays.toString(sa)); } } /* Output: Before sort: [YNzbr, nyGcF, OWZnT, cQrGs, eGZMm, JMRoE, suEcU, OneOE, dLsmw, HLGEa, hKcxr, EqUCB, bkIna, Mesbt, WHkjU, rUkZP, gwsqP, zDyCy, RFJQA, HxxHv] After sort: [EqUCB, HLGEa, HxxHv, JMRoE, Mesbt, OWZnT, OneOE, RFJQA, WHkjU, YNzbr, bkIna, cQrGs, dLsmw, eGZMm, gwsqP, hKcxr, nyGcF, rUkZP, suEcU, zDyCy] Reverse sort: [zDyCy, suEcU, rUkZP, nyGcF, hKcxr, gwsqP, eGZMm, dLsmw, cQrGs, bkIna, YNzbr, WHkjU, RFJQA, OneOE, OWZnT, Mesbt, JMRoE, HxxHv, HLGEa, EqUCB] Case-insensitive sort: [bkIna, cQrGs, dLsmw, eGZMm, EqUCB, gwsqP, hKcxr, HLGEa, HxxHv, JMRoE, Mesbt, nyGcF, OneOE, OWZnT, RFJQA, rUkZP, suEcU, WHkjU, YNzbr, zDyCy] *///:~
[ "shijianweicisco@163.com" ]
shijianweicisco@163.com
21d8287fe1368392b45e5ef8eb5ef47c3cfc78a4
b85d0ce8280cff639a80de8bf35e2ad110ac7e16
/com/fossil/bdj.java
62013ccc0859297cebc2a58fa3e5905007346f51
[]
no_license
MathiasMonstrey/fosil_decompiled
3d90433663db67efdc93775145afc0f4a3dd150c
667c5eea80c829164220222e8fa64bf7185c9aae
refs/heads/master
2020-03-19T12:18:30.615455
2018-06-07T17:26:09
2018-06-07T17:26:09
136,509,743
1
0
null
null
null
null
UTF-8
Java
false
false
981
java
package com.fossil; import android.os.DeadObjectException; import android.os.RemoteException; import com.google.android.gms.common.api.ApiException; import com.google.android.gms.common.api.Status; abstract class bdj extends bdi { protected final cah<Void> bre; public bdj(int i, cah<Void> com_fossil_cah_java_lang_Void) { super(i); this.bre = com_fossil_cah_java_lang_Void; } public void mo1269a(ben com_fossil_ben, boolean z) { } public final void mo1270a(bfu<?> com_fossil_bfu_) throws DeadObjectException { try { mo1272b(com_fossil_bfu_); } catch (RemoteException e) { mo1271h(bdi.m4884a(e)); throw e; } catch (RemoteException e2) { mo1271h(bdi.m4884a(e2)); } } protected abstract void mo1272b(bfu<?> com_fossil_bfu_) throws RemoteException; public void mo1271h(Status status) { this.bre.m5863i(new ApiException(status)); } }
[ "me@mathiasmonstrey.be" ]
me@mathiasmonstrey.be
d3cfc3cdcf308faaffe7222a054ea99b335b3ed5
8766428c0d1a8a645a25f882976e42378fc5dfba
/coredata-core-parent/coredata-core-collector-manager/coredata-core-collector-manager-service/src/main/java/org/coredata/core/data/debugger/JobStatus.java
3497b4557cd9eb9657991186fa9493d25863f6d2
[]
no_license
PengLiu/CoreLib
9e016ded7f0cd423053da2c39b07a64d46563395
dbbcb882faead148288520bfb91e14eb1e1cd6f9
refs/heads/master
2020-03-20T03:25:44.588594
2018-06-13T01:20:54
2018-06-13T01:20:54
137,145,867
1
0
null
null
null
null
UTF-8
Java
false
false
128
java
package org.coredata.core.data.debugger; public enum JobStatus { Running, Success, JobErr, ReaderErr, WriterErr, Canceled }
[ "liupeng@clouddada.com" ]
liupeng@clouddada.com
4b30e8c7b0326633dc86fe6a6704ed03564bb75b
2bf7c68954b57798707af9d2699554cbead374e4
/src/com/u5/MinimumWindowSubstring.java
0b7f09f6d97b282abb7919d7dbe614801950e774
[]
no_license
Gitrenzhijiang/leetcode
b46d298da6c79538424d4197f94fd6d075d2c552
228f9cd32823d15e2acfe059742eee504481e4b2
refs/heads/master
2020-04-06T08:40:37.439118
2019-02-18T10:56:34
2019-02-18T10:56:34
157,312,344
0
0
null
null
null
null
GB18030
Java
false
false
3,231
java
package com.u5; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class MinimumWindowSubstring { public static void main(String[] args) { String s = "ADOBECODEBANC"; String t = "ABC"; String res = new MinimumWindowSubstring().minWindow2(s, t); System.out.println(res); } /** * 思路:首先为每一个A 或 B 或C 建立一个List,存放 * { * int index * } * @param s * @param t * @return */ public String minWindow(String s, String t) { int t_n = t.length(); List<Character> set = new ArrayList<>();//存放了A,B,C for(int i = 0;i < t_n;i++) { set.add(t.charAt(i)); } //多个桶 List<Integer> [] lists = new List[set.size()]; for(int i = 0;i < lists.length;i++) { lists[i] = new ArrayList<>();//i == 0 lists[0] 存放A } //遍历所有的s for(int j = 0;j < s.length();j++) { char c = s.charAt(j); if(!set.contains(c))//如果c不属于set中的任何一个 continue; for(int k = 0;k < set.size();k++) { if(set.get(k).equals(c)) { lists[k].add(j); } } } //开始计算 int[]res = new int[2];res[0] = 0;res[1] = s.length(); fun0(lists, 0, Integer.MAX_VALUE, Integer.MIN_VALUE, res, new ArrayList<>()); if(res[0] == 0 && res[1] == s.length()) return ""; return s.substring(res[0], res[1]+1); } private void fun0(List<Integer>[] lists, int curIndex, int minIndex, int maxIndex, int[]res, List<Integer> midRes) { int min = minIndex, max = maxIndex; boolean tag = false; if(curIndex == lists.length-1) tag = true; for(int i = 0;i < lists[curIndex].size();i++) { int temp = lists[curIndex].get(i); if(midRes.contains(temp)) { continue; } if(temp > maxIndex) maxIndex = temp; if(temp < minIndex) minIndex = temp; midRes.add(temp); if(!tag) { fun0(lists, curIndex+1, minIndex, maxIndex, res, midRes); }else { if((res[1] - res[0]) > (maxIndex - minIndex)) { res[0] = minIndex; res[1] = maxIndex; } } midRes.remove(new Integer(temp)); minIndex = min; maxIndex = max; } } public String minWindow2(String s, String t) { if(s.length() < t.length()) return ""; Map<Character, Integer> map = new HashMap<>(); for(int i = 0;i < t.length();i++) { char c = t.charAt(i); if(map.containsKey(c)) { map.replace(c, map.get(c)+1); }else map.put(c, 1); } int left = 0, right = 0, minValue = Integer.MAX_VALUE; int count = 0; String res = ""; //遍历s for(right = 0;right < s.length();right++) { char c = s.charAt(right); if(map.containsKey(c)) { map.replace(c, map.get(c)-1); if(map.get(c) >= 0) count++; while(count == t.length()) { //更新minString if(right - left + 1 < minValue) { minValue = right - left + 1; res = s.substring(left, right+1); } char lte = s.charAt(left); if(map.containsKey(lte)) { map.replace(lte, map.get(lte)+1); if(map.get(lte) > 0)//注意这里是> count--; } left++; } } } return res; } }
[ "781386910@qq.com" ]
781386910@qq.com
7149e59e6fef902444bc882591990f2c61080cc7
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13196-7-29-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/search/solr/internal/reference/DefaultSolrReferenceResolver_ESTest.java
5a01d0ac435b86e76fb6f6e5fb9e941f7f38da2d
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 06:55:25 UTC 2020 */ package org.xwiki.search.solr.internal.reference; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultSolrReferenceResolver_ESTest extends DefaultSolrReferenceResolver_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
f254720397a1640d0aa3509cb9c1109e68989fba
18e42a09d7f5dacc1bbeeae4c22284c60cc88b1f
/xstream/src/test/com/thoughtworks/xstream/core/util/CloneablesTest.java
1302bcc6f7fd09f29b5a38527618a4082f25fe97
[ "BSD-3-Clause" ]
permissive
x-stream/xstream
ab7f586f1d682902bbf96f3be2b953df98ff32c3
289ae780001c31d7d5d75e0d58608c13f44549a2
refs/heads/master
2023-08-30T19:33:58.497180
2023-04-22T16:03:39
2023-04-22T16:03:39
32,219,624
818
270
NOASSERTION
2023-05-02T23:36:09
2015-03-14T15:57:12
Java
UTF-8
Java
false
false
2,769
java
/* * Copyright (C) 2010, 2018 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created 18.11.2010 by Joerg Schaible. */ package com.thoughtworks.xstream.core.util; import java.util.Arrays; import com.thoughtworks.xstream.converters.reflection.ObjectAccessException; import junit.framework.TestCase; public class CloneablesTest extends TestCase { public void testCloneOfCloneable() { final TypedNull<String> stringNull = new CloneableTypedNull<String>(String.class); final TypedNull<String> stringNullClone = Cloneables.clone(stringNull); assertSame(String.class, stringNullClone.getType()); } public void testCloneOfNotCloneable() { final TypedNull<String> stringNull = new TypedNull<String>(String.class); assertNull(Cloneables.clone(stringNull)); } public void testCloneOfUncloneable() { final TypedNull<String> stringNull = new UncloneableTypedNull<String>(String.class); try { Cloneables.clone(stringNull); fail("Thrown " + ObjectAccessException.class.getName() + " expected"); } catch (final ObjectAccessException e) { assertTrue(e.getCause() instanceof NoSuchMethodException); } } public void testPossibleCloneOfCloneable() { final TypedNull<String> stringNull = new CloneableTypedNull<String>(String.class); final TypedNull<String> stringNullClone = Cloneables.cloneIfPossible(stringNull); assertSame(String.class, stringNullClone.getType()); } public void testCloneOfStringArray() { assertEquals(Arrays.asList(new String[]{"string"}), Arrays.asList(Cloneables.clone(new String[]{"string"}))); } public void testCloneOfPrimitiveArray() { final int[] clone = Cloneables.clone(new int[]{1}); assertEquals(1, clone.length); assertEquals(1, clone[0]); } public void testPossibleCloneOfNotCloneable() { final TypedNull<String> stringNull = new TypedNull<String>(String.class); assertSame(stringNull, Cloneables.cloneIfPossible(stringNull)); } static final class CloneableTypedNull<T> extends TypedNull<T> implements Cloneable { CloneableTypedNull(final Class<T> type) { super(type); } @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } } static final class UncloneableTypedNull<T> extends TypedNull<T> implements Cloneable { UncloneableTypedNull(final Class<T> type) { super(type); } } }
[ "joerg.schaible@gmx.de" ]
joerg.schaible@gmx.de
4badbc60f3ec6ea378ff3f1ad3ded1c8559f0374
64e8f7d9a6aa5461a7d9e19fd0dd88f005457473
/POUEX.tests/src/POUEX/tests/CriticosTest.java
5db4e4a211da7a88f3908048de69c5193f0cc795
[]
no_license
samuelmorenov/DMSS-POUEX
590a47709c291d5b9e7dd664bcc47c7e097be437
6202f5006be7c938da10c41fcb9104169deda335
refs/heads/master
2022-11-12T17:33:45.658328
2020-06-26T23:22:13
2020-06-26T23:22:13
275,010,848
0
0
null
null
null
null
UTF-8
Java
false
false
1,387
java
/** */ package POUEX.tests; import POUEX.Criticos; import POUEX.POUEXFactory; import junit.textui.TestRunner; /** * <!-- begin-user-doc --> * A test case for the model object '<em><b>Criticos</b></em>'. * <!-- end-user-doc --> * @generated */ public class CriticosTest extends EstadosTest { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static void main(String[] args) { TestRunner.run(CriticosTest.class); } /** * Constructs a new Criticos test case with the given name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public CriticosTest(String name) { super(name); } /** * Returns the fixture for this Criticos test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected Criticos getFixture() { return (Criticos)fixture; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#setUp() * @generated */ @Override protected void setUp() throws Exception { setFixture(POUEXFactory.eINSTANCE.createCriticos()); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#tearDown() * @generated */ @Override protected void tearDown() throws Exception { setFixture(null); } } //CriticosTest
[ "UO266321@uniovi.es" ]
UO266321@uniovi.es
c5bf3a769f13f02007b513d4dda55d3543c27832
69b94255070f09f35fe2086215f55c0d576745be
/GitToolBox/src/main/java/zielu/gittoolbox/completion/CompletionServiceImpl.java
95100f592a6ed55107e6327c25e09952f51852af
[ "CC-BY-3.0", "Apache-2.0" ]
permissive
panda2025/GitToolBox
f481979f968503bc3acc28918ef1cd01371886f7
6cd843f9b475c1c3ff8b6d13f221a6fe430342d5
refs/heads/master
2020-12-15T12:18:51.134291
2020-01-20T13:02:28
2020-01-20T13:02:28
235,100,807
1
0
Apache-2.0
2020-01-20T12:52:44
2020-01-20T12:52:43
null
UTF-8
Java
false
false
2,554
java
package zielu.gittoolbox.completion; import com.google.common.collect.ImmutableList; import com.intellij.openapi.Disposable; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import git4idea.repo.GitRepository; import java.io.File; import java.lang.ref.WeakReference; import java.util.Collection; import java.util.List; import org.jetbrains.annotations.NotNull; import zielu.gittoolbox.config.GitToolBoxConfigPrj; import zielu.gittoolbox.formatter.Formatter; class CompletionServiceImpl implements CompletionService, Disposable { private final Logger log = Logger.getInstance(getClass()); private final CompletionLocalGateway gateway; private WeakReference<CompletionScopeProvider> scopeProviderRef; private volatile List<Formatter> formatters; CompletionServiceImpl(@NotNull Project project) { gateway = new CompletionLocalGateway(project); gateway.disposeWithProject(this); } @Override public void onConfigChanged(@NotNull GitToolBoxConfigPrj config) { formatters = ImmutableList.copyOf(config.getCompletionFormatters()); } @Override public void setScopeProvider(@NotNull CompletionScopeProvider scopeProvider) { log.debug("Set scope provider: ", scopeProvider); scopeProviderRef = new WeakReference<>(scopeProvider); } @Override @NotNull public Collection<GitRepository> getAffected() { CompletionScopeProvider scopeProvider = getScopeProvider(); Collection<File> affectedFiles = scopeProvider.getAffectedFiles(); log.debug("Get affected files: ", affectedFiles); Collection<GitRepository> affectedRepositories = findAffectedRepositories(affectedFiles); log.debug("Get affected repositories: ", affectedRepositories); return affectedRepositories; } private CompletionScopeProvider getScopeProvider() { if (scopeProviderRef != null) { CompletionScopeProvider provider = scopeProviderRef.get(); if (provider != null) { return provider; } } return CompletionScopeProvider.EMPTY; } private Collection<GitRepository> findAffectedRepositories(Collection<File> affectedFiles) { return gateway.getRepositories(affectedFiles); } @Override @NotNull public List<Formatter> getFormatters() { if (formatters == null) { synchronized (this) { if (formatters == null) { formatters = gateway.getFormatters(); } } } return formatters; } @Override public void dispose() { formatters = null; scopeProviderRef = null; } }
[ "zieluuuu@gmail.com" ]
zieluuuu@gmail.com
dbe36c0651696386dafb03a1fc9a76aa20c86895
74d46310408e57350662c40dc862ec3af773f57e
/module_message/src/main/java/com/techangkeji/hyphenate/chatuidemo/video/util/RecyclingBitmapDrawable.java
335d68365e1ddb7ee16cfb8daace7bbda68606dd
[]
no_license
zsp19931222/fangmaitong
d4e51f8d0fe63bb1d20aed9d00bcf30b76e3d598
15b43b6e8ab821aa5d51f0b6d82391e156031008
refs/heads/master
2020-07-22T17:38:17.979984
2020-01-09T06:31:52
2020-01-09T06:31:52
207,276,752
1
0
null
null
null
null
UTF-8
Java
false
false
2,298
java
package com.techangkeji.hyphenate.chatuidemo.video.util; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.util.Log; import com.techangkeji.model_message.BuildConfig; public class RecyclingBitmapDrawable extends BitmapDrawable { static final String TAG = "CountingBitmapDrawable"; private int mCacheRefCount = 0; private int mDisplayRefCount = 0; private boolean mHasBeenDisplayed; public RecyclingBitmapDrawable(Resources res, Bitmap bitmap) { super(res, bitmap); } /** * Notify the drawable that the displayed state has changed. Internally a * count is kept so that the drawable knows when it is no longer being * displayed. * * @param isDisplayed * - Whether the drawable is being displayed or not */ public void setIsDisplayed(boolean isDisplayed) { // BEGIN_INCLUDE(set_is_displayed) synchronized (this) { if (isDisplayed) { mDisplayRefCount++; mHasBeenDisplayed = true; } else { mDisplayRefCount--; } } // Check to see if recycle() can be called checkState(); // END_INCLUDE(set_is_displayed) } /** * Notify the drawable that the cache state has changed. Internally a count * is kept so that the drawable knows when it is no longer being cached. * * @param isCached * - Whether the drawable is being cached or not */ public void setIsCached(boolean isCached) { // BEGIN_INCLUDE(set_is_cached) synchronized (this) { if (isCached) { mCacheRefCount++; } else { mCacheRefCount--; } } // Check to see if recycle() can be called checkState(); // END_INCLUDE(set_is_cached) } private synchronized void checkState() { // BEGIN_INCLUDE(check_state) // If the drawable cache and display ref counts = 0, and this drawable // has been displayed, then recycle if (mCacheRefCount <= 0 && mDisplayRefCount <= 0 && mHasBeenDisplayed && hasValidBitmap()) { if (BuildConfig.DEBUG) { Log.d(TAG, "No longer being used or cached so recycling. " + toString()); } getBitmap().recycle(); } // END_INCLUDE(check_state) } private synchronized boolean hasValidBitmap() { Bitmap bitmap = getBitmap(); return bitmap != null && !bitmap.isRecycled(); } }
[ "872126510@qq.com" ]
872126510@qq.com
eee8c6e055a0d842fe8adea6fba964fbbc516b7c
adb073a93ec2ceae65756d9e6f2f04478d6c74aa
/advance-java/week5/23.Behavioral-design-pattern/practice/observer/src/Subject.java
58b7cbd5e1f51d4677264fd3059170f47a899d31
[]
no_license
nhlong9697/codegym
0ae20f19360a337448e206137d703c5c2056a17b
38e105272fca0aecc0e737277b3a0a47b8cc0702
refs/heads/master
2023-05-12T17:18:14.570378
2022-07-13T09:07:52
2022-07-13T09:07:52
250,012,451
0
0
null
2023-05-09T05:40:08
2020-03-25T15:12:34
JavaScript
UTF-8
Java
false
false
508
java
import java.util.ArrayList; import java.util.List; public class Subject { private List<Observer> observers = new ArrayList(); private int state; public void add(Observer observer) { observers.add(observer); } public int getState() { return state; } public void setState(int value) { this.state = value; execute(); } public void execute() { for (Observer observer : observers) { observer.update(); } } }
[ "n.h.long.9697@gmail.com" ]
n.h.long.9697@gmail.com
722e9ae4b051cdfc175bb57a439088d02acd5a7a
c6aa94983f3c8f82954463af3972ae06b30396a7
/microservice_mina_social_business_api/portal-api/src/main/java/com/channelsharing/hongqu/portal/api/service/ShopGoodsService.java
a312b81d4bf56502a58eecf37faffc03c9f92daf
[ "Apache-2.0" ]
permissive
dobulekill/jun_springcloud
f01358caacb1b04f57908dccc6432d0a5e17745e
33248f65301741ed97a24b978a5c22d5d6c052fb
refs/heads/master
2023-01-24T13:24:59.282130
2020-11-25T17:30:47
2020-11-25T17:30:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
628
java
/** * Copyright &copy; 2016-2022 liuhangjun All rights reserved. */ package com.channelsharing.hongqu.portal.api.service; import com.channelsharing.common.entity.Paging; import com.channelsharing.hongqu.portal.api.entity.ShopGoods; import com.channelsharing.common.service.CrudService; import javax.validation.constraints.NotNull; /** * 店铺代理商品信息Service * @author Wujun * @version 2018-06-12 */ public interface ShopGoodsService extends CrudService<ShopGoods>{ ShopGoods findOne(@NotNull Long shopId, @NotNull Long goodsId); Paging<ShopGoods> findPaging(ShopGoods entity, Long userId); }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
d01638a40b43a3151e2ff69397347183ba1ebbd4
64fa951d13f33be9c7a248ba140d519290611a0e
/code-examples/java.util.HashMap.putAll9.java
79e6ecfafa33df93838ac5ccb9e7e03cee3125fc
[]
no_license
andrehora/jss-code-examples
1ee99d7be0a998284f44ecc7c033fdf12c9c01a8
ae98f124e1f15411f8a97d410920c05d6f1b1cea
refs/heads/main
2023-03-25T12:45:42.691780
2021-03-25T13:25:51
2021-03-25T13:25:51
312,898,657
1
0
null
null
null
null
UTF-8
Java
false
false
351
java
public HashMap<String, Object> getDados() { HashMap<String, Object> mapLista = new HashMap<>(); ResultSet rs = Call.selectFrom("VER_AMORTIZACAO where \"ID PRESTACAO\" = ?", "*", numPrestacao); Consumer<HashMap<String, Object>> act = (map) -> { mapLista.putAll(map); }; Call.forEchaResultSet(act, rs); return mapLista; }
[ "andrehoraa@gmail.com" ]
andrehoraa@gmail.com
762fd29b4c4007955966e8dd27a4cf15577aca36
ca62d867a4bb6049af35a5a511d595444394b97c
/src/gta_text/Server.java
6daca4323554a274367ae1518f88ca9ab27f0d12
[ "MIT" ]
permissive
SteveSmith16384/gta-mud
ca1b1d4105bf893c7a038788196711c458ffb243
f8efd298a98b002236e642a9a73244828a11ebf7
refs/heads/master
2020-12-17T23:56:21.935313
2020-01-29T13:54:11
2020-01-29T13:54:11
235,301,334
3
0
null
null
null
null
UTF-8
Java
false
false
2,498
java
package gta_text; import ssmith.lang.Functions; import ssmith.mail.MailAddress; import ssmith.mail.SmtpMail; import ssmith.net.NetworkMultiServer2; import ssmith.net.NetworkMultiServerConn2; import gta_text.admin.TOTD; import java.net.Socket; import java.io.IOException; import java.util.Date; public class Server extends NetworkMultiServer2 { public static final String CR = "\r\n"; public static final boolean DEBUG = false; public static final String VERSION = "0.97"; //public static final String EMAIL = "gta-mud@carlylesmith.karoo.co.uk"; public static final int PORT = 4000; public static final int MAX_CONNECTIONS = 100; public static final String ERROR_LOG = "logs/errors.txt"; public static boolean cheat_on = false; public static Game game; private static String error_log; public static TOTD totd; public Server() { super(PORT, MAX_CONNECTIONS); try { System.out.println("GTA Server (" + VERSION + ") started at " + new Date().toString() + ". Listening on port " + PORT + "."); if (DEBUG) { System.out.println("** DEBUG MODE ON **"); } error_log = ERROR_LOG; totd = new TOTD(); game = new Game(this); game.loadGame(); startGame(); } catch (Exception ex) { System.err.println("Error: "+ex.getMessage()); ex.printStackTrace(); Server.HandleError(ex); } } private void startGame() throws IOException { this.setPriority(Thread.MIN_PRIORITY); start(); game.game_loop(); } public NetworkMultiServerConn2 createConnection(Socket sck) throws IOException { ServerConn conn = new ServerConn(this, sck); write("Connection made from " + sck.getInetAddress().toString() + ". There are now " + (connections.size()+1) + " players connected."); return conn; } public static synchronized void write(String s) { System.out.println(new Date().toString() + ": " + s); } public static synchronized void HandleError(Exception ex) { System.err.println("Error: " + ex.getMessage()); ex.printStackTrace(); Functions.LogStackTrace(ex, error_log); } public static synchronized void SendEmail(String to, String subject, String msg) { try { SmtpMail smtp = new SmtpMail(); smtp.simpleSend("smtp.karoo.co.uk", 25, MailAddress.parseAddress("Todo: Put from address here"), MailAddress.parseAddress(to), subject, msg); } catch (Exception ex) { Server.HandleError(ex); } } //************************************************ public static void main(String[] args) { new Server(); } }
[ "stephen.carlylesmith@googlemail.com" ]
stephen.carlylesmith@googlemail.com
ebefdf2d2df5f19ff226df794b939dd0d693c0f4
d67474abfe71a672a128b9a7d27763731cca2d99
/sm-core/src/main/java/com/salesmanager/core/business/repositories/catalog/product/manufacturer/ManufacturerRepository.java
6410d4f9f747cbbefc870ebd74b64667a4682705
[ "Apache-2.0" ]
permissive
farhansRepo/shopizer
1bff7c46853e64045e8690c655f819ee4f9199fe
3e49e587da05f29b8c15c09935662d0f8a83e954
refs/heads/master
2020-08-13T00:02:06.308121
2019-10-10T01:40:51
2019-10-10T01:40:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,719
java
package com.salesmanager.core.business.repositories.catalog.product.manufacturer; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import com.salesmanager.core.model.catalog.product.manufacturer.Manufacturer; public interface ManufacturerRepository extends JpaRepository<Manufacturer, Long> { @Query("select count(distinct p) from Product as p where p.manufacturer.id=?1") Long countByProduct(Long manufacturerId); @Query("select m from Manufacturer m left join m.descriptions md join fetch m.merchantStore ms where ms.id=?1 and md.language.id=?2") List<Manufacturer> findByStoreAndLanguage(Integer storeId, Integer languageId); @Query("select m from Manufacturer m left join m.descriptions md join fetch m.merchantStore ms where m.id=?1") Manufacturer findOne(Long id); @Query("select m from Manufacturer m left join m.descriptions md join fetch m.merchantStore ms where ms.id=?1") List<Manufacturer> findByStore(Integer storeId); @Query("select m from Manufacturer m join fetch m.descriptions md join fetch m.merchantStore ms join fetch md.language mdl where ms.id=?1 and mdl.id=?2 and (?3 is null or md.name like %?3%)") //@Query("select m from Manufacturer m join fetch m.descriptions md join fetch m.merchantStore ms join fetch md.language mdl where ms.id=?1 and mdl.id=?2") //@Query("select m from Manufacturer m left join m.descriptions md join fetch m.merchantStore ms where ms.id=?1") List<Manufacturer> findByStore(Integer storeId, Integer languageId, String name); @Query("select distinct manufacturer from Product as p join p.manufacturer manufacturer join manufacturer.descriptions md join p.categories categs where categs.id in (?1) and md.language.id=?2") List<Manufacturer> findByCategoriesAndLanguage(List<Long> categoryIds, Integer languageId); @Query("select m from Manufacturer m left join m.descriptions md join fetch m.merchantStore ms where m.code=?1 and ms.id=?2") Manufacturer findByCodeAndMerchandStore(String code, Integer storeId); @Query("select count(distinct m) from Manufacturer as m where m.merchantStore.id=?1") int count(Integer storeId); //TODO @Query(value="select distinct manufacturer from Product as p join p.manufacturer manufacturer left join manufacturer.descriptions pmd join fetch manufacturer.merchantStore pms where pms.id = ?1 and p.id IN (select c.id from Category c where c.lineage like %?2% and pmd.language.id = ?3)") //@Query("select m from Manufacturer m left join m.descriptions md join fetch m.merchantStore ms where m.id=?1") List<Manufacturer> findByProductInCategoryId(Integer storeId, String lineage, Integer languageId); }
[ "csamson777@yahoo.com" ]
csamson777@yahoo.com
c0afc906bbe5dee22470279d547464bd8d50be7c
7beb062b1720ca30700c3546139d2d5d0510f54d
/aatrox-wechat/src/main/java/com/aatrox/wechat/wxpay/util/HttpsRequest.java
2fd4b005582de8effec251158ed1e3f05d29d161
[]
no_license
beiyuanbing/aatrox-cloud
7976024f02200bd12a2e4812cadab42c4ef424e2
bfc2ecac7f7f3d1c98b85379f1135ab511fb7535
refs/heads/master
2023-08-28T20:13:29.701897
2021-06-09T07:11:48
2021-06-09T07:11:48
245,924,093
0
0
null
2021-04-22T19:11:45
2020-03-09T02:12:26
Java
UTF-8
Java
false
false
3,910
java
package com.aatrox.wechat.wxpay.util; import com.alibaba.fastjson.JSON; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ConnectTimeoutException; import org.apache.http.conn.ConnectionPoolTimeoutException; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.util.EntityUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.net.SocketTimeoutException; /** * @author aatrox * @desc * @date 2020/6/30 */ public class HttpsRequest { private final static Logger logger = LoggerFactory.getLogger(HttpsRequest.class); /**H请求器的配置**/ private RequestConfig requestConfig; /**HTTP请求器**/ private CloseableHttpClient httpClient; private final String contentType_JSON = "application/json"; private final String contentType_XML = "text/xml"; public void setRequestConfig(RequestConfig requestConfig) { this.requestConfig = requestConfig; } public void setHttpClient(CloseableHttpClient httpClient) { this.httpClient = httpClient; } /** * 通过Https往API post xml数据 * * @param url API地址 * @param xmlObj 要提交的XML数据对象 * @return API回包的实际数据 */ public String sendPostXml(String url, Object xmlObj){ //解决XStream对出现双下划线的bug XStream xStreamForRequestPostData = new XStream(new DomDriver("UTF-8", new XmlFriendlyNameCoder("-_", "_"))); //将要提交给API的数据对象转换成XML格式数据Post给API xStreamForRequestPostData.processAnnotations(xmlObj.getClass()); xStreamForRequestPostData.alias("xml",xmlObj.getClass()); String postDataXML = xStreamForRequestPostData.toXML(xmlObj); logger.info("[pay:weixin][post]"); logger.info(postDataXML); return this.excute(url,postDataXML,contentType_XML); } /** * 调用微信接口进行调用微信支付下单 * @param url * @param object * @return */ public String sendPostJson(String url, Object object){ String jsonStr = JSON.toJSONString(object); return this.excute(url,jsonStr, contentType_JSON); } protected String excute(String url,String entityStr,String contentType){ String result = null; HttpPost httpPost = new HttpPost(url); //得指明使用UTF-8编码,否则到API服务器XML的中文不能被成功识别 StringEntity postEntity = new StringEntity(entityStr, "UTF-8"); httpPost.addHeader("Content-Type", contentType); httpPost.setEntity(postEntity); //设置请求器的配置 httpPost.setConfig(requestConfig); try { HttpResponse response = httpClient.execute(httpPost); HttpEntity entity = response.getEntity(); result = EntityUtils.toString(entity, "UTF-8"); } catch (ConnectionPoolTimeoutException e) { logger.error("[pay:weixin]"+"http get throw ConnectionPoolTimeoutException(wait time out)"); } catch (ConnectTimeoutException e) { logger.error("[pay:weixin]"+"http get throw ConnectTimeoutException"); } catch (SocketTimeoutException e) { logger.error("[pay:weixin]"+"http get throw SocketTimeoutException"); } catch (Exception e) { logger.error("[pay:weixin]"+"http get throw Exception"); } finally { httpPost.abort(); } logger.info("[pay:weixin][return]"+result); return result; } }
[ "425210220@qq.com" ]
425210220@qq.com
66b64a4e45c41604baf7dddde0c142f942cee03e
75ad48974d11e126b63050bf32772a8f50481b92
/portal-vbpq-portlet/.svn/pristine/66/66b64a4e45c41604baf7dddde0c142f942cee03e.svn-base
1c93132b5d32416d7f8a3efa9a19123253c72992
[]
no_license
pforr/Minh_Bach
146bc9d5ea60df03c3ecd3d7645ec6cdd17de455
a95e5eb09df9da4407c6381c42e8f4d1fee4d542
refs/heads/master
2021-01-10T05:33:34.065572
2016-03-11T07:16:37
2016-03-11T07:16:37
53,647,297
0
0
null
null
null
null
UTF-8
Java
false
false
3,385
package com.dtt.portal.adminvbpq.business; import java.util.ArrayList; import java.util.List; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.OrderByComparator; import com.dtt.portal.dao.vbpq.model.LoaiVanBan; import com.dtt.portal.dao.vbpq.service.LoaiVanBanLocalServiceUtil; public class LoaiVanBanBusiness { /** * @param keyword * @param groupId * @return */ public static int countLoaiVanBan(String keyword, long groupId) { int count = 0; try { count = LoaiVanBanLocalServiceUtil.countLoaiVb(keyword, groupId); } catch (Exception e) { LOG.error(e); } return count; } /** * Get LoaiVanBan by custom query * * @param keyword * @param groupId * @param obc * @param start * @param end * @return */ public static List<LoaiVanBan> findLoaiVanBan(String keyword, long groupId, OrderByComparator obc, int start, int end) { List<LoaiVanBan> ls = new ArrayList<LoaiVanBan>(); try { ls = LoaiVanBanLocalServiceUtil.findLoaiVb(keyword, groupId, obc, start, end); } catch (Exception e) { LOG.error(e); } return ls; } /** * Get LoaiVanBan by id * * @param linhvucId * @return */ public static LoaiVanBan getLoaiVanBan(long loaiVBId) { LoaiVanBan loaivb = null; try { loaivb = LoaiVanBanLocalServiceUtil.fetchLoaiVanBan(loaiVBId); } catch (SystemException e) { LOG.error(e); } return loaivb; } /** * Get all LinhVucVanBan * * @param groupId * @param start * @param end * @return */ public static List<LoaiVanBan> getAll(long groupId, int start, int end) { List<LoaiVanBan> ls = new ArrayList<LoaiVanBan>(); try { ls = LoaiVanBanLocalServiceUtil.getAll(groupId, start, end); } catch (Exception e) { LOG.error(e); } return ls; } /** * Get LinhVucVanBan by TrangThai * * @param groupId * @param trangThai * @param start * @param end * @return */ public static List<LoaiVanBan> getByTrangThai(long groupId, boolean trangThai, int start, int end) { List<LoaiVanBan> ls = new ArrayList<LoaiVanBan>(); try { ls = LoaiVanBanLocalServiceUtil.getByTrangThai(groupId, trangThai, start, end); } catch (Exception e) { LOG.error(e); } return ls; } /** * Count CoQuanBanHanh * * @param groupId * @return */ public static int countAll(long groupId) { int count = 0; try { LoaiVanBanLocalServiceUtil.countAll(groupId); } catch (Exception e) { LOG.error(e); } return count; } /** * Count LoaiVanBan by TrangThai * * @param groupId * @param trangThai * @return */ public static int countByTrangThai(long groupId, boolean trangThai) { int count = 0; try { LoaiVanBanLocalServiceUtil.countByTrangThai(groupId, trangThai); } catch (Exception e) { LOG.error(e); } return count; } public static List<LoaiVanBan> getByListSelected(long[] loaiVanBanIds) { List<LoaiVanBan> list = new ArrayList<LoaiVanBan>(); for(long loaiVanBanId : loaiVanBanIds) { LoaiVanBan loaiVanBan = LoaiVanBanBusiness.getLoaiVanBan(loaiVanBanId); if(loaiVanBan != null) { list.add(loaiVanBan); } } return list; } private static final Log LOG = LogFactoryUtil .getLog(LoaiVanBanBusiness.class); }
[ "hungvq@yahoo.com" ]
hungvq@yahoo.com
0d9d162f353bda65bc63c29439ebec6f0321582b
d72cdc4a0158ee3ecae5e1b2d9cdb9bb7e241763
/tools/base/sdklib/src/main/java/com/android/sdklib/repository/local/LocalLLDBPkgInfo.java
f01117197fd7f641fd889630a0339b93a5278a99
[ "Apache-2.0" ]
permissive
yanex/uast-lint-common
700fc4ca41a3ed7d76cb33cab280626a0c9d717b
34f5953acd5e8c0104bcc2548b2f2e3f5ab8c675
refs/heads/master
2021-01-20T18:08:31.404596
2016-06-08T19:58:58
2016-06-08T19:58:58
60,629,527
3
0
null
null
null
null
UTF-8
Java
false
false
1,853
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.sdklib.repository.local; import com.android.annotations.NonNull; import com.android.sdklib.repository.descriptors.IPkgDesc; import com.android.sdklib.repository.descriptors.PkgDesc; import com.android.repository.Revision; import java.io.File; import java.util.Properties; /** * Local package representing the Android LLDB. * * @deprecated in favor of new sdk system */ @Deprecated public class LocalLLDBPkgInfo extends LocalPkgInfo { /** * The LLDB SDK package revision's major and minor numbers are pinned in Android Studio. * * @deprecated in favor of LLDBSdkPackageInstaller#PINNED_REVISION. */ @Deprecated public static final Revision PINNED_REVISION = new Revision(2, 0); @NonNull private final IPkgDesc mDesc; protected LocalLLDBPkgInfo(@NonNull LocalSdk localSdk, @NonNull File localDir, @NonNull Properties sourceProps, @NonNull Revision revision) { super(localSdk, localDir, sourceProps); mDesc = PkgDesc.Builder.newLLDB(revision).setDescriptionShort("LLDB").setListDisplay("LLDB").create(); } @NonNull @Override public IPkgDesc getDesc() { return mDesc; } }
[ "yan.zhulanow@jetbrains.com" ]
yan.zhulanow@jetbrains.com
b1b18c55843d559bac86d4398a88280043dd1d10
10378c580b62125a184f74f595d2c37be90a5769
/com/github/steveice10/netty/handler/codec/socks/SocksMessageEncoder.java
93bc3cab676bbcdb94375da03535c40893fb9d05
[]
no_license
ClientPlayground/Melon-Client
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
afc9b11493e15745b78dec1c2b62bb9e01573c3d
refs/heads/beta-v2
2023-04-05T20:17:00.521159
2021-03-14T19:13:31
2021-03-14T19:13:31
347,509,882
33
19
null
2021-03-14T19:13:32
2021-03-14T00:27:40
null
UTF-8
Java
false
false
540
java
package com.github.steveice10.netty.handler.codec.socks; import com.github.steveice10.netty.buffer.ByteBuf; import com.github.steveice10.netty.channel.ChannelHandler.Sharable; import com.github.steveice10.netty.channel.ChannelHandlerContext; import com.github.steveice10.netty.handler.codec.MessageToByteEncoder; @Sharable public class SocksMessageEncoder extends MessageToByteEncoder<SocksMessage> { protected void encode(ChannelHandlerContext ctx, SocksMessage msg, ByteBuf out) throws Exception { msg.encodeAsByteBuf(out); } }
[ "Hot-Tutorials@users.noreply.github.com" ]
Hot-Tutorials@users.noreply.github.com
bcadce9c69a8ca3c91ed86273eefd8c9b1342dbf
66fa0ab7de46d9cf9cb32e654a8c35127a87943a
/src/main/java/com/wondertek/core/util/MeasureUtil.java
4b7b1c2889af629cf56ed23f8a2054f95ec6c339
[]
no_license
zbcstudy/commons-util
b8f3c4730f865c0bdc3bbc78c8cdad0c65ef4ba7
afd0f6a3eb6ad5afb0ea6e5eebb3ffb19bc59a6a
refs/heads/master
2020-04-23T15:49:49.697195
2019-04-01T15:02:23
2019-04-01T15:02:23
171,277,858
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
java
/** * */ package com.wondertek.core.util; /** * @author 605162215@qq.com * * 2016年8月15日 上午10:36:35 */ public class MeasureUtil { public static long parseSize(String size) { if(size == null || size.length() <= 0){ return -1; } size = size.toUpperCase(); if (size.endsWith("KB")) { return Long.valueOf(size.substring(0, size.length() - 2)) * 1024; }else if (size.endsWith("K")) { return Long.valueOf(size.substring(0, size.length() - 1)) * 1024; } if (size.endsWith("MB")) { return Long.valueOf(size.substring(0, size.length() - 2)) * 1024 * 1024; }else if(size.endsWith("M")){ return Long.valueOf(size.substring(0, size.length() - 1)) * 1024 * 1024; } return Long.valueOf(size); } public static String formatSize(long size) { if(size <= 0){ return "0B"; } long kb = size/1024; long mb = kb/1024; if(mb > 0){ return mb+"MB"; } if(kb > 0){ return kb + "KB"; } return size+"B"; } }
[ "1434756304@qq.com" ]
1434756304@qq.com
00c88aaee489f2580443db559ea21a00ded1db9a
ecb7e109a62f6a2a130e3320ed1fb580ba4fc2de
/reference-code/esr/esale-commons/src/main/java/jp/co/softbrain/esales/commons/service/dto/GetRelationDataSubType11DTO.java
512e18f433f69436c940885ed4de8211ffeac2b2
[]
no_license
nisheeth84/prjs_sample
df732bc1eb58bc4fd4da6e76e6d59a2e81f53204
3fb10823ca4c0eb3cd92bcd2d5d4abc8d59436d9
refs/heads/master
2022-12-25T22:44:14.767803
2020-10-07T14:55:52
2020-10-07T14:55:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
450
java
package jp.co.softbrain.esales.commons.service.dto; import java.io.Serializable; import lombok.Data; import lombok.EqualsAndHashCode; /** * DTO need for response of API GetRelationDatas * * @author chungochai */ @Data @EqualsAndHashCode public class GetRelationDataSubType11DTO implements Serializable { private static final long serialVersionUID = -7811972962193238560L; private String employeeName; private Long employeeId; }
[ "phamkhachoabk@gmail.com" ]
phamkhachoabk@gmail.com
531e504ce4a9a12bb6e655f07e2c82ca08c1c980
83644b9e6f78bbe0edd316129fc1e096692c343f
/src/main/java/com/citrix/sdx/nitro/datatypes/MPSConstraintInternetHost.java
113b0d825a36bc52e39811fe8af69d3c42839978
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
netscaler/sdx_nitro
19ca32785ea5c0b622920d35e07c5e2e1d695945
c840919f1a8f7c0a5634c0f23d34fa14d1765ff1
refs/heads/master
2021-01-10T19:03:06.155003
2013-11-22T06:15:21
2013-11-22T06:15:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,284
java
/* * Copyright (c) 2008-2015 Citrix Systems, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.citrix.sdx.nitro.datatypes; public class MPSConstraintInternetHost extends MPSConstraint { private boolean isRequired; public MPSConstraintInternetHost() { isRequired = false; } public void setIsRequired(boolean isRequired){ this.isRequired = isRequired; } public void validate(Object _value, String label)throws Exception { if(_value == null) _value = ""; String value = (String)_value; if(isRequired == false && value.length() == 0) return; if(isValidInternetHost(value) == false) { throw new Exception(label+" Invalid IP Address / HostName: "+value); } return; } }
[ "vijay.venkatachalam@citrix.com" ]
vijay.venkatachalam@citrix.com
0424891e7f5edf790d2fc3795a2e5dbf7a890b65
60ed825a78fdaa3af2f01e27c7eb55de5201f026
/src/main/java/com/mongodb2/WriteConcernException.java
bfd613b86ab853f93e92c283426d9948d0202abb
[]
no_license
newthis/enc-mongodb
f2638ca1905f028ca4386d47fb6ffa99143f55c7
1e87ec6e7c4eced8bf0f9bf7689a7978f18be6ed
refs/heads/master
2021-07-12T07:17:34.216032
2019-06-15T01:52:23
2019-06-15T01:52:23
155,966,484
2
0
null
2020-06-15T19:41:59
2018-11-03T08:58:32
Java
UTF-8
Java
false
false
4,395
java
/* * Copyright (c) 2008-2014 MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.mongodb2; import org.bson2.BsonDocument; import org.bson2.BsonInt32; import org.bson2.BsonValue; import static java.lang.String.format; /** * An exception representing an error reported due to a write failure. * */ public class WriteConcernException extends MongoServerException { private static final long serialVersionUID = -1100801000476719450L; private final WriteConcernResult writeConcernResult; private final BsonDocument response; /** * Construct a new instance. * * @param response the response to the write operation * @param address the address of the server that executed the operation * @param writeConcernResult the write concern result */ public WriteConcernException(final BsonDocument response, final ServerAddress address, final WriteConcernResult writeConcernResult) { super(extractErrorCode(response), format("Write failed with error code %d and error message '%s'", extractErrorCode(response), extractErrorMessage(response)), address); this.response = response; this.writeConcernResult = writeConcernResult; } /** * For internal use only: extract the error code from the response to a write command. * @param response the response * @return the code, or -1 if there is none */ public static int extractErrorCode(final BsonDocument response) { // mongos may set an err field containing duplicate key error information if (response.containsKey("err")) { String errorMessage = extractErrorMessage(response); if (errorMessage.contains("E11000 duplicate key error")) { return 11000; } } // mongos may return a list of documents representing write command responses from each shard. Return the one with a matching // "err" field, so that it can be used to get the error code if (!response.containsKey("code") && response.containsKey("errObjects")) { for (BsonValue curErrorDocument : response.getArray("errObjects")) { if (extractErrorMessage(response).equals(extractErrorMessage(curErrorDocument.asDocument()))) { return curErrorDocument.asDocument().getNumber("code").intValue(); } } } return response.getNumber("code", new BsonInt32(-1)).intValue(); } /** * For internal use only: extract the error message from the response to a write command. * * @param response the response * @return the error message */ public static String extractErrorMessage(final BsonDocument response) { if (response.isString("err")) { return response.getString("err").getValue(); } else if (response.isString("errmsg")) { return response.getString("errmsg").getValue(); } else { return null; } } /** * Gets the write result. * * @return the write result */ public WriteConcernResult getWriteConcernResult() { return writeConcernResult; } /** * Gets the error code associated with the write concern failure. * * @return the error code */ public int getErrorCode() { return extractErrorCode(response); } /** * Gets the error message associated with the write concern failure. * * @return the error message */ public String getErrorMessage() { return extractErrorMessage(response); } /** * Gets the response to the write operation. * * @return the response to the write operation */ public BsonDocument getResponse() { return response; } }
[ "test@123.com" ]
test@123.com
aa6d4e638a547a6a5d5552cd7eef5d74d89982dd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_c284e36e7a12ccf5784a4b120ff12baf50c64a4e/FileUtil/6_c284e36e7a12ccf5784a4b120ff12baf50c64a4e_FileUtil_s.java
e8af1cadfd1ac9ba745e013a45e9b121badc4905
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,372
java
package au.org.intersect.faims.android.util; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.zip.GZIPInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.javarosa.core.model.FormDef; import org.javarosa.core.model.condition.EvaluationContext; import org.javarosa.form.api.FormEntryController; import org.javarosa.form.api.FormEntryModel; import org.javarosa.xform.parse.XFormParseException; import org.javarosa.xform.util.XFormUtils; import android.os.Environment; import android.os.StatFs; public class FileUtil { private static String toPath(String path) { return Environment.getExternalStorageDirectory() + path; } public static void makeDirs(String dir) { FAIMSLog.log(); File file = new File(toPath(dir)); if (!file.exists()) file.mkdirs(); FAIMSLog.log(toPath(dir) + " is present " + String.valueOf(file.exists())); } public static void untarFromStream(String dir, String filename) throws IOException { FAIMSLog.log(); TarArchiveInputStream ts = null; try { ts = new TarArchiveInputStream( new GZIPInputStream( new FileInputStream(toPath(filename)))); TarArchiveEntry e; while((e = ts.getNextTarEntry()) != null) { if (e.isDirectory()) { makeDirs(dir + "/" + e.getName()); } else { writeTarFile(ts, e, new File(toPath(dir + "/" + e.getName()))); } } } finally { if (ts != null) ts.close(); } FAIMSLog.log("untared file " + filename); } // from: http://stackoverflow.com/questions/3163045/android-how-to-check-availability-of-space-on-external-storage public static long getExternalStorageSpace() throws Exception { FAIMSLog.log(); long availableSpace = -1L; StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath()); stat.restat(Environment.getExternalStorageDirectory().getPath()); availableSpace = (long) stat.getAvailableBlocks() * (long) stat.getBlockSize(); return availableSpace; } public static void saveFile(InputStream input, String filename) throws IOException { FAIMSLog.log(); FileOutputStream os = null; try { os = new FileOutputStream(toPath(filename)); byte[] buffer = new byte[1024]; int bufferLength = 0; //used to store a temporary size of the buffer while ( (bufferLength = input.read(buffer)) > 0) { os.write(buffer, 0, bufferLength); } } finally { if (os != null) os.close(); } FAIMSLog.log("saved file " + filename); } public static String generateMD5Hash(String filename) throws IOException, NoSuchAlgorithmException { FAIMSLog.log(); FileInputStream fs = null; try { fs = new FileInputStream(toPath(filename)); MessageDigest digester = MessageDigest.getInstance("MD5"); byte[] bytes = new byte[8192]; int byteCount; while ((byteCount = fs.read(bytes)) > 0) { digester.update(bytes, 0, byteCount); } FAIMSLog.log("generated md5 for hash for file " + filename); return new BigInteger(1, digester.digest()).toString(16); } finally { if (fs != null) fs.close(); } } public static void deleteFile(String filename) throws IOException { FAIMSLog.log(); new File(toPath(filename)).delete(); FAIMSLog.log("deleted file " + filename); } private static void writeTarFile(TarArchiveInputStream ts, TarArchiveEntry entry, File file) throws IOException { FAIMSLog.log(); FileOutputStream os = null; try { os = new FileOutputStream(file); byte[] buffer = new byte[(int)entry.getSize()]; int bufferLength = 0; //used to store a temporary size of the buffer while ( (bufferLength = ts.read(buffer)) > 0 ) { os.write(buffer, 0, bufferLength); } } finally { if (os != null) os.close(); } FAIMSLog.log("writing tar file " + file.getName()); } public static FormEntryController readXmlContent(String path) { FormDef fd = null; FileInputStream fis = null; String mErrorMsg = null; File formXml = new File(path); try { fis = new FileInputStream(formXml); fd = XFormUtils.getFormFromInputStream(fis); if (fd == null) { mErrorMsg = "Error reading XForm file"; } } catch (FileNotFoundException e) { e.printStackTrace(); mErrorMsg = e.getMessage(); } catch (XFormParseException e) { mErrorMsg = e.getMessage(); e.printStackTrace(); } catch (Exception e) { mErrorMsg = e.getMessage(); e.printStackTrace(); } if (mErrorMsg != null) { return null; } // new evaluation context for function handlers fd.setEvaluationContext(new EvaluationContext(null)); // create FormEntryController from formdef FormEntryModel fem = new FormEntryModel(fd); return new FormEntryController(fem); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a1c862518bc8904ca025280b22520300320e6e69
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_1461.java
23777a2e1d5b5ae8ef71bd45eadf37c0812af7cf
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_1461 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
ba66a8bf5c33ac09953d42a0d9337f67b1cf44c6
adcd551678604f20d9a768dac5eff225ceceb1dc
/app/src/main/java/com/dyy/newtest/ui/activity/service/keepliveservice/SportsActivity.java
4afeff783fb1a0829a6042e26e98a565eec7e3c3
[]
no_license
d071225/MyApplication
bad7291e4066624a30a33feffb82e9f7afc33d89
1a4df129201dd61b72f995ad8f8d2db0eefba292
refs/heads/master
2021-05-09T11:21:32.528355
2019-02-26T05:59:33
2019-02-26T05:59:33
118,988,560
0
0
null
null
null
null
UTF-8
Java
false
false
395
java
package com.dyy.newtest.ui.activity.service.keepliveservice; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import com.dyy.newtest.R; public class SportsActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sports); } }
[ "764552635@qq.com" ]
764552635@qq.com
6a9f4f551b2032319166968635d03d60b55cb11e
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_2/src/b/a/e/d/Calc_1_2_10437.java
8295164b5ff0c16e7e3dfb47976cfe64e76812d5
[]
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.a.e.d; public class Calc_1_2_10437 { /** @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
5468ddf605dfcbf64c53c0f94728cbd514138b2b
795d85e510802edb1892ca1f1352734186052367
/_src/Pyramid-of-Refactoring/5-Interpreter-Factories/src/main/java/pl/refactoring/interpreter/factories/spec/BelowAreaSpec.java
ad7c16e54c80ef8f94e12d946592b16702f8a4c1
[ "MIT", "Apache-2.0" ]
permissive
paullewallencom/java-978-1-8005-6341-4
95d1fb5d34e445b088c8dffb94b6e270f522e47b
ebb3abce1a517210aeb08dab4bf0c8dd9590b5c7
refs/heads/main
2023-02-07T05:03:55.323110
2020-12-26T19:44:54
2020-12-26T19:44:54
319,151,053
0
0
null
null
null
null
UTF-8
Java
false
false
652
java
/** * Copyright (c) 2020 IT Train Wlodzimierz Krakowski (www.refactoring.pl) * Sources are available only for personal usage by Udemy students of this course. */ package pl.refactoring.interpreter.factories.spec; import pl.refactoring.interpreter.factories.RealEstate; import pl.refactoring.interpreter.factories.Spec; class BelowAreaSpec implements Spec { private float maxBuildingArea; BelowAreaSpec(float maxBuildingArea) { this.maxBuildingArea = maxBuildingArea; } @Override public boolean isSatisfiedBy(RealEstate estate) { return estate.getBuildingArea() < maxBuildingArea; } }
[ "paullewallencom@users.noreply.github.com" ]
paullewallencom@users.noreply.github.com
0c299b62fd6818accf1043d735e4303062835596
5076d14c853effaa65be6103fa4d47e246b3ca27
/src/main/java/com/tyc/controller/TblStopDateController.java
43ef2b3a6762c5eaabe1df4d1e2be3043f25a9e2
[]
no_license
Tang5566/family_service_platform
cea82017c5517518e0f501f19491da0591a5ab25
2b02d39198ae0ef8baa33456a81ab79a28370aba
refs/heads/master
2023-03-06T14:20:38.861485
2021-02-23T13:56:37
2021-02-23T13:56:37
341,571,675
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
package com.tyc.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; /** * <p> * 到期日期 前端控制器 * </p> * * @author tyc * @since 2021-02-20 */ @Controller @RequestMapping("/tblStopDate") public class TblStopDateController { }
[ "1213859735@qq.com" ]
1213859735@qq.com
26677fdd1c396c0ec3f2d200b7dcf6a56506e272
34182a13cd6291fc4657546e196c6447553b5eb0
/corejava/corejava_1/src/main/java/com/xubh01/net/url/URLDemo02.java
d943edb5c0c58b4c9ac1efeacc9c70232e0626bc
[]
no_license
786991884/sxnd-study
9bf3d417879680f94b012867ef71ba880a19e4fc
8c1f8e8823c077f095dc4be0c89522b6f0eb1457
refs/heads/master
2021-01-12T08:49:59.493518
2018-04-03T09:17:54
2018-04-03T09:17:54
76,701,131
1
0
null
null
null
null
UTF-8
Java
false
false
1,033
java
package com.xubh01.net.url; import java.io.*; import java.net.URL; /** * 获取资源:源代码 */ public class URLDemo02 { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { URL url = new URL("http://www.baidu.com"); //主页 默认资源 //获取资源 网络流 /* InputStream is =url.openStream(); byte[] flush = new byte[1024]; int len =0; while(-1!=(len=is.read(flush))){ System.out.println(new String(flush,0,len)); } is.close(); */ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream(), "utf-8")); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("baidu2.html"), "utf-8")); String msg = null; while ((msg = br.readLine()) != null) { //System.out.println(msg); bw.append(msg); bw.newLine(); } bw.flush(); bw.close(); br.close(); } }
[ "786991884@qq.com" ]
786991884@qq.com
be125b7a77c74439060720e1fddfdd65ae399850
b8a0d1442363e1c68036c1967baef06d22cc4048
/GuPaoEdu_WriteMiniSpring/src/main/java/com/asiainfo/annotation/ZzwAutowired.java
16d5a069262596c3c6d619815e436b9b4a98b060
[]
no_license
zhangzhiwang/GuPaoEdu
941460fbbafd6c9d45b8ac6fe947cdc0dd2133b5
b7e09548dd23f192e7a7346a1e5ac4072708c1d7
refs/heads/master
2022-12-22T09:06:33.369402
2021-07-28T10:29:41
2021-07-28T10:29:41
214,958,076
1
0
null
null
null
null
UTF-8
Java
false
false
316
java
package com.asiainfo.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.METHOD, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface ZzwAutowired { }
[ "934109401@qq.com" ]
934109401@qq.com
67ce0b939748c33cb28f5e9ae2080c68fea4b54e
ceeea83e2553c0ffef73bb8d3dc784477e066531
/ERPV2.0/src/com/erp/finance/bean/CashDisbursmentJournalBean.java
36eb53948b0b5a0e384f4165363ab82825cb9848
[ "Apache-2.0" ]
permissive
anupammaiti/ERP
99bf67f9335a2fea96e525a82866810875bc8695
8c124deb41c4945c7cd55cc331b021eae4100c62
refs/heads/master
2020-08-13T19:30:59.922232
2019-10-09T17:04:58
2019-10-09T17:04:58
215,025,440
1
0
Apache-2.0
2019-10-14T11:26:11
2019-10-14T11:26:10
null
UTF-8
Java
false
false
7,008
java
package com.erp.finance.bean; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="cashdisbursmentjournal") public class CashDisbursmentJournalBean { @Id @GeneratedValue @Column(name="sno") private long sno; @Column(name="fromdate") private String fromdate; @Column(name="todate") private String todate; @Column(name="date1") private String date1; @Column(name="check1") private String check1; @Column(name="payee1") private String payee1; @Column(name="accountc1") private String accountc1; @Column(name="account") private String account; @Column(name="cash1") private String cash1; @Column(name="discount1") private String discount1; @Column(name="other1") private String other1; @Column(name="accountd1") private String accountd1; @Column(name="amount1") private String amount1; @Column(name="amountp1") private String amountp1; @Column(name="othera1") private String othera1; @Column(name="date2") private String date2; @Column(name="check2") private String check2; @Column(name="payee2") private String payee2; @Column(name="accountc2") private String accountc2; @Column(name="account2") private String account2; @Column(name="cash2") private String cash2; @Column(name="discount2") private String discount2; @Column(name="other2") private String other2; @Column(name="accountd2") private String accountd2; @Column(name="amount2") private String amount2; @Column(name="amountp2") private String amountp2; @Column(name="othera2") private String othera2; @Column(name="date3") private String date3; @Column(name="check3") private String check3; @Column(name="payee3") private String payee3; @Column(name="accountc3") private String accountc3; @Column(name="account3") private String account3; @Column(name="cash3") private String cash3; @Column(name="discount3") private String discount3; @Column(name="other3") private String other3; @Column(name="accountd3") private String accountd3; @Column(name="amount3") private String amount3; @Column(name="amountp3") private String amountp3; @Column(name="othera3") private String othera3; public long getSno() { return sno; } public void setSno(long sno) { this.sno = sno; } public String getFromdate() { return fromdate; } public void setFromdate(String fromdate) { this.fromdate = fromdate; } public String getTodate() { return todate; } public void setTodate(String todate) { this.todate = todate; } public String getDate1() { return date1; } public void setDate1(String date1) { this.date1 = date1; } public String getCheck1() { return check1; } public void setCheck1(String check1) { this.check1 = check1; } public String getPayee1() { return payee1; } public void setPayee1(String payee1) { this.payee1 = payee1; } public String getAccountc1() { return accountc1; } public void setAccountc1(String accountc1) { this.accountc1 = accountc1; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getCash1() { return cash1; } public void setCash1(String cash1) { this.cash1 = cash1; } public String getDiscount1() { return discount1; } public void setDiscount1(String discount1) { this.discount1 = discount1; } public String getOther1() { return other1; } public void setOther1(String other1) { this.other1 = other1; } public String getAccountd1() { return accountd1; } public void setAccountd1(String accountd1) { this.accountd1 = accountd1; } public String getAmount1() { return amount1; } public void setAmount1(String amount1) { this.amount1 = amount1; } public String getAmountp1() { return amountp1; } public void setAmountp1(String amountp1) { this.amountp1 = amountp1; } public String getOthera1() { return othera1; } public void setOthera1(String othera1) { this.othera1 = othera1; } public String getDate2() { return date2; } public void setDate2(String date2) { this.date2 = date2; } public String getCheck2() { return check2; } public void setCheck2(String check2) { this.check2 = check2; } public String getPayee2() { return payee2; } public void setPayee2(String payee2) { this.payee2 = payee2; } public String getAccountc2() { return accountc2; } public void setAccountc2(String accountc2) { this.accountc2 = accountc2; } public String getAccount2() { return account2; } public void setAccount2(String account2) { this.account2 = account2; } public String getCash2() { return cash2; } public void setCash2(String cash2) { this.cash2 = cash2; } public String getDiscount2() { return discount2; } public void setDiscount2(String discount2) { this.discount2 = discount2; } public String getOther2() { return other2; } public void setOther2(String other2) { this.other2 = other2; } public String getAccountd2() { return accountd2; } public void setAccountd2(String accountd2) { this.accountd2 = accountd2; } public String getAmount2() { return amount2; } public void setAmount2(String amount2) { this.amount2 = amount2; } public String getAmountp2() { return amountp2; } public void setAmountp2(String amountp2) { this.amountp2 = amountp2; } public String getOthera2() { return othera2; } public void setOthera2(String othera2) { this.othera2 = othera2; } public String getDate3() { return date3; } public void setDate3(String date3) { this.date3 = date3; } public String getCheck3() { return check3; } public void setCheck3(String check3) { this.check3 = check3; } public String getPayee3() { return payee3; } public void setPayee3(String payee3) { this.payee3 = payee3; } public String getAccountc3() { return accountc3; } public void setAccountc3(String accountc3) { this.accountc3 = accountc3; } public String getAccount3() { return account3; } public void setAccount3(String account3) { this.account3 = account3; } public String getCash3() { return cash3; } public void setCash3(String cash3) { this.cash3 = cash3; } public String getDiscount3() { return discount3; } public void setDiscount3(String discount3) { this.discount3 = discount3; } public String getOther3() { return other3; } public void setOther3(String other3) { this.other3 = other3; } public String getAccountd3() { return accountd3; } public void setAccountd3(String accountd3) { this.accountd3 = accountd3; } public String getAmount3() { return amount3; } public void setAmount3(String amount3) { this.amount3 = amount3; } public String getAmountp3() { return amountp3; } public void setAmountp3(String amountp3) { this.amountp3 = amountp3; } public String getOthera3() { return othera3; } public void setOthera3(String othera3) { this.othera3 = othera3; } }
[ "rrkravikiranrrk@gmail.com" ]
rrkravikiranrrk@gmail.com
a363fbd23281042b2ed9f608af3d7c9907a97179
e5488dea88f1036ac9fbb61816bae69d70a9d763
/data/bean-validation/src/main/java/org/agoncal/fascicle/quarkus/data/bv/ex01/Order.java
deb41239be4f6abab5cb1268fd7de84f13245fe7
[ "MIT" ]
permissive
fg78nc/agoncal-fascicle-quarkus
1572eb5aeaddda11708c3ea3d2f4fd1474295323
5a62b42d4e246a279eb188f6f1c09c02e0e85b8b
refs/heads/master
2023-01-12T18:28:19.834971
2020-11-09T13:46:37
2020-11-09T13:46:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,525
java
package org.agoncal.fascicle.quarkus.data.bv.ex01; import javax.validation.constraints.Future; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import javax.validation.constraints.PastOrPresent; import javax.validation.constraints.Pattern; import javax.validation.constraints.Positive; import java.math.BigDecimal; import java.time.Instant; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; /** * @author Antonio Goncalves * http://www.antoniogoncalves.org * -- */ // @formatter:off // tag::adocSnippet[] public class Order { @NotNull @Pattern(regexp = "[CDM][0-9]+") public String orderId; @NotNull @Min(1) public BigDecimal totalAmount; @PastOrPresent public Instant creationDate; @Future public LocalDate deliveryDate; @NotNull public List<OrderLine> orderLines; public Order(@PastOrPresent Instant creationDate) { this.creationDate = creationDate; } @NotNull public Double calculateTotalAmount(@Positive Double changeRate) { return complexCalculation(); } // tag::adocSkip[] public Order() { } private Double complexCalculation() { return 1d; } // ====================================== // = Getters & Setters = // ====================================== public void addOrderLine(OrderLine orderLine) { if (this.orderLines == null) this.orderLines = new ArrayList<>(); this.orderLines.add(orderLine); } // end::adocSkip[] } // end::adocSnippet[]
[ "antonio.goncalves@gmail.com" ]
antonio.goncalves@gmail.com
f62fe2040cc5f5100fd41ae80e749aa9476e8aea
4c8766c1862d1dd32964eaec9f94417455eda6b7
/MySimba/src/main/java/com/common/util/JsonUtil.java
171f257ec220d1f83d856201053ab62ed4323a9f
[]
no_license
xutaopro/MySimba
1f9dbdc77c97f8783d32d8188893005c9e0f5e86
3452be542ffd8e234aa89ec54ec4a73a182b9e4f
refs/heads/master
2021-01-20T01:52:42.549287
2017-05-14T13:09:04
2017-05-14T13:09:04
89,340,312
0
0
null
null
null
null
IBM852
Java
false
false
848
java
package com.common.util; import java.io.IOException; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import com.model.Menu; import com.sun.istack.internal.logging.Logger; /** * json┤Ž└Ý└Ó * @author XUTAO * */ public class JsonUtil { private static ObjectMapper objectMapper = new ObjectMapper(); private static final Log logger = LogFactory.getLog(JsonUtil.class); public static String toJson(Object obj) { try { return objectMapper.writeValueAsString(obj); } catch (Exception e) { logger.error("Objectά╗╗json╩ž░▄"); } return null; } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
d81e01b3937eb1c451d1fabd29bb946c2cb27f2c
ebc61a98d31fe36a58bf7f0338e3cea982a50811
/puzzles/src/slava/puzzle/domino/analysis/LineRestrictedDominoGenerator.java
9471bec6f7bf1b445c54f4093ef81763a527d0f4
[]
no_license
scabanovich/slava-programs
a7af43401bf65b545da0e35c2b6b85591d0fac58
3f91b542dc103521e17a61659cb5fc7ead0a8de9
refs/heads/master
2021-06-04T11:46:55.098698
2020-09-07T02:13:49
2020-09-07T02:13:49
10,531,499
0
0
null
2020-10-13T22:39:41
2013-06-06T16:49:32
Java
UTF-8
Java
false
false
7,560
java
package slava.puzzle.domino.analysis; public class LineRestrictedDominoGenerator { int max; int width; int height; int[] form; int[][] vLines; int[][] hLines; int[][] vLinesCopy; int[][] hLinesCopy; boolean[] attempts; Dominoes dominoes = new Dominoes(max); DominoField field = new DominoField(); DominoLineRestrictions restrictions = new DominoLineRestrictions(); LineRestrectedDominoAnalyzer analyzer = new LineRestrectedDominoAnalyzer(); boolean debug = true; public LineRestrictedDominoGenerator() {} public void setDebugging(boolean b) { debug = b; if(!debug) analyzer.setPrintedSolutionLimit(0); } public void setData(int max, int width, int height, int[] form) { this.max = max; this.width = width; this.height = height; this.form = form; if(dominoes.max != max) dominoes.setMaximum(max); if(form.length != width * height) throw new RuntimeException("Inconsistent data: Field Size= " + form.length + ", Width * Height = " + (width * height)); field.init(width, height, form); analyzer.setData(dominoes, field, restrictions); } private void resetRestrictions() { vLines = new int[width][0]; hLines = new int[height][0]; restrictions.setRestrictions(max, hLines, vLines); } public boolean generateRandomState() { resetRestrictions(); analyzer.setRandomising(true); if(debug) analyzer.setPrintedSolutionLimit(2); analyzer.setSolutionLimit(1); analyzer.init(); analyzer.anal(); analyzer.setRandomising(false); analyzer.setSolutionLimit(2); createRestrictions(); return (analyzer.solutionCount > 0); } public boolean generateRandomStateWithUniqueSolution() { int i = 0; while(++i < 50) { boolean b = generateRandomState(); if(!b) return false; analyzer.setRandomising(false); analyzer.setSolutionLimit(2); analyzer.setPrintedSolutionLimit(0); restrictions.setRestrictions(max, hLines, vLines); analyzer.init(); analyzer.anal(); if(analyzer.solutionCount == 1) return true; if(debug) System.out.println("solutionCount > 1"); } return false; } private void createRestrictions() { int[] vs = new int[max]; for (int x = 0; x < width; x++) { for (int q = 0; q < max; q++) vs[q] = 0; for(int y = 0; y < height; y++) { int p = y * width + x; if(field.isInField(p) && field.getValue(p) >= 0) vs[field.getValue(p)]++; } vLines[x] = getLineRestrictions(vs); } for (int y = 0; y < height; y++) { for (int q = 0; q < max; q++) vs[q] = 0; for(int x = 0; x < width; x++) { int p = y * width + x; if(field.isInField(p) && field.getValue(p) >= 0) vs[field.getValue(p)]++; } hLines[y] = getLineRestrictions(vs); } hLinesCopy = (int[][])hLines.clone(); vLinesCopy = (int[][])vLines.clone(); } private int[] getLineRestrictions(int[] vs) { int c = 0; for (int q = 0; q < vs.length; q++) if(vs[q] > 0) ++c; int[] rs = new int[c]; c = 0; for (int q = 0; q < vs.length; q++) if(vs[q] > 0) { rs[c] = q; ++c; } return rs; } private void printRestrictions() { for (int x = 0; x < width; x++) { if(vLines[x].length == 0) continue; System.out.print("x= " + x + ": "); for (int i = 0; i < vLines[x].length; i++) System.out.print(" " + vLines[x][i]); System.out.println(""); } for (int y = 0; y < height; y++) { if(hLines[y].length == 0) continue; System.out.print("y= " + y + ": "); for (int i = 0; i < hLines[y].length; i++) System.out.print(" " + hLines[y][i]); System.out.println(""); } } public void restrict() { hLines = (int[][])hLinesCopy.clone(); vLines = (int[][])vLinesCopy.clone(); analyzer.setRandomising(false); analyzer.setSolutionLimit(2); analyzer.setPrintedSolutionLimit(0); attempts = new boolean[width + height]; int c = 0; for (int x = 0; x < width; x++) { attempts[x] = vLines[x].length > 0; if(attempts[x]) ++c; } for (int y = 0; y < height; y++) { attempts[width + y] = hLines[y].length > 0; if(attempts[width + y]) ++c; } while(c > 0) { int k = -1; do { k = (int)(attempts.length * Math.random()); } while(!attempts[k]); attempts[k] = false; if(k < width) { int x = k; int[] back = vLines[x]; vLines[x] = new int[]{}; restrictions.setRestrictions(max, hLines, vLines); analyzer.init(); analyzer.anal(); if(analyzer.solutionCount > 1) { vLines[x] = back; } else if(analyzer.solutionCount == 0) { throw new RuntimeException("Error on removing x=" + x); } } else { int y = k - width; int[] back = hLines[y]; hLines[y] = new int[]{}; restrictions.setRestrictions(max, hLines, vLines); analyzer.init(); analyzer.anal(); if(analyzer.solutionCount > 1) { hLines[y] = back; } else if(analyzer.solutionCount == 0) { throw new RuntimeException("Error on removing y=" + y); } } --c; } if(debug) { System.out.println("Restrictions:"); printRestrictions(); } restrictions.setRestrictions(max, hLines, vLines); analyzer.init(); analyzer.anal(); if(analyzer.solutionCount != 1) { throw new RuntimeException("Error in created problem: solutionCount=" + analyzer.solutionCount); } if(debug) System.out.println("treeSize=" + analyzer.treeSize); } public int[] getSolution() { return analyzer.getSolution(); } public int[][] getHRestrictions() { return (int[][])hLines.clone(); } public int[][] getVRestrictions() { return (int[][])vLines.clone(); } static int[] my_form = new int[] { 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 2, 3, 0, 1, 0, 0, 0, 0, 0, 1, 2, 0, 0, 2, 0, 0, 0, 0, 2, 1, 0, 0, 1, 2, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 0, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 2, 0, 1, 0, 0, 3, 3, 4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 4, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0 }; public static void main(String[] args) { LineRestrictedDominoGenerator runner = new LineRestrictedDominoGenerator(); runner.setData(6, 10, 11, my_form); if(!runner.generateRandomStateWithUniqueSolution()) { System.out.println("Cannot generate problem."); } else { runner.restrict(); } } }
[ "scabanovich@exadel.com" ]
scabanovich@exadel.com
8bc8ffab14c891e20195694a39deaf408c269462
cc5a7d0bfe6519e2d462de1ac9ef793fb610f2a7
/api1/src/main/java/com/heb/pm/productSearch/predicateBuilders/ImageChangeOnDatePredicateBuilder.java
132f324533f554b118acd3cd6e6bf21cd764e079
[]
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
6,657
java
/* * ImageChangeOnDatePredicateBuilder * * Copyright (c) 2019 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. */ package com.heb.pm.productSearch.predicateBuilders; import com.heb.pm.entity.*; import com.heb.pm.productSearch.CustomSearchEntry; import com.heb.pm.productSearch.ProductSearchCriteria; import org.springframework.stereotype.Service; import javax.persistence.criteria.*; import java.time.LocalDateTime; /** * Builds predicates to search product based on change on date of image. * * @author vn70529 * @version 2.39.0 */ @Service public class ImageChangeOnDatePredicateBuilder implements PredicateBuilder { private static final String UPC_PROPERTY_NAME = "upc"; /** * Builds a predicate to search for products based on change on date (aud_rec_cre8_ts) of image. * * @param criteriaBuilder Used to construct the various parts of the SQL statement. * @param pmRoot The root from clause of the main query (this will be used to grab the criteria to join the * sub-query to). * @param queryBuilder JPA query builder used to construct the sub-query. * @param productSearchCriteria The user's search criteria. * @param sessionIdBindVariable The bind variable to add that will constrain on the user's session in the temp table. * @return A sub-query that will return products based on item add date. */ @Override public ExistsClause<SellingUnit> buildPredicate(CriteriaBuilder criteriaBuilder, Root<? extends ProductMaster> pmRoot, CriteriaQuery<? extends ProductMaster> queryBuilder, ProductSearchCriteria productSearchCriteria, ParameterExpression<String> sessionIdBindVariable) { // See if there is an entry in the custom searches, then the app go to next step to check the image change on date is checked or not. if (productSearchCriteria.getCustomSearchEntries() == null) { return null; } CustomSearchEntry imageChangeOnDateEntry = null; for (CustomSearchEntry customSearchEntry : productSearchCriteria.getCustomSearchEntries()) { // Find custom search entry of image change on date. if (customSearchEntry.getType() == CustomSearchEntry.IMAGE_CHANGE_ON_DATE) { imageChangeOnDateEntry = customSearchEntry; break; } } // Check the image change on entry, if it is not exists, then stop searching it. if (imageChangeOnDateEntry == null || imageChangeOnDateEntry.getDateComparator() == null) { return null; } if (imageChangeOnDateEntry.getOperator() == CustomSearchEntry.BETWEEN) { // If search operator is between, then it needs to check the end date. If it is not exists, the stop search. if (imageChangeOnDateEntry.getEndDateComparator() == null) { return null; } } // We'll be adding a sub-query to prod_scn_codes Subquery<SellingUnit> sellingUnitSubQuery = queryBuilder.subquery(SellingUnit.class); Root<SellingUnit> sellingUnitRoot = sellingUnitSubQuery.from(SellingUnit.class); sellingUnitSubQuery.select(sellingUnitRoot.get(UPC_PROPERTY_NAME)); // Add a join between Selling Unit and the ProductScanImageURIAudit. ListJoin<SellingUnit, ProductScanImageURIAudit> joinProductScanImageURIAudit = sellingUnitRoot.join(SellingUnit_.productScanImageURIAudits); // Add a join from product_master to prod_scn_codes Predicate[] criteria = new Predicate[2]; criteria[0] = criteriaBuilder.equal(pmRoot.get(ProductMaster_.prodId), sellingUnitRoot.get(SellingUnit_.prodId)); // Add the constraint for change on date switch (imageChangeOnDateEntry.getOperator()) { case CustomSearchEntry.EQUAL: // Since we can't programmatically remove the time part of the date, use a between with the // requested date and that date + 1 criteria[1] = criteriaBuilder.between( joinProductScanImageURIAudit.get(ProductScanImageURIAudit_.key).get(ProductScanImageURIAuditKey_.changedOn), imageChangeOnDateEntry.getDateComparator().atStartOfDay(), imageChangeOnDateEntry.getDateComparator().plusDays(1).atStartOfDay()); break; case CustomSearchEntry.GREATER_THAN: // greater than or equal to the beginning of the day that the user was selected. criteria[1] = criteriaBuilder.greaterThanOrEqualTo( joinProductScanImageURIAudit.get(ProductScanImageURIAudit_.key).get(ProductScanImageURIAuditKey_.changedOn), imageChangeOnDateEntry.getDateComparator().atStartOfDay()); break; case CustomSearchEntry.LESS_THAN: // Less than or equal to the end of selected day that user was selected. criteria[1] = criteriaBuilder.lessThan( joinProductScanImageURIAudit.get(ProductScanImageURIAudit_.key).get(ProductScanImageURIAuditKey_.changedOn), imageChangeOnDateEntry.getDateComparator().plusDays(1).atStartOfDay()); break; case CustomSearchEntry.ONE_WEEK: // Greater than one week ago. LocalDateTime today = LocalDateTime.now(); LocalDateTime oneWeekAgo = today.minusDays(7); criteria[1] = criteriaBuilder.greaterThanOrEqualTo( joinProductScanImageURIAudit.get(ProductScanImageURIAudit_.key).get(ProductScanImageURIAuditKey_.changedOn), oneWeekAgo); break; case CustomSearchEntry.BETWEEN: // Have to look at the beginning of the start and the end of the day that the user was selected. criteria[1] = criteriaBuilder.between( joinProductScanImageURIAudit.get(ProductScanImageURIAudit_.key).get(ProductScanImageURIAuditKey_.changedOn), imageChangeOnDateEntry.getDateComparator().atStartOfDay(), imageChangeOnDateEntry.getEndDateComparator().plusDays(1).atStartOfDay()); } sellingUnitSubQuery.where(criteria); return new ExistsClause<>(sellingUnitSubQuery); } }
[ "tran.than@heb.com" ]
tran.than@heb.com
c3a174aa3a5dbcd2f55082f255c49b7726880389
7dc6bf17c5acc4a5755063a3ffc0c86f4b6ad8c3
/java_decompiled_from_smali/org/andengine/b/d.java
65415e88b6fd927276c8f08ab61a16d0e7d63e64
[]
no_license
alecsandrudaj/mobileapp
183dd6dc5c2fe8ab3aa1f21495d4221e6f304965
b1b4ad337ec36ffb125df8aa1d04c759c33c418a
refs/heads/master
2023-02-19T18:07:50.922596
2021-01-07T15:30:44
2021-01-07T15:30:44
300,325,195
0
0
null
2020-11-19T13:26:25
2020-10-01T15:18:57
Smali
UTF-8
Java
false
false
862
java
package org.andengine.b; import android.os.Process; import org.andengine.b.b.a.a; public class d extends Thread { private a a; private final a b = new a(); public d() { super(d.class.getSimpleName()); } public void a(a aVar) { this.a = aVar; } public void run() { Process.setThreadPriority(this.a.d().l()); while (true) { try { this.b.a_(0.0f); this.a.m(); } catch (InterruptedException e) { org.andengine.d.e.a.a(new StringBuilder(String.valueOf(getClass().getSimpleName())).append(" interrupted. Don't worry - this ").append(e.getClass().getSimpleName()).append(" is most likely expected!").toString(), e); interrupt(); return; } } } }
[ "rgosa@bitdefender.com" ]
rgosa@bitdefender.com
d02a389221d857e97945a648bb11f827d07cb3cf
fd3521a6e9387c6d8ba91ceac6718f3a90c48c12
/ga4gh-common/src/main/java/org/irods/jargon/ga4gh/dos/exception/DosSystemException.java
3dfc92fccd5fe2fb9d81fddde88e4d64963df0a2
[ "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
michael-conway/irods-ga4gh-dos
7a03ace8e5486df2bc1e1344344cf62c963f308a
e554c6fa71d4c0e80256e1818acd4e195688ac2b
refs/heads/master
2023-04-02T10:17:21.954045
2023-03-22T15:32:27
2023-03-22T15:32:27
120,527,215
1
3
NOASSERTION
2023-03-22T15:32:28
2018-02-06T21:46:53
Java
UTF-8
Java
false
false
662
java
/** * */ package org.irods.jargon.ga4gh.dos.exception; /** * Reflects an unchecked exception arising from the low level jargon/irods layer * * @author Mike Conway - NIEHS * */ public class DosSystemException extends DosRuntimeException { /** * */ private static final long serialVersionUID = -4783721633950493596L; /** * @param message */ public DosSystemException(String message) { super(message); } /** * @param cause */ public DosSystemException(Throwable cause) { super(cause); } /** * @param message * @param cause */ public DosSystemException(String message, Throwable cause) { super(message, cause); } }
[ "mike.conway@nih.gov" ]
mike.conway@nih.gov
e5d49e86c3eaa443e30e1a536e6e8dc5974b5337
21b81feb64dd10b30500dd46e96a92ec2848a154
/O4TBSS/populatingO4TSS/src/main/java/test/TestHelper.java
e34543a6f0617c22567f02ca9412f5bc6f934a8c
[ "Apache-2.0" ]
permissive
jiofidelus/ontologies
ecb88a6feed10148da5489b60f29facabfe2a1ab
49025bdfb112d20e00a6beb4533d52208141550f
refs/heads/master
2021-08-07T04:07:29.939723
2019-10-28T11:20:18
2019-10-28T11:20:18
170,926,473
1
0
null
null
null
null
UTF-8
Java
false
false
1,472
java
package test; import addIndividuals.IndividualHelper; import helper.Helper; public class TestHelper { // public static final String ONTOLOGYPATH = "/home/azanzi/workspace/" // + "ontologies/O4TBSS/O4TBSS_enriched.owl"; public static final String ONTOLOGYPATH = "/home/azanzi/workspace/" + "ontologies/O4TBSS/O4TBSS_enriched_Code.owl"; //For the demo // public static final String ONTOLOGYPATH = "/home/azanzi/workspace/" // + "ontologies/O4TBSS/populationDemo.owl"; public static void main(String[] args) { System.out.println("Hello boy"); String patientIndividual=""; // patientIndividual+= // IndividualHelper.genIndividual("http://presence-ontology.org/ontology/OutPatient", "Patient"+5); // patientIndividual+= // IndividualHelper.genIndividual("http://presence-ontology.org/ontology/OutPatient", "Patient"+6); // // for (int i = 5; i < 50; i++) { // patientIndividual+= // IndividualHelper.genIndividual("http://presence-ontology.org/ontology/OutPatient", "PAT"+i); // } patientIndividual+= IndividualHelper.genDataPropertyAssertion("hasAge", "PAT10", "integer", "18"); patientIndividual+= IndividualHelper.genDataPropertyAssertion("hasQuater", "PAT10", "string", "Nkolmesseng"); patientIndividual+= IndividualHelper.genObjectPropertyAssertion("hasGender", "PAT10", "0"); System.out.println(patientIndividual); Helper.writeOntoToFile(ONTOLOGYPATH, patientIndividual); } }
[ "jiofidelus@gmail.com" ]
jiofidelus@gmail.com
dd6859f6066b0d89e1cfce7901f0bee4b039972b
7e0f37e53dc1c80b05b2b879d15c4f6029be547b
/VideoPlayModule/src/main/java/chuangyuan/ycj/videolibrary/factory/CacheDataSourceFactory.java
ce14e320d187836bb73225718acbe9bc56fc6819
[ "Apache-2.0" ]
permissive
niemj6012/yjPlay
5a49fd70ee06d46caeb980b9843c75bd2ac6d618
50a126daf4577b0a649d24649f71626c1f7f17dc
refs/heads/master
2021-07-18T13:28:50.854741
2017-10-24T04:00:17
2017-10-24T04:00:17
108,088,576
1
0
null
2017-10-24T06:54:21
2017-10-24T06:54:21
null
UTF-8
Java
false
false
3,370
java
package chuangyuan.ycj.videolibrary.factory; import android.content.Context; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory; import com.google.android.exoplayer2.upstream.FileDataSource; import com.google.android.exoplayer2.upstream.cache.CacheDataSink; import com.google.android.exoplayer2.upstream.cache.CacheDataSource; import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor; import com.google.android.exoplayer2.upstream.cache.SimpleCache; import com.google.android.exoplayer2.util.Util; import java.io.File; /** * Created by yangc on 2017/8/25. * E-Mail:yangchaojiang@outlook.com * Deprecated: 数据缓存工厂类 */ public class CacheDataSourceFactory implements DataSource.Factory { private final Context context; private final DefaultDataSourceFactory defaultDatasourceFactory; private final long maxFileSize, maxCacheSize; private String cachePath;//缓存路径 /*** * @param context 上下文 * @param maxCacheSize 缓存大小 * @param maxFileSize 最大文件大小 ***/ public CacheDataSourceFactory(Context context, long maxCacheSize, long maxFileSize) { super(); this.context = context; this.maxCacheSize = maxCacheSize; this.maxFileSize = maxFileSize; String userAgent = Util.getUserAgent(context, context.getPackageName()); DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); defaultDatasourceFactory = new DefaultDataSourceFactory(this.context, bandwidthMeter, new DefaultDataSourceFactory(context,userAgent)); } /*** * @param context 上下文 * @param maxCacheSize 缓存大小 * @param maxFileSize 最大文件大小 * @param cachePath 注意sd设置权限 设置视频缓存路径 ***/ public CacheDataSourceFactory(Context context, long maxCacheSize, long maxFileSize,String cachePath) { super(); this.context = context; this.cachePath=cachePath; this.maxCacheSize = maxCacheSize; this.maxFileSize = maxFileSize; String userAgent = Util.getUserAgent(context, context.getPackageName()); DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); defaultDatasourceFactory = new DefaultDataSourceFactory(this.context, bandwidthMeter, new DefaultHttpDataSourceFactory(userAgent, bandwidthMeter)); } @Override public DataSource createDataSource() { LeastRecentlyUsedCacheEvictor evictor = new LeastRecentlyUsedCacheEvictor(maxCacheSize); SimpleCache simpleCache; if (cachePath==null){ simpleCache = new SimpleCache(new File(context.getExternalCacheDir(), "media1"), evictor); }else { simpleCache = new SimpleCache(new File(cachePath), evictor); } return new CacheDataSource(simpleCache, defaultDatasourceFactory.createDataSource(), new FileDataSource(), new CacheDataSink(simpleCache, maxFileSize), CacheDataSource.FLAG_BLOCK_ON_CACHE | CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR, null); } }
[ "www.1007181167@qq.com" ]
www.1007181167@qq.com
32cd24eab4130fb9c9783c6a506eaa3d0cc78403
30aa9ece1641c50bdb1742e6430d3a0de4c5a4e6
/designPattern/src/main/java/org/jackalope/study/designPattern/visitor/Flower.java
6ca6981a4f8b451d580546642577a106fb891902
[]
no_license
hedgehog-zowie/jackalope
ffe1a5bd3109f35d2a80a3e709c7b76a584c8b53
aef5449fcbdaf64513d055279ba2fbf7110849fd
refs/heads/master
2021-01-17T09:12:34.302269
2016-04-01T10:18:10
2016-04-01T10:18:10
21,295,813
0
0
null
null
null
null
UTF-8
Java
false
false
177
java
package org.jackalope.study.designPattern.visitor; /** * @author zowie * Email: nicholas@iuni.com */ public interface Flower { void accept(Visitor visitor); }
[ "hedgehog.zowie@gmail.com" ]
hedgehog.zowie@gmail.com
c34dd7dc43576103b68c493feb8b3b2daf5feed9
b4b993f8d9dea961a20b99d75b8d9a3d1731da5e
/chess/src/test/java/ru/job4j/chess/LogicTest.java
03d4bcc96efb04679930f15c56c9e54c7787804b
[ "Apache-2.0" ]
permissive
daniZarkh/games_oop_javafx_stas
474146f46437a3a91f915df76293e2b344478710
0fcd5f6973c9d541eab471f61505c9cb40d5c04f
refs/heads/master
2023-03-16T18:27:39.037983
2019-12-18T18:51:09
2019-12-18T18:51:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,055
java
package ru.job4j.chess; import org.junit.Assert; import org.junit.Test; import ru.job4j.chess.firuges.Cell; import ru.job4j.chess.firuges.black.BishopBlack; import static org.hamcrest.core.Is.is; public class LogicTest { @Test public void whenWayHasNotOtherFigure() { Logic logic = new Logic(); logic.add(new BishopBlack(Cell.C1)); boolean result = logic.move(Cell.C1, Cell.G5); Assert.assertThat(result, is(true)); } @Test public void whenWayHaveOtherFigure() { Logic logic = new Logic(); logic.add(new BishopBlack(Cell.H2)); logic.add(new BishopBlack(Cell.D6)); boolean result = logic.move(Cell.H2, Cell.B8); Assert.assertThat(result, is(false)); } @Test public void whenWayHaveOtherFigureEndWayOtherFigure() { Logic logic = new Logic(); logic.add(new BishopBlack(Cell.H2)); logic.add(new BishopBlack(Cell.D6)); boolean result = logic.move(Cell.H2, Cell.D6); Assert.assertThat(result, is(false)); } }
[ "stas.korobeinikov@mail.ru" ]
stas.korobeinikov@mail.ru
bb5a98fb166976f4eb2e68d1b470ec48ea62f673
5e7608123a22cecef836ec02fbe48f93aa03190a
/Java-Concurrent-Programming-Beauty/src/main/java/com/beauty/thread/chapter6/NonReentrantLock.java
e9449a6c764839cc5b0e5e524d959aa4d200b2ec
[ "Apache-2.0" ]
permissive
liiibpm/Java_Multi_Thread
a01e2ba428d4cc9277357232ef37d4b770fddd6a
39200a1096475557c749db68993e3a3ccc0547b5
refs/heads/master
2023-03-26T16:16:29.039854
2020-12-01T12:22:23
2020-12-01T12:22:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,991
java
package com.beauty.thread.chapter6; import java.io.Serializable; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.AbstractQueuedSynchronizer; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; /** * @author dongzonglei * @description * @date 2019-03-19 09:57 */ public class NonReentrantLock implements Lock, Serializable { private static class Sync extends AbstractQueuedSynchronizer { @Override protected boolean isHeldExclusively() { return getState() == 1; } @Override protected boolean tryAcquire(int arg) { assert arg == 1; if (compareAndSetState(0, 1)) { setExclusiveOwnerThread(Thread.currentThread()); return true; } return false; } @Override protected boolean tryRelease(int arg) { assert arg == 1; if (getState() == 0) { throw new IllegalMonitorStateException(); } setExclusiveOwnerThread(null); setState(0); return true; } Condition newCondition() { return new ConditionObject(); } } private final Sync sync = new Sync(); @Override public void lock() { sync.acquire(1); } @Override public void lockInterruptibly() throws InterruptedException { sync.acquireInterruptibly(1); } @Override public boolean tryLock() { return sync.tryAcquire(1); } @Override public boolean tryLock(long time, TimeUnit unit) throws InterruptedException { return sync.tryAcquireNanos(1, unit.toNanos(time)); } @Override public void unlock() { sync.release(1); } @Override public Condition newCondition() { return sync.newCondition(); } public boolean isLocked() { return sync.isHeldExclusively(); } }
[ "dzllikelsw@163.com" ]
dzllikelsw@163.com
2f27f0e032efeffa0a8e3e492cafa4e9a02be8c7
418064b46ca9837bf525b0a7b330e74791ffd986
/jdroid-android-firebase-database/src/main/java/com/jdroid/android/firebase/database/FirebaseDatabaseValueEventListener.java
731b30e73e5dc455b12c75556f7c72dbb5704995
[ "Apache-2.0" ]
permissive
vaginessa/jdroid
266c40687f82b8a26dc0de0ddb670150519b7e85
9841989dc0834c10d8df044f808b2d25d966aad0
refs/heads/master
2021-05-11T03:09:28.490500
2018-01-17T01:05:09
2018-01-17T01:05:09
117,907,641
0
0
Apache-2.0
2019-01-18T10:12:45
2018-01-18T00:02:04
Java
UTF-8
Java
false
false
1,043
java
package com.jdroid.android.firebase.database; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.ValueEventListener; import com.jdroid.java.exception.UnexpectedException; public class FirebaseDatabaseValueEventListener implements ValueEventListener { private FirebaseDatabaseCountDownLatch done = new FirebaseDatabaseCountDownLatch(); @Override public void onDataChange(DataSnapshot snapshot) { done.setDataSnapshot(snapshot); done.countDown(); } @Override public void onCancelled(DatabaseError databaseError) { done.setFirebaseDatabaseException(new FirebaseDatabaseException(databaseError)); done.countDown(); } public void waitOperation() { try { done.await(); if (done.getFirebaseDatabaseException() != null) { throw done.getFirebaseDatabaseException(); } } catch (InterruptedException e) { throw new UnexpectedException(e); } } public DataSnapshot getDataSnapshot() { return done.getDataSnapshot(); } }
[ "maxirosson@gmail.com" ]
maxirosson@gmail.com
3b15235e4c683ed52adb69cd640b2a674ea2937a
5e34c548f8bbf67f0eb1325b6c41d0f96dd02003
/dataset/digits_c9d718f3_001/mutations/32/digits_c9d718f3_001.java
92174e4d915e9b4fd00bf6bc4d1067730fc55da9
[]
no_license
mou23/ComFix
380cd09d9d7e8ec9b15fd826709bfd0e78f02abc
ba9de0b6d5ea816eae070a9549912798031b137f
refs/heads/master
2021-07-09T15:13:06.224031
2020-03-10T18:22:56
2020-03-10T18:22:56
196,382,660
1
1
null
2020-10-13T20:15:55
2019-07-11T11:37:17
Java
UTF-8
Java
false
false
2,342
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_c9d718f3_001 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_c9d718f3_001 mainClass = new digits_c9d718f3_001 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj value = new IntObj (), digit = new IntObj (); output += (String.format ("\nEnter an integer > ")); value.value = scanner.nextInt (); output += (String.format ("\n")); if (value.value > 0) { while (value.value != 0) { digit.value = value; value.value = value.value / 10; output += (String.format ("%d\n", digit.value)); } } if (value.value < 0) { value.value = Math.abs (value.value); while (value.value > 10) { digit.value = value.value % 10; value.value = value.value / 10; output += (String.format ("%d\n", digit.value)); } digit.value = value.value % 10; output += (String.format ("-%d\n", digit.value)); } if (value.value == 0) { digit.value = value.value; output += (String.format ("%d\n", digit.value)); } output += (String.format ("That's all, have a nice day!\n")); if (true) return;; } }
[ "bsse0731@iit.du.ac.bd" ]
bsse0731@iit.du.ac.bd
eb785e38598634d59a7fe66278f08201491d5c47
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/google/android/m4b/maps/ci/C6646j.java
3a31ab66a1d41fe2aadc84cb7b1d6e9616731683
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
3,514
java
package com.google.android.m4b.maps.ci; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Paint.Style; import android.graphics.Path; import android.graphics.Path.FillType; import android.graphics.Point; import com.google.android.m4b.maps.aa.ae; import com.google.android.m4b.maps.cg.bg; import com.google.android.m4b.maps.cg.bg.C5148a; import com.google.android.m4b.maps.model.LatLng; import java.util.Iterator; import java.util.List; /* renamed from: com.google.android.m4b.maps.ci.j */ public final class C6646j implements C5148a, C5212l { /* renamed from: a */ private final bg f24914a; /* renamed from: b */ private final boolean f24915b; /* renamed from: c */ private C6645h f24916c; /* renamed from: d */ private Paint f24917d = new Paint(); public C6646j(bg bgVar, boolean z, C6645h c6645h) { this.f24914a = bgVar; this.f24916c = c6645h; this.f24915b = z; this.f24916c.m29650a((C5212l) this); } /* renamed from: a */ public final void mo4985a(int i) { this.f24916c.m29646a(); } /* renamed from: a */ public final void mo4984a() { this.f24916c.m29656b((C5212l) this); } /* renamed from: a */ private static void m29662a(Path path, List<LatLng> list, C6647k c6647k) { float b = (float) c6647k.m29672b(); int ceil = (int) Math.ceil((double) ((((float) c6647k.f24923f) - b) / (b * 2.0f))); for (int i = -ceil; i <= ceil; i++) { Point a = c6647k.mo4986a((LatLng) list.get(0)); path.moveTo(((float) a.x) + (((float) i) * b), (float) a.y); int i2 = 1; Point point = a; int i3 = 0; while (i2 < list.size()) { Point a2 = c6647k.mo4986a((LatLng) list.get(i2)); if (((float) (a2.x - point.x)) > b / 2.0f) { i3--; } else if (((float) (a2.x - point.x)) < (-b) / 2.0f) { i3++; } path.lineTo(((float) a2.x) + (((float) (i + i3)) * b), (float) a2.y); i2++; point = a2; } if (((float) a.x) == ((float) point.x) + (((float) i3) * b) && a.y == point.y) { path.close(); } } } /* renamed from: a */ public final void mo5367a(Canvas canvas, C6647k c6647k) { if (this.f24914a.mo7187h()) { Path path = new Path(); C6646j.m29662a(path, this.f24914a.mo7181b(), c6647k); Iterator a = this.f24914a.mo7182c().mo4785a(); while (a.hasNext()) { C6646j.m29662a(path, (ae) a.next(), c6647k); } this.f24917d.setAntiAlias(true); path.setFillType(FillType.EVEN_ODD); if (!(this.f24915b == null || this.f24914a.mo7184e() == null)) { this.f24917d.setColor(this.f24914a.mo7184e()); this.f24917d.setStyle(Style.FILL); canvas.drawPath(path, this.f24917d); } if (this.f24914a.mo7183d() != null) { this.f24917d.setColor(this.f24914a.mo7183d()); this.f24917d.setStrokeWidth(this.f24914a.mo7185f()); this.f24917d.setStyle(Style.STROKE); canvas.drawPath(path, this.f24917d); } } } /* renamed from: b */ public final float mo5368b() { return this.f24914a.mo7186g(); } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
1b7865c3e1d4b0661e738578b0460f0e94883a52
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project92/src/main/java/org/gradle/test/performance92_5/Production92_487.java
0b948eb6e216d051211073b413f0d585996cf8da
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance92_5; public class Production92_487 extends org.gradle.test.performance17_5.Production17_487 { private final String property; public Production92_487() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
57b9348ac33f45081b4c6501b4931d41927abf96
e108d65747c07078ae7be6dcd6369ac359d098d7
/org/apache/poi/sl/usermodel/TextShape.java
7cafa0aa4bdd3dde728fc16485f1f6484fc672fb
[ "MIT" ]
permissive
kelu124/pyS3
50f30b51483bf8f9581427d2a424e239cfce5604
86eb139d971921418d6a62af79f2868f9c7704d5
refs/heads/master
2020-03-13T01:51:42.054846
2018-04-24T21:03:03
2018-04-24T21:03:03
130,913,008
1
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package org.apache.poi.sl.usermodel; import java.util.List; public interface TextShape<S extends Shape<S, P>, P extends TextParagraph<S, P, ?>> extends SimpleShape<S, P>, Iterable<P> { public enum TextAutofit { NONE, NORMAL, SHAPE } public enum TextDirection { HORIZONTAL, VERTICAL, VERTICAL_270, STACKED } public enum TextPlaceholder { TITLE, BODY, CENTER_TITLE, CENTER_BODY, HALF_BODY, QUARTER_BODY, NOTES, OTHER } TextRun appendText(String str, boolean z); Insets2D getInsets(); String getText(); TextDirection getTextDirection(); double getTextHeight(); List<? extends TextParagraph<S, P, ?>> getTextParagraphs(); TextPlaceholder getTextPlaceholder(); Double getTextRotation(); VerticalAlignment getVerticalAlignment(); boolean getWordWrap(); boolean isHorizontalCentered(); void setHorizontalCentered(Boolean bool); void setInsets(Insets2D insets2D); TextRun setText(String str); void setTextDirection(TextDirection textDirection); void setTextPlaceholder(TextPlaceholder textPlaceholder); void setTextRotation(Double d); void setVerticalAlignment(VerticalAlignment verticalAlignment); void setWordWrap(boolean z); }
[ "kelu124@gmail.com" ]
kelu124@gmail.com
ddeb9906b874fde898b3b44e601b35b4e9d99361
bc089babe20ed8a53ec112042705d4a358713506
/src/main/java/com/royken/restapi/dao/IGenericDao.java
7f67dd1d4b4bc7588863bcf9fca006102b47327b
[ "Apache-2.0" ]
permissive
Roykens/restApi
aa08a38465903e784a159a844fcf73f71ff4cadf
d1dcd7948cfab8552a3c242340447e50cfeea9a1
refs/heads/master
2021-08-31T13:53:12.999522
2017-12-21T15:33:33
2017-12-21T15:33:33
115,019,394
0
0
null
null
null
null
UTF-8
Java
false
false
389
java
/** * */ package com.royken.restapi.dao; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.NoRepositoryBean; import com.royken.restapi.data.entities.BaseClass; /** * @author Kenfack Valmy-Roi <roykenvalmy@gmail.com> * */ @NoRepositoryBean public interface IGenericDao<T extends BaseClass> extends JpaRepository<T, Long> { }
[ "roykenvalmy@gmail.com" ]
roykenvalmy@gmail.com