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
6e11d606cf5226af25368cd45b6945ec959d5a03
02c4c887bc30dcb1b51f833b1474f641199c3ab2
/src/main/java/com/ssi/InterestModel.java
a9370437845ca5e8fc6f61fd722e2801a5ba306f
[]
no_license
ssiedu/spring-web-si-pro3
776c0539bb037db324fddc55dfa016d76fbc13aa
9ce98da20907c7a47a9e4270a1436d188ea30ab0
refs/heads/master
2022-12-22T03:36:41.112451
2019-06-13T10:08:10
2019-06-13T10:08:10
191,344,805
1
0
null
2022-12-15T23:24:33
2019-06-11T10:03:22
Java
UTF-8
Java
false
false
628
java
package com.ssi; public class InterestModel { private int amount; private int time; private int interest; public int getAmount() { return amount; } public void setAmount(int amount) { this.amount = amount; } public int getTime() { return time; } public void setTime(int time) { this.time = time; } public int getInterest() { return interest; } public void setInterest(int interest) { this.interest = interest; } @Override public String toString() { return "InterestModel [amount=" + amount + ", time=" + time + ", interest=" + interest + "]"; } }
[ "manoj.sarwate@ssiedu.in" ]
manoj.sarwate@ssiedu.in
fc7a90db7d555fa08d2bbf56e2a0fbc0153e5972
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v2-release_source_from_JADX/sources/kotlin/InitializedLazyImpl.java
a71c23f9976ace314fc83fc31ab2e19d98c0f2ae
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
1,361
java
package kotlin; import java.io.Serializable; @Metadata(mo40251bv = {1, 0, 3}, mo40252d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0000\u0018\u0000*\u0006\b\u0000\u0010\u0001 \u00012\b\u0012\u0004\u0012\u0002H\u00010\u00022\u00060\u0003j\u0002`\u0004B\r\u0012\u0006\u0010\u0005\u001a\u00028\u0000¢\u0006\u0002\u0010\u0006J\b\u0010\n\u001a\u00020\u000bH\u0016J\b\u0010\f\u001a\u00020\rH\u0016R\u0016\u0010\u0005\u001a\u00028\u0000X–\u0004¢\u0006\n\n\u0002\u0010\t\u001a\u0004\b\u0007\u0010\b¨\u0006\u000e"}, mo40253d2 = {"Lkotlin/InitializedLazyImpl;", "T", "Lkotlin/Lazy;", "Ljava/io/Serializable;", "Lkotlin/io/Serializable;", "value", "(Ljava/lang/Object;)V", "getValue", "()Ljava/lang/Object;", "Ljava/lang/Object;", "isInitialized", "", "toString", "", "kotlin-stdlib"}, mo40254k = 1, mo40255mv = {1, 4, 1}) /* compiled from: Lazy.kt */ public final class InitializedLazyImpl<T> implements Lazy<T>, Serializable { private final T value; public boolean isInitialized() { return true; } public InitializedLazyImpl(T t) { this.value = t; } public T getValue() { return this.value; } public String toString() { return String.valueOf(getValue()); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
df2df06b654d2113d8f942e7424142fc447ed0e2
a68ec3961af34a386f2c6241328a303ca1eae3db
/src/main/java/Point.java
e96185043851c961545fb860249dab6fd23b67d0
[]
no_license
cicean/leetcode-java
678406dd6925a0230e541bd3f99b94176b501e8a
fbfe14e7a8f8e56902ee15520c98873adcf1a322
refs/heads/master
2021-07-07T02:15:13.181626
2020-04-06T23:48:38
2020-04-06T23:48:38
66,965,377
4
1
null
2020-04-06T23:48:39
2016-08-30T18:06:52
Java
UTF-8
Java
false
false
190
java
public class Point { int x, y, val; Point() { x = 0; y = 0; } Point(int a, int b) { x = a; y = b; } Point(int a, int b, int val) {this.x = a; this.y = b; this.val = val;} }
[ "miao.wang@wolterskluwer.com" ]
miao.wang@wolterskluwer.com
b7ad887c181f2abe817c8d1e1dd1e6661f0430b8
069db98b04c2c2b306ca6d0911ecfaa9d3484291
/BS-PHIS2.322/src/main/java/phis/prints/bean/DynamicPrint_BySZ.java
8facae56001af7ace2e24e28a5e690186a5820d3
[]
no_license
zhouhui521/his
59270696d3667c8c6eb8f7104af0a9501a90942a
8d26b62e73d6ec95111eff66ab9d7aee61674f73
refs/heads/master
2023-02-03T16:20:57.561243
2020-12-24T06:33:46
2020-12-24T06:33:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,327
java
package phis.prints.bean; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; import org.hibernate.Session; import org.hibernate.transform.Transformers; import ctd.print.DynamicPrint; public abstract class DynamicPrint_BySZ extends DynamicPrint { /** * 得到项目归并规则 * * @author gaof * @param uid * @param ss * @return */ @SuppressWarnings("unchecked") public List<Map<String, Object>> getListXmgb(int bbbh, String uid, Session ss) { StringBuffer sql_xmgb = new StringBuffer(); sql_xmgb.append( "select GY_XMGB.Sfxm,GY_XMGB.GBXM,GY_XMGB.Xmmc,GY_XMGB.Sxh from GY_XMGB" + " where GY_XMGB.Bbbh = ").append(bbbh) .append(" and GY_XMGB.JGID = ").append(uid); List<Map<String, Object>> list_xmgb = ss .createSQLQuery(sql_xmgb.toString()) .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list(); // 如果没有对应的,则使用默认规则 if (list_xmgb.size() == 0 || list_xmgb == null) { StringBuffer sql_xmgb_default = new StringBuffer(); sql_xmgb_default .append("SELECT SFXM,SFXM AS GBXM, SFMC AS XMMC FROM GY_SFXM order by length(PLSX),PLSX"); List<Map<String, Object>> list_xmgb_default = ss .createSQLQuery(sql_xmgb_default.toString()) .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP) .list(); return list_xmgb_default; } return list_xmgb; } /** * 得到报表列集合 * * @author gaof * @param uid * @param ss * @return */ @SuppressWarnings("unchecked") public List<Map<String, Object>> getListColumn(int bbbh, String uid, Session ss, List<Map<String, Object>> list_xmgb) { StringBuffer sql_column = new StringBuffer(); sql_column .append("select GY_XMGB.GBXM,GY_XMGB.SXH from GY_XMGB" + " where GY_XMGB.Bbbh = ").append(bbbh) .append(" and GY_XMGB.JGID = ").append(uid) .append(" group by GY_XMGB.GBXM,GY_XMGB.SXH order by SXH"); List<Map<String, Object>> list_column = ss .createSQLQuery(sql_column.toString()) .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list(); // 如果没有对应的,则使用默认规则 if (list_column.size() == 0 || list_column == null) { StringBuffer sql_column_default = new StringBuffer(); sql_column_default .append("SELECT SFXM AS GBXM, SFMC AS XMMC FROM GY_SFXM order by length(PLSX),PLSX"); List<Map<String, Object>> list_column_default = ss .createSQLQuery(sql_column_default.toString()) .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP) .list(); return list_column_default; } // 把收费项目和归并名称的关系存到一个map中 Map<BigDecimal, String> map_xmgb_relation = new HashMap<BigDecimal, String>(); for (Map<String, Object> m_xmgb : list_xmgb) { map_xmgb_relation.put((BigDecimal) m_xmgb.get("SFXM"), (String) m_xmgb.get("XMMC")); } // 找到对应的在报表显示的项目名称 for (Map<String, Object> m_column : list_column) { String xmmc = map_xmgb_relation.get(m_column.get("GBXM")); m_column.put("XMMC", xmmc); } return list_column; } /** * 对象转换成double数据 * @param object * @return */ public double Object2Double(Object object){ if(object == null){ return 0; }else{ return Double.parseDouble(object + ""); } } }
[ "renw1@bsoft.com.cn" ]
renw1@bsoft.com.cn
2aeb8cbec5d0c4be8564f7635171565ec9ce5c52
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project34/src/main/java/org/gradle/test/performance34_4/Production34_385.java
a42e086bdfc8d91bc0a7fc9a811950efcdeda906
[]
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.performance34_4; public class Production34_385 extends org.gradle.test.performance12_4.Production12_385 { private final String property; public Production34_385() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
69d3b33a38a619024223b8aa4e36823295f1dd65
b1c43a10dde95741aef29f62dcc6637e12ba48db
/Frameworks/Hibernate/Quick start/src/main/java/ru/javastudy/hibernate/dao/ContactHobbyDetailEntity.java
7aaa1949c42ba02d515805c03ed876afd7b931a1
[]
no_license
KonecKonca/javaProjects
d29701bfd5b5487e193a7c2542b9c47a06a2219f
2a57cfc4f8142b6dd44ccd591c4b45cbf54103a9
refs/heads/master
2020-03-30T06:57:31.378408
2019-02-08T20:45:27
2019-02-08T20:46:08
150,903,011
0
1
null
null
null
null
UTF-8
Java
false
false
1,766
java
package ru.javastudy.hibernate.dao; import javax.persistence.*; /** * Created by Nick on 05.09.2015. */ @Entity @Table(name = "contact_hobby_detail", schema = "", catalog = "javastudy") @IdClass(ContactHobbyDetailEntityPK.class) public class ContactHobbyDetailEntity { private int contactId; private String hobbyId; private HobbyEntity hobbyByHobbyId; @Id @Column(name = "contact_id", nullable = false, insertable = true, updatable = true) public int getContactId() { return contactId; } public void setContactId(int contactId) { this.contactId = contactId; } @Id @Column(name = "hobby_id", nullable = false, insertable = true, updatable = true, length = 20) public String getHobbyId() { return hobbyId; } public void setHobbyId(String hobbyId) { this.hobbyId = hobbyId; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ContactHobbyDetailEntity that = (ContactHobbyDetailEntity) o; if (contactId != that.contactId) return false; if (hobbyId != null ? !hobbyId.equals(that.hobbyId) : that.hobbyId != null) return false; return true; } @Override public int hashCode() { int result = contactId; result = 31 * result + (hobbyId != null ? hobbyId.hashCode() : 0); return result; } @ManyToOne @JoinColumn(name = "hobby_id", referencedColumnName = "hobby_id", nullable = false) public HobbyEntity getHobbyByHobbyId() { return hobbyByHobbyId; } public void setHobbyByHobbyId(HobbyEntity hobbyByHobbyId) { this.hobbyByHobbyId = hobbyByHobbyId; } }
[ "andrei.kozitsky@mail.ru" ]
andrei.kozitsky@mail.ru
029fe1353131baad2c077e7349d25a9b8a4b18d9
2221cc76af6d26b9dcc49c0722a4a577601692e3
/Egbert/AlgorithmTesting/src/Facebook/StoreNumberOfNodesInLeftSubtree.java
7506aab6b010eb13793a1f4a249b2b8c0042b866
[]
no_license
hanrick2000/A-Record-of-My-Problem-Solving-Journey
f8cca769ce08f0b1cd9ab36abcb4f7c8b91ba591
1b9326adcf61eacf0649bc4724b11d8259a79621
refs/heads/master
2022-02-24T03:09:54.644809
2019-09-24T18:32:53
2019-09-24T18:32:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package Facebook; /** * @licode https://app.laicode.io/app/problem/646 * @Time N = num of nodes * @Space Height */ public class StoreNumberOfNodesInLeftSubtree { public void numNodesLeft(TreeNodeLeft root) { getNumOfLeft(root); } private int getNumOfLeft(TreeNodeLeft root) { if (root == null) { return 0; } int leftNum = getNumOfLeft(root.left); int rightNum = getNumOfLeft(root.right); root.numNodesLeft = leftNum; return leftNum + rightNum + 1; } }
[ "egbert1121@gmail.com" ]
egbert1121@gmail.com
05b3a55ec85dda0b664fe84366f8b64e50d4518c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/35/35_ca0182c5c9338b0848af2e4b2fb1a44c6dcc743d/FileAttachment/35_ca0182c5c9338b0848af2e4b2fb1a44c6dcc743d_FileAttachment_t.java
a0d65e00a0e129910aef247821f2f021a568e23d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,003
java
/* * * Copyright 2013 Netflix, 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.netflix.genie.common.model; import java.io.Serializable; import javax.activation.DataHandler; /** * Representation of a file attachment sent as part of the job request. * * @author skrishnan * */ public class FileAttachment implements Serializable { private static final long serialVersionUID = 1L; /** * Name of the file. */ private String name; /** * The data for the attachment. */ private DataHandler data; /** * Get the name of the file for this attachment. * * @return name of file for this attachment */ public String getName() { return name; } /** * Set the name of the file for this attachment. * * @param name name of the file for this attachment */ public void setName(String name) { this.name = name; } /** * Get the data handler containing the data for the attachment. * * @return the data handler containing data for the attachment */ public DataHandler getData() { return data; } /** * Set the data handler for the attachment. * * @param data the data handler for the attachment. */ public void setData(DataHandler data) { this.data = data; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f83ef6f5c573ea2886197d49ff46fbd855ac6fca
ad6b179c466b8e28f9ce974849d9b2f82e7eaf40
/s-feign/src/main/java/com/cj/sfeign/controller/UserController.java
5312a1b155d05412f457eb81a80a8954bef4723d
[]
no_license
XDFHTY/c2
fb7f22ba415c25a5f5a52c021fc9a5ca857de5b4
2c5c7c8458b02d2932d7acc8ecac76f8b2f88339
refs/heads/master
2022-07-29T10:30:59.961688
2020-05-25T03:15:51
2020-05-25T03:15:51
164,203,829
0
1
null
2022-06-29T17:12:55
2019-01-05T10:15:50
Java
UTF-8
Java
false
false
652
java
package com.cj.sfeign.controller; import com.cj.sfeign.service.FeignUserService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController @RequestMapping("/api/user") public class UserController { @Resource private FeignUserService feignUserService; @GetMapping(value = "/hi") public String sayHi(@RequestParam String name){ return feignUserService.sayHiFromClientOne(name); } }
[ "a1668281642@gmail.com" ]
a1668281642@gmail.com
59d2d863c6339b77c578a9b567e834e78ba13961
117a24dc265bbc965dc4f8b14ce4399b8e0f8ba6
/src/main/java/DSA/Arrays2/RandomPickIndex.java
445989d6116533ec51934e88b77fce10777c04c3
[]
no_license
sureshrmdec/Preparation26EatSleepDrinkCode
e240393eabdc3343bb1165d5c432217f085aa353
aa5b81907205f9d435835e2150100e8f53027212
refs/heads/master
2021-09-29T14:28:24.691090
2018-11-25T13:52:43
2018-11-25T13:52:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,386
java
package DSA.Arrays2; import java.util.Random; /** * * @author Raj * * Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array. Note: The array size can be very large. Solution that uses too much extra space will not pass the judge. Example: int[] nums = new int[] {1,2,3,3,3}; Solution solution = new Solution(nums); // pick(3) should return either index 2, 3, or 4 randomly. Each index should have equal probability of returning. solution.pick(3); // pick(1) should return 0. Since in the array only nums[0] is equal to 1. solution.pick(1); * */ public class RandomPickIndex { int a[]; Random random; public RandomPickIndex(int[] a) { this.a = a; random = new Random(); } public int pick(int target) { int result = -1; int count = 0; for (int i = 0; i < a.length; i++) { if (a[i] != target) { continue; } if (random.nextInt(++count) == 0) { result = i; } } return result; } public static void main(String... args) { RandomPickIndex obj = new RandomPickIndex(new int[]{1, 2, 3, 3, 3 }); System.out.println(obj.pick(3)); System.out.println(obj.pick(1)); } }
[ "rahuja@twitter.com" ]
rahuja@twitter.com
cbb73cee45330f5cc25529b6660092350bd1b61f
25ff5e17fcb08f66919b7cd6637f30a57a9edae0
/src/com/guidebee/utils/StreamUtils.java
51f3f484b2d42c46cbf5a110cb0f850590482417
[]
no_license
guidebee/AndroidGameEngine
a2467c6aa28d0a7da15e520a4c77c41bd2304230
2cf24ef3ceb8898f24c363818ef5e0bdfeead2cb
refs/heads/master
2020-12-28T04:38:36.626410
2015-10-17T12:53:06
2015-10-17T12:53:06
26,942,806
4
0
null
null
null
null
UTF-8
Java
false
false
4,200
java
/******************************************************************************* * Copyright 2011 See AUTHORS file. * * 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.guidebee.utils; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.StringWriter; /** Provides utility methods to copy streams */ public final class StreamUtils { public static final int DEFAULT_BUFFER_SIZE = 8192; public static final byte[] EMPTY_BYTES = new byte[0]; /** Copy the data from an {@link InputStream} to an {@link OutputStream} without closing the stream. * @throws IOException */ public static void copyStream (InputStream input, OutputStream output) throws IOException { copyStream(input, output, DEFAULT_BUFFER_SIZE); } /** Copy the data from an {@link InputStream} to an {@link OutputStream} without closing the stream. * @throws IOException */ public static void copyStream (InputStream input, OutputStream output, int bufferSize) throws IOException { byte[] buffer = new byte[bufferSize]; int bytesRead; while ((bytesRead = input.read(buffer)) != -1) { output.write(buffer, 0, bytesRead); } } /** Copy the data from an {@link InputStream} to a byte array without closing the stream. * @throws IOException */ public static byte[] copyStreamToByteArray (InputStream input) throws IOException { return copyStreamToByteArray(input, input.available()); } /** Copy the data from an {@link InputStream} to a byte array without closing the stream. * @param estimatedSize Used to preallocate a possibly correct sized byte array to avoid an array copy. * @throws IOException */ public static byte[] copyStreamToByteArray (InputStream input, int estimatedSize) throws IOException { ByteArrayOutputStream baos = new OptimizedByteArrayOutputStream(Math.max(0, estimatedSize)); copyStream(input, baos); return baos.toByteArray(); } /** Copy the data from an {@link InputStream} to a string using the default charset without closing the stream. * @throws IOException */ public static String copyStreamToString (InputStream input) throws IOException { return copyStreamToString(input, input.available()); } /** Copy the data from an {@link InputStream} to a string using the default charset. * @param approxStringLength Used to preallocate a possibly correct sized StringBulder to avoid an array copy. * @throws IOException */ public static String copyStreamToString (InputStream input, int approxStringLength) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(input)); StringWriter w = new StringWriter(Math.max(0, approxStringLength)); char[] buffer = new char[DEFAULT_BUFFER_SIZE]; int charsRead; while ((charsRead = reader.read(buffer)) != -1) { w.write(buffer, 0, charsRead); } return w.toString(); } /** Close and ignore all errors. */ public static void closeQuietly (Closeable c) { if (c != null) try { c.close(); } catch (Exception e) { // ignore } } /** A ByteArrayOutputStream which avoids copying of the byte array if not necessary. */ static public class OptimizedByteArrayOutputStream extends ByteArrayOutputStream { public OptimizedByteArrayOutputStream (int initialSize) { super(initialSize); } @Override public synchronized byte[] toByteArray () { if (count == buf.length) return buf; return super.toByteArray(); } public byte[] getBuffer () { return buf; } } }
[ "james.shen@guidebee.com" ]
james.shen@guidebee.com
a25c991895d676418745547d2cf5fb152c67df23
e3d6330b1358fffaef563248fb15722aeb977acc
/upa-impl/src/main/java/net/vpc/upa/impl/transaction/DefaultTransactionManager.java
650f45ab4b38f2f65d491b354ff2782a8e0ac6c4
[]
no_license
nesrinesghaier/upa
92fd779838c045e0e3bbe71d33870e5b13d2e3fe
2eb005e03477adad5eb127c830bc654ab62f5cc9
refs/heads/master
2021-04-09T11:33:36.714597
2018-02-24T12:04:41
2018-02-24T12:04:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
847
java
package net.vpc.upa.impl.transaction; import net.vpc.upa.PersistenceUnit; import net.vpc.upa.exceptions.UPAException; import net.vpc.upa.persistence.UConnection; import net.vpc.upa.persistence.PersistenceStore; import net.vpc.upa.Transaction; import net.vpc.upa.TransactionManager; /** * @author Taha BEN SALAH <taha.bensalah@gmail.com> * @creationdate 9/16/12 4:58 PM */ public class DefaultTransactionManager implements TransactionManager { @Override public Transaction createTransaction(UConnection connection,PersistenceUnit persistenceUnit, PersistenceStore persistenceStore) throws UPAException { if (connection == null) { throw new IllegalStateException("No Active Connection Found"); } DefaultTransaction t = new DefaultTransaction(); t.init(connection); return t; } }
[ "vpc@linux-booster" ]
vpc@linux-booster
64e744c898b34a11efa3cbcccfea17d4445e2fcc
ac0472a885a0696ba0419f3e5582b005e155b138
/template-manager/template-app/src/main/java/com/mes/common/manager/SensitivityManager.java
685cc2c13217014c691fd8d0cac2eb31d5614722
[]
no_license
liukunlong1093/base-cloud
4739fa4796ff59d782d06e22139f0565a06acfd4
afe7e21e3ef58840611e65e6b023e67f8a5e9629
refs/heads/master
2021-04-09T13:38:21.698215
2018-04-28T07:20:49
2018-04-28T07:20:49
125,459,705
3
0
null
null
null
null
UTF-8
Java
false
false
1,544
java
package com.mes.common.manager; import java.util.*; import com.mes.common.dto.SensitivityDTO; /** * 项目名称: [template-app] * 包: [com.mes.common.manager] * 类名称: [SensitivityManager] * 类描述: [敏感词管理处理接口] * 创建人: [刘坤龙] * 创建时间: [2017年8月24日 上午11:45:34] * 修改人: [刘坤龙] * 修改时间: [2017年8月24日 上午11:45:34] * 修改备注: [说明本次修改内容] * 版本: [v1.0] */ public interface SensitivityManager { /** * 根据敏感词标识获取敏感词 * @param id 敏感词标识 * @return 敏感词对象 */ SensitivityDTO getSensitivityById(Long id); /** * 根据条件获取敏感词列表 * @param condition 查询条件 * @return 敏感词列表 */ List<SensitivityDTO> getSensitivityList(Map<String, Object> condition); /** * 保存敏感词 * @param sensitivityDTO 敏感词对象 * @return 新增成功条数 */ long saveSensitivity(SensitivityDTO sensitivityDTO); /** * 更新敏感词 * @param sensitivityDTO 敏感词对象 * @return 更新成功条数 */ long updateSensitivity(SensitivityDTO sensitivityDTO); /** * 根据敏感词标识删除敏感词 * @param id 敏感词标识 * @return 删除成功条数 */ long deleteSensitivityById(Long id); /** * 批量保存敏感词 * @param sensitivityList 敏感词数据集合 * @return 新增成功条数 */ long batchSaveSensitivity(List<SensitivityDTO> sensitivityList); }
[ "liukunlong1093@163.com" ]
liukunlong1093@163.com
394fb4e90ce22467159f1b7d9509b3268599b7f8
ebae14e955a54e5506a831781b713b3e984641f8
/src/openjframework/web/zk/OrganizationeditWindow.java
5d1d761f01a669909616f610788d5fa6dc9057d0
[]
no_license
Coyote188/cccfmis
79738a9b7b59765180ab59bbafc46251cce87e4a
95ac4ba332e66c4aaff4721dce97c856e433c7ee
refs/heads/master
2021-01-22T17:53:11.330344
2012-02-21T09:10:56
2012-02-21T09:10:56
3,501,824
0
0
null
null
null
null
UTF-8
Java
false
false
2,071
java
package openjframework.web.zk; import java.util.*; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import openjframework.service.*; import openjframework.model.*; import org.zkoss.zk.ui.*; import org.zkoss.zul.*; public class OrganizationeditWindow extends Window{ public OrganizationInfo organization; Map params = Executions.getCurrent().getArg(); String userId; String processId = "0"; String rowId; Radiogroup checkCenter; public void onCreate() { organization=(OrganizationInfo)this.getPage().getVariable("organization"); // Components.wireVariables(this, this);将页面的所有组件加载到类 checkCenter=(Radiogroup)this.getFellow("checkCenter"); checkCenter.setSelectedIndex(organization.isCheckCenter()?0:1); } public void onSave(){ validateData(); String cmd="add"; String pcmd=(String) params.get("cmd"); if(pcmd!=null) cmd=pcmd; organization.setCheckCenter(checkCenter.getSelectedIndex()==0?true:false); if(cmd.equals("tree_add")) { OrganizationInfo _parent=(OrganizationInfo)params.get("organization_parent"); if(_parent==null) { organization.setOrganizationParent(null); organization.setOrganizationLevel(1); } else{ _parent.addChild(organization); organization.setOrganizationLevel(_parent.getOrganizationLevel()+1); } rowId =OrganizationInfoServiceUtil.create(organization).toString(); } else { OrganizationInfoServiceUtil.update(organization); rowId = organization.getId(); } Center c=(Center)this.getParent(); Tree departTre=(Tree)c.getFellow("orgTre"); departTre.setModel(null); departTre.setTreeitemRenderer(null); departTre.setModel(new OrganizationTreeModel()); departTre.setTreeitemRenderer(new OrganizationTreeitemRenderer()); this.detach(); } /** * Cancel this screen * */ public void onCancel() { this.detach(); } void validateData() { } }
[ "ligang.cui@gmail.com" ]
ligang.cui@gmail.com
47d4e25ae66b9bc97de0d7f7f8671507cf6e9326
92f6227f08e19bd2e1bf79738bf906b9ed134091
/chapter_001/src/main/java/ru/job4j/evenbeautiful/Task20.java
016ba6dc3cd6b5b6bc38224802bee2151386c838
[ "Apache-2.0" ]
permissive
kirillkrohmal/krohmal
b8af0e81b46081f53c8ff857609bb99785165f3f
12a8ce50caf76cf2c3b54a7fbaa2813fd3550a78
refs/heads/master
2023-06-23T17:27:56.513004
2023-06-13T07:05:56
2023-06-13T07:05:56
91,477,464
0
0
Apache-2.0
2023-02-22T08:20:14
2017-05-16T15:58:50
Java
UTF-8
Java
false
false
233
java
package ru.job4j.evenbeautiful; public class Task20 { public static void numCheck(int number) { if (number == number / 2) { System.out.println("Да"); } System.out.println("Нет"); } }
[ "krohmal_kirill@mail.ru" ]
krohmal_kirill@mail.ru
0f1ee09690ec27625dc3b606ce131ea72e9eb924
d8d2e5b940bfa0d2667228a32a7a2778d3d523af
/mycellar-java/mycellar-interfaces/mycellar-interface-client-web/src/main/java/fr/peralta/mycellar/interfaces/client/web/components/stack/data/StackDetailPanel.java
3930ec7ddc3951533a11cd4479cb7aee4d480248
[]
no_license
framiere/mycellar
1143cc284c3b096d38f8c357355cc5a610de52ee
e206a8971f7b0988cf55aa70faba338b71634e99
refs/heads/master
2021-01-18T05:49:38.152662
2012-12-23T07:03:29
2012-12-23T07:03:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,355
java
/* * Copyright 2011, MyCellar * * This file is part of MyCellar. * * MyCellar is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * MyCellar is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MyCellar. If not, see <http://www.gnu.org/licenses/>. */ package fr.peralta.mycellar.interfaces.client.web.components.stack.data; import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.apache.wicket.markup.html.panel.Panel; import fr.peralta.mycellar.interfaces.client.web.pages.admin.StackPage; /** * @author speralta */ public class StackDetailPanel extends Panel { private static final long serialVersionUID = 201111291932L; /** * @param id */ public StackDetailPanel(String id, Integer stackId) { super(id); add(new BookmarkablePageLink<Void>("detail", StackPage.class, StackPage.getPageParameters(stackId))); } }
[ "sebastien@peralta.fr" ]
sebastien@peralta.fr
d4afcfcad64de1c1f48092e0ad72ef02206c6307
22b9c697e549de334ac354dfc1d14223eff99121
/PaaS_SaaS_Accelerator_RESTFulFacade/FusionProxy_ActivityAppointmentService/src/com/oracle/xmlns/apps/crmcommon/activities/activitiesservice/ActivityCategory.java
040749bfe4dea8d7155d02e0f93ad892426b2391
[ "BSD-3-Clause" ]
permissive
digideskio/oracle-cloud
50e0d24e937b3afc991ad9cb418aa2bb263a4372
80420e9516290e5d5bfd6c0fa2eaacbc11762ec7
refs/heads/master
2021-01-22T13:57:21.947497
2016-05-13T06:26:16
2016-05-13T06:26:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,807
java
package com.oracle.xmlns.apps.crmcommon.activities.activitiesservice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ActivityCategory complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ActivityCategory"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ActivityCategoryId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * &lt;element name="ActivityId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/> * &lt;element name="CategoryCd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="ObjectVersionNumber" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ActivityCategory", propOrder = { "activityCategoryId", "activityId", "categoryCd", "objectVersionNumber" }) public class ActivityCategory { @XmlElement(name = "ActivityCategoryId") protected Long activityCategoryId; @XmlElement(name = "ActivityId") protected Long activityId; @XmlElement(name = "CategoryCd") protected String categoryCd; @XmlElement(name = "ObjectVersionNumber") protected Integer objectVersionNumber; /** * Gets the value of the activityCategoryId property. * * @return * possible object is * {@link Long } * */ public Long getActivityCategoryId() { return activityCategoryId; } /** * Sets the value of the activityCategoryId property. * * @param value * allowed object is * {@link Long } * */ public void setActivityCategoryId(Long value) { this.activityCategoryId = value; } /** * Gets the value of the activityId property. * * @return * possible object is * {@link Long } * */ public Long getActivityId() { return activityId; } /** * Sets the value of the activityId property. * * @param value * allowed object is * {@link Long } * */ public void setActivityId(Long value) { this.activityId = value; } /** * Gets the value of the categoryCd property. * * @return * possible object is * {@link String } * */ public String getCategoryCd() { return categoryCd; } /** * Sets the value of the categoryCd property. * * @param value * allowed object is * {@link String } * */ public void setCategoryCd(String value) { this.categoryCd = value; } /** * Gets the value of the objectVersionNumber property. * * @return * possible object is * {@link Integer } * */ public Integer getObjectVersionNumber() { return objectVersionNumber; } /** * Sets the value of the objectVersionNumber property. * * @param value * allowed object is * {@link Integer } * */ public void setObjectVersionNumber(Integer value) { this.objectVersionNumber = value; } }
[ "shailendrapradhan@Shailendras-MacBook-Pro.local" ]
shailendrapradhan@Shailendras-MacBook-Pro.local
c1201cc8f1ebf3bce9ad4f640bb48b5cd81cedac
d18af2a6333b1a868e8388f68733b3fccb0b4450
/java/src/com/google/android/gms/drive/realtime/internal/zzn$zza$zza.java
55ac4defa798445ff90b9487316de04e55daa95c
[]
no_license
showmaxAlt/showmaxAndroid
60576436172495709121f08bd9f157d36a077aad
d732f46d89acdeafea545a863c10566834ba1dec
refs/heads/master
2021-03-12T20:01:11.543987
2015-08-19T20:31:46
2015-08-19T20:31:46
41,050,587
0
1
null
null
null
null
UTF-8
Java
false
false
1,969
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.drive.realtime.internal; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import com.google.android.gms.common.api.Status; // Referenced classes of package com.google.android.gms.drive.realtime.internal: // zzn private static class zzle implements zzn { private IBinder zzle; public IBinder asBinder() { return zzle; } public void zzbF(String s) throws RemoteException { Parcel parcel; Parcel parcel1; parcel = Parcel.obtain(); parcel1 = Parcel.obtain(); parcel.writeInterfaceToken("com.google.android.gms.drive.realtime.internal.IStringCallback"); parcel.writeString(s); zzle.transact(1, parcel, parcel1, 0); parcel1.readException(); parcel1.recycle(); parcel.recycle(); return; s; parcel1.recycle(); parcel.recycle(); throw s; } public void zzm(Status status) throws RemoteException { Parcel parcel; Parcel parcel1; parcel = Parcel.obtain(); parcel1 = Parcel.obtain(); parcel.writeInterfaceToken("com.google.android.gms.drive.realtime.internal.IStringCallback"); if (status == null) { break MISSING_BLOCK_LABEL_56; } parcel.writeInt(1); status.writeToParcel(parcel, 0); _L1: zzle.transact(2, parcel, parcel1, 0); parcel1.readException(); parcel1.recycle(); parcel.recycle(); return; parcel.writeInt(0); goto _L1 status; parcel1.recycle(); parcel.recycle(); throw status; } (IBinder ibinder) { zzle = ibinder; } }
[ "invisible@example.com" ]
invisible@example.com
9ace55171ab3aed155c47ad7fe00d9f34196b305
15aff3446c957fc934c98dc84a0668a2025f28c1
/open-metadata-test/open-metadata-fvt/access-services-fvt/discovery-engine-fvt/src/main/java/org/odpi/openmetadata/accessservices/discoveryengine/fvt/clientconstructors/package-info.java
0994bbf8f7ee170bdd7257e061c02ff85532d94a
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
ilovechai/egeria
0865773e6deaf35991ab23a649e91f4715dc749c
c7cd3dd4bb6c960f6b81ecd71394af48cc16a23b
refs/heads/main
2023-03-15T18:15:16.154074
2023-03-03T13:10:41
2023-03-03T13:10:41
610,375,922
1
0
Apache-2.0
2023-03-06T20:57:45
2023-03-06T16:42:28
null
UTF-8
Java
false
false
305
java
/* SPDX-License-Identifier: Apache 2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ /** * This package tests that each of the clients support the five constructors and * they execute without error. */ package org.odpi.openmetadata.accessservices.discoveryengine.fvt.clientconstructors;
[ "mandy_chessell@uk.ibm.com" ]
mandy_chessell@uk.ibm.com
c8038f16e5d4ad18dc1437152510128b76e847dd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_226a7f50cdbff206855633bf85ed318375e95df4/FetchOperationUI/21_226a7f50cdbff206855633bf85ed318375e95df4_FetchOperationUI_t.java
ba628c37d6023bee41a69338aa1db316fcdda6af
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,483
java
/******************************************************************************* * Copyright (c) 2011 SAP AG. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Mathias Kinzler (SAP AG) - initial implementation *******************************************************************************/ package org.eclipse.egit.ui.internal.fetch; import java.lang.reflect.InvocationTargetException; import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.egit.core.op.FetchOperation; import org.eclipse.egit.ui.Activator; import org.eclipse.egit.ui.JobFamilies; import org.eclipse.egit.ui.UIText; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.transport.CredentialsProvider; import org.eclipse.jgit.transport.FetchResult; import org.eclipse.jgit.transport.RefSpec; import org.eclipse.jgit.transport.RemoteConfig; import org.eclipse.jgit.transport.TagOpt; import org.eclipse.jgit.transport.URIish; import org.eclipse.osgi.util.NLS; /** * UI Wrapper for {@link FetchOperation} */ public class FetchOperationUI { private final Repository repository; private final FetchOperation op; private final String sourceString; /** * @param repository * @param config * @param timeout * @param dryRun * */ public FetchOperationUI(Repository repository, RemoteConfig config, int timeout, boolean dryRun) { this.repository = repository; op = new FetchOperation(repository, config, timeout, dryRun); sourceString = NLS.bind("{0} - {1}", repository.getDirectory() //$NON-NLS-1$ .getParentFile().getName(), config.getName()); } /** * @param repository * @param uri * @param specs * @param timeout * @param dryRun */ public FetchOperationUI(Repository repository, URIish uri, List<RefSpec> specs, int timeout, boolean dryRun) { this.repository = repository; op = new FetchOperation(repository, uri, specs, timeout, dryRun); sourceString = uri.toPrivateString(); } /** * @param credentialsProvider */ public void setCredentialsProvider(CredentialsProvider credentialsProvider) { op.setCredentialsProvider(credentialsProvider); } /** * @param tagOpt */ public void setTagOpt(TagOpt tagOpt) { op.setTagOpt(tagOpt); } /** * Executes this directly, without showing a confirmation dialog * * @param monitor * @return the result of the operation * @throws CoreException */ public FetchResult execute(IProgressMonitor monitor) throws CoreException { try { op.run(monitor); return op.getOperationResult(); } catch (InvocationTargetException e) { throw new CoreException(Activator.createErrorStatus(e.getCause() .getMessage(), e.getCause())); } } /** * Starts the operation asynchronously showing a confirmation dialog after * completion */ public void start() { Job job = new Job(NLS.bind(UIText.FetchOperationUI_FetchJobName, sourceString)) { @Override protected IStatus run(IProgressMonitor monitor) { try { execute(monitor); } catch (CoreException e) { return Activator.createErrorStatus(e.getStatus() .getMessage(), e); } return Status.OK_STATUS; } @Override public boolean belongsTo(Object family) { if (JobFamilies.FETCH.equals(family)) return true; return super.belongsTo(family); } }; job.setUser(true); job.schedule(); job.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { if (event.getResult().isOK()) FetchResultDialog.show(repository, op.getOperationResult(), sourceString); else Activator.handleError(event.getResult().getMessage(), event .getResult().getException(), true); } }); } /** * @return the string denoting the remote source */ public String getSourceString(){ return sourceString; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ab43ae36b1be49ea72ee2146f5a832b764f50e59
a02b9f80dd2f039a9d12d206af38d44aedc24e66
/SillyChildTrave/app/src/main/java/com/yinglan/sct/entity/startpage/QiNiuKeyBean.java
b8ab64140dd93b1365f743e497276711afccc316
[ "Apache-2.0" ]
permissive
921668753/SillyChildTravel-Android
6bab2129cb3cb9b600166193f478cb5a64651722
eb2574bf1bb5934b3efbc7cb87f0a8ec3bbfa03f
refs/heads/master
2020-03-31T15:35:51.838597
2018-10-19T10:13:20
2018-10-19T10:13:20
152,343,076
0
0
null
null
null
null
UTF-8
Java
false
false
1,103
java
package com.yinglan.sct.entity.startpage; import com.common.cklibrary.entity.BaseResult; public class QiNiuKeyBean extends BaseResult<QiNiuKeyBean.DataBean> { public class DataBean { /** * authToken : dmrMa7omgEbJGmsv7vmRtg_g3zt1GjkpiIkWvtkW:IZQIWZ1FAMd3MJrGZsVTmxoeaiw=:eyJpbnNlcnRPbmx5IjowLCJzY29wZSI6InNoYWhhaXppIiwicmV0dXJuQm9keSI6IntcIm5hbWVcIjogJChrZXkpLCBcIm9yaWdpbk5hbWVcIiA6ICQoZm5hbWUpLCBcIndpZHRoXCI6ICQoaW1hZ2VJbmZvLndpZHRoKSwgXCJoZWlnaHRcIjogJChpbWFnZUluZm8uaGVpZ2h0KSwgXCJzaXplXCI6ICQoZnNpemUpLCBcImluZGV4XCI6ICQoeDppbmRleCl9IiwiZnNpemVMaW1pdCI6MjA5NzE1MjAwLCJkZWFkbGluZSI6MTUyNzM2NTExNH0= * host : http://ovwiqces1.bkt.clouddn.com/ */ private String authToken; private String host; public String getAuthToken() { return authToken; } public void setAuthToken(String authToken) { this.authToken = authToken; } public String getHost() { return host; } public void setHost(String host) { this.host = host; } } }
[ "921668753@qq.com" ]
921668753@qq.com
13c0c7e61fbb7b9248852645a8b672cdf2381e70
f1a4e131a1301419ec1d361139bc43401fb204a4
/baselib/src/main/java/com/yanb/daqsoft/baselib/utils/adapter/listener/OnItemChildLongClickListener.java
56b1c6b2e3a7a2784ea289438bc4da42ff7e1f58
[]
no_license
1976222027/BaseAndroid
a18cd1e094ee25343e7872cd4f84b77bf54af23a
ce13d42828b7e06becdbba37f3e54d6ed7c801e4
refs/heads/master
2020-07-08T13:07:29.969732
2019-08-21T09:56:17
2019-08-21T09:56:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,073
java
package com.yanb.daqsoft.baselib.utils.adapter.listener; import android.view.View; import com.yanb.daqsoft.baselib.utils.adapter.BaseQuickAdapter; /** * Created by AllenCoder on 2016/8/03. * A convenience class to extend when you only want to OnItemChildLongClickListener for a subset * of all the SimpleClickListener. This implements all methods in the * {@link SimpleClickListener} **/ public abstract class OnItemChildLongClickListener extends SimpleClickListener { @Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { } @Override public void onItemLongClick(BaseQuickAdapter adapter, View view, int position) { } @Override public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) { } @Override public void onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) { onSimpleItemChildLongClick(adapter, view, position); } public abstract void onSimpleItemChildLongClick(BaseQuickAdapter adapter, View view, int position); }
[ "760375443@qq.com" ]
760375443@qq.com
3530a859a2c9d9f0fdd078e8e15e61b2b809db07
2d2ae94d33cbdf471ee277f37fbb284039dd210b
/SimpleORM/SimpleORM-3.11/simpleorm/examples/simpleorm/examples/CompareTest.java
5ff0d7e9b3c3902ba9e0f0f5dfeb31b7defb7c94
[ "Apache-2.0" ]
permissive
MykolaBova/Hib
c7c8d4b8a41a4026d69a21df077c0adc32c623a4
412a771187ef38d09115b3425964b3fb7817a8b2
refs/heads/master
2016-09-06T16:56:43.848980
2014-07-08T12:05:21
2014-07-08T12:05:21
21,611,207
1
0
null
null
null
null
UTF-8
Java
false
false
4,948
java
package simpleorm.examples; import java.io.Serializable; import java.util.Collection; import java.util.Collections; import java.util.List; import simpleorm.dataset.SDataSet; import simpleorm.dataset.SFieldDouble; import simpleorm.dataset.SFieldMeta; import simpleorm.dataset.SFieldReference; import simpleorm.dataset.SFieldScalar; import simpleorm.dataset.SFieldString; import simpleorm.dataset.SQuery; import simpleorm.dataset.SRecordInstance; import simpleorm.dataset.SRecordMeta; import simpleorm.dataset.SFieldFlags; import simpleorm.dataset.validation.SValidatorEnumeratedValues; import simpleorm.dataset.validation.SValidatorI; import simpleorm.sessionjdbc.SSessionJdbc; import simpleorm.sessionjdbc.SDataLoader; import simpleorm.utils.SException; import simpleorm.utils.SLog; import simpleorm.utils.SRecordComparator; /** * Tests validation, OnFieldValidate etc. (Basic validation test is also in * ADemo/Employee.) */ public class CompareTest { public static void main(String[] argv) throws Exception { TestUte.initializeTest(CompareTest.class); // Look at this code. try { testInit(); compareTest(); } finally { SSessionJdbc.getThreadLocalSession().close(); } } /** Prepare for tests, Delete old data. */ static void testInit() throws Exception { System.out.println("################ Init #################"); SSessionJdbc ses = SSessionJdbc.getThreadLocalSession(); TestUte.createDeptEmp(ses); } static void compareTest() { System.out.println("################ compareTest #################"); SSessionJdbc ses = SSessionJdbc.getThreadLocalSession(); ses.begin(); ses.query(new SQuery<Employee>(Employee.EMPLOYEE).descending(Employee.EMPEE_ID)); SDataSet ds = ses.commitAndDetachDataSet(); List<Employee> emps = ds.findAllRecords(Employee.EMPLOYEE); // by pkey Collections.shuffle(emps); Collections.sort(emps, new SRecordComparator<Employee>(Employee.EMPLOYEE)); TestUte.assertEqual(emps.get(0).getString(Employee.EMPEE_ID), "100"); TestUte.assertEqual(emps.get(1).getString(Employee.EMPEE_ID), "200"); TestUte.assertEqual(emps.get(2).getString(Employee.EMPEE_ID), "300"); // Order by descending salary Collections.shuffle(emps); Collections.sort(emps, new SRecordComparator<Employee>(true, Employee.SALARY)); TestUte.assertEqual(emps.get(0).getString(Employee.EMPEE_ID), "300"); TestUte.assertEqual(emps.get(1).getString(Employee.EMPEE_ID), "200"); TestUte.assertEqual(emps.get(2).getString(Employee.EMPEE_ID), "100"); // Order by dept (null last) Collections.shuffle(emps); Collections.sort(emps, new SRecordComparator<Employee>(Employee.DEPT_ID)); TestUte.assertEqual(emps.get(0).getString(Employee.EMPEE_ID), "100"); TestUte.assertEqual(emps.get(1).getString(Employee.EMPEE_ID), "200"); TestUte.assertEqual(emps.get(2).getString(Employee.EMPEE_ID), "300"); // Create with null key and compare Employee e4 = ds.createWithNullKey(Employee.EMPLOYEE); e4.setString(Employee.NAME, "first"); Employee e5 = ds.createWithNullKey(Employee.EMPLOYEE); e5.setString(Employee.NAME, "second"); emps = ds.findAllRecords(Employee.EMPLOYEE); Collections.shuffle(emps); Collections.sort(emps, new SRecordComparator<Employee>(Employee.EMPLOYEE)); TestUte.assertEqual(emps.get(0).getString(Employee.EMPEE_ID), "100"); TestUte.assertEqual(emps.get(1).getString(Employee.EMPEE_ID), "200"); TestUte.assertEqual(emps.get(2).getString(Employee.EMPEE_ID), "300"); // comparing on null keys is not consistent with equals... beware. // TestUte.assertEqual(emps.get(3).getString(Employee.NAME), "first"); // TestUte.assertEqual(emps.get(4).getString(Employee.NAME), "second"); // Sort by manager (can be null), then by type, then by name // Must be set to sort on it... e4.setNull(Employee.MANAGER_EMPEE_ID); e5.setNull(Employee.MANAGER_EMPEE_ID); e4.setNull(Employee.ETYPE); e5.setNull(Employee.ETYPE); Collections.shuffle(emps); Collections.sort(emps, new SRecordComparator<Employee>(Employee.MANAGER_EMPEE_ID, Employee.ETYPE, Employee.NAME)); TestUte.assertEqual(emps.get(0).getString(Employee.EMPEE_ID), "300"); TestUte.assertEqual(emps.get(1).getString(Employee.EMPEE_ID), "200"); TestUte.assertEqual(emps.get(2).getString(Employee.EMPEE_ID), "100"); TestUte.assertEqual(emps.get(3).getString(Employee.NAME), "first"); TestUte.assertEqual(emps.get(4).getString(Employee.NAME), "second"); // Sort on reference Collections.shuffle(emps); Collections.sort(emps, new SRecordComparator<Employee>(Employee.MANAGER)); TestUte.assertTrue(emps.get(0).getString(Employee.EMPEE_ID).equals("300") || emps.get(0).getString(Employee.EMPEE_ID).equals("200")); TestUte.assertTrue(emps.get(1).getString(Employee.EMPEE_ID).equals("300") || emps.get(1).getString(Employee.EMPEE_ID).equals("200")); System.out.println("################ compareTest passed #################"); } }
[ "bova.mykola@gmail.com" ]
bova.mykola@gmail.com
e1907e66413e599192f33022151490a7082ac117
ae2906fa1a2ec0750bed9ac28696871f5838dc91
/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ServiceBindingData.java
bd6b64cecec4d8f764f4202d888936a1a64793d7
[ "Apache-2.0" ]
permissive
theghost5800/cf-java-client
ca8e2c0073fa1b8fd0441177d93d713ab3856f55
07a34c646a2f982e9405a49db2122ef461462af0
refs/heads/master
2022-11-15T08:17:10.162327
2019-10-29T15:48:42
2019-10-29T15:48:42
219,698,354
0
0
Apache-2.0
2019-11-05T08:48:37
2019-11-05T08:48:36
null
UTF-8
Java
false
false
1,529
java
/* * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.cloudfoundry.client.v3.servicebindings; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.cloudfoundry.AllowNulls; import org.cloudfoundry.Nullable; import org.immutables.value.Value; import java.util.List; import java.util.Map; /** * The data for a {@link ServiceBinding} */ @JsonDeserialize @Value.Immutable abstract class _ServiceBindingData { /** * The service binding credentials */ @AllowNulls @JsonProperty("credentials") @Nullable abstract Map<String, Object> getCredentials(); /** * The syslog drain URL */ @JsonProperty("syslog_drain_url") @Nullable abstract String getSyslogDrainUrl(); /** * The (experimental) volume mounts */ @JsonProperty("volume_mounts") @Nullable abstract List<String> getVolumeMounts(); }
[ "bhale@pivotal.io" ]
bhale@pivotal.io
1eec8ff8f346ec2be8929f601cd9fd5c0cfc84fd
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__short_max_square_53a.java
b222c6cc314c3a5a554908d3977b365af9c5c8fa
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
2,393
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__short_max_square_53a.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-53a.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: max Set data to the max value for short * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: square * GoodSink: Ensure there will not be an overflow before squaring data * BadSink : Square data, which can lead to overflow * Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package * * */ package testcases.CWE190_Integer_Overflow; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; public class CWE190_Integer_Overflow__short_max_square_53a extends AbstractTestCase { public void bad() throws Throwable { short data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Short.MAX_VALUE; (new CWE190_Integer_Overflow__short_max_square_53b()).bad_sink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { short data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE190_Integer_Overflow__short_max_square_53b()).goodG2B_sink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { short data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Short.MAX_VALUE; (new CWE190_Integer_Overflow__short_max_square_53b()).goodB2G_sink(data ); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
31ede9f55d811bd3d7e08c9344b177af113518e8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_34ee04acaf390c6f2e1603cfc3dcc923fa674b3f/ITIndexerActivationEventInspector/12_34ee04acaf390c6f2e1603cfc3dcc923fa674b3f_ITIndexerActivationEventInspector_s.java
a5dc4df25dbc85c8aed4287e28ebddfc5f41527b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,943
java
package org.sonatype.nexus.rt.boot; import org.codehaus.plexus.component.annotations.Component; import org.sonatype.nexus.plugins.events.PluginActivatedEvent; import org.sonatype.nexus.proxy.events.EventInspector; import org.sonatype.plexus.appevents.Event; /** * The sole purpose of this EventInspector is to turn of "blocking commits" (equivalent of "old" behavior) on Indexer, * on Maven Indexer more precisely, since async nature of it borks ITs. This event inspector just puts Indexer into * "sync" mode (default is async). * * @author cstamas */ @Component( role = EventInspector.class, hint = "ITIndexerActivationEventInspector" ) public class ITIndexerActivationEventInspector implements EventInspector { @Override public boolean accepts( Event<?> evt ) { if ( evt instanceof PluginActivatedEvent ) { PluginActivatedEvent pa = (PluginActivatedEvent) evt; return "nexus-indexer-lucene-plugin".equals( pa.getPluginDescriptor().getPluginCoordinates().getArtifactId() ); } return false; } @Override public void inspect( Event<?> evt ) { // Note: in ITs we want to make Indexer perform blocking commits. // Since MavenIndexer 4.0, it performs async blocking commits by default, meaning that no "helper" from Nexus // is able to tell and potentially block (see EventInspectorsUtil#waitForCalmPeriod() as example) execution // up to the moment when indexing operation is actually done. // By having this switch, we are switching Nexus indexer back into "blocking" mode as it was before 4.0. // The proper fix is to make all Indexer related ITs behave "properly", and have some sort of // "try-wait-try-failAfterSomeRetries" the search operation itself. System.setProperty( "mavenIndexerBlockingCommits", Boolean.TRUE.toString() ); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
db225d1fb9693da221e755b304425d36f63fb8e7
514d197fdb0856444bf1b90b71e227df0bb5332b
/extensions/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/IncompletePostTestCase.java
e43703e5ed2b2f88ec8aa7dd7314b82c3ffca9e6
[ "Apache-2.0" ]
permissive
mkouba/quarkus
daae5ea13d47cf34a7cf432c66650a044ba38fbb
fa32197f260f13c88b4f2e83d47c5838262d0dac
refs/heads/master
2023-08-22T01:34:14.827230
2020-07-03T13:19:04
2020-07-03T13:19:23
174,373,858
2
0
Apache-2.0
2019-09-17T14:59:41
2019-03-07T15:44:07
Java
UTF-8
Java
false
false
2,019
java
package io.quarkus.resteasy.test; import java.net.Socket; import java.net.URL; import java.nio.charset.StandardCharsets; import org.apache.http.params.CoreConnectionPNames; import org.hamcrest.Matchers; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import io.quarkus.test.QuarkusUnitTest; import io.quarkus.test.common.http.TestHTTPResource; import io.restassured.RestAssured; import io.restassured.config.HttpClientConfig; import io.restassured.config.RestAssuredConfig; public class IncompletePostTestCase { @RegisterExtension static QuarkusUnitTest runner = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) .addClasses(PostEndpoint.class)); @TestHTTPResource URL url; @Test public void testIncompleteWrite() throws Exception { PostEndpoint.invoked = false; //make sure incomplete writes do not block threads //and that incoplete data is not delivered to the endpoint for (int i = 0; i < 1000; ++i) { Socket socket = new Socket(url.getHost(), url.getPort()); socket.getOutputStream().write( "POST /post HTTP/1.1\r\nHost: localhost\r\nContent-length:10\r\n\r\ntest".getBytes(StandardCharsets.UTF_8)); socket.getOutputStream().flush(); socket.getOutputStream().close(); socket.close(); } Assertions.assertFalse(PostEndpoint.invoked); RestAssuredConfig config = RestAssured.config() .httpClient(HttpClientConfig.httpClientConfig() .setParam(CoreConnectionPNames.CONNECTION_TIMEOUT, 1000) .setParam(CoreConnectionPNames.SO_TIMEOUT, 1000)); RestAssured.given().config(config).get("/post").then().body(Matchers.is("ok")); } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
7a554b4106188fb307d37485c54b0dd555f41f2b
a61d019ccc331c2ac68694dc6bce06f06a8adba2
/spring-cloud/eureka-consumer1/src/test/java/com/personal/test/demo/eurekaconsumer1/EurekaConsumer1ApplicationTests.java
07bdde42dde5ecbafe8dfa67f7e20e0264f2a960
[]
no_license
OuYangLiang/code-example
de110b36ba3c3066019b95c7fc1b9463f9d3a6bd
80f1dbb52ffb761d8b25ab677e4957136301d20e
refs/heads/master
2023-07-25T21:42:54.999876
2022-06-28T01:10:03
2022-06-28T01:10:03
112,132,893
1
2
null
2023-07-16T10:23:58
2017-11-27T01:38:56
Java
UTF-8
Java
false
false
364
java
package com.personal.test.demo.eurekaconsumer1; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class EurekaConsumer1ApplicationTests { @Test public void contextLoads() { } }
[ "ouyanggod@gmail.com" ]
ouyanggod@gmail.com
694b9707b8a6d4fb28b564f43ad896e7bc780ffe
cce9f1da306440273977d8909d106542fbc1c020
/src/main/java/com/timurvvolkov/chapter14/ThreeD.java
782f10e49fecd47210daa68a448d6fb6820baa20
[]
no_license
timurvvolkov/shildt
12aede304bd749667a024aa297db4f39c87e133d
efa4bd31a6c7530e68e2bd9b59b5a66ee5af1fde
refs/heads/master
2023-06-22T13:01:15.848852
2021-07-16T13:56:22
2021-07-16T13:56:22
315,215,989
0
0
null
null
null
null
UTF-8
Java
false
false
167
java
package com.timurvvolkov.chapter14; class ThreeD extends TwoD { int z; public ThreeD(int x, int y, int z) { super(x, y); this.z = z; } }
[ "timurvvolkov@gmail.com" ]
timurvvolkov@gmail.com
613573f6951f09b72a143a2842e3f42be04c1b55
a29e780f91ce5d2afe1b4f311bafeb16208358de
/app/src/main/java/com/sdxxtop/robotproject/strip/DevConfigModel.java
39666685081d651f0e45f06f712ba59b0a1f0167
[]
no_license
ZhouSilverBullet/XiaoYunProject
c4bbabacb14f08ae1328862d68a8a565c37abdd0
adc6a54d4392e56f6aecb3158d1fbdf81f0d8bc9
refs/heads/master
2020-04-10T04:53:16.240008
2018-12-07T10:48:28
2018-12-07T10:48:28
160,812,012
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.sdxxtop.robotproject.strip; import cn.com.broadlink.sdk.param.controller.BLDeviceConfigParam; /** * Created by YeJin on 2016/5/10. */ public interface DevConfigModel { void startConfig(BLDeviceConfigParam deviceConfigParam, DevConfigListener devConfigListener); void cancleConfig(); }
[ "zhousaito@163.com" ]
zhousaito@163.com
71d5a9017bf7a9db24fdb84f9cc4c474955917b9
abf57dc4858985227aeb83f645062a1bb1c8a963
/src/Week1/Exercise3Spruce.java
5e0b45b0dc9aafa506c5c3aaa997fd59ea95473c
[]
no_license
bogdanrandrei/MOOC
164f71d316464a65a8e0f9ce6708181f90b9bb3b
a9a02c13dc9da1805cf8dc371fe37a69c3f3a484
refs/heads/master
2020-10-02T02:11:16.682385
2020-01-10T17:33:30
2020-01-10T17:33:30
227,676,943
2
0
null
null
null
null
UTF-8
Java
false
false
332
java
package Week1; public class Exercise3Spruce { public static void main(String[] args) { System.out.println(" *"); System.out.println(" ***"); System.out.println(" *****"); System.out.println(" *******"); System.out.println("*********"); System.out.println(" *"); } }
[ "you@example.com" ]
you@example.com
b0a848987e663cd6559bf49d54054920ff8b2764
ddc7e12b9878f92373a33c3aaa6b05ecd1337b4b
/app/src/main/java/com/xuexiang/xtcpdemo/MyApp.java
1bb0f7f2729566816de6bffbf10e3f37275ba131
[]
no_license
Rain168/XTCP
b0d1e19c3cc74f3c4dda6e3e17bd4a02b269d56a
3cab3767c16dc6b882d8e89e739704d8b885e013
refs/heads/master
2020-04-25T20:40:16.177409
2018-12-24T03:02:32
2018-12-24T03:02:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,958
java
package com.xuexiang.xtcpdemo; import android.app.Application; import android.content.Context; import android.util.Log; import com.xuexiang.xaop.XAOP; import com.xuexiang.xaop.util.PermissionUtils; import com.xuexiang.xaop.util.Strings; import com.xuexiang.xpage.AppPageConfig; import com.xuexiang.xpage.PageConfig; import com.xuexiang.xpage.PageConfiguration; import com.xuexiang.xpage.model.PageInfo; import com.xuexiang.xtcp.AppProtocolCenter; import com.xuexiang.xtcp.AppProtocolFieldCenter; import com.xuexiang.xtcp.XTCP; import com.xuexiang.xtcp.XTCPProtocolFieldCenter; import com.xuexiang.xtcp.core.XProtocolCenter; import com.xuexiang.xtcp.core.model.IntArray; import com.xuexiang.xtcp.enums.StorageMode; import com.xuexiang.xutil.XUtil; import com.xuexiang.xutil.common.StringUtils; import com.xuexiang.xutil.net.JsonUtil; import com.xuexiang.xutil.tip.ToastUtils; import java.util.Arrays; import java.util.List; /** * @author xuexiang * @since 2018/11/7 下午1:12 */ public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); initLibs(); initXTCP(); } /** * 初始化基础库 */ private void initLibs() { XUtil.init(this); XUtil.debug(true); PageConfig.getInstance().setPageConfiguration(new PageConfiguration() { //页面注册 @Override public List<PageInfo> registerPages(Context context) { return AppPageConfig.getInstance().getPages(); //自动注册页面 } }).debug("PageLog").enableWatcher(true).init(this); XAOP.init(this); //初始化插件 XAOP.debug(true); //日志打印切片开启 XAOP.setISerializer(new Strings.ISerializer() { @Override public String toString(Object obj) { return JsonUtil.toJson(obj); } }); //设置动态申请权限切片 申请权限被拒绝的事件响应监听 XAOP.setOnPermissionDeniedListener(new PermissionUtils.OnPermissionDeniedListener() { @Override public void onDenied(List<String> permissionsDenied) { ToastUtils.toast("权限申请被拒绝:" + StringUtils.listToString(permissionsDenied, ",")); } }); } private void initXTCP() { XTCP.getInstance() .addIProtocolCenter(AppProtocolCenter.getInstance()) //添加协议中心 .addIProtocolFieldCenter(AppProtocolFieldCenter.getInstance(), XTCPProtocolFieldCenter.getInstance()) //添加协议字段中心 .setDefaultStorageMode(StorageMode.BigEndian) //设置默认存储方式 .debug(true); Log.e("xuexiang", XProtocolCenter.getInstance().getProtocol((byte) 0x12).toString()); Log.e("xuexiang", Arrays.toString(XProtocolCenter.getInstance().getProtocolFields(IntArray.class.getName()))); } }
[ "xuexiangjys@163.com" ]
xuexiangjys@163.com
558868707f8396a1bb11fb75f6a6a9efd580a743
08fd063562ac2a2611279b7ad513d21e21601370
/src/main/java/com/junyu/mapper/ServiceDicMapper.java
aa8aea2a4f3bafa4a9239ecf0fd3accb374ff461
[]
no_license
shawemou/junyu_compareSystem
339fedeef64f41b8fe8e8d152142ad11205a9161
b61c6efc045b9d50eb2824643d94255a209714f2
refs/heads/master
2020-03-22T09:24:35.764564
2018-07-24T02:11:22
2018-07-24T02:11:22
139,835,379
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
package com.junyu.mapper; import com.github.abel533.mapper.Mapper; import com.junyu.pojo.ServiceDic; public interface ServiceDicMapper extends Mapper<ServiceDic> { }
[ "you@example.com" ]
you@example.com
7fd0f7b77f78c07c4d7a8bd43bcbaf2a5a9900f1
d504110d2237650b4a445417c80131915f303fe0
/netbeans/gas/update/src/com/gas/update/NewClass.java
79eea5eec8a23811cfcc89a5a7f1a7290ab8d62e
[]
no_license
duncan1201/VF
ab8741163bbff03962818cc1076cc35c1252bb03
095478313d2580925f7417dae6eb083d09636a30
refs/heads/master
2021-03-22T00:26:13.276478
2016-09-08T11:48:01
2016-09-08T11:48:01
32,251,044
0
0
null
null
null
null
UTF-8
Java
false
false
5,923
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.gas.update; import java.util.Collection; import java.util.HashSet; import java.util.List; import javax.swing.SwingUtilities; import org.netbeans.api.autoupdate.InstallSupport; import org.netbeans.api.autoupdate.OperationContainer; import org.netbeans.api.autoupdate.OperationException; import org.netbeans.api.autoupdate.OperationSupport; import org.netbeans.api.autoupdate.UpdateElement; import org.netbeans.api.autoupdate.UpdateManager; import org.netbeans.api.autoupdate.UpdateUnit; import org.netbeans.api.autoupdate.UpdateUnitProvider; import org.netbeans.api.autoupdate.UpdateUnitProviderFactory; import org.netbeans.api.progress.ProgressHandle; import org.netbeans.api.progress.ProgressHandleFactory; import org.openide.util.Exceptions; import org.openide.util.RequestProcessor; /** * * @author dq */ public class NewClass { private Runnable doCheck = new Runnable() { @Override public void run() { if (SwingUtilities.isEventDispatchThread()) { RequestProcessor.getDefault().post(doCheck); return; } //if (timeToCheck ()) { List<UpdateUnitProvider> providers = UpdateUnitProviderFactory.getDefault().getUpdateUnitProviders(true); Boolean refresh = null; Boolean enabled = null; try { enabled = providers.get(0).isEnabled(); refresh = providers.get(0).refresh(null, true); } catch (Exception ex) { Exceptions.printStackTrace(ex); } List<UpdateUnit> abds = providers.get(0).getUpdateUnits(); //UpdateUnitProviderFactory.getUpdateUnitProviders(); Collection<UpdateElement> elements4update = doRealCheck(); OperationContainer<InstallSupport> container = getContainerForUpdate(elements4update); boolean approved = allLicensesApproved(container); if(approved){ InstallSupport support = container.getSupport(); InstallSupport.Validator validator = doDownload(container); doInstall(support, validator); } //} } }; public Collection<UpdateElement> doRealCheck() { Collection<UpdateElement> elements4update = new HashSet<UpdateElement>(); List<UpdateUnit> updateUnits = UpdateManager.getDefault().getUpdateUnits(); for (UpdateUnit unit : updateUnits) { if (unit.getInstalled() != null) { // means the plugin already installed if (!unit.getAvailableUpdates().isEmpty()) { // has updates elements4update.add(unit.getAvailableUpdates().get(0)); // add plugin with highest version } } else { System.out.println(); } } return elements4update; } private OperationContainer<InstallSupport> getContainerForUpdate(Collection<UpdateElement> elements4update) { OperationContainer<InstallSupport> container = OperationContainer.createForUpdate(); for (UpdateElement element : elements4update) { if (container.canBeAdded(element.getUpdateUnit(), element)) { OperationContainer.OperationInfo<InstallSupport> operationInfo = container.add(element); if (operationInfo == null) { continue; } container.add(operationInfo.getRequiredElements()); } } return container; } private boolean allLicensesApproved(OperationContainer<InstallSupport> container) { if (!container.listInvalid().isEmpty()) { return false; } for (OperationContainer.OperationInfo<InstallSupport> info : container.listAll()) { String license = info.getUpdateElement().getLicence(); if (!isLicenseApproved(license)) { return false; } } return true; } private boolean isLicenseApproved(String license) { // place your code there return false; } public InstallSupport.Validator doDownload(OperationContainer<InstallSupport> container) { InstallSupport install = container.getSupport(); ProgressHandle downloadHandle = ProgressHandleFactory.createHandle("dummy-download-handle"); InstallSupport.Validator ret = null; try { ret = install.doDownload(downloadHandle, true); } catch (OperationException ex) { Exceptions.printStackTrace(ex); } return ret; } public OperationSupport.Restarter doInstall(InstallSupport support, InstallSupport.Validator validator) { ProgressHandle validateHandle = ProgressHandleFactory.createHandle("dummy-validate-handle"); org.netbeans.api.autoupdate.InstallSupport.Installer installer; OperationSupport.Restarter ret = null; try { installer = support.doValidate(validator, validateHandle); // validates all plugins are correctly downloaded ProgressHandle installHandle = ProgressHandleFactory.createHandle("dummy-install-handle"); ret = support.doInstall(installer, installHandle); } catch (OperationException ex) { Exceptions.printStackTrace(ex); } return ret; } public void doRestartLater(InstallSupport support, OperationSupport.Restarter restarter) { support.doRestartLater(restarter); } public void doRestartNow(InstallSupport support, OperationSupport.Restarter restarter) throws OperationException { ProgressHandle installHandle = ProgressHandleFactory.createHandle("dummy-install-handle"); support.doRestart(restarter, installHandle); } }
[ "dunqiang.liao@vectorfriends.com" ]
dunqiang.liao@vectorfriends.com
31cf826c4f77412027764bd9a310502db58625c8
d705756c0af4679e0e41a2b57367c097d9db9931
/src/test/java/com/ilearn/jmh/demo/HelloWorld.java
ca69e8800945bddeb1ce15b5713a44a8f9f3c1c1
[]
no_license
WeisonWei/Disruptor-maven
45114f1403e7ba26ac6bc33114c8fea0c05a112d
b90ae79ba1f62041eaa82944d618c46ccc34e359
refs/heads/master
2021-12-12T06:13:03.272766
2016-12-08T01:14:37
2016-12-08T01:14:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,596
java
package com.ilearn.jmh.demo; /* * Copyright (c) 2014, Oracle America, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Oracle nor the names of its contributors may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; public class HelloWorld { /* * This is our first benchmark method. * * JMH works as follows: users annotate the methods with @Benchmark, and * then JMH produces the generated code to run this particular benchmark as * reliably as possible. In general one might think about @Benchmark methods * as the benchmark "payload", the things we want to measure. The * surrounding infrastructure is provided by the harness itself. * * Read the Javadoc for @Benchmark annotation for complete semantics and * restrictions. At this point we only note that the methods names are * non-essential, and it only matters that the methods are marked with * @Benchmark. You can have multiple benchmark methods within the same * class. * * Note: if the benchmark method never finishes, then JMH run never finishes * as well. If you throw an exception from the method body the JMH run ends * abruptly for this benchmark and JMH will run the next benchmark down the * list. * * Although this benchmark measures "nothing" it is a good showcase for the * overheads the infrastructure bear on the code you measure in the method. * There are no magical infrastructures which incur no overhead, and it is * important to know what are the infra overheads you are dealing with. You * might find this thought unfolded in future examples by having the * "baseline" measurements to compare against. */ @Benchmark public void wellHelloThere() { // this method was intentionally left blank. } /* * ============================== HOW TO RUN THIS TEST: ==================================== * * You are expected to see the run with large number of iterations, and * very large throughput numbers. You can see that as the estimate of the * harness overheads per method call. In most of our measurements, it is * down to several cycles per call. * * a) Via command-line: * $ mvn clean install * $ java -jar target/benchmarks.jar JMHSample_01 * * JMH generates self-contained JARs, bundling JMH together with it. * The runtime options for the JMH are available with "-h": * $ java -jar target/benchmarks.jar -h * * b) Via the Java API: * (see the JMH homepage for possible caveats when running from IDE: * http://openjdk.java.net/projects/code-tools/jmh/) */ public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(HelloWorld.class.getSimpleName()) .forks(1) .build(); new Runner(opt).run(); } }
[ "452153627@qq.com" ]
452153627@qq.com
477897eb3f63e4d708db8ca175d2d51e2271ec9b
ad5b11ce6186ca76bf4098852d34b4a806906b1f
/zhao_sheng/src/main/java/com/yfy/lib/LoadingLayoutProxy.java
ef07f422399d8629185ab252d359d640afb8fac0
[]
no_license
Zhaoxianxv/zhao_sheng1
700666c2589529aee9a25597f63cc6a07dcfe78c
9fdd9512bf38fcfe4ccbe197034a006a3d053c66
refs/heads/master
2022-12-14T03:07:48.096666
2020-09-06T03:36:17
2020-09-06T03:36:17
291,885,920
1
0
null
null
null
null
UTF-8
Java
false
false
1,765
java
package com.yfy.lib; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import com.yfy.lib.internal.LoadingLayout; import java.util.HashSet; public class LoadingLayoutProxy implements ILoadingLayout { private final HashSet<LoadingLayout> mLoadingLayouts; LoadingLayoutProxy() { mLoadingLayouts = new HashSet<LoadingLayout>(); } /** * This allows you to add extra LoadingLayout instances to this proxy. This * is only necessary if you keep your own instances, and want to have them * included in any * {@link PullToRefreshBase#createLoadingLayoutProxy(boolean, boolean) * createLoadingLayoutProxy(...)} calls. * * @param layout - LoadingLayout to have included. */ public void addLayout(LoadingLayout layout) { if (null != layout) { mLoadingLayouts.add(layout); } } @Override public void setLastUpdatedLabel(CharSequence label) { for (LoadingLayout layout : mLoadingLayouts) { layout.setLastUpdatedLabel(label); } } @Override public void setLoadingDrawable(Drawable drawable) { for (LoadingLayout layout : mLoadingLayouts) { layout.setLoadingDrawable(drawable); } } @Override public void setRefreshingLabel(CharSequence refreshingLabel) { for (LoadingLayout layout : mLoadingLayouts) { layout.setRefreshingLabel(refreshingLabel); } } @Override public void setPullLabel(CharSequence label) { for (LoadingLayout layout : mLoadingLayouts) { layout.setPullLabel(label); } } @Override public void setReleaseLabel(CharSequence label) { for (LoadingLayout layout : mLoadingLayouts) { layout.setReleaseLabel(label); } } public void setTextTypeface(Typeface tf) { for (LoadingLayout layout : mLoadingLayouts) { layout.setTextTypeface(tf); } } }
[ "1006584058@qq.com" ]
1006584058@qq.com
459946a2f8c38cfac95ad46e365c2dcdb31d46ea
db86ad13bcef5aa6401a989621f2cc2bb199892e
/modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/security/SecurityResource.java
4d31c7a5373aa68f36309ec44a30f686943b8a37
[ "Apache-2.0" ]
permissive
fabianvo/swagger-core
8619839b45654de0cbb0cc08d586e08d80de43f2
4993709d403ba76225bd1489bcc2b3d91b44b523
refs/heads/master
2021-04-18T15:42:24.642246
2021-03-31T09:23:45
2021-03-31T09:23:45
249,558,793
0
1
Apache-2.0
2021-03-31T07:32:48
2020-03-23T22:33:11
null
UTF-8
Java
false
false
2,026
java
package io.swagger.v3.jaxrs2.petstore.security; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; import io.swagger.v3.oas.annotations.security.OAuthFlow; import io.swagger.v3.oas.annotations.security.OAuthFlows; import io.swagger.v3.oas.annotations.security.OAuthScope; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityScheme; import javax.ws.rs.GET; import javax.ws.rs.PATCH; import javax.ws.rs.PUT; import javax.ws.rs.Path; @SecurityScheme(name = "myOauth2Security", type = SecuritySchemeType.OAUTH2, in = SecuritySchemeIn.HEADER, description = "myOauthSecurity Description", flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = "http://x.com", scopes = @OAuthScope( name = "write:pets", description = "modify pets in your account")) ) ) @SecurityRequirement(name = "security_key", scopes = {"write:pets", "read:pets"} ) @SecurityRequirement(name = "myOauth2Security", scopes = {"write:pets"} ) @Path("/security") public class SecurityResource { @GET @Operation(operationId = "Operation Id", description = "description") @SecurityRequirement(name = "security_key", scopes = {"write:pets", "read:pets"} ) public void getSecurity() { } @PATCH @Operation(operationId = "Operation Id 2", description = "description 2") @SecurityRequirement(name = "security_key2", scopes = {"write:pets", "read:pets"} ) public void getSecurity2() { } @PUT @Operation(operationId = "Operation Id 3", description = "description 3", security = @SecurityRequirement(name = "security_key3", scopes = {"write:pets", "read:pets"} )) public void setSecurity(String security) { } }
[ "frantuma@yahoo.com" ]
frantuma@yahoo.com
8cf4f409a21341cdd4974b03542b57e21da8bda8
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/activiti-activiti/nonFlakyMethods/org.activiti.engine.test.api.runtime.ExecutionQueryTest-testQueryAllVariableTypes.java
b9e33ce183ce919f980e188652d71aa04c3523f6
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,094
java
@Deployment(resources={"org/activiti/engine/test/api/oneTaskProcess.bpmn20.xml"}) public void testQueryAllVariableTypes() throws Exception { Map<String,Object> vars=new HashMap<String,Object>(); vars.put("nullVar",null); vars.put("stringVar","string"); vars.put("longVar",10L); vars.put("doubleVar",1.2); vars.put("integerVar",1234); vars.put("booleanVar",true); vars.put("shortVar",(short)123); ProcessInstance processInstance=runtimeService.startProcessInstanceByKey("oneTaskProcess",vars); ExecutionQuery query=runtimeService.createExecutionQuery().variableValueEquals("nullVar",null).variableValueEquals("stringVar","string").variableValueEquals("longVar",10L).variableValueEquals("doubleVar",1.2).variableValueEquals("integerVar",1234).variableValueEquals("booleanVar",true).variableValueEquals("shortVar",(short)123); List<Execution> executions=query.list(); assertNotNull(executions); assertEquals(1,executions.size()); assertEquals(processInstance.getId(),executions.get(0).getId()); runtimeService.deleteProcessInstance(processInstance.getId(),"test"); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
4cdd59f18cd2f317cc5b75a334550d051556cc1d
d8e695d863aea3293e04efd91f01f4298adbc3a0
/apache-ode-1.3.5/ode-bpel-runtime/src/main/java/org/apache/ode/bpel/engine/InterceptorContextImpl.java
53c5fcd63bcdbaba9fa2b6a578ab85bd54497a9e
[]
no_license
polyu-lsgi-xiaofei/bpelcube
685469261d5ca9b7ee4c7288cf47a950d116b21f
45b371a9353209bcc7c4b868cbae2ce500f54e01
refs/heads/master
2021-01-13T02:31:47.445295
2012-11-01T16:20:11
2012-11-01T16:20:11
35,921,433
0
0
null
null
null
null
UTF-8
Java
false
false
2,343
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.ode.bpel.engine; import org.apache.ode.bpel.dao.BpelDAOConnection; import org.apache.ode.bpel.dao.ProcessDAO; import org.apache.ode.bpel.iapi.BpelEngine; import org.apache.ode.bpel.iapi.ProcessConf; import org.apache.ode.bpel.intercept.MessageExchangeInterceptor.InterceptorContext; /** * Implementation of the {@link org.apache.ode.bpel.intercept.MessageExchangeInterceptor.InterceptorContext} * interface. * @author Maciej Szefler (m s z e f l e r @ g m a i l . c o m) * */ public class InterceptorContextImpl implements InterceptorContext{ private ProcessDAO _processDao; private BpelDAOConnection _connection; private ProcessConf _pconf; private BpelEngine _bpelEngine; private BpelProcess _bpelProcess; public InterceptorContextImpl(BpelDAOConnection connection, ProcessDAO processDAO, ProcessConf pconf, BpelEngine bpelEngine, BpelProcess bpelProcess) { _connection = connection; _processDao = processDAO; _pconf = pconf; _bpelEngine = bpelEngine; _bpelProcess = bpelProcess; } public BpelDAOConnection getConnection() { return _connection; } public ProcessDAO getProcessDAO() { return _processDao; } public ProcessConf getProcessConf() { return _pconf; } public BpelEngine getBpelEngine() { return _bpelEngine; } public BpelProcess getBpelProcess() { return _bpelProcess; } }
[ "michael.pantazoglou@gmail.com@f004a122-f478-6e0f-c15d-9ccb889b5864" ]
michael.pantazoglou@gmail.com@f004a122-f478-6e0f-c15d-9ccb889b5864
e89f0a28de9499d1e2fb8a73ac5afaef149e7ed2
4f9939079c6e9590acfdda411c741d7d7800c454
/Clase02/MateService/src/pe/egcc/app/service/PromedioService.java
9630cc7155e24973745d1d0c03a05490c52aa91c
[]
no_license
gcoronelc/CEPSUNI_JAVA_OO_005
4a6fd2ee321c7b12b3fcbdfcb9ab4d840498694a
12fce63d9d04182566bb40a19664785f2f42830a
refs/heads/master
2021-01-19T08:51:07.678452
2017-06-26T07:12:03
2017-06-26T07:12:03
87,688,150
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package pe.egcc.app.service; public class PromedioService { public int promedio(int n1, int n2){ int pr = ( n1 + n2) / 2; return pr; } public int promedio(int n1, int n2, int n3){ return 0; } public int promedio(int n1, int n2, int n3, int n4){ return 0; } public int promedio(int n1, int n2, int n3, int n4, int n5){ return 0; } }
[ "gcoronelc@gmail.com" ]
gcoronelc@gmail.com
1ec81084efe99704359ad326a12bc58d6ae79923
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/appbrand/jsapi/a/f$3.java
7da5d3783b384db6393e72d92f947ad94fa14ec6
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
package com.tencent.mm.plugin.appbrand.jsapi.a; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import com.tencent.mm.ab.b; import com.tencent.mm.plugin.appbrand.page.p; import com.tencent.mm.protocal.c.ed; import com.tencent.mm.sdk.platformtools.x; class f$3 implements OnClickListener { final /* synthetic */ b dKr; final /* synthetic */ int doP; final /* synthetic */ p fJO; final /* synthetic */ f fKA; final /* synthetic */ ed fKw; f$3(f fVar, ed edVar, p pVar, int i, b bVar) { this.fKA = fVar; this.fKw = edVar; this.fJO = pVar; this.doP = i; this.dKr = bVar; } public final void onClick(DialogInterface dialogInterface, int i) { x.i("MicroMsg.JsApiRequestAuthUserAutoFillData", "do accept the auto fill data protocol"); this.fKw.reK = true; this.fJO.E(this.doP, this.fKA.f("ok", null)); com.tencent.mm.ipcinvoker.wx_extension.b.a(this.dKr, new 1(this)); } }
[ "707194831@qq.com" ]
707194831@qq.com
d752e4e208c716a1304c658b8b94f8bf7c2b6cb3
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/protocal/c/el.java
9ca0b875084387d3d077fd4200d53650869bf928
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,904
java
package com.tencent.mm.protocal.c; import f.a.a.b; import f.a.a.c.a; import java.util.LinkedList; public final class el extends bhd { public String dkY; public String eJK; public String hbP; public String iwO; public String iwP; public int qZe; public fi reP; public String reQ; public int reR; public String reS; public String reT; public bhy res; protected final int a(int i, Object... objArr) { int fS; if (i == 0) { a aVar = (a) objArr[0]; if (this.res == null) { throw new b("Not all required fields were included: AutoAuthKey"); } if (this.shX != null) { aVar.fV(1, this.shX.boi()); this.shX.a(aVar); } if (this.reP != null) { aVar.fV(2, this.reP.boi()); this.reP.a(aVar); } if (this.res != null) { aVar.fV(3, this.res.boi()); this.res.a(aVar); } if (this.dkY != null) { aVar.g(4, this.dkY); } if (this.reQ != null) { aVar.g(5, this.reQ); } aVar.fT(6, this.reR); if (this.reS != null) { aVar.g(7, this.reS); } if (this.eJK != null) { aVar.g(8, this.eJK); } if (this.hbP != null) { aVar.g(9, this.hbP); } if (this.reT != null) { aVar.g(10, this.reT); } if (this.iwP != null) { aVar.g(11, this.iwP); } if (this.iwO != null) { aVar.g(12, this.iwO); } aVar.fT(13, this.qZe); return 0; } else if (i == 1) { if (this.shX != null) { fS = f.a.a.a.fS(1, this.shX.boi()) + 0; } else { fS = 0; } if (this.reP != null) { fS += f.a.a.a.fS(2, this.reP.boi()); } if (this.res != null) { fS += f.a.a.a.fS(3, this.res.boi()); } if (this.dkY != null) { fS += f.a.a.b.b.a.h(4, this.dkY); } if (this.reQ != null) { fS += f.a.a.b.b.a.h(5, this.reQ); } fS += f.a.a.a.fQ(6, this.reR); if (this.reS != null) { fS += f.a.a.b.b.a.h(7, this.reS); } if (this.eJK != null) { fS += f.a.a.b.b.a.h(8, this.eJK); } if (this.hbP != null) { fS += f.a.a.b.b.a.h(9, this.hbP); } if (this.reT != null) { fS += f.a.a.b.b.a.h(10, this.reT); } if (this.iwP != null) { fS += f.a.a.b.b.a.h(11, this.iwP); } if (this.iwO != null) { fS += f.a.a.b.b.a.h(12, this.iwO); } return fS + f.a.a.a.fQ(13, this.qZe); } else if (i == 2) { f.a.a.a.a aVar2 = new f.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (fS = com.tencent.mm.bk.a.a(aVar2); fS > 0; fS = com.tencent.mm.bk.a.a(aVar2)) { if (!super.a(aVar2, this, fS)) { aVar2.cJS(); } } if (this.res != null) { return 0; } throw new b("Not all required fields were included: AutoAuthKey"); } else if (i != 3) { return -1; } else { f.a.a.a.a aVar3 = (f.a.a.a.a) objArr[0]; el elVar = (el) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); LinkedList IC; int size; byte[] bArr; com.tencent.mm.bk.a fkVar; f.a.a.a.a aVar4; boolean z; switch (intValue) { case 1: IC = aVar3.IC(intValue); size = IC.size(); for (intValue = 0; intValue < size; intValue++) { bArr = (byte[]) IC.get(intValue); fkVar = new fk(); aVar4 = new f.a.a.a.a(bArr, unknownTagHandler); for (z = true; z; z = fkVar.a(aVar4, fkVar, com.tencent.mm.bk.a.a(aVar4))) { } elVar.shX = fkVar; } return 0; case 2: IC = aVar3.IC(intValue); size = IC.size(); for (intValue = 0; intValue < size; intValue++) { bArr = (byte[]) IC.get(intValue); fkVar = new fi(); aVar4 = new f.a.a.a.a(bArr, unknownTagHandler); for (z = true; z; z = fkVar.a(aVar4, fkVar, com.tencent.mm.bk.a.a(aVar4))) { } elVar.reP = fkVar; } return 0; case 3: IC = aVar3.IC(intValue); size = IC.size(); for (intValue = 0; intValue < size; intValue++) { bArr = (byte[]) IC.get(intValue); fkVar = new bhy(); aVar4 = new f.a.a.a.a(bArr, unknownTagHandler); for (z = true; z; z = fkVar.a(aVar4, fkVar, com.tencent.mm.bk.a.a(aVar4))) { } elVar.res = fkVar; } return 0; case 4: elVar.dkY = aVar3.vHC.readString(); return 0; case 5: elVar.reQ = aVar3.vHC.readString(); return 0; case 6: elVar.reR = aVar3.vHC.rY(); return 0; case 7: elVar.reS = aVar3.vHC.readString(); return 0; case 8: elVar.eJK = aVar3.vHC.readString(); return 0; case 9: elVar.hbP = aVar3.vHC.readString(); return 0; case 10: elVar.reT = aVar3.vHC.readString(); return 0; case 11: elVar.iwP = aVar3.vHC.readString(); return 0; case 12: elVar.iwO = aVar3.vHC.readString(); return 0; case 13: elVar.qZe = aVar3.vHC.rY(); return 0; default: return -1; } } } }
[ "707194831@qq.com" ]
707194831@qq.com
831b3d649babef273ffe0c3a534a86514372b8f0
58c8a98690df436d67246389631f3c6999331f0e
/jdroid-android/src/main/java/com/jdroid/android/gcm/GcmMessageResolver.java
6d97958da55f3bab226003df1792aa428671a907
[ "Apache-2.0" ]
permissive
githubzoujiayun/jdroid
fca05dc4c2e3f9462fa1118cbd6cbdf84ff6c4e3
9286b6c1e8ad5187921ab1c1338a26c97e3659e9
refs/heads/master
2021-01-16T00:04:16.829387
2015-03-25T04:09:37
2015-03-25T04:09:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
152
java
package com.jdroid.android.gcm; import android.content.Intent; public interface GcmMessageResolver { public GcmMessage resolve(Intent intent); }
[ "maxirosson@gmail.com" ]
maxirosson@gmail.com
da1d6cad4e9df666b22dbcd2f978de2ff955c86a
01d6b951ce24b3d2c89b1ffa18fd79aaa9c4599c
/src/com/google/android/gms/internal/aj.java
ac0d61e5b774eb14be5c67d3455402ba05e46b5d
[]
no_license
mohsenuss91/KGBANDROID
1a5cc246bf17b85dae4733c10a48cc2c34f978fd
a2906e3de617b66c5927a4d1fd85f6a3c6ed89d0
refs/heads/master
2016-09-03T06:45:38.912322
2015-03-08T12:03:35
2015-03-08T12:03:35
31,847,141
0
0
null
null
null
null
UTF-8
Java
false
false
1,568
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.internal; import android.location.Location; import android.os.Bundle; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import java.util.List; // Referenced classes of package com.google.android.gms.internal: // ak, ax public final class aj implements SafeParcelable { public static final ak CREATOR = new ak(); public final Bundle extras; public final long lQ; public final int lR; public final List lS; public final boolean lT; public final int lU; public final boolean lV; public final String lW; public final ax lX; public final Location lY; public final String lZ; public final Bundle ma; public final int versionCode; public aj(int i, long l, Bundle bundle, int j, List list, boolean flag, int k, boolean flag1, String s, ax ax, Location location, String s1, Bundle bundle1) { versionCode = i; lQ = l; extras = bundle; lR = j; lS = list; lT = flag; lU = k; lV = flag1; lW = s; lX = ax; lY = location; lZ = s1; ma = bundle1; } public final int describeContents() { return 0; } public final void writeToParcel(Parcel parcel, int i) { ak.a(this, parcel, i); } }
[ "mohsenuss91@hotmail.com" ]
mohsenuss91@hotmail.com
a4032fe62d4cc01f6977b9723e0aa95cb5049679
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_8_buggy/mutated/11/Cleaner.java
628eb22d029e03cdb2897e03784497b4d97ea7c2
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,599
java
package org.jsoup.safety; import org.jsoup.helper.Validate; import org.jsoup.nodes.Attribute; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.DataNode; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.nodes.Node; import org.jsoup.nodes.TextNode; import org.jsoup.parser.Tag; import org.jsoup.select.NodeTraversor; import org.jsoup.select.NodeVisitor; import java.util.List; /** The whitelist based HTML cleaner. Use to ensure that end-user provided HTML contains only the elements and attributes that you are expecting; no junk, and no cross-site scripting attacks! <p> The HTML cleaner parses the input as HTML and then runs it through a white-list, so the output HTML can only contain HTML that is allowed by the whitelist. </p> <p> It is assumed that the input HTML is a body fragment; the clean methods only pull from the source's body, and the canned white-lists only allow body contained tags. </p> <p> Rather than interacting directly with a Cleaner object, generally see the {@code clean} methods in {@link org.jsoup.Jsoup}. </p> */ public class Cleaner { private Whitelist whitelist; /** Create a new cleaner, that sanitizes documents using the supplied whitelist. @param whitelist white-list to clean with */ public Cleaner(Whitelist whitelist) { Validate.notNull(whitelist); this.whitelist = whitelist; } /** Creates a new, clean document, from the original dirty document, containing only elements allowed by the whitelist. The original document is not modified. Only elements from the dirt document's <code>body</code> are used. @param dirtyDocument Untrusted base document to clean. @return cleaned document. */ public Document clean(Document dirtyDocument) { Validate.notNull(dirtyDocument); Document clean = Document.createShell(dirtyDocument.baseUri()); if (dirtyDocument.body() != null) // frameset documents won't have a body. the clean doc will have empty body. copySafeNodes(dirtyDocument.body(), clean.body()); return clean; } /** Determines if the input document <b>body</b>is valid, against the whitelist. It is considered valid if all the tags and attributes in the input HTML are allowed by the whitelist, and that there is no content in the <code>head</code>. <p> This method can be used as a validator for user input. An invalid document will still be cleaned successfully using the {@link #clean(Document)} document. If using as a validator, it is recommended to still clean the document to ensure enforced attributes are set correctly, and that the output is tidied. </p> @param dirtyDocument document to test @return true if no tags or attributes need to be removed; false if they do */ public boolean isValid(Document dirtyDocument) { Validate.notNull(dirtyDocument); Document clean = Document.createShell(dirtyDocument.baseUri()); int numDiscarded = copySafeNodes(destination.body(), clean.body()); return numDiscarded == 0; } /** Iterates the input and copies trusted nodes (tags, attributes, text) into the destination. */ private final class CleaningVisitor implements NodeVisitor { private int numDiscarded = 0; private final Element root; private Element destination; // current element to append nodes to private CleaningVisitor(Element root, Element destination) { this.root = root; this.destination = destination; } public void head(Node source, int depth) { if (source instanceof Element) { Element sourceEl = (Element) source; if (whitelist.isSafeTag(sourceEl.tagName())) { // safe, clone and copy safe attrs ElementMeta meta = createSafeElement(sourceEl); Element destChild = meta.el; destination.appendChild(destChild); numDiscarded += meta.numAttribsDiscarded; destination = destChild; } else if (source != root) { // not a safe tag, so don't add. don't count root against discarded. numDiscarded++; } } else if (source instanceof TextNode) { TextNode sourceText = (TextNode) source; TextNode destText = new TextNode(sourceText.getWholeText(), source.baseUri()); destination.appendChild(destText); } else if (source instanceof DataNode && whitelist.isSafeTag(source.parent().nodeName())) { DataNode sourceData = (DataNode) source; DataNode destData = new DataNode(sourceData.getWholeData(), source.baseUri()); destination.appendChild(destData); } else { // else, we don't care about comments, xml proc instructions, etc numDiscarded++; } } public void tail(Node source, int depth) { if (source instanceof Element && whitelist.isSafeTag(source.nodeName())) { destination = destination.parent(); // would have descended, so pop destination stack } } } private int copySafeNodes(Element source, Element dest) { CleaningVisitor cleaningVisitor = new CleaningVisitor(source, dest); NodeTraversor traversor = new NodeTraversor(cleaningVisitor); traversor.traverse(source); return cleaningVisitor.numDiscarded; } private ElementMeta createSafeElement(Element sourceEl) { String sourceTag = sourceEl.tagName(); Attributes destAttrs = new Attributes(); Element dest = new Element(Tag.valueOf(sourceTag), sourceEl.baseUri(), destAttrs); int numDiscarded = 0; Attributes sourceAttrs = sourceEl.attributes(); for (Attribute sourceAttr : sourceAttrs) { if (whitelist.isSafeAttribute(sourceTag, sourceEl, sourceAttr)) destAttrs.put(sourceAttr); else numDiscarded++; } Attributes enforcedAttrs = whitelist.getEnforcedAttributes(sourceTag); destAttrs.addAll(enforcedAttrs); return new ElementMeta(dest, numDiscarded); } private static class ElementMeta { Element el; int numAttribsDiscarded; ElementMeta(Element el, int numAttribsDiscarded) { this.el = el; this.numAttribsDiscarded = numAttribsDiscarded; } } }
[ "justinwm@163.com" ]
justinwm@163.com
2da03d8c17b9ebad6ae6a15aba30e439ffa29259
7cab112a472df702c9b616c760b8940d50324550
/aionxemu-master/GameServer/src/gameserver/model/gameobjects/player/Friend.java
8875c3940e07709e0f2c537345c7a328f9031699
[]
no_license
luckychenheng/server_demo
86d31c939fd895c7576156b643ce89354e102209
97bdcb1f6cd614fd360cfed800c479fbdb695cd3
refs/heads/master
2020-05-15T02:59:07.396818
2019-05-09T10:30:47
2019-05-09T10:30:47
182,059,222
2
0
null
null
null
null
UTF-8
Java
false
false
2,544
java
/** * This file is part of Aion X Emu <aionxemu.com> * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with this software. If not, see <http://www.gnu.org/licenses/>. */ package gameserver.model.gameobjects.player; import gameserver.model.PlayerClass; import gameserver.model.gameobjects.player.FriendList.Status; /** * @author Ben */ public class Friend { private final PlayerCommonData pcd; public Friend(PlayerCommonData pcd) { this.pcd = pcd; } /** * Returns the status of this player * * @return Friend's status */ public Status getStatus() { if (pcd.getPlayer() == null || !pcd.isOnline())//second check is temporary { return FriendList.Status.OFFLINE; } return pcd.getPlayer().getFriendList().getStatus(); } /** * Returns this friend's name * * @return Friend's name */ public String getName() { return pcd.getName(); } public int getLevel() { return pcd.getLevel(); } public String getNote() { return pcd.getNote(); } public PlayerClass getPlayerClass() { return pcd.getPlayerClass(); } public int getMapId() { return pcd.getPosition().getMapId(); } /** * Gets the last time this player was online as a unix timestamp<br /> * Returns 0 if the player is online now * * @return Unix timestamp the player was last online */ public int getLastOnlineTime() { if (pcd.getLastOnline() == null || isOnline()) return 0; return (int) (pcd.getLastOnline().getTime() / 1000); // Convert to int, unix time format (ms -> seconds) } public int getOid() { return pcd.getPlayerObjId(); } public Player getPlayer() { return pcd.getPlayer(); } public boolean isOnline() { return pcd.isOnline(); } }
[ "seemac@seedeMacBook-Pro.local" ]
seemac@seedeMacBook-Pro.local
148d3be7c8160222fdb1ec751b15b64ecaaa18a0
365b59229710d5b387e00f924ac0087102cb97c9
/framework/jcompany_model/src/main/java/com/powerlogic/jcompany/model/bindingtype/PlcEditBefore.java
525658fe1f080e5f5ac1977b265c847eebfd52d4
[]
no_license
iecker/jaguar615
a8045ad4729b8fe572d13cb91239b9cca81d5383
4b2658738dac4fb93dd52489de640c7f3de4e782
refs/heads/master
2020-04-21T15:20:20.126020
2018-05-25T15:14:03
2018-05-25T15:14:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
749
java
/* Jaguar-jCompany Developer Suite. Powerlogic 2010-2014. Please read licensing information in your installation directory.Contact Powerlogic for more information or contribute with this project: suporte@powerlogic.com.br - www.powerlogic.com.br */ package com.powerlogic.jcompany.model.bindingtype; /** * * PlcEditBefore * */ @javax.inject.Qualifier @java.lang.annotation.Retention(value=java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(value={java.lang.annotation.ElementType.FIELD,java.lang.annotation.ElementType.PARAMETER}) public @interface PlcEditBefore { }
[ "josivan.silva@castgroup.com.br" ]
josivan.silva@castgroup.com.br
3ba73545431eb7016ecff58930dc6671e53e905f
292e15ba7d39627fefb17be79edb918684382977
/orange-demo-single-service-for-app/common/common-core/src/main/java/com/orange/demo/common/core/constant/ApplicationConstant.java
a02a7db99701ea084021112777b150de462687e0
[ "Apache-2.0" ]
permissive
tinyxiao/orange-admin
65a6c1db7356b185273188e4aa46eced8ec3901c
85d21d026a6233fa07f857eba68d4b0efe7ea772
refs/heads/master
2023-01-06T09:27:00.123534
2020-11-01T06:27:51
2020-11-01T06:27:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,736
java
package com.orange.demo.common.core.constant; /** * 应用程序的常量声明对象。 * * @author Jerry * @date 2020-09-24 */ public final class ApplicationConstant { /** * 图片文件上传的父目录。 */ public static final String UPLOAD_IMAGE_PARENT_PATH = "image"; /** * 附件文件上传的父目录。 */ public static final String UPLOAD_ATTACHMENT_PARENT_PATH = "attachment"; /** * CSV文件扩展名。 */ public static final String CSV_EXT = "csv"; /** * XLSX文件扩展名。 */ public static final String XLSX_EXT = "xlsx"; /** * 统计分类计算时,按天聚合计算的常量值。(前端在MyOrderParam和MyGroupParam中传给后台) */ public static final String DAY_AGGREGATION = "day"; /** * 统计分类计算时,按月聚合计算的常量值。(前端在MyOrderParam和MyGroupParam中传给后台) */ public static final String MONTH_AGGREGATION = "month"; /** * 统计分类计算时,按年聚合计算的常量值。(前端在MyOrderParam和MyGroupParam中传给后台) */ public static final String YEAR_AGGREGATION = "year"; /** * 请求头跟踪id名。 */ public static final String HTTP_HEADER_TRACE_ID = "traceId"; /** * 重要说明:该值为项目生成后的缺省密钥,仅为使用户可以快速上手并跑通流程。 * 在实际的应用中,一定要为不同的项目或服务,自行生成公钥和私钥,并将 PRIVATE_KEY 的引用改为服务的配置项。 * 密钥的生成方式,可通过执行common.core.util.RsaUtil类的main函数动态生成。 */ public static final String PRIVATE_KEY = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKkLhAydtOtA4WuIkkIIUVaGWu4ElOEAQF9GTulHHWOwCHI1UvcKolvS1G+mdsKcmGtEAQ92AUde/kDRGu8Wn7kLDtCgUfo72soHz7Qfv5pVB4ohMxQd/9cxeKjKbDoirhB9Z3xGF20zUozp4ZPLxpTtI7azr0xzUtd5+D/HfLDrAgMBAAECgYEApESZhDz4YyeAJiPnpJ06lS8oS2VOWzsIUs0av5uoloeoHXtt7Lx7u2kroHeNrl3Hy2yg7ypH4dgQkGHin3VHrVAgjG3TxhgBXIqqntzzk2AGJKBeIIkRX86uTvtKZyp3flUgcwcGmpepAHS1V1DPY3aVYvbcqAmoL6DX6VYN0NECQQDQUitMdC76lEtAr5/ywS0nrZJDo6U7eQ7ywx/eiJ+YmrSye8oorlAj1VBWG+Cl6jdHOHtTQyYv/tu71fjzQiJTAkEAz7wb47/vcSUpNWQxItFpXz0o6rbJh71xmShn1AKP7XptOVZGlW9QRYEzHabV9m/DHqI00cMGhHrWZAhCiTkUCQJAFsJjaJ7o4weAkTieyO7B+CvGZw1h5/V55Jvcx3s1tH5yb22G0Jr6tm9/r2isSnQkReutzZLwgR3e886UvD7lcQJAAUcD2OOuQkDbPwPNtYwaHMbQgJj9JkOI9kskUE5vuiMdltOr/XFAyhygRtdmy2wmhAK1VnDfkmL6/IR8fEGImQJABOB0KCalb0M8CPnqqHzozrD8gPObnIIr4aVvLIPATN2g7MM2N6F7JbI4RZFiKa92LV6bhQCY8OvHi5K2cgFpbw=="; /** * 私有构造函数,明确标识该常量类的作用。 */ private ApplicationConstant() { } }
[ "707344974@qq.com" ]
707344974@qq.com
97b512be2bd39663d0171d1441fb831ebb053887
defcf1150a76cd477a68f75c1c4775aeae534fc7
/src/main/java/org/jkiss/jdbc/cassandra/types/JdbcLong.java
f424eae0f017b91c7cd32acb47ddcc7eb6fba6ce
[ "Apache-2.0" ]
permissive
ralic/cassandra-jdbc
a6812c06bc3773854c9d7c9f362456671969da10
beb7d6583257fdb5c7e891ba3781a8d8182d9502
refs/heads/master
2021-01-02T22:51:58.760205
2017-07-10T20:29:44
2017-07-10T20:29:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,289
java
package org.jkiss.jdbc.cassandra.types; /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ import org.jkiss.jdbc.cassandra.CassandraUtils; import java.nio.ByteBuffer; import java.sql.Types; public class JdbcLong extends AbstractJdbcType<Long> { public static final JdbcLong instance = new JdbcLong(); JdbcLong() { } public boolean isCaseSensitive() { return false; } public int getScale(Long obj) { return 0; } public int getPrecision(Long obj) { return obj.toString().length(); } public boolean isCurrency() { return false; } public boolean isSigned() { return true; } public String toString(Long obj) { return obj.toString(); } public boolean needsQuotes() { return false; } public String getString(ByteBuffer bytes) { if (bytes.remaining() == 0) { return ""; } if (bytes.remaining() != 8) { throw new MarshalException("A long is exactly 8 bytes: " + bytes.remaining()); } return String.valueOf(bytes.getLong(bytes.position())); } public Class<Long> getType() { return Long.class; } public int getJdbcType() { return Types.BIGINT; } public Long compose(ByteBuffer bytes) { return CassandraUtils.toLong(bytes); } public ByteBuffer decompose(Long value) { return CassandraUtils.bytes(value); } }
[ "serge@jkiss.org" ]
serge@jkiss.org
0b4738500712a57335d39efe78d593ef0b84a71d
49a41679884e46c12e07c7f606a41f3672a48f45
/jmx-http/src/test/java/io/airlift/jmx/TestMBeanResource.java
424f82ffd708f79a78f4cd80825b91d532240da3
[ "Apache-2.0" ]
permissive
rikima/airlift
9f8b0df8706c579a2537e9d812e02a2d4129fe3b
515a3cc31c391b2e7810740a2d92b739572d360f
refs/heads/master
2021-01-18T14:53:53.974434
2014-02-06T06:17:40
2014-02-06T06:17:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,571
java
package io.airlift.jmx; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableList; import com.google.common.net.MediaType; import com.google.inject.Binder; import com.google.inject.Injector; import com.google.inject.Module; import io.airlift.bootstrap.Bootstrap; import io.airlift.bootstrap.LifeCycleManager; import io.airlift.http.client.ApacheHttpClient; import io.airlift.http.client.HttpClient; import io.airlift.http.client.Request; import io.airlift.http.server.testing.TestingHttpServer; import io.airlift.http.server.testing.TestingHttpServerModule; import io.airlift.jaxrs.JaxrsModule; import io.airlift.json.JsonModule; import io.airlift.json.ObjectMapperProvider; import io.airlift.node.testing.TestingNodeModule; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import javax.management.MBeanServer; import javax.management.ObjectName; import java.io.IOException; import java.lang.management.ManagementFactory; import java.net.URI; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import static com.google.common.net.HttpHeaders.CONTENT_TYPE; import static com.google.common.net.MediaType.HTML_UTF_8; import static com.google.common.net.MediaType.JSON_UTF_8; import static io.airlift.http.client.HttpUriBuilder.uriBuilderFrom; import static io.airlift.http.client.Request.Builder.prepareGet; import static io.airlift.http.client.StringResponseHandler.StringResponse; import static io.airlift.http.client.StringResponseHandler.createStringResponseHandler; import static io.airlift.testing.Assertions.assertContains; import static io.airlift.testing.Assertions.assertEqualsIgnoreOrder; import static java.lang.management.ManagementFactory.MEMORY_MXBEAN_NAME; import static java.lang.management.ManagementFactory.RUNTIME_MXBEAN_NAME; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; public class TestMBeanResource { public final MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer(); private LifeCycleManager lifeCycleManager; private TestingHttpServer server; private HttpClient client; @BeforeMethod public void setup() throws Exception { Bootstrap app = new Bootstrap( new TestingNodeModule(), new TestingHttpServerModule(), new JsonModule(), new JaxrsModule(), new JmxHttpModule(), new Module() { @Override public void configure(Binder binder) { binder.bind(MBeanServer.class).toInstance(mbeanServer); } }); Injector injector = app .strictConfig() .doNotInitializeLogging() .initialize(); lifeCycleManager = injector.getInstance(LifeCycleManager.class); server = injector.getInstance(TestingHttpServer.class); client = new ApacheHttpClient(); } @AfterMethod public void teardown() throws Exception { if (lifeCycleManager != null) { lifeCycleManager.stop(); } } @DataProvider(name = "mbeanNames") public Iterator<Object[]> createMBeanNames() { List<String> names = getMBeanNames(); ImmutableList.Builder<Object[]> data = ImmutableList.builder(); for (String name : names) { data.add(new Object[] {name}); } return data.build().iterator(); } @Test public void testGetHtmlPage() throws Exception { StringResponse response = client.execute( prepareGet().setUri(uriFor("/v1/jmx")).build(), createStringResponseHandler()); assertEquals(response.getStatusCode(), 200); assertContentType(response, HTML_UTF_8); assertContains(response.getBody(), "<html>"); } @Test public void testGetMBeans() throws Exception { assertMBeansResponse(jsonRequest(uriFor("/v1/jmx/mbean"))); } @Test public void testGetMBeansJsonp() throws Exception { assertMBeansResponse(jsonpRequest(uriFor("/v1/jmx/mbean"))); } private void assertMBeansResponse(JsonNode mbeans) { List<String> names = new ArrayList<>(); for (JsonNode mbean : mbeans) { JsonNode name = mbean.get("objectName"); assertTrue(name.isTextual()); names.add(name.asText()); } assertTrue(names.contains(MEMORY_MXBEAN_NAME)); assertTrue(names.contains(RUNTIME_MXBEAN_NAME)); assertEqualsIgnoreOrder(names, getMBeanNames()); } @Test(dataProvider = "mbeanNames") public void testGetMBean(String mbeanName) throws Exception { URI uri = uriBuilderFrom(uriFor("/v1/jmx/mbean")) .appendPath(mbeanName) .build(); JsonNode mbean = jsonRequest(uri); JsonNode name = mbean.get("objectName"); assertTrue(name.isTextual()); assertEquals(name.asText(), mbeanName); } @Test(dataProvider = "mbeanNames") public void testGetMBeanJsonp(String mbeanName) throws Exception { URI uri = uriBuilderFrom(uriFor("/v1/jmx/mbean")) .appendPath(mbeanName) .build(); JsonNode mbean = jsonpRequest(uri); JsonNode name = mbean.get("objectName"); assertTrue(name.isTextual()); assertEquals(name.asText(), mbeanName); } private JsonNode jsonRequest(URI uri) throws IOException { Request request = prepareGet().setUri(uri).build(); StringResponse response = client.execute(request, createStringResponseHandler()); assertEquals(response.getStatusCode(), 200, response.getBody()); assertContentType(response, JSON_UTF_8); return new ObjectMapperProvider().get().readTree(response.getBody()); } private JsonNode jsonpRequest(URI uri) throws IOException { uri = uriBuilderFrom(uri) .addParameter("jsonp", "test") .build(); Request request = prepareGet().setUri(uri).build(); StringResponse response = client.execute(request, createStringResponseHandler()); assertEquals(response.getStatusCode(), 200, response.getBody()); assertContentType(response, JSON_UTF_8); String jsonp = response.getBody().trim(); assertTrue(jsonp.startsWith("test("), jsonp); assertTrue(jsonp.endsWith(")"), jsonp); jsonp = jsonp.substring(5, jsonp.length() - 1); return new ObjectMapperProvider().get().readTree(jsonp); } private URI uriFor(String path) { return server.getBaseUrl().resolve(path); } private List<String> getMBeanNames() { ImmutableList.Builder<String> list = ImmutableList.builder(); for (ObjectName objectName : mbeanServer.queryNames(ObjectName.WILDCARD, null)) { list.add(objectName.toString()); } return list.build(); } private static void assertContentType(StringResponse response, MediaType type) { String contentType = response.getHeader(CONTENT_TYPE); assertTrue(MediaType.parse(contentType).is(type.withoutParameters()), contentType); } }
[ "david@acz.org" ]
david@acz.org
b659a11b4e3c918e46a6139ea2d225110dda1f61
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/protocal/protobuf/qb.java
606ebec073d25610daea5190c44d5597e23c46d1
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
3,744
java
package com.tencent.mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.LinkedList; public final class qb extends bsr { public String vXe; public String vXf; public boolean vXg; public final int op(int paramInt, Object[] paramArrayOfObject) { int i = 0; AppMethodBeat.i(94514); if (paramInt == 0) { paramArrayOfObject = (e.a.a.c.a)paramArrayOfObject[0]; if (this.BaseRequest != null) { paramArrayOfObject.iy(1, this.BaseRequest.computeSize()); this.BaseRequest.writeFields(paramArrayOfObject); } if (this.vXe != null) paramArrayOfObject.e(2, this.vXe); if (this.vXf != null) paramArrayOfObject.e(3, this.vXf); paramArrayOfObject.aO(4, this.vXg); AppMethodBeat.o(94514); paramInt = i; return paramInt; } if (paramInt == 1) if (this.BaseRequest == null) break label497; label497: for (i = e.a.a.a.ix(1, this.BaseRequest.computeSize()) + 0; ; i = 0) { paramInt = i; if (this.vXe != null) paramInt = i + e.a.a.b.b.a.f(2, this.vXe); i = paramInt; if (this.vXf != null) i = paramInt + e.a.a.b.b.a.f(3, this.vXf); paramInt = i + (e.a.a.b.b.a.fv(4) + 1); AppMethodBeat.o(94514); break; if (paramInt == 2) { paramArrayOfObject = new e.a.a.a.a((byte[])paramArrayOfObject[0], unknownTagHandler); for (paramInt = bsr.getNextFieldNumber(paramArrayOfObject); paramInt > 0; paramInt = bsr.getNextFieldNumber(paramArrayOfObject)) if (!super.populateBuilderWithField(paramArrayOfObject, this, paramInt)) paramArrayOfObject.ems(); AppMethodBeat.o(94514); paramInt = i; break; } if (paramInt == 3) { Object localObject1 = (e.a.a.a.a)paramArrayOfObject[0]; qb localqb = (qb)paramArrayOfObject[1]; paramInt = ((Integer)paramArrayOfObject[2]).intValue(); switch (paramInt) { default: paramInt = -1; AppMethodBeat.o(94514); break; case 1: paramArrayOfObject = ((e.a.a.a.a)localObject1).Vh(paramInt); int j = paramArrayOfObject.size(); for (paramInt = 0; paramInt < j; paramInt++) { Object localObject2 = (byte[])paramArrayOfObject.get(paramInt); localObject1 = new hl(); localObject2 = new e.a.a.a.a((byte[])localObject2, unknownTagHandler); for (boolean bool = true; bool; bool = ((hl)localObject1).populateBuilderWithField((e.a.a.a.a)localObject2, (com.tencent.mm.bt.a)localObject1, bsr.getNextFieldNumber((e.a.a.a.a)localObject2))); localqb.BaseRequest = ((hl)localObject1); } AppMethodBeat.o(94514); paramInt = i; break; case 2: localqb.vXe = ((e.a.a.a.a)localObject1).BTU.readString(); AppMethodBeat.o(94514); paramInt = i; break; case 3: localqb.vXf = ((e.a.a.a.a)localObject1).BTU.readString(); AppMethodBeat.o(94514); paramInt = i; break; case 4: localqb.vXg = ((e.a.a.a.a)localObject1).BTU.ehX(); AppMethodBeat.o(94514); paramInt = i; break; } } paramInt = -1; AppMethodBeat.o(94514); break; } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes-dex2jar.jar * Qualified Name: com.tencent.mm.protocal.protobuf.qb * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
a35052107caab8479a9bbe5f079e8c1e016860da
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Ibotta_com.ibotta.android/javafiles/com/facebook/share/model/CameraEffectTextures$Builder.java
4e2609a3b7f51f01b25c32147e73d2f60dbabbc8
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
3,581
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.facebook.share.model; import android.os.Bundle; import android.os.Parcel; // Referenced classes of package com.facebook.share.model: // ShareModelBuilder, CameraEffectTextures, ShareModel public static class CameraEffectTextures$Builder implements ShareModelBuilder { public CameraEffectTextures build() { return new CameraEffectTextures(this, ((CameraEffectTextures._cls1) (null))); // 0 0:new #9 <Class CameraEffectTextures> // 1 3:dup // 2 4:aload_0 // 3 5:aconst_null // 4 6:invokespecial #29 <Method void CameraEffectTextures(CameraEffectTextures$Builder, CameraEffectTextures$1)> // 5 9:areturn } public volatile Object build() { return ((Object) (build())); // 0 0:aload_0 // 1 1:invokevirtual #32 <Method CameraEffectTextures build()> // 2 4:areturn } public CameraEffectTextures$Builder readFrom(Parcel parcel) { return readFrom((CameraEffectTextures)parcel.readParcelable(((Class) (com/facebook/share/model/CameraEffectTextures)).getClassLoader())); // 0 0:aload_0 // 1 1:aload_1 // 2 2:ldc1 #9 <Class CameraEffectTextures> // 3 4:invokevirtual #40 <Method ClassLoader Class.getClassLoader()> // 4 7:invokevirtual #46 <Method android.os.Parcelable Parcel.readParcelable(ClassLoader)> // 5 10:checkcast #9 <Class CameraEffectTextures> // 6 13:invokevirtual #49 <Method CameraEffectTextures$Builder readFrom(CameraEffectTextures)> // 7 16:areturn } public CameraEffectTextures$Builder readFrom(CameraEffectTextures cameraeffecttextures) { if(cameraeffecttextures != null) //* 0 0:aload_1 //* 1 1:ifnull 15 textures.putAll(CameraEffectTextures.access$100(cameraeffecttextures)); // 2 4:aload_0 // 3 5:getfield #21 <Field Bundle textures> // 4 8:aload_1 // 5 9:invokestatic #53 <Method Bundle CameraEffectTextures.access$100(CameraEffectTextures)> // 6 12:invokevirtual #57 <Method void Bundle.putAll(Bundle)> return this; // 7 15:aload_0 // 8 16:areturn } public volatile ShareModelBuilder readFrom(ShareModel sharemodel) { return ((ShareModelBuilder) (readFrom((CameraEffectTextures)sharemodel))); // 0 0:aload_0 // 1 1:aload_1 // 2 2:checkcast #9 <Class CameraEffectTextures> // 3 5:invokevirtual #49 <Method CameraEffectTextures$Builder readFrom(CameraEffectTextures)> // 4 8:areturn } private Bundle textures; /* static Bundle access$000(CameraEffectTextures$Builder cameraeffecttextures$builder) { return cameraeffecttextures$builder.textures; // 0 0:aload_0 // 1 1:getfield #21 <Field Bundle textures> // 2 4:areturn } */ public CameraEffectTextures$Builder() { // 0 0:aload_0 // 1 1:invokespecial #16 <Method void Object()> textures = new Bundle(); // 2 4:aload_0 // 3 5:new #18 <Class Bundle> // 4 8:dup // 5 9:invokespecial #19 <Method void Bundle()> // 6 12:putfield #21 <Field Bundle textures> // 7 15:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
1d2c75cccbf28f0d1c41707c929db016359313e9
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-msf4j/generated/src/gen/java/org/openapitools/model/AdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties.java
ec5b549f2ba94485c54681a9f03f53ec195a2960
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
2,358
java
package org.openapitools.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.ConfigNodePropertyArray; /** * AdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen", date = "2019-08-05T00:54:29.762Z[GMT]") public class AdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties { @JsonProperty("fontList") private ConfigNodePropertyArray fontList = null; public AdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties fontList(ConfigNodePropertyArray fontList) { this.fontList = fontList; return this; } /** * Get fontList * @return fontList **/ @ApiModelProperty(value = "") public ConfigNodePropertyArray getFontList() { return fontList; } public void setFontList(ConfigNodePropertyArray fontList) { this.fontList = fontList; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties adaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties = (AdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties) o; return Objects.equals(this.fontList, adaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties.fontList); } @Override public int hashCode() { return Objects.hash(fontList); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigurProperties {\n"); sb.append(" fontList: ").append(toIndentedString(fontList)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
0e141a7b224e29e08e8108891d50476906de9f3e
f15e22ff9b0231b69b5c647353712bfcd1baad66
/hello-app/src/main/java/com/example/hello/env/LocalSettingsEnvironmentPostProcessor.java
5fb7d7b1dd77fff26cb1d302319a80000009fe35
[]
no_license
oucem/hello-service-auto-configuration
4b3ecf32588dd9345334fc94c94c798f07b231b1
6106c2cb1fa83ef10edd00f5f79fa67f3053d777
refs/heads/master
2022-11-26T05:42:58.331825
2020-08-09T16:13:43
2020-08-09T16:13:43
274,227,820
0
0
null
2020-06-22T19:46:12
2020-06-22T19:46:11
null
UTF-8
Java
false
false
2,049
java
package com.example.hello.env; import java.io.File; import java.io.IOException; import java.util.Properties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.env.EnvironmentPostProcessor; import org.springframework.core.env.CommandLinePropertySource; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertiesPropertySource; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.support.PropertiesLoaderUtils; public class LocalSettingsEnvironmentPostProcessor implements EnvironmentPostProcessor { private static final String LOCATION = ".hello/settings"; private static final Logger logger = LoggerFactory .getLogger(LocalSettingsEnvironmentPostProcessor.class); @Override public void postProcessEnvironment(ConfigurableEnvironment configurableEnvironment, SpringApplication springApplication) { File file = new File(System.getProperty("user.home"), LOCATION); if (file.exists()) { MutablePropertySources propertySources = configurableEnvironment.getPropertySources(); logger.info("Loading local settings from " + file.getAbsolutePath()); Properties properties = loadProperties(file); if (propertySources.contains( CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME)) { propertySources.addAfter( CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME, new PropertiesPropertySource("hello-local", properties)); } else { propertySources .addFirst(new PropertiesPropertySource("hello-local", properties)); } } } private Properties loadProperties(File f) { FileSystemResource resource = new FileSystemResource(f); try { return PropertiesLoaderUtils.loadProperties(resource); } catch (IOException ex) { throw new IllegalStateException("Failed to load local settings from " + f.getAbsolutePath(), ex); } } }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
154c6053b8108177f06c81f6d00229d6ad536dc8
ec95ec759f3d3270967aa4e59dffddfec9f4a80f
/LeetCode_LinkedList/src/Le_369_Plus_One_Linked_List.java
3a180d6de66777ab5c8f9761fddd5973680d5b4f
[]
no_license
guccio618/myLeetcode
3ccf037f0b917c13967e2bbbee7d04ff8dba68bc
a51c874144964435fca7752b83dcbcc52db37a4b
refs/heads/master
2021-01-13T14:59:31.182538
2017-01-26T04:47:40
2017-01-26T04:47:40
76,620,835
2
1
null
null
null
null
UTF-8
Java
false
false
2,219
java
/****** * Given a non-negative number represented as a singly linked list of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. Example: Input: 1->2->3 Output: 1->2->4 * * */ public class Le_369_Plus_One_Linked_List { // test case: [9], [1,9,9] // solution 1: using reverse list, time is O(n) public ListNode plusOne(ListNode head) { ListNode dummy = new ListNode(0); dummy.next = head; int addOneFlag = 1; dummy.next = reverseList(dummy.next); ListNode node = dummy; while(node.next != null && addOneFlag == 1){ if(node.next.val == 9){ node.next.val = 0; } else { node.next.val++; addOneFlag = 0; } node = node.next; } if(addOneFlag == 1){ node.next = new ListNode(1); } return reverseList(dummy.next); } public ListNode reverseList(ListNode head){ if(head == null || head.next == null){ return head; } ListNode current = head; ListNode curNext = head.next; ListNode curNextNext = curNext.next; while(curNextNext != null){ curNext.next = current; current = curNext; curNext = curNextNext; curNextNext = curNextNext.next; } curNext.next = current; head.next = null; return curNext; } // solution 2 public ListNode plusOne2(ListNode head) { if(head == null) { return head; } ListNode dummy = new ListNode(0); dummy.next = head; ListNode faster = dummy; ListNode slower = dummy; while(faster != null) { if(faster.val != 9) { slower = faster; } faster = faster.next; } slower.val++; slower = slower.next; while(slower != null) { slower.val = 0; slower = slower.next; } return (dummy.val == 1) ? dummy : dummy.next; // test case: [9] } }
[ "jackiechan618@hotmail.com" ]
jackiechan618@hotmail.com
815feb06d8bf27f5a3f3d634b7684980e6933727
d31fbb5111970b10f6f8b3128cb800d9f45e9e53
/api/src/main/java/org/commonjava/emb/plexus/ServiceAuthorizer.java
7492753dc7cfaea39b761c05c75d84610a74cdfb
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
jdcasey/EMB
7ec2e735930e9de201fff9547e5f278676894b40
66b3496aec9a06ab9eb0ad1044ed2c5ddb7f96c0
refs/heads/master
2023-03-19T02:48:21.306187
2011-05-17T00:08:31
2011-05-17T00:08:31
640,512
1
1
null
null
null
null
UTF-8
Java
false
false
1,220
java
/* * Copyright 2010 Red Hat, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.commonjava.emb.plexus; import java.util.Set; public class ServiceAuthorizer { private final Set<ComponentKey<?>> authorizedKeys; public ServiceAuthorizer( final Set<ComponentKey<?>> authorizedKeys ) { this.authorizedKeys = authorizedKeys; } public <T> boolean isAvailable( final Class<T> serviceType ) { return authorizedKeys.contains( new ComponentKey<T>( serviceType ) ); } public <T> boolean isAvailable( final Class<T> serviceType, final String hint ) { return authorizedKeys.contains( new ComponentKey<T>( serviceType, hint ) ); } }
[ "jdcasey@commonjava.org" ]
jdcasey@commonjava.org
8831f325205452ae8830fab334a3801fbe03af93
781e2692049e87a4256320c76e82a19be257a05d
/all_data/cs61bl/lab13/cs61bl-kr/FibonacciTest.java
b64dd9658e5f476167f48f51a6bad7278da0349f
[]
no_license
itsolutionscorp/AutoStyle-Clustering
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
refs/heads/master
2020-12-11T07:27:19.291038
2016-03-16T03:18:00
2016-03-16T03:18:42
59,454,921
4
0
null
2016-05-23T05:40:56
2016-05-23T05:40:56
null
UTF-8
Java
false
false
1,539
java
import junit.framework.TestCase; public class FibonacciTest extends TestCase { // This test should pass already public void testFibResult() { Fibonacci fib = new Fibonacci(0); assertTrue(fib.result == 0); fib = new Fibonacci(1); assertTrue(fib.result == 1); fib = new Fibonacci(2); assertTrue(fib.result == 1); fib = new Fibonacci(3); System.out.print(fib.result); assertTrue(fib.result == 2); fib = new Fibonacci(4); assertTrue(fib.result == 3); fib = new Fibonacci(5); assertTrue(fib.result == 5); fib = new Fibonacci(6); assertTrue(fib.result == 8); fib = new Fibonacci(7); assertTrue(fib.result == 13); fib = new Fibonacci(1000); assertTrue(fib.result == 1556111435); } /* * This test will only pass once you modify Fibonacci.java to avoid * recursive calls in fib(n) if you have already calculated the value for * fib(n) */ public void testFibCalls() { Fibonacci fib = new Fibonacci(0); assertTrue(fib.callsToFib == 1); fib = new Fibonacci(1); assertTrue(fib.callsToFib == 1); fib = new Fibonacci(2); assertTrue(fib.callsToFib == 3); fib = new Fibonacci(3); assertTrue(fib.callsToFib == 5); fib = new Fibonacci(4); assertTrue(fib.callsToFib == 7); fib = new Fibonacci(5); assertTrue(fib.callsToFib == 9); fib = new Fibonacci(6); assertTrue(fib.callsToFib == 11); fib = new Fibonacci(7); assertTrue(fib.callsToFib == 13); fib = new Fibonacci(1000); assertTrue(fib.callsToFib == 1999); } }
[ "moghadam.joseph@gmail.com" ]
moghadam.joseph@gmail.com
ac60edd00f7a8b88bb8a635f0f2824c7e2084e4c
338328bc06567d54ef2052a0a38bf6dbe0109506
/ca-mgmt-api/src/main/java/org/xipki/ca/server/mgmt/api/RequestorInfo.java
7d32601f9a68ca16f063bfa2639ce45de36625d6
[ "Apache-2.0" ]
permissive
karymei/xipki
bd519579936d2a78d9ba461fccb61da2bcf2d056
7582ca7b205ee95c1820cc65eac1e7cea23b95c5
refs/heads/master
2021-09-04T02:41:32.311989
2018-01-14T20:09:24
2018-01-14T20:09:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
/* * * Copyright (c) 2013 - 2018 Lijun Liao * * 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.xipki.ca.server.mgmt.api; import org.xipki.ca.api.InsuffientPermissionException; import org.xipki.ca.api.NameId; /** * @author Lijun Liao * @since 2.0.0 */ public interface RequestorInfo { static final String NAME_BY_USER = "BY-USER"; static final String NAME_BY_CA = "BY-CA"; NameId ident(); boolean isRa(); boolean isCertProfilePermitted(String certprofile); boolean isPermitted(int requiredPermission); void assertCertProfilePermitted(String certprofile) throws InsuffientPermissionException; void assertPermitted(int requiredPermission) throws InsuffientPermissionException; }
[ "lijun.liao@gmail.com" ]
lijun.liao@gmail.com
08507997dce4596a3ef86532d5e919f0b5894652
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/1/org/joda/time/field/ZeroIsMaxDateTimeField_roundHalfEven_197.java
4a533cbb72a5194752624350d967d03143d5445a
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
576
java
org joda time field wrap field valu replac maximum implement clockhour dai clockhourofdai field midnight replac max date time field zeroismaxdatetimefield thread safe immut author brian neill o'neil max date time field zeroismaxdatetimefield decor date time field decorateddatetimefield round half roundhalfeven instant wrap field getwrappedfield round half roundhalfeven instant
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
fe9e222e0c449185098a71117dc38eef711663a3
745bf73f1fce0a23b4653d703d83f53b157c4a55
/src/main/java/org/jurassicraft/server/world/WorldGenCoal.java
d8d47e2817863aad4db4acd7f7e2ef51965ea9d1
[ "LicenseRef-scancode-public-domain" ]
permissive
TheXnator/JurassiCraft2
d1c479176c686db9416b71ac443423f2dbf40b03
850c3f5d0896d19e3626ed9c3589c77d958d85b7
refs/heads/master
2021-01-16T23:14:27.043344
2016-07-02T08:42:00
2016-07-02T08:42:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,454
java
package org.jurassicraft.server.world; import com.google.common.base.Predicate; import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.pattern.BlockMatcher; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenMinable; import org.jurassicraft.server.block.BlockHandler; import java.util.Random; public class WorldGenCoal extends WorldGenMinable { private final IBlockState oreBlock; private final int veinSize; private final Predicate<IBlockState> predicate; public WorldGenCoal(IBlockState state, int blockCount) { this(state, blockCount, BlockMatcher.forBlock(Blocks.STONE)); } public WorldGenCoal(IBlockState state, int blockCount, Predicate<IBlockState> predicate) { super(state, blockCount, predicate); this.oreBlock = state; this.veinSize = blockCount; this.predicate = predicate; } @Override public boolean generate(World world, Random rand, BlockPos position) { float f = rand.nextFloat() * (float) Math.PI; double d0 = (double) ((float) (position.getX() + 8) + MathHelper.sin(f) * (float) this.veinSize / 8.0F); double d1 = (double) ((float) (position.getX() + 8) - MathHelper.sin(f) * (float) this.veinSize / 8.0F); double d2 = (double) ((float) (position.getZ() + 8) + MathHelper.cos(f) * (float) this.veinSize / 8.0F); double d3 = (double) ((float) (position.getZ() + 8) - MathHelper.cos(f) * (float) this.veinSize / 8.0F); double d4 = (double) (position.getY() + rand.nextInt(3) - 2); double d5 = (double) (position.getY() + rand.nextInt(3) - 2); for (int i = 0; i < this.veinSize; ++i) { float f1 = (float) i / (float) this.veinSize; double d6 = d0 + (d1 - d0) * (double) f1; double d7 = d4 + (d5 - d4) * (double) f1; double d8 = d2 + (d3 - d2) * (double) f1; double d9 = rand.nextDouble() * (double) this.veinSize / 16.0D; double d10 = (double) (MathHelper.sin((float) Math.PI * f1) + 1.0F) * d9 + 1.0D; double d11 = (double) (MathHelper.sin((float) Math.PI * f1) + 1.0F) * d9 + 1.0D; int j = MathHelper.floor_double(d6 - d10 / 2.0D); int k = MathHelper.floor_double(d7 - d11 / 2.0D); int l = MathHelper.floor_double(d8 - d10 / 2.0D); int i1 = MathHelper.floor_double(d6 + d10 / 2.0D); int j1 = MathHelper.floor_double(d7 + d11 / 2.0D); int k1 = MathHelper.floor_double(d8 + d10 / 2.0D); for (int l1 = j; l1 <= i1; ++l1) { double d12 = ((double) l1 + 0.5D - d6) / (d10 / 2.0D); if (d12 * d12 < 1.0D) { for (int i2 = k; i2 <= j1; ++i2) { double d13 = ((double) i2 + 0.5D - d7) / (d11 / 2.0D); if (d12 * d12 + d13 * d13 < 1.0D) { for (int j2 = l; j2 <= k1; ++j2) { double d14 = ((double) j2 + 0.5D - d8) / (d10 / 2.0D); if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D) { BlockPos pos = new BlockPos(l1, i2, j2); IBlockState previousState = world.getBlockState(pos); if (previousState.getBlock().isReplaceableOreGen(previousState, world, pos, this.predicate)) { if (rand.nextInt(10) == 0) { world.setBlockState(pos, BlockHandler.PLANT_FOSSIL.getDefaultState()); } else { world.setBlockState(pos, this.oreBlock, 2); } } } } } } } } } return true; } }
[ "gegy1000@gmail.com" ]
gegy1000@gmail.com
c185d57f15b0c26ce94a012dc6b634f35878dab0
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava11/Foo371Test.java
cbd0b19ac3df9d7b64bf86c68369b0dc52bc583f
[]
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 applicationModulepackageJava11; import org.junit.Test; public class Foo371Test { @Test public void testFoo0() { new Foo371().foo0(); } @Test public void testFoo1() { new Foo371().foo1(); } @Test public void testFoo2() { new Foo371().foo2(); } @Test public void testFoo3() { new Foo371().foo3(); } @Test public void testFoo4() { new Foo371().foo4(); } @Test public void testFoo5() { new Foo371().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
ab766e5d63c04d8f590162d0f8ab93910bddbb61
88c8d6709b025d1eb6578b5483fff3c0be0b5a43
/random/src/main/java/com/obsidiandynamics/random/Randomness.java
504cc95e1673b91f7ab67530584dabf058d8cb6e
[ "BSD-3-Clause" ]
permissive
obsidiandynamics/fulcrum
482c2c780ad8dfda65885caf31ce8bd782d30ccc
2ce6fc2aa4578ab74e120cc8bd7545bd1a7c098f
refs/heads/master
2022-09-18T08:47:52.572760
2022-07-25T05:20:58
2022-07-25T05:20:58
105,746,060
12
2
null
null
null
null
UTF-8
Java
false
false
1,371
java
package com.obsidiandynamics.random; import java.security.*; /** * Securely generates random integral numbers and byte arrays using * a singleton {@link SecureRandom} instance. <p> * * This class is thread-safe. */ public final class Randomness { /** * The random number generator used by this class, contained in a holder class * to defer initialisation until needed. */ private static class Holder { static final SecureRandom random = new SecureRandom(); } private Randomness() {} /** * Obtains a reference to the underlying RNG. * * @return The singleton {@link SecureRandom} instance. */ public static SecureRandom getSecureRandom() { return Holder.random; } /** * Generates a random {@code int}. * * @return A random {@code int}. */ public static int nextInt() { return Holder.random.nextInt(); } /** * Generates a random {@code long}. * * @return A random {@code long}. */ public static long nextLong() { return Holder.random.nextLong(); } /** * Produces an array of random bytes. * * @param length The length of the byte array. * @return The random byte array. */ public static byte[] nextBytes(int length) { final byte[] bytes = new byte[length]; Holder.random.nextBytes(bytes); return bytes; } }
[ "ekoutanov@gmail.com" ]
ekoutanov@gmail.com
77e9e3ccce31e4faba73ccdf97695ab8c66173a5
73622c61f98d6955aa62855a9191ad47be2e5257
/aima-java/src/aima/test/search/csp/MapCSPTest.java
95f3dc2e69ef0172859ac30b32afa2b327748fdf
[ "MIT" ]
permissive
hello-sources/Course_Design_Project
8c05a437b9fad1dcad27bffb264c3e3acdb7fc27
96ed1bfbf9d0b9c2c5bbe7a97d300d7f75e40a49
refs/heads/master
2022-11-12T01:14:36.643098
2020-06-29T23:45:57
2020-06-29T23:45:57
272,621,331
2
0
null
null
null
null
UTF-8
Java
false
false
1,063
java
/* * Created on Sep 21, 2004 * */ package aima.test.search.csp; import junit.framework.TestCase; import aima.search.csp.Assignment; import aima.search.csp.CSP; import aima.search.csp.MapCSP; /** * @author Ravi Mohan * */ public class MapCSPTest extends TestCase { private CSP csp; @Override public void setUp() { csp = MapCSP.getMap(); } public void testBackTrackingSearch() { Assignment results = csp.backTrackingSearch(); assertNotNull(results); assertEquals(MapCSP.RED, results.getAssignment(MapCSP.V)); assertEquals(MapCSP.GREEN, results.getAssignment(MapCSP.SA)); assertEquals(MapCSP.RED, results.getAssignment(MapCSP.T)); assertEquals(MapCSP.BLUE, results.getAssignment(MapCSP.NT)); assertEquals(MapCSP.RED, results.getAssignment(MapCSP.Q)); assertEquals(MapCSP.BLUE, results.getAssignment(MapCSP.NSW)); assertEquals(MapCSP.RED, results.getAssignment(MapCSP.WA)); // System.out.println(results); } public void testMCSearch() { Assignment results = csp.mcSearch(100); } }
[ "3245849061@qq.com" ]
3245849061@qq.com
f662b5c49b578174a8ca6016d42fe7848f67ae96
cd3365b57eb838228e59d834018a68ef4b9c2aef
/Booklibrary_BE/src/main/java/com/booklibrary/app/repository/sql/stuff/TestRepository.java
404ef9fd68b41969b9796b134c9007297407aa8c
[]
no_license
nislamovs/BookLibrary
b6d0e6ffa71b547e9d7d4e0c2d2f15cb6411370a
99f86b43e0b0652e56f8b32cd58fd1873bdf0d30
refs/heads/master
2020-08-07T05:00:29.332581
2020-01-20T07:25:55
2020-01-20T07:25:55
213,307,560
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package com.booklibrary.app.repository.sql.stuff; import com.booklibrary.app.models.sql.RandomData; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface TestRepository extends JpaRepository<RandomData, Long> { RandomData findByFirstname(String firstname); }
[ "nizamiislamovs@gmail.com" ]
nizamiislamovs@gmail.com
c5012d7a1e6a2bc39d72e628a365db33fbea99b5
57e57f2634944d0595258a14af5e20b6df59185d
/bitcamp-java-basic/src/main/java/design_pattern/observer/after2/LightOffCarObserver.java
208cca4f0c3bd1444b562f4e4068abc7bc7462e5
[]
no_license
Soo77/bitcamp-java-20190527
f169431aafde5bf97c69484694560af14c246b97
655fc4fb5aedcac805da715def70bab1ed616d96
refs/heads/master
2020-06-13T20:16:02.844148
2019-10-02T11:29:06
2019-10-02T11:29:06
194,775,332
1
0
null
2020-04-30T11:49:50
2019-07-02T02:41:01
Java
UTF-8
Java
false
false
213
java
package design_pattern.observer.after2; public class LightOffCarObserver extends AbstractCarObserver { @Override public void carStopped() { System.out.println("전조등을 끈다."); } }
[ "shimsh3@naver.com" ]
shimsh3@naver.com
767a48bce786bb5338a3e7bb43b0b7878cd3fe8f
f2c8b25b6a63cd26a211f60fcf598c84d1f743c9
/Android21/android-5.0.2_r1/src/com/android/rs/test/ScriptC_refcount.java
2e61549c5f8e31022d1b2b03ca336ff1e15cae28
[]
no_license
EnSoftCorp/AnalyzableAndroid
1ba0d5db531025e517e5e4fbb7e455bbb2bb2191
d9b29a11308eb8e6511335b24a44d0388eb7b068
refs/heads/master
2022-10-17T22:52:32.933849
2015-05-01T18:17:48
2015-05-01T18:17:48
21,949,091
1
0
null
null
null
null
UTF-8
Java
false
false
1,954
java
/* * Copyright (C) 2011-2014 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. */ /* * This file is auto-generated. DO NOT MODIFY! * The source Renderscript file: frameworks/rs/java/tests/RsTest/src/com/android/rs/test/refcount.rs */ package com.android.rs.test; import android.renderscript.*; import com.android.rs.test.refcountBitCode; /** * @hide */ public class ScriptC_refcount extends ScriptC { private static final String __rs_resource_name = "refcount"; // Constructor public ScriptC_refcount(RenderScript rs) { super(rs, __rs_resource_name, refcountBitCode.getBitCode32(), refcountBitCode.getBitCode64()); __ALLOCATION = Element.ALLOCATION(rs); } private Element __ALLOCATION; private FieldPacker __rs_fp_ALLOCATION; private final static int mExportVarIdx_globalA = 0; private Allocation mExportVar_globalA; public synchronized void set_globalA(Allocation v) { setVar(mExportVarIdx_globalA, v); mExportVar_globalA = v; } public Allocation get_globalA() { return mExportVar_globalA; } public Script.FieldID getFieldID_globalA() { return createFieldID(mExportVarIdx_globalA, null); } private final static int mExportFuncIdx_refcount_test = 0; public void invoke_refcount_test() { invoke(mExportFuncIdx_refcount_test); } }
[ "benjholla@gmail.com" ]
benjholla@gmail.com
5226a74026233d220f4db474cb21b409c0c5e9de
12563229bd1c69d26900d4a2ea34fe4c64c33b7e
/nan21.dnet.module.pj/nan21.dnet.module.pj.domain/src/main/java/net/nan21/dnet/module/pj/base/domain/entity/IssueType.java
3bbcb5f60d5b21aa4134c34641a9c5e74fa0f348
[]
no_license
nan21/nan21.dnet.modules
90b002c6847aa491c54bd38f163ba40a745a5060
83e5f02498db49e3d28f92bd8216fba5d186dd27
refs/heads/master
2023-03-15T16:22:57.059953
2012-08-01T07:36:57
2012-08-01T07:36:57
1,918,395
0
1
null
2012-07-24T03:23:00
2011-06-19T05:56:03
Java
UTF-8
Java
false
false
4,141
java
/* * DNet eBusiness Suite * Copyright: 2008-2012 Nan21 Electronics SRL. All rights reserved. * Use is subject to license terms. */ package net.nan21.dnet.module.pj.base.domain.entity; import java.util.Collection; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.QueryHint; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import javax.validation.constraints.NotNull; import net.nan21.dnet.core.domain.eventhandler.DefaultEventHandler; import net.nan21.dnet.core.domain.model.AbstractType; import net.nan21.dnet.module.pj.base.domain.entity.IssueCategory; import org.eclipse.persistence.annotations.Customizer; import org.eclipse.persistence.config.HintValues; import org.eclipse.persistence.config.QueryHints; import org.eclipse.persistence.descriptors.DescriptorEvent; /** IssueType. */ @Entity @Table(name = IssueType.TABLE_NAME, uniqueConstraints = { @UniqueConstraint(name = IssueType.TABLE_NAME + "_UK1", columnNames = { "CLIENTID", "NAME" }) }) @Customizer(DefaultEventHandler.class) @NamedQueries({ @NamedQuery(name = IssueType.NQ_FIND_BY_ID, query = "SELECT e FROM IssueType e WHERE e.clientId = :pClientId and e.id = :pId ", hints = @QueryHint(name = QueryHints.BIND_PARAMETERS, value = HintValues.TRUE)), @NamedQuery(name = IssueType.NQ_FIND_BY_IDS, query = "SELECT e FROM IssueType e WHERE e.clientId = :pClientId and e.id in :pIds", hints = @QueryHint(name = QueryHints.BIND_PARAMETERS, value = HintValues.TRUE)), @NamedQuery(name = IssueType.NQ_FIND_BY_NAME, query = "SELECT e FROM IssueType e WHERE e.clientId = :pClientId and e.name = :pName ", hints = @QueryHint(name = QueryHints.BIND_PARAMETERS, value = HintValues.TRUE)) }) public class IssueType extends AbstractType { public static final String TABLE_NAME = "PJ_ISSUE_TYPE"; public static final String SEQUENCE_NAME = "PJ_ISSUE_TYPE_SEQ"; private static final long serialVersionUID = -8865917134914502125L; /** * Named query find by ID. */ public static final String NQ_FIND_BY_ID = "IssueType.findById"; /** * Named query find by IDs. */ public static final String NQ_FIND_BY_IDS = "IssueType.findByIds"; /** * Named query find by unique key: Name. */ public static final String NQ_FIND_BY_NAME = "IssueType.findByName"; /** * System generated unique identifier. */ @Column(name = "ID", nullable = false) @NotNull @Id @GeneratedValue(generator = SEQUENCE_NAME) private Long id; @ManyToOne(fetch = FetchType.LAZY, targetEntity = IssueCategory.class) @JoinColumn(name = "CATEGORY_ID", referencedColumnName = "ID") private IssueCategory category; @ManyToMany(mappedBy = "itemTypes") private Collection<ProjectType> projectTypes; /* ============== getters - setters ================== */ public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public IssueCategory getCategory() { return this.category; } public void setCategory(IssueCategory category) { if (category != null) { this.__validate_client_context__(category.getClientId()); } this.category = category; } public Collection<ProjectType> getProjectTypes() { return this.projectTypes; } public void setProjectTypes(Collection<ProjectType> projectTypes) { this.projectTypes = projectTypes; } public void aboutToInsert(DescriptorEvent event) { super.aboutToInsert(event); if (this.getActive() == null) { event.updateAttributeWithObject("active", false); } } }
[ "mathe_attila@yahoo.com" ]
mathe_attila@yahoo.com
8595e861679ff324a51bc34417d7d65efc814f93
6f649ef39ce23adb0b1cc6d3e55b7e6bdc0afc50
/src/lang/compiler/com/stmtnode/lang/compiler/Lexer.java
e49cb236e437033aafb5e3930a587e47e6ae564f
[]
no_license
bernardobreder/stmtnode-shell
d23042ffeb5e1df26486158bdc50dfd653c3f2a0
23102ada1723d352aee659a7cfdc43be4a3e38f1
refs/heads/master
2021-05-09T05:28:15.804390
2018-02-19T22:03:06
2018-02-19T22:03:06
119,310,635
0
0
null
null
null
null
UTF-8
Java
false
false
3,693
java
package com.stmtnode.lang.compiler; import java.util.ArrayList; import java.util.List; import com.stmtnode.lang.compiler.Token.TokenType; public class Lexer { private final String source; private final char[] chars; private int line = 1; private int column = 1; private int index = 0; private List<Token> tokens; private boolean dot; public Lexer(String source, String content) { this.source = source; this.chars = content.toCharArray(); } public Token[] execute() { this.tokens = new ArrayList<>(); while (!eof()) { step(); } return tokens.toArray(new Token[tokens.size()]); } protected void step() { stepWhitespace(); if (!eof()) { if (isIdStart()) { stepId(); } else if (isNumberStart()) { stepNumber(); } else if (isStringStart()) { stepString(); } else { stepSymbol(); } } } protected void stepWhitespace() { char c = chars[index]; for (;;) { if (c <= 32) { if (c == '\n') { line++; column = 1; } else { column++; } index++; if (eof()) { return; } c = chars[index]; } else if (stepComment()) { index += 2; column += 2; if (eof()) { return; } c = chars[index]; while (c != '\n') { column++; c = chars[index++]; if (eof()) { return; } } line++; column = 1; if (eof()) { return; } c = chars[index]; } else { break; } } } protected boolean stepComment() { if (eof(1)) { return false; } if (chars[index] == '/' && chars[index + 1] == '/') { return true; } return false; } protected void stepId() { int line = this.line; int column = this.column; int begin = index; index++; while (!eof() && isIdPart()) { index++; } this.column += index - begin; tokens.add(new Token(source, new String(chars, begin, index - begin), TokenType.ID, line, column, begin)); } protected void stepNumber() { int line = this.line; int column = this.column; int begin = index; dot = false; index++; while (!eof() && isNumberPart()) { index++; } this.column += index - begin; tokens.add(new Token(source, new String(chars, begin, index - begin), TokenType.NUM, line, column, begin)); } protected void stepString() { int line = this.line; int column = this.column; int begin = index++; while (!eof() && isStringPart()) { index++; } if (!eof()) { index++; } this.column += index - begin; tokens.add(new Token(source, new String(chars, begin, index - begin), TokenType.STR, line, column, begin)); } protected void stepSymbol() { int begin = index++; tokens.add(new Token(source, new String(chars, begin, 1), TokenType.SYM, line, column++, begin)); } protected boolean isStringStart() { return chars[index] == '\"'; } protected boolean isStringPart() { return chars[index] != '\"' || chars[index - 1] == '\\'; } protected boolean isNumberStart() { char c = chars[index]; return c >= '0' && c <= '9'; } protected boolean isNumberPart() { char c = chars[index]; if (c == '.') { if (dot) { return false; } else { dot = true; return true; } } return c >= '0' && c <= '9'; } protected boolean isIdStart() { char c = chars[index]; return (c >= 'a' && c <= 'z') || // (c >= 'A' && c <= 'Z') || // c == '_'; } protected boolean isIdPart() { char c = chars[index]; return (c >= 'a' && c <= 'z') || // (c >= 'A' && c <= 'Z') || // (c >= '0' && c <= '9') || // c == '_'; } protected boolean eof() { return index >= chars.length; } protected boolean eof(int next) { return index + next >= chars.length; } }
[ "bernardobreder@gmail.com" ]
bernardobreder@gmail.com
686b94e2ee48d6a6d27eb1dc73b29f2760cf7877
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_198894296e71204b312af980eba6908a04c41511/Database/2_198894296e71204b312af980eba6908a04c41511_Database_s.java
d8b81f8a7d382d7370c9b3dea20e51a4f57e19cc
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,933
java
package com.github.rnewson.couchdb.lucene.couchdb; import java.io.IOException; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.apache.http.client.HttpClient; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import com.github.rnewson.couchdb.lucene.util.Utils; public final class Database { private final HttpClient httpClient; private final String url; public Database(final HttpClient httpClient, final String url) { this.httpClient = httpClient; this.url = url.endsWith("/") ? url : url + "/"; } public boolean create() throws IOException { return HttpUtils.put(httpClient, url, null) == 201; } public boolean delete() throws IOException { return HttpUtils.delete(httpClient, url) == 200; } public JSONArray getAllDesignDocuments() throws IOException { return getDocuments("_design", "_design0").getJSONArray("rows"); } public JSONObject getDocument(final String id) throws IOException { final String response = HttpUtils.get(httpClient, url + Utils.urlEncode(id)); return JSONObject.fromObject(response); } public JSONObject getDocuments(final String... ids) throws IOException { final JSONArray keys = new JSONArray(); for (final String id : ids) { keys.add(id); } final JSONObject req = new JSONObject(); req.element("keys", keys); final String response = HttpUtils.post(httpClient, url + "_all_docs?include_docs=true", req.toString()); return JSONObject.fromObject(response); } public JSONObject getDocuments(final String startkey, final String endkey) throws IOException { return JSONObject.fromObject(HttpUtils.get(httpClient, String.format( "%s_all_docs?startkey=%%22%s%%22&endkey=%%22%s%%22&include_docs=true", url, Utils.urlEncode(startkey), Utils .urlEncode(endkey)))); } public JSONObject getInfo() throws IOException { return JSONObject.fromObject(HttpUtils.get(httpClient, url)); } public <T> T handleAttachment(final String doc, final String att, final ResponseHandler<T> handler) throws IOException { final HttpGet get = new HttpGet(url + "/" + Utils.urlEncode(doc) + "/" + Utils.urlEncode(att)); return httpClient.execute(get, handler); } public HttpUriRequest getChangesRequest(final long since) throws IOException { return new HttpGet(url + "/_changes?feed=continuous&heartbeat=15000&include_docs=true&since=" + since); } public boolean saveDocument(final String id, final String body) throws IOException { return HttpUtils.put(httpClient, url + Utils.urlEncode(id), body) == 201; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e21da3e2ad711d26838ad41adeccefdc4a762e5e
96e13dd386491e9cc444170c705577b35a487859
/starshield/src/main/java/com/jdcloud/sdk/service/starshield/model/CreateInstanceResult.java
cb53cac27fde154561c4b51c4b3875d0509e0171
[ "Apache-2.0" ]
permissive
shijunLee/jdcloud-sdk-java
125cdea82e84687dab4e2770612908c9a2af4a71
08be41292da36d0604013d34d6704ae13076006a
refs/heads/master
2022-11-30T10:07:17.436266
2022-11-11T13:44:59
2022-11-11T13:44:59
137,592,050
0
1
null
2018-06-16T15:51:03
2018-06-16T15:51:03
null
UTF-8
Java
false
false
1,521
java
/* * Copyright 2018 JDCLOUD.COM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:#www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * instance * 实例管理模块 * * OpenAPI spec version: v1 * Contact: * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.starshield.model; import com.jdcloud.sdk.service.JdcloudResult; /** * 创建套餐实例 */ public class CreateInstanceResult extends JdcloudResult implements java.io.Serializable { private static final long serialVersionUID = 1L; /** * 购买ID */ private String buyId; /** * get 购买ID * * @return */ public String getBuyId() { return buyId; } /** * set 购买ID * * @param buyId */ public void setBuyId(String buyId) { this.buyId = buyId; } /** * set 购买ID * * @param buyId */ public CreateInstanceResult buyId(String buyId) { this.buyId = buyId; return this; } }
[ "jdcloud-api@jd.com" ]
jdcloud-api@jd.com
c2f6f2fd2174abfb708caebd73ba5cc7a82cc262
d2697b2dc2ada2a5db3d3b763f00648be682a3c5
/bookexchangeUpdated(1)_source_from_JADX/sources/com/google/android/gms/measurement/internal/zzjs.java
8eced02d6020cc32ff981f8b76e02c405e144955
[]
no_license
cseadnan16/Uncomplete-project--Android-
3639b51512c23bfe5baf97d0328a4939133bab15
3b7036115db7ae1f141678282cc892ed1bc5f56e
refs/heads/main
2023-03-06T20:25:28.244479
2021-02-21T07:35:29
2021-02-21T07:35:29
340,841,260
0
0
null
null
null
null
UTF-8
Java
false
false
656
java
package com.google.android.gms.measurement.internal; /* compiled from: com.google.android.gms:play-services-measurement-impl@@17.2.3 */ final class zzjs implements Runnable { private final /* synthetic */ zzfc zza; private final /* synthetic */ zzjp zzb; zzjs(zzjp zzjp, zzfc zzfc) { this.zzb = zzjp; this.zza = zzfc; } public final void run() { synchronized (this.zzb) { boolean unused = this.zzb.zzb = false; if (!this.zzb.zza.zzab()) { this.zzb.zza.zzr().zzx().zza("Connected to service"); this.zzb.zza.zza(this.zza); } } } }
[ "adnanan.cse2016@gmail.com" ]
adnanan.cse2016@gmail.com
dda811c9682ca74eeb0b9dc1519e484f2f5d6e5b
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-25-16-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/rendering/wikimodel/xhtml/filter/AccumulationXMLFilter_ESTest.java
964bc1249f3ab90173e6f980dd5b488961ae47f3
[]
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
591
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 02:01:36 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.filter; 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 AccumulationXMLFilter_ESTest extends AccumulationXMLFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
5e943bcfac27f294508e46cc3d873942aa18e8eb
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/502_2.java
830b28cdf4f3b07d4de5ea7b4b849cdd36bbf137
[ "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
4,329
java
//,temp,TestRMContainerAllocator.java,924,1020,temp,TestRMContainerAllocator.java,772,897 //,3 public class xxx { @Test public void testReportedAppProgress() throws Exception { LOG.info("Running testReportedAppProgress"); Configuration conf = new Configuration(); final MyResourceManager rm = new MyResourceManager(conf); rm.start(); DrainDispatcher rmDispatcher = (DrainDispatcher) rm.getRMContext() .getDispatcher(); // Submit the application RMApp rmApp = rm.submitApp(1024); rmDispatcher.await(); MockNM amNodeManager = rm.registerNode("amNM:1234", 21504); amNodeManager.nodeHeartbeat(true); rmDispatcher.await(); final ApplicationAttemptId appAttemptId = rmApp.getCurrentAppAttempt() .getAppAttemptId(); rm.sendAMLaunched(appAttemptId); rmDispatcher.await(); MRApp mrApp = new MRApp(appAttemptId, ContainerId.newContainerId( appAttemptId, 0), 10, 10, false, this.getClass().getName(), true, 1) { @Override protected Dispatcher createDispatcher() { return new DrainDispatcher(); } protected ContainerAllocator createContainerAllocator( ClientService clientService, AppContext context) { return new MyContainerAllocator(rm, appAttemptId, context); }; }; Assert.assertEquals(0.0, rmApp.getProgress(), 0.0); mrApp.submit(conf); Job job = mrApp.getContext().getAllJobs().entrySet().iterator().next() .getValue(); DrainDispatcher amDispatcher = (DrainDispatcher) mrApp.getDispatcher(); MyContainerAllocator allocator = (MyContainerAllocator) mrApp .getContainerAllocator(); mrApp.waitForInternalState((JobImpl) job, JobStateInternal.RUNNING); amDispatcher.await(); // Wait till all map-attempts request for containers for (Task t : job.getTasks().values()) { if (t.getType() == TaskType.MAP) { mrApp.waitForInternalState((TaskAttemptImpl) t.getAttempts().values() .iterator().next(), TaskAttemptStateInternal.UNASSIGNED); } } amDispatcher.await(); allocator.schedule(); rmDispatcher.await(); amNodeManager.nodeHeartbeat(true); rmDispatcher.await(); allocator.schedule(); rmDispatcher.await(); // Wait for all map-tasks to be running for (Task t : job.getTasks().values()) { if (t.getType() == TaskType.MAP) { mrApp.waitForState(t, TaskState.RUNNING); } } allocator.schedule(); // Send heartbeat rmDispatcher.await(); Assert.assertEquals(0.05f, job.getProgress(), 0.001f); Assert.assertEquals(0.05f, rmApp.getProgress(), 0.001f); // Finish off 1 map. Iterator<Task> it = job.getTasks().values().iterator(); finishNextNTasks(rmDispatcher, amNodeManager, mrApp, it, 1); allocator.schedule(); rmDispatcher.await(); Assert.assertEquals(0.095f, job.getProgress(), 0.001f); Assert.assertEquals(0.095f, rmApp.getProgress(), 0.001f); // Finish off 7 more so that map-progress is 80% finishNextNTasks(rmDispatcher, amNodeManager, mrApp, it, 7); allocator.schedule(); rmDispatcher.await(); Assert.assertEquals(0.41f, job.getProgress(), 0.001f); Assert.assertEquals(0.41f, rmApp.getProgress(), 0.001f); // Finish off the 2 remaining maps finishNextNTasks(rmDispatcher, amNodeManager, mrApp, it, 2); allocator.schedule(); rmDispatcher.await(); amNodeManager.nodeHeartbeat(true); rmDispatcher.await(); allocator.schedule(); rmDispatcher.await(); // Wait for all reduce-tasks to be running for (Task t : job.getTasks().values()) { if (t.getType() == TaskType.REDUCE) { mrApp.waitForState(t, TaskState.RUNNING); } } // Finish off 2 reduces finishNextNTasks(rmDispatcher, amNodeManager, mrApp, it, 2); allocator.schedule(); rmDispatcher.await(); Assert.assertEquals(0.59f, job.getProgress(), 0.001f); Assert.assertEquals(0.59f, rmApp.getProgress(), 0.001f); // Finish off the remaining 8 reduces. finishNextNTasks(rmDispatcher, amNodeManager, mrApp, it, 8); allocator.schedule(); rmDispatcher.await(); // Remaining is JobCleanup Assert.assertEquals(0.95f, job.getProgress(), 0.001f); Assert.assertEquals(0.95f, rmApp.getProgress(), 0.001f); } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
cd6cf7f224ae9d5c09c7fddcfd3d41cb3f9db633
46ae277c6c3e797513ebd5aacb0b2e7f9f7c2491
/Appengine/src/org/celstec/arlearn2/portal/client/author/ui/SectionConfiguration.java
9d8ad45ce620d6b3bbcea74cec47f737fea9cda4
[]
no_license
tedwp/arlearn
041e4406f474b5c8af1ff7235702c26deaf3ddd2
3ac6d3f772c7f15f396f8551bf1b37a16878b79a
refs/heads/master
2021-01-10T02:58:40.537198
2014-04-24T07:56:11
2014-04-24T07:56:11
48,293,742
1
0
null
null
null
null
UTF-8
Java
false
false
525
java
package org.celstec.arlearn2.portal.client.author.ui; import com.smartgwt.client.types.Overflow; import com.smartgwt.client.types.VisibilityMode; import com.smartgwt.client.widgets.layout.SectionStack; public class SectionConfiguration extends SectionStack { public SectionConfiguration() { setVisibilityMode(VisibilityMode.MULTIPLE); setAnimateSections(true); setHeight("50%"); setOverflow(Overflow.HIDDEN); } public void add(SectionConfig config) { addSection(config); } }
[ "stefaan.ternier@gmail.com" ]
stefaan.ternier@gmail.com
0b9407075dfe204aafef5b69ac5451b94359036b
e2d6f41824735bc0a8636a5937fec1e29c38dbd5
/src/main/java/org/amenal/rest/mapper/EntreeMapper.java
5b7930079d2a6eb454e48a8da2ce3bfc4eafc8e7
[]
no_license
ilyass-ejjaouchi/Amenal-back
67221aaa167332c853af05cdd228f907ff2478d2
b425e48c2e26444f997c8f2737c17c78f2c6fa30
refs/heads/master
2023-01-04T16:02:31.740669
2020-05-27T23:20:29
2020-05-27T23:20:29
308,670,222
2
0
null
null
null
null
UTF-8
Java
false
false
275
java
package org.amenal.rest.mapper; import org.amenal.entities.Entree; import org.amenal.rest.representation.EntreePresentation; import org.mapstruct.Mapper; @Mapper(componentModel = "spring") public interface EntreeMapper { EntreePresentation toRepresentation(Entree e); }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
db6f2db0195b4c09837c21766e64332980a36542
447520f40e82a060368a0802a391697bc00be96f
/apks/playstore_apps/com_spotify_music/source/com/spotify/mobile/android/spotlets/eventshub/model/AutoValue_ConcertEntityModel.java
83826733473779c6d496a0237d99dc60858a472a
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
2,437
java
package com.spotify.mobile.android.spotlets.eventshub.model; import android.os.Parcel; import android.os.Parcelable.Creator; import java.util.List; import kjy; import kjz; import kka; import kkb; import mmo; final class AutoValue_ConcertEntityModel extends .AutoValue_ConcertEntityModel { private static final kjy ALBUMS_FOR_CONCERT_PARCEL_ADAPTER = new kjy(); private static final kjz ARTIST_ADAPTER; private static final kka CONCERT_RESULT_PARCEL_ADAPTER = new kka(); public static final Parcelable.Creator<AutoValue_ConcertEntityModel> CREATOR = new Parcelable.Creator() {}; private static final kkb UPCOMING_CONCERTS_PARCEL_ADAPTER; static { ARTIST_ADAPTER = new kjz(); UPCOMING_CONCERTS_PARCEL_ADAPTER = new kkb(); } AutoValue_ConcertEntityModel(ConcertResult paramConcertResult, List<Artist> paramList, List<ConcertResult> paramList1, List<Album> paramList2, String paramString1, String paramString2, String paramString3, String paramString4) { super(paramConcertResult, paramList, paramList1, paramList2, paramString1, paramString2, paramString3, paramString4); } public final int describeContents() { return 0; } public final void writeToParcel(Parcel paramParcel, int paramInt) { mmo.a(paramParcel, getConcertResult(), 0); kjz.a(getArtists(), paramParcel); if (getUpcomingConcerts() == null) { paramParcel.writeInt(1); } else { paramParcel.writeInt(0); kkb.a(getUpcomingConcerts(), paramParcel); } if (getAlbumsForConcert() == null) { paramParcel.writeInt(1); } else { paramParcel.writeInt(0); kjy.a(getAlbumsForConcert(), paramParcel); } if (getUserLocation() == null) { paramParcel.writeInt(1); } else { paramParcel.writeInt(0); paramParcel.writeString(getUserLocation()); } if (getUpcomingConcertsSource() == null) { paramParcel.writeInt(1); } else { paramParcel.writeInt(0); paramParcel.writeString(getUpcomingConcertsSource()); } if (getColor() == null) { paramParcel.writeInt(1); } else { paramParcel.writeInt(0); paramParcel.writeString(getColor()); } if (getTicketAvailability() == null) { paramParcel.writeInt(1); return; } paramParcel.writeInt(0); paramParcel.writeString(getTicketAvailability()); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
b417e20b23394e18f2b4426c2afcef2bb25db298
11772d429aac642024546963fcdd5637e52d7c87
/src/main/java/edu/ucsf/rbvi/cyBrowser/internal/tasks/CloseBrowserTask.java
8f86919a98b2dce56a766d0a190914fbd9797123
[]
no_license
cytoscape/cyBrowser
9abb47661167d6d2b7eab1f6ba8bc6f701c3202b
33f9b16e7df8e6b052679c7cbb13e5d3048f8264
refs/heads/master
2023-08-28T21:02:31.114526
2023-04-24T23:03:51
2023-04-24T23:03:51
74,529,091
1
2
null
2022-11-21T01:38:40
2016-11-23T01:36:13
Java
UTF-8
Java
false
false
1,400
java
package edu.ucsf.rbvi.cyBrowser.internal.tasks; import java.util.Properties; import javax.swing.SwingUtilities; import org.cytoscape.application.swing.CySwingApplication; import org.cytoscape.application.swing.CytoPanel; import org.cytoscape.application.swing.CytoPanelComponent; import org.cytoscape.application.swing.CytoPanelName; import org.cytoscape.application.swing.CytoPanelState; import org.cytoscape.service.util.CyServiceRegistrar; import org.cytoscape.work.AbstractTask; import org.cytoscape.work.ProvidesTitle; import org.cytoscape.work.TaskMonitor; import org.cytoscape.work.Tunable; import edu.ucsf.rbvi.cyBrowser.internal.model.CyBrowser; import edu.ucsf.rbvi.cyBrowser.internal.model.CyBrowserManager; import edu.ucsf.rbvi.cyBrowser.internal.view.ResultsPanelBrowser; import edu.ucsf.rbvi.cyBrowser.internal.view.SwingBrowser; public class CloseBrowserTask extends AbstractEmptyObservableTask { @Tunable (description="Window ID", longDescription="The ID for the browser window to close", exampleStringValue="Window 1", context="nogui") public String id = null; final CyBrowserManager manager; public CloseBrowserTask(CyBrowserManager manager) { this.manager = manager; } public void run(TaskMonitor monitor) { manager.closeBrowser(id); } @ProvidesTitle public String getTitle() { return "Hiding Cytoscape Web Browser"; } }
[ "scooter@cgl.ucsf.edu" ]
scooter@cgl.ucsf.edu
0598fca83ea498493c382bb20ac9197abd860b38
9c8ea94efd2e797b97f02490d8d568ddc7676f26
/platform/platform-api/src/com/intellij/execution/ui/CommandLinePanel.java
0cccbde082f1e47e48bb549e88e2b367a2d3afcc
[ "Apache-2.0" ]
permissive
outring/intellij-community
9566dac4ea22216d6160e69c8a3f007d4f8c9f40
a0ce0176ecae0b7cfedf017aa917f860e3f7262f
refs/heads/master
2022-10-12T04:44:47.129348
2020-06-12T20:09:17
2020-06-14T10:07:31
256,736,307
0
0
Apache-2.0
2020-04-18T11:29:28
2020-04-18T11:29:27
null
UTF-8
Java
false
false
1,891
java
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.execution.ui; import com.intellij.util.ui.JBUI; import javax.swing.*; import java.awt.*; import java.util.List; public class CommandLinePanel extends JPanel { private final List<JComponent> myComponents; private int myLastWidth; public CommandLinePanel(List<JComponent> components) { super(); myComponents = components; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); setMinimumSize(new Dimension(500, 100)); } @Override public void doLayout() { buildRows(); super.doLayout(); } public void markForRebuild() { myLastWidth = -1; invalidate(); } private void buildRows() { int parentWidth = Math.max(getWidth(), getMinimumSize().width); if (myLastWidth == parentWidth) return; myLastWidth = parentWidth; removeAll(); JPanel row = new JPanel(new GridBagLayout()); int rowWidth = 0; GridBagConstraints c = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, JBUI.emptyInsets(), 0, 0); for (JComponent component : myComponents) { if (!component.isVisible()) continue; int minWidth = component.getMinimumSize().width; if (rowWidth + minWidth > parentWidth) { add(row); add(Box.createVerticalStrut(2)); row = new JPanel(new GridBagLayout()); rowWidth = 0; c.gridx = 0; } // c.weightx = minWidth; row.add(component, c.clone()); c.gridx++; rowWidth += minWidth; } add(row); } public static void setMinimumWidth(Component component, int width) { Dimension size = new Dimension(width, component.getMinimumSize().height); component.setMinimumSize(size); component.setPreferredSize(size); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
b7dd93d818c1b642d9edda81fc3699f58091a828
11b9a30ada6672f428c8292937dec7ce9f35c71b
/src/main/java/javax/xml/transform/TransformerConfigurationException.java
b00e8ff02eb04de2fb637a8264888000167560e5
[]
no_license
bogle-zhao/jdk8
5b0a3978526723b3952a0c5d7221a3686039910b
8a66f021a824acfb48962721a20d27553523350d
refs/heads/master
2022-12-13T10:44:17.426522
2020-09-27T13:37:00
2020-09-27T13:37:00
299,039,533
0
0
null
null
null
null
UTF-8
Java
false
false
3,800
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.xml.transform; /** * Indicates a serious configuration error. * <p> *  表示严重的配置错误。 * */ public class TransformerConfigurationException extends TransformerException { /** * Create a new <code>TransformerConfigurationException</code> with no * detail mesage. * <p> *  创建一个没有详细信息的新<code> TransformerConfigurationException </code>。 * */ public TransformerConfigurationException() { super("Configuration Error"); } /** * Create a new <code>TransformerConfigurationException</code> with * the <code>String </code> specified as an error message. * * <p> *  使用指定为错误消息的<code> String </code>创建新的<code> TransformerConfigurationException </code>。 * * * @param msg The error message for the exception. */ public TransformerConfigurationException(String msg) { super(msg); } /** * Create a new <code>TransformerConfigurationException</code> with a * given <code>Exception</code> base cause of the error. * * <p> *  使用给定的<code>异常</code>创建一个新的<code> TransformerConfigurationException </code>错误的原因。 * * * @param e The exception to be encapsulated in a * TransformerConfigurationException. */ public TransformerConfigurationException(Throwable e) { super(e); } /** * Create a new <code>TransformerConfigurationException</code> with the * given <code>Exception</code> base cause and detail message. * * <p> *  使用给定的<code>异常</code>原因和详细信息消息创建新的<code> TransformerConfigurationException </code>。 * * * @param e The exception to be encapsulated in a * TransformerConfigurationException * @param msg The detail message. */ public TransformerConfigurationException(String msg, Throwable e) { super(msg, e); } /** * Create a new TransformerConfigurationException from a message and a Locator. * * <p>This constructor is especially useful when an application is * creating its own exception from within a DocumentHandler * callback.</p> * * <p> *  从消息和定位器创建一个新的TransformerConfigurationException。 * *  <p>当应用程序从DocumentHandler回调中创建自己的异常时,此构造函数尤其有用。</p> * * * @param message The error or warning message. * @param locator The locator object for the error or warning. */ public TransformerConfigurationException(String message, SourceLocator locator) { super(message, locator); } /** * Wrap an existing exception in a TransformerConfigurationException. * * <p> * * @param message The error or warning message, or null to * use the message from the embedded exception. * @param locator The locator object for the error or warning. * @param e Any exception. */ public TransformerConfigurationException(String message, SourceLocator locator, Throwable e) { super(message, locator, e); } }
[ "zhaobo@MacBook-Pro.local" ]
zhaobo@MacBook-Pro.local
4df232e1c9a0717046c88ea8d52f7e6dcce0db27
1441bd045fe5a237928f34f651eb196c1fb43c77
/app/src/main/java/com/lemelo/localexpensecontrolv2/CadastraEntradaFragment.java
116c51bbecb446c0a2299ebab058bcc7b5b251b6
[]
no_license
leocij/LocalExpenseControlV2
5573b905fcc5a0d84ae770181b893ca53e5c3882
68d7cd6b47640ad9a198f985ea365077f008a246
refs/heads/master
2021-03-19T07:22:48.453062
2017-06-16T18:43:20
2017-06-16T18:43:20
94,381,312
0
0
null
null
null
null
UTF-8
Java
false
false
5,000
java
package com.lemelo.localexpensecontrolv2; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.annotation.RequiresApi; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.ScrollView; import android.widget.Toast; import java.text.DateFormat; import java.text.NumberFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; /* * Created by leoci on 13/06/2017. */ public class CadastraEntradaFragment extends Fragment{ @RequiresApi(api = Build.VERSION_CODES.N) @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.activity_cadastra_entrada, container, false); getActivity().setTitle("Entrada de Valores"); ScrollView loginScrollView = (ScrollView) view.findViewById(R.id.scrollViewCadastraEntrada); loginScrollView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { //close keyboard new MyKeyboard().hideKeyboard(getActivity(), v); //Toast.makeText(getContext(), "Passei aqui - Dentro do Scroll!", Toast.LENGTH_LONG).show(); return false; } }); final EditText txtEntradaData = (EditText) view.findViewById(R.id.txtData); final EditText txtEntradaDescricao = (EditText) view.findViewById(R.id.txtDescricao); final EditText txtEntradaValor = (EditText) view.findViewById(R.id.txtValor); SimpleDateFormat sdf1 = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault()); //final DateFormat data = DateFormat.getDateInstance(); txtEntradaData.setText(sdf1.format(Calendar.getInstance().getTime())); txtEntradaDescricao.requestFocus(); //open keyboard new MyKeyboard().showKeyboard(getActivity()); NumberFormat nf = NumberFormat.getCurrencyInstance(); txtEntradaValor.setText(nf.format(0)); txtEntradaValor.addTextChangedListener(new MoneyTextWatcher(txtEntradaValor)); final Button btnControleSalvar = (Button) view.findViewById(R.id.btnSalvar); btnControleSalvar.setOnClickListener(new View.OnClickListener() { SQLiteDatabase db; @Override public void onClick(View v) { try { String dataStr = txtEntradaData.getText().toString(); String descricao = txtEntradaDescricao.getText().toString(); String valorStr = txtEntradaValor.getText().toString(); if(valorStr.equals("")){ NumberFormat nf = NumberFormat.getCurrencyInstance(); valorStr = nf.format(0); } //BigDecimal valor = new BigDecimal(valorStr); FabricaConexao fabrica = new FabricaConexao(getContext()); db = fabrica.getWritableDatabase(); EntradaDao entradaDao = new EntradaDao(db); Entrada entrada = new Entrada(); entrada.setData(dataStr); entrada.setDescricao(descricao); entrada.setValor(valorStr); entradaDao.insert(entrada); Toast.makeText(getContext(), "Registro Salvo!", Toast.LENGTH_LONG).show(); //LIMPA O FORMULARIO SimpleDateFormat sdf1 = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault()); txtEntradaData.setText(sdf1.format(Calendar.getInstance().getTime())); //Toast.makeText(getContext(), "Passei aqui - Abre teclado!", Toast.LENGTH_LONG).show(); //close keyboard new MyKeyboard().hideKeyboard(getActivity(), v); //open keyboard new MyKeyboard().showKeyboard(getActivity()); txtEntradaDescricao.setText(""); txtEntradaDescricao.requestFocus(); NumberFormat nf = NumberFormat.getCurrencyInstance(); txtEntradaValor.setText(nf.format(0)); txtEntradaValor.addTextChangedListener(new MoneyTextWatcher(txtEntradaValor)); } catch (ParseException e) { e.printStackTrace(); } finally { if (db != null && db.isOpen()) { db.close(); } } } }); return view; } }
[ "leocij@hotmail.com" ]
leocij@hotmail.com
faac568620b13e07a3bac653faf3db0e3079cb21
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_2fbc8b2cbbb19a2b8678df7a099bcfb4e210075c/ChannelAttributes/4_2fbc8b2cbbb19a2b8678df7a099bcfb4e210075c_ChannelAttributes_t.java
36b31a49806ff63761b9a935cad4d2d14283fc46
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,849
java
package pt.com.broker.types.channels; import java.net.InetSocketAddress; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; public class ChannelAttributes { private static final ConcurrentMap<String, Map<String, Object>> PROPS = new ConcurrentHashMap<String, Map<String, Object>>(); public static void set(String channelId, String name, Object value) { if (channelId == null) { return; } Map<String, Object> attribs = PROPS.get(channelId); if (attribs == null) { attribs = new ConcurrentHashMap<String, Object>(); PROPS.put(channelId, attribs); } attribs.put(name, value); } public static Object get(String channelId, String name) { if (channelId == null) { return null; } Map<String, Object> attribs = PROPS.get(channelId); if (attribs == null) { return null; } return attribs.get(name); } public static void remove(String channelId) { PROPS.remove(channelId); } public static Set<String> getAttributeKeys(String channelId) { Map<String, Object> attribs = PROPS.get(channelId); if (attribs != null) { return attribs.keySet(); } else { return Collections.emptySet(); } } public static String getChannelId(ChannelHandlerContext ctx) { return getChannelId(ctx.getChannel()); } public static String getChannelId(Channel channel) { InetSocketAddress remoteAddress = (InetSocketAddress) channel.getRemoteAddress(); if (remoteAddress == null) { return null; } String channelId = remoteAddress.toString(); return channelId; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
92a9d4ac358dd6e77e66d76600f350381fc8bffd
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator2814.java
9474bccc777cf830c6ea9fdea933b0d2aa05e6e0
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
267
java
package syncregions; public class BoilerActuator2814 { public int execute(int temperatureDifference2814, boolean boilerStatus2814) { //sync _bfpnGUbFEeqXnfGWlV2814, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
30f6b85a833395dfe54678c999240e86e4fb22dc
f9fcde801577e7b9d66b0df1334f718364fd7b45
/icepdf-4.1.3/icepdf/viewer/src/org/icepdf/ri/common/PrintJobWatcher.java
1bf8800fa23317c20c64f1089655d57274bb51f2
[]
no_license
numbnet/icepdf_FULL-versii
86d74147dc107e4f2239cd4ac312f15ebbeec473
b67e1ecb60aca88cacdca995d24263651cf8296b
refs/heads/master
2021-01-12T11:13:57.107091
2016-11-04T16:43:45
2016-11-04T16:43:45
72,880,329
1
1
null
null
null
null
UTF-8
Java
false
false
3,222
java
/* * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * "The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations under * the License. * * The Original Code is ICEpdf 4.1 open source software code, released * May 1st, 2009. The Initial Developer of the Original Code is ICEsoft * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C) * 2004-2010 ICEsoft Technologies Canada, Corp. All Rights Reserved. * * Contributor(s): _____________________. * * Alternatively, the contents of this file may be used under the terms of * the GNU Lesser General Public License Version 2.1 or later (the "LGPL" * License), in which case the provisions of the LGPL License are * applicable instead of those above. If you wish to allow use of your * version of this file only under the terms of the LGPL License and not to * allow others to use your version of this file under the MPL, indicate * your decision by deleting the provisions above and replace them with * the notice and other provisions required by the LGPL License. If you do * not delete the provisions above, a recipient may use your version of * this file under either the MPL or the LGPL License." * */ package org.icepdf.ri.common; import javax.print.DocPrintJob; import javax.print.event.PrintJobAdapter; import javax.print.event.PrintJobEvent; /** * Simple Print Job Watcher. * * @since 3.0 */ public class PrintJobWatcher { // true if it is safe to close the print job's input stream private boolean done = false; public PrintJobWatcher(){ } public PrintJobWatcher(DocPrintJob job) { setPrintJob(job); } public void setPrintJob(DocPrintJob job){ // Add a listener to the print job job.addPrintJobListener( new PrintJobAdapter() { public void printJobCanceled(PrintJobEvent printJobEvent) { allDone(); } public void printJobCompleted(PrintJobEvent printJobEvent) { allDone(); } public void printJobFailed(PrintJobEvent printJobEvent) { allDone(); } public void printJobNoMoreEvents(PrintJobEvent printJobEvent) { allDone(); } void allDone() { synchronized (PrintJobWatcher.this) { done = true; PrintJobWatcher.this.notify(); } } }); } public synchronized void waitForDone() { try { while (!done) { wait(); } } catch (InterruptedException e) { } } }
[ "patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74" ]
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
5c03bd7fc085e905f694669b8ea2e792cd1a4186
c498cefc16ba5d75b54d65297b88357d669c8f48
/gameserver/src/ru/catssoftware/gameserver/instancemanager/AwayManager.java
e6533bb3d96ed1a8713f1e9ef7cda120e3429a99
[]
no_license
ManWithShotgun/l2i-JesusXD-3
e17f7307d9c5762b60a2039655d51ab36ec76fad
8e13b4dda28905792621088714ebb6a31f223c90
refs/heads/master
2021-01-17T16:10:42.561720
2016-07-22T18:41:22
2016-07-22T18:41:22
63,967,514
1
2
null
null
null
null
UTF-8
Java
false
false
5,197
java
package ru.catssoftware.gameserver.instancemanager; import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; import org.apache.log4j.Logger; import ru.catssoftware.Config; import ru.catssoftware.gameserver.ThreadPoolManager; import ru.catssoftware.gameserver.ai.CtrlIntention; import ru.catssoftware.gameserver.model.actor.instance.L2PcInstance; import ru.catssoftware.gameserver.network.serverpackets.NpcHtmlMessage; import ru.catssoftware.gameserver.network.serverpackets.SetupGauge; import ru.catssoftware.gameserver.network.serverpackets.SocialAction; public final class AwayManager { private final static Logger _log = Logger.getLogger(AwayManager.class.getName()); private static AwayManager _instance; Map<L2PcInstance, RestoreData> _awayPlayers; public static final AwayManager getInstance() { if (_instance == null) { _instance = new AwayManager(); _log.info("AwayService: Initialized."); } return _instance; } private final class RestoreData { private final String _originalTitle; private final boolean _sitForced; public RestoreData(L2PcInstance activeChar) { _originalTitle = activeChar.getTitle(); _sitForced = !activeChar.isSitting(); } @SuppressWarnings("unused") public boolean isSitForced() { return _sitForced; } public void restore(L2PcInstance activeChar) { activeChar.setTitle(_originalTitle); } } private AwayManager() { _awayPlayers = Collections.synchronizedMap(new WeakHashMap<L2PcInstance, RestoreData>()); } public void setAway(L2PcInstance activeChar, String text) { activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 9)); // Send html page start NpcHtmlMessage html = new NpcHtmlMessage(activeChar.getObjectId()); html.setFile("data/html/mods/away/away-start.htm"); html.replace("%time%", Config.ALT_AWAY_TIMER); activeChar.sendPacket(html); // Send html page end activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); if (activeChar.isGM()) { SetupGauge sg = new SetupGauge(SetupGauge.BLUE, 1000); activeChar.sendPacket(sg); activeChar.setIsImmobilized(true); ThreadPoolManager.getInstance().scheduleGeneral(new setPlayerAwayTask(activeChar, text), 1000); } else { SetupGauge sg = new SetupGauge(SetupGauge.BLUE, Config.ALT_AWAY_TIMER * 1000); activeChar.sendPacket(sg); activeChar.setIsImmobilized(true); ThreadPoolManager.getInstance().scheduleGeneral(new setPlayerAwayTask(activeChar, text), Config.ALT_AWAY_TIMER * 1000); } } public void setBack(L2PcInstance activeChar) { // Send html page start NpcHtmlMessage html = new NpcHtmlMessage(activeChar.getObjectId()); html.setFile("data/html/mods/away/away-stop.htm"); html.replace("%time%", Config.ALT_BACK_TIMER); activeChar.sendPacket(html); // Send html page end if (activeChar.isGM()) { SetupGauge sg = new SetupGauge(SetupGauge.BLUE, 1000); activeChar.sendPacket(sg); ThreadPoolManager.getInstance().scheduleGeneral(new setPlayerBackTask(activeChar), 1000); } else { SetupGauge sg = new SetupGauge(SetupGauge.BLUE, Config.ALT_BACK_TIMER * 1000); activeChar.sendPacket(sg); ThreadPoolManager.getInstance().scheduleGeneral(new setPlayerBackTask(activeChar), Config.ALT_BACK_TIMER * 1000); } } class setPlayerAwayTask implements Runnable { private final L2PcInstance _activeChar; private final String _awayText; setPlayerAwayTask(L2PcInstance activeChar, String awayText) { _activeChar = activeChar; _awayText = awayText; } public void run() { if (_activeChar == null) return; if (_activeChar.isAttackingNow() || _activeChar.isCastingNow()) return; _awayPlayers.put(_activeChar, new RestoreData(_activeChar)); _activeChar.disableAllSkills(); _activeChar.abortAttack(); _activeChar.abortCast(); _activeChar.setTarget(null); _activeChar.setIsImmobilized(false); _activeChar.sitDown(); // Send html page start NpcHtmlMessage html = new NpcHtmlMessage(_activeChar.getObjectId()); html.setFile("data/html/mods/away/away-on.htm"); _activeChar.sendPacket(html); // Send html page end if (_awayText.length() <= 1) _activeChar.setTitle("*Away*"); else _activeChar.setTitle("Away*" + _awayText + "*"); _activeChar.broadcastUserInfo(); _activeChar.setIsParalyzed(true); _activeChar.setIsAway(true); } } class setPlayerBackTask implements Runnable { private final L2PcInstance _activeChar; setPlayerBackTask(L2PcInstance activeChar) { _activeChar = activeChar; } public void run() { if (_activeChar == null) return; RestoreData rd = _awayPlayers.get(_activeChar); if (rd == null) return; _activeChar.setIsParalyzed(false); _activeChar.enableAllSkills(); _activeChar.setIsAway(false); _activeChar.standUp(); rd.restore(_activeChar); _awayPlayers.remove(_activeChar); _activeChar.broadcastUserInfo(); // Send html page start NpcHtmlMessage html = new NpcHtmlMessage(_activeChar.getObjectId()); html.setFile("data/html/mods/away/away-off.htm"); _activeChar.sendPacket(html); // Send html page end } } }
[ "u3n3ter7@mail.ru" ]
u3n3ter7@mail.ru
850a0a64cb1a3bd702861721f0b16849db5843e3
78c3bfc39016b8348d1140bdaa667bf8470733c3
/discovery-console-desktop/src/main/java/com/nepxion/discovery/console/desktop/ConsoleLauncher.java
8277b3d274d7e77d43c88f76f1a391f70eb5a6a4
[ "Apache-2.0" ]
permissive
lidaorong/Discovery
16696ff428298893be3ae922415b9a242a2fc44f
df30e39b25f7bb47e21356b57484fb68ac531902
refs/heads/master
2022-12-04T07:22:31.303802
2020-09-01T02:06:24
2020-09-01T02:06:24
291,878,393
1
0
Apache-2.0
2020-09-01T02:44:28
2020-09-01T02:44:27
null
UTF-8
Java
false
false
795
java
package com.nepxion.discovery.console.desktop; /** * <p>Title: Nepxion Discovery</p> * <p>Description: Nepxion Discovery</p> * <p>Copyright: Copyright (c) 2017-2050</p> * <p>Company: Nepxion</p> * @author Haojun Ren * @version 1.0 */ import javax.swing.SwingUtilities; import com.nepxion.discovery.console.desktop.context.ContextInitializer; public class ConsoleLauncher { public static void main(String[] args) { ContextInitializer.initialize(); SwingUtilities.invokeLater(new Runnable() { public void run() { ConsoleLogin consoleLogin = new ConsoleLogin(); consoleLogin.launch(); ConsoleFrame consoleFrame = new ConsoleFrame(); consoleFrame.launch(); } }); } }
[ "1394997@qq.com" ]
1394997@qq.com
8cd44908eacbc2dc0625a892ccd85879fd11cff1
0e06e096a9f95ab094b8078ea2cd310759af008b
/sources/com/google/android/gms/internal/ads/zzavn.java
6a0a42473c9a76146262fb67199e13c9103d7317
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
702
java
package com.google.android.gms.internal.ads; import com.google.android.gms.internal.ads.zzayf.zza; import java.security.GeneralSecurityException; public final class zzavn { public static final zzayf zzdht = ((zzayf) zzayf.zzaam().zzej("TINK_MAC_1_0_0").zzb(zzaub.zza("TinkMac", "Mac", "HmacKey", 0, true)).zzadi()); private static final zzayf zzdhu = ((zzayf) ((zza) zzayf.zzaam().zza(zzdht)).zzej("TINK_MAC_1_1_0").zzadi()); static { try { zzwk(); } catch (Throwable e) { throw new ExceptionInInitializerError(e); } } public static void zzwk() throws GeneralSecurityException { zzauo.zza("TinkMac", new zzavm()); } }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
26e68b98e3b8184e613c89067446b64490b78d99
385e3414ccb7458bbd3cec326320f11819decc7b
/frameworks/base/services/core/java/com/android/server/pm/PendingPackage.java
3740556193a0369bb9d7b5e6ed5344ce541ef90e
[ "LicenseRef-scancode-unicode", "Apache-2.0" ]
permissive
carlos22211/Tango_AL813
14de7f2693c3045b9d3c0cb52017ba2bb6e6b28f
b50b1b7491dc9c5e6b92c2d94503635c43e93200
refs/heads/master
2020-03-28T08:09:11.127995
2017-06-26T05:05:29
2017-06-26T05:05:29
147,947,860
1
0
null
2018-09-08T15:55:46
2018-09-08T15:55:45
null
UTF-8
Java
false
false
2,055
java
/* * Copyright (C) 2014 MediaTek Inc. * Modification based on code covered by the mentioned copyright * and/or permission notice(s). */ /* * Copyright (C) 2011 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.server.pm; import java.io.File; final class PendingPackage extends PackageSettingBase { final int sharedId; PendingPackage(String name, String realName, File codePath, File resourcePath, String legacyNativeLibraryPathString, String primaryCpuAbiString, String secondaryCpuAbiString, String cpuAbiOverrideString, int sharedId, int pVersionCode, int pkgFlags) { super(name, realName, codePath, resourcePath, legacyNativeLibraryPathString, primaryCpuAbiString, secondaryCpuAbiString, cpuAbiOverrideString, pVersionCode, pkgFlags); this.sharedId = sharedId; } /// M: [FlagExt] Additional constructor for MTK flags PendingPackage(String name, String realName, File codePath, File resourcePath, String legacyNativeLibraryPathString, String primaryCpuAbiString, String secondaryCpuAbiString, String cpuAbiOverrideString, int sharedId, int pVersionCode, int pkgFlags, int flagsEx) { super(name, realName, codePath, resourcePath, legacyNativeLibraryPathString, primaryCpuAbiString, secondaryCpuAbiString, cpuAbiOverrideString, pVersionCode, pkgFlags, flagsEx); this.sharedId = sharedId; } }
[ "zhangjinqiang@huaqin.com" ]
zhangjinqiang@huaqin.com
4978647042881deeb702b55653b81801761b89f1
b499e91f1a365cf969bfd54967820c1126322166
/3.JavaMultithreading/src/com/javarush/task/task32/task3209/actions/SuperscriptAction.java
2caad7be13fcae752257f0fd897935ae5cc3f587
[]
no_license
msuzko/JRT
9a00a1d367153f26aab4fd5863cd1b2f336bd81c
59906f4afee0ae1d2378b5c19a832694af2d8286
refs/heads/master
2020-09-11T13:12:52.956583
2019-12-10T07:58:56
2019-12-10T07:58:56
221,706,354
0
0
null
null
null
null
UTF-8
Java
false
false
969
java
package com.javarush.task.task32.task3209.actions; import javax.swing.*; import javax.swing.text.MutableAttributeSet; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; import javax.swing.text.StyledEditorKit; import java.awt.event.ActionEvent; public class SuperscriptAction extends StyledEditorKit.StyledTextAction{ @Override public void actionPerformed(ActionEvent e) { JEditorPane editor = getEditor(e); if (editor != null) { MutableAttributeSet mutableAttributeSet = getStyledEditorKit(editor).getInputAttributes(); SimpleAttributeSet simpleAttributeSet = new SimpleAttributeSet(); StyleConstants.setSuperscript(simpleAttributeSet, !StyleConstants.isSuperscript(mutableAttributeSet)); setCharacterAttributes(editor, simpleAttributeSet, false); } } public SuperscriptAction() { super(StyleConstants.Superscript.toString());; } }
[ "msuzko@gmail.com" ]
msuzko@gmail.com
2610290fea502859e21d096ca1805a219d916104
aa65ba75852735fadd7c113d32527b257f3afb6f
/components/registry/org.wso2.carbon.registry.social.impl/src/test/java/org/wso2/carbon/registry/social/impl/test/people/userprofile/BaseTestCase.java
a76b40e8f429b8121c14479b7e2c30e34856c360
[]
no_license
Cloudxtreme/platform-3
0f2853c44604a07380de86abaad695b8744f990b
28e34d628dd4c5990b16604a5ec9aeb23be177ae
refs/heads/master
2021-05-29T14:40:32.621959
2012-12-03T12:15:43
2012-12-03T12:15:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,968
java
/* * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. 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.wso2.carbon.registry.social.impl.test.people.userprofile; import junit.framework.TestCase; import java.io.File; import org.wso2.carbon.utils.multitenancy.CarbonContextHolder; public class BaseTestCase extends TestCase { public void setUp() throws Exception { if (System.getProperty("carbon.home") == null) { File file = new File("src/test/resources/carbon-home"); if (file.exists()) { System.setProperty("carbon.home", file.getAbsolutePath()); } else { file = new File("../src/test/resources/carbon-home"); if (file.exists()) { System.setProperty("carbon.home", file.getAbsolutePath()); } } } // The line below is responsible for initializing the cache. CarbonContextHolder.getCurrentCarbonContextHolder(); } protected static boolean deleteDir(File dir) { if (dir.isDirectory()) { String[] children = dir.list(); for (int i = 0; i < children.length; i++) { boolean success = deleteDir(new File(dir, children[i])); if (!success) { return false; } } } return dir.delete(); } }
[ "denis@a5903396-d722-0410-b921-86c7d4935375" ]
denis@a5903396-d722-0410-b921-86c7d4935375
605e480d23c684fa94a04820f43366810bd48495
39693fdb796d8d374088764bb59cd61e2bb3003b
/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workflow/mapper/WorkbenchDisplayMapper.java
f926801ce683038cc9ed1417f0a1d4f4ee9225f2
[ "MIT" ]
permissive
wanddy/jeecg-boot-User
085d51018bf2908374a868659da72cf64fb16ba3
a12bf0e17829bd19aaebae5813be92c3e4c90e6d
refs/heads/master
2023-08-11T19:04:41.868082
2021-09-23T05:37:31
2021-09-23T05:37:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
721
java
package org.jeecg.modules.workflow.mapper; import org.apache.ibatis.annotations.Mapper; import org.jeecg.modules.workflow.entity.vo.ProcessDevelopmentVO; import java.util.List; /** * 工作台功能展示 * @Description: TODO * @author: SunBoWen * @date: 2021年06月03日 14:21 */ @Mapper public interface WorkbenchDisplayMapper { /** * 得到工作台的所有内容 * */ List<String> getWorkbenchDisplayFindAllGroup(); /** * 通过流程key寻找版本 * */ List<ProcessDevelopmentVO> findKeyAndVersions(String procDefGroup); /** * 通过组找到所有工作台内容 * */ List<ProcessDevelopmentVO> getWorkbenchDisplayByGroup(String procDefGroup); }
[ "2439644676@qq.com" ]
2439644676@qq.com
40995d7d7f7109612ced9e2938dd8ec2d9041a8b
7b52594772a8753b994558df44fc37dddb51fb5f
/visitor/src/main/java/com/dao/pattern/visitor/impl/FileWrite.java
d0b6f19bfbee712500df0de4157dde3fd6d6abfd
[]
no_license
wanwujiedao/pattern
c0a039e5d8d6cb2353cc89453edc4384c58f1d5f
e21d6e56aff4d41c9378c1d6a1b16337d8b0206d
refs/heads/master
2022-07-12T10:46:34.781298
2019-12-11T08:01:12
2019-12-11T08:01:12
120,388,391
3
3
null
2020-10-12T21:31:37
2018-02-06T02:08:38
Java
UTF-8
Java
false
false
627
java
package com.dao.pattern.visitor.impl; import com.dao.pattern.visitor.core.Visitor; import com.dao.pattern.visitor.interfaces.FileOptoin; /** * 写文件 * * @author 阿导 * @version 1.0 * @fileName com.dao.pattern.visitor.impl.FileWrite.java * @CopyRright (c) 2018-万物皆导 * @created 2018-04-03 08:37:00 */ public class FileWrite implements FileOptoin { /** * 文件写入 * * @param visitor * @return void * @author 阿导 * @time 2018/4/3 * @CopyRight 万物皆导 */ @Override public void option(Visitor visitor) { visitor.visitor(this); } }
[ "1" ]
1
d02191359bf8d09a9d3e298e5f806c223a424456
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/C74923bn.java
6158f33802de59d40350561e43012843a6add524
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
1,462
java
package X; import android.content.Context; import com.google.android.search.verification.client.R; import com.whatsapp.WaTextView; import com.whatsapp.search.views.MessageThumbView; /* renamed from: X.3bn reason: invalid class name and case insensitive filesystem */ public class C74923bn extends AnonymousClass3Zd { public final WaTextView A00 = ((WaTextView) AnonymousClass0Q7.A0D(this, R.id.media_time)); public final AnonymousClass01X A01 = AnonymousClass01X.A00(); public final MessageThumbView A02; @Override // X.AnonymousClass3Zd public float getRatio() { return 1.0f; } public C74923bn(Context context) { super(context); MessageThumbView messageThumbView = (MessageThumbView) AnonymousClass0Q7.A0D(this, R.id.thumb_view); this.A02 = messageThumbView; messageThumbView.setContentDescription(this.A01.A06(R.string.gif_preview_description)); } @Override // X.AnonymousClass3Zd public int getMark() { return R.drawable.msg_status_gif; } public void setMessage(AnonymousClass0ZB r3) { super.setMessage((AnonymousClass0M3) r3); MessageThumbView messageThumbView = this.A02; messageThumbView.setVisibility(0); messageThumbView.A00 = ((AnonymousClass3ON) this).A00; messageThumbView.setMessage(r3); WaTextView waTextView = this.A00; waTextView.setText(""); waTextView.setVisibility(8); } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
a680f1ab0f10d63c1ae535d79e412d0112108121
b5a1e01b51098d52992c898045c2fc800b4a14df
/aliyun-java-sdk-dms-enterprise/src/main/java/com/aliyuncs/dms_enterprise/model/v20181101/BackFillResponse.java
734eb7cad0d2d85f129a1b4b792e4cef20ad0db0
[ "Apache-2.0" ]
permissive
lingluo-hub/aliyun-openapi-java-sdk
c2a761524e2042c4d26ce088e9eb42da21db6971
6b3274e33ff5816d8bddbe72da989eb54a41e33b
refs/heads/master
2023-04-07T23:34:32.220685
2023-04-02T02:44:37
2023-04-02T02:44:37
233,382,102
0
0
NOASSERTION
2023-03-09T22:01:22
2020-01-12T11:32:35
Java
UTF-8
Java
false
false
1,913
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.dms_enterprise.model.v20181101; import com.aliyuncs.AcsResponse; import com.aliyuncs.dms_enterprise.transform.v20181101.BackFillResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class BackFillResponse extends AcsResponse { private String requestId; private String errorCode; private String errorMessage; private Boolean success; private Long nodeId; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getErrorCode() { return this.errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String getErrorMessage() { return this.errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } public Long getNodeId() { return this.nodeId; } public void setNodeId(Long nodeId) { this.nodeId = nodeId; } @Override public BackFillResponse getInstance(UnmarshallerContext context) { return BackFillResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
999c9fc58a45873413a462380e753edecf3e9400
243eaf02e124f89a21c5d5afa707db40feda5144
/src/unk/com/tencent/mm/ui/login/m.java
fc5786298a64f65943b94afd6323b93809d63d58
[]
no_license
laohanmsa/WeChatRE
e6671221ac6237c6565bd1aae02f847718e4ac9d
4b249bce4062e1f338f3e4bbee273b2a88814bf3
refs/heads/master
2020-05-03T08:43:38.647468
2013-05-18T14:04:23
2013-05-18T14:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package unk.com.tencent.mm.ui.login; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; final class m implements DialogInterface.OnClickListener { m(FacebookLoginUI paramFacebookLoginUI) { } public final void onClick(DialogInterface paramDialogInterface, int paramInt) { } } /* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar * Qualified Name: com.tencent.mm.ui.login.m * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
958372f1186c43aa8e2919e9274390b736bfd313
e34f5f7c63bfb57a4d4e60bd3c7fea36008b580e
/logback_example/src/main/java/au/com/showcase/application/App.java
22e3e59457ccb2701300aea1251b3277fd552831
[]
no_license
bennettjosephb/practice
6e7b0e29a43780d773b930f6c611a39d92e39c1d
1e85de95ac827aae436b2c017de39f82b7882af8
refs/heads/master
2021-01-19T10:03:20.219300
2014-03-01T04:33:59
2014-03-01T04:33:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
536
java
package au.com.showcase.application; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Hello world! * */ public class App { private static final Logger slf4jLogger = LoggerFactory .getLogger(App.class); public static void main(String[] args) { slf4jLogger.trace("Hello World!"); String name = "Abhijit"; slf4jLogger.debug("Hi, {}", name); slf4jLogger.info("Welcome to the HelloWorld example of Logback."); slf4jLogger.warn("Dummy warning message."); slf4jLogger.error("Dummy error message."); } }
[ "bennettjosephb@gmail.com" ]
bennettjosephb@gmail.com
110bb97326b5c7fca0411b0846d64aec1a47d7a0
b3f0b43d8e0e0187ea4d260b746f6b45ccf9e97d
/flashlib.core.io/src/main/java/com/flash3388/flashlib/io/devices/PositionController.java
f1b13448d483630fd1d17d3bda047249b8d1afa1
[ "BSD-3-Clause" ]
permissive
Flash3388/FlashLib
55cfacd40ad39f4f12b48250e73992c6696f5bd8
482c626ff66d457525abda984933375d159a537e
refs/heads/master
2023-07-20T02:50:46.912408
2023-07-06T19:26:45
2023-07-06T19:26:45
90,011,594
14
1
BSD-3-Clause
2023-05-06T13:55:15
2017-05-02T08:51:16
Java
UTF-8
Java
false
false
1,008
java
package com.flash3388.flashlib.io.devices; import com.flash3388.flashlib.control.Stoppable; import java.io.Closeable; import java.io.IOException; /** * Represents controller component for position-based actuator, * such as a <em>Servo</em>, <em>Stepper</em> and such. * * @since FlashLib 2.0.0 */ public interface PositionController extends Closeable, Stoppable { /** * Sets the position of the component controlled by this object. * * @param position the position to set the controlled object between 0 and 1, * representing percentages from initial position to max position. */ void set(double position); /** * Gets the current position of the component controlled by this object. * * @return the position of the controlled object. */ double get(); /** * Stops the motion of the controlled component. */ @Override void stop(); @Override default void close() throws IOException { } }
[ "tomtzook@gmail.com" ]
tomtzook@gmail.com
dc0193401ed03f2567f5945ef5de387793721b47
41d9db20ac87414d8213704ffb1e927dc3d14047
/DevLibUtils/src/main/java/dev/utils/app/camera1/AutoFocusAssist.java
6577100d40e1840495db4d706a9950ef7a6bf65e
[ "Apache-2.0" ]
permissive
Hansnowqiang/DevUtils
ec03ec6ec4edbccf407b7130a7eb97270fadb425
d1cfc822965075dd75cb988983ac96b079ce3b24
refs/heads/master
2020-06-07T16:05:58.410115
2019-06-21T04:29:48
2019-06-21T04:29:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,704
java
package dev.utils.app.camera1; import android.annotation.SuppressLint; import android.hardware.Camera; import android.os.AsyncTask; import android.os.Build; import java.util.ArrayList; import java.util.Collection; import java.util.concurrent.RejectedExecutionException; import dev.utils.LogPrintUtils; /** * detail: 摄像头自动获取焦点辅助类 * @author Ttt * <pre> * 对焦模式 * @see <a href="https://blog.csdn.net/fulinwsuafcie/article/details/49558001"/> * </pre> */ public final class AutoFocusAssist implements Camera.AutoFocusCallback { // 日志 TAG private final String TAG = AutoFocusAssist.class.getSimpleName(); // 设置对焦模式 public static final Collection<String> FOCUS_MODES; static { FOCUS_MODES = new ArrayList<>(); FOCUS_MODES.add(Camera.Parameters.FOCUS_MODE_AUTO); // 自动对焦 FOCUS_MODES.add(Camera.Parameters.FOCUS_MODE_MACRO); // 微距 } // ======== // = 变量 = // ======== // 自动对焦时间间隔 private long mInterval; // 摄像头对象 private final Camera mCamera; // 判断摄像头是否使用对焦 private final boolean mUseAutoFocus; // 判断是否停止对焦 private boolean mStopped; // 判断是否对焦中 private boolean mFocusing; // 对焦任务 private AsyncTask<?, ?, ?> mOutstandingTask; // 判断是否需要自动对焦 private boolean mAutoFocus = true; // ============ // = 构造函数 = // ============ /** * 构造函数 * @param camera {@link android.hardware.Camera} */ public AutoFocusAssist(final Camera camera) { this(camera, 2000L); } /** * 构造函数 * @param camera {@link android.hardware.Camera} * @param interval 自动对焦时间间隔 */ public AutoFocusAssist(final Camera camera, final long interval) { this.mCamera = camera; this.mInterval = interval; // 防止为 null if (camera != null) { // 获取对象对焦模式 String currentFocusMode = camera.getParameters().getFocusMode(); // 判断是否支持对焦 mUseAutoFocus = FOCUS_MODES.contains(currentFocusMode); } else { // 不支持对焦 mUseAutoFocus = false; } // 开始任务 start(); } /** * 设置对焦模式 * @param collection 对焦模式集合 */ public static void setFocusModes(final Collection<String> collection) { // 清空旧的 FOCUS_MODES.clear(); // 防止为 null if (collection != null) { FOCUS_MODES.addAll(collection); } } /** * 是否允许自动对焦 * @return {@code true} 自动对焦, {@code false} 非自动对焦 */ public boolean isAutoFocus() { return mAutoFocus; } /** * 设置是否开启自动对焦 * @param autoFocus 是否自动对焦 */ public void setAutoFocus(final boolean autoFocus) { this.mAutoFocus = autoFocus; // 判断是否开启自动对焦 if (autoFocus) { start(); } else { stop(); } } /** * 对焦回调 {@link Camera.AutoFocusCallback} 重写方法 * @param success 是否对焦成功 * @param theCamera 对焦的 {@link android.hardware.Camera} */ @Override public synchronized void onAutoFocus(boolean success, Camera theCamera) { // 对焦结束, 设置非对焦中 mFocusing = false; // 再次自动对焦 autoFocusAgainLater(); } // ============ // = 内部方法 = // ============ /** * 再次自动对焦 */ @SuppressLint("NewApi") private synchronized void autoFocusAgainLater() { // 不属于停止, 并且任务等于 null 才处理 if (!mStopped && mOutstandingTask == null) { // 初始化任务 AutoFocusTask newTask = new AutoFocusTask(); try { if (Build.VERSION.SDK_INT >= 11) { // 默认使用异步任务 newTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { newTask.execute(); } mOutstandingTask = newTask; } catch (RejectedExecutionException ree) { LogPrintUtils.eTag(TAG, ree, "autoFocusAgainLater"); } } } /** * 开始对焦 */ public synchronized void start() { // 如果不使用自动对焦, 则不处理 if (!mAutoFocus) { return; } // 支持对焦才处理 if (mUseAutoFocus) { // 重置任务为 null mOutstandingTask = null; // 不属于停止 并且 非对焦中 if (!mStopped && !mFocusing) { try { // 设置自动对焦回调 mCamera.autoFocus(this); // 表示对焦中 mFocusing = true; } catch (RuntimeException re) { LogPrintUtils.eTag(TAG, re, "start"); // Try again later to keep cycle going autoFocusAgainLater(); } } } } /** * 停止对焦 */ public synchronized void stop() { // 表示属于停止 mStopped = true; // 判断是否支持对焦 if (mUseAutoFocus) { // 关闭任务 cancelOutstandingTask(); try { // 取消对焦 mCamera.cancelAutoFocus(); } catch (RuntimeException re) { LogPrintUtils.eTag(TAG, re, "stop"); } } } /** * 取消对焦任务 */ private synchronized void cancelOutstandingTask() { if (mOutstandingTask != null) { if (mOutstandingTask.getStatus() != AsyncTask.Status.FINISHED) { mOutstandingTask.cancel(true); } mOutstandingTask = null; } } /** * detail: 自动对焦任务 * @author Ttt */ private final class AutoFocusTask extends AsyncTask<Object, Object, Object> { @Override protected Object doInBackground(Object... voids) { try { // 堵塞时间 Thread.sleep(mInterval); } catch (InterruptedException e) { } // 开启定时 start(); return null; } } }
[ "13798405957@163.com" ]
13798405957@163.com
178c6dc72964e8fa8847502ff68949a361456189
1a84cbc6fcaf8af9fea76a7e581ea8c74a505b61
/ruoyi/src/main/java/com/ruoyi/project/system/mapper/SysRoleMapper.java
200bb1ebe8d95ffcf9d2cbd1375dd3b500e82215
[ "MIT" ]
permissive
YunaiV/RuoYi-Vue
f3e4c545cf3edde9a119450c7e5b1efbfc22fd10
795067bef3f0974fa75834e27683e40004189f15
refs/heads/master
2020-11-25T01:12:49.859977
2019-12-17T15:37:31
2019-12-17T15:37:31
228,424,169
73
102
MIT
2019-12-16T16:05:15
2019-12-16T16:05:14
null
UTF-8
Java
false
false
2,352
java
package com.ruoyi.project.system.mapper; import java.util.List; import com.ruoyi.project.system.domain.SysRole; /** * 角色表 数据层 * * @author ruoyi */ public interface SysRoleMapper { /** * 根据条件分页查询角色数据 * * @param role 角色信息 * @return 角色数据集合信息 */ public List<SysRole> selectRoleList(SysRole role); /** * 根据用户ID查询角色 * * @param userId 用户ID * @return 角色列表 */ public List<SysRole> selectRolePermissionByUserId(Long userId); /** * 查询所有角色 * * @return 角色列表 */ public List<SysRole> selectRoleAll(); /** * 根据用户ID获取角色选择框列表 * * @param userId 用户ID * @return 选中角色ID列表 */ public List<Integer> selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 * * @param roleId 角色ID * @return 角色对象信息 */ public SysRole selectRoleById(Long roleId); /** * 根据用户ID查询角色 * * @param userName 用户名 * @return 角色列表 */ public List<SysRole> selectRolesByUserName(String userName); /** * 校验角色名称是否唯一 * * @param roleName 角色名称 * @return 角色信息 */ public SysRole checkRoleNameUnique(String roleName); /** * 校验角色权限是否唯一 * * @param roleKey 角色权限 * @return 角色信息 */ public SysRole checkRoleKeyUnique(String roleKey); /** * 修改角色信息 * * @param role 角色信息 * @return 结果 */ public int updateRole(SysRole role); /** * 新增角色信息 * * @param role 角色信息 * @return 结果 */ public int insertRole(SysRole role); /** * 通过角色ID删除角色 * * @param roleId 角色ID * @return 结果 */ public int deleteRoleById(Long roleId); /** * 批量删除角色信息 * * @param roleIds 需要删除的角色ID * @return 结果 */ public int deleteRoleByIds(Long[] roleIds); }
[ "yzz_ivy@163.com" ]
yzz_ivy@163.com
eceaffb5a199b68664bc4377ecf3e5414c4a189a
7021ee21e2bc4f0de9effd7c591e53b561f90d57
/service/code/src/test/java/ericminio/javaoracle/data/BuildIncomingTest.java
7e5137af7f95ee5bd5c5311553bcde841ee9a807
[ "MIT" ]
permissive
ericminio/java-oracle
fef4aa8718dc4b9692f77c03f39315f22f4aa1a9
4ded43ab9fa1af2bcb3ba5e0afdac5c9c64866e4
refs/heads/master
2023-06-01T10:11:54.938038
2021-06-10T20:09:02
2021-06-10T20:09:02
360,705,256
0
0
null
null
null
null
UTF-8
Java
false
false
916
java
package ericminio.javaoracle.data; import ericminio.javaoracle.domain.Incoming; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; public class BuildIncomingTest { private BuildIncoming buildIncoming; @Before public void sut() { buildIncoming = new BuildIncoming(); } @Test public void resistsNoType() { Incoming incoming = buildIncoming.from(Arrays.asList( "create package any_package as", " function any_function return number;", "end any_package;" ), new ArrayList<String>()); assertThat(incoming.getTypeSpecifications().size(), equalTo(0)); assertThat(incoming.getTypeNames().size(), equalTo(0)); } }
[ "eric.mignot@gmail.com" ]
eric.mignot@gmail.com
aa7a454ff382538f5418d812189f618183092f42
eb2ec617756c0ca664f79a0836f0c1f6f17084f5
/src/main/java/com/mastertech/springboottest/SpringboottestApplication.java
be01770a5070ae58925c0a60570cfd1d241250b8
[]
no_license
ramazanfirin/springboottest
67bfc7aef3105f6346491ebe1c29abc06649628b
d7e8887e7281202ab2510cb6ea64c45c81921e26
refs/heads/master
2020-03-12T04:47:19.627766
2018-04-21T07:45:21
2018-04-21T07:45:21
130,451,761
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
package com.mastertech.springboottest; import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication @SpringBootConfiguration public class SpringboottestApplication { public static void main(String[] args) { SpringApplication.run(SpringboottestApplication.class, args); } }
[ "ramazan_firin@hotmail.com" ]
ramazan_firin@hotmail.com